#clojure logs

2014-02-07

00:27jph-arrdem, there's a clj-btc which can be used to talk to bitcoind, dogecoind, etc
00:27arrdemjph-: yeah I saw that floating around a few days ago. didn't know that it was just a daemon wrapper.
00:28jph-arrdem, yep its just for the jsonrpc protocol
00:28jph-does the job
00:28jph-means your app doesn't have to talk to the network/blockchain direct
00:28arrdemfor some definition of "does" sure.
00:28arrdem<offtopic> BTC under $800 WTF </offtopic>
00:28jph-yep
00:29jph-so you're thinking of something that can talk to -coin network directly
00:30quizdrarrdem i'd buy btc at $100 US but nothing higher :)
00:33arrdemjph-: yeah I was thinking about going after this for a while
00:33arrdemhttp://www.reddit.com/r/dogecoin/comments/1upa5y/bounty_15_million_doge_for_the_first_person_to/
00:33arrdem1.5MDoge is pretty reasonable for the dev time involved...
00:34arrdemthe issue is the ongoing cost of running such a thing
00:34jph-nice
00:34arrdemdidn't come up with a good wat to monetize it, didn't bother :c
00:34jph-arrdem, yeh im working on a web-based wallet for doge, but just using dogecoind as backend
00:34jph-i'd far prefer a lighter-weight dogecoind
00:35jph-seems like only bitcoin has good alternatives to bitcoind
00:35arrdemwhich really isn't surprising given the distribution of value and traffic among altcoins
00:36arrdemmost of them are entirely graveyards or ponzi schemes.
00:36arrdemsee the altcoin "create, premine, publicize, dump" cycle...
00:36jph-yep
00:44dissipatearrdem, i'm going to launch ClojureCoin
00:46arrdemdissipate: why.... we already have the only memecoin that'll matter....
00:47dissipatearrdem, which is?
00:47arrdemdissipate: doogecoin
00:47dissipatearrdem, you mean dogecoin?
00:47quizdr,(attractive-price? (bitcoin? $US1))
00:47clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: attractive-price? in this context, compiling:(NO_SOURCE_PATH:0:0)>
00:47quizdrah indeed, we need clojurecoin to fill the gap
00:48arrdemsee... 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.
00:49arrdemDogecoin is the only other coin which has anywhere near as much use, thanks to the tipping culture which has grown on reddit and twitter
00:49TEttingergo online crime! woo
00:49arrdemTEttinger: hence why I'm not operating an exchange T_T
00:50quizdri have read that bitcoin introduced encryption technology that will change the world, even if that currency fails
00:50arrdemyeah wherever bitcoin goes, the blockchain model is really really interesting and has a lot of value.
00:51dsrxso were these people with bitcoin apps on their phones really storing a 14+GB file on them?
00:51arrdemoooh yeah
00:52dsrxdang
00:52arrdemhence the rise of "light" web clients.
00:52TEttingerbrb making Silk Doge. such drugs. very porn. wow.
00:52dissipatedsrx, nope. the mobile bitcoin wallets use light versions of the blockchain download.
00:52TEttingerI was trying to think of what else could be illegally traded on silk road
00:53TEttingerI guess credit cards?
00:53arrdemTEttinger: radio jammers and high power radios were another item...
00:53arrdemTEttinger: credit cards... fake IDs... real IDs...
00:53quizdrhey 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.
00:53arrdemTEttinger: controlled printers...
00:53dissipatedsrx, in fact, the only major bitcoin wallet that downloads the whole blockchain is the 'official' satoshi client
00:53TEttingerarrdem how... do you know this...
00:54dissipatequizdr, javascript came from scheme
00:54quizdrarrdem i didn't know they let you guys still have internet access in the joint
00:54arrdemTEttinger: my introduction to CS was computer security. you meet interesting people at defcon, who get more interesting as they get drunk...
00:55quizdrdissipate i'm wondering if it is worth trying to refactor some lisp code into javascript or if that is a waste of time?
00:55arrdemTEttinger: man that's harsh... I'm usually pretty judicious with all this crazy :P
00:55TEttingerbut why the radio jammers?
00:55TEttingerhaha
00:55dsrxwhat flavor of lisp quizdr?
00:55quizdreither clojure or common lisp code
00:55arrdemTEttinger: they aren't FCC legal even to build let alone sell.
00:55TEttingeryou're quite acceptable. such accept. wow.
00:56dissipatequizdr, clojurescript
00:56arrdemTEttinger: think about all the "interesting" things you could do if you could shut down all radio based tech in a 100yrd sphere.
00:56quizdrdissipate ah that's an idea. and it compiles down into "normal" javascript that could run in any javascript engine, like V8?
00:56TEttingerlike police and security radios... ah.
00:57arrdemTEttinger: ooh yeah. let the antisocial fun begin...
00:57TEttingerthat could be very dangerous, I can see why silk road would trade in it
00:57dissipatequizdr, yep!
00:57arrdemPSA: 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
00:58quizdrdissipate 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?
00:58TEttingerI'm a no hat, so no worries
00:58TEttingeralternately, silly hat
00:58dissipatequizdr, clojurescript is a better language. that's the main reason.
00:59dissipatequizdr, it has interop with javascript
00:59quizdrdissipate i mean are there anything in JS that CLJS cannot do?
00:59arrdemquizdr: no. cljs can refer to arbitrary js functions as though they were cljs fns and use them accordingly.
01:00arrdemquizdr: so if you want to use raw js code or raw js insanity you can.
01:00dissipatequizdr, nope. it has interop, so you can call JS functions from clojurescript.
01:00quizdrwhat 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?
01:01dissipatequizdr, the cljs compiler
01:01quizdrI 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.
01:02dsrxa hundred page book might be very dense indeed
01:02rplacaquizdr: that book is a quick start for folks who already know CLojure
01:02quizdrah ok
01:02quizdri wonder how it speaks to those who don't already know JS quite well?
01:04rplacaI 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.)
01:04rplacabut I may remember that because that was the part I needed to know at that point :)
01:04quizdrrplaca is it fairly straightforward for a cljs compiler to co-exist in emacs with the clojure compiler?
01:05arrdemquizdr: yes, cljs and clj don't really get in each-others way.
01:06quizdrso the compiler will just spit out a file of javascript code? that's pretty neat.
01:06rplacaquizdr: sure, you just use leiningen for both, really
01:06rplaca(at least I do)
01:09quizdris there a REPL in cljs? not sure how that would work.
01:09arrdemquizdr: not really for exacly the reasons you're thinking of.
01:10quizdrright
01:11arrdemquizdr: IMO this is entirely an issue of cljs not being self-hosting and could be remedied... but that's a long way off.
01:11arrdemquizdr: in the meantime there are tools that let you recompile your code and reload it in a sem-live browser.
01:14quizdrSince 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.
01:20arrdemthat's not far off of what Light Table does...
01:21quizdrwhat GUI kit is light table using?
01:22arrdemit isn't. it's HTML in a stripped down web browser.
01:22arrdemAFAIK
01:22quizdri see. it looks great.
01:23Raynesquizdr: quizdr https://github.com/rogerwang/node-webkit
01:23Raynesmuch quizdr; wow
01:25quizdrnice
01:26quizdranyone have good experience mixing cljs with jquery?
01:26arrdem$google github clojurescript jquery
01:26lazybot[ibdknox/jayq · GitHub] https://github.com/ibdknox/jayq
01:27quizdrwow fascinating!
01:30RaynesQuick, someone show him the moving pictures! :P
01:30clojurebotTitim gan éirí ort.
01:30Raynesquizdr: But yeah, from what I've heard, Chris Granger has been very satisfied with node-webkit.
01:32quizdrdid someone say something about a MOVIE ?!
01:32RaynesHehe
01:33quizdrit 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.
01:35arrdemRaynes: http://i.imgur.com/zrdvT.jpg
01:38deadghosthttps://github.com/magomimmo/modern-cljs
01:38deadghostanyone done these?
01:38deadghostjust want to get an estimate of how long it'll take to run through
01:40quizdrwho authored clojurescript initially? how did it come about, and when?
01:40noonianrich hickey i think
01:41RaynesVarious folks at Relevance.
01:41quizdrinteresting 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
01:41RaynesYou can look at the early commit logs to see who all worked on it.
01:48quizdri'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.
01:48quizdri mean, i *don't quite understand...
01:51quizdrunless cljs is not directly connected to clojure at all, then that would make sense. an entirely separate implementation of the same clojure api functions
01:53arrdemquizdr: at the moment clojurescript and clojure's compiler backends are entirely disjoint
01:53arrdemquizdr: hence the need for such duplication
01:53quizdrah, here we go: https://github.com/clojure/clojurescript/commit/c535d501108ba24f62395f416b498975969af785
01:53quizdrthe actual println implemention of fn that leads to js function()
01:54quizdri have to admit i'm more than a little blown away at what has been achieved here.
01:55arrdemshrug. as with most language implementations there's little truly "new" and a lot of reinvention, which is interesting in its own right.
01:57quizdri know but the scope and concept of the project are quite vast and innovative, I think. really very intriguing.
02:00quizdri'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?
02:01arrdem$google google closure compiler about
02:01lazybot[Closure Compiler - Google Developers] https://developers.google.com/closure/compiler/
02:01arrdemquizdr: there's a trend here. here's a hit. google first.
02:02quizdrwhat I meant was, wouldn't the implementation of clojurescript already have ideal js behind it?
02:03arrdem... 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.
02:04quizdri see. i just found this interesting discussion: https://groups.google.com/forum/#!topic/clojure/WwocFhk45us
02:09arrdemthis thread makes me want to get beer, get irrisponsably drunk and generally mock the OP.
02:09Raynesarrdem: In.
02:09quizdrha ha
02:10quizdrit is rather insightful for a newbie to read the responses however
02:10arrdemRaynes: dogecoin is $1.18/KDoge. how much is beer for you? I'm buying.
02:10Rayneslol
02:11arrdemhttps://groups.google.com/d/msg/clojure/WwocFhk45us/1wPj3kuKyIMJ
02:11Raynesarrdem: Can you wait 361 days?
02:11arrdemclojurebot: rhickey is I'll make sure you get a refund then
02:12arrdemRaynes: oh. right. I'm not the youngest person here.
02:12arrdemRaynes: happy belated birthday tho
02:12RaynesWell, I can get booze. You just can't buy it for me.
02:12RaynesAw thanks <3
02:13arrdem(context) https://groups.google.com/d/msg/clojure/WwocFhk45us/1wPj3kuKyIMJ
02:15arrdemhttps://groups.google.com/d/msg/clojure/WwocFhk45us/svpal4UEXcEJ STFU show me code hahaha
02:16quizdrlooks like rich owned him in that thread
02:16RaynesNo. No no no.
02:17RaynesRich *pwn'd* him.
02:17RaynesSpecifically. Has to have the p.
02:17RaynesThere was some burn ward level stuff going on that thread.
02:18arrdemhttp://i.imgur.com/opvEg.gif
02:18quizdrwell, i don't know what pwnd means, so i'd say... yo son that dude got OWNED!
02:19Raynesquizdr: http://knowyourmeme.com/memes/owned-pwned
02:21quizdrman i must be the oldest guy in the room, maybe
02:22fredyrquizdr: how old is that
02:22quizdr30s
02:23fredyrwell maybe you're not then
02:23RaynesGoodness grandpa!
02:23fredyr:S
02:23quizdri feel like it often!
02:23quizdri wonder what the average age in here is. i'd guess upper 20s?
02:24RaynesDon't worry guys, I'll only be young and classically handsome for another two decades or so.
02:24fredyrraynes is the one bringing down the average
02:24fredyreverybody else is over 30
02:24fredyr:p
02:25RaynesI don't think that's how averages work :P
02:25fredyrorly?
02:25quizdrha ha, well we could always throw out the hi and low extremes
02:26arrdem,(swap! age-atom #(+ %1 21))
02:26clojurebot21
02:27arrdemevidently it isn't.
02:27fredyrquizdr: did you mask your age by saying you're in your thirties?
02:27fredyrquizdr: aka 39
02:27quizdri could be 39. i might also be 30.
02:27quizdrha ha ha.... (evil laugh)
02:27RaynesCould be a vampire.
02:28RaynesYou think you know someone.
02:28arrdem,(reset! age-atom {:ages 21 :agec 1})
02:28clojurebot{:agec 1, :ages 21}
02:28quizdryou 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.
02:28arrdem,(defn age-avg [] (let [{:keys [agec ages]} @age-atom] (/ ages agec)))
02:28clojurebot#'sandbox/age-avg
02:28fredyror the hammock
02:29quizdrtrue dat
02:30arrdem,(defn age+ [age] (swap! age-atom #(-> %1 (update-in [:agec] inc) (update-in [:ages] + age))))
02:30clojurebot#'sandbox/age+
02:30arrdem,(age+ 21)
02:30clojurebot{:agec 2, :ages 42}
02:30arrdem,(age-avg)
02:30clojurebot21
02:32fredyr,(age+ 36)
02:32clojurebot{:agec 3, :ages 78}
02:33fredyr:-/
02:34quizdrfredyr nice age, i dig it.
02:34quizdr,(age+ 36)
02:34clojurebot{:agec 4, :ages 114}
02:34fredyr:)
02:34arrdemyall can /msg the bot... no need to let me add your ages to my growing database of nicks, real names, GH profiles and IPs...
02:35edbond,(age+ 31)
02:35clojurebot{:agec 5, :ages 145}
02:35edbond,(age-avg)
02:35clojurebot29
02:35quizdrare 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"
02:35arrdemRaynes: below average w000
02:35Ember-,(age+ 32)
02:35clojurebot{:agec 6, :ages 177}
02:36arrdemquizdr: the swee thing is that it "just worked" on my fist cut.. live coding ftw.
02:36quizdr(inc arrdem)
02:36lazybot⇒ 17
02:36edbond(inc arrdem)
02:36lazybot⇒ 18
02:37arrdemholy 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
02:37quizdr"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."
02:37Ember-(inc arrdem)
02:37lazybot⇒ 19
02:37Ember-you deserve it, simple and elegant solution to a pressing problem: the average age of ppl on this channel :)
02:38quizdrwhat's fascinating is that it is immune to voter fraud in every way.
02:38arrdemquizdr: not at all... negative ages... someone reset!ing the counter...
02:38Ember-I said simple and elegant, not foolproof :P
02:38arrdemEmber-: sure, but quizdr said it was nigh perfect :P
02:39Ember-hehe
02:39quizdrthe most obviousl form of voter fraud is just voting more than once, of course.
02:41arrdem(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))))))
02:41arrdemdamnit. forgot the ,
02:41arrdem,(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))))))
02:41clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-atom in this context, compiling:(NO_SOURCE_PATH:0:0)>
02:41arrdem,@age-atom
02:41clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-atom in this context, compiling:(NO_SOURCE_PATH:0:0)>
02:42arrdem,(age-avg)
02:42clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-avg in this context, compiling:(NO_SOURCE_PATH:0:0)>
02:42arrdemyep. sandbox ticked.
02:42quizdr,(dec arrdem)
02:42clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: arrdem in this context, compiling:(NO_SOURCE_PATH:0:0)>
02:42arrdemforgot about that.
02:42quizdrlol
02:44Raynesarrdem: You know github obfuscates email addresses.
02:44piranhadnolen: 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)?
02:45arrdemRaynes: cute... but I see no reason why someone couldn't defeat it if they cared enough...
02:46RaynesYou could use githubthrowaway@arrdem.com
02:47arrdemRaynes: I said cute. I didn't say that I cared :P
02:51ddellacostapiranha: you realize that it is 3:00 am in NYC?
02:51piranhaddellacosta: haha, not really :)
02:51piranhaddellacosta: OTOH David's been active on GitHub just now
02:51ddellacostapiranha: problem why he wouldn't respond is all. ;-)
02:51ddellacostapiranha: oh, well, I take it back then...
02:53quizdrif 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)) ?
02:53ivanthat's the backup dnolen who doesn't IRC
02:54ivan,(print-str {"hello" "world"}) ; quizdr
02:54clojurebot"{hello world}"
02:55ivan,(pr-str {"hello" "world"})
02:55clojurebot"{\"hello\" \"world\"}"
02:55arrdemquizdr: clojure.tools.reader. use it.
02:56quizdrah, so pr-str is the best way.
02:57quizdrarrdem why isn't clojure.tools.reader listed on this page of namespace: http://clojure.github.io/clojure/
02:57arrdemquizdr: because it isn't part of the core, it's a library.
02:57arrdemquizdr: this is what you really want. http://clojure.github.io/clojure/clojure.edn-api.html
02:58arrdemare you serious. edn doesn't have a writer.
02:58arrdemquizdr: pr-str is apparently your tool..
02:58quizdrright, 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?
02:59arrdemno....
02:59arrdem,(class (pr-str {:my {:complicated :datsastructure}}))
02:59clojurebotjava.lang.String
02:59arrdemyou want to to (spit "filename.edn" (pr-str {}))
03:00quizdrI'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.
03:00ivanquizdr: bind *out* to a writer
03:00dissipatearrdem, why is edn a subset of clojure data?
03:00ivanquizdr: then yes
03:00seangoneare we still computing average ages?
03:01arrdemseangone: no the bot's sandbox gc'd and killed my atom
03:01arrdems/gc'd/cycled/
03:01rplacaseangone: you and I should drive that average up :)
03:01seangonetoo bad... I was going to ,(age+ 51) :)
03:01arrdemI mean... I'
03:01seangonenearly 52 :)
03:02arrdem,(let [better-age-atom (atom {:agec 0 :ages 0})](defn age-avg [] (let [{:keys
03:02clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
03:02arrdem [agec ages]} @better-age-atom] (/ ages agec)))(defn age+ [age](if
03:02arrdem (and (< 0 age) (> 120 age))(swap! better-age-atom #(-> %1 (update-in
03:02arrdem [:agec] inc)(update-in [:ages] + age))))))
03:02rplacaseangone: maybe by the time you get to be my age, you'll understand Clojure :)
03:02arrdemfak
03:03seangonelol
03:03arrdem,(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))))))
03:03clojurebot#'sandbox/age+
03:03arrdemopen season.
03:03arrdem,(age+ 21)
03:03clojurebot{:agec 1, :ages 21}
03:03arrdem,(age-avg)
03:03clojurebot21
03:03seangone,(age+ 51)
03:03clojurebot{:agec 2, :ages 72}
03:04seangone:)
03:04quizdr,(age+ 36)
03:04clojurebot{:agec 3, :ages 108}
03:04seangonec'mon rplaca !
03:04quizdri think i can recall at least 3 others that were previously entered
03:04arrdemivan: oi. vote.
03:05rplacaI anonymized it, so you'll have to figure it out :)
03:05arrdemhaha
03:05arrdem,(age-avg)
03:05clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: age-avg in this context, compiling:(NO_SOURCE_PATH:0:0)>
03:05arrdem(dec clojurebot)
03:05lazybot⇒ 31
03:05arrdemstupid sandbox...
03:05quizdrit's a solid effort anyway.
03:06rplacaI guess my true age was lost to the sandbox :)
03:06arrdemI've done all I can do short of kick off a sandboxed nrepl instance or write a webapp...
03:06dissipatecan someone explain why edn is only a subset of clojure data?
03:07arrdemdissipate: which specific structures are you pointing to which aren't represented/
03:07arrdemdissipate: records?
03:07rplacadissipate: one reason is that it's meant to work cross-language
03:08dissipatearrdem, i don't know, i was just reading this: Reads data in the edn format (subset of Clojure data):
03:08dissipatearrdem, from the 'read' function
03:08arrdemdissipate: the reason is that some things which we would _want_ to serialize to EDN don't make sense in other languages.
03:08arrdemdissipate: for instance the clojure reader supports fn literals
03:09arrdemdissipate: which makes no sense if you're reading from Python, Java or god forbid PHP
03:09dissipatearrdem, i thought it was easy to serialize everything in clojure because everything is a value?
03:09quizdryou 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
03:09dissipatearrdem, everything in clojure is an s-expression
03:09arrdemquizdr: I mean that the reader can "read" a #() form, generate the implicit IFn and go from there
03:09dissipatearrdem, all you need to do is build a reader in another language that translates clojure s-expressions
03:09arrdem,(pr-str println)
03:09clojurebot"#<core$println clojure.core$println@153c9c7>"
03:10ssafejavaclojurebot: botsnack
03:10arrdemdissipate: ... as shown above we don't pr-str to source
03:10clojurebotThanks! Can I have chocolate next time
03:10arrdemdissipate: besides much of the source (see core) doesn't make sense to pr-str
03:10quizdrobviously if you serialzed that to a file, it would not be useful when read back in unless it already was defined and compiled, right?
03:10arrdemquizdr: bingo
03:10arrdemso serializing fns and object instances is only _rarely_ sane.
03:10dissipatearrdem, everything except the actual built-ins are s-expressions, no?
03:11arrdemdissipate: eh... only until they hit the reader
03:11arrdem,(pr-str (fn [x] (inc x)))
03:11clojurebot"#<sandbox$eval72$fn__73 sandbox$eval72$fn__73@dd7404>"
03:11arrdem,(source (fn [x] (inc x)))
03:11clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol>
03:11arrdemah crap.
03:11dissipatearrdem, so it's all a big lie. clojure has problems serializing just like any other language.
03:12arrdem,(defn demo [x] (inc x))
03:12clojurebot#'sandbox/demo
03:12arrdem,(pr-str (source demo))
03:12clojurebotSource not found\n"nil"
03:12arrdemlolz
03:12arrdemdissipate: sorta kinda
03:12arrdemdissipate: edn is a sane subset of standard datastructures which would be sane in other languages as well
03:13arrdemdissipate: maps, vecs, sets, UUIDs, dates... numbers... the things you should be sending
03:13dissipatearrdem, and what is the 'native' function for serializing s-expressions?
03:13arrdem*sending
03:13arrdemdissipate: sexprs don't really exist in Clojure at all beyond the reader.
03:13dissipatearrdem, if i want to store arbitrary clojure to a flat file, then what?
03:13arrdemdissipate: you're pretty much hosed.
03:13carkwhat 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 ?
03:14arrdemdissipate: such a thing doesn't really make sense... that said I did write a library which does this :P
03:14arrdem$googe arrdem sad github
03:14carki tried symlonks, but git goes through these, could .gitignore but that seems cumbersome
03:14arrdem$google arrdem sad github
03:14lazybot[arrdem/sad · GitHub] https://github.com/arrdem/sad
03:14ivanedn is a plot to get HAMT maps and sets into other languages
03:15dissipatearrdem, did you watch stuart holloway's video on clojure where he called out other languages for bad serialization techniques?
03:15arrdemcark: keep both somewhat seperated in the same dir tree?
03:15arrdemcark: src/myfoo/lib/ and src/myfoo/app/
03:15arrdemdissipate: can't say I have
03:16carkarrdem: right, but then i have a single project with both ? That's actually what i've been doing all these years
03:16arrdemcark: you could totally use soft symlinks to get the same effect...
03:16arrdemcark: but yeah I don't know of a really better solution TBH.
03:17arrdemsrreh.
03:17carkthat's what i tried this time...and i'm not really fond of that either
03:17carki thought maybe someone had a great workflow =)
03:18quizdrI'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?
03:18quizdrit just says no such file or directory
03:19rplacaquizdr: sh really isn't spawning a shell, iirc, it's just execing the process
03:19dissipatearrdem, damn, now i can't find the video. :(
03:19rplacaso: no variable expansion
03:20quizdrrplaca oh ok
03:23rplacabtw, if you're doing command spawning, I find that https://github.com/TheClimateCorporation/java.shell2 is a better choice
03:25quizdrrplaca interesting
03:42jph-rplaca, nice, bookmarked
03:43clgvthere is also "conch"
03:48muhoocark: try using checkouts. c.f. leinimgen docs
03:49muhoogack leiningen docs (tablet keyboard. such suck. wow.)
03:50clgvfor building projects using leiningen checkouts there is lein-checkouts btw ;)
03:56carkmuhoo: i'll investigate that
03:59borkdudeis anyone using stash here and has clj highlighting configured? it doesn't seem to work out of the box in 2.10
03:59carkmuhoo: looks like exactly what i was looking for
03:59carkmuhoo: thankls
04:21greywolvedoes anyone know what the performance implications of using ^:dynamic on a function defn are?
04:25clgvgreywolve: the same as for other dynamic variables I guess.
04:26clgvgreywolve: depends on the frequency you call it and how long the function itself runs
04:26greywolve(defn ^:dynamic db
04:26greywolve [& [name]]
04:26greywolve (d/db (if name
04:26greywolve (conn (database-uri name))
04:26greywolve (conn))))
04:26clgvgreywolve: provided the function runs long enough you wont notice
04:26greywolvewould be used for getting a datomic connection, so we can mock it
04:27clgvgreywolve: afaik you do not need a function to be declared :dynamic - there is `with-redefs`
04:27greywolveyeah but thats visible on all threads
04:27greywolvei want thread local bindings
04:29clgvis it really visible on all threads outside the scope of with-redefs? the docs are not that specific
04:30greywolve"Temporarily redefines Vars while executing the body. The
04:30greywolvetemp-value-exprs will be evaluated and each resulting value will
04:30greywolvereplace in parallel the root value of its Var. After the body is
04:30greywolveexecuted, the root values of all the Vars will be set back to their
04:30greywolveold values. These temporary changes will be visible in all threads.
04:30greywolveUseful for mocking out functions during testing."
04:30clgvhmm the implementation looks like it
04:31greywolveyeah...
04:31greywolvedo you think there will be any issues with making that function dynamic?
04:31clgvbut why is it important? why do you need mocking in some threads only while not in the others?
04:31clgvparallel testing?
04:32greywolveyeah, 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
04:33greywolveanyway*
04:34clgvwell the db function wont be called that often in performance critical spots I guess
04:34clgvso you can just declare it :dynamic
04:34greywolveawesome, thanks for the advice
04:38clgvgreywolve: you safety net is profiling after the change ;)
04:40greywolveindeed ;)
04:56AeroNotixhttps://gist.github.com/AeroNotix/1a06fdedddd8785a3307
04:56AeroNotixthis difference is kind of annoying, what's the reasoning behind it?
04:58carkit's not natural to think of strings as functions of a map
04:58carkthey could be function of their index for instance, returning a character
04:59carkof an*
05:00clgvAeroNotix: it is idiomatic to put only keyword literals in front of the map. all other map accesses should be the other way around
05:01clgvAeroNotix: since the map is treated as function that looks up the given key in itself
05:02AeroNotixIt just doesn't seem consistent
05:05clgvAeroNotix: 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
05:06Cr8keywords are nice because you can compose them
05:06AeroNotixCr8: exactly
05:07Cr8,((comp :foo :bar) {:bar {:foo 2 :baz 3} :beep 2})
05:07clojurebot2
05:07Cr8but maps-as-functions fit more into places where you'd right a function that's nothing more than a case
05:08AeroNotix,((apply juxt :a :b :c) {:a 1 :b 2 :c 3}))
05:08clojurebot#<ExceptionInfo clojure.lang.ExceptionInfo: Don't know how to create ISeq from: clojure.lang.Keyword {:instance :c}>
05:08AeroNotixw/e
05:08Cr8that is, rather than (fn [x] (case x "foo" 1 "bar" 2 "baz" 3)) just write {"foo" 1 "bar" 2 "baz" 3}
05:08Cr8&(map {1 "foo" 2 "bar" 3 "baz"} [1 2 1 2 3 2 1])
05:08lazybot⇒ ("foo" "bar" "foo" "bar" "baz" "bar" "foo")
05:09Cr8*s/right/write
05:09Cr8wtf brain
05:09clgvAeroNotix: only `juxt` not `apply` in that case
05:09clgv,((juxt :a :b :c) {:a 1 :b 2 :c 3}))
05:09clojurebot[1 2 3]
05:09AeroNotixclgv: yeah I was copying from my code elsewhere which used &rest
05:09AeroNotixforgot to remove
05:17clgvis there an option to configure the output of `pprint`
05:24noncomclgv: what you mean "configure"?
05:27clgvnoncom: number of whitespaces of identation for example
05:40quizdr clgv check out cl-format if you want a ton of options for formatting output, it is like the format API in common lisp
05:47noncomclgv: afaik no, but maybe what quizdr suggest will work
06:03clgvok thx
07:11doody1~akka
07:11clojurebotIt's greek to me.
07:17sm0kewhats the difference between doing (in-ns 'ok) vs (ns ok) on a repl?
07:20edbondsm0ke, I found some info about in-ns vs ns at http://clojure.org/namespaces
07:20edbondThe "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
07:23sm0keedbond: thanks!
07:28TheBraynhi
07:33daGrevishi! 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
07:33TheBraynI 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?
07:35llasramTheBrayn: How else would you use it? :-)
07:35TheBraynwell I'm not sure if I should use it here
07:35llasramThat 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
07:37TheBrayncould it be that lein is really really slow?
07:37TheBraynrunning a project with this takes about 3 seconds
07:38llasramSpinning up a new JVM is always slow
07:38schmirTheBrayn: that's to be expected
07:38TheBraynok
07:38llasramThe normal Clojure development process involves spinning up a REPL once, then doing everything in that
07:38edbonddaGrevis, you should find lesser greater without first elem
07:39TheBrayndoes clojure support pattern matching?
07:40quizdrTheBrayn like regex?
07:40TheBraynlike haskell
07:40daGrevisTheBrayn, it has multimethods
07:40quizdri don't know haskell but there are a number of regex and other sequence utilities for finding things in sequences and collections
07:40llasramTheBrayn: There's the core.match contrib library
07:40TheBraynok
07:40edbonddaGrevis, also < 3 branch is not needed
07:41daGrevisedbond, why should my code do extra job if I know that sorted [] is [] and sorted [x] is [x]?
07:41daGrevisedbond, that said, it should be s/3/2/
07:42daGrevisedbond, or even better, (= (count a) 1)
07:43daGrevisso far it works but I have no idea why it sorts list in reversed order. does concat do something i don't know?
07:44edbonddaGrevis, yep, you should switch > and <
07:44daGrevismy bad, argument position in anon fn
07:44daGrevisbehold, quicksort! http://vpaste.net/qbpT0
07:44edbonddaGrevis, and using (rest a)
07:45llasramTheBrayn: BTW, here's what I think is a somewhat more Clojure-conventional version of your program: https://gist.github.com/llasram/91eb3e13c66062fc7585
07:45edbondnice done! )
07:45daGrevisedbond, i could put em in let do avoid double-eval
07:46llasramTheBrayn: Clojure tends towards kebab-/levitating-snake-case over camelCase
07:46TheBraynllasram: yeah, I see that I didn't really think about some stuff
07:46llasramTheBrayn: And functions ending in `?` are generally predicates which return true/false
07:48edbonddaGrevis, maybe use group-by for lesser/greater
07:48edbond,(group-by #(< 5 %) [1 2 6 8])
07:48clojurebot{false [1 2], true [6 8]}
07:48daGrevisedbond, nice one! let me try it
07:48daGrevisbut first things first -- gotta get some coffee
07:50TheBraynllasram: why did you write not= and put the false output first?
07:50edbond,(let [{l true g false} (group-by #(< % 5) [1 2 6 8])] ["Lt" l "Gt" g])
07:50clojurebot["Lt" [1 2] "Gt" [6 8]]
07:51edbondgte actually
07:51llasramTheBrayn: 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
07:52TheBraynok
07:52llasramTheBrayn: you generally want to structure your code not to flow backwards indentation-wise
07:52TheBraynhm that sounds reasonable
07:57daGrevishow can I destruct map into two vars? http://vpaste.net/E2TWf
07:57quizdrllasram that's an interesting suggestion, haven't heard that before.
07:57quizdryou 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?
07:58llasramquizdr: I feel like I've read it written down somwhere, but I may be making things up
07:59llasramquizdr: 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
08:00llasramBut 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
08:01daGrevisgot it! any other qs suggestions? http://vpaste.net/ow3LG
08:06ndunbarbefore I finally give it up as a bad job - has anyone had success in using clj-soap with enumerated types as parameters?
08:06ndunbarif I had the choice, I wouldn't even be touching SOAP
08:07ndunbarusing github.com/uswitch/clj-soap as base
08:18Anderkent]awayllasram: parkour breaks my code coverage lib, I must be doing something wrong about handling protocols / reify :(
08:18llasramAnderkent: Yay! I mean, finding new edge cases is good, right?
08:19Anderkentllasram: I suppose :P But instrumentation errors are such a pain to debug
08:19llasramAnderkent: Is there any possibility it's a general build problem? Did you get the tests passing first?
08:20Anderkentthe tests pass without instrumentation, yeah
08:20llasramAnderkent: I ask because I just set up travis for the project, and discovered I was depending on features of the next version of Leiningen
08:20llasramOk, cool
08:20llasramOh, that's right -- it's only the full cross-Hadoop-version test matrix which had that issue
08:21AnderkentI 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
08:21llasramlol
08:21Anderkentbut fixing the current errors will probably take me a while
08:21Anderkent(well actually I know how I should fix the conditional include)
08:22llasramWell, 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
08:22Anderkent(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)
08:22llasramAhhh
08:22Anderkentwell, 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
08:23llasramSend them my way and I will take a gander
08:23AnderkentERROR in (test-tuple-roundtrip) (Reflector.java:271)
08:23AnderkentUncaught exception, not in assertion.
08:23Anderkentexpected: nil
08:23Anderkent actual: java.lang.IllegalArgumentException: No matching field found: key_class for class parkour.io.dsink$sink_for$reify__2941
08:23Anderkent 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
08:23Anderkent687$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)
08:23Anderkent woups
08:23llasramheh
08:23Anderkentbad me
08:23Anderkenthttps://www.refheap.com/34425
08:24llasramOh, I know what this is, kind of
08:24Anderkentthe thing is I don't enter deftype forms anyway, so it must be something *around* them that I'm messing up
08:24Anderkentor possibly recompilation issues
08:24llasramI'm doing the dnolen-style naming of private protocol functions as prefixed with '-'
08:25llasramBut of course `.-foo` is now the field-access syntax
08:25llasramClojure 1.5 throws warnings when compiling some of this because of that... It's fixed in Clojure 1.6. Let me find the ticket
08:26llasramThis is BTW the single biggest reason I am excited about 1.6 :-)
08:27llasramAnderkent: Here we go: http://dev.clojure.org/jira/browse/CLJ-1202
08:28llasramNot 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 :-)
08:30Anderkentllasram: 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
08:31llasramCool beans
08:31llasramI need to take off now, but good luck!
08:32Anderkentllasram: see ya and thanks again
08:36quizdrkeep it real yall
08:38myguidingstarHi 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
08:38myguidingstarthe library is here https://github.com/Kaleidocs/merge
08:39myguidingstarthe branch for packaged jar is here https://github.com/Kaleidocs/merge/tree/packaged
08:40Anderkentmyguidingstar: how does it fail? Can you refheap the errors
08:42daGreviswhat would be the best way to generate big vector of random numbers?
08:42daGreviss/number/int/
08:43Anderkent,(take 20 (repeatedly #(rand-int 0 100)))
08:43clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core/rand-int>
08:43daGrevisi guess (repeatedly 100 #(rand-int 10)) is a way
08:43Anderkentoups
08:44Anderkentyeah or that
08:44Anderkentunless you have very strict performance requirements or need the numbers to be deterministicly random (i.e. control prng state)
08:45myguidingstarAnderkent, Exception in thread "main" fr.opensagres.xdocreport.core.XDocReportException: Null template engine. Set template engine with IXDocReport#setTemplateEngine.
08:45daGrevisnop, I'm okay.
08:45daGrevisi just need to test speed of my quicksort
08:46scape_consider using a benchmark library
08:46daGrevisscape_, what's wrong with time fn?
08:47scape_it has limits, as well GC might interfere-- depending
08:47myguidingstarAnderkent, I made a sample file in the 'packaged' branch, you can check it out
08:47scape_https://github.com/hugoduncan/criterium is popular
08:47daGrevisthanks, I will take a look
08:47myguidingstar`lein run` works while `lein uberjar; java -jar target/...` fails
08:49Anderkentmyguidingstar: 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.
08:51myguidingstarAnderkent, do you mean java -cp somefile.jar:other.jar ?
08:54myguidingstarAnderkent, thanks, I'll dive into it now
09:11katoxdatomic q: is it possible to use db.fn/cas with temp-id for upserting things?
09:15stuartsierrakatox: Datomic upsert is automatic with 'unique: identity' attributes.
09:15katoxstuartsierra: yes, that's what I have there. It works fine without cas
09:16katoxstuartsierra: If I add cas into transaction I must specify an existing entity id (instead of negative tempid)
09:17katoxstuartsierra: if I pass a temp id the cas-ed attr behaves like nil
09:19stuartsierraI can see why that would happen. `cas` looks at the database *before* the transaction. Upsert happens *after* the transaction.
09:22mdrogalisstuartsierra: Component question. Have you come up with a naming convention for when you have more than one 'system'?
09:22mdrogalisI can't find a less awkward word than <describer>Subsystem
09:23katoxstuartsierra: 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?
09:24katoxstuartsierra: if that's so, it seems like a bug because the same temp-id must have different values within a single tx
09:25stuartsierrakatox: I don't really know.
09:25stuartsierraI don't think I would combine `cas` and upsert in the same transaction.
09:26stuartsierraUse one transaction to assert that the new entity exists, get its id, then another to cas the other attribute.
09:26stuartsierramdrogalis: I have never encountered a situation where I needed more than one system.
09:26scape_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.
09:27katoxstuartsierra: yeah, I'll probably end up doing exactly that, splitting creation and update, that works
09:27katoxstuartsierra: thanks for an exaplanation though, it seems logical
09:28stuartsierrakatox: you're welcome
09:30mdrogalisstuartsierra: Got'cha.
09:31mdrogalisI should probably just split it into multiple jars I guess.
09:31stuartsierramdrogalis: I discovered that it's possible to 'merge' systems as long as your keys don't clash.
09:33Anderkentkatox: hard to say without seeing your code.
09:34katoxAnderkent: unfortunately not that simple I can try to simulate that on some datomic example though, if you're interested
09:35Anderkentkatox: yeah, if you can create a repro that'd help. Otherwise maybe just post your ns form?
09:35mdrogalisstuartsierra: Hm, that's an idea.
09:35mdrogalisI suppose there's no harm in it, really.
09:37Anderkentkatox: what you describe sounds really bizzare, though... Do you maybe have something weird in your lein profile? :repl-options :init, maybe?
09:38stuartsierraAnderkent: Did you mean to address scape_ ?
09:38Anderkentyes
09:38Anderkentboth times
09:38Anderkent;_;
09:38scape_oh
09:38scape_:D
09:38AnderkentSorry!
09:38Anderkentnot sure where that came form
09:38katoxAnderkent: nothing special in project.clj or profile, only clj-stacktrace injections
09:39Anderkentkatox: yeah, sorry about that, ment scape_
09:39Anderkentscape_: hard to see without seeing your code! :P
09:39Anderkent*say
09:39scape_well once it's up and running, i can eval the whole buffer and it's fine
09:39Anderkentgoddamnit, brain
09:39scape_one sec let me paste some
09:40katoxAnderkent: ;) I'll try to reproduce that on day of datomic, I hope there is some unique identity attr ;)
09:40scape_refresh that link: https://www.refheap.com/34428
09:41scape_it's strange to me too :-\ Anderkent
09:41scape_oh shoot
09:41scape_the namespace is addressed wrong
09:41scape_one sec
09:41scape_that's probably it
09:42scape_well dang Anderkent I should have takena closer look :) thanks got it working now
09:52effydo 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)
09:52clgveffy: that's mostly different parts of the standard lib
09:53stuartsierraeffy: I always recommend the Sun/Oracle Java tutorials for that purpose.
09:53clgveffy: I wouldnt go and read about arbritrary library documentation. you can learn the lib when you need it
09:53stuartsierraThey're quick, and you can pick and choose the features you need to know about (I/O, for example)
09:55effyok, thanks
10:00joegalloeffy: 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:02teslanickWow, yeah. Java 2.
10:02effyjoegallo: 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:03clgveffy: we recommended this list of books to our students: http://www.uni-ulm.de/in/theo/lehre/archiv/ss-2013/pi1000.html
10:03clgveffy: under "Literatur"
10:03teslanickFor zee germans
10:04clgvmost are probably translations of english book and a few english ones are among them ;)
10:04teslanickI think my Java book is "Learning Java" by O'Reilly.
10:05teslanickBut that was my CS 001 textbook, so it might be a bit elementary.
10:06teslanickeffy: 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:11effythanks 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:15devthhow can i make a function call on a fresh stack? would (future (somefn..)) do it?
10:17clgvdevth: why a fresh stack? did you spoil the other? ;)
10:18devthclgv: essentially :)
10:18devththere is a better way to solve this in the long term but this will serve as a quick hack to prevent stackoverflows
10:19devthbasically i'm at a very deep point in the stack, searching through a series of many hooked functions (using robert-hooke lib)
10:19devththen i need to restart the search and don't care about the current context
10:19devthalso: just curious
10:23clgvjust write a proper tail-recursion if you get a stack overflow for your data ;)
10:23devthyeah i know the "right" way to fix this, but still curious
10:23devthhow do you drop the current stack and start over? new thread?
10:25borkdudeClass names must start with a lowercase letter, I'm reading now
10:26clgvwell a new thread has a smaller stack
10:26clgv(require 'clojure.stacktrace)
10:26clgv,(require 'clojure.stacktrace)
10:26clojurebot#<SecurityException java.lang.SecurityException: denied>
10:26clgv(future (clojure.stacktrace/print-cause-trace (Exception.)))
10:26borkdudefunny when you take that out of context
10:26clgv,(future (clojure.stacktrace/print-cause-trace (Exception.)))
10:26clojurebot#<CompilerException java.lang.ClassNotFoundException: clojure.stacktrace, compiling:(NO_SOURCE_PATH:0:0)>
10:27clgvdevth: well just try the above on your repl
10:27devthyep
10:27clgvdevth: but I doubt that'll help much
10:27devthright
10:29tim2Can anyone recommend a clojure specific news web site? (similar to tss, infoq etc)
10:30borkdudetim2 planet.clojure.in (blog aggregator)
10:33myguidingstarAnderkent, I tried and find out I must add a jar (fr.opensagres.xdocreport.document.odt) to classpath when exec the standalone uberjar
10:34Anderkentmyguidingstar: 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:34myguidingstarI open the uberjar and it seems to contain things found in the above jar
10:34Anderkentif they arent included, there's your bug - now just to figure out why :P
10:34myguidingstarthey are included, so?
10:35tim2borkdude: thanks
10:35Anderkenteh. 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:35Anderkentit's an issue with the xdocreport framework, not lein
10:36myguidingstarsorry, I don't know the java things :|
10:36clgvtim2: the CLojure Mailing List
10:38myguidingstarAnderkent, I tried to copy all the single jar content to the standalone one but it still fails
10:39Anderkentmyguidingstar: yeah, I can't help you there. You'd have to look at how the library you depend on is detecting the templates.
10:39myguidingstarthat means it's the issue with xdocreport
10:39Anderkentyeah
10:40myguidingstarOK, thanks a lot. I didn't even think about adding additional jars
10:44katoxok, isolated
10:44katoxAnderkent: stuartsierra: https://gist.github.com/katox/8865082
10:46mklappstuhl__trying to use lein-garden but I keep getting: java.lang.ClassNotFoundException: java.nio.file.Files
10:46mklappstuhl__I have my stylesheet in a different namespace than core but adjusted the plugin map in project.clj accordingly
10:49clgvmklappstuhl__: sounds as if you are running a JDK/JRE without java.nio
10:49mklappstuhl__clgv: I think the problem is related to the fact that the project is a cljs one
10:50rurumateI 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:50Anderkentmklappstuhl__: are you on java7 or java6?
10:50clgvmklappstuhl__: you definitely need java7 for that class ^^
10:52mklappstuhl__how do I figure out which version I ahve? java -v isn't a thing
10:52rurumatewill (future) always create a new thread, or will it try to use a thread pool?
10:52katoxmklappstuhl__: java -version
10:53mklappstuhl__java version "1.6.0_65"
10:53Anderkentmklappstuhl__: yeah, you need to install java 7
10:53mklappstuhl__does that mean I'm on 6
10:53katoxmklappstuhl__: y
10:54llasramOr that plugin needs to fix itself to not depend on Java 7
10:55Anderkentllasram: yes, but one of these is something that mklappstuhl__ can do right now :)
10:56mklappstuhl__I guess jdk-7u51-macosx-x64.dmg sounds right, eh?
10:58AnderkentI wish one could just `brew install java7`, but alas no. jdk-7blahblah.dmg sounds right.
10:58gfredericksI 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:59mklappstuhl__Anderkent: yeah, that would be great
10:59gfredericksis that an obsolete warning now?
10:59mklappstuhl__can anyone point me to some resource explaining how to setup a clj + cljs project?
11:00Anderkentgfredericks: I guess it's more that you're relying on undocumented behaviour than obviously wrong
11:00Anderkentgfredericks: but afaik it's WOG that keys order == vals order == seq order nowadays
11:00mklappstuhl__WOG?
11:01Anderkentword of god
11:01Anderkenti.e. rich
11:01mklappstuhl__haha
11:01gfredericksAnderkent: so...it IS documented then, right?
11:01gfredericksor at least will be once that patch gets accepted?
11:01Anderkentdocumented in 1.6 I think
11:01gfredericksso there's nothing to gain by warning about it?
11:01mklappstuhl__I read Rich's post but didn't completely understand it :D
11:02Anderkentgfredericks: I still feel like it's slightly wrong? Dunno.
11:02gfredericksAnderkent: in general or prior to 1.6?
11:03Anderkentin 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:03Anderkentbut I might just not be very imaginative! :P
11:03gfredericksThe 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:03TimMcgfredericks: Except for if vs. when
11:04gfrederickslooks like ambrose added this six days ago, so maybe he knew about rich's comment?
11:04gfredericksI'll file an issue at least
11:04Anderkentgfredericks: 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:04Anderkent*other
11:05Anderkentgoddamnit what's with me and spelling today
11:05gfredericksthe additional contractual obligation exists though
11:05Anderkentthat's not relevant :)
11:05AnderkentI mean, if the contractual obligation wasn't there, it'd be WRONG
11:05Anderkentnow it's just unnecessary
11:06gfredericksiterating over the whole map makes it less obvious what you're doing
11:06gfredericks(zipmap (keys m) (map f (vals m))) makes it obvious that I'm leaving the keys alone
11:07Anderkent(into {} (for [[k v] m] [k (f v)])) is pretty obvious too?
11:08AnderkentEh, dunno. I might be making the impression that it's a bigger deal to me than it really is
11:08Anderkentbut i feel like it's okay to have a warning like that
11:10mklappstuhl__now, after updating java everything seems to stop after Compiling Clojurescript/Compiling Garden and nothing gets compiled
11:10RaynesAnderkent: Maybe we should issue warnings about otters/
11:11AnderkentRaynes: only the other, odder otters?
11:11RaynesYes.
11:11Anderkentutterly
11:12devthclgv: did some stack size exploration. it looks like future does reset the stack: https://gist.github.com/devth/8865799
11:13Anderkentdevth: yes, futures run in a separate thread. Not sure if a fresh one or if they go to the agent threadpool
11:14devthAnderkent: that's what i assumed, and what i originally asked above
11:14ambrosebsgfredericks: obsolete warning
11:15ambrosebsgfredericks: FWIW it's undocumented in 1.5.1
11:15ambrosebsgfredericks: but I'm going remove it the warning anyway
11:15Anderkentambrosebs: gfredericks: actually I checked and it's still not documented in 1.6.0 either :P
11:16ambrosebsAnderkent: I don't think 1.6 is out yet :)
11:16gfredericksambrosebs: I could send a PR with those two lines deleted if you'd like
11:16ambrosebsgfredericks: fantastic
11:16ambrosebsgfredericks: you've got a CA right?
11:18ambrosebsgfredericks: nvm found you.
11:20gfredericksambrosebs: I'm looking at dynalint in detail for the first time; I'm interested in how easy it is to customize
11:20gfredericksboth adding custom warnings and suppressing existing warnings
11:21gfrederickswarnings & errors rather
11:21ambrosebsgfredericks: yes. I was also thinking suppressing warnings based on regex on stack traces.
11:22gfrederickshow do warnings relate to stack traces?
11:22gfredericksor do you mean stack traces *not* taken from actually thrown exceptions?
11:23ambrosebsgfredericks: so dynalint.lint/warn throws an exception and immediately catches it just for a stack trace.
11:23ambrosebsyou can get this with print-warning.
11:24ambrosebsyou might have a rule that suppresses a warning based on the stored stack trace
11:24gfredericksthe use case being suppressing it for only one usage?
11:25ambrosebssay 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:26ambrosebsit's simplistic, but so is everything else in dynalint :)
11:27ambrosebsgfredericks: dynalint was my January break from Typed Clojure, patches are very welcome at this point.
11:27mklappstuhlI just updated java and now every time I juse lein cljsbuild auto it is stuck at "Compiling ClojureScript."
11:29gfredericksambrosebs: this sounds super fun to extensibilize, I'm gonna be noodling it
11:29Anderkentmklappstuhl: no other output at all?
11:29mklappstuhlAnderkent: none
11:30ambrosebsgfredericks: yep I've had too much fun so far :)
11:30Anderkenthm, try a clean build just in case it's something like that
11:30gfredericksambrosebs: I'm also interested in ways to support multiple versions of clojure from the same codebase
11:30ambrosebsgfredericks: that would be preferable
11:31ambrosebsgfredericks: by definition there is one dynalint version per release.
11:31gfredericksambrosebs: I don't understand that second statement
11:32ambrosebsgfredericks: I meant dynalint depends on implementation details of clojure. each clojure release should have explicitly different behaviour in dynalint
11:32mklappstuhlAnderkent: that apparently fixed it for cljsbuild. not for lein garden though. but thats another issue then. thought it was related to the update
11:32ambrosebseg. current version is 1.5.1 *only*
11:33ambrosebsgfredericks: it'd be a might pain if that meant different release jars for dynalint
11:33clgvwhy does `sort` return an ArraySeq instead of a vector?
11:33ambrosebs*mighty pain
11:33ambrosebs,(doc sort)
11:33clojurebot"([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:34clgvno answer over there ;)
11:34ambrosebsclgv: why did you think it would return a vector?
11:34ambrosebs(I was just checking the docs myself in IRC hehe)
11:34gfredericksambrosebs: 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:34clgvambrosebs: since it uses arrays under the hood anyway and it would be pretty useful to have O(1) lookups on the result
11:34ambrosebsgfredericks: yes
11:35clgv,((sort (range 10)) 3)
11:35clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to clojure.lang.IFn>
11:35gfredericksclgv: shoving it into a vector involves copying the whole thing again
11:35clgv:( ^^
11:37Anderkentgfredericks: not sure whether o(1) lookups or o(1) head/rest are more common with sort
11:37mklappstuhlis there any place where I can read up on how to use cljs and clj in one project? :)
11:38Anderkentgfredericks: 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:38clgvwell ArraySeq has efficient reduce but not efficient nth
11:38clgvit seems
11:38`cbpmklappstuhl: maybe a web framework's docs like pedestal or caribuou if you're doing webdev
11:39gfredericksAnderkent: a vector is not implemented on top of a single array
11:39sritchiecemerick: posted an issue with the stacktrace I get when my emacs repl starts hanging - https://github.com/cemerick/piggieback/issues/23
11:39Anderkentgfredericks: it is if you (vec array)
11:39gfredericksso converting from an array to a vector is O(n)
11:39TimMcMmmm... not sure about that.
11:39Anderkentoh, my bad, only if array is shorter than 32 items
11:39sritchiecemerick: 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:39novocharHow do you reason about ASTs? I've heard that a lot of can reason about their software's AST more easily.
11:39sritchieseangrove: are you on emacs too?
11:40sritchieseangrove: I'm wondering if some other nrepl middleware is getting in the way...
11:40sritchiecemerick: what editor do you use? and are you on cider?
11:40cemericksritchie: yeah, that's a mostly generic nREPL interrupt exception
11:40cemericksritchie: using emacs+cider latest
11:40sritchieme too...
11:40sritchie0.6.0alpha
11:41sritchiecalling connect manually in chrome gives me two responses, and no action in emacs
11:41sritchieyou were saying there were supposed to be three, and when a connection succeeds, the third pops up
11:42cemericksritchie: does a simple cemerick.austin.repls/exec call work for you?
11:42sritchielet's see
11:43sritchieyeah, that works, actually
11:43sritchiehttps://gist.github.com/sritchie/8866475
11:44sritchiethat's what I've been doing to connect
11:44sritchiecemerick: what's the difference between what I"m doing and a straight-up exec/
11:44sritchie?
11:44sritchiecemerick: I have to do all that of that maybe-resolve stuff because of the AOT compilation issue
11:47sritchiecemerick: okay, read the docs. unclear whether my existing app can connect to exec-env
11:47cemericksritchie: I suspect a problem with how you're getting the generated client-side js into the page
11:47mklappstuhl`cbp: it seems that you can just mix them in the same directories
11:47mklappstuhlat lest pedestal does it partly that way
11:48sritchiecemerick: well, all the code's available at the chrome console;
11:48cemericksritchie: exec-env just automates the start of the browser env, whether phantom or chrome or whatever
11:48sritchiecemerick: so if I do that, I can't send commands back to my existing, running app, right?
11:48rkneufeldmklappstuhl: cljx is something to look at. Maybe take a look at dnolen's mies template.
11:48rkneufeld(not related)
11:49sritchiecemerick: about the client side - all my cljs is available at the chrome console
11:49sritchiecemerick: and I've been manually calling that "connect" snippet
11:49cemericksritchie: that's not saying much. How are you calling connect?
11:49cemerickso you're not using the (browser-connected-repl-js) helper?
11:49sritchieyes, I am
11:49sritchiebut it doesn't work every time
11:49sritchiesometimes it does,
11:50sritchiebut it's very finicky
11:50sritchie(thanks for talking this through)
11:50cemericksritchie: what do you mean by "manually calling connect"?
11:51sritchielike, 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:51sritchie;goog.require('clojure.browser.repl');clojure.browser.repl.connect.call(null, 'http://localhost:53152/3337/repl');
11:51sritchieusually that works after two pastes
11:51sritchieand there are no errors in the console,btw, so I'm not including them in the wrong order
11:51scape_what would (<! (timeout 0)) do, park the go block momentarily? http://swannodette.github.io/2013/08/02/100000-processes/
11:51sritchiecemerick: here's my scripts section: https://gist.github.com/sritchie/8866600
11:52tbaldridgednolen: is there an easy way to use the latest goog libs with cljs?
11:52sritchiecemerick: it's almost like if I make a call at the cljs repl in emacs,
11:52sritchiecemerick: and then the browser tries to connect, the connection's blocked
11:52sritchieand I have to do some thread killing and manual massaging at the chrome console
11:54bbloomscape_: yeah, that's basically yielding to other running routines
11:54cemericksritchie: have you tried Firefox?
11:54sritchieis that what you develop with?
11:54sritchieseangrove: are you on chrome?
11:54scape_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:55sritchiecemerick: maybe that's why you're not experiencing any of these bugs...
11:55mklappstuhlrkneufeld: I'm using dnolens mies template
11:55cemericksritchie: I use Firefox and Chrome, but https://github.com/cemerick/austin/issues/17
11:55bbloomscape_: 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:56sritchiecemerick: this stuff even happens in private browsing mode
11:56scape_bbloom: oh, i've seen it in python in gevent (concurrency model)
11:56mklappstuhlrkneufeld: 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:56bbloomscape_: 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:56cemericksritchie: does it work in firefox?
11:56sritchietrying
11:56mklappstuhltbaldridge: how to you mean — use the goog libs?
11:57bbloomscape_: 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:57rkneufeldmklappstuhl: 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:57scape_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:57tbaldridgeI 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:57bbloomscape_: are they pooling the stream as fast as possible?
11:57bblooms/pooling/polling
11:57mklappstuhlrkneufeld: thanks for that offer & no rush — maybe I figured it out on my own by then :)
11:58bbloomscape_: and i ask again: clj or cljs?
11:58scape_yes. basically they do: (if (> (.available ins) 0), i'm on jvm
11:58sritchiecemerick: ugh
11:58sritchiecemerick: let me figure out how to get firefox working with https...
11:58sritchiesince I can't hit the cljs repl on http from my local https env
11:58bbloomscape_: ok, my suggestion is: do not poll the streams
11:59bbloomscape_: instead, use real threads (clojure.core.async/thread ...) instead of /go and use <!! and >!! instead for real blocking (Not parking)
11:59scape_the only way around no polling them is to implement nio :-\
11:59bbloomscape_: then *block on the thread*
12:00sritchiecemerick: nope
12:00bbloomscape_: that's not true at all. just call .read() and let it block
12:00sritchiecemerick: get, and a post, and then totally stuck
12:00scape_well real threads don't scale as well, I was shooting for like 300-500 if possible
12:00bbloomscape_: do you have 300 to 500 streams?
12:00bbloomscape_: b/c polling scales worse than threads :-P
12:00scape_hah ok
12:00bbloomscape_: how many streams do you have?
12:01sritchiecemerick: is there some order? like, don't do anything at the repl until firefox tries to connect...
12:01sritchieor something like that that you just subconsciously respect now since you know what you're doing?
12:01scape_my hope is that many
12:02cemericksritchie: 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:02sritchieyeah, I do the same thing. then you load the page...
12:02sritchieand if you reload and try to eval, you get a BrokenPipe, probably?
12:02sritchiereload the page, that is
12:03bbloomscape_: frankly, i think 300 to 500 threads will probably do just fine on a modern server
12:03bbloomscape_: just wrap each stream in a async thread thinggie and then use go routines for everything past that
12:03bbloomscape_: http://www.slideshare.net/e456/tyma-paulmultithreaded1
12:04scape_okay, thanks bbloom . i'll simplify and go with threads :)
12:04sritchiecemerick: it's wild that you've never had an unresponsive repl
12:04scape_thx ill check it out bbloom
12:04cemericksritchie: 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:04bbloomscape_: plus, if you don't have 300 to 500 threads *now* you can always swap out for a different approach later
12:04cemericksritchie: does the browser-connected-repl sample in the austin repo work in your environment?
12:04sritchiecemerick: 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:05sritchielet's see
12:05cemericksritchie: well, apparently FF doesn't work for you either, so that's something different.
12:05scape_interesting talk, how'd i miss this! bbloom :D
12:05cemerickNot sure what to say, but I can only fix what I can reproduce.
12:06bbloomscape_: 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:06bbloomscape_: make it right, make it fast. in that order!
12:06scape_hah ok
12:07scape_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:08bbloomscape_: 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:09sritchiecemerick: 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:09sritchiecemerick: I'll try to get you a case that repros it
12:09bbloomscape_: if you avoid NIO's eventing system and instead only use selectors, that makes sense & is pretty nice to work with
12:09sritchiecemerick: 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:10scape_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:10bbloomscape_: just do one thread per stream and optimize later
12:10scape_okay
12:10bbloomscape_: if you've never done this sort ofthing before, i'm 98% sure that your optimizations will actually make things worse
12:11scape_haha probably right
12:13cemericksritchie: 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:13cemerickI just have too much going on to provide personalized debugging, etc. :-)
12:13sritchieno, they match - verified at the top of the REPL and by looking at my HTML
12:13cemericksritchie: well, we can scratch that off the list then
12:14sritchiecemerick: yeah, you said that yesterday - I'm only asking because this feels like a problem that affects many users of your library
12:14sritchiecemerick: and I want to help get it fixed, so that everyone can benefit
12:15sritchiecemerick: 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:15sritchiecemerick: anyway, I guess I'll try to break the demo in the austin repo
12:16cemericksritchie: I was just referring to my getting set up with your particular project, etc., as opposed to a minimal repro.
12:19cemericksritchie: 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:20sritchiecemerick: 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:20sritchiecemerick: I'll try to repro on that austin project
12:21cemericksritchie: if it were that easy, I'd have provided advice like that :-P
12:21sritchiewell, here's one error already in the example project
12:21sritchiecemerick: go through the tutorial, call :cljs/quit,
12:22sritchiethen try evaluating the repl-env variable you create
12:22sritchieOutOfMemoryError Java heap space java.util.Arrays.copyOf (Arrays.java:2367)
12:22cemericksritchie: this is after getting a working browser REPL?
12:22sritchieyeah
12:23cemerickthen, I'm not so worried about that at the moment. :-)
12:23gfredericks,(let [a (into-array [1 2 3]), v (vec a)] (aset a 0 42) [(seq a) v])
12:23clojurebot[(42 2 3) [42 2 3]]
12:23sritchiecemerick: I can typically get it once
12:23gfredericks^I feel like this is a little surprising
12:23sritchiethen a page reload nukes it
12:23gfredericksoh wait
12:23gfredericksthe docstring does indeed mention that behavior
12:23gfredericksfalse alarm
12:24sritchiecemerick: yeah, I mean, this example fails if you :cljs/quit and then run the repl again
12:24sritchiesame bug as I've been experiencing
12:24cemericksritchie: -XmxNNNm
12:25cemerickIIRC, lein-cljsbuild always runs with a non-default heap size b/c the CLJS compiler / gclosure compiler isn't easy on memory, etc.
12:25sritchiewhy does that affect the repl task?
12:26cemerickbecause you're hosting the CLJS compiler to compile core.cljs, your expressions to JS, etc
12:26logic_progs the only svg element that clips a group the <svg> element ?
12:27logic_proglet me rewrite the above:
12:27logic_progI 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:27sritchiecemerick: okay, reproduced...
12:28sritchiefollow your tutorial, run (cemerick.austin.repls/cljs-repl repl-env),
12:28sritchie:cljs/quit
12:28sritchie(after getting everything working, run :cljs/quit)
12:28sritchiethen call (cemerick.austin.repls/cljs-repl repl-env) again
12:28sritchieava.lang.NullPointerException
12:29AeroNotixis anyone using lein-daemon?
12:29sritchiecemerick: ugh, it is more reliable here. I'll keep playing.
12:29AeroNotixit works fine locally, but on my CI server the start daemon command just hangs -- it creates the pidfile though?
12:30AeroNotix(alternately, some ideas on how to start a compojure app in jenkins and then run tests on it would be great.)
12:31cemericksritchie: 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:31sritchiecemerick: looks like the terminal repl works great,
12:32sritchiebut my emacs setup is acting like my project was - I'll try removing some nrepl plugins, etc
12:32sritchiecemerick: if I can find the thing that's hosed with my setup I'll report back
12:32cemericksritchie: def, thanks
12:32sritchiecemerick: I'm suspicious of ac-nrepl. we'll see how my paranoia fares :) thanks for fielding the comment blast :)
12:35seangrovesritchie: Emacs, chrome/firefox both have the same problem
12:36sritchieseangrove: do you have ac-nrepl installed?
12:36seangrovesritchie cemerick: An interesting case that breaks the repl last time I was debugging: https://www.refheap.com/da489c6664be35717f3f514a5
12:38cemerickseangrove: I don't know what I'm looking at?
12:39seangrovecemerick: 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:39seangroveI thought maybe the cljs repl somehow relies on throwing errors, etc.
12:39cemerickseangrove: oh, I see. That's a little crazy.
12:39seangrovecemerick: 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:40cemerickseangrove: You mean for control flow? No, not that I know of. Does the same behaviour hold w/ the stock CLJS brepl?
12:41cemerickseangrove: so do things work OK when setup* throws an error? Also, is the js/Object intentional?
12:42seangrovecemerick: the js/Object was just while iterating fe a different things. I've never tried brepl before.
12:42cemerickok, was wondering if non-Errors were expected, etc
12:43cemerickseangrove: I've never heard of particular userland code prompting REPL failure, so do file an issue eventually
12:43seangrovesritchie: Looks like ac-nrepl isn't installed.
12:44sritchietrying with ac-nrepl uninstalled
12:50sritchieseangrove: ugh
12:50sritchieseangrove: what is it about our emacs setup that's causing this...
13:09hfaafbwith assoc i can pass in multiple key value pairs
13:09hfaafbbut not so with assoc-in
13:10hfaafbwhats an alternative to assoc-in, where my collection is a 2d vector
13:11hfaafbthat i can change the value of 2 pairs of indices
13:29seangrovesritchie: I don't think it's emacs, personally, but I'd need to check the brepl stuff to be sure
13:30sritchieseangrove: I'm trying to create a smaller project with less deps to see if it works..
13:30sritchieyeah, seriously frustrating, though
13:31seangrovesritchie: 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:31sritchiefor sure, it'll be great
13:31seangrovesritchie: 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:31sritchieme too
13:33x^2can someone help me understand the 'flow' of a program i am looking to write in clojure?
13:33pbostromjumping 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:33x^2i know icould write it- but im wondering about doing it functionally.
13:33bbloomhey 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:34bbloomhow do you deal with (comment .............) stuff and evaling in there at the bottom of your file test code?
13:34pbostrombbloom: I usually eval top-level form
13:34bbloomand how do you utilize full-file re-eval?
13:34seangrovebbloom: Initially load the file, then C-c C-c to eval the top level form of whatever form I'm in
13:34bbloomseangrove: what does that do if the top-level form is (comment .....) for bottom of file test code?
13:35seangrovebbloom: In that case I jump to the end of the form and C-x C-e to explicitely eval the previous form
13:36bbloomah ok so you intentionally use two separate bindings there
13:36bbloomtpope 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:37seangroveCan't say if it's better or worse, but it's what we (I) have in emacs
13:37sverihi, 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:38bbloomsveri: map is lazy
13:39bbloomsveri: oh sorry, misread. hm
13:39bbloomsveri: you just need to CALL get-releases
13:39redingersveri: (first (get-releases))
13:39bbloom(first (get-releases))
13:40sveribbloom: redinger jeez, again, I made that mistake some time ago :D
13:40sverithank you very much, god, I feel so stupid
13:40ontoillogicalIs 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:41bbloomontoillogical: use get-in or ->
13:41ontoillogicalbbloom: get-in! that's what I wanted
13:41LLKCKfanIs there any natural ways to relieve pain without using herbs or weed? No drugs
13:41ontoillogicalthanks (I'm just starting clj)
13:43bbloomontoillogical: 4clojure.com is a great place to learn idioms (and/or golfing techniques)
13:43bbloomontoillogical: follow some top users & do some puzzles there. see also the cheatsheet
13:43bbloom~cheatsheet
13:43clojurebotCheatsheets with tooltips can be found at http://jafingerhut.github.com/ .
13:44ontoillogicalbbloom: thanks. I find working through a project the best way to learn a language, but you miss idioms that way
13:44bbloomontoillogical: yup, hence the 4clojure suggestion :-)
13:45llasramLLKCKfan: Such as a natural substance derived from the beautiful poppy flower?
13:46ontoillogicalbbloom: what does following someone on there mean?
13:46ontoillogicaldo I get updates when they solve new problems?
13:46bbloomontoillogical: no
13:47bbloomontoillogical: when you solve the puzzle, you see their solutions
13:47ontoillogicalah way better
13:47koreth_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:49scottjkoreth_: maybe that's because of security issues.
13:49LLKCKfanv
13:49LLKCKfanIs there any natural ways to relieve pain without using herbs or weed? No drugs
13:50sm0keLLKCKfan: are you a bot?
13:50sm0kefkn bots
13:50llasramclojurebot: bots?
13:50clojurebotNo entiendo
13:51llasramclojurebot: bots are annoying, except for clojurebot
13:51clojurebotHuh?
13:51llasramOh well -- I tried
13:51llasramOk, one more try, then I'll give up:
13:51sm0kei think we should have a bot which would mine chat data and triggers alarms for trolls
13:51LLKCKfanNot a bot
13:51llasramclojurebot: bots |are| annoying, except for clojurebot
13:51clojurebotAlles klar
13:51llasramclojurebot: bots?
13:51clojurebotbots are annoying, except for clojurebot
13:52llasramwoot
13:52pjstadigllasram: you're getting pretty good at that
13:52sm0kewhoa
13:52sm0keclojurebot runs on datomic
13:52sm0kestores *facts*
13:52llasramI believe clojurebot well predates datomic :-)
13:53llasrampjstadig: I've got to live up to that "bot whisperer" title!
13:53pjstadigi think it actually runs on the JVM to be precise
13:53pjstadigdoes it use datomic now?
13:53stirfooI started playing with sqlkorma and sql in general. Is using a hyphen in column names going to present any future problems?
13:53daccLLKCKfan: uh, physical therapy?
13:53stirfooshank-dia for instance instead of shank_dia or shankDia. The latter don't mesh very well with lisp symbol naming conventions.
13:54sm0keLLKCKfan needs lisp
13:54LLKCKfandacc Tried no help
13:54sm0kehe has rsi
13:54LLKCKfanIf anything makes the pain worse
13:54pjstadigdashes vs underscores are the bane of my existence
13:54sm0kelisp reduces your coding time hence pain
13:55sm0keclojurebot: sex?
13:55clojurebotIt's greek to me.
13:56sm0keclojurebot is a virgin
13:57stirfooseems the common naming convention for sql is underscore or camel case, but with korma I can use symbols or keywords to reference them
13:57TimMcLLKCKfan: http://ergoemacs.org/emacs/using_voice_to_code.html
13:57stirfooBit off topic I realize.
13:57daccLLKCKfan: you're talking about RSI pain?
13:57daccLLKCKfan: do you get plenty of cardio?
13:58sm0keclojurebot: sex |is| updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk;
13:58clojurebotRoger.
13:58sm0keclojurebot: sex?
13:58clojurebotsex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk;
13:58sm0kein think finger is too early
14:01`cbp._.
14:02TimMc"cd" is clever
14:02sm0keclojurebot: 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:02clojurebotAlles klar
14:03sm0keclojurebot: sex?
14:03clojurebotsex 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:03sm0keclojurebot gets some tips from vimgor
14:11gfrederickswhat just happened here
14:13bbloom,clojure.lang.PersistentQueue/EMPTY
14:13clojurebot#<PersistentQueue clojure.lang.PersistentQueue@1>
14:13bbloom,(clojure.lang.PersistentQueue/EMPTY)
14:13clojurebot#<PersistentQueue clojure.lang.PersistentQueue@1>
14:13bbloomhmm... is that some interop thing about static functions i don't know or understand?
14:15llasramWhoa -- how does the second one work?
14:16gfredericks,Math/PI
14:16clojurebot3.141592653589793
14:16gfredericks,(Math/PI)
14:16clojurebot3.141592653589793
14:18gfredericksdoes java allow a static field and a static method with the same name?
14:18pjstadigno, don't think so
14:19gfredericks,(Math/PI 42)
14:19clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching method: PI, compiling:(NO_SOURCE_PATH:0:0)>
14:19bbloomwhere is bronsa when you need him?
14:19lgasHi. 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:19lgas(Googling didn't turn up anyone else with the same problem)
14:21llasramOh, I see: ##(macroexpand `(Math/PI))
14:21lazybot⇒ (. java.lang.Math PI)
14:21Anderkentlgas: is the jar on your classpath?
14:21Anderkent,(macroexpand 'Math/PI)
14:21clojurebotMath/PI
14:21rasmusto,(. java.lang.Math PI)
14:21clojurebot3.141592653589793
14:22bbloomaaaah
14:22pjstadigsneaky
14:22Anderkentright, the reflector checks if its method
14:22sm0ke,(macroexpand Math/PI)
14:22clojurebot3.141592653589793
14:22bbloomodd tho
14:22bbloomoh interop, you so crazy
14:22llasramCertainly an expected effect
14:22ieureit
14:22llasramEr, unexpected
14:23Anderkentthey don't think it be like it but it do
14:23lgasWell, I'm using leiningen and it's in the output of "lein classpath".
14:23Anderkentlgas: well, huh. :P
14:23sm0ke,(bean Math)
14:24clojurebot#<ExceptionInInitializerError java.lang.ExceptionInInitializerError>
14:24sm0ke,(bean java.lang.Math)
14:24clojurebot#<NoClassDefFoundError java.lang.NoClassDefFoundError: Could not initialize class sun.awt.AppContext>
14:24Anderkentlgas: can you post your ns form/ stacktrace? It works for me, I'd bet on a minor syntax mistake ;p
14:24sm0ke##(bean Math)
14:24lazybotjava.security.AccessControlException: access denied (java.lang.RuntimePermission getProtectionDomain)
14:25lgasYeah 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:25Anderkentllasram: are out of memory errors when running parkour tests something you've seen before?
14:26TimMc&(#(Math/PI))
14:26lazybot⇒ 3.141592653589793
14:26TimMcgfredericks: ^
14:26lgasI mean just "(use 'korma.core)" in a repl fails with "Exception namespace 'korma.db' not found clojure.core/load-lib (core.clj:5380)"
14:26TimMcSo #(Math/PI) is an undocumented, unstable alternative to (constantly Math/PI)
14:26Anderkentllasram: also, leveraging your 'oh I know what that is' magic: https://www.refheap.com/34683
14:27llasramAnderkent: 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:28Anderkentmeh :P
14:29sm0ke,`h
14:29clojurebotsandbox/h
14:29konrIf 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:29llasramAnderkent: Huh. I have not seen that before
14:29sm0ke,(in-ns sandbox)
14:29clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: sandbox in this context, compiling:(NO_SOURCE_PATH:0:0)>
14:29lgasAnderkent: is that what you meant about my ns/form/stacktrace?
14:29sm0ke,(in-ns 'sandbox)
14:29clojurebot#<Namespace sandbox>
14:29sm0ke,(inc 1)
14:29clojurebot2
14:30llasramAnderkent: That's very very odd --
14:30Anderkentllasram: welcome to my life :P
14:30Anderkent(inc 1)
14:30sm0ke,(def a 10)
14:30lazybot⇒ 7
14:30clojurebot#'sandbox/a
14:30sm0ke,a
14:30clojurebot10
14:30Anderkenthaha someone's done that before ;)
14:31sm0ke(inc clojurebot)
14:31lazybot⇒ 32
14:31llasramAnderkent: 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:33Anderkentllasram: yeah I'll just add debugging to see what it's actually getting
14:33llasramOk
14:34llasramOh, fun: ##(clojure.java.io/file nil)
14:34lazybot⇒ nil
14:34llasramSo that's a possibility
14:34Anderkentoh.
14:34Anderkenthow does it find the file?
14:35llasramYeah, 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:35llasramGlobbin'
14:37Anderkentyeah, that's it
14:37Anderkentso i guess that's just a result of previous tests failing
14:38llasramWell, should be a previous part of the same test. There's no intentional dependencies between tests
14:39Anderkentllasram: well, running with a 2g heap fixes all errors
14:39llasramIiiinteresting
14:39AnderkentI always knew putting more RAMs fixes everything
14:40llasramI'll run under some tiny heaps and see if I can figure out what goes wrong in such a non-obvious way
14:40Anderkentllasram: it might be that it's the instrumentation influences it
14:40Anderkenti.e. I only get one OOM when running standalone tests
14:41Anderkentas opposed to many when under coverage
14:41Anderkentbut it's not a priority for me to make covered code perform well :P
14:41llasramFair enough :-)
14:42Anderkenthm, looking through the outputs, I really should start handling deftype and reify
14:42llasramThose are pretty important, at least for anything doing serious interop
14:43Anderkentyeah, and the syntax isn't *that* complicated
14:47sdegutisWell then.
14:52mdrogalisWooo! tbaldridge: The Movie
14:54sdegutisMy love affair with Clojure is slowly dying, and I think it's mostly because of the JVM.
14:54bbloomsdegutis: wussamatta?
14:54sdegutisIt just doesn't feel suitable for small things.
14:55bbloomsdegutis: it isn't :-P
14:55Anderkentsdegutis: JVM has its pain points, but also some great strengths
14:55sdegutisAnderkent: True dat.
14:55carksdegutis: great, time to dive into clojurescript then !
14:55sdegutisWe're totally loving Clojure at work, but that's a big project, so it's different.
14:55xusersdegutis: use CL ;)
14:55sdegutisxuser: ML you say?
14:55sdegutiscark: I want to like that idea. I really really do.
14:56carksdegutis: but ?
14:56sdegutisI 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:57xusersdegutis: common lisp
14:57sdegutiscark: node doesn't feel any slimmer than JVM in my weird brain.
14:57sdegutisxuser: Hmm, that seems like a bad idea.
14:57sdegutisxuser: I mean, to use CL for small command line utilities.
14:58carksdegutis: it all depends on what you want to do ....for some things, even C++ might sometimes be the best tool
14:58sdegutiscark: I can't imagine when that would be. Possibly embedded systems?
14:59sdegutisOr when you're working in a legacy codebase which is written in C++ maybe.
14:59carksdegutis: i really don't know =)
14:59hfaafbgames v0v
14:59carkmaybe making a game or something
14:59sdegutisOh yeah, I forgot to try compiling Quake 3.
15:00carksdegutis: for command line utilities, i think node is good enough (with added clojureness)
15:00sdegutiscark: 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:01sdegutis(I don't mean in the sense that it requires a node interpreter.)
15:01sdegutisNever mind. All my opinions are broken.
15:01carki don't quite get what you mean
15:01AnderkentI wish travisci wouldn't send me emails about it erroring when 'reference is not a tree'
15:02sdegutisSo many things aren't. So very many things.
15:03sdegutisSorry for the noise.
15:03sdegutisGoing back to work.
15:04Voyagehi
15:04Voyagethe 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:07pbostromVoyage: are you asking about Closure or Clojure?
15:07AnderkentIs there an easy way to go from function object -> the symbol of a function (assuming one exists?)_
15:07S11001001Anderkent: no
15:07Voyagehm
15:07Anderkentmeh. I have to carry both with me I suppose.
15:08splunk_http://stackoverflow.com/questions/21634507/require-child-namespace-as-shorthand-in-clojure
15:09splunk_^ stackoverflow points for answers?
15:09S11001001Anderkent: maybe you could use the Var where relevant; Vars are IFns
15:10AnderkentS11001001: and build the symbol from var meta?
15:10Anderkentguess that could work
15:10doody1there was javaspaces in the past, I wonder what happened to it
15:10hiredmanno such thing as child namespaces
15:10hiredmanthe space of namespaces is flat
15:11S11001001Anderkent: I *think* the var has the name in it. Er, maybe.
15:11S11001001Anderkent: long time ago
15:12splunk_hiredman: ah, thanks. if you want to type that into stack overflow I"m happy to accept.
15:13AnderkentS11001001: 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:14cark(ns ... (:use [cara.webtl blah bleh buh])) used to work, doesn't it work anymore ?
15:14novocharWhat are the two fundamental data structures in clojure? vectors and _ ?
15:15gfrederickslistssetsmaps
15:15llasram:-)
15:15gfredericksclojurebot: the two fundamental data structures in clojure are vectors and listssetsmaps
15:15clojurebotIt's greek to me.
15:15gfredericksclojurebot: the two fundamental data structures in clojure |are| vectors and listssetsmaps
15:15clojurebotRoger.
15:16splunk_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:17carkoh i see
15:17TimMcIs there an ordered map that just maintains insertion order, not using a sort fn?
15:18llasramTimMc: In the Java-verse there are "linked" maps
15:19llasramI vaguely think amalloy_/flatland has a Clojure one?
15:19TimMcOh, of course it would...
15:19llasramAh, here we go: https://github.com/flatland/ordered
15:21zaisteI just wrote a tutorial about building web apps with Compojure/Om http://bit.ly/1g3jIm9
15:21zaistei'd appreciate any feedback
15:45invasmanizaiste: 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:47sdegutisI dunno about you, but..
15:48AeroNotixtechnomancy: how to get the pid of a `lein run`'d
15:48AeroNotixapp
15:48AeroNotix?
15:48irctcAnderkent: 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:48irctcoops this is lgas
15:48AnderkentAeroNotix: from within the process or from outside?
15:48AeroNotixAnderkent: outside
15:48AeroNotixI'm having trouble starting my compojure apps in CI
15:49Anderkentlgas: oh, that sucks
15:49AeroNotixand it seems that lein/compojure/ring/something is forking off the process
15:49AeroNotixso even if I grab $! after spawning it, that no longer is the actual pid
15:49lgasI'm just happy to have gotten it working. For this project I can just use the older jdbc package.
15:50AnderkentAeroNotix: 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:50AeroNotixAnderkent: running the jar itself also ended up with a different process
15:50AnderkentAeroNotix: oh. Then you migh be forking twice :P
15:51AeroNotixAnderkent: I'm not doing any forking
15:51invasmanizaiste: some more errors, the fetch-widgets function definition is broken after the let
15:52invasmanizaiste: same with widget-box :0
15:52sritchieany reagent users here?
15:53muhoo~sex is off-topic and not appropriate for the channel
15:53clojurebot'Sea, mhuise.
15:54Anderkentllasram: 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:54Anderkentthe output seems moderately okay too.
15:55llasramSweeeet
15:56llasramLooking forward to fixing up gaps :-D
15:58bmathI noticed CircleCI is hiring, and they use clojure: https://angel.co/jobs?slug=circleci
15:59Anderkenthm, 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:01mdrogalisbmath: For the record, CircleCI is an excellent build tool, IMO.
16:01Anderkentbmath: 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:02mdrogalisSame experience with support.
16:02Anderkentbut 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:03bmathI used them at a contracting job for a few months
16:03bmatheverything worked pretty damn well
16:03bmathbuild failures were easily traceable
16:03AeroNotixAnderkent: found a utility to give me a process tree.
16:03mdrogalisHave you seen what boxes they're using recently?
16:03AeroNotixI'll just walk that tree
16:03bmaththere was a bit of an integration challenge (very minor): had to write some hook scripts to get things running
16:04mdrogalisI'll take a screenshot.
16:04Nyyxanyone using cursive clojure know how to assign shortcuts to the REPL interactions?
16:05Nyyxnvm I found it
16:15dacc_Nyyx: i'm using cursive too -- do you use the idea vim emulation?
16:16mdrogalisbmath & Anderkent: http://i.imgur.com/0mLZLuG.png
16:16mdrogalisCircleCI's build machines
16:17Nyyxdacc: no
16:17amalloyhuh, load of 24 on a 24-core machine. nice balancing
16:17Nyyxnext time I have to do something tedious with text I might install it though
16:18mdrogalisamalloy: Isn't that 32 cores?
16:18amalloyoh. i didn't scroll far enough right
16:18mdrogalis:P
16:18amalloywell, i take it all back. you guys are squandering your resources
16:18Nyyxpeople 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:18mdrogalisamalloy: Hah.
16:19amalloywhere's the bitcoin mining daemon?
16:19seangrovemdrogalis: Are you at CircleCI?
16:19mdrogalisI would live to hijack that entire box and run some code with reducers on it.
16:19Nyyxcpu cores are worthless for bitcoins
16:19mdrogalisseangrove: No, just using it for my builds.
16:20seangrovemdrogalis: Got it
16:21mdrogalisBut yeah, very interesting set up.
16:54avishaianybody can recommend a clojure crypto library?
16:55avishaispecifically for verifying x509 signatures
17:00stuartsierraavishai: There are excellent Java crypto libraries with a common API built in to the JDK.
17:00moquistI love http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded . But why must all state be local?
17:00moquistIn particular, "c.t.n.repl/refresh will destroy those Vars when it reloads the namespace" -- but isn't that exactly what you want?
17:00moquist( https://github.com/clojure/tools.namespace )
17:01moquistI 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:01stuartsierramoquist: That's more of a general recommendation.
17:02avishaistuartsierra, i know bouncycastle but i was hoping for something idiomatic
17:02moquistOK. 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:02stuartsierraavishai: Using Java libraries is idiomatic Clojure.
17:02avishaistuartsierra, 10x
17:02stuartsierramoquist: Java libraries are usually isolated enough that it's not a problem for tools.namespace.
17:03moquiststuartsierra: OK. I'll proceed without fear, then. Thanks.
17:03stuartsierramoquist: 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:03stuartsierraBut it will destroy your references to that state, making it impossible to get back to the thing you need to close.
17:04moquistRight. I have stuff in mind like atoms that various libs use, and then you def a bunch of stuff into them, etc.
17:04moquistSeems rather innocuous.
17:04stuartsierramoquist: That has its own problems, but it won't necessarily break from reloading namespaces.
17:05moquistI was considering patching one in particular that only has a couple atoms, and sending a pull request. I'll probably still do that.
17:06stuartsierraI believe libraries should avoid creating their own mutable state except where absolutely necessary, but that opinion is not universally shared.
17:10novocharWhy doesn't this print the string "adding them!"? http://gist.github.com/novodinia/6802591305d9da7ae298/raw/562251d64d7a61e8f030dd39322542d6c628448e/gistfile1.txt
17:11_rcnovochar: (my-func 10 20)
17:11_rcnovochar: otherwise you're just evaluating all the values
17:29novocharIf someone has time, would you mind explaining the concert destructuring example here: http://clojure-doc.org/articles/tutorials/introduction.html#destructuring
17:30novocharYou are creating a vector what of key, value pairs
17:30bbloom~destructuring
17:30clojurebotdestructuring is http://clojure.org/special_forms#binding-forms
17:30novocharwhere :band is associated with "The Blues Brothers"
17:31novocharIt's odd that a vector is used here instead of a map
17:32abpnovochar: for {:keys [band location promos perks]}?
17:37alexyakushevHey guys, can some1 tell me a difference between "X.Y.Z-slim" and "X.Y.Z-sources" Clojure builds?
17:39novocharHow do you play with clojurescript?
17:40novocharI can't get a repl: https://github.com/clojure/clojurescript/wiki/Quick-Start
17:40novocharAnd I don't know how to compile apps either
17:40abpnovochar: try https://github.com/cemerick/austin
17:41abpnovochar: for compiling https://github.com/emezeske/lein-cljsbuild
17:42novocharIs it possible to install austin with lein?
17:43ivanyep. just put {:user {:plugins [[com.cemerick/austin "0.1.3"]]}} in your ~/.lein/profiles.clj
17:44abpnovochar: like ivan said, documented under "Installation" on there
17:44ivanor to a :dev profile in project.clj as this says https://github.com/cemerick/austin#installation
17:44dnolennovochar: 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:44novocharivan: How did you know to do that, is it because you did `lein search austin` and saw the latest stable release?
17:45ivanwell, now I know about lein search
17:45ivanI was using github and clojars and maven search
17:45abpdnolen: heh, btw, would you at some point extend your om tutorial for emacs or is that not feasible bc austin lacking optimizations none?
17:46abpdnolen: also damn great work on the tutorials and the lib. thank you! looking forward to build something off it
17:46dnolenabp: don't really have much interest in rewriting it for Emacs. Also austin not working with optimizations none doesn't make any sense.
17:47dnolenabp: glad you like them.
17:47abpdnolen: just read that somewhere
17:48dnolenabp: 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:48abpdnolen: 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:48abpdnolen: sure, i thought about different entry articles for the tutorial so everyone can get going with om/cljs from there
17:49abpdnolen: I'd even volunteer to help out
17:49abpdnolen: well, light table and emacs users, not everyone
17:49dnolenabp: anyone can edit the wiki so, if you feel like tweaking it or linking in Emacs notes feel free.
17:50novocharAustin is something you use with an existing repl?
17:52abpnovochar: basically, yes
17:53abpdnolen: 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:54dnolenabp: I do yes, but just the basic one via inferior-lisp. Still haven't tried Austin yet.
17:55abpdnolen: ah ok, i haven't even used inferior lisp i think. pragmatically using emacs-live for a year now.
17:56dnolenabp: cool, never tried emacs-live.
17:56novocharI'm playing with the browser-connected-repl-sample in the austin repo
17:57novochari 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:57novocharHas anyone else ran into this error?
17:58abpdnolen: 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:58abpdnolen: mostly for org
17:59dnolennovochar: 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:59novocharbrew update && brew install phantomjs seems to be a solution on github
17:59novocharhttps://github.com/cemerick/austin/pull/13
18:00abpnovochar: well, don't you want a browser connected repl?
18:01novochardnolen: If after 10 mins, I'm not at the point of following along with the Om tutorial, I will try out lighttable
18:01novocharand read through the tutorial
18:01abpdnolen: i think he struggled with the instructions from cljs wiki before, so i pointed him to austin
18:01dnolennovochar: I didn't link to any Om tutorials, on ClojureScript ones
18:01dnolens/on/only
18:02dnolennovochar: oh, I think I see what you are saying. Yeah Om is not a good introduction to ClojureScript unless you like firehoses.
18:04abpdnolen: well with light table it's quite smooth if you don't come from emacs
18:05pbostromdnolen: fyi, I "ported" bits of your old autocomplete example to Om, going to try to document it a little bit
18:05abppbostrom: great! that's what i need at some point for my work
18:07pbostromabp: watch the cljs mailing list, I'll try to post a link to the repo later tonight
18:07abppbostrom: nice, thank you. :)
18:08novocharSo close!
18:08novocharat step 5 in https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample
18:08novocharbut it isn't alertin the browser
18:08novocharphantomjs is running
18:08novocharI don't understand the reset! statement
18:09novocharIs that `(reset!)` or `(browser-repl-env reset!)`?
18:09novocharlocahost:8080 is showing the document from the sample app
18:09dnolenpbostrom: that sounds interesting!
18:11novochardnolen: I want a firehose experience
18:11dnolennovochar: heh
18:11novocharWell, not really, but if it's required
18:11novocharAnyone ever got to step 5 of the austin browser connected sample app and it fails?
18:12abpnovochar: I'm just trying for an emacs-austin om tut entry
18:13novocharabp: You're creating an emacs-austin om tutorial?
18:13pbostromnovochar: 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:13novocharI would love that, I really want to use emacs.
18:14abpnovochar: well there's a server still missing etc. so it's not going to happen within hours, probably this weekend
18:16abppbostrom: well, austin still uses piggieback, i've used it some times but it's not "easy" to set up, as in eval, running
18:17novochar"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:17novocharThis is the part that is confusing me
18:17novocharDoes anyone understand this at all?
18:18novocharOh cool!
18:18novocharI just needed to refresh the page
18:18novocharThis is the coolest thing ever
18:19novochar..for now at least..
18:20pbostromabp: 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:21abppbostrom: heh, last time i've tried compilation from evaluating to the repl was so slow i just didn't use it alltogether
18:21elarsonthis looks pretty interesting http://techblog.netflix.com/2014/01/introducing-pigpen-map-reduce-for.html
18:22abppbostrom: 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:22novocharIs 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:22novocharinstruct lein
18:23abpnovochar: so you've combined browser-connected-repl-sample and om-tut?
18:23novocharabp: That's what I want
18:24abpnovochar: I'm at it, but for your environment to work you must've done that
18:24novocharI 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:25abpnovochar: getting this to work generically goes against choosing your templating engine for the server side since you need to include austins script
18:29berdarioI 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:30berdarioI tried with (defmacro m [body] `(innermacro ~~@body))
18:30berdariobut I'm unable to get it working
18:30berdarioI looked at the output of macroexpand-1
18:31berdariois reimplementing the macro the only way to do it?
18:35l1xhey
18:36l1xwhat is the best way to load a local jar in a clojure project? (jar is not in clojars or any jar repo)
18:47amalloyput it into a repo
18:47amalloylike, you can avoid that step, or even just use your local repo, but putting it on clojars at least is easier and better
18:48abpamalloy: have you set up a local repo?
18:48amalloyabp: no, i just mean like lein install
18:48amalloyyour ~/.m2, not a proper repo
18:48abpamalloy: ah well
18:50abpamalloy: looking at it for a minute, setting up a private repo proper looks horrible
18:50amalloyberdario: (defmacro m2 [& body] `(m1 ~@body)) makes m2 act exactly like m1. if you want, you can modify body somehow on the way there
18:50amalloyyeah, it probably is
18:50berdarioamalloy I used 2 unquotes
18:50amalloyberdario: right, which is bogus
18:50berdarioamalloy yes, how do you suggest to modify the body on the way there?
18:50abpamalloy: at some point i need to :| didnt you do that at geni?
18:51berdarioI'd like to do something like
18:51berdario(map unquote body)
18:51amalloyi 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:51amalloyno, abp
18:51berdarioamalloy I'm trying to use this redis library: https://github.com/ptaoussanis/carmine
18:51novocharabp: did you say you are working on an om-emacs-austin tutorial?
18:51novocharThat would be immensely useful
18:51berdarioto use the pipeline for executing multiple instructions, it seems that the only simple way is to use the wcar macro
18:52novocharI 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:52abpnovochar: yeah still at it
18:52berdariounfortunately, I want to build the instructions before calling wcar
18:52novocharabp: Great!
18:53l1xamalloy: i see, what would be the local repo way?
18:53abpnovochar: that's what i ended up with in the first place, but light table is inacceptable from an emacs users perspective right now
18:55novocharHow is it that Om is faster than vanilla React in http://vuejs.org/perf/
18:55novocharAre there compile-time optimizations?
18:55dnolennovochar: just faster defaults
18:56dnolennovochar: immutable data structures and Om implements shouldComponentUpdate to do the most efficient checks possible.
18:56novocharReact has default settings
18:56novochar?
18:56amalloyberdario: 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:56dnolennovochar: React components by default just return true for shouldComponentUpdate
18:57amalloyif 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:57dnolennovochar: so the React TodoMVC is just doing more work than Om.
18:57berdarioamalloy thanks
18:57dnolennovochar: I designed Om to just always be fast, I don't think people should screw around with shouldComponentUpdate ever.
18:58amalloythere are redis libraries around that don't force you to do everything with macros
18:58abpdnolen: 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:59dnolenabp: Om more or less tries to present an immutable friendly version of everything React provides
18:59dnolenabp: they really aren't that different. However Om encourages people to use React that same way that Facebook uses React
19:00berdarioamalloy uhm, it seems like all the alternatives have been updated 9 months ago or earlier... carmine seems the only one actively developed
19:01dnoleninternally they have a thing called Store, which is basically a giant immutable data structure to support make speculative changes, rolls backs
19:02dnolenabp: and this is how I think client side apps should work, so Om encourages that
19:02berdario(clj-redis is a thin wrapper around jedis... maybe that could be my best bet?)
19:02l1xhttps://www.pgrs.net/2011/10/30/using-local-jars-with-leiningen/ this is what i am looking for, thanks
19:02amalloyberdario: so? it's not like the redis protocol changes drastically every week. something that hasn't changed in a year probably works
19:02amalloy(something that changed last week probably doesn't)
19:03berdarioyou'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:04berdariothen 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:08seangroveRule #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:14daccNyyx: only problem with it is that [Esc] no longer takes you from the repl back to the editor
19:16abpmeh, nice how seemingly *all* chrome extensions break austin
19:18dsrxanyone ever have any luck building clojuroku apps with anvil?
19:18abpdnolen: 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:18dsrxabp: communicating over an iframe is kind of evil :\
19:18seangrovetechnomancy: One minute a push completes in a minute or two, next time "Timed out compiling Clojure (Leiningen 2) app (15 minutes)"
19:18dsrxi'm working on an alternative repl transport over websockets, similar to what lighttable does I guess
19:19seangrovetechnomancy: Am I getting rate limited or anything? Have I raised some griefer flag?
19:20abpdsrx: 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:21seangroveabp: Would be a good idea
19:26abpheh cemerick, google dictionary seems to also break austin (at least with chrome on ubuntu), glad for the note in browser-connected-repl-sample
19:27abpcemerick: but maybe it should be *bold* ;)
19:32abpdsrx: 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:32dsrxwell...
19:33dsrxright now it's just a drop in replacement for cljs.repl.browser/repl-env in its own project http://github.com/tomjakubowski/weasel
19:33dsrxintegrating with austin would be a little trickier
19:33dsrxit does work with piggieback though
19:34abpdsrx: good enough, haven't even looked at austin internals
19:38allenj12hey is there a way to type hint a vector if your expecting all the elements to be the same?
19:38abpdsrx: somehow i thought EventSource were more widely supported than websockets but thats not really the case
19:38bbloomallenj12: if you really need it, there is gvec
19:38bbloomallenj12: https://github.com/clojure/clojure/blob/master/src/clj/clojure/gvec.clj
19:39bbloomallenj12: only supports specializing for primitives
19:41hfaafbanyone 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:41dsrxabp: 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:42allenj12hmmm ok
19:42allenj12thank you
19:46dsrxabp: 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:47amalloyhfaafb: my first guess would be a for-comprehension
19:48hfaafbamalloy: ok just trying to be too clever i guess :)
19:49amalloysomething like https://www.refheap.com/34718
19:50amalloythat's probably a little flatter than your example, and maybe rotated as well, but you get the idea
19:50hfaafbthanks ill run with it
20:02systemfaultHi, 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:03rhg135yes, but not as a first
20:04daccsystemfault: the o'reilly book is quite good. i'm working through it
20:05systemfaultI usually don't like the oreilly book but if you tell me it's a really good one, I will try it :)
20:05rhg135JoC has a lot of "why"
20:05systemfaultSo far, I only did the clojure koans
20:06systemfaultSo I got an idea of how the language works... but that's about it
20:08rhg135JoC may be a good one for you then
20:08invasmanisystemfault: 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:08bitwalkersystemfault: Another vote for Joy Of Clojure here
20:08daccsystemfault: yeah, not all o'reilly books are good, often too chatty for my tastes
20:08systemfaultNoted, thank you so much :)
20:09systemfaultdacc: Usually.. when possible, I like the books by Addison-Wesley
20:09systemfault*I like to get
20:10invasmanisystemfault: keep in mind that joy of clojure 2nd ed is coming in the next month or two
20:12systemfaultHmm, 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:12invasmaniyou get a free copy of the first edition by preordering the second
20:13invasmanino need to pirate :)
20:13abpsystemfault: theres also http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome shpaing into a book
20:13systemfaultinvasmani: ah, didn't see that.
20:14systemfaultabp: I saw it on HN a couple of months ago, great read :P
20:14systemfaultThanks
20:15abpsystemfault: there are more posts now, have you seen those too?
20:16systemfaultabp: Ah, you're right, the last chapter I read was about macros. There are more now.
20:16abpsystemfault: if not, that's actually a better link: http://aphyr.com/tags/Clojure-from-the-ground-up :)
20:16abpsystemfault: ok, then not much more
20:17abpve
20:25ggherdovhello. 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:28amalloy`lein ring server :headless`?
20:35novocharI'm reading https://github.com/swannodette/om/wiki/Basic-Tutorial#wiki-life-without-a-templating-language
20:36ggherdovamalloy: no, thanks! trying it. (having network problems, sorry I am on and off)
20:37novocharNevermind.
20:39locksa lot of people seem to have been reading that novochar ;)
21:04srrubyI 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:04srruby(file-seq (clojure.java.io/file "resources/fixtures"))
21:04srrubyThanks, John
21:05muhoolein ring server-headless
21:07muhooand, if you want nrepl too, lein update-in :ring:nrepl assoc :start? true -- ring server-headless
21:09hiredmanclojurebot: files |are| an illusion, there are only classloaders
21:09clojurebotYou don't have to tell me twice.
21:10muhooi 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:13muhoooh, no volcanos! lein pdo cljsbuild auto, update-in :ring:nrepl assoc :start? true -- ring server-headless
21:14muhooworks. if i'm feeling edgy i'll try to weave austin into the mix
21:48effy_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:48egghead lol yes fogus reads so much
21:49effy_just the godel escher bach is already a "you gonna spend a full year on it" kind of book
21:51systemfaultDo you all think that core.async is the most awesome thing ever? :/
21:52systemfaultThat's what made me want to learn clojure
21:53voldymansystemfault: core.async is cool but clojure as a whole is way cooler
21:54systemfaultSo, the difficult question... do you all use emacs? (I'm use intellij + cursive right now... thinking to switch)
21:56RaynesYes. Every single person except for you uses Emacs. ;)
21:56RaynesIn all seriousness, Emacs is indeed quite wonderful, but other editors are good and fine as well.
21:56RaynesLight Table, Cursive, Vim, etc
21:56BronsaJust not as good and fine as Emacs.
21:56effy_i mean, how do you even connect to freenode without erc ?
21:57systemfaulteffy_: I use telnet ;)
21:57systemfaultPRIVMSG #clojure HELLO
21:57effy_systemfault: ok i'll let it pass for this time then !
21:57systemfaulteffy_: I'm too ashamed to say the truth... I use colloquy on osx :(
21:58RaynesUgh, colloquy is the most abysmal IRC client I've ever used.
21:58systemfaultSo, what is the name of the package I need to install on emacs to start with clojure?
21:58Raynes$google textual irc client
21:58lazybot[Textual: IRC for Mac OS X] http://www.codeux.com/
21:58effy_systemfault: cider
21:58systemfaultNice
22:02fairy44Probably this has been asked a million times already, but I wasn't able to find a clear explanation on the web...
22:02fairy44Why does Clojure has keywords in addition to symbols?
22:02fairy44Can't everything that a keyword does be done by a quoted symbol?
22:04hiredmanno, keywords always evaluate to themselves, quoted symbols loose the quote when passed through the reader for example
22:04dsrxit's a security blanket for ruby refugees
22:04dsrx(not really)
22:04fairy44Is there a practical difference when this comes up?
22:05fairy44I mean, is there a situation where this comes up in practice
22:05hiredmanyes, 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:06fairy44OK
22:06fairy44Thanks :)
22:07fairy44So when to use symbols?
22:07hiredmanclojure'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:07hiredmansymbols are pretty much only used for code
22:07effyout 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:08systemfaultWow, I'm looking at EDN, looks better than JSON
22:08hiredmaneffy: it is complicated, but clojure recently grew clojure.edn which is distinct from the clojure code reader
22:08fairy44So is there a place I'd use a quoted symbol outside of a macro?
22:08hiredmanit is pretty rare
22:11effyhiredman: the documentation isn't explicit about "could the code be evaluated during the un-serialization" :(
22:12hiredmaneffy: the code will not be, the reader is distinct from the compiler
22:13hiredmaneffy: but there are some extension points in the reader that could cause issues, hence the more restricted reader exposed in clojure.edn
22:13effynot even if there is macro or something like that ?
22:14effymacro are expendend by the reader ? (by the eval ?)
22:14hiredmanno
22:14hiredmanthe reader turns strings in to datastructures
22:14hiredmanmacro expansion and compilation happens elsewhere on the datastructures
22:15hiredmanhttps://github.com/edn-format/edn
23:24tolstoydnolen: Does OM support CSS transitions?
23:25dnolentolstoy: what is there to support?
23:25tolstoyhttp://facebook.github.io/react/docs/animation.html
23:25tolstoyBut aside from that, I have an SVG that I periodically change the radius of.
23:25dnolentolstoy: yeah that's not core React really
23:26tolstoyNot an expert that CSS transition. Before, I'd just add a class and remove it, and it worked.
23:26dnolentolstoy: people can figure out what they need and go from there.
23:26tolstoyOkay.
23:26dnolentolstoy: I suspect there are enough hooks in React already to handle most cases
23:27tolstoyYeah. 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:27tolstoyIn other words, not really an OM prob.
23:37sdegutisHello.
23:37sdegutisAnyone here familiar with ClojureCLR?
23:37sdegutisThe documentation promises a future explanation of how to call it from a C# project, but it's not there yet.
23:38tolstoyHm. TypeError: 'undefined' is not a function ... React.DOM.animate .
23:40ambrosebssdegutis: 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:40tolstoyAlas.
23:40ambrosebssdegutis: have you got the source handy?
23:40sdegutisambrosebs, That's a bit further than I am. I'm just trying to figure out how to run "(prn 123)"
23:43sdegutisI thought it would be clojure.runtime.Load("(prn 123)") but that doesn't compile.
23:45ambrosebssdegutis: I was thinking something like clojure.lang.Compiler.maybeResolveIn(clojure.lang.Compiler.namespaceFor("clojure.core"), "prn").invoke(123)
23:45ambrosebssdegutis: no idea if that works
23:46ambrosebsjust browsing https://github.com/clojure/clojure-clr/blob/master/Clojure/Clojure/CljCompiler/Compiler.cs
23:46amalloyambrosebs: i think you can just use clojure.lang.RT.var("clojure.core", "prn")
23:46amalloybut i guess maybe that stuff isn't there in C#?
23:47ambrosebsamalloy: surely it's there somewhere
23:48amalloyVar.intern looks like it exists, at least
23:54sdegutisThanks amalloy.