Where X is the name of any programming language, Lisp system or Lisp library.
Well I wanted a Lisp-like language that I could use for scripting on the .NET platform. I wanted it to be purely managed code, and no such solution existed that met my needs. L Sharp is still one of the simplest, cleanest and most modern implementations.
You are free to go and search elsewhere. There are plenty of alternatives now. Here are some links which may interest you.
One of the nice things about L Sharp is how easy it is to change. There is a great opportunity here to make L Sharp whatever we need it to be. Any feedback welcome.
A prerequisite for L Sharp is that you have installed the .NET framework 2.0 from Microsoft. (Unless of course, you are using Mono and compiling L Sharp from source yourself).
The L Sharp repository is available at http://lsharp.sourceforge.net/download/.
Unfortunately the .NET framework only provides methods for one, two or three arguments. C Sharp appears to allow more arguments by converting your arguments to an Object Array behind the scenes (?) I L Sharp you can specify an Object Array of arguments directly, thus avoiding the problem.
(Format String "{0},{1},{2},{3},{4}" (the Array (list 1 2 3 4 5)))Today, most people are using Emacs (See below), but there is a new editor called Xacc which has LSharp built in! It's a modern IDE with a more gentle learning curve. See http://sourceforge.net/projects/xacc and http://blogs.wdevs.com/leppie/ for more information.
Put the following in your .emacs file (change the path according to where you installed LSharp).
(cond ((fboundp 'global-font-lock-mode)
;; Turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; Maximum colors
(setq font-lock-maximum-decoration t)))
(setq inferior-lisp-program "C:/LSharp/LSharp.exe")
Then start emacs. Type
M-x run-lisp
. You edit an LSharp program in another Lisp buffer and send expressions to the inferior Lisp process using
C-x C-e
You may also like to try
C-c C-l
to load and evaluate the entire file
ESC C-q
at the start of an S-expression to properly indent and format it
C-h m
for help on Lisp mode
Copy the lsharp.syn file provided to your text pad samples. Define a new document class called LSharp which includes *.ls file and uses the lsharp.syn sntax definition file.
The most useful feature is being able to put the cursor next to a bracket and pressing CTRL-m repeatedly to match corresponding brackets.
You can't do this easily yet, sorry! I suggest that if you need some feature like this, you write an assembly in either C Sharp or VB.NET and then just call it from L Sharp. That's the beauty of .NET, language interoperability.
Technically a user can use classes in System.Reflection.Emit to build types and methods, but thats fairly advanced. We intend to provide some wrappers for these at some point in the future.
(the cons (GetCommandLineArgs System.Environment))
C Sharp programmers are used to this notation of object.method - We experimented with it, but "java dot" notation is just syntactic sugar where the thing before the dot is essentially the first argument. We think that the following is more consistent and more in the spirit of Lisp - you'll get used to it!.
(WriteLine Console "Hello World")
If you try
(= news (new System.Xml.XmlDocument)) (load news "http://www.theregister.co.uk/headlines.rss")
then it won't work as intended, because the L Sharp built in function load is run in preference to the Load method on XmlDocument. The solution is to use the call special form.
(= news (new System.Xml.XmlDocument)) (call load news "http://www.theregister.co.uk/headlines.rss")