UP | HOME

Nix and uzbl

1 Nix

Tried Nix once again, this time it mostly worked. Mostly followed this guide, though had to make a few adjustments, such as adding --sha256=0 option for cabal2nix. Here are some notes of what I was doing:

curl https://nixos.org/nix/install | sh
. ~/.nix-profile/etc/profile.d/nix.sh
nix-env -i cabal2nix cabal-install

cd /tmp/test
cabal init
cabal2nix --shell --sha256=0 test.cabal > shell.nix
nix-shell
. ~/.nix-profile/etc/profile.d/nix.sh
# relax dependencies in .cabal;
# probably i've created the project with the old cabal,
# old ghc, or old libraries somehow
cabal install, etc. or run emacs from it

# import Acme.Time.Now
# add to .cabal
cabal2nix --shell --sha256=0 test.cabal > shell.nix
exit
nix-shell
cabal configure
cabal build

With a regular system-wide Haskell (ghc, cabal, packages) installation, there is plenty of conflicts; at some point `which ghci` --version and ghci --version printed different versions from the same shell (no idea how's it even possible, but checked a few times; didn't happen for ghc, but it didn't appear in a new shell).

Emacs (haskell-mode, REPL) worked just fine after running it from a shell with nix-altered PATH.

All in all, it works, but appears to be pretty awkward (perhaps more so than cabal sandboxes), to require adding new packages (say, the first project i decided to try with Nix required fann, which wasn't there), and may introduce even more problems when it comes to system/DE components. I like it, but perhaps will stick to cabal sandboxes for now – they seem to be easier to handle, though even they are a pain to use, comparing to some other languages. Briefly considered stack/LTS, btw, but don't really want to deal with missing packages.

Anyway, decided to use Nix just to install some programs: I'm currently on CentOS, and there is not many packages here, while building big projects from sources, installing and resolving all the dependencies manually, is often a pain. After a couple of hours, recalled that I wasn't quite happy with FF, and wanted to try alternative browsers.

2 uzbl

After Arora failed to parse its start page (and I have also found that it is abandoned), and Midori failed to start (with tons of GTK errors), I decided to try uzbl. The first impression was that it is cool; it quickly changed to the second impression, which was that it is not usable. But after opening its config file, the third impression was the same as the first one.

The things I didn't like include google-analytics on its start page, default vi-style qwerty-based keybindings, plenty of GTK-related warnings (I'm not quite familiar with GTK, but I suspect that it may be because of different versions of GTK, and/or improper nix build), and perhaps GUI: I don't like overly fancy GUI of FF, but it was just too bad in uzbl, though at least there wasn't much of it, and probably it's because of uzbl being installed with Nix, too.

Not really a uzbl issue, but it doesn't figure that IPv6 doesn't work here sometimes, and tries it again and again; haven't found how to disable it altogether in uzbl, and turning it off system-wide would require to kill established connections, I think. But that's an issue of my crappy ISP, MGTS, and according to other ISPs' forums – of most of Russian ISPs. Anyway, had to run it with torify, so it worked; Tor is great for many purposes, apart from privacy, and probably will have to use it for web browsing anyway – if they will finally block Wikipedia here. Though it's a sad topic, back to uzbl now.

The design is not great by default: there are colors like red on dark grey, which is bad.

dilbert.com, together with googlesyndication (according to logs), just makes uzbl to enter a cycle – usually leading to me killing it.

One last thing I didn't like is a pile of python, JS, and shell scripts, and even some OpenJDK messages from time to time – perhaps that's why it is quite slow.

But let's proceed to good parts now. First thing you see is advanced keyboard control, and fancy (mostly in a good sense) design: minimalistic, but pretty – reminds of tiled WMs. Perhaps most of its issues can be fixed by configuring it: keybindings can be reconfigured, google can be blocked, colors and fonts can be changed, and those python/js scripts can be replaced: there is plenty of user-supplied scripts, and they can be written in any language, which is a good approach; pipes are used for communication, an event manager can be changed, and its overall architecture seems to be rather hackable – apart from the webkit part, perhaps.

Though I'm stuck with GNOME, uzbl makes me to consider switching to some tiling WM (i3, most likely; it is good for a netbook, at least) someday soon.

3 Vimperator

Vimperator is pretty nice, too: it's like vim inside of FF, and a emacs-style config can be set.

Update: emacs-style config is probably not the best idea, apart from a couple of commands: it hits the "uncanny valley".