Cusp and Allegro CL

268 views
Skip to first unread message

Tom

unread,
Aug 12, 2008, 11:24:07 AM8/12/08
to Cusp Development
Hello,

I was wondering if there's currently a way to use Cusp with Allegro CL
rather than SBCL ?

I am interested by the idea, even if it needs some (moderate) code
editing.

Thank you,
Tom

Sergey Kolos

unread,
Aug 12, 2008, 1:57:48 PM8/12/08
to Cusp Development
Have you tried it and it didn't work or you want to know if it can
work at all?
Cusp uses swank to communicate with a CL, which I believe can work
with Allegro CL. In eclipse go to Preferences->Lisp->Implementations
to setup path and executable for your implementation.

Timothy Jasko

unread,
Aug 12, 2008, 3:00:24 PM8/12/08
to cusp-dev...@googlegroups.com
Note that you may also need to disable "Use Cusp to Manage Packages."
I don't know if that will work with Allegro, but it doesn't with
CLISP.

I experimented some time ago with getting Cusp working with Allegro,
and everything went fine, but that was rather early on. I expect that
it would not be too hard to get up and running again, thanks to
Swank's universality.

Tom

unread,
Aug 12, 2008, 3:12:23 PM8/12/08
to Cusp Development
I did not try it yet. The swank approach sounds promising, I'll test
that soon.

Thank you for your quick answers.

Tom

unread,
Aug 13, 2008, 10:16:39 AM8/13/08
to Cusp Development
I tried the 2 ways I know to start the swank server (from Eclipse /
manual) but it did not work so far. In both cases, when I select the
REPL panel I get an error dialog:
"An error has occured when activating this view
java.lang.NullPointerException"

Configuration:
Mac OS X 10.5.4 (Leopard)
Eclipse 3.4.0 (Ganymede)
Java JRE 1.5.0
Allegro CL 8.1

1) In Eclipse > Preferences > Lisp > Implementation
I set Lisp Executable to "/usr/local/acl81_32/alisp"
I uncheck "Use Cusp to Manage Packages"
I tried both to check/uncheck "Use a lisp sitewide installation"

