Hacker News new | past | comments | ask | show | jobs | submit login

A lot of his rationale doesn't follow the simplicity argument he makes.

I'm not a Rubyist, but replacing Ruby with awk sounds like a terrible idea: suddenly means you're treating things which are not strings as strings, which can get very complex very quickly. Also: few people know awk beyond print $1, and using two languages (bash and awk) is more complex than one.




>and using two languages (bash and awk) is more complex than one.

If the two languages are combined still simpler than the one language, then it is not more complex. Note that bash is not what you would be using if following his lists. Using rc+awk is way simpler and easier than ruby for any typical unixy scripting stuff (text mangling, process wrangling, etc).


Really? I think any language with string methods, regexs, arrays, sets, and hashmaps (which IIRC Ruby has) is a much cleaner approach than sed + awk + (bash|rc). Data is serialized as strings in config files, but for simplicity's sake, should be manipulated as actual data.

This is coming from someone who built an OpenDocument generator in bash that's still in use at IBM today.

Also: who names something new on Unix 'rc'? Simplicity is not using existing names.


rc appeared in v10 unix in 1989. Tom Duff, the author, named it.


You might want to learn awk and rc before making claims about them. In particular, awk is significantly more powerful than you seem to realize, it is not analogous to sed at all. It is a specialized programming language for manipulating tabular text data.

And nobody names something new on unix rc. It is the plan 9 shell.


I've used awk extensively and am aware of everything you've told me. I never said awk was analogous to sed, they're quite different, which is why you'd use both, as I mentioned.

I've not used the rc shell, but have used Bourne shell, bash, csh, various versions of ksh, and zsh. My comments apply to all of those, and unless rc is significantly different to every other Unix-like shell I imagine they apply to rc as well.

Also: plan 9 is Unix-like, rc shell is newer than the Unix concept of rc that dates back to 1965 http://en.wikipedia.org/wiki/Run_Commands. So yes, it's a new(ish) thing with a naming conflict with something already well-known.


>I've used awk extensively and am aware of everything you've told me. I never said awk was analogous to sed, they're quite different, which is why you'd use both, as I mentioned.

I can't see any way to parse your statement such that it matches your claim of being experienced. Either you feel sed is on the same level as awk and rc, hence mentioning it together with them (unlike say, ls or grep or any of the other commands you didn't mention) as being one of the tools you would use instead of general scripting languge X. Or you meant using them together for one specific task rather than as a general "sometimes you would use one, sometimes you would use the other". In which case you don't realize that there is no reason to ever do that since awk can already do everything sed can.

>I've not used the rc shell

That's precisely what I pointed out was a problem. "I have no knowledge of one of the things I am comparing" is not a rebuttal to "you have no knowledge of one of the things you are comparing".

>My comments apply to all of those

And all of those are listed in the same category. This makes it rather self-evident that yes, he considers rc to be significantly different. Hence my suggestion that you try it and find out how you feel about it, rather than just assuming it is the same as bash.

>Also: plan 9 is Unix-like

No it is not. Linux is "unix-like". Plan 9 is a completely different OS, designed as a spiritual successor to unix, which was seen as having been corrupted. It is no more unix-like than windows is dos-like.

>So yes, it's a new(ish) thing with a naming conflict with something already well-known.

I never said otherwise. You asked "who names something new on Unix 'rc'?". I pointed out the obvious fact that it simply isn't the case. It is not something new on unix. Being upset that an operating system has a two letter command that another operating system also has is silly.


Twice now you haven't read the post you're responding to. I don't think sed is the same thing as awk, nor do I think it is the same as bash, I have never said that, in fact I have said quite the opposite: that you'd likely use all of those together. This is incredibly common behaviour in Unix scripts: you might not like stream editing but many find it cleaner than awk's less well known language.

You seem to have gone out of your way to attribute some kind of conspiratorial malice or gross incompetence to a simple, TESTABLE fact: shell scripts plus text manipulation languages are frequently replaced by single language scripts, which have a unified, consistent syntax and high level data structures.

Since you're not reading my posts, I'm not going beyond your first sentence. This is end of my participation in the thread.


I have in fact read them. I have even been very explicit and clear about my reading of them in the hopes that you will either understand what I am saying, or correct my misunderstanding. It is unfortunate that you wish to do neither. I made a very simple point: you do not know rc, and are comparing bash to ruby and then blindly assuming that comparison applies to rc vs ruby. It does not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: