3 ms·
That is unfortunate and true. I wish I could use Elixir as a shell scripting language without incurring the VM startup cost and losing the ability to export sh
by pmarreck 3y ago
That is unfortunate and true.
I wish I could use Elixir as a shell scripting language without incurring the VM startup cost and losing the ability to export shell variables or create shell functions... Maybe it would make sense for someone to hack its REPL to dupe most of what one would need on a commandline
- kazinator 3y agoAre you sure? I would be astonished if Erlang didn't have a way to export environment variables for child processes. In a language that provides nothing beyond a function that lets you run system commands, you can control the child's environment via the env utility: system("env FOO=bar command arg ...");
- pmarreck 3y agoThe context here is that I may want to run an Elixir script from a Bash command line which results in some environment variables being changed. I don't think that's possible unless that script itself sends that env command to STDOUT, and I then capture it and eval it on the Bash side. Which seems... inelegant.