#clojure log - Apr 15 2014

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:04 cddr: clojurebot: How do I add a fact?

0:17 zspencer: @kidpollo aloha :)

0:17 So, I've got a string "foo" and I want to turn it into a vector ["f" "o" "o"]

0:18 split #"" gives me too many ("" "f" "" "o" "" "o")

0:18 (clojure.string/split "foo" #"")

0:18 beamso: (seq "foo")

0:18 ,(seq "foo")

0:18 clojurebot: (\f \o \o)

0:18 zspencer: derp

0:18 I'm an idiot

0:18 this is what happens when I come at it from my ruby programmer mentality

0:19 beamso: you asked when it seemed wrong. so that isn't idiotic.

0:22 amalloy: derek_c: you can't, in general, make anything "'return more than one thing", so [1 2 3 (something ...)] will always have exactly four elements

0:24 but you can write, for example, (apply vector 1 2 3 (something ...)), or (concat [1 2 3] (something ...)), or `[1 2 3 ~@(something ...)]. any of those are ways to splice lists together

0:24 derek_c: amalloy: I see, thanks!

0:33 zspencer: ok one more question: I've got two hashmaps who (with visual inspection) seem to be the exact same

0:33 however test-unit is saying they are not

0:34 gvickers: what's in them?

0:34 zspencer: more hash-maps

0:34 and a vector

0:34 it's a representation of a dungeon

0:35 ehhh, let me put it in a gist

0:35 https://gist.github.com/zspencer/357332c3f6ca7ecdc978

0:36 TravisD: Given any imperative algorithm that modifies state, we can construct a pure functional equivalent that consists of some state transformers that sequentially update persistent data structures. Are there any dangerous gotchas with this transformation?

0:36 zspencer: It's very possible that I am a touch past the ballmer peak

0:37 trap_exit: is there a builtin library for parsing urls in clojurescript?

0:37 i.e. I want the params of a url

0:37 something like foo.com/?username=blah&id=blah

0:37 I wnat the username=blah, id=blah part

0:37 perferably as a map

0:37 zspencer: I think ring has something like that

0:38 trap_exit: sorry, I want to do this _clojurescript_

0:38 zspencer: but I don't think it's independent of the framework

0:38 trap_exit: not clojure

0:38 zspencer: could probably extract that into cljx but I don't know of something offhand

0:38 amalloy: TravisD: well, if any of that state lives in the outside world, like console input, it's a little tricky

0:39 but in general i am aware of no theoretical dangers

0:39 TravisD: amalloy: Ah, yeah. Some state doesn't come to you in a persistent form

0:39 amalloy: Do you know if there are some situations where the pure version has substantially worse running time?

0:40 amalloy: i think we have data structures good enough to get within a log-factor on just about anything

0:41 but that's asymptotic, of course - for small data persistence is relatively more expensive (and that matters relatively less, since it's small)

0:41 TravisD: That's pretty cool. Is there a good place to read about the functional data structures? I have a copy of Chris Okasaki's book, but I haven't looked much at it

0:41 amalloy: that book is amazing, but too hard for me :P

0:41 $google understanding persistent vector

0:41 gvickers: zspencer: in the second map :health and :10 are keys

0:41 lazybot: [polymatheia - Understanding Clojure's Persistent Vector, pt. 1] http://hypirion.com/musings/understanding-persistent-vector-pt-1

0:41 gvickers: zspencer: or the first one rather

0:42 amalloy: i think that's a decent article

0:42 TravisD: Ah, I saw some links to these blog posts before, but didn't look closely either :P I have a problem with choosing what to read

0:42 amalloy: i gtg though, enjoy

0:42 zspencer: gvickers: this... this is my life

0:42 TravisD: Thanks! Talk later

0:43 zspencer: gvickers: huge thanks. I was certain that hashmaps should be equivalent

0:43 gvickers: zspencer: hahaha I feel that. It helps sometimes to def both and pprint them next to each other

0:43 zspencer: ahhh pprint

0:43 gvickers: zspencer: maintains the order

0:43 zspencer: that would have been smarter

0:45 and yay programming: https://github.com/zspencer/clj-warrior

0:49 gvickers: zspencer: looks interesting

0:51 devn: I'm reading a slide deck about core.async. It says "goroutines don't map 1-1 to threads. They get their own thread pool (number of cores + 2) in clojure. The runtime takes care of multiplexing them."

0:51 "number of cores + 2" -- is that &(.availableProcessors (Runtime/getRuntime))

0:52 ,(.availableProcessors (Runtime/getRuntime))

0:52 clojurebot: #<CompilerException java.lang.SecurityException: Reference To Runtime is not allowed, compiling:(NO_SOURCE_PATH:0:0)>

0:52 devn: + 2?

0:52 in my case, because of hyperthreading, I would have 10

0:52 (thread pools I mean)

0:53 gvickers: devn: https://github.com/clojure/core.async/blob/72509d0b97372fd51b271a9662f67107642783e2/src/main/clojure/clojure/core/async/impl/concurrent.clj

0:54 devn: badda bing! thanks gvickers

0:54 gvickers: Looks like it, hyperthreading doesent count as an extra processor

0:55 devn: gvickers: my macbook pro has 4 cores, but .availableProcessors returns 8

0:55 because of hyperthreading

0:55 (inc gvickers)

0:55 lazybot: ⇒ 1

0:56 gvickers: devn: oh I just assumed since mine returned 4, hyperthreading didnt count. Hmm, I have an i7 macbook and only see 4 processors.

0:57 dbell: is there a way to see all the protocols a type implements?

0:57 devn: gvickers: I have an i7 -- 2.3GHz, number of processors = 1, number of cores = 4

0:57 dbell: (off the top of collective heads, i'm on google pass #2 but it's not a big deal yet)

0:58 devn: dbell: extenders?

0:58 dbell: hmm, extenders looks awesome, i have the mirror problem though

0:59 (inc devn)

0:59 lazybot: ⇒ 16

1:00 devn: dbell: do you know the protocols you want to check for the type?

1:01 dbell: err, you are severely overestimating how hacky this is

1:01 TravisD: I've got an interview for an internship coming up in the next few weeks and I'm hoping to refresh my algorithms background. Can anyone recommend a book that is shorter than CLRS and maybe more appropriate for a quick review?

1:01 devn: dbell: heh

1:01 dbell: well, help me out

1:01 dbell: this is more of a throwaway b/c i don't want to look that up, ha

1:01 really what i'm trying to do is get a to-str string from basic functions

1:02 devn: dbell: what about using ns-publics and protocol? or something?

1:02 dbell: so, say, (mystery-fn +) -> "+"

1:02 devn: ,(filter #(-> @(val %) protocol?) (ns-publics *ns*))

1:02 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: protocol? in this context, compiling:(NO_SOURCE_PATH:0:0)>

1:02 devn: err sorry

1:02 TravisD: I find your names very hard to distinguish

1:03 gvickers: TravisD: check this out http://bigocheatsheet.com/

1:03 devn: ,(filter #(boolean (:on-interface @(val %)) (ns-publics *ns*))

1:03 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

1:03 devn: gah

1:03 dbell: smiled

1:04 devn: ,(filter #(boolean (:on-interface @(val %))) (ns-publics *ns*))

1:04 clojurebot: ()

1:04 TravisD: gvickers: thanks

1:04 dbell: devn: checked out an equivalent in my repl, looks promising

1:05 devn: dbell: you can then filter again across that for #(satisfies? @(val %) t)

1:07 dbell: devn: https://www.youtube.com/watch?v=WVpe4lOAcjc

1:07 thanks, solved my problem

1:11 devn: sweet

1:11 ,(defn protocols [ns] (filter #(boolean (:on-interface @(val %))) (ns-publics ns)))

1:11 clojurebot: #'sandbox/protocols

1:11 devn: ,(defn implementers [x] (filter #(satisfies? @(val %) x) (all-protocols)))

1:11 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: all-protocols in this context, compiling:(NO_SOURCE_PATH:0:0)>

1:11 devn: err

1:11 ,(defn implementers [x] (filter #(satisfies? @(val %) x) (protocols)))

1:11 clojurebot: #'sandbox/implementers

1:12 devn: ,(defprotocol Foo (bar [x] "bar method"))

1:12 clojurebot: Foo

1:12 devn: ,(deftype Bar [x] Foo (bar [this] "bar bar method"))

1:12 clojurebot: sandbox.Bar

1:12 devn: ,(implementers (Bar. 1))

1:12 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: sandbox/protocols>

1:12 devn: sigh

1:12 ,(defn implementers [x] (filter #(satisfies? @(val %) x) (protocols *ns*)))

1:12 clojurebot: #'sandbox/implementers

1:12 devn: ,(implementers (Bar. 1))

1:12 clojurebot: ([Foo #'sandbox/Foo])

1:14 devn: hackish for sure

1:36 dbasch: derek_c: what’s the difference between (mymacro 1 2 3) and (list 1 2 3) ?

1:41 bob2: what do you mean?

2:51 sm0ke: how safe/idiomatic is it use metadata to classify some data as special?

2:55 llasram: What do you mean?

3:03 sm0ke: hurmm not sure

3:04 so i have an api, to which i want to add some other functionality without adding more functions

3:05 i guess i can always use a map which is stripped by the functions

3:05 moreover i read, that meta is not preserved by clojure functions

3:05 not all

3:12 llasram: That's unfortunately a bit vague to provide suggestions about... Any more specific?

4:32 Ywen: Hello, guys. When you need to access a REST WS exposing a WADL (with a succinct API), do you use wadl2java to generate classes that you'll use with Clojure or do you make the HTTP query/response parsing (through Xpath) yourself?

4:56 sandbags: Hi folks. I'm missing something about transitive dependencies. I built a library that depends (ironically enough) on Stuart Sierra's "dependency" library. When I include my library in my app 'dependency' is not picked up as a transitive dependency and the code won't load. I've googled but can't see what I am missing. Shouldn't transitive deps be picked up?

4:57 TEttinger: all the project.clj config is as it should be?

4:57 sandbags: TEttinger: my library has com.stuartsierra/dependency as a dependency in project.clj and my app has my library as it's dependency

4:58 i'm not sure if that is the same as "as it should be" :)

4:58 TEttinger: there's a command to check...

4:58 lein deps tree

4:58 might be it

4:58 sandbags: right so i ran that on both

4:58 sm0ke: :tree

4:58 sandbags: and my lib shows "dependency" as a dependency

4:59 but my app shows only my library as a dependency, no transitive deps

4:59 i'm wondering if there's something specific you need to do to have this happen? it's not come up for me before

4:59 TEttinger: could it be using an older version of your lib?

4:59 sandbags: the app depends on the current version

5:00 TEttinger: try lein install of the latest lib

5:01 sandbags: okay so a potential wrinkle is that this library is installed locally using mvn instalL:install-file

5:01 could that have some bearing?

5:01 the lib isn't in clojars

5:01 TEttinger: that's what I suspected

5:01 unless you keep installing as you change deps, it won't know in the app?

5:02 sandbags: i don't think i changed deps since i last installed it but i'll try installing it again to be sure

5:03 that doesn't appear to have made any difference

5:03 TEttinger: gah

5:03 no idea

5:03 wait for technomancy

5:03 I best sleep

5:03 sandbags: for reference i install it using https://gist.githubusercontent.com/anonymous/da74f82b8040100495bc/raw/31a3133b65ae8f2e85d5ce7ee5d718cea6dd73b2/gistfile1.sh

5:03 nathan7: Ahoy humans — is there an opposite to conj?

5:04 Ywen: nathan7: what do you mean? putting to the end of a list or reading the first element?

5:04 nathan7: Like, (= x (f (conj l x)))

5:04 sandbags: TEttinger: okay, thanks for your help

5:05 nathan7: equivalent to last for a vector, equivalent to first for a list

5:05 Ywen: nathan7: try pop

5:05 nathan7: sorry, peek

5:05 nathan7: Ywen: <3

5:06 Ywen: nathan7: you're welcome ;)

5:10 ollivera: Hi, I am learning Clojure and I tried to write a sql query to insert the result in a mongoDb collection but I got a Null Point exception.

5:10 see sample https://www.refheap.com/76295

5:11 apum: Hi, does anyone know the way to find in which namespace (of the loaded ones) is a function defined (by fn's name)?

5:13 sm0ke: `inc

5:13 ,`in

5:13 clojurebot: sandbox/in

5:13 vijaykiran: apum: try #'fn name

5:13 sm0ke: ,`odd?

5:13 clojurebot: clojure.core/odd?

5:13 vijaykiran: apum: in repl

5:13 or ` as sm0ke said

5:17 apum: sm0ke, vijaykiran - thanks! gonna read what's really happening under the hood...

5:19 ollivera: anyone knows what's wrong on that code?

5:21 apum: ollivera: don't know, but I would check where exactly NPE is thrown

5:26 Ywen: ollivera: Can you try to execute portions of the code to narrow down the source of the exception?

5:29 ollivera: apum, it happens when I try to insert in MongoDB

5:30 apum: ollivera: can you print whole stacktrace?

5:31 noidi: ollivera, println returns nil

5:32 ollivera: apum, https://www.refheap.com/76299

5:32 noidi, no, it prints the results

5:33 noidi, something like .. {:cid 2037} ...

5:35 noidi: it prints to *out* and returns nil

5:35 apum: ollivera: have you created "documents" collection?

5:35 noidi: so mapping with println gives you a sequence of nil

5:35 ,(map println [1 2 3])

5:35 clojurebot: (1\n2\n3\nnil nil nil)

5:38 ollivera: apum, yes

5:38 noidi, okay .. so what should I do?

5:44 noidi: (let [results ...] (dorun (map println results)) results)

5:45 ollivera: noidi, I will try it

5:57 sm0ke: hello

5:57 i am getting really weird exception with no way to make sense of it

5:57 https://www.refheap.com/76304

5:57 seems like an clojure glitch?

6:04 pjstadig: sm0ke: maybe. it depends on what you're trying to do

6:05 looks like either a very deeply nested data structure that is getting printed, or somehow there's a loop in the print method or data structure that is getting printed

6:06 sm0ke: hmm

6:06 pjstadig: your concurrent hash map has a self reference?

6:07 sm0ke: i am not sure which part of code is causng this

6:08 pjstadig: sm0ke: i'm not sure if this is when something is being printed at the repl or if you are explicitly trying to print something, but binding *print-length* and *print-level* might help

6:12 sm0ke: identified the part

6:12 hmm weird

6:17 pjstadig: sm0ke: what was it?

6:18 sm0ke: pjstadig: one sec, i am not sure yet but i think tools.logging has a bug with printing maps

6:18 trying to reproduce

6:23 oh shite!

6:24 pjstadig: i had a record MyReco [state], state is a (atom {}) to which i had assoc! a :another-record other

6:24 the other is like MyOtherReco [state]

6:24 to which i was passing this record's whole state

6:24 get it?

6:24 clojure while prining deeply prints the records as maps

6:25 hmm wtf!

6:27 although this is very ugly code, but still very undesirable behaviour imo

6:40 so here is the gist

6:40 (defprotocol MyPro (foo [this]))

6:40 ,(defprotocol MyPro (foo [this]))

6:40 clojurebot: MyPro

6:40 sm0ke: ,(defrecord MyRec [f] MyPro (foo [this] (swap! f :foo (MyRec. f))))

6:40 clojurebot: sandbox.MyRec

6:40 sm0ke: ,(.foo (MyRec. (atom {})))

6:40 clojurebot: #sandbox.MyRec{:f #<Atom@f7f18e: #sandbox.MyRec{:f #<Atom@f7f18e: #sandbox.MyRec{:f #<Atom@f7f18e: #sandbox.MyRec{:f #<Atom@f7f18e: #sandbox.MyRec{:f #<Atom@f7f18e: #sandbox.MyRec#>}>}>}>}>}

6:40 sm0ke: what!

6:41 no stackoverflow :(

6:42 ,*print-level*

6:42 clojurebot: 10

6:43 sm0ke: ,(def *print-level* nil)

6:43 clojurebot: #<CompilerException java.lang.SecurityException: denied, compiling:(NO_SOURCE_PATH:0:0)>

6:55 turbopape: Hi guys, how can I set my default clojure version to 1.6.0 when creating a new project with "lein new?"

6:59 Ywen: turbopape: not sure it's possible, but it is quite easy to fix it in the project.clj file

7:00 vijaykiran: turbopape: I think it uses https://github.com/technomancy/leiningen/blob/master/resources/leiningen/new/default/project.clj

7:00 turbopape: yeah Ywen , just feeling lazy :)

7:00 Ywen: turbopape: you'll have to edit it anyway ^^

7:01 turbopape: yep Ywen :P

7:01 vijaykiran: turbopape: may be you can have a local leiningen template for your projects

7:01 turbopape: thx vijaykiran !

7:01 I'll have to master the ways of the leiningen templates !

7:03 vijaykiran: turbopape: its just one click away - https://github.com/technomancy/leiningen/blob/stable/doc/TEMPLATES.md :)

7:04 turbopape: oh vijaykiran , thanks for helping the lazy noob out !

7:10 ollivera: noidi, your suggestion worked. I just need to convert the lazy-seq in a vector ...

7:10 noidi, https://www.refheap.com/76316

7:12 noidi, what should I chance if I decide to insert line by line as the table may have thousand of lines ...

7:17 sm0ke: so how do i define records in clojure with a child parent relationship without blowing stack?

7:28 perses: is there anybody had checked the clojure's performance relative to other languages?

7:29 scottj: perses: http://www.techempower.com/benchmarks/

7:31 llasram: sm0ke: Instead of having recursive references, add a layer of indirection. For example, two maps: one of numeric ids to objects, and one of numeric ids to a list of the numeric ids of their children

7:31 This approach can represent loops in a graph without any need for mutability

7:34 sm0ke: llasram: makes sense thanks

7:41 perses: what is the best way to do this: if i have a list like this ("clojure" "is" "good"), how can i get [["clojure" "is"] ["is" "good"]] ?

7:42 pyrtsa: ,(partition 2 1 '("clojure" "is" "good"))

7:42 clojurebot: (("clojure" "is") ("is" "good"))

7:46 mercwithamouth: does anyone here have any apps that use mongodb by chance?

7:46 geckodru1: yes

7:46 mercwithamouth: on github?

7:46 geckodru1: mercwithamouth: they're not

7:47 mercwithamouth: hmm i just wanted to take a look at see you go about modeling

7:47 geckodru1: mercwithamouth: you mostly looking for sample code?

7:48 mercwithamouth: yeah for the most part...is it even worth making a schema.clj file...or just coding loosely?

7:49 geckodru1: mercwithamouth: with mongo, there was a definite set of fields that could be in a collection...but not all docs had the fields...

7:50 Ywen: mercwithamouth: schema.clj? You mean like from https://github.com/runa-dev/clj-schema ??

7:50 lazybot: Ywen: Uh, no. Why would you even ask?

7:50 geckodru1: mercwithamouth: from code, we didn't define a schema

7:52 anyone here interview with Runa?

7:54 mercwithamouth: geckodru1: easy enough... =P

7:55 ssqq: How to input repeat the code in repl? just like use up-narrow or down-narrow in command line.

7:55 geckodru1: ssqq: depends on where your repl is

7:55 mercwithamouth: Ywen: hrmm not quite...i was just being hesitant before diving in as i should...

7:55 geckodru1: ssqq: emacs you click on line and hit <return>

7:56 wunki: is there a fn which prints a value and returns the same value instead of `nil`? Would be very useful for debugging `->` or `->>`

7:56 ssqq: I used git shell on windows

7:56 geckodru1: ssqq: terminal, it usually <up> <down>

7:57 ssqq: geckodru1: Could I use terminal on windows?

7:58 geckodru1: wunki: #(do (println %) %)

7:58 Ywen: mercwithamouth: looks like both are not correlated, you can start by putting loose data in your mongo collections & then afterwards write schemas when you know the shape of your data

7:59 wunki: geckodru1: thanks, also just found https://github.com/dgrnbrg/spyscope

8:01 geckodru1: wunki: you should also checkout https://github.com/clojure/tools.trace

8:03 wunki: geckodru1: will do, thanks

8:11 oskarth: ping dakrone

9:15 igor: Hi all, can anybody help me? I have a question about emacs/cider/lein

9:15 teslanick: Just ask the question.

9:16 igor: Ok, thank you

9:16 The question is here: http://stackoverflow.com/questions/23081797/how-do-i-correctly-use-lein-try-in-cider

9:17 I have a lein repl in Emacs+Cider, and the question is how I use lein try in this case?

9:25 Back to my question about lein-try+cider: may be someone could give me some tips?

9:26 I can't believe that I'm the only one who wants to use lein-try with emacs/cider

9:27 ssqq: How to change a node value of complex data structure?

9:27 dnolen_: ssqq: update-in, assoc-in

9:32 ssqq: dnolen_: thanks very much.

9:34 clgv: igor: when you have a repl running just use the pomegranade library to get the dependencies you want to try

9:51 igor: clgv: thank you very much, I will try it

9:52 the dependecies are then automatically downloaded?

9:55 clgv: igor: yes

9:55 igor: ok, it works, thank you once again! And what is the point of lein try then if I can do it so easily with pomegranade?

9:56 clgv: igor: it's the library leiningen uses ;)

9:57 igor: the point is to get the deps and a repl where you can use these. otherwise this would be multiple steps

9:59 igor: well, I mean if I fire up a lein repl and then just do (add-dependencies ... ), for what is lein try good?

10:04 clgv: igor: convenience - one good reason for a plugin if you need that task repeatedly

10:05 igor: and you do not need to know how that implementation works ;)

10:13 igor: clgv: ok, thank you very much

10:19 another question: is it possible that pomegranate does not honor http_proxy/https_proxy variable?

10:20 I see that after I started add-dependencies there were no new entries in my proxy's access.log

10:21 and the add-dependencies just hangs in the repl

10:22 can it be that it just tries to access the servers direct (I don't think so), but anyway, that is strange that there are no new log entries in the proxy's log

10:23 akazlou: does mock testing is common in Clojure? What if I want to test my ring app, what is the best approach to start with? I found with-redef which can be used together with clojure.test?

10:23 igor: and when I do lein try everything just works

10:28 clgv: igor: hmm it's possible. but then you can find out what leiningen does to honor proxies...

10:28 igor: leiningen just uses http_proxy/https_proxy and -Dhttp.proxy if you have it

10:29 clgv: igor: I meant implementation wise

10:29 igor: ok, I see already that pomegranate just ignores this settings ( https://github.com/cemerick/pomegranate/issues/15 )

10:30 these settings are just ignored (probably)

10:31 llasram: Well, Leiningen uses pomegranate to do dependency resolution, so...

10:31 clgv: igor: my point is that leiningen supports proxies and ass llasram stated leiningen uses pomegranate so it adds something to use proxies ;)

10:32 llasram: clgv: No need to throw around insults! ;-/

10:32 Er, ;-)

10:32 clgv: llasram: huh? what?

10:32 dakrone: oskarth: pong

10:32 llasram: igor: To throw more fuel on the fire, there is also https://github.com/pallet/alembic which loads a full instance of Leiningen in your REPL process

10:33 clgv: Your typo s,ass,as,

10:33 clgv: llasram: roflmao

10:34 igor: seems as if add-dependencies supports a :proxy parameter https://github.com/technomancy/leiningen/blob/5c6db48efa8b81e0a0348f8fdac9a249f966aa82/leiningen-core/src/leiningen/core/classpath.clj#L170

10:36 igor: that's right, but get-proxy-settings just takes http_proxy from the environment

10:36 clgv: igor: I meant you can manually specify the proxy via the named parameter :proxy

10:36 igor: or build a wrapper that get http_proxy from the environment

10:41 igor: ok, that is a good idea, but anyway, as you can see in the code, the function must use the environment variable automatically and that it strange that this doesn't work

10:42 thank you very much once again, I will check it

10:44 perses: how can i convert ([(1 2) (12 34)] [(3 4) (5 6)]) to ([[1 2] [12 34]] [[3 4] [5 6]]), i can implement it with nested maps but nested % not allowed, so what do you suggest guys?

10:45 and also how can i get ([1 2] [12 34] [3 4] [5 6]), this will be clean

10:46 llasram: ,(->> '([(1 2) (12 34)] [(3 4) (5 6)]) (mapcat (partial map vector)))

10:46 clojurebot: ([(1 2)] [(12 34)] [(3 4)] [(5 6)])

10:46 llasram: Er

10:46 heh

10:46 ,(->> '([(1 2) (12 34)] [(3 4) (5 6)]) (mapcat (partial map vec)))

10:46 clojurebot: ([1 2] [12 34] [3 4] [5 6])

10:46 llasram: There we go

10:48 perses: llasram: thanks

10:50 clgv: igor: that code I linked to is the implementation leiningen uses not the implementation of pomegranate

10:50 jonathanj: mreowr

11:04 sritchie: anyone here using sente for websockest?

11:04 websockets*?

11:06 danoyoung: how'd the prez go?

11:08 danoyoung: @sritchie personally I think it went well, although the only thing that everyone seemed to focus on was how hard they thought the syntax was to read….

11:08 sritchie: :)

11:08 operation, inputs, outputs

11:08 boom

11:08 that's it

11:09 danoyoung: @sritchie yea, but they like their java, calsses, objects,etc...

11:10 @sritchie the combo of the REPL + TDD kinda blew a few folks away I think.

11:14 agarman: @sritchie + @danoyoung folks at my current work place are having the same struggles with s-exp ... it's just a familiarity thing

11:14 sritchie: yup

11:21 danoyoung: i'm hoping to slid in some small cascalog work….see if I can get some traction….

11:22 sritchie: danoyoung: you'll just code so much faster that you should just use it for stuff

11:22 and blow everyone's minds

11:23 rundll32: what is the best clojure ide?

11:26 coventry: I hear good things about cursive and light table is probably the future, but I use emacs.

11:27 BobSchack: lighttable is very good if you are just starting to learn clojure imho

11:28 rundll32: allright

11:28 locks: as a clojure noob, LT was the easiest way to start

11:29 andyf: This might be a bad idea for reasons I don't know yet, but has anyone tried to make a tool/library/etc that helps avoid Clojure lib conflicts by "auto renaming" a library. E.g. Core.memoize gets renamed core.memoized.myversion, and you can require that without manually editing source code of core.memoized ?

11:30 agarman: @rundll32 here people use a mix of LaClojure, LightTable & Emacs

11:30 Ywen: rundll32: I'm coding Clojure & doing IRC via Emacs right now.

11:31 stuartsierra: andyf: At the Java bytecode level, "JarJar"

11:31 agarman: @rundll32 + @Ywen: same here...emacs daemon mode is just too much awesome for me to even try other options.

11:32 Ywen: agarman: I also tried light table but find it was lacking some of the cool features that were shown in the "commercials" ^^

11:32 rundll32: i am going to play with all of them and decide which suites me best.

11:33 andyf: Stuartsierra: thanks for pointer. Will check it out. Trying to avoid lib conflicts between libs used by Eastwood & those used by projects being linted

11:33 Ywen: agarman: like the possibility to forget the files and open function one next to another. Plus I experienced some bugs, like live interpreter stopping to work

11:34 agarman: @rundll32 if you're new to emacs...use emacs live...it's pretty good starting env

11:34 stuartsierra: andyf: I think somebody (technomancy?) made an experimental renamer for Clojure.

11:35 agarman: @ywen: I tried LightTable for January...it didn't have anything on emacs if you already know emacs

11:43 andyf: Stuartsierra: maybe metaverse ?

11:51 nz: how to delay macro expansion so that it happens after aot compilation. I am trying to make an uberjar, but macros expand when uberjar is build, not when app (from uberjar) is executed

11:51 andyf: Yep. Found Google group thread from May 2013 on util libs discussing the issue. Thanks

11:53 devn: what do people use for escaping SQL?

11:56 i wish sean was here :)

11:58 andyf: Bad joke answer: use a NoSQL db instead?

11:59 * devn cries tears of blood

11:59 BobSchack: Worse joke answer: http://us1.php.net/mysql_real_escape_string

12:00 llasram: nz: Don't use AOT?

12:01 devn: Doesn't the positional-parameter JDBC query foo handle escaping inserted parameter values?

12:09 gtrak: I know that immutant does runtime-isolation, but are there ill-effects of running multiple versions of clojure, say multiple uberwars, on a tomcat?

12:12 seangrove: Ahk, I want something between protocols and multimethods - is there a way to tell if a multimethod has an implementation for a given input? Something like (satisfies? multi-method [some input])

12:12 jcrossley3: gtrak: uberwars containing any clojure version older than 1.6.0 will likely result in permgen leaks

12:12 bbloom: seangrove: i've got you covered: https://github.com/brandonbloom/dispatch-map

12:13 gtrak: ah, interesting.

12:13 llasram: bbloom: Slick

12:15 seangrove: bbloom: Looks fantastic. Think it'll work in ClojureScript?

12:16 bbloom: seangrove: you'd have to substitute the various java interfaces for cljs protocols

12:16 seangrove: but it should be a straightforward port

12:16 jcrossley3: gtrak: those leaks only occur when you redeploy, though.

12:16 gtrak: yea, I've just been looking at the JIRA issue, seems reasonable.

12:17 seangrove: bbloom: I'll circle back to that, it's a nice to have, but I can deal with it a different way for now. Definitely looks a lot more like what I wish Clojure's multimethods were

12:18 gtrak: I've got no problem using 1.6, just don't want to mess up someone else's deployment at an arbitrary time in the future :-)

12:19 I've seen permgen leaks with regular java on jboss, so I guess it's not _that_ unusual anyway.

12:20 jcrossley3: gtrak: it's a common risk, yes. any libs that don't release thread locals will cause leaks.

13:05 clgv: clojure.test.check question: how do I create a generator that chooses from a set of given constants?

13:07 reiddraper: clgv: gen/elements

13:07 clgv: (gen/sample (gen/elements [1 2 :three 4 '5]))

13:07 clgv: reiddraper: great, thanks. I suspected one-of but learned differently from the docs ;)

13:09 gfredericks: ,(require '[clojure.string :as s'])

13:09 clojurebot: nil

13:09 gfredericks: ,s'/split

13:09 clojurebot: #<string$split clojure.string$split@11416b3>

13:10 pbostrom: reiddraper: I noticed the new test.check README does not have a link to the API docs, is this intentional?

13:10 reiddraper: pbostrom: nope, just forgot to add the link back once i created the github page

13:13 gfredericks: reiddraper: any guesses what'll happen with TCHECK-15? I was going to start a utility lib but was waiting on that first

13:14 reiddraper: gfredericks: i haven't had time to dig in with a lot of detail yet. but assuming there are no semantic issues found, i'd like to have it included.

13:15 gfredericks: my biggest worry is that it doesn't make users consider the difference between _values_ and _generators_, which is seemingly already confusing in choosing between gen/elements and gen/one-of, and gen/fmap and gen/bind

13:15 gfredericks: reiddraper: cool, that's all I was wondering; thanks

13:15 clgv: reiddraper: (gen/sample (gen/nat)) => ArityException Wrong number of args (0) passed to: PersistentArrayMap clojure.lang.AFn.throwArity

13:15 reiddraper: clgv: gen/nat is not a function

13:15 clgv: (gen/sample gen/nat)

13:15 clgv: oh ok

13:16 nz: llasram: does uberjar work without aot?

13:16 gfredericks: reiddraper: I feel like it should be intuitive for anybody familiar with clojure.core/for

13:16 which requires you to consider the difference between lists and elements

13:16 reiddraper: gfredericks: so which does gen/for expect you to return, a value or a generator?

13:16 jcromartie: how do you reduce redundant boilerplate code when rendering templates with Enlive?

13:16 gfredericks: reiddraper: the body is a value, just like in c.c/for

13:17 reiddraper: gfredericks: so it takes the place of fmap, not bind?

13:17 gfredericks: reiddraper: a single-clause for is like fmap; but with multiple clauses they are combined via bind

13:18 reiddraper: gfredericks: ah ok, so bind is only used within the bindings, _not_ for the body you provide

13:18 jcromartie: we currently have a one HTML file with a <section> per page, but in the HTML template file itself, those <section> elements have duplicate headers/structure etc/

13:18 gfredericks: reiddraper: right; I believe this covers all use cases of fmap & bind though

13:19 reiddraper: gfredericks: so a 'gotcha' would be not using multiple bindings when the generators are _not_ dependent on each other. since it would use bind unnesecarily, which affects shrinking

13:20 gfredericks: yeah that sounds fair

13:20 probably not feasible to do dependency analysis

13:20 reiddraper: gfredericks: cool, so yeah, i'm definitely leaning toward this being included in test.check proper

13:20 if you find it useful, i'm sure others will

13:21 gfredericks: reiddraper: should I add a docstring note about independence?

13:21 presumably suggesting tuple

13:21 reiddraper: gfredericks: yes i do think that would be useful

13:21 and yes, tuple is the most likely way to combine independent generators

13:21 gfredericks: (gen/for [[a b] (gen/tuple gen-a gen-b) ...] ...)

13:21 reiddraper: exactly

13:23 gfredericks: so when using bind-as-tuple ("degenerate bind"), does the shrinking involve a lot more redundancy? Is that the main downside?

13:23 nz: using lein-otf instead of aot seems to work. startup is slower but doesn't matter too much

13:25 reiddraper: gfredericks: the main downside of using bind when you don't need the value from the previous generator is that the generators don't shrink 'in parallel', they shrink in series. the outer one shrinks first

13:27 * gfredericks goes to try a tuple shrink to see what happens

13:27 reiddraper: gfredericks: if you're into the monadic/applicative explanation, its like the difference between monad and applicative.

13:29 gfredericks: the tuple shrinks the first one as far as it can before starting on the second one

13:29 coventry: nz: Why do your macros need to expand at runtime?

13:31 reiddraper: gfredericks: hm, i'll need to take a look, that could be improved it sounds like

13:32 nz: expanding macro puts stuff to global state (atom) and other macros read stuff from that state. when uberjar starts up, the global state is empty


13:35 hiredman: nz: macros shouldn't have side effects, they should expand in to code that has side effects

13:36 nz: hiredman: i know, but that is what the lib is doing

13:37 but anyways, not using aot solves the problem, so would delaying macro expansion, i think

13:39 hiredman: nz: don't use the library

13:40 nz: too much good stuff in it

13:40 justin_smith: what lib?

13:41 nz: https://github.com/metosin/compojure-api-examples

13:42 hiredman: nz: I doubt that

13:43 justin_smith: where does compojure-api do the macro magic?

13:43 hiredman: ugh

13:43 it includes it's own version of the clojure.walk namespace, without changing the namespace

13:43 this compure-api library is terrible

13:44 nz: https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L17 https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L208 https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L195

13:45 llasram: Wow

13:45 hiredman: nz: I believe in you, you can write something better in an afternoon

13:45 justin_smith: SWAG

13:46 bonus points if the replacement lib has a YOLO function

13:46 llasram: I've got an idea -- let's all agree to pretend to people new to Clojure that macros don't actually exist

13:46 justin_smith: (inc llasram)

13:46 lazybot: ⇒ 22

13:46 coventry: Aw, I had so much fun with macros.

13:46 llasram: Once they've earned some trust, we can let them in on the secret

13:47 coventry: Yeah, but I know that one reason I picked up Clojure in the first place was because MACROS ARE AWESOME WOOO

13:47 And I was right, but also oh so wrong

13:48 I get the sense that macro over-exuberance is a common problem for recent arrivals to the Clojuresphere

13:48 technomancy: llasram: have you been drinking scala water recently? http://www.scala-lang.org/old/node/8610

13:48 hiredman: llasram: how just not using libraries written by people who barely know clojure?

13:48 gfredericks: reiddraper: that was my best guess after looking at the output of (gen/call-gen (gen/tuple gen/nat gen/nat) (java.util.Random. 42) 7)

13:48 technomancy: pattern matching as an "intermediate" feature =(

13:48 llasram: technomancy: Wow... Finely classify all the things

13:48 hiredman: llasram: if you don't know/use the language you have no бизнес packaging up your junk for others

13:49 RickInAtlanta: llasram: for anyone like me who came to clojure after reading "beating the averages" macros were the one thing I most wanted to learn about. I haven't had occasion to use them yet.

13:49 llasram: hiredman: Yeah, but -- believe it or not -- I'm trying to avoid that level of elitism

13:49 In the formal sense

13:50 technomancy: hiredman: are you sure it's intended for others though?

13:50 justin_smith: llasram: macros are for two groups - those just learning the language and trying to figure them out (their macros should never go in a library), and people who have some mastery of the language, implementing extensions to it (their macros can go in libraries, but only half as many as they think they need)

13:50 llasram: hiredman: Er, well, or whatever sense means that I'm not trying to insult you for elitism :-)

13:51 justin_smith: Yeah, I can buy that. You do need to get some actual experience with them to internalize the correct level of exuberance

13:52 hiredman: technomancy: dunno, I'll open an issue asking that they put a big "this is not for others to use" disclaimer on it

13:52 justin_smith: llasram: simiarly re: inheritance in OO, function pointers in procedural...

13:53 llasram: RickInAtlanta: see -- appropriately tuning exuberance

13:53 :-)

13:53 technomancy: hiredman: maybe a candidate for the default readme in `lein new` =)

13:53 it checks to see if you have a user profile defined, if not, you're probably a newb, so it adds a disclaimer

13:54 justin_smith: what if we made the syntax for defining macros so bizarre and boroque that any newcomer is appropriately scared of using them?

13:54 (half joking)

13:55 hiredman: justin_smith: that is just silly

13:55 clojurebot: Ack. Ack.

13:55 llasram: And *now* who's been drinking the Scala-water?

13:55 technomancy: one thing that has worked well for me is not using code written by people who are learning the language.

13:55 coventry: (defmacro js-defmacro [& args] `(defmacro ~@(reverse args)))

