41 comments

[ 4.4 ms ] story [ 93.2 ms ] thread
Why would I want to use this in preference to ClojureScript?
because the jvm is a pain?
ClojureScript is not executed on the JVM.
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.
Do you mean a ClojureScript compiler compiled to JavaScript? ClojureScript can be compiled and run in v8 just fine right now.
How do you compile clojurescript without the JVM?
I think he means ClojureScript completely divorced from the JVM, so you don't need a Java infrastructure to develop/compile ClojureScript.
V8 already is a ClojureScript runtime, isn't it?
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.
Woow! This is really fucking cool! Thanks for sharing.
Glad you find it interesting, looking forward to future feedback.
As a clojure developer that sometimes crosses the line into the front-end world, this is going to make my life much easier.
Why does this make your life easier than clojurescript?
not everybody likes the jvm ecosystem.
Clojurescript compiles to Javascript, it does not run on JVM; Clojure does.
So the compiler and toolchain in javascript then? News to me.
If the person I replied do doesn't like the JVM why are they writing Clojure in the first place?
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.
Would trying the CLR version be an option? Or is this really a cry for a better VM? Or is this really really a cry for an LLVM implementation?
Trying to find ways to integrate react / om / clojurescript into my Ember app and this is perfect. Thank you!
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.
Can anyone enlighten me to the difference between Clojure-like immutability and Object.freeze()?
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.
The only reason I use clojurescript over other js lisps is core.async. What is Ki's take on this?
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?
You can't. Forget it.

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
There is already a ki lisp (a smaller subset of Qi lisp) that is the foundation of shen lisp.

http://www.shenlanguage.org/learn-shen/shendoc.htm#KI

It's actually named KL (with a lower-case L), but yes, that was close.
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.
(comment deleted)