#clojure log - Dec 22 2013

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

0:47 arrdem: bitemyapp: bro that's just friggin creepy.

0:48 bitemyapp: arrdem: ?

0:48 arrdem: bitemyapp: the last pic you sent me

0:49 bitemyapp: arrdem: yeah, Dolan is amazing.

0:49 arrdem: school is in session in #haskell bhtw

0:49 btw*

0:49 danlentz: bitemyapp: do you work at runa?

0:49 arrdem: bitemyapp: coppy that, I'll listen

0:50 bitemyapp: danlentz: no, I work for a genetics company that uses mostly Python, but I've been shoving FP down their throats.

0:51 danlentz: heh. sorry i must have mixed up names

0:52 gnentics are cool though -- as in bioinformatic type stuff?

0:52 bitemyapp: danlentz: it's fine. I help maintain Korma with Baranosky, that might be where the confusion comes from.

0:52 danlentz: my company does their own sequencing, lab work, and bioinformatics.

0:52 danlentz: y i think your are right

0:54 i spent some time talking with the authgor of tawny-owl phil lord who is involved with a bunch of bio at manchester. in the end though i found the lib not very useful

0:55 datomic may have finally cured me of rdf fixation

0:56 although some people do seem to be impressed w/ stardog

0:56 havent spent any time w/ it tho

0:56 its verey interesting field tho

0:58 i took one grad class in bioinformatics but was massivly outclassed when it came to the chemistry

0:58 it wasnt all that computer-oriented of a class unfortunately...

1:00 the computing pretty much limited to teaching bioligists how to do blast searches using a web browser :)

1:01 bitemyapp: That's regrettable.

1:01 I have zero background in bio, I'm there because I'm pure software and useful.

1:03 danlentz: y. ontogenisis web site may have some interesting articles about what theyre doing over there with mapping epidemiologic data using owl metamodels and inferencing techniqurs tho

1:20 TEttinger: Mandus, were you Mandar before?

1:29 ok, checked the logs, glad Mandar got the issue fixed

1:41 yedi: is there a fn that removes non-alphannumeric characters from a string

1:44 TEttinger: yedi, sure. ##(clojure.string/replace "there's a hole in the bucket, elijah." #"\PL|\PN" "")

1:44 lazybot: ⇒ ""

1:44 TEttinger: oh crud

