#clojure logs

2015-10-25

12:20irctcspent some time searching for answers to this question
12:21irctcwhy isn't it "not?"
12:25irctcalso, why isn't it "boolean?"
12:26irctcmaybe these are the basic building blocks of the language?
12:33justin_smithirctc: not? isn't checking the status of some thing
12:34justin_smithsimilarly, boolean? would imply you are asking whether it is boolean or not
12:35irctcok. That makes sense. But the style guidance says name predicates with a ?
12:35irctcnot does feel different though
12:35justin_smithboolean is not a predicate, nor is not
12:35irctcwhy
12:35justin_smithjust because something returns true or false doesn't make it a predicate - a predicate asks some question about the input and answers true or false
12:35irctcI see
12:36irctcso false? is a predicate, but not is not
12:36justin_smithexactly
12:38irctccool, thanks
12:39irctcI was thinking they're functionally equivalent, but you can't even say that
12:39justin_smith,(false? nil)
12:39irctcb/c (false? nil)
12:39clojurebotfalse
12:39irctcright
12:39irctc,(false? false)
12:39clojurebottrue
12:39justin_smith,((comp false? boolean) nil)
12:39clojurebottrue
12:39justin_smithhah
12:39irctccool
12:44noncom|2does anybody know, can i do non-destructive batch-insert with mongo?
12:44noncom|2i want to only insert what's missing...
12:53justin_smithnoncom|2: is this related to upsert?
13:21dnolenhttps://github.com/omcljs/om/wiki/Applying-Property-Based-Testing-to-User-Interfaces
13:43noncom|2justin_smith: well, idk.. there's upsert for single insert. for batch insert i haven't found upsert possibility
13:45noncom|2or rather not for single insert, but for single update
13:45noncom|2which might act as upsert
13:45noncom|2but there's nothing like that for batcg
13:45noncom|2*batch
13:46noncom|2gonna ask on #mongodb
15:02xeqiis there a project that extends clojure.java.io's mutlimethods to nio2?
16:30noncomwhat was that function to get only the diverse elements of a sequence?
16:31noncomdistinct
16:57FrozenlockIs there a way to get CIDER to print the functions in lisp form, instead of #object[...] ?
16:58justin_smithFrozenlock: functions do not carry their source info, though the var holding one might
18:16hlolliWhat would be a good way to filter random x many elements from collection that produces no duplicaties?
18:21hlollinevermind, stackoverflow came to rescue (just googled badly)
18:22justin_smith(take n (distinct (shuffle coll))) right?
18:24SeyleriusWeird. Lobos isn't coming in properly.
18:24hlolliI actually did that for a while, was trying to recurse it, maybe wrong approach. Solution I found here is good http://stackoverflow.com/questions/24553212/how-to-take-n-random-items-from-a-collection-in-clojure
18:25hlollifrom user tnoda, has seed in it, very good to "freeze" the result, perfect for my application.
18:26SeyleriusKeeps failing with ClassNotFoundException
18:26SeyleriusWTF?
18:26justin_smithSeylerius: what driver are you using for clojure.java.jdbc?
18:27Seyleriusorg.postgresql.Driver
18:27justin_smithcan you share a paste of the stacktrace?
18:29Seyleriusjustin_smith: (:use [lobos.core]) produces this: http://sprunge.us/fTAK
18:31justin_smithSeylerius: it's saying class not found for lobos.core itself - is that :use inside an ns form?
18:31SeyleriusThat one is in the repl
18:32justin_smithSeylerius: in the repl you should be doing (use 'lobos.core)
18:32SeyleriusUnable to resolve symbol: use in this context
18:32justin_smithumm... (clojure.core/refer-clojure) will fix that, you are in a broken namespace
18:34SeyleriusThere we go.