From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Garreau\, Alexandre" Subject: Serialise lisp objects for babel-supported langage Date: Tue, 16 Oct 2018 21:55:24 +0200 Message-ID: <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]:44535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCVRA-0002sz-69 for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 15:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCVR9-0003QO-EA for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 15:55:28 -0400 Received: from portable.galex-713.eu ([2a00:5884:8305::1]:41312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCVR9-0003O6-63 for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 15:55:27 -0400 Received: from localhost ([::1] helo=portable.galex-713.eu) by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCVR6-0001BN-MW for emacs-orgmode@gnu.org; Tue, 16 Oct 2018 21:55:24 +0200 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: emacs-org list Would it be useful to begin integrating into babel functions so to serialize lisp objects (just as prin1-to-string) in other languages? I=E2=80=99ve read some babel files trying to do that, independently of each others (that=E2=80=99s a lot of similar `typecase's (seeing it I=E2=80=99m = regretting each type-spec in it can=E2=80=99t be a list of types) =E2=80=A6when author= s even think about using typecase instead of just `cond' or `if's): for instance Fortran, so that to declare variables given as arguments to its source blocks. imho, that may be of some use for other languages. It may be useful as well for stuff outside of org-mode: e.g. iirc Pymacs serialize/deserialize (read and print (and also eval, but not loop x))) to allow the gateway between elisp and python and making each one libraries available to the other. That must be (really partially) redundant with python babel. And so on. I don=E2=80=99t know well-enough enough languages to begin doing it right a= way, and I might try to do only for scheme, ocaml and C then, so just throwing the idea here. Moreafter: deserialization might come handy as well, as if trying to factorize between serialization and deserialization, this might as well some sort of lower grammar or anyway easier to read, extend and debug form of specifying the translation. And then when a source block outputs results, having a deserialization function might help to get consistent output which then may be processed to make, for instance, org-tables (though I know currently to do this it=E2=80=99s pretty imperati= ve and edition-oriented, rather than functional like this approach does suggest).