1:46 yedi: sweet: (str/replace "a, rando-string, that's removing... certain chars" #"\W|_" " ")

1:46 ,(clojure.string/replace "a, rando-string, that's removing... certain chars" #"\W|_" " ")

1:46 clojurebot: "a rando string that s removing certain chars"

1:48 TEttinger: right \W

2:14 agh this is very hard for me... does anyone have a good alternative to keep-indexed for transient collections? I'm not entirely sure how to work that magical reduce to have indices

2:22 danlentz: is there any consensus about which is the best clojure book?

2:22 practical, joy of, programming, oreilly...

2:23 some other?

2:25 brand0: I found that the online resources combined with the classic lisp stuff was fine

2:32 danlentz: y ive gotten by I was thinking maybe if one was well regarded it wouldnt hurt to read

2:32 i got a lot from the various common-lisp classics

2:40 TEttinger: figured it out, I could use areduce since I was using arrays in the first place, and areduce has an index arg

3:39 ivan: IDEA can't save my .cljs file because System has a lock on it

3:39 Windows: not even once

3:41 oh, duh, I just had to kill the jig process running on another machine to get Windows SMB to release the lock

3:41 TEttinger: another... machine.

3:41 wow

3:42 that seems really easy to exploit

3:46 ivan: Windows filesystem operations are designed to have no guarantees of doing what you want to do, if anyone has ever heard of the file you created

3:46 stdlib open() prevents deletion of files that are open

3:49 Cr8: that one was a huge pain point

3:49 because there's no way to get it NOT to

3:49 you actually have to start using the windows filesystem API if you want to delete open files

3:50 ivan: you can also open files with CreateFile + FILE_SHARE_DELETE

3:50 Cr8: yeah

3:50 that's what I wound up having to do

3:50 ivan: I considered writing a program that used mhook to patch running processes to do that

3:51 that was after a more hare-brained idea to make the kernel do it

3:51 Cr8: and then there's some way to get a fd off of that Handle but I wound up just having an i/o abstraction layer so that I could just use pure windows api ops on windows because the compat layer is just awkward as hell

3:54 ivan: yeah, I ended up doing that once in Python with ctypes

4:06 TheMoonMaster: Can anyone help convert a haskell list comprehension to Clojure?

4:10 TEttinger: TheMoonMaster, maybe? it probably uses for

4:11 http://clojuredocs.org/clojure_core/clojure.core/for can be helpful

4:14 TheMoonMaster: TEttinger: Yeah, it's kind of a crazy one imo, allStrings = [ c : s | s <- "": allStrings, c <- ['a'..'z'] ++ ['0'..'9'] ]

4:15 My Haskell is very very weak.

4:15 And I'm not sure if the recursion would work with Clojure in this case

4:16 TEttinger: this is an infinite sequence?

4:17 TheMoonMaster: Yes.

4:18 noidi: I think that might work, if you create a function that returns the result of the list comprehension, and the list comprehension invokes the function

4:21 TEttinger: I would just use lazyseqs... if I was familiar with them

4:22 TheMoonMaster: Hmmm

4:24 noidi: actually that won't translate to clojure directly because clojure is strict and not lazy

4:25 clojure would have to evaluate the recursive call to allStrings before it can return from the outer allStrings

4:25 there's no base case so you get infinite recursion

4:25 TheMoonMaster: Yeah, I was thinking the recursion wouldn't work in the clojure version.

4:26 I just need a way to take an array of characters and generate an infinite sequence, eg: [a b c 1 2 3] return a, b, c, 1, 2, 3, aa, ab, ac etc

4:26 I was trying to think of a decently functional way to do that instead of using an atom to change the value and increment it.

4:28 TEttinger: ##(let [all ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"]] (nth (iterate #(for [base % more all] (str base more)) all) 1))

4:28 lazybot: ⇒ ("aa" "ab" "ac" "ad" "ae" "af" "ag" "ah" "ai" "aj" "ak" "al" "am" "an" "ao" "ap" "aq" "ar" "as" "at" "au" "av" "aw" "ax" "ay" "az" "a0" "a1" "a2" "a3" "a4" "a5" "a6" "a7" "a8" "a9" "ba" "bb" "bc" "bd" "be" "bf" "bg" "bh" "bi" "bj" "bk" "bl" "bm" "bn" "bo" "bp" "bq" "... https://www.refheap.com/22114

4:28 TEttinger: (let [all ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"]] (iterate #(for [base % more all] (str base more)) all))

4:28 that last one I didn't run, because it will run forever

4:29 TheMoonMaster: Ah, got it.

4:29 TEttinger: TheMoonMaster: ^

4:29 iterate returns an infinite sequence

4:29 TheMoonMaster: Thanks TEttinger, I appreciate it.

4:30 TEttinger: you can get an entry with nth or all entries with take, like in haskell

4:30 sure, np

4:30 this was a fun brain challenge

4:30 TheMoonMaster: Yeah, it was a bit too much for me to do myself.

4:31 TEttinger: I used ideone to help verify what the haskell... did

4:31 TheMoonMaster: Hahaha, I can't stand Haskell to be honest.

4:31 Tried getting into it quite a few times and quit each time.

4:37 TEttinger: TheMoonMaster, be aware that that does not like calculating the combination of 5 or more letters... it gets slow

4:38 or rather, it just ran out of memory

4:38 TheMoonMaster: Interesting.

4:38 Luckily I don't need it past 4

4:39 TEttinger: 4 it does fine

4:39 I have 8 GB RAM, and it seems fine

4:40 TheMoonMaster: Same here.

4:41 TEttinger: the number of 4-char combinations is 1,679,616

4:41 goooooood

5:08 yedi: so i made this thing: https://gist.github.com/yedi/8080527

6:01 TEttinger: TheMoonMaster, oh this is fun

6:01 ##(take 200 (let [all ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"]] (nth (iterate #(for [base % more all] (str base more)) all) 7)))

6:01 lazybot: ⇒ ("aaaaaaaa" "aaaaaaab" "aaaaaaac" "aaaaaaad" "aaaaaaae" "aaaaaaaf" "aaaaaaag" "aaaaaaah" "aaaaaaai" "aaaaaaaj" "aaaaaaak" "aaaaaaal" "aaaaaaam" "aaaaaaan" "aaaaaaao" "aaaaaaap" "aaaaaaaq" "aaaaaaar" "aaaaaaas" "aaaaaaat" "aaaaaaau" "aaaaaaav" "aaaaaaaw" "aaaaaaax" "a... https://www.refheap.com/22116

6:01 TheMoonMaster: Haha, obsessed now?

6:02 TEttinger: it can calculate less, if it does it on-demand

6:02 nah, disconnected for an hour

6:02 was wondering why it was running out of memory

6:03 TheMoonMaster: Ahhh

6:03 TEttinger: what were you using this for?

6:06 TheMoonMaster: TEttinger: Just comparing Clojure with Haskell with a friend

6:06 TEttinger: ah ok

6:06 they are very different languages

6:07 once you get to macros I think clojure has a real edge

6:07 but I haven't needed macros yet

6:07 (to write my own, I haven't needed it)

6:07 TheMoonMaster: Yeah, same.

6:08 I understand macros far better than other concepts

6:08 TEttinger: lazyseqs are tricky...

6:10 TheMoonMaster: Yeah, but I love the language.

6:13 TEttinger: same

6:13 I write utility scripts in clojure because by now it's faster than anything else I know

6:14 TheMoonMaster: I'm aRuby / JS guy but play with Clojure

6:14 bitemyapp: arrdem: around?

6:15 TEttinger: @seen arrdem

6:15 &seen arrdem

6:15 lazybot: java.lang.RuntimeException: Unable to resolve symbol: seen in this context

6:16 TEttinger: dollar sign.

6:16 $seen arrdem

6:16 lazybot: arrdem was last seen talking on #clojure 5 hours and 27 minutes ago.

6:26 hyPiRion: TEttinger, TheMoonMaster: https://www.refheap.com/22117 is a solution which works in constant space (if you don't retain head) and runs in inverse factorial time for a single solution n.

6:27 TheMoonMaster: Dude nice.

6:27 Now to wrap my head around it

6:28 hyPiRion: heh, yeah

6:30 TEttinger: clever, hyPiRion

6:30 quot mod

8:08 daGrevis: hi! can someone show me an example of reduce with f, val and coll in it?

8:08 so far I can use reduce with f and coll, no idea how val works.

8:09 angerman: ,(doc reduce)

8:09 clojurebot: "([f coll] [f val coll]); f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val i...

8:09 cark: ,(reduce + 5 [1 2])

8:09 clojurebot: 8

8:10 angerman: daGrevis: so the thing is: reduce takes two arguments, if you hand it a collection, what do you reduce the first value with? You can either specifiy it explicitly with val OR (default behaviour) simply reduce the first and second element ast first step.

8:12 as clark mentioned: reduce with + on [1 2] does 1 + 2, reduce with [1 2 3] would do (1 + 2) + 3, reduce with an initial value of 5 and [1 2] would do ((5 + 1) + 2)

8:13 daGrevis: angerman, thanks, i got it :)

8:14 cark: how's this clark you speak of hungerman !?

8:14 who*

8:14 angerman: cark, sorry :(

8:14 cark: hehe =)

8:17 daGrevis: current status https://twitter.com/daGrevis/status/414746316233646080

8:18 yee, (count "foo") works!

9:19 Mandar: the-kenny, updated my code to use repeatedly, it's much clearer now, thanks! https://github.com/agolp/sangria/blob/master/src/sangria/guessing_game.clj

10:39 lsdafjklsd: Hey all

10:40 justin_smith: hello

10:41 rurumate: Has anyone tried cassaforte? As soon as I put [clojurewerkz/cassaforte "1.3.0-beta5"] in project.clj, I can't even start a repl anymore, getting ExceptionInInitializerError, caused by "ClassNotFoundException: org.apache.cassandra.db.marshal.UTF8Type"

10:42 justin_smith: the first thing I would try is adding the dep for the project providing that class directly

10:43 rurumate: justin_smith: good idea

10:43 justin_smith: likely a version of the dependency that is too old / new to provide that class is being used, or the packagers did not specify their dependencies properly

10:43 http://mvnrepository.com/artifact/org.apache.cassandra

10:44 you can use the pom info to specify the dep

10:45 maybe try [org.apache.cassandra/cassandra-all "2.0.3"]

10:46 rurumate: justin_smith: I downgraded cassandra-driver-core to 1.0.4, repl works now. Any cassaforte devs here, or should I file a bug report?

11:19 OK I've decided to made this an issue. https://github.com/clojurewerkz/cassaforte/issues/26

11:38 sritchie: hey guys - once I have an enlive sequence,

11:38 what's the proper way to convert it to a single string?

11:38 just concatenate?

11:44 raek: sritchie: depends on what you want to do with it. to print it? yes, just use (apply str the-sequence).

11:44 sritchie: send it over the mandrill API as the html body of an email

11:44 over to*

11:45 raek: sritchie: if you want it to be sent in an HTTP response using ring, then ring already handles sequences of string so you don't need to do anything in that case

11:45 sritchie: what does the mandrill API expect? a string?

11:45 sritchie: I'm using http-kit's client interface, actually

11:45 yeah, a string

11:45 raek: then (apply str ...) it is :)

11:45 sritchie: boom, so easy :)

11:45 thanks

12:13 m09: I'm trying to use clojure.core.logic.unifier and I'd like to unify variables created at some other point in my program. When I create logic/lvars the unifier doesn't work. I have to create variables of the form ?x. Is there a way set a variable "name" dynamically or to use lvars directly during the unification?

12:49 malcolmsparks: try unifying the lvars to a single named ?x

12:50 had that problem before too

12:57 m09: thanks for the suggestion. I was investigating symbols to create programatically variables with names respecting the ?x pattern but that might be simpler :)

12:57 danielszmulewicz: gf3: gist for pushState and secretary (as promised): https://gist.github.com/danielsz/8086074

13:57 yedi: for ppl who like rap... check out this thing i made: https://gist.github.com/yedi/8080527

14:11 seangrove: yedi: It's pretty cool

14:19 yedi: seangrove: thanks! https://github.com/yedi/rhyme-finder

14:19 my first real clojure project, its been fun

14:20 its weird but refreshing to code by thinking about your input and output data first b4 thinking about the logic






14:36 Do usa&israel use chat&social communication prog(facebook&twitter) to collect informations,,,,can we call that spying!!!!

14:37 bitemyapp: it's IRC.

14:37 Everything is public here.

14:37 I don't know how that escapes people.

14:38 Fuckin' loon.

15:04 wink: bitemyapp: pssssst, just connect via SSL and all is secure!

15:05 bitemyapp: wink: right.

15:09 justin_smith: wink: to interfere with that, one would need to subvert the network infrastructure itself, and only the US government or something could do that

15:09 so that should be fine

15:10 wink: congratulations on outtrolling me, I rest my case

15:14 dotemacs: hi, i've got a little problem working out why the call to this macro works fine when calling it with an instance and a string fine, but when called in a doseq it bombs out: https://www.refheap.com/22124 If you could give a pointer, I'd be grateful, thanks :)

15:15 justin_smith: wink: oh I don't go in for that trolling stuff, I was going for old fashioned transperent iron there

15:15 *irony

15:16 wink: and I already wanted to say "it's transparent aluminium you thought about"

15:16 justin_smith: dotemacs: minor thing, do in a doseq is redundant

15:17 dotemacs: the issue is that the macro is not expanded at runtime inside the loop, it is expanded at compile time in the function body

15:18 dotemacs: also memfn is deprecated, . syntax is preferable

15:20 dotemacs: justin_smith: thanks for the pointers, regarding the 'do' fine, no problems. Regarding 'memfn' fine also. But what should I do to make it work? As in, should I create a function instead of a macro or ... what's your advice ?

15:21 mikerod: is there a way to get leiningen to stop "Compiling ClojureScript." every time anything is ran; like `lein install` or `lein test`

15:22 dobry-den: dotemacs: i think you use a function in that case

15:23 i dont know the right way but you can `eval` your string fn

15:24 dotemacs: dobry-den: i was hoping there might be another way... thanks

15:26 dobry-den: dotemacs: there probably is. im probably at your exp-level with macros, i run into that kind of issue, and my solution so far is to turn it into a func with eval

15:26 justin_smith: I think there is a way to do it with clojure.reflect

15:27 because zooming out, what you really want is to be able to find a method on an object using a dynamically constructed name

15:27 that is reflection

15:28 dotemacs: justin_smith ok, i think i started to look at that, but didn't find any examples so when with the solution i presented. I'll look into it again, thanks for the constructive tip :)

15:28 s/when/went/

15:45 whilo: justin_smith: or just a dumb ssl protocol (which weakens encryption): https://twitter.com/ioerror/status/398103261061738496

15:45 dsrx: what the hell (yes, this is somehow relevant) http://www.reddit.com/r/AdviceAnimals/comments/qqcjg/rich_hickey_y_u_no/

15:46 justin_smith: lol

15:53 whilo: i have managed to use https://github.com/openlayers/ol3 with lein-cljsbuild (defining the :libs location), but when i try to edit config.edn in pedestal by adding :compiler-options {:libs ["libs"]} to different aspects, i can get the data-ui handler running by hand-copying "libs" in the out folder.

15:54 is anybody familiar with the pedestal build process?

15:57 yedi: I keep getting "Unknown build identifier" when tryna compile with lein cljsbuild auto

16:09 coventry: Is there a better way to figure out the maximum java stack size than binary search? It's falling over with -Xss256m, which surprises me because I'm running it on a 10G vm.

16:09 (vm with 10G of ram, that is.)

16:11 justin_smith: the stack is per-thread

16:11 so I think you allocate 256xN where N is your thread count?

16:12 coventry: Ah. Thanks justin_smith

16:12 justin_smith: maybe you could also limit thread count

16:12 now that I think about it, that means that threads become more expensive the larger the stack you need

16:21 coventry: Yeah, that's interesting. I've run into a SO running lein cljsbuild, so I don't need many threads in this case, though.

16:30 egosum: hmm…I can't find a nice way to do async postgres queries/updates. Would be cool to build a library around posting updates to core.async channels, and receiving responses on other channels

16:31 cjfrisz: dotemacs: I know your question was already answered, but it inspired me to write up a gist that explains why the original macro didn't work as intended: https://gist.github.com/cjfrisz/8088647

16:31 dotemacs: cjfrisz: cool, checking it out now, thanks

16:33 justin_smith: cjfrisz: nice explanation

16:33 cjfrisz: justin_smith: thanks!

16:39 tbaldridge: http://www.infoq.com/presentations/functional-pros-cons awesome talk

16:41 coventry: Yeah, I enjoyed that.

16:43 cjfrisz: tbaldridge: That's already on the list of presentations to watch...which is probably 10+ hours at this point

16:44 Really need to set aside some time to whittle down that list

16:50 deadghost: ok just making sure I'm doing things right

16:50 I have a local dependency

16:50 it's a lein project

16:50 https://github.com/kumarshantanu/lein-localrepo

16:50 do I just use that

16:50 justin_smith: lein install is easier

16:54 lein localrepo is for things that are not lein projects and don't have pom files

16:54 lein install is the best thing if the local dep is already a lein project

16:55 deadghost: ok that's way easier

16:55 justin_smith: yeah, very simple to use

17:12 cYmen: Does anybody have sufficient lighttable knowledge to tell me how to fix this connection error: https://www.refheap.com/e943f011bb4195fde91aa5a00

17:15 justin_smith: well, something is going on with cljs, clearly

17:15 can lighttable handle cljs?

17:15 cYmen: I don't know I have never used it I'm just following this clojure web development book I just bought.

17:15 deadghost: there's a book?

17:16 s_kilk: hi all, does anyone have any experience with using the quarzite scheduler from within a ring app?

17:19 andyf: deadghost: He is probably referring to this one: http://pragprog.com/book/dswdcloj/web-development-with-clojure

17:19 cYmen: Yeah, http://pragprog.com/book/dswdcloj/web-development-with-clojure

17:20 timing

17:20 andyf: I've got a copy, and it is a decent start.

17:20 cYmen: Well, I was kind of excited to give lighttable a shot but I have no idea what to do with this error.

17:20 andyf: I don't mean that to be a criticism, just a comment that you won't come out of it being an expert Clojure web developer, but you'll be on your way.

17:21 cYmen: The tricky part with books is buying the ones that are right for you without reading them first.

17:23 edw: Re: books, it seems almost counterproductive to buy books for nascent technologies e.g. Clojurescript.

17:26 cYmen: I only buy books because I like having some guideline to follow. I almost always learn stuff faster by just diving right in.

17:27 edw: cYmen: Following along with a book at your computer was very effective for me. Also, having a Scheme REPL open as I watched the H-P 6.001 lectures gave me a huge edge over the people in the audience.

17:29 Back in my day, books (and magazines) were all you had. I learned a lot of assembly language from Nibble magazine.

17:30 cYmen: Back in your day..you're still here!

17:31 edw: Plus or minus.

17:34 danielszmulewicz: noprompt: Secretary and pushState gist (as promised): https://gist.github.com/danielsz/8086074

17:34 cYmen: Is there a good cider cheatsheet somewhere?

17:35 noprompt: danielszmulewicz: good deal. don't forget syntax highlighting :-)

17:37 edw: cYmen: Aside frmo the repo README?

17:37 danielszmulewicz: noprompt: Ha! You got me. But I selected Clojure when I edited the file. Where did that go?

17:37 edw: I printed it out and taped it on the wall.

17:37 m09: I'm looking for a way to unify different lists of terms at the same time with clojure.logic, any hint on if it's possible or not? (at the same time = share the same variables)

17:38 cYmen: edw: ah there

17:39 edw: Half the binding don't work for me.

17:39 * edw shrugs.

17:40 cYmen: Disappointing. No source and no docs for (serve ...) in a lein compojure-app.

17:40 noprompt: danielszmulewicz: you might have to go back in and add an extension.

17:41 danielszmulewicz: noprompt: Yes, that must be it.

17:51 edw: cYmen: What do you mean about `serve`'; it doesn't appear to exist in compojure at all?

17:52 TEttinger: anyone else getting 503 Service Unavailable on github ?

17:53 dobry-den: yeh

17:54 edw: That's a downer.

17:54 (Yeah, me too.)

17:56 Github's back.

17:57 dobry-den: cYmen: https://github.com/weavejester/ring-server/blob/master/src/ring/server/standalone.clj#L74

18:02 cYmen: didnt know about `compojure-app` til now but from what i looks like, its repl.clj namespace is deprecated by https://github.com/weavejester/lein-ring

18:04 * cYmen scowls.

18:04 dobry-den: nvm i think it's using https://github.com/weavejester/ring-server for easy env management

18:05 that's useful. i have a compojure app almost ready for prod and i havent yet set up some prod-specific things

18:06 was just gonna let my users read my stacktraces. hopefully theyd send git patches by mail

18:07 cYmen: After creating new projects with lein which I can run with lein ring server, how do I connect all this to emacs?

18:07 Currently I just edit and restart the server.

18:08 Or maybe the better question is, how do y'all do your editing?

18:08 dobry-den: cYmen: `lein ring server` picks up changes on reload

18:09 cYmen: "on reload"?

18:09 dobry-den: f5 in browser

18:09 my emacs is connected to a seperate nrepl process

18:09 for code evaluation

18:10 cYmen: you mean just for experimenting?

18:10 dobry-den: yeh, while im developing

18:11 cYmen: Well, that's pretty much what I'm using.

18:12 dobry-den: i guess using the repl.clj file you could launch the server in emacs repl

18:12 but i dont see off the top of my head what that would afford me over just having lein ring server running in its own tab

18:16 justin_smith: cYmen: you can start nrepl from inside your handler

18:16 that is how we do it in caribou

18:17 then you can connect to that with any of the many nrepl clients (I use nrepl.el, I guess I will upgrade to cider eventually)

18:19 cYmen: grrr

18:19 now I get an error starting cider

18:20 have there been any breaking updates recently?

18:20 dobry-den: i thought cider was the breaking update

18:20 cYmen: java.lang.IllegalAccessError: pp does not exist

18:20 dobry-den: I've used cider since the beginning.

18:21 lsdafjkl_: If I see this as a dependency "[com.facebook/react "0.8.0"]", what does that mean

18:21 where is that

18:21 danielszmulewicz: Cider is OK to install now. This time, I survived the attempt.

18:24 edw: cYmen: This seems to happen when dependencies transitively depend on older Clojure versions (< 1.3?); I have perhaps successfully handled this by making sure my clojure dependency is the final dependeny in my project.clj file. This is merely my somewhat-informed conjecutring.

18:24 justin_smith: cYmen: I think pp is in the cl package

18:24 oh wait, that was a java problem

18:24 n/m

18:24 edw: justin_smith: pp's in clojure.pprint.

18:24 justin_smith: yeah, my bad

18:25 the emacs cl package has its own pp :)

