#clojure log - Apr 10 2012

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

0:12 dnolen: brehaut: implementing the remote debugging protocol would be useful.

0:12 alright haven't heard any bad news I'm gonna merge the ClJS optimizations

0:12 brehaut: dnolen: agreed; i must confess to being scared off by the thought of having to implement json-rpc first

0:13 dnolen: brehaut: I actually prototyped some stuff - it's pretty easy.

0:13 brehaut: dnolen: yeah, i dont imagine its too bad. it looks like it learnt from the xml-rpc debarcle

0:14 dnolen: do you have a link?

0:16 dnolen: brehaut: hmm, I do not. I think I did that work locally - got wiped out from a HD failure.

0:16 brehaut: oh :/

0:16 dnolen: brehaut: that said, it's just WebSockets I think it took me like 15 minutes to get something working.

0:19 emezeske: Is anyone aware of a way to create multiple midje prerequisites using something like (doseq [x coll] (provided (whatever x) => x)) ?

0:19 I have tried using all kinds of things, but midje doesn't seem to like doseq or for or anything

0:20 amalloy: you probably have to write a macro that expands to multiple instances of `provided`

0:20 dnolen: already CLJS optimizations merged into master

0:21 already -> alright

0:23 emezeske: amalloy: I think you're right. I've been having a hard time doing that.

0:35 amalloy: Ah, I see why I'm having a hard time... All of the midje "provided" items have to be set up at compile time, not run time

0:35 amalloy: I wanted to have add "provided"s based on runtime values. No can do! :)

0:35 arohner_: emezeske: yeah, midje has a hard time with things it doesn't anticipate

0:36 emezeske: are you trying to stub, or spy?

0:36 emezeske: arohner_: stub

0:36 arohner_: emezeske: then just use with-redefs

0:36 emezeske: arohner_: I was trying to set build a bunch of tests dynamically

0:37 arohner_: Yeah, I guess I could do that; what would I lose? Just midje's nice error messages?

0:37 amalloy: i find it inconceivable that you want to write tests but you don't know what they are until runtime

0:37 arohner_: amalloy: it doesn't have to be at runtime to want to use a loop

