Re: what is the modern equivalent of clojure.contrib.java-utils/file?
Hmm, how do I include this? I have a strange error. I had an app that was working fine, and then I added this one line at the the :require block in core.clj: (:require clojure.string clojure.java.io who-is-logged-in.memory_display [clojure.data.json :as json] [clojure.java.io]) I added that last line, and now, when I compile, I get: Caused by: java.io.FileNotFoundException: Could not locate clojure/data/json__init.class or clojure/data/json.clj on classpath: This makes no sense to me, since the JSON was working fine the last time I compiled. On Wednesday, October 24, 2012 11:11:11 PM UTC-4, yangsx wrote: clojure.java.io/file On Thu, Oct 25, 2012 at 11:08 AM, larry google groups lawrenc...@gmail.com javascript: wrote: I want to use clojure.contrib.java-utils/file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/file? -- 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 -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
it looks like clojure.java.io occurs twice, is that why that happens? On Thu, Oct 25, 2012 at 2:58 PM, larry google groups lawrencecloj...@gmail.com wrote: Hmm, how do I include this? I have a strange error. I had an app that was working fine, and then I added this one line at the the :require block in core.clj: (:require clojure.string clojure.java.io who-is-logged-in.memory_display [clojure.data.json :as json] [clojure.java.io]) I added that last line, and now, when I compile, I get: Caused by: java.io.FileNotFoundException: Could not locate clojure/data/json__init.class or clojure/data/json.clj on classpath: This makes no sense to me, since the JSON was working fine the last time I compiled. On Wednesday, October 24, 2012 11:11:11 PM UTC-4, yangsx wrote: clojure.java.io/file On Thu, Oct 25, 2012 at 11:08 AM, larry google groups lawrenc...@gmail.com wrote: I want to use clojure.contrib.java-utils/**file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/ **file? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@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+u...@**googlegroups.com For more options, visit this group at http://groups.google.com/**group/clojure?hl=enhttp://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 -- 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
Re: what is the modern equivalent of clojure.contrib.java-utils/file?
are you aot compiling? If yes delete all the calss files and re-compile...also there is no reason to require it unless you alias it to something... a common one would be (:require [clojure.java.io :as io])...personally, for clojure.java.io, I just use the fully qualified name most of the times Jim On 25/10/12 13:58, larry google groups wrote: Hmm, how do I include this? I have a strange error. I had an app that was working fine, and then I added this one line at the the :require block in core.clj: (:require clojure.string clojure.java.io who-is-logged-in.memory_display [clojure.data.json :as json] [clojure.java.io]) I added that last line, and now, when I compile, I get: Caused by: java.io.FileNotFoundException: Could not locate clojure/data/json__init.class or clojure/data/json.clj on classpath: This makes no sense to me, since the JSON was working fine the last time I compiled. On Wednesday, October 24, 2012 11:11:11 PM UTC-4, yangsx wrote: clojure.java.io/file http://clojure.java.io/file On Thu, Oct 25, 2012 at 11:08 AM, larry google groups lawrenc...@gmail.com javascript: wrote: I want to use clojure.contrib.java-utils/file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/file? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: 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 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: what is the modern equivalent of clojure.contrib.java-utils/file?
clojure.java.io/file http://clojure.java.io/file So, in project.clj, I do this: [org.clojure/io] ? Is there a version number I should put in there? On Wednesday, October 24, 2012 11:11:11 PM UTC-4, yangsx wrote: clojure.java.io/file On Thu, Oct 25, 2012 at 11:08 AM, larry google groups lawrenc...@gmail.com javascript: wrote: I want to use clojure.contrib.java-utils/file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/file? -- 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 -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On 25/10/12 19:25, larry google groups wrote: So, in project.clj, I do this: [org.clojure/io] ? No no this namespace is part of Clojure itself. No need to put it in the project.clj. Just require it in your namespace where you want to use it... Jim -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
No no this namespace is part of Clojure itself. How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. On Thursday, October 25, 2012 2:33:49 PM UTC-4, Jim foo.bar wrote: On 25/10/12 19:25, larry google groups wrote: So, in project.clj, I do this: [org.clojure/io] ? No no this namespace is part of Clojure itself. No need to put it in the project.clj. Just require it in your namespace where you want to use it... Jim -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On 25/10/12 19:39, larry google groups wrote: How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. OK I'll grant you this...Documentation is not the strong part of Clojure. There have been/still are efforts to improve on this but generally any newcomer to the language struggles at first...A general rule of thumb is that if something starts with clojure.something.. chances are it is part of Clojure itself (there are exception though e.g clojure.java.jdbc)... hope that helps :-) Jim -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On Thu, Oct 25, 2012 at 11:39 AM, larry google groups lawrencecloj...@gmail.com wrote: How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. http://clojure.github.com If it's listed separated there, it's a contrib you need to pull in explicitly. Otherwise it's part of Clojure itself. Clojure's namespaces are documented here (linked from 'clojure' in the left column of the above page): http://clojure.github.com/clojure/ -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.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: what is the modern equivalent of clojure.contrib.java-utils/file?
On 25/10/12 19:57, Sean Corfield wrote: On Thu, Oct 25, 2012 at 11:39 AM, larry google groups lawrencecloj...@gmail.com wrote: How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. http://clojure.github.com If it's listed separated there, it's a contrib you need to pull in explicitly. Otherwise it's part of Clojure itself. Clojure's namespaces are documented here (linked from 'clojure' in the left column of the above page): http://clojure.github.com/clojure/ Nice... : This definitely more informative than what I suggested! :-[ Jim -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
Okay, if I look here: http://clojure.github.com Can I assume that anything that starts with clojure.core is not a dependency? And everything else is? So this would be listed as a dependency if I use it: clojure.test.junithttp://clojure.github.com/clojure/clojure.test.junit-api.html but I would not have to list this as a dependency: clojure.core.protocolshttp://clojure.github.com/clojure/clojure.core.protocols-api.html On Thursday, October 25, 2012 2:57:26 PM UTC-4, Sean Corfield wrote: On Thu, Oct 25, 2012 at 11:39 AM, larry google groups lawrenc...@gmail.com javascript: wrote: How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. http://clojure.github.com If it's listed separated there, it's a contrib you need to pull in explicitly. Otherwise it's part of Clojure itself. Clojure's namespaces are documented here (linked from 'clojure' in the left column of the above page): http://clojure.github.com/clojure/ -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.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: what is the modern equivalent of clojure.contrib.java-utils/file?
Anything that starts with clojure. is part of (some version of) clojure. For Clojure 1.4, that's everything listed in Table of Contents on the right side of the web page you'll find here: http://clojure.github.com/clojure/ clojure.core clojure.data clojure.inspector clojure.java.browse clojure.java.io clojure.java.javadoc clojure.java.shell clojure.main clojure.pprint clojure.reflect clojure.repl clojure.set clojure.stacktrace clojure.string clojure.template clojure.test clojure.walk clojure.xml clojure.zip That'll all be available without needing to add dependencies to your project.clj. You'll just need to :require it as usual in your ns form. On Thu, Oct 25, 2012 at 9:52 PM, larry google groups lawrencecloj...@gmail.com wrote: Okay, if I look here: http://clojure.github.com Can I assume that anything that starts with clojure.core is not a dependency? And everything else is? So this would be listed as a dependency if I use it: clojure.test.junit but I would not have to list this as a dependency: clojure.core.protocols On Thursday, October 25, 2012 2:57:26 PM UTC-4, Sean Corfield wrote: On Thu, Oct 25, 2012 at 11:39 AM, larry google groups lawrenc...@gmail.com wrote: How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. http://clojure.github.com If it's listed separated there, it's a contrib you need to pull in explicitly. Otherwise it's part of Clojure itself. Clojure's namespaces are documented here (linked from 'clojure' in the left column of the above page): http://clojure.github.com/clojure/ -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.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 -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On Thursday, October 25, 2012 2:39:33 PM UTC-4, larry google groups wrote: No no this namespace is part of Clojure itself. How do you know this? Where is this documented? I find myself baffled as to what is a dependency and what is not. Hi Larry, Note that, concerning libraries, there's three separate but often similar names to be aware of: * the lib's artifact-id (you'll find it at the top of the lib's very own project.clj). * the lib's github project name (if it's hosted there) * the namespace(s) that the lib provides (specified in the lib's source file(s) in the `ns` macro) Threre's also the lib's group-id, which --- if different from the artifact-id --- is also noted at the top of a lib's project.clj file. You use a lib's group-id and artifact-id in your own project.clj when you specify dependencies (group-id is left out when it's the same as the artifact-id, which is common for many 3rd-party Clojure libs). You use a lib's namespace name(s) in your own source's `ns` macro to use that lib in your code. Some notes about contrib libs: * all have a group-id of org.clojure, and * all have github project names like foo.bar (ex. math.combinatorics), under https://github.com/clojure * all have namespace names like clojure.foo.bar (ex. clojure.math.combinatorics). * they're hosted at maven central, not at clojars * you can find them all listed at http://dev.clojure.org/display/doc/Clojure+Contrib Some notes about 3rd-party Clojure libs: * many have a group-id the same as their artifact-id * most are hosted at github, and usually the github project name is the same as the artifact-id * most are available at Clojars via leiningen * many have a namespace like my-proj.core (Anyone: If there's any errors there, please let me know!) ---John -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On Thursday, October 25, 2012 5:04:23 PM UTC-4, John Gabriele wrote: Some notes about contrib libs: * all have a group-id of org.clojure, and * all have github project names like foo.bar (ex. math.combinatorics), under https://github.com/clojure * all have namespace names like clojure.foo.bar (ex. clojure.math.combinatorics). * they're hosted at maven central, not at clojars * you can find them all listed at http://dev.clojure.org/display/doc/Clojure+Contrib Oooh, one more bullet point for contrib libs: * they don't have a project.clj file. They use a pom.xml file instead! Thought I'd add that, being that it's so close to Halloween and all. ;) Some notes about 3rd-party Clojure libs: * many have a group-id the same as their artifact-id * most are hosted at github, and usually the github project name is the same as the artifact-id * most are available at Clojars via leiningen * many have a namespace like my-proj.core Most of these are, of course, managed by Leiningen and so *do* have a project.clj file. ---John -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
On Thu, Oct 25, 2012 at 12:52 PM, larry google groups lawrencecloj...@gmail.com wrote: Okay, if I look here: http://clojure.github.com Can I assume that anything that starts with clojure.core is not a dependency? And everything else is? No, some clojure.core.* namespaces are contribs (and need a project.clj dependency), some are built-in. Per my original email: On Thursday, October 25, 2012 2:57:26 PM UTC-4, Sean Corfield wrote: http://clojure.github.com If it's listed separated there, it's a contrib you need to pull in explicitly. Otherwise it's part of Clojure itself. Everything listed in the left hand column is a contrib that you need to pull in (as a dependency) in your project.clj, including: core.cache core.incubator core.match core.memoize core.unify (and core.logic which is, for some reason, missing from that list) Clojure's namespaces are documented here (linked from 'clojure' in the left column of the above page): http://clojure.github.com/clojure/ Anything listed in the left hand column here is built-in (also listed under Table of Contents on the right), no dependency needed (other than Clojure itself), you just need to :require it in your namespace. Finding clojure.core.protocols is a little harder, since it's a sub-namespace of clojure.core so you'll find it here: http://clojure.github.com/clojure/clojure.core-api.html Specifically: http://clojure.github.com/clojure/clojure.core-api.html#clojure.core.protocols You might find the Clojure Atlas helpful for navigating the built-in Clojure namespaces and functions: http://www.clojureatlas.com/ It's a bit of a sprawling universe of namespaces and can be a bit daunting when you first start working in Clojure but you soon get used to the layout (honest!). Hope that helps? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.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
what is the modern equivalent of clojure.contrib.java-utils/file?
I want to use clojure.contrib.java-utils/file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/file? -- 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: what is the modern equivalent of clojure.contrib.java-utils/file?
clojure.java.io/file On Thu, Oct 25, 2012 at 11:08 AM, larry google groups lawrencecloj...@gmail.com wrote: I want to use clojure.contrib.java-utils/file. I am using Clojure 1.3 and leinengen. What is the modern equivalent of clojure.contrib.java-utils/file? -- 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