18:25 edw: Let of cross polination between Clojureland and Emacsistan...

18:25 s/Let/lot/

18:26 np: I need to migrate from Clojure 1.2 to 1.5. I'm thinking of adopting the new libraries first (the ones which replace contrib), and the migrating over.

18:27 But I'm not sure if the new libraries are compatible with 1.2.

18:27 For example, can I replace contrib.json with clojure.json?

18:27 cYmen: "Symbol's function definition is void: ...." what?

18:28 justin_smith: cYmen: I have not had success with cider, I don't think it is stable

18:28 that error message is emacs-ese for "nobody defined this function but somebody tried to call it"

18:28 cYmen: I know, the relevant part was that the function was cider-repl-set-ns

18:28 and this worked before

18:29 justin_smith: heh

18:30 lsdafjkl_: Sorry guys, I got it

18:30 it's all in clojars

18:30 justin_smith: lsdafjkl_: oh, I missed your question above

18:30 that vector describes a library and version

18:31 it encodes the same info that is in an mvn pom.xml file

18:31 which is used by tools like lein and maven to find and resolve dependencies for you

18:32 if you declare the dep in your project.clj lein will find it, download it, and make sure your project sees the right version at runtime

18:34 lsdafjkl_: justin_smith: thanks! I was just being confused by 'com.facebook', like it was a different location... but it was just dnolan naming the repo idiomatically

