Re: Installing Clojure on Windows 7
I guess I don't understand what's so difficult about getting Clojure, or Light Table, to work on Windows (7). I literally just installed the JDK, put the bin directory of it on my $PATH, and with that alone, Light Table will work just fine. I then downloaded the Leiningen batch file and put it on my $PATH, as well. I only encountered one compatibility issue dealing with uberjars, but I opened a ticket for Leiningen and it was promptly fixed. I've done this with both JDK 1.6 and 1.7. As far as Light Table's state, it's definitely under development but I haven't encountered any editing tasks that it can't perform. Ryan On Sunday, January 27, 2013 2:10:01 PM UTC-6, puzzler wrote: I haven't had any luck getting Light Table to work on Windows 7, and it's still in a very rough state. I wouldn't recommend it at this time. -- -- 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: Installing Clojure on Windows 7
It's actually pretty simple, if you decide to use leiningen and light table, the editor. All you have to do is install the JDK (decline the JRE option, when it asks) and then put leiningen and light table on your system path. You're done. Leiningen and light table will download dependencies as needed, including Clojure. Ryan On Thursday, January 24, 2013 11:56:59 AM UTC-6, sampso...@googlemail.com wrote: Apparently installing a development environment for Clojure on Windows 7 is very difficult. What is the best way, that has a chance that it might work? -- -- 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
Importing gen-class classes from one namespace into another, like Java?
I'm basically writing a jar to be used entirely from a Java application, in Clojure. I don't know if it's better to just use Java for this yet, or not. I'm experimenting, though. I've got every namespace in my Clojure project compiling using AOT. In one namespace, I use gen-class to create a class. In another namespace, I need to create an instance of that class. Do I have to import that class like I would Java classes? I've tried several methods and I keep getting class not found exceptions. Below is my pretty basic code: *core.clj* (ns com.rycole.bukkit-plugin.core (:import [com.rycole.bukkit-plugin.listeners PlayerLoginListener]) (:gen-class :name com.rycole.bukkit-plugin.core.Main :extends org.bukkit.plugin.java.JavaPlugin)) (defn -onEnable [this] (.info (.getLogger this) PLUGIN ENABLED) (.registerEvents (.getPluginManager (.getServer this)) (com.rycole.bukkit-plugin.listeners.PlayerLoginListener.) this)) (defn -onDisable [this] (.info (.getLogger this) PLUGIN DISABLED)) *listeners.clj* (ns com.rycole.bukkit-plugin.listeners (:gen-class :name com.rycole.bukkit-plugin.listeners.PlayerLoginListener :implements org.bukkit.event.Listener :methods [[^{org.bukkit.event.EventHandler true} onPlayerLoggedIn [org.bukkit.event.PlayerLoginEvent] void]])) (defn -onPlayerLoggedIn [this evnt] (.info (.getLogger this) PLAYER LOGGED IN)) -- -- 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: Importing gen-class classes from one namespace into another, like Java?
I forgot to mention, I also tried replacing the dashes with underscores, in the import namespace in the core.clj file. Same error. Ryan On Saturday, January 26, 2013 4:21:24 PM UTC-6, Ryan Cole wrote: I'm basically writing a jar to be used entirely from a Java application, in Clojure. I don't know if it's better to just use Java for this yet, or not. I'm experimenting, though. I've got every namespace in my Clojure project compiling using AOT. In one namespace, I use gen-class to create a class. In another namespace, I need to create an instance of that class. Do I have to import that class like I would Java classes? I've tried several methods and I keep getting class not found exceptions. Below is my pretty basic code: *core.clj* (ns com.rycole.bukkit-plugin.core (:import [com.rycole.bukkit-plugin.listeners PlayerLoginListener]) (:gen-class :name com.rycole.bukkit-plugin.core.Main :extends org.bukkit.plugin.java.JavaPlugin)) (defn -onEnable [this] (.info (.getLogger this) PLUGIN ENABLED) (.registerEvents (.getPluginManager (.getServer this)) (com.rycole.bukkit-plugin.listeners.PlayerLoginListener.) this)) (defn -onDisable [this] (.info (.getLogger this) PLUGIN DISABLED)) *listeners.clj* (ns com.rycole.bukkit-plugin.listeners (:gen-class :name com.rycole.bukkit-plugin.listeners.PlayerLoginListener :implements org.bukkit.event.Listener :methods [[^{org.bukkit.event.EventHandler true} onPlayerLoggedIn [org.bukkit.event.PlayerLoginEvent] void]])) (defn -onPlayerLoggedIn [this evnt] (.info (.getLogger this) PLAYER LOGGED IN)) -- -- 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
Java annotations on functions, in conjunction with gen-class?
Hi all, beginner here, I'm trying to write a Minecraft plugin in Clojure, and use AOT so that the Minecraft server can load it right up. I've got this much going, and all as well. The server expect some of my functions in a class that I'm extending to use an appropriate annotation on the function. How do I add these annotations? I've Googled around and see that it looks like support for this was added back in 2010, so I'm sure it's possible. Maybe I've seen the solution but didn't realize that it was a solution. Clojure still looks pretty alien to me, so crazy things like this are rough to search for and realize when the answer is in front of me. For example, the Java document for the Minecraft server says that my function should conform to the following definition: ``` @EventHandlerpublic void onPlayerLogin(PlayerLoginEvent event) { // Your code here...} ``` I've got the following Clojure code that the server will actually load and it will call the `onEnable` and `onDisable` function here, but the one that requires the annotation does not get called. ``` (ns com.github.ryancole.bukkit.hello-world (:import [org.bukkit Bukkit]) (:gen-class :extends org.bukkit.plugin.java.JavaPlugin :name com.github.ryancole.bukkit.hello-world.Hello :prefix hello-)) (defn hello-onEnable [this] (.info (.getLogger this) hello world has been enabled)) (defn hello-onDisable [this] (.info (.getLogger this) hello world has been disabled)) (defn hello-onPlayerLogin [this evnt] (.info (.getLogger this) player logged in)) ``` Any ideas? -- -- 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: Java annotations on functions, in conjunction with gen-class?
Yea, I've seen that. It does the plugins a little differently. I did not see any examples of function annotations in his Clojure code, though. Ryan On Friday, January 25, 2013 5:08:49 PM UTC-6, AtKaaZ wrote: Hi. Check this out: https://github.com/CmdrDats/clj-minecraft On Fri, Jan 25, 2013 at 11:14 PM, Ryan Cole ry...@rycole.comjavascript: wrote: Hi all, beginner here, I'm trying to write a Minecraft plugin in Clojure, and use AOT so that the Minecraft server can load it right up. I've got this much going, and all as well. The server expect some of my functions in a class that I'm extending to use an appropriate annotation on the function. How do I add these annotations? I've Googled around and see that it looks like support for this was added back in 2010, so I'm sure it's possible. Maybe I've seen the solution but didn't realize that it was a solution. Clojure still looks pretty alien to me, so crazy things like this are rough to search for and realize when the answer is in front of me. For example, the Java document for the Minecraft server says that my function should conform to the following definition: ``` @EventHandlerpublic void onPlayerLogin(PlayerLoginEvent event) { // Your code here...} ``` I've got the following Clojure code that the server will actually load and it will call the `onEnable` and `onDisable` function here, but the one that requires the annotation does not get called. ``` (ns com.github.ryancole.bukkit.hello-world (:import [org.bukkit Bukkit]) (:gen-class :extends org.bukkit.plugin.java.JavaPlugin :name com.github.ryancole.bukkit.hello-world.Hello :prefix hello-)) (defn hello-onEnable [this] (.info (.getLogger this) hello world has been enabled)) (defn hello-onDisable [this] (.info (.getLogger this) hello world has been disabled)) (defn hello-onPlayerLogin [this evnt] (.info (.getLogger this) player logged in)) ``` Any ideas? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- I may be wrong or incomplete. Please express any corrections / additions, they are encouraged and appreciated. At least one entity is bound to be transformed if you do ;) -- -- 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