#clojure log - Dec 13 2012

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

0:09 TimMc: JIRAfied: http://dev.clojure.org/jira/browse/CLASSPATH-4

0:10 sshack: There aren't any tips for speeding up leon startup time, are there?

0:10 I guess I'm really asking is, shortcuts for jvm startup

0:12 ghengis_: sshack: if you're feeling adventurous you can try this http://eigenhombre.com/Clojure/2012/11/16/lightning-fast-startup-times-for-clojure-programs/

0:13 but it looks more complicated than a jvm option

0:13 sshack: I'm guessing it's a hot standby jvm?

0:13 ghengis_: same idea, but not hot

0:14 ambrosebs: bbloom: so what should be tackled next for the analyser after these two patches?

0:14 ghengis_: i think it saves all the bootup processing for the next run after you exit

0:21 technomancy: TimMc: `lein help` will list all known tasks

0:21 different from all plugins but usually more relevant

0:21 TimMc: you can use `lein pprint :plugins` if you install the pprint plugin (whoa, meta)

0:21 sshack: Okay, why is my code giving me invalid probabilities when I use a Bernoulli distribution?

0:23 bbloom: ambrosebs: not quite sure yet

0:23 ambrosebs: i think we need a top-level :script or :file or :fragment or :code or whatever it is

0:25 ambrosebs: bbloom: mmm. I seem to remember Rich being opposed to that idea, at least at the code level. Not sure about AST level though.

0:25 bbloom: ambrosebs: link?

0:25 i haven't thought about the top level enough yet, it's a tough area

0:26 but i think the most important thing is to separate parse from analyze

0:26 ie pre and post macro expansion

0:26 ambrosebs: bbloom: right, that sounds important.

0:26 bbloom: b/c codeq needs pre-macro-expansion

0:27 ambrosebs: bbloom: I don't have a link, but the idea was he wanted compilation to be more stream-like, not have a fundamental unit of a file or namespace.

0:27 I may be wrong, I only vaguely remember.

0:27 But it's something to consider.

0:27 bbloom: yeah, i've thought about that

0:27 i agree to some extent

0:28 but there really is some level of descrete top level things

0:28 i'd rather have a stream of those top level things

0:28 ie a stream of files, or a stream of eval forms

0:28 ambrosebs: Don't we already have a sort of stream of forms?

0:28 bbloom: stream of forms evaluated by a repl, i mean

0:29 the issue is that htere really is some kind of delimiter by file

0:29 b/c consider (ns foo) (a) (b) (ns bar)

0:29 (c)

0:29 really, that's fine

0:29 Frozenlock: Whenever I want to use clojurescript to act on something present on a single page, I find myself using a 'unique' ID and applying it (to this ID) on every page. Is there a more elegant way?

0:29 bbloom: but if you have a file that omits the ns form, what do you do?

0:29 cljs can't handle that now

0:29 should it be 'user ?

0:29 should it be an error?

0:30 ambrosebs: bbloom: hmm. so we'd need two concepts: for files and for REPL interaction.

0:30 bbloom: ambrosebs: i think so...

0:31 i'm thinking you'd have :eval and :file

0:31 or :load-file or something

0:31 or it might be the same thing, but with or without a :file "a/b/c" key

0:31 but i think separating parse&analyze from expand&analyze is more pressing

0:32 i only mention the top level form b/c i want to minimize AST changes later down the road

0:33 ambrosebs: Yes. Although CLJS is young enough not to worry about that too much.

0:33 (breaking changes)

0:33 bbloom: i'm also thinking about (do 1 2 3) vs (do* 1 (do* 2 3) and (let [x 1 y 2] z) vs (let* [x 1] (let* [y 2] z))

0:33 ambrosebs: right?

0:33 clojurebot: to be fair I dunno that I've ever had code out right rejected, it just sits in jira or assembla or where ever, or if I ask if there is any interest (before writing any code) I get told to go write alioth benchmarks

0:34 bbloom: ambrosebs: i agree that breaking changes aren't a big deal, but dnolen has mentioned concern about it a few times, so i'd front load that stuff

0:34 tpope: why does every irc bot ever have robo-tourettes :/

0:35 bbloom: tpope: clojurebot seems to hate question marks. you know what i mean??

0:35 lazybot: bbloom: Definitely not.

0:35 bbloom: (that worked perfectly according to plan)

0:36 tpope: "I'm writing an irc bot. The first thing I need is a ridiculously broad regex to respond to"

0:36 ambrosebs: bbloom: what do you mean, flattening them?

0:38 bbloom: ambrosebs: much in the same way that implicit blocks were annoying to deal with, any sort of N > 2 sequencing has been annoying to deal with

0:38 still requires more thought before i submit patches

0:38 and will surely be more controversial

0:38 ambrosebs: in CPS?

0:39 * bbloom takes a moment to push his latest CPS changes

0:39 bbloom: yeah, so any time you have a list, you need to worry about split with and all that jazz

0:40 ambrosebs: I don't follow.

0:40 bbloom: clojure makes working with lists/vectors very nice, but its sort of the reducers thing

0:40 i want to specify transforms in terms of an assocative binary operator

0:40 (reduce + 0 coll)

0:41 if i want a transform of coll, i want to declare 0 and define +

0:41 when doing an AST transform, i want to just define +, not (+ x y & more)

0:42 ambrosebs: look at https://github.com/brandonbloom/cljs-cps/blob/master/src/cps.clj#L263-l307

0:42 ambrosebs: I don't think I know enough about AST transforms to really understand the problems.

0:43 bbloom: there are three ;; comments

0:43 look at those

0:43 basically, i need to isolate interesting let bindings

0:43 it's that isolate step that feels just like analyze-block

0:43 repeating myself for no damn good reason

0:48 ambrosebs: bbloom: looks pretty badass :)

0:49 tomoj: sorry, why do you need to isolate?

0:51 bbloom: tomoj: so let's say you have (let [x 1 y (call-cc f) z 2] (+ x y z))

0:51 tomoj: i want to isolate the binding for y

0:51 ambrosebs: so whats a "serious" and "trivial" form?

0:52 bbloom: ambrosebs: search for "defn trivial?" or "defn serious?"

0:52 in short, this is a "selective" transform

0:53 it tries to avoid transforming expressions which are obviously "trivial" ie definitely don't call-cc or anything like that

0:53 tomoj: ok, what's wrong with the analysis output? looking at it, but.. hard to navigate

0:53 bbloom: tomoj: nothing is "wrong" with it

0:53 (any more, i fixed the real bugs :-P)

0:53 ambrosebs: bbloom: got it

0:54 tomoj: I mean what about it makes (made?) isolating y difficult?

0:54 bbloom: look at how small/clean all the other functions are in that file :-)

0:54 minus try/catch/finally GRR

0:54 heh

0:55 tomoj: I mean specifically, the :bindings in the analysis output are difficult to work with? or..?

0:55 bbloom: tomoj: yeah, basically: you have a vector of N forms when in reality you care about pairs of forms

0:56 you care about binding 0 vs binding 1

0:56 not binding 0 .. N

0:56 and then further complexity if you're looking at binding N vs the expression

0:56 there are three things: name, initialization expression, and then a body expression

0:56 but the AST presents them as a vector of name/init pairs and then a vector of body expressions

0:57 i submitted a patch to make the body a single thing (ie an implicit do)

0:57 but i'm thinking about how to further simplify

0:57 i think a form (let1 name init expr) makes sense

0:57 tomoj: with only one binding

0:57 bbloom: yeah

0:57 tomoj: oh, obviously

0:57 bbloom: some kind of (do2 statement expr) is a little less clear, since how do you expand (do a b c)

0:57 tomoj: let1 sounds familiar

0:58 bbloom: is that (do2 a (do 2 b c)) or is it (do2 (do 2 a b) c))

0:58 could go either way, and you could reasonably make the case for both or neither

0:58 i'm only saying all this since ambrosebs asked. still needs more thinking

0:59 tomoj: nope, no let1 in core.clj, I was thinking of reduce1

0:59 bbloom: damn auto correct: "do 2" should be "do2"

0:59 ambrosebs: bbloom: so a special form/AST node :let1?

0:59 TEttinger: anyone using congomongo? I am trying to implement a possibly ill-advised lazybot plugin that needs to store a seq as part of an... entry, i guess, in the db, and be able to find that entry again by any element of the seq

1:00 bbloom: ambrosebs: i think so

1:00 TEttinger: like :where :part-of-the-seq

1:00 in a (fetch)

1:00 ambrosebs: bbloom: would that change macroexpansion?

1:01 Seems like a rather drastic change.

1:01 tomoj: hmm

1:01 bbloom: ambrosebs: no, there is already a let* special form b/c let provides destructuring and expands to let*. pre-expansion would be interested in let, not let*

1:01 ambrosebs: yeah, it's a drastic change

1:01 ambrosebs: hence i haven't proposed it without more deep thought

1:02 ambrosebs: bbloom: sure

1:02 bbloom: ambrosebs: also need to consider other bindings cases, like letfn

1:03 letfn establishes parallel bindings, not sequential ones

1:03 ambrosebs: bbloom: but just from a practical debugging standpoint, wouldn't it change the output of macroexpand?

1:03 bbloom: ambrosebs: ah, yes good question

1:04 tomoj: ah, I begin to understand cps :let

1:04 bbloom: tomoj: cps :let is still a bit broken, i'm working on it

1:04 tomoj: did you consider clojure.walk?

1:04 bbloom: ambrosebs: so do more people do macroexpand-all now? i always do macroexpand-1

1:04 or N

1:05 ambrosebs: it would suck if a change like atomic individual binding lets would ruin macro expands

1:05 i wonder if it would make sense to provide conditional macro expansion

1:05 usually i dont want to expand core macros when i'm debugging my macros

1:06 ambrosebs: Dr Racket has something like that: http://docs.racket-lang.org/macro-debugger/index.html

1:06 see expand-only

1:06 tomoj: I suspect expansion passing style would help, but I don't really understand it yet

1:06 clojurebot: Man, the living creature, the creating individual, is always more important than any established style or system. -- Bruce Lee

1:06 ambrosebs: bbloom: Oh man, I'd love one of those.

1:07 TEttinger: so if anyone says style it quotes Bruce Lee?

1:07 bbloom: ambrosebs: yeah, so if we can better separate parse from expand, then we could probably also do conditional expand

1:07 which would make it moot if let expands to let* or let1 or whatever

1:07 tpope: bbloom: https://github.com/guns/vim-clojure-static

1:07 this guns guy beat me to it

1:08 bbloom: tpope: i was about to ask who guns was

1:08 my irc client seems to be highlighting his name :-) maybe if we say guns 1 more time, he'll show up

1:08 guns: boo

1:08 bbloom: "Meikel Brandmeyer's excellent Clojure runtime files, extracted and decomplected for static editing and for use with alternate Clojure development plugins."

1:08 heh, *decomplected*

1:08 :-)

1:09 hi guns, meet tpope :-)

1:09 ambrosebs: guns: that is awesome, well done.

1:09 tpope: we've been chatting in #vim for hours

1:09 bbloom: haha ok

1:09 * bbloom joins #vim

1:10 guns: ambrosebs: tpope's entry into Clojure land inspired me

1:10 tpope: aw

1:10 ambrosebs: guns, tpope: and an epic entry by both of you. Thanks.

1:10 bbloom: guns, you can join the list of vim-ers who i owe a beer :-)

1:11 guns: No, no, no. Meikel deserves all the praise. thank me when I write a new paredit

1:11 bbloom: Fine: Meikel get's TWO beers

1:11 :-)

1:11 anyway, i'll bbl

1:12 wait, i'm back…. i just need to say:

1:12 s/get's/gets/

1:12 whew, ok better

1:12 i'm gone.

1:14 ambrosebs: tpope: can foreplay access e* and other REPL state yet? I found it unusable without that.

1:14 tpope: ambrosebs: it can with the very latest nrepl

1:15 not sure if rc2 has dropped yet

1:15 ambrosebs: tpope: sweet

1:22 muhoo: i vageuly remember there being a way to access lein profile maps from inside a project, but can't seem to find docs on that

1:48 ibdknox: is there a way to get an unrealized copy of a lazy seq?

1:48 nightfly_: Why do you need a copy of it?

1:49 ibdknox: I need to capture the value of a lazy-seq at a point in time without realizing the original

1:53 nightfly_: Is this sequence generated by some external data source or something?

1:54 ibdknox: I'm capturing intermediate values of execution for Light Table :)

2:16 yedi: hi, so clojure has this thing, where when a data structure is transformed to create a new structure, the implementation in memory is optimized

2:16 ibdknox: structural sharing

2:16 yedi: so that the new data struct basically points to the old one, and adds the new transformed infomation right?

2:16 or something like that

2:16 how does this work with maps

2:17 if you had functions that added a key-value pair one at a time

2:17 at called that multiple times

2:17 so that each new map, would point to the previous map and so on

2:17 wouldn't that no longer be a hashtabll (map)

2:17 but a linked list of key-value pairs

2:17 or am i misunderstanding how this works

2:20 ibdknox: yedi: you can see how it's implemented here: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentHashMap.java#L135

2:22 Raynes: ibdknox: YOUR LIGHT TABLE SUCKS

2:23 ibdknox: oh no's

2:23 Raynes: ibdknox: I can't get tomorrow-night to work. :(

2:23 ibdknox: ?

2:23 what does it do?

2:23 Raynes: Nothing.

2:23 I get a white on black theme.

2:23 As in no theme.

2:23 ibdknox: what version?

2:23 Raynes: 0.2.1

2:24 Did you test it when you added it?

2:24 Because I wouldn't put it past me to break it outside of refheap somehow.

2:24 :P

2:24 ibdknox: many times :) But it was added in 0.2.4

2:24 Raynes: In that case, my problem is that light table isn't updating.

2:24 :p

2:24 ibdknox: yes

2:24 ro_st: ibdknox: props :-)

2:25 ibdknox: there was a brokenness in pre 0.2.2 with the update mechanism

2:25 all should be fixed with that now

2:25 Raynes: So I should redownload?

2:25 ibdknox: yessir

2:25 Raynes: Okay,

2:25 While you're here...

2:25 ibdknox: ro_st: thanks :)

2:25 ro_st: ibdknox: what's the official word on Paredit support for LT?

2:25 Raynes: ibdknox: Looks like Konrad wants to take over noir-cljs too. Can we get it moved to noir-clojure so I can give him access.

2:26 ro_st: There is that subpar thing. ibdknox tried it, but it's slow as snail on valium.

2:26 ro_st: ah, is emacs' paredit written in super C?

2:26 ibdknox: ro_st: I would love it, or at least having autocompleting of closing brackets

2:26 Raynes: ro_st: No, just subpar is written in a slow way.

2:26 ibdknox: yeah

2:27 Raynes: You can't read the whole file every time something is added to it.

2:27 ibdknox: it probably could be faster, I think it's re-parsing the whole file

2:27 Raynes: I will do that now, one sec

2:27 Raynes: ro_st: If someone writes a good paredit for codemirror, ibdknox will likely use it.

2:27 ro_st: so some level of support is on the roadmap

2:28 Raynes: I imagine it's far down the roadmap unless someone else does it.

2:28 ro_st: i simply can't live with out my paredit. i cry and rage and vent and fume when i have to use a mudblood text editor

2:28 ibdknox: yeah, unless I just get pissed off at some point

2:28 Raynes: I wish somebody would get pissed.

2:28 ibdknox: I may implement auto-closing braces if I get a free moment

2:28 that would be useful in a very general sense

2:29 Raynes: You have to pay for your moments!?!?!

2:29 ro_st: absolutely

2:29 ibdknox: Raynes: I know, it's ridiculous

2:29 Raynes: ibdknox: Have you upgraded to codemirror 3.0 yet?

2:29 ibdknox: Raynes: moved noir-cljs btw

2:29 yessir

2:29 Raynes: I need to upgrade on refheap.

2:29 ibdknox: I did some cool prototype-y things with it

2:29 Raynes: ibdknox: Oh cool, lt just randomly updated for me!

2:29 ibdknox: LIKE MAGIC

2:30 ok seriously, there has to be a way to make an exact copy of a seq

2:30 Raynes: But it still doesn't work.

2:30 Yeah, it only claimed it updated.

2:30 lol

2:30 Mean text editor.

2:31 ibdknox: It's there to make you feel good about life.

2:31 this is with the newly downloaded one?

2:31 Raynes: No.

2:31 ibdknox: ah, yeah, the old one would deploy and then chose not to use it

2:31 like a boss.

2:32 clgv: good morning, you guys pulled an all-nighter? ;)

2:33 ibdknox: it's a mere 11:26pm here

2:33 Raynes: ibdknox: I'm writing this new enlive-like thingy to hopefully replace Enlive for most people, LT will make it much easier to test things. It's perfect for this sort of thing.

2:33 It's only 1:26AM here.

2:33 ibdknox: Raynes: oooo, we talked about something like that before

2:33 clgv: ah damn. I'll always mix up those time offsets^^

2:34 Raynes: ibdknox: Should we give Konrad access to the groups on clojars or do you want to keep handling releases for them?

2:34 ibdknox: ok, it looks like I could do this in an incredibly hacky way if I can access a private member on a class

2:34 I don't mind giving him access

2:34 Raynes: ibdknox: We talked about what? ;o

2:34 ibdknox: what's his clojars name?

2:34 Raynes: ibdknox: https://clojars.org/users/konrad-garus

2:34 ibdknox: Raynes: writing a better UI layer

2:34 for teh webs

2:35 Raynes: Oh.

2:35 ibdknox: eons ago

2:35 Raynes: added him to both

2:36 Raynes: Great. I'll get him going with the stuff and he can have at it.

2:36 Ain't it nice to have less stuff to maintain?

2:36 Also, need to make a note to actually announced that noir release.

2:36 ro_st: ah is 1.3 final?

2:36 ibdknox: yeah

2:37 clgv: changelog? ;)

2:37 ibdknox: though I'm with Raynes at this point, I would push new people more generally toward lib-noir + compojure

2:37 Raynes: clgv: Nothing different from the beta releases.

2:37 ro_st: btw, suggestion: bind *request* at the beginning of the middleware stack as well as at the end so that fns called by middle-middleware can use noir.request/ring-request

2:37 clgv: ah kk. so changes for 1.3.0-beta1 apply

2:38 ro_st: i had to glom code into a middleware so that it could read req directly because of the lack

