unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Creating a Lua roadmap
@ 2011-04-19 21:11 Phil
  2011-04-21 12:16 ` Andy Wingo
  2011-04-21 20:09 ` Mark H Weaver
  0 siblings, 2 replies; 6+ messages in thread
From: Phil @ 2011-04-19 21:11 UTC (permalink / raw)
  To: guile-devel

Hey guys,

I have recently checked out the Lua branch. I want to make it seaworthy.

I've requested to be added back onto the Savannah group, can someone
do that? TIA.

First off, a git question: It seems better to develop against
stable-2.0. So on a fresh pull of Guile's repo, I did this:

git co -b lua origin/lua
git co -b stable-2.0 origin/stable-2.0
git branch lua
git rebase stable-2.0

Is that right?

Secondly, I'd like to construct a checklist of what needs to be done
before Lua is ready for inclusion with Guile.
This is mainly directed at Andy but if anyone else wants to pile on
your help would be greatly appreciated.

Here is my initial list from looking over the codebase and my commit notes:

TODO:

- Missing standard library functions: math.modf, table.sort, module
- Missing getfenv/setfenv. You can tell Lua to look up global
variables in different environments.
  Frankly this is going to be really annoying to implement and I'd
rather leave it off until someone complains about it being missing, if
that's cool.
- Variable arguments, multiple returns.

FIXME:

- Use prompt and abort instead of throw and catch.
- And/or expressions evaluate expressions multiple times.
- The keyword "break" does not work correctly.

Andy, I think you wrote "FIXME: use module binders instead" in
compile-tree-il.scm, what does that mean?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating a Lua roadmap
  2011-04-19 21:11 Creating a Lua roadmap Phil
@ 2011-04-21 12:16 ` Andy Wingo
  2011-04-22 19:48   ` Phil
  2011-04-21 20:09 ` Mark H Weaver
  1 sibling, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2011-04-21 12:16 UTC (permalink / raw)
  To: Phil; +Cc: guile-devel

On Tue 19 Apr 2011 23:11, Phil <theseaisinhere@gmail.com> writes:

> I have recently checked out the Lua branch. I want to make it seaworthy.

Cool!  It does indeed need some more loving :-)

> I've requested to be added back onto the Savannah group, can someone
> do that? TIA.

Sure; saw your mail before reading this, so please disregard that
confirmation message.

> git co -b lua origin/lua
> git co -b stable-2.0 origin/stable-2.0
> git branch lua
> git rebase stable-2.0
>
> Is that right?

Yes, except perhaps "git checkout lua" instead of "git branch lua", no?

> TODO:
>
> - Missing standard library functions: math.modf, table.sort, module

I think Mark's recent division work should help with modf.  I don't
recall what's needed for the rest.

> - Missing getfenv/setfenv. You can tell Lua to look up global
> variables in different environments.
>   Frankly this is going to be really annoying to implement and I'd
> rather leave it off until someone complains about it being missing, if
> that's cool.

OK.

> - Variable arguments, multiple returns.

This is the big one.

> FIXME:
>
> - Use prompt and abort instead of throw and catch.

Yes this will be good too.

> - And/or expressions evaluate expressions multiple times.

Whoops!

> - The keyword "break" does not work correctly.

Yes; to fix.

> Andy, I think you wrote "FIXME: use module binders instead" in
> compile-tree-il.scm, what does that mean?

For global refs, the current code does a lookup every time a function is
called, where instead it should allow the variable to be cached the
first time it is looked up.  The way to hook into the process of caching
a variable for lookup is module binders.  They aren't documented
though.  Search for "binder" in ice-9/boot-9.scm and in modules.c.

Cheers,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating a Lua roadmap
  2011-04-19 21:11 Creating a Lua roadmap Phil
  2011-04-21 12:16 ` Andy Wingo
@ 2011-04-21 20:09 ` Mark H Weaver
  1 sibling, 0 replies; 6+ messages in thread
From: Mark H Weaver @ 2011-04-21 20:09 UTC (permalink / raw)
  To: Phil; +Cc: guile-devel

Phil <theseaisinhere@gmail.com> writes:
> - Missing standard library functions: math.modf

math.modf(x) could be implemented as (truncate/ x 1)

math.fmod(x,y) should be (truncate-remainder x y)

math.frexp(x) needs an implementation that works well for all types of
Scheme numbers.  I already have this in my own tree, but have not yet
submitted the patch.  I was planning to do so after 2.0.1 is released,
since it contains some non-trivial (but compatible) reworking to how
fractions and divisions are handled in numbers.c.

    Best,
     Mark



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating a Lua roadmap
  2011-04-21 12:16 ` Andy Wingo