18:34 justin_smith: right

18:34 lsdafjkl_: :D

18:34 is there a way i can see how he made a javascript file a jar?

18:34 not a ton of info here https://clojars.org/com.facebook/react/versions/0.8.0

18:34 justin_smith: well, a jar file is just a zip

18:34 you can unzip it and look inside

18:35 there is also a jar command, but I just use unzip, less to remember that way

18:35 lsdafjkl_: oh cool

18:35 i'm a huge newbie when it comes to the java world

18:35 justin_smith: some editors (like vi or emacs) can open a jar as if it were a directory so you can look at the files inside without unpacking it

18:36 well not vi, I meant vim

18:36 lsdafjkl_: cool, using macvim i'll give that a shot

18:47 rads: dnolen: I noticed in the om todomvc app, there are a couple root state values (showing and editing) that get passed to the child components in different ways. for example, the "main" fn receives the app value from the parent and reads showing directly, but the editing value is extracted when om/build is called and passed as an option

18:48 since the main fn gets updated when the root gets updated, is there any difference between these two ways of passing down the data?

18:48 dnolen: rads: yep this will get sorted out at soon

18:48 rads: basically we want something similar to React prop / state distinction

18:48 arrdem: bitemyapp: how is typeclass dispatch implemented?

18:48 dnolen: rads: that doesn't currently exist

