#clojure log - Jun 02 2012

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

1:10 muhoo: well i learned something new today. {:session nil} in ring means delete the session. but (:session response) nil means, do not write the session, don't touch it, leave it alone

2:19 ben_h: hi all

2:19 PeregrinePDX: Hello

2:19 ben_h: trying to learn a bit about clojure by writing some code to query a postgres db.

2:20 there's one part of clojure design i don't get -- i'm wondering why there's a distinction between def, defn, defmacro, deftest, etc.

2:20 i thought the idea of homoiconicity was that they're all just lists, and so equivalent in that sense.

2:20 is the distinction just semantic?

2:21 amalloy: uhhh, it's "just" semantic in that they "just" mean/do different things, yes

2:21 ben_h: well, take def/defn for example

2:22 i don't understand why there's a distinction between a single value, or a function that evaluates to one

2:22 amalloy: indeed. defn defines a function, to be executed later at your convenience; def defines a value, which is computed at the time of definition

2:22 ben_h: oh, so (def a <arbitrary expression>) is just a way to eager-evaluate?

2:22 amalloy: not really

2:23 ben_h: (corollary: is it valid to say (defn b 3), so b just returns 3?)

2:23 amalloy: ben_h: living in a world where values are indistinguishable from functions would be torture. is 1 the same as (fn [] 1)? the same as (fn [] (fn [] 1))? if so, what's the point?

2:24 ben_h: to me, that's the point of immutability

2:24 if the values are equal, it doesn't matter how you got there

2:24 amalloy: that's a gross misunderstanding of the point. what about (fn [x] x)? how do you express that "as a value"

2:25 ben_h: well, i have no idea.

2:25 amalloy: obviously it is usable as a value, because functions are first class. but it is qualitatively very different from just a number

2:26 ben_h: good point, the "value" of a function is the function itself

2:26 amalloy: haskell comes closer to that idea than lisp does

2:27 in that basically everything is a function of one argument

2:27 ben_h: right

2:27 archaic: what would the ''' value ''' of a relation then be?

2:28 amalloy: (i heard somewhere that constants are actually functions of no arguments, but i don't understand whether that's (a) nonsense, (b) true, or (c) a philosophical argument)

2:28 ben_h: maybe another example is better -- def / defmacro

2:28 the usages of defmacro i've seen look like normal functions

2:28 i'm missing something about the discinction

2:29 amalloy: ben_h: in some ways they are, and that *is* the point of homoiconicity

2:29 ben_h: the example i'm looking at is the (testing) macro here http://richhickey.github.com/clojure/clojure.test-api.html

2:29 lazybot: Nooooo, that's so out of date! Please see instead http://clojure.github.com/clojure/clojure.test-api.html and try to stop linking to rich's repo.

2:29 ben_h: ha

2:29 amalloy: a macro definition is just a function from one list (more generally, source-code form) to another list (source-code form), which the compiler applies at compile time instead of at runtime

2:30 ben_h: ahh, right

2:30 amalloy: (and on the code representing your program, rather than on the values that your program will manipulate)

2:30 ben_h: is that second bit just convention though?

2:30 amalloy: no

2:30 ben_h: oh