2) Startig the swank server manually, here's the log (which looks good
to me):
CL-USER(1): (load "/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/
plugins/jasko.tim.lisp_0.9.189/slime/swank-loader.lisp")
; Loading
; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-loader.lisp
;;; Compiling file
;;; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-backend.lisp
; While compiling (METHOD INSPECT-FOR-EMACS (T T)):
Warning: variable INSPECTOR is used yet it was declared ignored
;;; Writing fasl file
;;; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-backend.fasl
;;; Fasl write complete
; Fast loading
; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-backend.fasl
;;; Compiling file
;;; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/nregex.lisp
;;; Writing fasl file
;;; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
nregex.fasl
;;; Fasl write complete
; Fast loading
; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
nregex.fasl
;;; Compiling file
;;; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-allegro.lisp
; While compiling FSPEC-DEFINITION-LOCATIONS:
Warning: Variable _N is never used.
Warning: Variable _INTERNAL is never used.
Warning: Variable TOP-LEVEL-FORM is never used.
;;; Writing fasl file
;;; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-allegro.fasl
;;; Fasl write complete
; Fast loading
; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-allegro.fasl
;;; Compiling file
;;; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-gray.lisp
; Autoloading for class FUNDAMENTAL-CHARACTER-OUTPUT-STREAM:
; Fast loading from bundle code/streamc.fasl.
; Fast loading from bundle code/efft-utf8-base.fasl.
; Fast loading from bundle code/efft-void.fasl.
; Fast loading from bundle code/efft-latin1-base.fasl.
;;; Writing fasl file
;;; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-gray.fasl
;;; Fasl write complete
; Fast loading
; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank-gray.fasl
;;; Compiling file
;;; /usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank.lisp
;;; Writing fasl file
;;; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank.fasl
;;; Fasl write complete
Warning: While compiling these undefined functions were referenced:
SWANK::COMPILED-REGEX from position 171961 in
/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank.lisp

SWANK::KEYWORD-ARG.ARG-NAME from position 60969 in
/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank.lisp
; Fast loading
; /Users/civeit/.slime/fasl/2007-04-19/allegro-8.1a-macosx-x86/
swank.fasl
Warning: (METHOD INSPECT-FOR-EMACS #'T), :OPERATOR was defined in
/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-allegro.lisp
and is now being defined in
/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank.lisp
Warning: These Swank interfaces are unimplemented:

(ACTIVATE-STEPPING ADD-FD-HANDLER ADD-SIGIO-HANDLER
PROFILE-PACKAGE REMOVE-FD-HANDLERS
REMOVE-SIGIO-HANDLERS SLDB-BREAK-ON-RETURN
SLDB-STEP-INTO SLDB-STEP-NEXT SLDB-STEP-
OUT
WHO-SPECIALIZES)
T
CL-USER(2): (swank:create-server :port 4005)
;; Swank started at port: 4005.
4005

Tom

unread,
Aug 13, 2008, 10:35:49 AM8/13/08
to Cusp Development
I did not give the Eclipse log, here it is:

!SESSION 2008-08-13 10:32:36.680
-----------------------------------------------
eclipse.buildId=I20080617-2000
java.version=1.5.0_13
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Framework arguments: -keyring /Users/civeit/.eclipse_keyring -
showlocation
Command-line arguments: -os macosx -ws carbon -arch x86 -keyring /
Users/civeit/.eclipse_keyring -consoleLog -showlocation

!ENTRY org.eclipse.ui 2 0 2008-08-13 10:32:38.062
!MESSAGE Warnings while parsing the commands from the
'org.eclipse.ui.commands' and 'org.eclipse.ui.actionDefinitions'
extension points.
!SUBENTRY 1 org.eclipse.ui 2 0 2008-08-13 10:32:38.062
!MESSAGE Commands should really have a category: plug-
in='jasko.tim.lisp',
id='jasko.tim.lisp.actions.ProfileFunctionAction',
categoryId='jasko.tim.lisp.category2'
!SUBENTRY 1 org.eclipse.ui 2 0 2008-08-13 10:32:38.063
!MESSAGE Commands should really have a category: plug-
in='jasko.tim.lisp', id='jasko.tim.lisp.actions.ProfileReportAction',
categoryId='jasko.tim.lisp.category2'
!SUBENTRY 1 org.eclipse.ui 2 0 2008-08-13 10:32:38.063
!MESSAGE Commands should really have a category: plug-
in='jasko.tim.lisp', id='jasko.tim.lisp.actions.ProfileResetAction',
categoryId='jasko.tim.lisp.category2'

!ENTRY org.eclipse.ui.workbench 4 2 2008-08-13 10:32:39.595
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at jasko.tim.lisp.views.ReplView.setFocus(ReplView.java:77)
at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:325)
at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:
622)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at
org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:
617)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:
3487)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:
610)
at
org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:
1228)
at
org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:
1208)
at
org.eclipse.ui.internal.WorkbenchPage.handleDeferredEvents(WorkbenchPage.java:
1384)
at
org.eclipse.ui.internal.WorkbenchPage.deferUpdates(WorkbenchPage.java:
1373)
at org.eclipse.ui.internal.WorkbenchPage.access$14(WorkbenchPage.java:
1364)
at org.eclipse.ui.internal.WorkbenchPage
$15.runWithException(WorkbenchPage.java:3261)
at org.eclipse.ui.internal.StartupThreading
$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
3338)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3067)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:
803)
at org.eclipse.ui.internal.Workbench
$27.runWithException(Workbench.java:1361)
at org.eclipse.ui.internal.StartupThreading
$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:
3338)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3067)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Tom

