User Tools

Site Tools


using_ecl_embeddable_common-lisp_on_sdf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
using_ecl_embeddable_common-lisp_on_sdf [2021/03/11 05:21] – [Customizations] hc9using_ecl_embeddable_common-lisp_on_sdf [2021/03/11 05:30] – [ECL Basics] hc9
Line 15: Line 15:
 By default ECL starts up in interactive mode. Log into SDF host //miku// and type "'ecl'"; you should see something like below: By default ECL starts up in interactive mode. Log into SDF host //miku// and type "'ecl'"; you should see something like below:
  
-  ECL (Embeddable Common-Lisp) 11.1.1 +<code> 
-  Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya + 
-  Copyright (C) 1993 Giuseppe Attardi +ECL (Embeddable Common-Lisp) 11.1.1 
-  Copyright (C) 2000 Juan J. Garcia-Ripoll +Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya 
-  ECL is free software, and you are welcome to redistribute it +Copyright (C) 1993 Giuseppe Attardi 
-  under certain conditions; see file 'Copyright' for details. +Copyright (C) 2000 Juan J. Garcia-Ripoll 
-  Type :h for Help. +ECL is free software, and you are welcome to redistribute it 
-  Top level. +under certain conditions; see file 'Copyright' for details. 
-  >+Type :h for Help. 
 +Top level. 
 +
 + 
 +</code>
  
 The default ECL prompt is ">". Enter Common-Lisp commands in the usual way: The default ECL prompt is ">". Enter Common-Lisp commands in the usual way:
  
-  > (+ 1 2 3) +<code> 
-  6+ 
 +> (+ 1 2 3) 
 +6 
 + 
 +> (* 4 5) 
 +20
  
-  > (* 4 5+> (format t "hello SDF~&amp;"
-  20+hello SDF 
 +NIL 
 +>
  
-  > (format t "hello SDF~&amp;"+</code>
-  hello SDF +
-  NIL +
-  >+
  
 In-line help is available ; type :h for options. The debugger can be entered using "(break)" ; once entered typed :h to see options. To exit the ECL interactive session type ":exit" . In-line help is available ; type :h for options. The debugger can be entered using "(break)" ; once entered typed :h to see options. To exit the ECL interactive session type ":exit" .
Line 45: Line 53:
  
 ex: hello.lsp ex: hello.lsp
 +
 +<code>
  
   % echo '(format t "~&amp;Hello SDF~&amp;")' > hello.lsp   % echo '(format t "~&amp;Hello SDF~&amp;")' > hello.lsp
Line 50: Line 60:
   % ecl -norc -script hello.lsp   % ecl -norc -script hello.lsp
   Hello SDF   Hello SDF
 +
 +</code>
  
 It's also possible to use ECL to execute simple Common-Lisp one-liners at the command line (note that //princ// is needed for screen output): It's also possible to use ECL to execute simple Common-Lisp one-liners at the command line (note that //princ// is needed for screen output):
Line 57: Line 69:
  
 A nicer way to accomplish the same is to create a small shell script: A nicer way to accomplish the same is to create a small shell script:
 +
 +<code>
  
   #!/bin/sh   #!/bin/sh
Line 73: Line 87:
   echo ""   echo ""
   exit 0   exit 0
 +
 +</code>
  
 Example run: Example run:
Line 90: Line 106:
  
 2) Create the ASDF config directory and config file*: 2) Create the ASDF config directory and config file*:
 +
 +<code>
  
   % cd $HOME   % cd $HOME
Line 98: Line 116:
   ;;additional directory for ASDF to search (no recursion):   ;;additional directory for ASDF to search (no recursion):
   (:directory "/LISP/ASDF/")   (:directory "/LISP/ASDF/")
 +
 +</code>
  
 *note: you can call the conf file anything you want. *note: you can call the conf file anything you want.
using_ecl_embeddable_common-lisp_on_sdf.txt · Last modified: 2021/03/12 18:34 by hc9