Code Monkey home page Code Monkey logo

cl's Introduction

cl is a program for launching common lisp implementations.  The cl
program acts kind of like the python interpreter... if you write a
lisp script with #!/usr/local/bin/cl at the top of the file, it will
run the script and if you invoke cl directly it will go into the lisp
repl.  The rlwrap program is invoked in repl mode and provides a
readline interface for interactive sessions.  So, make sure you have
rlwrap installed.  Also, make sure you have a supported lisp
implementation installed too. :-)

The program currently works with SBCL, CCL, CLISP and ECL.  More
implementations will probably be added in the future.

To support #! functionality, the #! macro character is set to ignore
the line.  If you use #! for other functionality, it will cause a
conflict.

cl also sets up the global variable *args* with the argument list
passed to the lisp script.  The script name is set to *program-name*.
I'm still deciding if these are the best names to use, so they might
possibly change in the future.  But, they don't seem to cause any
conflicts in my testing so far.

To parse the  argument list, a macro named parse-args is defined.  It
takes  a list  of  options. Each  option  consists of  a  list with  3
strings: the short-option name + argument (if needed), the long-option
name, and a  description of the option.  See  the test.lisp script for
an example use of parse-args.

When running scripts, the lisp implementation will have its debugger
turned off.  So if there are any errors in your script, the script
will exit with whatever message the lisp implementation prints and
then take you back to your shell.  I may add a flag to cl to enable
the debugger when running scripts in the future.

By default, SBCL is used.  But, you can set the environment variable,
CL, to another lisp implementation.  For instance "export CL=ccl64",
would cause your cl scripts to run ccl instead.

There is currently one flag, "-l <lisp-implementation>".  This flag
overrides the CL environment variable, so you can lock down individual
lisp scripts to a certain implementation.

This is just an initial check-in.  I plan on cleaning it up and adding
more features soon.

cl's People

Contributors

jrockytop avatar gettler avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gettler

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.