unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: michael schuldt <mbschuldt@gmail.com>
To: Eduardo Ochs <eduardoochs@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Emacs <-> Lua bridge
Date: Sun, 18 Apr 2021 13:16:15 -0700	[thread overview]
Message-ID: <CABhu7fVVZ3_eXW=s1JJVk2yhWSyBhPjoETXmpnBPtTtH7VUrtg@mail.gmail.com> (raw)
In-Reply-To: <CADs++6hZHD8n56qc=XvvV5XvVh7tZqPqJSi1ou2F62RGetVFhA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

Awesome!

Several years ago I compiled the Lua interpreter into Emacs and added
functions for accessing each from the other.
It was just fun experimental software and is not supported or actively
developed and still has unresolved issues,
but might be of interest to you. This was before modules got added to Emacs.
You can check out the code here: https://github.com/mschuldt/luamacs


On Sat, Apr 17, 2021 at 9:46 PM Eduardo Ochs <eduardoochs@gmail.com> wrote:

> Ooops, I forgot the link to the version with my comments
> and instructions to compile on Debian! Here it is:
>   http://angg.twu.net/emacs-lua/emlua.cpp.html
>   http://angg.twu.net/emacs-lua/emlua.cpp
>
> Cheers =/,
>   Eduardo
>
> On Sun, 18 Apr 2021 at 01:32, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> >
> > Hi list,
> >
> > about a month ago I asked on the Lua mailing list if anyone there had
> > tried to create an Emacs module that would load Lua and then start a
> > Lua interpreter and let Emacs call it...
> >
> > I received this answer,
> >
> >   http://lua-users.org/lists/lua-l/2021-03/msg00084.html
> >
> > and today I finally had time to compile that code on Debian and test
> > it. It looks prototype-ishy, but it is surprisingly functional - if we
> > run something that returns several values, like the second sexp here,
> >
> >   (emlua-dostring "a = 22")
> >   (emlua-dostring "return a+33, '44', {}")
> >
> > it retuns a vector like this,
> >
> >   ["55" "44" "table: 0x55f5e0a15a10"]
> >
> > with tostring-ed versions of all its return values, and if we run
> > something that yields an error it returns a string with Lua's error
> > message.
> >
> > I haven't played much with it yet.
> > Happy hacking =),
> >
> >   Eduardo Ochs
> >   http://angg.twu.net/#eev
> >   http://angg.twu.net/emacsconf2020.html
>
>

[-- Attachment #2: Type: text/html, Size: 3024 bytes --]

  reply	other threads:[~2021-04-18 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18  4:32 Emacs <-> Lua bridge Eduardo Ochs
2021-04-18  4:45 ` Eduardo Ochs
2021-04-18 20:16   ` michael schuldt [this message]
2021-04-19  7:40     ` Eduardo Ochs
2021-05-11  7:38       ` michael schuldt

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CABhu7fVVZ3_eXW=s1JJVk2yhWSyBhPjoETXmpnBPtTtH7VUrtg@mail.gmail.com' \
    --to=mbschuldt@gmail.com \
    --cc=eduardoochs@gmail.com \
    --cc=emacs-devel@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.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).