Re: Problem Running ClojureScript on OpenJDK
Master works like a charm now - Thanks!! On Oct 4, 5:44 am, db donald.bl...@gmail.com wrote: Works for me. Thanks. On Oct 3, 10:15 am, Brenton bashw...@gmail.com wrote: If you have been having problems the ClojureScript andOpenJDK, please try the current master branch of ClojureScript. I would be interested to know what problems still remain, if any, after these changes. On Oct 2, 11:07 pm, db donald.bl...@gmail.com wrote: Here's what the patch looks like foropenjdk-6 with the latest master, where the mozilla-specific lines have moved to the rhino.js file: diff --git a/src/clj/cljs/repl/rhino.clj b/src/clj/cljs/repl/rhino.clj index cbe4f2a..15c5bf1 100644 --- a/src/clj/cljs/repl/rhino.clj +++ b/src/clj/cljs/repl/rhino.clj @@ -27,6 +27,7 @@ goog.require = function(rule) {Packages.clojure.lang.RT[\var\ linenum (or line Integer/MIN_VALUE) ctx (sun.org.mozilla.javascript.Context/enter)] (try + (.setOptimizationLevel ctx -1) {:status :success :value (.evaluateString ctx (:global repl-env) js filename linenum nil (finally This works for me on openjdk6, but will not work on openjdk7 because it doesn't ship with Rhino. For openjdk7, it looks like a separate version of Rhino needs to be downloaded. On Oct 2, 4:36 pm, Stefan Kamphausen ska2...@googlemail.com wrote: Hi, I hope, people are aware that Oracle considersOpenJDKto be the standard choice for Linux users now and removed the special distributor's license. Seehttp://robilad.livejournal.com/90792.html Kind regards, Stefan -- 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: Problem Running ClojureScript on OpenJDK
Has anyone succeeded in solving this issue for OpenJDK yet? So far all solutions I've seen discussed boiled down to using Oracle's JDK ... On Aug 14, 6:44 pm, Tzach tzach.livya...@gmail.com wrote: I have a similar problem, but I could not solve it like you did: running on Ubuntu 11.04, $JAVA_HOME set to /usr/lib/jvm/default-java, and default-java soft link to java-6-sun Still when I run script/repl, and (require '[cljs.compiler :as comp]) (def jse (comp/repl-env)) (comp/repl jse) CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: sun.org.mozilla.javascript.internal.Context, compiling:(cljs/ compiler.clj:971) user= CompilerException java.lang.RuntimeException: No such namespace: comp, compiling:(NO_SOURCE_PATH:2) user= CompilerException java.lang.RuntimeException: No such namespace: comp, compiling:(NO_SOURCE_PATH:3) Any idea? Thanks Tzach On Jul 23, 9:38 am, Sean Corfield seancorfi...@gmail.com wrote: On Fri, Jul 22, 2011 at 7:34 PM, Sean Corfield seancorfi...@gmail.com wrote: I may just switch to the Sun, er, Oracle JVM since I've a feeling one of my other projects (not yet migrated to my netbook) will require that JVM anyway... Just an update: I installed Oracle'sJDKand everything is working perfectly on myUbuntunetbook :) -- Sean A Corfield -- (904) 302-SEAN An Architect's View --http://corfield.org/ World Singles, LLC. --http://worldsingles.com/ Railo Technologies, Inc. --http://www.getrailo.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- 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: ClojureScript Repl -- Swank-like workflow with Emacs?
Hi Paul, sorry, I was blindly assuming you were starting a browser repl without hooking it up with a browser :) Reversing your posts, that becomes clear ... What happens when you do the following M-x set-variable enter: inferior-lisp-program enter: /path/to/repl/script M-x inferior-lisp ? regards, Volker On Sep 27, 9:02 am, Paul Koerbitz paul.koerb...@gmail.com wrote: Hi Volker, not sure I understand you correctly. You should still be able to type into the repl and get results, even if it is 'in-browser', right? At least that works for me if I start the browser repl on the command line. So it should also work in Emacs, I am pretty sure its something weird with my setup. (Btw. My previous shorter reply should have arrived __after__ the longer (see timestamps), not sure why google groups is mixing up the order of my emails) cheers Paul On Sep 26, 11:14 pm, Volker Schlecht volker.schle...@gmail.com wrote: The example given in the wiki uses an in-browser repl. If you want to work with the regular rhino-repl, replace (require '[cljs.repl.browser :as browser]) with (require '[cljs.repl.rhino :as rhino]) And you should be all set. On Sep 26, 4:28 pm, Paul Koerbitz paul.koerb...@gmail.com wrote: Hi David! thanks for the fast reply and this solution. I haven't gotten it to work yet, but this is more than likely due to me not really understanding how to put all the moving parts together. Here is what I did: Put your code into 'browser-repl'. Now if I execute this on the command line I get this prompt #'user/env Type: :cljs/quit to quit Starting Server on Port: 9000 ClojureScript:cljs.user and when I open up some page with clojure script (e.g. samples/repl/index.html) I can execute sutff in the browser such as (js/alert hello, world!). However, if I run the script as an inferior-lisp process I also get this output in the *inferior-lisp* window #'user/env Type: :cljs/quit to quit Starting Server on Port: 9000 ClojureScript:cljs.user but I can't connect the browser. the file still loads but if I enter stuff in the repl the repl just hangs. I am sure I am missing something, right now I just don't see what. thanks for the help so far. Paul On Mon, Sep 26, 2011 at 15:55, David Nolen dnolen.li...@gmail.com wrote: I've created the following wiki - https://github.com/clojure/clojurescript/wiki/Emacs--inferior-lisp-mode Let me know if this needs more clarification. David On Mon, Sep 26, 2011 at 9:15 AM, Paul Koerbitz paul.koerb...@gmail.comwrote: Dear Clojurians, I was toying with Clojurescript and really like using the Repl as described herehttps://github.com/clojure/clojurescript/wikitotry things out. (thanks for all the great to everyone involved!!) Has anyone hooked this into Emacs in a Swank-like fashion? I would love to be able to send forms to C-c C-c or ''compile'' a file with C-c C-k. thanks Paul -- 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 -- 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 -- 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: ClojureScript Repl -- Swank-like workflow with Emacs?
s/repl/repljs/ -- 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: ClojureScript: Problem getting Browser Repl Env to Work
Not that I could detect any ... monitoring the traffic from Firebug shows me a GET request that sends a lot of sensible looking javascript, then I see a POST to localhost:9000 which gets answered by the goog.provide for the repl. The only detectable difference I see on the browser side is that the POST is kept open in the example that comes with ClojureScript and is directly ended after sending the goog.provide in my own example. On Sep 23, 10:06 pm, David Nolen dnolen.li...@gmail.com wrote: Are you getting any missing resources errors? On Fri, Sep 23, 2011 at 4:03 PM, Volker Schlecht volker.schle...@gmail.comwrote: No unfortunately not, with neither FF nor Chrome, and using the Javascript Debuggers of both ... On Sep 21, 10:27 pm, David Nolen dnolen.li...@gmail.com wrote: Do you get any JS errors from the browser at the JS console? David On Wed, Sep 21, 2011 at 4:23 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi, no, I've tried it against - essentially - a manual replication of the built-in sample. But thanks for the hint, because the sample does work, but so far I haven't figured out the deciding difference ... at least I have a reference now to compare against. Thanks! Volker On Sep 21, 7:26 pm, David Nolen dnolen.li...@gmail.com wrote: Hmm in my experience 1. Start the Browser REPL 2. Open your project's main html file (index.html) And you're good to go. Sometimes you need to refresh the browser but that's about it as far as I can tell. Are you trying this against the built in sample? David On Tue, Sep 20, 2011 at 4:32 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi everybody, I'm trying out the new browser repl-environment using both the tutorial ( https://github.com/clojure/clojurescript/wiki/The-REPL-and- Evaluation-Environments) but so far am unable to get it to work. Using current (as of the writing of this mail) master from github, and following the Steps in the tutorial: 1. Starting up the repl works, leads me straight to the repl (i.e. allows me to enter an expression). I remember trying a previous version of the in-browser repl which worked for me, but in which i couldn't enter anything before the browser initiated a connection. The docs mention a wait for a browser connection being neccesary here ... 2. Setting up the XPC communication works, i.e. I see the initial GET request receiving sensible-looking javascript, and I see a POST of ready being answered by a goog.provide('user'). 3. That's it however - connection closed. Non-surprisingly, entering any expression only hangs the REPL. Using curl as per browser.clj: 1. Startting REPL works, as above 2. curl -v -d readyhttp://localhost:9000/respondswith HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 26 * Connection #0 to host localhost left intact * Closing connection #0 goog.provide('cljs.user'); 3. Looking not too bad except for the closed connection, so entering (+ 1 1) hangs the REPL 4. curl -v -d 2http://127.0.0.1:9000thenrespondswith the compiled javascript as far as I can tell: HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 61 cljs.core.pr_str.call(null,cljs.core._PLUS_.call(null,1,1)); * Connection #0 to host localhost left intact * Closing connection #0 To me it seems that something is awry with keeping that connection really open on my system. I'm on Debian SID and tried with firefox 6 and 7-beta as well as with google-chrome. JDK is Oracle Java 1,6.0_26-b03, ClojureScript is as stated above a vanilla copy of current master, freshly bootstrapped. Reverting to select previous states of ClojureScript (i.e. right after clojure.browser was merged into master, and right before) yielded no better results, except that those didn't get me to a REPL prompt at all and were stuck at Server started The last and only time I had that working was with the clojure.browser branch from some time around August 26th. What am I doing wrong? Any hints? regards, Volker -- 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 -- You
Re: ClojureScript: Problem getting Browser Repl Env to Work
No unfortunately not, with neither FF nor Chrome, and using the Javascript Debuggers of both ... On Sep 21, 10:27 pm, David Nolen dnolen.li...@gmail.com wrote: Do you get any JS errors from the browser at the JS console? David On Wed, Sep 21, 2011 at 4:23 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi, no, I've tried it against - essentially - a manual replication of the built-in sample. But thanks for the hint, because the sample does work, but so far I haven't figured out the deciding difference ... at least I have a reference now to compare against. Thanks! Volker On Sep 21, 7:26 pm, David Nolen dnolen.li...@gmail.com wrote: Hmm in my experience 1. Start the Browser REPL 2. Open your project's main html file (index.html) And you're good to go. Sometimes you need to refresh the browser but that's about it as far as I can tell. Are you trying this against the built in sample? David On Tue, Sep 20, 2011 at 4:32 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi everybody, I'm trying out the new browser repl-environment using both the tutorial (https://github.com/clojure/clojurescript/wiki/The-REPL-and- Evaluation-Environments) but so far am unable to get it to work. Using current (as of the writing of this mail) master from github, and following the Steps in the tutorial: 1. Starting up the repl works, leads me straight to the repl (i.e. allows me to enter an expression). I remember trying a previous version of the in-browser repl which worked for me, but in which i couldn't enter anything before the browser initiated a connection. The docs mention a wait for a browser connection being neccesary here ... 2. Setting up the XPC communication works, i.e. I see the initial GET request receiving sensible-looking javascript, and I see a POST of ready being answered by a goog.provide('user'). 3. That's it however - connection closed. Non-surprisingly, entering any expression only hangs the REPL. Using curl as per browser.clj: 1. Startting REPL works, as above 2. curl -v -d readyhttp://localhost:9000/respondswith HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 26 * Connection #0 to host localhost left intact * Closing connection #0 goog.provide('cljs.user'); 3. Looking not too bad except for the closed connection, so entering (+ 1 1) hangs the REPL 4. curl -v -d 2http://127.0.0.1:9000thenresponds with the compiled javascript as far as I can tell: HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 61 cljs.core.pr_str.call(null,cljs.core._PLUS_.call(null,1,1)); * Connection #0 to host localhost left intact * Closing connection #0 To me it seems that something is awry with keeping that connection really open on my system. I'm on Debian SID and tried with firefox 6 and 7-beta as well as with google-chrome. JDK is Oracle Java 1,6.0_26-b03, ClojureScript is as stated above a vanilla copy of current master, freshly bootstrapped. Reverting to select previous states of ClojureScript (i.e. right after clojure.browser was merged into master, and right before) yielded no better results, except that those didn't get me to a REPL prompt at all and were stuck at Server started The last and only time I had that working was with the clojure.browser branch from some time around August 26th. What am I doing wrong? Any hints? regards, Volker -- 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 -- 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 -- 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: ClojureScript: Problem getting Browser Repl Env to Work
Hi, no, I've tried it against - essentially - a manual replication of the built-in sample. But thanks for the hint, because the sample does work, but so far I haven't figured out the deciding difference ... at least I have a reference now to compare against. Thanks! Volker On Sep 21, 7:26 pm, David Nolen dnolen.li...@gmail.com wrote: Hmm in my experience 1. Start the Browser REPL 2. Open your project's main html file (index.html) And you're good to go. Sometimes you need to refresh the browser but that's about it as far as I can tell. Are you trying this against the built in sample? David On Tue, Sep 20, 2011 at 4:32 PM, Volker Schlecht volker.schle...@gmail.comwrote: Hi everybody, I'm trying out the new browser repl-environment using both the tutorial (https://github.com/clojure/clojurescript/wiki/The-REPL-and- Evaluation-Environments) but so far am unable to get it to work. Using current (as of the writing of this mail) master from github, and following the Steps in the tutorial: 1. Starting up the repl works, leads me straight to the repl (i.e. allows me to enter an expression). I remember trying a previous version of the in-browser repl which worked for me, but in which i couldn't enter anything before the browser initiated a connection. The docs mention a wait for a browser connection being neccesary here ... 2. Setting up the XPC communication works, i.e. I see the initial GET request receiving sensible-looking javascript, and I see a POST of ready being answered by a goog.provide('user'). 3. That's it however - connection closed. Non-surprisingly, entering any expression only hangs the REPL. Using curl as per browser.clj: 1. Startting REPL works, as above 2. curl -v -d readyhttp://localhost:9000/responds with HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 26 * Connection #0 to host localhost left intact * Closing connection #0 goog.provide('cljs.user'); 3. Looking not too bad except for the closed connection, so entering (+ 1 1) hangs the REPL 4. curl -v -d 2http://127.0.0.1:9000then responds with the compiled javascript as far as I can tell: HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 61 cljs.core.pr_str.call(null,cljs.core._PLUS_.call(null,1,1)); * Connection #0 to host localhost left intact * Closing connection #0 To me it seems that something is awry with keeping that connection really open on my system. I'm on Debian SID and tried with firefox 6 and 7-beta as well as with google-chrome. JDK is Oracle Java 1,6.0_26-b03, ClojureScript is as stated above a vanilla copy of current master, freshly bootstrapped. Reverting to select previous states of ClojureScript (i.e. right after clojure.browser was merged into master, and right before) yielded no better results, except that those didn't get me to a REPL prompt at all and were stuck at Server started The last and only time I had that working was with the clojure.browser branch from some time around August 26th. What am I doing wrong? Any hints? regards, Volker -- 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 -- 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
ClojureScript: Problem getting Browser Repl Env to Work
Hi everybody, I'm trying out the new browser repl-environment using both the tutorial (https://github.com/clojure/clojurescript/wiki/The-REPL-and- Evaluation-Environments) but so far am unable to get it to work. Using current (as of the writing of this mail) master from github, and following the Steps in the tutorial: 1. Starting up the repl works, leads me straight to the repl (i.e. allows me to enter an expression). I remember trying a previous version of the in-browser repl which worked for me, but in which i couldn't enter anything before the browser initiated a connection. The docs mention a wait for a browser connection being neccesary here ... 2. Setting up the XPC communication works, i.e. I see the initial GET request receiving sensible-looking javascript, and I see a POST of ready being answered by a goog.provide('user'). 3. That's it however - connection closed. Non-surprisingly, entering any expression only hangs the REPL. Using curl as per browser.clj: 1. Startting REPL works, as above 2. curl -v -d ready http://localhost:9000/ responds with HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 26 * Connection #0 to host localhost left intact * Closing connection #0 goog.provide('cljs.user'); 3. Looking not too bad except for the closed connection, so entering (+ 1 1) hangs the REPL 4. curl -v -d 2 http://127.0.0.1:9000 then responds with the compiled javascript as far as I can tell: HTTP/1.1 200 OK Server: ClojureScript REPL Content-Type: text/javascript; charset=utf-8 Content-Length: 61 cljs.core.pr_str.call(null,cljs.core._PLUS_.call(null,1,1)); * Connection #0 to host localhost left intact * Closing connection #0 To me it seems that something is awry with keeping that connection really open on my system. I'm on Debian SID and tried with firefox 6 and 7-beta as well as with google-chrome. JDK is Oracle Java 1,6.0_26-b03, ClojureScript is as stated above a vanilla copy of current master, freshly bootstrapped. Reverting to select previous states of ClojureScript (i.e. right after clojure.browser was merged into master, and right before) yielded no better results, except that those didn't get me to a REPL prompt at all and were stuck at Server started The last and only time I had that working was with the clojure.browser branch from some time around August 26th. What am I doing wrong? Any hints? regards, Volker -- 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