2:38 Raynes: ibdknox: Yeah, I've been encouraging people in that direction. Not because of anything wrong with noir, but just because I don't want people to get angry at us when we don't do much maintaining. :p

2:38 ibdknox: yep

2:38 same thought

2:38 Raynes: And lib-noir + Compojure get you most of what you get with Noir. The defpage abstraction isn't there, but it really isn't that much different.

2:38 ibdknox: I also have come to the conclusion that there's a better way to write websites

2:39 Raynes: Not writing them at all works for me.

2:39 But what's your way?

2:39 :p

2:39 clgv: haha

2:39 ibdknox: seriously

2:39 I'm a big fan of static stuff these days

2:40 Raynes: Jekyllz

2:40 I was a bit curious as to why you were all like "I CAN MAKE WEBNOIR BE STATIC IN LIKE 3 SECONDS FLAT BLINDFOLDED."

2:40 ibdknox: haha

2:41 that took a bit longer because jekyll doesn't have GFM by default

2:41 so I did some weird reworking

2:41 then I found a plugin

2:41 after the fact

2:41 Raynes: ibdknox: If you honestly agree, I might write a blog post encouraging people to focus on lib-noir and Compojure. I just want to make sure you're totally serious before I do.

2:41 Turns out people listen to me sometimes. It's cool.

2:41 ibdknox: I am totally serious

2:42 ro_st: what's in not lib-noir, then?

2:42 ibdknox: There's nothing wrong with noir proper

2:42 and still stands as a good starting point for people coming from other places

2:42 Raynes: ro_st: It's a bunch of libraries that used to be in noir that we moved out into a separate lib for Compojure use. I use it in all my websites.

2:42 ro_st: right

2:42 ibdknox: but a lot of the problems I was originally solving have gone away in the past year and a half

2:42 Raynes: ro_st: It's stateful sessions, flashes, cookies, a tiny validation thingy, hashing stuff, etc.

2:42 ro_st: what's left?

2:42 ie, what's NOT in lib-noir?

2:43 ibdknox: defpage, defpartial

2:43 all the routing stuff

2:43 ro_st: ok we don't use partial. we do use defpage. the middleware stuff?

2:43 Raynes: ro_st: In Noir itself, it's mostly just the defpage stuff. A lot of more experienced Clojurians don't really like it though, because of the stateful nature of it. It also makes complicated middleware scenarios hard to not entirely possible.

2:44 ibdknox: yeah, complicated middleware stuff just belongs on compojure

2:44 Raynes: add-middleware was my single most painful experience with Noir, and the main reason I started leaning towards compojure.

2:44 ro_st: interesting. i'll read through what's left and see if we can do with out. i'm all for simplicity

2:44 Raynes: defpartial could be moved to lib-noir if people actually use it. I don't think I ever did.

2:45 ibdknox: Light table 0.2.3 wont use the 0.2.4 update it just downloaded. :(

2:45 ibdknox: defhtml is in hiccup now

2:45 Raynes: Oh, really?

2:45 Nice.

2:46 ro_st: we started and quickly removed it because we realised that defn does the same thing :-)

2:46 Raynes: FWIW, no hurry for moving your stuff to Compojure if noir works for you. I'll still merge pull requests and make releases as necessary. I just can't promise speedy service or that I'll do any work on it myself at all ever.

2:47 But definitely going to start trying to get the message out there that people should focus on Compojure and lib-noir.

2:47 ibdknox: Want me to open an issue or something? Or, maybe I should clean .lighttable and try?

2:47 ibdknox: Raynes: nuke your .lighttable

2:47 Raynes: k

2:48 ro_st: gotcha.

2:48 Raynes: ibdknox: No luck.

2:48 ibdknox: so where are you looking for the version number?

2:49 Raynes: About

2:49 sgeo: Is sql-korma still considered a good thing?

2:49 Raynes: penumbra:~ raynes$ cat .lighttable/version.json

2:49 {"version": "0.2.4"}

2:49 ibdknox: use the version command

2:49 that's the only valid source

2:49 ro_st: sgeo: if you're writing sql, i think it is

2:49 Raynes: I don't think ibdknox is deprecating all his projects. :p

2:49 ibdknox: I need to remove that stupid about page

2:49 Raynes: ibdknox: Says 0.2.4!

2:49 ibdknox: Raynes: try tomorrow night :)

2:49 sgeo: ro_st, suppose I just care about data storage, not using SQL stuff specifically

2:49 clgv: ibdknox: or implement the about page with the version function ;)

2:50 ibdknox: clgv: they exist in different realms of space time lol

2:50 Raynes: ibdknox: It works! Isn't it purdy? <3

2:50 clgv: oh thats einsteinian then? :P

2:51 ro_st: sgeo: (inc datomic)

2:51 ibdknox: sgeo: korma's fine for SQL

2:51 sgeo: ro_st, don't want to use non-opensource stuff

2:52 ibdknox: mongo works nicely with clojrue

2:52 sgeo: Especially if it needs to be paid for for some uses

2:52 ro_st: fair enough

2:52 mongo is great, too - clojurewerkz' monger is fantastic

2:53 Raynes: I use monger in refheap.

2:53 Michael Klishin actually added it and keeps it updated.

2:53 ibdknox: and I think they took their query syntax from korma :)

2:53 if I remember right

2:54 Raynes: ibdknox: So what are you guys working on in LT right now?

2:54 Anything not top-secret, of course.

2:54 ibdknox: it's all top secret!

2:54 fixing a few bugs

2:54 Raynes: Get out of my internets.

2:55 ibdknox: thanks to bronsa I no longer need a special version of clojure!

2:55 I'm releasing that update tomorrow

2:55 ro_st: ibdknox: he matched the actual mongo driver as closely as possible, so i don't htink so

2:55 clgv: what did you need a special version of clojure for?

2:55 ibdknox: lots of instarepl improvements

2:55 clgv: position info in the reader

2:55 Raynes: ibdknox: I think I just found a bug.

2:55 ibdknox: there are no bugs.

2:55 clgv: ah, the column information in 1.5?

2:56 ibdknox: clgv: more than that actually

2:56 Raynes: ibdknox: Okay, it isn't really a bug, but...

2:56 ibdknox: clgv: needed end line and end column too

2:56 clgv: on symbols, lists, vectors, maps, and macro expansions for wrapped reader macros

2:56 e.g. @something

2:56 Raynes: ibdknox: I tried to execute my file and it told me I needed to connect and populated the command bar with the connect command, but the path was to the directory holding the file I had tried to execute instead of down the file system a bit where the project.clj is.

2:57 clgv: ah interesting

2:57 Raynes: ibdknox: Shouldn't it back down the path until it finds a project.clj or something?

2:57 ibdknox: Raynes: intentional, as of tomorrow though you can just submit that and it will do the right thing :)

2:57 Raynes: Excellent.

2:57 ibdknox: yeah there are a few nice little improvements coming tomorrow

2:57 auto-finding project.clj is one

2:58 Raynes: ibdknox: When will I be able to add a refheap plugin?

2:58 :D

2:58 Months? Years?

2:58 DECADES!?!?!

2:58 clgv: never? ;)

2:58 mthvedt: centuries

2:59 ibdknox: millennia

3:00 mthvedt: aleph null

3:00 clgv: you cant say "centuries" after "never" - you have to continue with ordinal numbers ^^

3:00 ibdknox: a plugin system is one of my next big TODOs

3:00 Raynes: ibdknox: What should I do in anticipation? Like, I guess I'd need to write a refheap API lib in JS? Node?

3:01 I'm not sure how to write a regular javascript library. Node on the other hand is easy.

3:01 ibdknox: node would work

3:01 Raynes: So I can use node libraries? From npm?

3:01 If I need them.

3:01 ibdknox: yessir

3:01 Raynes: Probably wont.

3:01 Awesome.

3:02 I'm sick of cljs though, so can I write it in actual javascript?

3:02 ibdknox: sure

3:02 Raynes: Great.

3:02 sgeo: I'm wondering if I should start learning Node

3:02 Is Javascript a fun language?

3:02 ibdknox: no

3:02 Raynes: No.

3:02 ibdknox: lol

3:02 sgeo: Although recently learned that using objects as hashes suck...

3:03 Raynes: Most people find cljs fun, and I will to if it ever works for me.

3:03 sgeo: http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/

3:03 Raynes: But I'm really at a point where I'm like "screw it, I'll just write it in js :'("

3:03 ro_st: sgeo: no. noooo.

3:03 Raynes: ibdknox: My problem with cljs and node is that I don't see how you can even distribute a nodejs library written in cljs

3:03 ibdknox: I haven't gotten that far with it yet

3:03 Raynes: Because of all the other stuff that comes with it.

3:04 ibdknox: yeah

3:04 ro_st: that's because cljs isn't bootstrapped

3:04 ibdknox: I know I have some scary work ahead of me with the plugin system

3:04 Raynes: You sure do.

3:04 sgeo: ro_st, how are you supposed to do hashes in Javascript?

3:04 Raynes: Good luck, partner.

3:04 ibdknox: I'm hoping I hire someone before then :p

3:04 clgv: imho javascript is an excellent example for a "grown project" :P

3:05 ro_st: sgeo: i won't pretend to have a good answer for you, sorry

3:05 ibdknox: anyone know how to get the value of clojure.reflect.Field?

3:05 ro_st: because i don't. my solution is, use cljs

3:06 Raynes: I think a refheap lib is simple enough that I wont mind writing js for it.

3:06 Anyways, I'm off.

3:06 ibdknox: Thanks for visiting us mere mortals and excellent discussion.

3:07 ro_st: sleep well mr grimes

3:07 Raynes: Oh I'm not going to sleep.

3:07 I'm going to play BATMAN!

3:07 ibdknox: Raynes: later dude :)

3:07 Raynes: Sleep is for non-teenagers.

3:07 ro_st: too right :-(

3:07 Raynes: I'm going to be working a full time job in LA in less than 2 months. I'm milking every last second out of my childhood.

3:07 Laters.

3:09 ro_st: good plan

3:20 anyone here started a clojure user group? any tips for a first timer? i'm starting one in Cape Town

4:51 danielszmulewicz: While deploying a webbit-based app on dot cloud, I get this: can not create URI from localhost hostname. Anyone seen this before?

5:17 Raynes: cemerick: Really? always 2 spaces?

5:17 You really believe that?

5:18 I think I'd *rather* deal with complex editor plugins than have always-2-spaces.

5:18 cemerick: Raynes: I've never seen any environment that can do anything else automatically and reliably.

5:18 Raynes: Emacs and Vim do it just fine.

5:18 cemerick: no, they don't

5:18 did you read the post? :-P

5:18 Raynes: Yeah, they pretty much do bro.

5:19 I seen pretty much no situations where the naming conventions don't work out.

5:19 cemerick: (defn with-something-that-shouldn't-be-indented-like-with-open [] ...)

5:19 There. :-P

5:20 Raynes: It seems to be 'working' perfectly well for most people. This sort of thing is just going to start a nice big group of people indenting their code terribly/in such a way that my editor tries to fix it.

5:21 cemerick: well, not everyone uses emacs, so that's already going to happen

5:21 Raynes: So I don't think I'm going to get on board with this one, and don't be angry if I call you stupid in an attempt to fix your terrible wrongdoings along the way.

5:21 Ugh, Emacs isn't the only editor that works this way.

5:22 cemerick: Perhaps not

5:22 In any case, I welcome counterpoints to the ones I made in the post :-)

5:22 Just saying "it mostly works for everyone that uses it so gtfo" isn't super-compelling ;-)

5:23 Raynes: What am I supposed to counter? I disagree with you that there is a problem at all.

5:24 I am curious about one thing

5:26 Are you willing to alienate the majority of Clojurians who use editors that do this terrible thing? Because if you write code in that way, it becomes extremely difficult to work with that code in Emacs because Emacs will persistently try to fix the code. The person working on it will almost certainly do one of 1) End up accidentally not manually indenting to match your code's style somewhere 2) get annoyed and give up 3) hate you 4) all of

5:26 the above

5:27 If not, then you'd probably want to issue a pull request to clojure-mode, but it wont get accepted because I doubt anyone in particular is going to like the idea of always indenting 2 spaces.

5:27 cemerick: Whoa, who's trying to alienate anyone?

5:28 Raynes: Regardless of merits, I think "It works perfectly well for everyone" is a perfectly good counterpoint.

5:28 tomoj: Raynes: ever called a function 'default-something' ?

5:28 Raynes: Don't think I have, no.

5:28 cemerick: ...or want `foo` in project A indented differently than `foo` in project B.

5:29 tomoj: anyway, I have a huge nasty list of special cases

5:29 and regularly don't want whatever clojure-mode decides

5:29 even assoc..

5:29 cemerick: tomoj: Right, which is the point I'm making. Pick a number of spaces, use it everywhere.

5:29 tomoj: but... the gospel... http://mumble.net/~campbell/scheme/style.txt

5:30 Raynes: Yeah, I just disagree.

5:30 *shrug*

5:30 cemerick: tomoj: indeed

5:30 I certainly *wish* that that could be followed, but it can't be applied automatically and reliably.

5:31 tomoj: put it in the metadata? :)

5:31 cemerick: hah

5:31 yeah, that's doable, but people would hate that more than any other option, I'll bet

5:32 Also, you'd need a runtime to get the metadata

5:32 Raynes: cemerick: The Haskell emacs mode handles ambiguous indentation cases by having multiple possible indentations that are cycled through multiple presses of tab.

5:32 Same thing could likely be applied here, but probably not in less intelligent editors.

5:32 cemerick: Raynes: oh, sure, that's how ccw used to work, too

5:33 tomoj: I'd have to see what "always 2 spaces" looks like

5:33 Raynes: And that was taken out because...

5:33 Like crap.

5:33 I can help you with that.

5:33 noidi: CCW always indents relative to the previous line, so as long as you fix up your special case manually, the rest will work automatically

5:33 Raynes: If you always newline before your first argument it looks fine.

5:33 cemerick: Raynes: it's not automatic

5:34 Raynes: At least, it looks fine until you have 400 extra lines just because Chas wanted 2 space indents everywhere.

5:34 tomoj: extra lines?

5:34 n_b: Just to save me grepping logs, can someone link me to the post that started the debate?

5:35 cemerick: n_b: http://groups.google.com/group/clojuredev-users/msg/4b72a59bbc8d19de?hl=en

5:35 * cemerick is still not sure Raynes has read it ;-)

5:35 n_b: ty cemerick

5:35 Raynes: cemerick: I read every word. What do you think I didn't read?

5:35 tomoj: I feel pretty OK with needing a runtime

5:36 Raynes: If I'm missing something, by all means point me to the enlightenment.

5:36 pyr: cemerick: your (defn with-something-that-shouldn't-be-indented-like-with-open [] ...) argument is flawed

5:36 (defn with-something-that-shouldn't-be-indented-like-with-open

5:37 "this does foo"

5:37 [])

5:37 well, i botched aligning but you get the idea

5:37 Raynes: I don't think I do, no.

5:37 What are you saying is flawed?

5:38 cemerick: Raynes: I was talking about what will always work, and you seem to be saying that something that doesn't always work…always works.

5:38 Raynes: cemerick: I'm saying that it doesn't matter that it doesn't always work.

5:39 cemerick: That's fair.

5:39 * Raynes flames cemerick

5:39 pyr: but it's a discussion that leads to nowhere i guess

5:39 Raynes: Don't agree with me, you cretin.

5:39 pyr: everyone's gonna be in favor of whatever happens in their favorite editor :)

5:40 n_b: I'd fall on the side of 'always 2 spaces' if only because it would so simplify grokking indentation rules

5:40 cemerick: In the end, I'd prefer a completely regular, always-obvious ruleset/behaviour.

5:40 Raynes: <3

5:41 Raynes: Well, as long as you leave my code the way I've indented it, I'll be happy.

5:41 cemerick: pyr: I don't think any editor does what I want at the moment, though I'm lobbying ;-)

5:41 tomoj: do you think prior-arg-alignment doesn't help that much for readability?

5:41 * ejackson wishes it was just a presentation layer thing, divorced from the code

5:41 Raynes: ejackson: U SO INNOVATIVE

5:41 tomoj: readability is more important to me than the tiny bit of time I spend writing indentation

5:41 ejackson: let the editor show it to me in a sensible format, and to Raynes in Klingon !

5:41 cemerick: Raynes: well, anyone submitting pull requests or whatever that significantly changes indentation is a tool, in any case.

5:42 pyr: ejackson: it would make reading code on GH a bit harder though

5:42 cemerick: ejackson: Indeed, text editing is caveman-style.

5:42 And, yet.

5:42 ejackson: that should be in Rich Hickey Canonical format that we all learn :)

5:42 Raynes: cemerick: I'd be inclined to not do anything with code with those sorts of indentation rules because of the reasons I outlined above, which would make me sad.

5:43 tomoj: what, if it doesn't match clojure-mode, you won't touch it?

5:43 n_b: ejackson: I'm very uncomfortable with anything that changes how the code is viewed depending on editor

5:43 beyond colouring and size. Just seems rife for problems down the line

5:43 ejackson: n_b: you shouldn't be, its just data.

5:43 and the editor is a pretty printer.

5:43 Raynes: Also, damn it cemerick. You had to start a flamewar at 4AM and now I've wasted 30 minutes not writing laser.

5:43 cemerick: Raynes: LOL. Dude, I tagged it as such. *and* you replied in ~30 seconds!

5:44 ejackson: that damn cemerick ! Its ripe for Meme'ification.

5:44 Raynes: tomoj: No, if it is wildly different from clojure-mode (as this is) and I need to work with a large portion of it.

5:44 n_b: Time to update clojurebot to support MemeTeX

5:44 Raynes: tomoj: Emacs will constantly change the indentation. I'd probably have to switch to text-mode just to stay sane.

5:45 tomoj: must be some switch that says "don't do indentation"

5:45 but yeah

5:45 Raynes: The last thing I want is for ccw to do one thing and emacs to do another.

5:45 cemerick: Raynes: it already happens, and has for years

5:45 rbarraud: Reification at the least. A cemerickation as a UDT.

5:45 pyr: yup, get the vim part to behave the same and then you're mostly set

5:45 Raynes: That makes it okay.

5:45 !

5:46 cemerick: clojure-mode has always had the most intricate ruleset w.r.t. indentation

5:46 tomoj: that seems like a polite word

5:46 cemerick: Raynes: Yes, trivial differences in code styles is okay.

5:46 rbarraud: Pp. : intricated...

