Sunday, January 20, 2008

The Beginning of a New Era

I still remember the event Jobs in Functional Programming, held here in Göteborg, Sweden, the 14th December last year. It was the first event of its kind, an event to attract hackers to employers, paying for you to hack in functional programming languages! Not only were 8 companies represented in some way, 6 of them had people there explaining why you should go to their company and not someone else's :) With over 100 people registered, and about as many as came, it was a joy. Professor John Hughes, well known for his work with Haskell, was the host for the evening. John ended the event with a speech, I got reminded of it by SPJ's mail. Congratulations, btw! :) They both conclude that Haskell has become much more popular, and that it has happened very fast. Five or ten years ago we would not have dreamed of having such an event as we did. Some students found it humorous when John spoke very enthusiastically about Haskell's new won popularity. But think of it this way, twenty years ago few companies would make a fuzz about FP at all. Today C#, one of the most popular languages out there from one of the (the?) biggest computer companies out there, has lots of ideas from FP. There is also F#: Microsoft's newest addition to the .NET family, a somewhat more evolved version of OCaml, adjusted to fit into the .NET world. It's not difficult to make the prediction that Haskell will get even more attention in the near future. The times are really changing. As Hughes said in his speech, this is the beginning of a new era.

Saturday, January 19, 2008

Wireless on a Thinkpad x61s

I've just configured wireless networking on my laptop, so I'd like to share a little checklist to speed up the process for others in the same situation. As you will see, it is that hard to get it going. It's as simple as setting the kernel modules, drivers, encryption and local settings. What took me the longest was actually to remember to allow my MAC address in the router... bummer :) This guide is specific to Gentoo Linux, but it should not differ too much against other distributions. I also expect you are familiar with Gentoo and how to compile your kernel. # lspci | grep Wireless 03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61) First, we need to get the network interface working. Enable the new network stack, in the kernel menuconfig, enable Networking -> Wireless -> Generic IEEE 802.11 Networking Stack (mac80211). I used the currently latest stable kernel, gentoo-sources-2.6.23-r3 Also don't forget to compile the required crypto algorithms under Cryptographic API: <M> Cryptographic algorithm manager <M> CBC support <M> ECB support <M> AES cipher algorithms <M> ARC4 cipher algorithm <M> Michael MIC keyed digest algorithm <M> PCBC support This will build modules called mac80211, blkcipher, aes, arc4, ecb, cryptomgr and crypto_algapi. Load them during boot in /etc/modules.autoload.d/kernel-2.6. Also modprobe right away, so we can continue without rebooting. Add to kernel-2.6 like above. Install the network drivers; unmask and unhardmask iwlwifi and iwl4965-ucode, add ipw4965 to your use flags, then run emerge iwlwifi This will install the iwlwifi system and the firmware needed by your hardware. Now run modprobe iwl4965. Check success/failure with ifconfig -a or dmesg, you should have a new interface available. As soon as you've got the interface up and running, check your HW address. If you've got MAC filtering, don't forget to add it to your "Allow list". Better get that out of the way so we don't forget it... I'm using wpa_supplicant to configure for my networks, emerge wpa_supplicant. /etc/conf.d/net: ---------------- #dhcp is default on all devices modules=( "wpa_supplicant" ) wpa_supplicant_wlan0="-Dwext" /etc/wpa_supplicant/wpa_supplicant.conf: ---------------------------------------- ctrl_interface=/var/run/wpa_supplicant # Let any member of the group "wheel" configure the network ctrl_interface_group=wheel ap_scan=1 # Add network block to connect to unsecure networks. # Giving it a low priority will make all other blocks preferred. network={ key_mgmt=NONE priority=-9999999 } # Add a WPA2 network network={ ssid="my ssid" proto=WPA2 key_mgmt=WPA-PSK psk="secret password" } More information about wpa_supplicant, and examples, are available in /usr/share/doc/wpa_supplicant*/.