From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Garreau\, Alexandre" Subject: Re: Serialise lisp objects for babel-supported langage Date: Tue, 16 Oct 2018 23:23:07 +0200 Message-ID: <87k1mhoabo.fsf@portable.galex-713.eu> References: <87efcpr7ir.fsf@portable.galex-713.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCWo6-0006BK-BM for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 17:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCWo5-00058I-6N for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 17:23:14 -0400 Received: from portable.galex-713.eu ([2a00:5884:8305::1]:41390) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCWo4-00055U-TI for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 17:23:13 -0400 In-Reply-To: (John Kitchin's message of "Tue, 16 Oct 2018 16:59:49 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: org-mode-email On 2018-10-16 at 16:59, John Kitchin wrote: > This might be going the opposite direction, but I worked on a way to make > it easier to digest the output of Python in elisp, in these two posts: > > http://kitchingroup.cheme.cmu.edu/blog/2015/05/16/Python-data-structures-= to-lisp/ > http://kitchingroup.cheme.cmu.edu/blog/2016/05/30/Writing-lisp-code-from-= Python/ So like Pymacs already does? Quite the opposite, I=E2=80=99d say: all that seems to go in the same direction. > These days I would probably try serializing via json. it is easy to read > and write in most languages. I feel like not all languages might support json (especially for every object), and it is way more complex to implement than sexps. It feels a bit frustrating to abdicate in front of a lower-standard format than sexps: json could not even be predating sexp if only sexp wasn=E2=80=99t so infamous: they are more efficient, older, and *in reality* easier to read [1]. Also sexps have an efficient, straight-forward, almost-standard representation in memory, and some standard APIs to operate on them. Json doesn=E2=80=99t. Note for each serialization format, the question arise again, quadratically: it is a n=C2=B2 problem. However I believe some languages might already have some standard inter-lingual serializers (including sexps, json, xml^Wetc.), so anything that kind could as well, for (good, I decide) redundancy to specify which serializers are supported by each, how are they called, and ways to serialize toward them. So it becomes a less-than-n problem. And there is the case of course of javascript which json is a subset of, and the more beautiful case of the yet young purely-functional Curv [0], which elegantly builds upon a minimal superset of json. [0] https://github.com/doug-moen/curv [1] only difference is =E2=80=9C{}=E2=80=9D vs =E2=80=9C()=E2=80=9D (how fu= nny it would if TeX began predating them and won), and culturally they use more arrays, and put quotes everywhere (and yeah they steal their familiarity from something =E2=80=9Calmost=E2=80=9D compatible with C and CSS (in two different incomp= atible ways) and compatible with javascript).