In Allegro CL Free Express Edition, how do I load the last LISP command in the Debug window? I am looking for similar things to an up arrow in the terminal.
Related
How can I set up Common Lisp to work with sublime text 2. Is there a way to set it up so I can compile and run the code easily, I am new to both lisp and sublime text.
For Sublime Text, I'd recommend SublimeREPL for the REPL. The default configuration for Common Lisp uses SBCL nowadays, I think (Previously it was CLISP). To download a binary of SBCL for Windows, just go to the downloads page.
I've never installed SBCL on Windows, but the installation should be fairly simple.
To install Quicklisp, follow the instructions in the website.
You can't actually compile anything with Sublime Text, because it is just text editor. But there are plugin for sublime text 2/3 that claimed to properly indents lisp code: lispindent.
So, you can write your CL program with it just by creating .lisp text-file. Then you can run it with SBCL as easy as (load "C:/path-to-your-file.lisp").
And yes, to work with something more difficult than "Hello, world!" you will need Quicklisp as a package manager for Common Lisp.
Ok so i am trying to get started with lisp and slime and i am running into some problems. I have correctly installed emacs and slime and SBCL but i run into problems when trying to edit files. I am doing this all on mac osx lion though i dont think that makes a difference. So this maybe stupid but when i first enter the terminal i enter
$ emacs <myfile.lisp>
and then it opens up my file but then slime is not running so i do..
M-x: slime
but when i do that is now gone and all i see is the "REPL" (i think) anyway it just shows me
*
and then i can enter things like
*15
15
but now i can't get back to my file so that i can compile it. Could somone please hlep me through this? Thank you!
Try C-x← and C-x→, that switches the current window's buffer to the previous or next buffer.
For a more interactive approach, split the screen vertically C-x2 (or horizontally C-x3), so you may see your code and try something out on the REPL. You may switch windows with C-xo (remember, O as in Other). You may close a window (not the buffer) with C-x0.
However, you'd better search for an Emacs tutorial, as all of this is very basic. I also recommend you start with a graphical Emacs, such as Emacs for Mac OS X. Some people prefer other versions, which integrate better with Mac OS X but also have lots of different keybindings and come with extra packages. I personally prefer having similar installations and keybindings in whatever OS I'm using.
According to this answer, Emacs + Slime already has much advanced functionality. So how can I get syntax coloring, auto-completion, and perhaps even version control management, set up and running in my copy of Lispbox?
If it's of any help, I have installed Lispbox on Mac OS Lion.
Syntax highlighting should already be working as soon as you load a lisp file in Emacs, regardless of whether you've got SLIME installed or not. If it's not, try doing M-x font-lock-mode and see if that turns it on.
Version control isn't provided by Emacs or SLIME, but Emacs can integrate with pretty much any version control system you care to use. I recommend Mercurial or Git. Emacs should start vc-mode automatically when you open a file that is in one of the supported version control systems. The manual includes extensive documentation, do M-: (info "(emacs)Version Control") to jump right to it.
Auto-completion is more complicated. There is more than one way to skin this cat, but for Lisp SLIME's default method should be good enough. Use M-TAB to complete the symbol at point.
are there any IDEs which run in a shell instead of a gui. As i really don't like to use a mouse (except of scrolling, everything is faster for example in firefox using shortcuts).
I really like textual user interfaces (like gdb in tui mode) and it would be nice to have an ide which is fully controlable by keyboard (i'm currently learning emacs but it isn't really designed as an ide i think).
You can use Emacs as an IDE(with some script/package and setup) (take a look at this)
Emacs + ECB + JDEE: Java IDE
Emacs + Slime: Common Lisp IDE
Emacs + ECB + Cedet(and Xrefactory): C++ IDE(Alex Ott written a
great article about it)
Emacs + Pymacs + Ropemacs: Python IDE
emacs and vim can be - and are - both used as IDEs. I personally use emacs as IDE for PHP.
Is there a way to expand the current command at the Clojure repl like I'd be able to do in Common Lisp?
For example say I have typed:
Math/
I would like the tab key to expand to all the available variables and functions in that namespace.
I'm using Clojure as inferior-lisp would like to know how to do this from the plain vanilla repl in Clojure, and through swank slime.
Another vote in favour of clojure-mode and slime under Emacs. In particular, if you set up auto-complete, then you can use my ac-slime package to get context-aware tab completion in a dropdown list. Here's a screencast showing it in action.
And, further to technomancy's comment about hippie-expand, here's how to tie slime completion into hippie-expand.
Update: as of 2012, nrepl, nrepl.el and ac-nrepl are replacing slime and ac-slime; same functionality, smaller and cleaner codebase.
Update2: as of Oct 2013 nrepl.el is renamed to cider and it and ac-nrepl have moved to the clojure-emacs organisation on github. nrepl remains as the server component
Have you tried Clojure mode for Emacs? It has autocomplete (suggestions are shown in new window, and if there's only one possible option, it is used to expand name), highlighting and many other nice features (not more then for CL, but not less too).
It is available via ELPA. After installing ELPA type M-x package-list-packages, set cursor near needed package and press i (already installed packages are in red). You'll need packages clojure-mode, slime, slime-repl and swank-clojure. When you're done with i-marks, press x to complete installation. Finally, press M-x slime - Emacs will tell, that Clojure is not installed and propose to download and use latest version. Just agree.
You can also integrate Emacs with Leiningen.
The vanilla repl in Clojure is pretty crippled; it doesn't even have history. Avoid it for anything but the most primitive of tasks. I don't think you can get this in inferior-lisp, but in the slime repl you can just use TAB to complete things like this. In clojure-mode buffers with slime activated it's M-TAB, or you can tie it into your hippie-expand functions.