Hi, my name is Patrick Dahl. I am a musician, composer, sound engineer, web designer and coding enthusiast.

I will include more about myself later! Thanks for dropping by!

taking out the trash with racket

2010-11-07 20:09:54

a small example of how to empty the contents of the trash in racket.

#!racket

(for ([f (in-directory (expand-user-path "~/.Trash"))])
  (cond
    [(file-exists? f)
     (delete-file f)
     (printf "deleting file: ~a\n" f)]
    [(directory-exists? f)
     (delete-directory/files f)
     (printf "deleting file: ~a\n" f)]))



using other macfuse install with macfusion on os x

2010-11-06 00:50:46

a simple hack to get macfusion working with macfuse from macports or other install.

cd /Applications/MacFusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources
mv sshfs-static sshfs-static-old
ln -s /opt/local/bin/sshfs sshfs-static

cd /Applications/MacFusion.app/Contents/PlugIns/ftpfs.mfplugin/Contents/Resources
mv curlftpfs_static_mg curlftpfs_static_mg-old
ln -s /opt/local/bin/curlftpfs curlftpfs_static_mg

to install with other prefix change /opt/local to other install location.




using quicklisp with sbcl

2010-10-31 15:50:10

in the terminal

wget -O http://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp

then in sbcl

;; install quicklisp and add a startup item to your cl init file
(quicklisp-quickstart:install)
(ql:add-to-init-file)

;; to search for a package
(ql:system-apropos "quicklisp-slime-helper")

;; to install a package
(ql:quickload "quicklisp-slime-helper")

;; updating packages
(ql:update-all-dists)

;; to update the quicklisp installation
(ql:update-client)

source: http://beta.quicklisp.org/




fullscreen emacs on os x

2010-06-07 20:40:30

git clone git://github.com/typester/emacs.git
cd emacs
./configure --with-ns
make bootstrap
make install
mv nextstep/Emacs.app /Applications

add the keybinding to your .emacs

(global-set-key (kbd "M-RET") 'ns-toggle-fullscreen)

source: http://unknownplace.org/memo/2009/12/17/1/




hello world

2010-06-07 19:00:00

(print "hello, world!")



Please feel free to contact me at subpolar at gmail dot com.