2:31 as an example, (testing "with positive integers" (is (= 4 (+ 2 2)))

2:31 presumably (testing) receives the is-form as an arg

2:31 amalloy: indeed

2:32 ben_h: if (testing) were a function, would it just receive the resulting value instead (true) ?

2:32 amalloy: yes

2:32 and at runtime, not at compile-time

2:32 ben_h: right. that explains a lot

2:32 amalloy: for example: (defmacro ignore-first [& args] (rest args)) (ignore-first (/ foo 0) + 1 2)

2:32 this compiles into (+ 1 2), even though foo is not defined and you can't divide it by zero

2:33 it simply receives the list '((/ foo 0) + 1 2), throws away the first element, and tells the compiler that's the list you meant to type

2:34 ben_h: right. i thought that laziness would mean that if ignore-first were a function, then (/ foo 0) would be discarded before it were eval'ed

2:34 so list eval isn't lazy by default.

2:34 amalloy: clojure does not have pervasive lazy evaluation semantics; only lazy sequences, and macros to fake the rest if you want

2:35 &(let [f (fn [x y] y)] (f (/ 1 0) 10)

2:35 lazybot: java.lang.RuntimeException: EOF while reading, starting at line 1

2:35 amalloy: &(let [f (fn [x y] y)] (f (/ 1 0) 10))

2:35 lazybot: java.lang.ArithmeticException: Divide by zero

2:36 ben_h: right.

2:36 so that's one of the main things macros are for then :)

2:40 amalloy: thanks, that's a big help

2:52 Rich_Morin: Is there a tool that will slurp in Clojure code and emit a constrained English description of what it's doing?

2:52 Raynes: We call those humans.

2:53 PeregrinePDX: Raynes, how do I install one of those?

2:53 Rich_Morin: I don't always have one of them handy and wouldn't want to bother them any more than I could help.

2:54 http://www.stathis.co.uk/self-explanatory-software/ is vaguely along the lines of what I'm thinking of, but not exactly.

2:55 I've written code to explain the reasoning of inferencing code, etc. Explaining Clojure syntax (etc) should actually be simpler.

3:01 ibdknox: huh

3:01 that's a neat idea

3:02 unfortunately it's very hard for me to imagine being able to generalize it

3:04 Rich_Morin: I'm not sure what kind of generalization you have in mind. I should clarify that I'm only thinking about explaining low-level syntax, as opposed to algorithms or intent.

3:05 muhoo: heh, oooh kay https://www.refheap.com/paste/2973

3:06 * muhoo has finally figured out how to get noir and friend to interoperate

3:38 PKHG: Hi, good morning: is it possible to use a *.jar with 'Java applets' code needing parameter to choose out of several possibilities from clojure (REPL mode e.g.) see here for what I want http://webcompmath.sourceforge.net/wcm/config_applets/index.html

3:46 DerGuteMoritz: bist du wach? und hast Ahnung ueber *.jars benutzen?

3:50 muhoo: PKHG: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Creating_an_Applet

3:50 PKHG: also http://dynamic-thinking.blogspot.com/2009/06/minimal-java-applet-in-clojure.html

3:50 PKHG: Thanks ... will look at it ...

3:51 oh, the first one I already saw and got it running ;-)

3:52 the second ink is new to me ... reading

3:54 uiui .. not so easy have to play with import and trying to see WHAT is in a jar ...

4:46 ro_st: i have a map like this {1 A, 2 B, 3 A, 4 A, 5 B, 6 C} and i want a map like this {A [1 2 4], B [3 5], C [6]}

4:46 how would i express that?

4:52 amalloy: &(apply merge-with into {} (for [[k v] '{1 A, 2 B, 3 A, 4 A, 5 B, 6 C}] {v k}))

4:52 lazybot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long

4:52 amalloy: &(apply merge-with into {} (for [[k v] '{1 A, 2 B, 3 A, 4 A, 5 B, 6 C}] {v [k]}))

4:52 lazybot: ⇒ {C [6], B [2 5], A [1 3 4]}

4:53 ro_st: wow, ok

4:53 thank you amalloy

4:53 i certainly would not have gotten there on my own

4:54 i haven't learned to use the (for) spell yet

4:54 amalloy: ~for

4:54 PeregrinePDX: So I know this is basic and I am missing something but I have a set and I have in this case vector and I want to see if any of the things in my set are in my vector.

4:54 clojurebot: for is not a loop

4:55 amalloy: ah, dangit clojurebot, couldn't you have some cool snippet?

4:55 ro_st: PeregrinePDX: isn't that an intersection?

4:55 amalloy: ro_st: for is great, but you could write this yourself as a loop/recur or a reduce

4:55 if you don't have mastery of the whole stdlib

4:55 ro_st: set the vector and intersect; if the result is not empty, you have a positive

4:55 amalloy: no, it's good for me to learn for

4:56 amalloy: really merge-with is the cool part of that trick

4:56 PeregrinePDX: Yeah, intersection should work just fine. I hadn't thought of changing my vector to a set.

4:56 ro_st: yes, that's probably what i wouldn't have found very quickl

4:56 tomoj: ,(some #{1 2 3} [:foo 2 :bar])

4:56 clojurebot: 2

4:57 tomoj: ,(filter #{1 2 3} [:foo 2 :bar 3])

4:57 clojurebot: (2 3)

4:57 ro_st: completely different question. using emacs-live. i have nice drop-down autocompletion in clojure buffers, but not in paredit. how do i get paredit to use it as well?

4:57 tomoj: you don't have paredit in your clojure buffers?

4:58 ro_st: argh

4:58 not paredit; the slime repl -doh-

4:58 i want the nice autocompletion in my slime repl

4:58 i guess i should wade through the .el configs

4:58 AC minor mode

4:59 PeregrinePDX: what tomoj said: use (some)

4:59 amalloy: curiously, i knew you meant the slime repl

4:59 i actually thought you'd said that

4:59 ro_st: spooky :)

5:00 amalloy: to be fair, it's the only way of finishing the sentence that makes sense, so i didn't really finish reading the sentence

5:00 tomoj: ro_st: https://github.com/purcell/ac-slime hmm

5:01 do you have paredit in your slime repl?

5:01 ro_st: yes

5:01 REPL Undo-Tree VHl Paredit are the enabled minor modes

5:01 i see ac-slime in the clojure-pack

5:02 tomoj: then maybe you just need to add the slime-repl-mode-hook

5:02 and the eval-after-load I suppose

5:03 ro_st: ah, it might be because i'm using clojure-jack-in and not slime-connect

5:04 verifying

5:05 nope. also no AC there. the ac-slime hook is in the loaded config

5:05 (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)

5:08 PeregrinePDX: Perfect thanks ro_st and tomoj

5:13 ro_st: holy crap coding with a repl is so much better than compile breakpoint step debugger

5:13 i've lost weeks of my life to the adobe flex compiler :-(

5:17 PeregrinePDX: Yeah the repl certainly helps save a lot of time.

5:19 ro_st: and paredit, too. knowing how to slurp left and right, barf left and right, and change depth is immensely useful

5:22 it does make using the mongo 'repl' a bloody pain, though.

5:37 is there a way to default i-search and query replace to wrap?

5:40 amalloy: why would you bother, for isearch? just hit C-s again

5:41 ro_st: true. but for replace, i hate that i have to remember to go to the beginning of the file to be able to use ! to replace-all

6:21 yikes. the mac dock is taking more memory up than mongoDB is!!

6:25 how do i increase the amount of memory used by the jvm behind the slime repl?

6:30 antares_: ro_st: via :jvm-opts. Do you use lein1 or lein2?

6:30 ro_st: lein2

6:30 would the slime-repl respect those settings?

6:31 antares_: ro_st: :jvm-opts ["-Xmx" "1g"]

6:31 ro_st: thank you!

6:31 antares_: ro_st: SLIME will use the JVM process without knowing what configuration it is running with

6:31 ro_st: gotcha. is this true for clojure-jack-in too

6:31 ?

6:33 antares_: ro_st: clojure-jack-in just starts a network REPL process. That in turn should obey to :jvm-opts

6:33 ro_st: ok wicked

6:46 if-let: if i want to test the first binding, and then bind extra values out of that first binding, can i do this inside in-let's binding vector, or should i do the rest of the bindings inside an inner let form?

6:50 scottj: latter. I think there are some 3rd party more advanced if-let's that do what you want though

6:50 ro_st: ^

6:51 ro_st: ok cool. happy to go with latter for simplicity

6:52 scottj: ro_st: I think there is a variable or arg or keybinding inside C-s (not sure which) that has something to do with automatically restarting at beginning of buffer

6:54 ro_st: did you figure out your AC in slime thing?

6:54 ro_st: no, ac-slime isn't running even though there's a hook for it in my emacs-live config

6:54 scottj: ro_st: btw you asked yesterday about way to use slime compilation errors window in another frame and not open another. there's a variable for that, not sure name.

6:55 is AC not ac-slime active in slime-repl? is AC active in other buffers, say .emacs?

6:55 ro_st: ah that'd rock. i'd love to be able to put all the 'meta' buffers off to one side in a separate frame, and have all the code buffers be in the main frame

6:55 AC is active in clojure-mode and in Emacs-Lisp

6:56 just checked init.el

6:57 tomoj: ro_st: did you add both the slime-repl-mode-hook and the eval-after-load?

6:57 ro_st: i'm not sure about the eval-after-load bit. how would that look?

6:57 lemme show you the config from emacs-live...

6:58 lines 33-37 on here: https://github.com/overtone/emacs-live/blob/master/packs/live/clojure-pack/config/auto-complete-conf.el

7:00 scottj: ro_st: perhaps remove the (add-hook 'slime-repl-mode-hook 'auto-complete-mode). maybe auto-complete-mode is already on globally and that is turning it off (just guessing here)

7:01 tomoj: https://github.com/purcell/ac-slime

7:01 scottj: lien 37

7:01 line rather

7:01 ro_st: ah that makes sense

7:01 tomoj: hmm

7:02 scottj: ro_st: though tomoj might be onto something, slime-repl-mode isn't in the list around like 25

7:02 tomoj: (eval-after-load "auto-complete" '(add-to-list 'ac-modes 'slime-repl-mode)) dunno

7:07 ro_st: weird. i must have removed that line 37 from mine, because it wasn't in there like it is on github

7:07 now that it's in, i have AC

7:07 sorry for the hassle, guys

7:07 i noobed out

7:10 is there a fancy-schmancy emacs spell for swapping the position of two elements in a list?

7:10 scottj: C-M-t

7:11 ro_st: :o

7:11 that rocks

7:11 how does anyone get any clojure work done outside of emacs?!

7:11 scottj: well, they're not spending all this time setting it up/fiddling with it like you are :)

7:12 ro_st: -grin-

7:12 they should. once they get done, they'd move twice or thrice as fast

7:13 scottj: or you've got the case of rhickey who uses emacs but doesn't even use slime. (afaict from all his demos/talks)

7:13 ro_st: the benefits of code-as-data can't be more apparent than with paredit

7:13 scottj: that only matters if moving is a large percent of your programming time. it isn't.

7:21 ro_st: amazing. i've just converted 1.15 million sql rows to mongo documents in 3 minutes in the repl

7:21 single 3.2ghz core, 1.2gb ram

7:21 used by the jvm

7:30 antares_: robink: what MongoDB clojure driver do you use?

7:30 oops

7:30 missed ro_st

9:19 cshell: antares_: I use congomongo

9:20 antares_: cshell: ok. I am collecting feedback on http://clojuremongodb.info doc guides we have so far

9:20 but it covers something other than congomongo :)

9:34 cshell: antares_: sounds good :)

10:03 kmicu: antares_: nice docs, last time I was searching how to connect to MongoLab it takes some time, now is clear, good work

10:03 antares_: kmicu: with monger?

10:05 wink: I've only ever used congomongo, it was easy and worked.

10:05 kmicu: antares_: yes, after I made comparision between congomongo and monger I could not resist to use monger, it is more clojure style :)

10:05 wink: but I don't have a good feeling with mongo :P

10:05 antares_: kmicu: oh, nice :) I will release an RC of Monger on Monday or so

10:07 kmicu: antares_: good to know, I will use it in my clojurescriptone based webapp and heroku (mongolab), if I find some problems with MongoLab co-op I'll give you a feedback

10:08 antares_: kmicu: ok. We have a mailing list, too: http://groups.google.com/forum/?hl=en_US&fromgroups#!forum/clojure-mongodb

10:23 cshell: cemerick: Is friend usable for a production app?

10:25 cemerick: cshell: It is in production in at least a half-dozen sites that I'm aware of.

10:26 kmicu: cshell: and practically there is no alternative :)

10:27 cshell: cemerick: Thanks, I'm debating between friend and spring security but friend seems more idiomatic and maybe once I understand it I can get it to use spring security

10:28 cemerick: kmicu: a bizarre situation, to be sure.

10:28 cshell: kmicu: True, I've noticed the same as well

10:28 cemerick: Do I plug friend into noir using the middleware functions?

10:29 cemerick: cshell: Yeah, I used spring-security exclusively for years prior to writing friend. Sadly, I think it'll be impractical (if not impossible) to bridge the two.

10:29 spring-security is servlet filter based, and really needs to be at the bottom of your entire app.

10:29 cshell: cemerick: Is that because of all the hooks and filters required?

10:29 cemerick: ah :)

10:29 cemerick: cshell: Yup, authenticate is just another ring middleware.

10:30 cshell: cemerick: Cool, I'm going to spend today getting friend to work with my app - by the way I keep going back to your book all the time, it covers so many questions I have - again, great job

10:31 cemerick: cshell: Thanks, I'm glad it's proving useful. :-)

10:32 cshell: cemerick: was friend too new to put in the book?

10:33 cemerick: Yup; I hadn't written it by the time we stopped work on the book.

10:33 Even so, if we were stopping work on the book tomorrow, it might only warrant a footnote. It's not yet as comprehensive as it needs to be (i.e. no oauth support, which is being addressed shortly).

10:34 cshell: cemerick: Guess that's just more for the next edition :)

10:34 cemerick: heh, or something!

10:34 cshell: cemerick: Hopefully once I get better at Clojure I can start helping with some of these libraries that are so useful, I'm just now understanding macros

10:35 antares_: oh, I did not submit a PR for friend to be tested against multiple JDKs on travis-ci.org

10:40 cemerick: antares_: is this just you being paranoid about jdk revs now, or does friend fail on one of them?

10:45 antares_: cemerick: I am just trying to move all Clojure projects that are relevant to test against multiple JDKs

10:45 Leiningen did have a failure on Oracle JDK 7 a few days ago

10:45 it was ignored :/

10:46 only to discover the whole HTTPS story after preview5 was released

10:46 cemerick: antares_: you can only do what you can do :-)

10:46 antares_: and it is not a code compatibility issue but for end users, it is a complete blocker

10:46 so I think testing against oracle jdk 7 for leiningen is a must, after preview6 is deployed

10:47 cemerick: another reason for that is, travis uses openjdk6 by default today

10:47 and we really want to move to openjdk7

10:47 jdk 6 is EOL in November anyway

10:47 but we cannot just change the default and say "ok, deal with it"

10:47 we need to give people a week or so to run with multiple JDKs

10:47 cemerick: I am skeptical of that EOL, in practical terms.

10:48 antares_: I never had any code compatibility issues with JDK 7 but who knows

10:48 cemerick: I have customers that were irritated when I stopped supporting 1.4 three? years ago.

10:48 antares_: cemerick: next Ubuntu and Fedora releases will use JDK 7 by default

10:48 well, 1.4 vs 1.5 was a big change

10:49 6 vs 7 is not

10:49 there are people who ask us to provide python 2.3 and 2.4

10:49 even google by now moved on past 2.4, from what I hear

10:50 we cannot do that, it's fun enough to support unsupported php 5.2

10:50 so at least for travis, OpenJDK 7 as the new default is a good idea

10:51 heroku moves to 7 as well

10:52 bosie: when i am in the repl and say ">", it shows me what?

10:52 package$name.space.core$something ?

10:54 antares_: bosie: current namespace

10:54 user> means the current namespace is 'user

10:56 bosie: #<core$_GT_ clojure.core$_GT_@726343c4>

10:57 gfrederi`: bosie: that's the munged class name for the > function; you shouldn't consider it too meaningful

10:57 functions aren't generally the sort of thing you print out

10:57 bosie: gfrederi`: right

10:58 antares_: bosie: ah, then > is replaced with GT to make it a valid class name. GT for "greater than". Clojure functions are compiled to Java classes that have names like that.

10:59 gfrederi`: ,*

10:59 clojurebot: #<core$_STAR_ clojure.core$_STAR_@229388>

10:59 gfrederi`: '*' => '_STAR_'

11:00 bosie: antares_: gotcha

11:12 picking up on my previous question, https://gist.github.com/e22c54656e8088d1376a

11:12 i don't quite understand what i get here

11:13 ro_st: bosie: (<- ?

11:13 ain't it (-> ?

11:14 bosie: ro_st: i think <- is actually from cascalog

11:14 ro_st: oh, right, sorry :) newbie here

11:14 bosie: it "defines" a query but doesn't execute it

11:14 ro_st: i started 2 hours ago ;)

