How common is Common Lisp?
Moderator: Ras
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
How common is Common Lisp?
I've been thinking about updating the ancient and rather limited CIL (Chess In Lisp) package. But I'd like some data first.
Re: How common is Common Lisp?
My experience with Lisp is entirely from Emacs. I'm afraid that has put me off it for life - just basic customizations take forever to get right (for me). Oh well, procedural languages for me I guess!
Andy.
Andy.
-
- Posts: 1922
- Joined: Thu Mar 09, 2006 12:51 am
- Location: Earth
Re: How common is Common Lisp?
I think Lisp is interesting. I have a CL implementation on my machine, but I haven't gotten the chance to learn much Lisp, so I haven't used it much. I'd like to eventually become a Lisp expert, but I don't think I'll get the chance to look at Lisp much at all for a while. I think I would be interested in looking around at a chess implementation, but I'm not sure I'd spend too much time with it.
-
- Posts: 2093
- Joined: Mon Mar 13, 2006 2:31 am
- Location: North Carolina, USA
Re: How common is Common Lisp?
I coded in Lisp over 20 years ago and haven't touched it since.
You can do some really cool stuff with it. I rather liked the
stuff your "not supposed to do": self modifying code.
You can do some really cool stuff with it. I rather liked the
stuff your "not supposed to do": self modifying code.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
A rant that's safely ignored
Several decades ago when I was still wandering about in academia, it was difficult for an undergraduate to escape from being exposed to Lisp and numerous other topics apparently no longer well represented in US colleges. Today, it looks like most of the required curricula in computer science programs is geared to the making of money by covering mostly only the currently popular and practical topics.
Now this is not necessarily a bad thing, and the approach seems to be successful with producing skilled tradesmen. Also, I can see that some efficiency is gained by skipping the truly archaic computer science arcana like programming with plug boards and punch cards which I endured. But there is something lost when one can get a baccalaureate in computer science without experiencing Lisp, a fifty year old language that's still fresh today.
Now this is not necessarily a bad thing, and the approach seems to be successful with producing skilled tradesmen. Also, I can see that some efficiency is gained by skipping the truly archaic computer science arcana like programming with plug boards and punch cards which I endured. But there is something lost when one can get a baccalaureate in computer science without experiencing Lisp, a fifty year old language that's still fresh today.
-
- Posts: 295
- Joined: Wed Mar 08, 2006 8:29 pm
Re: How common is Common Lisp?
I had contact to Lisp or some dialects of it several times:
Some of my calculators can be programmed in RPL (Reverse Polish Lisp). Not that I programmed a lot in it but for simple stuff I still might use them from time to time.
AutoCAD is/was using AutoLISP (a Lisp dialect) and I remember that I worked at least through some of the tutorials and did some really simple stuff with it as well.
Of course there is Emacs but I use it without any modifactions.
Anyway, I'm not particulary fond of Lisp and rather don't try to do something bigger with it. Doing something short with RPL is ok though.
best regards
Roman
Some of my calculators can be programmed in RPL (Reverse Polish Lisp). Not that I programmed a lot in it but for simple stuff I still might use them from time to time.
AutoCAD is/was using AutoLISP (a Lisp dialect) and I remember that I worked at least through some of the tutorials and did some really simple stuff with it as well.
Of course there is Emacs but I use it without any modifactions.
Anyway, I'm not particulary fond of Lisp and rather don't try to do something bigger with it. Doing something short with RPL is ok though.
best regards
Roman
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
A code snippet from the new CIL: SAN encoding
Code: Select all
(defun encode-move-aux (my-stream my-move)
(let
(
(fr-sq (move-fr-sq my-move))
(to-sq (move-to-sq my-move))
(fr-man (move-fr-man my-move))
(msc (move-msc my-move))
(mfbits (move-mfbits my-move))
)
(cond
((= msc msc-reg)
(if (is-man-pawn? fr-man)
(progn
(when (is-move-simple-capture? my-move)
(format my-stream "~ax" (svref as-file-vec (map-sq-to-file fr-sq))))
(format my-stream "~a" (svref as-sq-vec to-sq)))
(progn
(format my-stream "~a"
(svref asuc-piece-ch-vec (svref mc-man-to-piece-vec fr-man)))
(when (logbitp mf-andf mfbits)
(format my-stream "~a" (svref as-file-vec (map-sq-to-file fr-sq))))
(when (logbitp mf-andr mfbits)
(format my-stream "~a" (svref as-rank-vec (map-sq-to-rank fr-sq))))
(when (is-move-simple-capture? my-move)
(format my-stream "x"))
(format my-stream "~a" (svref as-sq-vec to-sq)))))
((= msc msc-epc)
(format my-stream "~ax~a"
(svref as-file-vec (map-sq-to-file fr-sq))
(svref as-sq-vec (calc-ep-victim-sq my-move))))
((= msc msc-cks)
(format my-stream "O-O"))
((= msc msc-cqs)
(format my-stream "O-O-O"))
((= msc msc-ppn)
(when (is-move-simple-capture? my-move)
(format my-stream "~ax" (svref as-file-vec (map-sq-to-file fr-sq))))
(format my-stream "~a=N" (svref as-sq-vec to-sq)))
((= msc msc-ppb)
(when (is-move-simple-capture? my-move)
(format my-stream "~ax" (svref as-file-vec (map-sq-to-file fr-sq))))
(format my-stream "~a=B" (svref as-sq-vec to-sq)))
((= msc msc-ppr)
(when (is-move-simple-capture? my-move)
(format my-stream "~ax" (svref as-file-vec (map-sq-to-file fr-sq))))
(format my-stream "~a=R" (svref as-sq-vec to-sq)))
((= msc msc-ppq)
(when (is-move-simple-capture? my-move)
(format my-stream "~ax" (svref as-file-vec (map-sq-to-file fr-sq))))
(format my-stream "~a=Q" (svref as-sq-vec to-sq))))
(if (logbitp mf-mate mfbits)
(format my-stream "#")
(if (logbitp mf-chec mfbits) (format my-stream "+")))
(if (logbitp mf-bust mfbits) (format my-stream "*")))
my-move)
-
- Posts: 2251
- Joined: Wed Mar 08, 2006 8:47 pm
- Location: Hattingen, Germany
Re: How common is Common Lisp?
No, I have no Common Lisp environment on my machine.sje wrote:I've been thinking about updating the ancient and rather limited CIL (Chess In Lisp) package. But I'd like some data first.
I am interesting in Lisp, but I never tried it before.
There is already a "wanted" Lisp-site in the CPW - but I am so far not able to write something there