13:55 RickInAtlanta: llasram: lol

13:55 hiredman: it is an education problem, for some reason people feel like they have to use these terrible libraries

13:55 technomancy: exactly

13:56 if a library is terrible, don't use it!

13:56 technomancy: unfortunately the most effective way to find out if a library is terrible is to ask on IRC, and that doesn't really scale

13:57 amalloy: justin_smith: that's how scheme/racket macros feel to me

13:57 hiredman: technomancy: oh, it is pretty simple, switch your default library evaluator from "this seems ok" to "this is terrible"

13:58 technomancy: guilty until proven innocent; I see

13:58 hiredman: code is terrible until proven otherwise somehow

13:58 technomancy: works for me

13:58 nz: technomancy: i wish i had done that when i started. tried too many macro-dsl things

14:00 sdegutis: Hello.

14:03 Jaood: so macros in libraries are usually frowned upon in Clojure?

14:03 hiredman: no

14:03 coventry: nz: If you're going to keep using compojure-api, you probably want to rewrite the swaggered macro so that it does the swap! at runtime. He says he takes PRs. :-)

14:03 hiredman: Jaood: they are fine

14:03 mdrogalis: Jaood: That's kind of a loaded question for this environment.

14:04 hiredman: Jaood: the problem is they are using side effects at macro expansion time instead of runtime

