[ANN] bouncer 0.2.3-beta1

2013-03-14 Thread Leonardo Borges
bouncer is a validation DSL for Clojure apps Github: https://github.com/leonardoborges/bouncer Clojars: https://clojars.org/bouncer New in version 0.2.3-beta1: - Validator sets can now be used at the top level call to validate and valid? - Added tests and a doc section around validation pipelini

Re: clojurescript browser repl not working.

2013-03-14 Thread Evan Mezeske
Oops, there's an open case to bring lein-cljsbuild's default compiler version up to r1586: https://github.com/emezeske/lein-cljsbuild/issues/186. I will try to get to that soon. In the meantime, you should be able to add [org.clojure/clojurescript "0.0-1586"] to your :deps to get the latest ve

What guarantees (if any) does Clojure make about laziness?

2013-03-14 Thread Paul Butcher
Clojure's sequences are lazy - but is there anything that guarantees *how* lazy they are? To give a concrete example - given an infinite lazy sequence of promises: (def promises (repeatedly promise)) If, in one thread I do: (doseq [p (map deref promises)] (println p)) And in another thread, I

[ANN] congomongo 0.4.1 released

2013-03-14 Thread Sean Corfield
http://corfield.org/blog/post.cfm/congomongo-0-4-1-released * read preference supported (per-connection, per-collection, per-fetch) - Niclas Meier * add-index! supports :background true/false - dwwoelfel * namespaced keyword keys in maps are roundtripped correctly - Adam Clements (the blog post l

[ANN] clj-time 0.4.5 released

2013-03-14 Thread Sean Corfield
http://corfield.org/blog/post.cfm/clj-time-0-4-5-released * Add testing predicates for days (e.g., tuesday?) and months (e.g., july?) -Devin Walters * Change base Clojure version from 1.3.0 to 1.4.0 (we're testing against 1.3.0 and 1.5.1 now) * format-local-time now returns nil on a bad format str

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
On Thu, Mar 14, 2013 at 7:18 PM, Norman Richards wrote: > PLDB was written against the current core.logic release. I have not yet > started testing with the 0.8 pre releases, but judging from the recent > core.logic announcement, now is probably a good time to start. :) Please do. I'll probably

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread Norman Richards
On Mar 14, 2013, at 4:15 PM, JvJ wrote: > I'm not sure how else to go about contacting you about this, but I've found > some problems in pldb. The system just doesn't seem to work at all with the > core.logic 0.8.0 builds. I'm not too familiar with the guts of pldb or > core.logic, but I'm

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread Craig Brozefsky
JvJ writes: >I'm not sure how else to go about contacting you about this, but I've >found some problems in pldb. The system just doesn't seem to work at >all with the core.logic 0.8.0 builds. I'm not too familiar with the >guts of pldb or core.logic, but I'm wondering if maybe s

Re: clojurescript browser repl not working.

2013-03-14 Thread David Nolen
I'm not sure if lein-cljsbuild uses the latest release of ClojureScript - Evan would know. In general I think it's probably best to just specify the version of ClojureScript you want to use yourself to avoid any issues. On Thu, Mar 14, 2013 at 5:21 PM, Rohan Nicholls wrote: > I have been in touc

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread David Nolen
That's likely though pldb is so small I don't really think it would require much in the way of changes. On Thu, Mar 14, 2013 at 5:15 PM, JvJ wrote: > I'm not sure how else to go about contacting you about this, but I've > found some problems in pldb. The system just doesn't seem to work at all

Re: clojurescript browser repl not working.

2013-03-14 Thread Rohan Nicholls
I have been in touch with the writer of the modern-cljs tutorial, and he thinks that a library include is missing that used to be a problem, but was fixed. It looks like the problem is back. You can follow the issue and discussion here: https://github.com/magomimmo/modern-cljs/issues/38 And

Re: core.logic: Dividing the knowledge base

