News for hackers. Stuff that matters.
Re:A Lisp interpeter in a thousand lines of Bash by cbsw on Monday January 13, 2014 @08:06PM (#7054720)
+ - * / even doesn't support multi-data. (+ 1 2 3) would be 3,stupid
Re:A Lisp interpeter in a thousand lines of Bash by crnixon on Monday January 13, 2014 @09:15PM (#7054958)
Cool, awesome, great point. I tried Googling for your implementation and couldn't find it. Could you drop a link?
Re:A Lisp interpeter in a thousand lines of Bash by wooby on Tuesday January 14, 2014 @02:04PM (#7058976)
Yes, the arithmetic primitives don't support variadic arguments. You can see how + works - and that it only deals with the first two arguments - here: https://github.com/alandipert/gherkin/blob/278354246aebf14b8.... A pull request fixing this would be welcome.

In the meantime, for variadic addition, one can do:

(load-file "core.gk") (reduce + 0 '(1 2 3)) ;=> 6