14:05 Jaood: mdrogalis: ;)

14:05 justin_smith: technomancy: hiredman: the issue is that the people who will mistakenly use code made by people learning the language, are themselves new to the language

14:05 hiredman: which means if you compile to bytecode and then run that bytecode in a different jvm, or on a different machine, the macros have all disapeared (been expanded out before the bytecode was generated) so the side effects won't happen in the new runtime environment

14:05 justin_smith: it is like a self-feeding vortex of ill-informed decisions

14:05 technomancy: justin_smith: the only solution is a certification program.

14:05 Jaood: hiredman: K, I'll keep that in mind when getting to the macros part on the book

14:05 technomancy: I'll get clojurebot right on that

14:05 sdegutis: Jaood: Macros used for things that a function could handle are frowned upon.

14:06 nz: doesn't korma (http://sqlkorma.com/) have similar problems?

14:07 hiredman: nz: dunno, I've never used korma, and can't say I particularly care for it either

14:07 coventry: justin_smith: Perhaps the solution is a robot which runs eastwood on clojure libraries and reports problems to the authors of clojure code which depends on those libraries. :-)

14:07 sdegutis: justin_smith: isn't that true in any language?

14:07 ikitommi: nz hi

14:08 nz: hi

14:08 coventry: nz: I'm not aware of a similar runtime/compile-time problem in korma. The macros do make extensibility a bit hard, though.

