#clojure log - Dec 23 2013

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

0:00 cemerick: xeqi: ouch; conveyance fail?

0:07 alew: Is there anything you can do if one of your dependencies dependencies depends on an earlier version of a library that you depend on?

0:07 exclusions seem to only work for direct dependencies

0:07 justin_smith: :exclusions

0:08 hmm - you sure of that?

0:08 cjfrisz: ethanis: just noticed that #typed-clojure was less helpful than I'd hoped. Having any luck with your errors?

0:08 TEttinger: my approach is not recommended, but fork, update, post parallel version to clojars

0:08 justin_smith: alew: did you verify with lein deps :tree that it wasn't coming in from another dep path?

0:08 alew: lein deps :tree shows a library called clucy

0:08 which depends on lucene libs

0:08 TEttinger: uhhhhh

0:09 alew: only from looking at it

0:09 TEttinger: I really hope you didn't use my clucy

0:09 alew: no

0:09 TEttinger: good, because I regret putting my version of clucy on clojars

0:09 it has slightly different behavior, which I needed for efficient queries in an IRC bot

0:10 alew: do people use it?

0:10 TEttinger: I use it

0:10 alew: regardles, clucy depends on these libs, but they don't show up in the dependency tree

0:10 I'm guessing because they aren't on clojars?

0:10 TEttinger: ???

0:10 lazybot: TEttinger: How could that be wrong?

0:11 TEttinger: they might be on maven central

0:11 paste your deps :tree ?

0:11 justin_smith: alew: if there is aot compilation somewhere in there, that can fuck things up

0:12 alew: https://www.refheap.com/22136

0:13 TEttinger: thanks

0:13 justin_smith: and which is the problem, clucy 0.3.1?

0:14 alew: yes

0:14 as you can see

0:14 it doesn't show it's dependencies on lucene

0:14 its*

0:14 justin_smith: right

0:14 notice the exclusion above

0:14 as asked for

0:15 alew: yup

0:15 justin_smith: so what's the problem?

0:15 alew: elastisch requires a newer version of lucene

0:16 it isn't getting included

0:16 oh I see

0:16 the thing is even if I do remove the exclusions

0:16 it doesn't show the deps

0:16 justin_smith: odd

0:17 alew: https://www.refheap.com/22137

0:18 justin_smith: looks like the lucene stuff is coming in under elastisch instead

0:19 alew: Oh I see

0:19 so the error is in clucy

0:19 what to do then. They both require the same library with incompatible versions

0:20 TEttinger: this looks like a question for #leiningen !

0:21 justin_smith: hmm, two apps :) ??

0:21 lazybot: justin_smith: Uh, no. Why would you even ask?

0:25 justin_smith: alew: you can use caribou without it's clucy dep if you don't need lucene indexing of the CMS content

0:25 that may be the easiest route

0:25 alew: I would have to modify the clojar

0:26 and remove the index file

0:35 rhg135: hey, any obvious reason the accept println fires twice but the grabbed doesn't ever https://www.refheap.com/22138

0:35 trying to make a smallish abstraction over serversockets

0:36 something in my gut says that it's a fundumental problem in my approach

0:36 but i don't see it

0:42 ah i'm such an idiot lol

0:42 thanks for the ruber-duck debugging

0:51 pcn: Does anyone know if there's a way to have a somewhat large float not print using scientific notation when I pass it to the clojure.data.json/write-str function?

0:52 ,(/ (float (System/currentTimeMillis)) 1000)

0:52 clojurebot: 1.38777788416E9

0:52 pcn: ,(str (/ (float (System/currentTimeMillis)) 1000))

0:52 clojurebot: "1.38777788416E9"

0:52 pcn: I'd really like to be able to change the scale at which values are displayed using scientific notation

0:56 Though I guess in this case I'm not losing an precision.

1:03 xeqi: cemerick: finally tracked it down, turns out not to be a binding conveyance problem

1:03 KeithPM: Good day, when would you recommend the use of -> and ->> for someone who is learning clojure? I am attracted to it since it seems to help with the issue of deeply nested functions and data structures. What is the general experience with their use? Thnaks.

1:07 xeqi: cemerick: if interested... anything calling println (like interruptible_eval's :caught through repl-caught) binds *print-readably* to nil, and writes to *out*. *out* was a session-out which calls the transport on flush. the transport called (pr-str ..) and got unexpected results

1:22 ddellacosta: KeithPM: if you see a whole mess of parens at the end of the function, it's possible that there's an opportunity to use -> or ->> to make your code more clear.

1:23 KeithPM: And generally speaking, I find -> to be useful when I'm processing one value going through a chain of transformations, versus ->> seems to usually be used when I'm processing a collection going through a set of collections. You'll notice that many clojure functions which process collections require the collection as the final argument--map, filter, reduce, etc.

1:25 sorry, I misspoke: with "set of collections" I mean to say something along the lines of, "set of transformations"

1:25 or chain of transformations, as in the previous sentence

1:28 KeithPM: I like that answer ddellacosta!! That was my intuition but I wanted to know whether it was idiomatic or just academic. I just wrote a pair? function and ended up with 6 closing brackets and thought, maybe this is the time to start learning to use thread first :)

1:29 pcn: Is Raynes around?

1:29 ddellacosta: KeithPM: great, glad it was helpful. Yeah, I think that it's good just to try it out and get an intuition yourself for when it works and when it's trying to fit a "square peg in a round hole" so to speak. But it can definitely help clarify your code when you start seeing the kind of pattern you describe.

1:30 pcn: Or is there anyone else familiar with his filesystem module, or with java 7 and its file manipulation routines?

1:31 ddellacosta: pcn: I've used it a little, but ask your question first and we'll see if anyone can help.

1:31 pcn: It looks like https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj#L174 breaks because the taret doesn't exist

1:32 KeithPM: Thank you ddellacosta.

1:32 ddellacosta: pcn: do you have some more context? How are you calling it? Etc.

1:32 KeithPM: any time!

1:32 pcn: So for example: https://gist.github.com/pcn/8092544

1:34 ddellacosta: pcn: seems like maybe you just want to call the args in the opposite order? http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createLink(java.nio.file.Path,%20java.nio.file.Path)

1:34 pcn: I tried both

1:34 I'll add that

1:34 ddellacosta: pcn: hmm...well, it seems like that's obviously the error in this case--but do you get the same error if you switch the args?

1:35 pcn: (yeah, I noticed that java decided to put things in the opposite order from the system call. *sigh*)

1:35 ddellacosta: pcn: sorry if you already looked it up--I always start with the dumb questions. ;-)

1:36 pcn: Yes, I updated the gist

1:36 I looked it up before, and checked the code. It seems like the most likely reason is that as-path checks to see if its argument exists in me.raynes.fs

1:37 Haven't checked to see how as-file works yet.

1:37 KeithPM: Oops the names of the symbols are 'thread second' and 'thread last' sorry

1:37 pcn: sorry, that should be as-file

1:37 ddellacosta: pcn: huh...I don't know, but my strategy would be to try calling the Java calls themselves to establish that there was nothing weird there, then you would know clearly where the issue is, I suspect

1:37 pcn: sorry I don't have a better answer!

1:39 pcn: NP, I'll head down that road. Weird that as-file isn't causing the problem by itself. Down the rabbit hole

1:42 ddellacosta: So it's not clojure.java.io/as-file, it's this: https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj#L155

1:42 I have no idea what that means

1:43 ddellacosta: pcn: where is as-file getting called?

1:45 pcn: Oh....

1:45 Darn, I'm getting turned around. in the definition of link, it is as-path

1:47 ddellacosta: pcn: what do you get when you call file on the path you pass in (the one you are linking to that is)

1:47 ?

1:53 pcn: (fs/file target) is fine so far

1:57 OK, I see my problem.

1:57 I've got an extra "/" in the name

1:57 And I'm putting the arguments in the reverse order from what I'd expect.

1:58 Why oh why oh why is createLink in the opposite order as the system call?

2:07 OtherRaven: I've got a noobish question: How do I go about extending a java class to implement a java interface? I'm trying to make a renderer for a listbox that's not the default label.

2:11 pcn: ddellacosta: https://github.com/Raynes/fs/pull/65

2:14 ddellacosta: pcn: so, did that fix it?

2:15 pcn: oh sorry, just saw your messages

2:15 cool

2:15 OtherRaven: there are different ways to do it--if you just want to add a method then you can use extend-type

2:16 OtherRaven: ddellacosta: what about proxy?

2:16 ddellacosta: OtherRaven: I found these two posts to be super helpful regarding that subject: https://kotka.de/blog/2010/02/gen-class_how_it_works_and_how_to_use_it.html and https://kotka.de/blog/2010/03/proxy_gen-class_little_brother.html

2:17 OtherRaven: ddellacosta: Oooh, I'll check those out.

2:17 ddellacosta: OtherRaven: yeah, proxy may be more what you want

2:18 OtherRaven: ddellacosta: thanks XD

2:18 ddellacosta: OtherRaven: sure thing!

2:20 OtherRaven: sorry, re-reading your question I realize you want to create an interface--I'm not sure how to do that in Clojure

2:22 OtherRaven: definterface creates a new interface...

2:23 OtherRaven: ddellacosta: newp, don't need to create an interface, just implement it

2:23 ddellacosta: I'm extending JPanel to implement ListCellRenderer... and cursing at swing

2:23 ddellacosta: OtherRaven: ah, in that case, I know gen-class can do that.

2:24 OtherRaven: ddellacosta: sweet

2:24 ddellacosta: OtherRaven: oh, have you checked out https://github.com/daveray/seesaw ? May have some good examples for what you want to do, at the least.

2:25 OtherRaven: ddellacosta: yeah, I'm using seesaw... it's great for the simple stuff, but doing anything more complex seems to require java interop

2:26 ddellacosta: OtherRaven: ah okay, sorry--nevermind!

2:27 OtherRaven: I also recommend the Joy of Clojure section on Java interop, if you have a copy...in any case, I've just about exhausted my pretty limited knowledge of Java interop, so you're on your own from here--but good luck!

2:28 OtherRaven: ddellacosta: that book is sooo hard... I'm reading through Clojure Programming instead, but doing is usually more fun than reading XD

2:28 ddellacosta: OtherRaven: I hear ya...haha. :-)

2:29 OtherRaven: well, it is a useful book when you find you really need to understand a particular topic in Clojure. I can tell you struggling through it can be very useful!

2:31 OtherRaven: ddellacosta: Yeah, I'm planning to give it another try when I've got the basics down a bit better. It seems to go by those relatively quickly.

2:32 ddellacosta: OtherRaven: yep, I think your intuition is right--in my opinion, Clojure Programming is definitely a better first Clojure book, I think. Joy of Clojure is good when you want to deepen your understanding further. They are good companions to each other, I think.

2:33 OtherRaven: ddellacosta: makes sense

2:40 pcn: I just ran an experiment where I sent about 1000 short messages via a small program. Each message is read from an open socket (all are coming in one per line over a single socket). The message is "some text" <a number> <another number>\n

2:41 After processing 10000 of them (not 1000, sorry) and writing them out to disk, my laptop's fan went crazy and didn't stop until I killed the java process.

2:42 All messages were already written out, the socket was closed from the client. Any ideas as to how to investigate what was causing the activity?

2:44 TEttinger: it could have run out of memory, so it wasn't able to continue to process messages or something

2:44 I've gotten similar stuff with very large data sets

2:44 (as in, infinite)

2:45 pcn: I'd be really surprised if that was the case here. As I said, 10,000 lines of input, and all were written out. The repl was still responsive

2:45 TEttinger: also, you closed the sockets, right? I admit I haven't worked (at all) with networking code, but they are file-like in that they need to be closed?

2:46 pcn: They are, but there is only 1, and it was closed on the client side

2:46 While there could be a leak, there were none opened afterwards

2:46 TEttinger: paste your code?

2:46 pcn: Let me push it up to github

2:50 l1x: is there a way to print out the exact execution for a recursive function? https://gist.github.com/l1x/8093128

2:51 pcn: TEttinger: https://github.com/pcn/carbon-relaj

2:54 TEttinger: pcn, thanks. unfortunately I have no idea how to use the async stuff. I bet someone here will know how, when they become active

2:54 pcn: Cool.

2:55 Thanks for looking at it

2:55 TEttinger: heh, sorry I couldn't be more help

2:58 OtherRaven: dellacosta: well, I figured it out... looks like proxy is the way to go, and it's disgustingly simple XD

2:59 pcn: I'll try again when I get up. It's way past my bedtime. Have a good night, all.

3:08 ddellacosta: pcn: g'night!

3:08 OtherRaven: nice, glad to hear it. ;-)

3:19 KeithPM: Hi is anyone out there using light table 0.5.20?

