Live data from Hacker News

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

erlang.org

81–90 of 183 posts

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

#81
post #53
post #28

Earlier quoted context omitted.

Python has closures, it just doesn't have a very convenient anonymous function syntax. I can't say I miss function () { .. } very often though.

I like Python's scoping rules but declaring functions inline is a lot nicer and nicer-looking than defining functions starting with underscores.

That is a false dichotomy. There are plenty of nice ways of working with closures with the given syntax.

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

#82
post #40
post #28

Earlier quoted context omitted.

Python has closures, it just doesn't have a very convenient anonymous function syntax. I can't say I miss function () { .. } very often though.

AFAIU Python's closure have been incomplete for a long time. I think they've become true, complete closures after the addition of the nonlocal keyword on 3.0 Please correct me if I'm mistaken. This all comes from a cursory research on the subject.

To my eyes they always were true and complete, but you had to play the minor trick of using mutable data to get them. Here is an example of what I mean that has worked forever.

  def outer ():
      counter = [0]
      def inner ():
          counter[0] += 1
          return counter[0]
      return inner

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

#83
post #57

Earlier quoted context omitted.

> What is it with people liking a specific language What is it with shaming people for preferring a specific language where it is applicable? For some reason I can like a brand of electric drill, and I can believe in using a nailgun, but I am not allowed to like a specific language without someone coming along to scold me. If you don't ever develop opinions about tools and how to use them, are you really engaged or a…

What is it with people missing the point so many times in a row? Hence why I said "learn how you can use languages together and for the right purpose"—but I don't believe it should be the primary focus. When you buy a drill, the main purpose is to make holes in things. When you buy a nailgun, the main purpose is to stick things together. One might do it better, one might do it faster, and yes, it's useful to know tho…

Beautiful comparison with photography and well said. And I would like to know the answer to this one: "What is it with people missing the point so many times in a row?" too. It's not like it's hard to understand or that there are few explanations out there.

I suspect many things and have many theories, but I'd be happy if someone concisely summarized different possible causes of such a behaviour of amateur programmers (and/or photographers). My "they're just noobs" doesn't cut it, because it may well be a description of effect and not the cause (I suspect it is).

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

#84
post #71

Earlier quoted context omitted.

"Today there is an unhealthy concentration on language and efficiency and NOT on how things fit together and protocols." -- Joe, two paragraphs below the point we're discussing.

I think you're being a little unfair there because he's talking about an " unhealthy concentration". Using a lower level language instead of a shell script for high performance scripts isn't unhealthy as it's not a case of just saving a negligible number of clock cycles. The difference I'm talking about like travelling to the moon and back just to buy a pint of milk. Case in point: no sane person would rewrite Apache…

I think you're reading a bit much into my intent from a comment that is really just a quote from the article.

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

#85

To me, this list is great except for one small thing. - C - Prolog - Erlang - Smalltalk - Javascript - Hakell / ML /OCaml - LISP/Scheme/Clojure Javascript?! Over Ruby or Python or Lua? What is it with people liking Javascript. I really don't get it. What can I do that is so beautiful or mindbending that I can't do in python? From my experience there is only two reasons to learn Javascript: to be able to build web app…

Argh. How could you read this post and still miss the point so badly? It is not about languages, it is about ideas . And the fact that you need years to master each of these languages because of ideas they are built upon, not because of such trivial things as syntax. I strongly suspect that Joe would be equally comfortable with this list was C substituted with Go, Smalltalk substituted with Io or JavaScript substitut…

I was going to post something similar in reply - but your comment is just so much better and more polite than I would have posted!

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

#86

To me, this list is great except for one small thing. - C - Prolog - Erlang - Smalltalk - Javascript - Hakell / ML /OCaml - LISP/Scheme/Clojure Javascript?! Over Ruby or Python or Lua? What is it with people liking Javascript. I really don't get it. What can I do that is so beautiful or mindbending that I can't do in python? From my experience there is only two reasons to learn Javascript: to be able to build web app…

JavaScript is the best-to-learn (both most currently used and arguably best developed) member of the Self-style prototype-based OO languages. Thus, for a breadth-oriented education in programming concepts that helps you understand the available tools, where you've already learned Smalltalk and C, it has a lot more distinct to offer than Ruby or Python. This is independent of whether it is a better language that Ruby or Python or Lua for general industrial use (which, in practice, tends to end up being an issue more driven by the availability, accessibility, and level of support for libraries for currently-important tasks rather than intrinsic features of the language itself.)

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

#87
post #82
post #40

Earlier quoted context omitted.

AFAIU Python's closure have been incomplete for a long time. I think they've become true, complete closures after the addition of the nonlocal keyword on 3.0 Please correct me if I'm mistaken. This all comes from a cursory research on the subject.

To my eyes they always were true and complete, but you had to play the minor trick of using mutable data to get them. Here is an example of what I mean that has worked forever. def outer (): counter = [0] def inner (): counter[0] += 1 return counter[0] return inner

I think I heard that this wasn't working around 2.0 or earlier... but I'm not curious enough to go research and I wasn't using Python until 2.4. Can you maybe confirm or deny this?

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

#88
post #71

Earlier quoted context omitted.

I think you're being a little unfair there because he's talking about an " unhealthy concentration". Using a lower level language instead of a shell script for high performance scripts isn't unhealthy as it's not a case of just saving a negligible number of clock cycles. The difference I'm talking about like travelling to the moon and back just to buy a pint of milk. Case in point: no sane person would rewrite Apache…

I think you're reading a bit much into my intent from a comment that is really just a quote from the article.

It seems a little odd to specifically single out my post about efficiency with a quote about efficiency if your intent wasn't to address my point.

So if I am reading too much into your post, then what was the intent?

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

#89
post #66
post #55

Earlier quoted context omitted.

He doesn't mean literally the "|" in bash, he means the general concept.

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"

#90
post #66
post #55

Earlier quoted context omitted.

He doesn't mean literally the "|" in bash, he means the general concept.

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…

Note that that example isn't given as an example of what would be ideal, but as a sign of the sad state of tools to fit things together that it is the best available.
Post reply on HN