From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: michael schuldt Newsgroups: gmane.emacs.devel Subject: Re: Emacs <-> Lua bridge Date: Tue, 11 May 2021 00:38:12 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009c0eec05c208faba" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22187"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Eduardo Ochs Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 11 09:42:25 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgN28-0005dM-LZ for ged-emacs-devel@m.gmane-mx.org; Tue, 11 May 2021 09:42:24 +0200 Original-Received: from localhost ([::1]:44616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgN27-0000px-JH for ged-emacs-devel@m.gmane-mx.org; Tue, 11 May 2021 03:42:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgMyN-000191-4d for emacs-devel@gnu.org; Tue, 11 May 2021 03:38:31 -0400 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:43904) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgMyI-0004LE-UV for emacs-devel@gnu.org; Tue, 11 May 2021 03:38:30 -0400 Original-Received: by mail-lf1-x12d.google.com with SMTP id x2so27205337lff.10 for ; Tue, 11 May 2021 00:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CacPF+aMKr3OB4nq2+nbtdqrMKQxj+/vuo3QavDIHyw=; b=UAoOQPMCVod91DONZxkTDmtC0i2fHJKZisphVuKhAecmGGZe7CZgiD2jSrtKYByg8z NcwAZJcaybGuV3dbLcPogua+XZY8dj8nxY750BN0m2FxveTHJ13VVn3BuzxWRKKgYdUc Gf3rhuRbOMHADT2JPMxb8nc8FHOL64AiijnV7+7u1RlE2KzTwygj3FyuqFQ16p031QMk XTxayhffBbulToCjhk+1hFlBreLbTJtKWxg5aVOTfb76ZzgHsNU+lKWClPPiYfhwz2fK erDzBNvmzhxj5dKNiWwDW0EoWqUi1ZneY2euHwTNLmDPDxx/iHHC0pGvofmy6PChQaAY tG0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CacPF+aMKr3OB4nq2+nbtdqrMKQxj+/vuo3QavDIHyw=; b=TBvHNLRClcUrOe7JlzHZRvxUQLQCiF4qNjJjiQ8+I9ULbNNXDjIFVUD0GnfyJ8v0yZ Rz2xs2qjruGWspHhG3OMs2QkU8+Ge6WHnSnOZ31Pvv7IOkjz+BFKOslbXUut9aSOLQvJ 6ccD/zeGDsZYImynC1qiKHEMwdqvlHOAWL7tQhJrj44SqCMCPKl86Wm4o74Ys5Asm3vG u7OUUMZiGRYtIpGp3tZueBqphRsnRDWUfDhFSidLHfPgkjWOCZn/hnGQdLSao5LJHWTr DInBFueWi9Kx0XRM1w4TJrzOL1gzNWypvCly871CZIwDBUwzWgXCLy9y/ysL4xqBfhhJ ayVw== X-Gm-Message-State: AOAM532NP5gYloIYwu26TZKnI+r3P6pI3FXU/uQawpnVnJOdtR2koJ1w 4qPUQCFzSoqRgibYfJi1CR0iz9oYrv+M7PtYDLY= X-Google-Smtp-Source: ABdhPJyhWJwTOykD+Swuj3p7novoDv48zsQ0MWMsZumVGlQ0ep4BQAIjFStR8kCjXQioayUzIP2CET8VCT18NSYI/Fk= X-Received: by 2002:a05:6512:3f3:: with SMTP id n19mr20891035lfq.594.1620718703610; Tue, 11 May 2021 00:38:23 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=mbschuldt@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269147 Archived-At: --0000000000009c0eec05c208faba Content-Type: text/plain; charset="UTF-8" Hi Eduardo, I didn't use it for anything. It was something a professor let me do for credit while in university because I was one unit short of the semester minimum. I thought it would be useful as a faster and more mainstream way of programming Emacs, but it turns out I enjoy Emacs Lisp more so I found no motivation to continue working on it. For a while I stopped caring about what other people wanted to use and started writing tools in Emacs Lisp...I've managed to find the middle ground since then. This was also before modules got added to Emacs so that wasn't an option, it had to be compiled in. Now that I'm thinking about it, I don't think this could be done with modules. It extends core data structures and modifies things like garbage collection, I'm guessing that's beyond the capability of a module. Your mini-forth looks cool! I'll have to spend a bit more time checking it out...later. Unfortunately I've been a bit too busy for the fun esoteric stuff lately. On Mon, Apr 19, 2021 at 12:41 AM Eduardo Ochs wrote: > Hi Michael, > > this looks very interesting! What did you use it for? > > Do you have plans to adapt your src/luamacs.c and make it into > something that can be loaded as a module? I am quite incompetent with > C, so I can't help you with the C side besides offering encouragement > and testing... > > At this moment I have these short-term goals with the emlua module: > > 1. Adapt https://github.com/edrx/edrxrepl to emlua, > > 2. Use emlua to help me edit the files into which I throw > interesting URLs compulsively when I am browsing the web in > half-brain-dead mode, > > One of my medium-term goals is to use emlua to turn Emacs into an > editor of derivation trees - see: > > http://angg.twu.net/dednat6/tug-slides.pdf > > at this moment I have to edit them by hand, using rectangle commands > and picture mode, and some operations on them are hard to do... Note > that dednat6 has a mini-Forth inside, that is based on this: > > http://angg.twu.net/miniforth-article.html > > And this may be somewhat related to the other stuff in your github > page... > > Cheers! =) > Eduardo Ochs > http://angg.twu.net/#eev > > On Sun, 18 Apr 2021 at 17:16, michael schuldt wrote: > > > > 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 > --0000000000009c0eec05c208faba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eduardo,