4:25 magnars: What is the reason to use jetty over just creating an upstart service that runs java -jar ?

4:34 sm0ke: has it happened to someone that putting a new dependency in project.clj caused existing namespaces to throw errors on evaluation?

4:43 very vauge question i see

4:43 seriously_random: having brain malfunction with reduce: http://pastebin.com/CDVS5pfn

4:46 magnars: seriously_random: you are looking for clojure.core/interpose

4:46 seriously_random: magnars, if it were so easy. I am supposed implement my own interpose.

4:49 sm0ke: Ok guys if i put https://github.com/elasticsearch/elasticsearch-hadoop dependency, nippy seems to be found nowhere in the classpath inspite of being in the project.clj as dependency

4:49 wtf

4:50 magnars: maybe lein deps :tree has some answers?

4:51 sm0ke: magnars: nothing except that its listed there

4:51 no one else is pulling nippy

4:52 may be lein is limited in no. of jars in the classpath

4:57 lein classpath shows nippy

4:58 CompilerException java.lang.IllegalArgumentException: No matching method: compress, compiling:(taoensso/nippy/compression.clj:18:22)

5:22 seriously_random: this done in less amount of code: (reverse (conj (conj '() x) 4))?

5:31 magnars, think I almost got it: http://pastebin.com/5Jg4MYJ5

5:36 ior3k: seriously_random: I think you want (interleave '(1 2 3) (repeat 4))

5:37 seriously_random: ior3k, sorry, I have to use reduce to re-implement interpose

5:37 ior3k: oops, sorry about that then

5:44 seriously_random: ior3k, any idea where the mistake might be: http://pastebin.com/vJLvabyg ?

5:44 Cr8: seriously_random: I have a working something-magical

5:45 but i'm a bit lost as to -why- you want to do this =P

5:45 seriously_random: mooc, internet points

5:46 it is possible to pass anonymous fn to reduce, right?

5:46 Cr8: yes

5:46 ior3k: seriously_random: fn should take 2 arguments

5:46 Cr8: I cheated with metadata =P

5:47 ior3k: seriously_random: btw, it's possible to do that with less code, even using reduce

5:48 seriously_random: ior3k, ok.

5:49 hyPiRion: That's like

5:50 ,(let [z 4 a-seq [1 2 3]] (reduce #(conj %1 %2 z) [] a-seq)) ; ?

5:50 clojurebot: [1 4 2 4 3 ...]

6:07 seriously_random: why does this happen: http://pastebin.com/1exF9xHM

6:11 ior3k: seriously_random: you're lost in a web of conjs. Try approaching the problem methodically. You already have the magic fn. Did you test it?

6:11 just the magic fn, not the entire thing

6:12 seriously_random: ior3k, (magic 1 :c) ;=> (1 :c)

6:13 ior3k: seriously_random: are you sure that fulfills the contract required by reduce?

6:14 seriously_random: ior3k, not then it reaches the last element

6:18 ior3k, uhh. discard the last message

6:18 ior3k: seriously_random: I think there are more problems than that one.

6:21 seriously_random: ior3k, what is 'a-what' in "(fn [a-what x] (conj (magic x z) a-what))". Is it previous sequence?

6:24 ior3k: seriously_random: it's the accumulator. It can be a) whatever fn returns, or b) the initial value passed to reduce, or c) the first argument of the collection passed to reduce

6:28 Cr8: (reduce f init [a b c d]) gives the same result as (f (f (f (f (f init) a) b) c) d)

6:29 f is called with two args: the thing it returned the last time it was called, and the next element in the collection, until the collection is exhausted, and then reduce just returns the current value of the accumulator

6:31 ,(reduce (fn [acc el] (if (odd? el) (inc acc) acc)) 0 [1 2 1 2 3 3 4])

6:32 clojurebot: 4

6:32 Cr8: ^- counted the number of odd numbers in that coll

6:35 seriously_random: anon functions and reduce is a confusing mix

6:36 nested one level too deep: http://pastebin.com/DZCzgrCq

6:38 Cr8: tip: conj'ing onto a vector puts stuff on the end

6:39 ,(conj '(1 2) 3)

6:39 clojurebot: (3 1 2)

6:39 Cr8: ,(conj [1 2] 3)

6:39 clojurebot: [1 2 3]

6:40 seriously_random: Cr8, I know. I will put another reduce inside the reduce! :)

6:43 Cr8: tip: What should I get if I interpose something into a sequence that only has one element?

6:44 rurumate: I'm having trouble doing a "prepared insert" in cassaforte. Unprepared version works fine, but when I wrap with client/prepared and values, I get 'InvalidQueryException: Unknown identifier values'

6:44 seriously_random: Cr8, preferably the one element itself

6:44 Cr8: seriously_random: yep

6:44 ,(interpose :a [1])

6:44 clojurebot: (1)

6:44 Cr8: ,(interpose :a [1 2])

6:44 clojurebot: (1 :a 2)

6:46 seriously_random: Cr8, the problem is - isn't the a-seq outside the scope of anonymous fn? How to tell it if we are at the last element?

6:46 Cr8: you can't, meaning so you can't add element, separator for each element

6:46 you can add separator, element though

6:47 and start with the accumulator not being the empty list, but the first element of the input coll (and then feed reduce, not the input coll but (rest coll))

6:47 that is, the first element in a list, not bare, of course

6:47 rurumate: I made a paste out of it, see https://www.refheap.com/22141

6:49 seriously_random: Cr8, that make sense.

6:50 Cr8: (reduce f init []) will always return init, f never gets called if the input collection is empty

6:51 ,(reduce (fn [a x] (throw "explode")) 0 [])

6:51 clojurebot: 0

6:51 Cr8: ,(reduce (fn [a x] (throw "explode")) 0 [1])

6:51 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Throwable>

6:51 Cr8: turns out you can't just throw a string, but it had the desired effect

6:54 rurumate: sorry, looks like noone that uses it or works on it is around atm, but they have a mailing list https://groups.google.com/forum/?fromgroups#!forum/clojure-cassandra

6:54 might try there

6:55 rurumate: Cr8: alright, thanks

7:08 seriously_random: Cr8, http://pastebin.com/ajpLnDf5

7:09 Cr8: this looks over complicated

7:10 but

7:10 it does work :)

7:11 seriously_random: Cr8, I get it. start with first element, and (rest seq). conj 'x' + elem.

7:12 Cr8: yep

7:14 https://www.refheap.com/22142 is mine if you want to take a look (if you don't, don't click!)

7:15 seriously_random: two don'ts, must click

7:15 Cr8: ha

7:17 ior3k: Cr8: just an FYI, conj can take more than one argument

7:17 Cr8: ah, convenient

7:18 dsrx: ,(conj '() 1 2 3 4)

7:18 clojurebot: (4 3 2 1)

7:18 dsrx: ,(apply conj ['() 1 2 3 4])

7:18 clojurebot: (4 3 2 1)

7:19 Cr8: edited

7:19 dsrx: ,(#(apply (partial conj '())) [1 2 3 4])

7:19 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox/eval73/fn--74>

7:19 dsrx: ,(#(apply (partial conj '()) %) [1 2 3 4])

7:19 clojurebot: (4 3 2 1)

7:20 Cr8: there's into if you want to conj the contents of a collection into something

7:20 ,(into #{1 4 3 8} [4 5 6])

7:20 clojurebot: #{1 3 4 5 6 ...}

7:21 Cr8: which will, if it can, use transients inside

7:21 but otherwise is just (reduce conj thing coll)

7:23 ior3k: Cr8: here's my very slightly different take https://www.refheap.com/22143. I enjoy seeing the different perspectives people bring to the table

7:24 Cr8: that's similar to the standard (lazy) interpose

7:24 which drops the first element of (interleave)'ing it with an infinite sequence of the separator

7:25 ior3k: ah, nice

7:25 Cr8: (defn interpose [sep coll] (drop 1 (interleave (repeat sep) coll)))

7:25 is the stdlib interpose

7:27 ior3k: nice, I didn't know about drop. Still finding my way around clojure

7:27 Cr8: (drop 3 coll) is just (rest (rest (rest coll)))

7:28 drop is defined in terms of rest

7:28 dsrx: implementing interpose is simple once you know about interleave :)

7:28 Cr8: ior3k: if you're at a repl (and have made sure to (use 'clojure.repl), you can (source some-fn) to print its source

7:29 depending on your editor, there may also be a hotkey to jump to the definition of the fn named under your cursor, which should work fine on the core library

7:30 ior3k: I'm still setting up clojure on emacs, but I was using tryclojure to test this

7:30 lots of new stuff. Head spinning

7:31 cYmen: Is there some sort of system behind what is a [:hr] and what is a (submit-button) in hiccup? I just accidenttally wrote [:form-to ...] worked but gave some strange results.

7:32 Cr8: cYmen: [:foo] should always spit out a <foo> tag, which means you probably got a <form-to> instead of a from, which is probably not what you wanted

7:32 *a form

7:33 (submit-button "foo") is just a helper that spits out [:input {:type "submit" :value "foo"}] for you (which would emit <input type="submit" value="foo"/>)

7:34 https://github.com/weavejester/hiccup/blob/9d55fddf53ab32cc7761a32068dcb0364c99c714/src/hiccup/form.clj#L113-L116

7:34 cYmen: Cr8: Thanks for the explanation!

7:35 Cr8: the general rule is [:foo] becomes <foo/>, [:foo {:bar "baz"}], become <foo bar="baz"/>, and [:foo [:bar]] becomes <foo><bar/></foo>

7:35 the attribute map is optional

7:35 but if given always has to be the second element

7:35 otherwise any elements inside a thing just become subtags

7:37 broquaint: Is it possible to load deps in nrepl that were added since it has been launched? e.g nrepl-jack-in, add random.lib project.clj, lein deps, (use 'random.lib)

7:38 I guess that would involve extending the classpath somehow but I'm not sure where to begin on that.

7:38 Cr8: broquaint: https://github.com/pallet/alembic does that sort of thing

7:38 and packages it up all nicely

7:38 broquaint: Magic, thanks, Cr8!

7:39 Cr8: if you take the suggestion in the README and stick it in your lein profiles.clj it'll be in all your REPLs

7:39 which is super hadny

7:39 *hadny

7:39 can't type

7:39 clojurebot: Excuse me?

7:41 cYmen: Hm...when I hit the submit button on this thing I just get a blank "Not found" page. What does that mean?

7:42 broquaint: Cr8: I shall take that suggestion :)

8:06 cYmen: Hm..how do I find out what the latest version of org.xerial/sqlite-jdbc is? mvnrepository.com?

8:31 augustl: is there a function to safely (as in, don't execute code) read Clojure data from an InputStream?

8:35 ddellacosta: augustl: what is "Clojure data?" EDN?

8:36 augustl: ddellacosta: for now, a file with a clojure map in it

8:37 ddellacosta: augustl: ah, so you just want to read it in? Try slurp

8:37 augustl: also checkout the clojure.java.io namespace

8:37 augustl: slurp just gives me a string

8:38 ddellacosta: augustl: from there you can call read-string on it

8:39 Raynes: Well, don't do that.

8:39 Use clojure.edn

8:39 ddellacosta: augustl: listen to Raynes

8:39 read-string is not safe, sorry, my bad...

8:39 Raynes: read-string would accomplish the same thing, but indeed, is not quite as safe/

8:39 Which probably doesn't matter for augustl's use-case, but is good to keep in mind!

8:40 * ddellacosta agrees wholeheartedly with Raynes

8:40 augustl: read string fires missiles? :)

8:40 * Raynes goes back to being sneezing and groaning.

8:40 augustl: read-string*

8:40 seriously_random: (cond (one) (action1) (two) (action2) :else (do nothing) <-- else can't be written so that nothing will be done?

8:40 Raynes: augustl: http://www.learningclojure.com/2013/02/clojures-reader-is-unsafe.html

8:41 ddellacosta: augustl: http://clojuredocs.org/clojure_core/clojure.core/read

8:41 Raynes: seriously_random: Don't write :else

8:41 :)

8:41 Nothing will be done if it does not exist.

8:41 seriously_random: right, thanks

8:41 ddellacosta: Raynes: sick?

8:41 Raynes: Significantly.

8:42 :p

8:42 ddellacosta: Raynes: sorry to hear it. :-(

8:42 Raynes: feel better!

8:42 Raynes: I'm the whiniest person you'll ever meet when I have a cold.

8:42 * ddellacosta gives Raynes a cup of hot tea, conceptually speaking

8:42 * Raynes should actually make tea

8:43 ddellacosta: Raynes: man, I know...I turn into a whiny baby and could possibly rival you

8:43 Raynes: :p

8:43 ddellacosta: in any case, being sick is no fun. Hope you get well soon!

8:43 Raynes: Tganks!

8:43 Thanks*

8:48 seriously_random: Why the function is accumulating nil suddenly: http://pastebin.com/0AAsqV6i

8:52 hyPiRion: seriously_random: what does this expression return? (cond (> 2 3) (assoc [2 7] 0 3) (< 7 3) (assoc [2 7] 1 3))

8:52 seriously_random: hyPiRion, forgot :else acc. Never mind

8:52 hyPiRion: :)

9:32 seriously_random: "sequencify" int, e.g. 6 => (6)

9:33 hyPiRion: (doc list)

9:33 clojurebot: "([& items]); Creates a new list containing the items."

9:41 dotemacs: Hi, I've been trying to do the following: take a string and turn it into a method that I call on an object instance. So spoke to some people and they pointed me at 'reflection'. Looked at it and I can see how to get all the method names of an instance, but I'm unsure on how to invoke a method, dynamically, using reflection. Sort of (doseq [n ["Title"

9:41 "Author"]] ((str ".get" n) someInstance)). Any tips ? Thanks

9:45 BobSchack: dotemacs you're trying to call a java object correct?

9:45 dotemacs: BobSchack: yes, thats correct

9:49 BobSchack: wells there's the clojure library for reflection (http://clojure.github.io/clojure/clojure.reflect-api.html) or you can use Java relection api.

9:51 You could use reify to bring the java object into clojure

9:53 dotemacs: BobSchack: what I'm after is an example of how to do this: take a string and turn it into a method call. If you have an example of it or can share an example of it, I would be very grateful, thanks

9:57 BobSchack: dotemacs I haven't used the reflection utilities I just know of them, sorry. You can try the mailing list.

9:57 dotemacs: BobSchack: np, thanks :)

9:58 BobSchack: what are you trying to do that you need to turn a string into a java method?

9:58 dotemacs: BobSchack: theres an instance that has many 'getX' methods

9:59 BobSchack: so instead of calling each one of the individually, I'd like to have a way to pass in a vector with all the desired method names and call them on an instance

10:00 BobSchack: instead of doing: .getTitle, .getAuthor, .get...

10:00 BobSchack: so you're trying to use the lookup interface on the object instead of doing .getX

10:00 dotemacs: i'd like to pass in ["author", "title"...] to a function that will construct methods and call them based on the vector contents

10:01 ddellacosta: dotemacs: I assume you already have a class in existence?

10:01 esancho: would java.beans.Introspector help?

10:01 dotemacs: ddellacosta: yes

10:02 esancho: let me have a look

10:02 ddellacosta: dotemacs: sorry, you're trying to declare methods or figure out what methods already exist so you can call them?

10:03 dotemacs: ddellacosta: i just want to call them, i know which methods already exist

10:03 hyPiRion: ddellacosta: he's trying to convert "foo" to e.g. #(.getFoo %)

10:03 BobSchack: would the bean function work for this? (http://clojure.org/java_interop#Java Interop-The Dot special form-(bean obj))

10:03 ddellacosta: dotemacs: you could do it pretty trivially with a macro I expect

10:04 dotemacs: `(~(str ".get" method-name) ...) kinda thing, obviously that's pretty rough...

10:05 assuming you can use macros with Java interop, which I don't actually know for sure...

10:05 dotemacs: ddellacosta: true and i have something like that going, but i've already asked about this and was advised that using reflection would be better way to approach it. So what i'm asking is: what is that way of using reflection ?

10:05 hyPiRion: ,(import 'clojure.lang.Reflector)

10:05 clojurebot: clojure.lang.Reflector

10:05 ddellacosta: dotemacs: ah, gotcha, sorry--

10:05 hyPiRion: (Reflector/invokeInstanceMethod "hello" "substring" (into-array [0 2]))

10:05 gah

10:05 ,(Reflector/invokeInstanceMethod "hello" "substring" (into-array [0 2]))

10:05 clojurebot: "he"

10:06 dotemacs: cool, thank you all :)

10:06 ddellacosta: hyPiRion: very cool...didn't know about that!

10:15 Raynes: hyPiRion: `(~(str ".get" method-name) ...) <-- you'd need to symbolize the string.

10:18 hyPiRion: Raynes: were you talking to ddellacosta maybe?

10:19 Raynes: hyPiRion: Aye, your nicks are both colored the same.

10:19 ddellacosta: Raynes: yeah, I realized that afterwards, it was pretty loose...

10:20 resolve too I guess...

10:20 and eval too I gues

10:30 dotemacs: Raynes: you would need to smybolise the string if it was a symbol, but this is method which is to be invoked on a instance...

10:31 Raynes: &`(~(str ".get" "FooBar") ...)

10:31 lazybot: ⇒ (".getFooBar" ...)

10:31 Raynes: dotemacs: ^ You can't call strings

10:32 hyPiRion: ,(-> '(.isEmpty """) first class)

10:32 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading string>

10:32 hyPiRion: ,(-> '(.isEmpty "") first class)

10:32 clojurebot: clojure.lang.Symbol

11:51 shep-home: If I do a `send` inside an agent, Clojure will wait until after the agent is changed to act on that send. Is there anything similar for channels with core.async?

11:52 Asking in a different form, if I put something into a channel, is that tend to be more "pure" or more "side effect"?

11:58 pcn: Hi everyone!

12:02 I've got a test service that will read lines from a socket, and write them to channels.

12:02 If I pass a small but significant number of messages, somewhere between 1 and 10000, it seems like the jvm goes crazy doing work.

12:03 The socket is handled by a slightly changed version of server-socket

12:04 I suspect that the listening function is spending a lot of time looping and nooping, but I don't understand why.

12:04 At https://github.com/pcn/carbon-relaj/blob/master/src/carbon_relaj/core.clj#L160 I had to put the check for nil? or else that loop would feed massive quantities of garbage to the channel.

12:04 By garbage I mean nil

12:12 wink: anyone from the US here? Is Dec 24th in any way special regarding postal shipping, opening hours? From my restricted knowledge you only remotely call that christmas, right? :)

12:14 dubsg: wink: Yeah typically stores are open for shopping limited hours on the 24th (closing a bit early often)

12:15 ... and yes, USPS mail is delivered on the 24th ;)

12:15 wink: dubsg: ok, thanks. because here in Germany (as you may or may not know) the actual celebrations are on the eve od 24th, so most stuff shuts down at noon, or doesn't even open (not shops. but anything public)

12:30 devn: Hello all

12:32 BobSchack: hey devn

12:48 stompyj: is (:require [blah] :refer :all) generally preferred over (:use blah) these days?

12:48 Bronsa: yes

12:48 hyPiRion: yes, although it is (:require [blah :refer :all])

12:49 stompyj: Bronsa: hyPiRion : thanks!

12:51 whilo: is it possible to have a different version of the closure library in a cljs project? i am using ol3, which seems to use closure trunk (non-released :-/)

12:52 for reference https://github.com/openlayers/ol3

13:14 TimMc: technomancy: OK, I think I might be coming around to your point of view on if/when.

13:15 hyPiRion: (inc TimMc)

13:15 lazybot: ⇒ 54

13:15 hyPiRion: we got cookies for you

13:15 TimMc: technomancy: However, my answer is still to never use one-armed if, and use an explicit nil branch.

13:16 zerokarmaleft: TimMc: curious, is there a conversation in the logs about that?

13:16 TimMc: Oh my god yeah.

13:16 Search for kibit and one-armed if.

13:17 hyPiRion: It's one of the more frequently discussed bikesheds here

13:17 regardless of kibit, even

13:18 zerokarmaleft: hyPiRion: I'm a bit of a channel troll, so I miss a bunch >.>

13:18 hyPiRion: TimMc: is (and pred expr) the same as (if pref expr) =

13:18 *?

13:18 clojurebot: * is just for when you are lazy and sloppy

13:19 TimMc: I'm just going to do it on this one project and see how it feels.

13:47 pcn: TimMc it'll feel dirty, and you'll stop doing it and hope no-one you know sees you doing it.

14:05 gfredericks: ,(let [>.> :-D] >.>)

14:05 clojurebot: #<CompilerException java.lang.ClassFormatError: Illegal field name "_GT_._GT_" in class sandbox$eval25, compiling:(NO_SOURCE_PATH:0:0)>

14:05 gfredericks: ,(let [o_O :-D] o_O)

14:05 clojurebot: :-D

14:14 mocker: Trying to follow this http://j.mp/1gSqXzZ guide and think I'm running into a problem with it not being compatible with newer clojure. Mainly getting errors about clojure.contrib.java-utils and as-properties

14:17 Anyone know if there is something to replace as-properties?

14:19 rurumate: emacs here, why is [C Right] not working over ssh?

14:21 gfredericks: mocker: what does it do?

14:23 mocker: gfredericks: Complains about missing java_utils, and if I comment that out complains about not being able to resolve symbol as-properties

14:25 gfredericks: mocker: oh I see

14:25 akhudek: mocker: there is http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go, but it doesn't list the properties library sadly

14:26 gfredericks: mocker: so I don't know that there's a replacement for the java-utils contrib namespace; you can either try to get it working with an old contrib, or try to reproduce the functionality yourself

14:26 mocker: Ok, so I'll probably have to figure out how to rework what he was doing there.

14:26 gfredericks: might well be that pasting the code from java-utils would just work

14:26 mocker: undoubtedly he was depending on the clojure-contrib jar which you probably don't have yet

14:26 mocker: But at least I'm on the right track, that stuff isn't around anymore. :)

14:27 akhudek: oh wow, today I learned that 'concat' can generate stack overflows

14:27 gfredericks: akhudek: totes

14:27 that's one of the top three subtle dangers of lazy seqs

14:28 hiredman: /win 15

14:28 gfredericks: clojurebot: win is 15

14:28 clojurebot: Alles klar

14:29 gfredericks: akhudek: I think 95% of the time that concat is overflowing your stack it can be drop-in-replaced by into

14:29 akhudek: gfredericks: yep, I just did exactly that

14:30 gfredericks: which can potentially result in ordering differences related to seqs vs vectors

14:39 hyPiRion: (defn concatv [& colls] (reduce into [] colls))

14:40 gfredericks: (def concatv (comp (partial reduce into []) list))

14:41 TimMc: I just realized that I think ->/->> could have been rewritten to be recursive from the other end and that would've solved the problems

14:45 except the one problem of macroexpand-1 not being instructive

14:47 hyPiRion: Is it possible to force an inner macro expansion before an outer one acts? E.g. expand ->> before -> in `(-> 10 (->> a b c))`

14:47 gfredericks: force who to do it?

14:47 and from where?

14:47 clojurebot: I don't understand.

14:48 gfredericks: clojurebot: that's okay

14:48 clojurebot: Titim gan éirí ort.

14:48 hyPiRion: the reader, I guess. From a repl or when loading code

14:48 gfredericks: what? maybe a use case would help

14:48 rurumate: ,((fn [x] (mod x (nth (iterate #(* 2 %) 1) 16))) 18761459871)

14:48 clojurebot: 10399

14:49 Bronsa: hyPiRion: why not simply calling macroexpand-1 on & body from the macro?

14:50 hyPiRion: gfredericks: I want `(->> (+ a b) (-> [a b] fn*))` to turn into `(fn* [a b] (+ a b))`

14:50 octe: if you have a group of functions operating on for example a connection, is the with-connection from contrib.sql idiomatic clojure?

14:51 whomp: how do i iterate over a rectangle in a 2D vector?

14:51 gfredericks: hyPiRion: that makes you a weirdo, right?

14:51 whomp: or rather, how can i write a function that returns this rectangle?

14:52 hyPiRion: Bronsa: I don't want to redefine -> and ->> :p

14:53 gfredericks: whomp: you want some subsection of it? and is this a nested clojure vector in particular?

14:54 Bronsa: hyPiRion: definitely not possibile to do in the reader btw

14:54 whomp: gfredericks: yeah, i'm writing a program that verifies that a sudoku solution is valid. so it takes a 9x9 2D vector, and i want to process 3x3 grids in it

14:55 hyPiRion: gfredericks: that makes me able to get closures in Swearjure

14:55 gfredericks: whomp: you could use subvec twice

14:55 Bronsa: hyPiRion: assuming we are talking hypothetically, tools.analyzer's macroexpand-1 is a dynamic var -- just rebind it to a macroexpander that expands the macro args before the macro && emit-form to get the macroexpanded form :P

14:55 gfredericks: hyPiRion: oh I see this is serious then

14:56 hyPiRion: Bronsa: Well, that sounds like something which won't break existing code :p I guess if I do it after all other code is loaded

14:58 gfredericks: hyPiRion: did you see the description of the swearjure talk?

14:58 I'm curious who wrote it

14:58 "Gary Fredericks shows some tricks for getting the most out of Clojure obfuscated code."

15:00 hyPiRion: gfredericks: not sure who wrote it, but yeah, I noticed

15:00 It should've said "shows that elegant programs doesn't need alphanums"

15:00 gfredericks: it's not as ridiculous as I thought it was

15:01 whomp: gfredericks: something like this? (flatten (map #(subvec % (* x 3) (+ (* x 3) 3)) (subvec square (* y 3) (+ (* y 3) 3)) )

15:02 gfredericks: whomp: yep

15:02 flatten could be (apply concat ...)

15:02 rhg135: hello ppl, so close but no dice, https://www.refheap.com/22138 seems to close the client socket after the first reply now

15:02 but i can't see why

15:03 whomp: as someone new to the language, that makes me sad when i can write arr[(y*3)...(y*3+3)].map{|row| row[(x*3)...(x*3+3)]}

15:03 in ruby

15:03 rhg135: unless spit is closing the stream or similar

15:03 but that's not in the docs afaict

15:04 hyPiRion: rhg135: that's in the docs, I think

15:04 (doc spit)

15:04 clojurebot: "([f content & options]); Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer."

15:04 rhg135: ah

15:04 but i don't open my writer in spit

15:05 but it still closes it?

15:05 hyPiRion: yeah, with-open makes that happen

15:05 TEttinger: hyPiRion, were you here for my elegant "returns true" in swearjure? ##(#(% '☃) #(= % '☃))

15:05 lazybot: ⇒ true

15:05 rhg135: so is there a way to prevent that?

15:06 gfredericks: whomp: those two versions seem to have a pretty similar complexity level to me...is there some part in particular that bothers you?

15:07 TEttinger: ,(#(% :☃) #(= % :☃)) ; symbols work too, neat

15:07 clojurebot: true

15:07 hyPiRion: rhg135: Well, I would guess you could try to replace spit with .write, no?

15:07 whomp: well the operators are annoying, but you're right i suppose

15:07 thanks for the help

15:07 rhg135: idk i think writer works on ints

15:07 .write*

15:08 or chars not sure

15:08 hyPiRion: well, wrap it in a string.

15:08 rhg135: but i thought spit might work

15:08 hyPiRion: ,(.write *out* (str 42))

15:08 clojurebot: 42

15:08 rhg135: hmm

15:09 hyPiRion: ,(.write *out* 42)

15:09 clojurebot: *

15:09 hyPiRion: ,(.write *out* \*)

15:09 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No matching method found: write for class java.io.StringWriter>

15:09 rhg135: didn't know write worked on strings

15:10 pyrtsa: ,(.write *out* (int \*))

15:10 clojurebot: *

15:10 rhg135: ic

15:10 hyPiRion: rhg135: well, yeah, be a bit careful. That probably only works on writers, not streams.

15:10 rhg135: i'm going to try that

15:10 it's a writer

15:10 TEttinger: ,(.write *out* (int \☃))

15:10 clojurebot: ?

15:10 hyPiRion: ah, then I guess you're very good

15:11 TEttinger: ##(.write *out* (int \☃))

15:11 lazybot: ⇒ ☃nil

15:11 rhg135: clojure.java.io/writer returns a writere no?

15:11 justin_smith: a stringwriter is not a string though - it is a subclass of java.io.Writer

15:11 TEttinger: wow it handles unicode even

15:11 hyPiRion: rhg135: yeah, that returns a writer

15:11 rhg135: ok

15:11 TEttinger, java is utf16

15:11 i think

15:12 TEttinger: yeah, but I didn't know if file IO was

15:12 justin_smith: I think you can set the encoding of a file or even a string

15:12 TEttinger: or if it was coercing the (int \*) to a byte

15:12 rhg135: ya

15:12 justin_smith: but utf16 is the internal representation

15:12 rhg135: :encoding is an option to writer

15:12 hyPiRion: TEttinger: writers and readers have encodings attached

15:25 rhg135: slightly better

15:25 now i get an infinite loop after the first replies :\

15:26 by that i mean it keeps sending the same reply

15:26 justin_smith: rhg135: sounds like a tracing lib would help you

15:26 rhg135: hmm

15:26 i'll go set it up

15:27 justin_smith: https://github.com/clojure/tools.trace if you get a good log of what a function is receiving as args and what it is returning, that makes debugging much easier

15:27 ie. you can make a unit test by passing an arg that is representative of the real calls, and verify it outputs something reasonable (which if it is looping it clearly is not)

15:28 rhg135: sounds simple

15:28 justin_smith: well, it can be if you make the core of your logic purely functional

15:28 or as close to it as you can get away with

15:29 it is my defacto standard for debuggable designs

15:29 rhg135: mine too

15:29 my core is semi-functional

15:29 just that darn login!

15:30 SegFaultAX: IO at the edges is the ideal.

15:30 rhg135: i do most io in -main

15:30 justin_smith: rhg135: another option is to make an atom of a vector, and conj the args / return value on in each run

15:30 then use the repl to play with the data in the atom

15:30 rhg135: hmm

15:31 i think tools.trace sounds better

15:31 justin_smith: yeah, it depends, sometimes being able to experiment in a repl is a real bonux

15:31 but trace is more clean

15:31 I have tools.trace in my dev profile so I can always trace things in the repl

15:32 that and criterium for optimizing stuff interactively

15:32 SegFaultAX: justin_smith: You know what would be kinda neat?

15:32 justin_smith: SegFaultAX: what's that?

15:33 SegFaultAX: justin_smith: Conjing maps into that vector, where each map has 3 keys :args, :result, and :replay where replay is a nullary closure that will re-run that invocation.

15:33 justin_smith: oh, that sounds nice

15:33 not hard to do at all

15:33 SegFaultAX: Nope

15:33 justin_smith: also include a key for the function itself while you are at it :)

15:33 and for the string / name

15:34 to make filtering easy if you are tracing a shitload of stuff :)

15:34 and then maybe some functions to prune / trim the atom when it starts getting huge

15:34 rhg135: sounds like a good idea

15:34 justin_smith: yeah

15:34 it does

15:34 SegFaultAX: core.cache can help you there.

15:34 justin_smith: and with functional programming all that stuff is pretty straightforward

15:34 SegFaultAX: yeah, exactly what I was thinking!

15:35 the gotchas would be things like input streams / output streams

15:35 that are inherently stateful (they are empty / unwritable when the other end closes)

15:36 I dealt with this in my groundhog ring debugging lib by cloning the input stream (which works when input stream is a finite thing, not an indefinite interactive connection)

15:39 rhg135: how do you use trace?

15:40 trace itself doesn't trace m ydispatch function

15:40 justin_smith: https://github.com/clojure/tools.trace has a few examples

15:40 you can trace the whole ns

15:40 rhg135: o yeah

15:40 * rhg135 forgot

15:41 justin_smith: just calling trace/trace traces one invocation

15:42 rhg135: now this is a dafuq moment

15:43 trace-ns show all calls but those after the client connects

15:43 justin_smith: weird!

15:43 maybe because of threading the output is going somewhere different

15:43 are you doing this within emacs?

15:44 rhg135: no

15:44 within vim

15:44 but im at the repl

15:45 justin_smith: OK, I meant is the repl inside your editor, because if so some output from threads doesn't go into the repl window

15:45 because *out* is a dynamic var

15:45 rhg135: also it suddenly stopped sending any response

15:45 justin_smith: oh weird

15:45 rhg135: i hate threading

15:45 justin_smith: sounds like the "putting things in an atom" method may help you

15:46 atoms are meant to help with data across threads after all

15:46 rhg135: yes, but it's a java socket

15:46 already mutable

15:47 tbh i'm not too sure about java multi-threaded

15:48 justin_smith: try this: (def debug (atom [])) ... (defn some-fn [a b c] (let [... result (...)] ... (swap! debug conj {:time (java.util.Date.) :args [a b c] :result result} result)))

15:48 hiredman: I am in the market for some kind of server management / deployment thing, specifically I want to write a program that will spin on ec2 nodes, run some benchmarks, collect results, and shut it all down, I really like pallets model, but hate the dependency hell of pallet, and the fact that the crates are hit or miss about working with a current version of pallet

15:48 someone sell me on something else please

15:49 justin_smith: rhg135: the idea being that some-fn already exists, and we are adding in that swap! statement, of course

15:49 rhg135: ya

15:49 justin_smith: then from the repl you can inspect debug

15:49 rhg135: ok

15:50 i have a feeling this is a threading issue

15:50 justin_smith: of course

15:50 but this way you can see where the issue is

15:50 what is making it happen

15:50 rhg135: ok

15:50 imma add it in

15:50 justin_smith: and clojure has very nice facilities for using threading sanely

15:51 rhg135: ya...

15:51 wish clojure socket's existed

15:53 erm

15:54 my dispatch function, which i think is the problem, takes a lazy sequence

15:54 justin_smith: well, then don't log the whole lazy seq, just the part it uses?

15:54 s/log/store as appropriate

15:55 rhg135: the seq is a sequence of the maps the client sends so

15:55 i doubt it's that long

15:56 justin_smith: OK

15:58 rhg135: DAFUQ?!?

15:58 debug is empty while it's looping

15:59 so i guess that function never returns

16:00 pcn: rhg135: doall to the rescue?

16:02 rhg135: idk

16:02 it should be evaluated by the doseq

16:04 pcn: Could be. Try doall and see if the behaviour changes. Whatever you're doing could be lazier than you realize.

16:07 justin_smith: rhg135: so we've learned something - there is a stall before the function exits

16:07 rhg135: now you can try tracing at function entry, and then use a binary search to see which line hangs

16:15 rhg135: ah

16:15 k

16:16 justin_smith: that is, assuming the function is entered!

16:16 but tracing and/or debug atom conjing should help with that too

16:18 dotemacs: Hello, a question regarding testing. Would you test functions that are private, as in defined as 'defn-' ? Sort of like the way you wouldn't test private methods in object oriented langs? Thanks

16:18 justin_smith: often I think privacy itself is an OO thing

16:19 but this is a style argument of course

16:19 I test things if I want to be sure that a change in my code will not break them

16:19 or if I want to narrow down how they are breaking by asserting what they should be asserting

16:20 but I am pretty pragmatic about testing and do not use it in a rigorous way

16:20 ymmv

16:20 dotemacs: justin_smith: right, thanks for that

16:21 magnars: I want a pluggable backend, so I'm passing in a map of partially applied functions. But this creates some odd-looking code: ((:get-account storage) account-id) ... the double starting parens triggers my spider sense. Any thoughts?

16:22 justin_smith: magnars: this is what protocols and multimethods are for

16:22 but double parens are perfectly cromulent, they just mean you are calling a function to get another one back

16:22 which means functional programming in action, right?

16:23 magnars: protocols in particular are exactly designed for the situation where a backend is pluggable but should define some functions you can look up

16:24 magnars: I'll look into those. Never had a reason to before, so sounds like a good excuse to learn a little. Thanks :)

16:25 justin_smith: one tricky thing is that defmethod / defprotocol do annoying things in long lived repls

16:25 magnars: yeah, I've got bitten by that one a few times with multimethods :P

16:25 justin_smith: until you get their design perfected, you will find yourself having to restart in order to get sane behavior

16:25 but imho protocols are worth it

16:25 I dunno about multimethods though

16:27 anagrius: Is ritz-nrepl my best bet for debugging? It doesn't seem to work with Cider, would I have to downgrade to a compatible cider/nrepl.el version?

16:27 magnars: justin_smith: Sounds like a good excuse to grab a book of dead trees and step away from the computer to read up. Thanks.

16:27 justin_smith: anagrius: the design of ritz baffled me when I tried to look at the code, and I never found a good workflow for using it. some people have found it useful though.

16:28 magnars: np

16:28 anagrius: We just have a huge legacy program that is hard to reason about. A stepping debugger could really help us out.

16:29 scottj: anagrius: yes, yes, and even then it might not work for you.

16:29 anagrius: scottj: how so?

16:29 justin_smith: anagrius: from what I could figure out, ritz got weird and complicated because jvm debugging is best done via a second jvm that connects to the dt-socket and takes control, and ritz tries to act like common lisp where you stop and debug in the same image, which is weird and broken in clojure because threads

16:30 stepping debugging gets a little weird when you have concurrency

16:30 do you step parallel threads? How do you account for them? etc.

16:30 scottj: anagrius: even with a compatible nrepl.el there have been reports of it not working

16:31 anagrius: scottj: shame..

16:32 justin_smith: CDT can set breakpoints and allows you to investigate things at a breakpoint then resume

16:32 anagrius: I have found watches in LightTable really useful, but unfortunately nothing like it in emacs.

16:32 justin_smith: you can construct stepping or something like it out of this

16:32 CDT is much simpler than ritz

16:32 anagrius: justin_smith: I would have to check that out, thanks

16:33 justin_smith: also there is schmetterling which I helped design, which sues cdt and gives a webapp based UI

16:33 for looking at stacktraces / locals when your app stops

16:34 the usage is that you set your jvm opts for the debugging socket to be open, then you can run schmetterling as a seperate app, tell it to connect to your socket, and then schmetterling pops up a stack in your browser when an exception is thrown in the target vm

16:34 it kind of works

16:34 but is not a normal debugger at all

16:35 there is also tools.trace for figuring out how / when your code is called without stepping

16:35 I often miss stepping myself, but I don't think anyone has a simple workflow for that in jcm clojure yet

16:37 *jvm clojure

16:38 rhg135: ???????????????????????

16:39 it's saying the lazy-seq has one map, but doseq is running infinitely

16:39 anagrius: justin_smith: I have tried schmetterling, but it kept getting ClassNotFound errors. So I ended up giving up

16:40 rhg135: and it's not able to print debug in the repl

16:40 idk what it's blocking on tho

16:40 justin_smith: anagrius: yeah, that has to do with the classes for using the jdi, I have seen it too :(

16:41 rhg135: have you tried looking at the caller and seeing if it is stalling on something before even entering the function you are looking at?

16:41 rhg135: by any chance are you using a for or map on a lazy seq?

16:42 rhg135: well the inside of the function is conj'ing so i think it's called

16:42 the loop too

16:42 no, doseq

16:42 justin_smith: OK

16:42 rhg135: i learned that long ago lol

16:43 justin_smith: well then the print issue probably has to do with *out* being a dynamic binding

16:43 so who knows where the print output is going

16:43 you could use a proper logging lib

16:43 rhg135: i mean it's doseq'ing over a lazy-seq which is one item long

16:43 but it runs indefinetely

16:44 justin_smith: have you tried establishing the smallest / simplest subset of your code that demonstrates the behavior?

16:44 rhg135: no

16:45 but i have narrowed it down to the looop inside main

16:45 which is 90% of the code :\

16:46 mainly the dispatch form and it's args

16:49 justin_smith: well you could break it into smaller functional pieces, and verify each behaves as you expect

16:50 rhg135: i don't see how to split it more though

16:50 it seems fairly small

16:51 anagrius: justin_smith: So.. would you use cdt through swank-clojure or?

16:53 justin_smith: no, cdt does not need swank

16:53 you run it through a second repl

16:53 and it connects to the dt-thread

16:53 anagrius: mkay

16:53 justin_smith: but you will likely see the same error, because it needs the same jdi socket

16:53 s/a second repl/a second jvm

16:58 rhg135: i'm basically trying to write an abstraction over the JIM protocol similar to ring

16:58 as in handlers are functions taking a map returning a map

17:00 TimMc: hyPiRion: I think `and` and one-armed `if` have different false return values (false and nil).

17:01 hyPiRion: ,[(and false (+ :two)) (if false (+ :three))]

17:02 clojurebot: [false nil]

17:02 hyPiRion: TimMc: you are correct, sir

17:03 gfredericks: is haskell's if mandatorily-two-armed?

17:04 technomancy: ocaml's is not

17:04 gfredericks: does ocaml have a null?

17:04 what does an OAI return when false?

17:05 technomancy: I think one-armed if probably requires both branches to return unit

17:05 if is really rare in languages with p.roper pattern matching

17:07 hyPiRion: I'm not sure what proper pattern matching even is these days

17:07 gfredericks: P. Roper was a computer scientist who spent her entire career studying esoteric forms of pattern matching

17:07 bitemyapp: you don't really need "if" in Haskell.

17:08 gfredericks: case foo of True -> ...

17:08 Raynes: Because guards and pattern matching.

17:08 bitemyapp: pattern matching and guards are generally sufficient, and even then, you can work at a higher level than that.

17:08 Raynes: bitemyapp: h5

17:08 hi5*

17:08 * bitemyapp high fives Raynes

17:08 technomancy: there's only one if in grenchman that isn't used for side-effects, heh

17:08 bitemyapp: but 4rlz. unnecessary.

17:09 gfredericks: bitemyapp: does it require two arms?

17:09 bitemyapp: one nice thing about the non-strictness of Haskell is that you can implement your own short-circuiting boolean functions without macros or compiler support.

17:09 technomancy: gfredericks: anyway you don't need when/if to tell you when you have a side-effect in ML. you have unit for that.

17:09 the compiler will yell at you

17:10 dnolen: bitemyapp: you can do that in Smalltalk too, in both cases catastrophically slow so it doesn't matter much

17:10 except for cool points

17:10 technomancy: and only five ifs total

17:10 bitemyapp: dnolen: the point isn't that you'd write your own "if", it's that the language is capable of expressing a wider scope of things than strict languages without resorting to macros.

17:10 Raynes: technomancy: How dare you break lein new.

17:10 technomancy: the fact that the count is so high is probably indicative of my n00bness

17:11 Raynes: Don't know who you think you are, partner...

17:11 technomancy: Raynes: oh, I dare.

17:11 I dare so hard.

17:11 bitemyapp: gfredericks: it's strictly if-then-else.

17:11 gfredericks: phew

17:11 bitemyapp: gfredericks: what would a one-arm boolean expression even mean in Haskell?

17:11 serious question.

17:12 dnolen: bitemyapp: yes laziness delivers some kinds of flexibility w/ respect to control, but it's also doesn't give you enough control sometimes, see Oleg's Strange Loop Talk

17:12 as usual "tradeoffs"

17:12 hyPiRion: One thing I don't like with the OCaml pattern matching is that you cannot match on locals

17:12 bitemyapp: you can't return two different types from a function in Haskell, it'll tell you to get fucked if you try.

17:12 gfredericks: bitemyapp: well it could mean Maybe Foo

17:12 bitemyapp: unless you wrap it in either or an algebraic data type.

17:12 gfredericks: I wouldn't have expected that though

17:12 technomancy: hyPiRion: eh?

17:12 bitemyapp: gfredericks: that's not even two types.

17:12 gfredericks: two types would be Either or ADT. Maybe is "maybe" 1 type or nothing.

17:12 hyPiRion: technomancy: `match a with (b, c) ...` where b and c are variables/locals

17:12 technomancy: function?

17:12 clojurebot: function is <Chouser> there is one class per fn, one instance of it per closure

17:13 bitemyapp: Nothing ain't a thing.

17:13 gfredericks: bitemyapp: ...why do you need two types?

17:13 technomancy: oh, in the pattern itself, not the match expression

17:13 funny; I never tried that

17:13 bitemyapp: gfredericks: I was making the point what if you want a function that returns two different types you have to express that properly as Left and Right of an Either or something.

17:13 hyPiRion: Not had a need for it yet, but you can do that in Erlang and core.match afaik

17:14 gfredericks: bitemyapp: okay so this is unrelated to the one-armed-if?

17:14 bitemyapp: one-armed implies some unit type getting returned or something. Nutty.

17:14 gfredericks: no. ^^

17:14 gfredericks: bitemyapp: why not return Nothing when false?

17:14 bitemyapp: and you can return unit in Haskell, but that's not Nothing.

17:14 and if you return Unit, you can only return unit.

17:14 technomancy: bitemyapp: I could see it inferring None when the other branch returns Some of something

17:15 but it's not ac ommon enough idiom to be magic about

17:15 bitemyapp: you can return Nothing or Just myThing but that's Maybe MyType not unit.

17:15 gfredericks: bitemyapp: I never said anything about unit

17:15 bitemyapp: gfredericks: I was talking about what a one-armed boolean would mean in Haskell.

17:15 gfredericks: and why it doesn't make a ton of sense.

17:15 gfredericks: bitemyapp: I give up trying to explain myself

17:15 zerokarmaleft: how does lein resolve transitive version dependency conflicts?

17:15 rhg135: sounds like one of this 'fuck you' type things about the type checker

17:16 bitemyapp: gfredericks: how did one-arm / two-arm boolean expressions come up anyway?

17:16 rhg135: no, you can express anything you'd want, you just have to explicit about the non-determinism of the values.

17:16 rhg135: ik, b

17:16 erm bytem

17:16 damn

17:16 nvm

17:16 bitemyapp: rhg135: namely, if you need to handle a return value that might be a string or an int, you make an ADT or wrap in Either.

17:17 xeqi: zerokarmaleft: assuming soft version ranges, by choosing the version that is first in a breadth first search

17:17 gfredericks: bitemyapp: TimMc I think was considering a conversion to the technomancy camp of the if/when divide in clojure

17:17 rhg135: i used to use haskell, i know

17:17 ya...

17:17 life isn't deterministic

17:17 bitemyapp: gfredericks: I'm pretty sure I'm in his camp.

17:17 gfredericks: Camp Technomancy

17:18 what other things does he believe in? repeatability? the scilardi scenario?

17:18 we're bullish on scilardi

17:18 technomancy: gfredericks: aka the Hagelberg Catechism

17:19 gfredericks: technomancy: I need somebody to invent a Hagelberg Bagel

17:19 xeqi: I hear he likes coffee

17:19 rhg135: i do miss haskell's type system at times

17:19 hyPiRion: We are the Hagelborg

17:19 technomancy: gfredericks: that one's over my head I'm afraid

17:19 rhg135: makes debugging a lot easier

17:19 xeqi: aeropress for everyone

17:20 bitemyapp: rhg135: I was working on some Haskell last night, had one problem the type system didn't catch. That was it.

17:20 with somebody else*

17:20 rhg135: unlucky

17:20 gfredericks: okay at each meeting for communion we will have hipster coffee and hagelberg bagels

17:20 bitemyapp: I haven't had a bagel since new york.

17:20 this sounds awesome.

17:20 technomancy: bitemyapp: that's not really a claim with any meaningful interpretation

17:20 rhg135: bitemyapp, i had none in 4 months

17:20 bitemyapp: dnolen: do you eat bagels?

17:20 technomancy: *possible meaningful interpretation

17:20 gfredericks: technomancy: oh you didn't hear about new york?

17:21 technomancy: gfredericks: I guess not?

17:21 bitemyapp: technomancy: it was particularly cute because the one error was the mythical "logic error" that people that reject type systems speak of.

17:21 gfredericks: technomancy: well, three months ago when nobody was expecting anything unusual, new york.

17:21 bitemyapp: a variable was being processed in the wrong part of the recursion.

17:21 technomancy: my son's name is Noah, and there is a place called Noah's Bagels in New York

17:21 Raynes: gfredericks: Well, it wouldn't be type safe.

17:21 technomancy: that's all I got

17:21 hyPiRion: xeqi, technomancy: Fun fact, I bought an aeropress for my dad for Christmas. Not sure if I'm being Hagelberg assimilated or if that happened randomly

17:22 technomancy: gfredericks: good heavens

17:22 gfredericks: I bought a skerton grinder recently and I think it is defective

17:22 Raynes: gfredericks: Actually, sorry, re-read your messages.

17:22 TEttinger: hyperboreean woo

17:22 technomancy: no one told me

17:22 bitemyapp: aeropress is a secret gov't program to make everybody have a stronger upper body

17:22 Raynes: That actually does make a bit of sense.

17:22 bitemyapp: they're preparing us for the zombie apocalypse with caffeine and strength training.

17:23 TEttinger: haha it does not require much strength unless you are using way more grounds than needed

17:23 rhg135: bitemyapp, makes a lot of sense

17:23 gfredericks: bitemyapp: I don't know that I've ever heard anybody suggest a secret govt program that was not sinister

17:23 bitemyapp: TEttinger: I make *strong* coffee.

17:23 TEttinger: and if you want strong coffee just run coffee through more grounds

17:23 instead of water

17:23 bitemyapp: gfredericks: how is it sinister? They're helping us.

17:23 gfredericks: bitemyapp: it's not, that's my point

17:23 bitemyapp: technomancy: when you were in the Yay, where did you get coffee?

17:23 gfredericks: I mean, look at flouride. Totally non-sinister.

17:24 TEttinger: you can run aeropress coffee through like 4 times or more, I've heard, before it gets really hard to do because you are pressing mud through the filter

17:24 sprocket_: new clojure user here and wondering if someone might give me a hand :)

17:24 technomancy: bitemyapp: do people call it that? the keys aren't even next to each other

17:24 bitemyapp: technomancy: :3

17:24 TEttinger: sprocket_, shoot

17:24 sprocket_: i'm trying to write a function to load a config file, and if it's already been loaded to return the existing config

17:24 technomancy: bitemyapp: but I was mostly sticking to Sightglass and four barrel

17:24 * bitemyapp takes notes

17:24 sprocket_: (defn load-config []

17:24 (if (resolve 'config)

17:24 config

17:24 zerokarmaleft: xeqi: concretely, I have ring-core depending explicitly on clj-time 0.4.4, and blackwater explicitly depending on clj-time 0.6. deps :tree shows lein pulling in clj-time 0.4.4

17:24 sprocket_: (def config {:x "foo" :y "bar" :z "qux"})))

17:24 bitemyapp: technomancy: I'm planning my pre-gym coffee-up.

17:24 technomancy: if I was hungry enough to brave the lines for a waffle, blue bottle

17:24 sprocket_: but it's giving my unbound errors when it runs

17:25 ie) #<Unbound Unbound: #'clojure.core/config>

17:25 rhg135: sprocket_, refheap

17:25 bitemyapp: sprocket_: don't paste code in the channel homie.

17:25 sprocket_: sorry

17:25 technomancy: but last time I was there the line was around the corner even at like 800

17:25 gfredericks: sprocket_: using def conditionally like that is not idiomatic; an alternative could use delay

17:26 TEttinger: ,(resolve 'wheeee)

17:26 gfredericks: e.g., (let [c (delay (load the config))] (defn config [] @c))

17:26 clojurebot: nil

17:26 TEttinger: ,(resolve 'map)

17:26 clojurebot: #'clojure.core/map

17:26 bitemyapp: why is the new Google maps so slow on my computer? :(

17:26 technomancy: bitemyapp: Ritual has good beans from what I've made for myself in the office, but I haven't been ther myself

17:26 bitemyapp: technomancy: I tink that's the beans we have at my office.

17:26 hyPiRion: gfredericks, sprocket_: could also use a promise and deliver it

17:26 bitemyapp: maybe I should just go into my office to make coffee.

17:27 xeqi: zerokarmaleft: is ring-core listed in your deps before blackwater? the resolution uses the first version it finds

17:27 technomancy: bitemyapp: as long as you have a quality grinder and water within 3 degrees of 95C

17:27 gfredericks: hyPiRion: seems like a bit more logic? is there some benifit?

17:27 technomancy: sometimes it's good to have somewhere to walk to though

17:27 sprocket_: gfredericks, hyPiRion: i think i have some reading to do :)

17:27 technomancy: just to stretch the legs and change perspective

17:28 hyPiRion: gfredericks: depends on how the configuration is set up, I guess? I mean, might be better for testing, etc.

17:28 zerokarmaleft: xeqi: oh derp, I see the overrides info now

17:29 gfredericks: hyPiRion: oh like being able to deliver it in alternative manners?

17:30 hyPiRion: gfredericks: right. Although I guess with-redefs works as well.

17:31 for testing purposes, I mean

17:32 gfredericks: hyPiRion: yeah I was typing that out and then deleted it and stopped, mostly out of wishywashyness

17:34 zerokarmaleft: bitemyapp: is it possible to get korma to log queries with parameters?

17:34 bitemyapp: zerokarmaleft: you mean blackwater?

17:35 zerokarmaleft: https://github.com/bitemyapp/blackwater/

17:35 zerokarmaleft: yea, that's what I'm using

17:35 but e.g. where clauses are logged with the id passed instead of '?'

17:36 rhg135: any ideas on how one would write an abstraction over tcp reqquests?

17:36 couldn't read the ring source

17:36 bitemyapp: zerokarmaleft: blackwater prints the parameters passed to the right.

17:36 you want the arguments to be interpolated?

17:37 the arguments are | separated.

17:37 zerokarmaleft: bitemyapp: I'm only seeing time elapsed in addition to the sql

17:38 bitemyapp: zerokarmaleft: did you look at the example on blackwater's github page? it should look like that.

17:38 if it doesn't, there's a bug or you didn't pass any params.

17:39 zerokarmaleft: bitemyapp: hmm, ok...I'll dive in closer to the metal, I've been testing with mock requests

17:40 thanks

17:40 sveri: hi, how can i inject a variable into a string in clojure? something like: (let [a "bar"] (str "foo????bar???"))

17:40 rhg135: format, sveri

17:40 TEttinger: bitemyapp: http://www.reddit.com/r/Coffee/comments/1abp48/

17:40 sveri: rhg135: thx, thats what i was looking for

17:41 rhg135: np

17:42 bitemyapp: TEttinger: what am I supposed to do with the blood stains?

17:42 TEttinger: bitemyapp, that isn't specific to aeropress, and I've only ran coffee through an aeropress once (I was having a hard time drinking coffee, so I decided to maximize the caffeine per half-cup I could drink). I was up all night, needless to say.

17:43 bitemyapp, saliva dissolves blood stains. bury bodies vertically under a dead dog.

17:43 dubsg: I'm interested in using clojure for a simple backend API that will interface with a mongo cluster. Mostly as a proof of concept and to weigh the pros/cons of writing an API I've written in Scala. Any library suggestions wrt the HTTP framework or MongoDB side? compojure with monger seem about right from some naive googling?

17:43 technomancy: TEttinger: seems like it'd probably end up too cool afterwards too

17:44 TEttinger: I don't drink very warm coffee, but this was not cold

17:44 rhg135: dubsg, sounds right

17:44 but compojure doesn't actually serve

17:44 you can use ring-jetty there

17:45 technomancy: I guess if you brewed it into a pre-warmed cup you might not loose too much heat

17:45 TEttinger: aeropress is a fast method, is the main reason why it wasn't cold I think

17:45 dubsg: I see, so perhaps just ring is needed to respond with JSON to GET's

17:45 rhg135: well

17:45 justin_smith: rhg135: well compojure only works with ring, so it kind of implies ring (or a ring compatible backend at the very least)

17:46 technomancy: well not necessarily for drinking, but you need 92+ for the extraction not to be sour

17:46 justin_smith: compojure is for defining routes though

17:46 rhg135: ring actually makes sense of the http protocol

17:46 compojure makes sure it's routed according to "rules"

17:46 TEttinger: I've since moved on from coffee to no-doz. something about the large cups of hot liquid doesn't work with my stomach. and no-doz is more predictable in terms of caffeine content

17:47 dubsg: I'm looking for something very simple, 'GET /some/path/:id' ==> 200 OK {bunch: of, json: yeah!}

17:47 justin_smith: and, ironically, thanks to its usage of macro magic, compojure is barely if at all composible

17:47 rhg135: yup xD

17:47 TEttinger: haha justin_smith, that's awful and great at the same time

17:47 justin_smith: it is the truth, which is often both awful and great

17:47 rhg135: COMPojure

17:48 sveri: does format work in clojurescript?

17:48 rhg135: sveri, it should

17:49 it's core

17:49 bitemyapp: justin_smith: not ironic at all. Functions and data uber alles.

17:50 sveri: rhg135: i get an error: TypeError: arp.charts.format is undefined

17:50 rhg135: bitemyapp, i think he was referring to the name

17:50 bitemyapp: oh right.

17:50 rhg135: sveri, strange since it's core code

17:51 sveri: rhg135: do i have to require some lib?

17:51 rhg135: sveri, no that's what core is

17:51 included with the language

17:52 sveri: rhg135: yea, i just wanted to make sure

17:52 rhg135: is it in string?

17:52 i've never actually used it

17:53 sveri: no, in core

17:53 rhg135: bbl tho

18:03 zerokarmaleft: bitemyapp: something's definitely missing in the korma hook, I'll try and come with a patch or at least a PR

18:04 s/a PR/an issue/

18:33 TimMc: gfredericks: I'd liek to hear more about your reverse-directional solution to ->/->>, but probably won't be able to read it until I'm off this train's blasted wireless.

18:33 Leavea message at the *beep*.

18:37 KeithPM: Hello

18:38 justin_smith: greetings

18:42 KeithPM: Hi Justin...

18:44 Is there a good tutorial on the Thread-second and thread-last macros? -> and ->>

18:52 justin_smith: hmm

18:53 http://clojuredocs.org/clojure_core/clojure.core/-%3E

18:53 KeithPM: the main thing to remember is that -> and ->>, since they are macros, are things that rewrite the code before it is evaluated

18:54 another helpful thing is as-> for when you want to switch where the argument comes in

18:54 brainproxy: is there a straightforward way w/in project.clj to setup a library to depend on an older version of itself?

18:55 justin_smith: ,(-> 1 (* 2) (+ 8) (as-> x (- 1 x)))

18:55 clojurebot: -9

18:56 justin_smith: brainproxy: why not make it be a second library that extends the original?

18:57 brainproxy: justin_smith: i could, but wondered if there is another way

18:58 justin_smith: brainproxy: the problem is that classpath doesn't know about versions once it is constructed

18:58 so you would have two definitions of the same classes, just in different parts of the classpath

18:59 so how do you make the functions in version 2 see the defs in version 1, but everyone esle see version 2?

18:59 that seems weird

18:59 not to say it isn't possible, for all I know it is

18:59 just seems weird to me

19:00 brainproxy: well i didn't know if there was a way to prefix or in some way auto-adjust the older version so that they don't conflict

19:24 KeithPM: Had to reboot. Any takers on Thread second and thread last (-> and ->>)?

19:25 gdev: what are we taking?

19:25 arrdem: gdev: KeithPM asked for examples of -> vs ->>

19:25 KeithPM: did you see justin_smith's examples?

19:26 gdev: ,(-> 'foo (str 'bar))

19:26 clojurebot: "foobar"

19:26 gdev: ,(->> 'foo (str 'bar))

19:26 clojurebot: "barfoo"

19:27 justin_smith: ,(->> 'foo (str 'bar) symbol)

19:27 clojurebot: barfoo

19:27 justin_smith: another nuance

19:27 arrdem: yeah the legality of bare symbols is nice

19:28 ,(-> {:foo :bar} :foo)

19:28 clojurebot: :bar

19:31 gdev: ,(let [me {:rollodex {:contacts {:mom "Anna" :dad :dead}}}] (-> me :rollodex :contacts :mom))

19:31 clojurebot: "Anna"

19:31 gdev: also good for getting at nested collections

19:32 justin_smith: almost as handy as get-in

19:35 arrdem: IMHO more readable than get-in...

19:36 justin_smith: but get-in allows non-IFn indexes

19:44 gdev: yeah (let [v [[1 2 3] [4 5 6] [7 8 9]]] (-> v 0 0)) gives you an exception but (get-in v [0 0]) gives you 1

19:50 KeithPM, hope that answers your questions, also no discussion on rocket science would be complete without me linking this vidya http://www.infoq.com/presentations/Macros-Monads

19:59 KeithPM: Sorry I missed Justin's examples. I was rebooting

20:05 Good. Now does -> work with something like (count (filter #(== 3 %) (map second (frequencies (map rank hand)))))) ?

20:05 rads: ,(clojure.walk/macroexpand-all '(-> 1 (+ 2) (+ 3) (+ 4)))

20:05 clojurebot: #<ClassNotFoundException java.lang.ClassNotFoundException: clojure.walk>

20:05 rads: bummer

20:06 KeithPM: The problem I am seeing is that when I use map, it is hard to thread-second into the forms when I have fuctions like map and filter...

20:07 TEttinger: ,(doc ->>)

20:07 clojurebot: "([x & forms]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."

20:07 rads: KeithPM: that's what ->> is for

20:07 (->> (map rank) (frequencies) (map second) (filter #(== 3 %)) (count))

20:07 woops

20:08 (->> hand (map rank) (frequencies) (map second) (filter #(== 3%)) (count))

20:08 KeithPM: OK!!!!! Yeah, I ike it!!! Lemme try that

20:09 thanks rads :)

20:09 rads: np. -> threads the value in the first argument slot, ->> puts it in the last. that's the only difference

20:10 KeithPM: Wow... It rocks!!!

20:11 So one has to study the desired form to determine whether to use -> or ->>? I mean this fell out very naturally but most of the examples I see seem to lean towards the ->

20:13 I think this is probably how clojure has to be written, we seem to find ourselves in an inverted nested situation so easily, these operators turn things right side up fast...

20:14 gdev... I will do my monads tonight :) Thanks

20:14 rads: KeithPM: yeah, it's quite handy. it can also be helpful to use a (let) form to break up a computation into named steps, or to split up a long function into smaller ones to make it easier to read

20:15 KeithPM: Thanks for all who chipped in to clarify this!!!

20:17 Yes let is pretty handy, especially for destructuring and as you point out breaking up into named steps. I think I like the threading macros though, you could capture a long chain of thinking very clearly.

20:18 What was interesting in your solution is the use of what appears to be partial functions, e.g (map rank) is a function expecting a collection...

20:22 gdev, I did look at that one, time for a repeat :)

20:27 gdev: KeithPM, yeah it's a good video because it shows how much you have to repeat yourself and how the code flow can get out of natural order when you don't use threading

20:28 KeithPM: Yes, I think this is a good time for me to review it since I am actually writing a lot of class code for this cool clojure class from Finland

20:31 andyf_: KeithPM: (map rank) in that example is not actually a partial function call, but a form that is manipulated by ->> at the expression level before any functions are called.

20:31 KeithPM: Clojure also has partial functions, but unlike Haskell and perhaps some other languages they are explicit, e.g. using the function partial

20:32 KeithPM: Ah ha... thanks... SO I should think of this as a pure macro play... It is reassembling human readable code into machine readable structures right?

20:32 andyf_: right

20:32 Although humans can read the output of the ->> macro without too much trouble

20:32 KeithPM: Great, thanks...

20:34 SegFaultAX: By partial functions I assume you mean partial application.

20:34 KeithPM: LOL... This human prefers the linear view... Sure we can do it but is it something I want to be doing all day? I think I would much rather the -> and ->> forms, I could 'nest' as deeply as I want this way...

20:35 Yes that's what I meant SegFaultAX. I am actually more familiar with currying/partial functions in Haskell

20:36 bitemyapp: currying is one of my favorite things about Haskell

20:36 it's so simple, but so nice.

20:36 SegFaultAX: KeithPM: You keep on using this word. I do not think it means what you think it means.

20:36 bitemyapp: noprompt made a rather nice elaboration on a base-case with a curried function. It was nice.

20:36 SegFaultAX: bitemyapp: It's a cute but useful trick.

20:36 bitemyapp: cute doesn't do it enough justice.

20:36 KeithPM: Which word SegFaultAX

20:36 bitemyapp: fromList = foldr insert empty

20:37 ^^ PRETTY

20:37 SegFaultAX: KeithPM: Partial function.

20:37 noprompt: point free FTW

20:37 bitemyapp: KeithPM: when you say partial function, you mean partially applied function.

20:38 KeithPM: a partial function is a specific thing related to the concept of totality. Namely, partial functions have inputs for which there is no output. Total functions have at least one result for every input, even if it's the same thing.

20:38 I'm still pissed defcurried isn't in core.

20:38 grumble grumble.

20:38 KeithPM: Yes I agreed to that earlier :) I was just thinking about a function that was expecting additional variables... Partial application is actually the technically correct term from lambda calc

20:39 andyf_: bitemyapp: Pissed enough to file a ticket and write a patch? :-)

20:39 SegFaultAX: KeithPM: It has nothing to do with partial functions.

20:39 KeithPM: additional values actually :)

20:39 bitemyapp: andyf_: I've not signed the CA and I'm grumpy about other things too.

20:39 KeithPM: True

20:39 andyf_: bitemyapp: Of course putting it into a library is much easier.

20:39 SegFaultAX: defcurried is a thing already, it just isn't public.

20:39 KeithPM: Partial functions are actually from calculus :)

20:39 bitemyapp: SegFaultAX: #' is the savior of us all.

20:40 goddamn, this is the smoothest pu ehr I've ever had.

20:40 KeithPM: Thanks for pointing out SegFaultAX. I prefer accuracy in expression, that's our business :)

20:41 SegFaultAX: bitemyapp: Have you had ancient trees?

20:41 KeithPM: And also not saying things that are wrong or unrelated. ;)

20:41 KeithPM: :)

20:41 bitemyapp: SegFaultAX: dunnae tink so.

20:41 KeithPM: I'll get it right

20:42 SegFaultAX: bitemyapp: It's so full bodied and delicious. It tastes like a cross between mushroom and tree bark. Quite strange, but very good.

20:42 noprompt: bitemyapp: my face isn't on the file anymore ;_;

20:43 :P

20:43 bitemyapp: noprompt: hum?

20:43 SegFaultAX: so, have your pitchfork and torch ready?

20:43 SegFaultAX: Always.

20:43 bitemyapp: SegFaultAX: the FPers are getting together for an old fashioned holiday "run the heretic out of town" in honor of Gilad Bracha's uninformed talk.

20:43 so uh, partay at the Bracha haus.

20:44 SegFaultAX: Was that the one on Alan Kay?

20:44 No. Which one was that?

20:44 Oh

20:44 noprompt: does defcurried simply use partial behind the scenes?

20:44 SegFaultAX: That one

20:45 noprompt: or does it do some macro magic?

20:45 SegFaultAX: Deconstructing FP. Yea that was a weird talk.

20:45 bitemyapp: noprompt: neither, I think it just returns a closure for each argument.

20:45 noprompt: SegFaultAX: was that the one on infoq about how functional programming is mostly bogus?

20:45 bitemyapp: blargh. let me just look it up

20:45 noprompt: mostly bogus is accurate.

20:46 noprompt: SegFaultAX: at least that's the impression i got before i fell asleep.

20:46 SegFaultAX: noprompt: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj#L139

20:47 noprompt: Bogus is a strong word, but overblown.

20:48 noprompt: i'm basically going to skip talks like that.

20:48 going forward.

20:48 and blog posts too.

20:48 generally speaking, i've found them to be an utter waste of time.

20:49 bitemyapp: (inc noprompt)

20:49 lazybot: ⇒ 3

20:49 SegFaultAX: noprompt: I like to keep an open mind about that sort of stuff.

20:49 bitemyapp: show code or gtfo I always say.

20:49 zerokarmaleft: I enjoy watching the aftermath of your drained sanity when you try to fuck with the monkeypatching of Korma.

20:49 SegFaultAX: Hard to do with theoretical stuff.

20:50 bitemyapp: Bah.

20:50 noprompt: SegFaultAX: they're generally the same song in a different key.

20:50 pop music for programming.

20:51 bitemyapp: I think I like Haskell partly because it helps to put distance between me and the pop culture of programming.

20:51 I could tell I needed to reach for higher ground after 50% of the tweets about Clojure on my twitter were actually about Overtone.

20:52 SegFaultAX: Implying that Clojure is pop culture. Heh, I wish.

20:52 bitemyapp: hits my threshold for it. Lots of people talking, little/no code, mostly about accessible nonsense like overtone or inclusion fetishism.

20:53 work on something interesting or difficult enough, you don't have to talk about being inclusive because you're just grateful somebody, anybody...read your fucking paper.

20:54 noprompt: fair enough, but i'm w/ SegFaultAX here; i hardly think clojure represents the status quo.

20:55 SegFaultAX: Not by a long shot.

20:55 bitemyapp: you're mistaking pop culture for status quo

20:55 it has nothing to do with that.

20:55 noprompt: bitemyapp: yeah, wrong phrase.

20:56 bitemyapp: It's about the substance density and the faux participation of people not doing any work and just consuming/observing a few actually doing something.

20:56 SegFaultAX: I don't use or not use languages based on how trendy I or others perceive them to be. I wouldn't specifically pick Haskell over something else because it makes me feel like I'm in some elite minority group.

20:56 bitemyapp: I consider it a perk, rather than a raison d'etre.

20:56 noprompt: (inc SegFaultAX)

20:56 lazybot: ⇒ 3

20:57 SegFaultAX: bitemyapp: That's /always/ the way it is. There will always be more lurkers than producers.

20:57 bitemyapp: The primary reasons are things like having lost my patience with type errors.

20:57 SegFaultAX: That's orthogonal to trendiness.

20:57 bitemyapp: noprompt: props for producing a lone error of the mythical category of "logic error" last night btw.

20:57 SegFaultAX: that would be my point.

20:58 my reasons are many.

20:58 noprompt: <3 the code.

20:58 noprompt: if you wanted to genericize it you could make a Foldable instance for it.

20:58 Almost want to do a post mortem of that error.

20:59 rads: dnolen: hey david, I've been trying out a fairly complex UI with om and I have some tricky questions for you: https://github.com/swannodette/om/issues/20 :)

20:59 noprompt: bitemyapp: yeah, i'm glad we're doing these sessions. i began looking into the rendering code earlier today.

21:00 bitemyapp: noprompt: awesome. I really enjoyed it last night despite being desperately exhausted.

21:02 noprompt: rads: have you expiremented w/ a single location for application state?

21:02 bitemyapp: me too.

21:03 dsrx: bitemyapp: saying you're going to "reach for higher ground" because too much of your twitter feed smacks of accessibility sure as hell makes it seem like the raison d'etre

21:04 bitemyapp: dsrx: nap.

21:05 SegFaultAX: I feel a tweet coming on... "LMAO if you use Twitter to judge the quality of a programming language community"

21:06 bitemyapp: I already described it as a perk. o_O

21:06 akhudek: think my favourite thing about the clojure community is the number of people who look at past work while trying to solve hard problems

21:06 bitemyapp: SegFaultAX: if we really want to get into the quality of the community, I could talk your ear off about the libraries.

21:06 SegFaultAX: bitemyapp: Meh, it's a young language.

21:07 And generally things are improving all the time. There has been tremendous growth in the Clojure community over the last 2ish years.

21:08 CLJS in particular has brought in some big crowds in the last 12 months.

21:08 gfredericks: TimMc: I just looked back at the old versions and now I'm totally confused because I think they are what I was imagining

21:11 noprompt: the best way to tolerate the programming community on twitter is to also follow an equal number of weirdos who are weird for weird's sake.

21:11 dsrx: follow that NodeOS guy

21:11 bitemyapp: noprompt: which regex libraries did you poke at?

21:12 noprompt: dsrx: it's all about @coolpond.

21:12 dsrx: sorry @cool_pond

21:14 dnolen: rads: trying to answer those questions myself, it's going to take some time to shakeout

21:14 noprompt: bitemyapp: not many. i've been thinking of wrapping a regex lib that provides extended regexp to ClojureScript.

21:15 dnolen: rads: in Om master I've made om.core/set-state! and om.core/get-state official

21:15 noprompt: bitemyapp: by "not many" i mean one.

21:16 dnolen: rads: I don't think you should put transient state into the app-state unless you might find that useful for undo operations

21:16 rads: there's also support for absolute paths, so you can access the player info from anywhere

21:19 rads: it's also worth considering whether information like that is best shared via channels and saved locally via om.core/set-state!

21:20 noprompt: dnolen: i've been having good luck with an abstraction that uses pub/sub to wrap application state.

21:21 dnolen: my ui layer almost never talk to my data layer directly.

21:22 everyone talks/listens to the application message broker.

21:22 dnolen: noprompt: that's another approach, I certainly haven't played w/ any of this enough to know what works and what doesn't

21:23 noprompt: dnolen: so far it's working fairly well. the difficulties lie mostly in structuring the application state.

21:24 SegFaultAX: Managing application state is a problem in general, so don't feel bad.

21:24 noprompt: dnolen: but it's allowed me to avoid making api calls and direct state manipulation in places where it really shouldn't belong.

21:26 SegFaultAX: dnolen: What's the long-term strategy for Om? Is it something you see yourself maintaining, or is it more an exercise in what can be done using new types of front-end architectures?

21:26 dnolen: SegFaultAX: the point of Om was mostly to show what's possible and illustrate what I think are dead ends

21:26 dead ends == copying what JS devs do

21:27 beyond that that I think it's up to everyone to figure out what actually works when leave those approaches behind

21:27 SegFaultAX: dnolen: What are the biggest pain points in building and maintaining complex javascript frontends?

21:28 dnolen: SegFaultAX: I think the entire model is busted

21:28 thus Om

21:28 SegFaultAX: Which model?

21:28 dnolen: treating the DOM as a "place"

21:28 which sits at the foundation of modern JS practice

21:28 SegFaultAX: Ah, yeah.

21:35 ddellacosta: it's true, we recently stopped treating our DOM as a place but rather as a sort of "render target" and it has saved us a lot of pain. We still maintain a client-local data store, but this is wholly segregated from the DOM, and could exist anywhere really. The React.js/OM approach now seems obviously better to me.

21:37 bitemyapp: ddellacosta: I've done similarly in how I've changed how I approach frontend.

21:37 ddellacosta: the place I still struggle is complicated user interactivity flows. Even while core.async helps a bit here, it doesn't alleviate all the pain. Still feel like I'm doing something wrong.

21:37 bitemyapp: yeah, it really seems to be the direction folks are moving in.

21:38 dnolen: ddellacosta: UI programming is hard, but it doesn't need to be insane, which is how it usually feels.

21:38 rads: dnolen: I will have to take a look at pedestal again and see if there are any lessons for om. IIRC pedestal-app deals with the same issue of app state vs ui state

21:38 ddellacosta: dnolen: yeah, that's fair, and I think that sums it up pretty well.

21:39 dnolen: rads: I think my ticket about including get/set-state APIs more or less sums up my ideas

21:39 rads: transient state doesn't go into app-state unless for some reason you want/need to record it

21:40 app-state is really just the pure "model"

21:40 everything transient should go in component state

21:41 rovar: can someone explain to me what the ^{:export foo} mechanism is?

21:41 https://gist.github.com/jolby/1119294

21:41 rads: sounds good, I'll take look at the new code

21:41 dnolen: rads: there are some complications because parent component need to communicate things to children component like - are you in the edit state? modifying the subview list etc. that's stuff I'm pondering next

21:42 ddellacosta: rovar: export in CLJS allows you to call a function from JS code.

21:43 noprompt: dnolen: this is the type of stuff i put in my application "state" which is connected to the root of the ui.

21:44 dnolen: noprompt: yeah, I'm not quite convinced about doing that - I think there's room for a new kind of component

21:44 noprompt: dnolen: not all of it but most of it. click an edit button update the application state to be in edit mode.

21:44 dnolen: om/children or something like that

21:44 rads: dnolen: so in react there is no concept of app state, what is the use case for it here instead of only having state inside components and communicating through props/channels?

21:44 noprompt: dnolen: like i said, i use pub/sub as the intermediate device.

21:44 dnolen: that provides a higher level abstraction than what's current available

21:44 some like this would give you filter/sort/insert/remove w/o needing to interfere

21:44 it all feels to manual at the moment

21:44 s/to/too

21:45 noprompt: dnolen: well i'm sure if anyone will find a solution, it will be you. :)

21:45 dnolen: rads: React has props, that's what app-state is props

21:46 rads: it's experiment, but I think the value of app-state is that you can always see your app as data

21:46 rads: Om is just a fancy interface for human beings to Clojure(Script) data

21:46 to paraphrase Kovas B., Om is a trick to make it tangible w/o having to actually write code

21:47 you can manipulate some data a UI and still get the plain data out w/o futzing around too much

21:47 "some data with a UI"

21:48 rovar: ddellacosta: ahh. so it's like an ffi interface for callbacks. Do people still use this model often? I don't see it often in clojurescript examples.

21:49 ddellacosta: rovar: I have used it often when I've needed interop with JS or CoffeeScript code. I use it less now that our codebase is getting closer to 100% CLJS.

21:54 logic_prog: what is the standard way to sahre code between cljs and clojure?

21:54 rovar: ddellacosta: I am interested in targetting ios, android and web with approximately 1 codebase.

21:54 I'm hoping that can be clojure

21:54 logic_prog: i hate code duplication and I have some data structures that I need to mirror on both sides

21:55 dnolen: logic_prog: there are various ways to do cljx is somewhat popular

21:55 logic_prog: dnolen: yeah, https://github.com/lynaghk/cljx was the first result on google

21:55 ddellacosta: logic_prog: I think it depends, cljx works well in some cases, but if there is relatively little interop, crossovers should work fine

21:55 interop = Java/JS interop I mean

21:56 rovar: I can't speak to that, I'm sorry--I haven't done anything other than web dev with CLJS.

21:56 logic_prog: ddellacosta: "relatively little interop" == "relatively little platform (jvm / js) dependent code" ?

21:56 ddellacosta: logic_prog: that's my feeling about it--I think cljx is kinda moot if you don't have much that is platform dependent. That said, maybe there are other arguments for using it over crossovers that I'm missing.

21:57 dnolen: rovar: I think iOS story could be good now that there's a decent bridge from JS to native - maybe Android will get it's act together at some point, PhoneGap until then I guess.

21:57 rovar: you should be able to make a clear delineation between your core business logic and the "presentation" layers.

21:58 dnolen: rovar: still, CLJS and Clojure don't really try to get to crazy papering over platform differences, that's left for applications to solve.

21:58 logic_prog: ddellacosta: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/CROSSOVERS.md does look really simple

21:58 rovar: dnolen: I was thinking about using appcelerator titanium, which can hit ios and android with javascript, and that link I posted above demonstrates that it can be targeted with clojurescript.

21:58 the other thing was maybe use cljx, and target android natively with java, and use cljs for the ios platform..

21:58 dnolen: rovar: that could work too, I don't know much about Titanium

21:59 ddellacosta: logic_prog: can't tell if you're being sarcastic or not...haha

21:59 logic_prog: but I've used both, and I haven't found either of them too complicated really. crossovers don't require a separate library, is all.

22:00 logic_prog: ddellacosta: not sarcastic, cross overs is basically almost a straight up "cp" right?

22:00 ddellacosta: i.e. it monitors when things change, then copies things over

22:01 ddellacosta: one thing I don't understand: suppose I have a piece of code, which depends on clojure.core.rrb-vector in clojure land, and cljs.core.rrb-vector in cljs land, is there a way to make this work with crossovers?

22:01 ddellacosta: logic_prog: ah, yeah--mostly just configuring your project.clj to set up where it should be picking up crossover code, in my experience.

22:01 logic_prog: don't know the answer to that--my intuition is that if the library is both Clojure and CLJS compatible, it should just work--but don't know without trying it.

22:02 logic_prog: if there are separate interfaces for the two, then you may need to use cljx to get compatibility, however.

22:03 logic_prog: by separate interfaces I mean, one interface for using clojure.core.rrb-vector with CLJS vs. Clojure, for example (no idea if that's the case)

22:03 logic_prog: they use the same protocol

22:03 I think I can make it work :-)

22:03 ddellacosta: logic_prog: let us know how it goes! :-)

22:21 rovar: has anyone tried making leiningen listen to git?

22:21 e.g. post commit hook http posts or somesuch?

22:21 or even polling

22:21 I'd rather use leiningen instead of jenkins

22:22 arrdem: rovar: hooks to achieve what... building?

22:22 rovar: arrdem: yes, build automation / deployment

22:22 CI

22:22 arrdem: rovar: you should be ableo to hack up a post-recieve to build in not time.

22:22 * arrdem can't type

22:22 rovar: arrdem: that's what I figure, so easy in fact, that I figure someone else has done it :)

22:23 arrdem: rovar: I wrote and published a paper not to long ago on what ammounted to that :P

22:23 rovar: well that's a good start :)

22:23 arrdem: rovar: turns out that because it's so easy everyone just rolls their own.

22:23 rovar: yea.. good to know I'm not crazy at least..

22:23 arrdem: rovar: but yes we (as a community) could build really good hooks support for a lot of development process stuff.

22:23 rovar: jenkins just seems like overkill when about a dozen lines of clojure should do what I need.

22:23 arrdem: rovar: that we don't is characteristic of our general lack of process and software engineering

22:24 or four lines of bash :P

22:24 that's the sad thing... a little well considered bash scripting can get you rediculously far

22:24 rovar: that is a good point

22:25 I guess I could make a post commit hook to call leiningen

22:25 arrdem: right. that's all you need. echo "lein build; git push deploy;">> hooks/post-recieve

22:26 I mean my typical setup is I have one bare git repo that's the "master", and it has a post-recieve that cd's into deployment and `git pull --rebase`es

22:26 totally works to deploy node and clj code.

22:26 rovar: I'd need to make my git server my build server, or make it auto-push

22:27 arrdem: yeah but achieving that sort of auto-push is really pretty easy...

22:27 and totally worth doing IMHO

22:28 I suppose there should be a git template for this kind of setup...

22:28 ~ideas

22:28 clojurebot: Huh?

22:28 arrdem: ~todo

22:28 clojurebot: todo is http://clojure.org/todo

22:28 arrdem: hum... I thought I had an "ideas" var. oh well.

22:29 justin_smith: rovar: leiningen instead of jenkins? I have never heard of such a thing. But it is easy to make jenkins use leiningen

22:29 rovar: blarg

22:29 justin_smith: I mean I guess it varies depending on how much of the jenkins feature set you are using

22:29 rovar: jenkins has acquired mass of its own

22:30 it requires significant exit velocity

22:30 justin_smith: sure, I use it because my workplace has a jenkins server set up for all of our projects

22:30 arrdem: jar jar

22:30 *har har

22:30 bitemyapp: arrdem: soup

22:31 justin_smith: what jenkins does for auto-deploy is poll every X minutes, and if it pulls anything new from origin/master it runs the build/deploy script

22:31 you could do that with cron

22:31 or if you really wanted to you could make a clojure program that did that I guess

22:32 rovar: at work, where we have many dedicated git servers, we use jenkins for kicking off jobs from git

22:32 arrdem: bitemyapp: gaming box is capable of 351khash/s for dogecoin mining :D

22:32 justin_smith: create a future that sleeps and then runs the check / conditionally builds and deploys / launches itself again

22:32 rovar: while not at work, I could manage something more akin to a post commit hook :)

22:32 justin_smith: if you want to build on the same machine you are hosting git on, yeah that works

22:32 bitemyapp: arrdem: mumble?

22:33 arrdem: I really want to build a post-commit hook that approximates Jenkins while staying really stupidly light weight and free...

22:33 rovar: I'm afraid I don't get the dogecoin joke, if it is one..

22:33 arrdem: bitemyapp: not tonight. both mining and family. I'll be lurking here tho.

22:33 justin_smith: someone should totally make the miniature jenkins

22:33 bitemyapp: arrdem: isn't mining automatic though?

22:33 justin_smith: rovar: dogecoin may be a joke, but it also exists

22:33 arrdem: bitemyapp: but I'm doing it from Linux and it's pegging the geepus

22:34 justin_smith: rovar: http://motherboard.vice.com/blog/dogecoins-founders-believe-in-the-power-of-meme-currencies

22:34 arrdem: bitemyapp: so if you want to play some FTL we're good, but otherwise no

22:34 rovar: I see that it is very fashion

22:34 bitemyapp: arrdem: er, FTL is multiplayer?!

22:34 arrdem: bitemyapp: no. I'm joking.

22:34 bitemyapp: I'd be up for just chatting anyway.

22:34 justin_smith: rovar: so meme, much flog dead horse

22:34 arrdem: bitemyapp: if it was, it would surely be harder.

22:34 (inc justin_smith)

22:34 lazybot: ⇒ 21

22:35 arrdem: justin_smith: hey, I have 4533 dead horse points from under 24hrs of mining stfu

22:35 justin_smith: :)

22:35 rovar: how money

22:35 arrdem: bitemyapp: so how does typeclass based dispatch get implemented?

22:35 bitemyapp: arrdem: I figured out how to be reasonably successful in DayZ, as I'd mentioned, but people are pretty ruthless bandits right now.

22:36 arrdem: bitemyapp: I totally believe that

22:36 bitemyapp: arrdem: you infer the type, then rewrite things like "show" to "show_mytype_tc"

22:36 I mention the banditry because it's worse than usual. You have zero chance of making friends and banding together for mutual benefit. Kinda disappointing.

22:37 arrdem: bitemyapp: ah so it's compile time static because more type information is apparent than just the typeclass.

22:37 bitemyapp: the entire implementation is known statically.

22:37 bitemyapp: Right.

22:37 arrdem: hum. ok.

22:38 logic_prog: hmm

22:38 lein clean wipes out "cljs" when I use crossovers

22:40 arrdem: bitemyapp: so is long term survival possible in dayz? it seems like most of the resources in the game are nonrenuable.

22:51 bitemyapp: arrdem: long term survival is possible.

22:51 arrdem: requires developing routine that includes stopping for water.

22:52 arrdem: getting proper weapons with ammo requires a hell of a journey.

22:56 arrdem: bitemyapp: right. making it to the airfield.

22:57 rovar: at one point I liked games like that

22:57 then I got a job

22:57 arrdem: (dec jobs)

22:57 lazybot: ⇒ -1

22:57 rovar: and decided I didn't want two jobs

22:57 I was big into Shadowbane and DAoC

22:57 arrdem: rovar: yeah that's why I'm not really engaged in dayz. it's cool... but I don't feel like spending my "free" time trying not to die.

22:57 bitemyapp: rovar: this isn't an MMO.

22:58 rovar: o rly?

22:58 arrdem: bitemyapp: ... persistant state? it basically is...

22:58 bitemyapp: not in the sense that it has grinding, no.

22:58 there's only 40 people to a server

22:58 rovar: interesting

22:58 bitemyapp: and it only takes 2-3 hours to max out your gear.

22:58 yes, it saves your personal state

22:58 rovar: is that a beta restriction?

22:58 bitemyapp: I've no idea what their long term plans are

22:58 but it's always been the case that the servers are interchangeable.

22:59 and again, there's no grinding.

22:59 you're just surviving and making your way around - avoiding bandits (human players) and zombies.

22:59 I had to have a couple of failed runs (less than one hour apiece) before I understood how to survive and navigate.

23:04 rovar: but yeah there are no levels. The only thing that "levels up" is your knowledge

23:04 rovar: interesting

23:05 bitemyapp: knowledge of where loot tends to be, that sort of thing.

23:22 rovar: wowow.. the android emulator on my linux box is intractably slow

23:22 i'm not sure how people get any work done..

23:25 ddellacosta: rovar: whenever I've done android dev in the past, I've only ever used a real handset. The emulator is just pointless

23:25 rovar: :(

23:40 arrdem: bitemyapp: you still there?

23:41 bitemyapp: remaining family is watching the idiot box. you've got yourself a partner.

23:42 bitemyapp: arrdem: hum.

23:42 arrdem: I am in mumbur.

Logging service provided by n01se.net