Ulf WigerFeuerlabs Inc - @uwiger - ulf (at) feuerlabs.com2010-11-12T05:21:26Zhttp://ulf.wiger.net/weblog/feed/atom/WordPressUlf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1922010-11-12T05:21:26Z2010-11-12T05:21:26ZFinishing up a whirlwind tour of the US West coast (QCon SF, Erlang Factory Lite LA, and a Cognitive Modeling workshop in Scottsdale), I am now waiting for a delayed BA flight at the Phoenix airport. Although I’ve spent as many days flying as I have on US soil, it’s been a great trip.

Still, I can’t wait to get home and spend some time with the family. Soon, I’m off again. This time to Australia and YOW 2010. I will give a talk on Erlang, and also give two one-day tutorials on Erlang and OTP. I hope to see many new faces there. Come loaded with your trickiest questions, and I will do my best to answer them.

Gearing up for the experience Down Under, I joined my brothers in forming a Movember team. Movember is a great Australian initiative to raise funds funds and awareness for men’s health, specifically prostate cancer and depression in men. All you have to do is to grow a mustache during the month of November, and invite friends to make a donation (clicking that link, you can also judge how my mo is coming along).

]]>1Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1842010-04-07T08:16:01Z2010-04-05T11:00:07ZBjarne Däcker, who has been tracking download and web site statistics on erlang.org for years, just produced a new graphic.

Visits to http://www.erlang.org up to March 2010

For years, the erlang.org graph has been nicely exponential. This latest peak seems to break the pattern. It will be interesting to see what follows.

(Update: Looking closer at the graph, it appears to stretch as far as to March 2010. I changed the caption, but left the URL unchanged.)

(Update 2: Closer inspection suggests that this is indeed measurement error. Google analytics, which also takes mirrors into account, reports a steady, but decidedly less dramatic, rise. The number of visitors to erlang.org is now at ca 80,000/month, up from ca 57,000/month in September 2008.)

]]>2Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1802010-01-06T16:01:40Z2010-01-06T16:01:40ZI will be hosting the “Concurrency Challenge” track at QCon 2010. The speakers list is now ready with all titles and abstracts in place.

I am quite pleased with the mix and the dignity of the speakers. One of the things we wanted to highlight is that there is no one-size-fits-all concurrency model, and it’s time for us to start being a little bit more specific about what kind of concurrency we have in mind.

Each setting brings its own set of challenges, and in this track, you can expect to get a good orientation from some brilliant people, who know how to tell a story and are not afraid of offering their opinion.

]]>1Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1762009-11-07T14:43:11Z2009-11-07T14:43:11ZI made a quick stop at Øredev in Malmö on Friday Nov 6.
It seemed like it would have been a fun place to spend the week, but alas I was too busy to do more than just come in, give my talk, and go home again (getting up 4am London time to make it in time…) I did manage to catch Stuart Halloway’s talk on Clojure and had some good discussions.

]]>3Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1682009-10-12T15:03:46Z2009-10-12T15:03:46ZAbout a month to go now to the 15th Erlang User Conference in Stockholm.
For the first time ever, the conference is arranged by someone other than Ericsson, namely Erlang Training and Consulting Ltd. In fact, it is also the first time since 1998 that the conference is held outside Ericsson premises. Then, it was held at Van der Nootska Palatset for reasons I no longer recall (I guess we wanted to spice it up a little).

This year, it will be at the Astoria in the center of Stockholm. The reason this time is clear: the EUC has outgrown the largest lecture halls at Ericsson. With a month to go, we have more than 200 registered participants, and we are now investigating what the maximum capacity of the Astoria is, to see how many more we can squeeze in.

Another difference this year is that the speaker roster filled up in no time! We now have 14 talks, which is a busy program for a one-day conference! You have every chance to make EUC week an intense learning experience, with courses on Nov 9-11, the EUC on the 12th and on the 13th either a hackathon hosted by Klarna or ProTest tutorials in Älvsjö south of Stockholm. Add to this the chance to meet people like Tom Preston-Werner, founder of Github, Rusty Klophaus, father of Nitrogen, and the members of the Erlang/OTP development team.

]]>0Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1612009-10-08T11:36:42Z2009-10-07T17:43:36ZI had the pleasure of being invited to sit on the Expert Panel in the Concurrency Challenge Track at JAOO 2009 in Aarhus. JAOO is an impressive event, and the venue was very pleasant. Unfortunately, I didn’t have time to experience the surroundings or indeed the conference, except for the Concurrency track.

I did catch Simon Peyton Jones’ keynote speech in the morning. Simon is always entertaining, and as part of my background project to learn Haskell through osmosis, I wouldn’t miss a talk on Haskell type classes.