2013-03-14 Thread JvJ
I'm not sure how else to go about contacting you about this, but I've found some problems in pldb. The system just doesn't seem to work at all with the core.logic 0.8.0 builds. I'm not too familiar with the guts of pldb or core.logic, but I'm wondering if maybe some implementation changes lead

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thank you! I implemented your suggestion of breaking up the Java code. On Thursday, March 14, 2013 10:42:55 AM UTC-4, Chris Ford wrote: > > You could also consider visually breaking up Java code that is across > multiple files. You've got "// Contents of:" comments, but a break in the > grey bac

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
This is exactly the kind of content I was looking for. Thank you! On Thursday, March 14, 2013 3:05:16 PM UTC-4, Jeremy Heiler wrote: > > On Thu, Mar 14, 2013 at 12:41 AM, Jason Lewis > > > wrote: > >> What I'd love to see is a tutorial on abstracting Java classes and >> interfaces in pure Cloju

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Jeremy Heiler
On Thu, Mar 14, 2013 at 12:41 AM, Jason Lewis wrote: > What I'd love to see is a tutorial on abstracting Java classes and > interfaces in pure Clojure, [...] > Zach Tellman did a great talk about this called "Distilling Java Libraries" at Clojure/West 2012. Check it out! http://www.infoq.com/pre

Re: ":peer/timeout Transaction timed out", and excessive logging

2013-03-14 Thread Brian Craft
Damn, wrong group. Sorry On Thursday, March 14, 2013 10:37:30 AM UTC-7, Brian Craft wrote: > > I just tried loading a real data file (30M tsv) for the first time (I > mean, instead of just unit tests on my loading program with tiny files), > which resulted in this output: > > Exception in thread

":peer/timeout Transaction timed out", and excessive logging

2013-03-14 Thread Brian Craft
I just tried loading a real data file (30M tsv) for the first time (I mean, instead of just unit tests on my loading program with tiny files), which resulted in this output: Exception in thread "main" clojure.lang.ExceptionInfo: :peer/timeout Transaction timed out. {:db/error :peer/timeout} at

Re: let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root "root", watcher "watcher"}} {:auth-conf "aaaaa", :watcher "bbbbbbb"}]

2013-03-14 Thread Baishampayan Ghose
This the syntax for map destructuring. Works on function argument vector and let bindings. You'll find multiple online resources that explain this clearly. Sent from phone. Please excuse brevity. On 14 Mar 2013 21:07, wrote: > *excuse me, when I read the storm src,I catch some code as follows*

let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root "root", watcher "watcher"}} {:auth-conf "aaaaa", :watcher "bbbbbbb"}]

2013-03-14 Thread zlj844230
*excuse me, when I read the storm src,I catch some code as follows* * * *(let [{:keys [root watcher auth-conf], :or {auth-conf "auth-conf", root "root", watcher "watcher"}} {:auth-conf "a", :watcher "bbb"}]* *(println auth-conf)(println root)(println watcher)* *)* * * *I don't know wh

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Chris Ford
You could also consider visually breaking up Java code that is across multiple files. You've got "// Contents of:" comments, but a break in the grey background would also be helpful. Nice post. The world needs more people willing to explain basic concepts in a clear, un-patronising way. Cheers,

Re: Apparent interaction of libraries with lein

2013-03-14 Thread Jim foo.bar
Could it be that you're using lein1 instead of lein2? Is lein1 still actively maintained? In any case I suggest you upgrade to lein2... Jim On 14/03/13 12:48, Nico Swart wrote: The Leiningen project file I use include these dependancies: (defproject fb20try "1.0.0-SNAPSHOT" :description "F

Re: Apparent interaction of libraries with lein

2013-03-14 Thread Akhil Wali
The error looks like its coming from java rather than leinengen. And the error might be due to quil loading some dll in the jre which is missing. Try reinstalling java is all I can say at this point. On Mar 14, 2013 6:18 PM, "Nico Swart" wrote: > The Leiningen project file I use include these

Re: What's the point of -> ?

