Web engines in Haskell

Vado

Vado is a Haskell web browser I wrote in two evenings that is the culmination of:

In that I think the project is a success. The code isn’t anything special, and it’s not beautiful, or efficient.

Quoting the page:

This is a demonstration program that is able to load a web page up and render it like in the early 90’s. It supports laying out text, different font sizes for headings, inline and block elements, hyperlinks, bold and italics. It supports mouse-wheel scrolling, too.

I wrote this in a couple evenings, because it seemed straight-forward to do so given the libraries available today. That’s a good sign for Haskell. Also, there’s an inarticulate gut feeling I have that tells me maybe it’s worth celebrating these days in which the web is still viewable in its simplest, earliest form.

Fudgets

Meanwhile, I found that in 1994 there was a Haskell web browser by the Fudgets folk.

Quoting from the page in case it goes offline one day:

WWWBrowser is a prototype WWW Browser implemented in the functional programming language Haskell using the Fudget Library. WWWBrowser was mostly implemented in 1994, when NCSA Mosaic was the dominant web browser, and some updates have been made in 1997 and 1998.

WWWBrowser is also described in the chapter WWWBrowser – a WWW client in the Fudgets Thesis.

Hard to believe there was a pretty viable looking browser back then, and in Haskell! It’s very impressive! The Fudgets work really is still amazing and interesting to this day. I’ve started and will continue to read through their documentation and ideas.

Reflecting on browsers

You might think (or not think) that a cross-platform browser in 600 lines is pretty good. But this exercise also helps illuminate to me the gulf that exists between what we had in the 90s, and what people expect today. Vado doesn’t do anything that you would expect from a modern web browser. Here are just some things that I can think of:

Also to do all of these things efficiently, securely, and in a way that matches (quirks and all) with the way other engines are expected to render. And then if you want anyone to continue using it, you have to keep on keeping up with the web, aside from the high maintenance costs of a basic web browser.

Approaching a mono culture

At present we have an unfortunate state of affairs, we used to have these rendering engines:

Unfortunately, they’ve been collapsed down to:

I hope this trend doesn’t continue. Google are already attempting to destroy email as we know it, using their power afforded by GMail. Mozilla are pretty bent on keeping the web diverse and competitive. I’m not sure whether Apple will follow Microsoft’s and Opera’s lead and move to Blink for Safari.

We’ll see.