Re: Tail Calls and Continuations in Clojure
On Fri, 15 Jul 2011 12:59:47 -0600 (MDT) Joel Dice wrote: > The VM in question is Avian (http://oss.readytalk.com/avian/), built > with optional tail call and continuation features enabled and using > the OpenJDK class library. It's not nearly as fast or sophisticated > as e.g. Hotspot, but it has some features that make it interesting > for running non-Java languages. Wow, didn't know that there is such a VM. Looks impressive, I should keep it in mind. regards, Marek -- 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
(doc more-examples)
Hello, More examples in how to use a form in the (doc ...) facility within REPL would be very useful to newbies. Thanks. tuba -- 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: can't set up Clojure 1.2.1
I've updated the wiki [1], can't update the main site page[2]. http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Running_Clojure http://clojure.org/getting_started -- 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: How to add jar files to leiningen projects?
Done. I have pushed version 0.3 with the changes. Regards, Shantanu On Jul 15, 2:09 am, Mark Rathwell wrote: > Looks good to me ;) > > On Thu, Jul 14, 2011 at 4:31 PM, Shantanu Kumar > wrote: > > > > > > > > > > > On Jul 14, 7:55 am, Mark Rathwell wrote: > > > The listing is nice...maybe would be nice to be able to limit the listing > > to > > > one artifact, or a match of artifacts with wildcards, not sure if the > > > feature would be used enough to justify the work though, but something > > like: > > > > lein localrepo list "*ring*" > > > > would output: > > > > [ring] > > > ring-core (0.2.0, 0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > > ring-devel (0.3.5, 0.3.7, 0.3.8) > > > ring-jetty-adapter (0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > > ring-servlet (0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > > > [lein-ring] > > > lein-ring (0.3.2, 0.4.0, 0.4.3) > > > Hmm, personally I think `grep` would fit this kind of usage nicely but > > I can see why that won't work. How about doing a lein-search's style > > of display? > > > $ lein localrepo list | grep ring > > > ring/ring-core (0.2.0, 0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > ring/ring-devel (0.3.5, 0.3.7, 0.3.8) > > ring/ring-jetty-adapter (0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > ring/ring-servlet (0.2.0-RC2, 0.3.5, 0.3.7, 0.3.8) > > lein-ring/lein-ring (0.3.2, 0.4.0, 0.4.3) > > > Does that look palatable? > > > Regards, > > Shantanu > > > -- > > 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
26 July 2011 London Clojure Dojo
Fellow Clojurians! Roll up! Roll up! The sign up is up for the 26 July London Clojure Dojo. Thoughtworks are kindly hosting and sponsoring again. The sign up page is here: https://ldncljdojo.eventwax.com/july-2011-london-clojure-dojo I hope to see you there! cheers, Bruce -- 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
ANN: 3 August Incanter and Clojure talk by Ben Evans (LJC, JCP) in London
Fellow Clojurians, The London Clojure User Group in co-operation with the London Java Community are proud to announce a talk on Clojure and Incanter by Ben Evans on 3 August at Skillsmatter in London. The sign up is here: http://skillsmatter.com/event/java-jee/ljclcug-incanter-clojure-presentation This presentation covers the Clojure programming language and the Incanter system for statistical computing and will be presented by Ben Evans. Clojure is a Lisp dialect which runs on top of the JVM, and so our treatment is especially geared towards developers who are already proficient in the Java language and environment. Attendees will gain an understanding of: The pillars and fundamentals of Clojure Clojure's novel language features and its powerful programming model Introduction to Incanter Why Clojure is a good language for statistical computing Exploring datsets with Incanter Interfacing with Excel and graphing and charting libraries I'm sure afterwards we will be repairing to The Slaughtered Lamb to have a pint or two. I hope to see you there! cheers, Bruce -- 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: can't set up Clojure 1.2.1
On Fri, Jul 15, 2011 at 11:29 PM, Larry Travis wrote: > Thanks, Sergey. The problem was indeed a classpath problem. The part of my > ignorance about Java that seems to cause me the most trouble is my ignorance > about Java classpaths. I think some Clojurians underestimate the > difficulties involved in learning Clojure without knowing Java first. I updated the Confluence getting started page to address this last week: Clojure is unlike most language in that you don't generally install Clojure itself; it's just a library that's loaded into the JVM. You don't interact with it directly, you use a build tool and editor/IDE integration instead. * IDEs and Editors [...] * Build Tools [...] http://dev.clojure.org/display/doc/Getting+Started Would this have helped if you had found it? Using the jar file directly is really not very common or convenient which is why it's not well-documented, but people coming from other languages naturally assume that the first step is to "install Clojure". It's unfortunate that the Getting Started page on clojure.org is in such an embarrassing state of disarray, but according to Clojure Core they can't spare any resources to fix it at the present time. The community-editable pages are generally much more helpful, but they aren't as prominent or easy to find. -Phil -- 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
Cyclic load dependency
Hi, I'm trying to use r0man / appengine-clj, and when :use-ing the datastore namespace I get a "cyclic load dependency". Doesn't clojure allow such cyclic references? (use 'appengine.datastore) Cyclic load dependency: [ /appengine/datastore/entities ]->/appengine/ datastore/query->[ /appengine/datastore/entities ]->/appengine/ datastore [Thrown class java.lang.Exception] Restarts: 0: [QUIT] Quit to the SLIME top level Backtrace: 0: clojure.core$check_cyclic_dependency.invoke(core.clj:4817) 1: clojure.core$load.doInvoke(core.clj:4912) 2: clojure.lang.RestFn.invoke(RestFn.java:408) 3: clojure.core$load_one.invoke(core.clj:4729) 4: clojure.core$load_lib.doInvoke(core.clj:4766) 5: clojure.lang.RestFn.applyTo(RestFn.java:142) 6: clojure.core$apply.invoke(core.clj:542) 7: clojure.core$load_libs.doInvoke(core.clj:4800) 8: clojure.lang.RestFn.applyTo(RestFn.java:137) 9: clojure.core$apply.invoke(core.clj:544) Cheers, Razvan -- 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: can't set up Clojure 1.2.1
It was already mentioned recently that clojure.org looks outdated. May be we just need the main site to link to a few valuable proven community resources? -- 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's the best way to test private functions?
Brian Marick wrote: > Benjamin Esham wrote: > > > I am writing a library [1] which has only one function that should be > > exposed to users. I'd like to be able to test all of the other > > functions, which are marked private with "defn-". Of course, these > > functions are inaccessible from the testing namespace (I'm using the > > testing boilerplate that Leiningen generates). > > I put the private functions in their own namespace that's :used by the API > namespace. Good idea. I'll have to think about whether this would be a good choice for me. -- Benjamin D. Esham | bdes...@gmail.com | www.bdesham.info “Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare!” — Blair Houghton -- 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
Increasing indent level in pprint
Is there an easy way to increase the indent of pprint data structures from 1 to something like 2 or 4? I've been searching on Google and going through the docs and don't see anything. For example, I would like the following command to produce something closer to "output 2" than to "output 1". (pprint {:remote-addr "127.0.0.1", :scheme :http, :query-params {}, :session {}, :form-params {}, :request-method :get, :query-string nil, :content-type nil, :cookies {"ring-session" {:value "b3493c6e-40c3-441c-a75a-19d1a67e7b8d"}}, :uri "/", :server-name "localhost", :params {}, :headers {"cache-control" "max-age=0", "cookie" "ring-session=b3493c6e-40c3-441c-a75a-19d1a67e7b8d", "accept-charset" "ISO-8859-1,utf-8;q=0.7,*;q=0.3", "accept-language" "en-US,en;q=0.8", "accept-encoding" "gzip,deflate,sdch", "accept" "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "user-agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30", "connection" "keep-alive", "host" "localhost:8080"}, :content-length nil, :server-port 8080, :character-encoding nil, :body nil }) OUTPUT 1 {:remote-addr "127.0.0.1", :scheme :http, :query-params {}, :session {}, :form-params {}, :request-method :get, :query-string nil, :content-type nil, :cookies {"ring-session" {:value "b3493c6e-40c3-441c-a75a-19d1a67e7b8d"}}, :uri "/", :server-name "localhost", :params {}, :headers {"user-agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30", "cookie" "ring-session=b3493c6e-40c3-441c-a75a-19d1a67e7b8d", "accept-charset" "ISO-8859-1,utf-8;q=0.7,*;q=0.3", "accept" "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "host" "localhost:8080", "cache-control" "max-age=0", "accept-encoding" "gzip,deflate,sdch", "accept-language" "en-US,en;q=0.8", "connection" "keep-alive"}, :content-length nil, :server-port 8080, :character-encoding nil, :body nil} OUTPUT 2 { :remote-addr "127.0.0.1", :scheme :http, :query-params {}, :session {}, :form-params {}, :request-method :get, :query-string nil, :content-type nil, :cookies { "ring-session" {:value "b3493c6e-40c3-441c-a75a-19d1a67e7b8d"} }, :uri "/", :server-name "localhost", :params {}, :headers { "user-agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30", "cookie" "ring-session=b3493c6e-40c3-441c-a75a-19d1a67e7b8d", "accept-charset" "ISO-8859-1,utf-8;q=0.7,*;q=0.3", "accept" "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "host" "localhost:8080", "cache-control" "max-age=0", "accept-encoding" "gzip,deflate,sdch", "accept-language" "en-US,en;q=0.8", "connection" "keep-alive" }, :content-length nil, :server-port 8080, :character-encoding nil, :body nil } -- 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: (doc more-examples)
On Sat, Jul 16, 2011 at 2:23 AM, Tuba Lambanog wrote: > More examples in how to use a form in the (doc ...) facility within > REPL would be very useful to newbies. Thanks. That would mean the docstrings need to provide more detail in the source code. Not sure how practical that is since the docstrings would substantially outweigh the code - maybe Clojure/core could comment? I'd recommend using the community-managed clojuredocs.org website since anyone can login and add / edit examples and notes etc. Not as convenient from the REPL, I agree, but I find I always have clojuredocs.org and clojureatlas.com open in tabs in my browser when I need more detail. -- 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: can't set up Clojure 1.2.1
On Fri, Jul 15, 2011 at 11:29 PM, Larry Travis wrote: > Thanks, Sergey. The problem was indeed a classpath problem. The part of my > ignorance about Java that seems to cause me the most trouble is my ignorance > about Java classpaths. I think some Clojurians underestimate the > difficulties involved in learning Clojure without knowing Java first. This issue applies to "all" JVM-based languages but I wouldn't go so far as to say you need to know _Java_, there's just a little bit of Java infrastructure knowledge required. It seems like we need some sort of Java Classpath 101 on the community wiki. Mind you, as Phil hints in his edit, using the raw Java libraries just isn't how folks really use Clojure - the problem is that's what clojure.org/getting_started says right now but we're hoping to see that changed after the "big news" on July 20th from Rich in NYC. If clojure.org/getting_started told folks to use Leiningen to get started, I suspect we'd stop worrying about Java classpaths completely :) -- 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: Increasing indent level in pprint
On Sat, Jul 16, 2011 at 12:46 PM, Asim Jalis wrote: > Is there an easy way to increase the indent of pprint data structures > from 1 to something like 2 or 4? I've been searching on Google and > going through the docs and don't see anything. > > For example, I would like the following command to produce something > closer to "output 2" than to "output 1". Just curious, is your background Java or some similar C-style language? I ask because folks coming from that sort of background tend to want braces and parentheses on separate lines and fixed indentation whereas the Lisp crowd tend to want trailing braces and "natural" indentation, i.e., continuation lines are indented so elements line up: (somefn arg1 (f arg2)) If I got that right the (f... should line up with arg1 above it. It took me a while to get used to the "Clojure way" of code/data layout but now I tend to avoid commas and just go with the flow of how pprint or my IDE wants to format stuff and I like the concise consistency. Sorry that doesn't answer your question but I hope it helps explain why the default pprint output looks the way it does? -- 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
java.lang.IllegalArgumentException: More than one matching method found: submit - when "letting" an ExecutorService
Hi guys. Experimenting a bit with code from "The joy of Clojure", and I ran into a little problem. Trying to run this in the REPL gives the following error: user=> (import [java.util.concurrent Executors]) java.util.concurrent.Executors user=> (let [*pool* (Executors/newFixedThreadPool (+ 2 (.availableProcessors (Runtime/getRuntime] (defn dothreads! [f & {thread-count :threads exec-count :times :or {thread-count 1 exec-count 1}}] (dotimes [t thread-count] (.submit *pool* #(dotimes [_ exec-count] (f)) java.lang.IllegalArgumentException: More than one matching method found: submit (NO_SOURCE_FILE:7) However if I define pool as a Var it seems to work fine: user=> (import '(java.util.concurrent Executors)) java.util.concurrent.Executors user=> (def *pool* (Executors/newFixedThreadPool (+ 2 (.availableProcessors (Runtime/getRuntime) #'user/*pool* user=> (defn dothreads! [f & {thread-count :threads exec-count :times :or {thread-count 1 exec-count 1}}] (dotimes [t thread-count] (.submit *pool* #(dotimes [_ exec-count] (f) #'user/dothreads! (from https://github.com/joyofclojure/book-source/blob/master/src/joy/mutation.clj) ExecutorService has three submit methods, and two with one parameter, a Runnable and a Callable. Since Clojure functions are both, I understand the compiler error, but why does it work when *pool* is a Var? The "let" version works when I cast the function to Runnable or Callable, just wondering why there is a difference. Cheers, Alf -- 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: FleetDB or other "NoSQL" store for Clojure?
I’ve found the MongoDB integration to Clojure to be really good for most of what I wanted for my app. With the Congomongo driver, you very strongly tick off the first two points, but I don’t think it will go so well with your other constraints. Mongo explicitly excludes transactions (http://www.mongodb.org/display/DOCS/Developer+FAQ#DeveloperFAQ-HowdoIdotransactions%2Flocking%3F) and instead provides support for atomic updates on individual documents. If you can fit your data model for your transaction into a single document you may be okay. This seems to be a more common schema for NoSQL type DBs, where the documents themselves are quite large, rather than lots of smaller entries joined in many tables for a relational DB. Thanks, Geoff On 15/07/2011, at 5:09 PM, Timothy Washington wrote: > I've actually tried FleetDB, and describe here, what I found. I didn't go > with it, and chose MongoDB instead. At the time, Congomongo didn't support DB > references. Bit it has since added DB reference support. I have yet to try > them out, but they look promising. > > HTH > Tim > > > On Fri, Jul 15, 2011 at 3:17 AM, Marko Kocić wrote: > Hi all, > I would like to try out some of those "no-sql" datastores for my next > project, and need an advice which one, since I never used the one before. > It needs to fulfill at least some of those following criteria, in order of > importance: > > - is nicelly supported by Clojure (by this I mean idiomatic clojure "driver", > not java plain java wrapper") > - it should be schemaless > - it should support transactions > - it's good if it can be used as embedded db > - it doesn't have to support large datasets (in-memmory is ok) > - it has to run on both Windows and Linux > > My first choice would be FleetDB, since it was written in Clojure and > examples look nice, but I'm not sure if it is abandonware or not, and I > havent heard that people are actually using it in production. > > What are my other options? > > Regards, > Marko > > -- > 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: Anyone on Google+ yet?
https://plus.google.com/106530605770958961477/posts -- 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: Increasing indent level in pprint
The position of the braces might be a red herring here. I was mostly interested in figuring out how to increase the indentation level from 1 to something larger. Even an indentation step of 2 for each level would be easier on the eye than 1. On Sat, Jul 16, 2011 at 4:23 PM, Sean Corfield wrote: > On Sat, Jul 16, 2011 at 12:46 PM, Asim Jalis wrote: >> Is there an easy way to increase the indent of pprint data structures >> from 1 to something like 2 or 4? I've been searching on Google and >> going through the docs and don't see anything. >> >> For example, I would like the following command to produce something >> closer to "output 2" than to "output 1". > > Just curious, is your background Java or some similar C-style language? > > I ask because folks coming from that sort of background tend to want > braces and parentheses on separate lines and fixed indentation whereas > the Lisp crowd tend to want trailing braces and "natural" indentation, > i.e., continuation lines are indented so elements line up: > > (somefn arg1 > (f arg2)) > > If I got that right the (f... should line up with arg1 above it. > > It took me a while to get used to the "Clojure way" of code/data > layout but now I tend to avoid commas and just go with the flow of how > pprint or my IDE wants to format stuff and I like the concise > consistency. > > Sorry that doesn't answer your question but I hope it helps explain > why the default pprint output looks the way it does? > -- > 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 -- 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
leiningen 1.6.1 not compatible with lein-nailgun 1.1.0
Hello, I've upgraded leiningen to 1.6.1, and found that I can't use it on my old projects. wei$ lein help Leiningen is a tool for working with Clojure projects. Several tasks are available: leiningen.classpath Problem loading: clean Remove compiled class files and jars from project. leiningen.compile Problem loading: Could not initialize class leiningen.deps__init leiningen.deploy Problem loading: leiningen.deps Problem loading: Could not initialize class leiningen.deps__init ... I tracked the issue down to lein-nailgun (I believe it requires some dependencies incompatible with the new version of lein), but I'm unsure how to fix it. A more general question: how do you find the latest version number of a library? Thanks, Wei -- 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
Questions About Assoc-in, Dissoc-in, etc.
I've been using assoc-in and dissoc-in to navigate through nested associative structures (HTTP requests). Had some questions: 1. Why doesn't dissoc-in take multiple key-sequences? For example: (dissoc-in m [:a :b :c] [:a :b :d]) I can do this using a series of dissoc-in calls, but it might be easier to just have this naturally there. 2. Why isn't there a select-in? Even dissoc-in is in contrib instead of in core. Is there an easier way to do these things that I am missing? 3. Similar to #1, why doesn't assoc-in take a sequence of key-sequences and values? For example: (assoc-in m [:a :b :c] 1 [:a :b :d] 2) Again this is possible by doing a sequence of assoc-in calls. Now is the reason these are not provided to hint that this might not be the most efficient way to do this kind of surgery? -- 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: (doc more-examples)
> On Sat, Jul 16, 2011 at 2:23 AM, Tuba Lambanog > wrote: >> More examples in how to use a form in the (doc ...) facility within >> REPL would be very useful to newbies. Thanks. > > That would mean the docstrings need to provide more detail in the > source code. Not sure how practical that is since the docstrings would > substantially outweigh the code - maybe Clojure/core could comment? I wouldn't use docstrings for this, as they increase runtime footprint. That said, an alternate doc macro could look other places besides docstrings. It shouldn't be difficult to write an examples macro that calls out to e.g. clojuredocs.org. Stu Stuart Halloway Clojure/core http://clojure.com -- 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: Questions About Assoc-in, Dissoc-in, etc.
W.r.t. item 2, would "get-in" be close to what you're looking for? http://clojuredocs.org/clojure_core/clojure.core/get-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: Increasing indent level in pprint
On Sat, Jul 16, 2011 at 7:05 PM, Asim Jalis wrote: > The position of the braces might be a red herring here. I was mostly > interested in figuring out how to increase the indentation level from > 1 to something larger. Even an indentation step of 2 for each level > would be easier on the eye than 1. My point was that the "natural" Lisp/Clojure indentation is to match the items above so for: {:something the natural indentation is 1 and for: (foo a the natural indentation is 5: '(', 'f', 'o', 'o', ' '. Indentation is not some fixed quantity you can change - it's dependent on the structure of the data/code and the length of the symbols. -- 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: FleetDB or other "NoSQL" store for Clojure?
Hello - I'd like to throw in my vote for Redis. The only downside is that there is not an officially supported port on Windows. However, you may consider using a service such as Redis to Go (http://redistogo.com) and just accessing that as you need it. Best, Michael 2011/7/15 Elías Alonso : > As far as I know, the only NoSQL DB supporting transactions right now > is Redis. It also satisfies the rest of your points (well, I'm not > sure if Redis run on windows...). > > There are some wrappers for Cojure around, for example this one: > > https://github.com/ragnard/redis-clojure > > Regards, > Elías. > > On 15 jul, 09:17, Marko Kocić wrote: >> Hi all, >> I would like to try out some of those "no-sql" datastores for my next >> project, and need an advice which one, since I never used the one before. >> It needs to fulfill at least some of those following criteria, in order of >> importance: >> >> - is nicelly supported by Clojure (by this I mean idiomatic clojure >> "driver", not java plain java wrapper") >> - it should be schemaless >> - it should support transactions >> - it's good if it can be used as embedded db >> - it doesn't have to support large datasets (in-memmory is ok) >> - it has to run on both Windows and Linux >> >> My first choice would be FleetDB, since it was written in Clojure and >> examples look nice, but I'm not sure if it is abandonware or not, and I >> havent heard that people are actually using it in production. >> >> What are my other options? >> >> Regards, >> Marko > > -- > 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: Questions About Assoc-in, Dissoc-in, etc.
On Jul 16, 7:11 pm, Asim Jalis wrote: > I've been using assoc-in and dissoc-in to navigate through nested > associative structures (HTTP requests). Had some questions: > > 1. Why doesn't dissoc-in take multiple key-sequences? For example: > > (dissoc-in m [:a :b :c] [:a :b :d]) > > I can do this using a series of dissoc-in calls, but it might be > easier to just have this naturally there. (update-in m [:a :b] dissoc :c :d) > 2. Why isn't there a select-in? Even dissoc-in is in contrib instead > of in core. Is there an easier way to do these things that I am > missing? What is select-in supposed to do? It's either get-in+select-keys, or update-in+select-keys, depending on what you intend. > 3. Similar to #1, why doesn't assoc-in take a sequence of > key-sequences and values? For example: > > (assoc-in m [:a :b :c] 1 [:a :b :d] 2) > > Again this is possible by doing a sequence of assoc-in calls. Now is > the reason these are not provided to hint that this might not be the > most efficient way to do this kind of surgery? (update-in m [:a :b] assoc :c 1 :d 2) -- 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: can't set up Clojure 1.2.1
Phil: You ask whether, if I had found it, the following web page would have helped: http://dev.clojure.org/display/doc/Getting+Started+with+Emacs The answer: Definitely yes. The page advises me to use for bringing up a Clojure REPL java -cp path/to/clojure.jar clojure.main whereas the page http://clojure.org/getting_started advises java -cp clojure.jar clojure.main I followed the latter advice blindly because I didn't know what "-cp" was doing. What I have now done is follow the Confluence advice for setting the value of the Aquamacs variable 'inferior-lisp-program, and so far things are working well. Some time soon I want to set up a Slime plus Swank Clojure plus Leiningen environment instead, but right now I prefer to spend the time I have for such things digging deeper into Clojure proper. By the way, I don't want to come across as unhappy with Clojure and Clojurians. Starting with the creation of the language itself, I very much appreciate what you guys have done and are doing, and I predict that that creation and the subsequent evolution of the language will ultimately go down as a major development in the history of computer science -- at least, for the very important areas of programming multi-processor systems and of experimental programming (so important, for example, for artificial intelligence research). --Larry On 7/16/11 10:10 AM, Phil Hagelberg wrote: On Fri, Jul 15, 2011 at 11:29 PM, Larry Travis wrote: Thanks, Sergey. The problem was indeed a classpath problem. The part of my ignorance about Java that seems to cause me the most trouble is my ignorance about Java classpaths. I think some Clojurians underestimate the difficulties involved in learning Clojure without knowing Java first. I updated the Confluence getting started page to address this last week: Clojure is unlike most language in that you don't generally install Clojure itself; it's just a library that's loaded into the JVM. You don't interact with it directly, you use a build tool and editor/IDE integration instead. * IDEs and Editors [...] * Build Tools [...] http://dev.clojure.org/display/doc/Getting+Started Would this have helped if you had found it? Using the jar file directly is really not very common or convenient which is why it's not well-documented, but people coming from other languages naturally assume that the first step is to "install Clojure". It's unfortunate that the Getting Started page on clojure.org is in such an embarrassing state of disarray, but according to Clojure Core they can't spare any resources to fix it at the present time. The community-editable pages are generally much more helpful, but they aren't as prominent or easy to find. -Phil -- 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: Increasing indent level in pprint
Okay. I see what you mean. On Jul 16, 2011, at 8:39 PM, Sean Corfield wrote: > On Sat, Jul 16, 2011 at 7:05 PM, Asim Jalis wrote: >> The position of the braces might be a red herring here. I was mostly >> interested in figuring out how to increase the indentation level from >> 1 to something larger. Even an indentation step of 2 for each level >> would be easier on the eye than 1. > > My point was that the "natural" Lisp/Clojure indentation is to match > the items above so for: > > {:something > > the natural indentation is 1 and for: > > (foo a > > the natural indentation is 5: '(', 'f', 'o', 'o', ' '. > > Indentation is not some fixed quantity you can change - it's dependent > on the structure of the data/code and the length of the symbols. > -- > 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 -- 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: (doc more-examples)
Or an option for more extended doc when launching REPL for those who need the extra documentation more than performance during development, or maybe a searchable dictionary panel at the left hand side of REPL, ala some versions of Ruby's irb. Meanwhile, thanks for the pointer to the clojure quickref at clojuredocs.org. Good enough. Tuba On Sat, Jul 16, 2011 at 9:11 PM, Stuart Halloway wrote: > On Sat, Jul 16, 2011 at 2:23 AM, Tuba Lambanog > wrote: > > More examples in how to use a form in the (doc ...) facility within > > REPL would be very useful to newbies. Thanks. > > > That would mean the docstrings need to provide more detail in the > source code. Not sure how practical that is since the docstrings would > substantially outweigh the code - maybe Clojure/core could comment? > > > I wouldn't use docstrings for this, as they increase runtime footprint. > > That said, an alternate doc macro could look other places besides > docstrings. It shouldn't be difficult to write an examples macro that calls > out to e.g. clojuredocs.org. > > Stu > > > Stuart Halloway > Clojure/core > http://clojure.com > > -- > 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