unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: Which package is your goto package for pretty-printing javascript?
       [not found] ` <5c74ec11.1c69fb81.2956f.ea6eSMTPIN_ADDED_BROKEN@mx.google.com>
@ 2019-02-26 18:06   ` Alex Vong
  0 siblings, 0 replies; only message in thread
From: Alex Vong @ 2019-02-26 18:06 UTC (permalink / raw)
  To: Vladimir Sedach; +Cc: guile-user, help-guix, alexvong1995

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-26 18:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87r2bwpd2h.fsf@gmail.com>
     [not found] ` <5c74ec11.1c69fb81.2956f.ea6eSMTPIN_ADDED_BROKEN@mx.google.com>
2019-02-26 18:06   ` Which package is your goto package for pretty-printing javascript? Alex Vong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).