Blog = News

0 views
Skip to first unread message

Gorsal

unread,
Oct 28, 2009, 11:52:14 PM10/28/09
to ECusp
Alright, so I shall post news here to reassure whoever is following
that stuff is happening! Actually, its mainly to
state that I'm going to do something and then, as a result of stating
it publicly, actually encouraging me to develop faster. Well one of
them anyways:)

K, so one of my goals is to make developing easier so that it makes
contributing easier. To that goal, i have made, one must make the
supposedly easy rather trivial. This includes key bindings, menu
items, etc. So i have added a preliminary macro abstraction which
generates xml for plugin.xml which I can just paste in. As I now
continue to develop the areas described below, this will expand. Right
now, heres a sample:

;;create xml
(with-xml 2
;;creation of key binding
(ecommand :name "Key Handle" :id "rcp.KeyHandle" :defaultHandler
"rcp.KeyHandle")
(easy-key-bind "Ctrl+R" :window "rcp.KeyHandle")
;;creation of menu and menu item
(ecommand :name "Exit" :id "rcp.exit" :defaultHandler
"rcp.ExitHandle")
(easy-menu "File" ["fileMenu" :main]
("Exit" "rcp.exit" :tooltip "Exit Application")
(separator :visible true)))
;;create classes
(ns rcp.test-handlers
(:import (org.eclipse.ui.handlers HandlerUtil))
(:use rcp.handlers))

(new-handler-class rcp.ExitHandle event
(.close (HandlerUtil/getActiveWorkbenchWindow event)))
(new-handler-class rcp.KeyHandle event
(println event))


Anyways, so the following you should expect very soon (like tomorrow
at night some time:))
-Completion of LispSwankLoader which will basically involve changing
this
http://github.com/jochu/swank-clojure
into a client.

In addition, I have to make some minor changes to the current lisp
loading/swank loading and waiting. Really minor. For those interested,
this is currently what the code is to launch lisp and wait for swank
to load.

(let [lisp (new-lisp :sbcl
"C:/Program Files/Steel Bank Common Lisp/1.0.29/sbcl.exe"
'("--core" "C:/Program Files/Steel Bank Common Lisp/
1.0.29/asdf/sbcl.core")
'("SBCL_HOME" "C:/Program Files/Steel Bank Common Lisp/
1.0.29/"))
swank (new-swank :sbcl "(load \"C:/Seth/slime/swank-loader.lisp
\")" 4040)]
(.join (second (launch lisp swank))))

Phil Marneweck

unread,
Oct 29, 2009, 12:51:42 AM10/29/09
to ec...@googlegroups.com
Kewl looking foward to the changes

Gorsal

unread,
Oct 29, 2009, 11:16:02 PM10/29/09
to ECusp
Alright, so update. I've pretty much had success. You can see it as
swank-client in github. Now, on saturday night, I will have integrated
the new swank and lisp loading.... Then we shall see if ecl lisp is
any stable using joshua swank-clojure converted to client!...

Gorsal

unread,
Oct 31, 2009, 8:11:56 PM10/31/09
to ECusp
Alright so i didn't manage yet to integrate the swank. I did however
improve swank-client and added some features. To tell the truth, while
considering whether or not to start porting, i decided that in the
long run it would be more productive to simply do it the way i
originally planned, from scratch, and building everything up in
clojure rather than attempt to try to get it to work with the java
version. In the short run, this is probably not a good idea because
itll take longer but... Lets see, the daily code sample which
demonstrates jochu's clojure-swank as a client, just in case someone
is interested.
----------------------------------------------------------------------------------------------------------------
;;Connecting to host 127.0.0.1 and port 4040. Tell lisp to evaluate
something and receive it back!
(ns client.example
(:use
client.swank
client.lisp.core client.lisp.utils))
(defn client-decide [event conn]
"This will receive all communications that come from lisp!"
(with-catch
(print-swank-in "~A" event)))

(def *swank*
(start-lisp-client
nil
#'client-decide
:host "127.0.0.1" :port 4040))
(emacs-rex *swank* "(cl::print 'hi)") ;;tell lisp to evaluate this and
send the result back!
;;-->client-decide receives it and prints what was sent back!
----------------------------------------------------------------------------------------------------------------
So. Tomorrow thee shall see a new repository which will be the start
of the total port to clojure! It shall contain a cusp-like REPL
written entirely in clojure plus a progress bar which is initiated
when lisp starts to load (and don't forget those cute buttons on the
repl). This will be available both using an eclipse view and a
netbeans view (because i realllly want it available in netbeans.).
[crosses fingers]

Phil Marneweck

unread,
Nov 1, 2009, 9:01:35 AM11/1/09
to ec...@googlegroups.com
Dewd I lost you and wont have time to look at the new stuff for a couple
of days because I will be at a conference.

Maybe now is a good time to put get together a system diagram of some
sort just to show the components of the system with a rough definition
of each component with its responsibilities.

Phil Marneweck

unread,
Nov 5, 2009, 7:00:03 AM11/5/09
to ec...@googlegroups.com
Gorsal where is that new repository (the clojure one) you where talking
about?

I finally have some time again.

Gorsal

unread,
Nov 5, 2009, 8:37:42 AM11/5/09
to ECusp
Sorry, i haven't yet made the repository. I know I said i would, but..
I've only done some stuff with the gui, i have a view in an rich
client platform (so i don't have to wait for the other eclipse junk to
load) of a split styled text using miglayout. Yesterday i looked at
antlr and a bunch of examples, and now im looking at parsley, trying
to decide which one to use for the editor.

Phil Marneweck

unread,
Nov 5, 2009, 11:00:36 AM11/5/09
to ec...@googlegroups.com
Ok thats fine I just thought I would look at the stuff while I had a
moment. I will finish my weblocks postmodern store then in the mean
time.

No pressure dewd...;)

