5 ms·
I like this idea a lot. But why on earth it is written in ruby?! - I know the answer and it is "ok". But it is probably the reason why it won't never gain huge
by kelmop 12y ago
I like this idea a lot.
But why on earth it is written in ruby?! - I know the answer and it is "ok". But it is probably the reason why it won't never gain huge momentum, prove me wrong :)
- artyomkazak 12y agoDoesn't really matter what it's written in as long as its logic is easily extendable by someone who doesn't know Ruby. Preferably without having to code at all.
- AaronBBrown 12y agoWhat language would you write it in?
- kelmop 12y agoI knew my reply will be heavily hammered by rubyists. There is nothing wrong in the language but I think that shell tools should be written in C or in some other low level language without complex dependencies over ruby or java or python etc. or any other non-default installation stuff
- rcfox 12y agoYou're not only being down-voted by Rubyists. For something that deals heavily with string manipulation and isn't speed-sensitive, C is most definitely not the best language to use.
- TomasSedovic 12y agoI'm afraid that ship has sailed a long time ago: $ for bin in /bin/* /usr/bin/* /usr/local/bin/*; do > if [[ -f $bin && "$(cat $bin | head -c 2)" == "#!" ]];then > echo $bin > fi > done | wc -l 544 I imagine most of these are written in Perl (though there's surely a fair amount of Python and shell scripting in there, too), but that's still a high-level language with a complex runtime and dependencies compared to C. To be fair, there's still about twice as many compiled binaries on that box, but having system commands written in a non-C language is by no means an exception.
- pgl 12y agoI was curious about what the spread would be, so for one data point: $ file -b /bin/* /usr/bin/* /usr/local/bin/* | cut -f1 -d, | sort | uniq -c | sort -rn | head -n 10 1028 ELF 64-bit LSB executable 388 POSIX shell script 265 Perl script 130 ELF 64-bit LSB shared object 126 Python script 46 Ruby script 38 Bourne-Again shell script 24 symbolic link to `mtools' 18 setuid ELF 64-bit LSB executable 16 setgid ELF 64-bit LSB executable After the top 10, most were symbolic links. So, seems shell scripts are by far the most common, with perl and python scripts not too far behind, and ruby making a decent appearance.
- mixmastamyk 12y ago"DSLs" are one of ruby's strengths, no?