trying to run LISP code in LispIDE
trying to run LISP code in LispIDE
First of all, I know nothing about Common Lisp or any kind of Lisp. I am just begining to learn.
So I downloaded LispIDE in order to have an environment in which I can experiment. I wrote a very simple program:
(* 2 (cos 0) (+ 4 6))
which, according to this website, should print out 20.0.
Well, I'm able to save the file (as a .lisp) but I don't seem to be able to run it. I can't find a compile or run function anywhere in the IDE. I would also try compiling/running it from a command prompt but I'm not sure what to type for that.
So I downloaded LispIDE in order to have an environment in which I can experiment. I wrote a very simple program:
(* 2 (cos 0) (+ 4 6))
which, according to this website, should print out 20.0.
Well, I'm able to save the file (as a .lisp) but I don't seem to be able to run it. I can't find a compile or run function anywhere in the IDE. I would also try compiling/running it from a command prompt but I'm not sure what to type for that.
Re: trying to run LISP code in LispIDE
You're supposed to just type it directly at the "command prompt" (read-eval-print loop), not put it in a file: it doesn't print anything, it just returns a value, so if you "run it" from a file it won't do anything. You can wrap (print ...) around it to make it print the value, if you want. I don't know LispIDE, so can't help you with that.gib65 wrote:First of all, I know nothing about Common Lisp or any kind of Lisp. I am just begining to learn.
So I downloaded LispIDE in order to have an environment in which I can experiment. I wrote a very simple program:
(* 2 (cos 0) (+ 4 6))
which, according to this website, should print out 20.0.
Well, I'm able to save the file (as a .lisp) but I don't seem to be able to run it. I can't find a compile or run function anywhere in the IDE. I would also try compiling/running it from a command prompt but I'm not sure what to type for that.
-
- Posts: 47
- Joined: Fri Jun 03, 2011 5:30 am
- Location: Behind you.
- Contact:
Re: trying to run LISP code in LispIDE
Go to Settings => Set Lisp Path and navigate to your CL implementation. Choose the .exe file. Click open.gib65 wrote:First of all, I know nothing about Common Lisp or any kind of Lisp. I am just begining to learn.
So I downloaded LispIDE in order to have an environment in which I can experiment. I wrote a very simple program:
(* 2 (cos 0) (+ 4 6))
which, according to this website, should print out 20.0.
Well, I'm able to save the file (as a .lisp) but I don't seem to be able to run it. I can't find a compile or run function anywhere in the IDE. I would also try compiling/running it from a command prompt but I'm not sure what to type for that.
There's a sign at the top showing an exclamation mark. Press on that - it will now restart lisp and should load your CL implementation.
You will notice that at the top of LispIDE there's a symbol with two parentheses (). When you have written your code, scroll to the end of the code and press on the symbol. It sends everything in the selected body () to the REPL.
What implementation and OS are you using?
Don't take the FUN out of DEFUN !
Re: trying to run LISP code in LispIDE
I don't know how to start Lisp from the command prompt.Paul wrote:You're supposed to just type it directly at the "command prompt"
The only .exe files I get are LispIDE.exe and unins000.exe. If I choose LispIDE.exe it tells me "Please do not select LispIDE itself but your Lisp console executable." If I select unins000.exe it asks me if I want to uninstall LispIDE. All this is found in C:\Program Files\LispIDE. I'm not sure what a Lisp console executable is.Indecipherable wrote:Go to Settings => Set Lisp Path and navigate to your CL implementation. Choose the .exe file.
I do that but it doesn't do anything. Is there a way of seeing the output of the REPL?Indecipherable wrote:When you have written your code, scroll to the end of the code and press on the symbol.
I'm using LispIDE v20100318.07 and Windows XP.Indecipherable wrote:What implementation and OS are you using?
Re: trying to run LISP code in LispIDE
I have never worked with LispIDE and have no Windows here to test it but as far as I understand the text on the LispIDE website:
The LispIDE seems not to include a Lisp implementation, instead you have to install an external Lisp implementation and then tell LispIDE where to find it. This means IMO that as long as you haven't installed a Lisp impementation on your computer, LispIDE will not be able to execute any code because it's only a text editor.
I will try to test this later on a Windows machine.
P.S.: Free Common Lisp implementations known to run on Windows are:
- edgar
The LispIDE seems not to include a Lisp implementation, instead you have to install an external Lisp implementation and then tell LispIDE where to find it. This means IMO that as long as you haven't installed a Lisp impementation on your computer, LispIDE will not be able to execute any code because it's only a text editor.
I will try to test this later on a Windows machine.
P.S.: Free Common Lisp implementations known to run on Windows are:
- edgar
Re: trying to run LISP code in LispIDE
I guess you're right, it doesn't include an implementation. Fortunately, I had another lisp download in another folder, and after a bit of trial and error, I found an .exe in that folder that brings up an command line lisp interpreter. I actually realized I could just run this .exe without having to start the lisp IDE. I've played around with it and got it to work. So thanks for all your help (everyone).