0:37 (for [i ["foo" "bar" "baz"] (assert xyz))

0:38 emezeske: Yeah, the problem is looping over some data and making (provided ...) items based off that

0:38 amalloy: so? you can do that at macro time

0:39 (defn get-assertions [] ["foo" "bar" "baz"]) ... (defmacro assert-the-things [] (cons `do (for [fact (get-assertions)] `(assert ~fact)))

0:40 you have the entire language available to you while compiling - that's a big part of the power of macros

0:40 emezeske: amalloy: That works

0:40 amalloy: I think I was getting tripped up on wanting to pass the (get-assertions) values into the macro as an arg

0:40 amalloy: But that was doomed to failure, due to the arg being runtimey

0:41 amalloy: indeed. but you know at compile-time what the arg is, so you just need to reorganize things so that you *use* it at compile time

0:41 emezeske: Yeah

0:41 arohner_: amalloy: macro expansion is weird in midje

0:41 as in, it has things that look like macros, but aren't

0:41 amalloy: i was about to say: i'm pretty sure that's not possible. but clojure.test does some pretty appalling things to macro expansions

0:42 still, there's nothing midje can do to get in the way of: (defmacro create-my-tests [] (...)) (create-my-tests)

0:46 bloop: does there exist f such that (= x (reduce f x)) for all x? I'm pretty sure there does not, but I'm having trouble proving it to myself. (f is 'list for x of size 2, if that's useful)

0:48 emezeske: Hrm, I think arohner_ is right about things being weird

0:48 bloop: (this is not a homework question. I don't know why this suddenly fascinated me.)

0:48 emezeske: amalloy: Consider my macro: (defmacro my-provided [] `(~'provided (something 5) => 6))

0:48 amalloy: That expands to (provided (my.ns/something 5) midje.sweet/=> 6)

0:49 amalloy: that looks...obviously correct? not sure what's weird here, that's just how macros work

0:49 emezeske: amalloy: When I throw that into a (fact (something 5) => 6 (my-provided)), midje breaks

0:49 amalloy: Yeah I know its correct, the problem is it doesn't work with midje

0:50 amalloy: macros don't nest in that direction

0:50 emezeske: So I have to use a macro to build my fact?

0:50 amalloy: yes. you can't expect midje's fact to somehow know that your my-provided is a macro it should expand

0:50 it's entitled to think that it's the beginning of a new fact clause

0:51 or whatever midje's syntax is

0:51 emezeske: Right, so basically it's very very much work to do a loop of provideds

0:51 amalloy: *nod* that's often the case with macros

0:51 my understanding is that midje has a more-raw layer that involves functions passing around maps

0:51 emezeske: Yeah, I was looking at that a little

0:52 I think that the code deduplication I was trying to do is not worth the madness

0:53 Maybe I'll open a midje case -- it already supports (let) bindings inside facts; it doesn't seem ridiculous to support (for) as well

0:54 arohner_: maybe the bug is that symbols have to be special cased

0:54 i.e. why do you need to open a bug to get (for)

0:55 emezeske: arohner_: I don't think midje evaluates most of the forms inside a fact

0:56 arohner_: Inside a (fact ...) is definitely a DSL that may/may-not support things like for

0:56 amalloy: i don't think it would support a let-binding at the point you're trying to put your for

0:56 (fact (let [...] (...))) - this would astonish me

0:56 emezeske: amalloy: It definitely supports that, happily

0:57 amalloy: or, sorry, i guess i don't know midje syntax

0:57 maybe that makes total sense

0:57 emezeske: It allows it, but I get the idea that it was a lot of work to allow it :)

0:57 devn: mosh is so awesome.

1:16 muhoo: is there somewhere a documentation of all the options that can go into an ~/.lein/init.clj and what the right format is for them?

1:21 emezeske: amalloy, arohner_: Thanks, guys, for your help, by the way!

1:26 muhoo: also, is there a way to get a repl inside leiningen? in other words, not in the project but inside the build system itself?

1:26 emezeske: I guess what I learned today is that when your code is passed to a macro, you are at that macro's complete and total mercy.

1:56 muhoo: also, is there some way to override the groupid and artifactid in lein without having to move the structure of the files all around?

2:05 amalloy: muhoo: group and artifact IDs have no relation to file structure

2:08 muhoo: they do, according to lein

2:08 they are generated from the file structure automatically. i need to override that

2:10 in leiningen/core.clj defproject macro: :group ~(or (namespace project-name) (name project-name))

2:10 amalloy: very sporting of you to find evidence supporting my claim; do you have any supporting yours?

2:10 muhoo: artifactId is (:name project), which is defined as ~(name project-name)

2:11 amalloy: just do (defproject mygroup/myid ...)

2:11 muhoo: hmm.... ok.

2:11 oh ffs

2:11 thanks.

2:13 *sigh* so it's "lein new" that sets file structure to equal the defproject. i cannot believe i could have been so stupid.

2:14 wait, no. i definitely can believe it.

2:15 i think once i do get a clue, i owe you all a round of beers. or three.

2:17 ktsuji: ibdknox: hi, I'm using korma on oracle and have a question about limit

3:05 muhoo: hahahaw, this is silly. after going through all this work to try to write java classes in clj instead of having to deal with java, the resulting clojure code looks as verbose and ugly as java.

3:05 fail

3:07 echo-area: muhoo: What's that?

3:57 muhoo: oh, i've got to deliver a java library, i figured i'd try to cheat by doing it in clojure instead.

3:57 it's a lot more pleasant this way, but once i start to add all the java stuff, it gets really ugly.

3:58 now the customer wants checked exceptions.

3:58 and javadoc

3:58 * muhoo shoots self in head

4:24 muhoo: actually, generating javadoc from the AST's of clojure might be an interesting project, if i knew enough to be able to do it.

4:25 amalloy: you're probably better off with the "shoot self in head" idea

5:21 seriously though muhoo, you must be better off writing a few interfaces in java, with javadocs, and providing an interface-based API. maybe a few static "factory" sorts of functions as well, if they want. trying to provide a looks-just-like-java(tm) facade from clojure-only is sometimes possible, but (a) often unpleasant, and (b) probably not what the customer wants anyway

5:23 then you don't have to AOT everything, too, which would add more complications

5:42 muhoo: actually, i'm not thinking big enough. i need better customers :-)

5:43 like, the guy who said, "i don't understand all that stuff, i'm game for whatever, just make it work ASAP." more of those will make me happy.

5:46 amalloy_: i do like the idea of writing abstract interfaces in java, then implementing them in clj. that'd get me a long way on this project.

8:29 sanjoyd: What is the difference between [a b c] and (a b c)? Is [a b c] the same as '(a b c)?

8:29 gfredericks: sanjoyd: the first is a vector and the second is a list

8:29 they compare equal but they are different data structures

8:30 sanjoyd: So I get O(1) element access in the first?

8:30 gfredericks: O(log(n)), but mostly yeah

8:30 they also have different roles in source code

8:30 sanjoyd: Meaning?

8:31 gfredericks: well I assume you've seen code such as (let [foo (bar baz)] (bwam foo))

8:31 sanjoyd: Yes.

8:31 Is the [ ] there the same as the vector [ ]?

8:31 clgv: sanjoyd: O(log_32(n)) access which is almost O(1) on current machines

8:32 sanjoyd: (That is what prompted my question, actually.)

8:32 Or is the [ ] in let / fn etc. something different?

8:33 gfredericks: sanjoyd: parens in code usually mean a function invocation or something similar

8:33 vectors are either data literals (as in (def my-vector [1 2 3]))

8:33 or play some special role in a macro, usually indicating bindings

8:33 as in let, loop, fn, defn, for, ...

8:33 clgv: sanjoyd: it is the same. but the vector in let is useed att compile time whilc the vector your data vectors live at runtime

8:34 wink: sanjoyd: The Joy of Clojure has a whole chapter dedicated to those semantics and differences, very insightful

8:34 clgv: typos... :/

8:34 sanjoyd: Okay.

9:00 samaaron: ls

9:00 Iceland_jack: lol

9:00 fdaoud: file not found

9:01 general failure reading disk-- who the heck is general failure and why is he trying to read my disk?

9:03 Bronsa: lol

9:03 gfredericks: pwd

9:03 Bronsa: #clojure

9:03 gfredericks: echo $USER

9:04 TimMc: user

9:04 Iceland_jack: is this a Solaris?

9:04 killall

9:05 gfredericks: rm -rf /usr/share

9:06 rodnaph: :(){ :|:& };:

9:06 Iceland_jack: Why has no-one invented a spoon bomb?

9:06 #undef BADPUNS

9:07 fdaoud: cd /pub

9:07 more beer

9:18 sanjoyd: Suggestions for someone coming into Clojure from Haskell?

9:18 (And a little bit of lisp.)

9:19 llasram: Have fun?

9:19 (In the positive, non-sarcastic sense)

9:19 What sort of suggestions are you looking for?

9:20 sanjoyd: Books, tutorials?

9:20 progo: The Joy of Clojure for you.

9:20 sanjoyd: Thanks!

9:20 llasram: +1

9:20 One of the best programming-language-specific books I've ever read

9:21 TimMc: llasram: Still a good read for moderately advanced Clojure programmers?

9:21 jkdufair: +1. Intelligent and slightly snarky/clever.

9:22 45PAAH33Y: sanjoyd: Free stuff first? Philosophical videos/interviews?

9:22 llasram: TimMc: Almost definitely. It does a great job of explaining the reasoning behind parts of the Clojure design. I actually read it twice, again after I'd been using Clojure for a bit, and got more on the second read-through

9:23 sanjoyd: 45PAAH33Y: suggest?

9:23 45PAAH33Y: sanjoyd: philosphical + practical overview from creator -> http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure/

9:23 sanjoyd: 45PAAH33Y: thanks!

9:24 45PAAH33Y: Mentions differences from haskell, too

9:25 Current newcomer books are Clojure Programming 2nd (the de facto first text), Programming Clojure (new kid, geared towards people coming from perl/python/ruby)

9:26 RickInGA: sanjoyd: this is another good intro to clojure video, this from Stuart Halloway: http://vimeo.com/10896148

9:26 45PAAH33Y: After that, Joy of Clojure. After that, On Lisp/Let Over Lamba... uhm... hehe

9:27 If you have java experience, there's videos around coming-from-java. Yeah, Halloway has some good ones

9:27 fdaoud: 45PAAH33Y: no Clojure in Action?

9:27 rodnaph: anyone know when the videos from clojurewest might be making it online?

9:27 45PAAH33Y: fdaoud: That's true..

9:28 fdaoud: release nov 2011. Missing some 1.3 details, but a solid read. I like the "in action" format...

9:29 rodnaph: dont hold your breath

9:29 fdaoud: 45PAAH33Y: I agree.

9:29 45PAAH33Y: bah

9:31 fdaoud: Fan of the book?

9:31 fdaoud: 45PAAH33Y: I'm a computer book junkie.

9:32 cemerick: 45PAAH33Y: FYI, we don't talk about perl at all :-)

9:32 45PAAH33Y: cemerick: speaking of which, WTH with the book pricing? $22 in beta, then jumps to $30+, and now $18? (with amazon kindle-only stuck at $28)...

9:32 cemerick: lol you appear out of nowhere :)

9:33 fdaoud: nice. so am I :) a bit of a neurosis sometimes..

9:33 cemerick: I can hear someone talking about certain books from miles away. :-P

9:33 fdaoud: 45PAAH33Y: I'm just wondering. Say I've read those Clojure books, have written some Clojure apps, and I understand functions, higher-order functions, recursion, data structures, macros, etc. Not necessarily an expert, but I understand all those things. It is worth it to read On Lisp? What will it give me on top of all that?

9:33 cemerick: 45PAAH33Y: where is it $18?

9:34 Not that I have any control over pricing.

9:34 sanjoyd: On Lisp is art.

9:34 Not means to an end but an end in itself.

9:34 fdaoud: sanjoyd: ok you got my attention. please tell me more.

9:35 45PAAH33Y: cemerick: I'm talking oreilly himself, homeboy -> http://shop.oreilly.com/product/0636920013754.do

9:35 sanjoyd: fdaoud: I don't know how much it'll apply to Clojure.

9:35 RickInGA: on lisp is available to read online: http://www.bookshelf.jp/texi/onlisp/onlisp_toc.html#SEC_Contents

9:36 45PAAH33Y: fdaoud: practically, it's about macros

9:36 sanjoyd: Yes.

9:36 45PAAH33Y: fdaoud: i think halloway did a clojure translation

9:36 cemerick: oh, ebook

9:36 fdaoud: 45PAAH33Y: it's called a "sale", publishers have them sometimes ;-)

9:36 llasram: fdaoud: I found it interesting. In my case, I "understood" macros before, but it increased my appreciation for how many contexts in which they can be useful

9:36 45PAAH33Y: Let over lambda is already artful, intense book, but about Closures (not translation yet..)

9:37 fdaoud: I have many Manning books, not one bought at retail. They have half off ebooks all the time.

9:37 sanjoyd: fdaoud: one trick I picked up from On Lisp is writing macros like (when+ (open-file "foo") (print it))

9:37 45PAAH33Y: *is another artful

9:37 sanjoyd: Anamorphic macros, I think he calls them.

9:37 llasram: sanjoyd: Yeah... I'm not a fan of those :-)

9:38 sanjoyd: I've not written Lisp beyond toy programs, so I can't comment much on how useful they are in practice.

9:38 45PAAH33Y: llasram: i think they're pretty cool looking. really concise and neat code...

9:38 sanjoyd: In fact, I intend to write some real-world lisp once I figure out clojure.

9:38 llasram: I prefer the Clojure convention of only using anaphoric macros with implicit positional anaphora. Less magical

9:38 cemerick: 45PAAH33Y: hilarious that we don't get notified of the sale. Without hearing of it here, I'd not have been able to tweet it, etc.

9:38 fdaoud: llasram, sanjoyd: interesting, I'll have a look

9:38 cemerick: fdaoud: meant the above for you, but whatever :-)

9:39 RickInGA: I have been slowly making my way through on lisp... reading lisp code makes me appreciate Clojure all the more

9:39 fdaoud: cemerick: it's all good :)

9:39 sanjoyd: Basically, you can s/On Lisp/Non-trivial program transformations using Common Lisp macros/

9:39 45PAAH33Y: cemerick: you'd think they be on top of these things. oreilly is more with the times than most, but not perfect...

9:40 RickInGA: hehe yeah. and do check out halloways translations

9:40 RickInGA: 45PAAH33Y: I know Fogus translated the first 5 chapters, I will look for Halloway's

9:41 45PAAH33Y: fdaoud: Clojure in Action talks about anamorphic macros

9:41 fdaoud: 45PAAH33Y: ah, didn't know that. Haven't gotten to chapter 7 yet. Thanks for the heads up!

9:42 RickInGA: 45PAAH33Y: I see Halloway translated examples from Practical Common Lisp to Clojure. http://thinkrelevance.com/blog/2008/09/16/pcl-clojure

9:43 fdaoud: I don't (yet) know what an anamorphic macro is, so until I do, to me it's a macro that has an eating disorder.

9:43 45PAAH33Y: RickInGA: I'm positive he did both.... *googling*

9:43 fdaoud: either that or a lacking in vitamin intake.

9:44 45PAAH33Y: RickInGA: http://thinkrelevance.com/blog/2008/12/12/on-lisp-clojure

9:44 RickInGA: 45PAAH33Y cool, that will be useful.

9:45 Iceland_jack: fdaoud: anaPHOirc then?

9:45 Bronsa: fdaoud: http://en.wikipedia.org/wiki/Anaphoric_macro

9:45 45PAAH33Y: fdaoud: I think you first learn something along the lines of (if (get-first-letter ["my words"]) upper-case it)... with *it* being the interesting part

9:45 lol sorry, phoric. not morphic

9:45 sanjoyd: Yeah, anaphoric. :P

9:46 45PAAH33Y: If i start refering poetically to the human-like qualities of macros, then yes, anamophic :)

9:46 *morphic

9:46 Iceland_jack: anthropomorphic then surely?

9:47 45PAAH33Y: Iceland_jack: lol yes..

9:47 no sleep for many hours... need more coffee

9:47 Iceland_jack: anamorphic is just something that is not catamorphic

9:47 fdaoud: Bronsa: thanks

9:47 Bronsa: ITC greek words

9:47 fdaoud: Iceland_jack: right you are

9:48 Iceland_jack: anamorphic is also something that isn't green

9:48 45PAAH33Y: Iceland_jack: if my macros come out in distorted dimensions...

9:48 fdaoud: 45PAAH33Y: what time is it for you?

9:48 sanjoyd: 45PAAH33Y: the c9 video is very nice!

9:48 45PAAH33Y: fdaoud: almost 9AM

9:49 fdaoud: 45PAAH33Y: central US?

9:49 45PAAH33Y: sanjoyd: my pleasure. but rhickey did all the work :)

9:49 fdaoud: that zone, but south of the border

9:49 fdaoud: 45PAAH33Y: south america?

9:49 45PAAH33Y: fdaoud: too far south. Southern Mexico :)

9:50 fdaoud: 45PAAH33Y: ah ok, cool :)

9:54 TimMc: fdaoud: and not endomorphic, either

9:54 which is a somatotype

9:55 fdaoud: TimMc: (inc (fdaoud :confusion))

9:55 TimMc: fdaoud: That's the word you meant earlier.

9:55 Bronsa: ITC: complecting the english language with buzzwords.

9:55 TimMc: (update-in fdaoud [:confusion] (fnil inc 0))

9:55 fdaoud: TimMc: indeed :D

10:21 jsabeaudry: What is the more convenient way of doing (take n (repeatedly f)) ?

10:22 fdaoud: jsabeaudry: (repeatedly n f)

10:23 clgv: jsabeaudry: it often pays to use 'doc ;)

10:24 jsabeaudry: heheheh thanks guys, what an embarasment ;)

10:25 fdaoud: clgv: true, but sometimes irc is an interactive doc/google :)

10:40 c4milo: time to give a try to clojure :)

10:41 and test its community :P

10:41 Iceland_jack: oh-oh

10:48 llasram: Testing clojure.community

10:48 Ran 1 IRC channel containing 426 users.

10:48 0 failures, 0 errors.

10:48 Fullmoon: That reminds me, what is a good unit test framework?

10:49 llasram: Fullmoon: clojure.test is definitely "good enough," and lein integrates with it out-of-the-box

10:49 Midje is more full-featured, and it also widely used

10:50 Fullmoon: llasram: Thanks, I will look into it, I don't really want something super-nice functional just yet, but I think learning clojure test-driven would be awesome

10:54 fdaoud: llasram: that's awesome :D

10:55 RickInGA: I went to hear Neal Ford talk about functional programming last night. He had nice things to say about the Clojure community

10:55 He said in the Ruby community, people will say "I really wish I had a program to control my tv, so I wrote this tv remote in ruby..."

10:57 He said in the Clojure community, you hear people say "I was reading this one PhD dissertation, and it occurred to me that a data structure from this other PhD dissertation. No one had combined the two yet, so here is my library combining them."

10:58 fdaoud: RickInGA: sounds interesting, link please?

10:59 RickInGA: fdaoud: no link to Neal Ford's talk. I don't think it was recorded, I think the specific example he was referring to was this talk from dnolen http://blip.tv/clojure/david-nolen-predicate-dispatch-5953889

11:00 fdaoud if you are interested in Neal Ford talking about functional programming, he has a series he is writing http://www.ibm.com/developerworks/java/library/j-ft1/

11:00 fdaoud: RickInGA: ah, you actually *went to* hear Neal Ford talk! For some reason I assumed you meant "went to" as in "in my browser" :)

11:01 RickInGA: thanks for the links

11:01 zerokarmaleft: RickInGA: atlanta software craftsmanship?

11:01 RickInGA: zerokarmaleft: yep.

11:02 zerokarmaleft: were you there? I was the guy who asked about similarities between datomic and cqrs (fat guy, glasses)

11:02 zerokarmaleft: didn't he give a similar talk at strangeloop '11?

11:02 RickInGA: no, i just happened to be reading that same series from developerworks yesterday

11:03 RickInGA: zerokarmaleft: i don't know. I bet there are a lot of good presentations from Strange Loop. The only one I have watched so far is Simple Made Easy

11:04 zerokarmaleft: RickInGA: http://www.infoq.com/presentations/Functional-Thinking

11:04 fdaoud: loved that one.

11:05 RickInGA: zerokarmaleft just quick glance at some of his slides, it looks like the same talk

11:06 but last night thoughtworks provided pizza and beer. your link lacks both! :)

11:08 He also won't have mentioned datomic in the infoq link, just because of the timing.

11:08 He was really impressed with it, called it a "22nd Century Database"

11:10 autodidakt: zerokarmaleft: fdaoud, A blog post about those functional thinking talks -> http://blog.twonegatives.com/post/20182672074/functional-thinking-in-clojure-part-2

11:11 fdaoud: autodidakt: nice!

11:14 zerokarmaleft: autodidakt: nice, thanks

11:14 dgrnbrg: technomancy: are you there?

11:15 autodidakt: dgrnbrg: technomancy is always with us

11:16 dgrnbrg: autodidakt: :)

11:16 I need help debugging an issue w/ my first released library & its corresponding lein plugin

11:16 The error is bizarre and incomprehensible to me

11:17 fdaoud: autodidakt: why the nick change to 64MAA73RA?

11:18 dgrnbrg: Here's the stack trace of the problem I'm having: https://gist.github.com/701aa6ef9fc54f58747b

11:18 it happens when I require a lib that I pushed to clojars in a plugin i'm writing

11:18 I can load the lib from the repl, though

11:18 it's my first time using clojars/maven and my first lein plugin, so i'm not sure where the issue lies

11:20 64MAA73RA: fdaoud: fighting with nickserv, complaining in #freenode

11:20 fdaoud: 64MAA73RA: I see.

11:23 jaen: 64MAA73RA: actually does nickserv enforce anything at all? I regstered my nick but I never auth and I don't get kicked or anything.

11:24 TimMc: jaen: Did you tell your IRC client the password? It might auth for you.

11:25 jaen: I don't think so, I'm too lazy to check how to tell that to weechat after getting it to set urgency hint on highlight was so troublesome ; d

11:26 TimMc: dgrnbrg: Looks like it is missing some class?

11:26 dgrnbrg: TimMc: it's missing the lib I exported to clojars

11:26 but I added it to my project.clj

11:26 and did lein deps

11:27 TimMc: What does lein classpath show?

11:27 That is, does it include it?

11:27 dgrnbrg: yes

11:27 it's got the jar on the classpath

11:27 I don't know if maybe I didn't do the clojars thing correctly

11:28 I just registered for clojars and did lein push

11:28 and nothing else as far as I can recall

11:28 do I need to create a manifest or something?

11:29 TimMc: is there something special I need to do to release on clojars?

11:30 TimMc: No, that sounds right.

11:30 dgrnbrg: Can you gist a failing project.clj for me?

11:30 dgrnbrg: TimMc: i have the code on github (all 10 lines)

11:31 https://github.com/dgrnbrg/lein-guzheng

11:31 Wild_Cat: is there an event-driven network programming framework for Clojure (a Twisted equivalent, basically)?

11:31 TimMc: I might give that a try in a few minutes.

11:32 dgrnbrg: TimMc: the project.clj is there, as well

11:32 if anything sticks out to you...

11:32 zerokarmaleft: Wild_Cat: lamina

11:32 TimMc: dgrnbrg: Besides a :url field? No. :-)

11:33 zerokarmaleft: Wild_Cat: er aleph, which is built on lamina

11:33 Wild_Cat: zerokarmaleft: checking it out now, thanks

11:34 fdaoud: jaen: I'm not sure but I think it would only be an issue if there was a conflict between you and someone else for the same nick.

11:34 TimMc: fdaoud: How does NickServ know jaen isn't "someone else"?

11:35 jaen: Maybe probably then I would have to auth for reals or something.

11:35 Thoguh I find it pretty weird I don't have to right now anyway.

11:36 fdaoud: TimMc: because you auth yourself to nickserv with your password.

11:39 TimMc: you can force someone to change their nick if they are using yours and you are the one who has registered it.

11:39 devn: ghost

11:40 fdaoud: jaen: if you never auth, your registration may expire.

11:41 also, apparently some channels only allow registered nicks in. also apparently, some irc clients identify those you are using registered nicks.

11:41 Raynes: /message nickserv ghost yournick yourpass

11:41 Er, /msg

11:41 jaen: Duh... I'll look how to get weechat to auth me. I hope it's not some obscure script I had to fish from google as it was case with the urgency hint

11:41 Raynes: Too early.

11:43 fdaoud: also to prevent the problem at all you can use /msg nickserv set enforce on

11:43 Raynes: that's also useful when it's you who is the ghost, you got disconnected somehow and when you rejoin, your "previous self" is a zombie

11:44 Raynes: Indeed.

11:45 TimMc: I think that's what "ghost" means.

11:45 fdaoud: TimMc: yeah. Really to boot someone you'd use /msg nickserv release TimMc <password>

11:46 TimMc: So, I'm under the impression that freenode's NickServ will boot anyone who doesn't auth in X seconds when using a registered nick.

11:50 devn: that's what i thought as well

11:50 S11001001: TimMc: I doubt it, unless there's a non-default option

11:51 devn: on other networks the zombie problem is way more common

11:51 S11001001: you do get booted for not ponging

11:51 fdaoud: TimMc: that is what /msg nickserv set enforce on does

11:51 you decide whether to enforce for your nick

11:54 TimMc: aha!

11:54 I set my nick up so long ago, I must have forgotten setting that.

11:58 devn: i cannot get over how nice mosh is

11:59 gfredericks: in an aleph http server is it redundant to start up a new thread to handle the request?

11:59 devn: i want to shout it from the top of a mountain

11:59 * llasram grumbles about ssh not being good enough for kids these days

11:59 fdaoud: devn: mosh?

11:59 devn: llasram: lol. ssh is fine. im still going to ssh -x, tunnel with it, etc.

11:59 fdaoud: http://mosh.mit.edu/

12:00 * gfredericks grumbles about tmux not being good enough for kids these days

12:00 llasram: devn: I really should give it a try, but I'm not quite sure what it buys over ssh -t 'screen -x'

12:01 gfredericks: "On a bad connection, outstanding predictions are underlined so you won't be misled."

12:01 that is interesting

12:01 I wonder how they underline deletions

12:03 llasram: The un-derline them

12:03 s,The,They,

12:04 ~rimshot

12:04 clojurebot: Badum, *tish*

12:11 autodidakto: finally

12:13 devn: my understanding is the mosh wraps around ssh, providing some modern nicesties?

12:14 devn: I always assumed we learned a trick or two since the 1980s. Nice to finally be able to use them

12:14 devn: But what I want to know is: Is it 100% internet-hipster approved?

12:15 jaen: What sort of niceties one would need apart from tmux, because I'm squinting at this mosh page and can't figure what's so awesome in it ; <

12:16 autodidakto: jaen: it's not a screen/tmux replacement

12:16 offby1: jaen: I just started using it. It works, but I can't say it "feels" any different from ssh.

12:16 Supposedly there's less latency.

12:16 autodidakto: jaen: my vague understanding is that it wraps some UDP around your SSH TCP and it's fun for U 'n' Me

12:17 offby1: Hey, you got your chocolate in my peanut butter.

12:17 jaen: That I figured already, but I'm too dumb to figure what sort nice it gives me from the page...

12:17 autodidakto: jaen ever play quake1?

12:17 or hl1 before the "new netcode" ?

12:17 offby1: jaen: also, it'll automatically reconnect if you, say, move your laptop from one network to another.

12:17 jaen: Hahaha, too young for that, I didn't have internets back then

12:18 autodidakto: and you have you start shooting your M16 before going around the corner (in counter-strike) just in case?

12:18 jaen: But I can sort of get what yo're trying to say

12:18 It's just more stable on wacky connections?

12:18 autodidakto: my impress is, SSH with modern network code

12:19 not just more stable, but what offby1 said.. you can put your laptop to sleep and wake it up and you're "still" connected

12:19 jaen: you're grandfather's ssh can't do that

12:20 offby1: of course if, like me, you only use ssh to connect to a long-running "screen" or "tmux" session, then it doesn't buy you much

12:20 autodidakto: offby1: i'd connect to your long-running screen session any day for free.... oh wait, is this still #emacs?

12:21 jaen: That explains why I don't see anything awesome in it. I hardly ever sleep my laptop, since linux and sandy bridge tend to not like eachother in ceratin aspects ; D

12:21 offby1: okay, that's pretty much what I figured

12:21 autodidakto: jaen: you got 56K modulate into your TCP/IPs over Pentium MMX emulation!

12:21 jaen: Was interested if it gives anything to ye old non-mobile programmer ; d

12:21 *ye olde

12:22 autodidakto: jaen: give it a try the next time you get a chance. maybe you'll like it. maybe it's not worth it. What do we IRC people know anyway?

12:22 jaen: Certainly more than me : D

12:23 autodidakto: jaen: you'd be surprised

12:23 offby1: jaen: I've got to say, it's one of the slickest open-source packages I've used. The docs are good; the software was easily available on the two platforms on which I'd looked for it

12:24 I get the impression they waited until they were done to announce it.

12:24 Oh and there's a super-helpful #mosh channel on this very IRC network.

12:24 autodidakto: offby1: And did you see that website? Richard Stallman CSS bootstrap? No way

12:24 jaen: Maybe I'll take a look at it one of these days ; D

12:29 autodidakto: Raynes: Thou shalt pull what I request

12:29 Raynes: autodidakto: Oh, I forgot to get to that.

12:29 autodidakto: I'm not sure that's what we're after though.

12:29 clojurebot: Gabh mo leithscéal?

12:30 Raynes: The idea was that the height would increase with the browser, not the code.

12:31 autodidakto: Raynes: but if the code isn't there, why have a bigger empty box?

12:31 you could do a bigger min-height, but I'd need to a add a media query

12:31 Raynes: Because it's better than a giant empty space surrounding the small empty box.

12:32 autodidakto: Raynes: if you're box is empty. type

12:32 lol i dont know either. hmm

12:32 Raynes: :p

12:33 autodidakto: So, a big box empty box that fills your screen, but one line of code is better than a smaller-ish box with one line of code?

12:34 Raynes: Apparently.

12:34 Several people have requested it.

12:34 autodidakto: Either way you're getting a bunch of empty space if you dont put code in their and you have a big screen

12:34 Raynes: So I guess by popular demand...

12:34 autodidakto: you can have that big empty space be the bg-color (black), or the color of the empty box

12:35 Raynes: I say we just take the website down and call it a day. Can't take these damn decisions.

12:35 ;p

12:35 autodidakto: Have that guy who was requesting the feature take a look. I think it is what he's looking for

12:35 I know. Lots of little annoying things to decide...

12:36 But hey, you asked for me. I just heard an interview with you last night and you said "check out my issues on refheap and help out!" and i spent the next hour or so doing that :)

12:36 Raynes: autodidakto: He has an issue there. Ping him.

12:36 autodidakto: *you ask for it

12:36 Raynes: huh

12:36 Wait, was that the dictv thing?

12:37 autodidakto: Raynes: lol i dunno, some random goofy guy on ustream i found in a google search

12:37 Raynes: Bahaha, yeah, the dictv thing. It's pretty crazy that you found that.

12:38 autodidakto: That's the name dictv? The guy was a little out there, for my taste. Why is crazy that i found that?

12:38 Raynes: It is a weekly web show related to dreamincode.com

12:39 They like crazy out there stuff.

12:39 It's just that dictv is really highly isolated to dreamincode people.

12:40 I wouldn't expect anyone not from there to have come across it.

12:40 autodidakto: "jeremyheiler" was the guy, right? he's participating the issue. I'll msg him.

12:40 Raynes: Yeah, that's him.

12:41 autodidakto: Raynes: Yeah I was googling your name/handle

12:41 Raynes: He seemed pretty opinionated about it, so if he is into this we'll probably go for it.

12:41 offby1: that's pretty personal

12:41 autodidakto: offby1: that's how i like it

12:41 Raynes: Wow! My very own stalker!

12:41 offby1: he's mine; hands off

12:43 autodidakto: Raynes: Haha well. Learning clojure and chatting in IRC at the same... There are many "hey wait a minute, I know that guy!" moments

12:43 *at the same time

12:44 Raynes: Heh

12:44 I don't think you know me.

12:44 fdaoud: (inc (fdaoud :confusion))

12:44 lazybot: ⇒ 1

12:44 Raynes: Though you should. I'm pretty great.

12:44 babilen: Raynes: Just seen you being active, so I thought I just "bug" you here. -- I incorporated your suggestions regarding my pull request on fs. Is there anything else you would change?

12:45 Raynes: Oh man. I just forgot about it.

12:45 I'm sorry!

12:45 autodidakto: Well, know = slightly interacted with him on irc... Haha. I believe it. Alabama charm. My step dad is from oklahoma. I really need to visit the area

12:45 babilen: Raynes: Don't worry -- Hence my ping :)

12:49 weavejester: Any comments on the changes to make clucy ready for lucene 3.5.0 ? (https://github.com/weavejester/clucy/pull/8)

12:49 Raynes: babilen: Okay, I see why I didn't pull this immediately. It's actually something silly that I could have fixed myself: you need to use the `file` function in fs.core and not clojure.java.io/file. They're generally the same, but the one in fs.core has some special cwd behavior. It's a three character change. If you could update that, I'll pull. Or you can just tell me to stop being lazy and do it myself. Whatever you want. :)

12:50 babilen: Raynes: I've changed that already and pushed the changes. It doesn't make sense to use it for absolute? though as this would cause *every* path to be absolute ;)

12:51 Raynes: Oh. Duh.

12:51 Yeah, I mostly just scanned the diff for io/file and red lights started flashing in my skull.

12:51 You're right. I'll merge this in a minute.

12:52 weavejester: babilen: Sorry, I haven't been keeping up with Lucene, so making sure the changes made are correct (because they delete a lot of things) is a pretty big effort for me. I haven't had the time to sort it out.

12:52 Raynes: Sorry it took so long.

12:52 babilen: Raynes: Most appreciated. Should have mentioned the absolute? case :)

12:52 weavejester: Alright -- Let me know if you need more information or if I could make it easier for you.

12:53 technomancy: dgrnbrg: what's up?

12:54 babilen: weavejester: The main difference is that calls to optimize() are strongly discouraged (and optimize() has been renamed to forceMerge() to reflect that) -- I therefore deleted all code that was needed to call optimize() in specific intervals.

12:55 weavejester: babilen: Hmm, okay, I see that...

12:55 babilen: weavejester: FWIW - I have used that code in production for a while now and haven't had problems with it. I still strongly encourage you to test it yourself. Just wanted to know if you need additional information.

12:55 weavejester: babilen: Oh, is there a reason you don't have a 1.3-lucene3 multi-dep?

12:56 babilen: weavejester: That is the default

12:56 weavejester: babilen: Ahh

12:57 babilen: :)

12:57 weavejester: babilen: I'll try and get it merged by this weekend. Now I look at it more closely, it appears a sensible change.

12:57 babilen: Usually I merge things faster, but I haven't touched clucy in a while. Technomancy was the last to touch it :)

12:58 Raynes: babilen: You forgot to remove your join tests.

12:58 Evil!

12:58 babilen: weavejester: Wonderful! Most appreciated. It just happened that I use clucy myself a bit these days in other code and just wanted to make sure that I don't stray too far from upstream. I am actually working on ways to programmatically construct queries, but that is not yet ready.

12:58 autodidakto: technomancy: dgrnbrg posted -> https://gist.github.com/701aa6ef9fc54f58747b . says he gets that when requiring a lib he push on clojars, in a plugin he's making

12:59 babilen: Raynes: Argh! Sorry! :( -- Should I push that change?

12:59 Raynes: babilen: Naw, I've got it.

12:59 autodidakto: but can load it in a repl

12:59 babilen: Raynes: Great -- Sorry :'-(

12:59 weavejester: babilen: You use Clucy a lot then? Hmmm...

12:59 Raynes: babilen: Your changed are pushed.

13:00 I'm so sorry that took so long.

13:00 babilen: weavejester: Well - I use lucene to index text and write my program in Clojure -- Clucy was a sensible choice at the time and I "knew" it already due to its usage in leiningen.

13:02 weavejester: babilen: Okay, I'll merge in the changes, I think. If there are any problems, I'll point the pitchfork wielding mob in your direction.

13:02 babilen: hehe

13:02 (the tests pass!)

13:02 weavejester: That's responsible project management, right? :)

13:03 technomancy: dgrnbrg: hmmm; it works fine here. which leiningen version are you using?

13:03 babilen: Hmm, maybe we could convince technomancy to try leiningen with the proposed changes :-/ (There might be additional tests related to the search/index functionality)

13:04 technomancy: babilen: how about right after the preview3 release?

13:04 babilen: technomancy: Sure -- I just have no idea how else I could verify that clucy is still doing its thing. I have that impression, but would like to gather additional data points :)

13:04 dnolen: another massive speed boost for CLJS, direct invocation for known fns - it's now possible to write CLJS w/ identical perf to JS

13:05 technomancy: only 3 issues blocking preview3: https://github.com/technomancy/leiningen/issues?sort=created&direction=desc&state=open&page=1&milestone=2

13:06 Na-Fiann: hi, I'm trying to install clojure from the instructions from here: http://riddell.us/ClojureOnUbuntu.html. However, when installing clojure-contrib, there is no file called clojure-contrib.jar generated after mvn install. Anyone know where it went? I'm on ubuntu 10.10

13:06 lazybot: The riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.10.10

13:06 jsabeaudry: partition can be seen as splitting the seq into rows assuming a row-major format, is there some kind of equivalent for column major format? Best I could find is (partition nrows (apply interleave (partition v ncols)))

13:06 Na-Fiann: lol wow, that's awesome :)

13:06 technomancy: lazybot: botsnack

13:06 lazybot: technomancy: Thanks! Om nom nom!!

13:08 weavejester: babilen: Okay, merged and released 0.3.0

13:08 RickInGA: technomancy: just wanted to let you know what a powerful influence you have on the community.... I bought an aeropress last week.

13:08 babilen: weavejester: yay!

13:08 weavejester: babilen: Sorry again for the delay

13:08 technomancy: RickInGA: haha; excellent.

13:08 weavejester: babilen: Any more pull requests you have should be merged faster

13:09 technomancy: with some proper beans you'll be all set

13:09 autodidakto: technomancy: I dont get that thing... a single serving french press?

13:09 RickInGA: yeah, I am going to have to see what I can find

13:09 jsabeaudry: &(partition 2 (apply interleave (partition 4 [:1_1 :1_2 :1_3 :1_4 :2_1 :2_2 :2_3 :2_4])))

13:09 lazybot: ⇒ ((:1_1 :2_1) (:1_2 :2_2) (:1_3 :2_3) (:1_4 :2_4))

13:10 technomancy: autodidakto: sort of, but it has some advantages over a french press

13:10 weavejester: Huh, apparently I joined GitHub 18 days after it first went live.

13:10 technomancy: autodidakto: since it uses paper filters, you can use a much finer grind, which means you don't need to keep the water as hot

13:10 so the end result is less bitter

13:10 plus you don't get any grit in it, and it's easier to clean

13:10 autodidakto: technomancy: I see

13:11 fdaoud: keurig ftw

13:12 autodidakto: Raynes: We have a winner! -> I "applied" the patch directly in Chrome from refheap.com, and I most definitely approve of this. [https://github.com/Raynes/refheap/issues/45#issuecomment-5050785]

13:12 Raynes: I saw.

13:12 I'm testing it out right now.

13:12 autodidakto: Hehe. just keeping you honest...

13:12 fdaoud: where is the pause button on this channel?

13:13 autodidakto: fdaoud: it's only got one gear: Go

13:13 fdaoud: ok then,

13:13 where is the record button on this channel?

13:13 TimMc: ~logs

13:13 clojurebot: logs is http://clojure-log.n01se.net/

13:13 Raynes: autodidakto: Okay, I have one problem.

13:14 autodidakto: yeah?

13:14 Raynes: autodidakto: When I paste something long, I get slapped to the bottom of the page.

13:14 fdaoud: awesome.

13:14 Raynes: The paste button is at the top of the page.

13:14 :(

13:14 autodidakto: not winning! let me check

13:14 fdaoud: TimMc: thanks

13:17 groovemonkey: I'm looking to collect values from nested loops...doseq returns nil, and I'm not sure how to yield values from inside them...can anyone help me out?

13:17 i.e.

13:17 (let [room (rand-nth [:bedroom :bathroom :living-room])]

13:17 (doseq [furniture [:mirror :chair]]

13:17 (let [type [:type1 :type2]]

13:17 (list type)))) ;; what I want to return

13:18 autodidakto: Raynes: Oh i see. you paste, and now you got to scroll up

13:18 raek: groovemonkey: use for instead of doseq

13:19 doseq is a variant of for that does not collect the results

13:19 groovemonkey: ahh so just use a for loop?

13:19 raek: (for [furniture [:mirror :chair]] ...)

13:19 groovemonkey: raek: thank you, didn't see your first answer

13:19 raek: it has the same syntax as doseq

13:19 groovemonkey: excellent, thank you!

13:20 autodidakto: Raynes: you really do want it all, don't you? :) Options -> 1) Paste button on bottom (as well, or only). 2) Ignore it, most pastes are short 3) uhm lemme think

13:22 3) the hardcore paster without time to scroll up should be using the keyboard shortcuts [COMING SOON!] 4) Still thinking

13:24 jappy123: (extend-type java.lang.String

13:24 java.lang.Runnable (run [_] (println "hello")))

13:25 is there any way to have existing types dynamically implement interfaces like they can protocols? i.e.

13:25 sorry wrong order

13:25 Bronsa: not in clojure

13:26 jappy123: I have existing objects I want to treat like IFn and ISeq but I dont want to have to implement those interfaces in java... and I dont want to have to wrap my objects

13:27 I dont understand why the protocols can't behave like real interfaces.

13:28 llasram: jappy123: Protocols were a later feature. Clojurescript implements those core interfaces as protocols. Hopefully Clojure will eventually too

13:28 technomancy: IFn can't be a protocol in Clojure. ಥ_ಥ

13:29 llasram: Yeah... That one would be a tad tricky

13:29 dnolen: jappy123: what you mean is why interfaces can't act like protocols.

13:29 jappy123: right

13:30 dnolen: Clojure on the JVM is one giant epic battle against a VM designed for a static programming language.

13:30 jappy123: looking at the extend code... it seems like it should be doable

13:31 hcumberdale: Hi ;)

13:31 jappy123: has anyone ever implemented IFn... we should be able to decorate our types lazily too :p

13:31 hiredman: dnolen: well, it could have been the clr...

13:31 hcumberdale: I want to merge an incoming json request

13:31 jappy123: I dont know... I still believe in magic

13:31 hcumberdale: but only the keys that exists in a map

13:32 mrb_bk: dnolen: woot thanks for the shouts

13:32 hcumberdale: is there a "merge-existing" for maps?

13:32 RickInGA: at the meetup group I went to last night, Neal Ford said that tail recursion was coming to a future version of java, and he said that higher order functions were going to be in java 1.8. do we know what version will have tco?

13:32 dnolen: mrb_bk: :)

13:32 TimMc: jappy123: I have, it wasn't pretty.

13:34 raek: hcumberdale: you can do something like (merge m1 (select-keys m2 (keys m1)))

13:34 jappy123: Its great stuff when your code can behave like a persistent map, seq, vector, etc... and with all the talk I thought making your "collection'ish" types play well would be simple

13:35 hcumberdale: ,(merge {:x 1 :y 2 :badkey "3"} (select-keys {:x nil :y nil} (keys {:x 1 :y 2 :badkey "3"})))

13:35 clojurebot: {:y nil, :x nil, :badkey "3"}

13:36 hcumberdale: raek: seems not to work ;(

13:37 Raynes: autodidakto: Not sure what to do about it either.

13:37 hcumberdale: ,(merge {:x 1 :y 2 :badkey "3"} (select-keys {:x 1 :y 2 :badkey "3"} (keys {:x nil :y nil})))

13:37 clojurebot: {:y 2, :x 1, :badkey "3"}

13:38 hcumberdale: ??, ....

13:38 ahh

13:38 ,(merge {:x nil :y nil} (select-keys {:x 1 :y 2 :badkey "3"} (keys {:x nil :y nil})))

13:38 clojurebot: {:y 2, :x 1}

13:38 raek: hcumberdale: I though of it like this: ##(let [defaults {:x nil, :y nil}, potentially-bad {:x 1, :z 3}] (merge good-keys (select-keys potentially-bad (keys defaults))))

13:38 lazybot: java.lang.RuntimeException: Unable to resolve symbol: good-keys in this context

13:39 raek: eh

13:39 hcumberdale: thx raek

13:39 raek: &(let [defaults {:x nil, :y nil}, potentially-bad {:x 1, :z 3}] (merge defaults (select-keys potentially-bad (keys defaults))))

13:39 lazybot: ⇒ {:y nil, :x 1}

13:39 hcumberdale: yeah!

13:41 I'll test the clojure blog the first time on heroku today :)

13:42 autodidakto: raek: ahh i see... using good keys, grab the good stuff from the bad hash, merge with the good hash

13:45 hcumberdale: autodidakto: nice nick

13:46 autodidakto: hcumberdale: thank you :)

13:50 dgrnbrg: TimMc: did you get a chance to look at that project.clj of my lein-guzheng projecT?

13:55 dnolen: oooh, we're on the verge 1.4.0?

13:55 gfredericks: we are?

13:55 1.4: where all vars are dynamic by default and you have to specify ^:boring to get the formerly default behavior

13:56 autodidakto: dgrnbrg: did you see technomancy's messages?

13:56 dgrnbrg: autodidakto: I didn't, and then my scroll back made them die

13:56 i was at lunch, alas

13:56 :(

13:56 is there a log of this room?

13:57 llasram: dgrnbrg: http://clojure-log.n01se.net/ :-)

13:57 autodidakto: <technomancy> dgrnbrg: hmmm; it works fine here. which leiningen version are you using?

13:57 llasram: dgrnbrg: This gist was "Works for me. What lein version are you using"

13:57 Oh, there you go

13:57 autodidakto: :)

13:58 dgrnbrg: ah

13:58 I'm using Leiningen 1.6.2 on Java 1.7.0-ea OpenJDK 64-Bit Server VM

13:58 autodidakto: dgrnbrg: tried the latest?

13:59 muhoo: dgrnbrg: lein 1.7.1 is the most current stable IIRC.

13:59 dgrnbrg: is there a command to update?

13:59 muhoo: dgrnbrg: https://raw.github.com/technomancy/leiningen/stable/bin/lein

13:59 autodidakto: lein -h

13:59 try lein upgrade

14:00 muhoo: even better ^

14:00 dgrnbrg: autodidakto: awesome :)

14:00 I kept trying lein update

14:00 rather, i tried it once, and it didn't work

14:01 autodidakto: download from github if that command doesnt work, i assume

14:01 dgrnbrg: the command worked

14:01 but lein guzheng still doesn't work

14:02 technomancy: dgrnbrg: oh, I thought you said you were going to target lein2 first

14:03 dgrnbrg: technomancy: I actually need lein 1 support, since I'm writing this to scratch an itch

14:03 and that itch is running on lein 1 for now

14:03 :/

14:03 technomancy: oh, ok. I just tried it on lein 1.7.1 and it works fine for me to.

14:03 dgrnbrg: you don't get that class loader issue?

14:03 technomancy: no

14:03 hcumberdale: I will try lein2 out later :)

14:04 dgrnbrg: technomancy: is there some way I couldn't messed up my class path globally?

14:04 *could've

14:04 are you on mac or linux?

14:04 technomancy: in lein1 the only global classpath settings are the user plugins

14:05 unless you've set the CLASSPATH env var, which you should basically never do

14:05 so it could be something in ~/.lein/plugins interfering

14:05 (this is not a problem in lein2)

14:05 dgrnbrg: nope, i have not done that

14:06 so, you can git clone lein-guzheng, and then run "lein guzheng" in that directory and it works?

14:06 technomancy: I did "lein1 plugin install lein-guzheng 0.1.0-SNAPSHOT", then "lein1 guzheng" and it works fine

14:07 oskarth_: :q

14:07 technomancy: dgrnbrg: well, you have to call "lein guzheng" on a project that is not :eval-in-leiningen if you're using lein1

14:07 dgrnbrg: technomancy: what's the workflow for testing my plugin?

14:07 hcumberdale: awwww

14:08 lein ring server-headless 8080 << does not run clojure 1.3 !!!

14:08 :dependencies [[org.clojure/clojure "1.3.0"] !!

14:08 technomancy: dgrnbrg: if you don't want to go through the install cycle every time, you can symlink your plugin's src/ dir into ~/.lein/plugins/lein-guzheng

14:10 hcumberdale: java -Xbootclasspath/a:/home/user/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar << started by lein ring ,...

14:10 technomancy: do you know what is going wrong?

14:10 technomancy: hcumberdale: you can't change the version of Clojure that Leiningen uses for itself, just the version used for your project

14:11 dgrnbrg: technomancy: so I'll have ~/.lein/plugins/lein-guzheng/leiningen/guzheng.clj

14:11 Do I also need to do a "lein plugin install …"

14:11 technomancy: not if you have that symlink

14:12 dgrnbrg: now when I run "lein guzheng" in another project, it says "that's not a task. (etc)"

14:13 hcumberdale: thx technomancy ! I've seen it

14:13 The subprocess is running 1.3 ;)

14:13 technomancy: dgrnbrg: hmm... I guess you have to do "lein jar" in lein-guzheng

14:14 and symlink that into ~/.lein/plugins instead

14:14 so you have to do "lein jar" when you want to update it, but you can skip "lein plugin install"

14:14 dgrnbrg: technomancy: I don't see the lein-guzheng that I symlinked into the .lein/plugins directory on the classpath

14:14 ok

14:15 let me try that

14:15 technomancy: hard to keep this straight since I've been on lein2 for so long

14:16 dgrnbrg: technomancy: HOORAY!

14:16 it works

14:16 will this plugin also work on lein2, do you think?

14:16 cjfrisz: Is swank-clojure known to have problems with record definitions across multiple files implementing protocols in separate files?

14:16 On the repl, specifically?

14:16 hiredman: records and protocols and deftypes have issues with code reloading

14:17 dgrnbrg: technomancy: thank you for your help--I had a deep misunderstanding of how this worked, but now I can finish the plugin and release it :)

14:17 technomancy: dgrnbrg: so far you don't have anything that would make it incompatible

14:17 cjfrisz: hiredman: I seem to running into that in spades, are there any specifics or known documentation on the problem?

14:17 hcumberdale: Anyone tryed this: http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/ ?

14:17 technomancy: hcumberdale: sure have; what's up?

14:17 Raynes: hcumberdale: tryclj.com runs on heroku

14:17 hiredman: cjfrisz: why are you using them?

14:18 hcumberdale: procfile: web: lein run -m demo.web

14:18 should lein really run in such a heroku app?

14:18 cjfrisz: hiredman: why am I using records and protocols?

14:18 hiredman: yes

14:18 technomancy: hcumberdale: sure, but it's better to do "lein trampoline run -m demo.web" instead to save memory

14:18 cjfrisz: I'm messing with writing a CPSer with records, and I'm trying to do testing in the repl

14:19 CPSer for Clojure, that is

14:19 hiredman: CPSer?

14:19 hcumberdale: can the app get started without lein ?

14:19 hiredman: sure, but what about that requireds records and protocols?

14:19 hcumberdale: why do they require a build tool installed on production servers?

14:19 lein needs a own vm?! Think this is overhead?!

14:20 Raynes: I'm... not...

14:20 technomancy: hcumberdale: that's what the trampoline task is for

14:20 cjfrisz: hiredman: It makes it far easier to extend the CPSer

14:20 dnolen: cjfrisz: CPS any particular reason you didn't go w/ maps and multimethods here?

14:20 technomancy: hcumberdale: Leiningen calculates everything the app needs to run, then exits its VM, and the shell script launches the project

14:20 dnolen: cjfrisz: records and protocols are nice but are a real hassle on the JVM for interactive development.

14:20 hiredman: cjfrisz: protocols and records/types are a performance optimization

14:21 technomancy: if you like you can just put the appropriate call to /usr/bin/java or whatever in the Procfile, but "lein trampoline run" is a lot easier

14:21 Raynes: They don't 'require' you use a build tool. It's just that everybody uses lein to run their code/websites.

14:21 cjfrisz: dnolen hiredman: didn't know they were such a problem for interactive

14:21 They seemed appropriate for what I wanted to do, but I may be wrong

14:21 Raynes: You can use whatever you want, but you still need lein to download your dependencies and stuff.

14:22 Unless you want to fetch those manually too, which isn't remotely fun.

14:22 hcumberdale: Aaaahhh! ,... and writing ueberjar packages to heroku?!

14:22 technomancy: hcumberdale: Clojure itself is strictly a library; it doesn't come with what's needed to launch it from the command-line

14:22 hcumberdale: technomancy: and java -jar ... in the procfile?

14:23 TimMc: dgrnbrg: What was the solution?

14:23 dnolen: cjfrisz: they're really are intended for performance - but for a CPSer I think maps + multimethods would work fine and simpler.

14:23 technomancy: hcumberdale: you can do that if you get leiningen to create an uberjar at git push time

14:24 hcumberdale: what version of lein is installed on heroku?

14:24 cjfrisz: dnolen: I'll take a look at that, thanks

14:24 hcumberdale: technomancy: you work for heroku, right?

14:24 dnolen: cjfrisz: after looking the ClojureScript complier I really regret using records+protocols in core.match.

14:24 looking at.

14:24 technomancy: hcumberdale: yeah. right now 1.7.1 is used by default, with 2.0.0-SNAPSHOT available if you request it

14:24 dgrnbrg: TimMc: well, i didn't understand how lein1 loads plugins. I needed to lein jar it and then symlink that jar into the .lein/plugins/ directory, and then I could use it. I think that it was because the plugin code had ":eval-in-project true" in the project.clj which caused me to be mislead into thinking that I could use the plugin from the project itself w/o doing any release steps

14:25 technomancy: hcumberdale: you can generate an uberjar at git push time if you like, but if your only concern is the overhead of the lein process then trampoline is a much simpler solution

14:25 hcumberdale: details on the build process if you're curious: https://github.com/heroku/heroku-buildpack-clojure

14:25 hcumberdale: technomancy: why isn't trampoline used by default?

14:25 TimMc: dgrnbrg: You were trying to use the plugin on its own project?

14:25 dnolen: cjfrisz: that said, records+protocols are much less of a hassle in ClojureScript - they work fine for interactive development there.

14:26 cjfrisz: dnolen: I'm surprised by that. Besides the issues using them on the repl, I've found records and protocols to be quite nice.

14:26 dnolen: hiredman: ha! do I ever same "game changer" ?

14:27 technomancy: hcumberdale: it actually is by default now, it's just some of the documentation hasn't been updated

14:27 I'll see about fixing that blog post

14:27 dgrnbrg: TimMc: yes, since I thought that was the only project I had where the plugin would be automatically found by lein

14:27 cjfrisz: I'm kind of a performance junkie, so I figured records+protocols were the way to go.

14:27 dgrnbrg: and it was, sort of, but not really

14:28 hiredman: dnolen: I have not performed any analysis of my logs

14:28 hcumberdale: thx technomancy , nice to see you here!

14:29 dnolen: cjfrisz: definitely not saying they aren't nice. other reason to use them is if you want something that works w/ the core abstractions.

14:30 hcumberdale: Caused by: java.lang.RuntimeException: Unable to resolve symbol: run-jetty in this context

14:30 but I used: (:use [ring.adapter.netty] ...

14:30 ahhh netty vs jetty...

14:31 cjfrisz: dnolen hiredman: That clears up a fair amount of frustration, thanks.

14:35 hcumberdale: Does anyone know how good/stable is https://github.com/datskos/ring-netty-adapter .... last update 2 years ago

14:35 TimMc: Maybe it is done. :-P

14:37 hcumberdale: ring-netty-adapter "0.0.3" << !

14:37 mega`: This repo adds (experimental/alpha) Netty support to Ring

14:37 probebly not done

14:38 is netty an alternative to jetty?

14:39 hcumberdale: technomancy: how to add mongodb path? (connect-to-db!) << currently localhost

14:40 technomancy: hcumberdale: I don't use mongodb, but most configuration on heroku happens via environment variables

14:40 (System/getenv "DATABASE_URL") is what I usually use

14:42 hcumberdale: https://devcenter.heroku.com/articles/mongohq << says MONGOHQ_URL

14:46 antares_: hcumberdale: it depends on the exact cloud provider

14:46 mega`: netty is an async I/O library, jetty is an embeddable HTTP server

14:48 hcumberdale: antares_: MONGOHQ_URL << can't find an example of it

14:48 (monger.core/connect { :host \"db3.intranet.local\", :port 27787 })

14:48 needs host + port

14:50 antares_: hcumberdale: monger does not yet support connecting with URLs

14:50 although I can add it as soon as today

14:50 just need to finish something

14:51 Fullmoon: Question about laziness: For this here: https://gist.github.com/2353622

14:52 jondot_: hello all. kinda in a dilemma about image processing with clojure. i need to count number of unique colors in an image (and other tests), which rinzelight doesn't have, and imagemagick has. however i don't want to shell out to imagemagick just yet (it'll block me using appengine)

14:52 Fullmoon: Why do I get the output "iterating." twice?

14:52 technomancy: Fullmoon: you probably want to call first on a vector

14:52 hcumblerdale2: antares_: thank you very much !

14:52 jondot_: anyone else doing image processing with clojure ? mostly image identification and validation

14:52 technomancy: Fullmoon: also, hello; long time no see =)

14:52 Fullmoon: technomancy: Hey, funny! You here

14:52 antares_: technomancy: so you think monger should support connecting via URIs, that's it, right?

14:52 Fullmoon: technomancy: Seems to be a natural progression for many Rubyists

14:53 technomancy: antares_: yeah, I'm a fan. I submitted that as a patch to java.jbdc; it's quite convenient.

14:53 antares_: technomancy: ok

14:53 hcumblerdale2: yeah!

14:53 so I'll get my app running on heroku

14:53 technomancy: Fullmoon: the brave ones at least =)

14:53 hiredman: jondot_: the jvm has some built in classes for doing image stuff (ImageIO), you might start there

14:54 autodidakto: Fullmoon: you mean clojure? totally agree :)

14:55 antares_: oh, I see mongodb java driver already supports it

14:55 although we need to provide a more convenient way in monger

14:55 but still, good to know

14:55 Fullmoon: technomancy: Railsday '06 was fun

14:55 technomancy: Fullmoon: one of these days we'll have a Clojure equivalent

14:55 "Clojure Challenge"

14:56 Fullmoon: technomancy: Oh fun, I am not sure that I should attend, with my 48 hours experience

14:57 technomancy: Fullmoon: oh, it won't be any time soon. plenty of time to get up to speed.

15:02 RickInGA: Fullmoon: I don't know how to make the replacement lazy, but I would change (first ((wait-a-bit) (wait-a-bit))) to (first [(wait-a-bit) (wait-a-bit)]) the list of lists was giving me an error

15:02 technomancy: RickInGA: well that won't be lazy either, which is what I think he's getting at

15:03 laziness is a property of seqs

15:03 Fullmoon: RickInGA: I was under the impression that first only actually evaluates the car

15:03 technomancy: ((wait-a-bit) (wait-a-bit)) tries to call the wait-a-bit function, and then uses the return value of that call as a function to call

15:04 Fullmoon: if you pass first a lazy seq, it will only evaluate the first element (unless it's a chunked seq), but that's not what you're doing here.

15:04 RickInGA: technomancy: yeah, replacing with vector is still eager, but stops giving error

15:04 technomancy: right

15:05 Fullmoon: technomancy: I shall now go and read into this, thanks.

15:05 technomancy: Fullmoon: lazy seqs generally come from calling things like map and for

15:05 RickInGA: technomancy: how do you rewrite to make it lazy?

15:05 technomancy: (first (map println '(0 1 2)))

15:05 ,(first (map println '(0 1 2)))

15:05 clojurebot: 0

15:07 antares_: hcumblerdale2: can you please give me an example MONGOHQ_URL?

15:07 hcumblerdale2: mongodb://fred:foobar@localhost/

15:07 I tryed to...

15:07 ,(re-seq #"[\\/]{2}([^:]+):([^@]+)@([^/]+)" "mongodb://fred:foobar@localhost/")

15:07 clojurebot: (["//fred:foobar@localhost" "fred" "foobar" "localhost"])

15:08 hcumblerdale2: tried to :)

15:09 antares_: hcumblerdale2: thanks!

15:09 technomancy: better to construct a java.net.URI with it

15:09 hcumblerdale2: technomancy: sure? seems not to be a java.net.URI

15:09 antares_: technomancy: mongodb java client has a URI parser

15:10 technomancy: it has its own parser? =(

15:11 antares_: technomancy: yup

15:11 technomancy: oh mongo...

15:12 antares_: technomancy: the client is written as if it was written by a bright sophomore CS student in a haste. It is not terrible but has many reinvented wheels and weird APIs.

15:12 and _consistent method Naming()

15:12 but that's good enough I guess

15:15 hcumblerdale2: how to skip the first element of a seq?

15:15 scriptor: hcumblerdale2: in what context?

15:16 technomancy: hcumblerdale2: rest

15:16 hcumblerdale2: thx technomancy

15:17 iwo: hi, can anyone tell me how to iterate over function parameters in clojure? been googling for ages but cannot find out how

15:17 is it possible?

15:17 llasram: iwo: Example?

15:17 iwo: i basically want to iterate over function args as if they were a sequence

15:18 hcumblerdale2: antares_: ...

15:18 antares_: iwo: (defn myfn [& xs] (for [p xs] …))

15:18 hcumblerdale2: ,(zipmap [:user :password :host] (rest (first (re-seq #"[\\/]{2}([^:]+):([^@]+)@([^/]+)" "mongodb://fred:foobar@localhost/"))))

15:19 clojurebot: {:host "localhost", :password "foobar", :user "fred"}

15:19 llasram: iwo: ##(let [f (fn [& args] (map #(str "like this? " %) args))] (f 1 2 3 :four "five" 6 :etc))

15:19 lazybot: ⇒ ("like this? 1" "like this? 2" "like this? 3" "like this? :four" "like this? five" "like this? 6" "like this? :etc")

15:19 iwo: excellent, so it's the & here that's the bit i'm missing?

15:19 antares_: hcumblerdale2: I will just reuse mongo driver's parser, I am tryign to figure out whether I want to add a new function or try to fit it into monger.core/connect (which will be either tricky or ugly)

15:20 llasram: Probably? That bundles up all subsequent arguments into a sequence for you. Works the same as in other destructuring forms

15:20 iwo: llasram: thank you, looks like exactly what i need

15:21 llasram: cool beans

15:21 iwo: thanks antares_ !

15:21 kurtharriger: when using clojure-jack-in is there anyway to stdout *out* seems to be redirected to emacs but not System/out?

15:21 +view stdout

15:22 I used to use lein swank, and slime-connect but this no longer opens a repl in emacs for some reason

15:24 hcumblerdale2: antares_: how to use authenticate instead of connect! ?

15:24 llasram: kurtharriger: The only solution I know of is to get a WriterOutputStream from somewhere (Apache Commons has one, for ex) and do something like: (System/setOut (java.io.PrintStream. (WriterOutputStream. *out*)))

15:25 THere's probably an easier way

15:26 Oooh, hmm

15:27 antares_: hcumblerdale2: https://github.com/michaelklishin/monger/blob/master/test/monger/test/db.clj#L20

15:28 with mongodb, you authenticate after you connect, for each DB you need to use, only once (I know, I know; I haven't designed this stuff)

15:28 if you try to authenticate twice, caboom!

15:29 hcumblerdale2: antares_: so I can use connect! and authenticate?

15:29 kurtharriger: llasram: hmm didn't seme to work for me (System/setOut (java.io.PrintStream. (org.apache.commons.io.output.WriterOutputStream. *out*))) (.println System/out "test")

15:30 antares_: hcumblerdale2: correct. With connect!, pass monger.core/*mongodb-database* for a database.

15:30 jsabeaudry: Is it possible to typehint what is inside a ref?

15:30 llasram: kurtharriger: Hmmm. I know I've done that trick before...

15:30 kurtharriger: although if I start clojure-jack-in, then lein swank, then slime-connect killing current connection the slime-repl now goes to swank

15:31 got to be an easier way to open repl in emacs using slime-connect but I guess this works for now

15:33 hcumblerdale2: can I call (monger.core/set-db! (monger.core/get-db "db")) before (authenticate *mongodb-database* (:host x) (:user x) (:password x))) ?

15:37 zenlike: what does it mean when things in a list start with a colon?

15:38 i.e. '(:a :b :dog)

15:38 do you know, yoklov?

15:38 antares_: hcumblerdale2: please see that test I linked to

15:38 zenlike: what the : means?

15:38 thanks

15:38 yoklov: zenlike: only saw "i.e. '(:a :b :dog)"

15:38 oh

15:38 the : is a keyword

15:38 err, makes the word after it

15:38 antares_: zenlike: they are keywords

15:38 zenlike: ?

15:39 I guess I just don't understand what makes : based keywords different from strings

15:39 yoklov: zenlike: http://clojure.org/data_structures#Data Structures-Keywords

15:39 zenlike: nice, thanks

15:39 yoklov: keywords work as functions

15:39 among other things, they're also interned

15:40 so they compare by pointer equality

15:40 so it's faster than iterating over the string and checking if each character is the same

15:40 llasram: kurtharriger: AH! Of course. You need to use one of the WriterOutputStream constructors which causes it to act unbuffered

15:40 yoklov: ,(:foo {:foo 3, :bar 7})

15:41 clojurebot: 3

15:41 llasram: kurtharriger: (System/setOut (java.io.PrintStream. (org.apache.commons.io.output.WriterOutputStream. *out* "UTF-8" 8192 true))) does it for me

15:41 Wild_Cat: ,("foo" {"foo" 3 "bar" 7})

15:41 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn>

15:41 kurtharriger: llasram: ah okay that makes sense!

15:41 Wild_Cat: aha.

15:42 kurtharriger: llasram: yep that works! thanks

15:42 yoklov: anyway, does anybody happen to know if you can change which version of cljs lein-cljsbuild is using?

15:42 zenlike: Another questions, why does

15:42 (= 2 1/2)

15:43 ,(= 2 1/2)

15:43 clojurebot: false

15:43 zenlike: hm.

15:43 yoklov: zenlike: use == for numbers

15:43 dnolen: yoklov: you can do that w/ the lein checkouts feature. make a checkouts directory - clone clojurescript into it. in your project.clj add :extra-classpath-dirs ["checkouts/clojurescript/src/clj"]

15:43 zenlike: ,(== 2 1/2)

15:43 clojurebot: false

15:43 zenlike: what is = used for?

15:43 yoklov: ,[(== 2 2.0), (= 2 2.0)]

15:43 clojurebot: [true false]

15:43 zenlike: and what is with the / construct, can you type fractions in clojure?

15:43 yoklov: dnolen: thanks

15:44 llasram: All of which actually does remind me -- is there a good way to hook in to get arbitrary code run when starting a swank session? The 'lein repl' init forms doen't seem to work :-/

15:44 (I mean, they work just fine for 'lein repl', just no effect on swank sessions)

15:45 kurtharriger: llasram: I couldn't figure out how to do that either

15:45 dnolen: yoklov: would be nice if there was a way to specify HEAD, revision, or release but all good time I imagine.

15:45 yoklov: zenlike: = is equality, but since 2.0 and 2 have different types they aren't equal. you can type (doc =) in the repl to find out more

15:45 dnolen: all in

15:46 zenlike: yoklov: thank you!

15:46 llasram: kurtharriger: Maybe there's a way to get SLIME to chuck some forms over whenever it connects

15:46 kurtharriger: My emacs lisp skills are even worse than my clojure skillz :)

15:48 yoklov: dnolen: okay, and after I do that lein-cljsbuild will use the version in checkouts/clojurescript?

15:48 llasram: OH well. A project for some other day :-)

15:49 dnolen: yoklov: yes

15:49 yoklov: going to try and build your code w/ master? :)

15:49 yoklov: yeah

15:50 i'm quite excited, based on what you said on the mailing list, it seems to be quite an improvement

15:50 antares_: hcumblerdale2: sorry, one more question. Can you point me to heroku's mongodb docs?

15:50 dnolen: yoklov: I'm curious if there's much of a speedup for apps in general - not sure there will be.

15:50 antares_: hcumblerdale2: I am trying to understand, do they also provide DB name in it? if so, we will pretty much have to use a separate function in monger (largely thanks to oddities in MongoDB Java driver APIs)

15:50 dnolen: yoklov: if you rely on the current maps and updating them and things like that - I think that overhead will continue to dominate.

15:51 hcumblerdale2: antares_: https://devcenter.heroku.com/articles/mongohq

15:51 antares_: hcumblerdale2: thank you!

15:51 :( DB db = mongoURI.connectDB();

15:51 why oh why a MongoURI class has a method named connectDB

15:51 yoklov: yeah, but i've been working on something lately where I avoided maps (as much as I could)

15:52 dnolen: yoklov: ah, interesting! Definitely want to know if you see any improvements.

15:59 hcumblerdale2: antares_: mongodb://heroku:5f53d4812373db562f934f4ac91c0b21@flame.mongohq.com:27034/app3883424

16:09 yoklov: Hm, nothing significant, actually. Slight speed boosts, but it was already running fine and they may just be in my head

16:10 dnolen: yoklov: yeah again - not very surprised. if you were already working around records I don't think you would see much of a difference.

16:11 yoklov: Most of my slowdown is accessing vectors

16:12 and just numerical computation.

16:12 dnolen: yoklov: yes it might be worth inlining some stuff around vectors - but I haven't looked at it too closely.

16:12 yoklov: numerical stuff should be very fast now - any low level JS stuff in general.

16:12 yoklov: yeah, this program runs quite quickly

16:13 which is one of the reasons i think the speed boosts might just be in my head

16:14 Though, the profiles look quite different.

16:14 dnolen: yoklov: how so?

16:15 yoklov: _truth isn't there anymore, for one, but generally it's functions i wrote or that i am certainly using, as opposed to before where there was a good amount of internal functions showing up in my profile

16:16 dnolen: yoklov: nice

16:16 yoklov: I don't think _truth was that expensive in regular code - but it was killer in stuff like PersistentVector

16:17 yoklov: Heh, no, but it was consistently showing up around 5% in my profiles

16:18 which was clearly not a huge issue, but it was ever-present

16:18 dnolen: yoklov: still, nice to hear your profiles are cleaned up.

16:18 yoklov: is this project visible smoewhere?

16:18 yoklov: definitely

16:19 goodieboy: can someone tell me how to set a custom mime-type using ring/compojure ?

16:19 can someone tell me how to set a custom mime-type using ring/compojure?

16:19 oops

16:20 weavejester: goodieboy: Do you mean associate a mime-type with an extension, or return a mime-type for a particular route?

16:20 samaaron: dnolen: I just wanted to say that you're doing some awesome work with cljs

16:20 goodieboy: weavejester: associate a type with an extension

16:21 mfex: dnolen: I second the thanks for your clojurescript work

16:21 dnolen: nice according to Lazlo 3X boost to persistent vectors pre-optimizations.

16:22 weavejester: goodieboy: I just realised this isn't in the docstrings, but you can use: (route/resources "/" {:mime-types {"foo" "application/foo"}})

16:22 And then any "*.foo" resource would have a content type of "application/foo"

16:22 dnolen: mfex: samaaron: thx! should really thank rhickey and relevance for putting together such a clean code base. Optimization pass was pretty simple.

16:22 goodieboy: weavejester: oh ok, i was attempting to use (wrap-file-info {:foo "bar"}) in my middleware

16:23 eggsby: weavejester: is it at all aware of /etc/mime.types ?

16:23 dsantiago: dnolen: You're making it hard for me to stick to my decision to use plain JS.

16:23 samaaron: dnolen: w.r.t. the clean cljs code base, I was kinda surprised to see that the clojure-py guys weren't using it

16:23 weavejester: goodieboy: wrap-file-info works a similar way. (wrap-file-info handler {"foo" "application/foo"})

16:24 eggsby: Nope

16:24 aperiodic: samaaron: did you check out that gist i $mailed you about quil and that java lib? have any idea what might be going on there?

16:24 yoklov: dnolen: its not at the point where it's up anywhere (not quite up to my standards of code i put on the internet), but it probably will be pretty soon.

16:24 weavejester: eggsby: But it includes mappings for most common mimetypes.

16:24 technomancy: weavejester: is there one for sexps? =)

16:24 gfredericks: what's the fastest way for me to turn a query string into a map?

16:24 dnolen: yoklov: cool, looking forward to taking a look.

16:24 goodieboy: weavejester: thanks!

16:24 gfredericks: (I'm using aleph)

16:25 weavejester: gfredericks: Use the wrap-params middleware

16:25 dnolen: dsantiago: once we have source mapping I think ClojureScript will be a "game changer" for client-side development.

16:25 gfredericks: weavejester: use the ring middleware for aleph?

16:25 weavejester: technomancy: One for sexps?

16:25 technomancy: weavejester: a mime type

16:25 dsantiago: dnolen: Yeah, the debugging story is actually the bigger sticking point.

16:26 weavejester: technomancy: Ohhh :)

16:26 dsantiago: But that seems to be moving very quickly too

16:26 weavejester: technomancy: Um, no.

16:26 dnolen: samaaron: I haven't followed clojure-py closely.

16:26 mfex: dnolen: how does the arity dispatch work without using arguments (for cljs-137)?

16:26 dnolen: mfex: the compiler stores seen fn information - if it finds a matching arity it calls it directly.

16:26 weavejester: gfredericks: Sure. If you want to do something asynchronous, the Ring 1.1.0 beta has form-decode

16:26 samaaron: aperiodic: no, sorry - when did you send the mail?

16:27 weavejester: gfredericks: Which will decode a query string without any middleware.

16:27 gfredericks: weavejester: cool, thanks

16:27 dnolen: dsantiago: yep, soon as 1.4.0 goes out the door planning on pushing to see the column preserving reader patch make it into 1.5.

16:27 samaaron: dnolen: from a super cursory look, it appears that they're taking a similar approach to the CLR port

16:27 dsantiago: dnolen: Could that also have benefits for regular clojure?

16:28 dnolen: dsantiago: definitely, right now we just line information. column information can give us a particular s-expression.

16:28 antares_: hcumblerdale2: lint.travis-ci.org https://github.com/michaelklishin/monger/blob/master/ChangeLog.md

16:28 technomancy: does this look good to you? lint.travis-ci.org https://github.com/michaelklishin/monger/blob/master/ChangeLog.md

16:28 dnolen: samaaron: clojure-py is targetting pypy right?

16:28 dsantiago: dnolen Sounds wonderful.

16:28 aperiodic: samaaron: it's lazybot $mail. sent it sunday evening, it should have msgd you about it once you spoke up in here (i thought)

16:28 antares_: hcumblerdale2: this stuff is already on clojars in 1.0.0-SNAPSHOT

16:28 aperiodic: samaaron: relevant gist is: https://gist.github.com/2341911

16:29 samaaron: dnolen: they're targettign the python VM (is that pypy?)

16:29 technomancy: antares_: looks reasonable

16:30 samaaron: dnolen: perhaps i'm way off mark, but it seems that the clojurescript approach was to start off with protocols at base and build up from there

16:30 dnolen: samaaron: that's the idea yes.

16:30 samaaron: rather than building on top of a whole bunch of interop

16:30 yeah, so I wonder why the clojure-py guys didn't do that

16:31 mfex: dnolen: nice and everything is in the clojure part of the compiler right? nothing as a compiler pass in the goog closure compiler?

16:31 samaaron: I would imagine that down the road, vanilla clojure will take a similar approach

16:31 hcumblerdale2: 1 required artifact is missing. com.novemberain:monger:jar:1.0.0-beta4

16:31 antares_: hcumblerdale2: beta4?

16:31 hcumblerdale2: beta3 is out, beta4 is not yet

16:31 you need to use 1.0.0-SNAPSHOT

16:32 hcumblerdale2: ahh ok

16:33 dnolen: mfex: all the optimizations are in the CLJS compiler - not goog closure.

16:33 samaaron: aperiodic: is this with Quil 1.0.0?

16:33 hcumblerdale2: I do not need setdb getdb ... with connect-via-uri! , right antares_ ?

16:34 dnolen: samaaron: so did thread locals give some perf boosts to Quil?

16:34 kurtharriger: llasram: this is what I came up with to run clojure after clojure-jack-in, not sure if its the best way but seems to work: https://gist.github.com/2354236

16:34 dnolen: samaaron: btw, pretty cool that Casey Reas tweeted Quil!

16:34 samaaron: dnolen: I think very minimal boosts to be honest

16:34 we're still running about 75% of standard Processing

16:35 hcumblerdale2: com.mongodb.CommandResult$CommandFailure: command failed [command failed [count] { "serverUsed" : "flame.mongohq.com:27034" , "assertion" : "unauthorized db:app3883424 lock type:-1 client:89.0.68.33" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}

16:35 samaaron: dnolen: prolly cos I emailed him ;-)

16:35 dnolen: samaaron: yeah, I think thread locals lose over passing the context around explicitly.

16:35 samaaron: ha!

16:35 aperiodic: samaaron: it's the snapshot, not the release. are they different?

16:35 ibdknox: dnolen: the cljs analyzer is so much nicer than the JVM clojure one!

16:35 antares_: hcumblerdale2: no, you don't need to use setdb or getdb, if database and credentials are in the URI, they will be used

16:35 dnolen: samaaron: but even 75% is pretty good!

16:35 samaaron: aperiodic: yeah, there are a few changes - try with the latest

16:35 dnolen: ibdknox: man, way dicer.

16:35 nicer

16:36 samaaron: dnolen: yeah, it's good enough for me

16:36 processing isn't about performance anyway

16:36 ibdknox: dnolen: do you know if there's a reason ambrose didn't start from that one with analyze?

16:36 dnolen: samaaron: and for most people I think. and yes processing isn't about perf, it's about usability.

16:36 samaaron: it's about getting runnign with graphic super easily

16:36 dnolen: ibdknox: ? he did as far as I know.

16:36 ibdknox: dnolen: seems like we could extract the analyzer out of the cljs codebase and have a very nice generic ast analyzer for all clojure impls

16:37 hcumblerdale2: Exception in thread "main" java.lang.RuntimeException: No such var: m/connect-via-uri!, compiling:(cblog/core.clj:12)

16:37 dnolen: ibdknox: yes ambrose started with cljs analyzer - but I know he'd made many changes for his own use case.

16:37 aperiodic: hah, i've spent far too much time making performance tweaks in processing

16:37 hcumblerdale2: antares_: heroku caches the .m2 repo. So I need a release to test it there

16:37 I can't delete ~/.m2.... cause it is on heroku ;(

16:37 aperiodic: i'm interested to see how some of my heavier processing sketches perform when ported over to quil

16:37 technomancy: hcumblerdale2: you can specify a numbered snapshot version

16:38 dnolen: aperiodic: heh, you can always use processing directly - or someone should do an "advanced" Quil.

16:38 hcumblerdale2: But then 1.0.0-beta4 isn't found

16:38 or what do you mean?

16:38 ibdknox: dnolen: hm CLJS is not a dependency of analyze and it isn't required in the core ns: https://github.com/frenchy64/analyze/blob/master/src/analyze/core.clj

16:39 dnolen: the output is also very different

16:39 aperiodic: dnolen: well, in processing, i often just use JOGL directly

16:39 hcumblerdale2: where can I get the number?

16:39 antares_: hcumblerdale2: ahhh

16:39 dnolen: ibdknox: he just copied out the file and made many changes to analyze Clojure - it's also what makes Typed Clojure work as far as I know.

16:40 ibdknox: ah

16:40 antares_: hcumblerdale2: hm, ok, I will issue beta4 now

16:40 samaaron: aperiodic: I'd *love* you to port some of your advanced processing sketches over to quil

16:40 we need more tyre kicking

16:41 aperiodic: oh, i'm planning to... but i also have five other projects, and i'm pretty lazy

16:41 samaaron: shape up the laziness!

16:41 aperiodic: i'm trying!

16:41 samaaron: otherwise I'll send Bigelow after you...

16:42 aperiodic: thankfully, you don't know where I live

16:42 dnolen: ibdknox: but I totally agree, an a la carte analyzer would be fantastic. People are going to town with stuff like Esprima in the JS world - no reason we should let them get ahead of us :)

16:42 samaaron: aperiodic: with Quil 1.0.0 you just need to (:use quil.core) - need to pull in applet stuff now

16:43 ibdknox: dnolen: there's a decent chance I'll end up doing that

16:43 samaaron: aperiodic: oh wait, you're doing funky stuff with the applet itself

16:43 dnolen: ibdknox: cool!

16:43 aperiodic: samaaron: well, the java library is doing some pretty funky stuff to the applet

16:44 so, yeah, that's why i'm pulling in the current-applet function

16:44 ibdknox: it shouldn't be hard to factor out of the cljs compiler

16:44 and I see a lot of value in it :)

16:44 samaaron: aperiodic: yeah, that might cause issues with the bindings we were using before

16:44 Zach shifted things over to thread locals

16:44 it's worth giving it a shot with that

16:45 aperiodic: cool, i'll give it a shot this evening and let you know how it goes

16:46 samaaron: aperiodic: please do :-)

16:46 dnolen: ibdknox: should be very easy to extract.

16:47 hcumblerdale2: antares_: It does not work: error message: Exception in thread "main" com.mongodb.CommandResult$CommandFailure: command failed [command failed [count] { "serverUsed" : "staff.mongohq.com:10008" , "assertion" : "unauthorized db:app3884761 lock type:-1 client:10.120.105.167" , "assertionCode" : 10057 , "errmsg" : "db assertion failure" , "ok" : 0.0}

16:54 ibdknox: dnolen: btw awesome work on the performance improvements!

16:54 dnolen: thanks for that work :)

16:54 dnolen: ibdknox: thx, have you had a chance to try it out?

16:55 antares_: hcumblerdale2: I am not sure I understand that error message

16:56 hcumblerdale2: if authentication fails, an IllegalArgumentException will be raised by monger itself

16:56 hcumblerdale2: http://groups.google.com/group/mongodb-user/browse_thread/thread/31f9e39129129b6b

16:56 ibdknox: dnolen: some, it's definitely a lot faster. I'll try some more extensive stuff over the next few days (just got back in town)

16:56 dnolen: ibdknox: good to hear

16:57 ibdknox: less indirection too, which is nice :)

16:57 emezeske_: dnolen: It seems like the direct function calls should make debugging a bit easier, too

16:58 dnolen: Stacktraces will be more readable, at least

16:58 Fullmoon: What's the name of the supposedly "better" (deadline, etc) repl?

16:59 llasram: kurtharriger: (delayed, but) Oh, nice. That's very easy

17:00 dnolen: emezeske_: yeah direct fn call was last mile for closing gap between handwritten JS and CLJS

17:02 emezeske_: dnolen: I'm excited to see less of "no method 'call' for undefined" and more of "some-func is not defined"

17:02 samaaron: dnolen: can you describe "direct fn call" in the context of cljs work?

17:02 dnolen: emezeske_: from here on out it's all chunked seqs, transients, pods, persistent data structures.

17:02 samaaron: I assume you've knocked out a bunch of indirection

17:02 dnolen: samaaron: fns in Clojure are objects, they implement invoke.

17:02 amalloy: samaaron: foo(1) instead of foo.call(null, 1), i think

17:02 emezeske_: dnolen: epic.

17:03 amalloy: for the cases when it's known at compile-time that you're calling a real js function and not some clojure protocol thingy

17:03 samaaron: oh, awesome

17:03 dnolen: samaaron: amalloy: because we want objects to be callable - we call everything the same way - this way an object with a .call property could also act as a function.

17:04 samaaron: dnolen: but as js has first class fns - you use them directly where possible?

17:04 dnolen: samaaron: problem is that's a perf hit on the really fast JS engines like V8. so if we know we have a real fn - just call directly.

17:04 samaaron: ah ok - so this makes sense mostly for interop stuff?

17:05 dnolen: samaaron: no all CLJS functions got faster

17:05 samaaron: or do we also compile down to real js fns too?

17:05 oh damn, nice :-)

17:05 dnolen: samaaron: CLJS just emits regular JS fns.

17:05 samaaron: we used to call them in a weird way - now we don't.

17:05 if we don't know the type - then use the .call convention

17:06 samaaron: righto - so you fall back to original behaviour

17:06 chouser: I haven't looked at your diffs yet, dnolen. Do we lose a bit of potential dynamism this way?

17:06 dnolen: chouser: only applies to top level fns.

17:07 chouser: as in (defn f [x] 5) (defn g [x] (f x)) (def f {1 6}) ... will (g 1) now return 5 or 6?

17:08 dnolen: chouser: 6

17:09 chouser: cool. how do you get g to switch to using f's .call ?

17:11 dnolen: chouser: oops I didn't read you're example closely enough. Yes, we do lose a bit of dynamism - switching between fns and objects.

17:12 chouser: I imagine it's totally worth it.

17:12 amalloy: dnolen: so does it still return 5, or actually cause an error?

17:13 dnolen: chouser: good catch tho - I hadn't thought about that. Easy enough to switch the behavior back if people find it to be an issue.

17:13 amalloy: error.

17:13 hcumblerdale2: mhh

17:13 amalloy: yeah. 5 would be a pretty surprising result

17:14 gfredericks: $findfn 5

17:14 lazybot: []

17:14 gfredericks: why don't we have any clojure functions that return 5

17:14 dnolen: chouser: the perf difference is nearly 2X - so it just depends on whether people are switching back and forth between objects and fns often.

17:16 hcumblerdale2: antares_: MongoHQ support Chris Winslett: For our standard deployment, we use 2.0.4

17:16 S11001001: hmm

17:16 $findfn nil

17:16 lazybot: [clojure.core/cond clojure.core/dosync clojure.core/import clojure.core/prn clojure.core/refer-clojure clojure.core/print clojure.core/with-loading-context clojure.core/newline clojure.core/comment clojure.core/or clojure.core/load clojure.core/shutdown-agents cloju... https://refheap.com/paste/1980

17:16 hcumblerdale2: mongo on linux console works as well,...

17:23 antares_: hcumblerdale2: is there a way for me try to this add-on w/o heroku billing me?

17:23 hcumblerdale2: yes antares_ I can give you my credentials

17:23 >> my credit card is registered

17:24 antares_: hcumblerdale2: hm, well, I'd prefer not having other people's credentials

17:24 hcumblerdale2: antares_: I can change it,... build a new heroku instance or so

17:27 dnolen: chouser: perhaps another option would be to only do that optimization under advanced compilation ...

17:29 hcumblerdale2: antares_: can you reproduce the problem?

17:32 antares_: hcumblerdale2: I can now

17:34 lpetit: dnolen: Could it be under an advanced "aggressive optimizations" flag ?

17:35 Which tools could decide to take on or off by default, but would be off out of the box?

17:35 dnolen: lpetit: advanced compilation is agressive - you cannot interactively develop against it.

17:35 lpetit: Indeed, but then it remains sememantically correct. Not certain with the one at hand.

17:37 dnolen: lpetit: what I mean is, the dynamism problem is only about interactive development. advanced compilation is all about whole program optimization.

17:39 lpetit: dnolen: I understand the high value for dynamism. But still, some programs could start to break if what chouser showed stays as is in the final code, for one reason or another

17:40 dnolen: lpetit: not sure how, in compiled code one version wins. the proper call will be emitted.

17:40 PPaul: anyone doing clojurescript here?

17:41 amalloy: ~anyone

17:41 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

17:41 PPaul: anyway, i notice that clojure is synchronous by design (prob because of jvm), is clojurescript async by design?

17:42 amalloy: technomancy: clojars frustrates me. apparently you have to scp the pom and the jar at the same time. i always forget the pom, and it silently accepts a jar but doesn't do anything with it. can we get it to complain if it gets just a jar, like it does if it gets just a pom?

17:42 technomancy: amalloy: probably, but if you were going to change that functionality you should just have it look in the jar for the pom

17:42 lpetit: dnolen: Are you sure?

17:43 dnolen: PPaul: not sure what you mean by async by design.

17:43 lpetit: sure about what?

17:43 technomancy: amalloy: I'm much more interested in replacing scp than fixing it

17:43 dnolen: that one version will win - yes.

17:43 yoklov: can anybody think of a more elegant way to do something like (for [i (range (count coll)), j (range j (count coll))].... do stuff with (coll i) and (coll j))

17:43 e.g. get each unique pair of elements in coll

17:44 lpetit: dnolen: So you can only have functions definitions as top level forms?

17:44 PPaul: in clojure, if i want a function to be async i use (future)... like when i talk with a server i can do so without a callback

17:45 dnolen: lpetit: in CLJS yes, there no support in CLJS at all for def'ing non top levels.

17:46 PPaul: in clojurescript, do functions block that talk with servers, like they do in clojure?

17:46 dnolen: PPaul: CLJS is emits lowest common denominator JS - so JS rules apply.

17:47 lpetit: dnolen: What will (defn f [] 1) (println (f 1)) (defn f [] 2) (println (f 2)) produce ?

17:47 amalloy: yoklov: you might enjoy some of the answers to http://www.4clojure.com/problem/103

17:47 PPaul: in that case, i guess clojurescript code that is async needs to be written differently from clojure code

17:47 dnolen: lpetit: 1 then 2.

17:49 chouser: PPaul: it's pretty hard to get javascript to block.

17:49 lpetit: dnolen: So why do you say chouser's example would behave differently in optimized and non optimized modes?

17:49 dnolen: lpetit: object vs. fn case

17:49 PPaul: i know it's hard, i'm a JS programmer

17:50 dnolen: lpetit: object calls look like, foo.call(...), fn calls look like, foo(...)

17:50 lpetit: so if you switch between those two at the REPL w/ the current optimization you'll get errors.

17:50 chouser: I said two true things here today. I should stop while I'm ahead.

17:51 lpetit: He

17:51 PPaul: has anyone here used clojurescript with backbone or some JS/non-JS mvc?

17:52 i would like to know about the experience of doing so

17:52 eggsby: PPaul: as I understand it that'd be redundant

17:52 PPaul: it would be?

17:52 please enlighten me

17:52 lpetit: Dnolen: so in the optimized mode, both would still be compiled differently (clojurescript compilation happens before closure advanced minifier), and you'll also have the problem in production

17:53 eggsby: PPaul: since cljs uses google closure it'd make more sense to structure your app in terms of closure, rather than including jQuery and backbone/underscore as well

17:53 dnolen: lpetit: nope. the next definition side effects the type.

17:53 samaaron: dnolen: lpetit sounds like we need a test for this

17:53 PPaul: but i don't know closure

17:53 i know backbone

17:54 though, clojurescript may have something similar

17:54 do you have some examples of setting up something like a tiny 1page app?

17:54 dnolen: PPaul: you can use BackBone, but expect BB.js payload plus at least 30K from CLJS.

17:55 PPaul: dnolen, that's tiny

17:55 my JS apps are fucking huge now

17:55 like, over 1 meg

17:55 eggsby: PPaul: https://github.com/addyosmani/todomvc/tree/master/architecture-examples/closure

17:55 PPaul: :D

17:55 thanks

17:55 dnolen: PPaul: yeah, CLJS prevents big apps from getting bloated. GClosure is pretty awesome about that.

17:55 hcumblerdale2: http://furious-fog-1667.herokuapp.com/

17:55 it's running now :)

17:55 eggsby: PPaul: live version of that closure project: http://addyosmani.github.com/todomvc/architecture-examples/closure/index.html

17:56 PPaul: does clojurescript inforce immutability too?

17:56 dnolen: PPaul: there's no hard enforcement like there is on the JVM via final. But it's effectively immutable by default.

17:57 PPaul: awesome

17:58 eggsby: PPaul: i'm trying to figure out whether I want to leave coffeescript/backbone for cljs/closure myself

17:58 closure just seems to have so much boilerplate

17:59 dnolen: lpetit: actually I do see what you mean. Yes, if we hit one def, references to it will be compiled one way. If later down the line you redef in the same source file, other code will be compiled differently.

18:00 PPaul: i do JS/backbone... i'm getting really good with backbone, which means i'm running into the limits of backbone a lot :(

18:00 i also miss clojure

18:01 underscore is not even close to a replacement :(

18:02 i'm looking at some clojurescript MVCs, https://github.com/ibdknox/pinot/blob/master/examples/todo.cljs (pinot) pretty tiny todo example

18:04 dnolen: lpetit: I kind of like the idea of warning when switching a top level def from fn to anything else.

18:04 eggsby: ya pinot looks nice PPaul

18:05 hcumblerdale2: If anyone is willing to help by reviewing sourcecode or building stuff, you are welcome: https://github.com/kremers/cblog

18:05 dnolen: PPaul: A while's off, but I'm really looking forward to some Datomic in CLJS

18:05 eggsby: heh

18:06 do you think datomic will ever be packaged w/ clojure

18:06 PPaul: i'm still not sure what datomic is trying to be

18:06 eggsby: it's clojures datastore :p

18:06 PPaul: is it relational/doc/graph/something else?

18:06 dnolen: eggsby: well rhickey has mentioned they're close to exposing indexes - so you could consume those via core.logic on the server or more interestingly on clients.

18:06 PPaul: is it pure clojure?

18:07 i can put clojure types in it?

18:07 like a set?

18:07 dnolen: PPaul: the site is pretty informative.

18:07 PPaul: ^_^

18:07 eggsby: dnolen: I haven't read the reasoned schemer and I'm not even familiar with constraint/logic based programming, but what could it offer in the clientside world?

18:07 dnolen: eggsby: sensible queries.

18:08 eggsby: I saw the talk where they demo'd minikanren on chez scheme which looked insanely powerful, but how could that crunching be simpl-- oh

18:09 PPaul: http://datomic.com doesn't tell me much

18:09 dnolen: PPaul: whitepaper + videos + try it out.

18:09 PPaul: videos!Q

18:09 i love videos

18:10 eggsby: PPaul: you can watch rhickeys interview about it

18:10 lpetit: dnolen: But is it the only problem? What will (def a 1) (defn f[] a) (def a 2) (defn g [] a) (f) (g) produce before and after your optimization?

18:10 eggsby: but he's got a talk too that should be popping up sometime soon

18:11 dnolen: lpetit: 2 2.

18:12 lpetit: just like Clojure on the JVM.

18:12 lpetit: dnolen: Oh yeah sorry, your optimization is for fans only, bad example

18:12 S/fans/fns/

18:12 dnolen: lpetit: and only if you're *switching* between *objects* and *fn*

18:12 so we'd warn on that.

18:13 lpetit: dnolen: Ok understood

18:14 dnolen: lpetit: but yes, excellent observation.

18:15 lpetit: dnolen: noob question now: does it change somerhing if f is a dynamic var which is rebound?

18:17 dnolen: lpetit: probably a good argument for making ^:dynamic a requirement in CLJS

18:18 lpetit: dnolen: On

18:18 hiredman: dnolen: ^:dynamic as a requirement for being able to re-def things?

18:19 dnolen: hiredman: no for using something w/ binding.

18:19 lpetit: s/on/ok (damn spell checker)

18:20 dnolen: if someone dynamic binds a fn to an object you'll run into trouble. so if a var is declared dynamic we won't optimize it.

19:29 konr: Any idea on how the GSoC selection process is taking place? No comments on my proposal so far :(

19:30 yoklov: same

19:32 aperiodic: when i did it, it was pretty opaque

19:32 submitted a proposal, got an acceptance email a week or two later; didn't hear anything in between

19:33 but that might be a function of the organization

19:34 yoklov: yeah i figured

19:34 (but i also figured if someone else was asking i'd ask too)

19:59 cjfrisz: Just discovered M-. in Clojure Emacs mode pulling up the definition of the expression at the point.

19:59 Definitely a "Whoa..." moment.

20:02 PPaul: datomic is sorta hard to understand

20:11 gfredericks: is there any reason `lein run` would hang when run as root?

20:11 nm I didn't read

20:12 technomancy: the trojan plugin you accidentally installed is busy erasing your filesystem

20:12 * gfredericks writes "I will never doubt phil again" 1000 times on the chalkboard

20:13 autodidakt: cemerick: just bought the book. normally 30$, on sale for 17, -40% coupon code for new users, $11 :)

20:14 sattvik: konr, yoklov: You'll find out if you're accepted when Google notifies you. It's going to be tough. Clojure, as a new org, will most likely only get to have 1 or 2 students.

20:15 konr: sattvik: crossing my fingers ;)

20:16 autodidakt: Just in case I haven't spammed everyone already -> Every should buy Clojure Programming [http://shop.oreilly.com/product/0636920013754.do]

20:17 recently released, by Chas Emerick, Brian Carper, Christophe Grand

20:17 * gfredericks thinks "Clogramming in Projure"

20:18 autodidakt: book description at [http://www.clojurebook.com/]. it's geared towards people coming from Java/ruby/python

20:18 gfredericks: Projamming Clolog

20:19 gfredericks: I can't argue with that

20:22 guns: I'm confused about the readline integration in nrepl. Some (not all) my keybindings from ~/.inputrc work in `lein2 repl`

20:22 and my multibye macros display incorrectly, but are correctly parsed

20:22 where can I investigate this? tools.nrepl and leiningen don't mention the GNU readline lib

20:23 technomancy: guns: it uses jline2 rather than readline

20:23 guns: technomancy: jline reads ~/.inputrc?

20:24 technomancy: guns: I think it honors some subset of it? not sure

20:24 cemerick: autodidakt: good timing! :-D

20:24 guns: technomancy: I see. It's frustratingly close to what I like in readline

20:24 ty

20:30 Frozenlock: I exported a file with newlines in it "\n", but don't see them when I open it in notepad. Is it because of the different newline for linux/windows?

20:32 langmartin: Frozenlock: that's pretty likely

20:38 emezeske_: Frozenlock: I think windows likes \r\n

20:38 Frozenlock: Yup, that was it. I added "\r" before and now everything is fine.

20:38 emezeske_: Thanks :p

20:38 I just hope my functions won't choke on it when the time comes to read the file back...

21:04 gfredericks: is clj-http 0.2.3 not configurable to not process cookies?

21:06 muhoo: i'm pretty sure it's based on apache http libraries

21:06 dakrone: gfredericks: define "process cookies"?

21:07 gfredericks: dakrone: using the clj-http.cookies/wrap-cookies function

21:07 I'd like to turn that off

21:07 can upgrade clj-http if that helps

21:07 I'm using the clj-http.client/request method, so maybe I'm using the wrong interface?

21:07 dakrone: gfredericks: well, upgrading is always nice :) but you could also take a look at clj-http.client/request, and wrap it with your own stuff

21:08 gfredericks: maybe I'm wrong about what I'm using

21:08 * gfredericks checks

21:08 dakrone: I mean clj-http.core/request

21:08 is the basic one, no addons

21:08 then you can define your own like clj-http.client/request does

21:08 gfredericks: okay, I'll go it that way; not too hard. thanks

21:08 dakrone: np

21:08 gfredericks: do it that way also

21:10 dakrone: gfredericks: but upgrade also if you can :)

21:14 gfredericks: dakrone: of course

21:23 dgrnbrg: ,(str "foo" "\n" "bar")

21:23 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>

21:23 y3di: oh man this is the best: http://imgs.xkcd.com/comics/lisp.jpg

21:23 dgrnbrg: why does str escape the \n?

21:24 gfredericks: &(str "foo" "\n" "bar")

21:24 lazybot: ⇒ "foo\nbar"

21:25 gfredericks: dgrnbrg: that's the string being printed; there's a real newline in that string

21:25 dgrnbrg: try (println (str "foo" "\n" "bar"))

21:25 dgrnbrg: gfredericks: oh, i see, thanks!

21:26 gfredericks: also interesting is ##(seq (str "foo" "\n" "bar"))

21:26 lazybot: ⇒ (\f \o \o \newline \b \a \r)

21:27 dgrnbrg: I know about that one

21:27 I didn't realize that it was printing readable strs

21:27 gfredericks: I guess newlines themselves are readable too....

21:28 dgrnbrg: that's what most other languages I know print

21:28 but this is good too

21:28 I just needed to know

21:28 I have been mostly doing symbolic manipulation in clojure

21:28 but now i'm writing a code generator that spits out asm

21:29 (not dcpu16)

21:32 Frozenlock: I think I broke something.... When I try seesaw, I get this error:

21:32 java/awt/Window$Type

21:32 [Thrown class java.lang.NoClassDefFoundError]

21:32 But I know it works, I have already used it earlier this week...

21:32 Any idea on what I might have done?

21:35 hobbyist: Anyone happy to tell the difference between pr-str, prn-str and print-str?

21:35 gfredericks: there are 8 print functions

21:36 based on 3 properties

21:36 the -str ones return a string instead of printing to *out*

21:36 the ones with an extra 'n' in the name include a newline

21:36 and the ones with 'pr' instead of 'print' will print readably

21:36 aperiodic: (inc gfredericks)

21:37 is that in the docs somewhere? i've never seen that explanation before, unfortunately

21:37 hobbyist: much obliged

21:37 gfredericks: no idea

21:37 I'm not even 100% sure that all 8 combinations exist

21:38 ,[pr prn print println pr-str prn-str print-str println-str]

21:38 clojurebot: [#<core$pr clojure.core$pr@2638d0> #<core$prn clojure.core$prn@11dc32c> #<core$print clojure.core$print@520fa4> #<core$println clojure.core$println@116d7bd> #<core$pr_str clojure.core$pr_str@4dd658> ...]

21:38 gfredericks: guess so

21:46 &(for [base ["pr" "print"], mod ["" (if (= "pr" base) "n" "ln")], str ["" "-str"]] (str base mod str))

21:46 lazybot: java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn

21:47 gfredericks: &(for [base ["pr" "print"], mod ["" (if (= "pr" base) "n" "ln")], str ["" "-str"]] (clojure.core/str base mod str))

21:47 lazybot: ⇒ ("pr" "pr-str" "prn" "prn-str" "print" "print-str" "println" "println-str")

21:50 ivan: writing Python code where things are "almost" values is pretty horrible after learning some Clojure

21:52 guns: and the commas. So many commas

21:52 gfredericks: ,,,,,,,,,:foo,,,,,,,,,,

21:52 clojurebot: :foo

21:54 ivan: guns: yes, that also makes me go a little crazy

21:54 funny how it never bothers you until you are unshackled

21:55 guns: it's pretty superficial, but now my ruby keeps turning up with syntax errors

21:55 gfredericks: guns: how bout all them hash rockets?

21:55 guns: lol. I have that bound to a key anyway

21:56 gfredericks: {:foo => "bar", :baz => "bang"} --> {:foo "bar" :baz "bang"}

21:56 ivan: big_list = [['stuff', 'stuff']

21:56 ['more', 'stuff']]

21:56 gfredericks: it's kinda crazy when you see them side by side

21:56 ivan: what happen!?

21:57 autodidakto: gfredericks: you mean foo: "bar", baz: "bang"

21:57 gfredericks: autodidakto: in ruby or clojure?

21:57 ivan: dict(foo="bar", baz="bang") is almost tolerable

21:57 guns: I hate the 1.9 hash syntax

21:57 autodidakto: gfredericks: oh sorry. i got confused, i thought you were comparing 1.8 to 1.9

21:58 gfredericks: if you have a problem, the answer is always more syntax

21:58 guns: that's the ruby way for sure

21:58 autodidakto: blame perl :)

21:58 guns: I like the perlisms actually

21:59 %w[foo bar baz] # no commas

21:59 autodidakto: i agree. if you're gonna have syntax, ruby's aint bad.. it's the inconsistancies mostly

22:00 guns: but no way to do common less hashes, directly..

22:00 guns: If ruby had persistent data structures, I might not have made it to clojure

22:00 but the pervasive mutability is a real headache in larger apps

22:01 ivan: but my 200 line script works fine and I have no idea what you are talking about lalala

22:01 (it does bother me that no one seems to have the problems I have in the Python world)

22:01 autodidakto: guns: if you're gonna have a mixed language, you could find worse things than Lisp + Perl + Smalltalk

22:02 guns: Well, wn retrospect, python has a lot more discipline than ruby

22:03 autodidakto: guns: and that always frustrated me... I want the no-holds-barred of ruby, but not the "wth is this?" that comes along with it

22:03 alex_baranosky: immutability at the language level just eliminates an entire level of comlexity

22:03 * ivan wonders if implementing protocols in ClojureScript -> Ruby would be easier than -> Python since you can stick methods on anything (right?)

22:03 alex_baranosky: I find it makes reading the code so much more effortless

22:04 autodidakto: alex_baranosky: we agree of course :)

22:04 alex_baranosky: reading most other languages I always need to set aside a portion of my brain for what-ifs and mutability gotchas

22:05 autodidakto: and how much you gotta keep... no, juggle, in your head

22:05 alex_baranosky: also Clojure's regular syntax is so comforting

22:05 autodidakto: maybe plate spinning is a better metaphor...

22:05 alex_baranosky: my goodness -- if you do a lot of SCala you'll know what I mean

22:05 gfredericks: and most of the metaprogramming happens once at compile-time

22:06 alex_baranosky: and the metaprogramming is immutable metaprogramming

22:06 * gfredericks pretends he knows what that means exactly

22:06 alex_baranosky: meaning it is just functions that run... at compile time (macros)

22:06 guns: yeah, localized monkey patches were rejected for ruby 2.0

22:07 gfredericks: they were?

22:07 guns: would've been a great step

22:07 gfredericks: I forgot what those were called

22:07 guns: matz said too slow

22:07 refinements

22:07 gfredericks: ah right

22:07 guns: ?

22:07 alex_baranosky: what a great way to take the path most often taken

22:07 guns: haha

22:07 wkmanire: Howdy folks.

22:08 autodidakto: wkmanire: howdy pa'ner

22:09 alex_baranosky: howdy wkmanire

22:09 what's new?

22:09 wkmanire: I'm reading through the information available on the website.

22:09 alex_baranosky: I'm bored

22:09 wkmanire: I was referred to clojure by somebody in Python.

22:09 gfredericks: alex_baranosky: work on reconstitutible lazy seqs

22:09 wkmanire: #python

22:09 bleh

22:10 alex_baranosky: re-what-able ?

22:10 wkmanire: I'm going to have a whole bunch of newb questions.

22:10 alex_baranosky: I'm in a non-programming mood

22:10 gfredericks: oh definitely never mind then

22:10 alex_baranosky: this is a pretty good spot for noob Q's

22:11 gfredericks: my last comment was to alex_baranosky not wkmanire

22:11 wkmanire: I'm a strictly imperative programmer and have done my work almost exclusively using OOP.

22:11 But... I want to learn functional programming.

22:11 guns: <applause>

22:11 wkmanire: Does clojure have a web developement framework?

22:11 alex_baranosky: wkmanire, Clojure is amazing -- that's all you need to know :)

22:11 autodidakto: Short answer, yes

22:12 gfredericks: clojure on clails

22:12 autodidakto: Long answer, yes but better

22:12 alex_baranosky: it has multiple web libraries

22:12 guns: gfredericks: lol

22:12 wkmanire: gfredericks: I hope that was a joke.

22:12 :D

22:12 gfredericks: I hope so too, I haven't googled yet

22:12 guns: clojure libs do tend to have awkward names

22:12 alex_baranosky: Clojure on Clams ?

22:12 Clojure on Classic Cars?

22:12 autodidakto: guns: everybody loves their puns. we're still not as bad as ruby though

22:12 gfredericks: I spent a lot of effort at the first conj trying to come up with an interesting name

22:13 wkmanire: I see that you can target javascript with clojure too.

22:13 So, as a webdev that is pretty interesting to me.

22:13 guns: god I'm still laughing

22:13 autodidakto: wkmanire: very much so. same language both server and client... and *not* js

22:16 wkmanire: A seq is essentially a cons cell correct?

22:16 amalloy: no

22:17 autodidakto: wkmanire: what do you know about lisp?

22:17 wkmanire: autodidakto: I do most of my hacking with emacs. So I've hacked a bit of elisp.

22:17 autodidakto: Don't take that seriously.

22:17 autodidakto: wkmanire: what's great about seqs is that they are an abstraction.

22:18 wkmanire: autodidakto: That's what I'm reading.

22:18 autodidakto: cons are... uhm... real things... anything that conforms to first/rest/i-forget can be a seq

22:18 however they may be implemented

22:18 conforms to = understands/implements

22:19 wkmanire: The article http://clojure.org/functional_programming here states that seq is an interface defining a thing which has first and rest.

22:19 autodidakto: ugh, im tripping all over my myself... *whatever they're implementation details, as long as they understand first/rest/something

22:19 *their... man i need sleep...

22:20 wkmanire: right right, so, that's one example of clojures... new lispy power modern power

22:20 alex_baranosky: wkmanire, lots of interfaces in Clojure under the hood

22:20 there's a whole lot of Java going on down there

22:20 autodidakto: wkmanire: are you coming from java?

22:20 wkmanire: ruby? perl? fortran? Sassl?!

22:21 gfredericks: quick someone add an even more ridiculous example

22:21 aperiodic: forth!

22:21 wkmanire: autodidakto: I've been living in Brazil for the last two months. My English are not too good right now also too.

22:21 autodidakto: aperiodic: respect the concatenation

22:21 xeqi: dcpu16?

22:21 wkmanire: autodidakto: I make my living with .Net. I hack a lot of python and Javascript.

22:22 I'm trying to make my escape from the windows platform.

22:22 autodidakto: wkmanire: gotcha

22:22 wkmanire: Also, trying to hold back on my questions until I've read up on at least the basics of Clojure.

22:23 autodidakto: wkmanire: philosophical questions are fine. but as for the beginner tutorial stuff, there are good resources

22:23 wkmanire: Immediately I'm thinking things like, how do you keep down on namespace complexity when you are constantly making functions.

22:23 How does the stack not get eaten' alive by recursion.

22:23 autodidakto: wkmanire: tryclj.com can be your repl for now, too

22:23 alex_baranosky: loop recur

22:23 or just plain recur

22:23 autodidakto: wkmanire: namespaces :)

22:24 wkmanire: 100 functions one data structure?

22:24 owie.

22:24 alex_baranosky: more like POW!

22:24 autodidakto: no no. 100 functions, whatever you're data structure

22:24 alex_baranosky: BAM

22:24 autodidakto: *turns on 70s batman music*

22:24 alex_baranosky: Clojure leans heavily on seqs and maps

22:24 wkmanire: ooh, thanks for the live REPL.

22:24 autodidakto: alex_baranosky: jimmy jillikers baranosky! the OOP joker is at again!

22:24 alex_baranosky: so the core library functions become used very heavily

22:25 wkmanire: Very convenient.

22:25 I hope this site is written with clojure both client and server.

22:25 autodidakto: wkmanire: it's on github :)

22:25 wkmanire: Nope, client is using jquery. very old jquery.

22:26 gfredericks: we clojure developers only use the most vintage of jay queries

22:27 wkmanire: New jQueries are generally better. They haven't added that much functionality but they keep improving the internal code.

22:27 technomancy: wkmanire: the main difference between seqs and cons cells is that cons cells allow for "improper lists" (dotted pairs) while seqs always have either a seq or nil in their cdr

22:27 wkmanire: I believe Resig is a functional programming fan too.,

22:27 technomancy: Lost me with dotted pairs.

22:27 technomancy: wkmanire: you can call (cons 1 2) that has 2 as the cdr

22:28 that's not legal in clojure

22:28 you'd just use a vector for that

22:28 amalloy: wkmanire: a cons cell is typically a "pair" of any two things. when the second thing is also a cons cell, lispers interpret that as a list. clojure doesn't have cons cells, it has seqs

22:28 wkmanire: I see.

22:28 Because 2 is not a seq, that is invalid.

22:28 understood.

22:28 So how is (cons 1 2) represented?

22:29 (1 (2 nil))?

22:29 gfredericks: (cons 1 (cons 2 nil))

22:29 wait I don't know what we're talking about

22:29 * gfredericks goes back to what he was doing

22:29 wkmanire: pardon my crappy syntax, but I think I was more or less correct.

22:29 he he he

22:30 Well, this looks like this is going to be fun. I'm going to force myself to finish reading this website and actually hack a little clojure. I'll write down my questions and come back with the ones I can't answer on my own.

22:30 Thanks for the support folks.

22:31 guns: gl hf

22:31 autodidakto: ,(apply str (interpose "!" ["all" "your" "jays" "are" "belong" "to" "us"]))

22:31 Frozenlock: Noir users: I want to provide a link to download a file generated on the fly. Is there a function for this? I think I need (((noir.request/ring-request) :headers) "application/octet-stream"), but that's a far as I got :(

22:31 clojurebot: "all!your!jays!are!belong!to!us"

22:31 autodidakto: wkmanire: -> http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Rich-Hickey-and-Brian-Beckman-Inside-Clojure/

22:32 wkmanire: autodidakto: Sweet. That will be video number 2 on my list.

22:32 autodidakto: A fella in #python linked me this http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey

22:33 guns: wkmanire: This is the Hickey talk that pulled me in:

22:33 http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey

22:34 wkmanire: I have a feeling I'm going to spend a lot of time reading what this guy wrote and listening to him talk.

22:34 ivan: so, who's gonna port Meteor to ClojureScript? ;)

22:34 autodidakto: wkmanire: also, now is the time to buy cemerick's Clojure Programming -> "http://www.clojurebook.com/&quot; ... just came out, 50% sale, + 40% off with coupon code :)

22:34 wkmanire: Does he ever frequent the channel?

22:34 autodidakto: Going to be hard to get in Brazil.

22:34 I hope I can get it on my kindle.

22:34 autodidakto: wkmanire: You'll notice the clojurians are more philosophical than average, as well

22:35 wkmanire: PDF/Mobi/Epub/Daisy

22:35 you don't even need eyes (with Diasy format), hehe

22:35 wkmanire: rhickey is usually too busy being awesome, but yes he comes in... was doing a poll about naming an new function...

22:35 $seen rhickey

22:35 lazybot: rhickey was last seen joining on clojure 1 day and 14 hours ago.

22:36 wkmanire: Seems like a pretty fart smeller.

22:36 * offby1 slaps wkmanire upside the haid

22:36 wkmanire: he he he

22:37 offby1: I cannot believe I've never heard that before, but ... there you are

22:37 autodidakto: offby1: must be brazilian thing

22:37 wkmanire: I'm a gringo.

22:37 I'm just living here.

22:37 Home is Las Vegas, Nevada.

22:38 gfredericks: oh goodness I think I've somehow misused core.match again

22:38 chrisr: How do I test if two records in vars x and y are of the same type? I have tried (def x (Foo. :a)) (def y (Foo. :b)) then (= (type x) (type y)) => nil

22:39 autodidakto: 2 months in brazil and it's already ruined your english, you said?

22:40 gfredericks: chrisr: gives true for me

22:41 wkmanire: autodidakto: I was here for a month between december and January too. I just don't speak English while I'm here.

22:41 Only with my fellow irc patrons.

22:41 autodidakto: I'm looking forward to learning Clojure though.

22:41 Looks like a fun language to speak.

22:42 autodidakto: wkmanire: cool. I know how it is.... Yeah. enjoy.

22:44 wkmanire: Ahhh, that answers my question.

22:44 About stack space.

22:45 tail call optimization.

22:45 chrisr: gfredericks: oooops I had redefined = in that namespace

22:45 autodidakto: wkmanire: it's either not an issue (usually isn't) or tail call optimized (converted to something like an imperative loop)

22:52 wkmanire: autodidakto: http://clojure.org/runtime_polymorphism

22:52 this article is attempting to sell me that multifunctions are a form of polymorphism

22:52 and the example sort of behaves like a class and its member functions.

22:53 But I'm really just seeing function overloading.

22:53 Am I missing something?

22:53 Pardon my grammar, I know these imperative terms really don't apply for the most part.

22:54 emezeske_: wkmanire: Function overloading == a form of polymorphism

22:54 gfredericks: multimethods let you use a type hierarchy as well

22:54 cemerick: wkmanire: the point is that multimethods can dispatch on arbitrary values, not just the class of the first argument.

22:55 wkmanire: So encounter takes anything which is a :Species then the "submethods" define what happens when various species meet.

22:55 is that correct?

22:55 Rather, encounter takes two things which are :Species

22:56 cemerick: it takes two things which have :Species entries

22:56 wkmanire: cemerick: Yes, please correct my grammar. I really want to know how form my questions correctly.

22:56 cemerick: That's not a class, it's just a key in the example maps.

22:57 wkmanire: So what happens if encounter is called and passed two things which haven't been specified with defmethod?

22:57 autodidakto: wkmanire: :default

22:57 cemerick: for which there is no method defined, therefore an error is raised

22:58 wkmanire: Got it.

22:58 Are those entries defined "on the fly"?

22:58 autodidakto: wkmanire: so you're used to polymorphism based on class, or based on number of argumends... in clojure, you based it on the result of a given function... that is, _anything you want_

22:58 wkmanire: That is :Species began to exist because of its usage in the definiton of encounter?

22:59 cemerick: wkmanire: no, it's just a key; no special initialization or anything

22:59 chrisr: this video was helpful to me regarding protocols and multimethods, http://www.infoq.com/presentations/Clojure-Expression-Problem

22:59 autodidakto: see the "(fn [x y] [(:Species x) (:Species y)])" ? that's the function that... prepares (my words), the, uhm, dispatch

23:00 cemerick: autodidakto: called a dispatch function :-)

23:00 autodidakto: it in this case, it pulls out the species key of the x hash, and the same with y... the defmetho

23:00 one of the defmethods is going to catch the return value of that function

23:00 wkmanire: duck typing.

23:01 autodidakto: but not just "do you respond to this?"

23:01 cemerick: wkmanire: no, that's based on methods that are called on objects

23:01 multimethods exist entirely separate from the values they are applied to

23:02 autodidakto: if could easily have been :species of x + the string "heck yah!", and the right defmethod would be called

23:02 wkmanire: cemerick: I think I understand you but don't bother to clarify that just yet. I'm probably not ready for the answer.

23:02 mutinyonthebay: I've noticed that a lot of the features of the meteor framework just released (real-time updating from code changes, server-client code sharing, etc.) seems very reminiscent of clojurescript... is it theoretically possible to run one in the context of the other?

23:03 autodidakto: wkmanire: the bigger theme is this -> there are a lot of aspects to OOP... clojure doesn't entirely reject them... it just applies them a la carte

23:03 you asked about namespaces, about polymorphism... we use them too, but we don't smash it all together like sitting on your sandwich

23:04 wkmanire: sitting on your sandwhich?

23:04 autodidakto: lol i dunno i just made that up

23:04 cemerick: wkmanire: Perhaps. :-) Consider: you could define a multimethod whose dispatch values vary depending on the time of day.

23:04 wkmanire: sandwich*

23:04 I'm used to Namespace -> Class -> one of N different things

23:04 Or, Module -> Class or Variable Or Function

23:04 cemerick: Protocols are more aligned with that kind of classification.

23:05 wkmanire: Or in the case of Javascript, Everything -> Everything -> Everything -> loop

23:05 :D

23:05 autodidakto: But if you're worried about php style "everything called from anywhere". dont worry, we use namespaces

23:05 wkmanire: cemerick: Now thats interesting

23:06 cemerick: So you could schedule different behaviors appropriately to the clock.

23:07 autodidakto: wkmanire: you could do anything you want :)

23:07 cemerick: wkmanire: sure, or the current size of a queue, or a characteristic of the *last* set of arguments to the multimethod, or…

23:07 wkmanire: autodidakto: At zombo.com

23:08 xumingmingv: can we do a step-by-step in clojure like what we do in java using eclipse?

23:09 can we do a step-by-step debug in clojure like what we do in java using eclipse?

23:09 wkmanire: Going to be AFK a bit.

23:10 cemerick: xumingmingv: yes, debugging in eclipse (as long as you have counterclockwise installed) works pretty well; it's a little rougher around the edges still, but stepping works.

23:10 autodidakto: *grumbles something about CL/Shen/Smalltalk debuggers*

23:11 chrisr: shen has a good debugger?

23:11 or you mean that CL/smalltalk dont?

23:11 yoklov: smalltalk has an amazing one

23:11 autodidakto: shen has a CL style debugger

23:11 yoklov: from what i've heard

23:12 autodidakto: smalltalk is the best they say, yeah

23:14 chrisr: i have been meaning to try to shen clojure port for awhile now, just no time

23:15 amalloy: stepping debuggers are a little less obvious in a pure language, since most of what you use a debugger for (in my experience) was checking out what the state of the program was when running code X

23:15 i'd definitely like a better one for clojure though; i never got ritz to work

23:15 autodidakto: chrisr: i think it's still a little rough is my guess. might as well just play with shen :)

23:15 TimMc: amalloy: As long as it can inspect return values, it gets my vote.

23:16 gfredericks: um. hello. alert anybody?

23:16 ferd: I'll give an informal Clojure training to my team mates ("brown-bag" session)... Ideas to awe to audience?

23:16 xumingmingv: cemerick thanks, but if i remember it correctly, counterclockwise is very slow

23:16 autodidakto: chrisr: i think of shen as if clojure had said "screw the jvm, open source, and hey haskell is pretty cool"

23:16 xumingmingv: i am using emacs for now

23:17 hugod: amalloy: sorry to here that - lein-ritz is getting easier to set up (with lein2)

23:17 amalloy: hugod: the only time i tried was in the early days; it's hard to fault you for it

23:17 autodidakto: amalloy: TimMc: agreed. A debugger/inspector/whatever makes things smooth

23:17 chrisr: autodidakto: thats somewhat my impression, however it seems to lack greatly in anything concurrent

23:17 ivan: ferd: sit back and let Hickey do the explaining

23:17 autodidakto: hugod: link :)

23:17 ferd: my idea is to show a few basic concepts, and then jump into small cool things to "entice" people to look further

23:17 ivan: #-)

23:17 amalloy: but in so doing i messed up my existing swank setup and now i'm afraid to try again

23:18 cemerick: xumingmingv: really? I use it all day.

23:18 hugod: autodidakto: https://github.com/pallet/ritz

23:18 cemerick: You might want to give it another shot, in any cause.

23:18 s/cause/case

23:18 autodidakto: "The whole language available to you, all the time"... Except when you're debugging. Put printf statements.."

23:18 ferd: my objective is to spark interest in Clojure... not to "teach" it (you cannot teach any language in 1hr)

23:19 cemerick: autodidakto: not true; there's the debug-repl

23:19 We're hoping to get it into counterclockwise soon…

23:20 autodidakto: cemerick: Awesome. I got some projects to check it then.

23:20 cemerick: Got your book in virtual desktop 12 btw. Just finished the preface and i'm already blown away.

23:21 cemerick: Well, I'm glad the preface is so good. ;-)

23:24 actually, I'm surprised anyone reads the preface to begin with!

23:24 mutinyonthebay: I read the preface. Breathtaking.

23:24 autodidakto: I think it gives a feeling of what's to come

23:24 mutinyonthebay: I joke, but it was a good preface :).

23:24 cemerick: mutinyonthebay: I knew I was being trolled on that one :-)

23:25 autodidakto: it's like, the guy is openning the car door for you. Does he just throw you in? Open the door slowly with white gloves on? Can you trust him? Where am I going with this ridiculous metaphor?

23:25 mutinyonthebay: cemerick: In actuality, the book is very good. I'm incredibly new to clojure, and only have a wee bit of CL in my background, and I'm finding everything very clear and approachable.

23:27 autodidakto: cemerick: Programming Clojure is like the kind but tough professor. Clojure Programming is the fun loving tutor.

23:27 cemerick: hah

23:27 autodidakto: well at least the preface :) I'll finish the book and come back with more analogies

23:28 gfredericks: autodidakto: but both can be rearranged to spell "Armoring Clog Jumper"

23:28 autodidakto: lol analogies not anagrams!

23:29 gfredericks: but the fact that both of them arrange the same... coicidence?

23:29 gfredericks: "Grim Nuclear Jog-Romp"

23:29 alex_baranosky: has anyone used Jark?

23:30 cemerick: autodidakto, mutinyonthebay: anyway, thanks for the kind words. I hope you find the rest of the book to be useful and as pleasant.

23:31 mutinyonthebay: I'm looking forward to it :)

23:32 autodidakto: hugod: the readme, under "experimental jack in support" repeats the instructions for lein1 plugin install.. does that mean it doesnt work in lein2?

23:33 cemerick: I shall

23:33 hugod: autodidakto: it should work with lein2

23:34 you will need to add lein-ritz to your :user profile

23:34 autodidakto: hugod: mind if i fork and clearify that in the README?

23:35 hugod: the jack-in support has seen only light testing, as I don't use it myself...

23:35 autodidakto: please do :)

23:35 ppppaul: datom is the new document db?

23:35 autodidakto: hugod: and github markdown bonked your install code... the ```language line is broke (happened on my README too.. don't know why)

23:38 i'll clean that up too though. Ok off I go...!

23:38 jdp: this may be a very silly question but, on osx 10.7 with lein2, hitting enter at the repl does nothing. has anyone else encountered this?

23:38 ctrl+d will quit the repl though

23:41 budu: hi

23:42 wkmanire: back

23:42 budu: i'm trying to create a package for the new Meteor web framework to be able to use the clojurescript compiler but i'm stuck on a semmingly simple issue

23:43 meteor listen for file change using node's fs.watch and i'm calling cljsc on the whole source directory in the callback

23:44 but then it seems to get into a loop, where the cljs files trigger a change notification when the compiler run

23:45 so i'm wondering if cljsc is modifying the original files in some way during compilation?

23:46 wkmanire: Using Clojure with swing seems a bit contrary doesn't it?

23:47 In the example, clojure calls .setText of a JLabel.

23:48 emezeske_: wkmanire: Your program has to do *something* other than heat up the CPU! ^_^

23:49 ppppaul: my programs heat my room

23:49 emezeske_: I guess there is FRP for more functional GUIs, but I'm not sure anyone has done anything big with that yet

23:50 wkmanire: So in order to utilize existing libraries a certain amount of mutability is acceptable.

23:51 ppppaul: you need to mutate some thigns

23:51 just not EVERYTHING

23:51 every god damned thing

23:51 my whole program just mutated into something i don't understand

23:52 emezeske_: Yeah, a certain amount of mutability is present in every program

23:52 ppppaul: also, constants are easier to name

23:52 emezeske_: Clojure just encourages you to isolate and minimize the mutability

23:53 wkmanire: Otherwise you'd have to recreate your entire UI each time the mouse moved... I may be exaggerating but technically you'd need to create a new instance of your application where the mouse is now located one more pixel to the right.

23:54 amalloy: wkmanire: that's really not such a big deal with structural sharing

23:55 not that i'm saying you shouldn't use mutability for your UI

23:56 but "OMG you'd have to copy your whole program state" is the wrong thing to worry about

23:56 wkmanire: I'm not "OMG"ing.

23:56 ppppaul: i am

23:56 wkmanire: Just making naive statements to illustrate my curiosity with all of this.

23:57 ppppaul: when clojure is doing stuff with java, you are outside of sanity

23:57 amalloy: well, don't take me too seriously when it sounds like i'm being critical (fyi)

23:57 wkmanire: :)

23:57 emezeske_: wkmanire: To feed your curiousity, copying your whole program state to account for one tiny thing changing is a pretty common FP idiom

23:57 amalloy: are you familiar with the idea of structural sharing?

23:57 wkmanire: Do you guys constantly debate where to draw the line?

23:57 I mean, internally/

23:58 amalloy: well, constantly is a strong word

23:58 wkmanire: Does it occur each time you are working on your UI?

23:58 amalloy: but it's a thing to worry about

23:58 wkmanire: Or with the file systme

23:58 or a database

23:58 Or anything else that naturally represents a mutable state.

23:58 amalloy: "naturally"

23:59 there's no particular reason why a database has to be mutable; elephantdb and datomic show that

Logging service provided by n01se.net