11:15 it is defined with "(defmacro <-"

11:18 ok

11:19 so i am probably getting some kind of definition of the macro

11:20 ro_st: what does <- do?

11:21 bosie: https://github.com/nathanmarz/cascalog/blob/develop/src/clj/cascalog/api.clj

11:21 line 235

11:22 ro_st: that's a definition for ?<-

11:25 bosie: ro_st: 163

11:25 ro_st: well there you go then

11:25 that one returns a query

11:25 prepend with ? and see what your code does?

11:27 bosie: CompilerException java.lang.RuntimeException: Unable to resolve symbol: ? in this context, compiling:(NO_SOURCE_PATH:0)

11:27 ro_st: um, so instead of calling (<-, call (?<-

11:28 because it looks like the ? variant both creates and executes a query

11:29 bosie: ro_st: exactly but i wanted to know what the macro returns, i know how to execute it

11:30 tskabi: I can't see the location of errors when compiling with swank/clojure. Can someone please help?

11:30 I'm using lein-swank 1.4.4

11:31 I can't see the location of errors when compiling with lein-swank 1.4.4. Can someone please help?

11:33 ro_st: tskabi: may i suggest moving your .emacs.d off to one side, grabbing github/overtone/emacs-live and trying that?

11:33 tskabi: ok

11:34 ro_st: here's my working project.clj. using lein2

11:34 https://www.refheap.com/paste/4fca314fe4b079c36aab3db1

11:34 tmciver: tskabi: what do you mean 'compiling'? Are you running 'lein plugin install lein-swank "1.4.4"'?

11:34 tskabi: i mean i ran c-c c-k

11:34 ro_st: tskabi: when i use clojure-jack-in, and then C-c C-k

11:34 and then run something in repl that causes an exception

11:35 i get colourised stack trace with line numbers

11:35 tskabi: ro_st: I get that when I run c-c c-l but not c-c c-k

11:35 but no line numbers

11:35 ro_st: try emacs-live

11:36 i'm using vanilla emacs-live, with a font and color-scheme change, and maxframe and linum switched on

11:37 tskabi: i will try lein2 first

11:37 ro_st: good luck

11:37 tskabi: ty

11:45 irc2samus: technomancy: hi, remember yesterday when I was asking about shutdown hooks? turns out it's leiningen who blocks it: http://stackoverflow.com/questions/10855559/shutdown-hook-doesnt-fire-when-running-with-lein-run

12:49 clifton: most the way through land of lisp (really fun book), and i've done a little clojure hacking here-and-there. i have a strong background in web development and a CS education. can anyone recommend a path for grokking clojure? should i start with a book?

12:50 ejackson: clifton: yup, I this Chas Emerick's book is a good bet, or Fogus's

12:50 wink: clifton: I've started with noir. just because I'm also doing webdev

12:50 clifton: right on, i like noir syntax a lot... haven't built anything just yet

12:51 liftdeadtrees: I like 4clojure.com for working through some examples, seeing other peoples code, and getting the Clojure way

12:52 wink: I'm reading Fogus' book right now, but I usually prefer hands on learning :P (but I like the book)

12:55 clifton: Emerick's book also looks fantastic

12:55 thanks for the input guys

13:45 Bronsa: [coll {:foo 1, :bar 2}], (get coll :foo), 1000000 runs, 449 msecs

13:45 [coll {:foo 1, :bar 2}], (-lookup coll :foo nil), 1000000 runs, 321 msecs

13:45 [coll {:foo 1, :bar 2}], (:foo coll), 1000000 runs, 411 msecs

13:45 ops

13:50 aphyr: Anyone know where dissoc-in went in 1.3?

13:53 tmciver: aphyr: looks like it may have gone to clojure.core.incubator

13:56 aphyr: Lovely, thanks. :)

13:57 gfrederi`: in the lein-cljsbuild rhino-repl, how do I load my cljs code?

13:58 (ns foo.bar (:require ...)) didn't seem to work (though it pretended to)

13:59 * gfrederi` reading the docs

14:02 gfrederi`: okay think I got it

15:15 xuser: 13:53 -!- carllerche [~carllerch@208.87.61.246] has joined #clojure

15:32 sdevijver: I'm getting this error after configuring the leiningen plugin in eclipse: Leiningen Managed Dependencies issue: unknown problem

15:33 I'm on ubuntu, the same setup (counterclockwise + leiningen plugs) works on windows

15:42 borkdude: sdevijver did you use the new ccw plugin?

15:42 sdevijver which was released a few days ago

15:43 sdevijver: borkdude, not sure, let me check

15:44 borkdude: sdevijver with the new plugin, you don't need the additional leiningen plugin

15:44 sdevijver it's an all in one now

15:44 sdevijver: borkdude, I have 0.8.0STABLE001

15:46 borkdude, I've removed the leiningen nature from the project, still getting the same error

15:46 borkdude: sdevijver maybe try the newer one https://groups.google.com/forum/?fromgroups#!topic/clojuredev-users/UhfnjBvIips

15:47 sdevijver uninstall the previous leiningen and ccw plugin though

15:53 sdevijver: borkdude, it's alive! thx for your help

15:54 borkdude: sdevijver cool

15:56 sdevijver: ccw key bindings have changed :)

15:57 borkdude, strange that the old ccw doesn't work anymore, on the website it still refers to that update site: http://code.google.com/p/counterclockwise/

15:57 borkdude: sdevijver on the website they don't point to the beta I think

15:58 sdevijver: borkdude, indeed, but apparently that older version of ccw is now faulty (although the version of about one week ago works perfectly)

15:59 borkdude: sdevijver with the ccw + leiningen plugin (two separates) there were some issues, you had to follow an exact order to get things working

15:59 Omer: &"a"

15:59 lazybot: ⇒ "a"

16:00 borkdude: sdevijver for example, if you turned on the clojure nature before converting to a leiningen project, it failed

16:00 sdevijver: borkdude, it failed indeed :)

16:01 borkdude: sdevijver I hope it also works on windows for you, I see now on the mailing list that someone has problems with creating a new project

16:03 sdevijver: borkdude, I'm actually migrating from windows to ubuntu (running in vmware), I'm starting to add mongodb to the mix now

16:03 borkdude: sdevijver what has mongodb to do with it?

16:04 muhoo: cemerick: i've been integrating friend with noir. so far so good, though some changes to noir were required.

16:05 sdevijver: borkdude, as far as I know mongodb doens't run on windows?

16:05 borkdude: sdevijver it sure does

16:05 sdevijver https://groups.google.com/forum/?fromgroups#!topic/clojuredev-users/UhfnjBvIips

16:06 sdevijver eeks, sorry: http://www.mongodb.org/display/DOCS/Quickstart+Windows

16:07 sdevijver: borkdude, thx for that :)

16:32 Raynes: I'm going to vmware Ubuntu on my mac tonight, because I'm cool like that.

16:34 ejackson: Raynes: big pimpin !

16:35 sdevijver: Raynes, just did the same thing tonight :)

16:35 Raynes, used xubuntu though

16:35 Raynes: We can be cool together.

16:36 borkdude: I have ubuntu in parallels, am I cool ?

16:36 Bronsa: i am typing from ubuntu, what do i win?

16:38 ejackson: i think its carpal tunnel and monitor tans for us all :)

16:39 still, I love it !

16:50 sdevijver: I'm working with eclipse and windows and ubuntu *at the same time*, what do I win?

16:51 I have to use /s/eclipse and/eclipse in/, what do I win?

17:15 cemerick: muhoo: like?

17:20 muhoo: cemerick: https://github.com/kenrestivo/noir/commit/cfbb62e27cf08ff1b3229661a9cdf6738982de5e

17:21 KirinDave: muhoo: Not a big deal, but curious why you used get-in? Faster?

17:22 muhoo: KirinDave: (comp habit readability ignorance), probably

17:22 KirinDave: Maybe I am just weird for preferring -> for nested retrieval when keywords are the keys.

17:23 muhoo: or -?>, in case some of them are empty

17:23 technomancy: with keywords you don't need -?>

17:23 muhoo: ah, cool, thanks

17:25 cemerick: muhoo: oh, right, noir uses a dynamic var for session :-/

17:25 technomancy: =(

17:26 muhoo: yeah, i feel bad about adding all that complexity, but i need to Make It Work (tm)

17:26 KirinDave: technomancy: So I have a handful of people over here who want to bless you and rain beverages upon you.

17:26 technomancy: In the best possible way, mind you.

17:26 technomancy: KirinDave: heh; wonderful

17:26 what's the scope of "here"?

17:27 KirinDave: technomancy: CrowdFlower

17:27 we've almost totally phased out scala

17:27 technomancy: cool; how's the transition been?

17:27 KirinDave: And everyone is so happy about leiningen

17:27 technomancy: =D

17:27 KirinDave: Becuase we were so abused by sbt/ivy or raw maven

17:28 cemerick: muhoo: Don't feel bad, it's a necessary evil given the use of the var.

17:28 KirinDave: "Oh good.I want to use a Yammer library and a Twitter library."

17:28 technomancy: KirinDave: http://wondermark.com/c/2010-09-14-657stop.gif <- ?

17:28 KirinDave: technomancy: Our standard practice was to just re-cut jars into S3 with 0 dependencies when that happened. We don't have to do that now.

17:34 muhoo: cemerick: next i have to figure out how to get openid to work with google apps via step2. pray for me.

17:34 cemerick: step2?

17:38 muhoo: http://code.google.com/p/step2/

17:39 it's based on openid4java. i'll at least try to adapt it as a friend workflow. that's my goal anyway.

17:39 cemerick: muhoo: friend already uses openid4java to provide openid. Why use step2?

17:40 muhoo: because google apps uses a different discovery protocol than regular openid

17:40 cemerick: ah

17:40 * cemerick likes to ask stupid questions :-P

17:40 muhoo: https://sites.google.com/site/oauthgoog/fedlogininterp/openiddiscovery

17:40 cemerick: no, no, don't link me to the madness!

17:40 muhoo: oh, you've answered dozenss of mine. i owe you :-)

17:41 cemerick: yeah, nope, I'm not gonna read that. :-D

17:41 muhoo: i wouldn't expect any sane person to.

17:42 cemerick: muhoo: a friend workflow that makes all that work will be most welcome by the other guy that needs it. ;-)

17:42 muhoo: i'm thinking that may be one way i can contribute, yes.

17:43 cemerick: I need to break out the openid workflow pronto, so people don't expect to have everything included in one big hairball.

17:43 muhoo: how would you do it? like ring with sub-projects in lein?

18:45 * gfrederi` is actually working on cljs numerics now

18:51 gfrederi`: this confluence editor appears to be dysfunctional?

19:33 technomancy: gfrederi`: yes

19:34 aperiodic: does anyone have a spec of how native deps in jars should be organized?

19:34 my googling is proving fruitless

19:36 ah, found the README of dnolen's native-deps plugin

20:29 technomancy: aperiodic: unfortunately right now the source is the only documentation

20:29 aperiodic: leiningen supports a subset of the native-deps plugin; in particular you can't put a jar inside a jar

20:51 cshell: cemerick_away: Wow, integrating friend into noir was super simple

21:36 rafb3: hey

21:36 care to review my newbie clojure code and give feedback on what could be more interesting?

21:36 https://gist.github.com/2843589#file_subs_sum.clj

21:37 spjt: rafb3: I only know enough clojure to say it's not C, parentheses are not braces and you don't have to put lines for them

21:38 tmciver: rafb3: yes, not parens on their own lines.

21:38 no*

21:38 TimMc: Except in some special cases.

21:38 spjt: I only learned what ->> means yesterday so I'll just shut my mouth

21:39 but otherwise it looks good, and it gives me courage to ask my question.. wtf is proxy?

21:39 TimMc: As in, only have dangling parens when the conventional format becomes absolutely annoying. You'll know when.

21:39 spjt: I was trying to write a program, I gave up and I feel that proxy somehow is key to making it work, but I don't know why or what it does

21:40 TimMc: spjt: proxy is a lie, and an inefficient one at that.

21:40 spjt: TimMc: http://pastebin.com/ERNzwdgU

21:41 TimMc: The code is to the point where I have it producing a vector of vectors that represent the points for a java.awt.Polygon, but I can't figure out how to actually draw them

21:42 tmciver: rafb3: I believe you can put your program args directly into your -main fun rather than parse them manually as you are doing.

21:43 locojay: hi i simplified a code i m having to https://gist.github.com/2860869 i don't have any print... but when i do lein run it print to stdout (2 2) very strange. i have a very large sequence so to much output...

21:44 eckroth: locojay: you are turning your map into a sequence

21:44 locojay: it would look like this: [[:1 2] [:2 3]]

21:45 locojay: I figure you don't intend that since the first arg to your extra function is called "dict"

21:46 locojay: yes i need to apply a function to a sequence of dicts

21:47 TimMc: spjt: Ah, right. That's one of the few good places for proxy. Let me dig up some code...

21:47 locojay: let me gist the complete code

21:48 https://gist.github.com/2860895

21:48 spjt: These are the days when I feel fortunate that I'm enough of a novice at programming to be comfortable with a language that makes me feel like a complete idiot.

21:49 TimMc: spjt: By the way, (let [a (init-stuff)] (doto a (...))) can be written (doto (init-stuff) (...))

21:49 locojay: eckroth but why do i get output to stdout?

21:49 eckroth: locojay: ok so I assume csvmapseq is actually a sequence of maps, like [{:1 2 :2 3} {:4 5 :6 7}] etc.

21:49 locojay: which is different than your first gist

21:49 locojay: exactly

21:50 yeah sry should have been that

21:50 spjt: TimMc: hehe, I was waiting until I actually got it to work before I actually asked everyone to point out what was wrong with it, but I'll write that down. :)

21:50 eckroth: locojay: I don't know why you get output; maybe lein run does that?

21:51 locojay: so what was your question? why you get stdout or why you get (2 2) as the output?

21:51 locojay: with the first gist it output (2 2) .

21:51 yes thats my question

21:51 TimMc: spjt: Oops, have to go, but here's a GUI app I wrote that does drawing. I was still learning at the time, but mostly it is solid: https://github.com/timmc/CS4300-HW3/tree/master/src/timmcHW3

21:51 locojay: since im not printing

21:51 eckroth: locojay: which one is your question? :)

