Twelfth Friday Refined Rant

Tagged as Erlang, Programming Languages

Written on 2007-08-10 04:46:06

Okay, so my earlier post was a bit "La la la la. Look at all this crazy stuff I read today! Isn't it awesome?" and to be honest that's just not a critical enough take on everything. I mean, all that stuff I posted made me smile but that doesn't necessarily mean I should wave it in the air. With that in mind, I'd like to take a more serious look at the trends in those links and try to really address the issues that surround them. That's fairly challenging because these issues involve governance and law, technology and society, and plenty more. So I've decided since I'm not doing Linux Lessons I might as well do Steve Yegge-style rants. Just with much poorer writing, significantly less insight, and half as much alcohol. I'm by no means hammered. These will normally be on Fridays and this one was going to be on Friday but it's running a little late.

The Links
So, I posted about a lot of stuff. Web 2.0 and some of the associated blather about how open source addresses that through either Online Desktop or Open Services. Peer Production being supported by institutions/firms with examples of Wikipedia and Google Maps. The future of IT generally. Infrastructure challenges for the 21st century with regards to the internet and it's effects on business. Emerging worlds and the diminishing line between the virtual and the real. And some of the worldchanging issues, poverty, sustainability, climate change, political upheaval, etc. What can we really say about any of this? More importantly, what can we really take away from all those little blog snippets and links?

The Issues
There are a few things that I really take away. First of all there are a bunch of "World Issues". Things like Climate Change/Global Warming and the Energy Crisis, Developing Economies, Squatter Cities, and plenty else besides. I'm trying to get more informed on these fronts but right now the issues I can speak to tend to be technology issues rather than "World Issues". It's important to note that technology issues are a "World Issue" or are at least intertwined with "World Issues" when taken collectively. Technology has become too central a part of the modern world for technology's issues to not have vast repercussions. With that in mind I'd like to speak a bit more about what I can speak to, namely technology's issues. Specifically computing.

The Technology Issues
There are a few central issues or trends that jump out at me from what I posted the other day. One is that we are undoubtedly moving away from the desktop. However slowly, however gradually, it's happening. I don't know if the desktop will ever go away completely but it's diminishing in significance. Between PDAs and Smartphones, Laptops, Home Theater and Small Form Factor PCs, Amazon's Hardware as a Service efforts, and others the desktop market will continue to gradually erode. Second, we have a programming problem, specifically concurrency. This is emerging because everything is going massively parallel on both the local and network level. Between the rise of Multicore processors and the web services and datacenters popping up all over the place I'm convinced we need a better way to program for these sorts of systems. Third, Peer Production is making a big difference and this goes beyond software in many respects. There's a lot more to cover there so that's all I'll say for now. Fourth, the Law, Intellectual Property Law in particular, has a long way to go before it supports peer production models well. Our traditional notions of ownership and control are insufficient in the face of these new methods and as Steven Weber so elegantly described towards the close of The Success of Open Source we're going to have to find a way to bridge the gap there. Finally, I think it's important to note that there is a certain infrastructure that's critical today for technology to continue to operate in it's present fashion. We need energy and the electric grid, the telecommunications network, and the hardware and software stacks that make modern computing possible. For today, I'm mostly interested in covering the concurrency problem but next week I expect to write a bit about the infrastructure/stack and the gradual erosion of the desktop's significance.

The Concurrency Problem
Dijkstra was wrong, at least about concurrency, not that I blame him. I mean didn't he do concurrency research thirty years ago? For that matter, Simon Peyton-Jones is wrong too. Software Transactional Memory may in fact be the right solution but it's the solution to the wrong problem. Trying to figure out how to share state this way is a disaster. The only concurrency model I've seen that I think is at all valid is Erlang's message passing model. We need concurrency that is implicit. The most you should have to do is change a few "map"s to "pmap"s. That's it. I don't think Erlang is NBL. The syntax isn't too crazy but it's not C/Java-like enough either. The language generally is too much of a departure and not enough of an industry figure to really make it big besides. I'm not saying it doesn't have other problems I just feel like those are the ones that are going to hold it back. Could Haskell be more successful than Erlang? Well, first of all I'd have to come up with a good definition of success for programming languages. But excepting that I think the answer is yes. Hell, maybe Haskell is NBL and we'll struggle with shared state for another 30 years. I'm hoping for something a bit more drastic though. And Erlang isn't good enough. But it's the only thing I've seen that can solve the concurrency problem and that does appear to be the most prominent problem in programming from where I'm sitting. Does that mean we should have an OS written in Erlang and future applications should be written in Erlang? Do we need compositing window managers written in Erlang? Not necessarily. I suspect the desktop will be largely composed of C, C++, Python, etc for a good few years to come and probably longer, assuming the desktop sticks around another decade. That's a topic for another rant though.

The Punchline
What I'd really like to express is that I think that The Concurrency Problem is first and foremost a language problem. We need a language that makes concurrency implicit and easy. Concurrency needs to be assumed. Erlang is the only language I've seen that does that well. Whether or not something equivalent could be done with a non-message passing model such as Software Transactional Memory I don't know. Haskell may already scale from a single core system to a massively distributed or concurrent system with little or no changes to the code using a STM model. I'm not well read enough yet to know for sure. I don't think that we need to start over and re-write the OS, or desktop applications, or anything else for that matter. We need to be able to use the tools we already have. That doesn't mean that we might not benefit from parallelizing what we can but it's not our first priority. I don't believe that concurrency will be solved by getting the OS to handle threads or finding a framework or method to easily add concurrency to applications using current languages. Erlang isn't perfect either and ultimately not everything needs to be parallelized so Erlang has by no means invalidated C, Python, Ruby, Perl, Java, etc. It's just the best answer I see for one of the biggest problems programming has got.
comments powered by Disqus

Unless otherwise credited all material Creative Commons License by Brit Butler