From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.devel Subject: Re: Emacs <-> Lua bridge Date: Sun, 18 Apr 2021 01:45:01 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8917"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 18 06:47:01 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 1lXzKn-0002EB-If for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Apr 2021 06:47:01 +0200 Original-Received: from localhost ([::1]:54468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXzKm-0007tz-JV for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Apr 2021 00:47:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXzJ7-0007Gh-7M for emacs-devel@gnu.org; Sun, 18 Apr 2021 00:45:17 -0400 Original-Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:51166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXzJ5-00033T-FW for emacs-devel@gnu.org; Sun, 18 Apr 2021 00:45:17 -0400 Original-Received: by mail-pj1-x1035.google.com with SMTP id u11so12441927pjr.0 for ; Sat, 17 Apr 2021 21:45:14 -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; bh=eLMuJtKCJwnnyfSs4YKXkm1wppEhN3dmxkJLUzgkRWg=; b=hG0XbscYEfc87/uILDb7OwSFnnXlTqZbYsr7ulr8fTBqrJ2PLhjFKcFR/WBUozGPyX BZXnUoaFYTnkt3Q3rTmGe4U/VPGQ8WkyYmoMsTtYpBo7qI43fh22tSNrifdsSHw+u8rk LUfb3JlQBdgGOAbwGO2mNpVM2VDHyf3rDtinItewL70Nqm+QUSP/a+/OQYAz8QRX5Rqs BaU6SGHujhpWfUC5bc1LkXxKnqZa2+rUBRAe5BlJ79iAmMB3nBdbb7TJ0X6Ey1GYxSdu /H923acSmBAKtLs7Mq79MO8a4OOjMshqWeKJ/d4L1482hWrghwp4llzayoZeZBs1k+1/ BWqA== 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; bh=eLMuJtKCJwnnyfSs4YKXkm1wppEhN3dmxkJLUzgkRWg=; b=VhiMuxDbTBqRwtV7g6/MieSv6vXUImLVyG7PwtcAVD3uGDNHBMbEoz6ZuVQsijJ9JY hR0IIfxwKH6oPGmbSeyZlrhH47RBUmipFojX8MXOdL/jPojjvMkvFhjLqlBV/qVfoEUt hJUGAFKtCNMG7cs95unD8iYtv6/3e3c7QnHcJoaaAS+rMHx3DkEExBEt+IYV5hv2b1FM 17NprlZR1ngNfK/49w4pr9bG9bGZFTfQWmKS8FHK42KyfZrW/EETlcrxc2/RwXga3+BT 2Bm3vCiT6w36lr79KxNEhESFIJx5Xih3t8yWxOxMZnjtr3NSpP1RuzEuLBUA+B/WQUP9 SPdg== X-Gm-Message-State: AOAM531+xz1CCmmG1p2rh8VP9/vFZWMifh6gKvfxFSupmjtqxoqtU8Jr 3C0myvc+2WZlXwuL/nKfBC09yBBOlaaQcG++TP4Lt5YL5/omVg== X-Google-Smtp-Source: ABdhPJxJBkG1QODTCVuUf4DTFwB2X+2pSB1d2I3mWLGOa4HGeOLDj26WNmjQyYH/yCikjBbHs9QeLpkYb9vgttMy7sE= X-Received: by 2002:a17:902:9b97:b029:eb:7a1b:5b88 with SMTP id y23-20020a1709029b97b02900eb7a1b5b88mr15939488plp.77.1618721113117; Sat, 17 Apr 2021 21:45:13 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=eduardoochs@gmail.com; helo=mail-pj1-x1035.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, 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:268140 Archived-At: 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 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