
Clojure Obscura - llambda
http://blog.fogus.me/2012/07/09/clojure-obscura/#post-4392
======
mark_l_watson
+1 great list Michael. I liked the contracts/Trammel link. I have never really
got into contracts but this looks lite enough on ceremony that I can visualize
using it. A long time ago I was very enthusiastic about the Little Schemer and
Little Reasoner books, and sometime I need to make the plunge into core.logic.

I wish that I could (mostly) "go all in" with Clojure but there are also so
many things I enjoy about Ruby. These two languages compete for my dev
attention, and sometimes it is a brutal fight :-) Almost like there is too
much good/useful/fun tech (cornucopia complex:
[http://blog.markwatson.com/2005/11/cornucopia-complex-
ruby-o...](http://blog.markwatson.com/2005/11/cornucopia-complex-ruby-on-
rails-vs.html))

------
MatthewPhillips
Good to see the compilation target list is growing. The Clojure->Scheme->C
target has previously been discussed on HN, sad to see it isn't being actively
worked on now. The Clojure->C target is new to me though, and is active. The
documentation is a bit light and I can't gleam how to use it from the tests.
Has anyone here played with it and know what's going on?

<https://github.com/schani/clojurec>

~~~
aaronblohowiak
What is it about Clojure that makes implementation towards other targets so
appealing / approachable to devs?

~~~
spacemanaki
At least some of the recent Clojure implementations are based on
ClojureScript's compiler, which from what I understand is relatively moduler:
[http://blog.fogus.me/2012/03/27/compiling-clojure-to-
javascr...](http://blog.fogus.me/2012/03/27/compiling-clojure-to-javascript-
pt-3-the-himera-model/)

Lisps in general are appealing to implement. Clojure's core language is about
as small as Scheme's, and there are a lot of Scheme implementations too. The
parts of Clojure that set it apart from other Lisps (STM, persistent data
structures) aren't always ported. I don't think any of the recent approaches
to targeting C (Clj->Scheme->C, Clj->C) include STM or persistent data
structures. I'd be happy to be pleasantly surprised though.

~~~
abp
persistent data structures are implemented in ClojureScript. So they don't
need to be ported for new compilation targets of ClojureScript like C in
clojurec, I think.

~~~
dustingetz
ClojureScript's core library has a dependency on Google Closure, and are
optimized with knowledge of javascript vms. david nolen said that v8, for
example, is blazingly fast at sequential instructions so they take great care
to avoid function calls in critical paths.

here's some discussion that alludes to performance concerns in js vms:
<http://dev.clojure.org/jira/browse/CLJS-284>

here's the original commit for PersistentVector, note how low level the code
is:
[https://github.com/clojure/clojurescript/commit/e615f4cd326e...](https://github.com/clojure/clojurescript/commit/e615f4cd326e7c608050272c64c4dfaff9a34689)

here's more discusson by david nolen:
[https://groups.google.com/forum/?fromgroups#!searchin/clojur...](https://groups.google.com/forum/?fromgroups#!searchin/clojure/clojurescript$20performance/clojure/c3ho-Y8o6Wg/CwzSLHio0-QJ)

more discussion about allowing low level code access to js-specific special
forms for numerics:
[https://groups.google.com/forum/?fromgroups#!searchin/clojur...](https://groups.google.com/forum/?fromgroups#!searchin/clojure-
dev/clojurescript$20performance/clojure-dev/NbvLeJRLQtc/kTzJaZsh6gAJ)

