Live data from Hacker News

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

erlang.org

111–120 of 183 posts

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

#111
post #82

Earlier quoted context omitted.

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?

I've never heard that. I also did not use Python until 2.4.

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

#112
post #88

Earlier quoted context omitted.

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?

I'm sorry; I wasn't trying to bludgeon you with Joe's words. Looking back it is clear that I did and I should have added some exposition of my own. However, my goal was to see more about where you draw the line, and I think you did answer that, so thanks.

Ahh I understand.

Thank you for the clarification :)

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

#113
post #16

Earlier quoted context omitted.

Javascript has some unique concepts, while Ruby or Pyton are just mix of features also present in Smalltalk or LISP. So learning Ruby has no added value if you already know those.

Python also borrowed some good stuff from Icon. Not that many folks here have actually used Icon, but it was fun to compile and play with back in the day.

Icon was my secret weapon in college. I think python only took generators.

I'd love to see a language take its backtracking feature.

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

#114
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?

Isn't the modern equivalent JSON over a REST API?

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

#115
post #24

Earlier quoted context omitted.

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 byt…

Unix pipes are effectively the same thing as using text streams in C.

Granted not quite the same thing, but raw bits are often used in lower level languages. Take Windows Win32 APIs, there's a lot of instances where styles are defined by adding constants with values being exponentials of 2. Thus creating a binary array of boolean states.

Another example I used to run into was Windows' controller (joystick et al) API (again Win32). Each bit would represent a different controller button and the 'on' state was if the button was depressed. But as the value was returned as an unsigned long int (if memory serves), it was up to the developer to write their own parser to convert what would otherwise been a random number into a meaningful array of bits. (or at least I did - there is a chance I overlooked another function as this was before I made the switch to DirectX6 - so many years ago!)

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

#116
post #12

Just for a moment, consider who this man is and what he has done. We would all do well to take a step back and consider his manner of response. Notice that he continued learning new languages after creating Erlang (instead of just evangelizing it at the one true language). He did not immediately say "choose these three languages" as if they were the only ones you could possibly learn. Does it really help our professi…

I'm just (re)learning to code after doing a bit in college (c/c++), currently learning Ruby (and Rails). As a regular reader of HN, I see posts about how great Erlang is, Scala, Haskell, Python, etc. And they do seem to be great languages. And I want to learn them. But as the author points out (and as I have come to realize), regardless of my desire to learn all these things (right now!), it would almost seem fruitle…

The advantage of programming long enough is that your 'primary' language changes several times, and each time you get less zealoty about it.

Having learned a bunch of languages myself i would recommend beginners to learn a language thoroughly before moving on. Otherwise you don't assimilate the style of a language and end up writing fortran in c, or c in c++. The qualitative differences between languages don't become obvious until you understand why their common style is what it is.

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

#117
post #116

Earlier quoted context omitted.

I'm just (re)learning to code after doing a bit in college (c/c++), currently learning Ruby (and Rails). As a regular reader of HN, I see posts about how great Erlang is, Scala, Haskell, Python, etc. And they do seem to be great languages. And I want to learn them. But as the author points out (and as I have come to realize), regardless of my desire to learn all these things (right now!), it would almost seem fruitle…

The advantage of programming long enough is that your 'primary' language changes several times, and each time you get less zealoty about it. Having learned a bunch of languages myself i would recommend beginners to learn a language thoroughly before moving on. Otherwise you don't assimilate the style of a language and end up writing fortran in c, or c in c++. The qualitative differences between languages don't become…

Makes sense.

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

#118
What is most interesting here is the ideas about protocols and communication. To me, that's what much of software development is getting wrong both on the small and on the big.

In a single app, objects should talk to each other and databases and queues and junk via protocols, not by being glued to an ORM or a particular implementation of a queue or whatever. Most devs don't do this because it's more work, but you end up with a much cleaner/more testable structure to work with.

On a higher level, many/most programs aren't made to communicate with each other at all. Look at web software, it's all about communicating with a browser and that's it. The API driven movement is helping things along, but it's still a HTTP Browser driven mindset complete with holy wars about REST/Hypermedia.

Unix pipes are a great example of what is possible with standard communication protocols, but it seems like it could be taken further. What if you could pipe a stream of API's together? Yahoo's YQL and Pipes plays in this realm, but you still have to kind of glue pieces together yourself.

Imagine if you could say...

fb search --name 'John Doe' --location 'Chicago, IL' | linkedin --filter 'Ruby Programmer' | twitter tweet 'Hey check out our ruby meetup next week'

That's a somewhat contrived example, but it would be great if we could do something that simple and not just via a command line, but from any language in a similar amount of code. That would be a step forward I think.

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

#119
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?

Isn't the modern equivalent JSON over a REST API?

That's only for web applications though. I'd like it if Unix utilities optionally output and accepted JSON or a similar syntax. It'd make things so much easier.

http://theatticlight.net/posts/Why-cant-we-do-pipes-smarter/

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

#120

Earlier quoted context omitted.

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

This is amazingly both of the above points

1. A clear and succinct citicism directed at the failings of a language in technical terms

2. Attacking a maker and telling them not to make stuff.

However.

Like Stallman, we take the rough with the smooth with Torvalds. Some people earn it.

Post reply on HN