::::: : the wood : davidrobins.net

F# and Mono

News, Technical, School ·Tuesday January 27, 2009 @ 19:56 EST (link)

20090123: Finally set up new UPS (APC ES 550VA/330W), and plugged the portable HD (500 Gb USB/Firewire/eSATA external disk that I got way back when I got my new server from HDNW) into it. Next time I need to reboot the various machines in here, I'll move them over to the UPS (it needs time to charge the battery anyway). Our (also APC) UPC in the other room (by the Myth box and the TV) is indicating (by a shrill tone… a very shrill tone) that the battery is dead, but we've had it less than a month; I need to check if their warranty will replace it. The HD was auto-detected immediately (I plugged it into minas-tirith, the server; it may live there or on the new machine, so long as it's somewhere it can be shared to the machines in the network.

20090124: Honey's friend Meghan was here (1500-2200); she wanted me to help her with math (functions and graphs), then we got pizza and watched Scrubs. Later on I was replacing light bulbs downstairs (two had burned out, one from each light, making the rec. room rather dim): one was fine, but the other seemed to have shorted and somehow consumed itself; the glass part of the bulb came off, and I had to get the rest out of the socket (couldn't use the potato trick, it was too deep) using needle-nosed pliers and a couple of screwdrivers, first unbolting the socket from a fixed bar for easier access. Not fun holding my hands up that long. Then we got to pick up all the bits of metal and rust that had fallen down.

20090125: Installed mono (open source .NET platform) and F# (as I've said before, Ocaml but with libraries).

The only thing I needed to change to compile my first class assignment (mono <path to fscp.exe from F# archive> hw1.ml) was to rename the member function, since member is a keyword in F#. I got a few warnings, even with the --ml-compatibility switch: FS0044 (it didn't like s.[0] since the type of s was unknown; declaring (s : string) fixed it). Warnings that I got without the compatibility switch were to use <> instead of != and KeyNotFoundException instead of Not_found. For the second assignment, code using Some Type arg needed parenthesizing as Some (Type arg).

I couldn't get the interactive shell (fsi.exe) to work; it started and gave me a prompt, but then after a keypress or timeout complained about missing gdiplus.dll. I don't want to install libgdiplus on that machine because it requires X, which is silly on a headless machine. I figured I could start it with the --no-gui option and it wouldn't demand any GUI libraries. It seemed a tad slow; definitely slower than OCaml. Online benchmarks bear that up: Mono has a ways to go to catch up with .NET—but it'll get there.

20090127: Bought some AR cleaning supplies at Wade's (chamber brush, barrel brush, bore snake, bore guide). I should have all I need now.

Books finished: A Random Walk Down Wall Street.

DVDs finished: Children Of The Corn 7: Revelation.