Lush (programming language)
From Seo Wiki - Search Engine Optimization and Programming Languages
|License||GNU General Public License|
Lush, (Lisp Universal Shell), is an object-oriented dialect of the Lisp programming language that was initially developed as a scripting language for machine learning applications, as well as numerical and graphical applications, but can also be used for general purpose, systems, and network programming or administration tasks. It compiles to native C code and includes a multidimensional-array processing engine. Lush is an open source project available under the GNU General Public License. It includes interfaces to a number of libraries (written in Lush and C), such as: ALSA, BLAS, FFTW, GNU Scientific Library (GSL), HTK, LAPACK, MPI, OpenGL, OpenCV, SDL, Video4Linux. It has bindings to Python C API which are not current. The initial developers of Lush, Léon Bottou and Yann LeCun, claim it runs under the following operating systems: POSIX (Linux/BSD/UNIX-like OSes), Linux, Solaris, and SGI IRIX on the Sourceforge site .
- Get help
LUSH has an interactive command line interpreter to input command conveniently.
To get help, type:
A document window appears to display manual, tutorial, and reference.
To get information about a function immediately in command line, type something like:
which will display information about "drawline" function.
- Array Manipulation
LUSH combined N-dimension array manipulation and LISP like syntax together.
- get/set values
? (defvar m (matrix 2 3)) ;; define variable for array = () ? m ;; display the array = [[ 0.00 0.00 0.00 ] [ 0.00 0.00 0.00 ]] ? (m 1 2 5) ;; set value at position (1,2) to 5 = [[ 0.00 0.00 0.00 ] [ 0.00 0.00 5.00 ]] ? (m 1 2) ;; get value at position (1,2) = 5
? (select m 1 2) ;; select the 2nd slice of dimension 1 = [ 0.00 5.00 ] ? (narrow m 1 2 1) ;; dimension 1 is "narrowed" to 2 elements, offset is 1. = [[ 0.00 0.00 ] [ 0.00 5.00 ]]
- to/from list
Array can produce list with "same" structure and also can be created from list.
? (m () () (range 6)) = [[ 1.00 2.00 3.00 ] [ 4.00 5.00 6.00 ]] ? (m () ()) = ((1 2 3) (4 5 6))
|File:HelloWorld.svg||This programming language-related article is a stub. You can help Wikipedia by expanding it.|