3 ms·
Am I the only one who finds replace's syntax much nicer? I haven't spent much time learning unix utilities, so that might explain it. But I can't help but shud
by RaphiePS 14y ago
Am I the only one who finds replace's syntax much nicer?
I haven't spent much time learning unix utilities, so that might explain it. But I can't help but shudder at find . -type f ! -name '.min.js' ! -name '.py' -print0 | xargs -0 sed -ri 's,var,let,g'
- mrb 14y agoShe was able to simplify her command line interface in order to support only the features she needed, so of course her syntax is nicer. Whereas sed/find/xargs can do a lot more things, so of course they come with a more evolved syntax. It is the usual tradeoff between simplicity and features.
- mindcrime 14y agoRight... she had different requirements, so she wrote a different tool. Which is why I find your near-rant above somewhat disturbing. It seems predicated on a (seemingly) very arrogant belief on your part, that you know more about what harthur needs, then she does. Personally, I am very sceptical on that point. There is only one case that justifies reimplementing things Or, um, how about the one that goes "I felt like it"? That's sufficient justification in my book.
- blader 14y agoYeah, who needs TextMate when you have vim, right? Or Ruby when you've got Perl?
- jrogers65 14y agoI beg to differ on your first argument. Learning Vim was one of the best decisions I've ever made in terms of how I write code. Other editors feel like toys in comparison. I'm siding with mrb on this one. Learning flexible tools gives you immense power in comparison to low-learning-curve ones. The time invested is considerably smaller than the time spent figuring out how to solve edge cases with simple tools. This is something which appears to be impossible to communicate to people with words. Learn some of these tools and you will see for yourself. By 'learn' I do not mean, for example, becoming familiar with hjkl for navigation in Vim. I mean mastering the tools to the point that using them requires no effort - where just as you experience the impulse "I want a glass of water" and without any effort go to fetch one, you experience the impulse "I want to create a new class in file X, navigate to file Y then modify method Z", your fingers start moving and suddenly you're done. I get frustrated watching my IDE using co-workers write code - it takes them a very long time to do very simple things. Their tools are narrow and do not facilitate expression - they constrain it. Pre-emptive strike on the argument that code completion is better - Eclim (Eclipse with a Vim frontend) solves this problem very well. Nonetheless, I have it installed and configured but can barely find a use for it.
- blader 14y agoMy only point is that what's right for you isn't necessarily what's right for everyone.
- kayoone 14y agoExactly, and its something happening all the time and many people seem to like it. If not, everyone would be using Linux Desktops vs OSX/Windows, vim/emacs vs Sublime/Textmate/an IDE, plain ruby/python/etc vs Rails/Django/etc, OpenGL/DirectX vs Unity/any Game Engine etc. Even in the consumer world, this is Apples strongest selling point for example. Make products simple and easy to use, but still do 90% of what anyone would want to do with it. If that isnt enough, there are other things to use. I think the same can be said over replace. I find your skills with sed/grep impressive and its certainly very useful in some cases (mostly devOps) but in case i need it myself i would just look it up and in the meantime use simpler tools and get the job done.