#clojure log - Feb 07 2014

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

0:27 jph-: arrdem, there's a clj-btc which can be used to talk to bitcoind, dogecoind, etc

0:27 arrdem: jph-: yeah I saw that floating around a few days ago. didn't know that it was just a daemon wrapper.

0:28 jph-: arrdem, yep its just for the jsonrpc protocol

0:28 does the job

0:28 means your app doesn't have to talk to the network/blockchain direct

0:28 arrdem: for some definition of "does" sure.

0:28 <offtopic> BTC under $800 WTF </offtopic>

0:28 jph-: yep

0:29 so you're thinking of something that can talk to -coin network directly

0:30 quizdr: arrdem i'd buy btc at $100 US but nothing higher :)

0:33 arrdem: jph-: yeah I was thinking about going after this for a while

0:33 http://www.reddit.com/r/dogecoin/comments/1upa5y/bounty_15_million_doge_for_the_first_person_to/

0:33 1.5MDoge is pretty reasonable for the dev time involved...

0:34 the issue is the ongoing cost of running such a thing

0:34 jph-: nice

0:34 arrdem: didn't come up with a good wat to monetize it, didn't bother :c

0:34 jph-: arrdem, yeh im working on a web-based wallet for doge, but just using dogecoind as backend

0:34 i'd far prefer a lighter-weight dogecoind

0:35 seems like only bitcoin has good alternatives to bitcoind

0:35 arrdem: which really isn't surprising given the distribution of value and traffic among altcoins

0:36 most of them are entirely graveyards or ponzi schemes.

0:36 see the altcoin "create, premine, publicize, dump" cycle...

0:36 jph-: yep

0:44 dissipate: arrdem, i'm going to launch ClojureCoin

0:46 arrdem: dissipate: why.... we already have the only memecoin that'll matter....

0:47 dissipate: arrdem, which is?

0:47 arrdem: dissipate: doogecoin

0:47 dissipate: arrdem, you mean dogecoin?

0:47 quizdr: ,(attractive-price? (bitcoin? $US1))

0:47 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: attractive-price? in this context, compiling:(NO_SOURCE_PATH:0:0)>

0:47 quizdr: ah indeed, we need clojurecoin to fill the gap

0:48 arrdem: see... the issue with all the coins is one of adoption. BTC made it big in no small part because of the construction of the Silk Road and successors.

0:49 Dogecoin is the only other coin which has anywhere near as much use, thanks to the tipping culture which has grown on reddit and twitter

0:49 TEttinger: go online crime! woo

0:49 arrdem: TEttinger: hence why I'm not operating an exchange T_T

0:50 quizdr: i have read that bitcoin introduced encryption technology that will change the world, even if that currency fails

0:50 arrdem: yeah wherever bitcoin goes, the blockchain model is really really interesting and has a lot of value.

0:51 dsrx: so were these people with bitcoin apps on their phones really storing a 14+GB file on them?

0:51 arrdem: oooh yeah

0:52 dsrx: dang

0:52 arrdem: hence the rise of "light" web clients.

0:52 TEttinger: brb making Silk Doge. such drugs. very porn. wow.

0:52 dissipate: dsrx, nope. the mobile bitcoin wallets use light versions of the blockchain download.

0:52 * arrdem ponders the acceptability of making porn jokes in #clojure

0:52 TEttinger: I was trying to think of what else could be illegally traded on silk road

0:53 I guess credit cards?

0:53 arrdem: TEttinger: radio jammers and high power radios were another item...

0:53 TEttinger: credit cards... fake IDs... real IDs...

0:53 quizdr: hey guys anyone with good Javascript experience comment if a lot of lisp techniques (aside from macros) are idiomatic in JS? Having functions as a first-class function seems to make JS very lisp-like in some ways.

0:53 arrdem: TEttinger: controlled printers...

0:53 dissipate: dsrx, in fact, the only major bitcoin wallet that downloads the whole blockchain is the 'official' satoshi client

0:53 TEttinger: arrdem how... do you know this...

0:54 dissipate: quizdr, javascript came from scheme

0:54 quizdr: arrdem i didn't know they let you guys still have internet access in the joint

0:54 arrdem: TEttinger: my introduction to CS was computer security. you meet interesting people at defcon, who get more interesting as they get drunk...

0:54 * TEttinger ponders the acceptability of arrdem in #clojure

0:55 quizdr: dissipate i'm wondering if it is worth trying to refactor some lisp code into javascript or if that is a waste of time?

0:55 arrdem: TEttinger: man that's harsh... I'm usually pretty judicious with all this crazy :P

0:55 TEttinger: but why the radio jammers?

0:55 haha

0:55 dsrx: what flavor of lisp quizdr?

0:55 quizdr: either clojure or common lisp code

0:55 arrdem: TEttinger: they aren't FCC legal even to build let alone sell.

0:55 TEttinger: you're quite acceptable. such accept. wow.

0:56 dissipate: quizdr, clojurescript

0:56 * quizdr accepts arrdem for who he is and doesn't hold it against him.

0:56 arrdem: TEttinger: think about all the "interesting" things you could do if you could shut down all radio based tech in a 100yrd sphere.

0:56 quizdr: dissipate ah that's an idea. and it compiles down into "normal" javascript that could run in any javascript engine, like V8?

0:56 TEttinger: like police and security radios... ah.

0:57 arrdem: TEttinger: ooh yeah. let the antisocial fun begin...

0:57 TEttinger: that could be very dangerous, I can see why silk road would trade in it

0:57 dissipate: quizdr, yep!

0:57 arrdem: PSA: while I'm aware of all this crazy stuff I'm very much a white hat when it comes to security and the dark side of things

0:58 quizdr: dissipate interesting; I wonder if there is any reason to *not* write directly in JS and just use CLJS instead? are there things raw JS can do that CLJS cannot?

0:58 TEttinger: I'm a no hat, so no worries

0:58 alternately, silly hat

0:58 * arrdem doffs his white & black fedora, resumes his usual propeller beanie and goes back to work

0:58 dissipate: quizdr, clojurescript is a better language. that's the main reason.

0:59 quizdr, it has interop with javascript

0:59 quizdr: dissipate i mean are there anything in JS that CLJS cannot do?

0:59 arrdem: quizdr: no. cljs can refer to arbitrary js functions as though they were cljs fns and use them accordingly.

1:00 quizdr: so if you want to use raw js code or raw js insanity you can.

1:00 dissipate: quizdr, nope. it has interop, so you can call JS functions from clojurescript.

1:00 quizdr: what type of compiler do you use to get from CLJS to JS for purpose of embedding in a webpage or other code that requires JS?

1:01 dissipate: quizdr, the cljs compiler

1:01 quizdr: I find it a bit odd that the OReilly book on CLJS is only a hundred pages. I love OReilly books but they are usually quite dense and comprehensive.

1:02 dsrx: a hundred page book might be very dense indeed

1:02 rplaca: quizdr: that book is a quick start for folks who already know CLojure

1:02 quizdr: ah ok

1:02 i wonder how it speaks to those who don't already know JS quite well?

1:04 rplaca: I read it when Stuart wrote it, but I remember it mostly being about logistical and setup issues (i.e., how does all the tooling work? how do you get a repl connected? etc.)

1:04 but I may remember that because that was the part I needed to know at that point :)

1:04 quizdr: rplaca is it fairly straightforward for a cljs compiler to co-exist in emacs with the clojure compiler?

1:05 arrdem: quizdr: yes, cljs and clj don't really get in each-others way.

1:06 quizdr: so the compiler will just spit out a file of javascript code? that's pretty neat.

1:06 rplaca: quizdr: sure, you just use leiningen for both, really

1:06 (at least I do)

1:09 quizdr: is there a REPL in cljs? not sure how that would work.

1:09 arrdem: quizdr: not really for exacly the reasons you're thinking of.

1:10 quizdr: right

1:11 arrdem: quizdr: IMO this is entirely an issue of cljs not being self-hosting and could be remedied... but that's a long way off.

1:11 quizdr: in the meantime there are tools that let you recompile your code and reload it in a sem-live browser.

1:14 quizdr: Since you can now use Qt to design desktop and mobile apps in Javascript, I am tempted to start using cljs to build these desktop apps instead.

1:20 arrdem: that's not far off of what Light Table does...

1:21 quizdr: what GUI kit is light table using?

1:22 arrdem: it isn't. it's HTML in a stripped down web browser.

1:22 AFAIK

1:22 quizdr: i see. it looks great.

1:23 Raynes: quizdr: quizdr https://github.com/rogerwang/node-webkit

1:23 much quizdr; wow

1:25 quizdr: nice

1:26 anyone have good experience mixing cljs with jquery?

1:26 arrdem: $google github clojurescript jquery

1:26 lazybot: [ibdknox/jayq · GitHub] https://github.com/ibdknox/jayq

1:27 quizdr: wow fascinating!

1:30 Raynes: Quick, someone show him the moving pictures! :P

1:30 clojurebot: Titim gan éirí ort.

1:30 Raynes: quizdr: But yeah, from what I've heard, Chris Granger has been very satisfied with node-webkit.

1:32 quizdr: did someone say something about a MOVIE ?!

1:32 Raynes: Hehe

1:33 quizdr: it has been somewhat of a paradigm shift that such a major UI framework like Qt is now handled mostly by Javascript underneath, and I think it is similarly life-changing if I use clojurescript to work in that environment.

1:33 * arrdem is sad that Javascript rather than Lua is winning the embedding wars

1:34 * Raynes is just sad that arrdem is sad.

1:34 * quizdr is totally happy

1:35 arrdem: Raynes: http://i.imgur.com/zrdvT.jpg

1:36 * Raynes snickers

1:38 deadghost: https://github.com/magomimmo/modern-cljs

1:38 anyone done these?

1:38 just want to get an estimate of how long it'll take to run through

1:40 quizdr: who authored clojurescript initially? how did it come about, and when?

1:40 noonian: rich hickey i think

1:41 Raynes: Various folks at Relevance.

1:41 quizdr: interesting indeed. i'm going to read up on it. i was just reading how to manually code up implementations of partial and reduce in JS, I'd guess under the hood clojurescript is doing all taht

1:41 Raynes: You can look at the early commit logs to see who all worked on it.

1:48 quizdr: i'm looking at a commit where fogus added partial to clojurescript. the implmenentation in cljs is the same as the source from a clojure repl. i quite understand why that kind of thing would need reinvention.

1:48 i mean, i *don't quite understand...

1:51 unless cljs is not directly connected to clojure at all, then that would make sense. an entirely separate implementation of the same clojure api functions

1:53 arrdem: quizdr: at the moment clojurescript and clojure's compiler backends are entirely disjoint

1:53 quizdr: hence the need for such duplication

1:53 quizdr: ah, here we go: https://github.com/clojure/clojurescript/commit/c535d501108ba24f62395f416b498975969af785

1:53 the actual println implemention of fn that leads to js function()

1:54 i have to admit i'm more than a little blown away at what has been achieved here.

1:55 arrdem: shrug. as with most language implementations there's little truly "new" and a lot of reinvention, which is interesting in its own right.

1:57 quizdr: i know but the scope and concept of the project are quite vast and innovative, I think. really very intriguing.

2:00 i'm confused where Google Closure comes into play. It seems one thing for the cljs compiler to output js. that should be enough on its own. What does Google Closure add to the mix?

2:01 arrdem: $google google closure compiler about

2:01 lazybot: [Closure Compiler - Google Developers] https://developers.google.com/closure/compiler/

2:01 arrdem: quizdr: there's a trend here. here's a hit. google first.

2:02 quizdr: what I meant was, wouldn't the implementation of clojurescript already have ideal js behind it?

2:03 arrdem: ... what? no. why bother duplicating the effort of google closure and write a custom optimizer for the JS emitter when one could simply emit naive code and rely on gclosure to clean up the mess.

2:04 quizdr: i see. i just found this interesting discussion: https://groups.google.com/forum/#!topic/clojure/WwocFhk45us

2:09 arrdem: this thread makes me want to get beer, get irrisponsably drunk and generally mock the OP.

2:09 Raynes: arrdem: In.

2:09 quizdr: ha ha

2:10 it is rather insightful for a newbie to read the responses however

2:10 arrdem: Raynes: dogecoin is $1.18/KDoge. how much is beer for you? I'm buying.

2:10 Raynes: lol

2:11 arrdem: https://groups.google.com/d/msg/clojure/WwocFhk45us/1wPj3kuKyIMJ

2:11 Raynes: arrdem: Can you wait 361 days?

2:11 arrdem: clojurebot: rhickey is I'll make sure you get a refund then

2:12 Raynes: oh. right. I'm not the youngest person here.

2:12 * arrdem feels bad.

2:12 arrdem: Raynes: happy belated birthday tho

2:12 Raynes: Well, I can get booze. You just can't buy it for me.

2:12 Aw thanks <3

2:13 arrdem: (context) https://groups.google.com/d/msg/clojure/WwocFhk45us/1wPj3kuKyIMJ

2:15 https://groups.google.com/d/msg/clojure/WwocFhk45us/svpal4UEXcEJ STFU show me code hahaha

2:16 quizdr: looks like rich owned him in that thread

2:16 Raynes: No. No no no.

2:17 Rich *pwn'd* him.

2:17 Specifically. Has to have the p.

2:17 There was some burn ward level stuff going on that thread.

2:18 arrdem: http://i.imgur.com/opvEg.gif

2:18 quizdr: well, i don't know what pwnd means, so i'd say... yo son that dude got OWNED!

2:19 Raynes: quizdr: http://knowyourmeme.com/memes/owned-pwned

2:21 quizdr: man i must be the oldest guy in the room, maybe

2:22 fredyr: quizdr: how old is that

2:22 quizdr: 30s

2:23 fredyr: well maybe you're not then

2:23 Raynes: Goodness grandpa!

2:23 fredyr: :S

2:23 quizdr: i feel like it often!

2:23 i wonder what the average age in here is. i'd guess upper 20s?

2:24 Raynes: Don't worry guys, I'll only be young and classically handsome for another two decades or so.

2:24 fredyr: raynes is the one bringing down the average

2:24 everybody else is over 30

2:24 :p

2:25 Raynes: I don't think that's how averages work :P

2:25 fredyr: orly?

2:25 quizdr: ha ha, well we could always throw out the hi and low extremes

2:26 * arrdem tries to remember if clojurebot is sandboxed by channel

2:26 * quizdr reminds arrdem that clojurebot is open source. then he wonders if that even matters for arrdem's curiousity.

