#clojure logs

2012-06-02

01:10muhoowell 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
02:19ben_hhi all
02:19PeregrinePDXHello
02:19ben_htrying to learn a bit about clojure by writing some code to query a postgres db.
02:20ben_hthere's one part of clojure design i don't get -- i'm wondering why there's a distinction between def, defn, defmacro, deftest, etc.
02:20ben_hi thought the idea of homoiconicity was that they're all just lists, and so equivalent in that sense.
02:20ben_his the distinction just semantic?
02:21amalloyuhhh, it's "just" semantic in that they "just" mean/do different things, yes
02:21ben_hwell, take def/defn for example
02:22ben_hi don't understand why there's a distinction between a single value, or a function that evaluates to one
02:22amalloyindeed. defn defines a function, to be executed later at your convenience; def defines a value, which is computed at the time of definition
02:22ben_hoh, so (def a <arbitrary expression>) is just a way to eager-evaluate?
02:22amalloynot really
02:23ben_h(corollary: is it valid to say (defn b 3), so b just returns 3?)
02:23amalloyben_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?
02:24ben_hto me, that's the point of immutability
02:24ben_hif the values are equal, it doesn't matter how you got there
02:24amalloythat's a gross misunderstanding of the point. what about (fn [x] x)? how do you express that "as a value"
02:25ben_hwell, i have no idea.
02:25amalloyobviously it is usable as a value, because functions are first class. but it is qualitatively very different from just a number
02:26ben_hgood point, the "value" of a function is the function itself
02:26amalloyhaskell comes closer to that idea than lisp does
02:27amalloyin that basically everything is a function of one argument
02:27ben_hright
02:27archaicwhat would the ''' value ''' of a relation then be?
02:28amalloy(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)
02:28ben_hmaybe another example is better -- def / defmacro
02:28ben_hthe usages of defmacro i've seen look like normal functions
02:28ben_hi'm missing something about the discinction
02:29amalloyben_h: in some ways they are, and that *is* the point of homoiconicity
02:29ben_hthe example i'm looking at is the (testing) macro here http://richhickey.github.com/clojure/clojure.test-api.html
02:29lazybotNooooo, 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.
02:29ben_hha
02:29amalloya 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
02:30ben_hahh, right
02:30amalloy(and on the code representing your program, rather than on the values that your program will manipulate)
02:30ben_his that second bit just convention though?
02:30amalloyno
02:30ben_hoh
02:31ben_has an example, (testing "with positive integers" (is (= 4 (+ 2 2)))
02:31ben_hpresumably (testing) receives the is-form as an arg
02:31amalloyindeed
02:32ben_hif (testing) were a function, would it just receive the resulting value instead (true) ?
02:32amalloyyes
02:32amalloyand at runtime, not at compile-time
02:32ben_hright. that explains a lot
02:32amalloyfor example: (defmacro ignore-first [& args] (rest args)) (ignore-first (/ foo 0) + 1 2)
02:32amalloythis compiles into (+ 1 2), even though foo is not defined and you can't divide it by zero
02:33amalloyit 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
02:34ben_hright. i thought that laziness would mean that if ignore-first were a function, then (/ foo 0) would be discarded before it were eval'ed
02:34ben_hso list eval isn't lazy by default.
02:34amalloyclojure does not have pervasive lazy evaluation semantics; only lazy sequences, and macros to fake the rest if you want
02:35amalloy&(let [f (fn [x y] y)] (f (/ 1 0) 10)
02:35lazybotjava.lang.RuntimeException: EOF while reading, starting at line 1
02:35amalloy&(let [f (fn [x y] y)] (f (/ 1 0) 10))
02:35lazybotjava.lang.ArithmeticException: Divide by zero
02:36ben_hright.
02:36ben_hso that's one of the main things macros are for then :)
02:40ben_hamalloy: thanks, that's a big help
02:52Rich_MorinIs there a tool that will slurp in Clojure code and emit a constrained English description of what it's doing?
02:52RaynesWe call those humans.
02:53PeregrinePDXRaynes, how do I install one of those?
02:53Rich_MorinI don't always have one of them handy and wouldn't want to bother them any more than I could help.
02:54Rich_Morinhttp://www.stathis.co.uk/self-explanatory-software/ is vaguely along the lines of what I'm thinking of, but not exactly.
02:55Rich_MorinI've written code to explain the reasoning of inferencing code, etc. Explaining Clojure syntax (etc) should actually be simpler.
03:01ibdknoxhuh
03:01ibdknoxthat's a neat idea
03:02ibdknoxunfortunately it's very hard for me to imagine being able to generalize it
03:04Rich_MorinI'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.
03:05muhooheh, oooh kay https://www.refheap.com/paste/2973
03:38PKHGHi, 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
03:46PKHGDerGuteMoritz: bist du wach? und hast Ahnung ueber *.jars benutzen?
03:50muhooPKHG: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Creating_an_Applet
03:50muhooPKHG: also http://dynamic-thinking.blogspot.com/2009/06/minimal-java-applet-in-clojure.html
03:50PKHGThanks ... will look at it ...
03:51PKHGoh, the first one I already saw and got it running ;-)
03:52PKHGthe second ink is new to me ... reading
03:54PKHGuiui .. not so easy have to play with import and trying to see WHAT is in a jar ...
04:46ro_sti 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]}
04:46ro_sthow would i express that?
04:52amalloy&(apply merge-with into {} (for [[k v] '{1 A, 2 B, 3 A, 4 A, 5 B, 6 C}] {v k}))
04:52lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
04:52amalloy&(apply merge-with into {} (for [[k v] '{1 A, 2 B, 3 A, 4 A, 5 B, 6 C}] {v [k]}))
04:52lazybot⇒ {C [6], B [2 5], A [1 3 4]}
04:53ro_stwow, ok
04:53ro_stthank you amalloy
04:53ro_sti certainly would not have gotten there on my own
04:54ro_sti haven't learned to use the (for) spell yet
04:54amalloy~for
04:54PeregrinePDXSo 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.
04:54clojurebotfor is not a loop
04:55amalloyah, dangit clojurebot, couldn't you have some cool snippet?
04:55ro_stPeregrinePDX: isn't that an intersection?
04:55amalloyro_st: for is great, but you could write this yourself as a loop/recur or a reduce
04:55amalloyif you don't have mastery of the whole stdlib
04:55ro_stset the vector and intersect; if the result is not empty, you have a positive
04:55ro_stamalloy: no, it's good for me to learn for
04:56amalloyreally merge-with is the cool part of that trick
04:56PeregrinePDXYeah, intersection should work just fine. I hadn't thought of changing my vector to a set.
04:56ro_styes, that's probably what i wouldn't have found very quickl
04:56tomoj,(some #{1 2 3} [:foo 2 :bar])
04:56clojurebot2
04:57tomoj,(filter #{1 2 3} [:foo 2 :bar 3])
04:57clojurebot(2 3)
04:57ro_stcompletely 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?
04:57tomojyou don't have paredit in your clojure buffers?
04:58ro_stargh
04:58ro_stnot paredit; the slime repl -doh-
04:58ro_sti want the nice autocompletion in my slime repl
04:58ro_sti guess i should wade through the .el configs
04:58ro_stAC minor mode
04:59ro_stPeregrinePDX: what tomoj said: use (some)
04:59amalloycuriously, i knew you meant the slime repl
04:59amalloyi actually thought you'd said that
04:59ro_stspooky :)
05:00amalloyto be fair, it's the only way of finishing the sentence that makes sense, so i didn't really finish reading the sentence
05:00tomojro_st: https://github.com/purcell/ac-slime hmm
05:01tomojdo you have paredit in your slime repl?
05:01ro_styes
05:01ro_stREPL Undo-Tree VHl Paredit are the enabled minor modes
05:01ro_sti see ac-slime in the clojure-pack
05:02tomojthen maybe you just need to add the slime-repl-mode-hook
05:02tomojand the eval-after-load I suppose
05:03ro_stah, it might be because i'm using clojure-jack-in and not slime-connect
05:04ro_stverifying
05:05ro_stnope. also no AC there. the ac-slime hook is in the loaded config
05:05ro_st(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
05:08PeregrinePDXPerfect thanks ro_st and tomoj
05:13ro_stholy crap coding with a repl is so much better than compile breakpoint step debugger
05:13ro_sti've lost weeks of my life to the adobe flex compiler :-(
05:17PeregrinePDXYeah the repl certainly helps save a lot of time.
05:19ro_stand paredit, too. knowing how to slurp left and right, barf left and right, and change depth is immensely useful
05:22ro_stit does make using the mongo 'repl' a bloody pain, though.
05:37ro_stis there a way to default i-search and query replace to wrap?
05:40amalloywhy would you bother, for isearch? just hit C-s again
05:41ro_sttrue. 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
06:21ro_styikes. the mac dock is taking more memory up than mongoDB is!!
06:25ro_sthow do i increase the amount of memory used by the jvm behind the slime repl?
06:30antares_ro_st: via :jvm-opts. Do you use lein1 or lein2?
06:30ro_stlein2
06:30ro_stwould the slime-repl respect those settings?
06:31antares_ro_st: :jvm-opts ["-Xmx" "1g"]
06:31ro_stthank you!
06:31antares_ro_st: SLIME will use the JVM process without knowing what configuration it is running with
06:31ro_stgotcha. is this true for clojure-jack-in too
06:31ro_st?
06:33antares_ro_st: clojure-jack-in just starts a network REPL process. That in turn should obey to :jvm-opts
06:33ro_stok wicked
06:46ro_stif-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?
06:50scottjlatter. I think there are some 3rd party more advanced if-let's that do what you want though
06:50scottjro_st: ^
06:51ro_stok cool. happy to go with latter for simplicity
06:52scottjro_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
06:54scottjro_st: did you figure out your AC in slime thing?
06:54ro_stno, ac-slime isn't running even though there's a hook for it in my emacs-live config
06:54scottjro_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.
06:55scottjis AC not ac-slime active in slime-repl? is AC active in other buffers, say .emacs?
06:55ro_stah 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
06:55ro_stAC is active in clojure-mode and in Emacs-Lisp
06:56ro_stjust checked init.el
06:57tomojro_st: did you add both the slime-repl-mode-hook and the eval-after-load?
06:57ro_sti'm not sure about the eval-after-load bit. how would that look?
06:57ro_stlemme show you the config from emacs-live...
06:58ro_stlines 33-37 on here: https://github.com/overtone/emacs-live/blob/master/packs/live/clojure-pack/config/auto-complete-conf.el
07:00scottjro_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)
07:01tomojhttps://github.com/purcell/ac-slime
07:01scottjlien 37
07:01scottjline rather
07:01ro_stah that makes sense
07:01tomojhmm
07:02scottjro_st: though tomoj might be onto something, slime-repl-mode isn't in the list around like 25
07:02tomoj (eval-after-load "auto-complete" '(add-to-list 'ac-modes 'slime-repl-mode)) dunno
07:07ro_stweird. i must have removed that line 37 from mine, because it wasn't in there like it is on github
07:07ro_stnow that it's in, i have AC
07:07ro_stsorry for the hassle, guys
07:07ro_sti noobed out
07:10ro_stis there a fancy-schmancy emacs spell for swapping the position of two elements in a list?
07:10scottjC-M-t
07:11ro_st:o
07:11ro_stthat rocks
07:11ro_sthow does anyone get any clojure work done outside of emacs?!
07:11scottjwell, they're not spending all this time setting it up/fiddling with it like you are :)
07:12ro_st-grin-
07:12ro_stthey should. once they get done, they'd move twice or thrice as fast
07:13scottjor you've got the case of rhickey who uses emacs but doesn't even use slime. (afaict from all his demos/talks)
07:13ro_stthe benefits of code-as-data can't be more apparent than with paredit
07:13scottjthat only matters if moving is a large percent of your programming time. it isn't.
07:21ro_stamazing. i've just converted 1.15 million sql rows to mongo documents in 3 minutes in the repl
07:21ro_stsingle 3.2ghz core, 1.2gb ram
07:21ro_stused by the jvm
07:30antares_robink: what MongoDB clojure driver do you use?
07:30antares_oops
07:30antares_missed ro_st
09:19cshellantares_: I use congomongo
09:20antares_cshell: ok. I am collecting feedback on http://clojuremongodb.info doc guides we have so far
09:20antares_but it covers something other than congomongo :)
09:34cshellantares_: sounds good :)
10:03kmicuantares_: nice docs, last time I was searching how to connect to MongoLab it takes some time, now is clear, good work
10:03antares_kmicu: with monger?
10:05winkI've only ever used congomongo, it was easy and worked.
10:05kmicuantares_: yes, after I made comparision between congomongo and monger I could not resist to use monger, it is more clojure style :)
10:05winkbut I don't have a good feeling with mongo :P
10:05antares_kmicu: oh, nice :) I will release an RC of Monger on Monday or so
10:07kmicuantares_: 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:08antares_kmicu: ok. We have a mailing list, too: http://groups.google.com/forum/?hl=en_US&amp;fromgroups#!forum/clojure-mongodb
10:23cshellcemerick: Is friend usable for a production app?
10:25cemerickcshell: It is in production in at least a half-dozen sites that I'm aware of.
10:26kmicucshell: and practically there is no alternative :)
10:27cshellcemerick: 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:28cemerickkmicu: a bizarre situation, to be sure.
10:28cshellkmicu: True, I've noticed the same as well
10:28cshellcemerick: Do I plug friend into noir using the middleware functions?
10:29cemerickcshell: 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:29cemerickspring-security is servlet filter based, and really needs to be at the bottom of your entire app.
10:29cshellcemerick: Is that because of all the hooks and filters required?
10:29cshellcemerick: ah :)
10:29cemerickcshell: Yup, authenticate is just another ring middleware.
10:30cshellcemerick: 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:31cemerickcshell: Thanks, I'm glad it's proving useful. :-)
10:32cshellcemerick: was friend too new to put in the book?
10:33cemerickYup; I hadn't written it by the time we stopped work on the book.
10:33cemerickEven 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:34cshellcemerick: Guess that's just more for the next edition :)
10:34cemerickheh, or something!
10:34cshellcemerick: 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:35antares_oh, I did not submit a PR for friend to be tested against multiple JDKs on travis-ci.org
10:40cemerickantares_: is this just you being paranoid about jdk revs now, or does friend fail on one of them?
10:45antares_cemerick: I am just trying to move all Clojure projects that are relevant to test against multiple JDKs
10:45antares_Leiningen did have a failure on Oracle JDK 7 a few days ago
10:45antares_it was ignored :/
10:46antares_only to discover the whole HTTPS story after preview5 was released
10:46cemerickantares_: you can only do what you can do :-)
10:46antares_and it is not a code compatibility issue but for end users, it is a complete blocker
10:46antares_so I think testing against oracle jdk 7 for leiningen is a must, after preview6 is deployed
10:47antares_cemerick: another reason for that is, travis uses openjdk6 by default today
10:47antares_and we really want to move to openjdk7
10:47antares_jdk 6 is EOL in November anyway
10:47antares_but we cannot just change the default and say "ok, deal with it"
10:47antares_we need to give people a week or so to run with multiple JDKs
10:47cemerickI am skeptical of that EOL, in practical terms.
10:48antares_I never had any code compatibility issues with JDK 7 but who knows
10:48cemerickI have customers that were irritated when I stopped supporting 1.4 three? years ago.
10:48antares_cemerick: next Ubuntu and Fedora releases will use JDK 7 by default
10:48antares_well, 1.4 vs 1.5 was a big change
10:49antares_6 vs 7 is not
10:49antares_there are people who ask us to provide python 2.3 and 2.4
10:49antares_even google by now moved on past 2.4, from what I hear
10:50antares_we cannot do that, it's fun enough to support unsupported php 5.2
10:50antares_so at least for travis, OpenJDK 7 as the new default is a good idea
10:51antares_heroku moves to 7 as well
10:52bosiewhen i am in the repl and say ">", it shows me what?
10:52bosiepackage$name.space.core$something ?
10:54antares_bosie: current namespace
10:54antares_user> means the current namespace is 'user
10:56bosie#<core$_GT_ clojure.core$_GT_@726343c4>
10:57gfrederi`bosie: that's the munged class name for the > function; you shouldn't consider it too meaningful
10:57gfrederi`functions aren't generally the sort of thing you print out
10:57bosiegfrederi`: right
10:58antares_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:59gfrederi`,*
10:59clojurebot#<core$_STAR_ clojure.core$_STAR_@229388>
10:59gfrederi`'*' => '_STAR_'
11:00bosieantares_: gotcha
11:12bosiepicking up on my previous question, https://gist.github.com/e22c54656e8088d1376a
11:12bosiei don't quite understand what i get here
11:13ro_stbosie: (<- ?
11:13ro_stain't it (-> ?
11:14bosiero_st: i think <- is actually from cascalog
11:14ro_stoh, right, sorry :) newbie here
11:14bosieit "defines" a query but doesn't execute it
11:14bosiero_st: i started 2 hours ago ;)
11:15bosieit is defined with "(defmacro <-"
11:18bosieok
11:19bosieso i am probably getting some kind of definition of the macro
11:20ro_stwhat does <- do?
11:21bosiehttps://github.com/nathanmarz/cascalog/blob/develop/src/clj/cascalog/api.clj
11:21bosieline 235
11:22ro_stthat's a definition for ?<-
11:25bosiero_st: 163
11:25ro_stwell there you go then
11:25ro_stthat one returns a query
11:25ro_stprepend with ? and see what your code does?
11:27bosieCompilerException java.lang.RuntimeException: Unable to resolve symbol: ? in this context, compiling:(NO_SOURCE_PATH:0)
11:27ro_stum, so instead of calling (<-, call (?<-
11:28ro_stbecause it looks like the ? variant both creates and executes a query
11:29bosiero_st: exactly but i wanted to know what the macro returns, i know how to execute it
11:30tskabiI can't see the location of errors when compiling with swank/clojure. Can someone please help?
11:30tskabiI'm using lein-swank 1.4.4
11:31tskabiI can't see the location of errors when compiling with lein-swank 1.4.4. Can someone please help?
11:33ro_sttskabi: may i suggest moving your .emacs.d off to one side, grabbing github/overtone/emacs-live and trying that?
11:33tskabiok
11:34ro_sthere's my working project.clj. using lein2
11:34ro_sthttps://www.refheap.com/paste/4fca314fe4b079c36aab3db1
11:34tmcivertskabi: what do you mean 'compiling'? Are you running 'lein plugin install lein-swank "1.4.4"'?
11:34tskabii mean i ran c-c c-k
11:34ro_sttskabi: when i use clojure-jack-in, and then C-c C-k
11:34ro_stand then run something in repl that causes an exception
11:35ro_sti get colourised stack trace with line numbers
11:35tskabiro_st: I get that when I run c-c c-l but not c-c c-k
11:35tskabibut no line numbers
11:35ro_sttry emacs-live
11:36ro_sti'm using vanilla emacs-live, with a font and color-scheme change, and maxframe and linum switched on
11:37tskabii will try lein2 first
11:37ro_stgood luck
11:37tskabity
11:45irc2samustechnomancy: 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:49cliftonmost 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:50ejacksonclifton: yup, I this Chas Emerick's book is a good bet, or Fogus's
12:50winkclifton: I've started with noir. just because I'm also doing webdev
12:50cliftonright on, i like noir syntax a lot... haven't built anything just yet
12:51liftdeadtreesI like 4clojure.com for working through some examples, seeing other peoples code, and getting the Clojure way
12:52winkI'm reading Fogus' book right now, but I usually prefer hands on learning :P (but I like the book)
12:55cliftonEmerick's book also looks fantastic
12:55cliftonthanks for the input guys
13:45Bronsa[coll {:foo 1, :bar 2}], (get coll :foo), 1000000 runs, 449 msecs
13:45Bronsa[coll {:foo 1, :bar 2}], (-lookup coll :foo nil), 1000000 runs, 321 msecs
13:45Bronsa[coll {:foo 1, :bar 2}], (:foo coll), 1000000 runs, 411 msecs
13:45Bronsaops
13:50aphyrAnyone know where dissoc-in went in 1.3?
13:53tmciveraphyr: looks like it may have gone to clojure.core.incubator
13:56aphyrLovely, thanks. :)
13:57gfrederi`in the lein-cljsbuild rhino-repl, how do I load my cljs code?
13:58gfrederi`(ns foo.bar (:require ...)) didn't seem to work (though it pretended to)
14:02gfrederi`okay think I got it
15:15xuser13:53 -!- carllerche [~carllerch@208.87.61.246] has joined #clojure
15:32sdevijverI'm getting this error after configuring the leiningen plugin in eclipse: Leiningen Managed Dependencies issue: unknown problem
15:33sdevijverI'm on ubuntu, the same setup (counterclockwise + leiningen plugs) works on windows
15:42borkdudesdevijver did you use the new ccw plugin?
15:42borkdudesdevijver which was released a few days ago
15:43sdevijverborkdude, not sure, let me check
15:44borkdudesdevijver with the new plugin, you don't need the additional leiningen plugin
15:44borkdudesdevijver it's an all in one now
15:44sdevijverborkdude, I have 0.8.0STABLE001
15:46sdevijverborkdude, I've removed the leiningen nature from the project, still getting the same error
15:46borkdudesdevijver maybe try the newer one https://groups.google.com/forum/?fromgroups#!topic/clojuredev-users/UhfnjBvIips
15:47borkdudesdevijver uninstall the previous leiningen and ccw plugin though
15:53sdevijverborkdude, it's alive! thx for your help
15:54borkdudesdevijver cool
15:56sdevijverccw key bindings have changed :)
15:57sdevijverborkdude, 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:57borkdudesdevijver on the website they don't point to the beta I think
15:58sdevijverborkdude, indeed, but apparently that older version of ccw is now faulty (although the version of about one week ago works perfectly)
15:59borkdudesdevijver with the ccw + leiningen plugin (two separates) there were some issues, you had to follow an exact order to get things working
15:59Omer&"a"
15:59lazybot⇒ "a"
16:00borkdudesdevijver for example, if you turned on the clojure nature before converting to a leiningen project, it failed
16:00sdevijverborkdude, it failed indeed :)
16:01borkdudesdevijver 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:03sdevijverborkdude, I'm actually migrating from windows to ubuntu (running in vmware), I'm starting to add mongodb to the mix now
16:03borkdudesdevijver what has mongodb to do with it?
16:04muhoocemerick: i've been integrating friend with noir. so far so good, though some changes to noir were required.
16:05sdevijverborkdude, as far as I know mongodb doens't run on windows?
16:05borkdudesdevijver it sure does
16:05borkdudesdevijver https://groups.google.com/forum/?fromgroups#!topic/clojuredev-users/UhfnjBvIips
16:06borkdudesdevijver eeks, sorry: http://www.mongodb.org/display/DOCS/Quickstart+Windows
16:07sdevijverborkdude, thx for that :)
16:32RaynesI'm going to vmware Ubuntu on my mac tonight, because I'm cool like that.
16:34ejacksonRaynes: big pimpin !
16:35sdevijverRaynes, just did the same thing tonight :)
16:35sdevijverRaynes, used xubuntu though
16:35RaynesWe can be cool together.
16:36borkdudeI have ubuntu in parallels, am I cool ?
16:36Bronsai am typing from ubuntu, what do i win?
16:38ejacksoni think its carpal tunnel and monitor tans for us all :)
16:39ejacksonstill, I love it !
16:50sdevijverI'm working with eclipse and windows and ubuntu *at the same time*, what do I win?
16:51sdevijverI have to use /s/eclipse and/eclipse in/, what do I win?
17:15cemerickmuhoo: like?
17:20muhoocemerick: https://github.com/kenrestivo/noir/commit/cfbb62e27cf08ff1b3229661a9cdf6738982de5e
17:21KirinDavemuhoo: Not a big deal, but curious why you used get-in? Faster?
17:22muhooKirinDave: (comp habit readability ignorance), probably
17:22KirinDaveMaybe I am just weird for preferring -> for nested retrieval when keywords are the keys.
17:23muhooor -?>, in case some of them are empty
17:23technomancywith keywords you don't need -?>
17:23muhooah, cool, thanks
17:25cemerickmuhoo: oh, right, noir uses a dynamic var for session :-/
17:25technomancy=(
17:26muhooyeah, i feel bad about adding all that complexity, but i need to Make It Work (tm)
17:26KirinDavetechnomancy: So I have a handful of people over here who want to bless you and rain beverages upon you.
17:26KirinDavetechnomancy: In the best possible way, mind you.
17:26technomancyKirinDave: heh; wonderful
17:26technomancywhat's the scope of "here"?
17:27KirinDavetechnomancy: CrowdFlower
17:27KirinDavewe've almost totally phased out scala
17:27technomancycool; how's the transition been?
17:27KirinDaveAnd everyone is so happy about leiningen
17:27technomancy=D
17:27KirinDaveBecuase we were so abused by sbt/ivy or raw maven
17:28cemerickmuhoo: Don't feel bad, it's a necessary evil given the use of the var.
17:28KirinDave"Oh good.I want to use a Yammer library and a Twitter library."
17:28technomancyKirinDave: http://wondermark.com/c/2010-09-14-657stop.gif <- ?
17:28KirinDavetechnomancy: 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:34muhoocemerick: next i have to figure out how to get openid to work with google apps via step2. pray for me.
17:34cemerickstep2?
17:38muhoohttp://code.google.com/p/step2/
17:39muhooit's based on openid4java. i'll at least try to adapt it as a friend workflow. that's my goal anyway.
17:39cemerickmuhoo: friend already uses openid4java to provide openid. Why use step2?
17:40muhoobecause google apps uses a different discovery protocol than regular openid
17:40cemerickah
17:40muhoohttps://sites.google.com/site/oauthgoog/fedlogininterp/openiddiscovery
17:40cemerickno, no, don't link me to the madness!
17:40muhoooh, you've answered dozenss of mine. i owe you :-)
17:41cemerickyeah, nope, I'm not gonna read that. :-D
17:41muhooi wouldn't expect any sane person to.
17:42cemerickmuhoo: a friend workflow that makes all that work will be most welcome by the other guy that needs it. ;-)
17:42muhooi'm thinking that may be one way i can contribute, yes.
17:43cemerickI need to break out the openid workflow pronto, so people don't expect to have everything included in one big hairball.
17:43muhoohow would you do it? like ring with sub-projects in lein?
18:51gfrederi`this confluence editor appears to be dysfunctional?
19:33technomancygfrederi`: yes
19:34aperiodicdoes anyone have a spec of how native deps in jars should be organized?
19:34aperiodicmy googling is proving fruitless
19:36aperiodicah, found the README of dnolen's native-deps plugin
20:29technomancyaperiodic: unfortunately right now the source is the only documentation
20:29technomancyaperiodic: leiningen supports a subset of the native-deps plugin; in particular you can't put a jar inside a jar
20:51cshellcemerick_away: Wow, integrating friend into noir was super simple
21:36rafb3hey
21:36rafb3care to review my newbie clojure code and give feedback on what could be more interesting?
21:36rafb3https://gist.github.com/2843589#file_subs_sum.clj
21:37spjtrafb3: 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:38tmciverrafb3: yes, not parens on their own lines.
21:38tmciverno*
21:38TimMcExcept in some special cases.
21:38spjtI only learned what ->> means yesterday so I'll just shut my mouth
21:39spjtbut otherwise it looks good, and it gives me courage to ask my question.. wtf is proxy?
21:39TimMcAs in, only have dangling parens when the conventional format becomes absolutely annoying. You'll know when.
21:39spjtI 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:40TimMcspjt: proxy is a lie, and an inefficient one at that.
21:40spjtTimMc: http://pastebin.com/ERNzwdgU
21:41spjtTimMc: 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:42tmciverrafb3: I believe you can put your program args directly into your -main fun rather than parse them manually as you are doing.
21:43locojayhi 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:44eckrothlocojay: you are turning your map into a sequence
21:44eckrothlocojay: it would look like this: [[:1 2] [:2 3]]
21:45eckrothlocojay: I figure you don't intend that since the first arg to your extra function is called "dict"
21:46locojayyes i need to apply a function to a sequence of dicts
21:47TimMcspjt: Ah, right. That's one of the few good places for proxy. Let me dig up some code...
21:47locojaylet me gist the complete code
21:48locojayhttps://gist.github.com/2860895
21:48spjtThese 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:49TimMcspjt: By the way, (let [a (init-stuff)] (doto a (...))) can be written (doto (init-stuff) (...))
21:49locojayeckroth but why do i get output to stdout?
21:49eckrothlocojay: ok so I assume csvmapseq is actually a sequence of maps, like [{:1 2 :2 3} {:4 5 :6 7}] etc.
21:49eckrothlocojay: which is different than your first gist
21:49locojayexactly
21:50locojayyeah sry should have been that
21:50spjtTimMc: 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:50eckrothlocojay: I don't know why you get output; maybe lein run does that?
21:51eckrothlocojay: so what was your question? why you get stdout or why you get (2 2) as the output?
21:51locojaywith the first gist it output (2 2) .
21:51locojayyes thats my question
21:51TimMcspjt: 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:51locojaysince im not printing
21:51eckrothlocojay: which one is your question? :)
21:51eckrothlocojay: ah; I don't know why it prints, sorry
21:51locojaywhy i do get output to stdout if i don't do a print
21:52locojayk i will try to do a lein install and run the jar then
21:52xeqiwhat is you :main in you're project.clj?
21:52spjtTimMc: I'll look at it and just be jealous that you could use clojure for an assignment.
21:52locojay:main projectname.core
21:53TimMcspjt: https://github.com/timmc/CS4300-HW3/blob/master/src/timmcHW3/gui.clj#L179
21:53TimMcproxy a JComponent, override paint
21:54locojayand i have a main function in core https://gist.github.com/2860932
21:54rafb3thanks for the feedback folks!
21:54spjtit's a use of proxy but I still don't understand what it actually does
21:54spjtExpands to code which creates a instance of a proxy class that
21:54spjtimplements the named class/interface(s) by calling the supplied
21:54spjtfns.
21:54TimMcIgnore all my naming conventions. And only use :use with :only. :-/
21:54spjtat least it's a recursive definition.
22:05muhoocshell: i'm curious how you handled logout? this is roughly what i ended up with : https://www.refheap.com/paste/2973
22:17locojayeckroth: must be a leiningen error since i don't have any probs with the jar
22:18eckrothlocojay: interesting; maybe it's not an error, maybe that's just how lein run works
22:20locojaythanks will send to mailing list and see...
22:54cemerick_awaycshell: that's the way it's supposed to be :-)
23:31KirinDaveIs there a good alternative to capistrano/fabic with clojure as the host language?
23:34xeqipallet ?
23:34KirinDavepallet is more like a flexible chef alternative
23:34KirinDaveI 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:37antares_KirinDave: pallet has a couple of dependencies that may be helpful. You probably can get away with just a good SSH client
23:37KirinDaveAha
23:37KirinDavegithub search strikes closer than google
23:38KirinDavehttps://github.com/drsnyder/gantry
23:38KirinDaveGantry
23:44mthvedtanyone know a good parser lib for clojure?
23:50michaelr525hello
23:50michaelr525and good morning!
23:59antares_mthvedt: parseley. But it depends on what kind of parser you need. I just use ANTLR or ragel and use Java parsers from Clojure)