Owl Lisp – A purely functional Scheme that compiles to C
github.com
github.com
Also, I like how it doesn't call itself Scheme, because it's not Scheme.
This is a problem that annoys me: people seem to think that if you're a lisp-1, and you follow a few naming conventions, you can call yourself scheme. That's like calling yourself Common Lisp because you're a lisp-2 with setf.
Scheme is a family of languages, true, but it does have a formal spec, and if you do not follow it (or at least approximate it), than you are not scheme. Scheme inspired, or scheme derived, maybe, (Racket got this one right, and changed its name once it started going too far afield, thus saving us from having to explain to 1000 confused newbies that PLT Scheme isn't Scheme, and now must only deal with people who tell newbies that Racket is Scheme) but if you don't meet IEEE or RnRS, or at least Scheme as described in AIM-349 (the original Scheme: a radically different language from Scheme today), than you're not Scheme, and if you call yourself that, than you'll confuse people.
/rant
EDIT: No, it's not like DSSSL, and it's less cool than I thought it was. It's still cool, though.
Chicken 5, the upcoming partial rewrite, is worth keeping an eye on.
Gnu Common Lisp, Embeddable Common Lisp, mkcl, mocl. There are also attempts at C++ as a target language. See CLASP.
https://www.gnu.org/software/gcl/
https://common-lisp.net/project/ecl/
http://euroclojure.org/speakers#mreitzenstein
Taking advantage of immutability and using clojure.spec generators at the top level, it specializes/simplifies the code using really simple transformations.
Demo of the specialization here:
That must be what they mean by "purely functional".
It sounded like it was going to be general-purpose DSSSL. That would have been so much more cool.
Immutable by default might be what you'd get if CL only had let to introduce/"change" variables.
(define x (vector 1 2 3 4))
(define y x)
(vector-set! x 0 100)
Should y[0] be 100 or 1?A function called with the same arguments will always have the same result.
I guess a compiler have no such problems.
Immutable methods are the same thing as a safety check for humans. As you want to check for these things anyway (since you probably don't want errors to come from the c++ compiler), they don't add value.
(AFAIK, they may trigger optimizations, but so does passing const parameters to a free function, which is the C equivalent)
With that said, purely functional programming is arguably just a hassle; I tend to think that "functional-first," as I call it, programming, a la Clojure, is a good balance between practical and pure. In this way, side effects are adhoc, but all definitions are immutable by default.
Radamsa is seriously awesome.
Awesome fuzzing engine but modifying it is not for the faint of heart.