18:49 arrdem: bitemyapp: I had this "aha" moment that currying helps, but now I'm no sure

18:49 rads: dnolen: good to know, thanks

18:50 lsdafjkl_: dnolen: what command did you use to create the jar for react?

18:50 dnolen: lsdafjkl_: lein jar should work

18:52 lsdafjkl_: dnolen: Still leaving out the react folder with the deps

18:52 dnolen: lsdafjkl_: they need to be :source-paths

18:52 need to be on

18:53 Caitlin_Az: Just wondering if there was a general timeline (release schedule) for clojure? If so, version 1.6.0 (stable) might be released by...?

18:53 * Caitlin_Az is anticipating "When it's ready." ;)

18:57 arrdem: Caitlin_Az: yep. wheneer the core team thinks it's ready.

18:57 Caitlin_Az: So no release schedule posted then?

18:58 Oh, sorry.

18:58 Thanks arrdem.

19:03 edw: Lots of nice little stuff in 1.6, it seems; am I missing anything life-changingly awesome?

19:06 arrdem: edw: as->

19:07 hyPiRion: arrdem: that's in 1.5 though

19:07 arrdem: hyPiRion: ah. I should read the 1.6 changelog then :P

19:08 newblue: does anybody have experience enabling mouse dragging in a Seesaw listbox? I need to make a list of items re-orderable and rolling my own listbox from Swing's JList doesn't looks a bit harder than this needs to be

19:08 s/doesn't/just/

19:13 Mandar: newblue, never used it but have you looked at this: http://daveray.github.io/seesaw/seesaw.dnd-api.html ?

19:17 TEttinger: (inc Mandar)