14:08 hiredman: nz: I sort of suspect korma expands in to code with side effects instead of having side effects in the macros

14:08 ikitommi: the compojure-api global state, that's bad

14:08 technomancy: coventry: that would just make it harder to tell at a glance that a lib is from someone who doesn't know what they're doing though

14:08 justin_smith: sdegutis: sure, maybe there is a language-agnostic solution to the "newcomers find badly designed stuff and try to use it" situation

14:08 oskarth: eastwood has keyword-typos detection? nice, I've been looking for that :)

14:09 justin_smith: hanging ) on a line by itself = never use said code

14:09 ikitommi: the whole idea in c-api was to collect the routes at compile-time

14:10 gtrak: ikitommi: one issue I noticed was it prevents use of building dynamic compojure handlers by calling a function. I understand that's kind of hard to get around.

14:10 coventry: nz: e.g. of extensibility issue https://www.refheap.com/76356

14:11 ikitommi: the atom can be removed as a var so that the collection would be done more locally, but still in a macro

14:11 hiredman: ikitommi: I don't think you are understanding the issue

14:11 gtrak: ikitommi: that use-case is enough to make me consider implementing my own ring-swagger adapter and ditching compojure.

14:12 justin_smith: gtrak: it is hard to get higher order with compojure in general, in my experience, we ended up making our own thing that is mostly vanilla data structures and pure functions

