From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Newsgroups: gmane.lisp.guile.devel Subject: Re: lua branch Date: Tue, 21 May 2013 16:25:57 -0500 Message-ID: References: <87fvzipxn7.fsf@Kagami.home> <87r4if6czh.fsf@Kagami.home> <87zjwwkb4z.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0112cbee5499b904dd411853 X-Trace: ger.gmane.org 1369184885 10786 80.91.229.3 (22 May 2013 01:08:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 01:08:05 +0000 (UTC) Cc: guile-devel To: Ian Price Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed May 22 03:08:06 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UexXB-0006xf-6u for guile-devel@m.gmane.org; Wed, 22 May 2013 03:08:05 +0200 Original-Received: from localhost ([::1]:56102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UexXA-000229-Ow for guile-devel@m.gmane.org; Tue, 21 May 2013 21:08:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ueu4I-0007i7-IF for guile-devel@gnu.org; Tue, 21 May 2013 17:26:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ueu4F-0005Cz-Dm for guile-devel@gnu.org; Tue, 21 May 2013 17:26:02 -0400 Original-Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:41985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ueu4E-0005Cv-W9 for guile-devel@gnu.org; Tue, 21 May 2013 17:25:59 -0400 Original-Received: by mail-la0-f45.google.com with SMTP id ec20so1260771lab.32 for ; Tue, 21 May 2013 14:25:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CZKYFeUoaSLT3oZAPkBMakb3zmslp1VJ/ZXgyejpFKs=; b=hcBlx8OcNDy3T9I34upC58QGNt27kmeiYiQm+BfDqrE2yU42nxf0GmfG4S5fUl8N3E 4a36aZo7ss+KUy//iP73+BW4uffm/AfW5CvAoH+Rtq1gxDLIML7+fj0E645qVDm5Mgim unRzjokHI2Xg70zF25HKsBpemnC8P+w92Su5CA1u65VWDNpZYguRBkwchscJch0Ss7h/ 10NkY4dZzsVhgflLjWDLRxQ109sZTdWbT7a4k4eu8TeCp1LF43Kzua9tcldSaamFKrrW vSilpYbuEYF1gI5yvrjiYtCx/dAuPey73C5VVbdAhd9nIBupCRGs/7E7sq7yOADodqfH YGew== X-Received: by 10.152.1.196 with SMTP id 4mr2365991lao.54.1369171557650; Tue, 21 May 2013 14:25:57 -0700 (PDT) Original-Received: by 10.112.135.71 with HTTP; Tue, 21 May 2013 14:25:57 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22d X-Mailman-Approved-At: Tue, 21 May 2013 21:07:58 -0400 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16403 Archived-At: --089e0112cbee5499b904dd411853 Content-Type: text/plain; charset=ISO-8859-1 It's been so long since I worked on it, I hardly remember what was left. I think module/language/lua/notes.org covers most of it. The main tasks would be: - Standard library compliance (the existing modules are missing some functions, and there is no debug/coroutine module) - module function - Multiple values and variable arguments. Lua expressions can return multiple values. Lua assignments can involve multiple values in confusing ways. (This is very easy for the Lua runtime to handle, but as I recall bolting it onto tree-il was frustrating me quite a bit). - Fix the REPL. Scheme is all about expressions, Lua is all about statements. Somehow, despite writing a Lua implementation, I never realized that you evaluate Lua expressions in the REPL by typing "return true" or "= true" for short. Typing a normal expression, such as "true", is an error. And I don't know whether you can convince the Guile REPL to play nice with that worldview. - I was personally planning to pretty much rewrite parser.scm and compile-tree-il.scm as I wasn't happy with the length or complexity of them. I would think the parser could be rewritten using a parser generator, and the code generator could be simplified quite a bit (look at ecmascript). - Performance improvements. Never did get around to benchmarking it. - Import the Lua language test suite and ensure compliance http://www.lua.org/tests - Consider implementing Lua 5.2. They added a bitwise manipulation library and simplified the module system quite a bit. On Tue, May 21, 2013 at 3:42 PM, Phil wrote: > Hey guys, > > I was just thinking about Guile Lua (and feeling guilty that I never > did finish it). Anyway, I never did make any progress after my 2012 > posts. I got a little discouraged while implementing Lua's multiple > values everywhere, to be honest. > > By all means, feel free to take over the lua branch. As long as it's > okay with Ludo, Andy, whoever is in charge these days, I think you > should push to it with reckless abandon instead of submitting patches > since it isn't used in guile (yet). > > On Wed, Apr 17, 2013 at 6:09 PM, Ian Price > wrote: > > Ian Price writes: > > > >> The current issues with lua vs master are as follows > >> 1) has been renamed to on master > >> 2) has been replaced with which is not quite a drop-in > >> 3) while was being compiled into something with improper scoping. > >> > >> I have fixes for these locally. There is just the question of rebase vs > >> merge for bringing the branch up to date. Any preference there? > > > > Sorry, got distracted. > > Is it okay to merge master into lua, and push these three patches? > > > > -- > > Ian Price -- shift-reset.com > > > > "Programming is like pinball. The reward for doing it well is > > the opportunity to do it again" - from "The Wizardy Compiled" > > > --089e0112cbee5499b904dd411853 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
It's been so long since I worked on it, I hardly remem= ber what was left. I think module/language/lua/notes.org covers most of it.

The main tasks would b= e:
- Standard library compliance (the existing modules are missing = some functions, and there is no debug/coroutine module)
- m= odule function
- Multiple values and variable arguments. Lu= a expressions can return multiple values. Lua assignments can involve multi= ple values in confusing ways. (This is very easy for the Lua runtime to han= dle, but as I recall bolting it onto tree-il was frustrating me quite a bit= ).
- Fix the REPL. Scheme is all about expressions, Lua is all abou= t statements. Somehow, despite writing a Lua implementation, I never realiz= ed that you evaluate Lua expressions in the REPL by typing "return tru= e" or "=3D true" for short. Typing a normal expression, such= as "true", is an error. And I don't know whether you can con= vince the Guile REPL to play nice with that worldview.
- I was personally planning to pretty much rewrite parser.scm an= d compile-tree-il.scm as I wasn't happy with the length or complexity o= f them. I would think the parser could be rewritten using a parser generato= r, and the code generator could be simplified quite a bit (look at ecmascri= pt).
- Performance improvements. Never did get around to benchmarking= it.
- Import the Lua language test suite and ensure compli= ance=A0http://www.lua.org/tests

- Consider impl= ementing Lua 5.2. They added a bitwise manipulation library and simplified = the module system quite a bit.=A0

On Tue, May 21, 2013 at 3:42 PM, Phil <theseaisinhere@gmail.com= > wrote:
Hey guys,

I was just thinking about Guile Lua (and feeling guilty that I never
did finish it). Anyway, I never did make any progress after my 2012
posts. I got a little discouraged while implementing Lua's multiple
values everywhere, to be honest.

By all means, feel free to take over the lua branch. As long as it's okay with Ludo, Andy, whoever is in charge these days, I think you
should push to it with reckless abandon instead of submitting patches
since it isn't used in guile (yet).

On Wed, Apr 17, 2013 at 6:09 PM, Ian Price <ianprice90@googlemail.com> wrote:
> Ian Price <ianprice90@= googlemail.com> writes:
>
>> The current issues with lua vs master are as follows
>> 1) <application> has been renamed to <call> on master<= br> >> 2) <sequence> has been replaced with <seq> which is no= t quite a drop-in
>> 3) while was being compiled into something with improper scoping.<= br> >>
>> I have fixes for these locally. There is just the question of reba= se vs
>> merge for bringing the branch up to date. Any preference there? >
> Sorry, got distracted.
> Is it okay to merge master into lua, and push these three patches?
>
> --
> Ian Price -- shif= t-reset.com
>
> "Programming is like pinball. The reward for doing it well is
> the opportunity to do it again" - from "The Wizardy Compiled= "
>

--089e0112cbee5499b904dd411853--