unread,
Aug 13, 2008, 11:47:58 AM8/13/08
to Cusp Development
Sorry for the previous messages. It sounds odd but without changing
anything it is now working!

By browsing the previous threads it seems somebody had something
comparable to me. I started by trying to specify my Lisp executable in
Eclipse and then I tried to start the swang server manually. During
the latter step I probably properly compiled the slime code. For some
unknown reasons Cusp was not detecting the swank server which was
running in the background. Finally, when I tried again the first
method by specifying the Lisp executable in Eclipse it worked.

So I would recommend to people to load first the swank loader manually
and then to specify the proper Lisp executable in Eclipse.

Now I'm going to play Cusp and see what is working with Allegro CL.

Sergey Kolos

unread,
Aug 13, 2008, 1:44:26 PM8/13/08
to Cusp Development
Great! Please, report any problems you find. Also, please, include
cusp version.

Scott Michel

unread,
Aug 13, 2008, 5:02:01 PM8/13/08
to Cusp Development
Most likely, from what I've seen of the code so far, is that
SwankInterface.java really need to synchronize on the "Swank started"
message as the real indication that your lisp instance has
successfully started. Right now, the code simply sleeps in the hope
that the swank server really has started.

The null pointer exception is merely an indication that the Eclipse
Java side hasn't been able to connect to port 4005. Unfortunately,
there's no way to get the Eclipse interface to reconnect to the lisp
instance, other than restarting Eclipse.


-scooter

Scott Michel

unread,
Aug 13, 2008, 5:05:27 PM8/13/08
to Cusp Development
Typo: s/SwankInterface/ReplView/. Different source file (which I was
hacking before writing this message.)

Tom

unread,
Aug 14, 2008, 1:59:31 PM8/14/08
to Cusp Development
As reported earlier, the swank server is now properly connected to
cusp. However, when I "reconnect" (using the dedicated button) to the
lisp process I now see what might be the initial problem:

Reconnecting...
done.
Warning: Unknown command-line option "--load"
Warning: Unknown command-line option
"/usr/local/eclipse-plugins/cusp-osx-x86/eclipse/plugins/
jasko.tim.lisp_0.9.189/slime/swank-loader.lisp"

SBCL command line syntax uses "--load" but ACL equivalent option is "-
L".

What is a little bit unclear to me is why it now works (once the swank
code is manually compiled). What is the cusp way to call
(swank::create-swank-server 4005) ?

Scott Michel

unread,
Aug 15, 2008, 11:04:09 AM8/15/08
to Cusp Development
The code currently "detects" the SBCL implementation before it
"detects" the ACL implementation. Selecting the lisp implementation
from the preference pane would likely be the better solution (but I'd
really like to get the latest slime/swank implementation working
before attacking that problem.)

Timothy Jasko

unread,
Aug 15, 2008, 9:25:10 PM8/15/08
to cusp-dev...@googlegroups.com
Cusp used to (past tense in that what's in svn no longer does; the
release probably still does) use command line options to get swank
loaded and started. This works fine with SBCL, but it turns out that
none of the other implementations support the same command options, so
now we pipe those things in through the normal input, which should
work far more universally. I'm glad that the older code is working for
you, though.

Scott Michel

unread,
Aug 17, 2008, 10:29:50 PM8/17/08
to Cusp Development
If it's OK by you, that's the next thing I'd like to attack -- better
managing the lisp implementations.


-scooter

On Aug 15, 6:25 pm, "Timothy Jasko" <tja...@bitfauna.com> wrote:
>  Cusp used to (past tense in that what's in svn no longer does; the
> release probably still does) use command line options to get swank
> loaded and started. This works fine with SBCL, but it turns out that
> none of the other implementations support the same command options, so
> now we pipe those things in through the normal input, which should
> work far more universally. I'm glad that the older code is working for
> you, though.
>

Sergey Kolos

unread,
Aug 18, 2008, 3:09:42 AM8/18/08
to Cusp Development
It is something I was always thinking to do (I bet Tim also), but
never had a chance.
It would be great if you can make a progress in this part.

