Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?
Sorry about the reflect stuff is quite new and in need of work. The reflect support should work through whatever port browser REPL was setup on. On Saturday, October 6, 2012, Frank Siebenlist wrote: Ok - I managed to get clojure.reflect/doc to work if the browser loads the javascript from the repl-server instead of the separate webserver… When the reason for this issue is that the repl- web-servers are listening on different ports, where the js is downloaded from the webserver while the reflect-handler is associaed with the repl-server… then you will not be able to use the clojure.reflect/doc with the standard lein-cljsbuild setup. Unless you can somehow specify the port number for the clojure.reflect/doc GET request (?). Ough. -FS. On Oct 5, 2012, at 9:28 PM, Frank Siebenlist frank.siebenl...@gmail.comjavascript:; wrote: Forgot to mention that the issue is most probably on the browser side, because pointing a webbrowser at http://localhost:9000/reflect?var=example.hello/say-hello; by hand, yields in the browser window: cljs.core.ObjMap.fromObject([\uFDD0'method-params,\uFDD0'name,\uFDD0'doc,\uFDD0'line,\uFDD0'file],{\uFDD0'method-params:[[]],\uFDD0'name:example.hello/say-hello,\uFDD0'doc:say-hello doc,\uFDD0'line:10,\uFDD0'file:/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs}); which is what one expects. -FS. On Oct 5, 2012, at 9:13 PM, Frank Siebenlist frank.siebenl...@gmail.comjavascript:; wrote: …bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM, Frank Siebenlist frank.siebenl...@gmail.com javascript:; wrote: Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com javascript:; 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: how to use clojure.reflect/doc in the cljs-repl?
David, please do not apologize… your contributions to clojurescript have been invaluable, and the last time I checked you still have a full-time job with that village-newspaper somewhere on the East coast... My current efforts are to help improve the clojurescript help facilities. I have working versions of the apropos, ns-resolve, find-ns, source-fn, ns-mapfriends, and managed to make our clj-ns-browser work with that clojurescript metadata such that you can browse the cljs-namespaces (see https://gist.github.com/3803119 and https://raw.github.com/franks42/clj-ns-browser/cljs/Cljs%20Browser%202012-10-05.png for some proof of progress). All those facilities run on the clj-jvm and make use of the meta-data in the cljs.analyzer/@namespaces map. You can invoke them from any clj-repl that connects to the same jvm while you interact with the cljs-repl. To make them available to the cljs-repl, you ideally need some form of rpc-like calls to get that info from the clj-jvm, like the clojure.reflect/doc implementation (the repl-prompting is a little awkward, though - with all the asynchronous processing it may be better to drive the promp-printing from the js-side… but that's a different discussion) As I didn't get clojure.reflect/doc to work, I've used the special-fns interface that you pass into the cljs.repl/repl function. However, and I don't think I will offend anyone, the way how those special-fns are implemented is one huge ugly hack…;-), and I do not really want to share my project while it depends on that. So… that's why I was trying so hard to make that clojure.reflect/doc work with lein-cljsbuild. Regards, FrankS. On Oct 6, 2012, at 7:56 AM, David Nolen dnolen.li...@gmail.com wrote: Sorry about the reflect stuff is quite new and in need of work. The reflect support should work through whatever port browser REPL was setup on. On Saturday, October 6, 2012, Frank Siebenlist wrote: Ok - I managed to get clojure.reflect/doc to work if the browser loads the javascript from the repl-server instead of the separate webserver… When the reason for this issue is that the repl- web-servers are listening on different ports, where the js is downloaded from the webserver while the reflect-handler is associaed with the repl-server… then you will not be able to use the clojure.reflect/doc with the standard lein-cljsbuild setup. Unless you can somehow specify the port number for the clojure.reflect/doc GET request (?). Ough. -FS. On Oct 5, 2012, at 9:28 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Forgot to mention that the issue is most probably on the browser side, because pointing a webbrowser at http://localhost:9000/reflect?var=example.hello/say-hello; by hand, yields in the browser window: cljs.core.ObjMap.fromObject([\uFDD0'method-params,\uFDD0'name,\uFDD0'doc,\uFDD0'line,\uFDD0'file],{\uFDD0'method-params:[[]],\uFDD0'name:example.hello/say-hello,\uFDD0'doc:say-hello doc,\uFDD0'line:10,\uFDD0'file:/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs}); which is what one expects. -FS. On Oct 5, 2012, at 9:13 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: …bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- 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
Re: clojurescript: how to use clojure.reflect/doc in the cljs-repl?
On Sat, Oct 6, 2012 at 1:32 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: David, please do not apologize… your contributions to clojurescript have been invaluable, and the last time I checked you still have a full-time job with that village-newspaper somewhere on the East coast... My current efforts are to help improve the clojurescript help facilities. I have working versions of the apropos, ns-resolve, find-ns, source-fn, ns-mapfriends, and managed to make our clj-ns-browser work with that clojurescript metadata such that you can browse the cljs-namespaces (see https://gist.github.com/3803119 and https://raw.github.com/franks42/clj-ns-browser/cljs/Cljs%20Browser%202012-10-05.pngfor some proof of progress). All those facilities run on the clj-jvm and make use of the meta-data in the cljs.analyzer/@namespaces map. You can invoke them from any clj-repl that connects to the same jvm while you interact with the cljs-repl. To make them available to the cljs-repl, you ideally need some form of rpc-like calls to get that info from the clj-jvm, like the clojure.reflect/doc implementation (the repl-prompting is a little awkward, though - with all the asynchronous processing it may be better to drive the promp-printing from the js-side… but that's a different discussion) As I didn't get clojure.reflect/doc to work, I've used the special-fns interface that you pass into the cljs.repl/repl function. However, and I don't think I will offend anyone, the way how those special-fns are implemented is one huge ugly hack…;-), and I do not really want to share my project while it depends on that. So… that's why I was trying so hard to make that clojure.reflect/doc work with lein-cljsbuild. Regards, FrankS. special-fns is not the way to go :) clojure.reflect should be fixed to do the right thing - it was a oversight to make the interaction asynchronous - it should work precisely as browser REPL does now - synchronously. There's an open ticket for this in JIRA. David -- 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: how to use clojure.reflect/doc in the cljs-repl?
…bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- 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: how to use clojure.reflect/doc in the cljs-repl?
Forgot to mention that the issue is most probably on the browser side, because pointing a webbrowser at http://localhost:9000/reflect?var=example.hello/say-hello; by hand, yields in the browser window: cljs.core.ObjMap.fromObject([\uFDD0'method-params,\uFDD0'name,\uFDD0'doc,\uFDD0'line,\uFDD0'file],{\uFDD0'method-params:[[]],\uFDD0'name:example.hello/say-hello,\uFDD0'doc:say-hello doc,\uFDD0'line:10,\uFDD0'file:/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs}); which is what one expects. -FS. On Oct 5, 2012, at 9:13 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: …bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- 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: how to use clojure.reflect/doc in the cljs-repl?
Ok - I managed to get clojure.reflect/doc to work if the browser loads the javascript from the repl-server instead of the separate webserver… When the reason for this issue is that the repl- web-servers are listening on different ports, where the js is downloaded from the webserver while the reflect-handler is associaed with the repl-server… then you will not be able to use the clojure.reflect/doc with the standard lein-cljsbuild setup. Unless you can somehow specify the port number for the clojure.reflect/doc GET request (?). Ough. -FS. On Oct 5, 2012, at 9:28 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Forgot to mention that the issue is most probably on the browser side, because pointing a webbrowser at http://localhost:9000/reflect?var=example.hello/say-hello; by hand, yields in the browser window: cljs.core.ObjMap.fromObject([\uFDD0'method-params,\uFDD0'name,\uFDD0'doc,\uFDD0'line,\uFDD0'file],{\uFDD0'method-params:[[]],\uFDD0'name:example.hello/say-hello,\uFDD0'doc:say-hello doc,\uFDD0'line:10,\uFDD0'file:/Users/franks/Development/ClojureScript/swimtimer/src-cljs/example/hello.cljs}); which is what one expects. -FS. On Oct 5, 2012, at 9:13 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: …bumb… Is this maybe related to the use of lein-cljsbuild and having a separate server from which the js is downloaded? In other words, the reflect handler seems to be listening on the repl server on port 9000, while the web server from which the js is initially downloaded is listening on port 3000. The cljs-reflect code seems to get a conn from (net/xhr-connection), but I can not see any port number specified… I've reached the end of my javascript and goog knowledge… please. Did anyone get this to work with the lein-cljsbuild setup? -FrankS. On Sep 23, 2012, at 2:10 PM, Frank Siebenlist frank.siebenl...@gmail.com wrote: Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- 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: how to use clojure.reflect/doc in the cljs-repl?
Trying to use the clojure.reflect/doc function in the cljs-repl, but I only errors --- ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect/doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'clojure.reflect.doc) nil Reflection query failed. ClojureScript:cljs.user (clojure.reflect/doc 'doc) nil Reflection query failed. --- Do I have to configure something on the server side maybe? Any suggestions? Thanks, FrankS. -- 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