2:26 arrdem: ,(swap! age-atom #(+ %1 21))

2:26 clojurebot: 21

2:27 arrdem: evidently it isn't.

2:27 fredyr: quizdr: did you mask your age by saying you're in your thirties?

2:27 quizdr: aka 39

2:27 quizdr: i could be 39. i might also be 30.

2:27 ha ha ha.... (evil laugh)

2:27 Raynes: Could be a vampire.

2:27 * arrdem ponders how to do this best...

2:28 Raynes: You think you know someone.

2:28 arrdem: ,(reset! age-atom {:ages 21 :agec 1})

2:28 clojurebot: {:agec 1, :ages 21}

2:28 quizdr: you know who looks really young for his age, the author of this fine language. must be his intellectual vigor keeping him fresh. i'm a true believer of that.

2:28 arrdem: ,(defn age-avg [] (let [{:keys [agec ages]} @age-atom] (/ ages agec)))

2:28 clojurebot: #'sandbox/age-avg

2:28 fredyr: or the hammock

2:29 quizdr: true dat

2:30 arrdem: ,(defn age+ [age] (swap! age-atom #(-> %1 (update-in [:agec] inc) (update-in [:ages] + age))))

2:30 clojurebot: #'sandbox/age+

2:30 arrdem: ,(age+ 21)

2:30 clojurebot: {:agec 2, :ages 42}

2:30 arrdem: ,(age-avg)

2:30 clojurebot: 21

2:30 * arrdem bows and lets voting begin

2:32 fredyr: ,(age+ 36)

2:32 clojurebot: {:agec 3, :ages 78}

2:33 fredyr: :-/

2:34 quizdr: fredyr nice age, i dig it.

2:34 ,(age+ 36)

2:34 clojurebot: {:agec 4, :ages 114}

2:34 fredyr: :)

2:34 arrdem: yall can /msg the bot... no need to let me add your ages to my growing database of nicks, real names, GH profiles and IPs...

2:35 edbond: ,(age+ 31)

2:35 clojurebot: {:agec 5, :ages 145}

2:35 edbond: ,(age-avg)

2:35 clojurebot: 29

2:35 quizdr: are we all a bunch of geeks or what. "what did you do on irc today? oh, watched this guy code up an average age algorithm using the bot's mutable structures, then we all called it with our ages"

2:35 arrdem: Raynes: below average w000

2:35 Ember-: ,(age+ 32)

2:35 clojurebot: {:agec 6, :ages 177}

2:36 arrdem: quizdr: the swee thing is that it "just worked" on my fist cut.. live coding ftw.

2:36 quizdr: (inc arrdem)

2:36 lazybot: ⇒ 17

2:36 edbond: (inc arrdem)

2:36 lazybot: ⇒ 18

2:37 arrdem: holy crap it's only 1:29 and I've alreay gotten two karma... if this trend continues I'll outdo technomancy by day's end! :P

2:37 quizdr: "sweety, did anything else happen on irc than just that?" -- "oh, yeah. the guy who masterminded it called for praise, and we all obliged most willingly."

2:37 Ember-: (inc arrdem)

2:37 lazybot: ⇒ 19

2:37 * arrdem cackles evily

2:37 Ember-: you deserve it, simple and elegant solution to a pressing problem: the average age of ppl on this channel :)

2:38 quizdr: what's fascinating is that it is immune to voter fraud in every way.

2:38 arrdem: quizdr: not at all... negative ages... someone reset!ing the counter...

2:38 Ember-: I said simple and elegant, not foolproof :P

2:38 arrdem: Ember-: sure, but quizdr said it was nigh perfect :P

2:39 * quizdr was very sarcastic

2:39 Ember-: hehe

2:39 quizdr: the most obviousl form of voter fraud is just voting more than once, of course.

2:41 arrdem: (let [better-age-atom (atom @age-atom)](defn age-avg [] (let [{:keys [agec ages]} @better-age-atom] (/ ages agec)))(defn age+ [age](if (and (< 0 age) (> 120 age))(swap! better-age-atom #(-> %1 (update-in [:agec] inc)(update-in [:ages] + age))))))

2:41 damnit. forgot the ,

2:41 ,(let [better-age-atom (atom @age-atom)](defn age-avg [] (let [{:keys [agec ages]} @better-age-atom] (/ ages agec)))(defn age+ [age](if (and (< 0 age) (> 120 age))(swap! better-age-atom #(-> %1 (update-in [:agec] inc)(update-in [:ages] + age))))))

2:41 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-atom in this context, compiling:(NO_SOURCE_PATH:0:0)>

2:41 arrdem: ,@age-atom

2:41 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-atom in this context, compiling:(NO_SOURCE_PATH:0:0)>

2:42 arrdem: ,(age-avg)

2:42 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-avg in this context, compiling:(NO_SOURCE_PATH:0:0)>

2:42 arrdem: yep. sandbox ticked.

2:42 quizdr: ,(dec arrdem)

2:42 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: arrdem in this context, compiling:(NO_SOURCE_PATH:0:0)>

2:42 arrdem: forgot about that.

2:42 quizdr: lol

2:44 Raynes: arrdem: You know github obfuscates email addresses.

2:44 piranha: dnolen: maybe I should make this an email, but didn't catch you yesterday - so do you have any ideas in mind about making something a-la join? :) There is no way right now to get a cursor of more than one key... Or maybe I should just write a cursor implementation myself (so that I could have select-keys working, or something like that)?

2:45 arrdem: Raynes: cute... but I see no reason why someone couldn't defeat it if they cared enough...

2:46 Raynes: You could use githubthrowaway@arrdem.com

2:47 arrdem: Raynes: I said cute. I didn't say that I cared :P

2:51 ddellacosta: piranha: you realize that it is 3:00 am in NYC?

2:51 piranha: ddellacosta: haha, not really :)

2:51 ddellacosta: OTOH David's been active on GitHub just now

2:51 ddellacosta: piranha: problem why he wouldn't respond is all. ;-)

2:51 piranha: oh, well, I take it back then...

2:53 quizdr: if serializing some data structures to a file for easy reading back in, would you use spit in combo with something like print-str? like (spit "file.txt" (print-str some-var)) ?

2:53 ivan: that's the backup dnolen who doesn't IRC

2:54 ,(print-str {"hello" "world"}) ; quizdr

2:54 clojurebot: "{hello world}"

2:55 ivan: ,(pr-str {"hello" "world"})

2:55 clojurebot: "{\"hello\" \"world\"}"

2:55 arrdem: quizdr: clojure.tools.reader. use it.

2:56 quizdr: ah, so pr-str is the best way.

2:57 arrdem why isn't clojure.tools.reader listed on this page of namespace: http://clojure.github.io/clojure/

2:57 arrdem: quizdr: because it isn't part of the core, it's a library.

2:57 quizdr: this is what you really want. http://clojure.github.io/clojure/clojure.edn-api.html

2:58 are you serious. edn doesn't have a writer.

2:58 * arrdem grumps some

2:58 arrdem: quizdr: pr-str is apparently your tool..

2:58 quizdr: right, so if i'm spitting it's pr-str. if i was to bind *out* to a file instead, i could just use pr itself, right?

2:59 arrdem: no....

2:59 ,(class (pr-str {:my {:complicated :datsastructure}}))

2:59 clojurebot: java.lang.String

2:59 arrdem: you want to to (spit "filename.edn" (pr-str {}))

3:00 quizdr: I'm saying pr vs pr-str ; the former if i write to the file by rebinding *out*, the latter if I don't and just spit.

3:00 ivan: quizdr: bind *out* to a writer

3:00 dissipate: arrdem, why is edn a subset of clojure data?

3:00 ivan: quizdr: then yes

3:00 seangone: are we still computing average ages?

3:01 arrdem: seangone: no the bot's sandbox gc'd and killed my atom

3:01 s/gc'd/cycled/

3:01 rplaca: seangone: you and I should drive that average up :)

3:01 seangone: too bad... I was going to ,(age+ 51) :)

3:01 arrdem: I mean... I'

3:01 seangone: nearly 52 :)

3:02 * arrdem digs for the code

3:02 arrdem: ,(let [better-age-atom (atom {:agec 0 :ages 0})](defn age-avg [] (let [{:keys

3:02 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

3:02 arrdem: [agec ages]} @better-age-atom] (/ ages agec)))(defn age+ [age](if

3:02 (and (< 0 age) (> 120 age))(swap! better-age-atom #(-> %1 (update-in

3:02 [:agec] inc)(update-in [:ages] + age))))))

3:02 rplaca: seangone: maybe by the time you get to be my age, you'll understand Clojure :)

3:02 arrdem: fak

3:03 seangone: lol

3:03 arrdem: ,(let [better-age-atom (atom {:agec 0 :ages 0})](defn age-avg [] (let [{:keys [agec ages]} @better-age-atom] (/ ages agec)))(defn age+ [age](if (and (< 0 age) (> 120 age))(swap! better-age-atom #(-> %1 (update-in [:agec] inc)(update-in [:ages] + age))))))

3:03 clojurebot: #'sandbox/age+

3:03 arrdem: open season.

3:03 ,(age+ 21)

3:03 clojurebot: {:agec 1, :ages 21}

3:03 arrdem: ,(age-avg)

3:03 clojurebot: 21

3:03 seangone: ,(age+ 51)

3:03 clojurebot: {:agec 2, :ages 72}

3:04 seangone: :)

3:04 quizdr: ,(age+ 36)

3:04 clojurebot: {:agec 3, :ages 108}

3:04 seangone: c'mon rplaca !

3:04 quizdr: i think i can recall at least 3 others that were previously entered

3:04 arrdem: ivan: oi. vote.

3:05 rplaca: I anonymized it, so you'll have to figure it out :)

3:05 arrdem: haha

3:05 ,(age-avg)

3:05 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-avg in this context, compiling:(NO_SOURCE_PATH:0:0)>

3:05 arrdem: (dec clojurebot)

3:05 lazybot: ⇒ 31

3:05 arrdem: stupid sandbox...

3:05 quizdr: it's a solid effort anyway.

3:06 rplaca: I guess my true age was lost to the sandbox :)

3:06 arrdem: I've done all I can do short of kick off a sandboxed nrepl instance or write a webapp...

3:06 dissipate: can someone explain why edn is only a subset of clojure data?

3:07 arrdem: dissipate: which specific structures are you pointing to which aren't represented/

3:07 dissipate: records?

3:07 rplaca: dissipate: one reason is that it's meant to work cross-language

3:08 dissipate: arrdem, i don't know, i was just reading this: Reads data in the edn format (subset of Clojure data):

3:08 arrdem, from the 'read' function

3:08 arrdem: dissipate: the reason is that some things which we would _want_ to serialize to EDN don't make sense in other languages.

3:08 dissipate: for instance the clojure reader supports fn literals

3:09 dissipate: which makes no sense if you're reading from Python, Java or god forbid PHP

3:09 dissipate: arrdem, i thought it was easy to serialize everything in clojure because everything is a value?

3:09 quizdr: you could serialize a function you've already written that is now bytecode, you mean? or you mean the reader can read in a function defn

3:09 dissipate: arrdem, everything in clojure is an s-expression

3:09 arrdem: quizdr: I mean that the reader can "read" a #() form, generate the implicit IFn and go from there

3:09 dissipate: arrdem, all you need to do is build a reader in another language that translates clojure s-expressions

3:09 arrdem: ,(pr-str println)

3:09 clojurebot: "#<core$println clojure.core$println@153c9c7>"

3:10 ssafejava: clojurebot: botsnack

3:10 arrdem: dissipate: ... as shown above we don't pr-str to source

3:10 clojurebot: Thanks! Can I have chocolate next time

3:10 arrdem: dissipate: besides much of the source (see core) doesn't make sense to pr-str

3:10 quizdr: obviously if you serialzed that to a file, it would not be useful when read back in unless it already was defined and compiled, right?

3:10 arrdem: quizdr: bingo

3:10 so serializing fns and object instances is only _rarely_ sane.

3:10 dissipate: arrdem, everything except the actual built-ins are s-expressions, no?

3:11 arrdem: dissipate: eh... only until they hit the reader

3:11 ,(pr-str (fn [x] (inc x)))

3:11 clojurebot: "#<sandbox$eval72$fn__73 sandbox$eval72$fn__73@dd7404>"

3:11 arrdem: ,(source (fn [x] (inc x)))

3:11 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol>

3:11 arrdem: ah crap.

3:11 dissipate: arrdem, so it's all a big lie. clojure has problems serializing just like any other language.

3:12 arrdem: ,(defn demo [x] (inc x))

3:12 clojurebot: #'sandbox/demo

3:12 arrdem: ,(pr-str (source demo))

3:12 clojurebot: Source not found\n"nil"

3:12 arrdem: lolz

3:12 dissipate: sorta kinda

3:12 dissipate: edn is a sane subset of standard datastructures which would be sane in other languages as well

3:13 dissipate: maps, vecs, sets, UUIDs, dates... numbers... the things you should be sending

3:13 dissipate: arrdem, and what is the 'native' function for serializing s-expressions?

3:13 arrdem: *sending

3:13 dissipate: sexprs don't really exist in Clojure at all beyond the reader.

3:13 dissipate: arrdem, if i want to store arbitrary clojure to a flat file, then what?

3:13 arrdem: dissipate: you're pretty much hosed.

3:13 cark: what would be a good workflow when evolving a lib at the same time as the application that uses it ? can't be storing in local repository and restarting lein ... so what do you guys do ?

3:14 arrdem: dissipate: such a thing doesn't really make sense... that said I did write a library which does this :P

3:14 $googe arrdem sad github

3:14 cark: i tried symlonks, but git goes through these, could .gitignore but that seems cumbersome

3:14 arrdem: $google arrdem sad github

3:14 lazybot: [arrdem/sad · GitHub] https://github.com/arrdem/sad

3:14 ivan: edn is a plot to get HAMT maps and sets into other languages

3:15 dissipate: arrdem, did you watch stuart holloway's video on clojure where he called out other languages for bad serialization techniques?

3:15 arrdem: cark: keep both somewhat seperated in the same dir tree?

3:15 cark: src/myfoo/lib/ and src/myfoo/app/

3:15 dissipate: can't say I have

3:16 cark: arrdem: right, but then i have a single project with both ? That's actually what i've been doing all these years

3:16 arrdem: cark: you could totally use soft symlinks to get the same effect...

3:16 cark: but yeah I don't know of a really better solution TBH.

3:17 srreh.

3:17 cark: that's what i tried this time...and i'm not really fond of that either

3:17 i thought maybe someone had a great workflow =)

3:18 quizdr: I'm doing this: (use '[clojure.java.shell :only [sh]]) and I can then do (sh "ls") and it works, but that is all I can do. I can't even do this: (sh "echo $PATH") anyone have an idea?

3:18 it just says no such file or directory

3:19 rplaca: quizdr: sh really isn't spawning a shell, iirc, it's just execing the process

3:19 dissipate: arrdem, damn, now i can't find the video. :(

3:19 rplaca: so: no variable expansion

3:20 quizdr: rplaca oh ok

3:23 rplaca: btw, if you're doing command spawning, I find that https://github.com/TheClimateCorporation/java.shell2 is a better choice

3:25 quizdr: rplaca interesting

3:42 jph-: rplaca, nice, bookmarked

3:43 clgv: there is also "conch"

3:48 muhoo: cark: try using checkouts. c.f. leinimgen docs

3:49 gack leiningen docs (tablet keyboard. such suck. wow.)

3:50 clgv: for building projects using leiningen checkouts there is lein-checkouts btw ;)

3:56 cark: muhoo: i'll investigate that

3:59 borkdude: is anyone using stash here and has clj highlighting configured? it doesn't seem to work out of the box in 2.10

3:59 cark: muhoo: looks like exactly what i was looking for

3:59 muhoo: thankls

4:21 greywolve: does anyone know what the performance implications of using ^:dynamic on a function defn are?

4:25 clgv: greywolve: the same as for other dynamic variables I guess.

4:26 greywolve: depends on the frequency you call it and how long the function itself runs

4:26 greywolve: (defn ^:dynamic db

4:26 [& [name]]

4:26 (d/db (if name

4:26 (conn (database-uri name))

4:26 (conn))))

4:26 clgv: greywolve: provided the function runs long enough you wont notice

4:26 greywolve: would be used for getting a datomic connection, so we can mock it

4:27 clgv: greywolve: afaik you do not need a function to be declared :dynamic - there is `with-redefs`

4:27 greywolve: yeah but thats visible on all threads

4:27 i want thread local bindings

4:29 clgv: is it really visible on all threads outside the scope of with-redefs? the docs are not that specific

4:30 greywolve: "Temporarily redefines Vars while executing the body. The

4:30 temp-value-exprs will be evaluated and each resulting value will

4:30 replace in parallel the root value of its Var. After the body is

4:30 executed, the root values of all the Vars will be set back to their

4:30 old values. These temporary changes will be visible in all threads.

4:30 Useful for mocking out functions during testing."

4:30 clgv: hmm the implementation looks like it

4:31 greywolve: yeah...

4:31 do you think there will be any issues with making that function dynamic?

4:31 clgv: but why is it important? why do you need mocking in some threads only while not in the others?

4:31 parallel testing?

4:32 greywolve: yeah, might want to do that, we'll be redesigning the system anyone to rather explicitly pass in dependencies, ala prismatic graph / stuart sierra component, but for now it would be nice to have testing not be a headache ;p

4:33 anyway*

4:34 clgv: well the db function wont be called that often in performance critical spots I guess

4:34 so you can just declare it :dynamic

4:34 greywolve: awesome, thanks for the advice

4:38 clgv: greywolve: you safety net is profiling after the change ;)

4:40 greywolve: indeed ;)

4:56 AeroNotix: https://gist.github.com/AeroNotix/1a06fdedddd8785a3307

4:56 this difference is kind of annoying, what's the reasoning behind it?

4:58 cark: it's not natural to think of strings as functions of a map

4:58 they could be function of their index for instance, returning a character

4:59 of an*

5:00 clgv: AeroNotix: it is idiomatic to put only keyword literals in front of the map. all other map accesses should be the other way around

5:01 AeroNotix: since the map is treated as function that looks up the given key in itself

5:02 AeroNotix: It just doesn't seem consistent

5:05 clgv: AeroNotix: but it is. (my-map anything) works. but keywords are special since data is modelled as maps and keywords usually are used for property names

5:06 Cr8: keywords are nice because you can compose them

