Hacker News new | past | comments | ask | show | jobs | submit login
New chapter of Learn You Some Erlang (learnyousomeerlang.com)
80 points by telemachos on Sept 9, 2011 | hide | past | favorite | 11 comments



Author here. To be fair, there is one new chapter coming out every 4-5 weeks on average (for over 2 years now), depending on how fast or busy I am.

This one is on Relups and Appups, or a way to do hot-code loading and live software upgrades in a safe manner, hidden from race conditions and state changes. This is done using the OTP framework's release_handler. The process is a good bit messy, requiring some manual work that would benefit from being automated more.

However, this section of Erlang is hardly ever explained, so I attempted to make one effort into documenting it and its quirks for other fellow Erlang developers out there. Hopefully, Rebar and other tools will be able to build on that documentation to foster better relup abstraction layers, also making everyone else's work easier.

This safe way to do code upgrades is one of the feature that differentiates Erlang from many other languages when it comes to ad-hoc code updates. I've seen other languages do the equivalent of loading new code (reloading a module, calling eval() on a new version of the code, etc.), but I don't recall seeing many of these taking care of handling state change or race conditions on events the way Erlang/OTP does it.


The biggest problem for me, with Erlang, is that there just aren't a lot of great sources for documentation. There are even less (obvious) resources for learning the language from scratch. This new chapter helps a lot with both.


This was one of the reasons for me to write Learn You Some Erlang in the first place. All good information to learn the language had to be taken from books (which cost money, although there are very good books out there) or training courses (which cost even more money, but are a pretty good way to do things, especially for teams).

Most of the stuff on the official website is either rather short in content, or made as reference manual rather than a tutorial. I was hoping that LYSE would become the de-facto free learning guide out there for Erlang. And not just for the syntax and modules, but also for the general ideas of the languages, de-facto standards in the community, etc.


I think you've succeeded. It is the de-facto free learning guide for Erlang.


There is a lot of documentation of Erlang/OTP in the standard distribution and on the erlang.org site, both describing the various libraries and the philosophy behind OTP. Though I will freely admit that some of it can be difficult to find, especially in the beginning. And release handling and upgrades have been a bit of black magic, though that has improved now.


Two excellent books (O'Reilly, PragProg) and this site are great for beginners. The standard docs are very good once you are comfortable with the language. Great mailing list. I don't agree with your comment.


There are certainly resources out there to learn Erlang. I found it difficult to find those resources, it's possible that was due to user error (me). There wasn't anything immediately obvious that was the "best" way to get started, especially without committing to buying a book that might not be what I wanted.

Other languages do a much better job (IMHO) of helping you get your feet wet before committing further. If you want to learn javascript, you watch the Crockford videos. After a couple hours, you have a pretty good idea of what it's all about and if you want to spend more time learning it. Erlang didn't seem as accessible to me. That's not to say that there aren't resources available. They just aren't as immediately obvious as they could be.


However I found that 3rd party libraries often aren't very well documented. I found myself having to read the source more often that with other languages. Luckily though, Erlang is much easier to understand than those other languages.


Recently I had the pleasure of having the author come out and teach my colleagues and I some Erlang. It was a pretty crazy day, with limited power and internet (just after Irene), and we powered through. He did an excellent job. In one crazy day, he made Erlang fun, and I was able to grasp the power behind it.

I haven't had the opportunity to play around with it as much as I've wanted (I've just moved), but I'd highly recommend checking out his site, and reading further. He was incredibly knowledgable, and made learning enjoyable without being boring.


Oh, hi! I left on Tuesday morning (as you may know). I was wondering if the power ever came back on before you guys left.

Thanks for the nice comments too! Your group was pretty fantastic at that. Being motivated with the weird conditions for the day, even with some of you having flooded basements and whatnot. It was a pretty fun day.


Power came back about noon on Tuesday. That meant Tuesday morning was spent building bridges, trap shooting, and racing one another in go carts that we ended up crashing in practically every race. =)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: