shin (新) is an early-stage but relatively complete implementation of a 
ClojureScript-to-JavaScript compiler, written in Ruby, and that does not rely 
on Google Closure's libraries or compiler: https://github.com/memoways/shin

The README contains probably more than you ever want to know about Shin, but I 
am of course happy to answer any of your questions :)

The main differences are:

  - It's not based on any previous Clojure compiler - no use of the analyzer, 
etc.
  - It generates AMD modules rather than Google Closure modules
  - Data structures are implemented on top of Matt Bierner's HAMT+ for the time 
being (but that may change)
  - Macros are expanded in JavaScript, using V8 (driven from Ruby)
  - Uses `escodegen` to generate JavaScript

What sorely missing? At this time: metadata support, type annotations, 
transducers, a cache for the compiler so recompiles are faster, and actually 
passing source location information from the AST to escodegen.

But otherwise, functions, defprotocol/deftype, macros, base collections (list, 
cons, hash-set, hash-map)
 
Right now the most involved piece of ClojureScript code (except for ~30% of 
cljs.core and 100% of clojure.string) is probably Reagent, which I am almost 
done making work with Shin: https://github.com/memoways/reagent-shin — I wanted 
to wait till it was complete to make the announcement, but I figured I could 
probably use some help along the way :)

Why should anyone care about this ?

  - Alternative implementations of a language are just plain healthy, even if 
you don't use them.
  - Polyglot programming is awesome (Clojure/Ruby/JS all in one!)
  - 330 specs and growing: https://github.com/memoways/shin/tree/master/spec 
(maybe we can get a runnable specification of ClojureScript at some point?)

Oh, and hopefully obvious disclaimer: don't use it for anything serious! It 
still breaks often, it's not even a month old, handle with care.

That said, helping hands are more than welcome, in particular in these areas:

  - Identifying differences in behavior with the mainline CLJS implementation
  - Writing more specs & porting more of cljs.core
  - Profiling & making the compiler faster (probably more for Ruby folks!)
  - Figuring out a JS-friendly way to distribute libraries (bower? component?) 
— eventually have libraries that compile both on mainline and shin?

Love,
— Amos

P.S: I'm not sure how the whole licensing thing works, since ClojureScript is 
EPL+CA and Shin is just MIT-licensed. There's a note in the README, let me know 
if there's anything else I need to do!

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to