Scott Michel

unread,
Aug 18, 2008, 2:00:50 PM8/18/08
to Cusp Development
Basically what I had in mind was not a radical departure from the
class structure that's there now. Preference pane would be refactored:

(a) Checkbox for "Use preinstaled CUSP Lisp (sbcl version X.Y.Z)"
(b) If (a) is unchecked, you get to choose a particular lisp flavor
(sbcl, acl, clisp, etc.)
(c) You can also check "Remote Lisp Options", to set up SSH

This should give a bit of more control over command line option
handling, lisp invocation, etc. The ultimate goal is to have a single
LispImplementation object that controls the underlying lisp
implementation. Should make connecting, disconnecting, reconnecting
somewhat cleaner.

Of course, I don't have access to all of these lisp variants and would
need help from cooperative testers to support their particular variant
(hint, hint!)


-scooter

Tom

unread,
Aug 20, 2008, 4:48:16 PM8/20/08
to Cusp Development
I have been testing cusp (0.9.245) with ACL 8.1 on Mac OS since the
beginning of this week and it works pretty well. Congratulation for
the great work! I might switch from Emacs to Eclipse soon...
I wanted to test "Use Cusp to Manage Packages" but I do not see any
noticeable difference when I check the box, what should I try ?

FYI I found some small problems or some features which would be nice
to have (note that they do not look specific to ACL as far as I
understand the process):

1) "Find definition" works most of the time but it is sometime wrong
regarding the line number. It always goes to the good file but the
line position may be wrong (which can point to some commented part of
the code).

2) When I Reconnect (using the dedicated button) the previous lisp
process is not killed. I kill them manually from a shell. Actually,
even if I use a single image (no reconnection), the lisp process is
still alive after exiting Eclipse. This is maybe done on purpose but
it would be nice to have some control on it (exit the Lisp process or
not).

3) There is no option to easily start a specific Lisp image. I rarely
start Lisp with the default image. To do that I use an external sh
script which I select as my "Lisp Executable", it looks like:
alisp -I /somewhere/image-01
# alisp -I /somewhere/image-02
# alisp -I /somewhere/image-03
And I comment/uncomment lines to start the wanted image (ACL option "-
I" is the equivalent SBCL "--core" I think).

4) There's a minor bug when the REPL view is maximized and the command
text field is resized, the latter may disappear when the REPL view is
back to its normal size.

5) The indentation rules I am used in Emacs is slightly different
(especially for the "if"). I am not saying to change it but if there's
a way to tune it let me know.

Again, this plugin is really great so thank you for all the efforts!
I'll be pleased to help if you need specific testing for ACL.

Sergey Kolos

unread,
Aug 21, 2008, 9:44:02 PM8/21/08
to Cusp Development
Thanks for testing and reporting it here.

On Aug 20, 9:48 pm, Tom <Civeit.ST...@gmail.com> wrote:
> I have been testing cusp (0.9.245) with ACL 8.1 on Mac OS since the
> beginning of this week and it works pretty well. Congratulation for
> the great work! I might switch from Emacs to Eclipse soon...
> I wanted to test "Use Cusp to Manage Packages" but I do not see any
> noticeable difference when I check the box, what should I try ?

Check out "Working with libraries" section of my tutorial:
http://www.sergeykolos.com/cusp/intro/#libraries
It shows you what you can do if "Use Cusp to Manage Packages" works
with ACL.


>
> FYI I found some small problems or some features which would be nice
> to have (note that they do not look specific to ACL as far as I
> understand the process):
There are still a lot of small bugs - as I use Cusp and as time allows
I try to eradicate them (but unfortunately some of the bugs somehow
find their way back - I suspect due constant changes in swank
interface)


> 1) "Find definition" works most of the time but it is sometime wrong
> regarding the line number. It always goes to the good file but the
> line position may be wrong (which can point to some commented part of
> the code).
Hard to pinpoint - if I find this behavior in my use, I'll fix try to
fix this, or you can try to describe exactly how to replicate it.