5:06 AeroNotix: Cr8: exactly

5:07 Cr8: ,((comp :foo :bar) {:bar {:foo 2 :baz 3} :beep 2})

5:07 clojurebot: 2

5:07 Cr8: but maps-as-functions fit more into places where you'd right a function that's nothing more than a case

5:08 AeroNotix: ,((apply juxt :a :b :c) {:a 1 :b 2 :c 3}))

5:08 clojurebot: #<ExceptionInfo clojure.lang.ExceptionInfo: Don't know how to create ISeq from: clojure.lang.Keyword {:instance :c}>

5:08 AeroNotix: w/e

5:08 Cr8: that is, rather than (fn [x] (case x "foo" 1 "bar" 2 "baz" 3)) just write {"foo" 1 "bar" 2 "baz" 3}

5:08 &(map {1 "foo" 2 "bar" 3 "baz"} [1 2 1 2 3 2 1])

5:08 lazybot: ⇒ ("foo" "bar" "foo" "bar" "baz" "bar" "foo")

5:09 Cr8: *s/right/write

5:09 wtf brain

5:09 clgv: AeroNotix: only `juxt` not `apply` in that case

5:09 ,((juxt :a :b :c) {:a 1 :b 2 :c 3}))

5:09 clojurebot: [1 2 3]

5:09 AeroNotix: clgv: yeah I was copying from my code elsewhere which used &rest

5:09 forgot to remove

5:17 clgv: is there an option to configure the output of `pprint`

5:24 noncom: clgv: what you mean "configure"?

5:27 clgv: noncom: number of whitespaces of identation for example

5:40 quizdr: clgv check out cl-format if you want a ton of options for formatting output, it is like the format API in common lisp

5:47 noncom: clgv: afaik no, but maybe what quizdr suggest will work

6:03 clgv: ok thx

7:11 doody1: ~akka

7:11 clojurebot: It's greek to me.

7:17 sm0ke: whats the difference between doing (in-ns 'ok) vs (ns ok) on a repl?

7:20 edbond: sm0ke, I found some info about in-ns vs ns at http://clojure.org/namespaces

7:20 The "in-ns" function works almost the same as "ns", but does not load clojure.core - http://clojuredocs.org/clojure_core/1.2.0/clojure.core/in-ns

7:23 sm0ke: edbond: thanks!

7:28 TheBrayn: hi

7:33 daGrevis: hi! i'm trying to make quicksort in clj. sadly this fails on 3rd example and spits out (3 2 2 1). Any ideas? http://vpaste.net/s9PcS

7:33 TheBrayn: I wrote this little program while beginning to learn clojure: https://gist.github.com/anonymous/1af8da56680808458d7d am I using the letfn function correctly or should I use something else?

7:35 llasram: TheBrayn: How else would you use it? :-)

7:35 TheBrayn: well I'm not sure if I should use it here

7:35 llasram: That said, I honestly don't see letfn that often in real-world code, because usually you need to bind both functions and non-function values to names

7:37 TheBrayn: could it be that lein is really really slow?

7:37 running a project with this takes about 3 seconds

7:38 llasram: Spinning up a new JVM is always slow

7:38 schmir: TheBrayn: that's to be expected

7:38 TheBrayn: ok

7:38 llasram: The normal Clojure development process involves spinning up a REPL once, then doing everything in that

7:38 edbond: daGrevis, you should find lesser greater without first elem

7:39 TheBrayn: does clojure support pattern matching?

7:40 quizdr: TheBrayn like regex?

7:40 TheBrayn: like haskell

7:40 daGrevis: TheBrayn, it has multimethods

7:40 quizdr: i don't know haskell but there are a number of regex and other sequence utilities for finding things in sequences and collections

7:40 llasram: TheBrayn: There's the core.match contrib library

7:40 TheBrayn: ok

7:40 edbond: daGrevis, also < 3 branch is not needed

7:41 daGrevis: edbond, why should my code do extra job if I know that sorted [] is [] and sorted [x] is [x]?

7:41 edbond, that said, it should be s/3/2/

7:42 edbond, or even better, (= (count a) 1)

7:43 so far it works but I have no idea why it sorts list in reversed order. does concat do something i don't know?

7:44 edbond: daGrevis, yep, you should switch > and <

7:44 daGrevis: my bad, argument position in anon fn

7:44 behold, quicksort! http://vpaste.net/qbpT0

7:44 edbond: daGrevis, and using (rest a)

7:45 llasram: TheBrayn: BTW, here's what I think is a somewhat more Clojure-conventional version of your program: https://gist.github.com/llasram/91eb3e13c66062fc7585

7:45 edbond: nice done! )

7:45 daGrevis: edbond, i could put em in let do avoid double-eval

7:46 llasram: TheBrayn: Clojure tends towards kebab-/levitating-snake-case over camelCase

7:46 TheBrayn: llasram: yeah, I see that I didn't really think about some stuff

7:46 llasram: TheBrayn: And functions ending in `?` are generally predicates which return true/false

7:48 edbond: daGrevis, maybe use group-by for lesser/greater

7:48 ,(group-by #(< 5 %) [1 2 6 8])

7:48 clojurebot: {false [1 2], true [6 8]}

7:48 daGrevis: edbond, nice one! let me try it

7:48 but first things first -- gotta get some coffee

7:50 TheBrayn: llasram: why did you write not= and put the false output first?

7:50 edbond: ,(let [{l true g false} (group-by #(< % 5) [1 2 6 8])] ["Lt" l "Gt" g])

7:50 clojurebot: ["Lt" [1 2] "Gt" [6 8]]

7:51 edbond: gte actually

7:51 llasram: TheBrayn: That one isn't as agreed on as others, but is still fairly common. The idea is that it can be difficult visually to match up dangling non-initial forms when reading code, so

7:52 TheBrayn: ok

7:52 llasram: TheBrayn: you generally want to structure your code not to flow backwards indentation-wise

7:52 TheBrayn: hm that sounds reasonable

7:57 daGrevis: how can I destruct map into two vars? http://vpaste.net/E2TWf

7:57 quizdr: llasram that's an interesting suggestion, haven't heard that before.

7:57 you mean, as a way to encourage tight single forms that only have nested inside, rather than multiple branches or sequences in a (do) for example?

7:58 llasram: quizdr: I feel like I've read it written down somwhere, but I may be making things up

7:59 quizdr: yes/no. I mean, my take is that it's purely about readability. If you only have a single top-level if/cond/do/let whatever, then it's obvious where your un-indenting form belongs and what it's doing

8:00 But when you have especially nested `if`s, it can be difficult to tell for sure which `else` form is which w/o actually checking the parens

8:01 daGrevis: got it! any other qs suggestions? http://vpaste.net/ow3LG

8:06 ndunbar: before I finally give it up as a bad job - has anyone had success in using clj-soap with enumerated types as parameters?

8:06 if I had the choice, I wouldn't even be touching SOAP

8:07 using github.com/uswitch/clj-soap as base

8:18 Anderkent]away: llasram: parkour breaks my code coverage lib, I must be doing something wrong about handling protocols / reify :(

8:18 llasram: Anderkent: Yay! I mean, finding new edge cases is good, right?

8:19 Anderkent: llasram: I suppose :P But instrumentation errors are such a pain to debug

8:19 llasram: Anderkent: Is there any possibility it's a general build problem? Did you get the tests passing first?

8:20 Anderkent: the tests pass without instrumentation, yeah

8:20 llasram: Anderkent: I ask because I just set up travis for the project, and discovered I was depending on features of the next version of Leiningen

8:20 Ok, cool

8:20 Oh, that's right -- it's only the full cross-Hadoop-version test matrix which had that issue

8:21 Anderkent: I had to fix some stuff already, and I have no idea how to handle the fact that you conditionally include a namespace based on whether a class is available; I guess ignore compilation errors while instrumenting ;p

8:21 llasram: lol

8:21 Anderkent: but fixing the current errors will probably take me a while

8:21 (well actually I know how I should fix the conditional include)

8:22 llasram: Well, let me know if there's anything I can do to help. I'm actually pretty psyched that you are using it as a test-bed

8:22 Anderkent: (hook into the clojure reader rather than load the namespaces myself as I do right now; it's just that's far on the roadmap :P)

8:22 llasram: Ahhh

8:22 Anderkent: well, don't spend too much time on it, but if you can take a look at the exceptions and see if you've seen these before and what kind of error might be causing them, that might help

8:23 llasram: Send them my way and I will take a gander

8:23 Anderkent: ERROR in (test-tuple-roundtrip) (Reflector.java:271)

8:23 Uncaught exception, not in assertion.

8:23 expected: nil

8:23 actual: java.lang.IllegalArgumentException: No matching field found: key_class for class parkour.io.dsink$sink_for$reify__2941

8:23 at clojure.lang.Reflector.getInstanceField (Reflector.java:271) clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:300) parkour.mapreduce.sink$eval1664$fn__1687$G__1656__1689.invoke (parkour/mapreduce/sink.clj:11) parkour.mapreduce.sink$eval1664$fn__1

8:23 687$G__1655__1692.invoke (parkour/mapreduce/sink.clj:11) parkour.mapreduce.sink$key_class.invoke (parkour/mapreduce/sink.clj:37) parkour.mapreduce.sink$wrap_sink.invoke (parkour/mapreduce/sink.clj:74) parkour.mapreduce.sink$wrap_sink.invoke (parkour/mapreduce/sink.clj:71) parkour.io.dsink$sink_for.invoke (parkour/io/dsink.clj:59) parkour.io.avro_test/fn (avro_test.clj:59) clojure.test$test_var$fn__7145.invoke (test.clj:701)

8:23 woups

8:23 llasram: heh

8:23 Anderkent: bad me

8:23 https://www.refheap.com/34425

8:24 llasram: Oh, I know what this is, kind of

8:24 Anderkent: the thing is I don't enter deftype forms anyway, so it must be something *around* them that I'm messing up

8:24 or possibly recompilation issues

8:24 llasram: I'm doing the dnolen-style naming of private protocol functions as prefixed with '-'

8:25 But of course `.-foo` is now the field-access syntax

8:25 Clojure 1.5 throws warnings when compiling some of this because of that... It's fixed in Clojure 1.6. Let me find the ticket

8:26 This is BTW the single biggest reason I am excited about 1.6 :-)

8:27 Anderkent: Here we go: http://dev.clojure.org/jira/browse/CLJ-1202

8:28 Not sure whether your code is tickling that bug, has revealed a similar but different bug, or has this bug itself, but it's probably one of those :-)

8:30 Anderkent: llasram: wow, nice. Yeah, I'm changing (defn dseq [obj] (-dseq obj)) to (defn dseq [obj] ((do (magic) -dseq) obj)), which can possibly be hitting the same bug

8:31 llasram: Cool beans

8:31 I need to take off now, but good luck!

8:32 Anderkent: llasram: see ya and thanks again

8:36 quizdr: keep it real yall

8:38 myguidingstar: Hi all, I'm trying to make a Clojure wrapper for XDocReport. Everything works well inside Leiningen, but if I try to add :gen-class and make executable jar, it failed

8:38 the library is here https://github.com/Kaleidocs/merge

8:39 the branch for packaged jar is here https://github.com/Kaleidocs/merge/tree/packaged

8:40 Anderkent: myguidingstar: how does it fail? Can you refheap the errors

8:42 daGrevis: what would be the best way to generate big vector of random numbers?

8:42 s/number/int/

8:43 Anderkent: ,(take 20 (repeatedly #(rand-int 0 100)))

8:43 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core/rand-int>

8:43 daGrevis: i guess (repeatedly 100 #(rand-int 10)) is a way

8:43 Anderkent: oups

8:44 yeah or that

8:44 unless you have very strict performance requirements or need the numbers to be deterministicly random (i.e. control prng state)

8:45 myguidingstar: Anderkent, Exception in thread "main" fr.opensagres.xdocreport.core.XDocReportException: Null template engine. Set template engine with IXDocReport#setTemplateEngine.

8:45 daGrevis: nop, I'm okay.

8:45 i just need to test speed of my quicksort

8:46 scape_: consider using a benchmark library

8:46 daGrevis: scape_, what's wrong with time fn?

8:47 scape_: it has limits, as well GC might interfere-- depending

8:47 myguidingstar: Anderkent, I made a sample file in the 'packaged' branch, you can check it out

8:47 scape_: https://github.com/hugoduncan/criterium is popular

8:47 daGrevis: thanks, I will take a look

8:47 myguidingstar: `lein run` works while `lein uberjar; java -jar target/...` fails

8:49 Anderkent: myguidingstar: googling about a little, https://code.google.com/p/xdocreport/issues/detail?id=54 suggests it's usually because some jars are missing from the classpath - what happens if you use jar instead of uberjar, and manually specify all dpeendencies? If that works then there's something going wrong with the uberjar process.

8:51 myguidingstar: Anderkent, do you mean java -cp somefile.jar:other.jar ?

8:54 Anderkent, thanks, I'll dive into it now

9:11 katox: datomic q: is it possible to use db.fn/cas with temp-id for upserting things?

9:15 stuartsierra: katox: Datomic upsert is automatic with 'unique: identity' attributes.

9:15 katox: stuartsierra: yes, that's what I have there. It works fine without cas

9:16 stuartsierra: If I add cas into transaction I must specify an existing entity id (instead of negative tempid)

9:17 stuartsierra: if I pass a temp id the cas-ed attr behaves like nil

9:19 stuartsierra: I can see why that would happen. `cas` looks at the database *before* the transaction. Upsert happens *after* the transaction.

9:22 mdrogalis: stuartsierra: Component question. Have you come up with a naming convention for when you have more than one 'system'?

9:22 I can't find a less awkward word than <describer>Subsystem

9:23 katox: stuartsierra: so it means that there is nothing to upsert from the cas point of view, a new temp-id is assigned, cas matched, passed, then upsert is done?

9:24 stuartsierra: if that's so, it seems like a bug because the same temp-id must have different values within a single tx

9:25 stuartsierra: katox: I don't really know.

9:25 I don't think I would combine `cas` and upsert in the same transaction.

9:26 Use one transaction to assert that the new entity exists, get its id, then another to cas the other attribute.

9:26 mdrogalis: I have never encountered a situation where I needed more than one system.

9:26 scape_: why do I get this error? https://www.refheap.com/34428 when including (:require [clojure.data.codec.base64 :as base64]) in my namespace? if commented out lein repl starts and I can then uncomment and re-evaluate the ns and everything is fine then.

9:27 katox: stuartsierra: yeah, I'll probably end up doing exactly that, splitting creation and update, that works

9:27 stuartsierra: thanks for an exaplanation though, it seems logical

9:28 stuartsierra: katox: you're welcome

9:30 mdrogalis: stuartsierra: Got'cha.

9:31 I should probably just split it into multiple jars I guess.

9:31 stuartsierra: mdrogalis: I discovered that it's possible to 'merge' systems as long as your keys don't clash.

9:33 Anderkent: katox: hard to say without seeing your code.

9:34 katox: Anderkent: unfortunately not that simple I can try to simulate that on some datomic example though, if you're interested

9:35 Anderkent: katox: yeah, if you can create a repro that'd help. Otherwise maybe just post your ns form?

9:35 mdrogalis: stuartsierra: Hm, that's an idea.

9:35 I suppose there's no harm in it, really.

9:37 Anderkent: katox: what you describe sounds really bizzare, though... Do you maybe have something weird in your lein profile? :repl-options :init, maybe?

9:38 stuartsierra: Anderkent: Did you mean to address scape_ ?

9:38 Anderkent: yes

9:38 both times

9:38 ;_;

9:38 scape_: oh

9:38 :D

9:38 Anderkent: Sorry!

9:38 not sure where that came form

9:38 katox: Anderkent: nothing special in project.clj or profile, only clj-stacktrace injections

9:39 Anderkent: katox: yeah, sorry about that, ment scape_

9:39 scape_: hard to see without seeing your code! :P

9:39 *say

9:39 scape_: well once it's up and running, i can eval the whole buffer and it's fine

9:39 Anderkent: goddamnit, brain

9:39 scape_: one sec let me paste some

9:40 katox: Anderkent: ;) I'll try to reproduce that on day of datomic, I hope there is some unique identity attr ;)

9:40 scape_: refresh that link: https://www.refheap.com/34428

9:41 it's strange to me too :-\ Anderkent

9:41 oh shoot

9:41 the namespace is addressed wrong

9:41 one sec

9:41 that's probably it

9:42 well dang Anderkent I should have takena closer look :) thanks got it working now

9:52 effy: do some of you guys (girls?) could recommend some short/dense material to get up to speed with java, (just the bits of java a clojure programmer would need to know)

9:52 clgv: effy: that's mostly different parts of the standard lib

9:53 stuartsierra: effy: I always recommend the Sun/Oracle Java tutorials for that purpose.

9:53 clgv: effy: I wouldnt go and read about arbritrary library documentation. you can learn the lib when you need it

9:53 stuartsierra: They're quick, and you can pick and choose the features you need to know about (I/O, for example)

9:55 effy: ok, thanks

10:00 joegallo: effy: i always liked this book http://www.amazon.com/Just-Java-Peter-Van-Linden/dp/0130105341 but it's getting a little long in the teeth

10:02 teslanick: Wow, yeah. Java 2.

10:02 effy: joegallo: wow, a 600 pages book on java is way more than i'm willing to learn about java just to enjoy the interop from clojure

10:03 clgv: effy: we recommended this list of books to our students: http://www.uni-ulm.de/in/theo/lehre/archiv/ss-2013/pi1000.html

10:03 effy: under "Literatur"

10:03 teslanick: For zee germans

10:04 clgv: most are probably translations of english book and a few english ones are among them ;)

10:04 teslanick: I think my Java book is "Learning Java" by O'Reilly.

10:05 But that was my CS 001 textbook, so it might be a bit elementary.

10:06 effy: http://shop.oreilly.com/product/0636920027829.do This might be a bit terse, but if you're familiar with other OOP languages, it might be enough.

10:11 effy: thanks everyone, that's a lot of books guys ! i think i'm gonna go with the sun/oracle tutorials for a beginning and fallback on your suggestions if i feel a further need :)

10:15 devth: how can i make a function call on a fresh stack? would (future (somefn..)) do it?

10:17 clgv: devth: why a fresh stack? did you spoil the other? ;)

