Live data from Hacker News

"I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

erlang.org

101–110 of 183 posts

Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

#101
post #25

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.

Either you don't consider linux to be 'anything of value' or you haven't read Linus Torvalds' take on c++ http://harmful.cat-v.org/software/c++/linus

Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

#102
post #51
post #36

Earlier 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.

Depends on what domain you work in. If I used nodejs or web services, then I would be enamored of Javascript. But I do an data analysis and ETL, a domain that Python and friends excel at, I not concerned as what's "hot" and "in" at the coffeshop.

Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

#104
post #24
post #17

>> 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.

Is efficiency the biggest problem? It seems to me the bigger problem is that streams of raw bytes over pipes is the wrong level of abstraction for most tasks; at least we seem to have decided that is the case when we are writing code within a program, so I don't see why it shouldn't extend to interprocess programming. I don't see people recommending only defining functions that accept single dimensional arrays of bytes (rather than strings and trees and hashmaps and multidimensional arrays and so on), even when programming in C.

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"

#105

Earlier 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...

I know - I was simplyfing a bit for dramatic effect.

Book looks interesting, will check it out.

Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

#106
post #66

Earlier 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.

I can't speak for laumars, but I would suggest there is a difference. Functions within languages generally work at a higher level of abstraction, even in C. If you wanted a grep like function for filtering an array of strings in your programming language of choice, would you define it to take a single string and predicate arguments, that is then split up on an arbitrary character, filtered, then joined back together again to return a single string? Or would you use a general purpose filter() function that takes an array and a predicate (function pointer/lambda/block/whatever) and returns a new array?

Re: "I couldn't really learn Erlang, 'cos it didn't exist, so I invented it"

#107
post #94

Earlier 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?

In any case it's not been the case in a while, so I stand corrected.

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"

#108
I have to say this made me feel better that I'm not a wizard in Clojure. If one could be said to be "in love" with a programming language, that would be where I am at with clojure in terms of feelings.

But 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"

#109
post #66

Earlier 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.

My issue largely about the scalability of pipes. They're ok for basic tasks, but not great for complicated routines:

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"

#110
post #5

For 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

Surely it's a piece of Arc doing that. I can't imagine time and time again somebody is wasting their time changing titles.

Perhaps the delay is from the software waiting for a good (low load) time to fetch the page.

Post reply on HN