@mfikes Ah cool. I've had great success with fpm. https://github.com/jordansissel/fpm
@nate Ahh wow. That looks very useful.
@gamecubate you might be showing a toy-example, but why not use planck for the whole thing?
cat nums.txt | tally
would, in the olden-days win you the "Useless use of cat award”, usually awarded by Randal L. Schwarz of Perl fame.
this concrete example, i guess could be written as tally nums.txt
, where tally
is the clojurescript, well, script, which slurps and parses nums.txt at its hearts content.
which leads me to something like this:
@slipset A toy example absolutely although, in real (nix life) I do pipe stuff around a lot so the odds of tally being "first in line” (as in start of command) are dim. But yes, I agree that command-line-args handling is important for any planck script. Thanks for the example, which I immediately cannibalized. The final script tests for presence of args and reacts accordingly:
@gamecubate cool! It seems like whenever I come across people asking for help with planck scripts and interacting with the surrounding shell, they tend to forget that more often than not, you need not interact with the shell.
As in you have a full blown programming language available with (limited) io capabilities.
Which was one of the reasons I wanted to add native http support in planck, so you wouldn’t have to shell out to curl
or wget
Then again, when integrating with other tools, the need to read from stdin is important.
As long as planck remains nimble and stream-friendly, its involvement in my daily work life can only grow. Enjoying clojure very much and planck fits the mold perfectly.
@gamecubate bored at work, so I changed it a bit.
@slipset 🙂
Moved on for time being to ripping hair out trying to get hammer.js to play nice with reagent on mobile safari. I don’t whether to hate Safari, or Hammer.js, or both.