14:12 gtrak: justin_smith: yea, I considered just gutting the pedestal routes

14:12 so at least I'm not reinventing stuff

14:12 Jaood: justin_smith: does compojure has to much macro magic?

14:12 justin_smith: Jaood: it mostly macros

14:13 Jaood: it is well made!

14:13 hiredman: ikitommi: macro expansion happens before compilation, after compilation you just have the emitted byte code

14:13 justin_smith: I just wanted something that was more functional

14:13 ikitommi: grtak - I agree, the route resolution is kind of hacky, would be better to do same for bidi for example

14:13 justin_smith: https://github.com/caribou/polaris

14:13 gtrak: it's just a shortcoming of compojure, not your fault.

14:13 data as code, unfortunately.

14:13 justin_smith: polaris was the lib we made based on vanilla datastructures and function composition (still in progress mind you, but I think it is a good starting point for a more function oriented approach)

14:13 hiredman: ikitommi: if you aot compile clojure, all you get is the emitted bytecode, so when you run the aot'ed code, there is no macroexpansion -> compilation -> run bytecode, it just runs the bytecode

14:14 ikitommi: which means https://github.com/metosin/compojure-api/blob/master/src/compojure/api/swagger.clj#L208 never gets run in that case

14:14 oskarth: Hm. Is it bad from to have tests which check if the correct exceptions are being raised? eastwood wouldn't run with it.

14:15 amalloy: Jaood: compojure, mostly macros??? the only ones that have functionality you can't easily get from functions are like GET, POST, and so on, as far as i'm aware

14:15 er, meant to address justin_smith

14:15 ikitommi: hiredman - that's true. do you know how the routes shoud be collected

14:15 without aot it "works", but is wrong.

14:16 justin_smith: amalloy: "mostly macros" was overstated - but once you start using functions instead, you don't end up using much of compojure's code actually

14:16 hiredman: ikitommi: use a richer abstraction than function composition

14:16 justin_smith: amalloy: the real dealbreaker was wanting to define routes based on db data at runtime

14:16 ikitommi: but to have static routes, one could persist the routes elsewhere, into a file? (still macro doing side effects)

14:16 hiredman: ikitommi: compojure defines routes via function composition, but you want function composition + extra information

14:17 coventry: amalloy: Thanks for the +' tip.

14:17 gtrak: the function composition isn't necessary, I'd rip out the routing and keep the destructuring.

14:18 amalloy: coventry: you're welcome. i've edited the question to suggest it

14:18 gtrak: plus there's some rendering on the result, but whatever.

14:18 ikitommi: hiredman: asked from weavejester about setting the meta-data to the compojure functions, but that's also hard as all functions in the route tree should be meta-data aware

14:19 gtrak: it was a nice interface to start with, but we're already hitting the limits.

14:19 hiredman: ikitommi: oh, no, don't use compojure

14:19 ikitommi: metadata on functions sucks, I really recommend avoiding it

14:20 justin_smith: amalloy: I am double checking the compojure code - if you are not using the route-defining macros, there is not much else offered. It is well designed, but for dynamic generation of routes it is more hinderance than help.

14:21 gtrak: justin_smith: there's the render-response protocol.. I've abused that a couple times. (reminds me of our conversation from yesterday)

14:21 justin_smith: gtrak: about protocols for carrying status / varieties of error?

14:21 gtrak: yea, for instance, I extended it to numbers for just a quick '200' or something.

14:22 amalloy: for dynamic generation of routes, sure, that's probably true. i don't think it wants you do to that

14:22 gtrak: it's janky around maps, b/c ring is maps.

14:22 hiredman: ikitommi: there are other routing libraries that may provide something richer (maybe pedestals, or something else)

14:22 ikitommi: hiredman: ok, but someone should do a good web route/endpoint lib for clojure then. I have liked Compojure as it's not in the way

14:23 hiredman: should be trivial to resolve routes from bidi ;)

14:23 agarman: @amalloy et al: we're pulling compojure out of our code because we no longer using its route generators

14:23 ikitommi: https://github.com/juxt/bidi that is

14:23 gtrak: agarman: what are you using instead?

14:23 agarman: gtrak: ring + httpkit

14:24 gtrak: ah. I'd like to investigate ripping out the pedestal routes.. didn't seem like it would be impossible.

14:25 amalloy: oh man. i've always wanted to be part of an et al

14:25 i've finally made it as a grown-up

14:25 ikitommi: .. but for the compojure-api limitations. I agree they are there and should be fixed, but the AOT-problem is listed in the readme.

14:25 gtrak: ikitommi: fwiw, it's impressive to me the deep-walking works for static routes :-)

14:26 ikitommi: I guess the only clen solution would be to have a leiningen plugin etc. to peel the routes. not the macro. but would be extra step in developing it

