Today I took a light rail with my son, to bring him to school. That tram is 90 years old. It has been maintained for 90 years. Milan city sold some of them to San Francisco too.
Pandoc is an universal document converter to convert Markdown, Org-Mode, Html, Word documents from one markup format into another After using different tools, (including GNU info and SGML). I find out pandoc vert handy.
Ops I did it again. Although I repeatedly said I didn’t love emacs Lisp, I finally managed to learn it.
So I want to share with you my tips, to help entering in the Emacs Lisp world in a fast, fun and easy way.
First of all Lisp is a very elegant language, as you may expect.
Lisp is so elegant you will have to take your time to learn it, because it is a bit cryptic. To make things even worst, emacs function names are less than intuitive. The solution anyway is here: cookbooks!
The second thing you must learn to master is the C-h f (describe-function) key bindings, because will help you a lot. Take the time to study the code of the basic functions you find in your way.
Learn by Example
The best way to start is to use ert unit testing framework which is built in in the last version of Emacs…
(ert-deftest testname () (let (...) .... (should ....) ))
To start playing, see the example on this web page http://steve-yegge.blogspot.it/2008/01/emergency-elisp.html
Lisp magical constructs
To understand better lisp, take a look to this “useless” library http://www.emacswiki.org/emacs/SyntacticSugar
which simply create “alias” to the same function (!)
unwind-protect is the emacs lisp function for “try……finally” idiom. It is very important to use it because will avoid you fatal error on the go. Anyway I like also this form
(condition-case nil (progn (do-something) (do-something-else)) (error (message "oh no!") (do-recovery-stuff)))
I like a lot of programming languages. I do not love them with the same intensity.
I do not love Lisp for its ((syntax))), but Lisp rocks for its purity: in a tiny bag of concept, you get a lot of stuff.
This article, (How to Write a (Lisp) Interpreter (in Python)) show you how it is easy to write a lisp interpreter in python. It is 113 lines of code, and include the parser the executor and the basic functions to get started.
To try it out issue
python -i lis.py
And at the prompt:
Book review by Stefano Fago:
This book introduce one of most interesting language of new wave of functional programming. You will find a complete overview of clojure language focusing in functional paradigm that can be the real obstacle for a standard developer. The author try to follow you on learning different subject with a lot of examples but sometimes it need more reflection and time to master some arguments and a syntax that may seems obscure. The book is a good starting point to introduce you to a new way of programming but also to learn some particulars aspect of Java. To consider a complete but not easy reading. However a book to have!