@ 2011-04-22 19:48   ` Phil
  2011-04-23 12:01     ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Phil @ 2011-04-22 19:48 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

On Thu, Apr 21, 2011 at 7:16 AM, Andy Wingo <wingo@pobox.com> wrote:
> On Tue 19 Apr 2011 23:11, Phil <theseaisinhere@gmail.com> writes:
>
>> I have recently checked out the Lua branch. I want to make it seaworthy.
>
> Cool!  It does indeed need some more loving :-)
>
>> I've requested to be added back onto the Savannah group, can someone
>> do that? TIA.
>
> Sure; saw your mail before reading this, so please disregard that
> confirmation message.
>
>> git co -b lua origin/lua
>> git co -b stable-2.0 origin/stable-2.0
>> git branch lua
>> git rebase stable-2.0
>>
>> Is that right?
>
> Yes, except perhaps "git checkout lua" instead of "git branch lua", no?
>
>> TODO:
>>
>> - Missing standard library functions: math.modf, table.sort, module
>
> I think Mark's recent division work should help with modf.  I don't
> recall what's needed for the rest.
>
>> - Missing getfenv/setfenv. You can tell Lua to look up global
>> variables in different environments.
>>   Frankly this is going to be really annoying to implement and I'd
>> rather leave it off until someone complains about it being missing, if
>> that's cool.
>
> OK.
>
>> - Variable arguments, multiple returns.
>
> This is the big one.
>
>> FIXME:
>>
>> - Use prompt and abort instead of throw and catch.
>
> Yes this will be good too.
>
>> - And/or expressions evaluate expressions multiple times.
>
> Whoops!
>
>> - The keyword "break" does not work correctly.
>
> Yes; to fix.
>
>> Andy, I think you wrote "FIXME: use module binders instead" in
>> compile-tree-il.scm, what does that mean?
>
> For global refs, the current code does a lookup every time a function is
> called, where instead it should allow the variable to be cached the
> first time it is looked up.  The way to hook into the process of caching
> a variable for lookup is module binders.  They aren't documented
> though.  Search for "binder" in ice-9/boot-9.scm and in modules.c.
>
> Cheers,
>
> Andy
> --
> http://wingolog.org/

Alright, cool. Just to be clear the end goal is to include this in
Guile eventually, right?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating a Lua roadmap
  2011-04-22 19:48   ` Phil
@ 2011-04-23 12:01     ` Andy Wingo
  2011-04-23 19:58       ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2011-04-23 12:01 UTC (permalink / raw)
  To: Phil; +Cc: guile-devel

On Fri 22 Apr 2011 21:48, Phil <theseaisinhere@gmail.com> writes:

> Alright, cool. Just to be clear the end goal is to include this in
> Guile eventually, right?

Yes, if it is of good quality and compatible with other Lua
implementations, I'd be happy to include it in Guile.  (Dunno what
others think on this point.)

Cheers,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Creating a Lua roadmap
  2011-04-23 12:01     ` Andy Wingo
@ 2011-04-23 19:58       ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2011-04-23 19:58 UTC (permalink / raw)
  To: guile-devel

Hi,

Andy Wingo <wingo@pobox.com> writes:

> On Fri 22 Apr 2011 21:48, Phil <theseaisinhere@gmail.com> writes:
>
>> Alright, cool. Just to be clear the end goal is to include this in
>> Guile eventually, right?
>
> Yes, if it is of good quality and compatible with other Lua
> implementations, I'd be happy to include it in Guile.  (Dunno what
> others think on this point.)

Agreed, as long as it has good test coverage and documentation too.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-23 19:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 21:11 Creating a Lua roadmap Phil
2011-04-21 12:16 ` Andy Wingo
2011-04-22 19:48   ` Phil
2011-04-23 12:01     ` Andy Wingo
2011-04-23 19:58       ` Ludovic Courtès
2011-04-21 20:09 ` Mark H Weaver

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).