It’s great to be coding again, after spending so long lost in thought and theory. This has been my longest break from programming since I started at 13. I now have a working virtual machine that supports the essential semantics of the language. The next step is a compiler. The good thing about having a long break from programming is that it made the experience of starting up again quite vivid. What was most vivid was the many ways I make programming needlessly harder for myself. Read More
My experiment with Scala is not working out. It’s just not ready for prime time, and is overkill for my needs. Reluctantly, I am falling back to Java. Read More
Programming is deeply disappointing. We continually fail to live up to our own expectations, more so than any other form of engineering or craft. And it’s not getting much better. The lack of any substantial progress is the most disappointing thing of all. Worst of all: it is our own fault.
The history of programming languages is depressing. Generally worse is better. Socio-economic factors dominate. But there seems to be one giant exception: Ruby & Rails. I haven’t studied them deeply, but they look like really good work that has succeeded on its merits. Ruby is a tastefully designed language with a coherent philosophy of making programming easy and fun. Rails righteously smites the bloated complexity of the Big Java web frameworks. Gotta love it. So how did it win? This undermines my entire cynical world view. Can anyone explain how it went down?
Update: note the obstacles. Ruby had dubious performance. It was developed in Japan, doc translation from Japanese was incomplete and laggy, the dev lists were largely in Japanese. Scripting languages were not considered suitable for large-scale applications. Ruby was not used for a lot of server-side programming. Rails took away many checklist features that people thought they needed. People had already built cool web frameworks in LISP and Smalltalk without anyone much caring. What fortuitous combination of factors allowed Ruby&Rails to succeed? How important was the DHH cult of personality? I’m guessing a lot.
As an experiment, I am announcing new blog posts on my twitter feed @jonathoda. I am also going to try tweeting pearls of programming wisdom that I find. Feedback welcome.
Should collection/sequence/array indices start with zero or one? Most current languages choose zero. For flux, I am choosing one. This choice is orthogonal, meaning that I can easily change it if it turns out to be wrong. The reason to discuss such a trivial issue is that it is an example of how choices that made sense in the early days of programming need to be reexamined. It also frames some principles of language design: Abstract Datatypes, and Conservatism.
Hey, long time. Having a snow day here, which is a good day to catch up. My son got sick this summer, which knocked me out of commission for a while, but I am back to work now. As promised last June, I have defined the formal semantics of a core language that captures the key ideas of side-effects in a tree-structured heap without sequential programming. I have formulated confluence and soundness theorems that seem plausible (though I haven’t tried to prove them). So I don’t think it will collapse under me like Coherence did. One of the next steps is to build a reasonably usable textual syntax that can be compiled into the core language. By reasonably usable, I mean usable for expressing small examples up to a hundred lines of code, which is the minimum I need to communicate the idea to others. The working title of the language is flux.
Here. I actually haven’t watched it yet because it is just too freaky to see myself on video. I’ll wait till Edward Norton plays me in the movie version.
I meant to write this earlier, but I have been occupied with a family medical emergency. The EL camp was a great experience, and I hope they do it again. I met more interesting people, and heard more interesting ideas, than at any other conference I have attended. Naturally there were ups and downs. There were some me-too languages with no purpose other than to entertain and glorify the author. But there were also quite a few serious efforts to try out new ideas and advance the state of the art. I would like to thank the organizers, Alex Payne and Brady Forrest, for perceiving the need and making this event happen. Read More
The biggest problem with programming is that we don’t agree on what the problem is. The comments on the previous posts reveal fundamentally incompatible views. I am equally shocked by the opinions held by some distinguished academics and leading practitioners. Our views of programming are so at odds that it’s almost as if we were from different planets. Wait – that’s it! It all makes sense now… Read More
Reflecting upon my previous post, I am wondering why LISP triumphalists like Paul Graham annoy me so much? Perhaps it is because I used to be one myself, in spirit if not in syntax. And also because I now see them as a major symptom of what ails programming. Read More
I just read yet another recycling of the old myth of how some esoteric programming language (often Lisp or Haskell) is the secret weapon that allowed a team to outperform expectations by an order of magnitude. Paul Graham has strongly encouraged this myth (see Beating the Averages), but it has been circulating for ages. It is totally false. Worse, it reinforces the intellectual elitism that is the bane of our field. Read More
Much has been written lately about Apple restricting iPhone and iPad apps to only use Apple programming languages and libraries. This is indeed an alarming development for the future of programming.
Opinion is split as to whether this decision shows Steve Jobs to be a visionary hero seeking only to improve the quality of the user experience, or that he is a megalomaniac Fascist. But I think people are missing what this is really about. It’s about the money. The Ad money.
App Ads are potentially a Google-scale cash flow, and Jobs wants it. He wants to sell ads and inject them into apps on the iPhone/iPad/iDesk, just like Google injects ads into web pages. He can’t do that unless all the apps are using his libraries. If he lets Flash apps in, then Adobe would be able to sell the ads instead. That is why section 3.3.9 of the new developer agreement says “the use of third party software in Your Application to collect and send Device Data to a third party for processing or analysis is expressly prohibited”. Like, for example, Ad networks.
Help me, Google; you’re my only hope.
Abstract for my talk at Emerging Languages Camp:
We cannot evolve beyond imperative programming until we solve the problem of coordinating changes to state. Functional programming and transactions segregate the problem, but don’t solve it. I am exploring a new kind of language, inspired by modern “Model-View-Binding” application frameworks. The language uses bidirectional data binding as its fundamental mechanism, generalized into arbitrary change-triggered actions. Bindings propagate changes coherently: execution order is determined automatically based on the interdependencies between bindings. The programmer does not have to worry about execution order. A side benefit is the automatic discovery of parallelism. Unfortunately coherence doesn’t work in a conventional heap of objects with arbitrary dynamic pointers to each other. I propose a data model in which objects and collections of objects are nested to form trees. Pointers are replaced with cursors constrained within a collection. This richer structure permits coherent and deterministic execution of bindings. Coherent binding offers the simplicity of declarative programming while maintaining complex dynamic state.
Comments? The idea is to use data binding as a metaphor that many programmers are already familiar with. Can I assume people will get what “Model-View-Binding” is, even though I just invented the term?
Per Vognsen suggests a Haskell version of the damage function from my Schematic Tables talk:
data Attack = Magic | Melee hit surprise defense attack = damage where effectiveness = power * (if surprise then 3 else 2) (power, damage) = case attack of Magic -> (5, max 0 (effectiveness - defense)) Melee -> (4, 2 * effectiveness / defense)
This passes pairs of values (power, damage) through conditionals. That allows the conditionals to multiplex more than one value, rather than being repeated. I suspect I could stymie that approach with more complex data flows, but I am happy to acknowledge that Haskell does OK on this example. Thanks, Per.
I have been invited to the Emerging Languages Camp. Sounds like fun. Let’s meet up.
Check out the cool demo of Code Bubbles. This is some very nice, fresh thinking. As Gilad Bracha says, standard IDE’s look like the console of a B-52. I look forward to reading the details, which they are embargoing until their papers are presented. I wonder what UI they used? I see zooming, transparent overlays, and animation. I am guessing Silverlight.
The last several months I have been trying to make coherence deterministic, using what PL theoreticians call a type and effect system. The effect system is telling me to return to the tree data model of Subtext (which I had set aside as too complex), but with static types. Therefore I am redefining Subtext as a statically typed language, with classes and inheritance and so on. I have sketched this out, and it seems to magically resolve many of the complexities that were stumping me before. Read More