>
> 2) When I Reconnect (using the dedicated button) the previous lisp
> process is not killed. I kill them manually from a shell. Actually,
> even if I use a single image (no reconnection), the lisp process is
> still alive after exiting Eclipse. This is maybe done on purpose but
> it would be nice to have some control on it (exit the Lisp process or
> not).
This is constant problem with Cusp. As I understand it Tim spent quite
a bit of effort to fix this, but it still happens more often than we
want.


>
> 3) There is no option to easily start a specific Lisp image. I rarely
> start Lisp with the default image. To do that I use an external sh
> script which I select as my "Lisp Executable", it looks like:
>   alisp -I /somewhere/image-01
>   # alisp -I /somewhere/image-02
>   # alisp -I /somewhere/image-03
> And I comment/uncomment lines to start the wanted image (ACL option "-
> I" is the equivalent SBCL "--core" I think).
This feature makes sense - I am going to add it soon.


> 4) There's a minor bug when the REPL view is maximized and the command
> text field is resized, the latter may disappear when the REPL view is
> back to its normal size.
I spent a lot of time trying to fix it, but from what I remember there
was a bug in Eclipse, which did not let the fix work. If the bug in
Eclipse was fixed my old code might work - I need to check that.


>
> 5) The indentation rules I am used in Emacs is slightly different
> (especially for the "if"). I am not saying to change it but if there's
> a way to tune it let me know.
I don't know how indentations are done in Cusp - it think it was coded
by Tim.

Sergey Kolos

unread,
Aug 21, 2008, 9:53:01 PM8/21/08
to Cusp Development
> > 4) There's a minor bug when the REPL view is maximized and the command
> > text field is resized, the latter may disappear when the REPL view is
> > back to its normal size.
>
> I spent a lot of time trying to fix it, but from what I remember there
> was a bug in Eclipse, which did not let the fix work. If the bug in
> Eclipse was fixed my old code might work - I need to check that.

Just checked - it looks like the bug in Eclipse was fixed, so I
committed changes that should resolve this problem.

Timothy Jasko

unread,
Aug 21, 2008, 10:49:46 PM8/21/08
to cusp-dev...@googlegroups.com
On Wed, Aug 20, 2008 at 4:48 PM, Tom <Civeit...@gmail.com> wrote:
>
> I have been testing cusp (0.9.245) with ACL 8.1 on Mac OS since the
> beginning of this week and it works pretty well. Congratulation for
> the great work! I might switch from Emacs to Eclipse soon...
> I wanted to test "Use Cusp to Manage Packages" but I do not see any
> noticeable difference when I check the box, what should I try ?

If it didn't complain, that's promising.
This makes the REPL's "Load Installed Packages" button work.
Basically, Cusp tells your lisp implementation about all of the
libraries in its library folder, and will also provide you with a list
of them. Sometimes, we even tell you what they do! It makes it so you
don't have to worry about linking to asd files, which is especially
good on windows where that's impossible, and enables us to more easily
distribute a wide range of lisp libraries.

> FYI I found some small problems or some features which would be nice
> to have (note that they do not look specific to ACL as far as I
> understand the process):
>
> 1) "Find definition" works most of the time but it is sometime wrong
> regarding the line number. It always goes to the good file but the
> line position may be wrong (which can point to some commented part of
> the code).

Technically, this is more a Slime bug, but in truth, keeping track of
where a thing is defined is delegated to the lisp implementation. It
is, unfortunately, an inexact science, since in the lisp world there's
no real guarantee that your source lines up with what's actually in
the image. One could wish for a more intelligent editor, but macros
get in the way here, because how do we know what defmyspecialthing is
really doing?

As it is, a lot of guesswork is involved. Slime tells us the file and
line it thinks stuff is at, and gives us a snippet of the code as it
remembers it. We try to match that, but usually end up jumping to the
closest instance of the symbol being searched for. It's not perfect,
and if anyone has a better system, I'm all ears.

