LISP: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
OtherMichael (talk | contribs) m (xref to logo) |
||
(11 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
Summary: You can run a full-blown Lisp on the laptop, but we haven't yet hooked it into the graphics and other capabilities of the system. |
|||
{{stub}} |
|||
[http://www.sbcl.org/ Steel Bank Common Lisp] is available by typing (in the Terminal activity): |
|||
Please add comments about the LISP programming language as being appropriate for OLPC development. |
|||
su |
|||
:The following is incorrect in almost every point, except for the one about python being slow. I'll update this page with an actual analysis in the future, but I can't let the trolling below stand without comment. |
|||
yum install sbcl |
|||
(found [http://bc.tech.coop/blog/080111.html here]). |
|||
:OK, no problem: it is very inappropriate. The language is quite complex. It is a "functional" (meaning non-functional) programming language, for maximum inconvenience. Sure, you can iterate with recursion... and you can also do dentistry with a dremel tool or cut grass with a toenail clipper. The syntax itself utterly fails to take advantage of the human eye-brain system being a pattern-matching engine. While other languages make various bits of syntax immediately recognizable, LISP makes everything look the same. LISP leads to programs that crash at runtime with various type errors, rather than being stopped at compile time. Speaking of which, while LISP compilers do exist (expensive and proprietary as a rule), it is normal to use a slow-ass interpreter. The XO is already choking to death under a pile of Python code; we don't need to add to the suffering. The scoping rules are a perversion designed to kill the last feeble hope of getting decent performance or code maintainability. The laptop has limited space for interpreters and libraries. The LISP runtime stuff does not deserve a place in front of the many more useful languages like C, BASIC, FORTRAN, Ada, perl... and even COBOL. Supplying LISP to children is especially evil because it will turn most of them away from programming. |
|||
You also probably want [[Emacs]] and [http://www.cliki.net/SLIME Slime]. The combo of Emacs, Slime, and SBCL makes a pretty decent Lisp environment, although it is not yet clear what you can do with it. |
|||
[http://lambda-the-ultimate.org/node/2468#comment-38435 Theoretically], it should be possible to install a standard Lisp implementation. |
|||
su |
|||
yum install emacs |
|||
exit |
|||
wget <nowiki>http://common-lisp.net/project/slime/slime-2.0.tgz</nowiki> |
|||
tar xvzf slime-2.0.tgz |
|||
Start emacs via |
|||
emacs -nw |
|||
Edit ~/.emacs to include: |
|||
(add-to-list 'load-path "~/slime-2.0/") |
|||
(require 'slime) |
|||
(setq inferior-lisp-program "/usr/bin/sbcl") |
|||
(slime-setup) |
|||
Then |
|||
M-x slime |
|||
will give you a Lisp listener |
|||
[http://common-lisp.net/project/python-on-lisp/ This package] may make it possible to access Python libraries from Lisp. |
|||
[http://www.cliki.net/GTK%20binding These packages] allow access to GTK bindings from Lisp. |
|||
[http://www.drscheme.org/ DrScheme] Scheme (Lisp) is available [http://www.wisdomandwonder.com/article/28/scheme-lisp-on-the-olpc-xo here]. |
|||
Whether or not LISP is appropriate for children is up to both the teachers and the children. |
|||
== See also == |
|||
*[[Scheme]] |
|||
*[[LOGO]] |
|||
:''See also: [[Scheme]]'' |
|||
[[Category:Programming language]] |
[[Category:Programming language]] |
Latest revision as of 13:29, 24 July 2008
Summary: You can run a full-blown Lisp on the laptop, but we haven't yet hooked it into the graphics and other capabilities of the system.
Steel Bank Common Lisp is available by typing (in the Terminal activity):
su yum install sbcl
(found here).
You also probably want Emacs and Slime. The combo of Emacs, Slime, and SBCL makes a pretty decent Lisp environment, although it is not yet clear what you can do with it.
su yum install emacs exit wget http://common-lisp.net/project/slime/slime-2.0.tgz tar xvzf slime-2.0.tgz
Start emacs via
emacs -nw
Edit ~/.emacs to include:
(add-to-list 'load-path "~/slime-2.0/") (require 'slime) (setq inferior-lisp-program "/usr/bin/sbcl") (slime-setup)
Then
M-x slime
will give you a Lisp listener
This package may make it possible to access Python libraries from Lisp.
These packages allow access to GTK bindings from Lisp.
DrScheme Scheme (Lisp) is available here.
Whether or not LISP is appropriate for children is up to both the teachers and the children.