Earlier quoted context omitted.
You are absolutely correct, of course. But he was sharing his personal frustrations with C++, not engaging in the programming equivalent of "slut-shaming" someone for using C++. That's an important distinction that I think has been lost with the HN community. Without criticism, nothing would get better, but if you criticize someone for making something or making a choice, you might just encourage them to stop being a…
I've yet to see anyone who 'slut-shames' based on language produce anything of value. The wanna-be makers project their own failings more readily.
"I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
101–110 of 183 posts
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#102Earlier quoted context omitted.
Python is a rather old language. A massive 3 years older Javascript.
Python hit its stride a long time ago. The Javascript ecosystem has only quite recently reached sufficient performance, usability and adoption to be a serious general purpose language and it's red hot as a job skill. Python is not dead, but it's not exactly blowing up at this point.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#103Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#104>> The crazy think is we still are extremely bad at fitting things together - still the best way of fitting things together is the unix pipe Is that sad or pure genius?
I struggled with that point of his. From a coding speed perspective, he's right. But from an efficiency perspective, even some of the slowest interpreted languages will run circles around a shell script. However it's still an interesting and thought provoking point. It makes you wonder about other ways of plugging different objects / modules together.
You end up with every tool containing code to parse a stream of bytes into the appropriate data structures, and then probably also write them out to a stream of bytes too. The user has responsibility for a lot of data munging too. It is error prone and repetitive, at least when dealing with anything other than very simple text files containing lines of strings where you know which encoding has been used. (Re)using libraries that read and write more structured data is likely to get you flamed[1]. The history of Unix contains plenty of security problems due to people not correctly accounting for nulls or control characters or spaces etc when chaining together commands (although this is more of a problem with shells than pipes themselves). The output is often not friendly to human eyes by default (I'm thinking of things like localised date and time formats, number formats and so on) since it has to be suitable for passing to another program, unless you use more options or another tool to reformat it.
I would compare it to working with raw memory in C. It's the lowest common denominator, you can do anything, but it's also trivial to screw up and there is a high cognitive overhead. Perhaps it's just too hard to introduce anything higher level at this point.
Perhaps my opinion would change if I spent years (deeply) learning unix tools, but maybe that would just be because I had invested so much time learning a complicated system.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#105Earlier quoted context omitted.
In order to write invent COBOL Rear Admiral Grace Hopper had to invent programming languages, compilers, linkers and the entire modern IT industry - and then she had to implement them, without a programming language or a compiler or a linker. That is the TAO of COBOL - the mother of us all.
It is also important to remember that COBOL was the result of design by committee in the attempt to please all parties and not her opus. This is an incredible book about her life and contribution: http://www.amazon.com/Invention-Information-Lemelson-Studies...
Book looks interesting, will check it out.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#106Earlier quoted context omitted.
In a sense, it's the same thing. He's talking about the concept of fitting things together and refers to Unix pipes (in fact the example he gave was literally a string of piped POSIX commands ready for dumping into $SHELL). My point was that this concept doesn't scale well. As a productivity tool, pipes are invaluable. But you wouldn't want to write a performance critical routine using them. At the end of the day (an…
What's the difference between pipes and chaining functions? I can't really see much difference between grep | sed |awk somestuff.txt and (awk(sed(grep(somestuff.txt))). Or are you suggesting that function composition is not the right approach? In which case, I disagree, but I would like some more insight into your thought process on this.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#107Earlier quoted context omitted.
This is not possible in Haskell either. You never hear people claiming Haskell doesn't support closures.
Which is why I disagree with claims that Python doesn't support them either. It does, of course; we could argue if Python supports "complete" closures, but we won't, because we know better than to use meaningless terms in discussion, right?
Although being able to write on the closed over variable is a neat feature to have, I would argue that feature does make a difference. Whether you call that complete or read-write or however you want to.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#108But I've only scratched the surface. I sometimes sit and watch the #clojure channel on freenode, and I find it inspiring, interesting, entertaining, and disheartening all at once.
Inspiring because I get to see the people who write the awesome software and write the terrific books interacting, and I'll be danged, they are kind and good people!
Interesting because of the problems they are working on and discuss, asking each other for advice or just plain help.
Entertaining because they aren't just kind and good, they are also lighthearted sometimes very funny.
Disheartening because sometimes I look at the pastebin code, or the code they message to the clojurebots, and I am left scratching my head.
However, having read this "oldtimer's" post, I'm inspired to know that it's OK to not become a master in programming in 24 hours.
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#109Earlier quoted context omitted.
In a sense, it's the same thing. He's talking about the concept of fitting things together and refers to Unix pipes (in fact the example he gave was literally a string of piped POSIX commands ready for dumping into $SHELL). My point was that this concept doesn't scale well. As a productivity tool, pipes are invaluable. But you wouldn't want to write a performance critical routine using them. At the end of the day (an…
What's the difference between pipes and chaining functions? I can't really see much difference between grep | sed |awk somestuff.txt and (awk(sed(grep(somestuff.txt))). Or are you suggesting that function composition is not the right approach? In which case, I disagree, but I would like some more insight into your thought process on this.
1) You've only got one send and one return. (well, arguably more if you include stderr and exit codes, but they have their own limitations in addition to the aforementioned)
2) They're too insular from each other; different files dotted about that needs to be loaded into the memory then executed. It adds quite a massive overhead. Granted this isn't an issue for the kind of jobs you'd write shell scripts for in the first place, but it does severely hamper this kind of model in terms of scalability. But then we're back to the age old issue of performance vs convenience.
I will concede that the second point is more an issue about implementation rather than concept though. But if you were to write a lower level implementation of Unix pipes, I don't think it would pretty much end up with Perl functions (which, to be fair, you suggested yourself). I say Perl specifically because you can create a function without specifying what values to accept (see example below), which is akin to the 'dumb' strings read in from STDIN.
sub PerlFunc() {
foreach (@_) {
$i++;
print "Parameter $i == $_\n";
}
}
So I'm not really saying that pipes isn't the "right approach". Just that it isn't always the best approach. But for things like system administration, pipes are invaluable. Not just because the tools are already written (ie the wealth of command line applications), but also because it's quick to express yet highly readable.I'm not really sure if that answers your question though (or even if I've said anything you don't already know).
Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"
#110For when the moderators inevitably change this post to reflect the page's actual title, here's the title under which it was originally submitted: I couldn't really learn Erlang, 'cos it didn't exist, so I invented it
Perhaps the delay is from the software waiting for a good (low load) time to fetch the page.