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: Emacs <-> Lua bridge Date: Sun, 18 Apr 2021 01:32:27 -0300 Message-ID: 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="36843"; 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:33:46 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 1lXz7y-0009Tz-TE for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Apr 2021 06:33:46 +0200 Original-Received: from localhost ([::1]:51574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXz7y-0005LH-0a for ged-emacs-devel@m.gmane-mx.org; Sun, 18 Apr 2021 00:33:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXz70-0004tz-5M for emacs-devel@gnu.org; Sun, 18 Apr 2021 00:32:46 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:40926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXz6y-0003DW-Dt for emacs-devel@gnu.org; Sun, 18 Apr 2021 00:32:45 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id 20so12055235pll.7 for ; Sat, 17 Apr 2021 21:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=cgyK/4jaGLMbXeoxGozUkrpMLmrHdiPyjCBmxKTBjuI=; b=FLp0pIWLZ8NGBoq95MYhODbENbTKVIgHtLvTYs7aY7/+RZJAlGlck5Qz13xbW4sYj7 MbjpLoOsA9bQV4hnkYlU8U/4bP80lvDXSyaR9Lr4YeRlSle5BMlc6FtGDVBUAInaQ53l 2bukghiAcTPwwhOtbHwluM+crNqxgSzslUU6dMxbkcPUXA83bUov3aIHuXMOnjR/wcrF OPquX4OPYjCSEPbtABFDuhI70brKu5lldstA4PclGdPzB8QOOR2HlsLceY5Cy/eQbDFA 1T1Bg0WK7kDQkz17ZWrMTLK72o6xPMzB4o0bTtsK//6sUvTbv/4UNFpCKENwoB3Atf15 XSnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cgyK/4jaGLMbXeoxGozUkrpMLmrHdiPyjCBmxKTBjuI=; b=b+Rw5GmynOeuaHgziW7yj4ZjntBdnwPNOMIVJtwon8Hrc+J9WQiLJd35b6jhCFQxUv oLIEK40rxm2UpJcuezmVkHtCd7r1d55eo5Wt8BSqpzBA+Sbo+GDoqDeDr3jkvVo+gXCv WhkHZ1NoSWpK95IyNx4Hhvum1lzvzeZDLZCNGnvOsXfeqeoUF66FEJ2LT5uq5a+mUYaj 1VuD9smJD6M93utRscLQkNyjbROEIuXLR6qNdAmD70oQTico8+WLGSJBY/6t1HxRQm2y PF3PfXKn5qca+pW4Zj51WfgvmtGg6FM/ch9c41MD6m3rG0gJ8JX1mgY7BSUG/vav5+2Y zWyg== X-Gm-Message-State: AOAM530mwH1zZ/tgUgLym2/jt9twSrTPPtqkLAsWahFc5ZvM/IlRKZXg QX3B+ORjqAtVe/fyq+EYWPIc4n7DGfWIqgCLe2BcztUi10xWWw== X-Google-Smtp-Source: ABdhPJzJStAUi1k23V6xfqrn0SQ3cZwjbGLPz0JG4QlF84HlfROkWjgJuh5L02DIt7z5TmK6SNWAoCpOts9EQM+35GA= X-Received: by 2002:a17:90a:a613:: with SMTP id c19mr18291126pjq.117.1618720359160; Sat, 17 Apr 2021 21:32:39 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=eduardoochs@gmail.com; helo=mail-pl1-x635.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:268139 Archived-At: 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