Get start with "lisp"

Source: Internet
Author: User
Get start with "lisp"



In hacking and comics, Paul Graham mentioned what is the best programming language. LISP and C are obviously mentioned, and it is probably the same as lisp. Recently, I was going to read the tool. So I learned the extremely powerful lisp.




The basic, if primitive, way to get lisp running is to install a command-line lisp system. this works especially well if you have a UNIX System (OS X or Linux ). command-line lisps include:

  • Sbcl is a recent revision of cmucl with new modifications and additions.I recommend sbcl as the best command-line lisp.However, sbcl is very verbose and warning-filled though, which can get quite annoying. on the Mac, if you prefer a quieter, more forgiving, and decently fast lisp, try CCL or MCL.

  • Clisp is a good common lisp, and is highly portable to nearly every environment out there. however, the reason it is portable is that it compiles to a bytecode interpreter rather than to machine code, and so it's pretty slow.

  • MCL is a freeware command-line-only version of Macintosh Common LISP, which runs under MacOS X nicely. It is much faster than clisp on the Mac, but its debugging facilities are primitive.

  • CCL, or clozure Cl, was a fork of MCL way back when but now is a high-performance lisp implementation in its own right, and runs on a lot of different platforms. if you're getting annoyed at sbcl's verbosity, try CCL.

  • Cmucl is a first-rate Common LISP, but it is not available on all platforms. cmucl is the system from which sbcl sprang.

  • If you're interested in playing around with it, abcl is a Common Lisp implementation which runs on the Java VM. Note that it's not particle fast (yet ).



Sbcl is recommended here. Let's take a look... I have two, one sbcl and one clisp.


In Linux, it is detected that sbcl is installed in advance,

[email protected]:~$ which sbcl/usr/bin/sbcl

If Not Installed

sudo apt-get install sbcl


First lisp program, you must have guessed it.

Edit in current folder

Vim./Hello. LISP

(princ "hello world!")

Then enter sbcl

[Email protected]: ~ $ Vim./Hello. LISP
[Email protected]: ~ $ Sbcl
This is sbcl 1.1.1.0.debian, an implementation of ANSI Common Lisp.
More information about sbcl is available at
Sbcl is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the credits and copying files in
Distribution for more information.
* (Load "Hello. LISP ")
Hello world!
T



Everything starts from here, hello World.


Everything ends here, EOF

















Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.