From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Vong Newsgroups: gmane.comp.gnu.guix.user,gmane.lisp.guile.user Subject: Re: Which package is your goto package for pretty-printing javascript? Date: Wed, 27 Feb 2019 02:06:28 +0800 Message-ID: <87pnrefmqj.fsf@gmail.com> References: <87r2bwpd2h.fsf@gmail.com> <5c74ec11.1c69fb81.2956f.ea6eSMTPIN_ADDED_BROKEN@mx.google.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="180298"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: guile-user@gnu.org, help-guix@gnu.org, alexvong1995@gmail.com To: Vladimir Sedach Original-X-From: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Tue Feb 26 19:21:14 2019 Return-path: Envelope-to: gcggh-help-guix@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyhLt-000knK-As for gcggh-help-guix@m.gmane.org; Tue, 26 Feb 2019 19:21:13 +0100 Original-Received: from localhost ([127.0.0.1]:59353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyhLs-0002o1-9H for gcggh-help-guix@m.gmane.org; Tue, 26 Feb 2019 13:21:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyhLc-0002mZ-UW for help-guix@gnu.org; Tue, 26 Feb 2019 13:20:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyh8C-0000hU-9S for help-guix@gnu.org; Tue, 26 Feb 2019 13:07:05 -0500 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:46305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gyh7v-0000LQ-Ic; Tue, 26 Feb 2019 13:06:49 -0500 Original-Received: by mail-pl1-x62a.google.com with SMTP id c17so3429682plz.13; Tue, 26 Feb 2019 10:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dYNFVb3KaxwHUnzqquZEptIIaIuc3u9Wo2Hz1XS/Gh4=; b=eYjOWl9QsE29fKwHyEshxVRFdU4XoFDG8yplgO3qdpvUmZw3vLFNs+0YeP1fIwbkTy 5AamYk4VoinKTZhF9nGcd4+Tk82O0XxDNKbb6FzBHtJf5+djPB8H2OAjXDN8vJeYP97g lYWhnDsBn9MdTISftJNyBeGZTknykKPwWSEQxC4PAWzmVDB6JAjRw+Wx7pea2O0Xh/Oh POpUXwNAtf1L/43H4CBTGz4eu77bSPJAYRGYB9q+tj+2fj3/HL/m0dN+Sq+Km8PK0Qh8 nKc03lFuEdlDlwwe42GaZk67MLKTN6lBFsIT0YxMhw38Rw/82DZx3E4pqTMbz1N0ebrt WbVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=dYNFVb3KaxwHUnzqquZEptIIaIuc3u9Wo2Hz1XS/Gh4=; b=FIYCoQO5h0n7wSXuL+Ox4kRw18m2rB5zPg0l7sctKxwi5j2TclA6o0VEY5ujlBMC7o K/msT+i8QMaNr/wQc///0Xl/viwnz8LyK+/DS/KARwNf+fzFGA91YxcWOAUQ5TH0uMUK MNsb9wSRp58ZjWRtEUKDHfzyW2NNR5IVgDUcnbwLwtLm2jq5O/1atowfYaNXW0/PUEcE E74wJUIOmG7WceWR4z/Y6ylEmnrfOesECCezJ/LIvnsdKkIw+z9naYcFSk2i0KAfc/h7 615dclVhRNNErJOuQzfV7O72Qk5qrTSxMSGpVH03jZOVzpmKosWl9kwbh7MOFqLkGK/w BB4A== X-Gm-Message-State: AHQUAuYED92/60Yzwb7h0A+gw2el/i59AhwVijHTpMRczgwnOz/V0qfE To5oFIufhG84Nn7VbGwxDfk= X-Google-Smtp-Source: AHgI3IaRv25p40+97Gj1B+9VHy0SemxmjULQYQk4j4/AbaWueTCxBvV8b3UXAyzrWXYeDt4ZifIqMg== X-Received: by 2002:a17:902:4081:: with SMTP id c1mr17908281pld.297.1551204403847; Tue, 26 Feb 2019 10:06:43 -0800 (PST) Original-Received: from debian (42-98-181-024.static.netvigator.com. [42.98.181.24]) by smtp.gmail.com with ESMTPSA id r28sm35954040pgl.72.2019.02.26.10.06.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 10:06:42 -0800 (PST) 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") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62a X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Original-Sender: "Help-Guix" Xref: news.gmane.org gmane.comp.gnu.guix.user:5966 gmane.lisp.guile.user:15339 Archived-At: --=-=-= Content-Type: text/plain [I'm CC'ing guile-user because what I'm about to say might be more relevant there...] Vladimir Sedach 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQwb8uPLAHCXSnTBVZh71Au9gJS8gUCXHWAJAAKCRBh71Au9gJS 8u/XAPsHsQVfjMiZVK5JhTSyyyit+XiAb0XpkjaiRJhIyJnrJAEA6j+nm4v/IDje QRQnmF51gKEvJ/m8tTdVCOs3n829yQ0= =Flnr -----END PGP SIGNATURE----- --=-=-=--