14:26 gtrak: thanks!

14:26 agarman: @gtrak we're also considering bidi or gudu

14:27 ikitommi: .. and the macros on top of compojure-route-macros get peeled currently twice, once in peeling and another time with the real expansion.

14:28 justin_smith: agarman: bidi looks pretty cool, and many common elements to what we are trying to do with polaris

14:30 oh, oops, ^ above was for ikitommi

14:30 ikitommi: hiderman: and the "custom clojure.walk" is the vanilla one from 1.6, which supports records.

14:30 whodidthis: polaris would be cool for cljs too

14:30 justin_smith: whodidthis: I should double check, but I think it should run under cljs

14:31 ikitommi: justiin_smith: polaris looks cool too.

14:31 whodidthis: i dont think theres clout for cljs yet

14:32 coventry: ikitommi: I think the problem with your inclusion of clojure.walk that you didn't change the ns for it, so it's going to blow away or be blown away by the one which ships with clojure.

14:33 justin_smith: whodidthis: hmm... if you want to make an issue on polaris requesting cljs compat - I may just find time to integrate that

14:33 ikitommi: coventy: true, will change that.

14:34 justin_smith: whodidthis: looking at clout, it is small (I like this about weavejester's stuff, it is small while providing good functionality), so adapting or replacing it for cljs should be straightforward

14:34 whodidthis: oh, cool

14:35 sdegutis: Clojure is great, but when it comes down to needing to manipulate deeply nested complex types, wouldn't mutability and imperativity be more suited to the task?

14:35 justin_smith: sdegutis: clojure can do those things when you need them

14:35 they just aren't the default

14:36 coventry: sdegutis: https://www.refheap.com/76363 :-)

14:36 sdegutis: justin_smith: Ah good point. Although having compile-time type errors also dramatically helps in this area, which isn't built into Clojure.

14:36 coventry: touché

14:36 gtrak: nested atoms is not going to be the thing you want :-)

14:36 justin_smith: sdegutis: well, when you move the goal post, it will be hard to score a point

14:37 sdegutis: justin_smith: Thank you for the analogy I have not heard it before.

14:37 gtrak: I think zippers is supposed to address this?

14:37 justin_smith: sdegutis: really? it is a term of the art in rhetoric

14:37 sdegutis: I am not very cultured.

14:37 Although my yogurt is.

14:38 amalloy: zippers...zippers are a fantastic and exotic data structure, and they sound super-sexy, but in practice you need them so rarely

14:38 justin_smith: sdegutis: https://www.google.com/search?q=moving+the+goalposts&oq=moving+the+goalposts

14:39 gtrak: for really deep structures, is there a better alternative? (I haven't had to use those, but I've written a couple of recursive algorithms instead that I think my coworkers hate me for :-)

14:40 amalloy: recursion. like, "really" deep doesn't matter at all. a tree of depth 100 is not fundamentally any different from a tree of depth 5

14:40 coventry: gtrak: Just use a deeply nested map in an atom, and do (swap! a update-in [:path :into :it] manipulation-function).

14:40 gtrak: essentially an update-in that branches through arrays.

14:40 arrays in this case being seqs/vectors..

14:40 sdegutis: gtrak: maybe atoms with update-in?

14:40 Jaood: isn't it more of a performance issue?

14:41 coventry: gtrak: update-in's path argument can take an index into a seq/vector.

14:41 sdegutis: gtrak: but I don't know what you're trying to do here, so maybe atoms with update-in won't be suitable for your needs. Sorry.

14:41 gtrak: coventry: that sucks :-)

14:41 {:a [{:b :c} {:d :e} {:f :g}]} you don't know the size ahead of time.

14:42 sure, you could use map/update-in.. whatever.

14:42 I don't think that helps.

14:42 sdegutis: gtrak: update-in with atoms would be better

14:42 justin_smith: coventry: index into seq?

14:42 amalloy: (update-in deep-map [:a] update-each update-in [:x] inc), where update-each is a function you write that's basically map with reordered args

14:43 gtrak: my approach just takes a path and branches appropriately. just the initial data has to be the correct shape.

14:43 correct in terms of your data model.. the algo doesn't care.

14:43 but still, the code's a bit hard to read :-)

14:44 ikitommi: justin_smith: there is a demo of ring-swagger with fnhouse, should be quire similar for polaris - https://github.com/metosin/fnhouse-swagger , without any macro-hackery.

14:44 gtrak: not sure if cascading update-in/map calls is any better.

14:44 justin_smith: ,(do (println (update-in {:a [0 1 2]} [:a 1] inc)) (println (update-in {:a (list 0 1 2)} [:a 1] inc))) ; coventry

14:44 clojurebot: {:a [0 2 2]}\n#<NullPointerException java.lang.NullPointerException>

14:44 amalloy: justin_smith: seqs don't act like indexed structures

14:45 justin_smith: amalloy: that was regarding coventry's claim that update-in could index a seq

14:45 gtrak: then I also wrote nest and unnest, which assembles/disassembles these things.

14:45 coventry: justin_smith: Oops, you're right.

14:46 justin_smith: ikitommi: wow, I had not seen fnhouse either, so many ways to skin this cat!