5:46 Raynes: I used Vim for quite a bit of Clojure code authoring. Turned on fuzzy indentation and outputted pretty much exactly the same thing as Emacs with the small difference of one space in cond calls.

5:47 tomoj: can we let editors munge the indentation and then just patch it up semi-automatically before comitting?

5:47 Raynes: Sublime Text 2 works fine with that new plugin thing to work around how much it sucks.

5:47 I haven't had this "has for years" stuff happen to me in Clojure editors yet.

5:47 cemerick: Also, that is true. It's only because I hate you so much.

5:48 <3

5:48 You tag #flamewar, you better expect one.

5:48 cemerick: Raynes: Insofar as you've ever touched code I wrote, it's happened to you; and, you likely didn't even notice.

5:48 Raynes: I'm pretty sure I've never touched code you've written, actually.

5:48 cemerick: Raynes: Mostly, I was trying to wheedle down your productivity.

5:48 Raynes: And I'm pretty sure I'd have noticed.

5:49 cemerick: Raynes: I'm submitting a PR on bultitude, and there's gonna be 2 spaces missing. Watch out!

5:49 Raynes: That's it. I'm just using Haskell from now on.

5:49 Take your indentation and shove it.

5:49 cemerick: Score!

5:50 ejackson: :)

5:50 * ejackson notes to Raynes that indentation is a form of shoving...

5:51 Raynes: For all watching, cemerick and I are actually long time friends. We go way back to before I was a fetus. None of the angry comments exchanged are actually serious at all, and this whole event was orchestrated entirely for your entertainment. We'll be doing this show for the remainder of this week and the first half of the next. You can buy tickets at eventbrite.

5:52 * ejackson chucks 2 bob into the hat laid out.

5:52 cemerick: Raynes: turn on the page now. Daddy needs a new pair of shoes.

5:56 rbarraud: Why u no instantiate a shovination?.

5:56 ,

5:56 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

5:56 rbarraud: .!!?

5:56 Lolz.... Y

5:57 borkdude: ,

5:57 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

5:57 rbarraud: Yegge rant q.v. :-)

6:00 tomoj: :( when I get an error now, it prints the stacktrace over and over many times until I hit ctrl-c

6:16 Raynes: tomoj: It's making sure you see the error. The important part is the indentation.

6:17 tomoj: oh, it's because one.test retries every 10ms

6:17 by default, for 60s..

7:11 tgoossens: borkdude: about "asking for forgiveness is easier than asking for permission"

7:11 they got quite mad at me :p

7:11 borkdude: lol

7:11 tgoossens: their argument: because then my teammates cannot read and use and change to code any more

7:12 borkdude: good argument

7:12 tgoossens: correect

7:13 borkdude: tgoossens what about my suggestion of buidling the same thing in both languages, just for demo purposes

7:13 tgoossens: i've been considering that yes

7:13 the thing is

7:13 as far as i know there is no NXT library in clojure (not just a wrapper around lejos)

7:13 so maybe i just found myself a project for next semester

7:14 borkdude: tgoossens I think I saw smth about this, but never looked into it http://link.springer.com/content/pdf/10.1007%2F978-3-642-13541-5_6

7:15 tgoossens: i think it is still based on lejos

7:15 but maybe it works its way around the flaws of it

7:15 (and lejos has some serious flaws)

7:17 so i'm considering about writing nxt lib from scratch but maybe that's a bit overrated

7:19 borkdude: good luck :)

