I've got a related question: how do you embed Clojure into an existing
application? If I'd like to provide a clojure console in an
application how do I do the following things:
1. Start a REPL - I guess that this can just be done with
clojure.main.main(String...)
2. Redirect STDIN/OUT/ERR so that I can hook the REPL up to, say, a
JTextPane.
3. Set up variables for the console to use?
Ideally I'd like to do something like the following (not real code):
Clojure clojure = new Clojure();
clojure.setIn(myReader);
clojure.setOut(myWriter);
clojure.set("*domain-object-1*", myDomainObject);
clojure.set("*domain-object-2*", myOtherDomainObject);
to let the user interact with the REPL.
Anyone have examples of something like this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---