19:17 lazybot: ⇒ 1

19:17 TEttinger: seesaw is wonderful

19:17 newblue: Mandar: I was looking at that but it looks like it's more for moving files around? Taking a second look at it it might(?) do what I need...it looks a little more hopeful than http://daveray.github.io/seesaw/seesaw.behave-api.html#seesaw.behave/when-mouse-dragged

19:19 andyf: Caitlin_Az: See http://dev.clojure.org/display/design/Release.Next+Planning although obviously they didn't release Clojure 1.6 by Dec 6 2013. Note that core.async, even though it works with Clojure 1.5, was developed mostly after 1.5 was released and in some ways is considered part of the Clojure 1.6 release.

19:19 TEttinger: newblue, yeah, dnd is meant for drag and dropping stuff not within your application to your app, I think -- like an image from photoshop, dragged into your image editor in swing

19:20 newblue: TEttinger: seesaw's been great, DaveRay also has a little project called Dorothy that's a bit of fun to play with

19:20 https://github.com/daveray/dorothy

19:20 justin_smith: TEttinger: it is more general than that though, it is totally valid to dnd within one app

19:20 TEttinger: justin_smith, I didn't see a widget flavor, so I was somewhat confused

19:21 justin_smith: local-object-flavor

19:21 arbitrary java object, within one app

19:21 TEttinger: ah ok

19:21 justin_smith: so it could be a widget, or it could be an atom, or a keyword

19:21 TEttinger: neat

19:21 justin_smith: whatever makes sense for your workflow

19:22 jtoy: how is it possible for this to cause an exception sometimes: (:value arm 0) , arm is always a map

19:23 I got this: Exception in thread "main" java.lang.NullPointerException

19:23 justin_smith: are you sure it is in that expression?

19:24 newblue: justin_smith: so, local-object-flavor should work to drag and drop a listbox item from the 3rd to the 5th position (assuming I get the syntax figured out)?

19:24 jtoy: justin_smith: that is the line it failed on

19:24 justin_smith: newblue: yeah, but you may not need to even set the listbox item itself as the object - you can set what the source for the drag is in the draggable thing

19:25 so it may make sense to make it a map with the data for the listbox item

19:26 the general idea is you take the thing that should be draggable, you specify what type of data it carries, and the contents, then the target must declare how it handles that type of data

19:32 newblue: justin_smith: do you know of any examples of something at least similar? it's a little unclear how or if to use default-transfer-handler to do this and I'm not finding the usual links to seesaw/test/examples to see these things in action

19:34 justin_smith: default-transfer-handler is just for debugging

19:36 https://github.com/daveray/seesaw/blob/681b2e2117e920028e865a75dbe7ed4effbca693/src/seesaw/event.clj#L204

19:36 newblue: that is an example that comes with seesaw, linked to the line with the relevant functions

19:36 *definitions

19:37 oh sorry

19:37 that is where he defines the handlers, there should be examples of using them somewhere...

19:39 https://github.com/daveray/seesaw/blob/681b2e2117e920028e865a75dbe7ed4effbca693/test/seesaw/test/examples/game_of_life.clj#L97 this one is actually an example

19:43 newblue: justin_smith: thank you, this definitely gives me something to chew on. This add-behaviors pattern is really interesting, it's never crossed my mind

20:53 ethanis: hiya folks, I just wrote a ray tracer as an example of a simple project using core.typed

20:54 but I am struggling with a few final type errors!

20:54 And I'm looking for guidance

21:05 edw: ,(let [λ 14.7] (/ 1 λ))

21:05 clojurebot: 0.06802721088435375

21:07 TEttinger: edw: ##(#(% '☃) #(= % '☃))

21:07 lazybot: ⇒ true

21:07 ncthom91: hi guys. Is this the right place for clojurescript talk as well?

21:08 TEttinger: there is #clojurescript , but that one has mostly people also in here

21:08 ask away

21:11 justin_smith: ,(take 20 (let [☃ '(❅ ❆)] (cycle (concat '(☃) ☃))))

21:11 clojurebot: (? ? ? ? ? ...)

21:12 justin_smith: &(take 20 (let [☃ '(❅ ❆)] (cycle (concat '(☃) ☃))))

21:12 lazybot: ⇒ (☃ ❅ ❆ ☃ ❅ ❆ ☃ ❅ ❆ ☃ ❅ ❆ ☃ ❅ ❆ ☃ ❅ ❆ ☃ ❅)

21:12 cjfrisz: ethanis: there's a #typed-clojure room here on freenode, and those folks should be able to help you if nobody here can

21:13 ethanis: but go ahead and just ask your question or give a link to pastebin/refheap/gist that demonstrates your problem

21:14 edw: No need for ceremony, after all this isn't #java.

21:14 ethanis: alright! sorry for the delay

21:15 justin_smith: edw: now I imagine someone on #haskell saying "sorry we can't answer that, your question isn't well typed"

21:15 ethanis: the project: https://github.com/sherbondy/rt/blob/master/src/rt/core.clj

21:15 and the gist with the remaining type errors: https://gist.github.com/sherbondy/8090910

21:18 edw: justin_smith: Reminds me of a Shit HN people say quote from Twitter.

21:19 World's biggest eye-roll: https://twitter.com/shit_hn_says/status/263945818275467264

21:21 justin_smith: "I personally have been a PHP developer since 2001, I haven't maintained any bad code"

21:22 'tis brilliant, the essence of comedy

21:23 edw: justin_smith: Not sure what's the poster is saying: "All my bad code is left unmaintained?" Lot of face-palm material tweeted on that account.

21:24 s/\?"/"?/

21:26 justin_smith: "Ironically, I most likely wouldn't hire Kernighan or Ritchie because of their poor programming style."

21:33 xeqi: cemerick: is there any known nrepl bugs around using *err*?

21:34 cemerick: xeqi: that's some pretty wide-open criteria ;-)

21:35 xeqi: heh, I've got something weird where I'm (pr-str %) the message as part of a transport function, and things written to *err* seem to be printing without quotes

