#clojure log - Jun 25 2012

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

0:09 SrPx: https://github.com/technomancy/swank-clojure From an Emacs buffer inside a project, invoke M-x clojure-jack-in <---- what??

0:09 lazybot: SrPx: Definitely not.

0:09 SrPx: what??

0:09 lazybot: SrPx: Uh, no. Why would you even ask?

0:09 SrPx: what?

0:09 clojurebot: what is wrong with you

0:09 SrPx: what

0:09 what??

0:09 lazybot: SrPx: Uh, no. Why would you even ask?

0:09 SrPx: what?

0:09 clojurebot: what is meta

0:09 SrPx: what???

0:09 lazybot: SrPx: Yes, 100% for sure.

0:09 SrPx: so lazybot handles >2 '?'s

0:10 test??

0:10 lazybot: SrPx: What are you, crazy? Of course not!

0:10 clojurebot: 42

0:10 SrPx: o.o

0:10 ????

0:10 ???

0:10 lazybot: SrPx: How could that be wrong?

0:10 SrPx: are you a good bot??

0:10 lazybot: SrPx: What are you, crazy? Of course not!

0:11 SrPx: ( :

0:11 bbloom: lol, this is an entertaining exchange

0:11 SrPx: so, anyone? please how do I open emacs buffer inside a project? I already have the project.

0:12 oh wait, clojurebot is a person?

0:13 test?

0:13 clojurebot: ,(let [testar (fn [x y] (cond (= (reduce + (filter odd? (range 0 x))) y) (str y " is an square perfect")) )] (testar 11 25))

0:13 SrPx: oh, not.

0:13 nobody? )=

0:14 zerokarmaleft: SrPx: just open a file inside the project directory, e.g. project.clj

0:15 mmarczyk: SrPx: you need to open one of the project's files

0:15 antares_: SrPx: if you are talking about clojure-jack-in, just open any file under your project's directory

0:15 mmarczyk: SrPx: then you should be able to clojure-jack-in from the buffer into which that file will be loaded

0:18 alternatively you can run `lein swank` in the project's directory (assuming you've got swank-clojure installed as a lein plugin or in the project's deps -- the latter approach is currently discouraged) and M-x slime-connect, which is my preferred method of diving into slime

0:19 michaelr525: diving into slime..

0:19 :)

0:20 brainproxy: anyone played/ing with NetKernel? just heard about it, sounds interesting, oreilly just published a book, looks like some folks were working on clojure integration some time ago...

0:20 michaelr525: what's netkernel?

0:21 mmarczyk: yes... I've also got a proper setup for M-x slime for when I just want to splash around :-)

0:23 cmajor7: what is the way of tying an atom to a dom element?

0:23 (clojurescrupt)

0:23 *clojurescript

0:23 bbloom: cmajor7: what do you mean by "tying" ?

0:24 cmajor7: whenever a dom element's value changes, atom gets changed..

0:24 brainproxy: michaelr525: the idea seems to be to apply the REST architectural concepts to the level of an OS

0:24 bbloom: you don't need an atom for that, you can just hold a reference to the dom element directly

0:26 cmajor7: bbloom: right, but I still need to listen for an event.. right? the way I am doing it right now is through a "(delegate $body elem :event.. )" but I need to keep the state of several dom elements (e.g. in a form) in order to do validation / recalculation of the result etc…

0:26 so I was thinking of using atoms for that

0:26 SrPx: michaelr525: thank you but

0:27 well. http://i.imgur.com/l39Ha.png

0:27 cmajor7: tie an atom to a dom element. whenever a dom (e.g. text input) value changes, the atom would get changed,..

0:27 and then the atom's watcher/validator can be used

0:27 bbloom: cmajor7: oh, you want the atom to contain the VALUE of the element?

0:28 cmajor7: bbloom: right, and watch that value

0:28 bbloom: cmajor7: there is no built in library to help with that, so the simplest thing to do is to just bind event handlers and call swap! or reset! on the atom

0:28 brainproxy: cmajor7: you could use addEventListener and bind a callback (lambda) which then updates the atoms value

0:29 SrPx: any idea why this is happening?

0:29 xeqi: SrPx: :plugins should be a vector of vectors, ie [[lein-swank "1.4.4"]]

0:30 cmajor7: brainproxy, bbloom: thx guys. so I would still need an "addEventListener", which (using jayq) is what I have in "(delegate $body elem :event.. )", right?

0:30 SrPx: xeqi: thanks. I cant believe I finally got this working

0:31 bbloom: cmajor7: i'm not familiar with jayq

0:31 brainproxy: cmajor7: also, the flapjax library implements a generalized approach to doing that kind of thing, with "eventstreams" and "behaviors"

0:31 cmajor7: however, I haven't tried mixing flapjax and clojurescript

0:31 bbloom: brainproxy: don't confuse the poor guy!

0:32 FRP and friends is still a pretty open research problem. this guy's trying to get a simple form working :-)

0:32 brainproxy: bbloom: true, true ... I repent!

0:32 cmajor7: reading about flapjax.. yea, I would rather stick to clojurescript..

0:33 bbloom: i assume jayq is a wrapper of jquery. no? i'm not really sure if jquery is an appropriate match for the type of apps you'd build clojurescript

0:33 cmajor7: bbloom: thx for looking out, but I am no poor :)

0:33 brainproxy: cmajor7: .delegate has been superseded by .on

0:33 according to the jquery docs, that is

0:33 http://api.jquery.com/on/

0:34 cmajor7: brainproxy: yea, I saw that.. I got delegate working from an "overtone" example..

0:35 ok, just to summarize what I'll do. for each element of the form I am going to have a separate on/delegate handler that will change the state of a corresponding atom

0:35 does it sound reasonable?

0:35 bbloom: cmajor7: why one atom per item? why not one atom containing a map?

0:36 brainproxy: bbloom: btw, jquery/jayq and clojurescript can be good friends, at least in my experience so far

0:36 bbloom: cmajor7: clojure isn't anti-state, it's pro-carefully-considered-and-contained-state

0:36 cmajor7: bbloom: yea, I guess I could do that, it makes more sense to have a single atom per form

0:36 brainproxy: i.e. at some point you need to work w/ the DOM, and clojurescript doesnt' provide any inherent sugar for doing so

0:37 cmajor7: brainproxy: how do you guys approach a form validation?

0:37 brainproxy: cmajor7: server-side or client-side?

0:37 cmajor7: client side

0:37 bbloom: brainproxy: i just read the jayq README… i'm not convinced… but that's b/c i dont have the same arguments against it as those he combats. in particular, i'm using jquery for a large backbone.js app at my startup and i regret it. jquery is great for adding a little bit of magic to an otherwise static page. you need a less cut-point/aspect style of programming to work on larger rich client apps

0:39 cmajor7: bbloom: I am no front end expert, as you can see :) but I found jayq (simple defn wrappers over a subset of jquery) quite nicely complimenting clojurescript

0:39 brainproxy: bbloom: fair enough.. it will be be intersting to see if something grows up from the cljs community that offers a broad solution along the lines of extjs/sencha, ember, backbone, etc.

0:40 bbloom: brainproxy: yeah, that's something i want to work towards… a few things are missing… in particular, i think i'm going to need delimited continuations and a full "reactive extensions" type library

0:41 cmajor7: brainproxy, bbloom: I just find it rather very verbose to have an event handler that drills down to a "this-as" value resolution for _each_ element of the form to validate it correctly on the client side. do you guys have a magically simple way that you stick to to validate forms?

0:41 bbloom: brainproxy: async & reactive is something i'd like to see find it's way into clojure proper too, so it's gonna be a while before cljs gets there

0:42 brainproxy: bbloom: sure, we're on the same page with all that, as I think we've discussed previously :)

0:42 bbloom: brainproxy: ah right, that was you :-)

0:42 brainproxy: cmajor7: if you just want to get something working, maybe just drop in a jquery plugin for validation

0:42 cmajor7: e.g. http://docs.jquery.com/Plugins/Validation

0:43 ibdknox: just like in JVM clojure, we should take advantage of the things already built for us in JS

0:43 bbloom: cmajor7: it really depends on a few things. are you doing live validation or just on submit? do you need to validate between fields? like comparing password fields? etc

0:44 brainproxy: cmajor7: the plugin is still actively maintained, https://github.com/jzaefferer/jquery-validation/

0:44 bbloom: cmajor7: if i were doing a one off form validation, i'd probably do the simplest thing and bind several event handlers to a single callback function which polls the entire form and creates a map of the form, validates it all at once, and updates any validation ui

0:45 cmajor7: hell, assuming your form is only a few fields you could simply do that in a setTimeout loop and it would be fine :-P

0:46 brainproxy: cmajor7: there may well be some piece/s you could pull in from goog that would provide form validation facilities

0:46 I'm not sure... haven't become a master of what all is available from goog

0:47 bbloom: brainproxy: presumably anything having to do with validation in goog would require you use the controls lib, which has a robust dispose model that doesn't play nice with external dom manipulation

0:48 brainproxy: bbloom: ah, gotcha

0:48 cmajor7: e.g. for each element an event handler that also retrieves a value of the element it is as verbose as: refheap.com/paste/3309 (from overtone example).

0:48 brainproxy: I already have "something" working follow the "delegate" example. I am looking for a simple "field is numeric" / "minimum criteria is met" validation to happen directly on the client side on e.g. "off focus / select / click" events (no submit button)

0:48 bbloom: thx for an idea. the function that I have right now is indeed a single defn, its the event handlers in my example above that look rather verbose.. but maybe that is how it is in JS lang..

0:49 *land

0:51 * michaelr525 has started using tmux, any good tips from tmux gurus?

0:51 brainproxy: cmajor7: i think that plugin covers the things you just indicated

0:52 but if you're not wanting to use a plugin for it, it seems like you're on the right track w/ what you posted on reheap

0:53 cmajor7: brainproxy: thx. that is for a validation logic (I used this plugin in pure JS some time ago, it is good, but I can just use a couple of "defn" instead to validate), I was looking to find a "guru blessed" approach..

0:55 bbloom, brainproxy: yep, ok. I'll change "delegate" to "on", and will use an atom map for the form. it's great to bounce ideas around, even if they are simple.. love it. thx guys.

0:55 bbloom: cmajor7: even if they are simple? what do you mean "even? simple is clearly better! :-)

0:55 cmajor7: I meant "too easy" for front end mastas

0:56 bbloom: heh

1:00 brainproxy: michaelr525: I use tmux also, but I haven't gotten very deep with it

1:05 lynaghk`: bbloom: are you going to be attending OSCON?

1:17 bbloom: lynaghk`: i'm not a big conference guy…

1:18 lynaghk`: bbloom: okay, just wondering if you'd make it easy for me to get you a beer by coming down to PDX

1:18 bbloom: but it looks like I will have to take THE TRAIN.

1:19 bbloom: lynaghk`: do you owe me a beer debt? i've got some many positive and negative beer debts that i can't keep track any more

1:19 lynaghk`: bbloom: not that I know of---it'd just be a good excuse to talk with you about cljs reactive stuff

1:19 michaelr525: brainproxy: what do you use for prefix-key?

1:21 bbloom: lynaghk`: sounds good

1:21 brainproxy: michaelr525: the default... C-b

1:22 lynaghk`: bbloom: do you have any projects/code cooking in that space?

1:22 bbloom: lynaghk`: they are near the top of my queue. i keep getting distracted playing with the compiler though. every time i find a bug or dark corner, i just seem to lose hours of time there :-P

1:24 lynaghk`: i'd like to build the full stack of cps/delimc/async/parallel/reactive/gui but each one of those steps is a massive project in it's own right

1:24 lynaghk`: bbloom: it's by no means "reactive", but I'm probably going to release some "computed-observables" stuff that I've been sitting on this week. I feel kind of shameful that I don't have anything better than "autodetect my atom-dependencies and add watchers for me", but that is already a lot more useful than what seems to be out there.

1:24 bbloom: no kidding.

1:25 bbloom: lynaghk`: the dream is clearly something WPF-like

1:25 minus the OOP and XML pattern explosion

1:25 lynaghk`: bbloom: I keep hearing about that. Sounds like I really should take a week off, find a windows VM, and figure out what's up.

1:25 bbloom: WPF is brilliant and awful all at the same time

1:26 michaelr525: brainproxy: i use c-b to move the cursor back in the repl, so i've changed it to c-x

1:27 bbloom: lynaghk`: i have various half finished compiler projects that are preventing me from really digging deep into it though

1:28 lynaghk`: bbloom: what are you working on with the compiler? I recall a while back you were fixing up some var handling stuff

1:29 bbloom: lynaghk`: i have an army of half finished branches in my local repo

1:29 basically, every time i try to work towards that holy grail gui stack, i find a bug or inconsistency compared to clj on JVM

1:30 so i go to fix that & wind up falling in a rabbit hole, get stuck, start two other things

1:30 and before you know it, i've forgotten the first issue was all together and lost my place in the other project

1:30 luckily, i'm allowed to do that, since these are hobby projects

1:30 lynaghk`: bbloom: do you have a particular application that's motivating this GUI stack?

1:30 bbloom: when i do real work, i actually focus :-P

1:31 lynaghk`: not one for which my thoughts are baked enough to articulate yet :-)

1:32 michaelr525: ,(into {} (map (fn [[key val]] {(name key) val}) {:a 1 :b 2}))

1:32 brainproxy: bbloom: lynaghk` the SCION guy is wrapping up his thesis on SCXML, should be finished soon... i look forward to reading it as i think scxml shows an interesting way to approach reactive programming

1:32 clojurebot: {"a" 1, "b" 2}

1:32 michaelr525: should i do the above or use a reduce?

1:32 lynaghk`: I've been having some trouble finding functional ways to model some GUI stuff. Lately I've resorted to just attaching atoms to shared DOM elements. That feels gross, but I haven't been able to think of more clojurey ways of doing stuff.

1:32 michaelr525: it's meant to stringify the keys of a map

1:32 brainproxy: i.e. a declarative approach

1:32 bbloom: brainproxy: that anything like storyboards in cocoa or the state machine thinggies in blend?

1:33 lynaghk`: yeah, i think the main problem is that you can't just half ass the functional approach to a gui

1:33 lynaghk`: it doesn't compose well with the dom, so you have to abstract the dom away

1:33 lynaghk`: it's really hard. hence no one has done it well yet

1:33 brainproxy: bbloom: the README gives a good overview

1:33 https://github.com/jbeard4/SCION

1:33 bbloom: lynaghk`: but i think cljs is the major opportunity to do it

1:34 lynaghk`: bbloom: actually, my problem is not so much with DOM manipulation as it is with just having multiple things that I want to associate together

1:34 brainproxy: but like i said, he's wrapping up his thesis on the same subject matter, in which SCION features prominently

1:34 bbloom: lynaghk`: ?

1:34 lynaghk`: bbloom: but I don't want to end up with a record that implements a few dozen protocols.

1:35 bbloom: brainproxy: i know that i shouldn't, but i want to immediately reject any proposal that involves XML in any way

1:35 brainproxy: bbloom: well, there's not any reason that the same ideas couldn't be represented in another hypermedia base type

1:35 bbloom: brainproxy: hence, i'm still reading lol

1:36 brainproxy: e.g. might be interesting to try to translate SCXML over to JSON-LD

1:36 bbloom: <state id="idle"><onentry><script> …. CODE HERE --- that just makes me sick :-P

1:36 michaelr525: json-ld?

