Dear God Of Lispyscript,
First of all, I would like to thank you for creating this
project. I am a lisp hack in training, and your project ticks all of
my boxes for a great language. I too read "Beating the Averages"; I
think it's a good sign this project was inspired by that essay. I'll
be using this language for creating an online game (if it all works
out ;) ), so I'm reading the documentation now and I've found a few
unclear things/errors. Correct me if I'm wrong on any of the below. If
you need help fixing them let me know (I'm just learning javascript
now so I don't know much, but wherever I can help I will)
First: a bug in the website. There's a discrepancy between "Try it!" and command line compiler.
On the web site, in the "Try it!" tab, when I try compiling
(function (-> ($ "#xyz") (.required) (.alphanum) (.min 3) (.max 30) (.with "email")))
It gives
function(->,$,"#xyz",.required,.alphanum,.min,3,.max,30,.with,"email") { };
which just seems wrong.
However, compiling with the command line tool lispy gives:
// Generated by LispyScript v0.3.6
((((($("#xyz")).required()).alphanum()).min(3)).max(30)).with("email");
You must not be..... expanding macros? Check out the _compile function you exported in lib/ls.js I think.
And besides, what's with all of those extra parens? Shouldn't it just be:
$("#xyz").required().alphanum().min(3).max(30).with("email");
or so? (not knowing jquery)
Also, on the documentation page, you say the usage for the `->` macro is as follows:
(-> (function expression) (.key1 args1 ...) (.key2 args2 ...) ...)
Looking at the source code for the macro `->`, I still don't
understand. It doesn't seem as though the arguments match up, in other
words it seems like the useage should be something like:
(-> expression (.key1 args1 ...) (.key2 args2 ...) ...)
assuming scheme documentation style ellipses (where the preceding sexp is repeated 0 or more times)
But I still cannot understand the macro. looking at lib/ls.js, it seems
`rest...` is syntactically significant, but this isn't documented any
which where. Same with #args-shift and it's kin.
Also, I was wondering if you used the closure compiler.
Let me know if I can help,
Jacob Howe