> 2) When I Reconnect (using the dedicated button) the previous lisp
> process is not killed. I kill them manually from a shell. Actually,
> even if I use a single image (no reconnection), the lisp process is
> still alive after exiting Eclipse. This is maybe done on purpose but
> it would be nice to have some control on it (exit the Lisp process or
> not).

This is a long-standing bug that has plagued me from the beginning.
Sometimes, I am able to consistently kill the process on one platform,
but it continues to hang around on a different one. I wish I had a
solution. Java's process.kill() doesn't do the trick, I know that
much.

> 3) There is no option to easily start a specific Lisp image. I rarely
> start Lisp with the default image. To do that I use an external sh
> script which I select as my "Lisp Executable", it looks like:
> alisp -I /somewhere/image-01
> # alisp -I /somewhere/image-02
> # alisp -I /somewhere/image-03
> And I comment/uncomment lines to start the wanted image (ACL option "-
> I" is the equivalent SBCL "--core" I think).

If command line options don't currently work for the custom lisp
executable, that would certainly be a good thing to add. Although if
your problem is that you often use different command line options, I'm
not sure what the best solution is. Perhaps we can store multiple
possible lisp implementations to start, instead of just one at a time?

> 4) There's a minor bug when the REPL view is maximized and the command
> text field is resized, the latter may disappear when the REPL view is
> back to its normal size.

Yes, this is annoying and needs to be fixed.
... and it looks like Sergey just did. Huzzah!

> 5) The indentation rules I am used in Emacs is slightly different
> (especially for the "if"). I am not saying to change it but if there's
> a way to tune it let me know.

In the case of if, it seems match up with the behavior of my copy of
Emacs, inasmuch as they both indent 4 spaces for me. How were you
expecting it to behave?

As a general rule, though, I'd say any point where we don't match up
to emacs indentation should be considered a bug and fixed. That's the
de facto standard.

> Again, this plugin is really great so thank you for all the efforts!
> I'll be pleased to help if you need specific testing for ACL.

Indeed, I don't use Allegro, so it's pretty much up to users like you
to keep it in sync. Happily, most of the heavy lifting is done by the
Slime folks.

Sergey Kolos

unread,
Aug 28, 2008, 7:02:28 PM8/28/08
to Cusp Development
Tom,

Can you check if the following bug is still present with ACL?

http://cusp.devjavu.com/ticket/4

Thanks

On Aug 20, 9:48 pm, Tom <Civeit.ST...@gmail.com> wrote:

mikel evins

unread,
Aug 29, 2008, 12:06:58 AM8/29/08
to Cusp Development
I'm pretty interested in trying Cusp, but I've never yet been able to
get it to see any of the Lisps I have installed on my Mac OS X system
(OS X version 10.5.4 on 64-bit Intel; SBCL, Clozure CL, and Allegro CL
Enterprise). I've tried every sequence of things to try that I could
find anywhere on the web; all I ever see is the message "Cusp was
unable to connect to your lisp instance. Please try restarting
Eclipse."

So accustomed to it failing have I become that I expect no solution to
be found, but figured, what could it hurt to ask about it? So if
anyone can think of anything obvious to try that I have somehow
overlooked, I'll be glad to learn of it.

Scott Michel

unread,
Aug 29, 2008, 6:50:43 PM8/29/08
to Cusp Development
Mikel:

I'm working on reimplementing the "Implementations" preferences to
accommodate a bunch of different CLs (SBCL having the highest
priority, since that's the preloaded CL for newbies, but looking to
support CLISP and ACL as well.)

It's going slowly, because my department director (boss) got promoted
and I'm the acting department director running things at the moment. I
haven't been able to get things down to where I can have a research
day off (normally Friday for me).

I am also giving thought into how Repl should connect and disconnect
new Lisp instances to support what you need.