10:18 devth: clgv: essentially :)

10:18 there is a better way to solve this in the long term but this will serve as a quick hack to prevent stackoverflows

10:19 basically i'm at a very deep point in the stack, searching through a series of many hooked functions (using robert-hooke lib)

10:19 then i need to restart the search and don't care about the current context

10:19 also: just curious

10:23 clgv: just write a proper tail-recursion if you get a stack overflow for your data ;)

10:23 devth: yeah i know the "right" way to fix this, but still curious

10:23 how do you drop the current stack and start over? new thread?

10:25 borkdude: Class names must start with a lowercase letter, I'm reading now

10:26 clgv: well a new thread has a smaller stack

10:26 (require 'clojure.stacktrace)

10:26 ,(require 'clojure.stacktrace)

10:26 clojurebot: #<SecurityException java.lang.SecurityException: denied>

10:26 clgv: (future (clojure.stacktrace/print-cause-trace (Exception.)))

10:26 borkdude: funny when you take that out of context

10:26 clgv: ,(future (clojure.stacktrace/print-cause-trace (Exception.)))

10:26 clojurebot: #<CompilerException java.lang.ClassNotFoundException: clojure.stacktrace, compiling:(NO_SOURCE_PATH:0:0)>

10:27 clgv: devth: well just try the above on your repl

10:27 devth: yep

10:27 clgv: devth: but I doubt that'll help much

10:27 devth: right

10:29 tim2: Can anyone recommend a clojure specific news web site? (similar to tss, infoq etc)

10:30 borkdude: tim2 planet.clojure.in (blog aggregator)

10:33 myguidingstar: Anderkent, I tried and find out I must add a jar (fr.opensagres.xdocreport.document.odt) to classpath when exec the standalone uberjar

10:34 Anderkent: myguidingstar: right; I'd check if the files from that jar are in your uberjar. If so, then it's probably soemthing hardcoded in the lib you're using (i.e. it looks for a jar, not the contents of the jar). That'd be weird

10:34 myguidingstar: I open the uberjar and it seems to contain things found in the above jar

10:34 Anderkent: if they arent included, there's your bug - now just to figure out why :P

10:34 myguidingstar: they are included, so?

10:35 tim2: borkdude: thanks

10:35 Anderkent: eh. Not sure you can do much about that? I guess you can try and figure out why exactly it needs to be a jar, not the contents

10:35 it's an issue with the xdocreport framework, not lein

10:36 myguidingstar: sorry, I don't know the java things :|

10:36 clgv: tim2: the CLojure Mailing List

10:38 myguidingstar: Anderkent, I tried to copy all the single jar content to the standalone one but it still fails

10:39 Anderkent: myguidingstar: yeah, I can't help you there. You'd have to look at how the library you depend on is detecting the templates.

10:39 myguidingstar: that means it's the issue with xdocreport

10:39 Anderkent: yeah

10:40 myguidingstar: OK, thanks a lot. I didn't even think about adding additional jars

10:44 katox: ok, isolated

10:44 Anderkent: stuartsierra: https://gist.github.com/katox/8865082

10:46 mklappstuhl__: trying to use lein-garden but I keep getting: java.lang.ClassNotFoundException: java.nio.file.Files

10:46 I have my stylesheet in a different namespace than core but adjusted the plugin map in project.clj accordingly

10:49 clgv: mklappstuhl__: sounds as if you are running a JDK/JRE without java.nio

10:49 mklappstuhl__: clgv: I think the problem is related to the fact that the project is a cljs one

10:50 rurumate: I have a tomcat server running a ring app, now I would like to log each request (unreliably) using cassaforte cassandra client. I don't want this to affect latency, should I wrap the action with (future)? Will this create a new thread for each request?

10:50 Anderkent: mklappstuhl__: are you on java7 or java6?

10:50 clgv: mklappstuhl__: you definitely need java7 for that class ^^

10:52 mklappstuhl__: how do I figure out which version I ahve? java -v isn't a thing

10:52 rurumate: will (future) always create a new thread, or will it try to use a thread pool?

10:52 katox: mklappstuhl__: java -version

10:53 mklappstuhl__: java version "1.6.0_65"

10:53 Anderkent: mklappstuhl__: yeah, you need to install java 7

10:53 mklappstuhl__: does that mean I'm on 6

10:53 katox: mklappstuhl__: y

10:54 llasram: Or that plugin needs to fix itself to not depend on Java 7

10:55 Anderkent: llasram: yes, but one of these is something that mklappstuhl__ can do right now :)

10:56 mklappstuhl__: I guess jdk-7u51-macosx-x64.dmg sounds right, eh?

10:58 Anderkent: I wish one could just `brew install java7`, but alas no. jdk-7blahblah.dmg sounds right.

10:58 gfredericks: I decided to run my project's tests with dynalint and it tells me that I should not pass the result of keys to zipmap

10:59 mklappstuhl__: Anderkent: yeah, that would be great

10:59 gfredericks: is that an obsolete warning now?

10:59 mklappstuhl__: can anyone point me to some resource explaining how to setup a clj + cljs project?

11:00 Anderkent: gfredericks: I guess it's more that you're relying on undocumented behaviour than obviously wrong

11:00 gfredericks: but afaik it's WOG that keys order == vals order == seq order nowadays

11:00 mklappstuhl__: WOG?

11:01 Anderkent: word of god

11:01 i.e. rich

11:01 mklappstuhl__: haha

11:01 gfredericks: Anderkent: so...it IS documented then, right?

11:01 or at least will be once that patch gets accepted?

11:01 Anderkent: documented in 1.6 I think

11:01 gfredericks: so there's nothing to gain by warning about it?

11:01 mklappstuhl__: I read Rich's post but didn't completely understand it :D

11:02 Anderkent: gfredericks: I still feel like it's slightly wrong? Dunno.

11:02 gfredericks: Anderkent: in general or prior to 1.6?

11:03 Anderkent: in general. almost-not-wrong in 1.6, i suppose? I just can't see why you'd need to do it, over iterating ove rthe map normally

11:03 but I might just not be very imaginative! :P

11:03 gfredericks: The situation of "There are two ways to do X" does not imply "Let's pick one of them to be the right one and issue warnings about the other"

11:03 TimMc: gfredericks: Except for if vs. when

11:03 * TimMc runs

11:04 gfredericks: looks like ambrose added this six days ago, so maybe he knew about rich's comment?

11:04 I'll file an issue at least

11:04 Anderkent: gfredericks: but the situation of 'there are two ways to do X, and one requires an additional contractual obligation, then the one that's more generic is right and we should issue warnings about the odder'

11:04 *other

11:05 goddamnit what's with me and spelling today

11:05 gfredericks: the additional contractual obligation exists though

11:05 Anderkent: that's not relevant :)

11:05 I mean, if the contractual obligation wasn't there, it'd be WRONG

11:05 now it's just unnecessary

11:06 gfredericks: iterating over the whole map makes it less obvious what you're doing

11:06 (zipmap (keys m) (map f (vals m))) makes it obvious that I'm leaving the keys alone

11:07 Anderkent: (into {} (for [[k v] m] [k (f v)])) is pretty obvious too?

11:08 Eh, dunno. I might be making the impression that it's a bigger deal to me than it really is

11:08 but i feel like it's okay to have a warning like that

11:10 mklappstuhl__: now, after updating java everything seems to stop after Compiling Clojurescript/Compiling Garden and nothing gets compiled

11:10 Raynes: Anderkent: Maybe we should issue warnings about otters/

11:11 Anderkent: Raynes: only the other, odder otters?

11:11 Raynes: Yes.

11:11 Anderkent: utterly

11:12 devth: clgv: did some stack size exploration. it looks like future does reset the stack: https://gist.github.com/devth/8865799

11:13 Anderkent: devth: yes, futures run in a separate thread. Not sure if a fresh one or if they go to the agent threadpool

11:14 devth: Anderkent: that's what i assumed, and what i originally asked above

11:14 ambrosebs: gfredericks: obsolete warning

11:15 gfredericks: FWIW it's undocumented in 1.5.1

11:15 gfredericks: but I'm going remove it the warning anyway

11:15 Anderkent: ambrosebs: gfredericks: actually I checked and it's still not documented in 1.6.0 either :P

11:16 ambrosebs: Anderkent: I don't think 1.6 is out yet :)

11:16 gfredericks: ambrosebs: I could send a PR with those two lines deleted if you'd like

11:16 ambrosebs: gfredericks: fantastic

11:16 * gfredericks on it

11:16 ambrosebs: gfredericks: you've got a CA right?

11:18 gfredericks: nvm found you.

11:20 gfredericks: ambrosebs: I'm looking at dynalint in detail for the first time; I'm interested in how easy it is to customize

11:20 both adding custom warnings and suppressing existing warnings

11:21 warnings & errors rather

11:21 ambrosebs: gfredericks: yes. I was also thinking suppressing warnings based on regex on stack traces.

11:22 gfredericks: how do warnings relate to stack traces?

11:22 or do you mean stack traces *not* taken from actually thrown exceptions?

11:23 ambrosebs: gfredericks: so dynalint.lint/warn throws an exception and immediately catches it just for a stack trace.

11:23 you can get this with print-warning.

11:24 you might have a rule that suppresses a warning based on the stored stack trace

11:24 gfredericks: the use case being suppressing it for only one usage?

11:25 ambrosebs: say there was a trigger in leiningen that you want to suppress, perhaps at line 15 for leiningen.core.main. You might write a regex to suppress a warning if that pattern is in the stack trace

11:26 it's simplistic, but so is everything else in dynalint :)

11:27 gfredericks: dynalint was my January break from Typed Clojure, patches are very welcome at this point.

11:27 mklappstuhl: I just updated java and now every time I juse lein cljsbuild auto it is stuck at "Compiling ClojureScript."

11:29 gfredericks: ambrosebs: this sounds super fun to extensibilize, I'm gonna be noodling it

11:29 Anderkent: mklappstuhl: no other output at all?

11:29 mklappstuhl: Anderkent: none

11:30 ambrosebs: gfredericks: yep I've had too much fun so far :)

11:30 Anderkent: hm, try a clean build just in case it's something like that

11:30 gfredericks: ambrosebs: I'm also interested in ways to support multiple versions of clojure from the same codebase

11:30 ambrosebs: gfredericks: that would be preferable

11:31 gfredericks: by definition there is one dynalint version per release.

11:31 gfredericks: ambrosebs: I don't understand that second statement

11:32 ambrosebs: gfredericks: I meant dynalint depends on implementation details of clojure. each clojure release should have explicitly different behaviour in dynalint

11:32 mklappstuhl: Anderkent: that apparently fixed it for cljsbuild. not for lein garden though. but thats another issue then. thought it was related to the update

11:32 ambrosebs: eg. current version is 1.5.1 *only*

11:33 gfredericks: it'd be a might pain if that meant different release jars for dynalint

11:33 clgv: why does `sort` return an ArraySeq instead of a vector?

11:33 ambrosebs: *mighty pain

11:33 ,(doc sort)

11:33 clojurebot: "([coll] [comp coll]); Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. If coll is a Java array, it will be modified. To avoid this, sort a copy of the array."

11:34 clgv: no answer over there ;)

11:34 ambrosebs: clgv: why did you think it would return a vector?

11:34 (I was just checking the docs myself in IRC hehe)

11:34 gfredericks: ambrosebs: right, so I was saying ideally when 1.6 comes out, the next release of dynalint supports both at the same time; I assume that's what you're saying essentially too

11:34 clgv: ambrosebs: since it uses arrays under the hood anyway and it would be pretty useful to have O(1) lookups on the result

11:34 ambrosebs: gfredericks: yes

11:35 clgv: ,((sort (range 10)) 3)

11:35 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn>

11:35 gfredericks: clgv: shoving it into a vector involves copying the whole thing again

11:35 clgv: :( ^^

11:37 Anderkent: gfredericks: not sure whether o(1) lookups or o(1) head/rest are more common with sort

11:37 mklappstuhl: is there any place where I can read up on how to use cljs and clj in one project? :)

11:38 Anderkent: gfredericks: though I guess vector just aliases an array, so returning a vector from sort then doing (seq) on it has similar performance to just (sort) right now

11:38 clgv: well ArraySeq has efficient reduce but not efficient nth

11:38 it seems

11:38 `cbp: mklappstuhl: maybe a web framework's docs like pedestal or caribuou if you're doing webdev

11:39 gfredericks: Anderkent: a vector is not implemented on top of a single array

11:39 sritchie: cemerick: posted an issue with the stacktrace I get when my emacs repl starts hanging - https://github.com/cemerick/piggieback/issues/23

11:39 Anderkent: gfredericks: it is if you (vec array)

11:39 gfredericks: so converting from an array to a vector is O(n)

11:39 TimMc: Mmmm... not sure about that.

11:39 Anderkent: oh, my bad, only if array is shorter than 32 items

11:39 sritchie: cemerick: after stuff gets stuck, sometimes i can kill the thread, then manually connect from the browser, but it often takes a bunch of tries, and I have no idea what makes it all catch

11:39 novochar: How do you reason about ASTs? I've heard that a lot of can reason about their software's AST more easily.

11:39 sritchie: seangrove: are you on emacs too?

11:40 seangrove: I'm wondering if some other nrepl middleware is getting in the way...

11:40 cemerick: what editor do you use? and are you on cider?

11:40 cemerick: sritchie: yeah, that's a mostly generic nREPL interrupt exception

11:40 sritchie: using emacs+cider latest

11:40 sritchie: me too...

11:40 0.6.0alpha

11:41 calling connect manually in chrome gives me two responses, and no action in emacs

11:41 you were saying there were supposed to be three, and when a connection succeeds, the third pops up

11:42 cemerick: sritchie: does a simple cemerick.austin.repls/exec call work for you?

11:42 sritchie: let's see

11:43 yeah, that works, actually

11:43 https://gist.github.com/sritchie/8866475

11:44 that's what I've been doing to connect

11:44 cemerick: what's the difference between what I"m doing and a straight-up exec/

11:44 ?

11:44 cemerick: I have to do all that of that maybe-resolve stuff because of the AOT compilation issue

11:47 cemerick: okay, read the docs. unclear whether my existing app can connect to exec-env

11:47 cemerick: sritchie: I suspect a problem with how you're getting the generated client-side js into the page

11:47 mklappstuhl: `cbp: it seems that you can just mix them in the same directories

11:47 at lest pedestal does it partly that way

11:48 sritchie: cemerick: well, all the code's available at the chrome console;

11:48 cemerick: sritchie: exec-env just automates the start of the browser env, whether phantom or chrome or whatever

