1
2lush(1) Development lush(1)
3
4
5
7 lush2 - Lisp Universal Shell
8
9
11 lush2 [@initfile] [lushfile ...args...]
12
13
15 lush2 starts the Lisp Universal Shell.
16
17 Lush is an object-oriented Lisp interpreter/compiler with features
18 designed to please people who want to prototype large numerical appli‐
19 cations. Lush includes an extensive library of vector/matrix/tensor
20 manipulation, a set of graphic functions, a simple GUI toolkit, and
21 interfaces to various libraries such as OpenGL, SDL, the SGI Multimedia
22 library (video/audio grabbing) , the Numerical Recipes library, and
23 others. Lush is an ideal frontend script language for programming
24 projects written in C or other languages.
25
26
27
29 Online help on the standard library is available by typing (helptool)
30 at the Lush prompt. You can leave Lush by typing CTRL-D at the prompt.
31
32 On startup, Lush loads various libraries from the sys and lsh directo‐
33 ries, as well as a .lushrc file in the user's home directory. It is
34 recommended to add a directory lsh in your home directory and to
35 include the line (addpath "your-home-directory/lsh") to your .lushrc so
36 that your own Lush programs are found in Lush's search path.
37
38 It is quite convenient to run Lush from within Emacs, which can be done
39 by creating somewhere in your path a symbolic link named "lisp" to the
40 lush executable. Then, type ESC-X run-lisp in Emacs. It is probably a
41 good idea to add the following line in your .emacs so Emacs switches to
42 Lisp mode when editing a Lush file:
43
44 (setq auto-mode-alist (append (cons "\.lsh$" 'lisp-mode) auto-mode-
45 alist))
46
47
48
50 In Unix, Lush can be used to write scripts that can be called from a
51 shell prompt (like shell or Perl scripts). A list of command-line
52 arguments are put in the argv variable.
53
54 Here is an example: create a file (say "capargs") with the following
55 content (replacing the first line by the path to your lush executable):
56
57 #!/bin/sh
58 exec lush "$0" "$@"
59 !#
60 (printf "capitalizing the arguments:0)
61 (each ((arg argv)) (printf "%s %s0 arg (upcase arg)))
62
63 then, make capargs executable: chmod a+x capargs. You can now invoke
64 capargs at the shell prompt:
65
66 % capargs asd gfdf
67 capitalizing the arguments:
68 capargs CAPARGS
69 asd ASD
70 gfdf GFDF
71
72
74 /usr/share/lush2
75 The top of the Lush directory structure
76 /usr/share/lush2/src
77 Source code of the interpreter
78 /usr/share/lush2/sys
79 Core libraries (lush sources) without which Lush cannot run. A
80 minimal/customized version of Lush needs only that directory to
81 run.
82 /usr/share/lush2/etc
83 Various shell scripts and utilities
84 /usr/share/lush2/include
85 /usr/share/lush2/lsh
86 Library files (lush sources) that are part of the standard dis‐
87 tribution. Although they are not required for Lush to run, life
88 would really suck without them.
89 /usr/share/lush2/packages
90 Library files (lush sources) for special applications or plat‐
91 forms, or programs that have been contributed by users and can‐
92 not be assumed to be present/working in all installations of
93 Lush.
94 /usr/share/lush2/local
95 Lush libraries that are specific to your site.
96 ~/.lush2/lushrc.lsh
97 Personal Lush initialization file
98
99
101 This man page was written by Kevin Rosenberg for the Debian Linux dis‐
102 tribtion as Lush does not come with a man page.
103
104 Lush was begun by Leon Bottou and Yann LeCun. Contributors include:
105 Patrice Simard, Yoshua Bengio, Jean Bourrelly, Patrick Haffner, Pascal
106 Vincent, Sergey Ioffe, Ralf Juengling and many others.
107
108
109
111 Lush is the direct descendant of the SN system. SN was first developed
112 as a neural network simulator with a Lisp-like scripting language. The
113 project was started in 1987 by Leon Bottou and Yann LeCun, and rewrit‐
114 ten several times since then. SN was used at AT&T for many research
115 projects in machine learning, pattern recognition, and image process‐
116 ing. Its various incarnations were used at AT&T Bell Labs, AT&T Labs,
117 the Salk Institute, the University of Toronto, Universite of Montreal,
118 UC Berkeley, and many other research institutions. The commercial ver‐
119 sions of SN were used in several large companies as a prototyping tool:
120 Thomson-CSF, ONERA.
121
122
124 Use (helptool) in an interactive lush session for browsing of online
125 documentation.
126
127
128
129
130 lush(1)