r/Clojure • • Mar 08 '15

Pixie: stunningly good

http://blog.goodstuff.im/pixie
74 Upvotes

16 comments sorted by

View all comments

6

u/spotter Mar 09 '15

Nice note, could use less of "bashing JVM for Clojure's sins".

Pixie looks awesome.

3

u/yogthos Mar 09 '15

I really don't see the JVM as a negative for the kinds of applications Clojure is typically used for either.

6

u/simtel20 Mar 10 '15

I think you've got that backwards: It's hard to use clojure for problems that the jvm doesn't handle well already. E.g. until 1.7 you had to do a ffi call to make a directory, so you'll probably see code in the past avoiding doing anything that may have to make a directory on the filesystem.

Clojure could be very good for expressing some problems but the presence of the JVM makes it impossible - e.g. if you need to fork+exec then it is terrible because you need to specify the heap up-front, and are more likely to get a fork failed because the OS virtual memory system can't allocate an additional X MB (where -Xms < X < -Xmx (non-deterministic!) even if it's just in order to vfork+exec something trivially small. With something like pixie, you could create a launcher where your use of memory is small and constrained, and fork+exec as you please because the parent doesn't have to have the same heap requirements as the children.

That's just one example. Anything that handles DNS is another. You have to become a JVM domain expert to use anything hosted on the JVM, and that anything systems-ish will be excluded by default, and will only work with way more effort than other runtimes (cough go cough) in spite of how much nicer the language is.

3

u/yogthos Mar 10 '15

Sure, the JVM definitely influenced the domains where Clojure is used. There have been a few previous attempts at making Clojure versions that are independent of the JVM, but Pixie looks like the first really viable one. I'm definitely excited to see where it goes. ;)

7

u/[deleted] Mar 10 '15

Indeed. I can also definitely see it as a "I'd like to write a Clojure CLI app, but the startup is killing me, so I'll use Pixie instead" kind of deal.