7:23 thomas`: join #go-nuts

7:30 tgoossens: borkdude: also. Knowing my teammates. I'm pretty sure they are not interested in my alternative approach

7:31 borkdude: tgoossens probably they will only start to use it, when they clearly see the benefit of it

7:32 tgoossens: i mean. they are not intested in taking the time to let me demo it.

7:32 borkdude: tgoossens for some things like GUIs or heavy Java interop maybe just Java the best fit

7:32 tgoossens: at least not all of them

7:33 borkdude: tgoossens don't worry about it too much, it's standard practice also at my work

7:34 tgoossens: I'll just try to find some projects for myself during the year

7:34 that's always a hard part of it. finding an interesting project :p

7:35 borkdude: I gtg

8:13 narmi: hi

8:13 apart from being run on jvm, what are the differences between clojure and cl

8:13 like what types of things is one language better suited for than the other?

8:26 nonrecursive: narmi: what's motivating your question? are you new to clojure / cl and trying to figure out what to learn first?

8:26 narmi: what's motivating your question? are you new to clojure / cl and trying to figure out what to learn first?

8:27 narmi: yes

8:27 actually i am trying figure out whether i should learn one, the other or both

8:29 daimrod: narhttp://hyperpolyglot.org/lisp

8:29 nonrecursive: in that case I would suggest learning clojure first. i learned CL first, and while it was fun, clojure has been much more enjoyable for two reasons: 1) the ecosystem is much better, especially when it comes to using external libraries. with CL, finding and using someone else's code is a big pain. in clojure it's pretty easy 2) clojure is much "smoother" than common lisp, if that makes sense. the language is just a bit nicer to work with

8:29 daimrod: nonrecursive: did you use CL with Quicklisp?

8:30 nonrecursive: daimrod: yep I did and it was still painful. for example, it would pull in versions of libraries that were a few years old

8:31 daimrod: that's weird, because Zach compiles the latest release.

8:31 ro_st: nonrecursive: Clojure for sure. the whole lot has been built for developer ease from the ground up. one of RHickey's stated design goals is to be a modern general purpose programming language.

8:31 nonrecursive: daimrod: this was awhile ago now but i remember also having to learn about asdf in order to use quick lisp… just had to know too much

8:31 daimrod: yeah not trying to disparage his work, it's definitely the best thing for CL. i just think the project.clj file is way nicer

8:32 fredyr: enough CL to read On Lisp, enough Scheme to work through SICP and Clojure for the rest of it?

8:32 :)

8:33 daimrod: narmi: try to both, for CL there is PCL, for Clojure I think that Intro to Clojure is the best.

8:33 nonrecursive: fredyr: haha yeah pretty much

8:33 ro_st: haha that was meant for narmi.

8:33 that'll teach me to irc within minutes of waking up

8:34 nonrecursive: narmi: i learned CL through Land of Lisp - it was super fun

8:36 daimrod: fredyr: imo PAIP is much better than On Lisp.

8:36 narmi: what is paip

8:37 nonrecursive: paradigms of artificial intelligence programming i think

8:37 fredyr: ya

8:37 narmi: okay

8:37 so what is clojure good for then?

8:37 fredyr: i haven't read it, but now i need to order it straight away i think

8:37 :D

8:37 nonrecursive: :)

8:38 ro_st: narmi: web startup here. we use it for our entire stack. server, client, database, devops, campfire bot

8:39 narmi: okay thank you

8:40 fredyr: is it your first functional language you're going to learn?

8:40 narmi: yep

8:40 ro_st: database is datomic. devops with palletops.com. client with clojurescript.

8:40 nonrecursive: ro_st: what's your web site?

8:41 ro_st: our entire codebase across all of that including tests is under 20k loc. previous v1 client codebase, in flex/air, alone was 25k

8:42 nonrecursive: the v2 stack isn't live yet. 14 jan -fingers crossed- v1 stack still available at www.cognician.com

8:42 fredyr: narmi: clojure is strong on the functional side, with immutability and such, so it's a good place to start

8:42 nonrecursive: ro_st: cool :) good w/ your release

8:43 ro_st: thank you

8:43 narmi: okay

8:43 ro_st: looking forward to killing php

8:43 nonrecursive: :D

8:43 fredyr: cool with an all clojure shop

8:44 ro_st: clj is the most fun i've had programmin' in 15 years :-)

8:44 fredyr: :)

8:44 ro_st: and i'm off. ciao!

8:45 fredyr: later

9:30 rhickey: Please retweet, contact blip etc: https://twitter.com/richhickey/status/279210140425674754

9:32 they just nuked my account without warning

9:32 ejackson: cheeky bastards !

9:36 jimduey: Did they give any reason?

9:42 Foxboron: jimduey, i got a feeling "without warning" implies no reason.

9:44 ambrosebs: I'm assuming Rich will be taking his business elsewhere?

9:45 rhickey: violation of terms of service, no enumeration thereof, and not warning, after the fact

9:45 Iceland_jack: Was there any recent activity that might have triggered it?

9:45 rhickey: not on my part, other than paying

9:49 ohpauleez: jimduey: ambrosebs: is that in regards to blip?

9:50 ambrosebs: ya

9:50 ohpauleez: gah, terrible news. Pretty ridiculous. Sorry Rich et el who have to deal with that

9:51 alexnixon: when creating a closure e.g. (let [x (make-huge-thing)] (fn [] 42)) does the closure capture a reference to enclosed variables which aren't used? (e.g. x in that example)

9:51 ambrosebs: such a waste of time

9:53 nDuff: Is the original content still archived somewhere?

10:12 TimMc: alexnixon: I would think not -- locals clearing should take care of them.

10:17 alexnixon: TimMc: cool thanks. I read (https://groups.google.com/forum/#!msg/clojure/Xmu3pUMgiJk/Lx1Sq462h4wJ) that locals clearing code is emitted on the last *use* of a variable (here there isn't one). Does that mean that in this contrived example I'd end up keeping a reference to x?

10:18 bordatoue: hello, I come across an issue with ,(import ) from the repl, I had a set of .jar files, one of them is a deprecated API (.jar) , I could successfully import all the .class files from all the .jar files apart from the deprecated API. It appears that (import 'some.deprecated.api.Class) is not working. Is there any way to use a deprecated API with clojure, I can see no such restrictions in java. When compiling the .java file that uses the

10:18 deprecated API only a warning is generated.

10:18 alexnixon: TimMc: I guess it's the difference between "x is captured, but it's OK due to locals clearing" vs. "x is not captured at all"

10:19 oliyh: hi, i am trying to extend PersistentList using proxy but the constructor of the java class doesn't give me any scope to do this. essentially what i want to do is create a normal list and just override the count function to return a value i have at construction time

10:20 TimMc: alexnixon: https://www.refheap.com/paste/7549 Maybe not quite what you were asking.

10:20 oliyh: if PersistentList had a public constructor accepting another list i could do it, the fact it doesn't makes me suspect i am on the wrong road

10:22 alexnixon: TimMc: I think it doesn't *quite* answer my question though as you've used 'huge' when creating the weak reference, so clearing code will be emitted

10:23 TimMc: asking for gc is a good way to test this though - I'll poke around and see if I can answer it myself

10:25 joegallo: oliyh: perhaps you could just proxy clojure.lang.Counted and use the provided list in a closure?

10:26 oliyh: joegallo: how would i specify the behaviour of all the other PersistentList methods i wanted to retain?

10:27 TimMc: &((apply comp (take 20 (cycle [keyword str]))) :colons)

10:27 lazybot: ⇒ :::::::::::colons

10:28 joegallo: (proxy [PersistentList Counted] ...) and then you only fill in an implementation for count. I THINK.

10:30 oliyh: that's what i have so far joegallo but the problem i then run into is that to construct a PersistentList the only public constructor is public PersistentList(Object first)

10:31 joegallo: ahhh now i get it. my bad.

10:32 bordatoue: has anyone tried importing a deprecated class in clojure

10:32 oliyh: what i want is (defn truncated-coll [size coll] (proxy [clojure.lang.PersistentList] [coll] (count [] size)))

10:32 but then i have a list of lists... so is there a better way to achieve what i want to do?

10:33 joegallo: bordatoue: there's nothing magic about deprecated classes as far as i know. it sounds like it's just a part of the package name, and nothing special. i think you're probably just making some simple error. perhaps you should gist some real code instead of just saying some.deprecated.api.Class.

10:33 nDuff: ...part of the name, or an annotation?

10:33 Still, shouldn't matter.

10:34 joegallo: oliyh: why can't you just call (take coll size)?

10:34 danlarkin: (doc take)

10:34 clojurebot: "([n coll]); Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n."

10:35 bordatoue: joegallo: i have got a .jar file from a client that has some deprecated decorators all over the place, i strongly suspect import is preventing deprecated classes from being imported . Are you telling me import will work fine with deprecated classes

10:35 TimMc: joegallo: That still doesn't make it a counted? instance.

10:36 oliyh: You want count to return in constant time, yeah?

10:36 bordatoue: joegallo: I will try it with just a single class

10:36 joegallo: TimMc: I didn't an explanation of why he needed it to be a counted...

10:36 TimMc: It's just my intuition, I don't know either.

10:38 oliyh: joegallo: i'm building a web page where i want to provide a collection of objects to be displayed, where this collection is of a conveniently displayable size (e.g. 10) but that many more exist in the database (hundreds) which will be collected via ajax or something

10:39 i want to also display a total count to the user, hence count should display the size in the db but when i iterate over my collection i only want the first ten

10:39 as far as i know, i can't count a lazy seq without realising it all in memory

10:39 joegallo: bordatoue: (import 'java.io.LineNumberInputStream) works just fine here, and that's an @Deprecated class.

10:40 are you perchange trying to (import 'some.deprecated.stuff.*), because that won't work, btw.

10:40 oliyh: so what i am essentially trying to do here is create a lazy seq that can be counted but not realised, where my count return value is computer cheaply via a count in my data source

10:40 danlarkin: oliyh: why are you making your life so complicated. Query the database for both the count() and the first/last/whatever 10 items

10:41 and be done with it

10:41 alexnixon: TimMc: https://www.refheap.com/paste/7550 everything looks ok despite the fact that x is never used, so presumably isn't cleared. I guess the compiler has some logic to capture only the subset of the environment that the closure uses

10:41 joegallo: oliyh: my $.02, danlarkin is right, return a tuple of [(.someCheapCountIGotMagically db-stuff) (take 10 the-lazy-seq-or-whatever)]

10:41 danlarkin: no, no (take 10)

10:42 just have the DB return only 10 items

10:42 joegallo: ah, logical

10:42 that's even better.

10:42 oliyh: danlarkin: yes, there are practical solutions like yours. it's turned into more of a thought exercise though and i'd hoped it could be solved with extend or protocol or similar

10:42 in java the solution is obvious, and clojure >> java no?

10:44 danlarkin: obvious troll is obvious

10:44 oliyh: i'm really not, if that's directed at me - i'm trying to learn

10:45 nDuff: oliyh: ...so implement Counted

10:47 oliyh: ...by the way, are you Oliver Yu, formerly of M1?

10:47 danlarkin: following rat holes by doing things "the java way" in clojure is not a "thought experiment", it's a waste of time and won't teach you anything about how to get the most out of clojure

10:48 oliyh: nDuff: no, i'm not

10:48 alexnixon: danlarkin: his question is "how do I implement a constant time count method for a lazy sequence?". That's a great question.

10:49 oliyh: danlarkin: i'm trying to implement the clojure way, not the java way - as i explained to joegallo, i am very close with my code above, just thwarted by the java constructor of PersistentList

10:50 alexnixon: a very concise summary, thanks

10:50 bordatoue: joegallo: thanks very much

10:50 danlarkin: vec

10:50 that's how you do it

10:51 joegallo: bordatoue: you're welcome. this all gets a lot easier, but for a while the learning curve is steep.

10:51 bordatoue: in emacs if i kill the repl and type clojure-jack-in will it reload the classes

10:52 trptcolin: umm, good luck w/ constant-time count on lazy seqs

10:52 ohpauleez: trptcolin: exactly

10:53 bordatoue: joegallo: there was something wrong , i don't know if it is something do with emacs , I checked the classpath using ps and found it had the .jar files in the classpath . On restarting emacs and trying to import the same class seems to have solved the issue.

10:53 ohpauleez: It's mostly an oxymoron "constaint-time count on lazy seqs" - in order to count, something needs to be realized. danlarkin already said the easiest (and shortest) realization- vec

10:54 and there's no telling if you lazy seq is actually a generator-like thing producing a lazy-seq

10:54 or just a lazy-seq of a finite number of elements

10:54 joegallo: bordatoue: k, sounds like maybe those jars ended up in your classpath after you started your repl, which is usually problematic.

10:54 trptcolin: either way, it's at best linear-time, unless you have a way to get ahold of whatever's behind the lazy seq

10:54 bordatoue: joegallo: so is there any way to see the classpath within the repl

10:55 ohpauleez: exactly

10:55 bordatoue: joegallo: you might be right, classes could have entered the classpath after i had started the repl

10:55 alexnixon: ohpauleez: he's not after a general solution so that point's moot

10:55 * ohpauleez hits the scroll back

10:56 joegallo: bordatoue: nothing new in that department since yesterday. you can still (System/getProperty "java.class.path") and it'll still be inaccurate if something has been doing clever things with classloaders.

10:56 oliyh: if it's really not possible i can accept that, but i was reading stuart sierra's paper on the expression problem which led me to believe it would be possible

10:56 danlarkin: oliyh: it's not just that it isn't possible, it's that it doesn't even make sense

10:57 TimMc: danlarkin: Sure it makes sense.

10:57 If I know my generator, I may know the total length.

10:57 For instance, (range 10) is lazy, but I know the count ahead of time.

10:58 danlarkin: blurf

10:58 joegallo: (vec (range 10 ...)) like magic

10:58 :)

10:58 bordatoue: joegallo: when you say clever things, is it possible to remove a certain classes from the classpath

10:58 TimMc: oliyh: Why do you need it to be lazy?

10:59 Also, laziness may be a problem if you're working with database connections.

10:59 joegallo: bordatoue: a lot of things are present in the bowels of the java classpath. i would imagine it would be possible for you to add and remove classes dynamically, but you'll probably release the balrog.

10:59 oliyh: there are hundreds or thousands of elements in my use case, holding them in memory server side or trying to display them all on page load client side is expensive

10:59 joegallo: that would probably be out of the ordinary for you to do, and i suggest you consider that way shut.

11:00 danlarkin: oliyh: this is a stupid discussion. query the DB for the total count and the first/last/whatever 10 elements and be done with it

11:00 there is no other sensible way to do it

11:00 bordatoue: joegallo: okay, thanks

11:01 TimMc: oliyh: In the general case, I'm sure you can make a lazy seq that implements Counted. In the specific, practical case, danlarkin is right.

11:02 (and by "general case", I don't mean *all* lazy seqs, just a specific subset)

11:02 oliyh: fair enough, thanks for the debate everyone

11:03 alexnixon: TimMc: given clojure.lang.LazySeq is final and implements count, how so?

11:03 trptcolin: implement ISeq & Counted

11:06 alexnixon: trptcolin: an option, but it feels a bit clunky given you're writing LazySeq from scratch

11:06 TimMc: Passthroughs, mostly.

11:06 No, it would just be backed by a LazySeq.

11:07 trptcolin: of course. you want not-clunky, you do what danlarkin says ;)

11:07 alexnixon: TimMc: sure - and the other interfaces that LazySeq implements?

11:07 TimMc: What about them?

11:08 I suppose IPending is interesting.

11:08 alexnixon: TimMc: you're not going to have (e.g.) a realized? function unless you implement that yourself

11:08 TimMc: alexnixon: They'd all be chained to the underlying LazySeq.

11:10 next/rest would give you a new CountedLazySeq with a dec'd size.

11:10 alexnixon: yeah I understand that, it just doesn't feel particularly nice (admittedly doing this at all is stretching the boundaries of sanity)

11:11 TimMc: Who said anything about nice?

11:11 ohpauleez: Clojure is a great language because if something seems hard, you're most likely doing it wrong

11:12 alexnixon: well as oliyh said, you'd hope to be able to add new functionality (O(1) count) to an existing type (LazySeq). I guess the counter-argument here is that you own neither, and so are probably doing something you shouldn't.

11:13 TimMc: Right, so mimicing/wrapping is the "best" solution.

11:13 alexnixon: sure

11:14 just trying to understand why, and I think I'm coming to the conclusion that "you own neither LazySeq nor count" is the reason.

11:14 ohpauleez: no the argument here is counting a lazy-seq is O(n) at best, unless you fake it, in which case you're better off just def'ing the value to something (an atom if you want to continually adjust it)

11:14 monkey-patching ala protocols is completely sane - I do it from time to time

11:14 TimMc: ohpauleez: Ignore the semantics of counting seqs for a minute -- shouldn't it be easy to create something that adds an interface?

11:15 ohpauleez: TimMc: yes

11:15 TimMc: I guess what we're talking about here is concrete inheritance.

11:19 Protocols wouldn't make sense here, since we're really talking about creating a new class, distinct from LazySeq.

11:30 noidi: is there a better way to concatenate a bunch of vectors together than (reduce into my-vecs) ?

11:32 dpick: cemerick: got a sec for a friend question? I'm trying to log a user in when they regsiter but I can't get the auth info into the session

11:32 ohpauleez: noidi: you could do something like: (into [] (concat [1 2 3 4 5][1 2 3 4 5]))

11:33 llasram: noidi: Depends on context. If you don't need the result to be a vector, just (apply concat my-vecs) will return a lazy sequence of the vector contents

11:33 ohpauleez: that's better

11:33 if you don't need a vector coming out

11:34 noidi: yeah, that's what I thought

11:34 ohpauleez: (into (first my-vecs) (apply concat (rest my-vecs))) is also an option

11:34 berdario: Hello, when I first looked at clojure, I thought that it had TCO... when I got to know about the lack of TCO, I assumed that all processing on lists too big to recurse through the stack was done with map and reduces... but now I realized that what people actually use is (recur)

11:35 noidi: I was actually just asked this question, and wondered if my answer was correct :) ("use concat if you don't need a vec result, otherwise use reduce into")

11:35 berdario: My doubt is: I'm seeing recur used also for looping over a list of files in directories... is this normal and idiomatic clojure code?

11:35 noidi: berdario, probably not

11:35 n_b: I'm currently in the process of wrapping Twilio's Java API library as a first 'Ship something in Cloure' project and having some trouble determining the best way of doing it idiomatically; could someone point me in the direction of another Clojure wrapper around a REST API?

11:35 Or do you think I might be better off just building it up from scratch?

11:36 noidi: berdario, http://blog.fogus.me/2011/03/09/recursion-is-a-low-level-operation/

11:36 ohpauleez: berdario: Sometimes you use explicit recur for performance (in certain applications)

11:36 but usually its avoided

11:36 berdario: I mean: most directories have a small fan out... and without (recur) I should be able to handle easily more than a thousand

11:36 oh, thanks

11:37 noidi: if you just want to iterate over a list of files/directories/whatever, use map, for, or doseq

11:37 ohpauleez: n_b: Look at the github wrapper

11:37 I think the project is called clj-github

11:38 n_b: ohpauleez: Will do, cheers :) (and that is the name)

11:38 ohpauleez: n_b: you might also find some more examples at: https://github.com/dakrone/clj-http

11:40 seangrove: Hrm, noir has stopped serving static files altogether

11:40 This is what I get for restarting my computer...

11:41 n_b: ah, the joy of debugging "W[ed]fm"

11:43 berdario: noidi: for the sake of completeness... I want to split an existing function that uses recur (not written by me) in two, and I was wondering if it was a bad idea to rewrite it without recur (it probably is: since I guess that the original author did it that way for performance reasons... even if it seems strange to me)

11:44 seangrove: If I have a file `resources/public/js/lib/md5.js` in the root of my project, then `lein run` should serve it up at http://localhost:8080/js/lib/md5.js, right?

11:44 Assuming lein run kicks off noir on port 8080

11:45 noidi: berdario, if he did it for performance reasons, he should've documented the fact :)

11:46 TimMc: I'd like to write a small email autoresponder -- can anyone point me to some valuable Clojure libraries for that task?

11:47 That is, what libraries would I be really sad about discovering *after* the fact?

11:47 clgv: berdario: he must likely did it to avoid stack consumption

11:49 berdario: clgv: assuming that performance doesn't matter in this case, and that the input size is too small to cause a StackOverflowError... what's the reason for avoiding stack consumption?

11:49 clgv: berdario: the StackOverflow is ;)

11:49 wanted to write "most" instead of "must"

11:52 noidi: doseq doesn't consume stack either

11:52 llasram: berdario: Can you show the original function under discussion?

11:52 noidi: nor will map or for

11:52 clgv: noidi: how do you want to implement a recursive function via doseq?

11:53 noidi: clgv, it's already tail recursive, so one of clojure's iteration operations might be a better fit

11:54 [18:28] < berdario> My doubt is: I'm seeing recur used also for looping over a list of files in directories... is this normal and idiomatic clojure code?

11:54 that's why I mentioned doseq/map/for

11:54 clgv: doseq would only work if he doesnt accumulate something

11:54 TimMc: If there are multiple state bindings, recur also avoids some allocation.

11:54 noidi: clgv, then there's reduce :)

11:55 TimMc: whereas iterate would incur destructuring costs

11:55 llasram: Since berdario did mention it being used for files & directories, explicit recursion might be being used to implement breadth-first traversal

11:55 TimMc: (and allocation costs, of course)

11:55 clgv: noidi: but not doseq (that was all I said above) ;)

11:55 noidi: this whole discussion is kind of pointless without seeing the function in question :)

11:56 but plain recur is very often too low-level a tool, and used only because the author wasn't familiar with the higher-level operations that clojure provides

11:59 alexnixon: TimMc: I've used com.draines/postal for sending emails, though AFAIK it doesn't support receiving them

12:02 stoneg: how can I launch clojure.main -r in a specific namespace?

12:03 seangrove: I'm baffled - why would noir say 404 for all static assets?

12:04 n_b: ohpauleez: This is exactly the sort of thing I was looking for, thank you :)

12:05 ohpauleez: n_b: totally welcome!

12:06 stoneg: like this, launch clojure repl using `java -Xmx1G -cp $CLASSPATH clojure.main -i src/my_repl/repl.clj -r` http://pastie.org/5521120, so I after launching clojure repl , it's already swithced to my-repl.repl, and the var defined is already available

12:07 dudleyf: What happened to clojure.blip.tv?

12:07 seangrove: dudleyf: Not sure, but there was mention of it on the ml

12:07 hiredman: https://twitter.com/richhickey/status/279265816153833473

12:07 seangrove: The videos are available in the iTunes podcast apparently

12:09 stoneg: any suggestions about switching namespace in the repl pragmatically ?

12:24 ohpauleez: dakrone: wrt lein-bikeshed : would you be open to a patch to allow no more than one blank line at the end of a file

12:24 bordatoue: please can anyone provide hint on how to iterate through an map as in Hashmap with delay (lazy)

12:25 trptcolin: ohpauleez: i disagree. multiple blank lines at the end are an important expression of my individuality

12:25 ohpauleez: according to Unix Programming standards (which I still tend to follow) all files are supposed to have one blank line at the tail of the file

12:25 trptcolin: bikeshed, bikeshed, bikeshed

12:25 ;)

12:25 ohpauleez: :)

12:25 technomancy: yeah actually cron files will exhibit horribly broken behaviour if you omit the trailing newline

12:26 trptcolin: !

12:26 technomancy: crontabs I mean

12:26 trptcolin: the last line will be silently ignored

12:26 ohpauleez: right

12:26 trptcolin: that is insane

12:26 nDuff: ...you don't need a blank line

12:26 you _do_ need a \n character on the last line

12:26 technomancy: trptcolin: it really is

12:27 nDuff: bash "while read" loops won't work if your last line isn't terminated by a \n either, as read returns nonzero in that case.

12:27 joegallo: dakrone: do not accept multiple blanks lines at the end of a file. one and only one is the magic.

12:30 jml: Does anyone know if rhickey's talk "Language of the System" that he gave at Techmesh last Tuesday is available online?

12:31 I've found the ClojureX version, but I suspect that the techmesh one will be more informative for my non-Clojurian colleagues.

12:31 seangrove: jml: I believe the one from skillsmatter is online at least

12:32 jml: seangrove: yeah, have got that one, thanks. (also, was at the event, which was a lot of fun)

12:33 stoneg: how to launch clojure repl using `java -Xmx1G -cp $CLASSPATH clojure.main -i src/my_repl/repl.clj -r` http://pastie.org/5521120, so I after launching clojure repl , it's already swithced to my-repl.repl, and the var defined is already available ?

12:35 seangrove: stoneg: Not sure, wei_ in here has his projects setup like this though

12:51 ppppaul: hey guys. i'm new to datomic. is there an easy way for me to connect to the dataomic repl from emacs swank?

12:51 or, is the datomic reply just the clojure repl with nothing added?

12:51 reply->repl

12:52 hiredman: ppppaul: you can look at the shell script

12:52 I am pretty sure it is just the clojure repl with the datomic client on the classpath

12:53 ppppaul: the shell script is quite minimal

12:54 if i put the free transactor pom and datomic pom in my deps should i need any other setup to run the sample scripts?

13:01 * technomancy wonders if there's a datomic channel

13:01 technomancy: I guess probably not on freenode, given the topic

13:01 trptcolin: zing!

13:02 ppppaul: anyone using lein-datomic?

13:02 the github page says that i need to edit my ~/.lein/profile file, but there isn't really anything in my .lein folder cept a jar

13:03 ohpauleez: ppppaul: You write your own profile file

13:03 it's like your own global lein conf

13:05 ppppaul: oh

13:05 somehow doing that didn't cross my mind

13:05 i thought that i may be looking in the wrong folder

13:07 scottj: ppppaul: there is #datomic btw, though last I checked it was pretty quiet

13:11 ppppaul: ok

13:12 devn: lein-datomic is nice

13:13 i wish they'd figure out a better packaging situation for datomic

13:14 i tried to write a homebrew formula for it and bin/ is a PITA -- lots of paths need to be rewritten for it to be installed in /usr/local/bin/{binaries} and know where its deps are

13:16 technomancy: homebrew takes recipes for proprietary programs?

13:17 epitron: technomancy: witch's brew

13:18 ppppaul: there is brew for neo4j

13:18 it's not OSS

13:20 trptcolin: ? https://github.com/neo4j/neo4j

13:20 epitron: "Our community edition (in the community/ directory) is GPL. Our advanced and enterprise editions (advanced/ and enterprise/, you get the drill) are Affero GPL and so have different licensing implications."

13:21 i guess technomancy is all about the enterprise

13:22 actually, there's nothing proprietary about any of this :)

13:22 what're you talking about ppppaul

13:42 ppppaul: i'm talking out of my ass

13:42 neo4j has some weird licence

13:43 technomancy: dual-licensing isn't that uncommon

13:49 ppppaul: how do i re initialize the clojure.core namespace?

13:52 it seems like i overwrote the filter function

13:53 when i try (ns 'clojure.core) i get a warning and it doesn't overwrite it again

13:53 rbxbx: (require 'clojure.core) ?

13:54 ppppaul: require doesn't overwrite my filter, but it didn't throw an error either

13:54 (use) is throwing an error

13:54 llasram: ppppaul: You overwrote clojure.core/filter itself, or the reference to clojure.core/filter in your namespace?

13:55 ppppaul: i overwrote it in my namespace

13:55 err, the ref changed in my namespace

13:55 i want to change it back to the core filter

13:55 WARNING: filter already refers to: #'clojure.core/filter in namespace: user, being replaced by: #'datomic.api/filter

13:55 llasram: ppppaul: (do (ns-unmap *ns* 'filter) (require '[clojure.core :refer [filter]]))

13:56 ppppaul: oh wow, that's a bit of work

13:56 thanks

13:57 it works!

14:06 n_b: I need to store some authentication credentials that might be changed during runtime - should I be using an atom or use a def and mark it as dynamic then use a macro with a binding?

14:07 nDuff: n_b: Could they be set differently between threads?

14:07 n_b: ...or will it always be global?

14:07 n_b: I can conceivably see it being different between threads

14:07 nDuff: Then you want a dynamic var.

14:08 n_b: and then use binding?

14:18 rbxbx: Raynes: are there any reading materials around lib-noir? I'm guessing the noir docs themselves are it?

14:18 ... and the source code, of course ;)

14:30 germanguy: hello can somebody help me

14:30 lein uberjar gives the following error: lein-javac: system java compiler not found; a JDK (vs. JRE) install is required.

14:30 I am using windows7 and in path i have my JDK7

14:37 n_b: is lein using the proper path settings?

14:46 sshack: Okay, are there any clojure web frameworks that aren't "Here's some wood and a saw. Hope you like your bookshelf"?

14:46 I'd like to focus on my app, not the infrastructure.

14:47 ibdknox: Can anyone think of a way to make an unrealized copy of a LazySeq?

14:47 brehaut: sshack: go use rails or django and make your app a service that the webapp talks to

14:48 ibdknox: I tried to do this via reflection pulling the .fn field out and creating a new LazySeq with it, but locals clearing screws me over :(

14:48 sshack: brehaut: It's slightly tempting. But I'd rather not touch rails with a 10 foot pole. I just don't like having to do things like user authentication for myself.

14:49 ohpauleez: ibdknox: can you short-circuit that in a closure?

14:49 amalloy: ibdknox: an unrealized copy of a lazy seq? what does that mean?

14:49 brehaut: sshack: i think you are in a cake and eat it situation

14:49 ohpauleez: I assume you have some sort of generator, that will realize data via computation (a function) and you want to copy that, but I'm not sure why

14:49 ibdknox: amalloy: I want to capture the values of a lazyseq without realizing the original - I'm trying to store intermediate states of execution

14:50 I don't want to realize the original so I can be intelligent about whether or not to show the whole thing (because it was actually realized by the user's code)

14:51 ohpauleez: I don't think I can do the closure thing because the problem is that the function is marked with ^:once

14:51 by the lazy-seq macro

14:51 ohpauleez: ibdknox: why not just realize a limit of what you're willing to show

14:52 it's just going to cache anyway

14:52 amalloy: ibdknox: you can probably make a copy of the function (not just the pointer to it)

14:52 ibdknox: amalloy: oh? How would I do that?

14:52 amalloy: well, i was thinking (with-meta f {}). but i guess these days that doesn't make another function

14:53 brehaut: sshack: there is https://github.com/macourtney/Conjure but i think you'll find its rails all over again "Conjure is a Rails like framework for the Clojure programming language". If sandbar, friend and libnoir doesnt add what you need, i think you are out of luck

14:53 ibdknox: amalloy: yeah no luck, I tried that one

14:54 technomancy: sshack: finding just the right abstraction for user management is really hard. there have been attempts that do things for you but are not the right abstraction, but we're still waiting for the Right Thing

14:54 ibdknox: ohpauleez: I could, but the user experience is kind of crappy there. For example, in an unrealized seq I only really want to show a couple values and that it continues on for some unknown number. If I changed that to "I'll let you do 250" now the code will be unreadable because these huge pr-str'd seqs are everywhere

14:55 brehaut: sshack: i'd also be worth noting that conjure builds on clj-record and even the author of that doesnt like it http://elhumidor.blogspot.co.nz/2012/11/why-not-to-use-my-library-clj-record.html

14:55 technomancy: amalloy: it creates another function, surely? just one that delegates to the original?

14:55 ohpauleez: ibdknox: ahh

14:57 technomancy: part of what makes clojure unique is that people (in general) are willing to wait for the right abstraction rather than jumping on board with the wrong abstraction that happens to make life easier in the short term

14:59 nDuff: n_b: binding if you want to set the value only for the local thread and agents/&c. started from it, change-root-binding (or whatever exactly it is) if you want to set a new default that isn't thread-local.

15:01 x89: I bet some of you guys also know erlang, so: is there something like ->> in erlang?

15:02 devinus: can anybody give me a list of the most useful/coolest lein plugins?

15:02 x89: tell me what ->> does in clojure and i'll tell you if it exists in erlan

15:02 erlang

15:03 technomancy: devinus: there's a listing of plugins on the wiki, though not sorted by coolnes

15:03 devinus: technomancy: i know, that's what i'm looking for tho :P

15:03 sorted by hawtness

15:04 sshack: brehaut: I shall look at conjure. I'm fine with working with different libraries. But when very basic bits are missing, it's a turnoff.

15:04 devinus: lein-ring for example is super useful, but lein-marginalia is cool

15:04 brehaut: sshack: my preference (and i think its not uncommon here) is that missing is better than broken

15:04 sshack: and yes I realize there's no "right thing yet. It's acceptable to say "This is designed for one purpose only". After all we have flatbed trucks and convertibles.

15:04 technomancy: devinus: my list: lein-pprint, lein-difftest, lein-guzheng

15:05 brehaut: sshack: but its your own neck

15:05 sshack: Broken and specific to a particular problem/domain are different.

15:05 x89: devinus: (reduce + (filter #(rem % 3) (range 10))) -> (->> (range 10) (filter #(rem % 3)) (reduce +))

15:06 devinus: x89: i'm on page like 150 of Joy of Clojure, so i'm unsure what -> does either

15:06 x89: devinus: I meant -> as a "meta" characther

15:07 I'l try again

15:07 devinus: (reduce + (filter irc://chat.freenode.org:6667/#(rem % 3) (range 10)))

15:07 is the same as

15:07 devinus: oh i see

15:07 x89: (->> (range 10) (filter irc://chat.freenode.org:6667/#(rem % 3)) (reduce +))

15:07 devinus: so

15:07 x89: whoops

15:07 how did that get there

15:07 devinus: so basically it lets you compose in reverse?

15:08 x89: something like that

15:08 it is a macro, so maybe erlang does not have something like that at all

15:08 devinus: nothing like that in erlang i'm afriad

15:08 however

15:08 in Elixir there is (an OTP language)

15:08 foo /> bar /> baz #=> baz(bar(foo()))

15:09 x89: So I guess I'll have to define functions instead

15:11 solussd: I'm sure this comes up now and again… I'd like to enforce type on record fields. With a function I'd use :pre conditions, but I cannot add those to the default constructor (->RecordType). I could use robert hooke, but then I have to write a functions with (almost) identical :pre conditions for the positional constructor and the create factory, which takes a map. Thoughts?

15:21 sshack: brehaut: You're right about conjure.

15:22 amalloy: solussd: as you can imagine, the clojurey solution is to not enforce type :P

15:28 TimMc: meh

15:30 solussd: amalloy: yeah, but I'm trying to save myself explicit type checks before I cram stuff into my (mongo) db

15:40 vsync: i enjoy clojure a lot but i do have to say i prefer CL's type system and generic functions

15:41 though the broken-out dispatch-fn is cool

15:42 but proper named types through and through would be helpful sometimes

15:43 particularly in clojurescript so i could get a more useful error than "no method for function <30 lines of useless javascript> defined on <30 more lines of useless javascript>"

15:45 solussd: neat

15:45 though it seems a bit imperative

15:47 i feel the cleaner thing to do is avoid explicit use of the underlying records sprinkled everywhere

15:47 Netfeed: how can i create a macro that creates a function with named arguments? it throws exception if i dont use gensym, but the named arguments doesn't have the correct names with gensym

15:48 vsync: e.g., make your own constructor that does what you need, only export that and not the generated record constructor symbols

15:48 brehaut: vsync: thats generally considered to be best practise i think

15:49 vsync: i have a bunch of make-this and make-that in my code, seems to reduce duplicated code and let me do types and preprocessing in a defined way

15:49 brehaut: yay :)

15:50 brehaut: vsync: although the ->recordname constructor is also fine if you dont need any special behaviour

15:50 sshack: cemerick's friend seems exactly what I want.

15:51 So the real missing key is a decent central place where all this stuff is well explained. But awesome.

15:52 brehaut: sshack: for better and worse the clojure community isnt into centralised

15:53 sshack: brehaut: At least a good how to type page on which bits exist and how they fit together would be useful.

15:53 (or, how they don't in some cases)

15:53 brehaut: sshack: one of the clojure docs sites is intending to cover that

15:54 sshack: Fantastic.

15:54 I didn't touch it.

15:54 brehaut: sshack: unfortunately its extremely skeletal ATM http://clojure-doc.org/articles/ecosystem/web_development.html

15:55 vsync: brehaut: yeah to me the default constructors and keyword accessors are just handy shortcuts, speeds the start process or if it really is just a boring simple data structure you're passing around

15:56 lets ya focus work on the parts that need work, after all given enough time it'd be easy to write everything all perfectly, but there's never enough :P

15:56 edward_123: Hi does anyone know how the relative directory work for clojure with lein2?

15:57 sshack: brehaut: Oh boy is that bare.

15:57 Netfeed: solved it with {:keys [] :as hsh}

15:58 brehaut: sshack: with Ring, the github docs / wiki is pretty decent

15:58 Netfeed: hsh#

15:58 sshack: I am looking.

15:58 brehaut: sshack: the danger with 'how-to's is that they get out of date really quick

15:58 sshack: composure sits on top of ring, no?

15:58 brehaut: sshack: correct

15:58 sshack: brehaut: Well, a how to is a product, just like code.

15:59 brehaut: sshack: http://brehaut.net/blog/2011/ring_introduction if you havent seen it

16:00 solussd: does disabling assertions "turn off" pre and post conditions?

16:00 TimMc: Only at compile time, I think.

16:00 sshack: That wasn't naivety some of the documentation I've read is inconsistent on that.

16:01 solussd: thanks

16:01 brehaut: sshack: compojure < 0.4 was written prior to the existence of ring

16:02 sshack: Yeah. I remember looking at it back then. Wasn't doing web stuff at the time.

16:02 solussd: can assertions be disabled with leiningen?

16:15 muhoo: i vaguely remember there being a way to obtain lein profile information from inside the project, but i don't remember how, and not sure if it'd work with trampoline anyway.

16:19 or did i misunderstand that?

16:19 solussd: interesting, fn can take pre/post conditions, but the documentation fails to mention it

16:23 ChongLi: ahhh, why would blip.tv do that?

16:24 brehaut: because they are bananas

16:24 ChongLi: anyway we could transfer the videos to youtube?

16:24 there ought to be an official clojure channel on youtube

16:26 seangrove: Yeah, Youtube is a nicer experience anyway, strangely enough

16:26 * seangrove marvels that he said that about a google product

16:26 ChongLi: hah

16:26 muhoo: i like that i can download youtube videos. infoq, not so much.

16:27 blip required some packet-sniffing hacking, IIRC, but i got it to work.

16:51 sshack: muhoo: That frustrates me so much about info. Their video player is very annoying. and has a teeny weenie ui.

16:53 ifesdjeen: hi guys,

16:53 can anyone give a hint on how to use defn within a macro?..

16:53 e.q. without getting "First argument should be a symbol" error

16:53 as far as i understand, i should use eval?..

17:01 gfredericks: you're writing a macro that expands to a defn?

17:01 e.g., (defmacro defn-let [name args lettings & body] `(defn ~name ~args (let ~lettings ~@body)))