A large music auditorium is not the best for technical talks, though. I have had the experience of singing on such a stage, in which case the blinding spotlights can even have a focussing and reassuring effect. But for a technical talk, you really want to see the audience and sense whether they understand you. When singing you can’t well stop and ask ‘are you with me so far?’, so it’s better to just press on and do your thing – not always the right strategy for a tech talk. Simon, being a master of the podium, simply walked to the edge of the stage, shaded his eyes and asked the audience to wave as evidence that they understood. You don’t just learn Haskell when he is talking.

Brian Goetz gave the obligatory “Free lunch is over” talk, explaining the reasons behind the current multicore trend. I’ll admit that I haven’t been to that many commercial conferences, but my former employer Ericsson had both the foresight and resources to arrange many seminars over the years, inviting leading experts from Sun, Intel, SICS et al, to ensure that every software developer in the company got the message loud and clear. I assume that many have been exposed to similar indoctrination. But it is necessary, and most of all interesting – at least to all who thrive on challenge and new opportunities. Brian kept a good pace, making sure to repeat the key points regularly to make sure they sunk in.

Kresten and Dave played tag and gave an overview of actor-style modeling. Kresten managed to demo how awkward (albeit doable) it is to work with actors without appropriate syntax, and how nicely it could be formulated with the right syntax. An important point, I think, as I firmly believe that we tend to be much more affected by the mental cues built into the language syntax than we perhaps realise. I overheard parts of a discussion at breakfast about whether languages should “lecture us” on the best way to write software, or whether it should simply get out of our way as much as possible. I personally prefer opinionated languages, and my experience with use of Erlang (a very opinionated language) in large commercial projects has reinforced that view.

Dave accounted for some of his experiences with modeling concurrency with actors, drawing on human analogies. I grew fond of this style of modeling while working with Command & Control systems in Alaska. It’s tempting when trying to automate something to become a bit too theoretical and conceive strategies that look nothing like what humans would choose if solving the problem manually. My mentor back then, Col John (Shep) Shepherd, was a retired Air Force Colonel, former fighter pilot and AWACS Commander. He had no training on computers, but knew exactly what he wanted from a Command and Control system. And, like most who have not only trained for, but also seen combat, he had a fairly dramatic view on the consequences of failing to meet the requirements. Simple and intuitive strategies were favoured over the esotheric, and the results were nothing less than astounding.

Dave also mentioned a background in Command and Control, but we didn’t have time to compare notes in this regard. Some other time, maybe…

I will not say much about the panel, but the main criticism seems to have been that we did not disagree enough. Perhaps a few die-hard C++ and threading experts would have spiced it up a little? As it was, all members of the panel were advocates of functional programming and immutable data.

The afternoon session continued with Rich Hickey talking about Clojure’s strategy for handling values that change over time. A very well thought-out lecture with some very important lessons. Talking to some members of the Clojure Users’ Group in Denmark, it appears as if Rich’s approach works very nicely in practice too.

Simon Peyton-Jones ended the track with a talk on nested data parallelism in Haskell – one of his favourite research projects. A great talk. In the words of Ola Bini: “Neat, geeky stuff.”

]]>0Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1442009-05-29T13:17:53Z2009-05-29T13:17:53ZI’ve had time to digest the impressions from the Bay Area Erlang Factory, and now it is time for the London version.

University: June 22nd – June 24th
Conference: June 25th – June 26th

It was quite a thrill to sense the energy of the Erlang community in the U.S. When Americans grab hold of something, they don’t do it by half. Being part of the “old guard”, as someone put it, I find it extremely refreshing that people pick up Erlang simply because they think it’s a great tool, supported by a great community. I’m certain we’re only seeing the beginning of what looks to be a fun ride.

Those of you who couldn’t come to Palo Alto, please sign up for the Factory in London. It is going to be a great conference.

Kenneth Lundin, head of the Erlang/OTP team, will be there – a rare chance to get the information straight from the source, and to offer feedback in return.

I am also eager to listen to keynote speaker Simon Peyton-Jones, talking about the two childhood friends, Haskell and Erlang. Simon is a great speaker, and one of the great thought leaders of the functional programming community.

]]>0Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1252009-03-20T09:00:43Z2009-03-20T09:00:43ZQCon.]]>I had great fun at QCon. This was one of my first “commercial” conferences – I’ve mainly frequented research conferences like ICFP and POPL before, partly because Erlang has enjoyed little commercial interest in the past.

This time, I was preceded by Rich Hickey’s talk on Persistent Data Structures and Managed References in Clojure. I was greatly intrigued by this talk and made a note to take a closer look at Clojure. Interestingly, Rich stressed that Clojure Agents are not actors a la Scala or Erlang. Part of my talk was to illustrate how Erlang processes are not “fibers”, and trying to use them for data-parallel algorithms can be problematic. Nice setup.

