4 ms·
I love the idea, I've also been frustrated, and there has been chicken and egg problems which this may help with. That said, the quote: > "And lastly, because
by pherocity_ 12y ago
I love the idea, I've also been frustrated, and there has been chicken and egg problems which this may help with. That said, the quote:
> "And lastly, because we're fed up with having to install half-an-universe's worth of Ruby, Python and Perl to bootstrap our servers or run CI jobs"
If this takes off, some will use it some won't, and we'll be stuck installing a "half-an-universe's worth of Ruby, Python, Perl, and Shellfire scripts to bootstrap our servers or run CI jobs"
- raphcohn 12y agoPerhaps - I hadn't yet even thought of dreaming the similitude of it taking off. Thanks (;-). But shellfire wouldn't be as invasive. Each shellfire script stands alone, a bit like a statically-compiled C executable. Of course, there are still call outs to third-party binaries - but that ordinarily shouldn't be much more than busybox or coreutils, grep, awk and sed, with may be curl. And one can, with shellfire snippets, even embed binaries in the shell script... although whether that's wise is another discussion. The proof in the pudding will be trying to make libertine linux use it - a not even started project of mine to build a minimal, net-bootable linux with an immutable file system (upgrade == reboot a new image).
- mietek 12y agoSo, this is pretty cool. I am in particular impressed how thorough your curl wrapper is. Mine is pretty basic in comparison: https://github.com/mietek/bashmenot/blob/master/src/curl.sh https://github.com/mietek/bashmenot/blob/master/src/curl.sh
- raphcohn 12y agoThank you. There's lots of good stuff in bashmenot. Is there anything you think you'd like to add to shellfire to make it even better?
- voltagex_ 12y agoHey, if I can pack your future Linux distro into one (kernel+initrd) PXE/GRUB bootable file, system rescue just got a lot easier.
- AceJohnny2 12y agoYeah, I'm ambivalent about this. (For some background, I used to hate Perl until I had to write some non-trivial shell scripts, then I realized Perl was a godsend compared to shell). We've long been at the point where you can expect Perl and Python to be installed (Perl is required by the Debian's base tools, and Python by Redhat's). You may not have the libraries you need at the version you need, and it's a shame that neither system has a convenient way to address that (Python virtualenv remains a hacky solution IMHO). I was initially enthused by Shellfire's offering but, come to think of it, all it's doing is bringing SH scripting to some level with Perl or Python... but, as you point out, we have those already.
- Florin_Andrei 12y ago> I used to hate Perl until I had to write some non-trivial shell scripts, then I realized Perl was a godsend compared to shell If the job requires one page of code or less, use shell. If it requires more than one page of code, use Python or whatever. Simple as that. I still hate Perl anyway - source code obfuscation by design is a terrible thing to do to your brain.
- AceJohnny2 12y agoThat's mostly my heuristic as well, except there's a sweet spot for Perl somewhere in the middle. Python has a upgrade problem. We're still running a bunch of CentOS 5.5 machines which depend on Python 2.4. In my org, we still have scripts littered around that expect a later version of python, but are executed from just "#!/usr/bin/python" instead of "python2.7". which fails on those old CentOS machines, on which you can't just set a newer version of Python as default because that'll break many system utilities. Also, Perl's syntactic sugar for regular expressions turns out to be very useful (and I say this after years of grumbling against it).
- JadeNB 12y ago> If the job requires one page of code or less, use shell. If it requires more than one page of code, use Python or whatever. Simple as that. The problem with this simple guideline is that tools grow, so what was well less than a page becomes much more—and each small increment is too small to justify a complete re-write, so eventually you wind up with a huge shell-script monster.