Lush (programming language)

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search
Lush
Paradigm Functional, Object-Oriented
OS Cross-platform
License GNU General Public License
Website http://lush.sourceforge.net

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 .

Features

  • Get help

LUSH has an interactive command line interpreter to input command conveniently.

To get help, type:

? (helptool)

A document window appears to display manual, tutorial, and reference.

To get information about a function immediately in command line, type something like:

?^Adraw-line

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
    • slice
? (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))

External links

ja:Lush

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...