emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Garreau\, Alexandre" <galex-713@galex-713.eu>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Serialise lisp objects for babel-supported langage
Date: Tue, 16 Oct 2018 21:55:24 +0200	[thread overview]
Message-ID: <87efcpr7ir.fsf@portable.galex-713.eu> (raw)

Would it be useful to begin integrating into babel functions so to
serialize lisp objects (just as prin1-to-string) in other languages?

I’ve read some babel files trying to do that, independently of each
others (that’s a lot of similar `typecase's (seeing it I’m regretting
each type-spec in it can’t be a list of types) …when authors 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’t know well-enough enough languages to begin doing it right away,
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’s pretty imperative
and edition-oriented, rather than functional like this approach does
suggest).

             reply	other threads:[~2018-10-16 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 19:55 Garreau, Alexandre [this message]
2018-10-16 20:59 ` Serialise lisp objects for babel-supported langage John Kitchin
2018-10-16 21:23   ` Garreau, Alexandre

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efcpr7ir.fsf@portable.galex-713.eu \
    --to=galex-713@galex-713.eu \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).