Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
So these APIs are new in 1.6-SNAPSHOT and from what I understand provide an integration api between Java and Clojure-Runtime (symbols and their invocation). Apart from limitations which probably exist, what is the mode of execution for these API-calls ? For example if a tool/IDE starts a (REPL) _process_ by calling ClojureUtils. CLOJURE_MAIN, how am I supposed to call API.var("clojure.core", "+"); ? How would I get the JVMs class-instance of "API" if I don't add some kind of inter-process communication ? Any known projects using this new API already ? Joerg -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
Hi Joerg, I am not sure I understand your question. The API class is for intraprocess communication, not interprocess. All API does is provide a public, supported entry point for the kinds of things people are already doing with Var. The latter is undesirable because using Var makes it way too easy to marry implementation detail. Stu On Sat, Jun 22, 2013 at 6:01 AM, Jörg Winter wrote: > So these APIs are new in 1.6-SNAPSHOT and from what I understand provide > an integration api between Java and Clojure-Runtime (symbols and their > invocation). > Apart from limitations which probably exist, what is the mode of execution > for these API-calls ? > > For example if a tool/IDE starts a (REPL) _process_ by calling > ClojureUtils.CLOJURE_MAIN, how am I supposed to call > > API.var("clojure.core", "+"); > ? > > How would I get the JVMs class-instance of "API" if I don't add some kind of > inter-process communication ? > > Any known projects using this new API already ? > > Joerg > > > > -- > -- > 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 unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
Can you please provide an example for such a usw cause? Thanks Las On Jun 23, 2013 1:38 PM, "Stuart Halloway" wrote: > Hi Joerg, > > I am not sure I understand your question. The API class is for > intraprocess communication, not interprocess. > > All API does is provide a public, supported entry point for the kinds of > things people are already doing with Var. The latter is undesirable because > using Var makes it way too easy to marry implementation detail. > > Stu > > > On Sat, Jun 22, 2013 at 6:01 AM, Jörg Winter wrote: > >> So these APIs are new in 1.6-SNAPSHOT and from what I understand provide >> an integration api between Java and Clojure-Runtime (symbols and their >> invocation). >> Apart from limitations which probably exist, what is the mode of >> execution for these API-calls ? >> >> For example if a tool/IDE starts a (REPL) _process_ by calling >> ClojureUtils.CLOJURE_MAIN, how am I supposed to call >> >> API.var("clojure.core", "+"); >> ? >> >> How would I get the JVMs class-instance of "API" if I don't add some kind of >> inter-process communication ? >> >> Any known projects using this new API already ? >> >> Joerg >> >> >> >> -- >> -- >> 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 unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > -- > 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 unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
Hi Stuart, ok, so my question is actually more about how to create some clojure Runtime, filling it with additional namespaces, i.e. more than just clojure.core. I just discovered the RT class which could be what I want ( though its not official "API" ?) I need to make clojure runtime avail. for an IDE plugin, thats the background here. What do you think of Using RT like that ? I mean instantiating a clojure environment by RT.doInit maybe I really dont need to have a REPL for this, as I just want to query for functions and vars via API Best, Joerg -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
On 6/24/13 7:53 AM, Jörg Winter wrote: > Hi Stuart, > > ok, so my question is actually more about how to create some clojure Runtime, > filling it with additional namespaces, i.e. more than just clojure.core. > I just discovered the RT class which could be what I want ( though its not > official "API" ?) > > I need to make clojure runtime avail. for an IDE plugin, thats the background > here. > > What do you think of Using RT like that ? > I mean instantiating a clojure environment by RT.doInit maybe > > I really dont need to have a REPL for this, as I just want to query for > functions and vars via API > > Best, > Joerg > the ticket http://dev.clojure.org/jira/browse/CLJ-1188 for API might be enlightening. it has some discussion and also links to the design wiki page. -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? signature.asc Description: OpenPGP digital signature
Re: Clojure 1.6 API: clojure.lang.IFn and clojure.api.API
Thanks Kevin, it's all clear now. Sent from my phone On Jun 24, 2013 6:38 PM, "Kevin Downey" wrote: > On 6/24/13 7:53 AM, Jörg Winter wrote: > > Hi Stuart, > > > > ok, so my question is actually more about how to create some clojure > Runtime, filling it with additional namespaces, i.e. more than just > clojure.core. > > I just discovered the RT class which could be what I want ( though its > not official "API" ?) > > > > I need to make clojure runtime avail. for an IDE plugin, thats the > background here. > > > > What do you think of Using RT like that ? > > I mean instantiating a clojure environment by RT.doInit maybe > > > > I really dont need to have a REPL for this, as I just want to query for > functions and vars via API > > > > Best, > > Joerg > > > the ticket http://dev.clojure.org/jira/browse/CLJ-1188 for API might be > enlightening. it has some discussion and also links to the design wiki > page. > > -- > And what is good, Phaedrus, > And what is not good— > Need we ask anyone to tell us these things? > > -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.