21:35 logic_prog: I have [org.clojure/core.rrb-vector "0.0.10-SNAPSHOT"] in project.clj. However, when I do (in cljs/main.cljs): ":require [cljs.core.rrb-vector]", lein cljsbuild auto compiles -- however, when I load the page, goog.require complains "cannot find cljs.core.rrb-vector" <-- how do I fix this?

21:35 xeqi: so fail to be read-string on the other side

21:35 still tracking it down

21:35 cemerick: mrph

21:35 xeqi: which frontend?

21:35 xeqi: umm, I'm writing a cljs frontend

21:35 cemerick: heh

21:35 well

21:35 xeqi: and a nrepl server using sse

21:36 which is why I'm deep in there :/

21:36 cemerick: xeqi: hiredman wrote something along those lines?

21:36 that was probably synchronous xhr stuff tho

21:36 xeqi: similar, this seems to be more related to the server side though. I'll keep tracing since it doesn't ring any bells

21:36 yeah, I used that for my first prototype

21:36 cemerick: yeah, nothing here

21:37 xeqi: why isn't pr-values sufficient?

21:37 xeqi: pr-values?

21:38 ah

21:38 cemerick: xeqi: chunk of std middleware to get values across the wire in a readable way

21:39 (q @s (plan {:select [?a] :where [[_ ?a]]}))

21:39 bah

21:40 xeqi: heh, that only handles the eval results right? I'd like to get the whole nrepl-message back. eventually want to use other ops

21:40 cemerick: oh

21:40 hrm

21:41 Yeah, that's only touching :value

21:41 or whatever it's call

21:44 chrisl: so ive spent a bunch of time on 4clojure.com and i think i get things. I am however having a real rough time transitioning to actually creating a project with lein and using other libraries (mostly the later). Is there any good places that describe the package system/namespaces etc?

21:47 justin_smith: chrisl: http://blog.8thlight.com/colin-jones/2010/11/26/a-leiningen-tutorial.html this looks decent

21:49 logic_prog: ARGH :-)

21:49 how am I supposed to use https://github.com/clojure/core.rrb-vector/blob/master/project.clj from cljs ?

21:50 cjfrisz: ethanis: I gave those a look...if nobody else bites, they sound like questions for ambrosebs (although he doesn't seem to be around)

21:51 ethanis: ha, yeah, they're a little tricky!

21:51 cjfrisz: ethanis: and for some reason I thought it was clojurescript instead of normal clojure, so that makes me scratch my head a bit

21:51 er, a bit more

21:51 ethanis: yeah, it is normal clojure for now, although I will certainly be porting to cljs with the help of cljx

21:52 cjfrisz: I know when I experimented with core.typed in cljs, there were a number of things Ambrose hadn't done yet, but I that stuff should probably all work in clojure

21:52 *I think that stuff

21:52 ethanis: yeah, everything has been working splendidly with the exception of these last few cryptic errors

21:53 I think the issue might step from core typed having trouble inferring whether a sequence is empty or not, as all of the errors have something to do with my weird compound TimeIntersect/Seq type alias

21:53 cjfrisz: the only thing I can think of is that the filter and map may want a little more type annotation on the variables you're using, but I don't play with core.typed seriously enough to know how much annotation is enough

21:53 ethanis: ah, okay, will look into that as a possibility

21:54 cjfrisz: take my advice with a grain of salt, though; I'm probably am not qualified to help you with these type errors :-)

21:54 ethanis: will play with this a bit more and then ping ambrose if it doesn't work out. That's a nice guess though.

22:14 edw: TEttinger: I've only now gotten to teasing out the source of your Unicode brain teaser. Well played!

22:23 ddellacosta: technomancy: see this latest post? http://blog.fsck.com/2013/12/model-00.html

22:23 want

22:25 ncthom91: hey all, anyone here playing around with clojurescript? curious about why so much google closure boilerplate is included if my build target is node

22:27 bitemyapp: arrdem: doters?

22:27 arrdem: or DayZ?

22:28 ddellacosta: happy holidays!

22:28 technomancy: justin_smith: oh man are those c64 keycaps?

22:28 bitemyapp: ddellacosta: going to see any family or do anything?

22:28 ddellacosta: bitemyapp: happy holidays to you too sir! Thanks!

22:28 technomancy: oops I mean ddellacosta

22:28 cjfrisz: ddellacosta: don't make me freak out and want things like that

22:28 technomancy: you guys have the same color nicks

22:28 ddellacosta: bitemyapp: naw, just hanging out w/wife, but her mom is coming over for New Years

22:28 technomancy: haha, no worries...

22:28 bitemyapp: cool :)

22:29 ddellacosta: cjfrisz: yah, pretty sweet huh?

22:29 bitemyapp: yourself?

22:29 bitemyapp: ddellacosta: staying at home and working on Haskell side projects and the like, but I have good news!

22:29 ddellacosta: I have the go ahead from my company to go remote!

22:29 technomancy: plust justin_smith is talking in #emacs which is right next to this window, heh

22:29 bitemyapp: I'm making plans to visit Austin and Seattle for a few weeks apiece sometime in late winter or early spring.

22:29 ddellacosta: technomancy: to answer your question, no idea, but they look like they could be...I couldn't find out where he sourced the caps from this article but I assume he mentions it somewhere: http://blog.fsck.com/2013/12/better-and-better-keyboards.html

22:30 bitemyapp: oh, sweet...I envy you. Wife and are talking bout where to move in the U.S., and those two cities come up...

22:31 bitemyapp: ddellacosta: yeah it's basically a trade-off of Seattle's weather, trees, ocean etc. to Austin's probably friendlier culture and cheaper housing.

22:31 justin_smith: https://www.google.com/search?q=tandy+102&source=lnms&tbm=isch&sa=X&ei=Ka63Usx8zfigBNqtgZAM&ved=0CAkQ_AUoAQ&biw=1276&bih=899 I have a tandy102 that I have thought about connecting to a serial / USB convertor just to use it as a keyboard - should be possible