1:37 lynaghk`: bbloom: I can't really come up with a tidy example of the issue I'm having (it's in the context of a big project--which will eventually be open sourced, so you'll be able to see the mess I've made and maybe have suggestions then =P)

1:37 bbloom: brainproxy: yeah, this reminds me of the visual state manager in wpf

1:37 brainproxy: http://blogs.msdn.com/b/wpfsdk/archive/2009/02/27/the-visualstatemanager-and-triggers.aspx

1:38 i think that states & transitions are a critical part of a strong frp gui toolkit

1:39 in particular, the trick is to view your app as a quasi-immutable composition of functions (only mutates during development) and then view the app state as a single atom

1:39 basically, you're app is a giant render function glued to a deeply nested state machine

1:39 brainproxy: bbloom: i agree, but I think there's more to it than just straight up FRP

1:40 we want a rich, composable way to create bidirectional ties from/to network addressable resources and the DOM

1:40 which brings in the whole discipline of "lenses"

1:40 which I don't claim to really understand

1:40 bbloom: yeah, i don't expect the common development model to be working with frp primitives.

1:41 i think lenses would be valuable, but i'm not sure they are appropriate for most types of GUIS… basically anything with a submit button doesn't like lenses

1:41 brainproxy: my gut instinct says the "path ahead" lies in generalizing and extending what the Flapjax guys started, and blending it together with an SCXML-like approach

1:41 lynaghk`: bbloom: that's exactly how I've structured some dashboard apps; used a custom state machine framework to model different screens as states and show/hiding appropriate DOM containers on enter/exit.

1:42 bbloom: lynaghk`: yeah, it's very video-game like :-)

1:42 brainproxy: bbloom: i don't see the why lenses can't be friends with submit buttons

1:42 bbloom: brainproxy: it's just that you have a discrete submit action, rather than two way binding

1:43 brainproxy: two way binding is actually extremely uncommon in most UIs

1:43 brainproxy: a lens is just a way to express the rules to go back and forth between two representations

1:43 lynaghk`: bbloom: no experience doing game programming, but yeah--basically everything gets easier if you think of DATA ---fns---> VIEW.

1:44 bbloom: brainproxy: right, but 9/10 times, you only want one way or if you do want back-and-forth, both ways are identity

1:45 it's pretty rare for functions to have true inverses when it comes to business logic

1:45 brainproxy: lenses don't need to be symmetric

1:46 bbloom: right, but if they aren't symmetric, then there are generally more than one possible asymmetric inverse

1:46 and if there is more than one, you need to specify

1:46 brainproxy: i dunno, maybe you're right, I've got a handful of papers and whatnot to digest before I want to take another big stab at this stuff

1:46 bbloom: so at that point, you might as well just define [to from] as a 2-vector of functions and be done with it :-P

1:48 brainproxy: that being said, I see declarative two-way reactive bindings that can be applied to documents like unto stylesheets...

1:48 as being really killer :)

1:48 bbloom: :-)

1:48 i thought you said spreadsheets, which would *also* be cool

1:48 heh

1:49 brainproxy: no, what I mean is that I want something like <link ...> in my <head>...</head>

1:49 which automatically setups up two-way bindings between DOM stuff and resources on the server

1:49 bbloom: brainproxy: i dunno, i see this is as a popular trend now

1:50 what with meteor

1:50 and firebase and all that stuff

1:50 brainproxy: yeah but meteor is like the total opposite of hateoas

1:50 bbloom: but really, i've NEVER written an app that way

1:50 two-way binding pretty much only ever applies to settings pages

1:50 brainproxy: i think the meteor approach, while interesting, is a big mistake

1:51 I want to build hypermedia apis, not RPC mashups

1:51 bbloom: eh, i'm not a big rest guy either

1:51 :-P

1:51 brainproxy: then I hate you

1:51 :p

1:51 bbloom: haha

1:51 brainproxy: j/k :D

1:51 bbloom: my current startup's app is all RESTful and what not

1:52 but really, i wish i had a socket :-P

1:52 brainproxy: sockets are cool!

1:52 but I think they should be limited mostly to telling clients that a resource on the server has changed

1:52 and the client should re-GET the representation

1:52 bbloom: brainproxy: eh. just b/c http forces that model on you doesn't mean you need to use it :-P

1:53 brainproxy: well i guess I buy into the hateoas stuff

1:53 bbloom: hateoas is that whole never need to construct a url thing right?

1:54 brainproxy: bbloom: well, i'm not sure one sentence can cover all the bases

1:54 but the idea is to build apis from the pov of the client

1:54 bbloom: brainproxy: heh, i'm not gonna repeat myself on REST, etc. i wrote a blog post to cover all this :-P http://blog.brandonbloom.name/2012/02/rest-one-thousand-inconsequential.html

1:54 brainproxy: and the client drives the state changes in the application, by way of the affordances in the hypermedia

1:55 bbloom: okay, will take a look, thanks

1:56 bbloom: for what it's worth, I think a lot of folks on both sides of the REST debate tend to miss the point

1:56 I like Amundsen't stuff

1:56 and I'm biased, I'll admit it

2:01 bbloom: let's talk about REST/HATEOAS sometime, maybe in another venue so as not to get too offtopic in #clojure

2:02 for now, I need to go to bed, need to get up early tomorrow and starting writing more clojure :)

2:02 bbloom: *shrug* i view the topic as a bit of a black hole. i'm interested in solving problems and all the REST/HATEOAS conversations are about fuzzy emotional FEELINGS about apis

2:02 brainproxy: well, I think in some ways you're batting at strawmen in what you wrote

2:03 I'm using hateoas principles to precisely to solve real world problems

2:04 namely, my coworker and I are working to wrap a "hypermedia api" (i.e. hateoas to the core) around a bear of an SOA/XML/SOAP specification

2:05 our being very deliberate about the hateoas-ness of it has nothing to do with feelings or ideals

2:06 bbloom: sounds like a good topic for a blog post ;-)

2:06 brainproxy: Mike Amundsen's book "Hypermedia APIs" had a big influence on us

2:07 he implements his examples with NodeJS and Couch, no clojure in sight, but he really nails the ideas and helped me to think differently about all this stuff

2:08 the book could have been edited somewhat better :/ that is my only hesitation in recommending it.. you need to be prepared to deal with problems in the example code, some sloppy editing here and there

2:09 bbloom: oh wait, just a sec, i have a link to major presentation he did recently, only slides available so far, but vid recording is supposed to be available sometime

2:20 bbloom: here you go, http://amundsen.com/talks/files/2012-06-21-qcon-amundsen-cost-benefits-hypermedia.zip

2:20 there's a PDF inside the zip file

2:21 bbloom: brainproxy: i'll read it a little later

2:21 Raynes: PDF in zip?

2:21 Ew.

2:21 bbloom: Raynes: heh, yeah, probably doesn't provide much compression :-P

2:22 Raynes: Even if it did, I'd rather Chrome be able to render it in the browser than save a megabyte.

2:22 brainproxy: yeah, I don't get the pdf in zip thing, lol

2:23 bbloom: Raynes: eh, i turned that off after the 100th time chrome misrendered some characters

2:23 Raynes: Never seen anything like that.

2:24 bbloom: *shrug* it happens on both my macs, but none of my coworker's… no idea why. anyway, i prefer the experience of Preview anyway

2:24 Raynes: I'd like preview if it didn't take 2 years to start up.

2:24 bbloom: Raynes: upgrade to solid state :-)

2:59 muhoo: has anyone solved the problem in hiccup/ring of html checkboxes?

3:00 like, how you uncheck them. because, unchecked checkboxes don't show up in the POST at all in html. i'd forgotten about that since so many frameworks have hacks to work around it automatically

3:03 bbloom: muhoo: so if i recall correctly, the trick is to use a hidden

3:04 muhoo: <hidden name="foo" value="unchecked"/> <input type="checkbox" name="foo" checked="checked" value="checked"/>

3:04 or something like that

3:04 muhoo: that sounds right, but i was hoping someone had already abstracted that machinery out into a function somewhere

3:04 * muhoo sets out to write one then

3:06 bbloom: muhoo: just looked at rails… *cringe* soo many classes

3:06 actionpack/lib/action_view/helpers/tags/check_box.rb

3:07 muhoo: yeah, looks like it does exactly what i suggested :-)

3:08 muhoo: yep, that's what i remember seeing in rails and yii.

3:08 thanks

5:38 michaelr525: when I (def a (.SomeClass))

5:38 a is shared among all threads, right?

5:40 llasram: Yep -- var root values are global across threads, as are namespaces

5:41 fantomex: should i learn clojure over javascript?

5:42 borkdude: can't wait for this book to come out =) http://shop.oreilly.com/product/0636920025139.do

5:42 llasram: Oooh, nice

5:42 borkdude: hmm, only 80 pages?

5:43 lucian: fantomex: for what?

5:43 michaelr525: i have some weird shit happening with a clojure app running under tomcat

5:43 llasram: borkdude: That's version compiled with optimizations. The human-readable version is longer

5:43 antares_: fantomex: they are typically used for different problems, so you should probably learn both.

5:43 borkdude: llasram hehe

5:44 fantomex: yeah that is a better idea lol

5:44 thank you sir

5:45 lucian: even if you use clojurescript, javascript knowledge is necessary

5:46 fantomex: yeah i had wondered that.

