Hacker News new | ask | show | jobs
by krastanov 1880 days ago
I also do not really get the complaint, but it is along the lines of people wanting to write `julia-pkg install Pluto` instead of `julia -e 'using Pkg; Pkg.add("Pluto")'`. It seems it is a big pet peeve for some people.
4 comments

Yes. I agree with this complaint. The REPL is useful in some cases but in general I avoid interacting with it whenever possible. My impression is that workflow is highly task-dependent (perhaps obvious) but there are many of us who just want to write a script, run the script, and repeat.
Check out https://github.com/fredrikekre/jlpkg. It does pretty much exactly what you are describing.
The `-e` thing gets very messy quickly if you need to pass non-trivial data from the outside world into the application (have you ever tried to "parameterize" a Sed script?). It also doesn't compose well with other CLI tools.

I think these are two perfectly reasonable things to be annoyed by.

Thanks for the example.

As someone who has never used Julia... Wow, that looks exceptionally painful compared to most other modern languages.

The package manager that comes with Julia is actually way better than what is available in python, and it has an unmatched "foreign language dependencies" support. It just happens to be mostly used from the REPL, not the command line (hence the execute -e flag above).