Phil Marneweck

unread,
Nov 11, 2009, 6:47:45 AM11/11/09
to ec...@googlegroups.com
Hi

Is there something special I have to do to see trace information in the
repl or console or where ever?

I figured out that if I start ecusp in the console then I get the trace
information in the console but that is horribly formated and a pain to
read.

If there is an known issue with trace, where in the code must I have a
look to see if I can fix it while we wait for the new framework.

Setting a watch does also not seem to work.

Any ideas?


Gorsal

unread,
Nov 11, 2009, 8:42:49 AM11/11/09
to ECusp
Alright, the problem is in ReplView.java
line 1569
in method fillDebugTree.

It filters out all traces which contain the word 'swank:' in it.
Actually, it breaks when it finds such.
Perhaps you should determine which backtraces you would like not
filtered out and then i or you can fix it.

Phil Marneweck

unread,
Nov 12, 2009, 3:26:52 PM11/12/09
to ec...@googlegroups.com
Hi
Sorry I am only getting back to you now...just been drowned in work..

I will have a look at this tommorow and see if I can make any headway
and let you know what happens.

Gorsal

unread,
Nov 18, 2009, 10:02:00 AM11/18/09
to ECusp
Just thought it was fair to let anyone know, Im not working much on
this because it is not too much of a priority now that Im getting
interested in other things. However, I will continue
to work on it cause it is pretty interesting. Below is sort of the
outline that will be done. The current goal is to get Antlr parsing
available.

-antlr parser
-support
-adding support to ccw a console which will connect to the cusp
clojure server so that i can dynamically modify code.
-workbench untilities to get current eclipse items
including Display, Editor, LispEditor, and being able
to open/reopen editor or just refresh it (so that i can create a
tokenscanner and see if it works by refreshing editor)
-learn how to dynamically change TokenScanner of an editor.
-New TokenScanner based on ccw plugin code (except in clojure)
-create prototype
-hook up to editor
-first use a single color for all 'tokens', like special forms,
etc.
-then create a color per appropriate token
-print out toplevel parentheses balancing (the toplevel forms is
tracked by parser)

Phil Marneweck

unread,
Dec 1, 2009, 12:29:31 AM12/1/09
to ec...@googlegroups.com
I finally got round to looking at this but when I run the project in
debug the trace information is displayed correctly by DisplayRunnable.
The trace never even gets to the code you indicated. The code you
indicated is hit on loading lisp ans swank on start up.

Any Ideas?


On Wed, 2009-11-11 at 05:42 -0800, Gorsal wrote:

Phil Marneweck

unread,
Dec 1, 2009, 12:30:55 AM12/1/09
to ec...@googlegroups.com
I down loaded the latest source and I have some problems with compiling
pluginXML.clj. I had to move some "child" functions to the top of the
file else I got unable to resolve symbol all over the place.

I still have one unresolved error --> unable to resolve symbol: genstr

