CLIM Screencast - Installation and Hello World Tue Feb 21 17:21:05 CET 2006

Finally, I was able to do my first CLIM screencast. It's about installation and writing a little hello world program to give the viewer a starting point for exploring McCLIM.

The intended audience are developers that have never seen McCLIM in action before and that need guidance with the Installation and their first Hello World steps.

Get it via bittorrent: CLIM Screencast - Installation and Hello World.torrent. (Please do not link to this torrent directly, as I might change the way I intend to distribute it, please link to the permalink below. I will update this entry when I move things around.)

In the video, I forgot to mention that you can use:

(define-key slime-doc-map "g" 'clim-lookup)
to bind clim-lookup to a key in Slime. Typing "C-c C-d g" will then invoke clim-lookup. And also here is the code fragment to run hello-world without the SLIME object pasting magic I unintentionally used in the video:
(run-frame-top-level (make-application-frame 'hello-world))
Update on video codec: I'm using a regular ISO MPEG-4 encoder. You will be able to decode this video with any MPEG-4 decoder, but sometimes (older player have that issue) they do not recognize the video as MPEG-4 as it contains the new fourcc for ffmpeg. (Background story here.)

Windows users should install a recent version of ffdshow. *nix user can grab a recent version of mplayer. VLC should work as of version 0.8.4.


Posted by clemens | Permalink | Categories: Lisp

cryptsetup-luks 1.0.2 out Tue Feb 21 13:41:45 CET 2006

A new version of cryptsetup-luks is out. Get 1.0.2 at http://luks.endorphin.org.


Posted by clemens | Permalink | Categories: Crypto

New LUKS spec Sat Feb 18 10:51:58 CET 2006

http://luks.endorphin.org/spec has an update to the LUKS specification. Changes:

  • Added precise AFsplit specification.
  • Removed lrw-plain mode spec as the LRW standardization process is not about to be finished any time soon; will be reintroduced when a normative documentation is released by SISWG.
  • Extended introduction text.
Thanks to Sarah Dean for providing valuable feedback with respect to the AFsplit specification.


Posted by clemens | Permalink | Categories: Crypto

Beautiful XEmacs Fri Feb 17 08:56:05 CET 2006

XEmacs becomes beautiful. Courtesy of Stephen J. Turnbull, we enjoy beautiful subpixel rendered fonts in XEmacs. 21.5.24 is the first release after the sjt-xft branch was merged MAIN.

I suggest to read the release notes to get an idea how to enable Xft. It's not on per default. You can also cut&paste my configure "line":

./configure \
'--with-cflags=-march=i686 -fno-strict-aliasing -O2'               \
'--disable-error-checking' '--with-png' '--disable-debug'          \
'--with-jpeg' '--with-tiff' '--without-gnome' '--with-xpm'         \
'--with-xft=emacs,gauges,menubars' '--with-zlib' '--with-xface'    \
'--with-athena=3d' '--enable-pdump' '--enable-dump-in-exec'        \
'--enable-bignum=gmp' '--enable-menubars=lucid'                    \
'--enable-scrollbars=lucid' '--enable-dialogs=athena'              \
'--enable-widgets=athena' '--without-gtk' '--enable-mule'
To get the same look as on the screenshot, drop that into your .xresources (and make sure they are "xrdb -merge"-ed).
 XEmacs.modeline.attributeFont:       Bitstream Charter-12
 XEmacs.modeline.attributeBackground: gray
 XEmacs.default.attributeFont:        Bitstream Vera Sans Mono-12
 XEmacs.default.attributeBackground:  white


Posted by clemens | Permalink

Screencasting for X11: an FFmpeg screen recorder Wed Feb 15 11:41:03 CET 2006

vnc2swf, vncrec, xvidcap. Either they can't record audio (vnc2swf, vncrec) or they can't keep audio in sync (xvidcap). xvidcap is the most advanced utility but it seem rather unmaintained and I also dislike the internal code structure (amorphic functions that behaviours strongly depend on semi-global state variables).

ffmpeg already comes with grabbing code, but only for V4L. The requirements are not so different from X11 grabbing, so I decided to hack a new X11 grabber into ffmpeg (after verifying that ffmpeg does correct A/V syncing).

The result is a working mixture of videograb.c of ffmpeg and capture.c/xtoffmpeg.c of xvidcap. I'm now able to do screencasts from X11 where I'm able to comment the things I'm doing via microphone.

Here is the patch for ffmpeg-0.4.9-p20051216: ffmpeg-x11-screen-recorder.diff

Compile like:

./configure --enable-x11grab --enable-gpl
Run like:
./ffmpeg -vcodec mpeg4 -b 1000 -r 10 -g 300 -vd x11:0,0 -s 1280x1024 test.avi
The -vd option is required. The two values following the colon describe the left upper coordinate of the grabbing region. The -s option describes the grabbing size. I'm using a frame rate of 10fps (-r 10) and a group size of 300 frames (so you have an intra frame every 30 seconds).


Posted by clemens | Permalink

#cl-gardeners: a channel for Lisp newcomers! Fri Feb 10 09:08:20 CET 2006

#lisp on FreeNode is home for many experienced CL wizard, and not primarily a place for asking trivial lisp newcomer questions. Of course, not all of these questions are valid. Some of those people joining #lisp simply want to get their homework done (preferably by others). But sometimes there are people that seriously want to learn Lisp. Every single one that is not sucked into the Common Lisp community is a loss that might not be quantified. And selfish as I am, I simply dislike the idea that there are any obstacles for lisp newcomers to start writing lisp code that someday I might be able to use :).

Now we have a channel, where newcomers can ask question and eventually get answer by newcomers. It is #cl-gardeners. You don't have to fortuneteller to predict that sometimes newbies can answer questions by other newbies better than an experienced CL. And in most cases, both parties gain knowledge. The unexperienced newbie by getting an answer, the semi-experienced newbie by repeating his partially acquired knowledge; you'll find that learning technique in every serious "teachers handbook".

However, CL wizards that are in a mood for providing help to newcomers are invited to join #cl-gardeners to share their experience. This gives #lisp the opportunity to send help seekers to #cl-gardeners when #lisp is busy with more important stuff or simply doesn't want to give an answer. (This is also the reason why #cl-gardeners should be on the same net as #lisp.)

So, if you are interested join #cl-gardeners on FreeNode. Lurking and idling is totally ok, and actually desired. Please consider #cl-gardeners as candidate for your autojoin list.


Posted by clemens | Permalink | Categories: Lisp

A Guided Tour of CLIM (draft) Mon Feb 6 13:13:41 CET 2006

Here is my update to A guided Tour of CLIM, an article that was published in ACM's Lisp Pointers in 1991. This is a draft, so feedback is appreciated. The latex source of this article is maintained in the McCLIM CVS.


Posted by clemens | Permalink | Categories: Lisp

Enabling on-board sound on VIA's K8T800 South Mon Feb 6 13:08:37 CET 2006

For some components, it might be desired to adopt the policy "if there is a component added that is similar to the onboard component disable the onboard component", for instance for video cards. However, there should be a BIOS option so that one can turn off this auto-disabling behavior.

VIA didn't think so far. ASUS does not seem to care about the stupid defaults VIA provides. Result: You are unable to add a second sound card to a ASUS A7V880 motherboard, without losing the onboard sound card. Yes, that's more than annoying. This is a reason to return such crap boards back to your reseller.

But, I discovered this 'feature' on a weekend. Also I hesitated to disassemble to box, remove the motherboard, drive to my reseller on Monday, argue about this stupidity and finally get a non-VIA replacement. No, I wasn't really into that.

Solution: Patch the PCI config space of VIA's ISA bridge to forcefully enable the onboard sound card. Admitted, this idea wasn't mine. ( See plughplover). However, instead of diving into the assembler of a regular Windows bootloader (I'm not interest in Windows anyway), I decided for another path. The result is GRUB PCI config space patcher.

How to use it for onboard component enabling on VIA. First, remove your addon soundcard and have a look at the output of lspci. Mine looks like this:

root@paul:~# lspci
0000:00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 0269 (rev 80)
0000:00:00.1 Host bridge: VIA Technologies, Inc.: Unknown device 1269
0000:00:00.2 Host bridge: VIA Technologies, Inc.: Unknown device 2269
0000:00:00.3 Host bridge: VIA Technologies, Inc.: Unknown device 3269
0000:00:00.4 Host bridge: VIA Technologies, Inc.: Unknown device 4269
0000:00:00.7 Host bridge: VIA Technologies, Inc.: Unknown device 7269
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
0000:00:09.0 Ethernet controller: Marvell Technology Group Ltd. Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (rev 13)
0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
0000:00:13.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)
0000:00:13.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 07)
0000:01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] (rev a2)
Then add your additional sound card. On my box
0000:00:11.5 Multimedia audio controller: 
 VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
is gone suddenly. The audio controller is brigged into PCI space via the ISA bridge. Dump the whole PCI config space of the ISA brige into a file with
lspci -xxx -s 0:11.0 > via-isa-bridge-with-addon
After that remove the addon sound card and verify that the onboard component with PCI bus ID 0000:00:11.5 pops up again. Then redump the config space of the ISA bridge with
lspci -xxx -s 0:11.0 > via-isa-bridge-with-onboard
Then check what's different with
root@paul:~# diff -u via-isa-brigde-with-addon via-isa-brigde-with-onboard 
--- via-isa-brigde-with-addon 2006-02-04 08:34:07.000000000 +0100
+++ via-isa-brigde-with-onboard 2006-02-04 08:26:02.000000000 +0100
@@ -4,11 +4,11 @@
 20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 ed 80
 30: 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00
 40: 44 00 f8 00 00 00 00 00 0c 20 00 00 44 00 08 08
-50: c0 88 09 00 00 00 00 00 43 90 00 01 00 00 04 08
+50: 80 88 09 00 00 00 00 00 43 90 00 01 00 00 04 08
 60: 00 00 00 00 10 00 02 04 00 00 00 00 00 00 00 00
 70: 43 10 ed 80 00 00 00 00 00 00 00 00 20 00 00 00
 80: 20 84 59 00 02 10 00 00 01 08 00 00 00 18 00 00
-90: 0b 00 23 00 b4 cd 00 00 50 ae 20 00 00 00 00 00
+90: 0b 00 23 00 a0 4d 00 00 50 ae 20 00 00 00 00 00
 a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 c0: 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
Here you see that the config space changed at the indices 0x50, 0x94, and 0x95. All you have to do now is instruct GRUB to restore the values 0x80 into index 0x50, 0xa0 into 0x94 and 0x4d into 0x95.

There is a final task: convert the ISA's bridge bus ID (0000:11.0) into another format. (Warning, I think about changing this, see GRUB help). The bus ID x:y.z translated into
pciwriteconf x (y << 3 | z) index new-value
Simply ask python how to get the second parameter. For y=0x11 and z=0, you get
Python 2.4.2 (#1, Oct  5 2005, 18:41:26) 
[GCC 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> (0x11 << 3 | 0)
136
So, now we are finished. I have
pciwriteconf    0x0 136 0x50 0x80
pciwriteconf    0x0 136 0x94 0xa0
pciwriteconf    0x0 136 0x95 0x4d
to reenable my VIA VT8233 AC97 audio controller on a K8T800 South.

The config space patcher can also be used for other brutal stuff that should be done to your hardware before the OS starts running. I'm not sure if that's possible via PCI config space, but overclocking your hardware might be desired.


Posted by clemens | Permalink