Friday ended with a few quick beers with Rich, Steve, Paul and Joe Armstrong, and then dinner at Francesco and Alison’s with Joe and Steve. Francesco is a great cook!

(Didn’t notice that Paul was taking pictures though. Judging by the angles, he was shooting from the hip…)

]]>1Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1172009-03-15T10:49:09Z2009-03-15T10:49:09ZACM SIGPLAN Erlang Workshop in Tallinn 2005. It was called "Sourdough and Erlang", and as much as I would like to flatter myself by calling it "prophetic", I'm sure it would just tempt others who were there to propose some other, more fitting descriptions.]]>A major Swedish newspaper had a feature about sourdough today. Apparently, it’s becoming quite popular, with more and more small bakeries selling exclusive sourdough bread and giving courses on how to make your own sourdough.

Just having returned home from QCon in London, where there were some great talks about, and significant interest in, functional programming, I’m reminded of my own keynote from the ACM SIGPLAN Erlang Workshop in Tallinn 2005. It was called “Sourdough and Erlang”, and as much as I would like to flatter myself by calling it “prophetic”, I’m sure it would just tempt others who were there to propose some other, more fitting descriptions. I feel this is as good a time as any to finally release the slides. Perhaps it’s at least good for a few laughs. I still think that “stalking the wild yeast” is an outstanding metaphore for creative software development, though…

]]>0Ulf Wigerhttp://www.wiger.nethttp://ulf.wiger.net/weblog/?p=1052009-03-10T10:08:23Z2009-03-10T09:36:08ZEvery once in a while, my thoughts touch upon erlhive. While it may seem that the project isn’t going anywhere, I’m still pretty comfortable with it. It’s not as if I started it for the money, anyway, and the problems it addresses are real and interesting.

Someone mentioned to me that erlhive had been dismissed in a discussion with the argument the benefits are not worth a throughput of 50 pages per second.

I’m not sure where the 50 pages per second comes from, and in honesty, I’ve cared so little about performance that I haven’t benchmarked it myself. So, just to satisfy my curiosity, I ran a little speed test…

I chose to benchmark only the blog back-end, partly because erlhive (oddly enough for a “web framework”) doesn’t really have any web front-end yet. However, the back-end does have a functional API, and the front-end part can be made arbitrarily fast or slow, depending on context anyway.

Clocking this with timer:tc() in coLinux/Vista on my 2.17GHz dual-core Pentium laptop (not using SMP erlang, though), I achieve 1450 article fetches/second. That’s a lot better than I had expected. Erlhive, apparently, is not so slow after all.

To explain what the above does, I assume that the surrounding web framework has authenticated the user (<<“user1″>> in this case), and that there exists an article 1 in blog 1 of the user. All objects in erlhive can be given user-defined properties, so coming up with more creative names is perfectly possible. However, the blog example uses the following naming convention:

[blogs,User,N] to identify a blog

[ba,User,BlogN,ArticleN] to identify an article

[bc,User,Blog,ArticleN,CommentN] to identify a comment

The call, erlhive:with_user(User, Fun) starts a database transaction, verifies that User is a known erlhive user, and creates an “access record” in the form of a parameterized module M. The user-provided fun is called with Fun(M), and through the module M, the whole erlhive API is available. Any function called through M (e.g. using M:apply(Mod,Func,Args)) is subject to erlhive’s access control. Of course, anything else in Fun/1 is still ordinary Erlang, and can be as “dirty” as you like. M is the entry point to erlhive, and erlhive:with_user/2 creates the transaction context.

The first call, to erlhive.blog.flexiblog:string_to_id(“ba/user1/1/1″), simply translates a web-friendly identifier to the internal form, [ba,<<“user1″>>,1,1]. The second call, to erlhive.blog.flexiblog:read_article(Id), performs the following steps:

Checks that the blog, [blogs,<<“user1″>>,1] exists and that the current user (<<“user1″>> in this case) has read access to it.

Reads the properties of the article, and verifies that the current user is authorized to perform the requested operation.

Returns the property list associated with the article. The actual article content is also a property, tagged ‘content’.

The blog example is reasonably clever for a blog module. It allows users to be categorized as ‘admin’, ‘author’, ‘reviewer’ and ‘reader’. A reviewer can read and comment on an article before it has been published. You can list blogs and articles by property – all properties are automatically indexed, and you can also clone an article, as a form of revision handling. It is also possible to view previous/next in a revision succession.

There is also a short text file that illustrates the blog interface through the interactive erlhive shell. Not exactly stellar documentation, but if I get some indication that there are potential users out there, I promise that it will improve.

BTW, in the course of this experiment, I noticed that the interactive shell was broken, and that the read_article/1 function actually didn’t exist. Bug fixes have been committed to the repository. I never did promise that it was production-quality, did I?