Re: Clojure as scripting language in a Java Application

2011-11-29 Thread iamcreasy
Thank you. This one looks great! On Nov 6, 5:21 am, Tal Liron tal.li...@gmail.com wrote: I'll plug Scripturian here, a library I wrote that has very good thread-aware support for embedding Clojure, as well as other JVM languages (JavaScript, Python, Ruby, PHP, Groovy):

Re: Clojure as scripting language in a Java Application

2011-11-05 Thread Tal Liron
I'll plug Scripturian here, a library I wrote that has very good thread-aware support for embedding Clojure, as well as other JVM languages (JavaScript, Python, Ruby, PHP, Groovy): http://threecrickets.com/scripturian/ I just recently wrote a detailed tutorial for it, which was missing for a

Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
I am going to make a game framework using jMonkeyEngine.site :: jmonkeyengine.com I want to include live modification / any kind of end user modification of the game through writing script. At first I was a bit biased towards Groovy but now I want to integrate clojure as scripting language in my

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Chas Emerick
Do you need to use JSR-233? I can see that being useful if you aim to have multiple scripting languages available in the game. I don't know what the functional status of clojure-jsr233 is, but I doubt it would take much to bring it up to part in any case. However, if Clojure will be the only

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Sean Corfield
As Chas says, RT.var() is probably your easier point of entry here. I use Clojure as a scripting language within a JVM-based application (not Java, but it uses Java interop to access Clojure) and the patterns I use are: * clojure.lang.RT.var( the.namespace, some-name ) - get a reference to

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
You can even consider a live scripting facility (while the game's running) with the repl and some api to access your game's state. All of those functions are available. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Sean Corfield
On Thu, Nov 3, 2011 at 4:40 PM, Gary Trakhman gary.trakh...@gmail.com wrote: You can even consider a live scripting facility (while the game's running) with the repl and some api to access your game's state.  All of those functions are available. I'm a bit fuzzy on how to enable an application

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
For the parent's post, it might be more useful to directly have a repl instead of connecting to an outside one. I don't have any ideas on-hand about it, but i'm interested in finding out. I've been thinking it would be cool to have the repl for exploratory java dev work, even in projects that

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
http://clojure.github.com/clojure/clojure.main-api.html#clojure.main/repl On Thu, Nov 3, 2011 at 7:56 PM, Gary Trakhman gary.trakh...@gmail.com wrote: For the parent's post, it might be more useful to directly have a repl instead of connecting to an outside one.  I don't have any ideas on-hand

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Chas Emerick
Indeed, if you have stdin/out, then you can use clojure.main/repl and be on your way. If you don't, you'll need to start an nREPL server, and connect to that using an nREPL client. That actually has some advantages even if you do have stdin/out (multiple sessions, for one), but I wouldn't say

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
Most probably I replied your post using Reply to author instead of using Reply :( On Nov 3, 10:53 pm, Sean Corfield seancorfi...@gmail.com wrote: As Chas says, RT.var() is probably your easier point of entry here. I use Clojure as a scripting language within a JVM-based application (not Java,

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
I might have replied to you instead of posting here. Used the Reply to author button instead of Reply :( On Nov 3, 10:17 pm, Chas Emerick cemer...@snowtide.com wrote: Do you need to use JSR-233?  I can see that being useful if you aim to have multiple scripting languages available in the game.

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
Sorry, I dont get the part of advantages even if you do have stdin/ out (multiple sessions, for one) The main thing I am getting here is, that a clojure receiving(to a particular port) end is attached with my game and there is another stand along clojure REPL program which would send commands to

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
that's one way to do it, the other way is the direct way I mentioned via clojure.main/repl On Thu, Nov 3, 2011 at 9:47 PM, iamcreasy quazir...@gmail.com wrote: Sorry, I dont get the part of advantages even if you do have stdin/ out (multiple sessions, for one) The main thing I am getting here

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
That's what I had in my mind. I was thinking about implementing a console(like old quake days) and the clojure script would be executed its written and pressed ctrl+enter. Behind there would be live update of the game scene graph. On Nov 4, 5:56 am, Gary Trakhman gary.trakh...@gmail.com wrote:

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
indeed On Thu, Nov 3, 2011 at 9:48 PM, iamcreasy quazir...@gmail.com wrote: That's what I had in my mind. I was thinking about implementing a console(like old quake days) and the clojure script would be executed its written and pressed ctrl+enter. Behind there would be live update of the game

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Gary Trakhman
Just don't get to the end of developing your game in java before you start playing with clojure. You might slap yourself and decide to rewrite it in clojure :-). -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread iamcreasy
I was playing with Groovy yesterday. It was just several hours of work to read through the important parts and took only a few attempts to successfully load a complete level written in Groovy. :( Had to decide which one to pick. If I pick groovy, i will be always stuck with Imperative family,

Re: Clojure as scripting language in a Java Application

2011-11-03 Thread Armando Blancas
There are two libs with that name; I maintain the one in google code. In case that's the one you found, here's a status. It supports the spec, but there are two differences described in issues #4 and #5 (#3 is fixed) that arise from the spec's assumption that you'll use an interpreter. Works with