22:31 ddellacosta: bitemyapp: right, gotcha...can see great things about both cities

22:31 bitemyapp: ddellacosta: houses are $350-600k in Seattle vs. 120-170k in Austin.

22:31 justin_smith: runs on batteries, solid clicky keys

22:31 ddellacosta: oh wow. But still, sane compare to San Fran

22:32 justin_smith: omg do it

22:32 bitemyapp: ddellacosta: right. What surprised me was that North Carolina was roughly as expensive as Seattle, I thought it would be closer to Austin.

22:32 drewgle: ddellacosta: and 500k-zillions in DC :)

22:32 ddellacosta: huh...well, not *too* surprised at that, it's been a major computer industry and academic hub for a while I guess. I like that area too

22:32 drewgle: ugh. :-(

22:32 justin_smith: ddellacosta: the thing is pretty sweet as is too, those things are rock solid and run on AA batteries, week of usage on a recharge

22:33 ddellacosta: justin_smith: never touched one...definitely getting retro-tech lust talking to you guys

22:33 bitemyapp: ddellacosta: I mean even outside of the research triangle. You have to live in a place like greensboro to find cheap places.

22:33 drewgle: If I use deftype in one namespace can I refer/use it from another namespace?

22:33 ddellacosta: justin_smith: loving this picture: http://homepages.paradise.net.nz/tmcgavin/jpg/weather_station.jpg

22:34 drewgle: sure, why not?

22:34 justin_smith: 32 k rom, 8 line (64 pixel) display 300 baud modem

22:34 not 300k, just 300

22:34 ddellacosta: bitemyapp: ah, gotcha

22:34 nice

22:34 that'll get ya going

22:34 ncthom91: has anyone else used clojurescript lately and seen an error with setting the property Unicode on goog.string? goog.string = undefined :/

22:35 drewgle: ddellacosta: I'm getting an error: CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: ParsingError

22:35 Where ParsingError is my deftype'd class

22:37 ddellacosta: drewgle: are you importing it?

22:37 drewgle: http://stackoverflow.com/questions/3690784/how-do-you-use-a-type-outside-of-its-own-namespace-in-clojure/3691022#3691022

22:38 drewgle: (ns a.b.c (:gen-class) (:use x.y.z)) -- should import x.y.z.ParsingError into a.b.c, right?

22:38 justin_smith: drewgle: you may need to import

22:38 drewgle: OK

22:38 ddellacosta: drewgle: yah, pretty sure you'll need to import--give it a shot.

22:39 drewgle: (ns lordvarnish.varlord.cmdline

22:39 (:gen-class)

22:39 (:require [clojure string])

22:39 (:use clojure.set

22:39 lordvarnish.cmdline)

22:39 (:import [lordvarnish.cmdline ParsingError]))

22:39 haha

22:39 wrong window :)

22:39 dsapala: anyone know how to do something like '1,2,3'::int[] in sqlingvo?

22:40 drewgle: Yep, that worked

22:40 ddellacosta: drewgle: excellent. :-)

22:41 justin_smith: drewgle: yeah, that is because a deftype makes a class, and you need import to refer to classes

22:42 drewgle: Yeah, that makes total sense

22:44 dsapala: actually it's like this: SELECT * FROM "user" WHERE ("id" = any('{1,2,3}'::int[]))

23:12 xeqi: any ideas how (= text (pr-str text)) can happen when text is a string?

23:13 dee5: is there any special way for getting macros running in clojurescript, or is that not possible?

23:16 justin_smith: xeqi: given that pr-str always adds \" on each side of a string, there is now way that any string could come out of pr-str unchanged

23:18 bitemyapp: implementing tries and trees in Haskell is downright pleasurable.

23:28 ivan: xeqi: does (type text) say it's a java.lang.String?

23:28 if yes I have no idea

23:33 l1x: hey guys, i would like to log with clojure.tools.logging the function execution so i do this (info '(square 5) (square 5)) is there a better way doing this?

23:35 xeqi: ivan: yep

23:36 and apparently at this spot i can do (= "x" (pr-str "x")) and have it be true. so somethign weird is happening

23:37 ivan: (source pr-str)

23:37 chrisl: I think i am missing something fundamental here. If I require something shouldnt i be able to access the things within its namespace? ie: http://pastebin.com/idVMm3Qn If I do the same with say, clojure.strings it works

23:38 justin_smith: chrisl: is it a private definition?

23:39 chrisl: not sure, actually

23:39 justin_smith: https://github.com/oubiwann/clj-rackspace/blob/master/src/rackspace/api.clj it is coming from rackspace.identity

23:39 they are using it in that ns, and that is why you can use it when you switch to that ns

23:40 rackspace.api is just an empty ns that uses other stuff

23:40 ivan: I think rackspace.api was intended to be used but the author wrote it wrong?

23:41 justin_smith: I have no idea

23:41 it is weird

23:41 chrisl: so should I be able to

23:41 rackspace.api=> (require 'rackspace.identity) FileNotFoundException Could not locate rackspace/identity__init.class or rackspace/identity.clj on classpath: clojure.lang.RT.load (RT.java:443) ?

23:41 justin_smith: maybe they thought :refer semantics were transative between namespaces

23:42 chrisl: weird, check out the version of rackspace.api in your jar

23:42 it could be a change in the ns between what you use and the version on github

23:43 chrisl: you can use lein classpath to see where the jar is / which jar, and then open the jar with your editor or unzip it to check the code

23:44 chrisl: yeah looks a little different

23:44 let me try it, thanks

23:46 yeah they renamed it from rackspace.auth. thanks so much! saw their lib was built in clojurejars oct 2013 so thought was uptodate

23:53 xeqi: cemerick: apparently I'm in a spot were *print-dup* and *print-readably* are false

23:56 TEttinger: edw, you would love hyPiRion's swearjure

23:57 http://www.hypirion.com/musings/swearjure

23:57 xeqi: cemerick: which might make since as I'm running in a (future ...)

23:57 blah, dynamic bindings

Logging service provided by n01se.net