15:11 brunov: Hrm. Avout (https://github.com/liebke/avout) looks very enticing, but it doesn't seem to be actively maintained.

15:11 justin_smith: it is cool, but watches don't work

15:11 brunov: Anyone here have used it and can vouch for it?

15:12 justin_smith: if you don't need add-watch, I can recommend it

15:12 ie. if your semantics can work as pull as opposed to push

15:12 or if you can split off a separate non-avout push layer

15:13 benkay`: has anyone else run into "could not locate leiningen/exec__init.class" errors when using lein-exec to run clojure scripts?

15:13 devth: brunov: can't vouch but looks interesting. also seems pretty legit

15:14 brunov: justin_smith, devth: Thanks. I think I can do without watchers. I was basically worried about two of its unattended bug reports.

15:15 one about watchers, the other about atoms...

15:16 justin_smith: brunov: I used it successfully to share coordinated state between hosts

15:16 brunov: I would not have seen the atom issue, because if no other host is running, the first one creates the state

15:16 and the others reference it

15:17 I would not use avout for persistence between runs, only coordination between servers that are running

15:17 brunov: justin_smith: I see. I'm thinking of a similar use case, so that's good news.

15:17 justin_smith: because we have things like sql for long term state, that is not avout's thing

15:18 brunov: Right. I'm also thinking of using it for coordination between running hosts, not for persistent state

15:18 justin_smith: then yeah, avout is cool, I recommend it

15:18 brunov: great, thanks justin_smith

15:18 justin_smith: np

15:21 seangrove: What's the best way of integrating other git repos as sub-repos? gitmodules? Are those dead now?

15:26 gtrak: github can handle that, I remember a project using it somewhere

15:29 sdegutis: Look let's just take a vote of what the best way to define a new type in Clojure is, and agree to discontinue all the others.

15:29 gfredericks: sdegutis: definitely gen-class

15:30 llasram: ouch

15:30 coventry: Don't you define them in scala and then import them?

15:30 It has types, after all.

15:30 sdegutis: coventry: you mean jruby?

15:30 gfredericks: class Clojure::Base; end

15:31 gtrak: types are just keys in a global map. let's reify the JVM instead.

15:31 design by decoupling and all that

15:33 sdegutis: gfredericks: heh, class Clojure::Controller::Base; end

15:34 gtrak: if by interop you mean we modify your bytecode.

15:34 gfredericks: class ClojureScript::Base < Clojure::Controller::Base

15:35 gtrak: any class that calls into clojure gets modified, because they probably didn't think through their design enough.

15:36 sdegutis: gfredericks: just wow

15:36 gfredericks: so accurate

15:37 ikitommi: nz, hiredman. quick patch to support the AOT: https://github.com/metosin/compojure-api/commit/47b896b4b808e29fc9c3129d14a9a3741659e411

15:38 will clean up the surroundings with better time.

15:39 nz: ping me, if there's some more weird stuff. will try to fix 'em all :)

15:39 nz: ikitommi: thanks

15:40 ikitommi: I'll push that to clojars, no tests for the AOT-uberjarring, but works now fine locally. and the clojure.walk has been renamed.

15:40 coventry: ikitommi: That (do) will return the last entry in body. Is that how it's supposed to work?

15:40 nz: there where some issues with multilevel schemas {:foo {: bar 1 :baz 2}} kind. for example subschemas do not keep order

15:41 coventry: ikitommi: Maybe (routes body) or (concat routes body)? Not sure what routes is.

15:42 ikitommi: coventry: true.

15:43 nz: ikitommi: i'll try to make issues to github about them tomorrow

15:43 ikitommi: nz: thanks

15:46 oskarth: From Joy of Clojure on reference types. "Retriable indicates that the work done to update a reference's value is speculative and may have to be repeated" - what does this mean exactly?

15:47 nz: oskarth: new value for reference may be calculated several times

15:47 mdrogalis: oskarth: It means transactions can be aborted and tried again.

15:47 nz's wording is better.

15:48 oskarth: but it will still happen, no?

15:48 just that the update has to be idempotent

15:48 nz: yes

15:48 gtrak: oskarth: generally they say 'no side-effects'

15:48 nz: doesn't have to be idempotent

15:48 mdrogalis: oskarth: Little experiment you can do - have a handful of threads try to update a ref, and put a println inside the transaction.

15:49 oskarth: I see

15:49 makes more sense then, thanks :)

15:49 gtrak: idempotent might not be quite right, generally if there's a retry it's because the input has changed.

15:49 nz: or atleast side-effects shouldn't cause problems if they are executed several times

15:50 gtrak: ie a transaction completes, changing the ref's value, which changes the input to further transactions.

15:50 oskarth: I think it's the word "speculative" which confused me

15:50 gtrak: ref-set! won't have this issue.

15:50 oskarth: seemed to indicate that it might not happen to me

15:50 gtrak: err wait, is ref-set! a thing?

15:50 oskarth: ,(doc ref-set!)

15:51 clojurebot: No entiendo

15:51 gtrak: nope.. sorry :-)

15:51 amalloy: ref-set

15:51 oskarth: ,(doc ref-set)

15:51 clojurebot: "([ref val]); Must be called in a transaction. Sets the value of ref. Returns val."

15:51 ikitommi: nz: 0.10.3 now at clojars

15:51 bbloom: dnolen_: elm debugger is looking pretty cool http://debug.elm-lang.org/

15:52 nz: oskarth: work/calculations will happen at every update attempt, but ref may not get updated at that attempt, thats the speculative part

15:53 oskarth: I see

15:56 ToBeReplaced: how would i create a ComponentSet? i want that when i start {:dep foo :items #{(using {} [:dep])} that i get {:dep foo :items #{{:dep foo}}}

16:00 coventry: ToBeReplaced: How could (using) know about foo?

16:00 blake__: Is there anything like this for Clojure? http://debug.elm-lang.org/

16:00 nz: ikitommi: i tried 0.10.3, works for me with aot

16:02 ToBeReplaced: coventry: it couldn't, unless i manipulated the metadata on the set, maybe

16:03 coventry: probably stupid idea... i'm just dreading changing a bunch of code to direct calling; i'm sure i'll be happier in the end if i do that anyway

16:03 dnolen_: bbloom: yup checked that out earlier today

16:07 technomancy: this is good stuff http://artyom.me/learning-racket-1

16:07 would be interesting to see that stream-of-consciousness type treatment for clojure

16:10 blake__: I could do that, but I'm a few months into learning already.

16:11 I could probably still do it usefully.

16:11 technomancy: I like how this guy doesn't get more than a few pages in before complaining about lack of egal =)

16:12 blake__: or something more specific, like compojure or lein

16:14 blake__: technomancy: That's not a bad idea. So far, I'm deliriously happy with lein (coming from rvm/rbenv) but I need to tackle compojure, too.

16:14 technomancy: blake__: glad to hear it. the lein bug tracker is always open for usability suggestions too though =)

16:15 * seangrove is going to cry

16:15 seangrove: CSS and JS, there's just so many things wrong

16:16 bbloom: seangrove: what's wrong now?

16:16 also, seangrove, where's my time traveling debugger?

16:16 blake__: technomancy: I'll keep that in mind. Prior to Ruby, I was doing Delphi, Smalltalk and Python, which are all different beasts as far as reusing code.

16:16 bbloom: the elm guy has it. aren't you finished yet?

16:16 seangrove: bbloom: It's on the way, on the way. Just solving the other 3 fundamental problems with frontend dev first

16:17 The ocean's almost boiled...

16:17 blake__: bbloom, seangrove: Oh, you guys had seen the elm thing already? =P

16:17 bbloom: seangrove: ok, well when you do finish, travel back in time to now so i dont ahve to wait for it

16:18 seangrove: i'm curious what nonsense you've run in to now thanks to our friends at the W3C

16:20 seangrove: bbloom: Remind me to tell you whenever we chat later. I thought of a hack, but basically it comes down to the fact that CSS/JS are separate, but not really, and I can't import CSS into a CSS 'namespace'

16:20 bbloom: heh ok

16:20 seangrove: I have to pre-process the thing somewhere else to get the textual representation right before loading it in the browser :P

16:21 devn: wow. claypoole is so awesome.

16:23 * devn puts a nickel in the awesome jar

16:24 gfredericks: reiddraper: any known gotchas with writing a gen-double? I'm thinking of doing it

16:25 `szx: seangrove: saw your tweet on gridstylesheets.org (first match for "reactjs gss" =D), have you had a chance to give it a try yet?

16:25 reiddraper: gfredericks: just the question of how floats should shrink

16:26 gfredericks: see: https://github.com/reiddraper/simple-check/issues/36

16:27 gfredericks: reiddraper: oh nice thanks

16:27 reiddraper: np

16:29 wunki: I'm trying out the component library by Stuart Sierra, anyone know how to call `stop` when you press CTRL-C?

16:29 sandbags: technomancy: do you have time for a Q about transitive dependencies and locally installed jars?

16:31 technomancy: sandbags: sure

16:31 sandbags: technomancy: thanks. so i have a lib i made that is installed locally (rather than say clojars) that has a dependency on com.stuartsierra/dependency (ironically enough)

16:32 technomancy: in an app i made a dependency on my library, but the transitive dependency doesn't seem to be made

16:32 lein deps :tree on the app doesn't show "depdendency" as a dependency and the code fails because it can't find Stuarts lib

16:32 i'm assuming this should work fine, any ideas why it might not?

16:33 the workaround is to dep on the dependency lib in my app as well

16:33 technomancy: it must be that you're depending on a version that doesn't have the com.stuartsierra/dependency dep declared

16:33 local/remote makes no difference unless it's a snapshot

16:33 gtrak: wunki: what's CTRL-C in this context? you can add a shutdownhook: http://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

16:33 sandbags: technomancy: i don't think so, i rejarred and reinstalled and i still have the problem

16:33 technomancy: however, i'll make a new version to be absolutely sure

16:34 technomancy: you can always peek at the pom inside ~/.m2

16:35 wunki: gtrak: yes, the shutdown hook indeed. Just found my problem, need to run `lein trampoline run` instead of `lein run`

16:35 sandbags: technomancy: dependencies should be inside the pom?

16:36 technomancy: sandbags: yeah, that's the canonical place

16:36 sandbags: if so then that's my problem... i just made a new version and the dep isn't in there

16:37 i'm using "lein jar" is that a problem?

16:37 i assumed that i didn't need uberjar as I don't want the dependencies packaged *in* my lib

16:37 or maybe i've misunderstood what uberjar does

16:38 technomancy: sandbags: you should be running `lein install` on your lib if that's what you mean

16:38 or do you mean for the app?

16:39 sandbags: okay so in my lib, i am using "lein jar" to create a jar of the lib, and then "mvn install:install-file" to install it locally

16:39 i cobbled that procedure together from google

16:39 technomancy: ok, that won't work

16:39 sandbags: check

16:39 technomancy: lein install is the way to go

16:39 curious why you went that route?

16:40 sandbags: technomancy: like i say, i googled for how to install a lib locally and that's the only thing i found

16:40 possibly a google operator fail ;-)

16:40 technomancy: hm... I guess there's not much we can do about that if google is giving crap results

16:41 sandbags: i must get in touch with ryan thingammy so my approach doesn't go into the Clojure cookbook!

16:42 technomancy: hehe yeah

16:42 or if it's a blog that recommended mvn install:install-file you could leave a comment or something

16:48 gfredericks: what does {:aot :all} do exactly?

16:49 oh nevermind my problem is unrelated

17:28 bbloom: i'm manually converting some code from continuation passing-style to direct-style... i'm having javascript flashbacks

17:36 or should i say callbacks...

17:37 gfredericks: any guesses why future would throw a java.util.concurrent.RejectedExecutionException?

17:38 looks like the thread pool executor might have 0 thread? o_O

17:38 justin_smith: stackoverflow.com/questions/19003430/what-are-the-possible-reason-for-a-java-util-concurrent-rejectedexecutionexcepti

17:38 err

17:38 http://stackoverflow.com/questions/19003430/what-are-the-possible-reason-for-a-java-util-concurrent-rejectedexecutionexcepti

17:39 google-chrome-beta just changed it's X11 select / middle-click behavior

17:40 gfredericks: oh I prollably shutdown the agents didn't I.

17:40 yes I most certainly did.

17:44 technomancy: http://p.hagelb.org/shutdown-agents.jpg

18:05 guest234245: yogthos: just want to say thanks for making cljs-ajax

18:06 prasincs: is there an easy way to throttle/batch http connections on client side with clj-http?

18:08 brunov: prasincs: I wrote this just for that purpose: https://github.com/brunoV/throttler

18:09 se_: Any tricks for speeding up jvm startup on the raspberrypi? just running time lein help takes 2.5 minutes.. (running java 1.8.0)

18:09 brunov: se_: take a look at drip

18:09 justin_smith: se_: you could make an uberjar on a more powerful machine

18:10 brunov: se_: https://github.com/ninjudd/drip

18:10 justin_smith: brunov: the jvm won't be the issue here though, clojure has expensive startup

18:10 brunov: justin_smith: uhm, true

18:11 se_: brunov, justin_smith: thanks, will give it a try, if it's clojure that takes the most time, then i'll test out the uberjab route first.

18:12 justin_smith: se_: I've seen amazing differences in startup time when using uberjars, even on full powered desktop machines

18:16 hiredman: justin_smith: uberjars or aot?

18:16 se_: justin_smith: yeah, you're right, now we're talking 28 seconds, not several minutes..

18:16 justin_smith: hiredman: good point, this was an aot'd uberjar

18:16 se_: cool

18:17 se_: is this with aot?

18:18 se_: without (default is without, right?), will try aot now

