#clojure logs

2012-04-10

00:12dnolenbrehaut: implementing the remote debugging protocol would be useful.
00:12dnolenalright haven't heard any bad news I'm gonna merge the ClJS optimizations
00:12brehautdnolen: agreed; i must confess to being scared off by the thought of having to implement json-rpc first
00:13dnolenbrehaut: I actually prototyped some stuff - it's pretty easy.
00:13brehautdnolen: yeah, i dont imagine its too bad. it looks like it learnt from the xml-rpc debarcle
00:14brehautdnolen: do you have a link?
00:16dnolenbrehaut: hmm, I do not. I think I did that work locally - got wiped out from a HD failure.
00:16brehautoh :/
00:16dnolenbrehaut: that said, it's just WebSockets I think it took me like 15 minutes to get something working.
00:19emezeskeIs anyone aware of a way to create multiple midje prerequisites using something like (doseq [x coll] (provided (whatever x) => x)) ?
00:19emezeskeI have tried using all kinds of things, but midje doesn't seem to like doseq or for or anything
00:20amalloyyou probably have to write a macro that expands to multiple instances of `provided`
00:20dnolenalready CLJS optimizations merged into master
00:21dnolenalready -> alright
00:23emezeskeamalloy: I think you're right. I've been having a hard time doing that.
00:35emezeskeamalloy: Ah, I see why I'm having a hard time... All of the midje "provided" items have to be set up at compile time, not run time
00:35emezeskeamalloy: I wanted to have add "provided"s based on runtime values. No can do! :)
00:35arohner_emezeske: yeah, midje has a hard time with things it doesn't anticipate
00:36arohner_emezeske: are you trying to stub, or spy?
00:36emezeskearohner_: stub
00:36arohner_emezeske: then just use with-redefs
00:36emezeskearohner_: I was trying to set build a bunch of tests dynamically
00:37emezeskearohner_: Yeah, I guess I could do that; what would I lose? Just midje's nice error messages?
00:37amalloyi find it inconceivable that you want to write tests but you don't know what they are until runtime
00:37arohner_amalloy: it doesn't have to be at runtime to want to use a loop
00:37arohner_(for [i ["foo" "bar" "baz"] (assert xyz))
00:38emezeskeYeah, the problem is looping over some data and making (provided ...) items based off that
00:38amalloyso? you can do that at macro time
00:39amalloy(defn get-assertions [] ["foo" "bar" "baz"]) ... (defmacro assert-the-things [] (cons `do (for [fact (get-assertions)] `(assert ~fact)))
00:40amalloyyou have the entire language available to you while compiling - that's a big part of the power of macros
00:40emezeskeamalloy: That works
00:40emezeskeamalloy: I think I was getting tripped up on wanting to pass the (get-assertions) values into the macro as an arg
00:40emezeskeamalloy: But that was doomed to failure, due to the arg being runtimey
00:41amalloyindeed. but you know at compile-time what the arg is, so you just need to reorganize things so that you *use* it at compile time
00:41emezeskeYeah
00:41arohner_amalloy: macro expansion is weird in midje
00:41arohner_as in, it has things that look like macros, but aren't
00:41amalloyi was about to say: i'm pretty sure that's not possible. but clojure.test does some pretty appalling things to macro expansions
00:42amalloystill, there's nothing midje can do to get in the way of: (defmacro create-my-tests [] (...)) (create-my-tests)
00:46bloopdoes there exist f such that (= x (reduce f x)) for all x? I'm pretty sure there does not, but I'm having trouble proving it to myself. (f is 'list for x of size 2, if that's useful)
00:48emezeskeHrm, I think arohner_ is right about things being weird
00:48bloop(this is not a homework question. I don't know why this suddenly fascinated me.)
00:48emezeskeamalloy: Consider my macro: (defmacro my-provided [] `(~'provided (something 5) => 6))
00:48emezeskeamalloy: That expands to (provided (my.ns/something 5) midje.sweet/=> 6)
00:49amalloythat looks...obviously correct? not sure what's weird here, that's just how macros work
00:49emezeskeamalloy: When I throw that into a (fact (something 5) => 6 (my-provided)), midje breaks
00:49emezeskeamalloy: Yeah I know its correct, the problem is it doesn't work with midje
00:50amalloymacros don't nest in that direction
00:50emezeskeSo I have to use a macro to build my fact?
00:50amalloyyes. you can't expect midje's fact to somehow know that your my-provided is a macro it should expand
00:50amalloyit's entitled to think that it's the beginning of a new fact clause
00:51amalloyor whatever midje's syntax is
00:51emezeskeRight, so basically it's very very much work to do a loop of provideds
00:51amalloy*nod* that's often the case with macros
00:51amalloymy understanding is that midje has a more-raw layer that involves functions passing around maps
00:51emezeskeYeah, I was looking at that a little
00:52emezeskeI think that the code deduplication I was trying to do is not worth the madness
00:53emezeskeMaybe I'll open a midje case -- it already supports (let) bindings inside facts; it doesn't seem ridiculous to support (for) as well
00:54arohner_maybe the bug is that symbols have to be special cased
00:54arohner_i.e. why do you need to open a bug to get (for)
00:55emezeskearohner_: I don't think midje evaluates most of the forms inside a fact
00:56emezeskearohner_: Inside a (fact ...) is definitely a DSL that may/may-not support things like for
00:56amalloyi don't think it would support a let-binding at the point you're trying to put your for
00:56amalloy(fact (let [...] (...))) - this would astonish me
00:56emezeskeamalloy: It definitely supports that, happily
00:57amalloyor, sorry, i guess i don't know midje syntax
00:57amalloymaybe that makes total sense
00:57emezeskeIt allows it, but I get the idea that it was a lot of work to allow it :)
00:57devnmosh is so awesome.
01:16muhoois there somewhere a documentation of all the options that can go into an ~/.lein/init.clj and what the right format is for them?
01:21emezeskeamalloy, arohner_: Thanks, guys, for your help, by the way!
01:26muhooalso, is there a way to get a repl inside leiningen? in other words, not in the project but inside the build system itself?
01:26emezeskeI guess what I learned today is that when your code is passed to a macro, you are at that macro's complete and total mercy.
01:56muhooalso, is there some way to override the groupid and artifactid in lein without having to move the structure of the files all around?
02:05amalloymuhoo: group and artifact IDs have no relation to file structure
02:08muhoothey do, according to lein
02:08muhoothey are generated from the file structure automatically. i need to override that
02:10muhooin leiningen/core.clj defproject macro: :group ~(or (namespace project-name) (name project-name))
02:10amalloyvery sporting of you to find evidence supporting my claim; do you have any supporting yours?
02:10muhooartifactId is (:name project), which is defined as ~(name project-name)
02:11amalloyjust do (defproject mygroup/myid ...)
02:11muhoohmm.... ok.
02:11muhoooh ffs
02:11muhoothanks.
02:13muhoo*sigh* so it's "lein new" that sets file structure to equal the defproject. i cannot believe i could have been so stupid.
02:14muhoowait, no. i definitely can believe it.
02:15muhooi think once i do get a clue, i owe you all a round of beers. or three.
02:17ktsujiibdknox: hi, I'm using korma on oracle and have a question about limit
03:05muhoohahahaw, this is silly. after going through all this work to try to write java classes in clj instead of having to deal with java, the resulting clojure code looks as verbose and ugly as java.
03:05muhoofail
03:07echo-areamuhoo: What's that?
03:57muhoooh, i've got to deliver a java library, i figured i'd try to cheat by doing it in clojure instead.
03:57muhooit's a lot more pleasant this way, but once i start to add all the java stuff, it gets really ugly.
03:58muhoonow the customer wants checked exceptions.
03:58muhooand javadoc
04:24muhooactually, generating javadoc from the AST's of clojure might be an interesting project, if i knew enough to be able to do it.
04:25amalloyyou're probably better off with the "shoot self in head" idea
05:21amalloyseriously though muhoo, you must be better off writing a few interfaces in java, with javadocs, and providing an interface-based API. maybe a few static "factory" sorts of functions as well, if they want. trying to provide a looks-just-like-java(tm) facade from clojure-only is sometimes possible, but (a) often unpleasant, and (b) probably not what the customer wants anyway
05:23amalloythen you don't have to AOT everything, too, which would add more complications
05:42muhooactually, i'm not thinking big enough. i need better customers :-)
05:43muhoolike, the guy who said, "i don't understand all that stuff, i'm game for whatever, just make it work ASAP." more of those will make me happy.
05:46muhooamalloy_: i do like the idea of writing abstract interfaces in java, then implementing them in clj. that'd get me a long way on this project.
08:29sanjoydWhat is the difference between [a b c] and (a b c)? Is [a b c] the same as '(a b c)?
08:29gfrederickssanjoyd: the first is a vector and the second is a list
08:29gfredericksthey compare equal but they are different data structures
08:30sanjoydSo I get O(1) element access in the first?
08:30gfredericksO(log(n)), but mostly yeah
08:30gfredericksthey also have different roles in source code
08:30sanjoydMeaning?
08:31gfrederickswell I assume you've seen code such as (let [foo (bar baz)] (bwam foo))
08:31sanjoydYes.
08:31sanjoydIs the [ ] there the same as the vector [ ]?
08:31clgvsanjoyd: O(log_32(n)) access which is almost O(1) on current machines
08:32sanjoyd(That is what prompted my question, actually.)
08:32sanjoydOr is the [ ] in let / fn etc. something different?
08:33gfrederickssanjoyd: parens in code usually mean a function invocation or something similar
08:33gfredericksvectors are either data literals (as in (def my-vector [1 2 3]))
08:33gfredericksor play some special role in a macro, usually indicating bindings
08:33gfredericksas in let, loop, fn, defn, for, ...
08:33clgvsanjoyd: it is the same. but the vector in let is useed att compile time whilc the vector your data vectors live at runtime
08:34winksanjoyd: The Joy of Clojure has a whole chapter dedicated to those semantics and differences, very insightful
08:34clgvtypos... :/
08:34sanjoydOkay.
09:00samaaronls
09:00Iceland_jacklol
09:00fdaoudfile not found
09:01fdaoudgeneral failure reading disk-- who the heck is general failure and why is he trying to read my disk?
09:03Bronsalol
09:03gfrederickspwd
09:03Bronsa#clojure
09:03gfredericksecho $USER
09:04TimMcuser
09:04Iceland_jackis this a Solaris?
09:04Iceland_jackkillall
09:05gfredericksrm -rf /usr/share
09:06rodnaph:(){ :|:& };:
09:06Iceland_jackWhy has no-one invented a spoon bomb?
09:06Iceland_jack#undef BADPUNS
09:07fdaoudcd /pub
09:07fdaoudmore beer
09:18sanjoydSuggestions for someone coming into Clojure from Haskell?
09:18sanjoyd(And a little bit of lisp.)
09:19llasramHave fun?
09:19llasram(In the positive, non-sarcastic sense)
09:19llasramWhat sort of suggestions are you looking for?
09:20sanjoydBooks, tutorials?
09:20progoThe Joy of Clojure for you.
09:20sanjoydThanks!
09:20llasram+1
09:20llasramOne of the best programming-language-specific books I've ever read
09:21TimMcllasram: Still a good read for moderately advanced Clojure programmers?
09:21jkdufair+1. Intelligent and slightly snarky/clever.
09:2245PAAH33Ysanjoyd: Free stuff first? Philosophical videos/interviews?
09:22llasramTimMc: Almost definitely. It does a great job of explaining the reasoning behind parts of the Clojure design. I actually read it twice, again after I'd been using Clojure for a bit, and got more on the second read-through
09:23sanjoyd45PAAH33Y: suggest?
09:2345PAAH33Ysanjoyd: philosphical + practical overview from creator -> http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure/
09:23sanjoyd45PAAH33Y: thanks!
09:2445PAAH33YMentions differences from haskell, too
09:2545PAAH33YCurrent newcomer books are Clojure Programming 2nd (the de facto first text), Programming Clojure (new kid, geared towards people coming from perl/python/ruby)
09:26RickInGAsanjoyd: this is another good intro to clojure video, this from Stuart Halloway: http://vimeo.com/10896148
09:2645PAAH33YAfter that, Joy of Clojure. After that, On Lisp/Let Over Lamba... uhm... hehe
09:2745PAAH33YIf you have java experience, there's videos around coming-from-java. Yeah, Halloway has some good ones
09:27fdaoud45PAAH33Y: no Clojure in Action?
09:27rodnaphanyone know when the videos from clojurewest might be making it online?
09:2745PAAH33Yfdaoud: That's true..
09:2845PAAH33Yfdaoud: release nov 2011. Missing some 1.3 details, but a solid read. I like the "in action" format...
09:2945PAAH33Yrodnaph: dont hold your breath
09:29fdaoud45PAAH33Y: I agree.
09:2945PAAH33Ybah
09:3145PAAH33Yfdaoud: Fan of the book?
09:31fdaoud45PAAH33Y: I'm a computer book junkie.
09:32cemerick45PAAH33Y: FYI, we don't talk about perl at all :-)
09:3245PAAH33Ycemerick: speaking of which, WTH with the book pricing? $22 in beta, then jumps to $30+, and now $18? (with amazon kindle-only stuck at $28)...
09:3245PAAH33Ycemerick: lol you appear out of nowhere :)
09:3345PAAH33Yfdaoud: nice. so am I :) a bit of a neurosis sometimes..
09:33cemerickI can hear someone talking about certain books from miles away. :-P
09:33fdaoud45PAAH33Y: I'm just wondering. Say I've read those Clojure books, have written some Clojure apps, and I understand functions, higher-order functions, recursion, data structures, macros, etc. Not necessarily an expert, but I understand all those things. It is worth it to read On Lisp? What will it give me on top of all that?
09:33cemerick45PAAH33Y: where is it $18?
09:34cemerickNot that I have any control over pricing.
09:34sanjoydOn Lisp is art.
09:34sanjoydNot means to an end but an end in itself.
09:34fdaoudsanjoyd: ok you got my attention. please tell me more.
09:3545PAAH33Ycemerick: I'm talking oreilly himself, homeboy -> http://shop.oreilly.com/product/0636920013754.do
09:35sanjoydfdaoud: I don't know how much it'll apply to Clojure.
09:35RickInGAon lisp is available to read online: http://www.bookshelf.jp/texi/onlisp/onlisp_toc.html#SEC_Contents
09:3645PAAH33Yfdaoud: practically, it's about macros
09:36sanjoydYes.
09:3645PAAH33Yfdaoud: i think halloway did a clojure translation
09:36cemerickoh, ebook
09:36fdaoud45PAAH33Y: it's called a "sale", publishers have them sometimes ;-)
09:36llasramfdaoud: I found it interesting. In my case, I "understood" macros before, but it increased my appreciation for how many contexts in which they can be useful
09:3645PAAH33YLet over lambda is already artful, intense book, but about Closures (not translation yet..)
09:37fdaoudI have many Manning books, not one bought at retail. They have half off ebooks all the time.
09:37sanjoydfdaoud: one trick I picked up from On Lisp is writing macros like (when+ (open-file "foo") (print it))
09:3745PAAH33Y*is another artful
09:37sanjoydAnamorphic macros, I think he calls them.
09:37llasramsanjoyd: Yeah... I'm not a fan of those :-)
09:38sanjoydI've not written Lisp beyond toy programs, so I can't comment much on how useful they are in practice.
09:3845PAAH33Yllasram: i think they're pretty cool looking. really concise and neat code...
09:38sanjoydIn fact, I intend to write some real-world lisp once I figure out clojure.
09:38llasramI prefer the Clojure convention of only using anaphoric macros with implicit positional anaphora. Less magical
09:38cemerick45PAAH33Y: hilarious that we don't get notified of the sale. Without hearing of it here, I'd not have been able to tweet it, etc.
09:38fdaoudllasram, sanjoyd: interesting, I'll have a look
09:38cemerickfdaoud: meant the above for you, but whatever :-)
09:39RickInGAI have been slowly making my way through on lisp... reading lisp code makes me appreciate Clojure all the more
09:39fdaoudcemerick: it's all good :)
09:39sanjoydBasically, you can s/On Lisp/Non-trivial program transformations using Common Lisp macros/
09:3945PAAH33Ycemerick: you'd think they be on top of these things. oreilly is more with the times than most, but not perfect...
09:4045PAAH33YRickInGA: hehe yeah. and do check out halloways translations
09:40RickInGA45PAAH33Y: I know Fogus translated the first 5 chapters, I will look for Halloway's
09:4145PAAH33Yfdaoud: Clojure in Action talks about anamorphic macros
09:41fdaoud45PAAH33Y: ah, didn't know that. Haven't gotten to chapter 7 yet. Thanks for the heads up!
09:42RickInGA45PAAH33Y: I see Halloway translated examples from Practical Common Lisp to Clojure. http://thinkrelevance.com/blog/2008/09/16/pcl-clojure
09:43fdaoudI don't (yet) know what an anamorphic macro is, so until I do, to me it's a macro that has an eating disorder.
09:4345PAAH33YRickInGA: I'm positive he did both.... *googling*
09:43fdaoudeither that or a lacking in vitamin intake.
09:4445PAAH33YRickInGA: http://thinkrelevance.com/blog/2008/12/12/on-lisp-clojure
09:44RickInGA45PAAH33Y cool, that will be useful.
09:45Iceland_jackfdaoud: anaPHOirc then?
09:45Bronsafdaoud: http://en.wikipedia.org/wiki/Anaphoric_macro
09:4545PAAH33Yfdaoud: I think you first learn something along the lines of (if (get-first-letter ["my words"]) upper-case it)... with *it* being the interesting part
09:4545PAAH33Ylol sorry, phoric. not morphic
09:45sanjoydYeah, anaphoric. :P
09:4645PAAH33YIf i start refering poetically to the human-like qualities of macros, then yes, anamophic :)
09:4645PAAH33Y*morphic
09:46Iceland_jackanthropomorphic then surely?
09:4745PAAH33YIceland_jack: lol yes..
09:4745PAAH33Yno sleep for many hours... need more coffee
09:47Iceland_jackanamorphic is just something that is not catamorphic
09:47fdaoudBronsa: thanks
09:47BronsaITC greek words
09:47fdaoudIceland_jack: right you are
09:48Iceland_jackanamorphic is also something that isn't green
09:4845PAAH33YIceland_jack: if my macros come out in distorted dimensions...
09:48fdaoud45PAAH33Y: what time is it for you?
09:48sanjoyd45PAAH33Y: the c9 video is very nice!
09:4845PAAH33Yfdaoud: almost 9AM
09:49fdaoud45PAAH33Y: central US?
09:4945PAAH33Ysanjoyd: my pleasure. but rhickey did all the work :)
09:4945PAAH33Yfdaoud: that zone, but south of the border
09:49fdaoud45PAAH33Y: south america?
09:4945PAAH33Yfdaoud: too far south. Southern Mexico :)
09:50fdaoud45PAAH33Y: ah ok, cool :)
09:54TimMcfdaoud: and not endomorphic, either
09:54TimMcwhich is a somatotype
09:55fdaoudTimMc: (inc (fdaoud :confusion))
09:55TimMcfdaoud: That's the word you meant earlier.
09:55BronsaITC: complecting the english language with buzzwords.
09:55TimMc(update-in fdaoud [:confusion] (fnil inc 0))
09:55fdaoudTimMc: indeed :D
10:21jsabeaudryWhat is the more convenient way of doing (take n (repeatedly f)) ?
10:22fdaoudjsabeaudry: (repeatedly n f)
10:23clgvjsabeaudry: it often pays to use 'doc ;)
10:24jsabeaudryheheheh thanks guys, what an embarasment ;)
10:25fdaoudclgv: true, but sometimes irc is an interactive doc/google :)
10:40c4milotime to give a try to clojure :)
10:41c4miloand test its community :P
10:41Iceland_jackoh-oh
10:48llasramTesting clojure.community
10:48llasramRan 1 IRC channel containing 426 users.
10:48llasram0 failures, 0 errors.
10:48FullmoonThat reminds me, what is a good unit test framework?
10:49llasramFullmoon: clojure.test is definitely "good enough," and lein integrates with it out-of-the-box
10:49llasramMidje is more full-featured, and it also widely used
10:50Fullmoonllasram: Thanks, I will look into it, I don't really want something super-nice functional just yet, but I think learning clojure test-driven would be awesome
10:54fdaoudllasram: that's awesome :D
10:55RickInGAI went to hear Neal Ford talk about functional programming last night. He had nice things to say about the Clojure community
10:55RickInGAHe said in the Ruby community, people will say "I really wish I had a program to control my tv, so I wrote this tv remote in ruby..."
10:57RickInGAHe said in the Clojure community, you hear people say "I was reading this one PhD dissertation, and it occurred to me that a data structure from this other PhD dissertation. No one had combined the two yet, so here is my library combining them."
10:58fdaoudRickInGA: sounds interesting, link please?
10:59RickInGAfdaoud: no link to Neal Ford's talk. I don't think it was recorded, I think the specific example he was referring to was this talk from dnolen http://blip.tv/clojure/david-nolen-predicate-dispatch-5953889
11:00RickInGAfdaoud if you are interested in Neal Ford talking about functional programming, he has a series he is writing http://www.ibm.com/developerworks/java/library/j-ft1/
11:00fdaoudRickInGA: ah, you actually *went to* hear Neal Ford talk! For some reason I assumed you meant "went to" as in "in my browser" :)
11:01fdaoudRickInGA: thanks for the links
11:01zerokarmaleftRickInGA: atlanta software craftsmanship?
11:01RickInGAzerokarmaleft: yep.
11:02RickInGAzerokarmaleft: were you there? I was the guy who asked about similarities between datomic and cqrs (fat guy, glasses)
11:02zerokarmaleftdidn't he give a similar talk at strangeloop '11?
11:02zerokarmaleftRickInGA: no, i just happened to be reading that same series from developerworks yesterday
11:03RickInGAzerokarmaleft: i don't know. I bet there are a lot of good presentations from Strange Loop. The only one I have watched so far is Simple Made Easy
11:04zerokarmaleftRickInGA: http://www.infoq.com/presentations/Functional-Thinking
11:04fdaoudloved that one.
11:05RickInGAzerokarmaleft just quick glance at some of his slides, it looks like the same talk
11:06RickInGAbut last night thoughtworks provided pizza and beer. your link lacks both! :)
11:08RickInGAHe also won't have mentioned datomic in the infoq link, just because of the timing.
11:08RickInGAHe was really impressed with it, called it a "22nd Century Database"
11:10autodidaktzerokarmaleft: fdaoud, A blog post about those functional thinking talks -> http://blog.twonegatives.com/post/20182672074/functional-thinking-in-clojure-part-2
11:11fdaoudautodidakt: nice!
11:14zerokarmaleftautodidakt: nice, thanks
11:14dgrnbrgtechnomancy: are you there?
11:15autodidaktdgrnbrg: technomancy is always with us
11:16dgrnbrgautodidakt: :)
11:16dgrnbrgI need help debugging an issue w/ my first released library & its corresponding lein plugin
11:16dgrnbrgThe error is bizarre and incomprehensible to me
11:17fdaoudautodidakt: why the nick change to 64MAA73RA?
11:18dgrnbrgHere's the stack trace of the problem I'm having: https://gist.github.com/701aa6ef9fc54f58747b
11:18dgrnbrgit happens when I require a lib that I pushed to clojars in a plugin i'm writing
11:18dgrnbrgI can load the lib from the repl, though
11:18dgrnbrgit's my first time using clojars/maven and my first lein plugin, so i'm not sure where the issue lies
11:2064MAA73RAfdaoud: fighting with nickserv, complaining in #freenode
11:20fdaoud64MAA73RA: I see.
11:23jaen64MAA73RA: actually does nickserv enforce anything at all? I regstered my nick but I never auth and I don't get kicked or anything.
11:24TimMcjaen: Did you tell your IRC client the password? It might auth for you.
11:25jaenI don't think so, I'm too lazy to check how to tell that to weechat after getting it to set urgency hint on highlight was so troublesome ; d
11:26TimMcdgrnbrg: Looks like it is missing some class?
11:26dgrnbrgTimMc: it's missing the lib I exported to clojars
11:26dgrnbrgbut I added it to my project.clj
11:26dgrnbrgand did lein deps
11:27TimMcWhat does lein classpath show?
11:27TimMcThat is, does it include it?
11:27dgrnbrgyes
11:27dgrnbrgit's got the jar on the classpath
11:27dgrnbrgI don't know if maybe I didn't do the clojars thing correctly
11:28dgrnbrgI just registered for clojars and did lein push
11:28dgrnbrgand nothing else as far as I can recall
11:28dgrnbrgdo I need to create a manifest or something?
11:29dgrnbrgTimMc: is there something special I need to do to release on clojars?
11:30TimMcNo, that sounds right.
11:30TimMcdgrnbrg: Can you gist a failing project.clj for me?
11:30dgrnbrgTimMc: i have the code on github (all 10 lines)
11:31dgrnbrghttps://github.com/dgrnbrg/lein-guzheng
11:31Wild_Catis there an event-driven network programming framework for Clojure (a Twisted equivalent, basically)?
11:31TimMcI might give that a try in a few minutes.
11:32dgrnbrgTimMc: the project.clj is there, as well
11:32dgrnbrgif anything sticks out to you...
11:32zerokarmaleftWild_Cat: lamina
11:32TimMcdgrnbrg: Besides a :url field? No. :-)
11:33zerokarmaleftWild_Cat: er aleph, which is built on lamina
11:33Wild_Catzerokarmaleft: checking it out now, thanks
11:34fdaoudjaen: I'm not sure but I think it would only be an issue if there was a conflict between you and someone else for the same nick.
11:34TimMcfdaoud: How does NickServ know jaen isn't "someone else"?
11:35jaenMaybe probably then I would have to auth for reals or something.
11:35jaenThoguh I find it pretty weird I don't have to right now anyway.
11:36fdaoudTimMc: because you auth yourself to nickserv with your password.
11:39fdaoudTimMc: you can force someone to change their nick if they are using yours and you are the one who has registered it.
11:39devnghost
11:40fdaoudjaen: if you never auth, your registration may expire.
11:41fdaoudalso, apparently some channels only allow registered nicks in. also apparently, some irc clients identify those you are using registered nicks.
11:41Raynes/message nickserv ghost yournick yourpass
11:41RaynesEr, /msg
11:41jaenDuh... I'll look how to get weechat to auth me. I hope it's not some obscure script I had to fish from google as it was case with the urgency hint
11:41RaynesToo early.
11:43fdaoudalso to prevent the problem at all you can use /msg nickserv set enforce on
11:43fdaoudRaynes: that's also useful when it's you who is the ghost, you got disconnected somehow and when you rejoin, your "previous self" is a zombie
11:44RaynesIndeed.
11:45TimMcI think that's what "ghost" means.
11:45fdaoudTimMc: yeah. Really to boot someone you'd use /msg nickserv release TimMc <password>
11:46TimMcSo, I'm under the impression that freenode's NickServ will boot anyone who doesn't auth in X seconds when using a registered nick.
11:50devnthat's what i thought as well
11:50S11001001TimMc: I doubt it, unless there's a non-default option
11:51devnon other networks the zombie problem is way more common
11:51S11001001you do get booted for not ponging
11:51fdaoudTimMc: that is what /msg nickserv set enforce on does
11:51fdaoudyou decide whether to enforce for your nick
11:54TimMcaha!
11:54TimMcI set my nick up so long ago, I must have forgotten setting that.
11:58devni cannot get over how nice mosh is
11:59gfredericksin an aleph http server is it redundant to start up a new thread to handle the request?
11:59devni want to shout it from the top of a mountain
11:59fdaouddevn: mosh?
11:59devnllasram: lol. ssh is fine. im still going to ssh -x, tunnel with it, etc.
11:59devnfdaoud: http://mosh.mit.edu/
12:00llasramdevn: I really should give it a try, but I'm not quite sure what it buys over ssh -t 'screen -x'
12:01gfredericks"On a bad connection, outstanding predictions are underlined so you won't be misled."
12:01gfredericksthat is interesting
12:01gfredericksI wonder how they underline deletions
12:03llasramThe un-derline them
12:03llasrams,The,They,
12:04llasram~rimshot
12:04clojurebotBadum, *tish*
12:11autodidaktofinally
12:13autodidaktodevn: my understanding is the mosh wraps around ssh, providing some modern nicesties?
12:14autodidaktodevn: I always assumed we learned a trick or two since the 1980s. Nice to finally be able to use them
12:14autodidaktodevn: But what I want to know is: Is it 100% internet-hipster approved?
12:15jaenWhat sort of niceties one would need apart from tmux, because I'm squinting at this mosh page and can't figure what's so awesome in it ; <
12:16autodidaktojaen: it's not a screen/tmux replacement
12:16offby1jaen: I just started using it. It works, but I can't say it "feels" any different from ssh.
12:16offby1Supposedly there's less latency.
12:16autodidaktojaen: my vague understanding is that it wraps some UDP around your SSH TCP and it's fun for U 'n' Me
12:17offby1Hey, you got your chocolate in my peanut butter.
12:17jaenThat I figured already, but I'm too dumb to figure what sort nice it gives me from the page...
12:17autodidaktojaen ever play quake1?
12:17autodidaktoor hl1 before the "new netcode" ?
12:17offby1jaen: also, it'll automatically reconnect if you, say, move your laptop from one network to another.
12:17jaenHahaha, too young for that, I didn't have internets back then
12:18autodidaktoand you have you start shooting your M16 before going around the corner (in counter-strike) just in case?
12:18jaenBut I can sort of get what yo're trying to say
12:18jaenIt's just more stable on wacky connections?
12:18autodidaktomy impress is, SSH with modern network code
12:19autodidaktonot just more stable, but what offby1 said.. you can put your laptop to sleep and wake it up and you're "still" connected
12:19autodidaktojaen: you're grandfather's ssh can't do that
12:20offby1of course if, like me, you only use ssh to connect to a long-running "screen" or "tmux" session, then it doesn't buy you much
12:20autodidaktooffby1: i'd connect to your long-running screen session any day for free.... oh wait, is this still #emacs?
12:21jaenThat explains why I don't see anything awesome in it. I hardly ever sleep my laptop, since linux and sandy bridge tend to not like eachother in ceratin aspects ; D
12:21jaenoffby1: okay, that's pretty much what I figured
12:21autodidaktojaen: you got 56K modulate into your TCP/IPs over Pentium MMX emulation!
12:21jaenWas interested if it gives anything to ye old non-mobile programmer ; d
12:21jaen*ye olde
12:22autodidaktojaen: give it a try the next time you get a chance. maybe you'll like it. maybe it's not worth it. What do we IRC people know anyway?
12:22jaenCertainly more than me : D
12:23autodidaktojaen: you'd be surprised
12:23offby1jaen: I've got to say, it's one of the slickest open-source packages I've used. The docs are good; the software was easily available on the two platforms on which I'd looked for it
12:24offby1I get the impression they waited until they were done to announce it.
12:24offby1Oh and there's a super-helpful #mosh channel on this very IRC network.
12:24autodidaktooffby1: And did you see that website? Richard Stallman CSS bootstrap? No way
12:24jaenMaybe I'll take a look at it one of these days ; D
12:29autodidaktoRaynes: Thou shalt pull what I request
12:29Raynesautodidakto: Oh, I forgot to get to that.
12:29Raynesautodidakto: I'm not sure that's what we're after though.
12:29clojurebotGabh mo leithscéal?
12:30RaynesThe idea was that the height would increase with the browser, not the code.
12:31autodidaktoRaynes: but if the code isn't there, why have a bigger empty box?
12:31autodidaktoyou could do a bigger min-height, but I'd need to a add a media query
12:31RaynesBecause it's better than a giant empty space surrounding the small empty box.
12:32autodidaktoRaynes: if you're box is empty. type
12:32autodidaktolol i dont know either. hmm
12:32Raynes:p
12:33autodidaktoSo, a big box empty box that fills your screen, but one line of code is better than a smaller-ish box with one line of code?
12:34RaynesApparently.
12:34RaynesSeveral people have requested it.
12:34autodidaktoEither way you're getting a bunch of empty space if you dont put code in their and you have a big screen
12:34RaynesSo I guess by popular demand...
12:34autodidaktoyou can have that big empty space be the bg-color (black), or the color of the empty box
12:35RaynesI say we just take the website down and call it a day. Can't take these damn decisions.
12:35Raynes;p
12:35autodidaktoHave that guy who was requesting the feature take a look. I think it is what he's looking for
12:35autodidaktoI know. Lots of little annoying things to decide...
12:36autodidaktoBut hey, you asked for me. I just heard an interview with you last night and you said "check out my issues on refheap and help out!" and i spent the next hour or so doing that :)
12:36Raynesautodidakto: He has an issue there. Ping him.
12:36autodidakto*you ask for it
12:36Rayneshuh
12:36RaynesWait, was that the dictv thing?
12:37autodidaktoRaynes: lol i dunno, some random goofy guy on ustream i found in a google search
12:37RaynesBahaha, yeah, the dictv thing. It's pretty crazy that you found that.
12:38autodidaktoThat's the name dictv? The guy was a little out there, for my taste. Why is crazy that i found that?
12:38RaynesIt is a weekly web show related to dreamincode.com
12:39RaynesThey like crazy out there stuff.
12:39RaynesIt's just that dictv is really highly isolated to dreamincode people.
12:40RaynesI wouldn't expect anyone not from there to have come across it.
12:40autodidakto"jeremyheiler" was the guy, right? he's participating the issue. I'll msg him.
12:40RaynesYeah, that's him.
12:41autodidaktoRaynes: Yeah I was googling your name/handle
12:41RaynesHe seemed pretty opinionated about it, so if he is into this we'll probably go for it.
12:41offby1that's pretty personal
12:41autodidaktooffby1: that's how i like it
12:41RaynesWow! My very own stalker!
12:41offby1he's mine; hands off
12:43autodidaktoRaynes: Haha well. Learning clojure and chatting in IRC at the same... There are many "hey wait a minute, I know that guy!" moments
12:43autodidakto*at the same time
12:44RaynesHeh
12:44RaynesI don't think you know me.
12:44fdaoud(inc (fdaoud :confusion))
12:44lazybot⇒ 1
12:44RaynesThough you should. I'm pretty great.
12:44babilenRaynes: Just seen you being active, so I thought I just "bug" you here. -- I incorporated your suggestions regarding my pull request on fs. Is there anything else you would change?
12:45RaynesOh man. I just forgot about it.
12:45RaynesI'm sorry!
12:45autodidaktoWell, know = slightly interacted with him on irc... Haha. I believe it. Alabama charm. My step dad is from oklahoma. I really need to visit the area
12:45babilenRaynes: Don't worry -- Hence my ping :)
12:49babilenweavejester: Any comments on the changes to make clucy ready for lucene 3.5.0 ? (https://github.com/weavejester/clucy/pull/8)
12:49Raynesbabilen: Okay, I see why I didn't pull this immediately. It's actually something silly that I could have fixed myself: you need to use the `file` function in fs.core and not clojure.java.io/file. They're generally the same, but the one in fs.core has some special cwd behavior. It's a three character change. If you could update that, I'll pull. Or you can just tell me to stop being lazy and do it myself. Whatever you want. :)
12:50babilenRaynes: I've changed that already and pushed the changes. It doesn't make sense to use it for absolute? though as this would cause *every* path to be absolute ;)
12:51RaynesOh. Duh.
12:51RaynesYeah, I mostly just scanned the diff for io/file and red lights started flashing in my skull.
12:51RaynesYou're right. I'll merge this in a minute.
12:52weavejesterbabilen: Sorry, I haven't been keeping up with Lucene, so making sure the changes made are correct (because they delete a lot of things) is a pretty big effort for me. I haven't had the time to sort it out.
12:52RaynesSorry it took so long.
12:52babilenRaynes: Most appreciated. Should have mentioned the absolute? case :)
12:52babilenweavejester: Alright -- Let me know if you need more information or if I could make it easier for you.
12:53technomancydgrnbrg: what's up?
12:54babilenweavejester: The main difference is that calls to optimize() are strongly discouraged (and optimize() has been renamed to forceMerge() to reflect that) -- I therefore deleted all code that was needed to call optimize() in specific intervals.
12:55weavejesterbabilen: Hmm, okay, I see that...
12:55babilenweavejester: FWIW - I have used that code in production for a while now and haven't had problems with it. I still strongly encourage you to test it yourself. Just wanted to know if you need additional information.
12:55weavejesterbabilen: Oh, is there a reason you don't have a 1.3-lucene3 multi-dep?
12:56babilenweavejester: That is the default
12:56weavejesterbabilen: Ahh
12:57babilen:)
12:57weavejesterbabilen: I'll try and get it merged by this weekend. Now I look at it more closely, it appears a sensible change.
12:57weavejesterbabilen: Usually I merge things faster, but I haven't touched clucy in a while. Technomancy was the last to touch it :)
12:58Raynesbabilen: You forgot to remove your join tests.
12:58RaynesEvil!
12:58babilenweavejester: Wonderful! Most appreciated. It just happened that I use clucy myself a bit these days in other code and just wanted to make sure that I don't stray too far from upstream. I am actually working on ways to programmatically construct queries, but that is not yet ready.
12:58autodidaktotechnomancy: dgrnbrg posted -> https://gist.github.com/701aa6ef9fc54f58747b . says he gets that when requiring a lib he push on clojars, in a plugin he's making
12:59babilenRaynes: Argh! Sorry! :( -- Should I push that change?
12:59Raynesbabilen: Naw, I've got it.
12:59autodidaktobut can load it in a repl
12:59babilenRaynes: Great -- Sorry :'-(
12:59weavejesterbabilen: You use Clucy a lot then? Hmmm...
12:59Raynesbabilen: Your changed are pushed.
13:00RaynesI'm so sorry that took so long.
13:00babilenweavejester: Well - I use lucene to index text and write my program in Clojure -- Clucy was a sensible choice at the time and I "knew" it already due to its usage in leiningen.
13:02weavejesterbabilen: Okay, I'll merge in the changes, I think. If there are any problems, I'll point the pitchfork wielding mob in your direction.
13:02babilenhehe
13:02babilen(the tests pass!)
13:02weavejesterThat's responsible project management, right? :)
13:03technomancydgrnbrg: hmmm; it works fine here. which leiningen version are you using?
13:03babilenHmm, maybe we could convince technomancy to try leiningen with the proposed changes :-/ (There might be additional tests related to the search/index functionality)
13:04technomancybabilen: how about right after the preview3 release?
13:04babilentechnomancy: Sure -- I just have no idea how else I could verify that clucy is still doing its thing. I have that impression, but would like to gather additional data points :)
13:04dnolenanother massive speed boost for CLJS, direct invocation for known fns - it's now possible to write CLJS w/ identical perf to JS
13:05technomancyonly 3 issues blocking preview3: https://github.com/technomancy/leiningen/issues?sort=created&amp;direction=desc&amp;state=open&amp;page=1&amp;milestone=2
13:06Na-Fiannhi, I'm trying to install clojure from the instructions from here: http://riddell.us/ClojureOnUbuntu.html. However, when installing clojure-contrib, there is no file called clojure-contrib.jar generated after mvn install. Anyone know where it went? I'm on ubuntu 10.10
13:06lazybotThe riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.10.10
13:06jsabeaudrypartition can be seen as splitting the seq into rows assuming a row-major format, is there some kind of equivalent for column major format? Best I could find is (partition nrows (apply interleave (partition v ncols)))
13:06Na-Fiannlol wow, that's awesome :)
13:06technomancylazybot: botsnack
13:06lazybottechnomancy: Thanks! Om nom nom!!
13:08weavejesterbabilen: Okay, merged and released 0.3.0
13:08RickInGAtechnomancy: just wanted to let you know what a powerful influence you have on the community.... I bought an aeropress last week.
13:08babilenweavejester: yay!
13:08weavejesterbabilen: Sorry again for the delay
13:08technomancyRickInGA: haha; excellent.
13:08weavejesterbabilen: Any more pull requests you have should be merged faster
13:09technomancywith some proper beans you'll be all set
13:09autodidaktotechnomancy: I dont get that thing... a single serving french press?
13:09RickInGAyeah, I am going to have to see what I can find
13:09jsabeaudry&(partition 2 (apply interleave (partition 4 [:1_1 :1_2 :1_3 :1_4 :2_1 :2_2 :2_3 :2_4])))
13:09lazybot⇒ ((:1_1 :2_1) (:1_2 :2_2) (:1_3 :2_3) (:1_4 :2_4))
13:10technomancyautodidakto: sort of, but it has some advantages over a french press
13:10weavejesterHuh, apparently I joined GitHub 18 days after it first went live.
13:10technomancyautodidakto: since it uses paper filters, you can use a much finer grind, which means you don't need to keep the water as hot
13:10technomancyso the end result is less bitter
13:10technomancyplus you don't get any grit in it, and it's easier to clean
13:10autodidaktotechnomancy: I see
13:11fdaoudkeurig ftw
13:12autodidaktoRaynes: We have a winner! -> I "applied" the patch directly in Chrome from refheap.com, and I most definitely approve of this. [https://github.com/Raynes/refheap/issues/45#issuecomment-5050785]
13:12RaynesI saw.
13:12RaynesI'm testing it out right now.
13:12autodidaktoHehe. just keeping you honest...
13:12fdaoudwhere is the pause button on this channel?
13:13autodidaktofdaoud: it's only got one gear: Go
13:13fdaoudok then,
13:13fdaoudwhere is the record button on this channel?
13:13TimMc~logs
13:13clojurebotlogs is http://clojure-log.n01se.net/
13:13Raynesautodidakto: Okay, I have one problem.
13:14autodidaktoyeah?
13:14Raynesautodidakto: When I paste something long, I get slapped to the bottom of the page.
13:14fdaoudawesome.
13:14RaynesThe paste button is at the top of the page.
13:14Raynes:(
13:14autodidaktonot winning! let me check
13:14fdaoudTimMc: thanks
13:17groovemonkeyI'm looking to collect values from nested loops...doseq returns nil, and I'm not sure how to yield values from inside them...can anyone help me out?
13:17groovemonkeyi.e.
13:17groovemonkey(let [room (rand-nth [:bedroom :bathroom :living-room])]
13:17groovemonkey (doseq [furniture [:mirror :chair]]
13:17groovemonkey (let [type [:type1 :type2]]
13:17groovemonkey (list type)))) ;; what I want to return
13:18autodidaktoRaynes: Oh i see. you paste, and now you got to scroll up
13:18raekgroovemonkey: use for instead of doseq
13:19raekdoseq is a variant of for that does not collect the results
13:19groovemonkeyahh so just use a for loop?
13:19raek(for [furniture [:mirror :chair]] ...)
13:19groovemonkeyraek: thank you, didn't see your first answer
13:19raekit has the same syntax as doseq
13:19groovemonkeyexcellent, thank you!
13:20autodidaktoRaynes: you really do want it all, don't you? :) Options -> 1) Paste button on bottom (as well, or only). 2) Ignore it, most pastes are short 3) uhm lemme think
13:22autodidakto3) the hardcore paster without time to scroll up should be using the keyboard shortcuts [COMING SOON!] 4) Still thinking
13:24jappy123(extend-type java.lang.String
13:24jappy123 java.lang.Runnable (run [_] (println "hello")))
13:25jappy123is there any way to have existing types dynamically implement interfaces like they can protocols? i.e.
13:25jappy123sorry wrong order
13:25Bronsanot in clojure
13:26jappy123I have existing objects I want to treat like IFn and ISeq but I dont want to have to implement those interfaces in java... and I dont want to have to wrap my objects
13:27jappy123I dont understand why the protocols can't behave like real interfaces.
13:28llasramjappy123: Protocols were a later feature. Clojurescript implements those core interfaces as protocols. Hopefully Clojure will eventually too
13:28technomancyIFn can't be a protocol in Clojure. ಥ_ಥ
13:29llasramYeah... That one would be a tad tricky
13:29dnolenjappy123: what you mean is why interfaces can't act like protocols.
13:29jappy123right
13:30dnolenClojure on the JVM is one giant epic battle against a VM designed for a static programming language.
13:30jappy123looking at the extend code... it seems like it should be doable
13:31hcumberdaleHi ;)
13:31jappy123has anyone ever implemented IFn... we should be able to decorate our types lazily too :p
13:31hiredmandnolen: well, it could have been the clr...
13:31hcumberdaleI want to merge an incoming json request
13:31jappy123I dont know... I still believe in magic
13:31hcumberdalebut only the keys that exists in a map
13:32mrb_bkdnolen: woot thanks for the shouts
13:32hcumberdaleis there a "merge-existing" for maps?
13:32RickInGAat the meetup group I went to last night, Neal Ford said that tail recursion was coming to a future version of java, and he said that higher order functions were going to be in java 1.8. do we know what version will have tco?
13:32dnolenmrb_bk: :)
13:32TimMcjappy123: I have, it wasn't pretty.
13:34raekhcumberdale: you can do something like (merge m1 (select-keys m2 (keys m1)))
13:34jappy123Its great stuff when your code can behave like a persistent map, seq, vector, etc... and with all the talk I thought making your "collection'ish" types play well would be simple
13:35hcumberdale,(merge {:x 1 :y 2 :badkey "3"} (select-keys {:x nil :y nil} (keys {:x 1 :y 2 :badkey "3"})))
13:35clojurebot{:y nil, :x nil, :badkey "3"}
13:36hcumberdaleraek: seems not to work ;(
13:37Raynesautodidakto: Not sure what to do about it either.
13:37hcumberdale,(merge {:x 1 :y 2 :badkey "3"} (select-keys {:x 1 :y 2 :badkey "3"} (keys {:x nil :y nil})))
13:37clojurebot{:y 2, :x 1, :badkey "3"}
13:38hcumberdale??, ....
13:38hcumberdaleahh
13:38hcumberdale,(merge {:x nil :y nil} (select-keys {:x 1 :y 2 :badkey "3"} (keys {:x nil :y nil})))
13:38clojurebot{:y 2, :x 1}
13:38raekhcumberdale: I though of it like this: ##(let [defaults {:x nil, :y nil}, potentially-bad {:x 1, :z 3}] (merge good-keys (select-keys potentially-bad (keys defaults))))
13:38lazybotjava.lang.RuntimeException: Unable to resolve symbol: good-keys in this context
13:39raekeh
13:39hcumberdalethx raek
13:39raek&(let [defaults {:x nil, :y nil}, potentially-bad {:x 1, :z 3}] (merge defaults (select-keys potentially-bad (keys defaults))))
13:39lazybot⇒ {:y nil, :x 1}
13:39hcumberdaleyeah!
13:41hcumberdaleI'll test the clojure blog the first time on heroku today :)
13:42autodidaktoraek: ahh i see... using good keys, grab the good stuff from the bad hash, merge with the good hash
13:45hcumberdaleautodidakto: nice nick
13:46autodidaktohcumberdale: thank you :)
13:50dgrnbrgTimMc: did you get a chance to look at that project.clj of my lein-guzheng projecT?
13:55dnolenoooh, we're on the verge 1.4.0?
13:55gfrederickswe are?
13:55gfredericks1.4: where all vars are dynamic by default and you have to specify ^:boring to get the formerly default behavior
13:56autodidaktodgrnbrg: did you see technomancy's messages?
13:56dgrnbrgautodidakto: I didn't, and then my scroll back made them die
13:56dgrnbrgi was at lunch, alas
13:56dgrnbrg:(
13:56dgrnbrgis there a log of this room?
13:57llasramdgrnbrg: http://clojure-log.n01se.net/ :-)
13:57autodidakto<technomancy> dgrnbrg: hmmm; it works fine here. which leiningen version are you using?
13:57llasramdgrnbrg: This gist was "Works for me. What lein version are you using"
13:57llasramOh, there you go
13:57autodidakto:)
13:58dgrnbrgah
13:58dgrnbrgI'm using Leiningen 1.6.2 on Java 1.7.0-ea OpenJDK 64-Bit Server VM
13:58autodidaktodgrnbrg: tried the latest?
13:59muhoodgrnbrg: lein 1.7.1 is the most current stable IIRC.
13:59dgrnbrgis there a command to update?
13:59muhoodgrnbrg: https://raw.github.com/technomancy/leiningen/stable/bin/lein
13:59autodidaktolein -h
13:59autodidaktotry lein upgrade
14:00muhooeven better ^
14:00dgrnbrgautodidakto: awesome :)
14:00dgrnbrgI kept trying lein update
14:00dgrnbrgrather, i tried it once, and it didn't work
14:01autodidaktodownload from github if that command doesnt work, i assume
14:01dgrnbrgthe command worked
14:01dgrnbrgbut lein guzheng still doesn't work
14:02technomancydgrnbrg: oh, I thought you said you were going to target lein2 first
14:03dgrnbrgtechnomancy: I actually need lein 1 support, since I'm writing this to scratch an itch
14:03dgrnbrgand that itch is running on lein 1 for now
14:03dgrnbrg:/
14:03technomancyoh, ok. I just tried it on lein 1.7.1 and it works fine for me to.
14:03dgrnbrgyou don't get that class loader issue?
14:03technomancyno
14:03hcumberdaleI will try lein2 out later :)
14:04dgrnbrgtechnomancy: is there some way I couldn't messed up my class path globally?
14:04dgrnbrg*could've
14:04dgrnbrgare you on mac or linux?
14:04technomancyin lein1 the only global classpath settings are the user plugins
14:05technomancyunless you've set the CLASSPATH env var, which you should basically never do
14:05technomancyso it could be something in ~/.lein/plugins interfering
14:05technomancy(this is not a problem in lein2)
14:05dgrnbrgnope, i have not done that
14:06dgrnbrgso, you can git clone lein-guzheng, and then run "lein guzheng" in that directory and it works?
14:06technomancyI did "lein1 plugin install lein-guzheng 0.1.0-SNAPSHOT", then "lein1 guzheng" and it works fine
14:07oskarth_:q
14:07technomancydgrnbrg: well, you have to call "lein guzheng" on a project that is not :eval-in-leiningen if you're using lein1
14:07dgrnbrgtechnomancy: what's the workflow for testing my plugin?
14:07hcumberdaleawwww
14:08hcumberdalelein ring server-headless 8080 << does not run clojure 1.3 !!!
14:08hcumberdale:dependencies [[org.clojure/clojure "1.3.0"] !!
14:08technomancydgrnbrg: if you don't want to go through the install cycle every time, you can symlink your plugin's src/ dir into ~/.lein/plugins/lein-guzheng
14:10hcumberdale java -Xbootclasspath/a:/home/user/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar << started by lein ring ,...
14:10hcumberdaletechnomancy: do you know what is going wrong?
14:10technomancyhcumberdale: you can't change the version of Clojure that Leiningen uses for itself, just the version used for your project
14:11dgrnbrgtechnomancy: so I'll have ~/.lein/plugins/lein-guzheng/leiningen/guzheng.clj
14:11dgrnbrgDo I also need to do a "lein plugin install …"
14:11technomancynot if you have that symlink
14:12dgrnbrgnow when I run "lein guzheng" in another project, it says "that's not a task. (etc)"
14:13hcumberdalethx technomancy ! I've seen it
14:13hcumberdaleThe subprocess is running 1.3 ;)
14:13technomancydgrnbrg: hmm... I guess you have to do "lein jar" in lein-guzheng
14:14technomancyand symlink that into ~/.lein/plugins instead
14:14technomancyso you have to do "lein jar" when you want to update it, but you can skip "lein plugin install"
14:14dgrnbrgtechnomancy: I don't see the lein-guzheng that I symlinked into the .lein/plugins directory on the classpath
14:14dgrnbrgok
14:15dgrnbrglet me try that
14:15technomancyhard to keep this straight since I've been on lein2 for so long
14:16dgrnbrgtechnomancy: HOORAY!
14:16dgrnbrgit works
14:16dgrnbrgwill this plugin also work on lein2, do you think?
14:16cjfriszIs swank-clojure known to have problems with record definitions across multiple files implementing protocols in separate files?
14:16cjfriszOn the repl, specifically?
14:16hiredmanrecords and protocols and deftypes have issues with code reloading
14:17dgrnbrgtechnomancy: thank you for your help--I had a deep misunderstanding of how this worked, but now I can finish the plugin and release it :)
14:17technomancydgrnbrg: so far you don't have anything that would make it incompatible
14:17cjfriszhiredman: I seem to running into that in spades, are there any specifics or known documentation on the problem?
14:17hcumberdaleAnyone tryed this: http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/ ?
14:17technomancyhcumberdale: sure have; what's up?
14:17Rayneshcumberdale: tryclj.com runs on heroku
14:17hiredmancjfrisz: why are you using them?
14:18hcumberdaleprocfile: web: lein run -m demo.web
14:18hcumberdaleshould lein really run in such a heroku app?
14:18cjfriszhiredman: why am I using records and protocols?
14:18hiredmanyes
14:18technomancyhcumberdale: sure, but it's better to do "lein trampoline run -m demo.web" instead to save memory
14:18cjfriszI'm messing with writing a CPSer with records, and I'm trying to do testing in the repl
14:19cjfriszCPSer for Clojure, that is
14:19hiredmanCPSer?
14:19hcumberdalecan the app get started without lein ?
14:19hiredmansure, but what about that requireds records and protocols?
14:19hcumberdalewhy do they require a build tool installed on production servers?
14:19hcumberdalelein needs a own vm?! Think this is overhead?!
14:20RaynesI'm... not...
14:20technomancyhcumberdale: that's what the trampoline task is for
14:20cjfriszhiredman: It makes it far easier to extend the CPSer
14:20dnolencjfrisz: CPS any particular reason you didn't go w/ maps and multimethods here?
14:20technomancyhcumberdale: Leiningen calculates everything the app needs to run, then exits its VM, and the shell script launches the project
14:20dnolencjfrisz: records and protocols are nice but are a real hassle on the JVM for interactive development.
14:20hiredmancjfrisz: protocols and records/types are a performance optimization
14:21technomancyif you like you can just put the appropriate call to /usr/bin/java or whatever in the Procfile, but "lein trampoline run" is a lot easier
14:21RaynesThey don't 'require' you use a build tool. It's just that everybody uses lein to run their code/websites.
14:21cjfriszdnolen hiredman: didn't know they were such a problem for interactive
14:21cjfriszThey seemed appropriate for what I wanted to do, but I may be wrong
14:21RaynesYou can use whatever you want, but you still need lein to download your dependencies and stuff.
14:22RaynesUnless you want to fetch those manually too, which isn't remotely fun.
14:22hcumberdaleAaaahhh! ,... and writing ueberjar packages to heroku?!
14:22technomancyhcumberdale: Clojure itself is strictly a library; it doesn't come with what's needed to launch it from the command-line
14:22hcumberdaletechnomancy: and java -jar ... in the procfile?
14:23TimMcdgrnbrg: What was the solution?
14:23dnolencjfrisz: they're really are intended for performance - but for a CPSer I think maps + multimethods would work fine and simpler.
14:23technomancyhcumberdale: you can do that if you get leiningen to create an uberjar at git push time
14:24hcumberdalewhat version of lein is installed on heroku?
14:24cjfriszdnolen: I'll take a look at that, thanks
14:24hcumberdaletechnomancy: you work for heroku, right?
14:24dnolencjfrisz: after looking the ClojureScript complier I really regret using records+protocols in core.match.
14:24dnolenlooking at.
14:24technomancyhcumberdale: yeah. right now 1.7.1 is used by default, with 2.0.0-SNAPSHOT available if you request it
14:24dgrnbrgTimMc: well, i didn't understand how lein1 loads plugins. I needed to lein jar it and then symlink that jar into the .lein/plugins/ directory, and then I could use it. I think that it was because the plugin code had ":eval-in-project true" in the project.clj which caused me to be mislead into thinking that I could use the plugin from the project itself w/o doing any release steps
14:25technomancyhcumberdale: you can generate an uberjar at git push time if you like, but if your only concern is the overhead of the lein process then trampoline is a much simpler solution
14:25technomancyhcumberdale: details on the build process if you're curious: https://github.com/heroku/heroku-buildpack-clojure
14:25hcumberdaletechnomancy: why isn't trampoline used by default?
14:25TimMcdgrnbrg: You were trying to use the plugin on its own project?
14:25dnolencjfrisz: that said, records+protocols are much less of a hassle in ClojureScript - they work fine for interactive development there.
14:26cjfriszdnolen: I'm surprised by that. Besides the issues using them on the repl, I've found records and protocols to be quite nice.
14:26dnolenhiredman: ha! do I ever same "game changer" ?
14:27technomancyhcumberdale: it actually is by default now, it's just some of the documentation hasn't been updated
14:27technomancyI'll see about fixing that blog post
14:27dgrnbrgTimMc: yes, since I thought that was the only project I had where the plugin would be automatically found by lein
14:27cjfriszI'm kind of a performance junkie, so I figured records+protocols were the way to go.
14:27dgrnbrgand it was, sort of, but not really
14:28hiredmandnolen: I have not performed any analysis of my logs
14:28hcumberdalethx technomancy , nice to see you here!
14:29dnolencjfrisz: definitely not saying they aren't nice. other reason to use them is if you want something that works w/ the core abstractions.
14:30hcumberdaleCaused by: java.lang.RuntimeException: Unable to resolve symbol: run-jetty in this context
14:30hcumberdalebut I used: (:use [ring.adapter.netty] ...
14:30hcumberdaleahhh netty vs jetty...
14:31cjfriszdnolen hiredman: That clears up a fair amount of frustration, thanks.
14:35hcumberdaleDoes anyone know how good/stable is https://github.com/datskos/ring-netty-adapter .... last update 2 years ago
14:35TimMcMaybe it is done. :-P
14:37hcumberdalering-netty-adapter "0.0.3" << !
14:37mega`This repo adds (experimental/alpha) Netty support to Ring
14:37mega`probebly not done
14:38mega`is netty an alternative to jetty?
14:39hcumberdaletechnomancy: how to add mongodb path? (connect-to-db!) << currently localhost
14:40technomancyhcumberdale: I don't use mongodb, but most configuration on heroku happens via environment variables
14:40technomancy(System/getenv "DATABASE_URL") is what I usually use
14:42hcumberdalehttps://devcenter.heroku.com/articles/mongohq << says MONGOHQ_URL
14:46antares_hcumberdale: it depends on the exact cloud provider
14:46antares_mega`: netty is an async I/O library, jetty is an embeddable HTTP server
14:48hcumberdaleantares_: MONGOHQ_URL << can't find an example of it
14:48hcumberdale (monger.core/connect { :host \"db3.intranet.local\", :port 27787 })
14:48hcumberdaleneeds host + port
14:50antares_hcumberdale: monger does not yet support connecting with URLs
14:50antares_although I can add it as soon as today
14:50antares_just need to finish something
14:51FullmoonQuestion about laziness: For this here: https://gist.github.com/2353622
14:52jondot_hello all. kinda in a dilemma about image processing with clojure. i need to count number of unique colors in an image (and other tests), which rinzelight doesn't have, and imagemagick has. however i don't want to shell out to imagemagick just yet (it'll block me using appengine)
14:52FullmoonWhy do I get the output "iterating." twice?
14:52technomancyFullmoon: you probably want to call first on a vector
14:52hcumblerdale2antares_: thank you very much !
14:52jondot_anyone else doing image processing with clojure ? mostly image identification and validation
14:52technomancyFullmoon: also, hello; long time no see =)
14:52Fullmoontechnomancy: Hey, funny! You here
14:52antares_technomancy: so you think monger should support connecting via URIs, that's it, right?
14:52Fullmoontechnomancy: Seems to be a natural progression for many Rubyists
14:53technomancyantares_: yeah, I'm a fan. I submitted that as a patch to java.jbdc; it's quite convenient.
14:53antares_technomancy: ok
14:53hcumblerdale2yeah!
14:53hcumblerdale2so I'll get my app running on heroku
14:53technomancyFullmoon: the brave ones at least =)
14:53hiredmanjondot_: the jvm has some built in classes for doing image stuff (ImageIO), you might start there
14:54autodidaktoFullmoon: you mean clojure? totally agree :)
14:55antares_oh, I see mongodb java driver already supports it
14:55antares_although we need to provide a more convenient way in monger
14:55antares_but still, good to know
14:55Fullmoontechnomancy: Railsday '06 was fun
14:55technomancyFullmoon: one of these days we'll have a Clojure equivalent
14:55technomancy"Clojure Challenge"
14:56Fullmoontechnomancy: Oh fun, I am not sure that I should attend, with my 48 hours experience
14:57technomancyFullmoon: oh, it won't be any time soon. plenty of time to get up to speed.
15:02RickInGAFullmoon: I don't know how to make the replacement lazy, but I would change (first ((wait-a-bit) (wait-a-bit))) to (first [(wait-a-bit) (wait-a-bit)]) the list of lists was giving me an error
15:02technomancyRickInGA: well that won't be lazy either, which is what I think he's getting at
15:03technomancylaziness is a property of seqs
15:03FullmoonRickInGA: I was under the impression that first only actually evaluates the car
15:03technomancy((wait-a-bit) (wait-a-bit)) tries to call the wait-a-bit function, and then uses the return value of that call as a function to call
15:04technomancyFullmoon: if you pass first a lazy seq, it will only evaluate the first element (unless it's a chunked seq), but that's not what you're doing here.
15:04RickInGAtechnomancy: yeah, replacing with vector is still eager, but stops giving error
15:04technomancyright
15:05Fullmoontechnomancy: I shall now go and read into this, thanks.
15:05technomancyFullmoon: lazy seqs generally come from calling things like map and for
15:05RickInGAtechnomancy: how do you rewrite to make it lazy?
15:05technomancy(first (map println '(0 1 2)))
15:05technomancy,(first (map println '(0 1 2)))
15:05clojurebot0
15:07antares_hcumblerdale2: can you please give me an example MONGOHQ_URL?
15:07hcumblerdale2mongodb://fred:foobar@localhost/
15:07hcumblerdale2I tryed to...
15:07hcumblerdale2,(re-seq #"[\\/]{2}([^:]+):([^@]+)@([^/]+)" "mongodb://fred:foobar@localhost/")
15:07clojurebot(["//fred:foobar@localhost" "fred" "foobar" "localhost"])
15:08hcumblerdale2tried to :)
15:09antares_hcumblerdale2: thanks!
15:09technomancybetter to construct a java.net.URI with it
15:09hcumblerdale2technomancy: sure? seems not to be a java.net.URI
15:09antares_technomancy: mongodb java client has a URI parser
15:10technomancyit has its own parser? =(
15:11antares_technomancy: yup
15:11technomancyoh mongo...
15:12antares_technomancy: the client is written as if it was written by a bright sophomore CS student in a haste. It is not terrible but has many reinvented wheels and weird APIs.
15:12antares_and _consistent method Naming()
15:12antares_but that's good enough I guess
15:15hcumblerdale2how to skip the first element of a seq?
15:15scriptorhcumblerdale2: in what context?
15:16technomancyhcumblerdale2: rest
15:16hcumblerdale2thx technomancy
15:17iwohi, can anyone tell me how to iterate over function parameters in clojure? been googling for ages but cannot find out how
15:17iwois it possible?
15:17llasramiwo: Example?
15:17iwoi basically want to iterate over function args as if they were a sequence
15:18hcumblerdale2antares_: ...
15:18antares_iwo: (defn myfn [& xs] (for [p xs] …))
15:18hcumblerdale2,(zipmap [:user :password :host] (rest (first (re-seq #"[\\/]{2}([^:]+):([^@]+)@([^/]+)" "mongodb://fred:foobar@localhost/"))))
15:19clojurebot{:host "localhost", :password "foobar", :user "fred"}
15:19llasramiwo: ##(let [f (fn [& args] (map #(str "like this? " %) args))] (f 1 2 3 :four "five" 6 :etc))
15:19lazybot⇒ ("like this? 1" "like this? 2" "like this? 3" "like this? :four" "like this? five" "like this? 6" "like this? :etc")
15:19iwoexcellent, so it's the & here that's the bit i'm missing?
15:19antares_hcumblerdale2: I will just reuse mongo driver's parser, I am tryign to figure out whether I want to add a new function or try to fit it into monger.core/connect (which will be either tricky or ugly)
15:20llasramProbably? That bundles up all subsequent arguments into a sequence for you. Works the same as in other destructuring forms
15:20iwollasram: thank you, looks like exactly what i need
15:21llasramcool beans
15:21iwothanks antares_ !
15:21kurtharrigerwhen using clojure-jack-in is there anyway to stdout *out* seems to be redirected to emacs but not System/out?
15:21kurtharriger+view stdout
15:22kurtharrigerI used to use lein swank, and slime-connect but this no longer opens a repl in emacs for some reason
15:24hcumblerdale2antares_: how to use authenticate instead of connect! ?
15:24llasramkurtharriger: The only solution I know of is to get a WriterOutputStream from somewhere (Apache Commons has one, for ex) and do something like: (System/setOut (java.io.PrintStream. (WriterOutputStream. *out*)))
15:25llasramTHere's probably an easier way
15:26llasramOooh, hmm
15:27antares_hcumblerdale2: https://github.com/michaelklishin/monger/blob/master/test/monger/test/db.clj#L20
15:28antares_with mongodb, you authenticate after you connect, for each DB you need to use, only once (I know, I know; I haven't designed this stuff)
15:28antares_if you try to authenticate twice, caboom!
15:29hcumblerdale2antares_: so I can use connect! and authenticate?
15:29kurtharrigerllasram: hmm didn't seme to work for me (System/setOut (java.io.PrintStream. (org.apache.commons.io.output.WriterOutputStream. *out*))) (.println System/out "test")
15:30antares_hcumblerdale2: correct. With connect!, pass monger.core/*mongodb-database* for a database.
15:30jsabeaudryIs it possible to typehint what is inside a ref?
15:30llasramkurtharriger: Hmmm. I know I've done that trick before...
15:30kurtharrigeralthough if I start clojure-jack-in, then lein swank, then slime-connect killing current connection the slime-repl now goes to swank
15:31kurtharrigergot to be an easier way to open repl in emacs using slime-connect but I guess this works for now
15:33hcumblerdale2can I call (monger.core/set-db! (monger.core/get-db "db")) before (authenticate *mongodb-database* (:host x) (:user x) (:password x))) ?
15:37zenlikewhat does it mean when things in a list start with a colon?
15:38zenlikei.e. '(:a :b :dog)
15:38zenlikedo you know, yoklov?
15:38antares_hcumblerdale2: please see that test I linked to
15:38zenlikewhat the : means?
15:38zenlikethanks
15:38yoklovzenlike: only saw "i.e. '(:a :b :dog)"
15:38yoklovoh
15:38yoklovthe : is a keyword
15:38yokloverr, makes the word after it
15:38antares_zenlike: they are keywords
15:38zenlike?
15:39zenlikeI guess I just don't understand what makes : based keywords different from strings
15:39yoklovzenlike: http://clojure.org/data_structures#Data Structures-Keywords
15:39zenlikenice, thanks
15:39yoklovkeywords work as functions
15:39yoklovamong other things, they're also interned
15:40yoklovso they compare by pointer equality
15:40yoklovso it's faster than iterating over the string and checking if each character is the same
15:40llasramkurtharriger: AH! Of course. You need to use one of the WriterOutputStream constructors which causes it to act unbuffered
15:40yoklov,(:foo {:foo 3, :bar 7})
15:41clojurebot3
15:41llasramkurtharriger: (System/setOut (java.io.PrintStream. (org.apache.commons.io.output.WriterOutputStream. *out* "UTF-8" 8192 true))) does it for me
15:41Wild_Cat,("foo" {"foo" 3 "bar" 7})
15:41clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn>
15:41kurtharrigerllasram: ah okay that makes sense!
15:41Wild_Cataha.
15:42kurtharrigerllasram: yep that works! thanks
15:42yoklovanyway, does anybody happen to know if you can change which version of cljs lein-cljsbuild is using?
15:42zenlikeAnother questions, why does
15:42zenlike(= 2 1/2)
15:43zenlike,(= 2 1/2)
15:43clojurebotfalse
15:43zenlikehm.
15:43yoklovzenlike: use == for numbers
15:43dnolenyoklov: you can do that w/ the lein checkouts feature. make a checkouts directory - clone clojurescript into it. in your project.clj add :extra-classpath-dirs ["checkouts/clojurescript/src/clj"]
15:43zenlike,(== 2 1/2)
15:43clojurebotfalse
15:43zenlikewhat is = used for?
15:43yoklov,[(== 2 2.0), (= 2 2.0)]
15:43clojurebot[true false]
15:43zenlikeand what is with the / construct, can you type fractions in clojure?
15:43yoklovdnolen: thanks
15:44llasramAll of which actually does remind me -- is there a good way to hook in to get arbitrary code run when starting a swank session? The 'lein repl' init forms doen't seem to work :-/
15:44llasram(I mean, they work just fine for 'lein repl', just no effect on swank sessions)
15:45kurtharrigerllasram: I couldn't figure out how to do that either
15:45dnolenyoklov: would be nice if there was a way to specify HEAD, revision, or release but all good time I imagine.
15:45yoklovzenlike: = is equality, but since 2.0 and 2 have different types they aren't equal. you can type (doc =) in the repl to find out more
15:45dnolenall in
15:46zenlikeyoklov: thank you!
15:46llasramkurtharriger: Maybe there's a way to get SLIME to chuck some forms over whenever it connects
15:46kurtharrigerMy emacs lisp skills are even worse than my clojure skillz :)
15:48yoklovdnolen: okay, and after I do that lein-cljsbuild will use the version in checkouts/clojurescript?
15:48llasramOH well. A project for some other day :-)
15:49dnolenyoklov: yes
15:49dnolenyoklov: going to try and build your code w/ master? :)
15:49yoklovyeah
15:50yoklovi'm quite excited, based on what you said on the mailing list, it seems to be quite an improvement
15:50antares_hcumblerdale2: sorry, one more question. Can you point me to heroku's mongodb docs?
15:50dnolenyoklov: I'm curious if there's much of a speedup for apps in general - not sure there will be.
15:50antares_hcumblerdale2: I am trying to understand, do they also provide DB name in it? if so, we will pretty much have to use a separate function in monger (largely thanks to oddities in MongoDB Java driver APIs)
15:50dnolenyoklov: if you rely on the current maps and updating them and things like that - I think that overhead will continue to dominate.
15:51hcumblerdale2antares_: https://devcenter.heroku.com/articles/mongohq
15:51antares_hcumblerdale2: thank you!
15:51antares_:( DB db = mongoURI.connectDB();
15:51antares_why oh why a MongoURI class has a method named connectDB
15:51yoklovyeah, but i've been working on something lately where I avoided maps (as much as I could)
15:52dnolenyoklov: ah, interesting! Definitely want to know if you see any improvements.
15:59hcumblerdale2antares_: mongodb://heroku:5f53d4812373db562f934f4ac91c0b21@flame.mongohq.com:27034/app3883424
16:09yoklovHm, nothing significant, actually. Slight speed boosts, but it was already running fine and they may just be in my head
16:10dnolenyoklov: yeah again - not very surprised. if you were already working around records I don't think you would see much of a difference.
16:11yoklovMost of my slowdown is accessing vectors
16:12yoklovand just numerical computation.
16:12dnolenyoklov: yes it might be worth inlining some stuff around vectors - but I haven't looked at it too closely.
16:12dnolenyoklov: numerical stuff should be very fast now - any low level JS stuff in general.
16:12yoklovyeah, this program runs quite quickly
16:13yoklovwhich is one of the reasons i think the speed boosts might just be in my head
16:14yoklovThough, the profiles look quite different.
16:14dnolenyoklov: how so?
16:15yoklov_truth isn't there anymore, for one, but generally it's functions i wrote or that i am certainly using, as opposed to before where there was a good amount of internal functions showing up in my profile
16:16dnolenyoklov: nice
16:16dnolenyoklov: I don't think _truth was that expensive in regular code - but it was killer in stuff like PersistentVector
16:17yoklovHeh, no, but it was consistently showing up around 5% in my profiles
16:18yoklovwhich was clearly not a huge issue, but it was ever-present
16:18dnolenyoklov: still, nice to hear your profiles are cleaned up.
16:18dnolenyoklov: is this project visible smoewhere?
16:18yoklovdefinitely
16:19goodieboycan someone tell me how to set a custom mime-type using ring/compojure ?
16:19goodieboycan someone tell me how to set a custom mime-type using ring/compojure?
16:19goodieboyoops
16:20weavejestergoodieboy: Do you mean associate a mime-type with an extension, or return a mime-type for a particular route?
16:20samaarondnolen: I just wanted to say that you're doing some awesome work with cljs
16:20goodieboyweavejester: associate a type with an extension
16:21mfexdnolen: I second the thanks for your clojurescript work
16:21dnolennice according to Lazlo 3X boost to persistent vectors pre-optimizations.
16:22weavejestergoodieboy: I just realised this isn't in the docstrings, but you can use: (route/resources "/" {:mime-types {"foo" "application/foo"}})
16:22weavejesterAnd then any "*.foo" resource would have a content type of "application/foo"
16:22dnolenmfex: samaaron: thx! should really thank rhickey and relevance for putting together such a clean code base. Optimization pass was pretty simple.
16:22goodieboyweavejester: oh ok, i was attempting to use (wrap-file-info {:foo "bar"}) in my middleware
16:23eggsbyweavejester: is it at all aware of /etc/mime.types ?
16:23dsantiagodnolen: You're making it hard for me to stick to my decision to use plain JS.
16:23samaarondnolen: w.r.t. the clean cljs code base, I was kinda surprised to see that the clojure-py guys weren't using it
16:23weavejestergoodieboy: wrap-file-info works a similar way. (wrap-file-info handler {"foo" "application/foo"})
16:24weavejestereggsby: Nope
16:24aperiodicsamaaron: did you check out that gist i $mailed you about quil and that java lib? have any idea what might be going on there?
16:24yoklovdnolen: its not at the point where it's up anywhere (not quite up to my standards of code i put on the internet), but it probably will be pretty soon.
16:24weavejestereggsby: But it includes mappings for most common mimetypes.
16:24technomancyweavejester: is there one for sexps? =)
16:24gfrederickswhat's the fastest way for me to turn a query string into a map?
16:24dnolenyoklov: cool, looking forward to taking a look.
16:24goodieboyweavejester: thanks!
16:24gfredericks(I'm using aleph)
16:25weavejestergfredericks: Use the wrap-params middleware
16:25dnolendsantiago: once we have source mapping I think ClojureScript will be a "game changer" for client-side development.
16:25gfredericksweavejester: use the ring middleware for aleph?
16:25weavejestertechnomancy: One for sexps?
16:25technomancyweavejester: a mime type
16:25dsantiagodnolen: Yeah, the debugging story is actually the bigger sticking point.
16:26weavejestertechnomancy: Ohhh :)
16:26dsantiagoBut that seems to be moving very quickly too
16:26weavejestertechnomancy: Um, no.
16:26dnolensamaaron: I haven't followed clojure-py closely.
16:26mfexdnolen: how does the arity dispatch work without using arguments (for cljs-137)?
16:26dnolenmfex: the compiler stores seen fn information - if it finds a matching arity it calls it directly.
16:26weavejestergfredericks: Sure. If you want to do something asynchronous, the Ring 1.1.0 beta has form-decode
16:26samaaronaperiodic: no, sorry - when did you send the mail?
16:27weavejestergfredericks: Which will decode a query string without any middleware.
16:27gfredericksweavejester: cool, thanks
16:27dnolendsantiago: yep, soon as 1.4.0 goes out the door planning on pushing to see the column preserving reader patch make it into 1.5.
16:27samaarondnolen: from a super cursory look, it appears that they're taking a similar approach to the CLR port
16:27dsantiagodnolen: Could that also have benefits for regular clojure?
16:28dnolendsantiago: definitely, right now we just line information. column information can give us a particular s-expression.
16:28antares_hcumblerdale2: lint.travis-ci.org https://github.com/michaelklishin/monger/blob/master/ChangeLog.md
16:28antares_technomancy: does this look good to you? lint.travis-ci.org https://github.com/michaelklishin/monger/blob/master/ChangeLog.md
16:28dnolensamaaron: clojure-py is targetting pypy right?
16:28dsantiagodnolen Sounds wonderful.
16:28aperiodicsamaaron: it's lazybot $mail. sent it sunday evening, it should have msgd you about it once you spoke up in here (i thought)
16:28antares_hcumblerdale2: this stuff is already on clojars in 1.0.0-SNAPSHOT
16:28aperiodicsamaaron: relevant gist is: https://gist.github.com/2341911
16:29samaarondnolen: they're targettign the python VM (is that pypy?)
16:29technomancyantares_: looks reasonable
16:30samaarondnolen: perhaps i'm way off mark, but it seems that the clojurescript approach was to start off with protocols at base and build up from there
16:30dnolensamaaron: that's the idea yes.
16:30samaaronrather than building on top of a whole bunch of interop
16:30samaaronyeah, so I wonder why the clojure-py guys didn't do that
16:31mfexdnolen: nice and everything is in the clojure part of the compiler right? nothing as a compiler pass in the goog closure compiler?
16:31samaaronI would imagine that down the road, vanilla clojure will take a similar approach
16:31hcumblerdale21 required artifact is missing. com.novemberain:monger:jar:1.0.0-beta4
16:31antares_hcumblerdale2: beta4?
16:31antares_hcumblerdale2: beta3 is out, beta4 is not yet
16:31antares_you need to use 1.0.0-SNAPSHOT
16:32hcumblerdale2ahh ok
16:33dnolenmfex: all the optimizations are in the CLJS compiler - not goog closure.
16:33samaaronaperiodic: is this with Quil 1.0.0?
16:33hcumblerdale2I do not need setdb getdb ... with connect-via-uri! , right antares_ ?
16:34dnolensamaaron: so did thread locals give some perf boosts to Quil?
16:34kurtharrigerllasram: this is what I came up with to run clojure after clojure-jack-in, not sure if its the best way but seems to work: https://gist.github.com/2354236
16:34dnolensamaaron: btw, pretty cool that Casey Reas tweeted Quil!
16:34samaarondnolen: I think very minimal boosts to be honest
16:34samaaronwe're still running about 75% of standard Processing
16:35hcumblerdale2com.mongodb.CommandResult$CommandFailure: command failed [command failed [count] { "serverUsed" : "flame.mongohq.com:27034" , "assertion" : "unauthorized db:app3883424 lock type:-1 client:89.0.68.33" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
16:35samaarondnolen: prolly cos I emailed him ;-)
16:35dnolensamaaron: yeah, I think thread locals lose over passing the context around explicitly.
16:35dnolensamaaron: ha!
16:35aperiodicsamaaron: it's the snapshot, not the release. are they different?
16:35ibdknoxdnolen: the cljs analyzer is so much nicer than the JVM clojure one!
16:35antares_hcumblerdale2: no, you don't need to use setdb or getdb, if database and credentials are in the URI, they will be used
16:35dnolensamaaron: but even 75% is pretty good!
16:35samaaronaperiodic: yeah, there are a few changes - try with the latest
16:35dnolenibdknox: man, way dicer.
16:35dnolennicer
16:36samaarondnolen: yeah, it's good enough for me
16:36samaaronprocessing isn't about performance anyway
16:36ibdknoxdnolen: do you know if there's a reason ambrose didn't start from that one with analyze?
16:36dnolensamaaron: and for most people I think. and yes processing isn't about perf, it's about usability.
16:36samaaronit's about getting runnign with graphic super easily
16:36dnolenibdknox: ? he did as far as I know.
16:36ibdknoxdnolen: seems like we could extract the analyzer out of the cljs codebase and have a very nice generic ast analyzer for all clojure impls
16:37hcumblerdale2Exception in thread "main" java.lang.RuntimeException: No such var: m/connect-via-uri!, compiling:(cblog/core.clj:12)
16:37dnolenibdknox: yes ambrose started with cljs analyzer - but I know he'd made many changes for his own use case.
16:37aperiodichah, i've spent far too much time making performance tweaks in processing
16:37hcumblerdale2antares_: heroku caches the .m2 repo. So I need a release to test it there
16:37hcumblerdale2I can't delete ~/.m2.... cause it is on heroku ;(
16:37aperiodici'm interested to see how some of my heavier processing sketches perform when ported over to quil
16:37technomancyhcumblerdale2: you can specify a numbered snapshot version
16:38dnolenaperiodic: heh, you can always use processing directly - or someone should do an "advanced" Quil.
16:38hcumblerdale2But then 1.0.0-beta4 isn't found
16:38hcumblerdale2or what do you mean?
16:38ibdknoxdnolen: hm CLJS is not a dependency of analyze and it isn't required in the core ns: https://github.com/frenchy64/analyze/blob/master/src/analyze/core.clj
16:39ibdknoxdnolen: the output is also very different
16:39aperiodicdnolen: well, in processing, i often just use JOGL directly
16:39hcumblerdale2where can I get the number?
16:39antares_hcumblerdale2: ahhh
16:39dnolenibdknox: he just copied out the file and made many changes to analyze Clojure - it's also what makes Typed Clojure work as far as I know.
16:40ibdknoxah
16:40antares_hcumblerdale2: hm, ok, I will issue beta4 now
16:40samaaronaperiodic: I'd *love* you to port some of your advanced processing sketches over to quil
16:40samaaronwe need more tyre kicking
16:41aperiodicoh, i'm planning to... but i also have five other projects, and i'm pretty lazy
16:41samaaronshape up the laziness!
16:41aperiodici'm trying!
16:41samaaronotherwise I'll send Bigelow after you...
16:42aperiodicthankfully, you don't know where I live
16:42dnolenibdknox: but I totally agree, an a la carte analyzer would be fantastic. People are going to town with stuff like Esprima in the JS world - no reason we should let them get ahead of us :)
16:42samaaronaperiodic: with Quil 1.0.0 you just need to (:use quil.core) - need to pull in applet stuff now
16:43ibdknoxdnolen: there's a decent chance I'll end up doing that
16:43samaaronaperiodic: oh wait, you're doing funky stuff with the applet itself
16:43dnolenibdknox: cool!
16:43aperiodicsamaaron: well, the java library is doing some pretty funky stuff to the applet
16:44aperiodicso, yeah, that's why i'm pulling in the current-applet function
16:44ibdknoxit shouldn't be hard to factor out of the cljs compiler
16:44ibdknoxand I see a lot of value in it :)
16:44samaaronaperiodic: yeah, that might cause issues with the bindings we were using before
16:44samaaronZach shifted things over to thread locals
16:44samaaronit's worth giving it a shot with that
16:45aperiodiccool, i'll give it a shot this evening and let you know how it goes
16:46samaaronaperiodic: please do :-)
16:46dnolenibdknox: should be very easy to extract.
16:47hcumblerdale2antares_: It does not work: error message: Exception in thread "main" com.mongodb.CommandResult$CommandFailure: command failed [command failed [count] { "serverUsed" : "staff.mongohq.com:10008" , "assertion" : "unauthorized db:app3884761 lock type:-1 client:10.120.105.167" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}
16:54ibdknoxdnolen: btw awesome work on the performance improvements!
16:54ibdknoxdnolen: thanks for that work :)
16:54dnolenibdknox: thx, have you had a chance to try it out?
16:55antares_hcumblerdale2: I am not sure I understand that error message
16:56antares_hcumblerdale2: if authentication fails, an IllegalArgumentException will be raised by monger itself
16:56antares_hcumblerdale2: http://groups.google.com/group/mongodb-user/browse_thread/thread/31f9e39129129b6b
16:56ibdknoxdnolen: some, it's definitely a lot faster. I'll try some more extensive stuff over the next few days (just got back in town)
16:56dnolenibdknox: good to hear
16:57ibdknoxless indirection too, which is nice :)
16:57emezeske_dnolen: It seems like the direct function calls should make debugging a bit easier, too
16:58emezeske_dnolen: Stacktraces will be more readable, at least
16:58FullmoonWhat's the name of the supposedly "better" (deadline, etc) repl?
16:59llasramkurtharriger: (delayed, but) Oh, nice. That's very easy
17:00dnolenemezeske_: yeah direct fn call was last mile for closing gap between handwritten JS and CLJS
17:02emezeske_dnolen: I'm excited to see less of "no method 'call' for undefined" and more of "some-func is not defined"
17:02samaarondnolen: can you describe "direct fn call" in the context of cljs work?
17:02dnolenemezeske_: from here on out it's all chunked seqs, transients, pods, persistent data structures.
17:02samaaronI assume you've knocked out a bunch of indirection
17:02dnolensamaaron: fns in Clojure are objects, they implement invoke.
17:02amalloysamaaron: foo(1) instead of foo.call(null, 1), i think
17:02emezeske_dnolen: epic.
17:03amalloyfor the cases when it's known at compile-time that you're calling a real js function and not some clojure protocol thingy
17:03samaaronoh, awesome
17:03dnolensamaaron: amalloy: because we want objects to be callable - we call everything the same way - this way an object with a .call property could also act as a function.
17:04samaarondnolen: but as js has first class fns - you use them directly where possible?
17:04dnolensamaaron: problem is that's a perf hit on the really fast JS engines like V8. so if we know we have a real fn - just call directly.
17:04samaaronah ok - so this makes sense mostly for interop stuff?
17:05dnolensamaaron: no all CLJS functions got faster
17:05samaaronor do we also compile down to real js fns too?
17:05samaaronoh damn, nice :-)
17:05dnolensamaaron: CLJS just emits regular JS fns.
17:05dnolensamaaron: we used to call them in a weird way - now we don't.
17:05dnolenif we don't know the type - then use the .call convention
17:06samaaronrighto - so you fall back to original behaviour
17:06chouserI haven't looked at your diffs yet, dnolen. Do we lose a bit of potential dynamism this way?
17:06dnolenchouser: only applies to top level fns.
17:07chouseras in (defn f [x] 5) (defn g [x] (f x)) (def f {1 6}) ... will (g 1) now return 5 or 6?
17:08dnolenchouser: 6
17:09chousercool. how do you get g to switch to using f's .call ?
17:11dnolenchouser: oops I didn't read you're example closely enough. Yes, we do lose a bit of dynamism - switching between fns and objects.
17:12chouserI imagine it's totally worth it.
17:12amalloydnolen: so does it still return 5, or actually cause an error?
17:13dnolenchouser: good catch tho - I hadn't thought about that. Easy enough to switch the behavior back if people find it to be an issue.
17:13dnolenamalloy: error.
17:13hcumblerdale2mhh
17:13amalloyyeah. 5 would be a pretty surprising result
17:14gfredericks$findfn 5
17:14lazybot[]
17:14gfrederickswhy don't we have any clojure functions that return 5
17:14dnolenchouser: the perf difference is nearly 2X - so it just depends on whether people are switching back and forth between objects and fns often.
17:16hcumblerdale2antares_: MongoHQ support Chris Winslett: For our standard deployment, we use 2.0.4
17:16S11001001hmm
17:16S11001001$findfn nil
17:16lazybot[clojure.core/cond clojure.core/dosync clojure.core/import clojure.core/prn clojure.core/refer-clojure clojure.core/print clojure.core/with-loading-context clojure.core/newline clojure.core/comment clojure.core/or clojure.core/load clojure.core/shutdown-agents cloju... https://refheap.com/paste/1980
17:16hcumblerdale2mongo on linux console works as well,...
17:23antares_hcumblerdale2: is there a way for me try to this add-on w/o heroku billing me?
17:23hcumblerdale2yes antares_ I can give you my credentials
17:23hcumblerdale2>> my credit card is registered
17:24antares_hcumblerdale2: hm, well, I'd prefer not having other people's credentials
17:24hcumblerdale2antares_: I can change it,... build a new heroku instance or so
17:27dnolenchouser: perhaps another option would be to only do that optimization under advanced compilation ...
17:29hcumblerdale2antares_: can you reproduce the problem?
17:32antares_hcumblerdale2: I can now
17:34lpetitdnolen: Could it be under an advanced "aggressive optimizations" flag ?
17:35lpetitWhich tools could decide to take on or off by default, but would be off out of the box?
17:35dnolenlpetit: advanced compilation is agressive - you cannot interactively develop against it.
17:35lpetitIndeed, but then it remains sememantically correct. Not certain with the one at hand.
17:37dnolenlpetit: what I mean is, the dynamism problem is only about interactive development. advanced compilation is all about whole program optimization.
17:39lpetitdnolen: I understand the high value for dynamism. But still, some programs could start to break if what chouser showed stays as is in the final code, for one reason or another
17:40dnolenlpetit: not sure how, in compiled code one version wins. the proper call will be emitted.
17:40PPaulanyone doing clojurescript here?
17:41amalloy~anyone
17:41clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
17:41PPaulanyway, i notice that clojure is synchronous by design (prob because of jvm), is clojurescript async by design?
17:42amalloytechnomancy: clojars frustrates me. apparently you have to scp the pom and the jar at the same time. i always forget the pom, and it silently accepts a jar but doesn't do anything with it. can we get it to complain if it gets just a jar, like it does if it gets just a pom?
17:42technomancyamalloy: probably, but if you were going to change that functionality you should just have it look in the jar for the pom
17:42lpetitdnolen: Are you sure?
17:43dnolenPPaul: not sure what you mean by async by design.
17:43dnolenlpetit: sure about what?
17:43technomancyamalloy: I'm much more interested in replacing scp than fixing it
17:43dnolenthat one version will win - yes.
17:43yoklovcan anybody think of a more elegant way to do something like (for [i (range (count coll)), j (range j (count coll))].... do stuff with (coll i) and (coll j))
17:43yoklove.g. get each unique pair of elements in coll
17:44lpetitdnolen: So you can only have functions definitions as top level forms?
17:44PPaulin clojure, if i want a function to be async i use (future)... like when i talk with a server i can do so without a callback
17:45dnolenlpetit: in CLJS yes, there no support in CLJS at all for def'ing non top levels.
17:46PPaulin clojurescript, do functions block that talk with servers, like they do in clojure?
17:46dnolenPPaul: CLJS is emits lowest common denominator JS - so JS rules apply.
17:47lpetitdnolen: What will (defn f [] 1) (println (f 1)) (defn f [] 2) (println (f 2)) produce ?
17:47amalloyyoklov: you might enjoy some of the answers to http://www.4clojure.com/problem/103
17:47PPaulin that case, i guess clojurescript code that is async needs to be written differently from clojure code
17:47dnolenlpetit: 1 then 2.
17:49chouserPPaul: it's pretty hard to get javascript to block.
17:49lpetitdnolen: So why do you say chouser's example would behave differently in optimized and non optimized modes?
17:49dnolenlpetit: object vs. fn case
17:49PPauli know it's hard, i'm a JS programmer
17:50dnolenlpetit: object calls look like, foo.call(...), fn calls look like, foo(...)
17:50dnolenlpetit: so if you switch between those two at the REPL w/ the current optimization you'll get errors.
17:50chouserI said two true things here today. I should stop while I'm ahead.
17:51lpetitHe
17:51PPaulhas anyone here used clojurescript with backbone or some JS/non-JS mvc?
17:52PPauli would like to know about the experience of doing so
17:52eggsbyPPaul: as I understand it that'd be redundant
17:52PPaulit would be?
17:52PPaulplease enlighten me
17:52lpetitDnolen: so in the optimized mode, both would still be compiled differently (clojurescript compilation happens before closure advanced minifier), and you'll also have the problem in production
17:53eggsbyPPaul: since cljs uses google closure it'd make more sense to structure your app in terms of closure, rather than including jQuery and backbone/underscore as well
17:53dnolenlpetit: nope. the next definition side effects the type.
17:53samaarondnolen: lpetit sounds like we need a test for this
17:53PPaulbut i don't know closure
17:53PPauli know backbone
17:54PPaulthough, clojurescript may have something similar
17:54PPauldo you have some examples of setting up something like a tiny 1page app?
17:54dnolenPPaul: you can use BackBone, but expect BB.js payload plus at least 30K from CLJS.
17:55PPauldnolen, that's tiny
17:55PPaulmy JS apps are fucking huge now
17:55PPaullike, over 1 meg
17:55eggsbyPPaul: https://github.com/addyosmani/todomvc/tree/master/architecture-examples/closure
17:55PPaul:D
17:55PPaulthanks
17:55dnolenPPaul: yeah, CLJS prevents big apps from getting bloated. GClosure is pretty awesome about that.
17:55hcumblerdale2http://furious-fog-1667.herokuapp.com/
17:55hcumblerdale2it's running now :)
17:55eggsbyPPaul: live version of that closure project: http://addyosmani.github.com/todomvc/architecture-examples/closure/index.html
17:56PPauldoes clojurescript inforce immutability too?
17:56dnolenPPaul: there's no hard enforcement like there is on the JVM via final. But it's effectively immutable by default.
17:57PPaulawesome
17:58eggsbyPPaul: i'm trying to figure out whether I want to leave coffeescript/backbone for cljs/closure myself
17:58eggsbyclosure just seems to have so much boilerplate
17:59dnolenlpetit: actually I do see what you mean. Yes, if we hit one def, references to it will be compiled one way. If later down the line you redef in the same source file, other code will be compiled differently.
18:00PPauli do JS/backbone... i'm getting really good with backbone, which means i'm running into the limits of backbone a lot :(
18:00PPauli also miss clojure
18:01PPaulunderscore is not even close to a replacement :(
18:02PPauli'm looking at some clojurescript MVCs, https://github.com/ibdknox/pinot/blob/master/examples/todo.cljs (pinot) pretty tiny todo example
18:04dnolenlpetit: I kind of like the idea of warning when switching a top level def from fn to anything else.
18:04eggsbyya pinot looks nice PPaul
18:05hcumblerdale2If anyone is willing to help by reviewing sourcecode or building stuff, you are welcome: https://github.com/kremers/cblog
18:05dnolenPPaul: A while's off, but I'm really looking forward to some Datomic in CLJS
18:05eggsbyheh
18:06eggsbydo you think datomic will ever be packaged w/ clojure
18:06PPauli'm still not sure what datomic is trying to be
18:06eggsbyit's clojures datastore :p
18:06PPaulis it relational/doc/graph/something else?
18:06dnoleneggsby: well rhickey has mentioned they're close to exposing indexes - so you could consume those via core.logic on the server or more interestingly on clients.
18:06PPaulis it pure clojure?
18:07PPauli can put clojure types in it?
18:07PPaullike a set?
18:07dnolenPPaul: the site is pretty informative.
18:07PPaul^_^
18:07eggsbydnolen: I haven't read the reasoned schemer and I'm not even familiar with constraint/logic based programming, but what could it offer in the clientside world?
18:07dnoleneggsby: sensible queries.
18:08eggsbyI saw the talk where they demo'd minikanren on chez scheme which looked insanely powerful, but how could that crunching be simpl-- oh
18:09PPaulhttp://datomic.com doesn't tell me much
18:09dnolenPPaul: whitepaper + videos + try it out.
18:09PPaulvideos!Q
18:09PPauli love videos
18:10eggsbyPPaul: you can watch rhickeys interview about it
18:10lpetitdnolen: But is it the only problem? What will (def a 1) (defn f[] a) (def a 2) (defn g [] a) (f) (g) produce before and after your optimization?
18:10eggsbybut he's got a talk too that should be popping up sometime soon
18:11dnolenlpetit: 2 2.
18:12dnolenlpetit: just like Clojure on the JVM.
18:12lpetitdnolen: Oh yeah sorry, your optimization is for fans only, bad example
18:12lpetitS/fans/fns/
18:12dnolenlpetit: and only if you're *switching* between *objects* and *fn*
18:12dnolenso we'd warn on that.
18:13lpetitdnolen: Ok understood
18:14dnolenlpetit: but yes, excellent observation.
18:15lpetitdnolen: noob question now: does it change somerhing if f is a dynamic var which is rebound?
18:17dnolenlpetit: probably a good argument for making ^:dynamic a requirement in CLJS
18:18lpetitdnolen: On
18:18hiredmandnolen: ^:dynamic as a requirement for being able to re-def things?
18:19dnolenhiredman: no for using something w/ binding.
18:19lpetits/on/ok (damn spell checker)
18:20dnolenif someone dynamic binds a fn to an object you'll run into trouble. so if a var is declared dynamic we won't optimize it.
19:29konrAny idea on how the GSoC selection process is taking place? No comments on my proposal so far :(
19:30yoklovsame
19:32aperiodicwhen i did it, it was pretty opaque
19:32aperiodicsubmitted a proposal, got an acceptance email a week or two later; didn't hear anything in between
19:33aperiodicbut that might be a function of the organization
19:34yoklovyeah i figured
19:34yoklov(but i also figured if someone else was asking i'd ask too)
19:59cjfriszJust discovered M-. in Clojure Emacs mode pulling up the definition of the expression at the point.
19:59cjfriszDefinitely a "Whoa..." moment.
20:02PPauldatomic is sorta hard to understand
20:11gfredericksis there any reason `lein run` would hang when run as root?
20:11gfredericksnm I didn't read
20:12technomancythe trojan plugin you accidentally installed is busy erasing your filesystem
20:13autodidaktcemerick: just bought the book. normally 30$, on sale for 17, -40% coupon code for new users, $11 :)
20:14sattvikkonr, yoklov: You'll find out if you're accepted when Google notifies you. It's going to be tough. Clojure, as a new org, will most likely only get to have 1 or 2 students.
20:15konrsattvik: crossing my fingers ;)
20:16autodidaktJust in case I haven't spammed everyone already -> Every should buy Clojure Programming [http://shop.oreilly.com/product/0636920013754.do]
20:17autodidaktrecently released, by Chas Emerick, Brian Carper, Christophe Grand
20:18autodidaktbook description at [http://www.clojurebook.com/]. it's geared towards people coming from Java/ruby/python
20:18autodidaktgfredericks: Projamming Clolog
20:19gfredericksI can't argue with that
20:22gunsI'm confused about the readline integration in nrepl. Some (not all) my keybindings from ~/.inputrc work in `lein2 repl`
20:22gunsand my multibye macros display incorrectly, but are correctly parsed
20:22gunswhere can I investigate this? tools.nrepl and leiningen don't mention the GNU readline lib
20:23technomancyguns: it uses jline2 rather than readline
20:23gunstechnomancy: jline reads ~/.inputrc?
20:24technomancyguns: I think it honors some subset of it? not sure
20:24cemerickautodidakt: good timing! :-D
20:24gunstechnomancy: I see. It's frustratingly close to what I like in readline
20:24gunsty
20:30FrozenlockI exported a file with newlines in it "\n", but don't see them when I open it in notepad. Is it because of the different newline for linux/windows?
20:32langmartinFrozenlock: that's pretty likely
20:38emezeske_Frozenlock: I think windows likes \r\n
20:38FrozenlockYup, that was it. I added "\r" before and now everything is fine.
20:38Frozenlockemezeske_: Thanks :p
20:38FrozenlockI just hope my functions won't choke on it when the time comes to read the file back...
21:04gfredericksis clj-http 0.2.3 not configurable to not process cookies?
21:06muhooi'm pretty sure it's based on apache http libraries
21:06dakronegfredericks: define "process cookies"?
21:07gfredericksdakrone: using the clj-http.cookies/wrap-cookies function
21:07gfredericksI'd like to turn that off
21:07gfrederickscan upgrade clj-http if that helps
21:07gfredericksI'm using the clj-http.client/request method, so maybe I'm using the wrong interface?
21:07dakronegfredericks: well, upgrading is always nice :) but you could also take a look at clj-http.client/request, and wrap it with your own stuff
21:08gfredericksmaybe I'm wrong about what I'm using
21:08dakroneI mean clj-http.core/request
21:08dakroneis the basic one, no addons
21:08dakronethen you can define your own like clj-http.client/request does
21:08gfredericksokay, I'll go it that way; not too hard. thanks
21:08dakronenp
21:08gfredericksdo it that way also
21:10dakronegfredericks: but upgrade also if you can :)
21:14gfredericksdakrone: of course
21:23dgrnbrg,(str "foo" "\n" "bar")
21:23clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>
21:23y3dioh man this is the best: http://imgs.xkcd.com/comics/lisp.jpg
21:23dgrnbrgwhy does str escape the \n?
21:24gfredericks&(str "foo" "\n" "bar")
21:24lazybot⇒ "foo\nbar"
21:25gfredericksdgrnbrg: that's the string being printed; there's a real newline in that string
21:25gfredericksdgrnbrg: try (println (str "foo" "\n" "bar"))
21:25dgrnbrggfredericks: oh, i see, thanks!
21:26gfredericksalso interesting is ##(seq (str "foo" "\n" "bar"))
21:26lazybot⇒ (\f \o \o \newline \b \a \r)
21:27dgrnbrgI know about that one
21:27dgrnbrgI didn't realize that it was printing readable strs
21:27gfredericksI guess newlines themselves are readable too....
21:28dgrnbrgthat's what most other languages I know print
21:28dgrnbrgbut this is good too
21:28dgrnbrgI just needed to know
21:28dgrnbrgI have been mostly doing symbolic manipulation in clojure
21:28dgrnbrgbut now i'm writing a code generator that spits out asm
21:29dgrnbrg(not dcpu16)
21:32FrozenlockI think I broke something.... When I try seesaw, I get this error:
21:32Frozenlockjava/awt/Window$Type
21:32Frozenlock [Thrown class java.lang.NoClassDefFoundError]
21:32FrozenlockBut I know it works, I have already used it earlier this week...
21:32FrozenlockAny idea on what I might have done?
21:35hobbyistAnyone happy to tell the difference between pr-str, prn-str and print-str?
21:35gfredericksthere are 8 print functions
21:36gfredericksbased on 3 properties
21:36gfredericksthe -str ones return a string instead of printing to *out*
21:36gfredericksthe ones with an extra 'n' in the name include a newline
21:36gfredericksand the ones with 'pr' instead of 'print' will print readably
21:36aperiodic(inc gfredericks)
21:37aperiodicis that in the docs somewhere? i've never seen that explanation before, unfortunately
21:37hobbyistmuch obliged
21:37gfredericksno idea
21:37gfredericksI'm not even 100% sure that all 8 combinations exist
21:38gfredericks,[pr prn print println pr-str prn-str print-str println-str]
21:38clojurebot[#<core$pr clojure.core$pr@2638d0> #<core$prn clojure.core$prn@11dc32c> #<core$print clojure.core$print@520fa4> #<core$println clojure.core$println@116d7bd> #<core$pr_str clojure.core$pr_str@4dd658> ...]
21:38gfredericksguess so
21:46gfredericks&(for [base ["pr" "print"], mod ["" (if (= "pr" base) "n" "ln")], str ["" "-str"]] (str base mod str))
21:46lazybotjava.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn
21:47gfredericks&(for [base ["pr" "print"], mod ["" (if (= "pr" base) "n" "ln")], str ["" "-str"]] (clojure.core/str base mod str))
21:47lazybot⇒ ("pr" "pr-str" "prn" "prn-str" "print" "print-str" "println" "println-str")
21:50ivanwriting Python code where things are "almost" values is pretty horrible after learning some Clojure
21:52gunsand the commas. So many commas
21:52gfredericks,,,,,,,,,:foo,,,,,,,,,,
21:52clojurebot:foo
21:54ivanguns: yes, that also makes me go a little crazy
21:54ivanfunny how it never bothers you until you are unshackled
21:55gunsit's pretty superficial, but now my ruby keeps turning up with syntax errors
21:55gfredericksguns: how bout all them hash rockets?
21:55gunslol. I have that bound to a key anyway
21:56gfredericks{:foo => "bar", :baz => "bang"} --> {:foo "bar" :baz "bang"}
21:56ivanbig_list = [['stuff', 'stuff']
21:56ivan['more', 'stuff']]
21:56gfredericksit's kinda crazy when you see them side by side
21:56ivanwhat happen!?
21:57autodidaktogfredericks: you mean foo: "bar", baz: "bang"
21:57gfredericksautodidakto: in ruby or clojure?
21:57ivandict(foo="bar", baz="bang") is almost tolerable
21:57gunsI hate the 1.9 hash syntax
21:57autodidaktogfredericks: oh sorry. i got confused, i thought you were comparing 1.8 to 1.9
21:58gfredericksif you have a problem, the answer is always more syntax
21:58gunsthat's the ruby way for sure
21:58autodidaktoblame perl :)
21:58gunsI like the perlisms actually
21:59guns%w[foo bar baz] # no commas
21:59autodidaktoi agree. if you're gonna have syntax, ruby's aint bad.. it's the inconsistancies mostly
22:00autodidaktoguns: but no way to do common less hashes, directly..
22:00gunsIf ruby had persistent data structures, I might not have made it to clojure
22:00gunsbut the pervasive mutability is a real headache in larger apps
22:01ivanbut my 200 line script works fine and I have no idea what you are talking about lalala
22:01ivan(it does bother me that no one seems to have the problems I have in the Python world)
22:01autodidaktoguns: if you're gonna have a mixed language, you could find worse things than Lisp + Perl + Smalltalk
22:02gunsWell, wn retrospect, python has a lot more discipline than ruby
22:03autodidaktoguns: and that always frustrated me... I want the no-holds-barred of ruby, but not the "wth is this?" that comes along with it
22:03alex_baranoskyimmutability at the language level just eliminates an entire level of comlexity
22:03alex_baranoskyI find it makes reading the code so much more effortless
22:04autodidaktoalex_baranosky: we agree of course :)
22:04alex_baranoskyreading most other languages I always need to set aside a portion of my brain for what-ifs and mutability gotchas
22:05autodidaktoand how much you gotta keep... no, juggle, in your head
22:05alex_baranoskyalso Clojure's regular syntax is so comforting
22:05autodidaktomaybe plate spinning is a better metaphor...
22:05alex_baranoskymy goodness -- if you do a lot of SCala you'll know what I mean
22:05gfredericksand most of the metaprogramming happens once at compile-time
22:06alex_baranoskyand the metaprogramming is immutable metaprogramming
22:06alex_baranoskymeaning it is just functions that run... at compile time (macros)
22:06gunsyeah, localized monkey patches were rejected for ruby 2.0
22:07gfredericksthey were?
22:07gunswould've been a great step
22:07gfredericksI forgot what those were called
22:07gunsmatz said too slow
22:07gunsrefinements
22:07gfredericksah right
22:07guns?
22:07alex_baranoskywhat a great way to take the path most often taken
22:07gunshaha
22:07wkmanireHowdy folks.
22:08autodidaktowkmanire: howdy pa'ner
22:09alex_baranoskyhowdy wkmanire
22:09alex_baranoskywhat's new?
22:09wkmanireI'm reading through the information available on the website.
22:09alex_baranoskyI'm bored
22:09wkmanireI was referred to clojure by somebody in Python.
22:09gfredericksalex_baranosky: work on reconstitutible lazy seqs
22:09wkmanire#python
22:09wkmanirebleh
22:10alex_baranoskyre-what-able ?
22:10wkmanireI'm going to have a whole bunch of newb questions.
22:10alex_baranoskyI'm in a non-programming mood
22:10gfredericksoh definitely never mind then
22:10alex_baranoskythis is a pretty good spot for noob Q's
22:11gfredericksmy last comment was to alex_baranosky not wkmanire
22:11wkmanireI'm a strictly imperative programmer and have done my work almost exclusively using OOP.
22:11wkmanireBut... I want to learn functional programming.
22:11guns<applause>
22:11wkmanireDoes clojure have a web developement framework?
22:11alex_baranoskywkmanire, Clojure is amazing -- that's all you need to know :)
22:11autodidaktoShort answer, yes
22:12gfredericksclojure on clails
22:12autodidaktoLong answer, yes but better
22:12alex_baranoskyit has multiple web libraries
22:12gunsgfredericks: lol
22:12wkmaniregfredericks: I hope that was a joke.
22:12wkmanire:D
22:12gfredericksI hope so too, I haven't googled yet
22:12gunsclojure libs do tend to have awkward names
22:12alex_baranoskyClojure on Clams ?
22:12alex_baranoskyClojure on Classic Cars?
22:12autodidaktoguns: everybody loves their puns. we're still not as bad as ruby though
22:12gfredericksI spent a lot of effort at the first conj trying to come up with an interesting name
22:13wkmanireI see that you can target javascript with clojure too.
22:13wkmanireSo, as a webdev that is pretty interesting to me.
22:13gunsgod I'm still laughing
22:13autodidaktowkmanire: very much so. same language both server and client... and *not* js
22:16wkmanireA seq is essentially a cons cell correct?
22:16amalloyno
22:17autodidaktowkmanire: what do you know about lisp?
22:17wkmanireautodidakto: I do most of my hacking with emacs. So I've hacked a bit of elisp.
22:17wkmanireautodidakto: Don't take that seriously.
22:17autodidaktowkmanire: what's great about seqs is that they are an abstraction.
22:18wkmanireautodidakto: That's what I'm reading.
22:18autodidaktocons are... uhm... real things... anything that conforms to first/rest/i-forget can be a seq
22:18autodidaktohowever they may be implemented
22:18autodidaktoconforms to = understands/implements
22:19wkmanireThe article http://clojure.org/functional_programming here states that seq is an interface defining a thing which has first and rest.
22:19autodidaktough, im tripping all over my myself... *whatever they're implementation details, as long as they understand first/rest/something
22:19autodidakto*their... man i need sleep...
22:20autodidaktowkmanire: right right, so, that's one example of clojures... new lispy power modern power
22:20alex_baranoskywkmanire, lots of interfaces in Clojure under the hood
22:20alex_baranoskythere's a whole lot of Java going on down there
22:20autodidaktowkmanire: are you coming from java?
22:20autodidaktowkmanire: ruby? perl? fortran? Sassl?!
22:21gfredericksquick someone add an even more ridiculous example
22:21aperiodicforth!
22:21wkmanireautodidakto: I've been living in Brazil for the last two months. My English are not too good right now also too.
22:21autodidaktoaperiodic: respect the concatenation
22:21xeqidcpu16?
22:21wkmanireautodidakto: I make my living with .Net. I hack a lot of python and Javascript.
22:22wkmanireI'm trying to make my escape from the windows platform.
22:22autodidaktowkmanire: gotcha
22:22wkmanireAlso, trying to hold back on my questions until I've read up on at least the basics of Clojure.
22:23autodidaktowkmanire: philosophical questions are fine. but as for the beginner tutorial stuff, there are good resources
22:23wkmanireImmediately I'm thinking things like, how do you keep down on namespace complexity when you are constantly making functions.
22:23wkmanireHow does the stack not get eaten' alive by recursion.
22:23autodidaktowkmanire: tryclj.com can be your repl for now, too
22:23alex_baranoskyloop recur
22:23alex_baranoskyor just plain recur
22:23autodidaktowkmanire: namespaces :)
22:24wkmanire100 functions one data structure?
22:24wkmanireowie.
22:24alex_baranoskymore like POW!
22:24autodidaktono no. 100 functions, whatever you're data structure
22:24alex_baranoskyBAM
22:24autodidakto*turns on 70s batman music*
22:24alex_baranoskyClojure leans heavily on seqs and maps
22:24wkmanireooh, thanks for the live REPL.
22:24autodidaktoalex_baranosky: jimmy jillikers baranosky! the OOP joker is at again!
22:24alex_baranoskyso the core library functions become used very heavily
22:25wkmanireVery convenient.
22:25wkmanireI hope this site is written with clojure both client and server.
22:25autodidaktowkmanire: it's on github :)
22:25wkmanireNope, client is using jquery. very old jquery.
22:26gfrederickswe clojure developers only use the most vintage of jay queries
22:27wkmanireNew jQueries are generally better. They haven't added that much functionality but they keep improving the internal code.
22:27technomancywkmanire: the main difference between seqs and cons cells is that cons cells allow for "improper lists" (dotted pairs) while seqs always have either a seq or nil in their cdr
22:27wkmanireI believe Resig is a functional programming fan too.,
22:27wkmaniretechnomancy: Lost me with dotted pairs.
22:27technomancywkmanire: you can call (cons 1 2) that has 2 as the cdr
22:28technomancythat's not legal in clojure
22:28technomancyyou'd just use a vector for that
22:28amalloywkmanire: a cons cell is typically a "pair" of any two things. when the second thing is also a cons cell, lispers interpret that as a list. clojure doesn't have cons cells, it has seqs
22:28wkmanireI see.
22:28wkmanireBecause 2 is not a seq, that is invalid.
22:28wkmanireunderstood.
22:28wkmanireSo how is (cons 1 2) represented?
22:29wkmanire(1 (2 nil))?
22:29gfredericks(cons 1 (cons 2 nil))
22:29gfrederickswait I don't know what we're talking about
22:29wkmanirepardon my crappy syntax, but I think I was more or less correct.
22:29wkmanirehe he he
22:30wkmanireWell, this looks like this is going to be fun. I'm going to force myself to finish reading this website and actually hack a little clojure. I'll write down my questions and come back with the ones I can't answer on my own.
22:30wkmanireThanks for the support folks.
22:31gunsgl hf
22:31autodidakto,(apply str (interpose "!" ["all" "your" "jays" "are" "belong" "to" "us"]))
22:31FrozenlockNoir users: I want to provide a link to download a file generated on the fly. Is there a function for this? I think I need (((noir.request/ring-request) :headers) "application/octet-stream"), but that's a far as I got :(
22:31clojurebot"all!your!jays!are!belong!to!us"
22:31autodidaktowkmanire: -> http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure/
22:32wkmanireautodidakto: Sweet. That will be video number 2 on my list.
22:32wkmanireautodidakto: A fella in #python linked me this http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey
22:33gunswkmanire: This is the Hickey talk that pulled me in:
22:33gunshttp://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey
22:34wkmanireI have a feeling I'm going to spend a lot of time reading what this guy wrote and listening to him talk.
22:34ivanso, who's gonna port Meteor to ClojureScript? ;)
22:34autodidaktowkmanire: also, now is the time to buy cemerick's Clojure Programming -> "http://www.clojurebook.com/&quot; ... just came out, 50% sale, + 40% off with coupon code :)
22:34wkmanireDoes he ever frequent the channel?
22:34wkmanireautodidakto: Going to be hard to get in Brazil.
22:34wkmanireI hope I can get it on my kindle.
22:34autodidaktowkmanire: You'll notice the clojurians are more philosophical than average, as well
22:35autodidaktowkmanire: PDF/Mobi/Epub/Daisy
22:35autodidaktoyou don't even need eyes (with Diasy format), hehe
22:35autodidaktowkmanire: rhickey is usually too busy being awesome, but yes he comes in... was doing a poll about naming an new function...
22:35autodidakto$seen rhickey
22:35lazybotrhickey was last seen joining on clojure 1 day and 14 hours ago.
22:36wkmanireSeems like a pretty fart smeller.
22:36wkmanirehe he he
22:37offby1I cannot believe I've never heard that before, but ... there you are
22:37autodidaktooffby1: must be brazilian thing
22:37wkmanireI'm a gringo.
22:37wkmanireI'm just living here.
22:37wkmanireHome is Las Vegas, Nevada.
22:38gfredericksoh goodness I think I've somehow misused core.match again
22:38chrisrHow do I test if two records in vars x and y are of the same type? I have tried (def x (Foo. :a)) (def y (Foo. :b)) then (= (type x) (type y)) => nil
22:39autodidakto2 months in brazil and it's already ruined your english, you said?
22:40gfrederickschrisr: gives true for me
22:41wkmanireautodidakto: I was here for a month between december and January too. I just don't speak English while I'm here.
22:41wkmanireOnly with my fellow irc patrons.
22:41wkmanireautodidakto: I'm looking forward to learning Clojure though.
22:41wkmanireLooks like a fun language to speak.
22:42autodidaktowkmanire: cool. I know how it is.... Yeah. enjoy.
22:44wkmanireAhhh, that answers my question.
22:44wkmanireAbout stack space.
22:45wkmaniretail call optimization.
22:45chrisrgfredericks: oooops I had redefined = in that namespace
22:45autodidaktowkmanire: it's either not an issue (usually isn't) or tail call optimized (converted to something like an imperative loop)
22:52wkmanireautodidakto: http://clojure.org/runtime_polymorphism
22:52wkmanirethis article is attempting to sell me that multifunctions are a form of polymorphism
22:52wkmanireand the example sort of behaves like a class and its member functions.
22:53wkmanireBut I'm really just seeing function overloading.
22:53wkmanireAm I missing something?
22:53wkmanirePardon my grammar, I know these imperative terms really don't apply for the most part.
22:54emezeske_wkmanire: Function overloading == a form of polymorphism
22:54gfredericksmultimethods let you use a type hierarchy as well
22:54cemerickwkmanire: the point is that multimethods can dispatch on arbitrary values, not just the class of the first argument.
22:55wkmanireSo encounter takes anything which is a :Species then the "submethods" define what happens when various species meet.
22:55wkmanireis that correct?
22:55wkmanireRather, encounter takes two things which are :Species
22:56cemerickit takes two things which have :Species entries
22:56wkmanirecemerick: Yes, please correct my grammar. I really want to know how form my questions correctly.
22:56cemerickThat's not a class, it's just a key in the example maps.
22:57wkmanireSo what happens if encounter is called and passed two things which haven't been specified with defmethod?
22:57autodidaktowkmanire: :default
22:57cemerickfor which there is no method defined, therefore an error is raised
22:58wkmanireGot it.
22:58wkmanireAre those entries defined "on the fly"?
22:58autodidaktowkmanire: so you're used to polymorphism based on class, or based on number of argumends... in clojure, you based it on the result of a given function... that is, _anything you want_
22:58wkmanireThat is :Species began to exist because of its usage in the definiton of encounter?
22:59cemerickwkmanire: no, it's just a key; no special initialization or anything
22:59chrisrthis video was helpful to me regarding protocols and multimethods, http://www.infoq.com/presentations/Clojure-Expression-Problem
22:59autodidaktosee the "(fn [x y] [(:Species x) (:Species y)])" ? that's the function that... prepares (my words), the, uhm, dispatch
23:00cemerickautodidakto: called a dispatch function :-)
23:00autodidaktoit in this case, it pulls out the species key of the x hash, and the same with y... the defmetho
23:00autodidaktoone of the defmethods is going to catch the return value of that function
23:00wkmanireduck typing.
23:01autodidaktobut not just "do you respond to this?"
23:01cemerickwkmanire: no, that's based on methods that are called on objects
23:01cemerickmultimethods exist entirely separate from the values they are applied to
23:02autodidaktoif could easily have been :species of x + the string "heck yah!", and the right defmethod would be called
23:02wkmanirecemerick: I think I understand you but don't bother to clarify that just yet. I'm probably not ready for the answer.
23:02mutinyonthebayI've noticed that a lot of the features of the meteor framework just released (real-time updating from code changes, server-client code sharing, etc.) seems very reminiscent of clojurescript... is it theoretically possible to run one in the context of the other?
23:03autodidaktowkmanire: the bigger theme is this -> there are a lot of aspects to OOP... clojure doesn't entirely reject them... it just applies them a la carte
23:03autodidaktoyou asked about namespaces, about polymorphism... we use them too, but we don't smash it all together like sitting on your sandwich
23:04wkmaniresitting on your sandwhich?
23:04autodidaktolol i dunno i just made that up
23:04cemerickwkmanire: Perhaps. :-) Consider: you could define a multimethod whose dispatch values vary depending on the time of day.
23:04wkmaniresandwich*
23:04wkmanireI'm used to Namespace -> Class -> one of N different things
23:04wkmanireOr, Module -> Class or Variable Or Function
23:04cemerickProtocols are more aligned with that kind of classification.
23:05wkmanireOr in the case of Javascript, Everything -> Everything -> Everything -> loop
23:05wkmanire:D
23:05autodidaktoBut if you're worried about php style "everything called from anywhere". dont worry, we use namespaces
23:05wkmanirecemerick: Now thats interesting
23:06wkmanirecemerick: So you could schedule different behaviors appropriately to the clock.
23:07autodidaktowkmanire: you could do anything you want :)
23:07cemerickwkmanire: sure, or the current size of a queue, or a characteristic of the *last* set of arguments to the multimethod, or…
23:07wkmanireautodidakto: At zombo.com
23:08xumingmingvcan we do a step-by-step in clojure like what we do in java using eclipse?
23:09xumingmingvcan we do a step-by-step debug in clojure like what we do in java using eclipse?
23:09wkmanireGoing to be AFK a bit.
23:10cemerickxumingmingv: yes, debugging in eclipse (as long as you have counterclockwise installed) works pretty well; it's a little rougher around the edges still, but stepping works.
23:10autodidakto*grumbles something about CL/Shen/Smalltalk debuggers*
23:11chrisrshen has a good debugger?
23:11chrisror you mean that CL/smalltalk dont?
23:11yoklovsmalltalk has an amazing one
23:11autodidaktoshen has a CL style debugger
23:11yoklovfrom what i've heard
23:12autodidaktosmalltalk is the best they say, yeah
23:14chrisri have been meaning to try to shen clojure port for awhile now, just no time
23:15amalloystepping debuggers are a little less obvious in a pure language, since most of what you use a debugger for (in my experience) was checking out what the state of the program was when running code X
23:15amalloyi'd definitely like a better one for clojure though; i never got ritz to work
23:15autodidaktochrisr: i think it's still a little rough is my guess. might as well just play with shen :)
23:15TimMcamalloy: As long as it can inspect return values, it gets my vote.
23:16gfredericksum. hello. alert anybody?
23:16ferdI'll give an informal Clojure training to my team mates ("brown-bag" session)... Ideas to awe to audience?
23:16xumingmingvcemerick thanks, but if i remember it correctly, counterclockwise is very slow
23:16autodidaktochrisr: i think of shen as if clojure had said "screw the jvm, open source, and hey haskell is pretty cool"
23:16xumingmingvi am using emacs for now
23:17hugodamalloy: sorry to here that - lein-ritz is getting easier to set up (with lein2)
23:17amalloyhugod: the only time i tried was in the early days; it's hard to fault you for it
23:17autodidaktoamalloy: TimMc: agreed. A debugger/inspector/whatever makes things smooth
23:17chrisrautodidakto: thats somewhat my impression, however it seems to lack greatly in anything concurrent
23:17ivanferd: sit back and let Hickey do the explaining
23:17autodidaktohugod: link :)
23:17ferdmy idea is to show a few basic concepts, and then jump into small cool things to "entice" people to look further
23:17ferdivan: #-)
23:17amalloybut in so doing i messed up my existing swank setup and now i'm afraid to try again
23:18cemerickxumingmingv: really? I use it all day.
23:18hugodautodidakto: https://github.com/pallet/ritz
23:18cemerickYou might want to give it another shot, in any cause.
23:18cemericks/cause/case
23:18autodidakto"The whole language available to you, all the time"... Except when you're debugging. Put printf statements.."
23:18ferdmy objective is to spark interest in Clojure... not to "teach" it (you cannot teach any language in 1hr)
23:19cemerickautodidakto: not true; there's the debug-repl
23:19cemerickWe're hoping to get it into counterclockwise soon…
23:20autodidaktocemerick: Awesome. I got some projects to check it then.
23:20autodidaktocemerick: Got your book in virtual desktop 12 btw. Just finished the preface and i'm already blown away.
23:21cemerickWell, I'm glad the preface is so good. ;-)
23:24cemerickactually, I'm surprised anyone reads the preface to begin with!
23:24mutinyonthebayI read the preface. Breathtaking.
23:24autodidaktoI think it gives a feeling of what's to come
23:24mutinyonthebayI joke, but it was a good preface :).
23:24cemerickmutinyonthebay: I knew I was being trolled on that one :-)
23:25autodidaktoit's like, the guy is openning the car door for you. Does he just throw you in? Open the door slowly with white gloves on? Can you trust him? Where am I going with this ridiculous metaphor?
23:25mutinyonthebaycemerick: In actuality, the book is very good. I'm incredibly new to clojure, and only have a wee bit of CL in my background, and I'm finding everything very clear and approachable.
23:27autodidaktocemerick: Programming Clojure is like the kind but tough professor. Clojure Programming is the fun loving tutor.
23:27cemerickhah
23:27autodidaktowell at least the preface :) I'll finish the book and come back with more analogies
23:28gfredericksautodidakto: but both can be rearranged to spell "Armoring Clog Jumper"
23:28autodidaktolol analogies not anagrams!
23:29autodidaktogfredericks: but the fact that both of them arrange the same... coicidence?
23:29gfredericks"Grim Nuclear Jog-Romp"
23:29alex_baranoskyhas anyone used Jark?
23:30cemerickautodidakto, mutinyonthebay: anyway, thanks for the kind words. I hope you find the rest of the book to be useful and as pleasant.
23:31mutinyonthebayI'm looking forward to it :)
23:32autodidaktohugod: the readme, under "experimental jack in support" repeats the instructions for lein1 plugin install.. does that mean it doesnt work in lein2?
23:33autodidaktocemerick: I shall
23:33hugodautodidakto: it should work with lein2
23:34hugodyou will need to add lein-ritz to your :user profile
23:34autodidaktohugod: mind if i fork and clearify that in the README?
23:35hugodthe jack-in support has seen only light testing, as I don't use it myself...
23:35hugodautodidakto: please do :)
23:35ppppauldatom is the new document db?
23:35autodidaktohugod: and github markdown bonked your install code... the ```language line is broke (happened on my README too.. don't know why)
23:38autodidaktoi'll clean that up too though. Ok off I go...!
23:38jdpthis may be a very silly question but, on osx 10.7 with lein2, hitting enter at the repl does nothing. has anyone else encountered this?
23:38jdpctrl+d will quit the repl though
23:41buduhi
23:42wkmanireback
23:42budui'm trying to create a package for the new Meteor web framework to be able to use the clojurescript compiler but i'm stuck on a semmingly simple issue
23:43budumeteor listen for file change using node's fs.watch and i'm calling cljsc on the whole source directory in the callback
23:44budubut then it seems to get into a loop, where the cljs files trigger a change notification when the compiler run
23:45buduso i'm wondering if cljsc is modifying the original files in some way during compilation?
23:46wkmanireUsing Clojure with swing seems a bit contrary doesn't it?
23:47wkmanireIn the example, clojure calls .setText of a JLabel.
23:48emezeske_wkmanire: Your program has to do *something* other than heat up the CPU! ^_^
23:49ppppaulmy programs heat my room
23:49emezeske_I guess there is FRP for more functional GUIs, but I'm not sure anyone has done anything big with that yet
23:50wkmanireSo in order to utilize existing libraries a certain amount of mutability is acceptable.
23:51ppppaulyou need to mutate some thigns
23:51ppppauljust not EVERYTHING
23:51ppppaulevery god damned thing
23:51ppppaulmy whole program just mutated into something i don't understand
23:52emezeske_Yeah, a certain amount of mutability is present in every program
23:52ppppaulalso, constants are easier to name
23:52emezeske_Clojure just encourages you to isolate and minimize the mutability
23:53wkmanireOtherwise you'd have to recreate your entire UI each time the mouse moved... I may be exaggerating but technically you'd need to create a new instance of your application where the mouse is now located one more pixel to the right.
23:54amalloywkmanire: that's really not such a big deal with structural sharing
23:55amalloynot that i'm saying you shouldn't use mutability for your UI
23:56amalloybut "OMG you'd have to copy your whole program state" is the wrong thing to worry about
23:56wkmanireI'm not "OMG"ing.
23:56ppppauli am
23:56wkmanireJust making naive statements to illustrate my curiosity with all of this.
23:57ppppaulwhen clojure is doing stuff with java, you are outside of sanity
23:57amalloywell, don't take me too seriously when it sounds like i'm being critical (fyi)
23:57wkmanire:)
23:57emezeske_wkmanire: To feed your curiousity, copying your whole program state to account for one tiny thing changing is a pretty common FP idiom
23:57amalloyare you familiar with the idea of structural sharing?
23:57wkmanireDo you guys constantly debate where to draw the line?
23:57wkmanireI mean, internally/
23:58amalloywell, constantly is a strong word
23:58wkmanireDoes it occur each time you are working on your UI?
23:58amalloybut it's a thing to worry about
23:58wkmanireOr with the file systme
23:58wkmanireor a database
23:58wkmanireOr anything else that naturally represents a mutable state.
23:58amalloy"naturally"
23:59amalloythere's no particular reason why a database has to be mutable; elephantdb and datomic show that