Can't get the debugger cdt run

2011-11-30 Thread svenali
Hello all,

I try to get the cdt debugger running and fail. I've build the cdt
with leiningen and have this jar file in my classpath. A simple (use
'cdt.break) work. But if I want to use com.georgesjahad.cdt I get the
following error message:

= (use 'com.georgesjahad.cdt)
#FileNotFoundException java.io.FileNotFoundException: Could not
locate com/georgesjahad/cdt__init.class or com/georgesjahad/cdt.clj on
classpath: 

But a
= (use 'cdt.ui)
nil

work.

Where is my problem?

regards,
Sven

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How can we Laucnh REPL from java Swing application?

2011-11-30 Thread svenali
Hi,

you could do it in a way counterclockwise does. You can implement a
repl that listening at an arbitrary port like doing this:

(ns de.svenali.education.inES.tools.repl
(:require clojure.main)
(:import (java.io InputStreamReader PrintWriter)
  (java.net ServerSocket Socket)
  (clojure.lang LineNumberingPushbackReader))
(:gen-class
  )
)

(defn do-on-thread
   Create a new thread and run function f on it. Returns the thread
object that
was created.
   [f]
   (let [thread (new Thread f)]
  (.start thread)
  thread))

(defn socket-repl
   Start a new REPL that is connected to the input/output streams of
socket.
   [socket]
   (let [socket-in (new LineNumberingPushbackReader
(new InputStreamReader
 (.getInputStream socket)))
   socket-out (new PrintWriter
   (.getOutputStream socket) true)]
  (binding [*in* socket-in
*out* socket-out
*err* socket-out]
(clojure.main/repl

(defn start-repl-server
   Creates a new thread and starts a REPL server on listening on
port. Returns
the server socket that was just created.
   [port]
   (let [server-socket (new ServerSocket port 0)]
  (do-on-thread #(while true (socket-repl (.accept server-
socket
  server-socket))

You have to start this in your swing app. Then you can connect with
standard java sockets to this repl.

regards,
Sven

On 28 Nov., 22:56, Stuart Sierra the.stuart.sie...@gmail.com wrote:
 You can certainly run a REPL in a Swing GUI app. I'm not aware of any
 standalone Swing widgets to do this, but you could look at Clooj for
 an example:https://github.com/arthuredelstein/clooj

 -Stuart Sierra
 clojure.com

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en