11:48 sritchie: cemerick: so if I do that, I can't send commands back to my existing, running app, right?

11:48 rkneufeld: mklappstuhl: cljx is something to look at. Maybe take a look at dnolen's mies template.

11:48 (not related)

11:49 sritchie: cemerick: about the client side - all my cljs is available at the chrome console

11:49 cemerick: and I've been manually calling that "connect" snippet

11:49 cemerick: sritchie: that's not saying much. How are you calling connect?

11:49 so you're not using the (browser-connected-repl-js) helper?

11:49 sritchie: yes, I am

11:49 but it doesn't work every time

11:49 sometimes it does,

11:50 but it's very finicky

11:50 (thanks for talking this through)

11:50 cemerick: sritchie: what do you mean by "manually calling connect"?

11:51 sritchie: like, when I load the page and the repl doesn't connect, I view the source, find the snippet, go to the chrome console and paste it in

11:51 ;goog.require('clojure.browser.repl');clojure.browser.repl.connect.call(null, 'http://localhost:53152/3337/repl');

11:51 usually that works after two pastes

11:51 and there are no errors in the console,btw, so I'm not including them in the wrong order

11:51 scape_: what would (<! (timeout 0)) do, park the go block momentarily? http://swannodette.github.io/2013/08/02/100000-processes/

11:51 sritchie: cemerick: here's my scripts section: https://gist.github.com/sritchie/8866600

11:52 tbaldridge: dnolen: is there an easy way to use the latest goog libs with cljs?

11:52 sritchie: cemerick: it's almost like if I make a call at the cljs repl in emacs,

11:52 cemerick: and then the browser tries to connect, the connection's blocked

11:52 and I have to do some thread killing and manual massaging at the chrome console

11:54 bbloom: scape_: yeah, that's basically yielding to other running routines

11:54 cemerick: sritchie: have you tried Firefox?

11:54 sritchie: is that what you develop with?

11:54 seangrove: are you on chrome?

11:54 scape_: bbloom: ok, cool. i was trying to figure out how to do a go loop without hogging the others, this might help. otherwise i have to rewrite some stuff

11:55 sritchie: cemerick: maybe that's why you're not experiencing any of these bugs...

11:55 mklappstuhl: rkneufeld: I'm using dnolens mies template

11:55 cemerick: sritchie: I use Firefox and Chrome, but https://github.com/cemerick/austin/issues/17

11:55 bbloom: scape_: it's generally a sign of a bad design though.... dnolen does it in that example b/c he's perf testing with a saturated system

11:56 sritchie: cemerick: this stuff even happens in private browsing mode

11:56 scape_: bbloom: oh, i've seen it in python in gevent (concurrency model)

11:56 mklappstuhl: rkneufeld: I probably setup garden wrong — would be really cool if anyone could give me a hint. https://github.com/mklappstuhl/talk/blob/master/project.clj

11:56 bbloom: scape_: are you writing clj or cljs? are you cpu or io bound? what are you actually trying to do? chances are a timeout 0 is not what you want at all

11:56 cemerick: sritchie: does it work in firefox?

11:56 sritchie: trying

11:56 mklappstuhl: tbaldridge: how to you mean — use the goog libs?

11:57 bbloom: scape_: well python's real threads support is, frankly, useless. if you're on the JVM, there are both real threads and parking threads. you may want real threads if you feel the need to timeout 0

11:57 rkneufeld: mklappstuhl: I don't have time to take a look right now. If you're still stuck in an 1.5-2 hours I can give it a look for you.

11:57 scape_: bbloom: I noticed if i make a handful of go loops everything slows down, I wanted to have each go loop check a stream for availability, but I noticed this with simple things inside of a loop

11:57 tbaldridge: I just realized that the features I was looking for are only in the goog master repo....I guess I'll have to wait till the next goog release

11:57 bbloom: scape_: are they pooling the stream as fast as possible?

11:57 s/pooling/polling

11:57 mklappstuhl: rkneufeld: thanks for that offer & no rush — maybe I figured it out on my own by then :)

11:58 bbloom: scape_: and i ask again: clj or cljs?

11:58 scape_: yes. basically they do: (if (> (.available ins) 0), i'm on jvm

11:58 sritchie: cemerick: ugh

11:58 cemerick: let me figure out how to get firefox working with https...

11:58 since I can't hit the cljs repl on http from my local https env

11:58 bbloom: scape_: ok, my suggestion is: do not poll the streams

11:59 scape_: instead, use real threads (clojure.core.async/thread ...) instead of /go and use <!! and >!! instead for real blocking (Not parking)

11:59 scape_: the only way around no polling them is to implement nio :-\

11:59 bbloom: scape_: then *block on the thread*

12:00 sritchie: cemerick: nope

12:00 bbloom: scape_: that's not true at all. just call .read() and let it block

12:00 sritchie: cemerick: get, and a post, and then totally stuck

12:00 scape_: well real threads don't scale as well, I was shooting for like 300-500 if possible

12:00 bbloom: scape_: do you have 300 to 500 streams?

12:00 scape_: b/c polling scales worse than threads :-P

12:00 scape_: hah ok

12:00 bbloom: scape_: how many streams do you have?

12:01 sritchie: cemerick: is there some order? like, don't do anything at the repl until firefox tries to connect...

12:01 or something like that that you just subconsciously respect now since you know what you're doing?

12:01 scape_: my hope is that many

12:02 cemerick: sritchie: no, the first thing I do is eval `+`, which blocks until the browser connects. When I see JS, that lets me know everything is ready, and I'm in the right type of REPL.

12:02 sritchie: yeah, I do the same thing. then you load the page...

12:02 and if you reload and try to eval, you get a BrokenPipe, probably?

12:02 reload the page, that is

12:03 bbloom: scape_: frankly, i think 300 to 500 threads will probably do just fine on a modern server

12:03 scape_: just wrap each stream in a async thread thinggie and then use go routines for everything past that

12:03 scape_: http://www.slideshare.net/e456/tyma-paulmultithreaded1

12:04 scape_: okay, thanks bbloom . i'll simplify and go with threads :)

12:04 sritchie: cemerick: it's wild that you've never had an unresponsive repl

12:04 scape_: thx ill check it out bbloom

12:04 cemerick: sritchie: I don't recall exactly. There's clearly something configuration-related that can impact how austin works, but it's hardly endemic; otherwise, no one would use the kit.

12:04 bbloom: scape_: plus, if you don't have 300 to 500 threads *now* you can always swap out for a different approach later

12:04 cemerick: sritchie: does the browser-connected-repl sample in the austin repo work in your environment?

12:04 sritchie: cemerick: well, you just pointed me to a few issues that report this, and seangrove anecdotally says that everyone he tries to set up has this problem

12:05 let's see

12:05 cemerick: sritchie: well, apparently FF doesn't work for you either, so that's something different.

12:05 scape_: interesting talk, how'd i miss this! bbloom :D

12:05 cemerick: Not sure what to say, but I can only fix what I can reproduce.

12:06 bbloom: scape_: b/c you're going to be talkign to channels, which is going to be the interesting par tof your program. you can easily swap in NIO as needed later, if it makes sense

12:06 scape_: make it right, make it fast. in that order!

12:06 scape_: hah ok

12:07 i'm fearful of nio :) seems like so much juggling to capture the right amount, i'll think on it at some point i'm sure

12:08 bbloom: scape_: evented systems are a dumb idea IMO, full stop. the problem isn't that threads are bad, the problem is that unix threads are too heavy weight, and even that's not really true any more

12:09 sritchie: cemerick: yeah, I bring it up because you may have a much better idea of how to debug, or where in the stack an issue like this might happen

12:09 cemerick: I'll try to get you a case that repros it

12:09 bbloom: scape_: if you avoid NIO's eventing system and instead only use selectors, that makes sense & is pretty nice to work with

12:09 sritchie: cemerick: I offered my project, which'll let you fire up a failing case right away - but if you need a more minimal failing case, sure, I'll try to get that going

12:10 scape_: another idea i was fiddling with bbloom was to spin up a smaller set of threads that take new streams in and loop thru their set of streams synchonously. but i'm pausing and reading these slides now

12:10 bbloom: scape_: just do one thread per stream and optimize later

12:10 scape_: okay

12:10 bbloom: scape_: if you've never done this sort ofthing before, i'm 98% sure that your optimizations will actually make things worse

12:11 scape_: haha probably right

12:13 cemerick: sritchie: my current suspicion is of some kind of race condition in your creation of the repl-env and the generation of the corresponding JS (yielding a mismatched session ID).

12:13 I just have too much going on to provide personalized debugging, etc. :-)

12:13 sritchie: no, they match - verified at the top of the REPL and by looking at my HTML

12:13 cemerick: sritchie: well, we can scratch that off the list then

12:14 sritchie: cemerick: yeah, you said that yesterday - I'm only asking because this feels like a problem that affects many users of your library

12:14 cemerick: and I want to help get it fixed, so that everyone can benefit

12:15 cemerick: I run open source projects too, I get that it's a pain - it seems like you believe this is totally local to my setup, which makes this personalized debugging

12:15 cemerick: anyway, I guess I'll try to break the demo in the austin repo

12:16 cemerick: sritchie: I was just referring to my getting set up with your particular project, etc., as opposed to a minimal repro.

12:19 sritchie: it is certainly local to your setup, or your particular combination of plugins, or set of CLJS deps, or whatever is causing the chaos. You're in the best position to diagnose and patch, honestly.

12:20 sritchie: cemerick: the help I'm looking for is less "please fix everything!", more "okay, you should see three post requests between the browser and server, if the third hangs, yeah, I see how it could block the others.." etc so I know what to look for

12:20 cemerick: I'll try to repro on that austin project

12:21 cemerick: sritchie: if it were that easy, I'd have provided advice like that :-P

12:21 sritchie: well, here's one error already in the example project

12:21 cemerick: go through the tutorial, call :cljs/quit,

12:22 then try evaluating the repl-env variable you create

12:22 OutOfMemoryError Java heap space java.util.Arrays.copyOf (Arrays.java:2367)

12:22 cemerick: sritchie: this is after getting a working browser REPL?

12:22 sritchie: yeah

12:23 cemerick: then, I'm not so worried about that at the moment. :-)

12:23 gfredericks: ,(let [a (into-array [1 2 3]), v (vec a)] (aset a 0 42) [(seq a) v])

12:23 clojurebot: [(42 2 3) [42 2 3]]

12:23 sritchie: cemerick: I can typically get it once

12:23 gfredericks: ^I feel like this is a little surprising

12:23 sritchie: then a page reload nukes it

12:23 gfredericks: oh wait

12:23 the docstring does indeed mention that behavior

12:23 false alarm

12:24 sritchie: cemerick: yeah, I mean, this example fails if you :cljs/quit and then run the repl again

12:24 same bug as I've been experiencing

12:24 cemerick: sritchie: -XmxNNNm

12:25 IIRC, lein-cljsbuild always runs with a non-default heap size b/c the CLJS compiler / gclosure compiler isn't easy on memory, etc.

12:25 sritchie: why does that affect the repl task?

12:26 cemerick: because you're hosting the CLJS compiler to compile core.cljs, your expressions to JS, etc

12:26 logic_prog: s the only svg element that clips a group the <svg> element ?

12:27 let me rewrite the above:

12:27 I have a <g > ... </g> element. I want to clip it to a rectangle. Is my only option to nest it inside a <svg> ... </svg> element ?

12:27 sritchie: cemerick: okay, reproduced...

12:28 follow your tutorial, run (cemerick.austin.repls/cljs-repl repl-env),

12:28 :cljs/quit

12:28 (after getting everything working, run :cljs/quit)

12:28 then call (cemerick.austin.repls/cljs-repl repl-env) again

12:28 ava.lang.NullPointerException

12:29 AeroNotix: is anyone using lein-daemon?

12:29 sritchie: cemerick: ugh, it is more reliable here. I'll keep playing.

12:29 AeroNotix: it works fine locally, but on my CI server the start daemon command just hangs -- it creates the pidfile though?

12:30 (alternately, some ideas on how to start a compojure app in jenkins and then run tests on it would be great.)

12:31 cemerick: sritchie: oh, right, the NPE is sort of expected (though an actual error message would be nice); :cljs/quit tears down the repl-env, which corresponds to session removal in austin: https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L324

12:31 sritchie: cemerick: looks like the terminal repl works great,

12:32 but my emacs setup is acting like my project was - I'll try removing some nrepl plugins, etc

12:32 cemerick: if I can find the thing that's hosed with my setup I'll report back

12:32 cemerick: sritchie: def, thanks

12:32 sritchie: cemerick: I'm suspicious of ac-nrepl. we'll see how my paranoia fares :) thanks for fielding the comment blast :)

12:35 seangrove: sritchie: Emacs, chrome/firefox both have the same problem

12:36 sritchie: seangrove: do you have ac-nrepl installed?

12:36 seangrove: sritchie cemerick: An interesting case that breaks the repl last time I was debugging: https://www.refheap.com/da489c6664be35717f3f514a5

12:38 cemerick: seangrove: I don't know what I'm looking at?

12:39 seangrove: cemerick: Ah, sorry, still haven't put together a minimum case. But if setup!* is called on page load, the repl works. If setup! is called, it never works

12:39 I thought maybe the cljs repl somehow relies on throwing errors, etc.

12:39 cemerick: seangrove: oh, I see. That's a little crazy.

12:39 seangrove: cemerick: But don't worry too much about it if it doesn't seem interesting, I know this isn't a repro case by any means

12:40 cemerick: seangrove: You mean for control flow? No, not that I know of. Does the same behaviour hold w/ the stock CLJS brepl?

12:41 seangrove: so do things work OK when setup* throws an error? Also, is the js/Object intentional?

12:42 seangrove: cemerick: the js/Object was just while iterating fe a different things. I've never tried brepl before.

12:42 cemerick: ok, was wondering if non-Errors were expected, etc

12:43 seangrove: I've never heard of particular userland code prompting REPL failure, so do file an issue eventually

12:43 seangrove: sritchie: Looks like ac-nrepl isn't installed.

12:44 sritchie: trying with ac-nrepl uninstalled

12:50 seangrove: ugh

12:50 seangrove: what is it about our emacs setup that's causing this...

13:09 hfaafb: with assoc i can pass in multiple key value pairs

13:09 but not so with assoc-in

13:10 whats an alternative to assoc-in, where my collection is a 2d vector

13:11 that i can change the value of 2 pairs of indices

13:29 seangrove: sritchie: I don't think it's emacs, personally, but I'd need to check the brepl stuff to be sure

13:30 sritchie: seangrove: I'm trying to create a smaller project with less deps to see if it works..

13:30 yeah, seriously frustrating, though

13:31 seangrove: sritchie: It's in the critical path for CLJS long-term though. Once it's sorted out in a reliable, extensible, editor-independent way, it'll be fantastic

13:31 sritchie: for sure, it'll be great

13:31 seangrove: sritchie: I think it's just so much of a black box right now, it's really unclear how it all works together for most people, so contributing and fixing problems seems beyond them (does ot me)

13:31 sritchie: me too

13:33 x^2: can someone help me understand the 'flow' of a program i am looking to write in clojure?

13:33 pbostrom: jumping into the conversation mid-stream: have y'all tried the Lighttable browser repl? it's pretty nice, I must say I've given p on emacs cljs nrepl at this point and use Lighttable for cljs

13:33 x^2: i know icould write it- but im wondering about doing it functionally.

13:33 bbloom: hey emacs people: what style of form evaling do you normally do? "eval top-level form" or "eval inner most form around the point/cursor" something else?

13:34 how do you deal with (comment .............) stuff and evaling in there at the bottom of your file test code?

13:34 pbostrom: bbloom: I usually eval top-level form

13:34 bbloom: and how do you utilize full-file re-eval?

13:34 seangrove: bbloom: Initially load the file, then C-c C-c to eval the top level form of whatever form I'm in

13:34 bbloom: seangrove: what does that do if the top-level form is (comment .....) for bottom of file test code?

13:35 seangrove: bbloom: In that case I jump to the end of the form and C-x C-e to explicitely eval the previous form

13:36 bbloom: ah ok so you intentionally use two separate bindings there

13:36 tpope changed some vim-fireplace behavior & my brain needs to readjust, but i figured i'd see if there was some even better ideas out there before i commit my fingers to memorizing different habits :-)

13:37 seangrove: Can't say if it's better or worse, but it's what we (I) have in emacs

