But it does have a fairly tight integration with clojure, and also uses the JVM-based closure compiler. However, I'd way rather see a clojurescript runtime for v8 than another language "inspired by" clojurescript.
I'm guessing, since this is a set of sweet.js macros you could mix Ki and Javascript code in the same file. So you could only use the lisp bits when you really needed to.
[Hi, author here] Yes, that is basically the idea. ki functions are js functions, same goes for vars, which makes it easy to jump from js to ki and back, without giving up on immutability, etc. Note that ki is not really intended as a ClojureScript alternative at all. It's more a way to take advantage of its data structures and some of its expressiveness from a pure JS ecosystem.
I've programmed lots of clojure. But in the end, I am too annoyed by the jvm ecosystem, the good that is clojure doesn't weight up the java crap, so while I love the language, I cannot stand the environment.
I'm interested to hear about your experience. What do you find annoying about the JVM? That notwithstanding, I wasn't asking about yours, I was replying to jeletonskelly's, which seems to be different to yours.
See also LispyScript (http://lispyscript.com/), “a JavaScript with Lispy syntax and macros”.
Like Ki, it requires inclusion of a standard library. Unlike Ki, it does not provide alternative data structures in addition to native JS values; it only uses native JS values. LispyScript also does not support embedded JavaScript or being embedded within JavaScript. But LispyScript currently has better docs, including a page to try it in the browser (http://lispyscript.com/tryit/).
I agree, LispyScript is very neat, closer to a full-fledged language than ki. On the other hand, ki is focused on ClojureScript's immutable data structures and related idioms - in fact it's just a thin layer around those.
The main difference is structural sharing: I can update a Clojure map with a new value, which will create another map that shares the vast majority of the data with the former map. With plain JavaScript, you'd have to clone your object, update it and freeze it again. In addition Clojure/ClojureScript/mori offer a whole API designed to leverage immutable data structures.
I have ideas around providing CSP in ki, but so far I haven't implemented them. All there is in ki right now is the (letc ...) form (see http://ki-lang.org/api.html#misc), which provides very similar functionality to LiveScript's backcalls. It is no CSP but it allows to straighten up nested async calls.
I'd appreciate any opinions on how usable something like this or ClojureScript is to transition to in an enterprise / team environment. How can I sell that switch to my employer and co-workers?
I mean, there is a whole long list of benefits of functional programming, immutable/persistent data structures, macros and so on. But Lisps and functional oriented languages (like Roy, LiveScript) are also unfamiliar, not supported in your favourite IDE, make you think in a way you're not accustomed to and eat your kittens for lunch.
You have a chance with ClojureScript if the backend is in Clojure - other than this there is just no way to introduce something like this.
As for usability, ClojureScript works very, very well. Async is well implemented (if you like CPS model), JS scoping is fixed and so on. LiveScript is also quite usable, although it lacks source map implementation for now. Backcalls make async nice but stay close to JS, currying and partials are nice, easy object cloning makes up for inherent mutability. For my personal projects I use LS instead of JS or Coffee exclusively now.
But they are completely unusable in enterprise environment. And probably won't ever be. It would also be very hard to find a team which would like to adopt them without knowing them beforehand (rightly so, IMHO, because transitioning to another paradigm - and benefiting from it - is not a trivial matter) and about as hard (or harder) to find a team where they are known already.
Your best bet is probably to contribute to LightTable a lot and seek a job in Clojure oriented start-up if you want to use ClojureScript at work.
like this. im not sure how much an improvement this is over for example underscore (i guess i'll find out), but at least i can finally -kinda- say i write bloody LISP when i put this in my code :P
What's the difference? I mean, Shen is ported to JS, and doesn't require Node. Can it play with JS like KL? Shen is pretty cool with a built-in, functional Prolog too, and static typing you can turn on or off.
Shen is pretty amazing, it's a full fledged functional language with lots of features and lots of compilation backends. I don't think there's a lot of ground for a comparison with ki, which is much more limited in scope.
41 comments
[ 4.4 ms ] story [ 93.2 ms ] threadwhen this is done. Some people are working hard on it.
Like Ki, it requires inclusion of a standard library. Unlike Ki, it does not provide alternative data structures in addition to native JS values; it only uses native JS values. LispyScript also does not support embedded JavaScript or being embedded within JavaScript. But LispyScript currently has better docs, including a page to try it in the browser (http://lispyscript.com/tryit/).
I mean, there is a whole long list of benefits of functional programming, immutable/persistent data structures, macros and so on. But Lisps and functional oriented languages (like Roy, LiveScript) are also unfamiliar, not supported in your favourite IDE, make you think in a way you're not accustomed to and eat your kittens for lunch.
You have a chance with ClojureScript if the backend is in Clojure - other than this there is just no way to introduce something like this.
As for usability, ClojureScript works very, very well. Async is well implemented (if you like CPS model), JS scoping is fixed and so on. LiveScript is also quite usable, although it lacks source map implementation for now. Backcalls make async nice but stay close to JS, currying and partials are nice, easy object cloning makes up for inherent mutability. For my personal projects I use LS instead of JS or Coffee exclusively now.
But they are completely unusable in enterprise environment. And probably won't ever be. It would also be very hard to find a team which would like to adopt them without knowing them beforehand (rightly so, IMHO, because transitioning to another paradigm - and benefiting from it - is not a trivial matter) and about as hard (or harder) to find a team where they are known already.
Your best bet is probably to contribute to LightTable a lot and seek a job in Clojure oriented start-up if you want to use ClojureScript at work.
http://www.shenlanguage.org/learn-shen/shendoc.htm#KI