http://chessprogramming.wikispaces.com/Lisp
Gerd
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
A code snippet from the new CIL: PPD encoding
Encoding routines for PPD (Piece Placement Data)
Code: Select all
(defun encode-ppd-board-vec-rank (my-stream my-board-vec my-rank)
(let ((spaces 0) (sq-index (map-file-rank-to-sq file-a my-rank)))
(dotimes (file-index file-limit)
(let ((man (svref my-board-vec sq-index)))
(if (= man man-v0)
(incf spaces)
(progn
(when (> spaces 0)
(format my-stream "~a" spaces)
(setf spaces 0))
(format my-stream "~a" (svref as-man-ch-vec man)))))
(incf sq-index))
(when (> spaces 0)
(format my-stream "~a" spaces)))
my-rank)
(defun encode-ppd-board-vec (my-stream my-board-vec)
(dotimes (alt-rank-index rank-limit)
(encode-ppd-board-vec-rank my-stream my-board-vec (flip-rank alt-rank-index))
(when (/= alt-rank-index (1- rank-limit))
(format my-stream "/")))
my-board-vec)
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: How common is Common Lisp?
I've been testing clisp 2.45 (i.e., "Menorah Lisp") and gcl 2.6.7 (GNU Common Lisp) both under OpenBSD; Linux flavors are also available. I don't know about other platforms.Gerd Isenberg wrote:No, I have no Common Lisp environment on my machine.
I am interesting in Lisp, but I never tried it before.
There is already a "wanted" Lisp-site in the CPW - but I am so far not able to write something there
http://chessprogramming.wikispaces.com/Lisp