Friday, August 15, 2008

org latex



I am really digging org-mode, and just tried out it's excellent LaTeX export command:


C-c C-e l


or


M-x org-export-as-latex


You can then make this into a PDF with:


pdflatex file.tex


Makes quite a nice looking PDF for almost no effort. I'm going to use this for writing the Marsyas Cookbook that I've started to write.

Thursday, August 14, 2008

gdb




I <3 GDB and I <3 Emacs, and together it's squared.

GrandUnifiedDebugger
GdbMode
Emacs Mode for GDB

But I'm having a little trouble because I use a text-mode only emacs (-nw forever). Mainly I can't get it to go to the line in the source file when I press C-c C-l. If anyone has some tips for me, please leave them in the comments below.



Tuesday, August 5, 2008

cmake




A cmake-mode for looking at CMake files.



circle






circle hack in emacs


(defun connet (side)
(let ((monitor (make-array "(100 100) :initial-element nil)))
(loop for i from 0 below 100 do
(loop for j from 0 below 100 do
(let* ((x (* side (/ i 100)))
(y (* side (/ j 100)))
(c (round (+ (* x x) (* y y)))))
(when (evenp c) (setf (aref monitor i j) t)))))
(loop for x from 0 below 100 do
(format t "~%")
(loop for y from 0 below 100 do
(format t "~A" (if (aref monitor x y) "*" " "))))
(format t "~%")))

(defun connet-driver (&key (sec 0))
(loop for side from 1 below 100 do
(sleep sec)
(connet side)))