From: Alex Vong <alexvong1995@gmail.com>
To: Vladimir Sedach <vas@oneofus.la>
Cc: guile-user@gnu.org, help-guix@gnu.org, alexvong1995@gmail.com
Subject: Re: Which package is your goto package for pretty-printing javascript?
Date: Wed, 27 Feb 2019 02:06:28 +0800 [thread overview]
Message-ID: <87pnrefmqj.fsf@gmail.com> (raw)
In-Reply-To: <5c74ec11.1c69fb81.2956f.ea6eSMTPIN_ADDED_BROKEN@mx.google.com> (Vladimir Sedach's message of "Mon, 25 Feb 2019 23:34:11 -0800")
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
[I'm CC'ing guile-user because what I'm about to say might be more
relevant there...]
Vladimir Sedach <vas@oneofus.la> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2019-02-26 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 7:00 Which package is your goto package for pretty-printing javascript? Alex Vong
2019-02-26 7:34 ` Vladimir Sedach
[not found] ` <5c74ec11.1c69fb81.2956f.ea6eSMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-26 18:06 ` Alex Vong [this message]
2019-02-26 18:24 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnrefmqj.fsf@gmail.com \
--to=alexvong1995@gmail.com \
--cc=guile-user@gnu.org \
--cc=help-guix@gnu.org \
--cc=vas@oneofus.la \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.