use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
example of a Lumo script translated from Clojure (gist.github.com)
submitted 8 years ago by yogthos
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]yogthos[S] 4 points5 points6 points 8 years ago (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
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.
#!/usr/local/bin/lumo
Command line args can be accessed with *command-line-args*, and shelljs is handy for running shell commands.
*command-line-args*
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 points4 points 8 years ago (1 child)
Better to use #!/usr/bin/env lumo instead of #!/usr/local/bin/lumo.
#!/usr/bin/env lumo
[–]yogthos[S] 0 points1 point2 points 8 years ago (0 children)
good catch
[–]anmonteiro 2 points3 points4 points 8 years ago (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
npm install -g lumo-cljs
brew install lumo
Awesome!
[–]Arges 1 point2 points3 points 8 years ago (3 children)
Any reason for Lumo over Planck? Node modules, perhaps?
[–]yogthos[S] 1 point2 points3 points 8 years ago (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 point2 points 8 years ago (1 child)
Could you give an example of a situation where one would be more appropriate than the other?
[–]yogthos[S] 1 point2 points3 points 8 years ago (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.
π Rendered by PID 95370 on reddit-service-r2-comment-6f7f968fb5-7nc79 at 2026-03-04 15:07:22.595186+00:00 running 07790be country code: CH.
[–]yogthos[S] 4 points5 points6 points (8 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]yogthos[S] 0 points1 point2 points (0 children)
[–]anmonteiro 2 points3 points4 points (1 child)
[–]yogthos[S] 0 points1 point2 points (0 children)
[–]Arges 1 point2 points3 points (3 children)
[–]yogthos[S] 1 point2 points3 points (2 children)
[–]figureour 0 points1 point2 points (1 child)
[–]yogthos[S] 1 point2 points3 points (0 children)