21:51 locojay: ah; I don't know why it prints, sorry

21:51 locojay: why i do get output to stdout if i don't do a print

21:52 k i will try to do a lein install and run the jar then

21:52 xeqi: what is you :main in you're project.clj?

21:52 spjt: TimMc: I'll look at it and just be jealous that you could use clojure for an assignment.

21:52 locojay: :main projectname.core

21:53 TimMc: spjt: https://github.com/timmc/CS4300-HW3/blob/master/src/timmcHW3/gui.clj#L179

21:53 proxy a JComponent, override paint

21:54 locojay: and i have a main function in core https://gist.github.com/2860932

21:54 rafb3: thanks for the feedback folks!

21:54 spjt: it's a use of proxy but I still don't understand what it actually does

21:54 Expands to code which creates a instance of a proxy class that

21:54 implements the named class/interface(s) by calling the supplied

21:54 fns.

21:54 TimMc: Ignore all my naming conventions. And only use :use with :only. :-/

21:54 spjt: at least it's a recursive definition.

22:05 muhoo: cshell: i'm curious how you handled logout? this is roughly what i ended up with : https://www.refheap.com/paste/2973

22:17 locojay: eckroth: must be a leiningen error since i don't have any probs with the jar

22:18 eckroth: locojay: interesting; maybe it's not an error, maybe that's just how lein run works

22:20 locojay: thanks will send to mailing list and see...

22:54 cemerick_away: cshell: that's the way it's supposed to be :-)

23:31 KirinDave: Is there a good alternative to capistrano/fabic with clojure as the host language?

23:34 xeqi: pallet ?

23:34 KirinDave: pallet is more like a flexible chef alternative

23:34 I have all this code which enumerates our host structure in zookeeper in clojure. I'd hate to rewrite it in ruby just for capistrano.

23:37 antares_: KirinDave: pallet has a couple of dependencies that may be helpful. You probably can get away with just a good SSH client

23:37 KirinDave: Aha

23:37 github search strikes closer than google

23:38 https://github.com/drsnyder/gantry

23:38 Gantry

23:44 mthvedt: anyone know a good parser lib for clojure?

23:50 michaelr525: hello

23:50 and good morning!

23:59 antares_: mthvedt: parseley. But it depends on what kind of parser you need. I just use ANTLR or ragel and use Java parsers from Clojure)

Logging service provided by n01se.net