Categories
Emacs Linux/BSD Software

Playing with LISP on Debian Squeeze

I haven’t looked up at how you play with LISP using Vim. Not really interested either since I’m committed to Emacs *rolls eyes*.
So, assuming you’ve already done aptitude install emacs23, Let’s go ahead and aptitude install sbcl cl-asdf slime. When in doubt aptitude show sbcl or aptitude show cl-asdf.

My motivation for this post in the first place was to document the quirks with the installation I was facing last night. If you happen to notice the following with the above aptitude install:

Setting up cl-asdf (1:20090819-3) ...
Reinstalling for sbcl
Recompiling Common Lisp Controller for sbcl
/usr/lib/common-lisp/bin/sbcl.sh loading and dumping clc.
; loading system definition from /usr/lib/sbcl/sb-grovel/sb-grovel.asd into
; #
; registering # as SB-GROVEL
;
; compilation unit aborted
; caught 1 fatal ERROR condition

Error running init-common-lisp-controller-v4: Lock on package SB-IMPL violated
when interning NATIVE-FILE-KIND.
See also:
The SBCL Manual, Node "Package Locks"
mv: cannot stat `sbcl-new.core': No such file or directory
FAILED

Done rebuilding
Setting up cl-swank (1:20090908-1) ...
Setting up emacs (23.1+1-4) ...
Setting up sbcl (1:1.0.25.0-1) ...
/usr/lib/common-lisp/bin/sbcl.sh loading and dumping clc.
; loading system definition from /usr/lib/sbcl/sb-grovel/sb-grovel.asd into
; #
; registering # as SB-GROVEL
;
; compilation unit aborted
; caught 1 fatal ERROR condition

Error running init-common-lisp-controller-v4: Lock on package SB-IMPL violated
when interning NATIVE-FILE-KIND.
See also:
The SBCL Manual, Node "Package Locks"
mv: cannot stat `sbcl-new.core': No such file or directory
FAILED

Your slime setup isn’t going to be functional. Fret not. Read on.

From Debian BTS bug #549528

=======BEGIN PATCH===================
--- /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp.orig 2009-10-21 14:42:00.000000000 -0400
+++ /usr/share/common-lisp/source/common-lisp-controller/post-sysdef-install.lisp 2009-10-21 14:40:59.000000000 -0400
@@ -61,7 +61,7 @@
#+sbcl
(defun get-owner-and-mode (directory)
(when (eq :directory
- (sb-impl::native-file-kind (namestring directory)))
+ (sb-impl::unix-file-kind (namestring directory)))
;; check who owns it
(multiple-value-bind (res dev ino mode nlink uid gid rdev size atime mtime)
(sb-unix:unix-stat (namestring directory))
=======END PATCH=================

Followed by,

dpkg-reconfigure cl-asdf
dpkg-reconfigure sbcl

Append the following to your .emacs, if you haven’t already.
;; Slime
(add-to-list 'load-path "/usr/share/common-list/source/slime/")
(setq inferior-lisp-program "/usr/bin/sbcl")
(require 'slime)
(slime-setup)

And your Emacs is ready to roll.

Categories
Linux/BSD Personal

Updates as of 23rd Oct. ’09

I don’t know if it’s just me but there are these days in an week where I tend to worry so much that my productivity drops to near-stagnation. Just nothing seems to happen other than a tense me appearing tense. Anyway, I’m just recovering from a somewhat unhappy experience with my Karmic Beta installation on my laptop. Yes, it’s another ooh-nareshov-does-another-distro-shift post. And here’s what happened.

First, I get a call from Vadiraj on a Wednesday morning, out of the blue, from Goa. Apparently, his friend and he planned a noon-trip to this place just to score something that’s allegedly only available there (in India, i.e.). He wanted me to do a quick Google to give him some pointers. Unsuspend my laptop, I did. To connect to the internet through my USB modem, it failed. No matter what I tried – wvdial, pppd, NetworkManager – I couldn’t connect. And I went on a reboot-and-try spree. No luck. All that happened was me end up with a laptop that’d get stuck at boot trying to fsck my filesystem. Enraged, I was.

I reach office and start moving my stuff off of my laptop preparing for a fresh-install. Of, *shudder*, Arch Linux. Installation was pretty straight forward. But I didn’t really enjoy it as much I did Gentoo or FreeBSD. Not to mention all that sorcery trying to get my USB modem to work being unsuccessful. (At some point I had udev identifying my device as a CDMA modem and hal identify it as a GSM modem).

That night, no internet. The next day, installed Debian testing. But I had the same darned problem of being unable to tap my touchpad to click on, you know, things. The GNOME which Debian-testing featured didn’t have that tab under System > Preferences > Mouse where I could enable “Tap to click”. A quick Google suggested the use of GSynaptics – which had a “Tapping” tab where I promptly enabled “Enable Tapping” and had my Aha-moment.

Phew.

Oh, and, today I get a pay-your-internet-bill reminder. And I did it within minutes of seeing this. And here I am, about seven hours after I did that and back from a pretty decent string chamber orchestra organised by the Bangalore School of Music for raising funds for the Karnataka-floods relief, blogging about why my USB modem wasn’t working and the things I did in the past few days.

And regarding my worries. Wanda the Fish, the fortune teller had this to say:

First thing Wanda, the fortune teller, said.
First thing Wanda, the fortune teller, said.

P.S.: That was my first click on the Wanda-the-Fish GNOME applet after installing fortune-mod earlier today.

P.P.S.: On the upside, I got a chance to do a fresh ext4 install after all this.

Categories
Linux/BSD Software

On Karmic Beta

On Friday last week I happened to upgrade certain packages on my erstwhile Jaunty installation on my laptop. For some strange reason my touchpad ceased to work. I couldn’t move the mouse pointer. I couldn’t even get onto good ole’ Google because I couldn’t click on NetworkManager and select the radio button next to my CDMA USB modem entry!

The next day I issued a ‘do-release-upgrade’ and headed out to watch Tarantino’s “Inglorious Basterds” with Debayan and Vignesh. After I returned there was still an hour to go and so I continued to bootstrap my Debian-armel on the SD card for the Beagle board. And when it was all over, I had Karmic!

So, the touchpad worked now. Somewhat. I couldn’t tap on the touchpad to click on things like the menubar entries and so on. Turns out that Systems > Preferences > Mouse > Touchpad has a button which says “Enable mouse clicks with touchpad” disabled by default. I, on the other hand, could make my way through up to this point with the keyboard alone and enabled it. Phew.

The improvements from Jaunty are, as expected, quite a lot. And visibly so.

Take the shiny new 2.6.31 kernel, for example. It boots fast. And supports kernel mode setting for the revamped X. The improvements are so obvious that you can’t afford to not say “wow”. I haven’t done the “full-screen flash video” test yet, but I do like the snappiness when I switch between virtual consoles and X. Once again, I can live with the minimal compiz that’s turned on by default on an Ubuntu installation. Oh, and I did have another oh-that’s-new moment with the volume control. It doesn’t look like the old one but it does look like an incomplete version of the Windows 7-style volume manager. I couldn’t find a way to mute my laptop speakers and let all sound be audible only via my earphones. Thankfully, alsamixer works.

UPDATE: It turns out that selecting “Analog Headphones” under Sound Preferences > Output does the trick.

So far so good. Upgrading moar. Oh, and don’t forget ‘do-release-upgrade -d’ in a screen session. Also, E17 looks kickass.