Found 1 entry.
I started learning Erlang today and already I'm liking it.
For a couple of months I have said that I will learn Erlang and finally I've started.
Firstly, I'll tell you why I started today (apart from the bad weather) and why I want to learn Erlang, and secondly I'll tell you my thoughts on the language so far.
The reason I started today is because of a culmination of a number of things. Recently I have been playing with all the AWS components S3, EC2, SimpleDB and SQS. Playing with them in Perl has been a good experience and now I know what's required to make it work - by this, I'm not talking about just querying them and seeing the results, I'm talking about a big project with the ability to scale out once demand gets high.
So my plan is to get a project up and running on EC2, using all of S3, SimpleDB and SQS and to make sure everything is massively parrallel.
Erlang fits into all this because it's a good idea to try and do it correctly from the start. It almost seems weird to think of using Perl to run something like this. Also, I really want to learn something new and out of all the languages that have tried to get my attention in the past number of years, none have gripped me and certainly none as much or as quickly as Erlang has.
I notice that Erlang already has a few web servers which can be used as well as lots of other freely available libraries. Amazon also uses Erlang behind the scenes for SimpleDB itself - no coincidence I'm sure. So overall, a culmination of wanting to do a project, use a massively scaleable architecture and learn a new language have all come together at exactly the same time.
So far, I'm really enjoying it. I have learnt a shedload already and I can feel a lot of information sinking into the old grey matter. At first, I looked at some of the syntax and just shook my head but as always, once you start, it just begins to make sense.
In reality, I've done a little bit of Lisp and Scheme in the dim and distant past and so far I haven't actually seen that much which is new to me (though I'm sure that's to come). Obviously Erlang borrowed heavily from Lisp though which helps me understand some of the weirder parts of the language. All the power that recursion, passing functions or returning functions from functions isn't phasing me since it's made sense to me for a while. Also, being able to build the language up is another helpful thing you get if you really need it.
(I've always said that Lisp is the next big language but not in it's current form. All the other languages are just re-implementing certain parts of Lisp as they see fit - 40 years late. Erlang has already done that AND put it inside a concurrent environment too.)
The fact that variables don't change kinda struck me as weird but again once you start making functions and calling them, you almost forget that you can't re-assign to variables any more - it's just not something you really want to do anyway (much like you don't use (let ...) much in Lisp). It's all about the functions!
One thing that is new to me is the whole message passing thing. I also cottoned onto the fact that objects and variables are replaced with processes and that's where all the magic is.
Already I have created libraries, functions with different arity, tail-recursive functions, played with tuples, retrieved a web-page (learning about receive) and even had my own chat room and simulated a number of users all talking to each other.
There seems to be a lot of really clever people doing Erlang at the moment and it's definitely a great time for it to flourish. Having huge resources like at Amazon AWS and multi-core processors getting constantly bigger, now is the time for a language to step up to the concurrency plate.
So all in all a very productive day. I think I have the basics of the language sorted - in reality there's not much there - but now I'll need to sit down and fully work through more of the other concepts it introduces.
It certainly needs a different thinking cap to anything else I've used and that's going to be both an interesting challenge and a bit of an adventure.
Labels: planet-geek, planet-catalyst, cop, aws, erlang
Inserted: 2008-03-03 00:12 (2 years, 6 months ago)