I am working on the problem, if you can be a little patient. Just
don't ask me for the exact "when" I'll have something to commit to the
cusp repository, since this is also the busy time when we're
approaching the end of the fiscal year.


-scooter

Sergey Kolos

unread,
Sep 14, 2008, 8:22:40 PM9/14/08
to Cusp Development
> 1) "Find definition" works most of the time but it is sometime wrong
> regarding the line number. It always goes to the good file but the
> line position may be wrong (which can point to some commented part of
> the code).

Fixed by changeset [356] - now "Find definition" is smart not to match
definitions
in strings or comments.

Sergey Kolos

unread,
Sep 14, 2008, 8:26:07 PM9/14/08
to Cusp Development
My latest reply did not show up here - I think I hit reply to author
rather than just Reply - my apologies.


> 1) "Finddefinition" works most of the time but it is sometime wrong
> regarding the line number. It always goes to the good file but the
> line position may be wrong (which can point to some commented part of
> the code).

Fixed by changeset [356] - now find definitions is smart enough not to
look for matches in strings or comments.

Tom

unread,
Sep 16, 2008, 11:21:03 AM9/16/08
to Cusp Development

Sorry for the long delay to answer, I had to work on non-lisp projects
but I am now back to cusp testing.

First I tried the latest cusp 0.9.360 and it did not work, there's no
way to start the lisp REPL and since all the files are packed into the
jar file I cannot use the old method which is to manually load "swank-
loader.lisp" (that's the only successful method I know to have cusp
working with ACL). Once I install cusp 0.9.360, Eclipse hangs forever
if I am trying to see a Lisp project or if I try to change the
Preferences, so I am stuck pretty early in the process.

So I am back to cusp 0.9.245 (I am not familiar with the cusp building
process so I use prebuilt versions from the Eclipse update site).

The good thing is that was able to perform all the "Library tutorial",
loading split-sequence etc worked for me using ACL.

Regarding the "if" indentation, I think that what you describe might
be the standard. However, ACL provides the "eli" (Emacs Lisp
Interface) which uses 4 spaces for the first statement and then 2
spaces for the second statement. I am used to the ACL eli convention,
that's why it confuses me a little bit.

My next goal is to test a most recent cusp version that may work with
ACL, something between 0.9.245 and 0.9.360.

To mikel: I have a pretty similar configuration and cusp works for me,
try:
1) Install cusp 0.9.245 (You can remove the SBCL part)
2) Start in a shell "alisp" and (load "...../swank-loader.lisp"). The
latter is in the cusp plugin directory.
3) Now start Eclipse and in Preference > Lisp >Implementation check
"use a sitewide lisp installation" and set your ACL lisp executable.

Sergey Kolos

unread,
Sep 16, 2008, 11:49:45 AM9/16/08
to Cusp Development
> First I tried the latest cusp 0.9.360 and it did not work, there's no
> way to start the lisp REPL and since all the files are packed into the
> jar file I cannot use the old method which is to manually load "swank-
> loader.lisp" (that's the only successful method I know to have cusp
> working with ACL). Once I install cusp 0.9.360, Eclipse hangs forever
> if I am trying to see a Lisp project or if I try to change the
> Preferences, so I am stuck pretty early in the process.

Oops, sorry - my bad. Archive file for 0.9.360 is broken - I'll fix it
later today. But you might try to install this version using eclipse
update feature - it should unpack jar files so that you have access to
swank-loader.lisp.

Tom

unread,
Sep 17, 2008, 3:52:27 PM9/17/08
to Cusp Development
To answer your question, I just tested Cusp 0.9.360 for ticket #4

-> If I start Eclipse and open a Lisp project this starts an "alisp"
process. When I exit Eclipse, the process is killed. Good.

-> I tried to reconnect several times to the Lisp image. If I
reconnect 5 times, they are 6 "alisp" processes running. When I exit
Eclipse, 2 processes are killed but the other 4 are still alive. If I
reconnect 1 time, the 2 processes are properly killed when I exit. So
it seems the number of processes to kill is limited to 2, which does
not make sens.