18:18 justin_smith: se_: unless you have :aot in your project.clj or gen-class I think without is default, yeah

18:24 brunov: that throttler lib is cool

18:24 brunov: justin_smith: woot!

18:25 akhudek: hmm, I see now why dnolen_ didn’t make an om set cursor, state doesn’t work quite right with it :-(

18:26 justin_smith: brunov: about the deps, does it really need criterium outside the dev profile?

18:26 brunov: justin_smith: shoot, good catch. It doesn't!

18:27 justin_smith: also, seems funny to have c.math.numeric-tower as a dep when all you need is round

18:28 brunov: would you have just reimplemented/inlined round?

18:28 I could do that.

18:28 justin_smith: ,(Math/round 1.5)

18:28 clojurebot: 2

18:29 brunov: hahaha

18:29 justin_smith: java can do that - unless you need the numeric tower support

18:29 brunov: no, you're right

18:29 head, meet desk

18:29 justin_smith: anyway, original point stands, great idea for a lib

18:30 brunov: thanks :) I'll incorporate your suggestions now, thanks for taking a look

18:30 justin_smith: and looks good - I just have these projects that are way too huge so I always have default "how to remove deps" glasses on

18:31 brunov: that's a good default to have IMO

18:31 jar bloat is a real thing

18:31 justin_smith: ,(Math/round (/ 7 3)) ; the gotcha to look out for with the jvm round

18:31 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No matching method found: round>

18:32 justin_smith: ,(Math/round (double (/ 7 3)))

18:32 clojurebot: 2

18:32 brunov: aah

18:32 justin_smith: but since you are rounding anyway, the double coersion should be harmless

18:32 brunov: would type hints also help in this case?

18:33 justin_smith: no, needs the coercion I think

18:33 brunov: I see

18:33 justin_smith: (defn round [n] (Math/round (double n)))

18:33 easy as that really

19:01 frozenlo`: Anyone else getting errors with postal/mailer? IllegalArgumentException No implementation of method: :eval-part of protocol: #'postal.message/PartEval found for class: nil clojure.core/-cache-protocol-fn (core_deftype.clj:541)

19:16 justin_smith: frozenlo`: looks like the input to the function was misformatted - do you have a full stack trace?

19:18 frozenlo`: Sure... I just have to remember how to enable it in Cider. Brb

19:18 justin_smith: clojure.repl/pst will show the stack for the most recent uncaught exception

19:19 then you can share it via refheap or a github gist or whatever

19:21 frozenlo`: justin_smith: https://www.refheap.com/76421

19:32 timsg: Hey all, I’d like to write an implementation of a bare-bones REPL using clojure.main, but I’m having trouble finding minimal examples or instructions on how to do so. Does anyone know of such resources?

19:33 justin_smith: timsg: clojure.core/read clojure.core/eval and clojure.core/print should be the important bits. Are you doing this as a learning exercise I assume?

19:37 hiredman: prn

19:38 timsg: justin_smith: I’m working on embedding a Clojure repl in Unity. I’d also like to improve an old Mathematica-Clojure interop library I’ve been using. Evaluating forms is straightforward, but error handling and some other things (eg in-ns) seem to require more robust support. Clojure.main looks like the way to , and I can figure out how to use it through trial and error, but it would save a lot of time there were a small existing exampl

19:38 its use.

19:41 justin_smith: timsg: I don't know of a tutorial or example, but I'd assume the code to clojure.tools.nrepl would be very informative

19:41 https://github.com/clojure/tools.nrepl

19:41 you may even want to build on nrepl

19:45 timsg: justin_smith: yeah, maybe I should just spelunk nrepl. looking through it now

21:15 seangrove: `szx: Sorry for the delay, GSS + react work well together. GSS is a bit finicky in that it's like Apple's constraint system - a low api surface area, but conceptually takes some effort

21:22 `szx: seangrove: i guess that's to be expected since it's the same algorithm

21:22 any idea what the performance is like? particularly on mobile?

21:23 seangrove: `szx: Yeah, but a lot of people in the iOS/etc world don't get that :P

21:23 `szx: No idea on mobile. Perf. like you'd expect on desktop: good, not amazing

21:23 There aren't the right hooks to do it properly in the browser like there are on other platforms

21:24 `szx: right

21:25 well, i've just about had it with CSS so i think i'll give it a shot and see for myself

21:25 seangrove: `szx: Oh, sorry, actually it's fine. I'm specifically talking about resize events

21:25 `szx: Yeah, just about to take on porting a layout system over, it's the next big project on the list

21:26 I think we've just about 'solved' the component problem, along with event propagation (up) and property synth (down)

21:26 I take credit for all ideas, as usual. Amazing inspiration and invention.

21:26 * seangrove looks in bbloom's general direction and coughs

21:26 `szx: haha

21:26 looking forward to seeing it

21:27 bbloom: seangrove: i'm happy to get an honorable mention as long as i don't have to do all the work :-)

21:31 seangrove: bbloom: You could meet me half-way and port Auckland to cljs so I don't have to, and I could just, ya know, use it.

21:31 bbloom: seangrove: do you have a good cljs interface for a constraint solver?

21:31 seangrove: or do i need to implement a constraint solver too? :-P

21:32 not that i have bandwidth for either of those tasks...

21:32 seangrove: bbloom: Hoping (hoping) that I can piggieback off of some js lib

21:32 bbloom: seangrove: i couldn't find a sane linear constraint solver for js when i looked

21:33 seangrove: mutable cluster fuckery, to say the least

21:33 jcromartie: linear constraints seem like a great candidate for persistent data strucutres no?

21:33 seangrove: I'll get upset about it when I come to it, it's next on the list

21:33 bbloom: jcromartie: yes.

21:33 jcromartie: sounds like fun

21:34 bbloom: jcromartie: although the "cassowary" algorithm is only really fleshed out in a mutable variant. i dunno if there is a good persistent version of the algorithm, although one could probably invent it w/o much difficulty from the original paper

21:34 but ugh. the least bad impls i saw were like OOP nightmares

21:35 the core of the algorithm w/ extra features is a few hundred lines of code tops... yet there's thousands of lines of getters and setters

21:35 insane

21:35 ported from java, i believe

21:39 seangrove: "ALM is currently implemented for .NET, Java and Haiku. We will port it to other platforms if there is a popular demand."

21:39 One of those platforms is not like the other.

21:39 bbloom: haha

21:40 i was referring to the cassowary backend

21:40 base698: seangrove: alm?

21:40 bbloom: you don't want the ALM code anyway, it's not interesting to us at all

21:40 base698: I worked on something called alm many moons ago

21:40 seangrove: bbloom: Oh, yes, but I was just taking a look at the code, thought it was time to feed my subconscious with more than the high-level ideas

21:40 bbloom: seangrove: the important part is the ideas; you really don't want their addRow addColumn OOP api

21:40 you just need the backing solver

21:41 seangrove: base698: Layout manager?

21:41 bbloom: but even that you can punt on it

21:41 base698: nah project management tool

21:41 bbloom: just start with fixed size grid cells & go with that for now. add the solver later

21:41 support like N pixels, M percent, and fill-remaining

21:41 hack that in, and move back about your day :-P

21:42 seangrove: bbloom: Interesting. Probably ready to talk to you about this soon, everything else is in place, and the components are in an excellent data structure to have layout dictated from above

21:42 Then I can remove layout from the components, and components will be finally reusable

21:43 bbloom: lookless components == awesome :_)

21:43 seangrove: Structure, layout, texture, state, behavior, all separate

22:05 lanny: can someone look at my project.clj and tell me why lein profiles hate me: http://pastebin.com/d51YNNT8

22:05 technomancy: lanny: you have :profiles in there twice

22:06 https://github.com/technomancy/leiningen/issues/1471

22:06 lanny: wow, embarrassing, but thanks!

22:06 rplaca: Question: is there a way to interrupt running clojure code such that it throws an exception and generates a stack trace? I'm under cider, but I don't need to be.

22:06 technomancy: np

22:08 ivan: rplaca: C-c C-c or C-c C-b

22:09 rplaca: ivan: that interrupts it, but it doesn't give me a stack trace

22:09 I'm trying to find out what a big pile of libraries is waiting for

22:10 ivan: you can (pst) or do something different if you want to see a CIDER stacktrace buffer

22:10 or does that not include the hanging thing?

22:11 rplaca: ivan: yeah, there was no exception thown, so no stack trace

22:11 *thrown

22:11 I'm trying to get it to inject an exception so I can do the (pst) :)

22:11 ivan: oh I see

22:13 rplaca: you might try using visualvm and hitting the thread dump button

22:14 rplaca: well, I tried throwing it a segv, but that just crashed. I'll eat my dinner and try some other sigs after dinner

22:14 ivan: oh, good idea, I'll try that. Thanks!

22:33 amalloy: rplaca: there are tools in the jdk for that. jvisualvm, or jstack

22:35 hiredman: if you have a repl you can get stacktraces for all threads from a static method on Thread

23:00 rplaca: hiredman, amalloy: thanks!

23:23 zRecursive: Is clojure based on Common Lisp or Scheme ?

23:24 noob question :)

23:24 scottj: zRecursive: http://clojure.org/lisps

23:24 zRecursive: scottj: thanks

23:29 so many differences, it is better to regard it a new language :)

23:29 arrdem: zRecursive: probably...

23:32 derek_c: how do you simulate condition variables in clojure? I need a thread (future) to wait until a certain condition becomes true

Logging service provided by n01se.net