I didn't use it for anything. = It was something a professor let me do for credit while in university
=
because I was one unit short of the semester minimum.

I thou= ght it would be useful as a faster and more mainstream way of programming E= macs,
but it turns out I enjoy Emacs Lisp more so I found no motiva= tion to continue working on it.
For a while I stopped caring abou= t what other people wanted to use and started writing tools in
Em= acs Lisp...I've managed to find the middle ground since then.
=
This was also before modules got added to Emacs so that wasn't an o= ption, it had to be compiled in.
Now that I'm thinking about it, I d= on't think this could be done with modules.
It extends core data str= uctures and modifies things like garbage collection, I'm guessing
th= at's beyond the capability of a module.

Your mini-forth loo= ks cool! I'll have to spend a bit more time checking it out...later.
Unfortunately I've been a bit too busy for the fun esoteri= c stuff lately.

On Mon, Apr 19, 2021 at 12:41 AM Eduardo Ochs <eduardoochs@gmail.com> wrote:
Hi Michael,

this looks very interesting! What did you use it for?

Do you have plans to adapt your src/luamacs.c and make it into
something that can be loaded as a module? I am quite incompetent with
C, so I can't help you with the C side besides offering encouragement and testing...

At this moment I have these short-term goals with the emlua module:

=C2=A0 1. Adapt https://github.com/edrx/edrxrepl to emlua,

=C2=A0 2. Use emlua to help me edit the files into which I throw
=C2=A0 =C2=A0 =C2=A0interesting URLs compulsively when I am browsing the we= b in
=C2=A0 =C2=A0 =C2=A0half-brain-dead mode,

One of my medium-term goals is to use emlua to turn Emacs into an
editor of derivation trees - see:

=C2=A0 http://angg.twu.net/dednat6/tug-slides.pdf

at this moment I have to edit them by hand, using rectangle commands
and picture mode, and some operations on them are hard to do... Note
that dednat6 has a mini-Forth inside, that is based on this:

=C2=A0 http://angg.twu.net/miniforth-article.html

And this may be somewhat related to the other stuff in your github
page...

=C2=A0 Cheers! =3D)
=C2=A0 =C2=A0 Eduardo Ochs
=C2=A0 =C2=A0 http://angg.twu.net/#eev

On Sun, 18 Apr 2021 at 17:16, michael schuldt <mbschuldt@gmail.com> wrote:
>
> 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
--0000000000009c0eec05c208faba--