Arc Forumnew | comments | leaders | submitlogin
1 point by sacado 6126 days ago | link | parent

Then I vote for Psyco :) !

Seriously, I think a CL implementation would be a good thing to have, so as to have access to all the CL library and world, but that would also mean having a somewhat competing implementation, and I'm not abig fan of that. Mainly because time spent on maintaining this implementation is not time spent on the "canonical" one.

But that's just my opinion and the CL implementation could be very valuable to others around here... And maybe a fully compatible CL Arc is possible (I mean one where you run your "canonical" Arc code unmodified, what ever this arc code is, should it deal with hard things to port such as FFI or ccc...), I don't know...



1 point by eds 6126 days ago | link

How would one go about dealing with ccc in a CL implementation of Arc? (Isn't this the biggest difficultly with writing a version of Arc in CL?)

-----

3 points by almkglor 6126 days ago | link

I think pg's On Lisp contains some samples on transforming code to continuation passing style, which would allow us to create ccc. It would also mean bashing the code quite a bit, and CL doesn't necessarily optimize functions that are passed around and called in tail position, unlike Scheme which requires such to be optimize.

-----

1 point by sacado 6126 days ago | link

Yes, it is not required by the norm, but as far as I know, ACL, SBCL, CMUCL and CLisp all implement tail call optimizations (for the latter, only on compiled functions though). Maybe that could be considered enough to rely on it.

-----

1 point by eds 6126 days ago | link

Perhaps I'll have to go back and read that part of On Lisp some time. (I stopped after mvdo because the macros were hurting my head. But perhaps I've developed a thicker skin since then.)

-----

2 points by kens1 6125 days ago | link

Peter Norvig has a simple Scheme interpreter (tail recursive, with call/cc) implemented in Common Lisp at http://norvig.com/paip/README.html - it would probably be a reasonable basis. One option would be to implement Scheme in Common Lisp, and then simply run the existing Arc ac.scm on top of that. But it would probably make more sense to cut out the middle layer and modify Norvig's code to run Arc instead of Scheme.

-----