(defmacro separator [& args]
(with-defaults (args (:name (genstr "separator")))
`[:separator ~args]))

I cant find a definition for genstr in the source, is it a clojure
function?



Phil Marneweck

unread,
Dec 1, 2009, 12:56:43 AM12/1/09
to ec...@googlegroups.com
Well I buildt the plugin from source and the trace now works. Strange
but true.

Gorsal

unread,
Dec 1, 2009, 9:59:21 AM12/1/09
to ECusp
Interesting. For pluginXML.clj, you can just comment the whole file
out with (comment ...code here...)

Phil Marneweck

unread,
Dec 3, 2009, 3:32:16 AM12/3/09
to ec...@googlegroups.com
Why do we have our own swank in cusp/ecusp where there changes to swank
to make it work with cusp?

I am getting diferences in behavior between emacs and cusp, especially
when compiling.

Talking about compiling cusp disconnects when a long comiple is run.

Gorsal

unread,
Dec 3, 2009, 9:34:59 AM12/3/09
to ECusp
We don't have our own swank. What we do have is the code to
communicate wiith the swank protocol to the swank that is running on
the lisp instance. It opens a port to communicate with lisp and swank
accepts the connection. Can u say what the differences are? I've also
had long compiles running but they haven't disconnected atleast on
sbcl.

Phil Marneweck

unread,
Dec 3, 2009, 10:58:40 AM12/3/09
to ec...@googlegroups.com
There is a slime directory under the cusp directory and cusp uses that.
If I delete that directory cusp cant connec tto lisp.

If I compile pretty-streams in emacs cusp complains about some format
and then wants to recompile it and the other way round emacs complains.
So something is different in the compile and as far as I know its slime
that takes care of the compile is it not?


If you have weblocks on your machine try loading weblocks.asd and then
load weblocks-test.asd. After some time(not even minutes) the lisp
disconnects.

Gorsal

unread,
Dec 3, 2009, 12:54:51 PM12/3/09
to ECusp
Yeah, the slime directory is needed because lisp loads swank up from
it. Im guessing that cusp vs emacs is using a different coding format.
Cusp requests that slime uses unicode for the communication stream
while emacs by default uses something else (some iso format).
I'll take a look at weblocks sometime this week once im free, dont
actually have it.

Phil Marneweck

unread,
Dec 3, 2009, 1:35:45 PM12/3/09
to ec...@googlegroups.com
Should cusp not just pick up slime from the library directory or the
enviroment setting or something like that? Then we dont slug around an
out of date slime.

These are ny emacs settings for slime:

(set-language-environment "UTF-8")
(setq slime-net-coding-system 'utf-8-unix)

On another topic, what settings should I set to get the same indention
scheme as used in emacs or can it not be done?

Gorsal

unread,
Dec 3, 2009, 3:04:04 PM12/3/09
to ECusp
There are currently no settings unless you mean changing the source
code. Cusp uses the indentation sent over by slime for special forms
and built in lisp macros. I forget what it does otherwise. What
specifically is not indenting the same?

Gorsal

unread,
Dec 3, 2009, 5:41:03 PM12/3/09
to ECusp
So i compiled weblocks. it worked after i changed some typos in the
source code. No funny disconnecting. Perhaps you could provide more
info on where it disconnects? Admittedly i couldn't get the demo to
compile some funny compile error.

Phil Marneweck

unread,
Dec 4, 2009, 12:55:06 AM12/4/09
to ec...@googlegroups.com
I mean we should change the source code or add settings. I just wanted
to know if there was some other reason(s) for its existence before I
went and changed it.

Well everything is indenting differrently, this could maybe just be the
size of the tab indention, but if I use tab indention on a file that
came from emacs git shows every line as having changed which makes for
messy change logs.

Phil Marneweck

unread,
Dec 4, 2009, 7:35:36 AM12/4/09
to ec...@googlegroups.com
Hi

I added the swank-loader.lips to the preference screen so I can now use
the swank installed with the rest of my lisp stuff.


I tried to push but I cant authenticate do I need your ssh key or my
own?

Gorsal

unread,
Dec 4, 2009, 10:17:14 AM12/4/09
to ECusp
you should be able to push with your own public key to ejasko.tim.lisp
repository since youre a collaborator.

Gorsal

unread,
Dec 19, 2009, 12:12:33 PM12/19/09
to ECusp
So ive of late been defecting to slime and emacs. Now that i get used
to it it is just great! Keys can be rebound to anything, downloading
new lisp libraries is trivial if you set up your .emacs file
correctly, etc. You can rebind a key to 'update' your central-registry
for your asdf, browse your files in a (albeit crummy) small window
which is nevertheless effective.

So I guess my point is that if youre just starting and want to 'get'
slime, i can help with setting up a nice emacs file, point out where
to learn the basics, etc. anyways, hope you have a merry chirstmas!
See ya

Reply all
Reply to author
Forward
0 new messages