Programmer writing about Lisp, Clojure and functional programming, including Qi examples like red-black trees and FFT.
Commenters point to his critical posts on Clojure and his Lisp rant, and to worked Qi examples of functional data structures.
This was posted here yesterday:
http://www.brool.com/index.php/snippet-automatic-proxy-creation-in-clojure
A neat hack to get something working quickly, but very unlispy. I can't even make sense of the AUTO-PROXY macro. A syntax barf mixed with a gratuitous breaking of LET. Also note that Rich Hickey decided to use the proxy design pattern to interop with Java, instead of doing all business with Java through FFIs; in a sense, Clojure's type system is embedded in Java.
http://clojure.org/java_interop#toc25
This is a minor aesthetic nitpick from a concerned Lisper, mostly for selfish reasons. My thinking goes: "Today I have Common Lisp for my projects and I am happy with it. But tomorrow if I need Clojure, I hope to find it in a sane, Lispy world. I don't want to learn Java so please don't make me" ;-)
For a far more alarmist polemic, albeit a satirical one, see this:
http://jng.imagine27.com/articles/2009-08-19-011225_clojure_the_false_lisp.html
His Lisp rant is great too: http://jng.imagine27.com/articles/2010-02-26-100553_do_you_really_know_lisp.html
It's my own fault, I sometimes try engaging certain superficial functional and Lisp crowds on the internet. Comments are quickly down-voted because of the prevalent mob mentality and inability for independent thought. Have we all not yet evolved beyond peer pressure ? Really ? Sometimes there are some gems when an independent thinker has something to add to the conversation instead of mob screech and splintered egos that ruin the dialog. I basically end up writing my own posts on my own site to summarize and lower the signal-to-noise ratio.
There are such DSLs on top of Common Lisp. But usually not on the scope of a full programming language like Pascal. It is not that typical anymore, but there are examples in that direction.
---------------------------
I have found two examples:
1. Python in Lisp: http://github.com/franzinc/cl-python
2. Ruby on Lisp: http://jng.imagine27.com/articles/2010-10-07-084756_ruby_subset_implementation.html
I will try to write little subset of Pascal as eDSL on Lisp.
There are also a few extended examples on his blog:
Red-black trees http://jng.imagine27.com/articles/2011-06-28-141124_purely_functional_types_red_black_trees_in_qi.html
FFT http://jng.imagine27.com/articles/2011-07-06-164206_purely_functional_fast_fourier_transform_in_qi.html
Much of the excitement around Clojure seems rather buzzwordy. You should check out some of its criticism, such as http://jng.imagine27.com/index.php/2009-08-19-011225_clojure_the_false_lisp.html and http://www.loper-os.org/?p=42
Worse is better and in this case Clojure is even more so 'The zombie-reanimated corpse of Lisp'.
http://jng.imagine27.com/articles/2009-08-19-011225_clojure_the_false_lisp.html