#clojure logs

2011-12-15

00:11wolfjbclojure-contrib seems to be only at 1.2.0 while clojure is at 1.3.0, am I missing something?
00:12TimMcwolfjb: contrib is dead
00:12TimMcclojurebot: What happened to contrib?
00:12clojurebotTitim gan éirí ort.
00:12TimMcclojurebot: What happened to clojure.contrib?
00:12clojurebotexcusez-moi
00:12TimMcterrible bot
00:13wolfjbah, so I don't need it then?
00:14TimMcwolfjb: Right, just pick up what you need as individual packages. http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
00:14TimMcUnfortunately, not everything made the transition -- some were already not being maintained. That's part of the reason for the splitting, I think.
00:15wolfjbok, thanks!
00:15wolfjbthat explains a lot
00:16alexbaranoskydoes anyone know if the shortcircuiting threading operators made it into a new contrib library? -?> -?>> etc
00:17cemerickcore.incubator
00:17alexbaranoskycemerick, thanks
00:18wolfjbwell, shucks, contrib.except isn't maintained
00:18wolfjb:(
00:22TimMcWhat did you want from there?
00:22wolfjbthrow-if
00:25TimMcwolfjb: Looks like a pretty small lib. I bet it could easily be maintained as 1.2 and 1.3 compatible.
00:26wolfjbI wouldn't know how to do it, but I'd be happy to help
00:26wolfjbI've done lisp in the past and this is my first foray into clojure
00:27wolfjbI wonder, though, if it would be superseded by Slingshot ?
00:30wolfjbhmm... nevermind, Slingshot seems to be try/catch on steroids or something cool like that
00:32TimMcslingshot?
00:32clojurebotslingshot is the successor to clojure.contrib.condition: https://github.com/scgilardi/slingshot
00:32TimMcOK, clojurebot, I guess you're not so terrible.
00:33TimMcRaynes: I removed clojail from our copy and called eval in the client-side handler and now it's a glorified JS REPL. :-P
00:33TimMcone that round-trips through a server for no reason
00:40wolfjbI keep getting a warning about *classpath* not declared dynamic, but when I add the "fix" to project.clj (ala ^:dynamic *classpath*) then lein compile throws an illegal argument exception No value supplied for key: *classpath*
00:40wolfjbwhy is that?
00:48wolfjbok, nevermind again. lein upgrade seems to have fixed it
00:49wolfjbas well as adding an exclusion for org.clojure/clojure for swank-clojure
01:34mindbenderwhy are the ritz devs do hard to reach?
01:34mindbender*so
02:00pyrmindbender: you'll find them in pallet
02:01pyr#pallet i mean
02:01pyrbut this is the wrong TZ
02:01mindbenderpyr: thanks. what TZ will be appropriate
03:40Blktgood morning everyone
03:42kral'morning
03:42kralare clojure.contrib deprecated?
03:43pyryes
03:43pyrit is now split in several support libraries
03:43pyrhttp://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
03:44kralpyr: ty
03:44pyrthis is only valid for clojure 1.3 and later releases
03:45kralsure
03:47pyrthat and the integer changes make up for most of the work adapting stuff to clojure 1.3
03:52krali'm going to start with 1.3 so is not a great issue for me, i think
03:57pyrif you're going from scratch, definitely go with 1.3
03:58pyryou'll find some issues in your dependency chain
03:58pyrbut no showstoppers
04:12kralty for assistance pyr
04:12pyrnp
04:25mindbenderin the book growing object oriented software, can CI servers do the work of end to end testing. And is the authors idea of a walking skeleton analogous to a hello world program?
04:27clgvmindbender: I don't know the book. But to me it's almost sure that a "hello world program" can't be analogous to "continous integration tests" or "testing in general".
04:28clgvto me "hello world program" means "here I show you a few basics of that programming language. you can compare it to the examples you know from other languages."
04:29mindbenderclgv: the end-to-end testing as talked about in the book is about automating deployment. while the context of hello-world program is more like a POC where you show mysql works with clojure and swing
04:30mindbenderthe book is a very interesting read maybe you should google it up to have an idea
04:30clgvmindbender: if any allegedly advanced concept is analogous to a "hello world program" it's certainly not advanced and not of much use ;)
04:31mindbenderI was hoping clojure could provide us with a similar model of building software
04:32clgvmindbender: there is support for testing which surely can be done automatically and integrated within hudson or similar CI-software. I dont know if the latter integration already has a good clojure wrapper
04:33mindbenderyes there is support but not one well documented like this one in terms of pulling the pieces together
04:34clgvthere some different libraries for testing with clojure. the built-in one is clojure.test
04:35clgvthere is also "midje" and "lazytest" - you should be able to find usage examples on their github pages or via google
04:36clgvI did test with clojure.test since that was described in one of the books I read on clojure
04:42mindbenderclgv: look at this question: http://stackoverflow.com/questions/3127194/proper-continuous-integration-and-continuous-deployment-with-git-and-heroku. These are the kind of things I'm intersted in knowing about and more. If you read this book you will also get the idea of the walking skeleton for which I will like to see examples of skeletal frameworks we can take advantage of and customize rather than having to reinvent the wheel
04:44clgvmindbender: in general you can use every java library there is to avoid reinventing the wheel in clojure. in some cases you might benefit from building a clojure layer in front of the lib for better clojure-like syntax.
04:44clgvso you can extend your search to java libs and frameworks
04:45mindbenderclgv: what about frameworks
04:46clgvjava ones I meant. Hudson (or its new fork name) is a solution for CI
04:46clgvfor example.
04:49pyrmindbender: FYI a mix of jenkins + midje + pallet does the trick for end-to-end automation
04:50mindbenderpyr: that's a head-start towards where I want to be... checking it out
04:51clgvpyr: ah right. pallet for deployment?
06:09pyrclgv: yes
06:09pyrclgv: deployment and C&C
08:05jheandergood morning!
08:06jheanderwhat's the current take on automatic re-testing on clojure today?
08:06jheanderis lazytest alive/active?
08:07G0SUBjheander: I don't think so.
08:08G0SUBjheander: clojure.test, test.generative & midje are the good options at the moment.
08:09jheanderis there any way to set up automatic re-testing of changed files with clojure.test? I like the very simple structure of clojure.test, but would like to reduce the cycle times
08:37kephaleamalloy_: two functions that could be useful in ordered.set: set (replace a member with a new member at the same position) and index (what is the index of this member)
08:54pyrhi #clojure
08:55pyrif i want to build a jar with multiple classes that have a -main
08:55pyrhow do I go about it
08:55clgv,(println "hi pyr")
08:55clojurebothi pyr
08:55pyrnow that's a warm welcome
08:56clgvjava -jar Your.jar ClassOne
08:56clgvthat should work afaik
08:56pyrit doesn't seem to
08:56pyri use my namespace path as the class
08:56pyrmaybe i should explicitly name the class
08:56pyr(I get NoClassDefFound exceptions)
08:57kotarakjava -cp your.jar ClassOne maybe?
08:57pyri tried this
08:58pyrok, i have to specify :aot
08:58clgvkotarak: ah right. my error.
08:58kotarakpyr: you actually AOT-compiled your namespace
08:59pyri works with :aot set to my namespaces
09:40AWizzArdI would like to serve static content with moustache. Is there a more idiomatic way to do this then (app ["html" "file.html"] my-handler) (defn my-handler [req] (ring.util.response/resource-response "/web/html/file.html")) ?
09:40AWizzArdthen --> than
09:44kotarakAWizzArd: you can use any ring handler, now? (app ["html"] ring/static-content-handler-I-forgot-then-name-of)
09:45kotaraks/now/no/
10:08gtrak`wasn't there a clojure library that did more than just the libvirt java bindings?
10:09gtrak`ah, I found it, vmfest
10:38TimMc&(reify Object (getClass [_] Long))
10:38lazybotjava.lang.IllegalArgumentException: Can't define method not in interfaces: getClass
10:38TimMcNot the best error message...
10:38TimMcThe problem is actually that getClass is final.
10:40TimMcI so don't feel like filing a Jirum for this.
10:41mefestois there a way to have hiccup output html using indentation?
10:42mefestohiccup pprint just for readability of output while developing
10:43ordnungswidrigClass of (defn foo!) and (defn foo_BANG_) is identical. Does this lead to any problems?
10:46TimMcordnungswidrig: It isn't double-underscore for the second?
10:46ordnungswidrigTimMc: it'd tought it was but it's foo_BANG_
10:47ordnungswidrignot to bad but a wonder
10:48TimMc&(apply = (map munge ["!" "_BANG_"]))
10:48lazybot⇒ true
10:48TimMcew
10:50TimMc&(apply = (map munge ["-" "_"]))
10:50lazybot⇒ true
10:51TimMcI guess it's too late to change that.
10:53ordnungswidrigTimMc: yes, I think it is.
10:53ordnungswidrigI just wondered if they will be problems because of that, e.g. when AOTing
10:58TimMcI'm having trouble figuring out a place it would matter.
10:58TimMc&(map munge ["A+B" "A_PLUS_B"])
10:58lazybot⇒ ("A_PLUS_B" "A_PLUS_B")
10:58TimMcthere we go
11:03TimMcI guess as long as you aren't in the habit of using UPPER_CASE var names you're good.
11:04TimMcfn names, specifically
11:08jcromartieh
11:08jcromartiehi
11:08jcromartiewhat's the state of the art with Clojure FizzBuzz? :)
11:08jcromartieI'm in the mood
11:09gtrak`jcromartie, try counting with lambdas
11:10gtrak`http://en.wikipedia.org/wiki/Church_encoding
11:12jcromartiegtrak`: Church numerals are bad for code golf
11:12TimMcclojure.core/fizzbuzz
11:12TimMcIt used to be in contrib.
11:14TimMcjcromartie: http://web.archive.org/web/20090602074545/http://www.cliff.biffle.org/esoterica/hq9plus.html
11:15jcromartiehah, hilarious
11:16AWizzArd~seen cgrand
11:16clojurebotcgrand was last seen joining #clojure, 32992 minutes ago
11:16TimMcjcromartie: And of course, the object-oriented version: http://www.dangermouse.net/esoteric/hq9plusplus.html (which is the first one I learned about)
11:16AWizzArd~(/ 32992 60 24.0)
11:16clojureboteg, https://github.com/clojure/tools.logging is the new version of clojure.contrib.logging
11:21TimMc,(/ 32992 60 24.0)
11:21clojurebot22.91111111111111
11:26jcromartie(defn fb[ns](doseq[w(map(fn[n](keep(fn[[d x]](when(zero?(mod n d))x)){1 n 2"fizz"3"buzz"}))ns)](apply println w)))
11:26jcromartiethat's my best golfing so far
11:28TimMcargh, don't remove spaces
11:28jcromartieTimMc: I thought that was the whole point
11:31jcromartieI mean if we're talking fizz buzz code golf here
11:37TimMcI prefer to count forms.
11:37TimMc#(+ 1 2) is 4 forms
11:37TimMc(or is it 5?)
11:39Borkdudedoes anyone know if this is possible in emacs? http://superuser.com/questions/368341/emacs-two-frames-for-one-file-seemless-scrolling
11:40TimMcSplit screen with yoked scrolling>
11:40TimMcinteresting question
11:40cemerickIs it true that package.el is included in Emacs 24?
11:40cemerick(but was not in 23, that is?)
11:40Borkdudeoh fuck, I just meant "buffers" instead of "frames"
11:41TimMcBorkdude: Actually, you mean windows.
11:41TimMc1 file, 1 buffer, 2 windows.
11:41Borkdudeah yes, hm.
11:42raekcemerick: yes
11:42cemerickthanks
11:42jcromartieBorkdude: there's follow mode
11:43jcromartieanswered :)
11:43jcromartiePLZ UPVOTE AND ACCEPT MY CODES THX
11:43Borkdudejcromartie: great :)
11:44cemerickI'm surprised there's not emacs stack exchange site.
11:45Borkdudejcromartie: will do
11:45Borkdudecemerick: me as well
11:45Borkdudejcromartie: can only accept after so many minutes
12:22devncemerick: yes it's true, but IIRC the package.el that is included doesn't support multiple package sources
12:22devnso if you want marmalade I think you'll need a fresher version
12:24raekreally?
12:25cemerickI *think* I was able to use marmalade without a problem?
12:25raekI know that the version from ELPA did not have multiple repo support
12:26hiredmancemerick: it seems like you are much more likely to get a reliable answer about emacs questions from #emacs
12:58bartek1hello, is there a function f that to this: (f [2] [2 3]) -> [2 3 3] ?
12:59bartek1sorry
12:59bartek1-> [2 2 3]
13:01Bronsa,(apply conj [2] [2 3])
13:01clojurebot[2 2 3]
13:01raek,(into [2] [2 3])
13:01clojurebot[2 2 3]
13:01bartek1thanks :)
13:01Bronsathanks clojurebot
13:01TimMcinto *might* be faster
13:02TimMcI don't know if conj with multiple additions uses transients.
13:06compmstrDoes anyone know why (apply + (map * a b)) is roughly 5x slower than doing the same thing with loop/recur?
13:06technomancy_laziness overhead prolly?
13:06compmstrI tried putting lazyness into the loop version, ran just a little slower
13:06raekallocations for the cons cells?
13:08hiredmancompmstr: the loop version also most likely inlines * and +
13:08technomancy_oh, of course
13:08technomancy_HOFing + is going to kill perf
13:09compmstrwhat does HOFing mean?
13:09hiredman(reduce #(+ % %2) (map #(* % %2) a b)) may also be faster
13:09technomancy_higher-order-functioning
13:09compmstrah
13:11hiredmanif you pretend clojure is a lisp2 for certain functions you get better performance
13:12compmstrhmm, still roughly 5x slower with reduce/map using the lambdas
13:12hiredmancompmstr: most likely the allocation overhead then
13:12compmstrIt may well be the allocation of the list from map though, since the loop version just uses an accumulator
13:12compmstrthanks
13:15Scriptormorning
13:17duck1123does anyone know what it will take to get clout to match paths like "/keywords/:name.:format" again? The new version broke a lot of my old code
13:19hiredmanduck1123: https://github.com/weavejester/clout/commit/affbad08765a7debe4f034ba4e20e2185fd89637
13:23amalloyon 1.3, isn't the difference that loop/recur can work entirely with primitives? when you use map/reduce you have to box them and unbox every time you want to do math
13:24amalloy(technomancy_, hiredman, compmstr)
13:24duck1123hiredman: I'm not sure I follow, are you suggesting I undo that commit?
13:25compmstramalloy: I'm not sure, does nth do boxing? That's what I use to access the elements of the seq
13:26hiredmancompmstr: generally function calls all box
13:27hiredmanand numbers in collections are also always boxed (there are some vectors that can hold primitives)
13:28dnolencompmstr: numbers are always boxed as they are passed into functions, unless the function takes primitives, or you have already coerced the arguments to primitives for the inlineable fns (like +)
13:28dnolencompmstr: inlining is not possible (yet) w/ higher order usage.
13:28compmstrah, ok
13:29dnolen(+ 1 2), is inlineable and arg are primitive in Clojure 1.3
13:29clojurebot*suffusion of yellow*
13:29hiredmanif you have a (+ a b) and the compiler can tell that a and b are both longs, it well replace it with an ladd
13:29hiredman(jvm long add instruction)
13:29dnolen(map + [1 2]), 1 and 2 are boxed in the collection, + is not inlineable
13:30hiredmanwhich is much faster than the normal function call path
13:30compmstrThat makes a lot of sense now, thanks
13:30dnolencompmstr: so as far as why loop/recur is so much faster than map, it's not that map is slow, and I think the JVM can even optimize those allocations well. it's that w/ loop recur JVM can just magically inline everything.
13:30hiredmanVar.getRawRoot + IFn.invoke + Numbers.add + ladd
13:31hiredmandnolen: the clojure compiler can magically inline everything (which does wonders for the jvm too)
13:32dnolencompmstr: it's illustrative to compare the same type of operations in Scala - the numbers for higher order ops on collections are pretty similar.
13:32dnolenhiredman: Clojure inlines, the JVM inlines.
13:32hiredmansure
13:32dnolenhiredman: yes
13:32dnolenI meant to agree
13:32hiredmanalright
13:32hiredman:)
13:34hiredmandnolen: can't they leverage the type system to help them do stream fusion like haskell?
13:35dnolenhiredman: I suppose they could, but I haven't seen anything like that yet.
13:35hiredmanmaybe I just have optimizations like stream fusions just tired too much to static typing in my mind
13:56technomancyhttp://p.hagelb.org/github-userid-percentile.html
13:59tsdhHi. Can anyone explain why my function errors with "nth not supported"? Code & error at http://pastebin.com/7NSji1rn
13:59tsdhLine 38 is actually the line with the (defn ...
14:00hiredmannth not supported on this type: TreeImpl
14:00hiredmanyou are calling nth on an instance of TreeImpl somewhere, and TreeImpl doesn't have the right interfaces/methods to support nth
14:02tsdhhiredman: Yeah, but its a varargs list, so I'd expect the arg after & to be a list where the destructuring form [t] takes the first element of the list. See my second call where it actually does exactly that, but it works only the first time.
14:03hiredmantsdh: recur doesn't do destructuring
14:03hiredmanwell, I should say, recur doesn't do varargs
14:03amalloyright. the third arg is a seq
14:04hiredmanif x is bound to a list, when you recur and rebind x you should pass an x
14:04hiredmaner a list
14:04mrevilI'm exposing a clojure API via REST, and I'm trying to do some input validation, how do I check if something is of type String, or is enumerable?
14:05hiredman(doc string?)
14:05amalloy(this is not actually true, but:) the compiler transforms (snoc a b c d) into (snoc a b [c d]). it doesn't do that when recurring, because you're supposed to know how many args you're passing
14:05clojurebot"([x]); Return true if x is a String"
14:05tsdhhiredman, amalloy: Indeed. Changing to (recur ... [nt]) does the trick...
14:06amalloyusing & [x] for an optional arg defaulting to nil is kinda gross anyway. i mean, it's convenient, but it's evil
14:07tsdhamalloy: Yeah, but my function is actually a macro expansion, and the macro would become pretty hard if I supported many the complete defn interface with overloading...
14:09amalloy(a) i don't really buy that, (b) it's already apparently hard enough that you had to ask in #clojure and wrap multiple things in vectors for no "obvious" reason
14:09amalloybut of course (c) you can write whatever code you want without worrying about my opinion
14:11TimMctechnomancy: percentile... as in, what percent of the github employees have had accounts longer than the given ID has?
14:11technomancyTimMc: right-o
14:12technomancythe great thing about your github id percentile score is that even though it starts at 100 it can only go down over time.
14:14tsdhamalloy: (a) Maybe I'm missing something, but don't I need to get my macro args as "name & args" and then test each and every component in args for its type to determine if an optional docstring is given and so forth? (b) the macro is pretty easy, it's just that the expansion looked correct to me, (c) I appreciate your opinions.
14:16amalloytsdh: i can't answer (a) without knowing what your macro actually is. but you might be interested in tools.macro/name-with-attributes to parse out the docstring &c
14:17amalloytechnomancy: whaaaaa? surely it can go up if they fire someone who joined after you
14:17tsdhamalloy: I'll check that, thanks.
14:17technomancyamalloy: oh, derp. yes.
14:18amalloytechnomancy: time to make that a heroku app, btw
14:18technomancyamalloy: awesome; let me know how it goes
14:18technomancynoir?
14:18clojurebotnoir is great
14:18technomancyclojurebot: that's just your opinion bro
14:18clojurebotbartj: it's not broken. Unless you know the performance hit there is actually a problem, I'd recommend leaving it alone.
14:18technomancywise words.
14:20amalloytechnomancy: heroku just...sent me an activation link in an email, except it's not actually an http link? i have to copy/paste this to my browser, really?
14:20cemerickRaynes: What is the canonical clojail repo? Raynes/clojail points to the one under cogniitivedissonance, but flatland/clojail has the latest commits…
14:20amalloycemerick: flatland
14:20technomancyamalloy: not our fault your MUA sucks. =)
14:20amalloytechnomancy: no! the other links in the email are real links!
14:21technomancyoh; we send out HTML email by default? =(
14:21amalloyyes
14:21technomancydang it
14:21amalloyand all but that one link are wrapped in <a>
14:21amalloymy MUA does suck though
14:21amalloyin your defense
14:22technomancyif you forward me the email I'll raise it on the DX team
14:22noncomhello, friends! a newb question follows: i want to use eclipse counterclockwise to code with clojure. however the ccw eclipse plugin is still about clojure 1.2. it is known to me that much has changed in version 1.3. so do i lose much if i use the ccw plugin and clojure 1.2 with it?
14:22pjstadig(percentile "pjstadig") ; => 49
14:22technomancywe have a few guys who are paid to obsess about that kind of stuff
14:22pjstadigis that good or bad?
14:23technomancypjstadig: neither?
14:23technomancyit's median
14:23pjstadigi'm average?
14:23pjstadigon average people think they're above average
14:24cemerickamalloy: thanks; might want to start dropping repos or something ;-) /cc Raynes
14:25technomancycemerick: but that won't help Clojure win on the github languages high-score board
14:25cemerickamalloy: I actually use & [x] all the time :-P
14:25amalloycemerick: so do i. like i said it's easy, but it's evil :P
14:25cemericktechnomancy: you're right, I'm optimizing for the wrong things again
14:25noncomguys, am i losing much if i program with clojure 1.2 instead of 1.3?
14:27amalloynoncom: seancorfield sheds a single tear every time someone uses 1.2. but your tear will be a drop in the bucket, so...
14:27pjstadignoncom: if you need much of what is in 1.3, then yes. if not, then no
14:28technomancynoncom: only if you want insane speed out of numeric ops
14:29TimMcnoncom: If you don't have a compelling reason to use 1.2, go with 1.3 -- especially if you are writing something other people might want to use.
14:30dnolennoncom: I would not program in 1.2 unless there's some library that hasn't been ported that you need.
14:31duck1123even if you're going 1.2, still stay away from monolithic contrib
14:32noncomyeah, i have made a little research and going with 1.2 seemed like evil after that. to bad that the clojure plugin for my favorite ide is not updated (((
14:33noncomyou confirm what it seemed.
14:35dnolennoncom: it seems like ccw might work w/ 1.3 from the notes on the project page - have you tried it?
14:36cemerickccw works with any version Clojure project, 1.1 - 1.4.0-SNAPSHOT.
14:37cemerickI think it still defaults projects to 1.2, but there's no reason to stay with that default if you care otherwise.
14:37cemerickccw itself is implemented using Clojure 1.2, but that doesn't affect what version of Clojure *you* can use.
14:38cemericknoncom: ^^
14:39noncomwow, i have not tried putting 1.3 inside, the directions are too vague and i am too incompetent to dig in eclipse internals
14:41cemerickeclipse internals?
14:41cemericknoncom: how did you create your project?
14:41Raynescemerick: What are you using clojail for?
14:41cemerickRaynes: Nothing, just wanted the link correct for the book.
14:42RaynesOkay, why are you linking to it from your book then? :P
14:42noncomcemerick: i use the File->New->Other->Clojure->Clojure Project wizard.
14:42TimMcRaynes: Every book should link to Clojail.
14:43cemerickRaynes: A footnote talking about how network REPLs have not authentication or authorization controls.
14:43cemericks/not/no
14:44Raynescemerick: Hot.
14:44cemericknoncom: OK, so ccw added Clojure 1.2 jars to your project's build path.
14:45cemerickYou just need to get Clojure 1.3, and replace the 1.2 references with ones to the 1.3 jar.
14:46RaynesWhoa.
14:46RaynesI think it just set in that clojail is going to be linked in a book.
14:46noncomcemerick: wow, i did not think of that because of them telling about problems with nREPL whatever it is
14:46TimMcRaynes: Don't move that repo!
14:46RaynesNever.
14:46cemericknoncom: What problems with nREPL?
14:49noncomcemerick: facepalm to me, i admit i was not very descreet
14:50cemerickno worries — give things a roll upgrading to Clojure 1.3, and if there are any problems, either ping me here, or send a msg to the ccw ML.
14:50noncomi have just checked the installed software section and it says nREPL 0.0.5
14:50cemerickYup, that's ok. :-)
14:54cemerickRaynes: even worse are old repos linked in search engines
14:54cemerick:-P
14:54cemerickddg points to Raynes/clojail
14:54cemerickFWIW
14:54Raynescemerick: I just need to add links.
14:54RaynesThe cogdis repo can go, I think.
14:55cemerickI'd add a final commit that rm's everything but a single link in a README.
14:55cemerickmakes it hard to miss, i.e. https://github.com/cemerick/nREPL
14:57tsdhamalloy: You were right. It wasn't that hard to teach my macro working with overloaded argument lists. ;-)
14:58noncomcemerick: thank you and other people for helping! i guess it is that stereotype, that i am coming from the oop world, that weights on me, paralyzing in fear when standing in front of anything that mentions 'functional', rendering me faint and helpless. and many other programmers too. however, i feel functional programming as something very attractive and incresingly significant in today and in future. thank good people for sharing!
15:00cemericknoncom: I take it you're 1.3-ready now. :-)
15:00cemerickSpread the good word. ;-)
15:06amalloyhooray for heroku: http://electric-sunrise-7335.herokuapp.com/technomancy
15:06technomancyamalloy: oh man... I was literally going to do that right after lunch.
15:07technomancyhilarious
15:07amalloy<technomancy> amalloy: awesome; let me know how it goes
15:07amalloy<amalloy, secretly> ;; challenge accepted, bro
15:11raekwhat does it measure?
15:11amalloyraek: http://p.hagelb.org/github-userid-percentile.html - it was my first heroku app so i just got up something barebones
15:12cemerickgreat, more metrics for me to suck at
15:12amalloycemerick: i bet you're in better shape than i am
15:13TimMc76 for me
15:14raekso it's like a (non-linear) mesure of how early you joined github?
15:14TimMcraek: what percent of github employees have an account older than yours
15:14amalloyTimMc: i've got an embarrassing 87%
15:15amalloyraek: fwiw, just updated the app with a description
15:15raek81% for me...
15:16amalloyc'mon, there's gotta be someone newer than me
15:17technomancyamalloy: needs some styling and a splash page; collab me and I'll see about adding that after noms.
15:17amalloytechnomancy: yeah, i hate webdev. https://github.com/amalloy/github-percentile is all yours if you want it to be pretty
15:18amalloyif you want collab rights of some kind on heroku, i don't know what that means
15:19technomancy$ heroku sharing:add phil.hagelberg@heroku.com
15:19technomancybut I can just go through pull requests
15:20technomancythat's like the one common thing I haven't added to lein-heroku yet
15:21tmciver92. Ha! Beat that!
15:21Raynesamalloy: org/members will probably only return members up to 30.
15:21noncomcemerick: yeah, i will!))) tomorrow i guess, it is too late here. i will see sweet dreams about clojure and other lisps! and prolog.
15:22noncomhaha)
15:22RaynesI haven't added lazy seqifying yet.
15:23technomancyRaynes: actually gives me 55, which I think is right
15:24mindbenderIt's just so problematic getting swank-clojure or ritz to work with emacs.. now I'm getting the famous (cl-assertion-failed (keywordp module)).. I can't remember how I resolved it the last time. Can someone please tell me how to get rid of all slime on my emacs and start a clean slate
15:24mindbenderor better how to control this multitudinal versions of slime
15:31mindbendersorry here is a backtrace https://gist.github.com/1482742
15:33cemerickmindbender: AFAIK, you're mostly hosed if you're trying to run multiple revs of SLIME and/or maintain SLIME for CL and Clojure simultaneously.
15:34mindbendercemerick: yes I think that's my problem actually at times you need to work with a different version of slime for different projects and in the end they conflict
15:34technomancycemerick: is correct.
15:35mindbenderI am still at odds how to control this many slime
15:35technomancyit's possible to do if you only use M-x clojure-jack-in for clojure and don't load the CL-compatible version into an instance until you need it, but clojure and CL in the same emacs process isn't going to work.
15:36amalloy(edit: i learned how to pick less-crappy domain names for heroku, so if anyone wants to play with the github-percentile stuff it's now at http://github-percentile.herokuapp.com/YOURGITHUBUSERNAME)
15:59technomancycools
15:59semperosI've written a custom appender for log4j in Clojure (based on http://corfield.org/blog/post.cfm/clojure-and-log4j), let's say in a file appender.clj
16:00semperosI have a Swing GUI, whose code lives in a file gui.clj
16:00semperosI want my appender to append logs to a JTextArea, but I'm having trouble figuring out how to "set" my target JTextArea in my appender, so it's .append method prints to the component
16:01semperosany thoughts?
16:05thorwilhi! i need a list of booleans, one for each item in ks, on whether it matches one in feeds. what i have now seems kinda complicated: (map #(-> (some #{%} feeds) nil? not) ks)
16:08TimMcRaynes: o you know if there is an existing utility for lazy-seqifying chunked lists?
16:08RaynesTimMc: No idea.
16:08semperosnm, was just complicated my namespace dependencies...
16:08TimMcRaynes: If not, that would be a nice utility to extract from your GitHub API seqifier.
16:08TimMcok
16:10amalloyTimMc: i know alex baranosky's fork of useful has that
16:10amalloyi don't remember if i added it to useful as well
16:11amalloyTimMc: https://github.com/flatland/useful/blob/develop/src/useful/seq.clj#L176
16:16_uliseswhat's the correct way of doing thread-local bindings? I've tried both with binding and with-redefs (http://pastebin.com/TWTk9Yr9) but no joy. I'm using clojure 1.3.
16:16Bronsa_ulises: you have to define it first
16:17Bronsa(def ^:dynamic *self*)
16:17_ulisesBronsa: yes, sorry, *self* was defined exactly like that
16:17_ulisesforgot to include it
16:19_ulisesBronsa: http://pastebin.com/WFVUqY54 same thing (*self* was declared with ^{:dynamic true} before)
16:19raek_ulises: btw, with-redefs is not thread-local
16:19_ulisesoh
16:20raek'binding' introduces a thread-local mutable variant of a var.
16:20raekin your case you start another thread, so it will not see that binding
16:20_ulisesindeed
16:21_ulisesso I'm wondering how I can make that thread see the binding
16:21_ulisesperhaps I just don't understand anything at all
16:21_ulisesand should just become a shoemaker or something
16:21raekwhat do you want to use this for?
16:21_ulises(not that shoemaking is any easier)
16:22_ulisesI'm writing a small actors lib. to get acquainted with agents
16:22_ulisesand I'd like to spawn actors and have their name bound to *self*
16:22raekalright, similarly to *agent* in clojure?
16:23_uliseseep
16:23_ulisesis *agent* bound to the current agent?
16:23raekyup
16:23_ulisescurrent = the one running
16:23_uliseswell, that does it for me then
16:24raekin case you wanted to implement something like that yourself, you could just move the binding call to within the thread body
16:24_ulisesyes, but in the real case I want to define actors by providing a fun and nothing else
16:24_ulisesso I don't want to expose that
16:24raek(.start (Thread. #(binding [*self* ...] ...code here...)))
16:25raekthe var can be both :dynamic and :private
16:25_ulisesalternatively I could define the interface to the fun to be something like [name ...] and have the fun return the handler (another fun) and then just use a (let...)
16:25_ulises:private?
16:26TimMcamalloy_: I don't know if that's quite what's needed.
16:26raeka var marked as private will not be pulled into another person's namespace when that person uses 'use'
16:27_ulisesoh, cool
16:27raekand you will get an error if you try to access it from outside the namespace it was defined in
16:27_ulisesah, that's very good, thanks!
16:27raek(it can be circumvented, however)
16:27Bronsa@#'trick
16:28raek(defn- foo ...) = (defn ^{:private true} foo ...) = (defn ^:private foo ...)
16:28_ulisesnice
16:28_ulisesI think I'll stop trying to bind *self* because it's just not working
16:28_ulises:(
16:29raek(defn spawn [f] (let [pid (make-new-pid)] (.start (Thread. #(binding [*self* pid] (f))))))
16:29raek_ulises: you should be able to do something like that
16:30_uliseshum, does make sense
16:30_uliseswant to see the rest of the code? I think I'm messing up in the way I init the agents
16:30raek_ulises: oh, also revaluate all the code that uses *self* after making it dynamic
16:30_uliseswhat do you mean "revaluate"? recompile?
16:30raekyes
16:30_ulisesah, yes, always do that
16:31_ulisesjust to be sure
16:31_ulisesaaah
16:31_ulisesright, I know where I'm messing up
16:31_ulises(I think)
16:31raekwhat was it?
16:32_ulisesone sec. making a small example
16:33_ulisesno, that wasn't it :/
16:34_ulisesno idea what's going on now
16:34_ulises:D
16:34raekwhat does the code look like?
16:34_uliseslet me paste it
16:36_ulisesraek: http://pastebin.com/QTYzMr1C
16:36_ulisesI can walk you through it if it's too messy :/
16:36_ulisesignore the macros handle and handle-named, I'm not using them
16:37raekare you sure *actors* should be dynamic?
16:37_ulisesno, that one shouldn't
16:37_ulisesmy bad
16:38raekit doesn't make much sense to have a thread-local value for the atom of the map of all actors
16:39_ulisesindeed not
16:39Borkdudewhat mode in emacs to show long sentences with an arrow on the side continuing on the next line?
16:41raek_ulises: in spawn, why do you send to the agent and then wait for it? couldn't you just initialize the agent with the desired value instead of nil?
16:41_ulisesI could I suppose
16:41technomancydoes C-c C-d C-p work from slime for anyone else?
16:42raekhrm, maybe you do want the "initial function" to be run inside the agent
16:43_ulisesideally initting an actor should take that long?
16:43_ulisestechnomancy: what is that supposed to do? it just asked me "Package:" in the minibuffer
16:43raek_ulises: actors and agents are not exactly the same thing. an agent is more like an atom, but where the state is updated with the function later on some other thread
16:43technomancy_ulises: if you give it a namespace, does it give an error?
16:43_ulisesraek: yes, I'm just using agents as a way of spawning threads, etc.
16:44raek_ulises: then you can just use 'future' or 'future-call'
16:44_ulisestechnomancy: yup, plenty errors
16:44technomancy_ulises: ok, same here
16:44raekif you don't need the managed state and the function queue
16:44y3dianyone know what the C irc channel is?
16:44_ulisestechnomancy: mind you, perhaps my setup is not like yours?
16:45_ulisesraek: hum, not sure how that would work? with futures I mean
16:45technomancy_ulises: if you use M-x clojure-jack-in then there's not much variation between individual user setups these days.
16:45technomancythough somehow cemerick was able to get it to work
16:45_ulisestechnomancy: but I don't, I'm still with clojure-mode and slime-connect
16:45technomancy_ulises: oh, interesting. good to know.
16:45clojurebotexcusez-moi
16:45technomancyapparently cemerick's Emacs prowess is formidable.
16:45_ulisesraek: as in, with futures, once you've calculated the value, it's cached?
16:46raek_ulises: to be more precise: all 'future' does is to spawn a thread and run som code in it. it sounded like that was all you needed from agents
16:46cemericktechnomancy: what are we talking about?
16:46TimMcBorkdude: That's what my Emacs does already.
16:46Raynescemerick: He just said your prowess is formidable. Don't look into it.
16:46_ulisesraek: yes, but I want to have the option of re-running the computation on a new message
16:46technomancycemerick: I can't get the slime-apropos-package command working; I had assumed it was only implemented in the CL swank server, but apparently you got it working. =)
16:46_ulisesraek: so, the pong actor should react to :ping messages forever
16:46BorkdudeTimMc: normally my emacs does that as well, but now the line just runs from the screen
16:46raek_ulises: yes, you can wait for the return value to be computed by using deref. once it is done, deref will always return the same thing
16:47_ulisesraek: yeah, so a future might not be what I want, since messages may contain payloads and the response of the actor may depend on the payload
16:47cemerickRaynes: Part of my persona is that I suck at emacs though.
16:47raek_ulises: 'future' does not give you a message queue and a loop, which I think you need
16:47TimMcBorkdude: Check your modes, anything weird?
16:47_ulisesraek: indeed
16:47TimMc<- not actually an Emacs expert
16:48raek_ulises: but with actors you send data, not functions, so agents might not be a perfect fit after all
16:49_ulisesraek: indeed, again, this is just an excuse to use agents and do something with them
16:49technomancycemerick: you wouldn't happen to remember which versions of everything you were using when you got it working, would you?
16:49_ulisesraek: right now the handler in an agent handles the message and returns itself
16:49_ulisesraek: so the state of the agent is the handler itself
16:50raekso instead of making a tail recursive call to "the next handler", you return it
16:50technomancycemerick: never mind; I see that it works in Emacs 23 but not 24.
16:50_ulisesraek: indeed
16:50_ulisesraek: that's what receive does
16:50cemericktechnomancy: oh, you're referring to the stuff in the chapter?
16:50technomancycemerick: right
16:51cemerick90% of the Emacs content there is from Brian. :-P
16:51technomancyaha
16:51technomancycemerick: don't worry about it; I'll explain everything in my email
16:51cemerickyes, good :-)
16:52cemerickso it's expected that that doesn't work?
16:53cemerickin v24, that is?
16:53technomancyFSVO expected
16:53technomancyas of five minutes ago, it is now a known bug. =)
16:56_ulisesraek: any more thoughts? is it insane what I'm doing?
16:56cemericktechnomancy: will it be fixed within 6 weeks? :-P
16:57raek_ulises: no, I think it makes sense :-)
16:57technomancycemerick: with any luck it'll be fixed before the release of Emacs 24
16:57drewrwith clojurescript, are you supposed to be able to pass args to *main-cli-fn*?
16:57_ulisesraek: ah, cool, thanks :)
16:57drewrall I get is nil
16:57technomancybut probably worth omitting it from the book to be on the safe side
16:57_ulisesI'll see if I can just carry on with *agent* and not worry about *self*
16:57raekI think it would be good to hide the fact that agents are used in the implementation
16:58_ulisesthose where my thoughts
16:58_ulisesbut I just cannot make the whole binding *self* thing to work
16:58_ulises:/
16:58cemericktechnomancy: exactly why I was asking :-)
16:59cemerickInteresting, conjure has 187 (!) watchers.
16:59cemerickI had no idea it had so much interest.
17:00brehautthats the rails like right?
17:00raek_ulises: you need to call binding in every funtion you send to an agent
17:00cemerickbrehaut: yeah, you mentioned it in your 'brief overview'
17:00_ulisesugh
17:01brehautcemerick: hah i did too
17:01raek_ulises: the effects of 'binding' happens completely at runtime and only applies to the expression within the (binding [] ...) form
17:01_uliseshum, ok, so I'll have to hide that in the receive fn or something along those lines
17:02_ulisesand somehow pass the name during spawn
17:02brehautcemerick: http://news.ycombinator.com/item?id=822366 lol
17:02_ulisesideally, I should be able to bind *self* to the actual agent instead of to the name of the actor
17:02_ulisesbut oh well
17:03raekso if you want to run some function f in agent a with *self* bound to pid, you need to do (let [a ..., f ..., pid ...] (send a (fn [state] (binding [*self* pid] (f state)))))
17:03cemerickbrehaut: omg the metaprogramming
17:04fryguyalright, i'm going to ask a silly question. I'm going to do some stuff with clojure, and I'm a vim user. Am I missing out on a lot by just using slimv and related plugins as opposed to slime/emacs?
17:04_ulisesraek: yes, so the binding has to come inside the receive fn which creates the actor's handler
17:04cemerickwhat's that site that tracks usage of various clojure libraries?
17:05brehautclojuresphere?
17:05brehauthttp://news.ycombinator.com/item?id=822366
17:05brehautsamnit
17:05brehauthttp://clojuresphere.herokuapp.com/
17:05TimMcfryguy: Does that setup give you structural editing of s-expressions?
17:06fryguyTimMc: i'm not sure. I'm still doing some reading and researching before I dive in.
17:06cemerickbrehaut: thanks
17:06cemerickI'm going to /quit, return with a new nick, and ask all the noob questions I've had on my mind. :-P
17:06brehautlol
17:07cemerickOK, so conjure has 2 usages according to clojuresphere. That lines up more with my expectations.
17:07Raynesclojuresphere is weird.
17:08brehautcemerick: my educated (?) guess at why its got so many watchers is that its pretty old (2009?) and is a rails-like which is many peoples default for 'i want web programming'
17:08RaynesI don't like it anymore. I wanted to make it use tentacles instead of clj-github, but it uses some strange v2-only API call that doesn't exist in the v3 API.
17:08cemerickI usually stalls out on me after a couple of queries.
17:08_ulisesraek: I reverted the change you suggested to spawn, I remember now why I had it; turns out that if I init the agent straight to (apply f args) then the ping actor tries to send a ping to the pong agent and that is not done in the context of an agent, so *agent* is nil
17:08_ulises(that'd be my explanation)
17:08RaynesI don't like websites that don't use the latest versions of my libraries and such.
17:09cemerickbrehaut: last commit was this past september *shrug*
17:09brehautcemerick: sorry, i didnt mean its out of date, just that its existed for a long while
17:09cemerickah, right
17:10cemerickRaynes: You are a fickle beast.
17:10cemerick:-D
17:10Raynes:>
17:10brehautcemerick: even some of my crappy projects on github have watchers, i think just because they have existed for a long time ;)
17:10Raynesbrehaut: Stop looking at amalloy_'s repository list.
17:10brehaut?
17:11brehautRaynes: ^
17:11RaynesFailed attempt at humor, I think. I thought you said "even some of the crappy" instead of "my crappy", which would have made my comment more amusing than it actually was.
17:11brehautaha
17:12brehautcemerick: red bull can make you deaf‽
17:12cemerickThat shit'll mess you up.
17:12brehautyeah i was aware of that at least
17:12brehauti thought it was just heart trouble
17:12brehaut'just'
17:13TimMcfryguy: Emacs' paredit-mode allows you to do things like turn (let [x 5] (when a x)) into (when a (let [x 5] x)) in a single command -- that's an extreme example of structural editing.
17:14cemerickbrehaut: it's damn effective if you're planning on not sleeping tho.
17:14brehautcemerick: lol. a big pot of chemex coffee is my sleep deprevation aid of choice
17:14cemerickchemex?
17:15cemerickI gag @ coffee.
17:15brehautits a pour over filter cofffee pot
17:15RaynesI've been drinking sugar free redbull and monster much more often than I'd like.
17:15TimMcI go with 87% dark chocolate.
17:15fryguyTimMc: i'm not so sure i'm concerned about pure code editing. It's more the other niceties that I feel like I might be missing out on. I guess I'm in a situation where I should just try the vim stuff and see if I like it.
17:15TimMcand Daft Punk
17:15technomancybrehaut: in Indonesia Red Bull has nicotine in it
17:15brehauttechnomancy: fark
17:15fryguyalso, what? red bull can make you deaf? source?
17:16fryguyi drink a lot of redbull
17:16RaynesSurely he was kidding.
17:16technomancymmm... chemex
17:16TimMcfryguy: If you're way more familiar with vim, go for it.
17:16technomancyfryguy: whatever you do don't let screwing with your editor get in the way of learning clojure
17:17RaynesWhat he said.
17:17technomancyif you want to experiment once you're comfy with the basics that's fine
17:17Borkdudeah: "toggle-truncate-lines" is what I wanted
17:17_ulisesraek: I don't think the binding to *self* will work unless the agent has as state a closure over its name
17:17fryguyTimMc: i'm WAY more familiar with vim than emacs. technomancy, i'm agree with what you say. I was more curious as to whether SLIME was *that* much better than alternatives that it is worth considering
17:17TimMcfryguy: Yeah, technomancy has a good point -- learn one thing at a time. :-/
17:17Raynesfryguy: I am an avid Emacs user, but I did an editor experiment recently. I spent 2 weeks with Vim exclusively. Things went just fine. I like Emacs more, but if you're already familiar with Vim, there is no reason to not use it unless you just want to learn Emacs.
17:18brehauttechnomancy: i got to try some panama geisha coffee through a chemex at my local café recently. it was amazing
17:18cemerickfryguy: what, I'm not authoritative enough for you? ;-) https://twitter.com/#!/cemerick/statuses/147438804800782336
17:18TimMcI still don't use SLIME.
17:18fryguyRaynes: perfect. that's just the answer I was looking for
17:18technomancyfryguy: I'd actually rate paredit as equal or superior to slime in terms of productivity boost.
17:18RaynesI repeat, as an avid Emacs user, I am also fond of Vim after using it for a while, though I like it less than Emacs (because I'm Raynes).
17:18RaynesThere is also a paredit for Vim. The keybindings are pretty convoluted, but it is usable (and of course, customizable).
17:18technomancyespecially when measured by win:setup-pain ratio
17:19technomancyfryguy: if anything makes you switch to Emacs, it should be vimscript, not Clojure. =)
17:19fryguyparedit and structural editing stuff sounds really nice, but I think my overall existing speed with vim, plus surround.vim, plus finding suitable plugins to do things _like_ paredit means I'm more interested in "the other things", like connecting to a running session, debugging, etc.
17:20BorkdudeEmacs vs Vi learning curve: http://bc.tech.coop/blog/060302.html
17:20Raynesfryguy: Like I said, there is a paredit for Vim as well.
17:20fryguyRaynes: right
17:20RaynesNot as complete as the Emacs version, I wouldn't think, but usable and helpful.
17:20raek_ulises: sure, you can either store it in the state or in the closure of the actual function that is applied inside the agent (which, if I understand you correctly, you build with receive)
17:21_ulisesraek: indeed. I also thought that perhaps the agent should have a state something like {:name name :handler fn}
17:21technomancybrehaut: the places around here that have chemex are great because the baristas can tell when you're interested and go on and on about the process, the specific characteristics of the bean, etc.
17:21brehauttechnomancy: thats excellent :)
17:21brehauttechnomancy: id love to work at my local roastery/café but sadly they have no public Wifi
17:22_ulisesraek: but right now if the handler does something like (! actor msg *agent*) and the handler is along the lines of (receive {:foo (fn[sender] (! sender :gotcha))}) then it's all good
17:22technomancybrehaut: no 3G?
17:22technomancyoh, kiwi telcos are awful with their caps and such, right?
17:22brehauttechnomancy: in new zealand? i'd be selling my kidneys before the week was out
17:22technomancyouch =(
17:23brehautyup :(
17:23brehauttechnomancy: i can get 50megs a month for $6 bucks, and/or pay through the nose
17:23brehautwhat in the hell kind of cap is 50 megs?
17:24brehauti might as well train up a saint bernard to operate a usb disk and send all my packets as batch jobs
17:24technomancythat's actually interesting since nobody in the US is interested in taking your money unless it's USD30+/mo
17:24jodarothe "no porn on your phone" cap
17:24technomancyI wonder how many IRC channels you could follow on 50 MB/mo
17:24TimMcPfft, not this one. :-P
17:24_ulisesand I thought that 3G in the UK was bad. Right now I have 15GB for £15 (approx. 20-22 USD)
17:25jodaroTimMc: beat me to it
17:25technomancyRaynes: how big is lazybot's log for the last month uncompressed?
17:25Raynestechnomancy: For what channel?
17:25technomancyI was thinking this one
17:26brehauttheres just not enough competition in NZ for cellphones to not be insane
17:26accelis there a clojure smtp server?
17:26accelI want to roll my own email server that does some weird things
17:26accelfor handling spam
17:26jodarothe java mail stuff might have that
17:26accelin particular; implementign somethign like hashcash in clojure
17:27Raynestechnomancy: http://www.raynes.me/logs/irc.freenode.net/clojure/ Break out the calculator.
17:27technomancyRaynes: cool; thanks
17:27RaynesI'd actually tell you, but I suck at bash.
17:28technomancydude
17:28brehautbaha the entire history (minus a couple of bot outages) of #burningwheel is 5.4 meg
17:28technomancyrectangle-kill
17:28jodaroA: No, the JavaMail API package does not include any mail servers.
17:28jodaroor not
17:28technomancy1.7 MB
17:28technomancyI imagine the overhead of IRC might add a bit to that, but the ballpark number is good
17:28jodaroaccel: http://code.google.com/p/subethasmtp/
17:29technomancyanyway, I'd pay $6/mo for 3G on my phone if it could co-exist with a prepaid voice plan.
17:29technomancyeven at 50MB
17:29brehauttechnomancy: whats a prepaid voice plan?
17:29hiredmanmy log #clojure is 139mb
17:29hiredmanmy of #clojure
17:29hiredmandamn it
17:30technomancybrehaut: I dump USD100 onto my SIM; each call is billed at $0.05/min, and then six months later I top it off again.
17:30brehauttechnomancy: wow. $0.05/min? how much are SMS?
17:30technomancysame, I think
17:30TimMcBetter write them quickly, then. :-P
17:30wastrelhttp://24.media.tumblr.com/tumblr_lw5xr6GefR1qb15g0o1_500.jpg
17:30technomancyhehe
17:31technomancybrehaut: can't tell; is that high or low for you?
17:31brehauttechnomancy: exceedingly low
17:32brehauttechnomancy: i think my calls are either $1.00 or $1.50 a minute
17:32technomancyholy smokes
17:32brehauttechnomancy: SMS is 20c a pop
17:32TimMctechnomancy: What carrier do you use?
17:32technomancybefore that I was using SIP on my 3G data plan, which was $0.015
17:32technomancyTimMc: t-mobile
17:33technomancyit may be 10c for out going and 5c for incoming, but I don't really make any outgoing calls.
17:33technomancyapart from voip anyway
17:34Vinzenthas somebody used clojure with oracle?
17:34TimMcAlmost certainly.
17:35Vinzenti mean, as a scripting language, for writing stored procedures
17:36Raynes~anybody
17:36clojurebotNo entiendo
17:36RaynesOh my God.
17:36technomancyweavejester: it appears "I was thinking about factoring a lot of $X out into a small library" is your catchphrase.
17:36technomancy~anyone
17:36clojurebotJust 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:36RaynesThat's the one thing that I use with clojurebot.
17:36RaynesOh.
17:36RaynesDuh.
17:36technomancyheh
17:36weavejesterweavejester: Hahaha
17:36weavejesterUh
17:36weavejestertechnomancy: Hahaha
17:36weavejesterNow I'm laughing at myself for some reason
17:36Raynesweavejester: Talking to yourself again?
17:37weavejesterRaynes: Apparently so!
17:37technomancy"Oh man... I think I need to factor this out into a separate library." / "Sounds like a job for ... weavejester!"
17:37technomancyjust need a costume and/or theme song. =)
17:37jodaroor medication
17:37technomancyhahahah
17:37technomancyweavejester: did you end up using lein-sub for ring?
17:38weavejesterMy only problem now is that "ring-server" sounds like "ring-serve"... I think I need to rename "ring-serve"
17:38weavejestertechnomancy: Yep
17:38technomancyweavejester: how's that working out for you?
17:38weavejestertechnomancy: Testing is easier, but I don't think it handles interdependent submodules very well when pushing.
17:39technomancyweavejester: pushing to clojars?
17:39weavejestertechnomancy: Yeah. It seems to read all the project files first, and then execute the subtasks
17:39weavejesterSo if foo.A depends on foo.B
17:39weavejesterThen even if you specify the submodules as [foo.B foo.A]
17:39weavejesterIt fails to push, because it tries to resolve both project.clj files before pushing.
17:40technomancytries to resolve them remotely?
17:40technomancymaybe a round of install across the board before pushing, or would that have the same effect?
17:40weavejesterYeah, so... ring-servlet depends on ring-core for example.
17:40VinzentI know, but I don't have "a question". I just winder if someone has any experience in making such thing work and can point me to a relevant article or just say is that ok or not
17:41weavejesterSo I update all the versions to 1.0.0, but no matter how I arrange it, it doesn't seem to work.
17:41weavejesterring-servlet complains that ring-core 1.0.0 doesn't exist, even if ring-core 1.0.0 is scheduled to be pushed first.
17:41technomancytricky
17:42technomancyseems like you'd almost want to perform the install task immediately after reading projects
17:43weavejesterYeah... it seems from the source code that it does do that...
17:44weavejesterBut maybe the laziness of map and reduce are playing tricks here.
17:44weavejesterSince reduce has an slightly unintuitive evaluation order
17:45technomancyah, yeah could be a bug
17:45technomancyeasy bug to overlook since getting it right once means that you won't notice future breakage
17:46weavejesterLet me double-check that I didn't just do something wrong
17:46weavejesterWell... I'll do it later. No hurry.
17:46RaynesOh man.
17:46Raynesclojure.template is awesome.
17:47weavejesterAnyone have any good suggestions for the name of a library designed to start Ring servers in a REPL like SLIME?
17:47weavejesterclojure.template?
17:47clojurebotclojurebot is not a benchmarking platform
17:47Rayneshttp://clojure.github.com/clojure/clojure.template-api.html
17:48weavejesterOh, I see
17:48technomancyring-toss
17:48weavejesterHuh...
17:48weavejesterThat's a good suggestion :)
17:48Rayneswedding-ring
17:49weavejesterI like ring-toss. It's kinda like throwing up a quick ring server
17:49weavejesterAlthough I don't know what I'd call the function that runs the server :)
17:49Raynestoss
17:49weavejesterCurrently (serve handler)
17:50Raynes(toss handler)
17:50weavejesterWell, I'm British, so I'd rather avoid the term "toss" :)
17:51RaynesMakes sense.
17:51TimMcheh
17:51RaynesYou guys say crap like "He was a right tosser!"
17:51weavejesterYeah
17:51technomancyhah; nice
17:52weavejesterI actually like the (serve blah) syntax...
17:52weavejesterBut ring.util.server seems the best name for, well, running a Ring server.
17:52samaaronRaynes: mind your language ;-)
17:52weavejesterMaybe (run blah) ...
17:52weavejesterring-run...
17:53Raynes(not -derogatory
17:53Raynes(not-derogatory-toss blah)
17:53weavejesterHaha
17:53samaaronring-toss just sounds wrong on soooo many levels
17:54TimMcHow many levels?
17:54weavejesterI think I might go with ring-run
17:54technomancyring-hurl? no wait...
17:54weavejester(hurl bad-sushi)
17:54TimMcThis reminds me of the condition system naming stuff.
17:54weavejesterWho was it who said...
17:54Raynessamaaron: Go play with overtone.
17:54weavejester"There are only 2 hard problems in computer science: cache expiration and naming things"
17:55samaaronRaynes: I have been. I'm about to go to bed now
17:55samaaronweavejester: that's not quite right
17:55samaaron"There are only 2 hard problems in computer science: cache expiration, naming things and off-by-one errors"
17:56weavejestersamaaron: I was quoting... someone... I think :)
17:56samaaronhehehe
17:56samaaronquoting someone off the internet hey?
17:56technomancytwo hard problems: naming thiconcurrencyngs and
17:56samaaronhahahaha
17:57weavejesterOh
17:57weavejesterhttp://martinfowler.com/bliki/TwoHardThings.html
17:57weavejesterLooks like the off-by-one is an official extension :)
17:58weavejesterI still haven't figured out what to call my defmigration library I'm going to base on ragtime...
17:58samaaronnight night
17:58weavejesterI guess I should write the ragtime leiningen plugin first
17:58weavejesternight
18:08cemerickweavejester: Is there an official way to produce a clojure.xml stuffs from hiccup stuffs?
18:08cemerickIf not, would you be interested in a patch containing one?
18:08weavejestercemerick: I have a branch for it... let me try and find it...
18:09weavejesterhttps://github.com/weavejester/hiccup/tree/refactor
18:09weavejesterBut it's not finished.
18:09cemerickI wrote one in anger earlier this week because I wanted to mess about with hiccup in an app that uses enlive everywhere else.
18:09clojurebothiccup is both https://github.com/weavejester/hiccup and http://tinyurl.com/426og7n
18:10weavejestercemerick: could I take a look at your code?
18:12weavejesterI've been thinking about combining enlive and hiccup
18:12cemerickweavejester: https://gist.github.com/2a64e0067c960ea86354
18:12cemerickI've not cared enough about the problems to bother fixing them yet.
18:13weavejesterI have a version here that should work: https://github.com/weavejester/hiccup/blob/refactor/src/hiccup/compiler.clj
18:13weavejesterThat compiles Hiccup code directly into clojure.xml
18:13cemerickYeah, I was looking
18:13weavejesterI haven't started on the renderer that will convert that into a string
18:14weavejesterI was thinking of releasing the current Hiccup as Hiccup 1.0.0, and then using the refactor as 2.0.0
18:14cemerickThat seems very sane.
18:14weavejesterNot sure if 2.0 will be as fast as 1.0, but it should be more modular
18:14cemerickHave you ever benchmarked hiccup vs. enlive?
18:14weavejesterAnd you could plug in rendering engines that create indented HTML
18:15cemerickReal men use XSLT to pretty-print XML and HTML. :-P
18:15TimMcBy the way, I forked enlive to add a switch for outputting HTML-style self-closing tags like <link>.
18:15weavejestercemerick: I think I did a while ago. It really depends on how optimized the Hiccup code is. Hiccup can be very fast, because it compiles.
18:16weavejesterSo (html [:p {} x]) => (str "<p>" x "</p>")
18:16TimMchttps://github.com/timmc/enlive Gonna see if cgrand will take a pull request. :-)
18:17cemerickNow that I properly appreciate hiccup, what I really want is to be able to provide hiccup-style bits as input to e.g. enlive/content and such. That should be pretty easy.
18:18cemerickTimMc: Are those tags still self-closing in html5?
18:18TimMcYeah.
18:18weavejesterWell, the current Hiccup engine is geared up around creating strings, and it's a bit of a mess. Not very clear code.
18:18TimMcand the W3C validator gets angry at Enlive's default output.
18:18weavejesterThe refactor is a lot cleaner, but currently only renders to clojure.xml format.
18:19cemerickI recall Christophe saying that the big win for him in optimizing for enlive 1.0 was to never produce strings at all. I presume that's what you're aiming for with this new compilation?
18:20cemerickor, to never produce new strings, I should say
18:21cemerickhrm, yup, seems like it
18:23cemerickweavejester: amazingly, that little function I gisted is working well enough in the corner of my app that's using hiccup. Looking at your new compiler, I presume it's going to break any second now?
18:24weavejestercemerick: No idea... it's been a while since I looked at it. It might be that my refactor was 95% clean-up.
18:24brehautweavejester, cemerick: i think it would be fantastic if enlive and hiccup were better friends. doesnt seem like they need to be mutually exclusive
18:24weavejestercemerick: The current Hiccup code I'm not happy with...
18:25weavejesterbrehaut: My theory was that I could use enlive to insert components into pages
18:26weavejesterLike... Say you had a library that handled authentication and logins
18:26weavejesterYou could have some middleware that used enlive to insert a login box into your page.
18:27brehautweavejester: i agree
18:27weavejesterI kinda think that there isn't enough vertical separation in web-apps
18:28cemerickweavejester: That makes a lot of sense to me.
18:28gunslang
18:28weavejesterMVC is kinda separating out horizontal layers
18:28gunsoops
18:28weavejesterBut you can only go so far with that approach
18:28cemerickEnlive seems to be at its best in defining the broad structure of pages, and hiccup seems at its best populating them.
18:28weavejesterIf your web app size doubles, you can't add more layers
18:29weavejestercemerick: Yeah
18:29cemerickor, producing the content to populate them
18:29brehautweavejester: another middleware i would liek to get around to implementing is something akin to typogrify for django
18:29cemerickselectors are badass
18:29weavejesterI figure that Hiccup+Enlive is a good idea because originally I thought it was a terrible idea :)
18:29brehautlol
18:29weavejesterI thought the same about Ring until I tried it.
18:29weavejesterFunny as that sounds now.
18:30cemericksame here
18:30cemerickI've been down on hiccup for, oh, years. Now I'm absolutely convinced a union is ideal.
18:31weavejesterIt's on my todo list, but that's kinda long :)
18:31weavejesterIf anyone else wants to take a look at the refactor branch, it should be a lot clearer than the master branch of Hiccupe
18:32brehautweavejester: how far away do you think 1.0.0 of compojure is? im going to update my ring post for ring 1 and clj 1.3, and id like to cover compojure 1.0 at the same time
18:33weavejesterbrehaut: If no-one reports any issues, I'm going to turn 1.0.0-RC1 into 1.0.0 this weekend. Maybe tomorrow night.
18:33brehautweavejester: excellent :) i guess i better get editing
18:35cemerickbrehaut: ping me with that url when you're done :-)
18:35brehautweavejester: one other question; i havent looked at compojure in a while, but does it have reversable urls ?
18:35brehautcemerick: ok :)
18:37weavejesterbrehaut: Could you clarify what you mean?
18:37weavejesterLike, if you have "/foo/:id" and {:id 10}, can you turn it into "/foo/10"
18:37weavejesterOr are you saying can a handler tell which function is called by which route?
18:39jkkramerweavejester: is that hiccup refactoring faster, or just cleaner code?
18:39brehautweavejester: in django you can 'reverse' a url route; ie provide the name of the route, and the components to fill in the gaps and it gives you back a url
18:40brehautweavejester: yeah, like that example
18:40weavejesterjkkramer: Cleaner, and it compiles clojure.xml before strings
18:40jkkramerweavejester: btw, after having recently tried to grok the hiccup source, it does look much cleaner and easier to understand
18:41weavejesterbrehaut: No, but I've been meaning to add it. Noir has something like it, but its just a search-and-replace. I think I can make something a bit more robust...
18:42weavejesterI haven't hugely thought about it, though.
18:42brehautweavejester: ah sure. i know moustache doesnt have it (and i expect it would be pretty challenging to add)
18:42brehautbut i do miss it from django
18:42weavejesterYou'd have to name the route, though
18:42jkkramerweavejester: somewhat related, I discovered recently that hiccup was a significant bottleneck when generating a page with ~400KB of HTML. I replaced it with my own hack that does more aggressive macro-time string combination, trading off flexibility. it ended up being like 10x faster
18:43weavejesterSo... (def foo "/foo/:id") (GET foo [id] ...)
18:43brehautweavejester: i wonder if its actually suitable for meta data
18:43weavejesterjkkramer: Did you try optimizing the hiccup code for speed?
18:44weavejesterjkkramer: For instance, [:em {} x] is faster than [:em x], because in the latter case it doesn't know if x is a map or not.
18:44jkkramerweavejester: a little. i reached a point where i was replacing hiccup structures with literal strings and wrote my hack
18:45weavejesterjkkramer: In theory, removing the ambiguity from Hiccup structures should be the same as literal strings.
18:45weavejesterjkkramer: Did you use defhtml as well?
18:45jkkramerweavejester: i'll play with it some and see if i can come up with simple test cases to demonstrate the issues
18:45weavejesterjkkramer: Okay
18:46amalloyweavejester: oh, does defhtml expose some kind of metadata about what kind of thing it returns?
18:46jkkramerweavejester: no, just (html) and (html5)
18:46weavejesteramalloy: No, it's just a string.
18:47weavejesteramalloy: It's like (defn ~name ~args (html (do ~@body)))
18:47jkkramerif that's the case, i don't think it would help my situation much
18:48weavejesterjkkramer: So all your functions returned strings?
18:48amalloyfair enough. seemed like since you were talking about removing ambiguity, you might expose a special-defn that lets hiccup know what kind of thing is returned, thus removing embiguity
18:49jkkramerweavejester: insofar as (html …) was able to return strings -- loops and such notwithstanding. my hack tries hard to turn things into literal strings, rather than runtime-generated ones
18:49weavejesteramalloy: That might be possible, but isn't implemented.
18:50weavejesterjkkramer: Hiccup tries to convert things into literal strings when it can
18:50weavejesterjkkramer: So (html [:p "foo"]) is the same as "<p>foo</p>"
18:50weavejesterjkkramer: And (html [:p {} x]) is the same as (str "<p>" x "</p>")
18:50amalloyyeah, i remember being really impressed when i saw that in the source
18:51weavejesterThe source isn't that nice, though. Hence the refactor.
18:51jkkramerweavejester: i was having issues getting that to work fully. maybe it's due to me leaving out the attr maps
18:51amalloyi've been at lunch, didn't know a refactor was coming
18:51weavejesteramalloy: Well, eventually. When I get around to it :)
18:53weavejesterjkkramer: If the attr maps are left out, then: (html [:p x]) becomes (if (map? x) (str "<p " (render-attrs x) "></p>") (str "<p>" x "</p>"))
18:53jkkramerweavejester: k. i will experiment. thanks for the pointer
18:54amalloyit seems pretty unlikely that the map? test is any kind of bottleneck at all though, compared to the rest of what's going on
18:55amalloyand it's not like the uncertainty bubbles up: the result of (html [:p x]) is known to be a string
19:01technomancyamalloy: quick once-over of github-percentile before I deploy?
19:02RaynesTimMc: Who is it that is so gungho about getting rid of hiccup in trycljs?
19:03amalloysure, one sec while i pull, technomancy
19:03RaynesTimMc: "all that hiccup is going to give me hiccups". What could possible the benefit of using enlive to replace such a small hiccup code base? Feeling smug about having rewritten a portion of a project?
19:03Raynes:p
19:04amalloytechnomancy: a lot of exceptions about lacking favicon.ico, but otherwise looks great
19:04technomancyamalloy: oh good call
19:04amalloyactually, let me turn the "longer than X has" into a link to their github profile
19:05technomancyof course
19:05Raynesamalloy: I'll get 4clojure prepared to deploy to heroku when I update it to 1.3 and move it to noir.
19:05RaynesWhich I should start soon.
19:05RaynesLike possibly tonight soon.
19:07RaynesTimMc: Oh, it was you.
19:07RaynesTimMc: So yeah, I'd definitely like to hear the rationale for that that isn't "it's giving me hiccups".
19:07RaynesEnlive is giving me hives.
19:10Turtl3boisemperos?
19:10Turtl3boisemperos can you show me how to get started with making GUIs in Clojure
19:15weavejestertechnomancy: wrap-keyword-params turns those strings into keywords
19:15technomancyweavejester: oh good call
19:16weavejestertechnomancy: By default, url-encoded parameter names can include any character, so can't be keywords by default
19:16technomancyah, makes sense
19:19technomancynow with 50% more shine: http://github-percentile.herokuapp.com/
19:26weavejester(html (doctype :html5) ...) is the same as (html5 ...)
19:27technomancyweavejester: ah cool; I was just cribbing from abedra's sample app
19:28weavejesterThere are a few tricks, like [:div {:id "results"} ...] is the same as [:div#results ...]
19:28brehautmy github %ile is lame
19:28weavejesterMine is 52% apparently
19:28weavejesterI'm almost average :)
19:28brehaut70%
19:29brehautextremely tardy
19:29weavejester[:h1 {:class "content"} ] is [:h1.content]
19:29technomancyweavejester: do classes and ids compose?
19:30weavejesterOh, and (compojure.handler/site your-handler) adds a bunch of useful middleware like wrap-params
19:30weavejestertechnomancy: Yes, but I believe the id has to come first
19:30weavejesterSo [:div#foo.bar]
19:30brehautweavejester: thats something to ensure round trips with enlive
19:30weavejesterNo reason for that other than the regex was written that way
19:31weavejesterbrehaut: Oh right
19:31brehauti imagine it'll be piece of cake, i think the selector syntax is the same as the element shorthand, but it'd be a bit stink if it wasnt
19:31technomancyweavejester: good stuff
19:32mabesis their a macro like defnk that will assert required keys in option maps? (to prevent against typos, etc..) Just looking for prior art in-case I don't have to write my own...
19:43gfredericksmabes: wouldn't required keys normally get changed into proper arguments?
19:44mabesgfredericks: I prefer named arguments for functions with more than 3 arguments
19:45mabesgfredericks: having a lot of arguments may be a code smell itself I suppose
19:49gfredericksin any case I've never heard of such a thing. It sounds like it could be rather complex in the most general case. Maybe all I mean by that is nesting.
19:50gfredericksit just occured to me that in the cases where you're passing in a literal map, you could use the macro to check at compile-time...
19:50gfredericksthat would bring the disadvantage of all your functions being macros though, which is of course terrible
19:51gfredericksclojurebot: which is of course terrible
19:51clojurebotIk begrijp
20:12TimMcRaynes: I like my HTML to be HTML, and my code to be code. Also, something about complecting.
20:12TimMcSo there.
20:13RaynesTimMc: I guess. If you really want to rewrite trivial Hiccup, be my guest.
20:16cemerickTimMc: You're not wrong — except when you need HTML to be data, in which case clojure.xml is a cumbersome notation at best.
20:24brehauti dont think weve seen some of the really cool things you can do with enlive really get talked about
20:24brehautyet
20:26cemerickI think that's true for about 114 different Clojure libraries / abstractions / etc.
20:26brehauthah definately :)
20:26brehauti think enlive has one big clear win though: stop emphasising deftemplate to new users
20:26brehautid rather add a ring middleware that calls emit*
20:37scgilardi~botsnack
20:37clojurebotThanks! Can I have chocolate next time
20:40sritchie_Raynes, here's a lein-newnew template for noir: https://github.com/sritchie/noir-template
20:41sritchie_I'm going to pass it over to ibdknox so he can work his wonders
20:43hiredman~ping
20:43clojurebotPONG!
20:49Raynessritchie_: https://github.com/Raynes/lein-noir
20:50sritchie_cool, this one is meant to become a pinot-oriented template
20:50RaynesWe planned on releasing it along with the next noir version.
20:51sritchie_this one should probably exclusively target pinot, then
21:02RaynesDid prxml get moved somewhere?
21:03amalloyRaynes: got moved to "don't use it; use data.xml; oh wait that will never be released"
21:03brehautamalloy: is data.xml that dire?
21:03Raynesamalloy: That's unfortunate, since we need it or something like it for 4clojure. Any ideas?
21:04amalloybrehaut: no, it's totally working except for whitespace formatting, and has been for months
21:04Rayneschouser: Release that. Now.
21:05amalloybut hudson won't release it with a test failure; chouser and i can't repro the failure locally; and reasonably enough chouser doesn't want to remove valid tests
21:05brehautoh :(
21:07amalloyand fliebel asked on clj-dev about helping with data.xml. i was like, "maybe we need some namespace help?" and there was a flurry of messages about how data.xml needs to be the be-all/end-all of xml processes, supporting 100% high-fidelity round-tripping to xml-text including the N different ways you can specify namespaces
21:08Raynesamalloy: So we can like, use it? I mean, I'll release it myself if we can use it.
21:09amalloyRaynes: a number of people have already done that. i think ninjudd has a release
21:09amalloyhttp://clojars.org/org.clojars.ninjudd/data.xml
21:09RaynesWorks for me.
21:09Raynesamalloy: Fork it, rename it, release it, make it your own. ;)
21:10amalloythat's not a bad idea
21:10RaynesIt really isn't.
21:11RaynesWithout prxml and people being nuts about data.xml, there isn't really an xml generation story for Clojure right now.
21:11amalloythread is at http://groups.google.com/group/clojure-dev/browse_thread/thread/dff8e406b7502a0b/0997aaf57a2d4c75?show_docid=0997aaf57a2d4c75 btw, if anyone wants to read up on the history
21:14Raynes"I just want to clarify a non-technical point: I have no particular
21:14Raynesinterest in being the owner (whatever that means) of data.xml." -- chouser
21:14RaynesThat newline there was unintentional.
21:15amalloyRaynes: i'm not going to take ownership of the project, which i assume is your implied suggestion. i don't understand 2/3 of the code in that file
21:16RaynesWasn't implying that, no.
21:17cemerickamalloy: to be fair, all the issues and hidden corners are legit. I remember the same misery happening when lxml in python-land was being beaten around.
21:18cemerickA metric ton of tools depend upon particular serializations of a given XML model; there's no way to get it half-right.
21:18clojurebotxml is like violence; if it's not working, you're not using enough of it.
21:19Raynes\_/ <-- empty care cup. /me just needs a little trivial xml. ;)
21:20amalloycemerick: only if you're actually targeting those tools. i'm more interested in producing xhtml that renders in browsers and works in pom.xml files, and i suspect most data.xml users are too
21:20cemerickheh
21:21amalloywhich is why the storm of "data.xml needs to do X in order to be useful" comments don't really interest me at all
21:21cemerickwell, trivial xml is trivial to generate; maybe Raynes/trivial-xml is needed.
21:21RaynesThe day I write a low level XML generation library is the day I start wearing a tie and using Netbeans.
21:22cemerickamalloy: That's fair, but I wouldn't expect the contrib process to produce partial solutions.
21:23cemerickIf it did habitually, then its usefulness is significantly diminished IMO.
21:23RaynesI'm pleasantly surprised when the contrib process produces anything at all.
21:25cemerickRaynes: waitaminute, no one should be more cynical than me.
21:28brehauti copied prxml from core into necessary evil and put my own hacks into it to make it do what was needed for xmlrpc :P
21:28brehautRaynes is cynical beyond his years
21:30cemericks'ok, I'm optimistic shy of my years, so we balance each other out.
21:31cemerickhrm, that rhetorical inversion didn't quite work
21:32Raynescemerick: Is your lein dependency tree thingy available anywhere?
21:33cemerick[com.cemerick/pomegranate "0.0.2"]
21:33RaynesOh.
21:33cemerickA plugin isn't possible because of arcane conflicts between aether and lein 1.x maven-ant-tasks
21:33cemerickthus, 2.0-only
21:34cemerickhrm, actually, it may be possible
21:34cemerickthough I don't know that I'd bother
21:34RaynesMan. Why does every maven command I ever use result in 10 thousand plugins being downloaded?
21:35Raynesls
21:35RaynesNote to self: IRC is not a terminal.
21:35brehautRaynes: its the maven way
21:39amalloyRaynes: each plugin has four interfaces and one line of code
21:39RaynesI figured as much.
21:39brehautand of course, each plugin uses a different xml applicaiton, and thus needs subtly different parser
21:40RaynesAnd data.xml is not high-fidelity enough to be appropriate.
21:40amalloybrb guys, gotta slit my wrists
21:40RaynesTake your time.
21:43brehautamalloy: vertical works better than horizontal
21:44amalloybrehaut: not if i'm just doing it for attention
21:44brehautamalloy: these days you can just grow a really long fringe and listen to poor quality pop rock
21:45amalloy"fringe". you crazy englishers
21:45RaynesAnd by poor quality pop rock, he means anything I listen to.
21:45brehautRaynes: you arent yet 20, your _expected_ to listen to crap
21:46brehautexcept you are allowed to understand it
21:46RaynesAnd you're over 20, and thus expected to differentiate between 'your' and 'you're'.
21:46brehautbaha
21:47brehaut:(
21:47amalloyRaynes: i'm glad to see someone give brehaut the beatdown he deserves grammar-wise
21:48brehautamalloy: i thinkg you mean 'grammaur'
21:48brehautyou cant just go dropping the 'u's from english words because you cant be bothered typing them
21:50amalloys/bothered/arsed
21:53cemerickholy crap, this channel turns into proggit after hours these days ;-)
21:53brehauthahah
21:53Raynescemerick: Only today.
21:53brehautis that better or worse than turning into HN ?
21:53RaynesChristmas is nigh.
21:53cemerickunknown
21:53cemerickI've actually been trolling around reddit some lately.
21:53cemerickclassin' it up, y'know?
21:54brehauthaha
22:26symboleI've created a project with a log4j.properties in src/. I then launch a REPL using clojure-jack-in, and use clojure.tools.logging to fire off a bunch of log messages. I don't see any of my log messages printed to the log files. What could be the problem here?
22:28lancepantzsymbole: you also need to have log4j as a dependency
22:29lancepantzsymbole: [log4j "1.2.15" :exclusions [javax.mail/mail javax.jms/jms com.sun.jdmk/jmxtools com.sun.jmx/jmxri]]
22:29lancepantz
22:29lancepantzadd that to your :dependencies
22:33symbolelancepantz: Thanks! That worked.
22:33lancepantzsymbole: you're welcome
22:33symboleThis should be documented somewhere.
22:34lancepantzi remember having to deal with it a couple of years ago, don't remember how i figured it out
22:34lancepantzbut the point is that the log engine is pluggable
22:35symboleLooking at the POM file of clojure.tools.logging, I can see why I'd need to bring it in.
22:35woohoo_ercGreetings! Any Emacs user experience weird/inconsistent behaviour by ParEdit, especially for brackets []?
22:36symboleMaybe I'll shoot an email to the developers. Thanks again.
22:51wolfjbDo I need :aot? my project isn't building as far as I can tell
22:53lancepantzwolfjb: can you be more specific?
22:54wolfjbwell, my project.clj doesn't have :aot in it, but when I run lein compile I get the message No namespaces to :aot compile listed in project.clj
22:54lancepantzwolfjb: no need to compile
22:54wolfjboh
23:02technomancy_i should probably suppress that message for everything but direct invocations of the compile task
23:03technomancy_but I can't think of a good way to distinguish between direct invocations and indirect
23:03wolfjbwell, and as a n00b, it is a bit confusing, but I don't know how to help
23:04technomancy_maybe suppress it altogether
23:04lancepantztechnomancy_: could you check the command line args?
23:05technomancy_lancepantz: yeah, but if you said "lein test, compile", the indirect compile from test wouldn't still pick it up from *command-line-arguments*
23:07alexbaranoskyis there something wrong with this attempt at using core.incubator from my project.clj? [org.clojure/core.incubator "0.1.1"]
23:09cemericklancepantz: FYI, log4j 1.12.16 doesn't have those absurd dependencies you need to exclude in 1.12.15.
23:10amalloyalexbaranosky: that version isn't released
23:10lancepantzah cool, thanks cemerick, i'll bump it up
23:10amalloyhttp://build.clojure.org/job/core.incubator/ then follow a few links to http://build.clojure.org/job/core.incubator/lastBuild/org.clojure$core.incubator/
23:11Raynesalexbaranosky: Make sure you keep opposing the trycljs enlive change. We need to protest this shit.
23:11cemericklancepantz: only took FOUR YEARS, but hey…
23:11cemerick:-)
23:11lancepantzhehe
23:11clojurebotIt's greek to me.
23:12cemerickRemember, Apache ensures project quality.
23:13alexbaranoskyamalloy, thanks, I got it to work like such: [org.clojure/core.incubator "0.1.0"]
23:14lancepantzalexbaranosky: is that not what you were trying already?
23:14lancepantzalexbaranosky: ah, version, nm
23:19alexbaranoskyis there a version of `rotations` in some contrib project? I'm trying to finish off the final move from 1.2 to 1.3... we still have some code just copy n pasted into the project
23:20Turtl3boihi alex
23:20Turtl3boido you enjoy your real job
23:20lancepantzlol
23:21alexbaranoskyyeah
23:21lancepantzwhat would you say your quality of life is?
23:21alexbaranoskylol
23:21lancepantz:P
23:21alexbaranoskyno time for this line of inquiry -- too busy being awesome ;)
23:21Turtl3boiis 30 years of age too late to switch careers
23:22Turtl3boinote: it would be a *slight* change of career, not drastic
23:23alexbaranoskylife has nothing to do with that stuff
23:23alexbaranoskyjust focus and do the work
23:23alexbaranoskyand then you'll get there
23:30technomancy_amalloy: I think we missed an opportunity by not putting a "tweet your results" button in github-percentile. =)
23:31amalloytechnomancy_: true that. i'm so glad i added a Tweet button to 4clojure the night before someone noticed the site
23:34technomancy_nice work on the org support: http://github-percentile.herokuapp.com/clojure
23:34amalloynice work plugging it for me in #clojure
23:35technomancy_I'm just gonna link to http://tinyurl.com/37qn7r6 before this gets out of hand
23:36dnolenwhat does the github percentile number mean?
23:37amalloydnolen: nothing much really. just a measure of how long you've had your account. for example if you look up amalloy, you see "87% of Github employees have had an account longer than amalloy has"
23:37amalloytechnomancy made it up on a lark this morning and i took it as a spur to learn heroku, so now it's an app
23:42mindbenderamalloy: I'm also in the process of learning heroku could you please give me some pointers that helped you
23:42lancepantzummm, dudes
23:42lancepantzwhat is there to "learn"?
23:42lancepantzjust to be an asshole and all, like i am
23:42amalloymindbender: http://devcenter.heroku.com/articles/clojure and /msg technomancy_
23:42mindbenderI want to deploy a traditional j2ee app on heroku
23:43technomancy_mindbender: heroku doesn't provide an application container, but if you want to bundle one in your app it's doable
23:44technomancy_there are a couple limitations, the most pressing being a single process may only listen on a single port. if you can live with that and you can live with the idea of disposable nodes on EC2 you should be set.
23:44technomancy_TBH I'm not really even sure what a traditional j2ee app looks like
23:44lancepantzand no websocket support!
23:45lancepantzget on that shit :)
23:45technomancy_yeah, that's true. =\
23:45cemerickhrm, I hadn't noticed the single port restriction. No remote REPLs?
23:46technomancy_cemerick: you can do it using reverse SSH tunneling, or by keeping the repl in its own process.
23:46mindbendertechnomancy_: that's what I read I mean not really needing a server for deployment and I want it the easy way but I can't just figure how to do it
23:46cemericktechnomancy_: The latter seems like it defeats the purpose?
23:47mindbenderlike jboss and maybe a war file
23:47technomancy_cemerick: not really; if requests are just maps and each process is stateless it's trivial to reconstruct the state you need for debugging.
23:49cemerickThat's fair.
23:49technomancy_unless you mean for hot-patching in production, but I think that kind of stuff is better handled by a message queues
23:50lancepantzninjudd's portal project may be useful there
23:50technomancy_mindbender: heroku requires containerless apps, so you'd need to embed jetty
23:50cemerickNo, most of my remote REPL-ing involves stuff like "WTF happened to this 2GB document", so in-process is a must.
23:50lancepantzi think it uses tcp though, not sure if that's allowed
23:51technomancy_lancepantz: unfortunately that's still in private beta, which is why I'm looking into outbound reverse SSH
23:51cemerickS'ok though. Not everything needs to be everything to everybody all the time.
23:51cemerick:-)
23:51cemerickI actually have a bunch of low-traffic stuff that would be perfect to offload to heroku.
23:52technomancy_it's been strongly webapp-centric so far, we don't even have rabbit out of private beta yet either
23:52lancepantztechnomancy_: i see, i managed to get a real time app working on heroku using html5 server-sent events
23:52lancepantzone-way, but it worked really well
23:53Raynestechnomancy_: You can use heroku for non-webapp stuff?
23:53technomancy_lancepantz: I am hopelessly behind the times; sounds like I have some reading to do
23:53lancepantzworks because it's essentially an http streaming response
23:53Rayneslancepantz: Did you know that tryclj runs on heroku?
23:53technomancy_Raynes: sure; you can use it for background workers off a queue, but right now resqueue is the one people usually chose, which is kind of lame compared to rabbit.
23:54lancepantzRaynes: yep
23:54technomancy_I keep bugging them to release the rabbit addon, no dice yet
23:54technomancy_lancepantz: yeah, I've been playing with streaming chunked HTTP with mcgranaghan; it's really underappreciated.
23:55lancepantztechnomancy_: agree, beats the hell out of comet
23:55technomancy_we're doing json-map-per-line streaming into netty; it's really the best of both worlds
23:55lancepantzawesome
23:56lancepantztechnomancy_: give this a read when you have some time http://dev.w3.org/html5/eventsource/
23:56technomancy_will do; thanks
23:56Raynesamalloy: You should do all sorts of stats.
23:56RaynesMake them think tentacles is the answer to life, the universe, everything.
23:57amalloyRaynes: heroku and github are both free, so feel free to fork and add some lame features
23:57technomancy_3D visualization of project fork DAGs please
23:57cemericktechnomancy_: couch does the same thing for replication and such. Dunno if it'd be worth looking at to steal impl detail hints.
23:58technomancy_cemerick: the json line-by-line thing?
23:58cemerickyup
23:58technomancy_cool
23:58technomancy_is it a design goal of nrepl to work over http?
23:59cemerickit's a design goal to provide protocol(s) so different transports can share the same backend, pass through semantics as much as possible, etc.
23:59technomancy_so it should be possible even if an adapter isn't included out of the box?
23:59cemerickabsolutely
23:59technomancy_great