Sergey Kolos

unread,
Sep 17, 2008, 4:07:04 PM9/17/08
to Cusp Development
Thanks for the test. I'll update ticket with this info, but we'll look
into it
after the 1.0 release.

Patrick Conrad

unread,
Oct 29, 2008, 8:10:44 PM10/29/08
to Cusp Development
I'm starting to use lisp for research and I'd love to get it working
under eclipse, but we're tied to the ACL build system, so I need that
to work. With any luck, once I have it sorted out, I can get a few
people from my lab to start using it this way also.

My problem is the obvious one; cusp isn't finding swank. I've tried:
1) Running a swank server in a separate console and then running
eclipse. This gets me a null-pointer error.
2) Under 9.245, pointing to alisp and checking "sitewide." This causes
an alisp instance to pop up, but then eclipse stops responding. I've
tried loading/starting swank. I've also had alisp open already,
separately, and have loaded and/or started swank.
3) Under 9.390 done the same, but it opens the window when eclipse
starts (the loading splash screen) and then crashes eclipse.

It wasn't clear if the later version would work, since you mentioned
doing that other bug testing below, so I tried both.

It's acting like it expected that window to close and return control
to eclipse after swank started, but that it didn't happen. It doesn't
seem to matter if I do anything in the alisp that pops up or if I
close it. I didn't specify a startup file - should there be one that
starts swank? I will need to load a startup script eventually, but I
figured it was easier not to for now.

I would be grateful any assistance, and hopefully I'm just not
following directions properly so it'll be easy.

Patrick

Tom

unread,
Nov 4, 2008, 9:43:58 AM11/4/08
to Cusp Development
Hi Patrick,

Here is my current configuration:

-> I installed cusp 0.9.360 from the archive:
http://www.sergeykolos.com/cusp/archive/

-> Since the Slime package included in 0.9.360 does no work with ACL I
replaced the Slime directory with the one from cusp 0.9.245.

This works for me (Mac OS 10.5.5 and Eclipse 3.4.0). When installing,
I recommend to always delete your existing Slime directory:
~/.slime/
I did not have to compile swank separately, it does it when cusp
starts in Eclipse the first time.

My parameters in Eclipse are:
Check: use a Lisp sitewide installation
Lisp executable: your/path/here/alisp
Select: Slime style Build (I prefer it)
Check: Use Cusp to manage Libraries
Check: Use LispUnit

When testing, if possible start Eclipse in a shell to monitor how the
swank server initializes (remember to delete the .slime directory for
each test).

I just saw that a more recent version of Cusp is available (0.9.390).
I did not test it yet but I will try it very soon I think.

Patrick Conrad

unread,
Nov 5, 2008, 4:13:22 PM11/5/08
to Cusp Development
Okay, that is what I've tried to do and it doesn't work thus far. I've
got CUSP running from source and I've found the place in
SwankInterface where it starts the lisp process. The console shows
that it runs through a few attempts while failing to get the "Swank
started" that it's looking for. I definitely know how to get swank to
run, but I'd like to see what data is pushed between alisp and cusp
over stdOut, stdErr, and commandInterface. Essentially, I can't see
anything that's happening, so I don't know what error swank is
throwing. Because of that, I'm not quite convinced that the data sent
to the commandInterface actually goes anywhere, but perhaps I'm being
more skeptical than I should be.

I guess these are a questions for one of the better java developers.
Is there a way I can test that the link to the child process is
established correctly? I'd love to just run something simple like (+ 2
3) and see that I get the right response back across the link. Second,
how do I get it to show me what comes back (hopefully the errors) when
you try to run swank? Given those two things, I think I can figure out
how to adjust the swank calls and get cusp working. I'd really
appreciate any help you guys can provide.
Reply all
Reply to author
Forward
0 new messages