Common LISP Programming Quick-Start with Hello-World on GNU-Linux

December 29th, 2015 by thelinuxevangelist

Common LISP Getting-Started for Linux




The Linux Tutorial Shows You Step-by-Step How-to Install and Getting-Started in Common LISP Programming Language with the CLisp implementation and an Hello World Example on severals Linux Distributions.

ANSI Common Lisp is a high-level, general-purpose programming language. GNU CLISP is a Free Common Lisp implementation by Bruno Haible of Karlsruhe University and Michael Stoll of Munich University, both in Germany.
It mostly supports the Lisp described in the ANSI Common Lisp standard. It runs on most Unix workstations (GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, Tru64, HP-UX, BeOS, NeXTstep, IRIX, AIX and others) and on other systems (Windows NT/2000/XP, Windows 95/98/ME) and needs only 4 MB of RAM.

The user interface comes in English, German, French, Spanish, Dutch, Russian and Danish, and can be changed at run time.
GNU CLISP includes an interpreter, a compiler, a debugger, CLOS, MOP, a foreign language interface, sockets, i18n, fast bignums and more. An X11 interface is available through CLX, Garnet, CLUE/CLIO. GNU CLISP runs Maxima, ACL2 and many other Common Lisp packages.

Common LISP Quick-Start for Linux - Featured




  1. How-to Install Common LISP on Linux Distros

    CLISP SetUp for Linux
  2. Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

    Common LISP Hello World on Linux - Featured

    Create an Common LISP Hello World
    Here for simplicity I’ll make use of the nano editor…

    mkdir ~/Documents/cLisp

    To put stuff into order an common lisp directory is created with the above command

    cd ~/Documents/cLisp

    We change to the target cLisp directory

    nano helloworld.lisp

    And Append this Common LISP content:

    (defun hello-world ()
      (format t "Hello, world!"))
    

    Ctrl+x to Save & Exit from nano editor

  3. Executing the Common LISP Hello World

    chmod +x ~/Documents/erlang/helloworld.lisp

    This to give Execution Permissions

    erl

    Then we start the Common LISP Shell to Load and Run the example

    1> load("helloworld.lisp")
    ;; Loading file helloworld.lisp ...
    ;; Loaded file helloworld.lisp
    T
    

    To Run Common LISP hello-world Function

    2> (hello-world)
    Hello world!
    NIL
    

    In the end to Quit the Common LISP shell hits Ctrl+z.

  4. OnLine Common LISP Tutorials and Documents

    Common LISP eBook

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,