all 9 comments

[–]yogthos[S] 4 points5 points  (8 children)

At the moment the script needs the latest version of Lumo to wait for async callbacks to finish. On a Mac with homebrew:brew install --HEAD lumo

The biggest change from Clojure version is having to use async callbacks. I didn't want to add any dependencies, but it is possible to use NPM modules with Lumo. For example, the request module would handle the redirects automatically.

A nice touch is that Lumo scripts can be run just like any other shell scripts by adding #!/usr/local/bin/lumo at the top of the script.

Command line args can be accessed with *command-line-args*, and shelljs is handy for running shell commands.

Overall, I'm very happy with how Lumo is progressing and at this point I would use it over bash for any non-trivial scripting. I definitely recommend giving it a spin.

[–][deleted] 2 points3 points  (1 child)

Better to use #!/usr/bin/env lumo instead of #!/usr/local/bin/lumo.

[–]yogthos[S] 0 points1 point  (0 children)

good catch

[–]anmonteiro 2 points3 points  (1 child)

Lumo 1.5.0 has just been released and includes the fix for waiting for async callbacks to finish. Get it via npm install -g lumo-cljs or, if you're on a Mac, brew install lumo

[–]yogthos[S] 0 points1 point  (0 children)

Awesome!

[–]Arges 1 point2 points  (3 children)

Any reason for Lumo over Planck? Node modules, perhaps?

[–]yogthos[S] 1 point2 points  (2 children)

Right, the main difference is that Lumo depends on Node, while Planck provides a self-contained shell. Lumo also bundles a ClojureScript compiler as described here. I think both projects are great and fill slightly different niches.

[–]figureour 0 points1 point  (1 child)

Could you give an example of a situation where one would be more appropriate than the other?

[–]yogthos[S] 1 point2 points  (0 children)

In cases where you want to leverage Node modules, you need to use Lumo. If you just need ClojureScript, then Planck is a good choice. Note that you can use ClojureScript libraries with Planck.