5 ms·
Most *nix machines will have Ruby already installed, it's much better suited, right out of the box, for this kind of work than Javascript is, having descended f
by vinceguidry 11y ago
Most *nix machines will have Ruby already installed, it's much better suited, right out of the box, for this kind of work than Javascript is, having descended from Perl and all.
- ForHackernews 11y agoOr just use Perl! Perl is like sed/awk on steroids, anyway.
- vinceguidry 11y agoPerl has a quite steep learning curve. Not really worth picking up for anyone who would consider using OP's solution. Not when you can use Ruby, anyway. I started to learn Perl several years ago, switched to Ruby pretty quickly.
- kamaal 11y agoIf a task is difficult and a tool has specific capabilities to deal with it, the only way is to learn that to solve the problem. Using a different/easy-to-learn tool doesn't reduce the complexity at hand. You will ultimately end up reinventing all the features in the easier tool, what was available out of the box in the original one. This is precisely the problem with languages that make things easier for novices, once you are beyond that stage you will see yourself doing a lot of work to accomplish simple tasks. This is the reason I switched to Perl, from Python. Python was good for a month, once I started running into more complicated tasks, Perl starting emerging as the clear winner.
- vinceguidry 11y agoNever liked Python much, can understand why you'd switch. Still think you'd have been better off with Ruby. Ruby handles complexity like an old kung-fu master.
- ForHackernews 11y agoIn my experience, Perl is preinstalled on a lot more systems than Ruby, but I fully admit that Ruby is a more pleasant/approachable language than Perl. I'm not that experienced with Ruby, but how is it for running one-liners from the shell? I could see all the 'end's being kind of a pain. Perl's ugly terseness is arguably an advantage for that use case.
- Killswitch 11y agoI don't know perl or Ruby, but I know JavaScript, what now?
- falcolas 11y agoIdentify the value that learning more than just one language would offer you, and use the opportunity to broaden your horizons. Javascript is not the be-all-end-all programming language. Neither is Ruby, Awk, Haskell, or Prolog. However knowing more than one will help you grow in your chosen profession.
- eropple 11y agoI'm honestly curious why all three of your posts in this thread espouse not learning things.
- jamesbrennan 11y agoI wrote a similar CLI in Ruby (https://github.com/jpb/rb https://github.com/jpb/rb) inspired by the Python equivalent (https://github.com/Russell91/pythonpy https://github.com/Russell91/pythonpy). I've never really used rb though - these tools are very limited by their dependencies (in comparison to the common unix utilities you find on almost every system).
- hobarrera 11y agoIsn't python usually considered great for string processing?