thephoeron / let-over-lambda

Doug Hoyte's "Production" version of macros from Let Over Lambda, ready for ASDF and Quicklisp.
Other
131 stars 25 forks source link

Added support for cl-syntax #5

Closed EuAndreh closed 9 years ago

EuAndreh commented 9 years ago

Added support for cl-syntax.

Although is adds a little bit of complexity to the book's code, it also makes it more portable: loading it doesn't change your readtable, and you can handle read-macros like symbols in a package.

Added an (eval-when (:compile-toplevel :load-toplevel :execute) ...) to all read-macro-reading function.

Put the code for the #f reader a bit before, before the code stars using the sharp-backquote read-macro.

I know it diverges a bit from the book, but makes the production version title be more real.

thephoeron commented 9 years ago

This will have to be run by @hoytech — but my feeling is that it diverges too much from his book.

What do you think, Doug?

hoytech commented 9 years ago

In principle I have no problem with this but I haven't tested it. If it helps and you guys think it's appropriate go for it.

I always thought it might have made sense to factor out the read macro stuff a bit more. I've had a lot of trouble explaining to people "no, no you have to load lol.lisp before you can compile it because it uses its own read macros.. I know it's dumb.. :)"

EuAndreh commented 9 years ago

When adding these modifications I tried to keep the as close as possible to the original, but since you think it makes sense to factor it out into separate files I can certainly do it.

If appropriate, I can also write some tests for the named-readtables changes.

In order to keep a reference to the original code, maybe it's enough to put links to the original code and the production code in the repo's README. That way, this repository becomes an asdfed ql:quickloadable version of the code.

What do you think, @hoytech @thephoeron ?

thephoeron commented 9 years ago

Well, this is the ASDF/Quicklisp version of the code, so I certainly don't mind it being more library-like. @EuAndreh: if you want to go ahead and update the README, update the Usage section with some examples, and add yourself as a contributor up top, I'll start testing this branch

EuAndreh commented 9 years ago

OK, I'll go on, then.

thephoeron commented 9 years ago

Thanks!

EuAndreh commented 9 years ago

@thephoeron @hoytech I've added some tests only on the things that I've changed. As far as I could see, all read macros continue to work properly after all the changes I've made.

I've also added a .travis.yml file, so the test file be testes on the Travis CI platform. All tests are passing in all platforms tested (SBCL, ABCL, Allegro, ECL, CLISP and CCL)

I also added the nlet-tail macro.

Is everything alright?

EuAndreh commented 9 years ago

Should I also update the README now?

thephoeron commented 9 years ago

@EuAndreh: sorry for the delay, but I've had a chance to review all the code and it's looking good. I think we're good to pull the changes in now.

EuAndreh commented 9 years ago

Nice =]

As far as I could see, all tests pass on all implementations. If anything goes wrong I can help fixing.

Thanks =]