Hbro: Haskell based browser
github.com
github.com
The same goes for uzbl, too, of course. Things like the Grail Browser [1] (a Python webbrowser, including the possibility to run client-side python-code - but sadly obsolete and not maintained anymore, as far as I can tell) are so much cooler than just tying webkit to GTK using $LANGUAGE.
I mean, it's not like HTML layout engines or JS-interpreters are somehow impossible to write from scratch.
Today's web standards are large & complex enough that it is practically impossible without a full-time team.
I'm not trying to put this little project here down, far from it. I think it's pretty neat. I can imagine even neater (if that's a word) things, though... :-)
I'm not being defensive of this project, I'm being critical of the direction web architecture is going.
Err, at 1991 he just wrote a rudimentary OS from scratch. To make it more unix-like, stable and feature full took hundreds of people, including tens of full time company employees (IBM, RedHat, etc).
We are bequeathing the future a world where building new browsers is approximately an impossibility.
The Web is so much. Now all devices can consume the same files with comparable user experiences. There are reasonable standards. Javascript is a reasonably advanced and simple language (for the time being). But the web has failed much as well.
Hopefully the web will mature someday and someone will clean up the mess we are leaving them.
WebKit is much bigger than that - at least one order of magnitude bigger (that is, 3 millions of LOC).
So yes, this is a tiny wrapper around a huge C++ codebase. The name is kind of misleading. But still a cool project.
Using Haskell for any of the above components (especially the last three) could help make a browser that's more configurable and safer than anything Firefox Chrome or Safari could ever offer.
People are critising this because so far they have done nothing interesting, just written a simple 'hello world'-type wrapper around a mountain of C++ code.
Now I'm using Conkeror [1]. Essenstial features for me, are:
Buffer selecting with fuzzy matching
Hinting links with letters, home row would be superb
Some developer interface for creating interactive javascript extensions
[1] http://www.conkeror.org/I'd also prefer an Emacs-style keybinding set (or at least the ability to map one), so I don't have to switch muscle-memory mode when jumping from my editor to graphical browser. But, I'd be willing to give that up if the memory footprint of a thin Webkit-based browser is more minimal. I occasionally have to restart Conkeror after sustained heavy use due to it hogging system resources (it'll eventually bring my Atom n270 to a grinding halt). This is probably xulrunner's fault though, I suspect.
Do you have any actual data to support that claim (or suspicion, as you want)?
find Hbro -iname '*.hs' | xargs cat | wc -lBasically you have two choices, depending on the Unix you're using:
- find ... -print0 | xargs -0 wc -l
- find ... -exec wc -l {} +
The second one is defined by POSIX and, as far as I know, works on every Unix except for OpenBSD (who only implemented this feature starting version 5.1 in 2012).
The first one is non-POSIX so several Unices do not implement -print0.
To the best of my knowledge, GNU find should work fine with both.
More info: http://unix.stackexchange.com/a/41745/4098
Any arguments specified on the command line are given
to utility upon each invocation, followed by some
number of the arguments read from the standard input
of xargs. The utility is repeatedly executed
until standard input is exhausted.
In other words, if the argument list is too long, xargs will chunk the input and call the program repeatedly. This means that on very large projects, 'wc -l' will be called several times on subsets of the files, and you will get an incorrect total listed at the bottom.putting a 'cat' in between fixes that. 'cat a b; cat c d' is equivalent to 'cat a b c d', so the chunking doesn't matter. And wc -l can just read from stdin without worrying about how many files there are.
If you honestly love these kind of projects, than I can't understand why you're asking this question?
It just has to be worth for the guy doing it. Every other view point considering the usefullness of it or how profitable it would be, is just killing all the fun and in a way taking away all the meaning.
"Uzbl is in Python and I can't think of any objective reason why Haskell would be better for a browser."
It's like asking, if there's an objective reason to write an applikation in Haskell instead of Python.
The difference has nothing to do with the language; hbro is taking a very different approach to configuration and integration. (e.g. uzbl does IPC using FIFOs and sockets; hbro is using ZeroMQ. uzbl is extensible with external scripts; hbro seems to be extensible using Haskell.)
(I'm the maintainer of uzbl. k0ral used to be involved with uzbl, and I'm sure hbro has learned from uzbl's mistakes.)