#clojure logs

2013-05-21

00:16tomojwink: it's ok, ruby is not more lispy than clojure
00:17tomojI guess I'm begging the question
00:19ddellacostadid someone suggest ruby was more lispy than clojure?
00:19ddellacostait's not
00:19ddellacostaalthough it's more lispy than I realized in the past
00:19tomojno, someone was comparing verbosity of pallet and chef
00:20ddellacostaah
00:20ddellacostacan't speak to that.
00:20ddellacostayou can be verbose in either if you are determined enough.
00:20tomojbut I feel like if you're in a good lisp verbosity should hardly be a concern
00:20ddellacostaI would tend to agree.
00:21ddellacostabut ruby is comparatively pretty good. (comparing to something like Java, or whatnot)
00:21tomojget it right and then if you want you can (defpackage curl) or whatever
00:22tomojyeah the only reason I'm here is that I was taken in enough by ruby that I bought peepcode screencasts, then technomancy snuck a clojure one in there..
00:23ddellacostahaha
00:24ddellacostasimilar story here too…although not peep code related. more to do with matz's slideshow on emacs lisp. that opened my eyes a lot.
00:25tomojcool, no video online?
00:25ddellacostahmm, I dunno, I'm sure it had a lecture with it at some point, but I just saw the slide show
00:25ddellacostagimme one se
00:25ddellacostasec
00:25ddellacostayeah, this one
00:25ddellacostahttp://www.slideshare.net/yukihiro_matz/how-emacs-changed-my-life
00:26tomojhah so we can blame emacs lisp for ruby syntax!
00:27ddellacostayah, haha
00:27tomojor maybe he means that he managed to succeed doing exactly what he wanted after a week of work
00:27tomojI inferred that probably some of the syntax choices he made were influenced by what he could do in el
00:27ddellacostaI mean, it's illuminating though, 'cause it shows how foundational lisp was for ruby
00:27ddellacostaI always thought he was much more into smalltalk
00:27ddellacostabut after reading that slideshow I started to think it was actually lisp
00:28ddellacostawith smalltalk OO, and perl sprinkled on top
00:28callenRaynes: thought you might like it.
00:28callenRaynes: way better than coderwall, although still flawed.
00:28ddellacostabut yeah, emacs ruby-mode was key huh?
00:28ddellacostaha
00:28callenddellacosta: Matz knows his shit.
00:29ddellacostacallen: agreed.
00:29ddellacosta"Emacs changed my life forever. Thank you."
00:30seangroveddellacosta: You should be aware that callen is an inveterate troll
00:30seangroveWhile I agree with his current sentiment, it's no indication that he's not generally insane :)
00:30ddellacostaseangrove: haha…I am an inveterate naive optimist, so we'll get along just fine. He'll play me like a fiddle, and I won't have a clue.
00:32RaynesI don't think callen is a troll. I think he has far too much energy in his fingers.
00:33ddellacostaanyways, I've talked to callen before now on IRC, and he strikes me as curmudgeonly more than trollish.
00:33seangroveRaynes: Judging from a blackbox perspective, it's hard to tell
00:33callenRaynes: the real explanation is that I don't need cocaine because I drink coffee.
00:33amalloyhe would be a troll if he didn't believe what he said. i think he's just loud and angry
00:33callenddellacosta understands me!
00:33ddellacostahaha
00:33callenddellacosta: I am Diogenes of Sinope :)
00:33ddellacostaI try.
00:33callenamalloy is just mad because I got swag.
00:33callenand the very best in cynical heritage.
00:34ddellacostaah, I see, I had to look up that reference.
00:34ddellacostacallen: a predecessor to the Stoics, then?
00:34callenddellacosta: Something like that.
00:35callenddellacosta: the cynic "school" (barely a thing) was its own mode of thought, stoics borrowed some stuff and then went deep into VIRTUUUUUUEEEE
00:35callenthe cynic merely acknowledges that there are no virtuous men, so why not live simply?
00:35ddellacostacallen: ah…I'm only familiar with the common usage of cynic, less so the more philosophical concept.
00:36ddellacostainteresting
00:36seangrovecallen: Fully agreed re: simplicity. Outsource non-core needs to those who do it well, like.... firebase
00:36callenddellacosta: the actual cynic school of philosophy is great.
00:36callenseangrove: cynicism is not selling yourself into slavery/sharecropping.
00:36callenseangrove: there's a strong self ownership / individualist streak.
00:36ddellacostacallen: reading about it now. Seems cool. Thanks for the new info!
00:37callenddellacosta: always!
00:37seangrovecallen: Yes, that does seem to be inline with Diogenes' morales
00:38callenincidentally, there's a myth about Diogenes getting captured and sold as a slave
00:38callenhe told the man he was being sold to that he was better than him and could raise his children better than him
00:39ddellacostahaha
00:39callenthe buyer was instantly convinced and took him home ot run his household and educate his sons.
00:39callensupposedly they were very successful.
00:40ddellacostawell, he sounds impressive and I appreciate some of his ideas, but I think I am far to hedonistic to pattern my life after his in any meaningful way
00:40ddellacostafar to -> far too
00:40callenddellacosta: he was hedonistic in his own way
00:40callenddellacosta: he was simply unwilling to sacrifice his dignity to enhance his comfort.
00:40ddellacostaah, I can see the the distinction
00:41callenddellacosta: he was once invited to a lavish dinner, a man at the dinner table insulted him, possibly making a comment about him living like a dog. Diogenes proceeded to urinate on him at the dinner table to prove him right about his doghood.
00:41ddellacostahaha
00:41callen^^ this is the callen behavior playbook btw
00:41ddellacostacallen: I was just reading the section in wikipedia about dogs
00:41callenyou have been warned.
00:41ddellacostaunderstood. :-)
00:43yogthoswink: ah might've been cached and nobody hit that page since it got fixed :)
00:48callenyogthos: hey! how have you been?
00:48callenyogthos: http://osrc.dfm.io/yogthos
00:48yogthoscallen: not too bad :)
00:48yogthoscallen: haha awesome :P
00:48callenyogthos: new best practices for korma, ping me if you want info.
00:48yogthoscallen: will do in the morning :P
00:49yogthoscallen: gotta be sleeping soonish here :)
00:49callenyogthos: sure just nag me.
00:50yogthoscallen: might actually have a few questions too :)
00:52callenyogthos: please send me them, I love Qs.
00:52yogthoscallen: awesometastic :)
01:00tomojcan you implement many-to-every on top of many-to-many?
01:00tomojchannels
01:01tomojoh, hmm. many-to-every would probably be really weird.
01:17mthvedtis there a way to check if a fn will return a primitive, given some # of args
01:17alex_baranoskyanyone know if R can output EDN?
01:18akhudekmthvedt: no, you either check the return type every call or try to used typed clojure
01:19akhudekthough not sure how easy typed clojure is to use at this point
01:19mthvedtakhudek: not a case of type-safety, i want to know if something returns a long or a Long
01:20mthvedtthe compiler can figure it out, so it might be possible in theory
01:22akhudekmthvedt: the compiler doesn't know either, you need to check the type of values dynamically. The compiler does have type hints to avoid this, though I can't comment on the details of how those work.
01:22akhudekbut multimethods, for example, dynamically check the type of values on the go
01:22akhudeksimilarly calling java methods does reflection without type hints
01:25mthvedtakhudek: the compiler does figure it out, that's why fns with primitive hinted return values are much faster
01:26mthvedtit's not the jvm that does that, the jvm is bad at auto boxing removal.
01:27mthvedtthis is implemented as various interfaces in IFN supporting primitive invocation and return values
01:29akhudekmthvedt: I'm not very well versed on how type hints work internally. I've always assumed that if you hint a function, the compiler uses the optimized path for that type and errors out if it actually receives something else. I've never actually tried incorrectly hinting function.
01:30akhudekin any case, there is theoretically no way to know the return type of a function ahead of time without either specifying it manually or doing fancy type inference
01:32akhudekwhat is your use case?
01:33mthvedtakhudek: i'm writing macros that wrap fns that are used in tight loops. if there's a mismatch between, say, long and Long, there's a big performance penalty.
01:34mthvedtwhat's particularly bad is that clojure has its own helpful version of a long cast that it supplies, which can't be inlined. so you're paying both for boxing and a long jump on certain mismatches
01:35mthvedtor at least, my jvm won't inline it
01:35mthvedtin my setup
01:35livingstonso await will wait for all work from this thread to an agent to be complete, but what if I want to wait for all work from all threads? (i.e. I have a thread pool that's feeding an agent serializing data to an output file, I want to close that file but only after all relevant send-offs are complete...)
01:39akhudekmthvedt: that's an interesting problem. It does sound like something that type checking would help with, though I can't think of anything in clojure that would help there.
01:41mthvedtakhudek: it's really only the primitive/non primitive case that has a large performance penalty.
01:41mthvedtthe JVM is very good at guessing object types, particularly when it can inline
01:43akhudekmthvedt: you basically want it to throw an error if you ever find a Long?
01:43akhudekor actually change behaviour?
01:43mthvedtakhudek: basically, i want the macro to generate a wrapping fn that matches the type of the underlying fn. which in clojure can only be long, double, or Object
01:44akhudekoh I see
01:44akhudekthere must be a way to access type hints
01:45mthvedtfns are a special case, because in fns the return type can depend on arity, i think (haven't confirmed)
01:45mthvedtbut the macro knows the arity
01:47akhudekmthvedt: if you type hint a function you can call meta on the function symbol and it seems to give something
01:49akhudekhuh, nevermind, that doesn't work with defn
01:49mthvedtright, fns are a special case somehow.
01:50akhudekannoying, I can only suggest looking through the clojure source
01:57livingstonis there a way to know if there are sends or send-offs pending or in-progress for an agent?
02:26suiang____so is there any clojure ORM which could cache the object in redis implicitly?
03:14wei_compojure question: how do I disable wrap-restful-format for specific routes? for example, I have a websocket endpoint that compojure is trying to convert into JSON.
03:15weavejesterwei_: Just separate out the routes into ones you want to apply the middleware and ones you don't.
03:20wei_weavejester: like this? https://gist.github.com/yayitswei/5618027 I'm getting "null" when I load / now
03:37wei_^ oh nevermind, that works
05:16spoon16I have a sequence that I want to partition by a vector of indexes (partition-by-index [3 7 9] (repeat 1)) => ([1 1 1] [1 1 1 1] [1 1])
05:16spoon16is there an interesting way to do this with built in clojure.core functions?
05:17spoon16the last partition in my example would continue into infinity
05:32rasputniki'd love to use clj-xmpp but need a newer version of one of its dependencies . Is there a decent guide for putting your own bits in clojars?
05:33noidispoon16, here's an uninteresting, quick'n'dirty way to do it :) https://www.refheap.com/paste/14809
05:37noidiand it doesn't even handle your requirement of returning the rest of the infinite sequence
05:37noidioh well, someone will soon tell you how to do it on one line with two built-in functions :)
05:50noidibleh, I was bored and did a slightly improved version https://www.refheap.com/paste/14810
06:20fleehodewhat about the performance of datomic compare to pgsql?
06:24icarotThis channel sure does die at night.
06:25Foxboronat night?
06:25FoxboronEarly morning here in Norway
06:25fleehodebut this is not night at my location :]
06:25icarotWell, it could just be a coincidence, but it seems like it dies down a ton whenever it is night time here in Western America (GMT -7)
06:25fleehodeits 18:19 here
06:25icarot3:19 here.
06:25Foxboronicarot: i think more then half of the IRC community is US based
06:26Foxboron12:19
06:26icarot(San Francisco)
06:26fleehodei just stuck with the sql problem
06:26fleehodeand after seached the final answer
06:27icarotI just expect conversations about things I do not have any semblance of a basic understanding of (FRP, logic programming on top of Hadoop/Cascading) etc.
06:27fleehodei was think is there any db using custimized lisp as the querying lang
06:27icarotAnd it seems to die down around here, heh. That's all.
06:28fleehodeok zombie time, hello, is there Mr zombie?
06:31Foxboronwe should make a irc bot having a markov chain
06:31Foxboroncall it zombie, feed it with clojure and FP stuff
06:32Foxboronand let it ramble in the middle of the night so the chan seem active
06:32Foxboronthen we call it "Mr.Zombie"
06:33ivanfleehode: are you looking for datomic?
06:33ivanoh, I see the performance question above now
06:35fleehodeivan: just ask , as i said, i am angry with sql
06:36fleehodepgsql channel's guy responsed my features request by `could work in therotic` but they need abey the sql standard
06:37mynomotofleehode: Have you looked at honeysql?
06:38fleehodemynomoto: nope maybe you could give some quick intros ?
06:39mynomotohttps://github.com/jkk/honeysql
06:39mynomotoYou can use maps to generate sql queries.
06:39fleehodegot it , this is a trans level
06:41fleehodemynomoto: this wont improve the performance i think
06:42mynomotoOnly yours :) Not the db.
06:44fleehodei see sqlite use a vm design
06:45fleehodewhich i dont know if it could apply lisp as query language
06:45fleehodejust like clojure on jvm, by another compiler
07:24mpenethoneysql is nice but incomplete, it only supports select statements
07:39spoon16,(defn ^bytes y [] (.getBytes "hi"))(String. (y))
07:39clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
07:41AWizzArdHi, any RegExperts here? I want all texts between x and y, without matching x/y. I tried this:
07:41AWizzArd,(re-seq #"(?<=x).*(?=y)" "x123y---x456y")
07:41clojurebot("123y---x456")
07:41AWizzArdInstead I wanted ==> ("123" "456")
07:41spoon16^^ this code is throwing a "Unable to resolve classname: clojure.core$bytes" https://www.refheap.com/paste/14812
07:46spoon16,(re-seq #"[\d]+" "x123y---x456y")
07:46clojurebot("123" "456")
07:46spoon16AWizzArd: does that work for you?
07:47AnderkentWhat's the right way to get the maximum (last) key from a sorted set?
07:47Anderkentlast is linear afaik
07:48spoon16AWizzArd: also this, which is maybe a better answer given your "between x and y criteria"
07:49spoon16,(map second (re-seq #"x([^y]+)y" "x123y---x456y"))
07:49clojurebot("123" "456")
07:49spoon16(map second (re-seq #"x([^xy]+)y" "x1a23y---x45x6y"))
07:49spoon16,(map second (re-seq #"x([^xy]+)y" "x1a23y---x45x6y"))
07:49clojurebot("1a23" "6")
07:49Anderkentah, (first (rseq ...))
07:50ucb,(doc rseq)
07:50clojurebot"([rev]); Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is empty returns nil"
07:50ucbnice.
07:50spoon16,(map second (re-seq irc://irc.freenode.net:6667/#"x([^y]+)y" "x1a23y---x45x6y"))
07:50clojurebot#<CompilerException java.lang.RuntimeException: No such namespace: irc://irc.freenode.net:6667, compiling:(NO_SOURCE_PATH:0:0)>
07:50Anderkentnot really, but I guess it's manageable
07:50Anderkent`last` should do that
07:50spoon16,(map second (re-seq irc://irc.freenode.net:6667/#"x([^y]+)y" "x1a23y---x45x6y"))
07:50clojurebot#<CompilerException java.lang.RuntimeException: No such namespace: irc://irc.freenode.net:6667, compiling:(NO_SOURCE_PATH:0:0)>
07:50spoon16hmm
07:52rasputniki'm using clojure.tools.logging, where would i put the log4j.properties for leiningen to find it?
07:52Anderkentrasputnik: project-root/resources
07:52echo-areaAnderkent: `last' also works on non-sorted sequences
07:52rasputnikAnderkent: thanks!
07:53echo-areaWhile `rseq' only works on sorted sequences
07:53Anderkentecho-area: sure, but it could check whether it's given a reversible one. Oh well.
07:54echo-areaHmm, I guess `last' (as well as some others) are only helper functions for core.clj, or defining macros.
07:55echo-area`butlast', for example
08:38AnderkentIs there a filter/map combined? I.e. return f(x) for every x in map whenever f(x) is truthy
08:40dnolen`Anderkent: no, but it's just (filter identity (map f xs))
08:41llasram`keep` ?
08:41marutksreducers?
08:41Anderkentkeep, yes
08:41clojurebotreducers are http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
08:41Anderkentthanks
08:42dnolen`Anderkent: I always forget about keep
08:42dnolen`Anderkent: tho it'll return false values
08:42Anderkentyeah it's what I want
08:42Anderkentthe fn is a (when-let .)
09:56CookedGryphonUgh, I'd like to use timbre more, but I quite often don't bother because I can never remember the namespace. Does anyone else have this trouble? I have to look it up every time!
10:05devntechnomancy: what did you do to fix it? (the issue with lucene/clucy)
10:18mefestois there a built-in cljs function for converting a hashmap to js object?
10:19mefestoeasy enough to implement, just wondering if it exists in core cljs
10:22nDuffmefesto: sounds like maybe you want clj->js
10:22mefestonDuff: ah thanks.
10:41tomojI dreamt I understood monads
10:41tomoj:(
10:41seangroveReally?
10:48gfredericksmemory question
10:49gfredericksI make a query to postgres via java.jdbc that reads back ~3gb of data
10:49gfredericksthere is a :row-fn that parses some json in clojure data structures, and then a :result-set-fn of `count`
10:50gfredericksi.e., it ought to simply take the result-set-seq and read through it
10:50gfrederickswhen I monitor the memory with visualvm, I see it climb from nothing past 4gb; at that point it keeps climbing, but GC periodically takes it back to 4gb
10:51gfredericksonce the query is finished, GC can clean up the 4gb as well
10:51gfredericksthe question is -- what the hell are those 4gb?
10:51tomojseangrove: well, maybe more hypnagogia than dream. I was reading this before bed http://web.science.mq.edu.au/~mmccurdy/cms2010talk.pdf
10:52tomojbut the feeling that it makes sense is mostly gone this morning :)
10:57seangrovetomoj: Well, maybe that's the first step :)
10:57seangroveOr some subsequent step, who knows
10:58seangroveI still have a feeling that Clojure is a more practical language than Haskell, but more and more I think that's just biased based on my current limitations
11:00vijaykiranwhat's correct syntax for using java method in function arg-destructuring ?
11:00vijaykiranI'm looking for something like: (defn foo-date [day (.get c Calendar/DAY_OF_MONTH) ^java.util.Calendar c])
11:00gfredericksvijaykiran: that's not possible
11:00gfredericksyou'll need let
11:01vijaykiranyeah, I had a let which was working fine though
11:01vijaykiranany specific reason why it isn't possible ? I thought the destructuring sytax is same everywhere
11:03gfredericksit is
11:03gfredericksyou're probably confusing destructuring with the other stuff that let does
11:03vijaykiranah - true - this isn't destrcturing
11:04vijaykiranI guess I'm conflating destruct with binding - sorry for the noise
11:04gfredericksno problem
11:05vijaykiranin an unrelated question - anyone knows a fancy clojure library to parse tabular-delimited data ?
11:05gfrederickskind of a pitty data.csv doesn't do it
11:11gfredericksis it to be expected that clojure.walk doesn't work with records?
11:12bbloomgfredericks: yes.
11:19gfredericksis that a solvable problem? with a jira ticket?
11:20bbloomgfredericks: consider the `empty function
11:20bbloomgfredericks: so no, not really...
11:21gfrederickswell if you know what the special keys are
11:21gfredericksand you follow the rule that dissoc'ing a special key reverts to a vanilla map
11:22gfredericksdo records have an API for exposing their special keys?
11:24dnolengfredericks: you can get the basis
11:25gfredericksit sounds doable
11:25gfredericksafter not having thought about it long enough
11:26dnolenthe lack of an empty protocol/interface still makes it problematic I think
11:26TimMcFrom this armchair, the problem looks entirely soluble.
11:26dnolenin core.logic I added an IUnitialized protocol to work around this
11:26gfredericks(defprotocol IFudgyEmptyable (-fudgy-empty [_]))
11:27dnolenin anycase conceptually an empty record makes little sense. Just that you have something with no initialized fields
11:27gfredericksyeah
11:27gfredericksI'm dealing with clojure.data.xml
11:28gfrederickswhich has an Element record
11:28gfredericksI wonder what the reasoning behind that choice was
11:29tomojI often suspect we just need a walking protocol that could be extending to Element
11:29tomojbut I dunno what it would look like..
11:31gfredericksI spend a lot of finger-effort reformatting my clj code in emacs by selecting all the lines for a given form and then hitting tab
11:37mefestogfredericks: dunno if this saves any time but you can place the cursor that the beginning of the form and type C-M-q or M-x indent-sexp
11:40gfredericksmefesto: seems perfect; thanks :)
11:43jodaroit would be incredibly easy to polish off this entire thing of guacamole from whole foods in one sitting
11:43jodarodamn them
11:56gfredericksoh data.csv _can_ do tabs. oh well.
12:01Foxboronso messing with clojure and pprint, currently getting the first, but i want to format the output too the latter: http://hastebin.com/mofisivuhe.LISP
12:05justin_smithFoxboron: http://clojuredocs.org/clojure_core/1.3.0/clojure.pprint there are some vars listed on that page that influence pprint behavior
12:06justin_smithI think clojure.pprint/*print-miser-width* may help here
12:07Foxboronjustin_smith: trying, dosnt give me any difference
12:08justin_smithyeah, I am experimenting with those variables too
12:08TimMcgfredericks: M-q will reindent the entire top-level form. Just don't hit it inside a string or comment.
12:09Foxboronjustin_smith: *print-right-margin* works
12:09Foxboronor well, almost
12:10justin_smith,(binding [pprint/*print-miser-width* 40 pprint/*print-right-margin* 30] (pprint [{:server "irc.test.net", :port 6667, :chans #{"#lobby"}} {:server "test", :port 6667, :chans #{"lol"}}]))
12:10clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve var: pprint/*print-miser-width* in this context, compiling:(NO_SOURCE_PATH:0:0)>
12:11justin_smithwell, it is excatly the output you wanted, if you have pprint bound to clojure.pprint
12:11justin_smith,(binding [clojure.pprint/*print-miser-width* 40 clojure.pprint/*print-right-margin* 30] (clojure.pprint/pprint [{:server "irc.test.net", :port 6667, :chans #{"#lobby"}} {:server "test", :port 6667, :chans #{"lol"}}]))
12:11clojurebot#<ClassNotFoundException java.lang.ClassNotFoundException: clojure.pprint>
12:11Foxboronjustin_smith: yeah i see. Thanks :)
12:11justin_smithheh, I give up
12:16gfredericksTimMc: oh weird I never noticed that. I use M-Q for text all the time
12:17justin_smithbefore saving a file I like to M-< M-> M-x indent-region
12:17justin_smithalso, M-x whitespace-mode and look for anything bright yellow or red
12:20llasramYou can have whitespace-mode be a minor mode you have on in most major modes, and have whitespace-cleanup hang off of a before saving hook
12:20llasramKeeps everything nice and tidy!
12:20justin_smithI find it distracting during normal editing
12:20technomancyllasram: fsvo "everything" which does not include the git commit history
12:21llasramtechnomancy: That is the down-side -- I do turn it off when making patches to other people's code. But for stuff I'm going to touch extensively, I just have a "Clean up whitespace" commit first
12:21technomancyyeah, as long as it's in its own commit that's reasonable
12:22llasramjustin_smith: You can customize what it shows. I have it just show out-of-place whitespace (mixed tabs + spaces, training whitespace etc) by default
12:22justin_smithllasram: I'll look into that some day, for now turning it on real quick before save and double checking the file is OK
12:28justin_smithAnd I have definitely had the experience of wanting to track down why someone wrote particular code, and find out git was only giving them credit because they re-indented it
12:30technomancyI think there's a flag you can give it to ignore whitespace-only changes
12:30technomancybut I'm not sure whether that works with blame or just diff
12:30justin_smithoh, that would be nice, I'd never heard of that
12:31callengtrak: how did you overuse defroutes?
12:39callenwink: have you repro'd that clabango bug and created the issue yet?
13:01winkcallen: https://github.com/danlarkin/clabango/issues/9
13:10technomancytpope: are you on this mailing list? https://groups.google.com/group/clojure-tools/browse_thread/thread/c08b628a9af8346d
13:26callenwink: yissssss
13:26callenwink: I love you now.
13:27winkcallen: I'm shivering with anticipation
13:28gfredericksis there anything good for doing string conversions? camelcase and such?
13:28callenwink: too bad I am preoccupied with taco salad and stomach pain.
13:28technomancyyogthos|away: lemme know when you're back; I can clear out the clojars artifacts for luminus
13:28technomancygfredericks: https://github.com/qerub/camel-snake-kebab
13:28callenyogthos|away: and when you're done showing technomancy love, ping me with your questions.
13:29winkcallen: I'm quite unsure whether to ask what taco salad is or don't want to know
13:29callen"kebab case" well I'm glad I know what that is now.
13:29rasmustolots of food references today
13:29gfrederickstechnomancy: ermahgerd
13:29callenwink: taco salad is the god of all food.
13:29technomancygfredericks: I know, right? kebab-case.
13:29technomancyit's great.
13:29jodarommm, kebabs
13:30technomancyI don't think it's a widespread term yet, but I'm doing what I can to make that happen
13:31llasram"kebab-case" is more concise than "levitating-snake-case"
13:31winkthey've built a fucking orthanc taco salad: http://www.foodnetwork.com/recipes/paula-deen/taco-salad-recipe/index.html
13:32gfrederickstechnomancy: oh man those function names (not listed in README) are clever
13:33callenwink: LOL
13:43xeqitechnomancy, yogthos|away: why are we removing artifacts?
13:44technomancyxeqi: because aether is being annoying and fetching *every single pom* for templates even though it only needs the latest version and can get that with two calls =\
13:44xeqihaha
13:44xeqiand its for templates, got it
13:46technomancyxeqi: do you know why it does that?
13:46xeqias in what part of the code does it?
13:46xeqiI have a good idea from playing around with the version range checks
13:47technomancymore like the justification behind it
13:47xeqibut I don't have an idea off hand for the reason someone wrote it to do that
13:48xeqiwell... I could see trying to restrict it to be very hard when having multiple version ranges from transative dependencies
13:48xeqiso, probably because it is easier to gather all the poms needed (including transative ones) to find out all the dependencies and then restrict
13:49technomancyI could see it checking older versions for ranges *if* the newest version had a range in it to see if older versions might jive better with additional range requirements. but checking older versions in the absence of resolving range conflicts makes zero sense.
13:50technomancyso yeah, probably just a lazy implementor =(
13:57xeqitechnomancy: you could change the template to use "RELEASE" as a version when searching
13:57xeqiI think that only gets the latest pom/jar combon
13:57technomancyxeqi: huh; I did not know this fact
13:58xeqiwell. I think you want "LATEST"
13:59xeqisource: 2nd answer on http://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency
13:59xeqihmm, looks like the luminous template has a release version
13:59technomancydunno, RELEASE is probably a better default
14:00xeqiand apparently so do my libs
14:00technomancyxeqi: thanks; this is perfect
14:02xeqiI don't remember implementing adding the release tag as part of pomegranate...
14:02xeqiwonder how it gets there
14:02xeqiI'll accept "magic" for now
14:03xeqithough adding one of those versions in a project.clj breaks deps :tree :p
14:03technomancyI have no problem with that =)
14:06xeqialso not caught by the new version range checks for 2.2.0 :( oh well
14:10gfredericksso certain kinds of errors cause 'lein run' to report that the class <main ns name> is not found
14:10gfredericksis that a clojure issue or a lein issue?
14:11technomancygfredericks: hard to say
14:12scottjsomeone shared this funny github analytics link http://osrc.dfm.io
14:12scottjon Rich Hickey (creator of Clojure): "Rich is a champion Java expert...Rich seems to speak only one programming language: Java. Maybe it's about time to branch out a bit."
14:12gfrederickstechnomancy: do you know the error msg I'm talking about?
14:13technomancygfredericks: I don't think so
14:13gfrederickstechnomancy: in this case it was caused by foo.main requires foo.bar requires foo.baz where foo.baz doesn't exist
14:14gfrederickstechnomancy: I'll work on a minimal example
14:15TimMctechnomancy: ⟜-kebab-case-
14:16gfrederickstechnomancy: yeah simply foo.main requires foo.no-exist triggers it
14:17TimMc&(let [⟜-a- 3, ⟜-b- 5] (* ⟜-a- ⟜-b-))
14:17lazybot⇒ 15
14:17TimMcUnicode makes everything better!
14:17technomancygfredericks: what's the message?
14:18tomojhmm 'multimap'?
14:18TimMcI don't know what it is, I just appropriated it.
14:19gfrederickstechnomancy: class not found foo.main
14:19gfrederickstechnomancy: if I change from `lein run` to `lein run -m foo.main/-main` I get class-not-found: "foo.main/-main"
14:21hiredmanmy guess is lein tries to fall back to loading a class and calling a static main
14:22technomancyyep
14:22hiredmanand swallows the errors loading the foo.main namespace
14:22technomancyI want to get rid of that; I don't think calling Java methods is worth supporting in the run task
14:23technomancyit only swallows FileNotFound, but in this case that's enough to do it
14:23technomancyI guess we could inspect the exception message, but I'd rather just ditch Java support
14:23technomancymove it to a plugin
14:23technomancyor use another option than -m for it
14:24gfredericksI don't have a strong opinion on it
14:25gfredericksthis just comes up often (most ns typos) and confuses the heck out of my coworkers
14:25gfrederickswho conclude "clojure is terrible"
14:26technomancyjust wait till you upgrade to lein3; that'll show em
14:26gfredericksright on
14:27hiredman^- a result of relying heavily on tools
14:27hiredmanyou should just hand them notepad and a repl
14:30tpopetechnomancy: it was out of sight out of mind
14:33technomancywhat do you call the third member of a triumvirate?
14:34technomancywhatever it is, it'd be good to get the input from it in this case
14:34tomojapparently right multimap is used for linear logical implication, which maps onto CSP
14:34tomoj:)
14:34gfrederickstechnomancy: so would you accept an error message patch for the issue?
14:35technomancygfredericks: sure
14:36gfrederickstechnomancy: how do I test running a local leiningen?
14:36technomancygfredericks: CONTRIBUTING.md covers it I think
14:36gfrederickstechnomancy: yehuda man
14:37gfrederickser, you da man
14:51`fogusDoes anyone have a (srsly-load-the-thing-from-ANYWHERE-on-the-classpath-dammit "filename") function that they could share?
14:53lglenntechnomancy: the third member of a triumvirate is a triumvir. As are the first and second, unfortunately.
14:54tpopetechnomancy: I'll see what I can do. Kind of swamped these next couple of weeks
14:57technomancylglenn: TIL
14:57mefestois there a way to configure nrepl so that when i 'nrepl-jack-in that it uses the current emacs window and doesn't create a new one?
14:57jtoyim trying to figure out why my code broke, but has anyone seen errors like: Exception in thread "main" java.lang.IllegalArgumentException: Malformed member expression, compiling:(clj_liblinear/core.clj:49:5)
14:58jtoythe code compiles fine on my box, but on every other box i try on i get that error
14:59jtoyI think its because I upgraded leinigen
14:59mefestojtoy: did you do a lein clean on your system ?
15:00jtoymefesto: on all the boxes i tried on, they are clean
15:00Glenjaminwhich implies yours is the unclean one :)
15:00mefestoim guessing you have run `lein clean` on yours as well?
15:01mefestolein clean && lein compile
15:01jtoyhmm, i just did lein clean and it breaks now
15:01jtoyalthough it was working before :(
15:01hiredmantechnomancy: have you read any of the revelation space books?
15:02technomancyhiredman: doesn't ring a bell
15:02hiredmanthey feature a triumvir
15:02mefestojtoy: well at least when you fix it for yourself it should be fixed for all others :)
15:02technomancynice
15:03hiredmantechnomancy: "Revelation Space" the titular book is great
15:06hiredmantechnomancy: if I've every mentioned conjoiner drives to you, "conjoiner drives" are a thing in revelation space (but not engines for doing joins)
15:07jtoymefesto: yup,thx
15:09amalloyjtoy: malformed member expression? that comes from expressions like (.5 x)
15:09amalloyie, trying to access the field named "5" on the object x
15:09hiredman,(.foo)
15:09clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Malformed member expression, expecting (.member target ...)>
15:09amalloyoh, that's probably more likely
15:10amalloyyou can also get it with exciting things like (. x (((((blah))))))
15:10trptcolinthat *is* exciting
15:14pjstadigthat used to be exciting to me, but it's too mainstream now
15:15gfredericksthe hipsters use (. x ((((((blah)))))))?
15:17kmicuthe haskell hipsters use ((.) x (((((blah))))))
15:18amalloy(inc kmicu)
15:18lazybot⇒ 1
15:27amalloygfredericks: kinda sounds like a 1920s gang of bank robbers
15:28gfredericksman why do the 1920's have to be in the past
15:29gunsWow, java.util.concurrent is a magical candy store.
15:30pjstadigguns: truth
15:31gunsI was abusing futures and making spaghetti. Replaced it all with a cached thread pool, and everything just works.
15:32mefestoi love clojurescript but man these compiler errors are tough on my brain.
15:33tomojstill no line numbers? :(
15:33kmicu@tryhaskell (((((.) . (.)) (((length))) ((((filter))))) ((((>0)))) ((([1,0,1])))))
15:34hyPiRion$tryhaskell 1
15:34lazybot⇒ 1
15:34kmicuI call it lispell ;]
15:34kmicu$tryhaskell (((((.) . (.)) (((length))) ((((filter))))) ((((>0)))) ((([1,0,1])))))
15:34lazybot⇒ 2
15:39mefestousing cljs + atom + add-watch to drive page updates is just plain badass :)
15:41asteveI have to have hardcoded numbers for the size of a vectors, I cannot pass the size as input into the function
15:41astevewhat is the best solution other than writing them in both functions
15:41astevecreating a dynamic?
15:42asteveI guess I could define the result
15:45hyPiRionasteve: dynamic or just def them
15:52mefestois it bad practice to keep your *.cljs files in the main project's src dir?
15:53mefestoso far all i notice is that `lein cljsbuild auto` recompiles on *.clj file saves. i was expecting that to only happen for *.cljs files.
15:54cmajor71mefesto: you can tell cljsbuild where the files are:
15:54cmajor71:cljsbuild
15:54cmajor71 {:builds
15:54cmajor71 [{:source-paths ["src/yourprj/client"],
15:55cmajor71so it is only triggered on cljs updates
15:56supersymmefesto: I use https://github.com/Gozala/wisp now :)
15:58mefestocmajor71: thanks. i had separate src dirs ["src/clj" "src/cljs"] but decided to just have .cljs files intermingled with my .clj files. maybe i'll have a myapp/client ns like in your example.
15:59supersymThe compilation/optimization is very much not the same though
16:00cmajor71mefesto: sure, that works well for me
16:00cmajor71supersym: why would you prefer wisp over cljs?
16:00spoon16what is the appropriate way to write a map so that it can be read using clojure.edn/read
16:01mefestospoon16: i think the pr functions are what you want
16:01cmajor71,(read-string "{:a 1}")
16:01clojurebot{:a 1}
16:01cmajor71?
16:01mefesto(pr {:username "mefesto"})
16:01mefesto,(pr {:a 1 :b 2})
16:01clojurebot{:a 1, :b 2}
16:01spoon16thanks
16:02mefesto,(with-out-str (pr {:a 1 :b 2}))
16:02clojurebot"{:a 1, :b 2}"
16:02mefesto,(read-string (with-out-str (pr {:a 1 :b 2})))
16:02clojurebot{:a 1, :b 2}
16:05cmajor71going back to clojurescript (read-sting "{:a 1}") is a frequent guest, as well as reading numbers, dates, vectors, etc.. to connect browser to the server via data
16:06kofnook
16:08cmajor71map is king of data, reader is king of homoiconicity :)
16:10tomojcmajor7: don't use read-string for connecting the server to the browser
16:10tomojoh you meant edn/read-string?
16:11trptcolinthe reader is also earl of eval.
16:12cmajor7tomoj: correct, http://clojure.github.io/clojure/clojure.edn-api.html
16:13tomojI would always say edn/read-string :)
16:13cmajor7agree, it's clearer
16:13tomoj(:require [clojure.edn :refer [read-string]]) (:refer-clojure :exclude [read-string]) seems.. risky
16:14cmajor7or just clojure.lang.EdnReader/readString :)
16:14cmajor7get it raw and fresh
16:15mefestois there a way to configure eshell to stop saying, "WARNING: terminal is not fully functional" ?
16:15antares_Elastisch 1.1 is released: http://blog.clojurewerkz.org/blog/2013/05/21/elastisch-1-dot-1-0-is-released/
16:15technomancymefesto: I don't see anything wrong with storing cljs in src/
16:16mefestoor better yet, is there a way to make eshell fully functional :)
16:16technomancymefesto: what I do is export PAGER=cat
16:16Raynestechnomancy: There is an obvious connection between us.
16:16technomancyfor eshell
16:16mefestotechnomancy: thanks i'll try that
16:17Raynestechnomancy: http://osrc.dfm.io/Raynes
16:17RaynesWe're meant to be friends, you see.
16:17technomancyRaynes: my heart has always told me so
16:18trptcolinmine claims i'd rather be commenting on issues than pushing code. dammit.
16:18supersymcmajor71: good question. Learning purposes most of it really. Less output to dig through, and a chance to learn some more basic lisp/functional programming styles, as I'm not a native
16:18Raynesso: You have a horribly common nickname. How do you live with all of the highlights when people say 'so'?
16:18mefestotechnomancy: heh i actually prefer the warning message now :-)
16:19rasmustoRaynes: who says so?
16:19mefestotechnomancy: running `git show` in eshell with `setenv PAGER cat` isn't good
16:19technomancymefesto: wait why would you use CLI git from inside Emacs?
16:19technomancygit's CLI is awful =(
16:19mefestotechnomancy: im being silly these days :)
16:19RaynesSo's your face.
16:20mefestotechnomancy: yeah it's on my list to learn the git emacs stuff
16:20mefestoi finally got around to paredit and have been kicking myself for taking so long to use it
16:20technomancymefesto: oh man, prepare to have a great weight lifted from your shoulders
16:20rasmustoso... he must not have the addon to irssi
16:20mefestoim sure i'll feel the same way with the emacs git stuf
16:20technomancygoing from regular git to magit/vc is almost like learning paredit, yeah
16:21mefestothere's only so much cool shit my brain is capable of absorbing. cljs is taking the lions share atm
16:21technomancy"Here is Edward Bear (a.k.a. Winnie The Pooh), coming down the stairs, bump, bump, bump, on the back of his head, behind Christopher Robin. It is, as far as he knows, the only way of coming downstairs, but sometimes he feels that there really is another way, if only he could stop bumping for a moment and think of it. And then he feels that perhaps there isn't." <- git's UI
16:21pppaulmagit?
16:21mefestocljs + paredit + magit/vc ... dunno i just think my nose will start bleeding if i tackle all of them at once
16:22pjstadig:(
16:22pppaulparedit is easy :)
16:22pjstadigi actually prefer the git CLI to magit in some cases
16:22cmajor7mefesto: all the same 0s and 1s, just ordered differently
16:22cmajor7and have names
16:23duncanmdnolen: heya
16:23technomancyclassic: http://stevelosh.com/blog/2013/04/git-koans/
16:23duncanmany of you goign to Strange Loop?
16:23mefestoadded to my instapaper: http://www.emacswiki.org/emacs/Magit
16:23brainproxyif you occasionally need some hand-holding with respect to visualizing some complicated git stuff you've done or are doing, SourceTree is nice
16:23brainproxyhttp://www.sourcetreeapp.com/
16:23duncanmbrainproxy: it's a little slow sometimes
16:23duncanmi like using 'tig'
16:35mefestoM-x magit-wazzup
16:35mefesto:)
16:52mefestowow magit is very intuitive
16:57Okasumefesto: Magit eats my merges. :(
16:58mefestouh oh
16:58OkasuMight be some kind of bug or something but in the middle of automerge magit crashes horribly.
16:58mefestoare you on the latest version?
16:58OkasuYeah.
16:59mefestoOkasu: well i'll definitely be careful when i need to do that :-\
16:59amalloyi don't use magit, but i doubt anyone would use it if it couldn't merge
17:01Okasuamalloy: It can merge, my coworker uses magit happily for years and it works for him just fine. It can be my specific corner case, just be aware of it.
17:02Okasuhttp://www.mail-archive.com/magit@googlegroups.com/msg00518.html I've encountered something like that but fix from that thread didn't helped much.
17:02OkasuAutomerge -> funky unicode chars -> crash.
17:25howdynihaohi, using lein to start a project repl
17:25howdynihaois there anyway i can have it refresh the source without having to restart the repl?
17:26TimMchowdynihao: You can pass :reload or :reload-all to `require` and `use`.
17:26TimMcSo you can periodically say (require 'my.namespace :reload-all) from the REPL.
17:29howdynihaothank you
17:30howdynihaois the convention to use java interop whenever possible over a plugin?
17:30howdynihaolike for making an http request
17:30howdynihaowell i guess any plugin would just use java anyway right?
17:31technomancyhowdynihao: maybe you mean libraries?
17:33howdynihaoim not sure what i mean, i'm new to java AND clojure haha
17:34howdynihaooutside of clojure docs i'm lost, i know there are leinegen plugins, there are jars , theres java api
17:34technomancy"plugin" usually means something used to extend an existing end-user application
17:34howdynihaonot sure where to look first to do simple things that are 'standard library' stuff, i'm guessing just stick with java
17:35technomancytypically search github for libraries; clojuresphere.com is a good resource for getting a feel for how widely used a given library is
17:35zerokarmalefthowdynihao: there are clojure wrappers for some tasks (e.g. synchronous and asynchronous http clients), for others it makes more sense to do interop
17:36technomancydirect Java interop is usually only needed for more obscure stuff these days
17:36howdynihaook thank you, i wasnt sure what the convention / practice was for which to go look to first
17:37technomancywell you can't go wrong by asking on IRC
17:37howdynihaowouldn't clojure libraries as you say just wrap java interop anyway though?
17:37zerokarmaleftonly if they need to
17:38technomancyhowdynihao: usually at some point. but using a library wrapper gets you better support for higher-order functions, more discoverability, etc.
17:38technomancyplus in many cases it protects you from imprudent mutability
17:39howdynihaohardest part about clojure is getting started with a clojure project
17:39supersymhehe
17:39trptcolinlein new foobar
17:39tomojin too many cases it doesn't protect you at all :(
17:39technomancytrue of all languages =)
17:39trptcolin;)
17:39tomojs/at all/enough/
17:40howdynihaowell its figuring out the conventions and work flow and all that
17:42zerokarmalefthowdynihao: cemerick has a solid intro video on youtube that might suit you
17:43zerokarmaleftit shouldn't be *too* outdated
17:44supersymhowdynihao: I don't think Clojure itself has many (if any) conventions. But I assume you also mean by that, idiomatic ways of writing Clojure? I'd say check out the source code of some top projects on GitHub - see how those authors deal with problems
17:53hiredmana programming language is a tool, the most important thing for putting a new tool through its paces is a problem to use it on
17:55winkhowdynihao: supersym: I found https://github.com/bbatsov/clojure-style-guide really good
18:05yogthostechnomancy:
18:05yogthostechnomancy: hey want to do it up :)
18:05technomancysure
18:06technomancyyogthos: 3, 2, 1
18:06technomancydeleted
18:06yogthostechnomancy: awesome :)
18:08technomancyyogthos: did you see xeqi found a workaround for the gotta-fetch-em-all bug?
18:08yogthostechnomancy: no missed that, what can you do? :)
18:09technomancyyogthos: there's a special "RELEASE" value you can use in place of a version range that does the same thing without triggering useless downloads.
18:09yogthostechnomancy: ahhh
18:09yogthostechnomancy: that would be reasonable
18:10technomancywell
18:10technomancyoh, reasonable for leiningen you mean?
18:10technomancyI don't think aether's behaviour here can be described as reasonable =)
18:10yogthostechnomancy: oh no
18:10yogthosdefinitely not
18:10yogthosbut tricking aether that way might work :)
18:11technomancyyogthos: so we're shooting for a 2.2 release early next week
18:12yogthostechnomancy: nice work, v2's been pretty slick I gotta say
18:12technomancyglad to hear it
18:12technomancydevelopment hasn't been as fast-paced as it used to
18:13yogthosthat's to be expected though, most of the major stuff's been shaken out by now
18:13yogthosit's just ironing out different quirks at this point I imagine?
18:13technomancygrowing list of stuff to change once we can break backwards-compat with 3.0 =)
18:13technomancyhttps://github.com/technomancy/leiningen/issues?milestone=9&amp;page=1&amp;state=open
18:13yogthoshehe
18:14technomancyyeah, very few things still slated for 2.x which aren't just de-quirkification
18:14yogthoswhat's the plan for 3.0?
18:15trptcolinxml
18:15yogthoshaha
18:15yogthosah looking at the link :)
18:15technomancyyogthos: the biggies are a complete rewrite of profile merge logic, rewriting the :filespecs stuff which is used to specify what goes in jars, and probably tidying up test selectors
18:16technomancyand taking the clojars legacy repo off the defaults list
18:16yogthosnothing too crazy :)
18:16yogthosI haven't played with profiles too much myself though :)
18:16technomancyyou can go insane trying to figure out how they interact with middleware
18:17yogthosah I can see that
18:17technomancyit's fine for the basic cases, but there are some edge cases where the complexity shoots up, and the implementation has become very difficult to keep loaded in your head all at once
18:17hiredmansure, go insane, as long as it doesn't set your hair on fire
18:17technomancymiddleware has been ... an interesting experiment
18:17yogthoshehe
18:18yogthosI kinda ran into a similar problem with luminus options
18:18yogthosoriginally I was like hey I'll just let people set flags for what they want like +postgres or +cljs, etc
18:18yogthosbut then some of those start interacting in funny ways :P
18:18technomancymurkily-defined semantics are the worst
18:19yogthosI keep meaning to rewrite that with a declarative graph of interdependencies
18:19yogthosthen it can just fall through the options when the stuff gets selected
18:19yogthosor just just scrap the whole idea and pick some sane defaults :)
18:20yogthosI should do some sort of a poll on options people actually use
18:20tomojtechnomancy: is what nrepl does for middleware a solution to that problem?
18:20hiredmancan't you just make poms for for that? like make a pom that depends on everything you want to pull in for cljs, give it a nice short name in a mave repo, tell me to add that to their lein deps?
18:21technomancytomoj: I don't think so; the problem is how middleware and profiles interact
18:21technomancynot ordering
18:21tomojhmm
18:21technomancytomoj: basically some people want middleware to be "downstream" of profiles and other people want it to be "upstream"
18:21hiredmanintroducing a new way of specifying dependencies, and a new dependency resolution system on top of lein seems crazy
18:22tomojI see
18:22hiredmantechnomancy: well, so the "nrepl approach" might be to flag your middleware with metadata that says pre or post profiles
18:23tomojwhat is the input and output with lein middleware?
18:23technomancyhiredman: I think a single codebase which supports both would surpass the complexity threshold of the human mind
18:23technomancywell, my human mind
18:23hiredmanlets get rid of middlware and profiles then
18:24technomancy;; Warning: before editing this code it's recommended to take vast quantities of spice so that your awareness of the flow of space/time is enhanced
18:24technomancyhiredman: profiles on their own aren't a problem really
18:24hiredmantoo late, throw them out
18:25technomancyhiredman: guilt by association
18:25yogthoslol
18:25tomojhmm
18:25tomojit's not really 'middleware' in my vocabulary
18:25tomojor doesn't look like it
18:25technomancytomoj: it doesn't have the "request/response" aspect of middleware to be sure
18:26tomojyeah. I never knew what the hell 'middleware' was exactly supposed to mean
18:26hiredmanhttp://en.wikipedia.org/wiki/Middleware
18:26technomancypretty sure it will not exist in its present form in lein3
18:27tomojI guess taking 'ring' or 'nrepl' off the front makes it not a specific thing in a clojure context
18:27tomojif you just made it like ring middleware, wouldn't the upstream/downstream issue have a natural solution?
18:28technomancytomoj: you mean like each task would have to request a representation of the project?
18:28technomancyI think that brings in its own set of problems.
18:28tomojI don't know, I need to go read the relevant code before I would understand what that might mean
18:29tomojah, I'll just take you're word for it then instead of trying to understand the code :)
18:29technomancyring and nrepl don't have anything analogous to profiles really
18:29tomojright
18:30hiredmanI think the ring equivalent would be something like middleware is a function that takes a task (I guess a task name, or task var) and returns a function that takes a project map
18:30technomancywell, nrepl might in terms of clojure vs clojurescript context, but I don't think that's a proven model yet
18:30tomojand profiles then become instances of that?
18:31tomojor the profile logic anyway
18:31hiredmanthey could, I suppose
18:31tomojyeah, in spirit I mean :)
18:31callenyogthos: hey
18:31technomancyhiredman: hmm... maybe so
18:31yogthoscallen: heya
18:32hiredmanso then you are left with a much of these middlewares, and how do you build your stack from them?
18:32yogthoscallen: was gonna message you, but had a bit of a busy day :)
18:32hiredmanwith ring you directly do the function composition yourself, with nrepl you can do that or it uses dependency metadata to build it
18:33tomojobviously you should write a core.logic program inside your project.clj which handles this
18:33hiredmanwell, linearizing a dependency graph is pretty easy
18:34hiredmanweird
18:34tomojbad joke, I was really imagining writing relational middleware I think
18:34hiredmanI have a gist for that, but github seems to have eaten it
18:34tomojI found some topological-sort in the group
18:35hiredmanhttps://gist.github.com/hiredman/5314535
18:35hiredman"Hm."
18:35tomojhttps://gist.github.com/alandipert/1263783
18:36hiredmanthat sounds familiar
18:38hiredmanhttps://gist.github.com/hiredman/5623801
18:40hiredmanugh, reverse? gross
18:54tomojis that reverse inessential?
18:55tomojinductive graphs as presented in the paper uses foldr, and rseq is neither foldable nor chunked :(
18:56tomojrelatedly, are graph node/edge labels an abuse of metadata?
18:56tomojmy gut says yes
18:56tomojbut thinking "hmm I want to add extra data which does not affect equality" makes me wonder
18:57tomojoh labelled graph equality should consider labels I think
18:57tomojso, yes.
19:00tomojand you should be able to stick a var in a graph and give it an arbitrary label
19:05tomojor numbers.. duh
19:36pandeiroin a route wrapped in ring-multipart-params, do i have to do something magical to access the :tempfile in :params? When I try to get it, I'm getting a java.io.IOException: Stream closed
19:38weavejesterpandeiro: The :tempfile is, as the name suggests, a temporary file. There's nothing special about it...
19:38AWizzArdIs there a reader syntax for floats?
19:38weavejesterpandeiro: Maybe you're falling afoul of the old lazy-seq and with-open thing.
19:38nightfly0.129
19:38pandeiroweavejester: i am trying to do something with that file that involves (with-open (io/reader ...) ...) - is that the problem i take it?
19:38AWizzArdnightfly: that is the reader syntax for doubles.
19:39justin_smithnightfly: I think that would be a double
19:39weavejesterpandeiro: You have to be careful about lazy seqs. For instance...
19:39pandeiroI want to use line-seq on the file, hence the need for io/reader (i think)
19:39AWizzArdJust thought that appending something like an “f” would make the reader create a float.
19:39weavejesterpandeiro: Yeah, I thought it might be line-seq
19:39weavejesterDo you have something like...
19:39weavejester(with-open [r (io/reader …)] (line-seq r)) ?
19:40pandeiroyessir
19:40weavejesterThe line-seq is lazy, but after the with-open the reader will be closed.
19:40pandeiroso can i just (line-seq (io/reader f)) ?
19:40weavejesterYou need to keep the reader open, or read the file into memory by realizing the seq
19:40tomojare you going to stop early? line-seq will close it automatically if you read the whole thing
19:40weavejester(with-open [r (io/reader …)] (doall (line-seq r)))
19:41weavejesterdoall will turn a lazy seq into a fully realized one.
19:41pandeiroi'm doing a bunch of mapping and partitioning with it but i guess nothing is forcing it to realize...
19:41tomojwell I guess any inputstream will close if you read to the eof?
19:41pandeirojust a doall at the top then?
19:43tieTYT2is there something like add-watch but for things that aren't ref types?
19:43tieTYT2i guess that might be what a :pre/:post is for
19:43technomancytieTYT2: sure; (constantly nil)
19:43technomancyworks for detecting changes on any immutable data structure
19:44tomojshoreleave-pubsub has publishize for functions
19:45tomoj:pre/:post is definitely not for add-watch-like things
19:46pandeirothanks weavejester tomoj, that was it
19:46tieTYT2technomancy: i don't get it, is that a joke?
19:47technomancytieTYT2: yes
19:47technomancythings that aren't ref types shouldn't change
19:51tieTYT2technomancy: yeah that kind of makes sense
20:09amalloytechnomancy: i dunno, i think @(promise) is a better desciption of how to detect changes in an immutable structure
20:14technomancynot bad
21:17trptcolinamalloy: updated :) http://blog.8thlight.com/colin-jones/2013/05/21/extract_temp_to_query.html
21:19amalloytrptcolin: if you're interested, some macro trickery can make the delay entirely transparent. for example, (let-later [field (finders/find key :field), ^:delay validation-errors (validate-field updated-field)] ... (seq validation-errors) ...)
21:19trptcolinlol
21:20trptcolinin useful?
21:20actsasgeekI'm experimenting with a framework that has 34 (!) jar files. is there an easy way to get these on the class path in Lein 2 without fussing around with a local maven repository?
21:20trptcolinnm, found it :)
21:20amalloyindeed it is in useful
21:21amalloywhether that actually makes the code easier to read is a matter of judgment, of course
21:21trptcolinsure. well it's certainly fun to read! symbol-macrolet whee!!
21:21amalloy<3 macrolet
21:22trptcolinactsasgeek: https://github.com/dchelimsky/lein-expand-resource-paths
21:22trptcolinwith the usual caveat that you really should read this first: https://github.com/technomancy/leiningen/wiki/Repeatability
21:23amalloytheoretically it ought to be possible to let-later something that's being destructured, but that sounds pretty complicated so i just required that you can only delay "ordinary" bindings
21:23actsasgeektrptcolin: thanks!
21:54amalloyincidentally, trptcolin, i just slapped together a version of let-later that handles destructured values. a bit of a mess, but cute: https://www.refheap.com/paste/7bb21cbb3d633d743f4f88c7f
21:55trptcolinbut it's recursive what if i need to destructure a billion items??!?
21:55trptcolinthat's crazy, that'll take me awhile to wrap my head around. thanks!
21:56amalloyif you've never stackoverflowed the macroexpander before, you haven't lived
22:08gdevis there a clojure library that emits jsp? asking for a friend :>o
22:12djwonkamalloy: you also haven't lived if you haven't created a neverending cascade of function calls from `add-watch`
22:22TimMc,(macroexpand-1 '(->> amalloy trptcolin (->> amalloy trptcolin)))
22:22clojurebot#<StackOverflowError java.lang.StackOverflowError>
22:22TimMcWait a sec...
22:22TimMc&(macroexpand-1 '(->> amalloy trptcolin (->> amalloy trptcolin)))
22:22lazybot⇒ (clojure.core/->> (clojure.core/->> amalloy trptcolin) (->> amalloy trptcolin))
22:23TimMcThat should have been fine unless I used macroexpand.
22:23amalloyTimMc: agreed. can you stop pinging me, though? :P
22:23TimMcI wonder what clojurebot is complaining about?
22:23TimMcSure thing.
22:31xeqiamalloy: do you guys run a private maven repo at geni?
22:32amalloyno, although we've been talking about needing to
22:32amalloymost of our clojure is open-source, and most of our closed-source isn't clojure
22:34xeqihave you spent any time looking at what to use?
22:36amalloyno
22:37amalloyi hereby invite you to do that research for us
22:38xeqihaha
22:49tomojhuh, hoare says "[nondeterministic choice] is not intended as a useful operator for implementing a process... The main advantage of nondeterminism is in specifying a process."
22:52tomojoh, no
22:52tomojwell, yeah, but "alt" isn't "nondeterministic choice", it's "general choice", I think
23:02callentechnomancy: http://penny-arcade.com/comic/2011/06/13 I'm sick and miserable, but PA is keeping me smiling
23:03callenI love the expressive face.
23:13tomojonce you read the result of async macro, it's gone O_o
23:53muhoois it really true that there's no twitter oauth2 flow for friend?
23:53muhoo(or even oauth1)?
23:54muhooi mean there's this, but it ain't friend: https://github.com/mattrepl/clj-oauth
23:56mattreplmuhoo: what's wrong with clj-oauth?
23:56TimMcmuhoo: I haven't worked with friend, but isn't it an authentication lib with its own authorization stuff built in?
23:56TimMcOAuth is just for authorization; it's not intended to authenticate users.