13:37 sveri: hi, I am wondering why this happens: I retrieve some data from datomic and I have two defs at the end a "def" and a "defn" both return the same block, but the defn function fails with an error and the def function doesnt: http://pastebin.com/tR5CW11a any idea what is wrong there

13:38 bbloom: sveri: map is lazy

13:39 sveri: oh sorry, misread. hm

13:39 sveri: you just need to CALL get-releases

13:39 redinger: sveri: (first (get-releases))

13:39 bbloom: (first (get-releases))

13:40 sveri: bbloom: redinger jeez, again, I made that mistake some time ago :D

13:40 thank you very much, god, I feel so stupid

13:40 ontoillogical: Is there a good clojureism for accessing values in multi-dimensional maps? i.e {:aws {:private-key "KEY"} . (:private-key (:aws my-settings)) seems ugly to me

13:41 bbloom: ontoillogical: use get-in or ->

13:41 ontoillogical: bbloom: get-in! that's what I wanted

13:41 LLKCKfan: Is there any natural ways to relieve pain without using herbs or weed? No drugs

13:41 ontoillogical: thanks (I'm just starting clj)

13:43 bbloom: ontoillogical: 4clojure.com is a great place to learn idioms (and/or golfing techniques)

13:43 ontoillogical: follow some top users & do some puzzles there. see also the cheatsheet

13:43 ~cheatsheet

13:43 clojurebot: Cheatsheets with tooltips can be found at http://jafingerhut.github.com/ .

13:44 ontoillogical: bbloom: thanks. I find working through a project the best way to learn a language, but you miss idioms that way

13:44 bbloom: ontoillogical: yup, hence the 4clojure suggestion :-)

13:45 llasram: LLKCKfan: Such as a natural substance derived from the beautiful poppy flower?

13:46 ontoillogical: bbloom: what does following someone on there mean?

13:46 do I get updates when they solve new problems?

13:46 bbloom: ontoillogical: no

13:47 ontoillogical: when you solve the puzzle, you see their solutions

13:47 ontoillogical: ah way better

13:47 koreth_: 4clojure is really helpful. Though I wish they had tasks that involved stuff other than pure data transformations, e.g., dealing with network I/O.

13:49 scottj: koreth_: maybe that's because of security issues.

13:49 LLKCKfan: v

13:49 Is there any natural ways to relieve pain without using herbs or weed? No drugs

13:50 sm0ke: LLKCKfan: are you a bot?

13:50 fkn bots

13:50 llasram: clojurebot: bots?

13:50 clojurebot: No entiendo

13:51 llasram: clojurebot: bots are annoying, except for clojurebot

13:51 clojurebot: Huh?

13:51 llasram: Oh well -- I tried

13:51 Ok, one more try, then I'll give up:

13:51 sm0ke: i think we should have a bot which would mine chat data and triggers alarms for trolls

13:51 LLKCKfan: Not a bot

13:51 llasram: clojurebot: bots |are| annoying, except for clojurebot

13:51 clojurebot: Alles klar

13:51 llasram: clojurebot: bots?

13:51 clojurebot: bots are annoying, except for clojurebot

13:52 llasram: woot

13:52 pjstadig: llasram: you're getting pretty good at that

13:52 sm0ke: whoa

13:52 clojurebot runs on datomic

13:52 stores *facts*

13:52 llasram: I believe clojurebot well predates datomic :-)

13:53 pjstadig: I've got to live up to that "bot whisperer" title!

13:53 pjstadig: i think it actually runs on the JVM to be precise

13:53 does it use datomic now?

13:53 stirfoo: I started playing with sqlkorma and sql in general. Is using a hyphen in column names going to present any future problems?

13:53 dacc: LLKCKfan: uh, physical therapy?

13:53 stirfoo: shank-dia for instance instead of shank_dia or shankDia. The latter don't mesh very well with lisp symbol naming conventions.

13:54 sm0ke: LLKCKfan needs lisp

13:54 LLKCKfan: dacc Tried no help

13:54 sm0ke: he has rsi

13:54 LLKCKfan: If anything makes the pain worse

13:54 pjstadig: dashes vs underscores are the bane of my existence

13:54 sm0ke: lisp reduces your coding time hence pain

13:55 clojurebot: sex?

13:55 clojurebot: It's greek to me.

13:56 sm0ke: clojurebot is a virgin

13:57 stirfoo: seems the common naming convention for sql is underscore or camel case, but with korma I can use symbols or keywords to reference them

13:57 TimMc: LLKCKfan: http://ergoemacs.org/emacs/using_voice_to_code.html

13:57 stirfoo: Bit off topic I realize.

13:57 dacc: LLKCKfan: you're talking about RSI pain?

13:57 LLKCKfan: do you get plenty of cardio?

13:58 sm0ke: clojurebot: sex |is| updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk;

13:58 clojurebot: Roger.

13:58 sm0ke: clojurebot: sex?

13:58 clojurebot: sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk;

13:58 sm0ke: in think finger is too early

14:01 `cbp: ._.

14:02 TimMc: "cd" is clever

14:02 sm0ke: clojurebot: sex |is| updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep;

14:02 clojurebot: Alles klar

14:03 sm0ke: clojurebot: sex?

14:03 clojurebot: sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep;

14:03 sm0ke: clojurebot gets some tips from vimgor

14:11 gfredericks: what just happened here

14:13 bbloom: ,clojure.lang.PersistentQueue/EMPTY

14:13 clojurebot: #<PersistentQueue clojure.lang.PersistentQueue@1>

14:13 bbloom: ,(clojure.lang.PersistentQueue/EMPTY)

14:13 clojurebot: #<PersistentQueue clojure.lang.PersistentQueue@1>

14:13 bbloom: hmm... is that some interop thing about static functions i don't know or understand?

14:15 llasram: Whoa -- how does the second one work?

14:16 gfredericks: ,Math/PI

14:16 clojurebot: 3.141592653589793

14:16 gfredericks: ,(Math/PI)

14:16 clojurebot: 3.141592653589793

14:16 * llasram is having his mind boggled

14:18 * gfredericks doesn't understand it either

14:18 gfredericks: does java allow a static field and a static method with the same name?

14:18 pjstadig: no, don't think so

14:19 gfredericks: ,(Math/PI 42)

14:19 clojurebot: #<CompilerException java.lang.IllegalArgumentException: No matching method: PI, compiling:(NO_SOURCE_PATH:0:0)>

14:19 bbloom: where is bronsa when you need him?

14:19 lgas: Hi. I'm trying to use korma (0.3.0-RC5) but when I try to use korma.core I get "Exception namespace 'korma.db' not found". I've checked and the jar file under .m2 has the korma/db.clj file and it has a proper namespace declaration. What else could be going on?

14:19 (Googling didn't turn up anyone else with the same problem)

14:21 llasram: Oh, I see: ##(macroexpand `(Math/PI))

14:21 lazybot: ⇒ (. java.lang.Math PI)

14:21 Anderkent: lgas: is the jar on your classpath?

