4 ms·
Then write it once and share the wrapper script on github. No?
by mrb 14y ago
Then write it once and share the wrapper script on github. No?
- kamaal 14y agoC'mon we are long past the days where tools had to written in $somelanguage. These are days where even things like compilers and databases are not being written in C. If its of any help I think its time for the Unix community as a whole to sit down and self reflect. If people are beginning to think something like 'sed' as too level to use, then better job needs to be done to make them more accessible and usable. There are enough examples on this thread where people are saying that they look at sed as an API on top which a program needs to be built up on. And not a complete program in itself. Also shell is not a full fledged programming language.
- disgruntledphd2 14y agoI respectfully disagree with you here. The beauty and the wonder of these small command line tools (for me, at least) is that they are a) small and b) fast and c) ubiquitious. I do a lot of data manipulation, and while I'll do anything complex in a real programming language (with a REPL) sed, awk, grep and find are really really handy for quick data finding and manipulation. Any new API on top of them would only be present on a fraction of machines, and thus would reduce the major advantage of them in that they are available everywhere.
- trilobyte 14y agoWow, you actually stated something that was wrong enough to force me to comment. The beauty of these tools are that they are small, fast, ubiquitous, AND easy to replace with other tools if they fit your problem better. Unix was built exactly for swapping in these small one-off programs and to deny that is to deny the beauty of it's design and to basically ignore the fact that the system is built to string arbitrary programs together to solve complex problems in simple ways. One advantage of her Javascript replace is that she can drop it on any machine with a Javascript runtime and it will work, unlike sed. And the real truth is, she wrote something that solves a problem she has, which is the measure of her success, not someones arbitrary comments.
- doktrin 14y agoWhy do you have such a strong objection to someone spending their own free time to simplify and / or mimic [insert unix tool functionality here]. It clearly serves a purpose and it's apparently useful. Most importantly, it exists, so there's no need to argue over how you think it should have been implemented. I'm sure if you were to release your own [script / wrapper], someone would find use for it, in the same manner that some have apparently used 'replace'. I honestly fail to see the big deal here.
- mrb 14y agoI know it someone's right to do this, of course. I object because I come from an environment (software industry) where I have spent hundreds of hours undoing people's poor jobs where they wasted time and money reimplementing (incorrectly) library functions, system commands, etc. Because of this personal experience, I reacted the same way many reacted when seeing her script. So, I decided to explain to her and attempt to convince her that she should have spent her time and skills on something else (especially because she seems a rather good programmer!) Does it make sense?
- doktrin 14y agoFair. I can see where you're coming from.
- cygx 14y agoI object because I come from an environment [...] where I have spent hundreds of hours undoing people's poor jobs where they wasted time and money reimplementing [...] system commands What you fail to take into account is that there's definitely a niche for Node.js-based development tools such as this script: The GNU userland is not ubiquitous. Node.js did not come with a system command to search and replace across files - now it does.
- chris_wot 14y agoIt's a one off tool, unlikely to be used in any project you are writing software for. She provided the source code freely, and the code isn't bad at all. I fail to see why you will ever need to rewrite this?