Tar Road to Sligo
The Slackware64 multilib installation includes the required GTK+ 2 (>=2.4). However, attempting to run LispWorks gives the following error message:
$ /usr/local/lib/LispWorks/lispworks-6-1-0-x86-linux (lispworks:30162): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory This likely means that your installation is broken. Try running the command gdk-pixbuf-query-loaders \ > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache to make things work again for the time being. ...
To remedy this, I ran the 32-bit_version of gdk-pixbuf-query-loaders(1):
$ su - # gdk-pixbuf-query-loaders-32 \ > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
Following that, LispWorks started without incident.
The SlackBuilds OCaml script for Slackware 13.37 specifies OCaml 3.12.1. However, that’s sufficient to install OPAM, which, in turn, can be used to install not only newer but multiple versions of OCaml.
After installing OCaml 3.12.1, I downloaded the source for OPAM 1.1.0 and followed the installation instructions. I initialised OPAM, answering “yes” to the prompt to update ~/.bash_profile and ~/.ocamlinit, and logged out and back in to make sure the OPAM environment would be set properly.
I added the following lines to &;/.ocamlinit to configure the ocaml and utop toplevels:
#use "topfind";; #thread;; #camlp4o;; #require "core.top";; #require "core.syntax";;
I will open Core.Std as needed, so I didn’t add it to ~/.ocamlinit.
Recently, late in a risky project, I chose to abandon my previous efforts with another language and use Haskell to solve a difficult problem. This has been one of the best professional decisions I’ve made, and much of the success must be attributed to Haskell, its community, and functional programming in general.
However, diving into paid work with Haskell has meant focusing on production and deployment concerns at some expense to learning the language itself. It’s time to document the former and plan to remedy the latter.
Developing and Deploying with Haskell
Having installed GHC and the Haskell Platform, I have a stable Haskell environment, and I want to keep it that way. So far, I’ve used cabal only to install cabal-dev, pointfree, hlint, and ghc-paths (for GHCi) into my user package database:
$ cabal install cabal-dev $ cabal install pointfree $ cabal install hlint $ cabal install ghc-paths
For the project, I’ve used cabal-dev in place of cabal to install libraries and compile the executable:
$ mkdir -p /path/to/project $ cd /path/to/project $ cabal init -n --is-executable ... $ cabal-dev install postgresql-simple $ cabal-dev install datetime ... $ cabal-dev configure ... $ cabal-dev build && cabal-dev ghci .\ main ... $ cabal-dev build && cabal-dev install ./cabal-dev/bin/Main ...
As well, I’m using the Haskell wiki Applications and libraries section as a guide to studying GHC and its tool environment. First up is the Prelude:
The most important Haskell library is called the Prelude. It is implicitly imported by default, and includes the most commonly used functions. Make sure you know what they do and how to use them effectively.
Of course, I’ll always have a tab open to Hoogle.
I removed the GHC and Haskell Platform Slackware packages and
deleted root’s and my
~/.ghc directories. Then, I built
a Slackware package for hscolour using the Slackbuilds
I installed the Slackware packages for GHC, hscolour, and Haskell Platform,
in that order.