3 ms·
If you play with the examples it becomes more apparent, but you can use it alongside gnu-utils like grep with pipes on the command line easier than a lot of tra
by throwaway7645 10y ago
If you play with the examples it becomes more apparent, but you can use it alongside gnu-utils like grep with pipes on the command line easier than a lot of traditional lisps that have a slower startup (ex: Clojure). Kind of like Perl.
- bitwize 10y agoClojure is not a "traditional lisp". And Guile was my Perl in the late nineties. Never experienced startup time issues, even on Pentium-class hardware.
- justinhj 10y agoThere are ways around the slow startup of Clojure such as http://leiningen.org/grench.html http://leiningen.org/grench.html
- klibertp 10y agoFrom that website: > Grenchman lets you run Clojure code quickly. By connecting to a running nREPL server you avoid JVM startup time, streamlining your development workflow. It's irritating to see the same claim repeated again and again. It's not JVM startup time, it's Clojure startup time. Whether it's because JVM is ill-suited for the kind of code Clojure uses or for other reasons I don't know, but JVM itself starts up 100x faster than Clojure on JVM. Moreover, a daemon running in the background is a just a workaround. To use it you need to write your app in a certain way so that reloading works, and you still need to start the daemon at some point. I've been working with Clojure for a few months full-time and it was kind of ok, however, for command line utilities, almost anything is better than Clojure. Python, JS with Node, Racket, Ruby, GNU Smalltalk, even Io - all these start up much faster than Clojure. ClojureScript with Node would be an option, but then ClojureScript (and Node). In short: if you need to write a cmd line utility program you should avoid Clojure as much as possible.
- xavi 10y agoI don't agree. Planck (https://github.com/mfikes/planck https://github.com/mfikes/planck) is quick and great for command line utilities written in ClojureScript. It runs on macOS' built-in JavaScriptCore. There's also an alpha version that runs on Ubuntu. Please check the Planck User Guide's section on Scripts http://planck-repl.org/scripts.html http://planck-repl.org/scripts.html
- justinhj 10y agoThere are a few solutions for scripting with Clojure http://blog.fikesfarm.com/posts/2015-08-01-planck-scripting.html http://blog.fikesfarm.com/posts/2015-08-01-planck-scripting.... Personally I wouldn't script in Clojure. If something is simple enough to be a script I'd use bash or Python and leave Clojure for writing non-trivial programs for which startup time is not an issue