Politics, Programming and Possibilities
18 Mar
I’ve been lurking on the Haskell mailing list recently, and occasionally asking a question or two. I suppose you wouldn’t be surprised to know that I’ve found a treasure-trove of Haskell-related information and resources that I hadn’t been aware of. Really though, the Haskell community has created quite a rich store of documentation for itself and others, perhaps more than I’ve seen in any other community (which is not to say that other communities do a poor job). Here I’ve compiled a short list of these new pearls I’ve learned of, along with any other links that I’ve found useful:
Posted via email from Duane’s Quick Posts
Corrected: Example type search (thanks bonus)
18 Mar
The Mountain West Ruby Conference was a smash! We covered a wide range of topics that really made me pleased to be a part of the community (at least in attendance!) Some of my favorite presentations were Daniel Philpott’s “Tiger Team” and Jon Crosby’s introduction to Middleware (aka Rack). It was also really cool to see James Britt’s “Wii” link-up and hear him play some wild MIDI instruments on his “air wand”. I’m sure he’ll be tuning it in the near future
12 Mar
I’m excited to attend the Mountain West RubyConf in SLC tomorrow (and Saturday). I hope to see you there!
7 Mar
As a programmer, curiosity is most often a helpful asset that leads to a grander and more unified understanding of computer science. With Ruby, for example, I quickly learned about the usefulness of closures because the array methods like “map” and “select” were so helpful. Closures became a new tool in my toolbox–something I could apply almost everywhere.
2 Mar
I’m experimenting with using Haskell for a 2D game project in one of my computer science classes. It will probably involve the Chipmunk 2D physics engine (haskell has a binding to it called Hipmunk). Hipmunk comes with a demo app called the Hipmunk Playground, and it is a wonderful little demo of OpenGL and Chipmunk in Haskell.
# Make the Hipmunk Playground application for Mac OS XMacPlayground: Playgroundutils/macosx-app PlaygroundPlayground: Playground.hsghc –make Playground.hsRunPlayground: MacPlaygroundopen Playground.app
28 Feb
Most languages have a nice package management system that helps install new software or libraries—Ruby has the “gem” system, Perl has cpan, etc. In Haskell, it’s “cabal”, and here is how you install it:
darcs get http://darcs.haskell.org/cabal-install
cd cabal-install
sh bootstrap.sh
In addition, you should occasionally use the “update” command to sync your local package listing with the centralized one:
cabal update
To install a remote package, simply use “cabal install
cabal install happstack
Also noteworthy is that you can use cabal to install a package from the local directory. For example, if you’ve fetched something using darcs, you could procede to install it like this:
darcs get --lazy http://code.haskell.org/yi/
cd yi
cabal install
Update: To install yi above, I also had to install a package called “alex” which is outside the cabal system at this point. I used MacPorts, i.e. “sudo port install alex”.
18 Feb
I added a few improvements to the Ubiquity “download-files” command. It now checks everything on the page, including frames and iframes. Also, it walks through all of the CSS files and downloads image assets if they match the pattern you specify.
Visit Ubiquity Download Files on GitHub to see the code, or this gist to subscribe.
30 Jan
The first stable release of Ruby 1.9 is out… I’m downloading it now. There is a nice comparison of Ruby 1.8 and 1.9 here.
28 Jan
You know how teachers shifted from teaching rote memorization to teaching concepts sometime during the 19th or 20th century? I think the Internet is causing me to shift in a similar way with regard to facts themselves. I’m not sure if it’s all a good thing, but I just noticed for the first time that instead of thinking about facts, I tend to think about search terms. In other words, my use of memory has been abstracted to a higher level: I don’t recall what I need to know, I recall what will lead me to what I need to know.
25 Jan
The premiere Haskell web application stack, HappS, is getting a considerable boost this week. Several Haskell developers are getting together to tidy things up and improve the packaging and documentation. I’m on the documentation team even though I don’t know anything about it. We’ll see if I can add any value
Anyway, I had a really difficult time installing the “HappS-Tutorial” package and wanted to lay down a few pointers for anyone else who may be having difficulty. After finding, downloading and installing Cabal (Haskell’s package distribution system) on my Mac, I tried to install the HappS-Tutorial package: So, to make a long story short, if you get an error message like this: In case anyone has to go through the dependency hunting process like I did, here is a list of the HappS Tutorial dependencies.
$ cabal install happs-tutorial
Unfortunately, there are some dependency problems in the tutorial as it currently stands but I didn’t find that out until after I had removed the “.cabal” directory in my home directory. Apparently that messed up some dependencies on my own system and caused cabal to think that packages were installed when they weren’t.
Crypto/PBKDF2.hs:20:7:
Could not find module `Data.Binary':
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
PBKDF2-0.3 failed during the building phase. The exception was:
exit: ExitFailure 1
You may have to go through the dependencies one by one (using the remarkable hoogle search utility) and manually reinstall packages like this:
$ cabal --reinstall install binary
Where “binary” is the particular package I needed in this case.