2013-03-14 Thread Gary Verhaegen
These are sequence functions, not collections functions. On 14 March 2013 10:31, dmirylenka wrote: > For me ->> is a bread and butter of working with collections, like here: > > (->> some-collection >(concat other-collection) >distinct >(filter some-predicate) >(so

Re: Using transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 13:13, David Powell wrote: > As a temporary hack, perhaps you could implement a deftype ReduceToTransient > wrapper that implements CollReduce by calling reduce on the parameter, and > then calling persistent! on the return value of reduce. You'd also need to > implement Co

Re: Using transients within fold

2013-03-14 Thread David Powell
As a temporary hack, perhaps you could implement a deftype ReduceToTransient wrapper that implements CollReduce by calling reduce on the parameter, and then calling persistent! on the return value of reduce. You'd also need to implement CollFold so that the partitioning function produces wrapped r

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thanks! Updated! On Thursday, March 14, 2013 8:28:47 AM UTC-4, Marko Topolnik wrote: > > One point crosses my mind: JAR is a regular ZIP file. First time I learned > that, I felt a great relief: it goes a long way towards demystifying the > practical concerns of living with Java. > > On Thursday

Re: Using transients within fold

2013-03-14 Thread Meikel Brandmeyer (kotarak)
You could use the proposed change (second link) and use a patched clojure in your application. Meikel -- -- 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

Re: Using transients within fold

2013-03-14 Thread Paul Butcher
On 14 Mar 2013, at 11:49, Meikel Brandmeyer (kotarak) wrote: > that's not really possible at the moment. cf. > https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion and > https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912 Dang. At least other peopl

Apparent interaction of libraries with lein

2013-03-14 Thread Nico Swart
The Leiningen project file I use include these dependancies: (defproject fb20try "1.0.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[org.clojure/clojure "1.4.0"] [org.clojure/clojure-contrib "1.2.0"] [dds/ndds "1.0"] [quil

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Marko Topolnik
One point crosses my mind: JAR is a regular ZIP file. First time I learned that, I felt a great relief: it goes a long way towards demystifying the practical concerns of living with Java. On Thursday, March 14, 2013 1:03:17 PM UTC+1, Daniel Higginbotham wrote: > > Thanks for the feedback, guys!

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Daniel Higginbotham
Thanks for the feedback, guys! It's good to know I'm on the right track. I've also cleaned up the formatting - thank you for pointing that out :) It seems like the clojure style guide goes some way toward showing how to wrap Java, though it doesn't really go into detail about handling all the d

Re: Using transients within fold

2013-03-14 Thread Meikel Brandmeyer (kotarak)
Hi, that's not really possible at the moment. cf. https://groups.google.com/d/topic/clojure-dev/UbJlMO9XYjo/discussion and https://github.com/cgrand/clojure/commit/65e1acef03362a76f7043ebf3fe2fa277c581912 Kind regards Meikel -- -- You received this message because you are subscribed to the

Re: What's the point of -> ?

2013-03-14 Thread Marko Topolnik
On Thursday, March 14, 2013 1:44:59 AM UTC+1, Mike Norman wrote: > > It decomplects order and application for the sake of, at least, > readability. It doesn't decomplect anything, in fact. It just uses a *different* rule for the application order, which happens to be the same as the order of

Using transients within fold

2013-03-14 Thread Paul Butcher
I've been experimenting with reducers using a small example that counts the words in Wikipedia pages by parsing the Wikipedia XML dump. The basic structure of the code is: (frequencies (flatten (map get-words (get-pages where get-pages returns a lazy sequence of pages from the XML dump and

Re: What's the point of -> ?

2013-03-14 Thread Marko Topolnik
It is fair to say that, if applied uncritically, for example by beginners who haven't yet gotten the hang of it, thrushes really can create a mess. For example: (->> x (/ 2) (if done? "stop")) This really does break the "application chaining" mental shortcut and forces you to mentally unapply

Re: What's the point of -> ?

2013-03-14 Thread dmirylenka
For me ->> is a bread and butter of working with collections, like here: (->> some-collection (concat other-collection) distinct (filter some-predicate) (sort-by some-sort-fn) (take 10)) On Monday, March 11, 2013 11:58:29 AM UTC+1, edw...@kenworthy.info wrote: >

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Marko Topolnik
I like the content of the article, but shouldn't you fix the formatting? Source code is badly mangled and some bulleted lists are flowed into a single paragraph. On Thursday, March 14, 2013 3:58:58 AM UTC+1, Daniel Higginbotham wrote: > > I've been feeling like my lack of Java knowledge has been