5:50 michaelr525: after changing the (def a (.SomeClass)) to (defn a [] (.SomeClass)) the problems seems to disapear but i still got this printed once: ((ddoo ((-->> ((ddoottoo tteemmppllaattee ((..aadddd \"\"ddaattaa\"\" ddaattaa)))) ((..wwrriittee ww)))) ((..ttooSSttrriinngg ssww)))):: 89..952008410981 mmsseeccss

5:50 why could it happen?

5:51 it was printed instead of something like: (do (-> (doto template (.add \"data\" data)) (.write w)) (.toString sw)): 0.974985 msecs

5:53 llasram: michaelr525: Well def -> defn changes the var from holding an instance of SomeClass to a function returning a new instance each time it gets called...

5:53 michaelr525: yup

5:53 i know

5:53 llasram: Ok :-)

5:53 michaelr525: i don't understand where the giebriesh comes from?

5:54 llasram: Yeah, odd error is odd. Same code running in two different threads?

5:55 michaelr525: i use a macro to time the execution of a given code and and print it with the timing result, before changing def to defn i've got even more giebriesh printouts

5:55 llasram: i guess so, it's running under tomcat

5:56 so I guess tomcat spins multiple threads for multiple simultanous connections

5:58 giebriesh like this: (.g"e(t.IgnesttIannscteaOnfc e(Otfe m(ptleamtpelsa)t es\")P r\"oPdruocdtuPcatgPe\"a)g:e \"2)8:3 .201412.389796 0m9s emcsse"c

5:59 llasram: I'm going to have to go with demons

6:01 michaelr525: hrr

6:15 SrPx: is it possible to make rich clojure apps? images, drawing, 3d, event handling, and such?

6:17 _nmmn: why not?

6:47 borkdude: why does add-watch use a key?

6:48 for example: (def a (atom 3)) -- (add-watch a :foo (fn [key ref old new] (println key ref old "new!" new)))

6:48 why is the key needed?

6:57 mduerksen: borkdude: from the doc: "Keys must be unique per reference, and can be used to remove the watch with remove-watch, but are otherwise considered opaque by the watch mechanism."

6:57 borkdude: aaah

6:57 of course, tnx

6:58 to remove

6:58 mduerksen: jep

6:58 borkdude: but then why does the function gets the key as an arg

6:59 so you can remove yourself after one call for example?

6:59 but then it doesn't even need it as an arg

6:59 mduerksen: borkdude: so that the fn can discern from which watch it has been called, e.g. if the fn is used for several watches

7:00 borkdude: mduerksen ah right

7:00 samrat: what's the difference between using Math/sqrt and importing sqrt using (:use [clojure.math.numeric-tower :only (sqrt)]) ?

7:01 borkdude: samrat probably the source if the answer here

7:01 is

7:02 samrat: borkdude: (source Math/sqrt) gives No source found

7:03 borkdude: https://github.com/clojure/math.numeric-tower/blob/master/src/main/clojure/clojure/math/numeric_tower.clj

7:04 samrat the difference is obviously that Math/sqrt always works with floats/doubles, and the numeric tower makes a version for several types

7:15 francis: I'

7:15 I'

7:15 *facepalm*

7:18 I'm attempting to display an image in seesaw using a then :icon property on a jlabel. If I use a URI (label :icon http://stuff/myimage.jpg) no problems, however I cannot get it to display anything from my local file system.

7:18 According to this thread https://groups.google.com/forum/?fromgroups#!searchin/seesaw-clj/images/seesaw-clj/hPZ8ziAzItI/R0Xzh_MSHGYJ

7:20 It's as easy as (label :icon (clojure.java.io/resource "dir/in/my/proj/image.jpg")) However I cannot get this to work. Has anyone else had issues with this?

7:22 Also, I have tried using absolute paths, and whatever this ./ is called (relative path?)

7:23 And got it working.

7:34 alfborge: Anyone know if enlive can select elements based on the elements children?

7:36 I have a table with rows that are not identified by anything other than the contents, I want ta do stuff with the rows that has certain contents, but I can only find ways to get the child elements instead of the row I'm interested in.

7:46 gfredericks: alfborge: I believe it can

8:25 ,`if

8:25 clojurebot: if

8:25 gfredericks: ,`(foo if bar)

8:25 clojurebot: (sandbox/foo if sandbox/bar)

8:46 Chiron_: well, I know this is Clojure IRC but any body using hector-clj lib?

9:07 michaelr`: wtf dropbox?!

9:08 the biggest problem with the cloud is when it isn't working

9:26 edoloughlin: Anyone know if there are any screencasts of Emacs/Clojure workflow? I've attempted a few times to move to Emacs but couldn't see past the (lengthy) keyboard shortcuts and didn't get a sense of how it could make me more productive.

9:27 I'm just looking for an overview of what's possible.

9:28 ro_st: cemerick: loved your 'what sucks about clojure talk'

9:29 edoloughlin: i'd be happy to answer questions. i've just been through that process

9:30 i'm not looking at cheatsheets any more, and i'm not swearing aloud either

9:30 cemerick: ro_st: thanks :-)

9:31 edoloughlin: ro_st: Thanks, but my problem is I don't know what questions to ask. I'd just like to see someone's workflow so I can see what I need to learn.

9:31 antares_: edoloughlin: maybe http://technomancy.us/149 will help

9:31 ro_st: cemerick: i'd love to read up on opinions about the 'right' way to tackle the (ns) form. right now, my ns's are a shamble

9:32 and it's painful because i constantly have to feed it, which interrupts my primary train of thought all the time

9:32 antares_: edoloughlin: also, searching youtube for "emacs swank clojure" yields a bunch of tutorials and one google code jam session in emacs with clojure

9:33 cemerick: ro_st: Sticking with all :require forms with convenient aliases, and using the :refer option to require that's new in 1.4.0 is a good baseline.

9:34 ro_st: so prefer :require over :use?

9:34 can i pass :only to :require?

9:34 i've been using :only with :use and :as with :require

9:35 antares_: ro_st: :only makes no sense for :require but in 1.4 you can use :refer and it will do the same thing as use with :only

9:35 xumingmingv: can i call a super class's method in clojure?

9:35 ro_st: cool. i'll read up on refer

9:35 xumingmingv: like super.hello()

9:37 edoloughlin: antares_: Thanks.

9:38 antares_: xumingmingv: yes, it is possible, although I cannot immediately say where besides books you can find an example

9:41 xumingmingv: antares_, thanks

9:42 I found a link here: http://stackoverflow.com/questions/9060127/how-to-invoke-superclass-method-in-a-clojure-gen-class-method

9:45 baoist: Has anyone had an issue with vimclojure in macvim freezing when "vimclojure#WantNailgun" is enabled?

9:54 michaelr525: i get compilation error but but the stacktrace ends with at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3382)

9:54 ... 48 more


9:54 how to get the rest of the stacktrace to see the source of the failure?

9:58 pjstadig: michaelr525: the "... 48 more" indicates that the "48 more" frames were the same as the frames above

9:58 http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html#printStackTrace()

10:22 alfborge: I'd like something like the following that will return yes: (or "" "yes")

10:22 I'm used to python where the empty string is considered false. Would be convenient here.

10:24 borkdude: alfborge everything nil or false is "logically false" in Clojure

10:24 alfborge everything else is considered "logically true"

10:25 alfborge you can however use the function blank? from clojure.string for something like this

10:25 alfborge: Yes, I get that. Was wondering what would be the idiomatic solution for this in clojure.

10:25 michaelr525: I get a long stacktrace which ends with this: at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3382)

10:25 ... 48 more

10:25 Compilation failed.

10:26 Frozenlock: I think ,,(emtpy? "") might also usefull

10:26 michaelr525: How to get the rest of it?

10:26 alfborge: borkdude: Using blank? means I need to use a let. Any way around that?

10:28 As far as I can see, using blank? implies something like: (let x (fn1) (if (blank? x (fn2) x)))

10:28 borkdude: alfborge maybe something like this? &&(first (remove clojure.string/blank? ["" "yes"]))

10:28 alfborge maybe something like this? ##(first (remove clojure.string/blank? ["" "yes"]))

10:28 lazybot: ⇒ "yes"

10:28 alfborge: borkdude: makes sense

10:29 borkdude: I always forge this middle in the sentence notation…. why!

10:29 forget

10:30 foxdonut: borkdude: because you need more coffee ;)

10:30 borkdude: foxdonut fh… I need more and more coffee… I think I need a vacation instead

10:31 Frozenlock: borkdude: Meaning you don't code in your vacactions? :P

10:31 borkdude: Frozenlock not when I'm on a trip, forced afk

10:33 and a nice trip is coming up

10:34 I guess the best approach to read through a (clojure/code) book is not to spend hours on details I don't understand (or maybe due to lack of coffee/brainpower) but to continue

10:34 and revisit again when reborn by caffeine

10:38 cemerick: borkdude: sorry I wasn't clear enough re: the coordinate system. You got it in the end. :-)

10:39 alfborge: Is there a reverse function of fnil?

10:39 Ie I want to take a function f and make it return nil if the result is x

10:39 As opposed to fnil that take a function f and make it return x if the result is nil

10:39 borkdude: cemerick :)

10:41 alfborge: I'm still on the (or fn1 fn2) where I want the result of fn2 if fn1 returns "".

10:41 TimMc: alfborge: 'or

10:41 However, 'or will also short-circuit on false.

10:42 alfborge: TimMc: I'm looking for short-circuiting on "" instead of false/nil.

10:42 TimMc: (Err, "short-circuit" might be the term for truthish results, but you get my meaning.)

10:42 alfborge: if-let is the closest I can think of.

10:45 borkdude: alfborge (defn foo [f x] (fn [& args] (let [res (apply f args)] (if (= x res) nil res)))) ?

10:45 alfborge ((foo + 2) 1 1) => nil

10:45 alfborge ((foo + 2) 1 2) => 3

10:45 TimMc: alfborge: SOrry, that was a bad recommendation. I think I'm still asleep.

10:45 semperos: trying to use cgrand's parsley, trying out the new views functionality shown here: https://github.com/cgrand/parsley/blob/master/test/net/cgrand/parsley/test.clj#L85

10:46 alfborge: TimMc: Indeed, couldn't find a way to make if-let work since it suffers from the same issue as using or. :)

10:46 semperos: perhaps I'm misunderstanding, but it looks like the output of (my-parser my-input) is the input for something like net.cgrand.parsley.views/length as one example of a view function

10:47 but I get a "net.cgrand.parsley.Node cannot be cast to clojure.lang.IFn" error

10:47 alfborge: borkdude: Yes, but is there an ideomatic way to do this?

10:47 semperos: if anyone can examine this and see what I'm not seeing, would be appreciated

10:47 TimMc: alfborge: If it really irks you to use (let [...] (if ...)) inline, you could define a macro or fn to do the work.

10:48 alfborge: TimMc: If using a let is the recommended solution then that's ok. However it feels clumsy and that's usually a sign that there is something I've overlooked. :)

10:48 borkdude: alfborge idiomatic? I take that as an insult

10:49 TimMc: heh

10:49 alfborge: borkdude: If you want. That wasn't my intention.

10:49 borkdude: alfborge kidding ;)

10:49 alfborge: :)

10:51 Got to run. Thanks for the help guys.

10:55 gtrak: mboeh: saw your blog post re: mass downloader, what was the issue with agents?

11:02 keratacon: Is this the proper place to ask about errors setting up swank-clojure?

11:03 borkdude: keratacon yes, but you could also try #leiningen

11:05 keratacon: OK, I'll try here first. I installed swank-clojure 1.4.2 and it installed without error, but Aquamacs (which does have clojure-mode installed) gives errors with clojure-jack-in and when I attempt to run swank-clojure in my lein bin folder, I get Java runtime exceptions

11:05 borkdude: keratacon post the exceptions in a gist

11:06 keratacon and what leiningen version ar eyou using

11:06 keratacon: https://gist.github.com/2989169

11:07 1.7.1

11:07 antares_: I think it needs arguments like a port to bind to

11:07 typically swank-clojure is used via clojure-mode in lein

11:07 which starts it for you and picks a port automatically

11:08 borkdude: keratacon I usually start it with "lein swank"

11:08 keratacon but using clojure-jack-in, you shouldn't have to start it yourself anyway,

11:08 semperos: answer to my question above: fnode and fleaf

11:08 keratacon: "lein swank" says swank is not a task

11:09 borkdude: keratacon then the plugin is not properly installed

11:09 lein plugin install swank-clojure 1.4.2

11:11 keratacon: reinstalling worked

11:11 thanks for your time

11:12 borkdude: welcome

11:12 gtg

11:56 ibdknox: Monrning everyone!

11:56 http://www.chris-granger.com/2012/06/24/its-playtime/

11:56 enjoy :)

11:57 Frozenlock: Playtime? Time to get my trains!

11:57 mhanson: ibdknox: Sweet!

11:57 samrat: could someone explain what's going on in line 9 here: https://www.refheap.com/paste/3310 ?

11:57 foxdonut: ibdknox: superawesome

11:58 samrat: if candidates is not empty, return its first element, else return n

11:58 RickInGA: '(seq [1 2 3])

11:58 ,(seq [1 2 3])

11:58 clojurebot: (1 2 3)

11:58 RickInGA: ,(seq [])

11:58 clojurebot: nil

11:58 oskarth: nice one ibdknox

11:58 treehug: in clojurescript w/ cljsbuild, can my user code safely require closure-library r2005 (the current head, for example), while cljs itself is on an older version? ie. is the compiler runtime isolated from the code its compiling?

11:58 foxdonut: ,(let [candidates [] n 42] (if (seq candidates) (first candidates) n)

11:58 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

11:59 foxdonut: ,(let [candidates [] n 42] (if (seq candidates) (first candidates) n))

11:59 clojurebot: 42

11:59 foxdonut: ,(let [candidates [1 2 3] n 42] (if (seq candidates) (first candidates) n))

11:59 clojurebot: 1

11:59 foxdonut: ,(let [candidates nil n 42] (if (seq candidates) (first candidates) n))

11:59 clojurebot: 42

11:59 dnolen: ibdknox: yowza

11:59 mhanson: ibdknox: Looking awesome so far.

12:00 Frozenlock: ibdknox must be eating awesome cherios in the morning. Would you mind sharing the brand? :)

12:02 ibdknox: haha :)

12:02 bork|away: ibdknox on my mac I get a white screen with nothing to do in it

12:03 ibdknox: bork|away: what OS X?

12:03 bork|away: 10.7.4

12:04 gtrak: ibdknox: already the superior one-step repl

12:04 Frozenlock: ibdknox: Does it close the server if I close my browser?

12:05 bork|away: ibdknox http://twitpic.com/a0fykz

12:05 ibdknox: Frozenlock: no, so as to be a quick on

12:05 ./light server stop will kill it

12:06 bork|away: can you check what's in ~/.lighttable/logs/server.log

12:06 Frozenlock: Thanks!

12:06 foxdonut: Frozenlock: also, ibdknox is on Uberman's sleep schedule (20-minute nap every 4 hours. That’s a total of 2 hours of sleep every 24-hour period.)

12:06 bork|away: ibdknox Server started.

12:06 CONNECTING: clj

12:06 ibdknox: interesting

12:06 close that window and call ./light table again?

12:06 or actually

12:06 just do cmd+n

12:07 bork|away: ibdknox it might be just me, I tend to get things b0rked ;)

12:07 Frozenlock: foxdonut: Wasn't Uberman' schedule debunked years ago?

12:07 tmciver: ibdknox: works for me on Ubuntu. Thanks, keep up the great work!

12:07 bork|away: ibdknox cmd+n just opens a new white screen

12:07 ibdknox I'll try restart it

12:08 dnolen: ibdknox: I'm assuming your 1.5 issue got resolved?

12:08 foxdonut: Frozenlock: probably, but so was Lisp, and look where we are now :D

12:08 bork|away: ibdknox hey that worked… suddenly things appear

12:08 samrat: can anyone explain what's going on in line 9 here? https://www.refheap.com/paste/3310

12:08 ibdknox: dnolen: switched gears on that, this version worked before any of those changes haha

12:08 bork|away: ibdknox I think I did something wrong while pasting the command, didn't see that it was all just a long line.. sorry!

12:08 ibdknox: bork|away: I have no idea lol

12:09 fun real-time facts

12:09 I'm tracking events, active minutes spent and lines of code executed (rate-limited to one eval per minute per person, otherwise that would be cheating)

12:10 2010 active minutes spent, 38129 lines of code eval'd :)

12:10 bork|away: ibdknox cool! :) :)

12:10 gtrak: samrat: i think you meant seq?

12:10 samrat: gtrak: yeah, i couldn't understand that part

12:11 ibdknox: lol people are funny

12:11 this guy complained that after removing everything it installed it no longer worked :p

12:12 bork|away: ibdknox I'm amazed already, can't wait to play with this some more… away again

12:12 zerokarmaleft: ibdknox: this is fantastic

12:12 ibdknox: I released it to a really small group last weds

12:12 I was surprised how much people were using it :)

12:14 Bronsa: ibdknox: http://i.imgur.com/PKwSL.png

12:14 ibdknox: lol

12:14 bork|away: ibdknox I know this will be a huge win in the classroom

12:15 ibdknox: Bronsa: yeah, there are likely a few things like that where I'm not correctly getting line/column metadata

12:15 Bronsa: ibdknox: yeah, just letting you know, keep up the awesome work :)

12:15 zerokarmaleft: ibdknox: is there a way to resume execution after cancelling with C-d?

12:15 sr71-blackbird: ibdknox, just curious, is there a demo/really-beta version of light table around?

12:16 ibdknox: zerokarmaleft: should be able to just start typing again

12:16 sr71-blackbird: what do you mean?

12:17 sr71-blackbird: ibdknox, i'm just wondering if a version of light table was around to use -- I just joined the channel, might be off-topic .. if so, I'm sorry

12:18 ibdknox: sr71-blackbird: http://www.chris-granger.com/ :)

12:19 sr71-blackbird: ibdknox, ahhh, awesome!

12:20 uvtc: given a project name, how can I ask clojars.org to tell me (A) the :url and (B) the :description for the given project?

12:20 technomancy: uvtc: you'd have to fetch the pom I think

12:20 there's no API

12:20 even if there were, the pom might be a good place to look anyway

12:21 uvtc: technomancy, I'm not familiar with pom files. Are they basically the mvn-equivalent of the project.clj?

12:21 technomancy: uvtc: yeah, project.clj complies to a pom

12:21 ibdknox: that went up fast. Over 64k lines now :)

12:21 technomancy: uvtc: just do `lein pom` to check it out; should be easy to parse with clojure.xml

12:21 uvtc: technomancy, Oh, I see. The next question I was going to ask was, "can I ask clojars for a given project's project.clj file?".

12:22 technomancy: uvtc: curl http://clojars.org/repo/robert/hooke/1.1.2/hooke-1.1.2.pom

12:23 uvtc: Oh, I need to include version number info. Ok.

12:23 technomancy, thanks.

12:24 technomancy: no problem

12:26 uvtc: I'd like to allow arbitrary pieces of metadata (like documentation url) to be specified in project.clj but I don't know of a way to make it propagate out to the pom

12:27 uvtc: It's fine. Like you pointed out, I can just parse the pom with clojure.xml.

12:27 technomancy: uvtc: yeah, but I'd like clojars to be able to take advantage of more metadata than just url and description

12:29 uvtc: I'm thinking that as long as every project includes a valid :url and :description, then that's a good start. Last time I checked, a number of projects at clojars did not have urls specified. I'm thinking it might be good to try and do something about that.

12:30 That might be more useful than the Alcove (re. last-night's ML post I made).

12:32 technomancy, this has come up here before. I'm not sure how much of the process could be automated.

12:33 technomancy: uvtc: lein yells at you now if you try to deploy url-less or description-less projects

12:33 uvtc: (inc technomancy)

12:33 lazybot: ⇒ 26

12:33 technomancy: plus they won't be promoted to the new releases repo

12:34 uvtc: What's the "new releases repo"?

12:35 technomancy: clojurebot: next-gen clojars is http://groups.google.com/group/clojars-maintainers/browse_thread/thread/77c1cd77e478bb0f

12:35 clojurebot: Ik begrijp

12:35 technomancy: bot oughtta know that

12:35 uvtc: it's the main thing blocking leiningen from declaring 2.0.0 final

12:36 uvtc: clojurebot: next-gen clojars

12:36 clojurebot: next-gen clojars is http://groups.google.com/group/clojars-maintainers/browse_thread/thread/77c1cd77e478bb0f

12:36 technomancy: a repo that enforces some minimal requirements for usage; lein 2.0.0 will default to only checking that and central

12:36 uvtc: Ha. Was just reading that discussion.

12:36 technomancy: so the existing clojars repo will have to be opt-in

12:37 uvtc: Oh, you mean "pom/jar" repo, not github repo.

12:37 technomancy: aye

12:37 uvtc: Aye laddie!

12:41 .oO( seems odd to me that they're named inc and dec, rather than incr and decr ... inc looks like "include" and dec looks like "decimal"...)

12:41 technomancy: incf and decf are the state-mashing CL equivalents

12:44 uvtc: What's the "f" for?

12:45 technomancy: probably the same as the f in setf

12:45 maybe form?

12:45 uvtc: "Oh *fiddlesticks* you've gone and mashed the state!"

12:45 technomancy: really I'd expect a lot more "enemy of the state" jokes from this channel

12:45 uvtc: hahaha

12:47 gtrak: immutability is really just an indirection of state, though, managed state-change

12:51 oops, 'x is really just y', I mean that's one way to look at it

12:51 technomancy: yeah, CL's notion of "places" really feels like just a half-baked reference type

12:53 gtrak: hmm, how do I search for common lisp 'place'

12:54 technomancy: C-h f setf maybe? =)

12:54 y3di: im new to clojure and im testing out recursion in lighttable playground with this func: https://gist.github.com/2989839

12:54 but I get a wrong number of args error, i can't seem to figure out why

12:56 uvtc: Do you see a need for a "CPAN for Clojure", given that Clojure has Clojars + clojure-toolbox (et al) + github?

12:56 mhanson: y3di: When you're calling your function, don't put the arguments in a vector.

12:56 gtrak: ah, an ELISP thing

12:56 y3di: oooo

12:56 technomancy: gtrak: inherited from MACLISP I'd wager

12:57 uvtc: I don't think the separate hand-curated approach of clojure-toolbox is a good bet in the long run

12:58 uvtc: but I would love to see some of the clojuresphere data integrated into clojars

12:58 bhenry1: has anyone had problems with lein2 uberjars?

12:58 mboeh: gtrak: I couldn't figure out how to dispatch a lot of agents in one go and then wait for them all to finish. But I'm still fuzzy on agents in general

12:59 gfredericks: employer just got a safair books account, so now I can read all the clojure books :)

12:59 technomancy: clojurebot: anyone?

12:59 clojurebot: Just 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 ..."

12:59 gtrak: mboeh: ah, I think that's the wrong approach for agents. I read that in your previous post. You probably only want one agent? then use send or send-off on it.

13:00 though I'm not sure what the 'state' would be. futures are probably what you want

13:01 uvtc: technomancy, re. clojure-toolbox, it seems useful to have links to projects by-category ... (I wonder how much people actually *use* that feature.)

13:01 technomancy: uvtc: yeah, but something like that needs to be curated by project maintainers themselves

13:02 mboeh: gtrak: How do I do more than one job, then? Do agents represent a thread pool or just a single job?

13:02 clojurebot: whose job is<reply>that is gsavs job

13:02 SrPx: Can I save my current REPL state ? Using swank + clojure + slime. Like, in a text form, maybe?

13:02 gtrak: mboeh: futures actually use the send-off pool, check out https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Agent.java

13:02 technomancy: uvtc: 2/3rds of the entries under JSON on that page are deprecated

13:02 uvtc: Python's cheeseshop (module repository (ugh, don't like overloading that term like that)) does it that way; project maintainers specify tags for their project, and you can browse the project repository by tag...

13:03 technomancy: uvtc: that's the way to go

13:03 we should standardize on a deprecation flag too =)

13:03 gtrak: mboeh: and https://github.com/clojure/clojure/blob/d0c380d9809fd242bec688c7134e900f0bbedcac/src/clj/clojure/core.clj#L6143

13:03 technomancy: lots of 404s on that page =\

13:03 uvtc: technomancy, I emailed weavejester about a few broken links there.

13:03 technomancy: well, mostly getwoven projects I guess

13:04 uvtc: crane, work, sexpbot, fjord

13:04 technomancy: manual curation doesn't scale

13:04 uvtc: It's got to be difficult for one person to maintain that list by-hand.

13:04 gtrak: mboeh: the cachedThreadPool keeps growing, so it's meant for IO stuff like what you're doing

13:05 mboeh: I suppose I'd take my existing seq of task functions and map them to futures, and then... deref them all in sequence, I guess?

13:05 Once they've all deref'd, it means the jobs are all done, I guess

13:05 gtrak: mboeh: derefing will block actually

13:05 mboeh: Which is what I want to do -- block until they've all finished

13:06 gtrak: yea.. that'll work then

13:06 bhenry1: technomancy: i don't really have a question yet. my lein2 uberjar doesn't work, and i wondered if there was a problem before i try to figure out what i did wrong. incidentally, it works with lein1 uberjar even though my project is all lein2-ified.

13:06 gtrak: mboeh: you'll have a seq of blockings :-)

13:07 uvtc: technomancy, Ah. Here. Python's Cheeseshop calls them "trove classifiers". Here's a list: http://pypi.python.org/pypi?%3Aaction=list_classifiers

13:07 gtrak: mboeh: also consider promise/deliver

13:08 technomancy: uvtc: that looks familiar; I bet they got that list from sourceforge

13:09 llasram: I haven't had a chance to track it down yet, but has anyone else experienced that Clojure (1.4) doesn't like being in an uberjar where something else has provided a data_readers.clj ?

13:09 mboeh: gtrak: Thanks! I'll try that out. This stuff is all quite new to me so I appreciate the help.

13:10 xeqi: bhenry: what does "doesn't work" mean?

13:10 llasram: And now that I'm thinking about it, I think maybe lein needs special support for uberjaring deps with data_readers.clj

13:10 gtrak: mboeh: I enjoy thinking about it, np

13:12 llasram: technomancy: Any thoughts on data_readers.clj and `lein uberjar`?

13:13 bhenry: xeqi: technomancy: my bad. old preview. all good

13:13 technomancy: llasram: you could do that with a :filespecs entry in project.clj; check out `lein help sample`

13:15 llasram: Hmm, interesting

13:16 technomancy: hm; actually looking at that now that's a horrible API

13:16 it should be a map instead of a seq of maps

13:16 SrPx: can you save your REPL state?

13:17 llasram: technomancy: That might make it more clear, esp if the intent was for later entries to override earlier

13:17 uvtc: technomancy, now that you mention it, I'm surprised to not see a :deprecated-versions key in lein's sample.project.clj.

13:17 technomancy: uvtc: I think a general :deprecated key would be more useful

13:18 llasram: As it is... Oh, ok. I think that's the effect, by overwriting the same path in the jar file if the same path appears in the assembled filespecs more than once?

13:18 technomancy: :superceded-by [cheshire "4.0.0"]

13:18 llasram: I think the jar->uberjar copying is actually first-one-wins

13:19 uvtc: for instance, clj-json and clojure-json would point to cheshire

13:19 llasram: Oh, right -- :filespecs only affects jars, not uberjars, where uberjars are what seems to have the issue

13:19 uvtc: technomancy, do you mean that example be in the cheshire project.clj?

13:20 technomancy, right. Nice, yes, useful for when the author wants to recommend that the user upgrade/switch to another project that does the same thing but better.

13:20 technomancy: uvtc: only going to be more common as time goes on

13:21 uvtc: technomancy, I agree. Would be great for lein to be able to tell the user about it.

13:21 technomancy: probably clojars job rather than lein

13:22 users of superceded libs are more likely to be on an old version that doesn't yet know it has been superceded

13:23 uvtc: I was thinking: a user adds the coords of an older lib to their project.clj and uses it without even checking clojars.

13:24 technomancy, maybe then it would be nice if they could explicitly *ask* lein: "am I using any deprecated projects?" "Have any of the projects I'm using been superceded?"

13:25 technomancy: hm; maybe

13:25 uvtc: Gah. Always misspell that: superseded

13:28 gtrak: superceed

13:28 dnolen: SrPx: not really.

13:29 SrPx: kovasb has some ideas, but not really about saving entire app state, more workbook like.

13:29 gtrak: uvtc: who gets to decide if something has been superseded?

13:30 we need a 'lein consensus'

13:30 uvtc: gtrak, the author of a given project would decide if their project has been superseded by some other project.

13:30 technomancy: yeah, it would be for cases where a maintainer has explicitly abandoned a project

13:30 uvtc: They're the one writing their project.clj file. :)

13:32 gtrak: 'lein consensus (> clojure.data.xml lazyxml)'

13:32 uvtc: technomancy, so far, to me it seems easy to forget to check/update version numbers in project.clj files. Especially if you populate them by grabbing links from other projects you've worked on recently. That's why I think it would be important to be able to ask lein explicitly about if any of those have been deprecated/superseded.

13:33 SrPx: dnolen: okay, thank you!

13:33 technomancy: uvtc: there's a plugin for that; lein-outdated IIRC

13:37 kaoD: hi

13:42 uvtc: What is the clojars policy on keeping old releases? Does it keep all old releases forever?

13:42 technomancy: uvtc: yeah

13:42 uvtc: there's no guarantee about keeping old snapshots though

13:43 but releases are forever

13:55 scriptor: does anyone have a link handy to the clojurescript todomvc submission?

13:56 Frozenlock: Question for the congomongo users: Is there a way to do (merge {:a 100} {:a 200} {:a 300})--> {:a 300} but on the server side? (directly on the mongodb?

13:59 gtrak: hey, how would I add a custom clojure file, classpath entries and such into lein 1.x so I have some utilities in all my project repls?

14:00 cannot upgrade to 2 yet unfortunately

14:00 S11001001: gtrak: make other lein project with common utils, use checkouts

14:00 technomancy: gtrak: might be doable with a plugin, but it's going to be ugly compared to 2.x

14:00 gtrak: what's blocking the upgrade?

14:01 gtrak: other plugins and things, not just me involved

14:01 technomancy: ok, just curious

14:02 gtrak: our current build config is touchy even with 1.x versions

14:02 technomancy: haven't heard many cases of people not being able to upgrade so it always makes me wonder what's up

14:02 gtrak: yea, I'm not sure of the details, but I think it involves some custom stuff :-)

14:03 so I could make a plugin? I was looking into doing that anyway

14:03 for a different reason

14:04 technomancy: sure, in 1.x plugins just get put in ~/.lein/plugins as an uberjar and included in every project's classpath

14:04 which is really gross but might get you what you need

14:04 gtrak: gotcha, that might be simplest

14:06 zach_: Is there anything other than clj-oauth that people would recommend for supporting github oauth?

14:06 technomancy: zach_: github oauth is super-simple to consume with clj-http

14:07 zach_: technomancy: Okay, that's where I was kind of headed. Thanks!

14:07 technomancy: zach_: https://github.com/technomancy/buildkits/commit/027d7da416972892f2340bcfc0fafc18f33b68db#L5R22

14:08 zach_: technomancy: Awesome!

14:13 uvtc: Is there any mechanism for indicating which repo for a given project is the canonical one? That is, besides adding a note to the top of the readme.

14:14 technomancy: uvtc: no, and it drives me nuts

14:14 uvtc: For example, https://github.com/medSage/clj-http vs. https://github.com/dakrone/clj-http vs. https://github.com/mmcgrana/clj-http .

14:14 Hm.

14:14 technomancy: "delete everything but a readme pointing to the new one" is really the only reasonable thing to do

14:15 uvtc: How about on clojars?

14:15 technomancy: just :description

14:15 uvtc: I mean, if there are multiple like-named projects, differing only by group-id.

14:15 technomancy: oh, well the solution there is don't do that because it's terrible

14:15 uvtc: So, same story there then.

14:16 technomancy: org.clojars.* excepted

14:16 uvtc: "org.clojars.* excepted"?

14:16 kaoD: is there any good way to debug clojure in emacs?

14:17 uvtc: technomancy: Gah, sorry --- need to go read more of the docs at https://github.com/ato/clojars-web/wiki.

14:20 kaoD: not println, of course

14:21 lynaghk: scriptor: https://github.com/lynaghk/c2-demos/tree/master/todoMVC

14:21 scriptor: ah, thanks

14:22 lynaghk: scriptor: that's mine, anyway. I don't think there's an "official submission" or anything

14:22 scriptor: also, I haven't submitted it yet. Need to cut C2 0.2.0 and get some feedback on this one (please let me know if you have any questions or think things should be done differently)

14:24 scriptor: lynaghk: one thing, it doesn't seem very...mvc-ish

14:24 lynaghk: scriptor: = )

14:24 scriptor: which probably doesn't fit so well with clojure's functional sytle

14:24 lynaghk: scriptor: yeah. I'm not exactly sure how I'd make it more MVC. Maybe represent the TODO-list as a record with a ton of interfaces for "add item" and "get completed count" and stuff like that

14:24 scriptor: but that doesn't seem very Clojurey to me at all.

14:25 scriptor: lynaghk: yep

14:25 it'd basically be forcing oop onto it

14:26 on the other hand, the current one's organization is a bit all over the place, with a bunch of functions in core

14:26 while list.clj seems to contain the templates and events

14:26 Chousuke: functional UIs are hard :/

14:26 lynaghk: yep. That would be the organization. I'm thinking of list.cljs as the view, and core.cljs as the model.

14:27 er, "data/logic" bits.

14:27 if there were more than one logical grouping of data fns, I'd split them out into different namespaces

14:27 Chousuke: they're not as hard as OO-UIs sometimes = )

14:28 Chousuke: I've read lots about various technologies used to build interactive applications using functional tools but I've yet to find a software project that uses those for real things :P

14:31 edw: Hey guys, I'm running into this problem with lein as I'm trying to get Incanter up and running. Hoping someone could provide some insight: https://gist.github.com/2990375

14:31 foxdonut: Chousuke: interesting, anything in particular that looked good to you?

14:32 baoist: Has anyone had an issue with vimclojure in macvim freezing when "vimclojure#WantNailgun" is enabled perchance?

14:32 Chousuke: nah, just random things. mostly haskell :P

14:32 foxdonut: Chousuke: I hear ya. And the reactive stuff and so on too?

14:33 Chousuke: yeah

14:33 but they all have very simple examples :/

14:33 foxdonut: guess you reached the same conclusion as I did :)

14:33 technomancy: edw: ugh; why is incanter pulling in mongo?

14:33 edw: I'd recommend :exclusions

14:33 mattmoss: Okay, maybe my brain isn't working at the moment, but... If I have an agent with a simple value, e.g. (def x (agent 3)), how can I send a new arbitrary value?

14:33 Chousuke: it's really cool but it's not obvious to me how it would scale to real applications.

14:33 mattmoss: (send x 5) obviously doesn't work.

14:34 edw: Ah. OK.

14:34 It also pulls in the kitchen sink.

14:35 I looked in the project file and saw that I can just comment out the mongo support in toto.

14:36 scriptor: lynaghk: I'd say start abstracting the code out so it's more frameworky

14:37 technomancy: yet another "big pile of stuff" adherent

14:37 scriptor: for example...

14:37 uvtc: technomancy: how long do you guess until remaining details are hashed out and the new clojars is ready?

14:38 scriptor: lynaghk: (model todos []) might set up the atom and generate the add/edit/delete code for you

14:39 lynaghk: scriptor: trying to make it more frameworky seems pretty antiethical to Clojure philosophy

14:39 e.g., "treat data as data"

14:39 technomancy: uvtc: it needs two things mostly: 0) support for deploying signatures from Leiningen and 1) a process to promote existing artifacts to the S3 releases repo

14:39 scriptor: lynaghk: yes, but it'd get annoying pretty quickly to have to manually write all the getters and setters every time, right?

14:39 technomancy: uvtc: 0 is implemented on a branch waiting for a pomegranate release. not sure how long 1 will take

14:40 uvtc: we may still need to hash out some policy details too

14:40 uvtc: technomancy, thanks.

14:40 lynaghk: scriptor: We haven't been annoyed by it enough to abstract it out, and we've been making cljs apps for about 6 months full time now. That said, I can see what you're after, and it seems reasonable

14:40 scriptor: it just needs to be balanced with the fact that data isn't always going to be as simple as a vector of flat maps.

14:41 mattmoss: This may sound stupid but... any idea how to reduce #(second [% 5]) for use in send to an agent?

14:41 lynaghk: scriptor: it's easy to abstract that stuff out, but then how do you deal with the edge cases that'll start to crop up? Sometimes use the framework-generated accessors, sometimes write custom fns?

14:42 scriptor: lynaghk: right, but a large amount of data could be modeled with just vectors and hashmaps

14:42 lynaghk: scriptor: definitely. It could also be just that we don't really build standard "CRUD"-type apps, so we haven't felt what might be a very obvious/typical pressure.

14:45 scriptor: lynaghk: yea, it's just that if you have several different, but similar models, you wouldn't want to have the same edit-* clear-* add-* functions every time

14:45 gtrak: mattmoss: do you want (identity 5)?

14:45 scriptor: it doesn't really have to be a framework

14:46 lynaghk: scriptor: do you have any cljs UIs? I'd be interested to see your take on some of the problems.

14:46 (that has definitely been one of the most frustrating things about cljs---it's hard to find more-than-hello-world code to see how people approach problems in a functional way)

14:47 scriptor: lynaghk: not really, current job is to evaluate backbone for an upcoming project

14:47 I think the basic model structure is that we have images, which are contained in galleries, and then we have collections that can contain both galleries or other collections, so a basic tree structure

14:48 mattmoss: gtrak: Sending that to an agent fails the agent.

14:48 gtrak: oh? huh?

14:49 uvtc: At clojars, if you see a project there with a group-id of "org.clojars.<somebody>", that indicates that the project in question is *not* the canonical one, correct?

14:49 mattmoss: If I have (def x (agent 3))... I need something like (send x 5) , but that actually works.

14:49 xeqi: mattmoss: (constantly 5) ?

14:50 gtrak: mattmoss: ah, my bad, one level meta-er

14:50 mattmoss: xeqi: Ya, that seems to work.

14:50 I find the hardest part of learning a new computer language isn't the language itself... it's the libraries.

14:52 gfredericks: mattmoss: (constantly 5) is the same as (fn [_] 5); you just ignore the input state and return 5

14:52 well it's the same in this context

14:52 technomancy: uvtc: that's the idea

14:53 uvtc: technomancy, then what do you do when project maintainership changes? How does the new maintainer push to the canonical group-id?

14:54 dnolen_: scriptor: I'm still hoping that someone will do the CLJS work necessary to have something significantly better than JS MVCs.

14:54 scriptor: JSC MVCs are the new ORM.

14:54 tmciver: gfredericks: slight correction: (constantly 5) same as (fn [& more] 5)

14:54 xeqi: uvtc: you can add people to the group

14:54 uvtc: xeqi, oh! Thanks. :)

14:55 scriptor: dnolen_: right, I definitely don't want to see MVC bolted onto clojurescript, but the current method seems a bit too close to how it was done previously

14:55 dnolen_: scriptor: what "current method" ?

14:55 scriptor: dnolen_: er, the one that lynaghk pasted above

14:55 xeqi: uvtc: see https://clojars.org/groups/ring which has both people that have ran it

14:56 shawnlewis: dnolen_: do you have design ideas for such a thing?

14:56 uvtc: xeqi, nice.

14:56 dnolen_: scriptor: yeah there is no "current method", just a lot of different experiments about possible approach.

14:56 scriptor: right

14:57 mattmoss: gfredericks: thanks

14:58 dnolen_: shawnlewis: only sketches - someone needs to design a performant, easy to use FRP-like layer. for data I'd like to see something built over core.logic DB facilities. then you could have queries over raw (indexed) data - you don't need collections or models.

15:03 shawnlewis: dnolen_: to me it seems that contrib.datalog was probably at the right level for FRP

15:03 scriptor: lynaghk: so, in short, framework is probably the wrong word, just something that prevents too much code duplication

15:04 dnolen_: shawnlewis: it was/is incredibly slow.

15:04 shawnlewis: dnolen_: ah… i mean the api though

15:06 dnolen_: maybe i'm wrong about this, but it seems with core.logic facts are best specified as pairs

15:06 dnolen_: shawnlewis: yes though it probably wouldn't be too hard I think to build out something datalog like over core.logic either.

15:06 shawnlewis: dnolen_: right that's what I was thinking you meant by "built over core.logic DB facilities"

15:06 dnolen_: shawnlewis: no they can be tuples of any size really, though current implementation is better if < 20

15:07 shawnlewis: 2 things I haven't had time to get to, multi column keys & incremental indexing.

15:10 gfredericks: tmciver: thus my "in this context" ammendment

15:11 shawnlewis: dnolen_: i haven't gone very far down the core.logic road, but when I played with it I made everything pairs, because it wasn't clear how to do a partial fact check. For example if I have a (defrel book id reader-id writer-id), how can I state in a query that I want books where the writer id is 5? I could do (fresh [a] (book q a 5)) and leave a as a free variable?

15:11 dnolen_: shawnlewis: yes free variables

15:13 shawnlewis: dnolen_: ok, so the layer that brings it up to a datalog like interface would do that for you, because if you have a 20-sized relation you don't want to have to make 18 of those free if you're only doing a query on a pair

15:13 dnolen_: shawnlewis: yep

15:13 shawnlewis: dnolen_: or the layer could split all relations into pairs

15:15 dnolen_: are there performance implications for reducing all relations to relations between pairs, versus adding lots of free variables to queries?

15:16 cmajor7: not entirely a clojure question, but a JVM one… is there any way to find out whether a certain JVM supports GetDirectBufferAddress (e.g. JNI access to direct buffers)? e.g. is there a proof/documentation that Oracle/Sun JVM supports it? (e.g. per docs it says "Every implementation of the Java virtual machine must support these functions, but not every implementation is required to support JNI access to direct buffers")

15:16 dnolen_: shawnlewis: yes, more lookups.

15:16 tmciver: gfredericks: Ah, yes.

15:23 etosch: on calling java from clojure: i need to call a java program's main from clojure and would like to do so from the clojure repl. when the function that i'm calling finishes, it kills my current instance of the jvm. is there a neat way to call the clojure expression and either (a) block any calls the kill the java process or (b) run on another jvm? i dont necessarily need to get the data back. also, i've tried using clojure.java.shell and am having all sor

15:23 this would be general call for advice, btw :)

15:26 technomancy: etosch: it's impossible to disable the System/exit call from the main method?

15:27 ibdknox: What would be a good metric to track interest in Clojure?

15:27 skise-mou: vote for the best muscle man (from powermen,muscle hunks and muscle gallery) please vote to all groups and pages thanks

15:27 http://bestmusclepowermen.blogspot.com/

15:27 gtrak: ibdknox: google trends

15:27 amalloy: etosch: look for a program that's not so awful that it includes a call to System.exit

15:29 * technomancy suspects tracking the bounce rate of http://clojure.org/downloads would only be a good way to get depressed

15:29 etosch: technomancy: I'm in a weird position - I'm trying to write a clojure interface to some java software. It's meant to be augmented in some ways, but I don't want to mess with it in other ways. Let's say for now that I can't go into the java code and call System/exit. What are my options?

15:30 technomancy: you'll have to launch a subprocess

15:30 dnolen_: ibdknox: I rely on Twitter (hard to really follow anymore) / GitHub mostly. Are you looking for something more specific?

15:30 thesaskwatch: hi, I'm totally new to clojure. I'd like to setup a maven project using noir, make the build portable - to create war files running without dependencies, and use jetty plugin to develop - anyone here know how to do it?

15:31 ibdknox: dnolen_: just curious to see how much things track with Light Table

15:31 xeqi: etosch: subprocess, or perhaps a java.policy could stop exit calls

15:31 technomancy: https://groups.google.com/group/clojure/about <- there's always mailing list signups

15:31 xeqi: oh yeah, I bet you could plunder clojail for that

15:32 getting pretty close to 10x of what it was when I joined

15:32 dnolen_: ibdknox: I'm sure it helps quite a bit. Though it does seem to me the interest in Light Table is far broader than any interest in Clojure.

15:33 technomancy: of course back then close to 100% of clojure users were on the mailing list; I'm sure it's much lower now

15:33 ibdknox: technomancy: :)

15:33 thesaskwatch: wow, compojure looks nice

15:33 ibdknox: dnolen_: yeah, mostly just curious. A lot of people got their first taste of Clojure today I think

15:33 dnolen_: ibdknox: that said, a good Noir + CLJS mode could do for Clojure what TextMate did for Rails. I see a lot of excitement about being able to see values flow through the code immediately.

15:34 foxdonut: "I have no idea what this language is but I want that IDE!"

15:34 ibdknox: dnolen_: I wouldn't be surprised if such a thing came into existence in the not too distant future

15:34 ;)

15:35 technomancy: interesting that mailing list traffic levels seem to have dropped a bit

15:35 dnolen_: ibdknox: haha, I suspected as much. Light Table is looking like an ideal for teaching folks about Clojure.

15:35 mhanson: Exciting day.

15:35 technomancy: hopefully at least partly due to fewer people getting confused about how to install slime

15:36 dnolen_: technomancy: because there are some really good books out there now?

15:36 ibdknox: technomancy: dnolen_: combination of both probably lol

15:36 technomancy: dnolen_: yeah, plus things aren't breaking much

15:36 newsham: hi. I would like to use a clojure REPL from the shell in android, or alternately over a socket remotely.

15:37 etosch: xeqi: hrm, do you know of a clojure library for this? I'm reading up on it now.

15:37 newsham: are there any premade apps that will let you do that?

15:37 zerokarmaleft: technomancy: thank god for quicklisp

15:37 dnolen_: ibdknox: so how long before plugin APIs? Will the right side be hookable?

15:38 zerokarmaleft: so many headaches trying to get a mutual SLIME setup with CL and Clojure...i don't think i was alone

15:38 dnolen_: ibdknox: would be awesome to get custom analyzers in there ...

15:38 ibdknox: dnolen_: the instarepl is mostly an experiment, the actual thing won't have two clearly defined sides most of the time - so anything will be possible

15:38 xeqi: etosch: theres clojail, but its overkill, and delegates to the java.policy for just restricting System/exit

15:38 ibdknox: dnolen_: the "when" for plugins is still a ways out

15:39 dnolen_: ibdknox: yeah, I suspected.

15:39 ibdknox: dnolen_: but yeah, custom analyzers and such - definitely something that can be added

15:39 dnolen_: ibdknox: cool.

15:39 ibdknox: dnolen_: I was going over some ideas with folks the other day and I think I made some heads explode. Some really neat things are coming up I think :)

15:40 wohoo! 400k lines eval'd :)

15:40 normalized to 1 entry per min per person

15:41 amalloy: I've been sending people to 4Clojure for source material :)

15:41 amalloy: hah

15:42 newsham: hmm looks like the "ClojureRepl" app for android supports something called "vimclojure server"

15:42 bbloom: ibdknox: oh, i didn't realize: is lightable sending stuff to your servers for evaluation?

15:42 newsham: that will let me access a repl remotely?

15:42 ibdknox: bbloom: no just some metrics, no code is sent just num lines

15:42 bbloom: ibdknox: ah ok

15:43 that makes more sense :-)

15:43 amalloy: ibdknox: i'm not finding the light-table demo that useful yet. i'm doing transformations on small-to-medium maps, and the whole thing prints out every time i refer to it or give it a name in a let-binding; there's so much clutter i can't see any of what's going on

15:43 ibdknox: amalloy: it's likely not useful to you regardless

15:44 amalloy: not in its current state anyways

15:44 amalloy: as it stands its primarily helpful for understanding how Clojure works, less how your project works

15:44 amalloy: fair enough

15:44 ibdknox: basically just a scratch pad at this point

15:45 xeqi: newsham: I've seen sattvik do a code push to an android device with it

15:45 ibdknox: amalloy: that will be changing soon :)

15:45 amalloy: do you have a clever plan to illustrate recursion yet, or is that still an unsolved problem?

15:45 newsham: i just want a REPL from a real terminal from my computer (ie. over "adb shell" or over the net)

15:45 freiksenet: I dunno what's the point of having instant repl if people seldom write stuff taht evaluates to values on top-level

15:46 amalloy: freiksenet: at the repl, you do that all the time

15:46 freiksenet: amalloy: yeah, at the repl

15:46 not inside the code.

15:46 ibdknox: it's a repl

15:46 bbloom: freiksenet: it's a new kind of repl

15:46 amalloy: (defn foo [x] (...)) (foo 32) ;; did i get the value i wanted?

15:46 freiksenet: also eye candy started annoying me from first second

15:46 ibdknox: lol

15:46 freiksenet: you're not in my target demographic I think :)

15:47 amalloy: i told you including lens flare was a mistake, ibdknox

15:47 ibdknox: amalloy: yeah a few ideas, though our focus is on letting people edit real things now and less on making the instarepl some crazy

15:47 amalloy: hahaha

15:47 freiksenet: well I am a seasoned lisp developer, how am I not a target demographic :)

15:47 bbloom: amalloy: yeah man, lens flair is out. now eye aperture blue shift is in

15:47 ibdknox: just to fuck with people I should release an update that makes everything bright pink. That will win me supporters ;)

15:47 freiksenet: not all Lisp developers are the same

15:47 amalloy: gotta get dat anisotropic filtering

15:48 freiksenet: maybe. I currently see the problem with this as with slime repl substitute cause it occupies too much horizontal space, so you can't have code and repl open at the same time

15:49 ibdknox: that's a cosmetic issue, not a fundamental one

15:49 freiksenet: though if this is _repl_ not code editing mode then I start to see the appeal

15:49 ibdknox: yeah, it's meant to be a repl at this point

15:49 gtrak: freiksenet: have you been keeping track of the development? it's more of a framework I think?

15:49 freiksenet: also not paredit hurts.

15:50 no*

15:50 ibdknox: yeah, I'll convince someone to fix that at some point :)

15:50 freiksenet: maybe I should write such repl for slime %)

15:51 ibdknox: I have no doubt it could be done

15:51 Raynes: freiksenet: I think the target demographic is not people who think eyecandy is for them damn kids and their dog.

15:51 freiksenet: Raynes: i've never said that.

15:52 ibdknox: Raynes: damn those kids... damn them to hell.

15:52 freiksenet: I just said eyecandy just annoys me personally. I hope it will be optional.

15:52 Raynes: ibdknox: I think you're the first developer who will need to add an ugly-mode to their application in order to please the masses.

15:52 :p

15:52 amalloy: i don't konw what eye candy you mean, freiksenet

15:52 freiksenet: I am definetely not going to use it, if editor takes my valuable milliseconds to do some animation

15:53 amalloy: the fading in/out animation

15:53 wkelly: haha

15:53 amalloy: Raynes: emacs, bro. it's just on by default

15:53 ibdknox: the thing that happens exactly once?

15:53 lol

15:53 Raynes: You are like every person on hacker news ever.

15:53 wkelly: he did say valuable milliseconds

15:53 gtrak: I love me some eye candy

15:53 Raynes: :>

15:53 ibdknox: haha

15:53 Raynes: amalloy: You got me there.

15:54 freiksenet: well I don't think you will earn hacker news love if you dismiss 'those stupid hackers' ;)

15:56 amalloy: maybe chris granger could intercede on ibdknox's behalf. i'm pretty sure that guy has HN wrapped around his finger

15:57 ibdknox: lol

15:58 Raynes: ibdknox beat HN like a video game on easy mode.

15:58 ibdknox: freiksenet: the original light table post was the 12th highest in HN history. Those HNer's seem to like eye candy too :) It's not for everyone though, that's true with all things. If you're happy with an editor, as I suspect many will be, then be happy with it

15:59 freiksenet: ibdknox: I am not happy with an editor, it's just hte best there currenlty is

15:59 I'd love to have slime-like stuff for every language, not just Common Lisp and (much less) clojure

15:59 wkelly: People are only happy with editors when members of the opposing editor faction are around.

16:00 ibdknox: lol

16:00 Raynes: wkelly: Except for ST2 users. They just want more gloss.

16:00 If ST2 gets any more glossy, you'll be able to swim in its surface.

16:01 gtrak: I'm really looking forward for LT so I don't have to learn elisp... I want a full-clojure dev experience

16:01 Raynes: You have to learn elisp for that?

16:01 I must have a half-clojure dev experience.

16:01 gtrak: Raynes: well, I don't really feel like investing in emacs for tools and things?

16:02 ibdknox: swank users, if you run swank on one computer, can you access it from another computer on the network and run arbitrary code? (I assume yes)

16:02 Raynes: ibdknox: I'm pretty sure you can.

16:02 hyPiRion: ibdknox: It's on a port, so yes.

16:02 freiksenet: ibdknox: for CL you can if you hack one dynamic variable

16:02 otherwise it listens on localhost only

16:02 ibdknox: someone brought that up about LT and I hadn't considered that

16:02 freiksenet: not sure about clojure

16:02 pcavs: Is it possible to destructure (deftype …) ? This doesn't work, but is there another way? (deftype Wrapper [a] Monad (bind [(Wrapper. x) g] (Wrapper. (g x)))) ?

16:02 benkard: @ibdknox Yes, but by default, Swank only listens on localhost.

16:02 amalloy: ibdknox: yes, though it's a bit more squirrely than doing locally

16:03 ibdknox: I see

16:04 JulioBarros: Does anyone know of a simple form based authentication app using cemerick's friend. There is something I'm missing but can't figure out what.

16:05 cemerick: JulioBarros: There's a fairly simple mock app in friend's repo that demonstrates most of its features and the included workflows, including forms.

16:06 There's no UI, but that's irrelevant anyway.

16:06 benkard: I wonder whether using something like a named pipe would be preferable to a TCP socket. Can you tunnel named pipes through ssh somehow?

16:06 raek: pcavs: no, but you don't need to for the instance argument. the fields are accessible from the methods implicitly: (deftype Wrapper [a] Monad (bind [_ g] (Wrapper. (g a))))

16:07 wkelly: benkard: that is craziness!

16:07 benkard: :)

16:07 JulioBarros: cemerick thanks ... i was hoping for something even simpler (without the api-users and open id workflow) ... I'll keep working with it.

16:08 xeqi: JulioBarros: clojars uses friend's form based auth for the website portion

16:09 cemerick: xeqi: oh, sweet! I guess it went in smoothly for you?

16:10 newsham: hmm what is "<LocalLeader>"?

16:10 dnolen_: pcavs: regular destructuring works fine on deftype as long as you implement some interfaces (ILookup etc)

16:10 xeqi: cemerick: I skipped over friend doing authorization, and handle that in app, but the authentication part made adding https deploys easy

16:10 cemerick: nice

16:10 xeqi: cemerick: it also uses pomegranate for the ssh deploys btw

16:11 cemerick: xeqi: I remember you thinking around the authorization bits a while back. What would have made friend easier in that area?

16:12 xeqi: cemerick: I was hoping for a way to query roles at authentication time, instead of once at authorization time

16:12 cemerick: ack, I have those backwards

16:12 cemerick: i.e. touch the db, etc?

16:13 xeqi: yeah, basically in clojars you can be added to a group by someone else

16:13 nDuff: woo!

16:13 xeqi: if you get roles at authentication time, as currently, then anyone logged in doesn't have the new access

16:13 * nDuff now has (some of) his changes merged into clojure.osgi

16:15 xeqi: there are ways around it, like duplicating the group/role system as a heirarchy in memory

16:15 cemerick: xeqi: understood. There is a way to do that now, but it's a bit hacky. I need the same thing shortly, so hopefully something sane will come out of that.

16:15 xeqi: but it was easier just to make my own authenticate that hit the db

16:15 foxdonut: freiksenet: so was it really the fade-in when light table first loads, that you were complaining about?

16:15 cemerick: nDuff: well done :-)

16:15 freiksenet: foxdonut: also reloads

16:16 that was trolling :)

16:16 foxdonut: ah ok :)

16:16 xeqi: also there was some funnyness around :unauthenticated-handler, where I had to make my own that saved the current-uri for redirection after login

16:16 but I forget what that was offhand

16:16 * :unauthorized-handler

16:17 cemerick: saved, as in, persisted somewhere?

16:17 xeqi: cemerick: https://github.com/ato/clojars-web/blob/master/src/clojars/web.clj#L172

16:17 I can try and figure out why I had to do that later

16:18 cemerick: Oh. That should Just Work™.

16:18 foxdonut: freiksenet: I'm on the other side of the spectrum, I want as many fade effects as possible and I want the color scheme to change automatically throughout the time of day!

16:18 xeqi: I thought so.. I'll explore sometime

16:18 cemerick: Yeah, if you're in the neighborhood and it seems wonky, do file a bug.

16:18 freiksenet: foxdonut: latter is not eye candy ;)

16:18 cemerick: Thanks for the feedback. :-)

16:19 foxdonut: heh

16:20 akhudek: cemerick: I've also used friend on an internal admin panel

16:20 took a while for me to understand the workflows, but it worked well enough

16:21 cemerick: akhudek: Cool, glad it worked out. I'm going to be back at it in a little while, so the docs should get some love.

16:21 Hopefully I'll also squeeze out a friendly demo site, etc.

16:21 akhudek: cemerick: any more thoughts on validation? I noticed a post of yours where you mentioned trammel

16:22 our main webapp has a security system that combines authentication and validation

16:22 cemerick: akhudek: You mean generalized web submission validation?

16:23 akhudek: yes, in a way authorization and validation have the same goal. Sometimes you have a resource that you need secured: "does this user own object with id x?"

16:24 so our home grown security framework works by checking a series of policy functions for each route, one of which is "is the user authenticated?"

16:24 JulioBarros: cemerick I needed to set the login-uri or it would not work. Does that make any sense? Looks like it should be optional and default to "/login".

16:25 cemerick: JulioBarros: Interesting; yeah, that should default sensibly. Maybe open an issue with your usage of authenticate?

16:25 alfborge: I'm using enlive-html to scrape some html, but it seems it barfs on my input. Are there any other libraries out there that might work?

16:25 cemerick: akhudek: Interesting. I'll have to ponder that for a bit.

16:25 JulioBarros: cemerick ... could be one of dozens of things I'm doing wrong.

16:25 cemerick: Nothing new off hand, though. :-)

16:25 JulioBarros: :)

16:25 xeqi: JulioBarros, cemerick: I also remember having to add that

16:26 cemerick: JulioBarros: in that case, definitely open an issue :-)

16:26 alfborge: The offending html is <table><tr><td>..</td><input ...><td>..</td></tr></table>, causing enlive-html to split the row instead of wrapping the input in a td.

16:26 xeqi: I'll go through clojars's auth sometime this week and make issues for anything wierd like that

16:26 JulioBarros: xeqi Thanks! ... glad I'm not totally off base.

16:27 cemerick: alfborge: enlive uses tagsoup for sanitizing HTML; not sure if you're going to get much better than that. There might be some knobs to it that would help?

16:28 e.g. some breadcrumbs might be here that'll be useful: https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L36

16:28 foxdonut: ibdknox: something funny happens if you load a fresh the light-table playground page and just add an extra 'd' (or whatever letter) next to 'my-add'

16:29 ibdknox: on the right, '(defn my-add [3 45]' becomes '(defn my-addd 3a45b]'

16:32 ibdknox: foxdonut: lol interesting. something gets out of sync with that.

16:35 foxdonut: ibdknox: impressive though. I'm lovin' it! Keep up the great work.

16:36 adeelkh: what happened to clojure.core.condition, is it still in 1.3.0?

16:36 clojure.contrib.condition i mean

16:37 Bronsa: adeelkh: see https://github.com/scgilardi/slingshot

16:37 adeelkh: ah, thanks

16:45 alfborge: cemerick: Can't see any knobs that seem likely to affect how it wraps my input-element. :(

16:45 Raynes: Turn all your knobs just to be sure.

16:45 alfborge: So, anyone know of alternatives to tagsoup that does a better job of parsing the way browsers parse?

16:46 Raynes: https://github.com/weavejester/crouton

16:46 Don't know if it does a better job or not, but hey, it's Clojure and isn't tagsoup.

16:46 Tagsoup gives me the willies.

16:46 It uses jsoup./

16:47 I like vegetable myself, but this is good too.

16:50 Chiron: Hi, kindly check "Composite Columns" section of https://github.com/Netflix/astyanax/wiki/Getting-Started

16:50 what is the idiomatic Clojure way to implement something like SessionEvent?

16:56 Frozenlo`: Is there a way to change the default "page not found" in noir?

17:02 dsrguru: if using loop/recur gives me a reversed list, will I get better space and/or time performance in clojure by using non-tail recursion or loop/recur but reverse the result?

17:02 raek: dsrguru: there is a third option. instead of consing into a list you could conj onto a vector

17:03 dsrguru: raek: right, this is clojure we're talking about. Thanks :)

17:03 amalloy: or use a lazy seq instead of loop/recur

17:03 raek: ,(loop [n 5, v []] (if (zero? n) (seq v) (recur (dec n) (conj v n))))

17:03 clojurebot: (5 4 3 2 1)

17:03 raek: amalloy: good point

17:04 amalloy: &((fn step [n] (when (pos? n) (cons n (step (dec n))))) 5)

17:04 lazybot: ⇒ (5 4 3 2 1)

17:04 arrdem: ,(doc conj)

17:04 clojurebot: "([coll x] [coll x & xs]); conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). The 'addition' may happen at different 'places' depending on the concrete type."

17:04 dsrguru: amalloy: in a short sequence of 1000 or fewer elements, would a lazy sequence have overhead that makes it slower?

17:05 amalloy: in a short sequence of 1000 or fewer elements, it's pretty unlikely you would notice

17:05 dsrguru: amalloy: well, if the operation were performed many times on that short sequence

17:06 amalloy: dsrguru: you're optimizing too soon. just write it the way that makes the most sense, and if it's untenable try some profiling

17:07 dsrguru: kk I just want to get used to writing idiomatic clojure code from the get-go

17:07 gtrak: dsrguru: if you don't care about laziness try mapv

17:07 Raynes: In that case, you might as well just have amalloy write all your code and avoid the suffering.

17:08 dsrguru: haha

17:08 gtrak: thanks I'm looking it up now

17:08 Chiron: Sorry, any one noticed my question? appreciate your time

17:09 cldwalker: if anyone has a moment, i'd appreciate any feedback on my first clojar, table - https://github.com/cldwalker/table

17:09 dsrguru: gtrak: mapv doesn't show up in my repl

17:09 ,(doc mapv)

17:09 clojurebot: "([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & ...]); Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."

17:09 gtrak: 1.4

17:09 dsrguru: ah

17:09 gtrak: ,(source mapv)

17:09 clojurebot: Source not found

17:10 dsrguru: gtrak: wait I'm running 1.4

17:10 yedi: what are "unrolled" arguments

17:10 gtrak: &(source mapv)

17:10 lazybot: java.lang.RuntimeException: Unable to resolve symbol: source in this context

17:10 gtrak: dsrguru: well it should be there then :-)

17:10 brehaut: &(use 'clojure.repl)

17:10 lazybot: ⇒ nil

17:10 brehaut: &(source mapv)

17:10 lazybot: ⇒ Source not found nil

17:11 gtrak: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6110

17:12 dsrguru: gtrak: so it turns out when I run the clojure repl directly, I have mapv, but when I run the repl through leiningen, I don't have it =O

17:13 technomancy: dsrguru: you're not running 1.4

17:13 dsrguru: technomancy: I'm running 1.4 in my regular clojure repl, but not when I run `lein repl' for some reason

17:13 maybe leiningen uses its own version of clojure, and mine is out of date

17:13 gtrak: yup

17:14 dsrguru: for lein 1.x I keep around a test project for stuff like that

17:15 technomancy: dsrguru: you're running `lein repl` in a project that declares a dependency on Clojure 1.4?

17:16 dsrguru: technomancy: no I was just running `lein repl' as my inferior-lisp program in emacs, not for a specific project

17:16 gtrak: all right everything's working now, thanks

17:16 dnolen_: ibdknox: you've probably set some kind of Lisp record.

17:16 bhenry1: what is the version of java best for clojure on ubuntu?

17:16 dsrguru: so I don't even need my distro's clojure package if lein duplicates it

17:16 ibdknox: dnolen_: oh?

17:17 gtrak: bhenry: oracle jdk7 64-bit works fine

17:17 ibdknox: I wonder how many lines of Clojure are publicly available...

17:17 dnolen_: ibdknox: half a million lines of Lisp evaulated in 5 hours?

17:17 technomancy: dsrguru: right; installing clojure is widely seen as an antipattern

17:17 ibdknox: dnolen_: yeah probably

17:17 lol

17:18 gtrak: bhenry: try this ppa: https://launchpad.net/~webupd8team/+archive/java

17:18 raek: dsrguru: running `lein repl` outside a project means "I don't care what clojure version I get, just give me a repl"

17:18 technomancy: bhenry: `sudo apt-get install leiningen` should be all you need

17:18 it'll pull in openjdk by default I think

17:18 bhenry: technomancy: that's perfect. thanks. is that lein1 still?

17:19 technomancy: bhenry: yeah, still a bit of a ways away from packaging 2.x

17:19 dsrguru: b

17:19 woops wrong buffer

17:20 ystael: It seems like midje-mode sends my facts to be evaluated in my currently open swank-clojure repl, which means they get the namespace-declaration context of the repl rather than the test file in which they live. Is this intentional?

17:21 raek: ystael: I don't think it does that for me...

17:21 ystael: (i.e., no test will work until i (use 'midje.sweet) in the swank-clojure repl)

17:21 * raek checks

17:21 iwo: hey, i'm seeing an error when trying to use the .. form:

17:21 raek: ystael: how do you run the tests? C-c ,?

17:21 iwo: "No matching method found: .prepare for class de.flapdoodle.embedmongo.MongoDBRuntime"

17:22 ystael: raek: C-c . actually, but both are midje-check-fact

17:22 iwo: but 'prepare' IS A METHOD on this class

17:23 raek: ,(macroexpand '(.. MongoDBRuntime prepare))

17:23 clojurebot: (. MongoDBRuntime prepare)

17:24 Frozenlock: ibdknox: Is there a way to change the default "page not found" in noir?

17:24 Raynes: Yup.

17:24 set-page!

17:24 hiredman: iwo: is it a public method? are you passing the right arguments? is a public method inherited from a private class?

17:24 Raynes: One moment, I'll get you an example.

17:24 raek: ystael: ok, C-c . fails for me too when the namespace hasn't been loaded

17:24 Frozenlock: Raynes: thanks, let me see the doc for this one

17:24 iwo: hiredman: here's the class:

17:24 https://github.com/flapdoodle-oss/embedmongo.flapdoodle.de/blob/master/src/main/java/de/flapdoodle/embedmongo/MongoDBRuntime.java

17:24 hiredman: iwo: I am not readding that

17:25 but you should

17:25 raek: ystael: but after I have C-c C-k'ed the namespace C-c . works regardless of what namespace the repl is in

17:25 Raynes: Frozenlock: https://github.com/Raynes/refheap/blob/develop/src/refheap/views/home.clj#L10

17:25 raek: (so I think C-c . behaves the same as M-C-x)

17:26 ystael: raek: hm. i haven't been C-c C-k to compile and load the entire test file, that's probably the problem

17:26 iwo: hiredman: the method is public, it takes one argument and i am supplying an argument of the correct type, it is not inherited from a superclass

17:26 ystael: (i.e., it's entirely reasonable for my repl to object that no one told it to load midje.sweet)

17:26 let me try that

17:26 Frozenlock: Oh this is good for every html error code! Thank you very much :)

17:27 hiredman: iwo: are you sure the source you are reading matches the version of the jar you are using?

17:27 raek: it could be convenient if M-C-x and C-c . would require the namespace if it hasn't been loaded

17:27 ystael: raek: yep, that did it, thank you very much

17:27 raek: np :)

17:28 ystael: (alter ystael-pebkac inc) ; :)

17:28 iwo: raek: thanks, i had forgotten macroexpand, i'll try there

17:29 hiredman: yes, very sure. when i rearrange to not use .. the call works (maybe i'm misunderstanding ..)

17:29 raek: iwo: what does your call look like?

17:30 mmarczyk: ibdknox: wow 8-O

17:30 raek: (. Class staticMethod ...) and (Class/staticMethod ...) should work for static methods

17:30 but not (.staticMethod Class ...)

17:30 iwo: raek: http://pastebin.com/c69VBd1Q

17:31 raek: iwo: you don't need the dots with ..

17:32 (.. MongoDBRuntime (getDefaultInstance) (prepare ...) (start))

17:32 or

17:32 iwo: raek: thank you!!

17:32 raek: (-> MongoDBRuntime (.getDefaultInstance) (.prepare ...) (.start))

17:33 sorry, the -> line won't work if any of the methods are static

17:33 Raynes: iwo: Also, https://github.com/seancorfield/congomongo

17:33 Not sure if you knew about that.

17:34 iwo: Raynes: yes, cheers!

17:35 i believe my colleagues have decided to go with Monger instead (http://clojuremongodb.info/)

17:35 mmarczyk: ibdknox: that's sooooo fun :-D -- https://www.refheap.com/paste/3316

17:35 Raynes: Yeah, it certain has pretty going for it.

17:36 ibdknox: :)

17:36 Raynes: mmarczyk: BTW, sorry you did all the work on the jython stuff just to end up not being able to use it.

17:37 mmarczyk: ibdknox: also fun is how (java.util.UUID/randomUUID) gets reevaluated (do you plan a "freeze this form" feature? -- erm, sorry to bug you already :-D)

17:37 Raynes: not at all, that was fun

17:38 yehohanan7: hey, I am new to clojure and i am trying midje for testing. I just want to know how do you do complex assertions using midge like check for not null, check for size of the returned value from a function etc?

17:39 ibdknox: mmarczyk: huh, hadn't thought about that, maybe! In the near term we're focusing on being able to actually edit real things :)

17:40 mmarczyk: ibdknox: :-)

17:41 ibdknox: sure... I still can't keep myself from mentioning that it would be nice for *1 ... *3 (and on?) to refer to previous forms' values... um, perhaps only once it's possible to edit real things though :-)

17:45 treehug: in clojurescript, is there a short cut for this kind of form? (set! (.-prop1 (.-prop2 (.-prop3 foo))))

17:46 bbloom: dnolen_: now you see why i had some extra time to work on cljs -- http://techcrunch.com/2012/06/25/salesforce-acquires-techstars-and-techcrunch-disrupt-alum-thinkfuse/ :-)

17:47 dnolen_: treehug: (set! (.. foo .-prop3 .-prop2 .-prop1) ...)

17:47 Bronsa: ..? not ->?

17:47 dnolen_: treehug: (set! (.. foo -prop3 -prop2 -prop1) ...)

17:48 treehug: ah thanks

17:48 dnolen_: treehug: is what I meant.

17:49 alfborge: Raynes: thanks, I'll look into crouton. :)

17:49 dnolen_: bbloom: nice, so you're going to be taking a bit of a break? :)

17:50 xmux_: Is there some way to make the clojure compiler print something other than the whole compiler backtrace when compilation fails?

17:50 dnolen_: xmux_: >= 1.3 has pretty stacktraces. tools don't use it tho far as I know.

17:51 gfredericks: should the "clojure.core//" exception in the clojure reader be considered a bug since it prevents referring to cljs.core// ?

17:51 technomancy: fsvo "pretty"

17:51 xmux_: I don't want a prettier stack trace, I'm thinking something more like a list of error messages

17:51 gfredericks: (i.e., should it be generalized?)

17:52 dnolen_: xmux_: unmunged & mostly Clojure errors.

17:52 bbloom: dnolen_: not a big break -- i'd get too bored :-)

17:54 xmux_: Is that something I can enable in a lein project file? I'm already compiling with 1.3

17:54 technomancy: xmux_: the nicest stack traces come from clj-stacktrace, which has lein integration

17:54 thesaskwatch: is there a way to remove the "resources" prefix from compojure lookup location for resources?

17:55 weavejester: thesaskwatch: What prefix?

17:55 thesaskwatch: when I do (route/resources "/" ) it will lookup resource files in "resources/public" directory as far as I understand

17:56 amalloy: thesaskwatch: only because resources is on the classpath

17:56 thesaskwatch: I can change the public part with :root option

17:56 amalloy: (and the project root isn't, thank god)

17:56 Raynes: Actually, (route/resources "/") serves from resources/* doesn't it?

17:56 thesaskwatch: but I'd like to remove the resources part as well

17:56 weavejester: thesaskwatch: What amalloy said :) - Leiningen by default adds the resources directory to the classpath. You can change which directory via the project.clj file.

17:56 thesaskwatch: I'm using only maven, no leiningen

17:57 weavejester: Raynes: It serves from resources/public by default, otherwise it would expose your source code.

17:57 amalloy: thesaskwatch: i doubt you really want to do that. that exposes, for example, your source

17:57 thesaskwatch: nope, I'm having source code in WEB-INF dir

17:57 Raynes: weavejester: Ah, I see.

17:57 thesaskwatch: it will not be in the war

17:57 weavejester: thesaskwatch: When you create a war, the resources directory will go away

17:57 Raynes: weavejester: What do you think of lib-noir btw? Well rounded?

17:58 weavejester: thesaskwatch: It puts the resources in the war classpath directory (WEB-INF I think)

17:58 thesaskwatch: if it goes away then how do I distribute the resources?

17:58 dracman: Kann das sein das Mori fett geworden ist?

17:58 thesaskwatch: ah ok

17:58 dracman: (sorry wrong channel)

17:58 xmux_: Why would I want to see the full stack trace of the compiler when compiling my program fails? Am I doing something wrong? Doesn't this bother anybody else?

17:58 thesaskwatch: ok, so is the "resources" part hardcoded in compojure?

17:59 weavejester: thesaskwatch: No, Compojure just picks up resources from the classpath. Leiningen happens to put the resources subdirectory on the classpath.

17:59 technomancy: xmux_: there's a branch of clj-stacktrace that trims all that crap out

18:00 weavejester: Raynes: I'd be tempted to split lib-noir up further, but I like small, focused libraries.

18:00 gfredericks: oh cljs.reader generalizes it; that's interesting

18:00 technomancy: weavejester: thank goodness you do =)

18:00 Raynes: weavejester: That was actually my first inclination (therapy), but ibdknox wanted to keep things a little more contained.

18:00 weavejester: brb

18:00 thesaskwatch: then why putting the html file in root war directory and using (route/resources "/" { :root "/" } ) doesn't work?

18:00 xmux_: technomancy: Ok, thanks, I'll try that

18:01 Raynes: weavejester: In general, all of these things are very lightweight and as long as noir as around, they will all be maintained in tandem.

18:01 thesaskwatch: ok, maybe I'll try with public directory as a starting point

18:01 weavejester: thesaskwatch: The resources function serves resource - i.e. things on the classpath.

18:01 ibdknox: my point was mainly that if you wanted stateful sessions, what's the probability you don't want stateful cookies too?

18:02 there's little else in there

18:02 weavejester: thesaskwatch: The root of a war isn't on the classpath

18:02 thesaskwatch: weavejester: are you sure? I remember using it in spring mvc projects

18:04 weavejester: thesaskwatch: As far as I know. Java tends to confuse matters, however, and for web projects has a different type of resource.

18:04 thesaskwatch: Ring/Compojure just use the normal type of resource

18:05 thesaskwatch: weavejester: ok, then I'll just add it to /src/main/resources, so it should get to /WEB-INF/classess and thus effectively root

18:06 weavejester: thesaskwatch: src/main/resources should be the same as resource/main/resources, as both src and resources are on the classpath.

18:06 thesaskwatch: resource will be not on classpath, as it is standard maven setup

18:07 weavejester: thesaskwatch: Ah, you're using Maven. I try to avoid that :)

18:08 thesaskwatch: I want to make the build standard java env compatible - so no leiningen for me

18:09 ok, the src/main/resources with :root "/" does work

18:09 * talios looks up at clojure/maven talk

18:11 thesaskwatch: anyone else thinks adding .exe extension for web services is mindfuck?

18:11 weavejester: thesaskwatch: exe extension?

18:12 talios: euu

18:12 weavejester: thesaskwatch: I don't think you want to set your root to "/" - that'll expose *all* your classpath

18:12 thesaskwatch: i.e. people will be able to read your Clojure source code.

18:13 thesaskwatch: weavejester: ok, I'm trying to check it now .. but anyway .. this is an internal app

18:16 ok, so now I left the defaul root (public) and moved index.html into /src/main/resources/public

18:16 seems like the right solution to me

18:16 and it works too

18:18 mmarczyk: Raynes: is the current state of RefHeap's develop supposed to be unrunnable in lein?

18:19 Raynes: mmarczyk: It should run fine in lein 2.

18:19 mmarczyk: Raynes: it doesn't for me :-(

18:19 Raynes: mmarczyk: What happens?

18:20 mmarczyk: oh wait

18:21 Raynes: https://www.refheap.com/paste/3317

18:24 Raynes: mmarczyk: I am unable to reproduce.

18:26 mmarczyk: :-(

18:29 thesaskwatch: thank you weavejester

18:34 KirinDave: Don't you hate when libraries are everything you need except the last 1%?

18:35 milieu, for example, is great. Except that for some crazy reason it only ever uses clojure.java.io/resource to load resource files. You can't specify arbitrary locations for config files.

18:35 technomancy: could be worse; could be a framework that's everything you need except the last 1% =)

18:35 KirinDave: In general, the obsession with resources seems crazy to me. Operationally flawed for config

18:35 You have to _cut a build_ to apply configuration changes?

18:35 Insane.

18:35 Utterly insane.

18:36 nDuff: You _can_ have a classloader that looks somewhere other than within a jar for a resource.

18:37 gtrak: erg... why not use an inputstream like a normal person?

18:37 technomancy: KirinDave: most deployment schemes place a dir on the classpath in front of the jars

18:37 cutting new jars to change a config val *is* crazy

18:38 gtrak: or just call slurp?

18:38 KirinDave: Yeah

18:39 technomancy: Man that is not an inexplicable deploy nightmare waiting to happen. :\

18:39 technomancy: we used it without any trouble for 2 years at my last job

18:40 well, it's possible there was trouble we just couldn't see because it was masked by huge piles of chef craziness

18:40 maslow's hierarchy of deployments, etc

18:40 KirinDave: I've never done it this way

18:41 is it sensible then to say java -cp /var/conf/alexandr -jar alexandr-BLAH.jar argz?

18:41 lynaghk: KirinDave: I liked your CLJS:JS analogy. I take it the next conj we'll all be wearing tophats and smoking cigars

18:41 KirinDave: lynaghk: Monocles are also key

18:41 technomancy: KirinDave: we had lein-tar spit out a wrapper shell script

18:42 KirinDave: technomancy: Our deployment process cannot tolerate that.

18:42 technomancy: KirinDave: you use uberjars?

18:42 KirinDave: We do, but the way we get them

18:42 And the way things are set up

18:42 (chef craziness, you see)

18:43 technomancy: well according to my employer everyone should use env vars

18:43 but screw that; I'm not restarting my JVM just to change a single setting

18:43 KirinDave: Env vars are brittle anyways

18:44 Way too easy to change and tough to standardize.

18:44 Config files are superior because their scope is so limited. If you want cascading semantics your conf file tool can build it and ostensibly do so responsibly.

18:45 lynaghk: ^ whoa, that is my "sleeping" macbook air. dying to be on teh internetz.

18:51 cemerick: lynaghk: it heeds the call of the mothership :-P

18:52 lynaghk: cemerick: I'm still not used to this always-on computer stuff.

18:56 mmarczyk: Raynes: technomancy: so when lein / lein2 pulls in the deps for refheap, it only gets ring-1.1.1.jar and never gets the jars for ring-core etc. :-(

18:57 I may be going crazy, though... I'll probably just sleep on it.

19:03 jlewis: anyone know ballpark the size of the average entry in PersistentHashMap?

19:10 mmarczyk: jlewis: the bookkeeping around a key/val pair is exactly two pointers per "regular" node involved in storing it, with the number of such nodes dependent on how long a suffix of the hash is required to pick a unique spot; hash collisions are handled by association lists (well, actually arrays are used)

19:11 if that's what you mean

19:11 (by "regular" node I mean not-a-HashCollisionNode)

19:13 KirinDave: Oh I forgot this fun part

19:13 When you include a library that has much older dependencies than yours

19:13 and the URLClassLoader just flips out.

19:13 technomancy: Has a more elegant solution to this problem come up, or is the answer still "exclusions, exclusions everywhere?"

19:17 nDuff: KirinDave: ...well... better management of transitive dependencies is something OSGi tries to add to the Java ecosystem, but I'm not sure I'd describe it as elegant.

19:21 fenton: where would i find the documentation to describe (ns ^{:docs "" :author ""} my-ns). I.e. I want to know what are the possible options to this thing ^{. Is that a metadata symbol or something?

19:27 technomancy: fenton: the docstring is the only thing that's used; you don't need to use metadata syntax for that

19:28 just (ns my.ns "It does a thing with another thing" [...])

19:28 fenton: ok, but wouldn't you get a nicely formatted ?javadoc? or something with those extra bits?, and where would that type of thing be documented if anywhere?

19:28 hard too good ^{ symbols...

19:29 *google

19:31 tmciver: fenton: that's metadata. metadata is just a clojure map and it starts with ^

19:31 technomancy: the docstring shows up in doc and (I believe) apropos

19:31 having it in html documentation would depend on the tool you use to generate your docs

19:31 fenton: but authorship info doesn't belong in metadata anyway, it belongs in git

19:31 fenton: thanks guys...really appreciate the hand holding while i get started in this great stuff!

19:34 whats the normal way to create docs for clojure code?

19:34 technomancy: fenton: doc/intro.md

19:34 at least, that should be the normal way

19:34 you can autogenerate API reference docs too with stuff like marginalia, but that's no replacement for writing real prose

19:34 fenton: got it. real prose being pure clojure code without comments, i take it? :)

19:35 technomancy: no, prose is just like ... english text

19:35 like https://github.com/technomancy/leiningen/tree/master/doc

19:35 fenton: ok...understand

19:40 brehaut: technomancy: i think marginalia is almost more useful as a way to read the program rather than learn the api

19:40 Raynes: brehaut: It is. I've given up on it for API documentation.

19:40 I still think it could be extended to do both well, but I don't have the interface skills and time to make it happen.

20:06 fenton: I'm trying to use clojure to represent a tree, where each node has a human readable string, (the label), and an id. I'll need to insert sub-trees, search for the children of a provided id, etc... any thoughts?

20:06 technomancy: ,(doc update-in)

20:06 clojurebot: "([m [k & ks] f & args]); 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created."

20:07 fenton: zippers seem to be just a right/left/down type of data structure...but I'd need to be able to say: give me the first level of child nodes under node XYZ...etc..

20:07 I'm not sure if I should just use a list.

20:08 ohpauleez: fenton: Yeah, I'd just use standard clojure maps. You can use get-in, update-in, and the threading macro (->)

20:08 technomancy: clojurebot: what's the best way to represent x?

20:08 clojurebot: maxine is http://research.sun.com/projects/maxine/

20:08 technomancy: =(

20:08 ohpauleez: technomancy: but maxine is a great project

20:09 technomancy: clojurebot: what's the best way to represent x is <reply>the best way to represent X is as a regular clojure map. (for most values of x)

20:09 clojurebot: In Ordnung

20:09 technomancy: ohpauleez: true

20:09 ohpauleez: fenton: If you need to do raw tree traversal, zippers work fine for that sort of thing.

20:10 fenton: Since clojure maps are functions of their keys, and keywords are functions of maps, most of the navigating you want to do will look like:

20:10 mebaran151: anybody know if ring guarantees parameters with the same name will appear in the vector in the same order they appear in on the form?

20:11 ohpauleez: (-> tree-map :parent :child :child2 :child3)

20:11 or (get-in tree-map [:parent :child :child2 :child3])

20:12 fenton: knowledgeable

20:12 oops

20:12 fenton: http://clojuredocs.org/clojure_core/clojure.core/get-in

20:14 mebaran151: if they're in the vector, yes they should be in the same order as they were transmitted. If they're converted to a map, no the ordering can differ

20:14 I don't know the details, but that's my best guess

20:25 mebaran151: ohpauleez: ring claims to put them in a vector, but is this a behavior I can rely upon, that the browser will include it in the same order?

20:25 tyre77: hey irc://chat.freenode.net:6667/#clojure, I'm getting some nasty Java stack traces when running most lein commands, anyone available to assist?

20:25 weavejester: mebaran151: They do appear in the same order.

20:26 mebaran151: ah thanks

20:26 weavejester: mebaran151: Assuming the browser transmits in the right order, which I believe they do.

20:37 mebaran151: along these lines, is there a function that will take a map of vectors {:a [1 2 3], :b [3 4 5]} and transform it to a vector of maps [{:a 1 :b 3} {:a 2 :b 4} ...]?

20:39 yedi: does mostly lazy still exist

20:42 xeqi: ~anyone

20:42 clojurebot: Just 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 ..."

20:43 amalloy: &(let [keys [:a :b], m {:a [1 2 3], :b [3 4 5]}] (apply map (fn [& vals] (apply hash-map (interleave keys vals))) (map m keys)))

20:43 lazybot: ⇒ ({:a 1, :b 3} {:a 2, :b 4} {:a 3, :b 5})

20:43 amalloy: &(let [keys [:a :b], m {:a [1 2 3], :b [3 4 5]}] (apply map (fn [& vals] (zipmap keys vals)) (map m keys)))

20:43 lazybot: ⇒ ({:b 3, :a 1} {:b 4, :a 2} {:b 5, :a 3})

20:43 amalloy: i always forget about zipmap

20:44 mebaran151: I figure I could make zipmap do it

20:45 tyre77: I'm getting this (https://gist.github.com/2992360) java.lang.reflect.InvocationTargetException when I run lein help or lein new.

20:46 Tried self-install after deleting standalone, updating to no avail

20:47 xeqi: are you in a project?

20:48 well, not if you're doing lein new ..

20:48 tyre77: no, I'm trying to create one

20:48 yeah

20:50 amalloy: probably some bad stuff in ~/.m2 or ~/.lein

20:50 xeqi: you could try to rm ~/.lein and try again, or clear ~/.m2

20:51 that exception could be better.. wonder if lein2 also throws one that bad

20:52 I don't htink its ~/.lein stuff since the leiningen namespace works

20:52 tyre77: I can lein repl

20:53 what is in ~/.m2?

20:53 xeqi: thats where lein/maven downloads dependencies to

20:54 for caching, so it doesn't d/l them everytime

20:54 tyre77: okay

20:54 yedi: how can I find out which version of clojure I'm running

20:54 tyre77: should I just nuke it and try again?

20:54 xeqi: that would be my first step

20:54 tyre77: I know that's not an interesting solution haha

20:54 okay

20:54 xeqi: &*clojure-version*

20:54 lazybot: ⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil}

20:57 tyre77: success!

20:58 thanks for the help :)

21:09 yedi: so i just set up lein/swank-clojure on my computer and it uses 1.3.0

21:09 is 1.4.0 not supported yet? or did i just fuck something up

21:18 gfredericks: if I want to do SVG in clojurescript, is raphael the best option?

21:19 xeqi: yedi: what version of lein?

21:20 ohpauleez: gfredericks: Take a look at some of Chouser's code - I know his two CLJS presentation libs are built on top of SVG graphics

21:20 yedi: hm

21:20 xeqi: and what version of clojure is in your project.clj?

21:20 ohpauleez: Worst case is using raphael - which is a pretty good worst case

21:21 yedi: 1.7.1

21:21 1.3.0

21:21 is in the project.clj

21:21 xeqi: change that to 1.4.0

21:21 yedi: but that was created by lein

21:21 ok

21:21 xeqi: yeah, when 1.7.1 was released, 1.3.0 was latest

21:22 so it used that by default for new projects

21:22 yedi: does that mean the repl swank-clojure uses will be 1.3.0

21:22 or does changing it in lein fix thaat

21:23 xeqi: swank-clojure will use whatever is defined in the project

21:23 yedi: ok cool

21:23 one final question, is there an emacs equivalent to holding down shift and moving left/right

21:23 to select words

21:23 gfredericks: WAT? there are two other cljs presentation libs?

21:24 muhoo: one can never have enough cljs presentation libs.

21:27 gfredericks: okay raphael it is

21:51 jlewis: mmarczyk: thanks!

21:51 that's very helpful

21:53 mmarczyk: what would really be nice is a document that shows some analysis on the data structures, like in Guava: http://code.google.com/p/memory-measurer/wiki/ElementCostInDataStructures

21:55 mmarczyk: jlewis: wow, that's a nice page! thanks for the link!

21:56 hm, might think of making sth similar for Clojure(Script) PDSs

21:58 jlewis: isn't it great? a very handy reference

21:58 for when YourTooLazy to break out YourKit..

21:59 mmarczyk: :-)

21:59 also, going by the name, memory-measurer might be just the project I've been looking for lately

22:05 wingy: have you checked out: http://vimeo.com/40281991

22:09 is it possible to use clojurescript for ExtJS?

22:09 or another MVC framework

22:15 eggsby: wingy: have you looked at domina or pinot?

22:18 wingy: im brand new here

22:18 have been using javascript all along

22:19 pivot seems outdated

22:19 dnolen: wingy: did you try out the Light Table playground that came out today?

22:20 wingy: dnolen: no i did not

22:20 i will!

22:20 dnolen: wingy: it's possible to use an MVC framework - CLJS supports decent JS interop, but that's probably going against the grain. Hoping a more idiomatic GUI oriented framework will appear sometime in the future.

22:20 wingy: dnolen: yeah i hope so

22:20 in case im switching to clojure/script i would just make the frontend work with ExtJS

22:20 dnolen: wingy: http://www.chris-granger.com/2012/06/24/its-playtime/

22:21 wingy: then hoping to use some more idiomatic framework when it comes out

22:21 cant believe here raised so much money from kickstarter

22:21 its incredible

22:21 like the new c9

22:21 dnolen: wingy: people are already happily using CLJS so I wouldn't let that stop you from experimenting on your own.

22:21 wingy: what lang is he using to develop?

22:21 dnolen: wingy: Clojure & ClojureScript

22:22 wingy: so cool!

22:22 i look at clojure and it is soo beautiful

22:22 dnolen: wingy: it is! :D

22:24 wingy: I'm a JS programmer myself, I think there's a lot to like if you like JS. CLJS is great, if rough around the edges (though I'm biased, I work on it)

22:27 wingy: i dont quite enjoy coding in js as much anylonger .. that's why i moved to langs like coffeescript and now livescript

22:28 livescript does a very decent job in providing FP concepts and I have learned a lot by using it

22:28 but i don't think it will ever be as popular as clojure/script

22:30 i wonder if clojurescript is suited for web development?

22:30 seems pretty early for it?

22:30 will it gain popularity you think?

22:30 dnolen: wingy: heh, that's mostly what it's for.

22:30 wingy: people are already using it for that in production.

22:31 wingy: popularity - only time will tell. Light Table is good advertising that's for sure. I think we need source maps to make debugging sensible for newcomers.

22:31 wingy: yeah

22:31 dnolen: wingy: experienced JS devs who like Clojure won't have many problems - that's mostly the folks using it.

22:32 wingy: i like how serious clojure/script is .. i can count on the maintenance

22:32 dnolen: so its no problems to use clojurescript with ExtJS/Dojo etc?

22:32 even if the code will look OOPish

22:32 my entire project is based on ExtJS frontend

22:33 dnolen: wingy: can't say since I've never used those. I think it could work, but I think there will likely be an impedence mismatch. It might be possible to work around - but I haven't heard any involved dev stories about CLJS ExtJS integration.

22:34 wingy: FWIW the same issues occur with GClosure which CLJS ships with. People are slowly figuring out what works best. So still a bit wild west at the moment.

22:34 wingy: ok ill do my research

22:34 CLJS is ClojureScript?

22:34 dnolen: wingy: yes

22:37 wingy: is it true that clojure programmers tend to know more about programming than javascript developers?

22:37 since it requires a lot to get FP

22:39 dnolen: wingy: rhickey is a programming language geek and is pretty vocal about his influences so - Clojure community has a bit of that.

22:40 wingy: what about using libs like: https://www.braintreepayments.com/docs/java

22:40 dnolen: wingy: yes Clojure pushes FP the hardest of any dynamically typed language I'm aware of. So lots to learn.

22:40 wingy: https://www.braintreepayments.com/docs/node

22:40 using clojure/script means that i can either use their java or node.js api library right?

22:41 (java is pretty much everywhere)

22:41 and node.js is gaining popularity

22:41 dnolen: wingy: brainproxy works a bit on Node support. Yes using Java libs from CLojure is pretty straightforward.

22:41 gfredericks: CLojure: because you kind of miss common lisp.

22:42 wingy: is clojure promoting XML over JSON?

22:42 dnolen: wingy: no, it promotes Clojure expressions over both.

22:42 wingy: do i have to configure a lot of things in XML when using clojure?

22:42 dnolen: wingy: no

22:42 gfredericks: nope

22:42 wingy: thank god

22:43 dnolen: wingy: yes, thanks to technomancy's hard work we're spared that. Wasn't so clear in the early days.

22:43 wingy: (im a pretty crazy guy, 2 weeks ago i moved over all my code from JavaScript to CoffeeScript, then 3 days ago to LiveScript, now I wanna move over to Clojure/ClojureScript)

22:44 thus ditching nodejs/expressjs and all tools i have used :)

22:44 lets see if im going to do that

22:44 dnolen: wingy: CoffeeScript is nice, but learning curve is shallow since it's not significantly differnt from patterns in popular languages.

22:44 wingy: yeah i start to love FP .. saves me a lot of time

22:45 OOP seems to just take time from me

22:45 what to extend what .. methods .. bla ..

22:45 * dnolen <3 reify

22:46 wingy: how come that there is not many in clojurescript channel

22:46 dnolen: wingy: ClojureScript is an implementation of Clojure. So questions here are relevant.

22:47 cgag: i didn't realize there was one

22:47 * gfredericks neither

22:48 wingy: join!

22:49 is clojurescript imitating clojure exactly (without some features not possible in js of course) without having different syntax/features etc?

22:51 gfredericks: imitating as much as makes sense, modulo the amount of effort put in so far

22:51 dnolen: wingy: CLJS is missing quite a few things you'll find on the JVM. concurrency stuff (which might change in the future), runtime manipulatable namespaces / vars, no inline macros, etc.

22:51 wingy: yeah but everything else is exactly the same?

22:51 its not another version of clojure

22:51 dnolen: wingy: no we try to change as little as possible.

22:52 wingy: awesome

22:52 feels cool to be able to drop down to Java/Clojure and know everything is the same

22:52 and you have extended features

22:54 dnolen: wingy: yes, and I imagine the gap between the two will shrink over time as we figure out good ways to implement things.

22:54 wingy: i have a lot to read about clojure/script

23:01 dnolen: first working constraint run in core.logic cKanren ...

23:04 wingy: is it recommended to use clojure/java or clojurescript/node on server?

23:05 xeqi: &((fn [{:keys {a b} :as c :or {:a 1 :b 2}}] [a b c]) {})

23:05 lazybot: ⇒ [nil nil {}]

23:06 dnolen: wingy: way more libraries, users, resources etc. for clojure/java

23:06 xeqi: is there a way to get that :or to work in the destructoring?

23:06 wingy: i see .. then clojure on java it is

23:06 mmarczyk: &((fn [{:keys {a b} :as c :or {a 1 b 2}}] [a b c]) {})

23:06 lazybot: ⇒ [nil nil {}]

23:06 mmarczyk: hm

23:07 oh

23:07 &((fn [{:keys [a b] :as c :or {a 1 b 2}}] [a b c]) {})

23:07 lazybot: ⇒ [1 2 {}]

23:07 xeqi: bah

23:07 thanks

23:07 actually..

23:07 mmarczyk: I believe :or keys can't be keywords

23:07 &((fn [{:keys [a b] :as c :or {:a 1 :b 2}}] [a b c]) {})

23:07 lazybot: ⇒ [nil nil {}]

23:07 mmarczyk: yup

23:08 tripped me up more than once

23:09 though either approach makes sense really.

23:11 xeqi: &((fn [{:keys {a b} :as c :or {a 1 b 2}}] [a b c]) {:a 1})

23:11 lazybot: ⇒ [nil nil {:a 1}]

23:11 xeqi: &((fn [{:keys {a b} :as c :or {a 1 b 2}}] [a b c]) {'a 1})

23:11 lazybot: ⇒ [nil nil {a 1}]

23:11 xeqi: &((fn [{:keys {a b} :as c :or {a 1 b 2}}] [a b c]) {a 1})

23:11 lazybot: java.lang.RuntimeException: Unable to resolve symbol: a in this context

23:12 xeqi: heh, apparently I copied something wrong there

23:13 looks like it works like I want.. must be a problem elsewhere

23:13 mmarczyk: thanks

23:13 mmarczyk: np

23:14 cgag_: I was messing with aleph last night and was running this: https://www.refheap.com/paste/3307

23:14 i opened 3 tabs and sent 3 request really quickly

23:14 they should have finished around the same time shouldn't they?

23:15 but it seemed like the requests were being handled synchronously

23:16 xeqi: future uses a thread pool right?

23:16 mmarczyk: right

23:17 the send-off agent pool

23:24 meiji11: hello, fellow clojureville-ians.

23:24 cgag_: hi

23:26 uvtc: meiji11, hi clojurionado.

23:26 gfredericks: clots

23:27 clarks?

23:27 clocks.

23:28 uvtc: The seats here are upholstered with rich Clojurian leather.

23:28 gfredericks: clerks...

23:32 wingy: what is the best test suite for clojure?

23:33 cgag_: i'm curious about that as well, clojure.test vs midje vs ??

23:33 lazybot: cgag_: Definitely not.

23:33 gfredericks: clojure.test or midge or test.generative or assert

23:33 midje?

23:33 midje is more likely it has a 'j'

23:33 or clj-unit

23:33 uvtc: Which is the simplest and easiest?

23:34 gfredericks: clojure.test

23:34 probably

23:34 * gfredericks waits to be contradicted

23:34 uvtc: That's probably my first stop then. (thanks gfredericks)

23:34 gfredericks: what is the best test sweet for clojure?

23:38 brainproxy: wingy: I've got a project I started about 2 months ago to allow clojurescript and node to be used together in the same way you can use coffeescript and node together, i.e. w/o having to jump through extra hoops

23:39 however, I hit a point where I realized that to make it work really well, I needed to actually learn clojure :D instead of just messing around

23:39 so then I read the OReilly book and have since been happy tooling around in clojure land ... haven't quite made it back yet to the pastures of NodeJS

23:40 but I plan to do so, and finish what I started

23:42 gfredericks: why is (route/resources "/") not doing what I want? :(

23:43 xeqi: because you want something else?

23:44 gfredericks: I want it to serve the file "resources/foo.txt" when I request "/foo.txt"

23:44 it gives me 404s

23:45 wingy: brainproxy: what are the benefits of running clojurescript on node.js than using clojure?

23:45 why would i do that

23:45 and miss all the concurrency benefits etc

23:45 gfredericks: are you using noir? is that the best web server for clojure?

23:45 cgag_: maybe memory consumption

23:46 brainproxy: wingy: that's a good point, and is a reason to favor working with clojure/jvm on the server-side, rather than cljs/node

23:46 gfredericks: wingy: using compojure; have never used noir, but a lotta folk do

23:46 xeqi: gfredericks: can you move it to resources/public/foo.txt ?

23:46 gfredericks: xeqi: ah that's it I bet

23:46 brainproxy: wingy: however, some folks really like the single-threaded, event-driven programming style

23:46 gfredericks: this is why I ask questions in #clojure. because sometimes somebody knows the answer.

23:47 brainproxy: and node has a nice modules system and active developer community around it

23:50 wingy: feel that you are missing a lot of the power of clojure server side if you don't use java

23:51 i think im going to use clojure if im converting

23:51 cgag_: i think that's the way to go

23:51 wingy: do i have to have a lot of Java knowledge?

23:52 brainproxy: wingy: i think it just depends on the use case, but having spent about a month in clojure/jvm, i'm definitely favoring it over nodejs for many things

23:52 wingy: does it help me in any way to know Java?

23:52 eg. do i ever have to debug in java or read java

23:52 cgag_: for doing java interop

23:52 wingy: brainproxy: could you give examples

23:52 cgag_: if you want to use a java library

23:52 wingy: cgag_: yeah

23:53 i think i have to .. services usually have java libs but not clojure

23:53 a pity .. or i could just use HTTP i guess :)

23:53 cgag_: it's not really hard though

23:53 brainproxy: wingy: well, i already find I prefer working w/ ring+compojure+enlive+hiccup+clutch over the various stacks I built with expressjs, cradle, etc.

23:54 cgag_: for basic stuff at least

23:54 brainproxy: wingy: however, I have yet to see the clojure equivalent of SockJS

23:55 sock (and socket.io for that matter) are really nice and super easy to develop with

23:55 xeqi: cgag_: did you figure your aleph question out?

23:55 cgag_: i did not

23:55 but i haven't really tried, i was just hoping someone would know something

23:56 brehaut: brainproxy: that sort of websockety stuff is probably more aleph than just ring

23:57 brainproxy: brehaut: sure, that makes sense

23:57 xeqi: I was thinking the futures end up in the same thread in the threadpool, might be able to see by sending (.getName (Thread/currentThread)) back

23:57 *might end up

23:58 cgag_: i'll give that a shot

Logging service provided by n01se.net