17:01 ^ a macro that expands to a defn

17:07 technomancy: muhoo: you need a plugin like configleaf for that

17:08 ifesdjeen: gfredericks: yup, I understand that

17:08 problem that if I have let binding, and named argument, that approach won't work

17:09 gfredericks: you have a symbol at runtime instead of compile time?

17:09 ifesdjeen: e.q. (defmacro defn-let [& body] `(let [coll# ~@body] (doseq (defn ....

17:09 exactly

17:09 gfredericks: ah yeah if you want to do the defn at runtime you'll need eval

17:09 amalloy: (doseq [...] (defn ...)) will never do what you want

17:09 ifesdjeen: so far I've managed to do it via (intern *ns*), which worked

17:11 amalloy: actually it did. not exactly that way, but it did.

17:11 gfredericks: thanks!

17:29 muhoo: technomancy: thanks

17:37 bbloom: tpope: nice, good to see the collaboration on the static files

17:41 zackzackzack: I'm considering how to efficiently manipulate time series data with finger trees. I think I know what to do but I'm not really sure as finger trees are a fairly new topic to me. I'd like to bounce my idea off of somebody who knows what they are doing and see if it makes sense.

17:52 squidz: what's the best way to call git from clojure when it is only for simple tasks on a linux env?

17:52 brehaut: conch?

17:54 squidz: brehaut: thanks, ive never used it, but it seems to be what i need. It isn't overkill if all i want to do is git push/pull/merge

17:54 brehaut: i dunno. ive never used it. ask Raynes

17:55 its certainly less overkill than a java git (egit?) imp

17:55 squidz: ill give it try, thanks

17:55 Raynes: brehaut: Why would he ask me?

17:55 Oh.

17:56 Cause conch?

17:56 brehaut: Raynes: cause you know about conch

17:56 i hope

17:56 Raynes: I was on LSD when I wrote that.

17:56 Can't remember anything.

17:56 * Raynes is obviously joking.

17:56 Raynes: Yeah, conch should be good for calling git.

17:56 clojure.java.sh would probably be fine as well, depending on what you want to do with the output.

17:57 squidz: yeah it just looked over the github page, it looks to be perfect

17:57 nice work Raynes

17:58 i think a simple with-programs git should do the trick

18:00 sshack: Okay, question for the clojure world. What's the general opinion of app servers in clojureland (in particular jboss)?

18:01 Raynes: $google immutant

18:01 lazybot: [Immutant | Home] http://immutant.org/

18:01 sshack: or are there very clojurish ways to manage/apps.

18:01 Raynes: I actually installed immutant just recently.

18:01 Raynes: I do not know anything about it except that it exists and is active.

18:01 sshack: I was asking opinions on it. Are they so incompatible with the clojure approach that it'll give me trouble?

18:01 Raynes: I don't understand application servers.

18:01 brehaut: sshack: IMO use whatever you are comfortable setting up, and what your existing ecosystem is based around

18:02 sshack: Raynes: 5 second tutorial: They provide things that modern operating systems should have.

18:02 brehaut: sshack: the ring adapters (servlet adapter in particular) make it completely fine as far as i understand

18:02 sshack: brehaut: I have no existing ecosystem for this. It's entirely greenfield here.

18:02 Raynes: Immutant looked interesting during the talk about it at the conj.

18:02 If you dig immutant, shouldn't be anything wrong with using it.

18:02 brehaut: sshack: do you have experience with container based deployment?

18:02 sshack: Which is why I ask, there's often hidden land mines you don't discover until a little ways in.

18:02 Raynes: I wont hurt you or anything.

18:03 Much.

18:03 >:)

18:03 sshack: brehaut: No. I've never done web development before. Previously I was doing high speed finance, realtime stuff and embedded work.

18:04 brehaut: sshack: then pick whatever makes the most sense to you :)

18:04 sshack: ring is server / container agnostic

18:04 sshack: Cool.

18:05 I asia lot of questions just to gain an understanding of the space.

18:05 llasram: As long as europen to the answers

18:06 brehaut: sshack: spend some time learning about ring then. its worth your time

18:06 sshack: brehaut: I'm getting that sense.

18:06 friend seems to take care of my authentication/user management problems btw.

18:07 brehaut: i thought it probably would

18:09 jcrossley3: sshack: if you're just starting with web dev, and you only have one app, and you don't need anything other than web, e.g. messaging, then immutant is overkill. in other words, if you're not sure you need it, you probably don't. :)

18:10 sshack: jcrossley3: I'm trying to discover why I need/don't need things.

18:10 I've built large apps before. Just never touched web.

18:12 brehaut: sshack: 'webapp' is really just 'app' that happens to have a server and talks http. you can serve http from just about anything

18:12 so that just leaves 'app'

18:13 sshack: brehaut: Well, it's a bit different than that. The focus can be very different in some spaces.

18:14 brehaut: sshack: so just consider the requirements of your app aside from worrying about 'web'

18:14 crease: Hey folks, anyone know of existing clojure libraries for static analysis, such as might be used to assemble a call hierarchy ala Eclipse?

18:14 sshack: Which is why I was asking about application servers. In an ideal world they handle logging, messaging, management for me.

18:15 brehaut: sshack: serving the web stuff is orthoganl to the rest of your app though.

18:16 weavejester: A lot of Clojure libraries tend to be small and focus on solving a single problem, though there are some exceptions

18:17 brehaut: weavejester: the never ending stream of new clojurists 'solving' the lack of rails 'problem' for instance :(

18:17 jcrossley3: sshack: that's all true, but you probably don't *need* any of that stuff yet. i would focus on building a useful clojure app. just use jetty at first. keep using it until it starts to hurt (usually due to deployment of it and other apps it depends on). and it may never hurt.

18:17 sshack: brehaut: Correct. But you're pushing a view that everything is interchangeable bits. That's only true at the high level.EG: When I shipped code for the marines, we spent about 90% of our time it would work out in the desert where it would cost lives for any maintenance.

18:18 weavejester: Well, there are some things in Rails that are nice...

18:18 sshack: performance wasn't an issue, maintenance was. Move to finance, performance matters, but you can do regular maintenance/bugfixes. The whole environment changes.

18:18 brehaut: sshack: yes. the web part of your application probably should be interchangable. anything else would be like welding tires on to the chassy of a car

18:19 sshack: Anyways, I presume people with some experience shipping web stuff might have some insight. Thats all.

18:19 weavejester: Some sort of scaffold generator might be nice for getting people going, for instance.

18:20 brehaut: sshack: most people use the tools they are familiar with. its about as simple as that.

18:20 technomancy: jcrossley3: always refreshing to see project maintainers being honest about when not to use their project; nice =)

18:20 brehaut: technomancy: when should i not use lein ;)

18:20 jcrossley3: technomancy: :)

18:20 technomancy: brehaut: you probably shouldn't use https://github.com/technomancy/lein-scalac

18:21 sshack: brehaut: Absolutely. Which is why I'm here. I've reached the limits of what Application/systems programming you can do in mathematica.

18:21 brehaut: technomancy: lol :)

18:21 technomancy: may i suggest never using necessary-evil?

18:21 technomancy: brehaut: ask me about my emacs libs and I'll have a lot more I can say that of =)

18:21 jamii: I can't figure out why calling seq on this https://gist.github.com/4281009 causes AbstractMethodError

18:21 brehaut: sshack: my opinion then is start as simple as possible. just use jetty. either as a container or self hosted

18:22 sshack: you'll know when you need to reconsider it

18:22 jamii: A parallel core.logic goes to anyone who can fix it :D

18:22 sshack: brehaut: I follow you. and I intend to.

18:23 squidz: brehaut: I also thought about having a rails-like scaffolding generator

18:24 technomancy: `lein new` can emit skeleton files

18:24 squidz: maybe having a simple generator

18:24 sshack: squidz: Ugh. That's a horrible idea. The key point of rails was a well documented path of least resistance for the most common cases.

18:24 squidz: that can plugin to lein as well

18:24 muhoo: is there some way to stick a conditional inside a doto?

18:24 jamii: dnolen: bump ^^^

18:24 squidz: sshack: dont't get my wrong, I hate rails to be hones, It's just that it as an option would attract possible users that like that kin dof thing

18:25 muhoo: like (doto (Whatevs.) (.stuffToDo arg) (when (some-test) (.thisThing "foo")) ?

18:26 squidz: sshack: if it could be designed in a way to be completely orthoganal to the current web frameworks

18:27 technomancy: muhoo: I don't think so

18:27 squidz: sshack: it would make me happy to steal some rails guys

18:27 Raynes: Dear everyone: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/

18:28 muhoo: Raynes: thank you for writing this.

18:28 Raynes: You're welcome, sir.

18:29 squidz: Raynes: thanks, do you mind if i post to reddit?

18:29 Raynes: squidz: Have at it

18:30 amalloy: Raynes: your blog post about lisp has unbalanced parens, mate

18:30 Raynes: amalloy: Whar?

18:30 amalloy: (in the section about Friend, to be specific

18:30 Raynes: Fixing.

18:30 technomancy: Raynes: I wonder if it'd be instructive to link to the refheap diff for moving to compojure?

18:30 sshack: squidz: I think I understand what you mean. Steal the intent of rails, rather than the form.

18:31 Raynes: technomancy: Potentally. I'll hunt down the diff and link to it.

18:33 brehaut: Raynes: now for the biggest job: updating webnoir.org

18:33 Raynes: And the Noir README.

18:34 amalloy: just replace webnoir.org with http://www.textfiles.com/underconstruction/

18:34 brehaut: lol

18:35 ibdknox: amalloy: lol that's amazing.

18:35 sshack: Raynes: Well that makes things simpler for me.

18:35 Raynes: Haha

18:35 Indeed it does.

18:35 amalloy: ibdknox: iirc it's every geocities gif that had "construct" in the url or alt-text

18:35 ibdknox: haha

18:35 technomancy: Raynes: are you writing blog posts with paredit turned off again?

18:36 brehaut: textfiles is truely amazing

18:36 Raynes: ibdknox: It kind of just occurred to me that I should have probably let you read my blog post before publishing it. Is it okay?

18:36 I think I noted that some of what I said was my own opinion, but I may have not been clear enough about that.

18:37 ivan: hah @ that link to http://www.textfiles.com/underconstruction/mail/

18:38 ibdknox: Raynes: looks good to me

18:38 Raynes: Excellent.

18:38 mthvedt: ivan: you broke my firefox!

18:38 Raynes: Works in Chrome.

18:38 Use good browsers, dude.

18:38 ivan: yeah, I thought about adding a warning but then remembered Chrome

18:39 amalloy: ivan: i bet Raynes will spend days downloading that page

18:39 ivan: my Firefox is still alive, downloading images

18:39 Raynes: I gave up about half way through after 30 seconds, amalloy.

18:39 sshack: Raynes: It doesn't show up in safari if you follow the link you posted. Went and navigated in from the front page and it was fine.

18:39 Raynes: squidz: Where did you put it on the reddits?

18:40 amalloy: my chrome appears to have given up part-way through, unless half of those gifs are broken

18:40 mthvedt: raynes: firefox is a great browser, it was protecting me from having to view that page

18:40 Raynes: sshack: http://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/ <-- this one? works in safari for me

18:40 squidz: Raynes: r/Clojure

18:41 sshack: Raynes: Works now, didn't show up the first time I clicked

18:42 amalloy: sshack: sounds like your irc client does a bad job of parsing links

18:43 sshack: amalloy: Nope. Just clicked that link again and it works. It had an empty blog post the first time I clicked.

18:44 amalloy: ah. you might have caught Raynes in the middle of an update or something

18:44 Raynes: Yeah, I updated it like 20 times.

18:44 I do that a lot because it isn't until I actually post blogs that people actually notice my typos.

18:45 sshack: Damn mutable data structures!

18:46 Raynes: Haha, precisely.

18:49 mindbender1: how can I write #{"foo" "baz"} to a file

18:49 Raynes: http://news.ycombinator.com/item?id=4918720

18:50 amalloy: mindbender1: pr-str+spit

18:50 Raynes: mindbender1: (spit "file" (pr-str #{"foo" "baz"}))

18:50 amalloy: I win.

18:50 amalloy: Raynes: http://lazybot.org/logs/#clojure/2012-12-13 says i won by two seconds, mate. your details are your undoing

18:50 mindbender1: wow thanks

18:51 Raynes: amalloy: Yeah, but I won with actual code.

18:51 IT'S QUALITY, NOT SPEED.

18:51 amalloy: pr-str+spit is valid code: ##(let [pr-str+spit 1] pr-str+spit)

18:51 lazybot: ⇒ 1

18:52 Raynes: You've won this one, nemesis.

18:52 amalloy: *chuckle*

18:52 callen: Raynes: has template inheritance and composition gotten any nicer with stencil?

18:52 Raynes: dsantiago: ^

18:52 Oh, wait.

18:52 I think you're asking that because of the way I use it in refheap.

18:53 callen: yep.

18:53 Raynes: dsantiago: YOUR ASSISTANCE IS NOT NEEDED HERE.

18:53 dsantiago: k

18:53 Raynes: stencil has a perfect implementation of template inheritance.

18:53 callen: dsantiago: I'd like to hear feedback if it's there. I know you made a proposal to the mustache people.

18:53 Raynes: is there an example in refheap or the stencil github repo? I tooled around and couldn't find anything just yet.

18:53 Raynes: callen: I think the way I did things in refheap is just for composibility in my code.

18:54 dsantiago: callen: Yeah, I basically consider mustache "finished" as a spec. Every few months some thread will start in the issues proposing some new feature, there'll be much discussion, and nothing will happen.

18:54 Raynes: composability*

18:54 Whatever.

18:54 dsantiago: And since I consider mustache not really complete, I'm looking to other solutions.

18:54 callen: Raynes: I'm accustomed to Django/Jinja templates, the inheritance/blocks system is VERY simple and "scalable" with respect to complexity there.

18:54 dsantiago: I have many ideas and a lot of experience with small and large projects wrt templating, if that helps at all.

18:54 jamii: dnolen: on four cores, core.logic is 20% slower. needs some more work :-|

18:54 Raynes: callen: Oh, wait, you aren't talking about partials, are you?

18:55 I think I got confused.

18:55 dsantiago: What issues are you interested in, callen?

18:55 callen: primarily, my main issue is that using partials to do what I did with {% block blah %}{% endblock blah %} in Jinja is painful and the frontend people I work with can't really understand it or how it works.

18:56 whereas the Jinja way is something they can do themselves without any help or explanation from me.

18:56 dsantiago: What does that Jinja do?

18:56 callen: dsantiago: I'm not trying to assign you homework, but you briefly take a look here: http://wsgiarea.pocoo.org/jinja/docs/inheritance.html

18:56 I think you'll see what I mean

18:56 Raynes: I'm actually writing a templating lib, so I might move away from mustache in the future. Gotta eat my own dog food and what not.

18:56 callen: it lets you set place-holders in parent documents that children can fill in, or otherwise leave to the default.

18:57 mustache does *not* handle this well at all, from what I know of it so far.

18:57 Raynes: I don't know though. I haven't had much success with enlive-like systems for general templating before.

18:57 callen: the problem is that I would *like* to use Stencil because how efficient and well-built it is, but mustache is painful for me and my frontend people.

18:57 We can't really use enlive either.

18:57 too intrusive.

18:58 dsantiago: Yeah, I agree with both there callen.

18:58 I actually wrote stencil not for use in a web context, but for pallet.

18:58 callen: I'm open to suggestions, but this the best candidate so far: https://github.com/sjl/dram

18:58 it needs to be brought up to production grade like stencil though.

18:58 his Readme.md summarizes my situation to a T

18:59 Raynes: sjl: Hear that? Your code isn't production grade. You ought to be ashamed of yourself.

18:59 dsantiago: Yeah, I agree with what he says there.

18:59 callen: :(

18:59 Raynes: he says himself it's not ready :(

18:59 Raynes: I love the library :(

19:00 mindbender1: I meant to say how can I write the "contents" of #{"foo" "baz"} to file

19:00 Raynes: lol

19:00 callen: dsantiago: from that link I provided, do you see the appeal of the Jinja/Django way?

19:00 dsantiago: very little logic, but just enough to be useful. Easy to work with, scales up to more complicated elaborations where you want to reuse template components, etc.

19:02 dsantiago: Yeah, I mean, I've never been on board with mustache's "no logic" stuff. It's the most logic-filled logic-free language I've ever seen.

19:02 callen: dsantiago: I see logic-less templates as being like abstinence programs. You just end up working around it in horrible ways anyway.

19:03 dsantiago: It depends on what the logic is.

19:03 callen: have some self-control and structure, but asceticism helps nobody.

19:03 dsantiago: the two extremes to my mind are _.template and mustache.

19:03 maybe Erb is up there with _.template, I don't know.

19:03 in-between, to my mind, is Django/Jinja

19:03 ibdknox: More on Noir: https://groups.google.com/forum/#!msg/clj-noir/AbAvQuikjGk/x8lKLKoomM0J

19:04 callen: I realize it may alarm some people, but I think componentizing Noir's functionality into lib-noir makes sense to me.

19:05 ibdknox: that's why we did it :)

19:05 it's been that way for a while now

19:05 Raynes: ibdknox: I'm going to quote that in my blog post.

19:08 mindbender1: seems there's not an easy way

19:09 technomancy: Raynes: have you thought of going further and splitting out the session related stuff, the validation-related stuff, etc?

19:09 Raynes: technomancy: That kills the point of lib-noir.

19:09 I could split it into multiple libraries and have lib-noir tie them together, but despite the objections of some members of the community, the point is batteries included.

19:10 To a limit.

19:10 amalloy: mindbender1: it's exactly what Raynes said

19:10 Raynes: These are things most every body uses in a web app.

19:10 It isn't ever going to just be a huge collage of crap.

19:10 * brehaut has a django flashback

19:11 technomancy: looking through it, I can see maybe half the namespaces I'd actually use, but not all in the same project

19:11 callen: brehaut: except for the ORM, I liked Django. What we're really doing here is moving closer to something like Flask where it's still nicely integrated but you have the choice of overriding and replacing at will.

19:11 modularity isn't the only priority people have, unless they're J2EE engineers.

19:12 technomancy: callen: where's "here"?

19:12 callen: technomancy: Noir -> lib-noir

19:12 technomancy: oh

19:12 mindbender1: amalloy: #{"foo" "baz"} gets printed rather than "foo" "baz"

19:12 brehaut: i like django except for the ORM, forms, url routing, middleware, user system and templates

19:13 amalloy: well yes, it's not re-readable otherwise

19:13 brehaut: south is nice though

19:13 Raynes: ibdknox: Added your quote to the post.

19:13 callen: brehaut: the user system is a component of the ORM. I don't like the forms either, Wtforms which I use with Flask is better. The middleware is better than everything else in the Python ecosystem Flask included. URL routing I could see, I'm not sure what your complaint is re: templates.

19:14 South isn't Django.

19:14 brehaut: i know south isnt django. that was a joke

19:14 Raynes: ibdknox: It's nice to have validation in there from Noir's original author.

19:14 callen: brehaut: what don't you like about the templates?

19:14 amalloy: if you want to print a collection's items separately and not-rereadably you can just (apply pr-str ...)

19:14 ibdknox: Raynes: :)

19:15 brehaut: callen: they always devolve into repetition, boilerplate python, and accidental complexity. jinja helps but its not a panacea. its macros and consistent syntax are big wins over django templates but the underlying model is still lets make PHP a little less shit

19:16 callen: brehaut: what would you prefer? I'm a big fan of Jinja.

19:16 brehaut: and even if you varnish PHP is still just shiny shit

19:17 callen: brehaut: I'd say Jinja is a pretty huge improvement over PHP.

19:17 brehaut: i would prefer something like enlive (though with clearer documentation)

19:17 callen: brehaut: do you work with frontend people?

19:17 brehaut: yes

19:17 callen: brehaut: having something that intrusive isn't an issue?

19:17 Raynes: brehaut: Well, you know I'm doing that. Also, tinsel.

19:18 callen: brehaut: I'd rather just kick the frontend guy a map/dictionary.

19:18 brehaut: Raynes: indeed. i am hopeful. also cgrand has been making some noises about a new version of enlive, so maybe that will improve things too

19:18 mindbender1: ,(reduce str (interpose "\n" #{"foo" "baz"}))

19:18 clojurebot: "foo\nbaz"

19:18 Raynes: brehaut: He has?

19:18 technomancy: Raynes: the github link on your blog is broke

19:18 seangrove: ,(clojure.string/join (interpose "\n" #{"foo" "baz"}))

19:18 clojurebot: "foo\nbaz"

19:19 Raynes: technomancy: How so?

19:19 Oh, it didn't hyperlink.

19:19 technomancy: aye

19:19 brehaut: Raynes: i fail at twitter spelunking

19:20 callen: I just don't see enlive working, putting its complexity aside, just because of how intrusive defining CSS selectors against the templates is. It's too complected.

19:20 I have a hard time believing that could work when the frontend/backend linkages are really being tested, like during a time of serious refactoring.

19:20 Raynes: My selectors are functions. So are tinsel's.

19:20 brehaut: Raynes: https://github.com/cgrand/enlive/wiki/Enlive-N%28ext%29

19:25 nsxt: callen: Out of curiosity, what's your take on libraries like jQuery? You're doing more or less the same thing when you're binding DOMElements to events.

19:26 callen: nsxt: that's frontend. The standard for "complection" is higher when you cross a barrier like frontend/backend.

19:26 muhoo: how would i escape a & in a string in nrepl/nrepl.el? \& doesn't seem to work

19:28 ,(let [foo "foo & bar"] (str foo " isn't even a problem here, but nrepl.el pukes on it"))

19:28 clojurebot: "foo & bar isn't even a problem here, but nrepl.el pukes on it"

19:29 nsxt: callen: Understood. Couldn't you make the same argument about 'name' attributes on inputs though?

19:29 HTML inputs as a gateway to server params

19:29 TimMc: callen: You'd like ur/web.

19:32 callen: nsxt: that's less problematic than prolifically intruding into frontend document structure

19:34 seangrove: Is there a stand-alone nrepl js snippet I can copy/paste into a page to get nrepl going, or would it need closure and everything that implies?

19:35 I suppose I answered my own question there. Damn.

19:35 bbloom: seangrove: you want a CLJS or a CLJ repl?

19:35 seangrove: A cljs repl

19:35 I'm trying to get a cljs repl in a content-script

19:35 hiredman: a clj repl written in cljs?

19:36 bbloom: hiredman: just sending expressions to the server to evaluate, a la http://tryclj.com/

19:36 seangrove: Heh, no, just a way for me to connect nrepl.el to a content-script that doesn't have closure or any cljs code in it

19:36 hiredman: https://github.com/hiredman/nrepl-cljs-middleware https://github.com/hiredman/drawbridge-cljs

19:37 dawbridge-cljs is a cljs drawbridge client, drawbridge being the nrepl http transport

19:37 seangrove: oh

19:37 seangrove: then ignore me

19:37 some day someone is going to want a clojure repl in a webpage, and then I will be ready

19:37 seangrove: No problem, appreciate the intent

19:37 hahaha

19:38 Until that day...

19:38 hiredman: until then everytime someone says "I wanta cljs repl" I will leap to my feat, then sit down slowly

19:38 feet

19:39 it is neat, I have a webpage somewhere with a little popup with codemirror that can send cljs to the server to generate javascript, then send it back to be evaled

19:41 seangrove: hiredman: Suppose it would be cool to have right in the webkit console

19:41 sshack: Raynes: So if Chris is focusing on light table and noir is being sunset, what is happening to sql norma? Is that safe to use?

19:42 Bronsa: korma*

19:42 seangrove: Type cljs -> sent round trip for translation to js -> js comes back, is evaled, output to the console

19:42 Raynes: sshack: ibdknox indicated that korma is fine last night.

19:42 sshack: Bronsa: Uh yeah Korma.

19:42 Raynes: Alright, cool

19:42 Raynes: There is probably still motivation for maintaining it. It's just that there wasn't any motivation to maintain Noir. We have equal and better solutions to that particular problem now.

19:42 sshack: I may think about sending in a patch for cursors then when I come to it.

19:43 seangrove: Is compojure the new new then?

19:43 I always thought Compojure was a bigger library than noir, suppose that's not an appropriate assesment

19:43 sshack: I thought composure was the old new.

19:44 It is the granddaddy of them, iirc.

19:45 ibdknox: Bronsa: in Clojure 1.5.0 column metadata has to be an integer as well :/

19:45 lol

19:45 Bronsa: dang

19:46 akhudek: I

19:46 ibdknox: Bronsa: btw, you are currently my hero

19:46 akhudek: I'd love to see more movement on the Korma filed issues.

19:46 bbloom: ibdknox: what would it be if not an integer?

19:47 ibdknox: bbloom: a long?

19:47 bbloom: since that's the default number type these dyas

19:47 akhudek: 3-4 people have said they'd step up and help, none of them have had the time it seems

19:47 bbloom: ibdknox: oh, ah, yeah, dur. integer == long in my mind :-P i was thinking you wanted a fraction in there for some ungodly reason

19:48 ibdknox: bbloom: lol at line 1/3 there's a terrible bug...

19:48 bbloom: ibdknox: i did the column metadata patch, it was pretty easy

19:48 shouldn't be hard to switch to a long

19:48 just getting the patch into the release is the tough part

19:49 but line & column metadata is inadequate in the current reader all around (which i'm sure you know)

19:49 ibdknox: yeah, that's why Bronsa is my hero: I stopped using the Clojure reader :)

19:49 bbloom: ah, yes, Bronsa++

19:49 ibdknox: I added all sorts of position info into blind

19:49 bbloom: (inc Bronsa)

19:49 lazybot: ⇒ 1

19:49 ibdknox: namely on symbols

19:49 akhudek: ibdknox: that's too bad, but I understand, I don't have the time myself these days. I haven't even cleared my todos on two other small libraries.

19:49 ibdknox: which is something I really needed

19:49 bbloom: ibdknox: yup, dnolen needs it too for cljs source maps

19:49 ibdknox: and what kept me on my own forked crazy version of clojure

19:50 so glad to be rid of that

19:50 dnolen: I have a fork of blind that has position info on most everything

19:50 dnolen: maps, vectors, lists, symbols, wrapped reader things (like @blah)

19:51 bbloom: ibdknox: glorious. please contribute that back

19:51 ibdknox: I wasn't sure if others would want that, I imagine it's marginally slower

19:51 couple of extra if checks

19:52 squidz: ibdknox: in your korma library, does defentity automatically create the table? if not, is there an easy way to do that with korma besides executing raw sql?

19:52 bbloom: ibdknox: is LightTable making any use of the CLJS analyzer?

19:53 akhudek: squidz: it does not, but I think there are table manipulation functions in clojure.java.jdbc

19:53 squidz: http://clojure.github.com/java.jdbc/doc/clojure/java/jdbc/UsingDDL.html

19:54 squidz: akhudek: thanks

19:54 ibdknox: bbloom: yes, your changes won't affect me

19:54 bbloom: it's fairly simplistic right now, though I want that to change - once we agree on a format that will work for both clj/cljs

19:54 bbloom: ibdknox: ok cool. i'm just curious what you're using it for and if you have any needs/improvements/whatever. i want to start pushing a bit harder on it

19:55 ibdknox: bbloom: not blowing up when looking at CLJ ns forms would be nice :) import statements kill it

19:55 I bet that one's a really simple fix

19:55 just didn't look into it

19:55 also feature expressions were a blocker here I thought

19:55 bbloom: ibdknox: if you file a ticket, somebody will :-)

19:56 i don't know what the situation is with feature exprs

19:57 ibdknox: bbloom: yeah I suck at that, will try to be better

19:57 bbloom: ibdknox: eh, jira is a nightmare

19:57 ibdknox: once you figure out which buttons to press (and avoid all other buttons) it's not too painful to throw some crap in there

19:57 ibdknox: for whatever reason there's a huge leap for me doing that vs filing an issue on gh

19:58 bbloom: i agree entirely

19:58 it's actually a big problem, imo

19:58 and not accepting pull requests is a bitch too....

19:58 ibdknox: I wonder if we could allow filing and have a synchronization thing that just dumps them into jira...

19:59 bbloom: *sigh* jira plugin or API? :-/ not interested....

19:59 ibdknox: haha

19:59 me. neither.

19:59 clojurebot: Pardon?

19:59 ibdknox: clojurebot: shutup

19:59 clojurebot: It's greek to me.

19:59 bbloom: i don't know the details of how clj wound up in the situation it's in, but i think that we're far from the only two who find jira to be a blocker to contributing

19:59 Bronsa: ibdknox: i pushed a fix that doesn't require calling int everytime

20:00 bbloom: github really needs contributor agreement tracking as a feature

20:00 seangrove: Yeah, I always find it less painful to muddle along somewhere local with a fix than to open a jira issue

20:00 bbloom: Could be easy to add as a commit service

20:00 ibdknox: Bronsa: would it potentially be better to just store them as ints?

20:01 callen: ibdknox: clojurebot is sassy today.

20:01 seangrove: The build status for a commit could be set to fail if not done by someone who's signed the CA

20:01 bbloom: ok well anybody willing to start the "boo jira" thread on the dev mailing list, feel free… i'll chime in, but i'm going to avoid stirring the pot :-P

20:01 Bronsa: ,(class (inc (int 1)))

20:01 clojurebot: java.lang.Long

20:01 ibdknox: fail

20:01 seangrove: I'd be happy to write the service next weekend if that'd help :)

20:01 bbloom: heh.

20:02 seangrove: how would it work / what would it do ?

20:02 seangrove: But I doubt anyone in the current flow feels much pain, it's a nice insulator

20:02 technomancy: I'll happily join a jira lynch mob

20:02 ibdknox: seangrove: I imagine the problem isn't limited from a technical stand point. This is largely a process issue

20:02 ooo

20:02 with technomancy support, we're bound to win. He's tall.

20:02 bbloom: ibdknox: i just met technomancy in person the other day. tall is an understatement

20:02 seangrove: bbloom: Whenever someone submits a pull request, you can use the GitHub hooks to fire off a service that checks the commit for authors, and it's allowed to set the "status" of the commit to pass/fail

20:02 technomancy: "evil twin" goatee helps

20:03 bbloom: seangrove: hm, i'd be interested to see how that works out

20:03 i know github has some new integration thinggies w/ the CI servers and what not

20:03 seangrove: So one of the services you'd have would just check to see if the commit author has signed the CA

20:03 bbloom: dunno much about that integration

20:03 seangrove: Yeah, basically pretend to be a CI server

20:03 ibdknox: seangrove: oh that's cool

20:03 bbloom: seangrove: even if the clj folks don't want that, SOMEBODY would

20:04 seangrove: Clojure's really the only use case I know for it though, hah

20:04 hiredman: the ca agreement isn't the blocker on prs

20:04 holo: ibdknox, hi! in korma: will the ssl issue for heroku db be solved someday?

20:04 hiredman: prs are, rich likes patches

20:04 bbloom: you can just add .patch to the end of the PR and you get a patch...

20:04 hiredman: I mean "righ likes the workflow around patches"

20:05 rich

20:05 * seangrove tries to remember back to patch workflows

20:05 technomancy: bbloom: but you can't shepherd it through a confusing flow chart diagram that will intimidate all but the most determined of contributors

20:05 hiredman: patches me an immutable artifact or something, I dunno

20:05 seangrove: Nope, don't think there's much I cared for about it :P

20:05 technomancy: it's intended to separate the sheep from the goats

20:05 seangrove: haha

20:05 I think that's probably somewhat right

20:05 bbloom: technomancy: it took me quite a while to find my way around and i felt really lost

20:05 brehaut: im having a massive mindblank on 'prs'; all that comes to mind is shiny guitars

20:05 bbloom: technomancy: i almost didn't become a contributor

20:05 hiredman: pull requests

20:05 seangrove: And that's probably fine... a bit of a bummer, but understandable

20:06 tpope: yeah github prs let way too many sheep in

20:06 or goats

20:06 ibdknox: fwiw, it prevent people like me from wanting to do it

20:06 tpope: I'm not sure what the sheep and goats are about

20:06 ibdknox: prevents*

20:06 technomancy: ibdknox: same

20:07 seangrove: Well, sounds like all of us that don't really matter are on the same side then :)

20:07 Now all we have to do is convince the old guard

20:07 ibdknox: technomancy is arguably part of the "old guard" lol

20:07 technomancy: how long have you used clojure?

20:07 bbloom: i dunno, seems a little unfair to say that the guy working on the facy IDE generating a lot of buzz and the dude who makes the defacto standard clojure distribution and build tool don't matter

20:07 technomancy: ibdknox: not as long as hiredman and cemerick

20:07 brehaut: technomancy: at least 4.5 years though right?

20:08 technomancy: brehaut: just 4

20:08 hiredman: yes, but I have no high profile projects

20:08 brehaut: out of 5.25 of its public life

20:08 S11001001: technomancy: "just"

20:08 ibdknox: lol

20:08 TimMc: technomancy: The latter is giving a presentation right now; your message popped up on his screen. :-P

20:08 ibdknox: I'm a young'n only about 2 years for me

20:08 cemerick: OMG PRESENTATIONS

20:08 technomancy: TimMc: haha, where

20:08 ?

20:08 hiredman: cemerick: !!!!!!!

20:09 the boston clojure meetup

20:09 ibdknox: he now hates us.

20:09 Raynes: I've been around longer than technomancy, I think.

20:09 * ibdknox troll mode activated

20:09 ibdknox: Raynes: really? I didn't know that

20:09 Raynes: I was pretty stupid at the time though, so it's likely nobody remembers me.

20:09 technomancy: Raynes: I think you might have been a bit more shy on IRC in the early months?

20:09 bbloom: ok well i think this is a political battle, and i suck at politics

20:09 brehaut: i spelunked my mail inbox. the earliest email in have about clojure was september 2008. im slightly amazed that its been that long

20:09 hiredman: is it really politicial?

20:09 bbloom: but if anyone doesn't suck at politics and want's to storm the jira beach head. i will follow you into battle

20:10 ibdknox: I will also follow

20:10 technomancy: I've been around roughly as long as atoms; I think the week I joined I saw that announcement.

20:10 hiredman: it is rich's project, rich prefers patches, no one has provided a technical argument that has convinced him to use pull requests

20:10 bbloom: hiredman: that's why it's political, it's not a technical argument

20:11 hiredman: bbloom: how so?

20:11 bbloom: more likely to get bug reports and patches from less casual folks

20:11 hiredman: oh

20:11 bbloom: hiredman: ibdknox is a HUGE consumer of clj and cljs and surely finds *lots of issues* but won't open tickets b/c jira is annoying

20:11 hiredman: well I think that is actually more likely to make rich run away from prs

20:11 fewer drive by issues

20:12 *shrug*

20:12 holo: ibdknox, i forked korma and supported ssl with pg heroku db and it's working in my project. i would hope your experienced eyes could take a look at it when you have time. i will soon make an issue report, and my resolution

20:12 technomancy: wow, there were ~900 members on the clojure mailing list when I started; now it's ~7000

20:12 brainproxy: :)

20:12 technomancy: discussion level is a bit lower than it was though

20:13 brehaut: technomancy: i used to follow irc from work via the n01se logs. the week i got a new job and could IRC was the week after rich stopped being a regular participant

20:13 brainproxy: this is a pretty good sized irc channel too

20:13 hiredman: bbloom: releasing libraries and maintaining them is a great way to contribute :)

20:13 technomancy: brehaut: hah; ouch

20:13 bbloom: hiredman: my experience with "big" ticketing systems like Jira, or bugzilla or team foundation shit at msft or whatever is that they force you to think about a ton of stuff that doesn't matter

20:13 technomancy: hiredman: inc

20:13 callen: technomancy: I guess if it changed that means the mailing list is stateful. That should be fixed so it can be immutable.

20:13 bbloom: hiredman: "is this a 'Defect' or an 'Enahancement'?"

20:14 "is this low, medium-low, medium, medium-high, or high priority?"

20:14 all that nonsense that gets filed into fields

20:14 ibdknox: technomancy: hiredman: I agree, but the issues thing would still be useful

20:14 bbloom: it doesn't matter

20:14 hiredman: bbloom: I have never thought about any of that when I open a clojure ticket

20:14 technomancy: callen: (swap! mailing-list into (get-noobs))

20:14 hiredman: bbloom: I make all my tickets high priority

20:14 bbloom: lol

20:14 muhoo: any thoughts on trying to get nrepl.el to accept & in a string without puking?

20:14 bbloom: hiredman: well that shit adds up. i'm speaking more generally now. ask ibdknox to tell you some visual studio team triage war stories sometime

20:15 i'm sure they are hilariously

20:15 hiredman: bbloom: why? just ignore the parts of jira you don't like

20:16 bbloom: hiredman: it's still cognitive load

20:16 technomancy: muhoo: never heard of that; probably raise it on the nrepl.el mailing list or issue tracker

20:16 hiredman: bbloom: then you aren't ignoring it

20:16 "don't know, don't care"

20:16 bbloom: hiredman: it's not just the random fields

20:16 technomancy: "Not my circus; not my monkey" as they say in Polish

20:16 ibdknox: bbloom: you have no idea

20:16 TimMc: haha

20:16 hiredman: technomancy: indeed

20:16 seangrove: technomancy: Do they say that?

20:17 technomancy: seangrove: I heard it on the tweetersphere

20:17 bbloom: ibdknox: i do have an idea, i worked on VS integration for XNA and i'm good friends with Alex Turner :-)

20:17 muhoo: is the problem jira itself, or just the top-down model of the project?

20:17 ibdknox: haha well there you go then

20:18 bbloom: and know kav latiolais and scott nonnenberg a bit too, i think you worked them right?

20:18 ibdknox: Kav and I shared an office for about a year

20:18 I saw them a couple months ago when they were down here in SF

20:18 squidz: man it seems like developing in clojure happens faster than when I do something in Java, even though I just started clojure. I can't wait until I start getting very familiar with the language. Very exciting :D

20:18 muhoo: because, it's easy to focus on the technology, when the issue is more a personality preference. rich doesn't seem like an open-source guy, he was "a happy LispWorks customer" by his own admission, i'd guess that if he wrote clojure 15 years ago it would never have been opensourced

20:19 bbloom: right. so then you could tell hiredman all about how the terrible jira-ish UI of TFS makes triage meetings suck :-P

20:19 technomancy: too bad antares isn't around for the 5 minutes of jira hate

20:19 brehaut: lol

20:19 hiredman: bbloom: are you operating under the assumption that I don't use jira?

20:19 technomancy: muhoo: I suspect that's a big part of it despite Stuart repeatedly insisting otherwise.

20:20 bbloom: hiredman: no, i'm operating under the assumption that you, like a large number of people, are numb to the affects of bad UX in a way that a non-trivial number of oddballs like myself are not

20:20 hiredman: I think we've been through 3-4 or four ticketing systems in the 2 (alsmost 3?) years I've been working at sonian

20:20 with jira being the most recent

20:20 technomancy: my previous two jobs both adopted Jira about a month before I left

20:20 hiredman: they all suck

20:21 ibdknox: I never understood that

20:21 why do they suck?

20:21 callen: technomancy: so goes ticketing, so goes the company.

20:21 ibdknox: It's a relatively straightforward problem to solve

20:21 hiredman: I think we were on agilezen before jira?

20:21 bbloom: ibdknox: the same reason a lot of stuff all sucks: products created for the buyers not for the users

20:21 muhoo: technomancy: you probably run the most active clojure project in terms of sheer number of open-source contributions, so you're aware of how much work it is to manage.

20:21 callen: ibdknox: ticketing involves humans. it's a human problem.

20:21 ibdknox: you can't make ticketing good without having good humans.

20:21 bbloom: callen: yeah that too

20:21 brehaut: ibdknox: really? its all about taxonomy and workflow. humans suck at those two things

20:22 technomancy: ibdknox: selling ticketing software means being all things to all people

20:22 hiredman: agilezen had all kinds of stability issues, and in generally felt like using someone's hobby project

20:22 bbloom: which is why i advocate fewer features and more humans :-P

20:22 callen: JIRA is an attempt by management to strait-jacket humans into not being silly humans by subjecting them to something unpleasant.

20:22 </MichaelOChurch Propaganda>

20:22 hiredman: the best issue tracker is git

20:22 technomancy: muhoo: it's less work when you trust contributors to be responsible adults =D

20:22 bbloom: ibdknox: you've seen the absurd customizability of product studio and tfs… it's yet-another-slightly-tuned database table as an app

20:22 there's this category of categories of apps i like to call "filemaker for X"

20:22 muhoo: technomancy: well said.

20:22 ibdknox: bbloom: we estimated the amount of time we lost as a result of TFS during dev 10

20:22 hiredman: well, really the best issue tracker is an immutable database

20:22 bbloom: most ticketing systems are "filemaker for geeks"

20:23 ibdknox: bbloom: it was a staggering number

20:23 technomancy: muhoo: the only time I've had to straight out revert a contributor's merge was when they didn't realize amalloy's pull request was meant as a joke

20:23 hiredman: but when you say things like that people thing you are trying to sell datomic

20:23 frozenlock: Noir's dead! Noooooo

20:23 bbloom: ibdknox: oh, i know. but i'm sure it wasn't as bad as exchange dog fooding for xbox org

20:23 lol

20:23 three or four occurrences of 2-week-long email deliverability nightmares

20:23 hiredman: jira has JQL, why not just give me a real database?

20:23 ibdknox: hah

20:24 sshack: brehaut: Linking to this _> http://brehaut.net/blog/2011/ring_introduction is an excellent start.

20:24 technomancy: frozenlock: it's just shed its corporeal form and evolved into an energy-based being or something

20:24 bbloom: but yeah, there's a ton of these "filemaker for X" businesses and they all suck at UX

20:24 muhoo: technomancy: maybe we should put rich and RMS together in a room sometime and see what happens.

20:24 brehaut: sshack: thanks, though im not sure what the context is atm

20:24 bbloom: ticketing systems, CRM systems, social media monitoring, customer support, order tracking, etc

20:24 frozenlock: technomancy: But then it will come back and help us build a weapon to destroy the energy beings from the other galaxy, right?

20:24 bbloom: they are all rows and columns and suck

20:24 technomancy: frozenlock: time will tell

20:24 sshack: brehaut: The context of getting one unto speed on web dev in clojure.

20:24 ibdknox: some day I'll fix it

20:25 bbloom: heh good luck with that

20:25 brehaut: sshack: ah. well that a win then :)

20:25 sshack: brehaut: I have a pretty good idea of the landscape up until the point where i'd want to go clustering/app severing and such.

20:25 technomancy: I wish I had a good excuse to finish die-roboter

20:25 sshack: brehaut: You can always use more polish of course. but it's a great start.

20:26 The links at the end are also useful.

20:26 brehaut: (and 2 years out of date. yay blog posts :/ )

20:26 sshack: bbloom: accounts receivable apps.

20:26 seangrove: Hrm, what's the equivalent of `if ("undefined" == typeof CustomEvent)` ?

20:26 In cljs

20:27 technomancy: brehaut: were you going to submit a version of that to clojure-doc.org or something?

20:27 sshack: bbloom: The secret is finding a market that will pay obscene amounts of money, for a simple interface to a database table.

20:27 brehaut: technomancy: i offered it to them. i havent had a chance to do any updates myself. but it looks like they didnt want to use it

20:28 cemerick: technomancy, hiredman, ibdknox: wat wat wat

20:28 :-P

20:28 technomancy: muhoo: oddly enough contributing to Emacs is weirdly similar to Clojure; you have to mail in paperwork and use bzr

20:28 brehaut: technomancy: i want to try to update it over the summer (re:winter) break, to at least use 1.0 versions of libs and recent clojure

20:28 ibdknox: cemerick: oh nothing, carry on!

20:28 cemerick: ;)

20:29 brehaut: technomancy: which is slower? paperwork or bzr?

20:29 technomancy: muhoo: but you can tell rms values contributions from other hackers above all else; he's just really paranoid about legal threats

20:29 cemerick: I didn't read the log; did someone ask something, or am I being trolled? :-P

20:29 technomancy: brehaut: heh

20:29 ibdknox: cemerick: mega-trolled.

20:29 cemerick: cool

20:29 brehaut: i say that because i am sad. bzr had a nice interface even if it was the perfect fit for a turtle icon

20:29 technomancy: muhoo: you could make the argument that GNU projects are high-profile targets or something; can kind of see that, but it still means I don't try to contribute.

20:29 cemerick: meta-trolled is what I did to Raynes earlier :-D

20:30 Raynes: cemerick: ?

20:30 S11001001: brehaut: take it back, bzr is awesome

20:30 muhoo: technomancy: well the whole GNU project was started as a reaction/defense against legal land-grabs, so not surprising he's so paranoid.

20:30 holo: is there any way for the buildpack in heroku to not try to build my scripts which are in src? I think they take up some useful space in the slug

20:30 cemerick: Raynes: just for you, buddy http://groups.google.com/group/clojuredev-users/msg/69de82d45e321e13

20:31 S11001001: brehaut: oh I can read

20:31 technomancy: holo: you mean AOT compilation?

20:31 seangrove: Hah

20:31 "+1 for -> indenting as a regular function and adding a vote to ignore everything Chas just said."

20:31 muhoo: technomancy: in the case of rich, i think he'd rather be in a hammock thinking up amazing stuff and solving hard problems than managing a cacophony of proto-anarchist contributors :-)

20:31 S11001001: brehaut: I thought tla had perfectly acceptable speed, so bzr practically breaks the sound barrier.

20:31 holo: technomancy, thanks. no, i just use the scripts locally, so i don't really need them there

20:31 Raynes: I'm going to beat you to death, cemerick.

20:31 technomancy: muhoo: yeah, but every Walt Disney needs a Roy Disney to handle practical stuff

20:31 Raynes: Sleep with one eye open.

20:32 ohpauleez: technomancy: That is both hilarious and profound

20:32 brehaut: S11001001: lol :) i only stopped using it because the whole world uses git, and a DVCS that nobody else uses is a sad situation

20:32 ohpauleez: good ol' Roy

20:32 cemerick: Raynes: I sleep with katanas, boy

20:32 technomancy: holo: oh, gotcha. you can override the compilation behaviour by creating an executable `bin/build` script that does `lein compile myapp.main` or something

20:33 muhoo: technomancy: actually, didn't clojure start in some ways as a reaction against complexity and cruft, the kind that open source projects tend to accumulate a lot of?

20:33 technomancy: holo: but typically .class files are not very big; if your slug size is too large it's unlikely that's the first thing to check

20:33 S11001001: brehaut: I kept using tla until 2008, ubuntu's enough for me, and git's semantics are that bad

20:34 technomancy: muhoo: that might be a bit of a stretch

20:34 sshack: muhoo: You're walking through a minefield there.

20:34 holo: technomancy, but maybe some dependencies (specified in project.clj) are only used in the script, and that would make it reasonably bigger right? or all the dependencies are loaded in the slug, regardless of being used or not?

20:35 muhoo: sshack: yes, i'm aware of the dangers, but i figured i'd at least stick a tiptoe in there.

20:35 sshack: but i'll stop now while i still have legs :-)

20:35 brehaut: S11001001: i use git either a) via magit, b) consulting the docs extensively. i just cant seem learn that stuff

20:35 technomancy: holo: yeah, dependencies can certainly bloat up the slug size. you can store them under the :dev profile for things you don't use in production.

20:36 holo: technomancy, insightful.

20:38 callen: technomancy: http://en.wikipedia.org/wiki/Slug_(mass) ?

20:40 technomancy: when you say slug, do you mean the final uberjar?

20:40 holo: i always thought of slug related to a disgusting slow animal, living in the dark undergrounds

20:40 technomancy: callen: it's the unit of deployment with heroku

20:40 basically a tarball that includes config and process manifest stuff

20:40 S11001001: brehaut: I know it pretty well, and I've used it for work for the past 3 years. So when I do a personal project, I prefer to enjoy using my VCS :)

20:41 brehaut: S11001001: im just not much of a tool using ape i guess

20:41 callen: technomancy: why is lein-heroku still experimental, just wondering?

20:42 technomancy: callen: it's just a lot of work to duplicate everything in the toolbelt on the JVM

20:42 holo: callen, it's a very cool concept. the slug stores the application files ready for being launched everytime a process for the application is started

20:42 technomancy: plus startup time makes it annoying to deal with

20:42 callen: technomancy: is the objective to reduce the need to gem install stuff?

20:42 technomancy: callen: yeah, but we have native installers for the top 3 platforms now

20:42 callen: technomancy: do you use drip re: startup time?

20:42 technomancy: so it's not as important

20:43 S11001001: Back in my day, we had to walk uphill both ways and email patches to contribute to emacs :)

20:43 technomancy: callen: no, I just don't start lein very often

20:43 callen: technomancy: sacrilege! :P

20:43 technomancy: it's true; just leave it open

20:43 TimMc: cemerick: Sorry, it's all my fault.

20:44 cemerick: TimMc: what is?

20:44 callen: technomancy: oh I see what you mean, you live in the command environment in provides.

20:44 it*

20:44 TimMc: cemerick: I noted that IRC hilites were showing up on your screen.

20:44 technomancy: well, in nrepl basically

20:45 squidz: is anybody familiar with haskells Snap framework? it is supposed to be very modular, which is what I guess compojure + ring are going for.

20:45 cemerick: TimMc: heh, no worries

20:45 squidz: http://snapframework.com/

20:46 callen: squidz: you probably don't want to walk into that, so tread carefully if you ask in #haskell.

20:46 S11001001: like half the people chatting now are all in the same room

20:47 callen: squidz: it'd be comparable to making a joke in a webcomic about how silly frequentists are, and how bayesians *really* know what's up.

20:47 squidz: callen: ask what in #haskell?

20:47 TimMc: &(.-length "foo")

20:47 lazybot: ⇒ 3

20:47 callen: anything involving the yesod/happstack/snap holy war.

20:48 squidz: oh no, I am only speaking from my own experience. I'm not going to ask #haskell. Just wanted to know if we are striving towards something similar

20:48 callen: squidz: I don't know how similar it is. People actually reuse and recombine the components in the Clojure community because Ring is the agreed upon base.

20:48 squidz: Haskell doesn't have something comparable, so Snap is only modular to the extent that you can pick-and-choose within the Snap framework.

20:49 brehaut: while many new clojurists might think 'hmm. clojure needs rails' at least none of them have thought 'hmm. what clojure really needs is a jenga tower of monadic code just to do a hello world web app'

20:49 callen: there's technically an analogue to ring/wsgi/rack in Haskell, but not everybody uses it.

20:49 cemerick: brehaut: oh god rails

20:49 callen: inc brehaut even though I still like Django templates.

20:50 brehaut: be careful, an ex-haskeller might see algo.monad and get some funny ideas

20:50 S11001001: brehaut: I'm thinking it right now

20:50 brehaut: so thanks

20:50 brehaut: callen: i do get funny ideas with algo.monads

20:50 * callen wips out the Men in Black neuralizer and flashes S11001001

20:50 callen: whips*

20:51 * S11001001 will not fall into the ya-web framework pit

20:51 callen: TimMc: I saw what you said about UrWeb. Not funny :(

20:53 TimMc: callen: As in, you wish it were usable?

20:54 or that it's completely unlike what you want?

20:54 callen: TimMc: unlike what I want. I'm not a "TYPE ALL THE THINGS" fascist.

20:54 TimMc: if I was, I'd be in #agda, not #clojure

20:54 Raynes: callen, squidz: I once started a yesod website. And then I actually looked at it and ran screaming.

20:55 callen: Raynes: I tried to like Haskell. Scotty came close. It was just too much to do the simplest things though.

20:55 jaimef: are there any non-jvm implementations that are complete? clr?

20:55 Raynes: I like Haskell.

20:55 I don't like yesod.

20:55 callen: jaimef: complete? no. Close? ClojureScript.

20:55 Raynes: I like learning things from Haskell without actually using it in production.

20:55 jaimef: it's becoming hipster-cool to write node.js apps in clojurescript.

20:55 Raynes: It is?

20:56 brehaut: wait, that work now?

20:56 Raynes: I guess since it isn't completely broken now.

20:56 brehaut: Last I checked they at least got more than one file compiling at a time. ;)

20:56 callen: brehaut: define "works"

20:56 Raynes: But AFAIK you can't really write node libraries with it.

20:56 brainproxy: that's how I got my start in clojure ... trying to make cljs and node play nicely, so I could benefit from immutability

20:56 callen: nope, lol.

20:56 Raynes: Because of all the Clojure that gets stuffed in with it.

20:56 brehaut: Raynes: that sounds like a feature, not a bug

20:56 tomoj`: you can still write node libraries

20:56 no one probably cares if there's 30kb or whatever extra in your package

20:56 Raynes: tomoj`: Then someone needs to document it, cause I don't get it.

20:57 brainproxy: but then I read a clojure book and decided to just go whole hog w/ clojure and jvm :D

20:57 callen: tomoj`: if they cared about well-made software and libraries, that wouldn't be using Node.js

20:57 tomoj`: problem is, you can't make multiple node libraries which interoperate nicely

20:57 Raynes: Yeah, that's "you can't write node libraries"

20:57 :p

20:57 * callen cackles loudly

20:58 tomoj`: I think if you don't use advanced compilation it might work?

20:58 callen: tomoj`: essentially.

20:58 tomoj`: well, I'm thinking of protocols

20:58 callen: is everyone hell-bent on advanced in the cljs community because it shakes off the parts of Clojure you're not using?

20:59 wingy: how do i add keys/values in a vector to a map?

20:59 tomoj`: and all your own code

20:59 callen: I would hope that wouldn't be *that* prolific a problem.

20:59 tomoj: I guess protocols need to work even for node.js users

20:59 I just stopped caring about supporting node users :/

21:00 swannodette/mori is an example of a node library in cljs

21:00 but it's a bit out of date :(

21:00 brainproxy: wingy: conj?

21:00 tomoj: I could blog about it but I don't have a blog

21:00 wingy: brainproxy: yeah

21:01 tomoj: there doesn't seem to be a way to run an npm hook after all packages are installed

21:02 otherwise you could have something that looked at all the installed packages and ran cljsc

21:02 brainproxy: tomoj: postinstall?

21:02 tomoj: I think that's per package?

21:02 jaimef: clojurescript has to be better than dart :P

21:02 tomoj: I guess every cljs package can put in a postinstall

21:02 ..but then how do you avoid running cljsc too many times

21:03 brainproxy: i see what you're saying

21:03 actually, the best thing would be to compile prior to publishing to npm registry

21:03 tomoj: but that won't work

21:03 well, maybe in simple or whitespace

21:03 but not advanced certainly

21:04 brainproxy: hmm

21:04 tomoj: you have to compile with all the cljs packages you're going to use

21:04 brainproxy: man, it's been forever since I messed w/ my node-clojurescript lib

21:04 trying to remember how I was dealing with that

21:05 tomoj: maybe we can get incremental builds out of the cljs analyzer/compiler?

21:06 brainproxy: i had figured out at one point how to get both npm style requires and cljs namespace require/use working in the same projects

21:06 tomoj: define a cljs require extension which sends over the file to be analyzed and gets output just for that file, but consistent with all the other output so far?

21:07 and require a jvm as part of build

21:07 er, if it's a require extension you'd need it during runtime, huh

21:07 brainproxy: i think my plan was to augment package.json in such a way so that you could transparently keep both pre-compiled and compiled code in the same project

21:07 pppaul: i see a ring async repo, what would be some use-cases for it where it would greatly benefit performance?

21:08 ToxicFrog: Oh hey. IDEA 12 came out and I didn't notice.

21:08 brainproxy: then that way, if you had a bunch of cljs projects depending on each other, you could do an advanced compilation and everything would just work

21:08 tomoj: oh, right

21:09 keep around pre-compiled, then just call closure in post-build?

21:09 ..or runtime?

21:09 brainproxy: dang, don't remember, and i eventually gave up on it

21:10 akhudek: I must be doing something wrong. Lein checkouts are not working for me, it's always using the version in my local maven repo instead of the src version. The correct src directory even comes first in the classpath. :-(

21:11 tomoj: hmm, you're supposed to have the checked out project installed (`lein install` inside that project) and to depend on the checked out version, I believe. doing that?

21:12 akhudek: yep, set the version of the checkout to 1.0.0-SNAPSHOT

21:13 tomoj: oh, I thought the classpath was bad

21:13 so.. is the checkout a symlink? and if so it's not broken?

21:13 that's the only problem I ever have :(

21:14 akhudek: yup, and lein classpath even looks right

21:14 very confusing

21:24 seangrove: I can't seem to get cljs to spit out ("if (typeof X == 'undefined') {}")

21:24 Should I be using js/*?

21:25 tomoj: (undefined? X) doesn't work?

21:26 seangrove: "Error evaluating:" (undefined? js/CustomEvents) :as "(void 0 === CustomEvents);\n"#<ReferenceError: CustomEvents is not defined>

21:26 tomoj: lol

21:26 well, it's in strict mode, right?

21:27 guess that's not why

21:27 seangrove: Yeah, I think only typeof will prevent an error when throwing an undefined variable at it

21:27 tomoj: but.. (undefined? js/window.CustomEvents) maybe?

21:27 seangrove: Ah, no, that works

21:29 Very cool, thanks!

21:29 tomoj: course that will break if window isn't there..

21:33 seangrove: For the extension I'm writing, it should always be there

21:33 Wondering what I woudl do if it weren't there, but not going to worry much about it right now

21:36 tomoj: maybe goog.global

21:36 unsure

21:37 seangrove: ok, and this feels super basic, but I can't find it by googling - how can I check if a variable is a function without resorting to (= variable (type #()))

21:39 akhudek: seangrove: http://clojuredocs.org/clojure_core/clojure.core/fn_q

21:40 seangrove: akhudek: Thank you

21:59 amalloy: don't forget ifn?

22:15 wingy: a keyword like: :802.11b is not idiomatic since the dot . is a namespace separator right?

22:41 amalloy: wingy: looks fine to me

22:42 wingy: amalloy: but isn't the dot . a ns separator? eg. foo.bar/baz

22:42 amalloy: so?

22:42 / is the namespace separator, marking everything on the left as a namespace, and stuff on the right as a name

22:42 wingy: so . is a namespace divider?

22:43 amalloy: . is a period. just like anything else, what it means depends on context

22:44 in a keyword that means X, the . means whatever makes sense in the context of an X

22:46 wingy: from where did i get that . is a namespace divider

22:46 hm

22:46 bbloom: wingy: java.

22:46 wingy: and datomic i think

22:48 bbloom: wingy: https://github.com/edn-format/edn#keywords <- says what's legal

22:48 the definition refers back to the symbols section, one paragraph up

22:48 ivan: cool, . is allowed now

22:50 wingy: bbloom: cool

22:50 so . is just like any char

22:50 amalloy: ivan: now?

22:50 ivan: it was not allowed according to clojure.org reader docs, when I checked a few months ago

22:50 amalloy: wingy: well, it can't go at the start or end of symbols

22:50 bbloom: amalloy: well, it can: "If -, + or . are the first character, the second character must be non-numeric."

22:51 amalloy: ivan: rubbish. nobody updates those docs ever; if it's legal now i doubt it was ever different

22:51 ivan: well, I'm sure it always worked, just not officially

22:54 wingy: can someone create an OS with clojure

22:55 arrdem: no.

22:55 you would need a microkernel of some kind implementing the Java runtime

22:56 that you could build a clojure environment on top of... but without a Clojure to ASM compiler clojure all the way down is not possible.

23:11 mthvedt: microsoft built an experimental .net os

23:13 sshack: wingy: They already have. They're called app servers.

23:14 erm. Read that as an os for clojure.

23:14 arrdem: You could run on one of those old java chips.

23:15 or an arm chip with gazelle

23:16 Jazelle even.

23:16 dabd: I have 1million x 2 array of int dumped in binary format from a C program. Is there anyway I can slurp it efficiently to a clojure array?

23:17 arrdem: sshack: true and if I recall there is some IBM metal as well that provides a hardware JVM.

23:17 lucian: it'd be easier to retarget clojurescript to some form of asm

23:17 sshack: wingy: So, yes, you could in theory write an OS in/with clojure. But it would be a monumental amount of work.

23:17 lucian: or use the scheme->c one

23:18 sshack: You've still got to build a useful user land.

23:18 Reinvent emacs, vim and such.

23:19 arrdem: yeah and that's the real issue with all DIY OSs... Even Plan 9 for all its awesomeness doesn't feature what we would consider a "useful userland" anymore.

23:19 no modern web browser or JS support at all... VIM equivalent and X equivalent, but entirely seperate environment.

23:20 bbloom: mthvedt: i assume you're referring to singularity. to call that "with .net" would be a stretch....

23:20 sshack: That Beos reimplementation seems the closest to useful (besides linux), and even that is a stretch. it's a vicious circle.

23:21 bbloom: they had their own runtime and c# compiler… may have been a fork, but it was heavily modified

23:23 lucian: i think it's become too professional an endeavour to make an os

23:23 mthvedt: bbloom: i thought it was an ok stretch in response to the question

23:24 lucian: other than for academic purposes, there's little point in doing it

23:24 mthvedt: obviously if you make a 'clojure os' it won't be on the java executable

23:24 arrdem: lucian: I mean... for my OS class I kicked out about 50% of a working OS with a round robin scheduler and some other such serious failings, but it ran.

23:25 the issue is that it's entirely useless to me.

23:25 bbloom: arrdem: did you learn something from it?

23:25 arrdem: bbloom: ooooh yeah

23:25 lucian: arrdem: sure, it's great for learning. but unlikely to be useful to anyone

23:25 bbloom: arrdem: then it wasn't entirely useless ;-)

23:25 arrdem: and I can drink black coffee now T_T

23:26 bbloom: I meant useless with respect to me using it to be productive in any way.

23:27 sshack: It is fun though.

23:27 bbloom: arrdem: i was being facetious. i just think more people aught to try to write an OS, if just for fun

23:27 arrdem: I mean even MINIX. Sure I can grab Vim and Zsh and an X implementation, but why bother?

23:27 ToxicFrog: 90% - at least - of the stuff I write is useless. Who cares? It's fun.

23:27 arrdem: bbloom: hehe yeah it was a lot of fun and I'll probaby do another one at some point just because

23:28 bbloom: the parallels between an OS and a distributed system are stunningly deep

23:28 all the time i see people trying to build this big complex systems with databases and queues and messaging and retries and time outs and all this jazz

23:28 and they have no fucking clue how their process scheduler works

23:28 it's amazing :-)

23:29 arrdem: bbloom: haha my OS prof is from IBM research and took the opportunity to pound scheduling and transactions into us

23:30 lucian: transactions are awesome

23:30 it's so sad many new systems suck so much

23:30 rbxbx: bbloom any texts you'd recommend to rectify said issue?

23:30 lucian: like mongodb, for example

23:30 bbloom: rbxbx: http://plan9.bell-labs.com/sources/plan9/sys/src/

23:30 arrdem: ah mongodb... I mean I still use it... but yeah it throws transactions out the window.

23:31 bbloom: rbxbx: my attention span isn't long enough for books (usually) so i stick to short articles and then go RTF source

23:31 lucian: arrdem: and for no good reason, it sucks at being distributed too

23:31 arrdem: bbloom: gah plan 9... Y U NO BOOT IN VBOX

23:32 sshack: luvian: I wish you could up vote on irc right now.

23:32 arrdem: lucian: I just use it because I like not having a set schema and it was easy to set up

23:32 sshack: use (inc)

23:32 rbxbx: bbloom fine and good, but.... it's unlikely that i'll undertake this. Bait me. Get me interested. Excited. Involved.

23:32 arrdem: (inc lucian)

23:32 lazybot: ⇒ 1

23:32 sshack: (inc lucian)

23:32 lazybot: ⇒ 2

23:32 sshack: Any chance your prof talked about as/400?

23:33 arrdem: sshack: no never heard of it.

23:33 bbloom: rbxbx: i've heard good things about http://www.amazon.com/dp/0136006639/?tag=stackoverfl08-20

23:33 a quick googling suggests Modern Operating Systems : Dragon Book :: OSes : Compilers

23:33 dragon book: http://www.amazon.com/dp/0321486811/?tag=stackoverfl08-20

23:33 sshack: arrdem: Had GC, a database, proper security and single level addressing (no memory/disk split) back in the 80's.

23:34 arrdem: ah the green dragon book....

23:34 sshack: yeah he mentioned that in passing, but not by name

23:35 sshack: Except for the fact that it's horribly archaic, and proprietary, in most respects it's still bleeding edge.

23:35 oh, and that most programs for it were written in cobol or rig

23:35 rbxbx: ahhh. bbloom this is a recommended text in (our?) corriculum.

23:35 sshack: s/rig/rpg/

23:35 bbloom: *shrug* give it a try :-)

23:36 sshack: Oh the tanenbaum book!

23:36 and the dragon book. brings back memories.

23:36 rbxbx: bbloom it may (mayhap!) some day happne.

23:36 happen, also ;)

23:37 curriculum* gosh. Spelling is kindasortavaguely the most difficult.

23:38 arrdem: sshack: (with-devils-advocate the Knight machine had GC loooong before that)

23:38 sshack: arrdem: Lots of machines did. I was just pointing it out as an example.

23:39 It was also unusual for including so many advanced features. (in 1980 the OS took like 70meg. Which was a lot)

23:40 Raynes: Is codox 0.6.3 working for anyone?

23:41 I'm getting Caused by: java.lang.AssertionError: Assert failed: (vector? (:dependencies project [])) for no apparent reason.

23:51 dabd: how do you turn this into a functional idiom (defn foo ... (if c (compute-some-value) (do (some-side-effect) (compute-some value))?

23:51 muhoo: is there anything that will template like stencil, but without HTML entity escaping?

23:52 TimMc: muhoo: An odd request.

23:52 Raynes: Damn it, codox.

23:52 y u no generate my docs

23:52 dabd: i think i need to read up on monads

23:53 muhoo: TimMc: indeed. i'm an odd guy.

23:53 but i need to generate emails. from a template. NOT html emails, regular, normal emails.

23:53 lucian: dabd: while they may be useful, they aren't really necessary. in clojure you can just name it foo! and make sure you're not doing it in a transaction

23:54 muhoo: stencil would be perfect, except for a call to html-escape buried deep, deep in the protocol implementation

23:54 arrdem: lucian: why keep -!s out of transactions?

23:54 I would think you side effect IN transactions

23:54 TimMc: muhoo: Oh, right. Yeah, some templating libs allow you to specify your own escaping fns, which in this case would be identity.

23:55 muhoo: clostache, perhaps?

23:55 muhoo: https://github.com/davidsantiago/stencil/blob/master/src/stencil/core.clj#L57

23:55 lucian: arrdem: if by side-effect you mean mutation, then have a look at clojure's reference types. side-effect generally means things like io

23:56 dabd: clojure.algo.monads has nice tutorials

23:57 arrdem: lucian: so Atoms etc?

23:57 lucian: arrdem: yes. they are quite useful for keeping track of state safely

23:57 (in a concurrent program)

23:57 muhoo: TimMc: THANKS! {{&do-not-escape-me}}... buried in clostache docs

23:58 stencil supports it, but clostache docs are much better, they both seem to support the same features tho

Logging service provided by n01se.net