diary at Telent Netowrks

iwl if you will#

Tue, 01 Oct 2013 09:40:40 +0000

I don't pretend to understand much about wifi, but - historically, at least - I observe that the phrase "wireless net working" is often, like "military intelligence" or "road works ahead", most charitably described as oxymoronic.

The ingredients:

The symptoms: sometimes it doesn't work. Sometimes it works for a couple of minutes and then stops.

The hypothesis: iwlwifi or the hardware it's talking to doesn't like talking on 5GHz channels

The fix (first attempt):

:; cat /etc/modprobe.d/iwlwifi.conf 
options iwlwifi 5ghz_disable=1

The problem with this fix: it makes no difference. It turns out 5ghz_disable has no effect any longer

The fix (second attempt): add the line

	freq_list=2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2477 2482
to the relevant network clause in /etc/wpa_supplicant.conf. And be grateful you're not using dbus

The result: it seems to be working so far.

In other news, Schuko is hacky-but-probably-functional Showoff-style Markdown->HTML presentation software, in Clojure(script). It generates a static HTML file which you can host anywhere, and uses client-side Javascript and CSS for navigation and page flipping transitions.

Clojure on company time / my first cljs#

Fri, 18 Oct 2013 10:18:34 +0000

From: Daniel Barlow 
To: london-clojurians 

A few weeks ago I foolishly volunteered to give a "this is what I remember about functional programming" lunchtime talk for our company-internal "Level Up" informal training sessions: the material being a combination of what I learned at university many years ago and since have largely forgotten[*], with the slightly more practical stuff I've since picked up working with CL and Clojure.

So the presentation was yesterday, and seemed to be well received inasmuch as at least nobody walked out: I spent 25 minutes blethering with some slides, and then we did 4clojure problems for the rest of the hour.

  • I wrote some presentation software for the occasion: https://github.com/telent/schuko which is also my first use of cljs outside of a dojo setting. Shows up that I really need to investigate some more functional patterns for DOM/event-driven CLJS systems, because what I've done there really doesn't feel Lispy. Feedback welcome

I make no particular claim to correctness, completeness, or purity of thought, and the bits about normal-order evaluation probably don't make a lot of sense because they're written in Clojure syntax yet don't work in Clojure because it (usually, by default) has strict evaluation - but I cast this out to the wider world (that's you guys) in case you find it useful anyway in your own evangelising

-dan

[*] Bless you, Bird & Wadler

Meet the new laptop ...#

Mon, 21 Oct 2013 19:26:19 +0000

... same as the old laptop. Seriously. The only time you will see the word 'fast' in the same sentence as Sandisk U100 is in articles recycled from the press release they sent out at launch. And maybe now here, in the sentence "I threw away my Sandisk U100 and replaced it with something fast".

I mean, it has to be said, there may have been something wrong with my particular drive -

  $ dd if=/dev/zero bs=1M count=1000 of=/home/dan/zeros.bin 
  1048576000 bytes (1.0 GB) copied, 230.009 s, 4.6 MB/s 

though I'm not the only one so ... maybe not. ANYWAY. Point being, I replaced it with a Plextor M5M and it's fixed all the odd stalls and hangs and stutters that I used to experience on this machine. Which is lovely, because reformatting it with ext4 a few months ago so completely didn't.

A summary of the upgrade process

  1. remove 11 or so screws from the bottom of the case. Use a decent screwdriver, because if your machine is like mine, the screws are (1) made of cheese; (2) held in with threadlock
  2. remove the bottom of the case
  3. look for the bit that looks like an msata ssd. Pictures of msata ssds are available on the internet
  4. remove the foam pad stuck to it
  5. unplug and remove it
  6. plug the new one in
  7. reassembly is the reverse of disassembly

In summary, not hard. And I can confirm that my puppet manifest worked pretty much perfectly for reinstalling it. With the exception of a couple of dependencies I forgot to declare, but nothing that running puppet twice didn't fix.

finagle the fenestra#

Thu, 24 Oct 2013 23:32:20 +0000

So I have a working laptop again, but the touchpad has a frankly rather stupid "touch then drag" behaviour that makes window placement an absolute pain. In my lunch hour yesterday, lacking the internet access I needed to address the Clojure issue that I had originally holed up in the Barbican library to work on (couldn't get a 3G or a wireless connection) I decided to look again at last year's 'throw-window' sawfish hackery , and have turned it into something slightly more useful: now instead of slinging the focused window all the way to the screen edge it only moves it to butt up against the next window on the screen (more precisely, it moves to align with the lext or right border of teh next window along).

The code is at https://github.com/telent/dotfiles/blob/master/.sawfish/lisp/throw-window.jl (i.e. it hasn't moved) and there are a couple of other changes