Fork me on GitHub
#planck
<
2017-02-06
>
nate01:02:36

@mfikes Ah cool. I've had great success with fpm. https://github.com/jordansissel/fpm

mfikes01:02:12

@nate Ahh wow. That looks very useful.

slipset09:02:59

@gamecubate you might be showing a toy-example, but why not use planck for the whole thing?

slipset09:02:53

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.

slipset09:02:46

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.

slipset09:02:53

which leads me to something like this:

gamecubate12:02:38

@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:

slipset12:02:31

@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.

slipset12:02:11

As in you have a full blown programming language available with (limited) io capabilities.

slipset12:02:48

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

slipset12:02:31

Then again, when integrating with other tools, the need to read from stdin is important.

gamecubate12:02:48

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.

slipset13:02:43

@gamecubate bored at work, so I changed it a bit.

gamecubate15:02:29

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.