14:21 ,(macroexpand 'Math/PI)

14:21 clojurebot: Math/PI

14:21 rasmusto: ,(. java.lang.Math PI)

14:21 clojurebot: 3.141592653589793

14:22 bbloom: aaaah

14:22 pjstadig: sneaky

14:22 Anderkent: right, the reflector checks if its method

14:22 sm0ke: ,(macroexpand Math/PI)

14:22 clojurebot: 3.141592653589793

14:22 bbloom: odd tho

14:22 oh interop, you so crazy

14:22 llasram: Certainly an expected effect

14:22 ieure: it

14:22 llasram: Er, unexpected

14:23 Anderkent: they don't think it be like it but it do

14:23 lgas: Well, I'm using leiningen and it's in the output of "lein classpath".

14:23 Anderkent: lgas: well, huh. :P

14:23 sm0ke: ,(bean Math)

14:24 clojurebot: #<ExceptionInInitializerError java.lang.ExceptionInInitializerError>

14:24 sm0ke: ,(bean java.lang.Math)

14:24 clojurebot: #<NoClassDefFoundError java.lang.NoClassDefFoundError: Could not initialize class sun.awt.AppContext>

14:24 Anderkent: lgas: can you post your ns form/ stacktrace? It works for me, I'd bet on a minor syntax mistake ;p

14:24 sm0ke: ##(bean Math)

14:24 lazybot: java.security.AccessControlException: access denied (java.lang.RuntimePermission getProtectionDomain)

14:25 lgas: Yeah I'm kinda stumped. I feel like I must be shadowing some name somewhere or something that is causing a problem. I do have some thing's named "db" in other namespaces but I don't see any immediate interactions.

14:25 Anderkent: llasram: are out of memory errors when running parkour tests something you've seen before?

14:26 TimMc: &(#(Math/PI))

14:26 lazybot: ⇒ 3.141592653589793

14:26 TimMc: gfredericks: ^

14:26 lgas: I mean just "(use 'korma.core)" in a repl fails with "Exception namespace 'korma.db' not found clojure.core/load-lib (core.clj:5380)"

14:26 TimMc: So #(Math/PI) is an undocumented, unstable alternative to (constantly Math/PI)

14:26 Anderkent: llasram: also, leveraging your 'oh I know what that is' magic: https://www.refheap.com/34683

14:27 llasram: Anderkent: Nope. The main machine I run the suite on myself does have 32GB of RAM, but it's also passing on Travis CI, which I don't think is so generous

14:28 Anderkent: meh :P

14:29 sm0ke: ,`h

14:29 clojurebot: sandbox/h

14:29 konr: If I use skip-aot, generate an uberjar and run it using java -jar, java will try to load a non-existing main class and fail, right? What are the alternatives? Only not skipping compilation? Can I compile just the main file and leave the rest to be compiled at run time?

14:29 llasram: Anderkent: Huh. I have not seen that before

14:29 sm0ke: ,(in-ns sandbox)

14:29 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: sandbox in this context, compiling:(NO_SOURCE_PATH:0:0)>

14:29 lgas: Anderkent: is that what you meant about my ns/form/stacktrace?

14:29 sm0ke: ,(in-ns 'sandbox)

14:29 clojurebot: #<Namespace sandbox>

14:29 sm0ke: ,(inc 1)

14:29 clojurebot: 2

14:30 llasram: Anderkent: That's very very odd --

14:30 Anderkent: llasram: welcome to my life :P

14:30 (inc 1)

14:30 sm0ke: ,(def a 10)

14:30 lazybot: ⇒ 7

14:30 clojurebot: #'sandbox/a

14:30 sm0ke: ,a

14:30 clojurebot: 10

14:30 Anderkent: haha someone's done that before ;)

14:31 sm0ke: (inc clojurebot)

14:31 lazybot: ⇒ 32

14:31 llasram: Anderkent: So that's the standard exception for not having a matching clause in a `condp`. But the test is passing the result of `io/file` into abracad, and `source-for`'s `condp` has a case for `File`

14:33 Anderkent: llasram: yeah I'll just add debugging to see what it's actually getting

14:33 llasram: Ok

14:34 Oh, fun: ##(clojure.java.io/file nil)

14:34 lazybot: ⇒ nil

14:34 llasram: So that's a possibility

14:34 Anderkent: oh.

14:34 how does it find the file?

14:35 llasram: Yeah, that's my guess -- something is causing the test job to produce no output, which means the globing on the output directory produces an empty list, which is `first`=>`nil`, then nil all the way in

14:35 Globbin'

14:37 Anderkent: yeah, that's it

14:37 so i guess that's just a result of previous tests failing

14:38 llasram: Well, should be a previous part of the same test. There's no intentional dependencies between tests

14:39 Anderkent: llasram: well, running with a 2g heap fixes all errors

14:39 llasram: Iiiinteresting

14:39 Anderkent: I always knew putting more RAMs fixes everything

14:40 llasram: I'll run under some tiny heaps and see if I can figure out what goes wrong in such a non-obvious way

14:40 Anderkent: llasram: it might be that it's the instrumentation influences it

14:40 i.e. I only get one OOM when running standalone tests

14:41 as opposed to many when under coverage

14:41 but it's not a priority for me to make covered code perform well :P

14:41 llasram: Fair enough :-)

14:42 Anderkent: hm, looking through the outputs, I really should start handling deftype and reify

14:42 llasram: Those are pretty important, at least for anything doing serious interop

14:43 Anderkent: yeah, and the syntax isn't *that* complicated

14:47 sdegutis: Well then.

14:52 mdrogalis: Wooo! tbaldridge: The Movie

14:54 sdegutis: My love affair with Clojure is slowly dying, and I think it's mostly because of the JVM.

14:54 bbloom: sdegutis: wussamatta?

14:54 sdegutis: It just doesn't feel suitable for small things.

14:55 bbloom: sdegutis: it isn't :-P

14:55 Anderkent: sdegutis: JVM has its pain points, but also some great strengths

14:55 sdegutis: Anderkent: True dat.

14:55 cark: sdegutis: great, time to dive into clojurescript then !

14:55 sdegutis: We're totally loving Clojure at work, but that's a big project, so it's different.

14:55 xuser: sdegutis: use CL ;)

14:55 sdegutis: xuser: ML you say?

14:55 cark: I want to like that idea. I really really do.

14:56 cark: sdegutis: but ?

14:56 sdegutis: I was hoping to play with ClojureCLR in some WPF apps this weekend, but I need to work on work this weekend so it'll be yet another week before I can try.

14:57 xuser: sdegutis: common lisp

14:57 sdegutis: cark: node doesn't feel any slimmer than JVM in my weird brain.

14:57 xuser: Hmm, that seems like a bad idea.

14:57 xuser: I mean, to use CL for small command line utilities.

14:58 cark: sdegutis: it all depends on what you want to do ....for some things, even C++ might sometimes be the best tool

14:58 sdegutis: cark: I can't imagine when that would be. Possibly embedded systems?

14:59 Or when you're working in a legacy codebase which is written in C++ maybe.

14:59 cark: sdegutis: i really don't know =)

14:59 hfaafb: games v0v

14:59 cark: maybe making a game or something

14:59 sdegutis: Oh yeah, I forgot to try compiling Quake 3.

15:00 cark: sdegutis: for command line utilities, i think node is good enough (with added clojureness)

15:00 sdegutis: cark: Maybe it's not the node VM itself, maybe it's just the way it's structured. Node just doesn't feel self-contained.

15:01 (I don't mean in the sense that it requires a node interpreter.)

15:01 Never mind. All my opinions are broken.

15:01 cark: i don't quite get what you mean

15:01 Anderkent: I wish travisci wouldn't send me emails about it erroring when 'reference is not a tree'

15:02 sdegutis: So many things aren't. So very many things.

15:03 Sorry for the noise.

15:03 Going back to work.

15:04 Voyage: hi

15:04 the renaming of variables and methods dont work for advanced option. renaming dont work http://closure-compiler.appspot.com/home or am I on mistake?

15:07 pbostrom: Voyage: are you asking about Closure or Clojure?

15:07 Anderkent: Is there an easy way to go from function object -> the symbol of a function (assuming one exists?)_

15:07 S11001001: Anderkent: no

15:07 Voyage: hm

15:07 Anderkent: meh. I have to carry both with me I suppose.

15:08 splunk_: http://stackoverflow.com/questions/21634507/require-child-namespace-as-shorthand-in-clojure

15:09 ^ stackoverflow points for answers?

15:09 S11001001: Anderkent: maybe you could use the Var where relevant; Vars are IFns

15:10 Anderkent: S11001001: and build the symbol from var meta?

15:10 guess that could work

15:10 doody1: there was javaspaces in the past, I wonder what happened to it

15:10 hiredman: no such thing as child namespaces

15:10 the space of namespaces is flat

15:11 S11001001: Anderkent: I *think* the var has the name in it. Er, maybe.

15:11 Anderkent: long time ago

15:12 splunk_: hiredman: ah, thanks. if you want to type that into stack overflow I"m happy to accept.

15:13 Anderkent: S11001001: it has it in the metadata for sure, and it seems it has ns / symbol props; not sure if there's a standard api for it

15:14 cark: (ns ... (:use [cara.webtl blah bleh buh])) used to work, doesn't it work anymore ?

15:14 novochar: What are the two fundamental data structures in clojure? vectors and _ ?

15:15 gfredericks: listssetsmaps

15:15 llasram: :-)

15:15 gfredericks: clojurebot: the two fundamental data structures in clojure are vectors and listssetsmaps

15:15 clojurebot: It's greek to me.

15:15 gfredericks: clojurebot: the two fundamental data structures in clojure |are| vectors and listssetsmaps

15:15 clojurebot: Roger.

15:16 splunk_: cark: I think that takes everything inside blah bleh bluh and puts it into your current namespace. So if you're in user, that makes cara.webtl.bluh/foo => user/foo. i'm just trying to get it into bluh/foo, not user/foo.

15:17 cark: oh i see

15:17 TimMc: Is there an ordered map that just maintains insertion order, not using a sort fn?

15:18 llasram: TimMc: In the Java-verse there are "linked" maps

15:19 I vaguely think amalloy_/flatland has a Clojure one?

15:19 TimMc: Oh, of course it would...

15:19 llasram: Ah, here we go: https://github.com/flatland/ordered

15:21 zaiste: I just wrote a tutorial about building web apps with Compojure/Om http://bit.ly/1g3jIm9

15:21 i'd appreciate any feedback

15:45 invasmani: zaiste: some errors for you to fix, the ns declaration for acme.core is broken after put!. above that, in the frontend section, you meant to say to create a clj/ directory, not cli/

15:47 sdegutis: I dunno about you, but..

15:48 AeroNotix: technomancy: how to get the pid of a `lein run`'d

15:48 app

15:48 ?

15:48 irctc: Anderkent: it turned out that korma is incompatible with clojure.java.jdbc 0.3.3 and bumping it down to 0.2.3 in my project fixed it.

15:48 oops this is lgas

15:48 Anderkent: AeroNotix: from within the process or from outside?

15:48 AeroNotix: Anderkent: outside

15:48 I'm having trouble starting my compojure apps in CI

15:49 Anderkent: lgas: oh, that sucks

15:49 AeroNotix: and it seems that lein/compojure/ring/something is forking off the process

15:49 so even if I grab $! after spawning it, that no longer is the actual pid

15:49 lgas: I'm just happy to have gotten it working. For this project I can just use the older jdbc package.

15:50 Anderkent: AeroNotix: right, that's lein - it'll start a child process for the project so that you dont get lein classes/dependencies on your classpath

15:50 AeroNotix: Anderkent: running the jar itself also ended up with a different process

15:50 Anderkent: AeroNotix: oh. Then you migh be forking twice :P

15:51 AeroNotix: Anderkent: I'm not doing any forking

15:51 invasmani: zaiste: some more errors, the fetch-widgets function definition is broken after the let

15:52 zaiste: same with widget-box :0

15:52 sritchie: any reagent users here?

15:53 muhoo: ~sex is off-topic and not appropriate for the channel

15:53 clojurebot: 'Sea, mhuise.

15:54 Anderkent: llasram: so, with the caveat of having to remove the non-compiling ns, run with clojure 1.6.0-alpha3, and with a large heap, cloverage 1.0.4-snapshot can now do parkour! Yay :P

15:54 the output seems moderately okay too.

15:55 llasram: Sweeeet

15:56 Looking forward to fixing up gaps :-D

15:58 bmath: I noticed CircleCI is hiring, and they use clojure: https://angel.co/jobs?slug=circleci

15:59 Anderkent: hm, there's some weird things about the output here and there; I'll have to look into it. If you see any obvious mistakes, bug reports are always welcome! :P

16:01 mdrogalis: bmath: For the record, CircleCI is an excellent build tool, IMO.

16:01 Anderkent: bmath: mdrogalis: I've used it before (mostly because they did private repo support while travis didnt), the guys over there were very responsive and quick with fixing stuff

16:02 mdrogalis: Same experience with support.

16:02 Anderkent: but the builds could be a little unreliable and there was no way to tell why a build was queued. That was a long time ago though (6months+), so I expect stuff's changed

16:03 bmath: I used them at a contracting job for a few months

16:03 everything worked pretty damn well

16:03 build failures were easily traceable

16:03 AeroNotix: Anderkent: found a utility to give me a process tree.

16:03 mdrogalis: Have you seen what boxes they're using recently?

16:03 AeroNotix: I'll just walk that tree

16:03 bmath: there was a bit of an integration challenge (very minor): had to write some hook scripts to get things running

16:04 mdrogalis: I'll take a screenshot.

16:04 Nyyx: anyone using cursive clojure know how to assign shortcuts to the REPL interactions?

16:05 nvm I found it

16:15 dacc_: Nyyx: i'm using cursive too -- do you use the idea vim emulation?

16:16 mdrogalis: bmath & Anderkent: http://i.imgur.com/0mLZLuG.png

16:16 CircleCI's build machines

16:17 Nyyx: dacc: no

16:17 amalloy: huh, load of 24 on a 24-core machine. nice balancing

16:17 Nyyx: next time I have to do something tedious with text I might install it though

16:18 mdrogalis: amalloy: Isn't that 32 cores?

16:18 amalloy: oh. i didn't scroll far enough right

16:18 mdrogalis: :P

16:18 amalloy: well, i take it all back. you guys are squandering your resources

16:18 Nyyx: people in #ruby are crazy, they think that packaging an app in gem through command line is feasible to deploy to a non rubyist end user

16:18 mdrogalis: amalloy: Hah.

16:19 amalloy: where's the bitcoin mining daemon?

16:19 seangrove: mdrogalis: Are you at CircleCI?

16:19 mdrogalis: I would live to hijack that entire box and run some code with reducers on it.

16:19 Nyyx: cpu cores are worthless for bitcoins

16:19 mdrogalis: seangrove: No, just using it for my builds.

16:20 seangrove: mdrogalis: Got it

16:21 mdrogalis: But yeah, very interesting set up.

16:54 avishai: anybody can recommend a clojure crypto library?

16:55 specifically for verifying x509 signatures

17:00 stuartsierra: avishai: There are excellent Java crypto libraries with a common API built in to the JDK.

17:00 moquist: I love http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded . But why must all state be local?

17:00 In particular, "c.t.n.repl/refresh will destroy those Vars when it reloads the namespace" -- but isn't that exactly what you want?

17:00 ( https://github.com/clojure/tools.namespace )

17:01 I ask because my app doesn't have global state, but I want to use external libraries that do. I'm trying to figure out how much I should worry about that.

17:01 stuartsierra: moquist: That's more of a general recommendation.

17:02 avishai: stuartsierra, i know bouncycastle but i was hoping for something idiomatic

17:02 moquist: OK. So I should only sort-of worry that I'll paint myself into REPL corners without realizing it when I use libs that have global state...

17:02 stuartsierra: avishai: Using Java libraries is idiomatic Clojure.

17:02 avishai: stuartsierra, 10x

17:02 stuartsierra: moquist: Java libraries are usually isolated enough that it's not a problem for tools.namespace.

17:03 moquist: stuartsierra: OK. I'll proceed without fear, then. Thanks.

17:03 stuartsierra: moquist: You can get yourself into trouble if you need to do stuff to "clean up" the old state, like shutting down socket connections or closing files. `tools.namespace` won't do that for you.

17:03 But it will destroy your references to that state, making it impossible to get back to the thing you need to close.

17:04 moquist: Right. I have stuff in mind like atoms that various libs use, and then you def a bunch of stuff into them, etc.

17:04 Seems rather innocuous.

17:04 stuartsierra: moquist: That has its own problems, but it won't necessarily break from reloading namespaces.

17:04 * moquist nods

17:05 moquist: I was considering patching one in particular that only has a couple atoms, and sending a pull request. I'll probably still do that.

17:06 stuartsierra: I believe libraries should avoid creating their own mutable state except where absolutely necessary, but that opinion is not universally shared.

17:10 novochar: Why doesn't this print the string "adding them!"? http://gist.github.com/novodinia/6802591305d9da7ae298/raw/562251d64d7a61e8f030dd39322542d6c628448e/gistfile1.txt

17:11 _rc: novochar: (my-func 10 20)

17:11 novochar: otherwise you're just evaluating all the values

17:29 novochar: If someone has time, would you mind explaining the concert destructuring example here: http://clojure-doc.org/articles/tutorials/introduction.html#destructuring

17:30 You are creating a vector what of key, value pairs

17:30 bbloom: ~destructuring

17:30 clojurebot: destructuring is http://clojure.org/special_forms#binding-forms

17:30 novochar: where :band is associated with "The Blues Brothers"

17:31 It's odd that a vector is used here instead of a map

17:32 abp: novochar: for {:keys [band location promos perks]}?

17:37 alexyakushev: Hey guys, can some1 tell me a difference between "X.Y.Z-slim" and "X.Y.Z-sources" Clojure builds?

17:39 novochar: How do you play with clojurescript?

17:40 I can't get a repl: https://github.com/clojure/clojurescript/wiki/Quick-Start

17:40 And I don't know how to compile apps either

17:40 abp: novochar: try https://github.com/cemerick/austin

17:41 novochar: for compiling https://github.com/emezeske/lein-cljsbuild

17:42 novochar: Is it possible to install austin with lein?

17:43 ivan: yep. just put {:user {:plugins [[com.cemerick/austin "0.1.3"]]}} in your ~/.lein/profiles.clj

17:44 abp: novochar: like ivan said, documented under "Installation" on there

17:44 ivan: or to a :dev profile in project.clj as this says https://github.com/cemerick/austin#installation

17:44 dnolen: novochar: yes, easiest way to play with ClojureScript w/ minimal setup is Light Table - http://github.com/swannodette/lt-cljs-tutorial, I also put this tutorial together http://swannodette.github.io/2013/11/07/clojurescript-101

17:44 novochar: ivan: How did you know to do that, is it because you did `lein search austin` and saw the latest stable release?

17:45 ivan: well, now I know about lein search

17:45 I was using github and clojars and maven search

17:45 abp: dnolen: heh, btw, would you at some point extend your om tutorial for emacs or is that not feasible bc austin lacking optimizations none?

17:46 dnolen: also damn great work on the tutorials and the lib. thank you! looking forward to build something off it

17:46 dnolen: abp: don't really have much interest in rewriting it for Emacs. Also austin not working with optimizations none doesn't make any sense.

17:47 abp: glad you like them.

17:47 abp: dnolen: just read that somewhere

17:48 dnolen: abp: of course more than willing to put notes some where about making it work w/ Emacs since it's not going to be very different w/ the right setup.

17:48 abp: dnolen: yeah, started experimenting in the early days, so all my experiments are broken now. but i see it's getting more awesome with every commit.

17:48 dnolen: sure, i thought about different entry articles for the tutorial so everyone can get going with om/cljs from there

17:49 dnolen: I'd even volunteer to help out

17:49 dnolen: well, light table and emacs users, not everyone

17:49 dnolen: abp: anyone can edit the wiki so, if you feel like tweaking it or linking in Emacs notes feel free.

17:50 novochar: Austin is something you use with an existing repl?

17:52 abp: novochar: basically, yes

17:53 dnolen: haven't used austin from emacs for a while, but will try to put something together now anyway. you don't use browser repl from emacs?

17:54 dnolen: abp: I do yes, but just the basic one via inferior-lisp. Still haven't tried Austin yet.

17:55 abp: dnolen: ah ok, i haven't even used inferior lisp i think. pragmatically using emacs-live for a year now.

17:56 dnolen: abp: cool, never tried emacs-live.

17:56 novochar: I'm playing with the browser-connected-repl-sample in the austin repo

17:57 i open lein repl, type in `(cemerick.austin.repls/exec)` and receive an error which states: `Cannot run program "phantomjs": error=2, No such file or directory`

17:57 Has anyone else ran into this error?

17:58 abp: dnolen: well you get a whole lot and don't need to do much.. except you start to feel the urge to customize. have done some things but others just weren't worth the experiment to me, like investigating helm etc. company i work at got a real emacs resurrection out of live

17:58 dnolen: mostly for org

17:59 dnolen: novochar: I suggest following my advice early if you don't want to lose time in configuration hell. Save that for after you get the basics.

17:59 novochar: brew update && brew install phantomjs seems to be a solution on github

17:59 https://github.com/cemerick/austin/pull/13

18:00 abp: novochar: well, don't you want a browser connected repl?

18:01 novochar: dnolen: If after 10 mins, I'm not at the point of following along with the Om tutorial, I will try out lighttable

18:01 and read through the tutorial

18:01 abp: dnolen: i think he struggled with the instructions from cljs wiki before, so i pointed him to austin

18:01 dnolen: novochar: I didn't link to any Om tutorials, on ClojureScript ones

18:01 s/on/only

18:02 novochar: oh, I think I see what you are saying. Yeah Om is not a good introduction to ClojureScript unless you like firehoses.

18:04 abp: dnolen: well with light table it's quite smooth if you don't come from emacs

18:05 pbostrom: dnolen: fyi, I "ported" bits of your old autocomplete example to Om, going to try to document it a little bit

18:05 abp: pbostrom: great! that's what i need at some point for my work

18:07 pbostrom: abp: watch the cljs mailing list, I'll try to post a link to the repo later tonight

18:07 abp: pbostrom: nice, thank you. :)

18:08 novochar: So close!

18:08 at step 5 in https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample

18:08 but it isn't alertin the browser

18:08 phantomjs is running

18:08 I don't understand the reset! statement

18:09 Is that `(reset!)` or `(browser-repl-env reset!)`?

18:09 locahost:8080 is showing the document from the sample app

18:09 dnolen: pbostrom: that sounds interesting!

18:11 novochar: dnolen: I want a firehose experience

18:11 dnolen: novochar: heh

18:11 novochar: Well, not really, but if it's required

18:11 Anyone ever got to step 5 of the austin browser connected sample app and it fails?

18:12 abp: novochar: I'm just trying for an emacs-austin om tut entry

18:13 novochar: abp: You're creating an emacs-austin om tutorial?

18:13 pbostrom: novochar: IMO Austin is one of the harder things to configure in the Clojure dev ecosystem, I've tried using it at several points, and the previous tool piggieback, LightTable is like two steps

18:13 novochar: I would love that, I really want to use emacs.

18:14 abp: novochar: well there's a server still missing etc. so it's not going to happen within hours, probably this weekend

18:16 pbostrom: well, austin still uses piggieback, i've used it some times but it's not "easy" to set up, as in eval, running

18:17 novochar: "Now that the ClojureScript REPL is ready, you need to load http://localhost:8080, or reload it if you brought it up before the REPL environment was created and reset! into the browser-repl-env atom. "

18:17 This is the part that is confusing me

18:17 Does anyone understand this at all?

18:18 Oh cool!

18:18 I just needed to refresh the page

18:18 This is the coolest thing ever

18:19 ..for now at least..

18:20 pbostrom: abp: I felt like I got into a decent workflow with it, but occasionally the java process would go crazy and I've have to restart the JVM

18:21 abp: pbostrom: heh, last time i've tried compilation from evaluating to the repl was so slow i just didn't use it alltogether

18:21 elarson: this looks pretty interesting http://techblog.netflix.com/2014/01/introducing-pigpen-map-reduce-for.html

18:22 abp: pbostrom: lein cljsbuild auto and be done with it, but now i'm trying to put together a proper om-tut project template so we all can repl some om cljs

18:22 novochar: Is it possible to instruct to include austin with every project so that you don't have to manually walk through this process each time?

18:22 instruct lein

18:23 abp: novochar: so you've combined browser-connected-repl-sample and om-tut?

18:23 novochar: abp: That's what I want

18:24 abp: novochar: I'm at it, but for your environment to work you must've done that

18:24 novochar: I assumed having austin listed in ~/.lein/profiles.clj would include it within each new project, but I'm not entirely sure why it's in there now.

18:25 abp: novochar: getting this to work generically goes against choosing your templating engine for the server side since you need to include austins script

18:29 berdario: I have a macro that takes "body" and then unquotes-splices it... I want to be able to generate a list of expressions to be passed as body

18:30 I tried with (defmacro m [body] `(innermacro ~~@body))

18:30 but I'm unable to get it working

18:30 I looked at the output of macroexpand-1

18:31 is reimplementing the macro the only way to do it?

18:35 l1x: hey

18:36 what is the best way to load a local jar in a clojure project? (jar is not in clojars or any jar repo)

18:47 amalloy: put it into a repo

18:47 like, you can avoid that step, or even just use your local repo, but putting it on clojars at least is easier and better

18:48 abp: amalloy: have you set up a local repo?

18:48 amalloy: abp: no, i just mean like lein install

18:48 your ~/.m2, not a proper repo

18:48 abp: amalloy: ah well

18:50 amalloy: looking at it for a minute, setting up a private repo proper looks horrible

18:50 amalloy: berdario: (defmacro m2 [& body] `(m1 ~@body)) makes m2 act exactly like m1. if you want, you can modify body somehow on the way there

18:50 yeah, it probably is

18:50 berdario: amalloy I used 2 unquotes

18:50 amalloy: berdario: right, which is bogus

18:50 berdario: amalloy yes, how do you suggest to modify the body on the way there?

18:50 abp: amalloy: at some point i need to :| didnt you do that at geni?

18:51 berdario: I'd like to do something like

18:51 (map unquote body)

18:51 amalloy: i mean, it sounds like you are probably trying to use a macro to do something that is impossible, but you haven't given an example

18:51 no, abp

18:51 berdario: amalloy I'm trying to use this redis library: https://github.com/ptaoussanis/carmine

18:51 novochar: abp: did you say you are working on an om-emacs-austin tutorial?

18:51 That would be immensely useful

18:51 berdario: to use the pipeline for executing multiple instructions, it seems that the only simple way is to use the wcar macro

18:52 novochar: I ended up just launching lightable in the end since this tutorial seems to be dependent on it: https://github.com/swannodette/om/wiki/Basic-Tutorial

18:52 abp: novochar: yeah still at it

18:52 berdario: unfortunately, I want to build the instructions before calling wcar

18:52 novochar: abp: Great!

18:53 l1x: amalloy: i see, what would be the local repo way?

18:53 abp: novochar: that's what i ended up with in the first place, but light table is inacceptable from an emacs users perspective right now

18:55 novochar: How is it that Om is faster than vanilla React in http://vuejs.org/perf/

18:55 Are there compile-time optimizations?

18:55 dnolen: novochar: just faster defaults

18:56 novochar: immutable data structures and Om implements shouldComponentUpdate to do the most efficient checks possible.

18:56 novochar: React has default settings

18:56 ?

18:56 amalloy: berdario: from a quick read of carmine's source, it looks like it really doesn't want you to do that, sadly. wcar needs to know the things it'll be doing at compile time, and there's no obvious runtime equivalent

18:56 dnolen: novochar: React components by default just return true for shouldComponentUpdate

18:57 amalloy: if you know what you want to "build" at compile time, you can do it with a macro, but if you want to make decisions at run time you are kinda out of luck

18:57 dnolen: novochar: so the React TodoMVC is just doing more work than Om.

18:57 berdario: amalloy thanks

18:57 dnolen: novochar: I designed Om to just always be fast, I don't think people should screw around with shouldComponentUpdate ever.

18:58 amalloy: there are redis libraries around that don't force you to do everything with macros

18:58 abp: dnolen: i think you know some things about react, how long of a shot is it from knowing om basics to giving a talk on react js?

18:59 dnolen: abp: Om more or less tries to present an immutable friendly version of everything React provides

18:59 abp: they really aren't that different. However Om encourages people to use React that same way that Facebook uses React

19:00 berdario: amalloy uhm, it seems like all the alternatives have been updated 9 months ago or earlier... carmine seems the only one actively developed

19:01 dnolen: internally they have a thing called Store, which is basically a giant immutable data structure to support make speculative changes, rolls backs

19:02 abp: and this is how I think client side apps should work, so Om encourages that

19:02 berdario: (clj-redis is a thin wrapper around jedis... maybe that could be my best bet?)

19:02 l1x: https://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/ this is what i am looking for, thanks

19:02 amalloy: berdario: so? it's not like the redis protocol changes drastically every week. something that hasn't changed in a year probably works

19:02 (something that changed last week probably doesn't)

19:03 berdario: you're right... but if I get back to that code in 3 years, and I want to update redis to the latest version, I'd like that the library I picked is still supported

19:04 then again... a better use of my time could be just to don't worry about it now, and adapt/change the library when the time comes

19:08 seangrove: Rule #343 of pushing Clojure to production on Heroku: Any push with even a minor bug will be bundled and launched in record time. Any subsequent pushes fixing said bug will take roughly 10-15 minutes.

19:14 dacc: Nyyx: only problem with it is that [Esc] no longer takes you from the repl back to the editor

19:16 abp: meh, nice how seemingly *all* chrome extensions break austin

19:18 dsrx: anyone ever have any luck building clojuroku apps with anvil?

19:18 abp: dnolen: Good to know, I thougt fb's emphasis on making react convinient to js guys using classes etc would crush much more of the spirit

19:18 dsrx: abp: communicating over an iframe is kind of evil :\

19:18 seangrove: technomancy: One minute a push completes in a minute or two, next time "Timed out compiling Clojure (Leiningen 2) app (15 minutes)"

19:18 dsrx: i'm working on an alternative repl transport over websockets, similar to what lighttable does I guess

19:19 seangrove: technomancy: Am I getting rate limited or anything? Have I raised some griefer flag?

19:20 abp: dsrx: well, i think google dictionary broke austin for me, good they put a fat warning into the turorial and i haven't looked at austins internals but trying to write a tutorial for it and om.. think i need to repeat the warning in there if i'm to publish it

19:21 seangrove: abp: Would be a good idea

19:26 abp: heh cemerick, google dictionary seems to also break austin (at least with chrome on ubuntu), glad for the note in browser-connected-repl-sample

19:27 cemerick: but maybe it should be *bold* ;)

19:32 dsrx: for older browsers EventSource and ajax would be an alternative, right? also are you working in terms of an pr to austin or something new?

19:32 dsrx: well...

19:33 right now it's just a drop in replacement for cljs.repl.browser/repl-env in its own project http://github.com/tomjakubowski/weasel

19:33 integrating with austin would be a little trickier

19:33 it does work with piggieback though

19:34 abp: dsrx: good enough, haven't even looked at austin internals

19:38 allenj12: hey is there a way to type hint a vector if your expecting all the elements to be the same?

19:38 abp: dsrx: somehow i thought EventSource were more widely supported than websockets but thats not really the case

19:38 bbloom: allenj12: if you really need it, there is gvec

19:38 allenj12: https://github.com/clojure/clojure/blob/master/src/clj/clojure/gvec.clj

19:39 allenj12: only supports specializing for primitives

19:41 hfaafb: anyone have any hints on what functions (besides a for comprehension... unless thats the most clojurey) to create a pattern like this? https://gist.github.com/samcf/8874824

19:41 dsrx: abp: if/when i make it austin-compatible you could have multiple repls for the same project, using websocket with chrome (to hopefully avoid extensions screwing with your iframe messages) and the traditional iframe-based CLJS browser repl in IE or whatever other legacy browsers you're developing for

19:42 allenj12: hmmm ok

19:42 thank you

19:46 dsrx: abp: i really only wrote this so i could have a repl while i'm developing a spotify app, because the repl won't work across protocols (http: and sp:)

19:47 amalloy: hfaafb: my first guess would be a for-comprehension

19:48 hfaafb: amalloy: ok just trying to be too clever i guess :)

19:49 amalloy: something like https://www.refheap.com/34718

19:50 that's probably a little flatter than your example, and maybe rotated as well, but you get the idea

19:50 hfaafb: thanks ill run with it

20:02 systemfault: Hi, super-motivated clojure newbie here... what is/are the best book(s) to learn clojure? I've read about "The joy of Clojure", is that a good one?

20:03 rhg135: yes, but not as a first

20:04 dacc: systemfault: the o'reilly book is quite good. i'm working through it

20:05 systemfault: I usually don't like the oreilly book but if you tell me it's a really good one, I will try it :)

20:05 rhg135: JoC has a lot of "why"

20:05 systemfault: So far, I only did the clojure koans

20:06 So I got an idea of how the language works... but that's about it

20:08 rhg135: JoC may be a good one for you then

20:08 invasmani: systemfault: braveclojure.com, 4clojure.com, https://github.com/clojure-cookbook/clojure-cookbook for samples of common tasks, and for a textbook, i think programming clojure/clojure programming --> joy of clojure is the common path

20:08 bitwalker: systemfault: Another vote for Joy Of Clojure here

20:08 dacc: systemfault: yeah, not all o'reilly books are good, often too chatty for my tastes

20:08 systemfault: Noted, thank you so much :)

20:09 dacc: Usually.. when possible, I like the books by Addison-Wesley

20:09 *I like to get

20:10 invasmani: systemfault: keep in mind that joy of clojure 2nd ed is coming in the next month or two

20:12 systemfault: Hmm, the manning website offers a "MEAP" for the second edition + book when it's released. Seems like a better idea than what I had, to preorder the 2nd edition and pirate the first edition for now :/

20:12 invasmani: you get a free copy of the first edition by preordering the second

20:13 no need to pirate :)

20:13 abp: systemfault: theres also http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome shpaing into a book

20:13 systemfault: invasmani: ah, didn't see that.

20:14 abp: I saw it on HN a couple of months ago, great read :P

20:14 Thanks

20:15 abp: systemfault: there are more posts now, have you seen those too?

20:16 systemfault: abp: Ah, you're right, the last chapter I read was about macros. There are more now.

20:16 abp: systemfault: if not, that's actually a better link: http://aphyr.com/tags/Clojure-from-the-ground-up :)

20:16 systemfault: ok, then not much more

20:17 ve

20:25 ggherdov: hello. I did run `lein ring server` on my remote machine, and it complains about not having a X11 display. details here: http://bpaste.net/show/rmZCGXRZ5RV99KVl39Zq/ why does ring needs X11 ? What's the gotcha?

20:28 amalloy: `lein ring server :headless`?

20:35 novochar: I'm reading https://github.com/swannodette/om/wiki/Basic-Tutorial#wiki-life-without-a-templating-language

20:36 ggherdov: amalloy: no, thanks! trying it. (having network problems, sorry I am on and off)

20:37 novochar: Nevermind.

20:39 locks: a lot of people seem to have been reading that novochar ;)

21:04 srruby: I want to do a file-seq on a directory under resources. The following code works under the repl, but I want to change it so that it works when I am NOT in the repl:

21:04 (file-seq (clojure.java.io/file "resources/fixtures"))

21:04 Thanks, John

21:05 muhoo: lein ring server-headless

21:07 and, if you want nrepl too, lein update-in :ring:nrepl assoc :start? true -- ring server-headless

21:09 hiredman: clojurebot: files |are| an illusion, there are only classloaders

21:09 clojurebot: You don't have to tell me twice.

21:10 muhoo: i was thinking of building a lein invocation command line that'd use pdo and launch cljsbuild auto in addition to ring server with nrepl, but i was afraid it would summon the eldritch gods and cause volcano eruptions and blacken the earth for 40 years.

21:13 oh, no volcanos! lein pdo cljsbuild auto, update-in :ring:nrepl assoc :start? true -- ring server-headless

21:14 works. if i'm feeling edgy i'll try to weave austin into the mix

21:48 effy_: the bibliography on the joy of clojure website (http://joyofclojure.com/bibliography/) is packed with mount of awesome book, does the author really had time to go through all of that, is that even possible during a single life ?

21:48 egghead: lol yes fogus reads so much

21:49 effy_: just the godel escher bach is already a "you gonna spend a full year on it" kind of book

21:51 systemfault: Do you all think that core.async is the most awesome thing ever? :/

21:52 That's what made me want to learn clojure

21:53 voldyman: systemfault: core.async is cool but clojure as a whole is way cooler

21:54 systemfault: So, the difficult question... do you all use emacs? (I'm use intellij + cursive right now... thinking to switch)

21:56 Raynes: Yes. Every single person except for you uses Emacs. ;)

21:56 In all seriousness, Emacs is indeed quite wonderful, but other editors are good and fine as well.

21:56 Light Table, Cursive, Vim, etc

21:56 Bronsa: Just not as good and fine as Emacs.

21:56 effy_: i mean, how do you even connect to freenode without erc ?

21:57 systemfault: effy_: I use telnet ;)

21:57 PRIVMSG #clojure HELLO

21:57 effy_: systemfault: ok i'll let it pass for this time then !

21:57 systemfault: effy_: I'm too ashamed to say the truth... I use colloquy on osx :(

21:58 Raynes: Ugh, colloquy is the most abysmal IRC client I've ever used.

21:58 systemfault: So, what is the name of the package I need to install on emacs to start with clojure?

21:58 Raynes: $google textual irc client

21:58 lazybot: [Textual: IRC for Mac OS X] http://www.codeux.com/

21:58 * oskarkv uses vim

21:58 effy_: systemfault: cider

21:58 systemfault: Nice

22:02 fairy44: Probably this has been asked a million times already, but I wasn't able to find a clear explanation on the web...

22:02 Why does Clojure has keywords in addition to symbols?

22:02 Can't everything that a keyword does be done by a quoted symbol?

22:04 hiredman: no, keywords always evaluate to themselves, quoted symbols loose the quote when passed through the reader for example

22:04 dsrx: it's a security blanket for ruby refugees

22:04 (not really)

22:04 fairy44: Is there a practical difference when this comes up?

22:05 I mean, is there a situation where this comes up in practice

22:05 hiredman: yes, if you use printed clojure data as a serialization format (edn, which people do all the time) it would come up all the time

22:06 fairy44: OK

22:06 Thanks :)

22:07 So when to use symbols?

22:07 hiredman: clojure's symbols are also not interned, but keywords are, so symbols can have metadata (you can have different instances of symbols with different metadata) but keywords are interned, so they cannot have metadata, but equality is just a pointer check

22:07 symbols are pretty much only used for code

22:07 effy: out of curiosity un-serializing code like that through the reader is it "injection prone", or it's more like a json un-serialize kind of nothing can happen ?

22:08 systemfault: Wow, I'm looking at EDN, looks better than JSON

22:08 hiredman: effy: it is complicated, but clojure recently grew clojure.edn which is distinct from the clojure code reader

22:08 fairy44: So is there a place I'd use a quoted symbol outside of a macro?

22:08 hiredman: it is pretty rare

22:11 effy: hiredman: the documentation isn't explicit about "could the code be evaluated during the un-serialization" :(

22:12 hiredman: effy: the code will not be, the reader is distinct from the compiler

22:13 effy: but there are some extension points in the reader that could cause issues, hence the more restricted reader exposed in clojure.edn

22:13 effy: not even if there is macro or something like that ?

22:14 macro are expendend by the reader ? (by the eval ?)

22:14 hiredman: no

22:14 the reader turns strings in to datastructures

22:14 macro expansion and compilation happens elsewhere on the datastructures

22:15 https://github.com/edn-format/edn

23:24 tolstoy: dnolen: Does OM support CSS transitions?

23:25 dnolen: tolstoy: what is there to support?

23:25 tolstoy: http://facebook.github.io/react/docs/animation.html

23:25 But aside from that, I have an SVG that I periodically change the radius of.

23:25 dnolen: tolstoy: yeah that's not core React really

23:26 tolstoy: Not an expert that CSS transition. Before, I'd just add a class and remove it, and it worked.

23:26 dnolen: tolstoy: people can figure out what they need and go from there.

23:26 tolstoy: Okay.

23:26 dnolen: tolstoy: I suspect there are enough hooks in React already to handle most cases

23:27 tolstoy: Yeah. I guess what has me thoughtful about it is that the svg (say) isn't completely removed and added each time. So I'm confused. ;)

23:27 In other words, not really an OM prob.

23:37 sdegutis: Hello.

23:37 Anyone here familiar with ClojureCLR?

23:37 The documentation promises a future explanation of how to call it from a C# project, but it's not there yet.

23:38 tolstoy: Hm. TypeError: 'undefined' is not a function ... React.DOM.animate .

23:40 ambrosebs: sdegutis: If you can figure out how to resolve Clojure vars in C# and then deref/invoke them, I think that's all you need

23:40 tolstoy: Alas.

23:40 ambrosebs: sdegutis: have you got the source handy?

23:40 sdegutis: ambrosebs, That's a bit further than I am. I'm just trying to figure out how to run "(prn 123)"

23:43 I thought it would be clojure.runtime.Load("(prn 123)") but that doesn't compile.

23:45 ambrosebs: sdegutis: I was thinking something like clojure.lang.Compiler.maybeResolveIn(clojure.lang.Compiler.namespaceFor("clojure.core"), "prn").invoke(123)

23:45 sdegutis: no idea if that works

23:46 just browsing https://github.com/clojure/clojure-clr/blob/master/Clojure/Clojure/CljCompiler/Compiler.cs

23:46 amalloy: ambrosebs: i think you can just use clojure.lang.RT.var("clojure.core", "prn")

23:46 but i guess maybe that stuff isn't there in C#?

23:47 ambrosebs: amalloy: surely it's there somewhere

23:48 amalloy: Var.intern looks like it exists, at least

23:54 sdegutis: Thanks amalloy.

Logging service provided by n01se.net