help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which package is your goto package for pretty-printing javascript?


From: Alex Vong
Subject: Re: Which package is your goto package for pretty-printing javascript?
Date: Wed, 27 Feb 2019 02:06:28 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

[I'm CC'ing guile-user because what I'm about to say might be more
relevant there...]

Vladimir Sedach <address@hidden> writes:

> I use json-reformat.el in Emacs, and the jq program (which does
> pretty-printing, among many other things) when I have to shell
> script.
>
Isn't both programs work with json instead of javascript? Anyway, after
thinking more careful, it seems I need something more powerful than a
pretty-printer. I'll ask in guix-devel about this later.

However, thanks for letting me know about jq! In the homepage, it is
mentioned that "jq is like sed for JSON data". This sounds very
interesting: *nix filters typically work with string line by
line. Data-structure-wise, we are working with list. More precisely,
it's stream (aka lazy list) because we may not get the whole thing
during piping and redirection.

On the other hand, in lisp, we work with s-expression (tree). I've been
wondering if it's possible to create *nix filters that work with
tree. It seems it's exactly what jq is doing!

One application I've long dreamt about: create a variant of grep which
works with context free grammar instead of regular expression. I've even
decided to name it cfgrep...

> Vladimir

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]