Coder Social home page Coder Social logo

lisp-executable's Introduction

Lisp Executable

The LISP-EXECUTABLE system provides a language for defining and creating programs that can be used from the Unix shell instead of the Lisp read-eval-print-loop (REPL).

The documentation for this project is contained in lisp-executable.org or online.

Quick Introduction

The files lisp-executable-example.asd and example/main.lisp provide a quick illustration of how to use this system.

(asdf:load-system "lisp-executable-example")
(asdf:oos 'lisp-executable:create-executables-op "lisp-executable-example")

The above code will generate two executables, example/example-program and example/control-c-tester.

Example Program

(define-program example-program (&options help)
  (cond
    (help
     (format t "Help has arrived."))
    (t
     (format t "You are doomed.")))
  (terpri))

Control C Tester

(define-program control-c-tester (&options help (sleep sleep-time))
  (declare (conversion-function (real 0) sleep)
           (type (or null (real 0)) sleep-time))

  (unless sleep
    (setf sleep-time 20.0))

  (cond
    (help
     (format t "Usage: [options]

Sleep for an amount of time.

Options:
  --help                      This helpful message.
  --sleep <positive real>     How long to sleep for. Default is 20 seconds.
")
     0)
    (t
     (sleep sleep-time)
     0)))

lisp-executable's People

Contributors

markcox80 avatar martinez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lisp-executable's Issues

CCL: arguments not passed correctly to the main program

Arguments such "-b" are not passed to lisp-executable's argument handling.

They do not reach it apparently, because the arg-list goes first through CCL's own argument handling and such arguments are removed. A "--" argument is needed to prefix the arguments passed to the program.

From CCL's help text:

Any arguments following the pseudoargument "--" are
not processed and are available to the application as
the value of CCL:*UNPROCESSED-COMMAND-LINE-ARGUMENTS* .

Like CLISP, I believe the output of CCL should provide a wrapping script. I have commented on this script on my previous PR, see #4

Usage of deprecated SB-EXT:QUIT

SB-EXT:QUIT has been deprecated as of SBCL version 1.0.56.55.
Current versions warn that it will be an error to call it in future versions and SB-EXT:EXIT should be used instead

Removing branch eql-support.

Hi all,

I am going to remove the eql-support branch as I no longer use EQL.

If you are using that branch then I suggest you fork the project.

Thanks
Mark

lisp-executable:create-executables-op does not do anything

Hi,

invoking (asdf:oos 'lisp-executable:create-executables-op "lisp-executable-example") just gives me

#<LISP-EXECUTABLE:CREATE-EXECUTABLES-OP >
((#<LISP-EXECUTABLE:CREATE-EXECUTABLES-OP >
  . #<ASDF/SYSTEM:SYSTEM "lisp-executable-example">))

but does not build any executables.

I am on SBCL 1.1.8 and my asdf version is 3.0.1.

Best,
Kilian

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.