How to start programming in LISP
-
- Posts: 11
- Joined: Mon Jan 05, 2009 10:17 am
How to start programming in LISP
Hi All,
I am new in LISP and need your help to start programming in LISP. I have read the basic of lisp about different commands. Please help me to start programming.
Thanks
Nitin
I am new in LISP and need your help to start programming in LISP. I have read the basic of lisp about different commands. Please help me to start programming.
Thanks
Nitin
Re: How to start programming in LISP
What lisp dialect (Common Lisp, Scheme, etc.) have you been reading up on? If you haven't been focusing on a specific one, then you should before you start writing code. If you need to pick one, Common Lisp might be a good choice.
If you are going to be doing CL, you might want to start reading Practical Common Lisp. You will also need to install a CL implementation (unless you already have one installed). For free software implementations, SBCL is very popular, though its support on Windows is a bit young (should work okay though nowdays). CLISP is another implementation which is nice, and is traditionally the free software implementation for Windows. You could also try Lispbox.
If you are going to be doing CL, you might want to start reading Practical Common Lisp. You will also need to install a CL implementation (unless you already have one installed). For free software implementations, SBCL is very popular, though its support on Windows is a bit young (should work okay though nowdays). CLISP is another implementation which is nice, and is traditionally the free software implementation for Windows. You could also try Lispbox.
-
- Posts: 11
- Joined: Mon Jan 05, 2009 10:17 am
Re: How to start programming in LISP
Thanks for your reponse.
I am using Ubuntu (Linux OS). I have already installed below mentioned software for lips:
1. EMACS GNU
2. SBCL
3. CL-SQL
4. Slime
I am trying the file opening in emacs LISP with below mentioned code:
(let ((in (open "/home/administrator/test.el")))
(format t "~a~%" (read-line in))
(close in))
I got T in reply. Didn't understand what it means.
waiting for reply.
Regards
Nitin
I am using Ubuntu (Linux OS). I have already installed below mentioned software for lips:
1. EMACS GNU
2. SBCL
3. CL-SQL
4. Slime
I am trying the file opening in emacs LISP with below mentioned code:
(let ((in (open "/home/administrator/test.el")))
(format t "~a~%" (read-line in))
(close in))
I got T in reply. Didn't understand what it means.
waiting for reply.
Regards
Nitin
Re: How to start programming in LISP
Does it not simply mean that the file was closed successfully? (let form evaluates to its last subform, which is (close in), so that returns T (I presume is the emacs lisp equivalent of #t in Common Lisp, i.e. true)... right?)
Re: How to start programming in LISP
You're thinking of Scheme. T is true in Common Lisp (and I assume it's the same in Emacs Lisp.) Scheme uses #t and #f for true and false.Exolon wrote:Does it not simply mean that the file was closed successfully? (let form evaluates to its last subform, which is (close in), so that returns T (I presume is the emacs lisp equivalent of #t in Common Lisp, i.e. true)... right?)
Re: How to start programming in LISP
For help learning Common Lisp such as sbcl, also check out David Lamkin's book (online and free):
http://www.psg.com/~dlamkins/sl/
My own favorite beginner's book is Paul Graham's ANSI Common Lisp. But it is not free.
Best,
- Phil -
http://www.psg.com/~dlamkins/sl/
My own favorite beginner's book is Paul Graham's ANSI Common Lisp. But it is not free.
Best,
- Phil -
-
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
Re: How to start programming in LISP
This isn't Emacs Lisp, this is Common Lisp. Where did you type this? Have you got SLIME set up properly? If you have, you should see the first line of that file printed in your REPL, and then T, since "(close in)" returns T, and that's the last form in your let. It's better to use with-open-file than open/close if you can.nitinkapoor25 wrote:I am trying the file opening in emacs LISP with below mentioned code:
Code: Select all
(let ((in (open "/home/administrator/test.el"))) (format t "~a~%" (read-line in)) (close in))