#clojure logs

2010-01-11

00:21chousermebaran151: ha!
00:22mebaran151in Soviet Russia, Java writes You!
00:23mebaran151though oddly enough, Java is the opposite of a classless language ....
00:24mebaran151but it does personify class struggle :)
00:34defnI wonder how many lispers grew up poor...
01:10mebaran151hmmm
01:10mebaran151any ClojureQL junkies about? I've got an col declared primary_key and it's still letting in nils
01:44RaynesI wish I could get Slime working with the 'new' branch. :'(
01:55mebaran151I wish I could get auto-gen id's to work in clojureql
02:54mebaran151I'm having ClojureQL anxiety
03:29LauJensenMorning team
03:29mebaran151oh Lau, just who I was looking for :)
03:29defnG'morning
03:30mebaran151I can't seem to get identity columns to work in derby
03:31mebaran151le paste: http://gist.github.com/274089
03:35mebaran151I also can't seem to get the examples to auto-inc an id either
03:37LauJensensec
03:38LauJensenAre you working on a recent pull ?
03:38mebaran151I'm gonna try to document all this on your wiki once I get a chance
03:38mebaran151fairly recent
03:38mebaran151my sources have references to auto-inc and not-nulls
03:38LauJensenGreat
03:38mebaran151I'm running Derby 10.4.2
03:39LauJensenLet me just check my snapshot
03:39LauJensenYea, its non-nulls instead of not-nulls in my recent push
03:39mebaran151http://gist.github.com/274092
03:40LauJensenSame
03:40mebaran151oh yep it is
03:40mebaran151but auto-inc should be the same?
03:40LauJensenBut as always, if something isn't working, print out the SQL statement and see whats missing, I expect it would be quite clear in this case that NOT NULL was not being set for all those variables you listed
03:41mebaran151I'll look for an example of compile-sql
03:42LauJensen(with-connection [c (make-con...)] (compile-sql (query tables *) c))
03:42LauJensenor even better
03:42LauJensenhttp://whollyweirdwyrd.blogspot.com/2009/12/testing-clojureql.html
03:43defnboom boom chicka chicka boom boom
03:44defnhow do i get all of the items after the 2nd item in a list?
03:44defnis there any way better than (rest (rest coll))
03:44LauJensen,(drop 2 [1 2 3 4])
03:44clojurebot(3 4)
03:44defncool thanks LauJensen
03:45LauJensen(->> [1 2 3 4] rest rest)
03:45LauJensen,(->> [1 2 3 4] rest rest)
03:45clojurebot(3 4)
03:45LauJensennp
03:45unfo-what is '->>'
03:46defn,(doc ->>)
03:46clojurebot"([x form] [x form & more]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."
03:46unfo-ah
03:46LauJensen,(->> (range 10) (filter even?) (map inc))
03:46clojurebot(1 3 5 7 9)
03:46unfo-fold right, sort of?
03:46LauJensenNo map is more like fold right
03:47defnthis changes the order of computation
03:47LauJensenSort of
03:47LauJensenIt just takes the first arg and sets it as the last arg to the remaining forms
03:47defnit's like obj.method1.method2.method3
03:47mebaran151LauJensen, I'm getting an error, wrong number of args passed to clojureql$fn
03:48LauJensenmebaran151: Paste the culprit please
03:48defnLauJensen: what's the diff between -> and ->>
03:48LauJensen-> threads the first item as the second item, ->> threads the first item as the last item
03:48LauJensen,(-> #(+ % 2) (map (range 10)))
03:48clojurebot(2 3 4 5 6 7 8 9 10 11)
03:48mebaran151http://gist.github.com/274096
03:49mebaran151I love the Clojure seq library: it's what drew me to the language
03:49mebaran151I realized I spent most of my time manipulating collections rather than just objects
03:50LauJensenI wish I was that clever - I was really into Common Lisp when Clojure came along, you know what first got me interested?
03:50mebaran151hm?
03:50LauJensen(javax.swing.JOptionPane/showMessageDialog nil "Hello GUI")
03:50mebaran151oh heh, I do most of my GUI stuff in Adobe AIR, so I never had to write Soviet GUI
03:51LauJensenmebaran151: I cant anote a gist, but you define c as the connection, but never pass it to compile-sql
03:51mebaran151I tried both ways
03:51mebaran151inserting a c after compile-sql produces
03:51LauJensenstarted]))) == started]) c))
03:52mebaran151no multimethod for org.apache.derby.impl
03:53mebaran151okay got that to work
03:53mebaran151now I see that I'm not getting nulls and IDENTITY columns, but the real question is why
03:55LauJensenHere I get this "CREATE TABLE invoices (id int NOT NULL GENERATED ALWAYS AS IDENTITY ,consumer_id int NOT NULL ,item_id int NOT NULL ,details varchar(640),snapshot_cap decimal(12, 4),started int NOT NULL ,executed int,expires int,PRIMARY KEY (id))"
03:55mebaran151hmmmm
03:55LauJensenNext time you can use a paste bin to get annotations
03:56mebaran151should I repull?
03:56mebaran151so I'm calling create table correctly but my clojureql is broken
03:56LauJensenTry repulling to a new directory and add that to cp instead, see if you get a different result
03:56LauJensenI have 2 major merge requests coming up, so things will start shaking soon, as 1.0 is coming very close
03:56mebaran151man I don't have gradle: I borrowed this build
03:57LauJensenhehe
03:57LauJensenGradle takes what, 25 secs to install ?
03:57mebaran151never installed it yet
03:57mebaran151you can't beat lein for the install
03:57LauJensenI think I show how in the blog-post
03:58LauJensenunzip gradle, add 2 env-variables, thats it
03:58LauJensenexport PATH=$PATH:/PATH/TO/gradle-0.8/bin
03:58LauJensenexport GRADLE_HOME=/PATH/TO/gradle-0.8
03:58mebaran151yep I googled
03:59mebaran151is the version on clojars functional?
04:00LauJensenYes, but Clojars is broken in that if you search for a repo you rarely get the right one, so clojars.org/clojureql
04:00LauJensenI'm out, highlight 'LauJensen' of privmsg if u need me
04:03mebaran151thanks Lau
04:03mebaran151I'll keep on hacking
04:03esjGood Morning, Parentherati.
04:03mebaran151you've been great
04:11LauJensen*sigh* already back again
04:12LauJensenA customer called me up, because they had some old html data tucked away in a database which they needed to have extracted and ordered. Clojure+CQL made it almost too easy
04:14esjJust so long as the customer doesn't know that
04:15LauJensenThey'll be happy to hear it
04:17mebaran151got gradle up and running
04:17mebaran151now to go on a building adventure!
04:19Raynes,(->> 3 .toString println)
04:19clojurebot3
04:20RaynesThat's pretty cool.
04:20RaynesIt backwardizeseses it. :D
04:20Raynes(doc ->)
04:20clojurebot"([x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."
04:22LauJensenHaha Raynes - We should ask Rich to update the doc string "Macro which backwardizeses the expressions"
04:22RaynesAbsolutely. :)
04:23unfo-what is the diff between -> and ->> ?
04:23Raynes,(-> 3 .toString (println (str "meow")))
04:23clojurebot3 meow
04:23Chousukethe expr is threaded to the second and last place, respectively
04:23Raynes,(->> 3 .toString (println (str "meow")))
04:23clojurebotmeow 3
04:23RaynesThat is the difference.
04:23Raynes:D
04:23unfo-aaa ty!
04:28LauJensenhehe, somebody will have fun reading this log tonight - First we discuss -> vs ->> and someone asks, whats the diff? 20 minutes later unfo and Raynes repeat the process :)
04:29unfo-:P
04:31Raynes:o
04:41LauJensenRaynes: You accidentally pasted your Twitter update in here :(
04:41LauJensen(just kidding)
04:47defnso... what's the difference between -> and ->>?
04:49the-kennydefn: The position where the argument gets inserted
04:49the-kenny,(doc ->)
04:49clojurebot"([x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."
04:49the-kenny,(doc ->>)
04:49clojurebot"([x form] [x form & more]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."
04:49the-kennySecond vs. Last
04:49defnthe-kenny: i was joking
04:49defnas per Lau's quote above
04:49the-kennydefn: Uh.. sorry.
04:49defnnp :)
04:50the-kennyI was writing on a text for my art class and I didn't read the quote
04:52esjok, so three discussions about -> in, feels like time to figure out emacs and slime :)
04:55esjon a different note. (seriously) A memoized function is in some sense a memory leak. Is there a way to limit the number of values it stores ? Or is this default behaviour and I didn't realise ?
04:56unfo-well it is a stupid cache, in that it does not discriminate and caches every result
04:56unfo-if you want sophistication, implement your own :-)
04:56unfo-this is what i learned from Programming Clojure :)
04:57esjohoh, the problem with that is that anything I do is, by definiton, stupid. So that's a dead end :)
04:58esjthanks for the answer though, appreciated.
04:58unfo-also worth noting: you can use memoization in conjuntion with lazy-seq to make it lazy :)
04:59esjinteresting
04:59unfo-esj, but still if you do (take-nth 100000000000 (some-big-calculations-memoized)) it is still gonna take lotsa memory :)=
05:00esjyeah, unless I use a circular buffer on the memoization :)
05:40quizmeis it possible to make the snake game without mutable state ?
05:40unfo-i haven't gotten to the snake game part yet in my ebook ^_^
05:42RaynesI believe it's possible.
05:53Chousukequizme: I don't think it's possible to write any game without *some* state, but you sure can keep it down to minimum
05:55quizmechousuke: like you could keep making cheap copies of snake positions for example.
05:57Chousukeyou still need to store the position in a ref
05:57Chousukethat's mutable state
05:57Chousukeit's just controlled :)
06:00RaynesIt feels possible. :(
06:00quizmewhate if the position was a sequence rather than a number
06:01quizmethen that sequence could be a series of cheap copies
06:01LauJensenThis is a 3 or 4 part series of RETRO games written functionally, can be quite an eye opener in that he reduces much state: http://prog21.dadgum.com/23.html
06:03esjinteresting link
06:07quizmegreat article
06:08esjits nice how Clojure deals with some of the issues with FP he raises. Things like destructuring and persistent types would have been useful to him, I think.
06:12hdurerSorry, is there anybody here who could help me with leiningen? I have been trying to get at least the sample (from the git repo) working with the stable (or current trunk) leiningen. But the uberjar generated just won't run the app.
06:13hdurer$ java -jar nomnomnom-standalone.jar
06:13hdurerFailed to load Main-Class manifest attribute from
06:13hdurernomnomnom-standalone.jar
06:13crazzyfordhave you set main-class in project.clj
06:13crazzyfordand called gen-class in that namespace?
06:13hdurerI have done nothing except checkout the git repo and do lein deps; lein compile; lein jar; lein uberjar
06:14crazzyfordits not main class, my bad
06:14crazzyfordits just :main
06:14hdurer(in the sample/ subdir of the repo)
06:14crazzyfordthat doesn't have a main
06:14hdurerBut sample/src/nom/nom/nom.clj does contain the gen-class as far as I can see
06:14crazzyfordlook at actual lein for a proper example
06:14crazzyfordpost us up your project.clj file
06:15crazzyfordoh right
06:15crazzyfordyeah their sample won't work with uberjar
06:15hdurerGreat.
06:15crazzyfordin project.clj, you need to set a :main
06:16hdurerI had something that used to work (even the sample used to work with that old version (0.5 something?)
06:16crazzyfordso that should be nom.nom.nom or summat like that
06:16hdurerand now everything is broken
06:16crazzyfordweird
06:16crazzyfordI'ma patch the sample now for ye
06:17hdurerputting a :main nom.nom.nom in the project doesn't fly either
06:18hdurerOops. Sorry. It does work.
06:18crazzyfordI've forked lein, submitting patch as soon as I've tested
06:19hdurerexcellent.
06:20hdurerWould you let me know your username on github so I can check now?
06:20crazzyfordcan you paste your new copy of project.clj
06:20crazzyfordjust so I'm sure I've set the :main class correctly
06:20hdurerOne sec. Let me do a cleanup and try again. On a second machine it just didn't work.... :-(
06:21hdurerGive me sec to see if I can reproducably make it work/fail
06:21hdurerlisppaste8 url?
06:21lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
06:22crazzyfordI'm at http://github.com/tcrayford/leiningen
06:22crazzyfordcheck that that project.clj is roughly the same as yours and I'll submit a pull request
06:24lisppaste8hdurer pasted "New leiningen sample/project.clj" at http://paste.lisp.org/display/93229
06:24crazzyfordexactly the same as mine
06:25lisppaste8hdurer annotated #93229 "Diff for this file to current master version" at http://paste.lisp.org/display/93229#1
06:26crazzyfordpull request is off
06:26crazzyfordcheers
06:27hdurerOK, that does work. I goofed up on the other machine which has "lein" as a symlink to the git repo's version.
06:27crazzyfordhah
06:27hdurerNot sure my setup there is broken or if the master branch version doesn't work
06:28hdurerNote that "lein new foo" doesn't include a :main element in foo/project.clj
06:28hdurerSo, if that *is* required, the new action should be fixed as well.
06:29crazzyfordits only required for uberjars
06:29hdurerI find that the mose useful feature of leiningen
06:29hdurers/mose/most/
06:30crazzyfordits up to what you're doing with it
06:30crazzyfordI never put stuff in jars
06:30crazzyfordneeds my swank
06:31crazzyfordposted that up under lein/issues
06:31hdurerI never got swank working with clojur
06:31crazzyfordI can't get it working with lein and it set as a dependancy of my project
06:31hdurerbut I am not willing to put much work into it --- swank works fine with my SBCL setup which is more important.
06:32crazzyfordso I just compiled an uberjar out of clojure-swank and stuck it in my project under /libs
06:32crazzyfordaye
06:32crazzyfordI'm kinda new to the whole emacs/slime scene so has been useful
06:42neotykHi *
06:43rhickeyneotyk: hi
06:43neotykcrazzyford: I use swank-clojure-project
06:43quizmeLauJensen: awesome article. I think I understand the functional style of programming much better now.
06:44LauJensenGreat
06:44neotyknew post: http://bit.ly/7xi5aK clojure.core/str makes sense now :)
06:45LauJensenLook forward to reading
06:45neotykI hope I made sense in it
06:45neotykLauJensen: there should be nothing new for you, this is my learning experience :)
06:45neotykLauJensen: but I'm looking forward for your comments
06:46LauJensenAh ok
06:46LauJensenI think I'm dropping a post later today as well so we can exchange blows :)
06:46neotykgreat
06:47RaynesI'm going to assume you aren't talking about cocaine.
06:47Chousukestr uses somewhat outdated style :)
06:50neotykChousuke: next one is apply
06:50neotykChousuke: is apply newer style?
06:52Chousuke~def apply
06:52Chousukeno :P
06:52neotyklol
06:52neotykwhere do I find new style ?
06:53Chousukebasically, any direct use of . is old-style. Also I think the ((fn ... ) args) thing in str isn't very common anymore.
06:55Chousukebut those are very old functions, anyway :)
06:59neotykso it would go like .toString and anonymous function defined by #(?
06:59Chousukeor just using let, I guess.
08:02defnloo
08:03RaynesYay! Leiningen works!
08:05RaynesThe uberjar task has got to be the most awesome thing since Clojure itself was first thought up.
08:11sethsRaynes: swank-clojure-project is pretty sweet too
08:11Raynesseths: Indeed.
08:42RaynesLeiningen coupled with swank-clojure reduces classpath annoyances exponentially.
08:42RaynesI do believe I'll be prescribing this medication to new patients.
08:46sethsRaynes: uberjar will def. be part of my presentation on Leiningen this week to a Clojure meetup
08:46RaynesGood. Because it's awesome. :D
09:12chouserSo I implemented the agent error handler proposal yesterday. http://www.assembla.com/spaces/clojure/tickets/30
09:15chouserI'm least sure about how I moved the error pointer into the same AtomicReference as the action queue, but I think something like that was necessary to manage restart thread-safely.
09:18neotyk~def for
09:19chouserah, 'for'. So beautiful in its simplicity.
09:20neotykLauJensen: thanks for your comment :) you are evil
09:26defnchouser: are there any places in clojure where there is > 3 arity
09:26defncore functions i mean
09:27chouserhm.. there are certainly some that take & rest args of course.
09:27defnnod, is that true n-ary?
09:27defnor is that like unary?
09:28defnlike nested unary or soemthing
09:28defnsomething
09:31chouserI guess I'm not sure what you mean. You can invoke such a function either with specific args to its .invoke method, or with a seq of args to its .applyTo method.
09:35defnchouser: that's what i was looking for, thanks
09:35defnchouser: what news on the book btw?
09:37chouserWell... I think we've got the first draft of chapter 5 complete. But no word on the MEAP of the first 4. Still "any day now" I guess. :-P
09:38defn:)
09:38defnim excited for it
09:39chouserThat's encouraging to hear, thanks!
09:41rhickeychouser: looking now - thanks for the patch!
09:42defnare there any clojure libraries to search html documents by xpath and/or css3 selectors?
09:42rhickeytypo - "agent-errors ... DEPRECATED: Use 'agent-errors' instead."
09:42chouserheh.
09:42chouserconfusing
09:47defnanyone have a parser they recommend for java?
09:47rhickeychouser: at first glance it looks ok (bundling the error so controlled by same CAS)
09:47chouserdefn: enlive and c.c.zip-filter both support searching xml and html by vaguely xpath-like expressions.
09:48defnchouser: ah, works for me -- thanks
09:48rhickeychouser: I'll have to spend some more time staring at it
09:48chouserrhickey: ok. you agree something like that was necessary?
09:48rhickeyyes, to keep same model
09:48rhickeytricky, right?
09:48chouseryes
09:49chouserthat was my second or third attempted solution.
09:49rhickeybut much better to keep it than try another
09:50RaynesWait, chouser is writing a book too?
09:50Raynes:o
09:51chouserso there are some small time-windows that would be tricky (and I think unnecessary) to solve. Like an agent can error out while a 'send' is being set up. In that case, I go ahead and queue it even though the queue is in fail state.
09:52chouserRaynes: Yep, with Fogus. "The Joy of Clojure" ...but we've got nothing to link to or show off yet.
09:52Rayneschouser: Awesome. Hopefully you'll procrastinate until 1.2 comes out, so you can document deftype and reify. :>
09:52rhickeychouser: what happens if someone sends an action in the middle of a restart?
09:54chouserRaynes: I think deftype, reify, and protocols are probably close enough to their final state already -- we plan to cover them regardless of 1.2 timeframe.
09:54RaynesOh, neat.
09:54defnso im wondering...if i have some foreign jar from some third party, is there a way to know what i need to (use) it as?
09:54RaynesMaybe Practical Clojure will as well.
09:55rhickeychouser: nm, same prior.count logic works across restart and enqueue
09:56chouserright, that was the requirement the drove combining error and the queue
09:56rhickeyso should I pull new into master?
09:56chouserso that the execute gets kicked off exactly once
09:56chouseryes!
09:57RaynesYes!
09:57rhickeychouser: yes, that execute only once logic was the whole trick in the agents
09:58defni just got enlive from clojars, but can't seem to (use 'enlive), 'enlive.enlive, 'enlive.enlive-html, etc.
09:58chouserand wantinto to do that without locking something on every send drove me to write the ActionQueue class.
09:58defnHow do i know what to use it as?
09:59Raynesdefn: I'd probably just extract the jar or open the jar in Emacs and see the directory structure.
09:59chouserrhickey: I did feel a little dirty using the ActionQueue concrete class instead of some new interface. Is that okay because it's a private class?
09:59rhickeychouser: yes
09:59LauJensenneotyk: np :)
10:00defnRaynes: thanks
10:00rhickeyif you were writing it in Clojure you'd just have had a little map or tuple
10:00chouserrhickey: yep. Instead I got to write 8 yummy word-filled lines.
10:01rhickeygo Java!
10:01chouserit's worse because my Java is so lousy. if(error) oops if(error == NULL) gah if(error == null) ...
10:02rhickey... 23 files changed, 3635 insertions(+), 1011 deletions(-) ...
10:03RaynesBang.
10:03chouserwhee!
10:04rhickeytests pass, contrib tests pass...
10:04rhickeywhat version of contrib should I be using?
10:05rhickeyI had been using master, see all these branches now
10:06chousercontrib 'new' should probably be merged into 'master' as well.
10:06ordnungswidrighi all
10:06rhickeychouser: I guess after I push this?
10:07chouseryeah, not before.
10:08chouseryou could test contrib 'new' too if you want, though I don't think there's much different there
10:10rhickeychouser: that doesn't work at present - contrib/new needs to pull from contrib/master some changes made to deal with release?
10:10rhickeye.g. bytes
10:13ordnungswidrigIs the a quickcheck implementation for clojure? I know clojurecheck is somewhat paused and more about TAP than quickcheck atm
10:15chouserrhickey: ok, I wouldn't bother with it. contrib new has only one commit not in contrib master, and there don't seem to be any tests for it.
10:17rhickeybrave new world - http://github.com/richhickey/clojure/commit/e08a7a8add966827179c3431c1e31c56dbd64f40
10:17cemerickrhickey: oh, very exciting :-)
10:18Raynes!
10:18chouserbrave reify world, you mean.
10:19rhickeyI'll take any qualifier other than broken :)
10:22rhickeyRaynes: builds with new properties don't clean up old jars
10:22rhickeyant dist will
10:23rhickeyRaynes: are you sure?
10:23RaynesMhm. Just pulled and 'ant'.
10:23RaynesIt built 'new' snapshots instead of master snapshots. I assumed you didn't update the 'ant' file before pushing.
10:23rhickeyso you'll have both that and clojure-1.2.0-master-SNAPSHOT.jar
10:24chouserlooks ok here -- jar filenames and repl startup text both say clojure-1.2.0-master-SNAPSHOT
10:25rhickeychouser: here too
10:25RaynesThat's odd.
10:25RaynesGuess I'll re-clone.
10:25rhickeyRaynes: do ant dist, then ant
10:25rhickeybiab
10:26RaynesSame stuff.
10:28sparievhello, nub question. I've written function to format dates, it works but I wonder could it be made more idiomatic/concise - http://paste.lisp.org/display/93239
10:31esjspariev - as an aside, if you're going to use dates heavily, take a look at Joda Time.
10:32Chousukespariev: using rest args seems to be pointless in that case
10:32Chousukespariev: you should instead make it a function overloaded by arity
10:32Raynesbuild.clojure.org/snapshots needs new builds. :>
10:33Chousukespariev: ie. (defn format-date ([date] (format-date date "dd MMM yy")) ([date format] ...))
10:33sparievesj: thanks, that looks better
10:34sparievChousuke: ups, I misse, thanks too
10:36esbenahow do I join two sequences? (like 'addAll' for java collections)
10:38Chousukeesbena: there's concat
10:38esbenadoh
10:38Chousukeesbena: it's lazy, too :)
10:39Chousuke,(time (first (concat (range 10000000) (range 10000000))))
10:39clojurebot0
10:39clojurebot"Elapsed time: 0.191 msecs"
10:42esbenaonce again, thx a lot.
10:49crazzyfordis there a guide to clojure.stacktrace?
10:50crazzyfordI want to see the full cause of an expression, something like (print-stack-trace (/ 1 0))
10:51Chousukepst probably takes the exception object
10:51Chousukewhich is accessible as *e in the repl
10:52crazzyfordperfect
10:52crazzyfordchairs
11:08Raynesrhickey: Heh. Just figured out why it was doing that before. I was still on the 'new' branch. :o
11:11RaynesBleh. swank-clojure still doesn't work, but now I'm actually kind of screwed unless I use 1.1. :\
11:12ordnungswidrigdefprotocol went to master?
11:19somniumRaynes: are you using a slim version of swank?
11:19Raynessomnium: No.
11:20KjellskiHi there...
11:20Raynessomnium: I think I'm the only one who gets this. Which is great, because then I really am screwed.
11:20somniumRaynes: just put a slim version in lib by hand and it should be all good
11:23ordnungswidrigWhat's this: "(clojure.core/in-ns 'de.kotka.clojurecheck)" (from http://bitbucket.org/kotarak/clojurecheck/src/tip/src/de/kotka/clojurecheck/combinators.clj)
11:23ordnungswidrigIs this outdated syntax for the ns macro?
11:23Raynesjava.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (pprint.clj:1) What the hell does that non-sense mean, anyways? :\
11:24somniumRaynes: it means contrib needs to be clean and built against the clojure version youre using
11:28RaynesThat was it.
11:28Raynessomnium: You sir, are my hero.
11:29somnium=)
11:30RaynesNow, we just need new builds on build.clojure.org/snapshots, and all will be well in the magic kingdom.
11:33cemerickach, I simply can never remember the signature naming convention for gen-class method impl vars (e.g. -methodName-void-int-int, etc).
11:34RaynesOh.
11:34RaynesWay ahead of me.
11:34RaynesThere /are/ new builds.
11:34RaynesHaha.
11:34RaynesLife is good, man, life is good.
11:36RaynesAren't any clojure-contrib snapshots yet though.
11:36RaynesOh, just didn't update the version number.
11:38KjellskiRaynes: Have you tried build.clojure.org?
11:38KjellskiRaynes : for jars it´s fine...
11:55crazzzyford,(binding [*DB* "foo"] (for [num [1 2 3] (str *DB*)))
11:55clojurebotUnmatched delimiter: )
11:56crazzzyford,(binding [*DB* "foo"] (for [num [1 2 3]] (str *DB*)))
11:56clojurebotjava.lang.Exception: Unable to resolve var: *DB* in this context
11:56crazzzyfordis this meant to happen?
11:56Chousukeyes.
11:56crazzzyfordmk
11:56crazzzyfordkinda annoying
11:56Chousukebinding is not intended to create new vars
11:57crazzzyfordI'm not properly using it like this
11:57Chousukeonly to dynamically rebind existing ones, to affect already compiled code that uses the var.
11:58crazzzyfordI'm using it for a with-db macro
11:58crazzzyfordbut I want to look up some more content based on one of the bindings in the for loop
11:58Chousukeeg. (def somevar) (defn foo [] (dostuff-with somevar)) (defn bar [] (binding [somevar 3] (foo)))
11:58Chousukefor is not a loop :)
11:58crazzzyfordyeah my syntatic bad
11:58hiredmanalso, for is lazy
11:59crazzzyfordhence I have to do a doall right?
11:59crazzzyfordif I'm loading stuff from a db
11:59Chousukeyeah.
11:59RaynesKjellski: What are you talking about?
12:01crazzzyfordheh, the repl's forcing of evaluation was messing me up
12:01KjellskiRaynes: Sorry... read the wrong thing out of your last messages...
12:02RaynesKjellski: No worries.
12:31RaynesI don't know if they are generated automatically or not, but it needs to be built against master or it isn't going to run with swank-clojure.
13:58{newbie}why?
13:58hiredmanthat's a first
13:59{newbie}wth
13:59{newbie}was that?
14:03mabesit would appear to be a drive-by stabbing... or something similar
14:03fdaoudFUNCTIONAL HUMOUR?
14:04fdaoudsorry for the caps lock didn't notice
14:11defmacrok
14:28technomancyRaynes: you can use the "new" contrib builds in the mean time
14:36LauJensenI blogged about feeding Reddit to Hadoop: http://www.bestinclass.dk/index.php/2010/01/hadoop-feeding-reddit-to-hadoop/
14:50mebaran151hey, Lau, is there anyway to insert-into return the primary key of the record it inserted
14:51mebaran151the return value of "1" isn't particularly informative, and it would avoid a race condition in trying to get the primary key of a newly inserted row
14:55{newbie}Am I the only one that thinks it wold be nice of letfn worked exactly as let?
14:55{newbie}for example
14:55{newbie}(letfn [zing (fn [x] (println x)]
14:55{newbie}(zing 3))
14:55{newbie}s/of/if
14:56mebaran151{newbie}, but then wouldn't it actually be let!
14:56{newbie}dam right!
14:56{newbie}'-.-
14:56stuartsierramebaran151: Hadoop is not a database. It has no concept of rows or keys.
14:57mebaran151oh I forgot to mention, I was talking about ClojureQL
14:57somniumyou still cant call zing from the body in let, no?
14:57mebaran151you closed the let there
14:57{newbie}let me test
14:57mebaran151you need letfn if you want to call the function recursively
14:58LauJensenmebaran151: yes there is
14:58{newbie}mebaran151: The syntax is correct
14:58{newbie}o nvm
14:59{newbie}than was an old example
14:59mebaran151LauJensen, hmm?
15:00LauJensen---> priv :P
15:04mabesLauJensen: awesome hadoop post. I've been meaning to look into how to use hadoop w/clojure so this will be perfect learning material.
15:05LauJensenGreat - Glad to hear it :)
15:09stuartsierraLauJensen: working on clojure-hadoop 1.1.0 to fix the missing config options
15:09LauJensenstuartsierra: No need :P
15:14{newbie} After I use the seq the results are cached what I don't know is if the access to the cache is random or not
15:15{newbie}s/seq/lazy-seq
15:16somnium{newbie}: seqs are like linked-lists
15:16{newbie}so reusing a seq multiple times is not a very good idea
15:17somnium{newbie}: if you want indexed access bettor off calling vec on it, if thats what you mean
15:19{newbie}yeah, reusing teh seqs is only worthy when doing some king of stream processing
15:37stuartsierraLauJensen: new source on Github, more config options
15:37LauJensenGood work Speedy Gonzales :)
15:37stuartsierraNot tested yet. :)
15:39cemerickwould there be interest in << from http://muckandbrass.com/web/x/AgBP being added to contrib? I've found it incredibly useful so far...
15:43the-kennycemerick: Wow, that looks cool
15:48ska2342Hi. Is it considered bad style to Thread/sleep in the action of an agent?
15:48LauJensenno
15:48cemerickheh. I'd say so. :-P
15:49cemerickthe-kenny: thanks. Not sure if anyone's using it so far, tho.
15:49the-kennyska2342: No, but I would use send-off to send the agent, or you could block other agents
15:50ska2342I was thinking about an action which polls some state somewhere (e.g. an URL), saves it and after sleeping sends itself to *agent* again. Yes, send-off would be the way to go. Just to demo the self-calling idiom.
15:50LauJensencemerick: Looks sweet
16:00stuartsierraska2342: a Timer may also help
16:00hiredmanScheduledThreadPoolExecutor
16:01ska2342stuartsierra: Usually I'd use a Timer, but I want to demo the idiom. This is not for a real-life program.
16:02stuartsierraok
16:02hiredmanScheduledThreadPoolExecutor!
16:05ska2342hiredman: OK, I've read that it's preferable to Timer. Where do agents come into the game?
16:06the-kennycemerick: I'll save the snippet here :)
16:06hiredmanska2342: why would they?
16:06the-kennyBtw. any recommendations on a code-snippet-manager? Maybe an emacs plugin?
16:07LauJensenthe-kenny: emacs gist integration ?
16:07ska2342hiredman: because I want to demo them :-)
16:07the-kennyLauJensen: hm.. not really what I'm searching for
16:07the-kennyLauJensen: I want something like a small database for saving snippets in different languages
16:08LauJensenthe-kenny: emacs gist integration ?
16:08the-kennyLauJensen: I use gists for showing small snippets of different things for everyone. But there isn't a good search etc.
16:09_schulte_the-kenny: if you use Emacs you could try an Org-mode file with embedded source-code blocks
16:09the-kenny_schulte_: I like the idea.. is there a way to highlight the blocks in the right language?
16:10_schulte_the-kenny: org-mode has tags and foldable outline levels which should help for organization, and it has facilities for embedding/exporting/editing the source-code blocks
16:10ska2342the-kenny: I tried to use the built-in wiki for that ages ago. Didn't work for me, though. Now, what was it's name...? (emacs-wiki-find-file ..something)
16:10_schulte_the-kenny: yea, hit C-c ' with the point on the code block
16:10the-kenny_schulte_: How do I insert a code-block? (sorry for these annoying questions)
16:11crazzzyford,(with-meta (ref {}) (:foo {}})
16:11clojurebotUnmatched delimiter: }
16:12crazzzyford,(with-meta (ref {}) (:foo {}))
16:12clojurebotjava.lang.ClassCastException: clojure.lang.Ref cannot be cast to clojure.lang.IObj
16:12_schulte_the-kenny: np, I use the following yasnippet http://gist.github.com/274611
16:12crazzzyfordare you not meant to be able to add metadata to refs?
16:12_schulte_the-kenny: the syntax is described here http://orgmode.org/worg/org-contrib/babel/reference.php#sec-1.1
16:15neotyk~def do
16:15clojurebotIt's greek to me.
16:15neotykwhere does do come from?
16:17michaeljaakaHi
16:17michaeljaakaI have function http://gist.github.com/274615
16:18michaeljaakadoes it work how it is written in comment?
16:18michaeljaakait is my fun but I'm not sure if it is eval lazily
16:19michaeljaakabecause there is indirect recursion on the same function with overloaded number of arguments
16:19michaeljaakait simply works like from (concat-seq '(( 1 2 3 4 ) ( 5 6 7 8 )))
16:19michaeljaakadoes ( 1 2 3 4 5 6 7 8 )
16:20Chousuke(comp apply concat) :P
16:20michaeljaakahmmm
16:20michaeljaakathe number of sequences it not known
16:20michaeljaakaI mean it is evaluated in lazy way
16:20michaeljaakaand is too big to fit in memory
16:21michaeljaakadoes your solution works leazy too?
16:21Chousukeyeah.
16:21Chousuke,(ffirst (apply concat (repeat (range 1000))))
16:21clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer
16:22Chousukehmm.
16:22Chousukeoops
16:22Chousuke,(first (apply concat (repeat (range 1000))))
16:22michaeljaakahmmm apply must know number of sequences
16:22clojurebot0
16:22michaeljaakaapply must know number of arguments
16:22Chousukeno it doesn't. that thing there concatenates infinite sequences :)
16:23michaeljaakaand what is comp?
16:23Chousukeactually, not comp
16:23Chousukepartial :P
16:23Chousukesorry, my mistake
16:24michaeljaakahmmm, looks like works fine
16:24michaeljaakaI knew that there is already simply way
16:24ska2342,(apply concat '((1 2 3) ("a" "b") (6 7)))
16:24clojurebot(1 2 3 "a" "b" 6 7)
16:24Chousukeyeah, it's not always obvious :)
16:26michaeljaakahmmmm I looks at apply function
16:27michaeljaakaI can see spread is used
16:27michaeljaakais it because of it apply behaves leazily?
16:29stuartsierraApply is not lazy.
16:29michaeljaakaso apply concat is not leazy
16:29stuartsierra(apply foo [1 2 3]) ==> (foo 1 2 3)
16:30michaeljaakabecause apply must know how many sequences is for concatenation
16:30stuartsierraNo
16:30stuartsierra(apply concat (list [1 2] [3 4])) ==> (concat [1 2] [3 4])
16:30stuartsierra,(apply concat (list [1 2] [3 4]))
16:30clojurebot(1 2 3 4)
16:32hiredman,(letfn [(f [& y] (first y))] (apply f (iterate inc 0)))
16:32clojurebot0
16:33michaeljaakahmmmmm, concat has [x y & zs]
16:34michaeljaakaso two first sequences must be known
16:34michaeljaakaand then third and rest is leazily evaluated
16:34stuartsierrano
16:34stuartsierraConcat is always lazy.
16:34stuartsierra,(take 5 (concat [1 2] (range 10000)))
16:34clojurebot(1 2 0 1 2)
16:35ska2342,(apply concat '((1 2 3)))
16:35clojurebot(1 2 3)
16:35ska2342Or even...
16:35ska2342,(concat)
16:35clojurebot()
16:36ska2342No problems with arity here.
16:36stuartsierra'concat' attaches lazy sequences together
16:36stuartsierra'apply' is used when you want to call a function with a bunch of arguments, but you happen to have those arguments in a list
16:37michaeljaakayes but concat has no declaration like
16:37michaeljaaka(defn concat[ & a ] .. )
16:37stuartsierra~def concat
16:38stuartsierra'concat' is defined for 0, 1, 2, or more arguments
16:38hiredman,(letfn [(f [& y] (first y)) (N [] (iterate inc 0)) (N′ [] (repeatedly N))] (apply f (N′)))
16:38clojurebotEval-in-box threw an exception:java.lang.OutOfMemoryError: Java heap space
16:38michaeljaakaand 1 2 is too much
16:38michaeljaakaneed to have more without 0, 1 and 2
16:38Chousukehm?
16:39Chousukeconcat works the same for any arity. is there a problem?
16:41hiredmanmichaeljaaka maybe suffering under the illusions of a. that clojure has lazy evaluation, and b. some imagined mechanisms for the working of this lazy evaluation
16:50LongIntWhere can one get Clojure STM case-studies/testimonials?
16:50hiredmanclojurebot: Nakatomi space is http://bldgblog.blogspot.com/2010/01/nakatomi-space.html
16:50clojurebot'Sea, mhuise.
16:52rhickey,(apply (fn [x & ys] x) (iterate inc 0))
16:52clojurebot0
17:18DapperDanwhich compojure on clojars works? ato's tries to download clojure 1.1 alpha, hiredman's doesn't have jetty etc.
17:18DapperDanhttp://clojars.org/search?q=compojure
17:18hiredmanthe germans
17:18hiredmanwhose jar doesn't show up in the search
17:20hiredmanliebke
17:20the-kennyGermans?
17:20hiredmangerman's
17:22hiredmanI don't know, but for some reason I assume he is german
17:23hiredmanhttp://incanter-blog.org/2009/11/29/incanter-webapp/ <-- one here
17:23chouserdoes anybody have a clojure collection 'diff' fn?
17:24danlarkinclojure.set/difference
17:24DapperDanhiredman: when i try to run compojure run-server using your jar, i get javax/servlet/ServletOutputStream
17:24DapperDan [Thrown class java.lang.NoClassDefFoundError]
17:25DapperDanchouser: no but i have wanted one.
17:25chouserdanlarkin: thanks, I wasn't clear. I've got deeply nested maps and vectors that are unequal, and I want to know why
17:25hiredmanDapperDan: *shrug* I just stole a pom from some other compojure
17:26DapperDanhiredman: but how is it 'BETTER'?
17:27hiredmanDapperDan: it removes the bits that stop compojure from working on appengine
17:27danlarkinchouser: for that I have no remedy :)
17:27chouserok
17:41mebaran151liebke is the best one
17:42mebaran151I sometimes just browse the clojars maven repo directory listing directly
17:45danlarkinchouser: fess up, is it you or fogus on the cover? http://joyofclojure.com/
17:46chouserWell, I haven't actually met _fogus_, so I can only assume...
17:46`NateI'm having trouble installing clojure-contrib
17:46`NateI installed clojure as per this url: http://riddell.us/tutorial/clojure/clojure.html
17:46`Nateand the repl works
17:46`Natebut the line (:use clojure.contrib.str-utils) yields java.lang.ClassNotFoundException: clojure.contrib.str-utils (NO_SOURCE_FILE:1)
17:46`NateCan anybody help me out?
17:48hiredmangar
17:48hiredmanyet another tutorial referencing the deprecated clojure.lang.Repl
17:48hiredmancome on!
17:48hiredman(but I doubt that has anything to do with your problem)
17:48hiredman`Nate: you don't have contrib on your classpath
17:49ghotli`Nate: This is how i got set up with clojure recently. That tutorial is a bit outdated. http://thoughtadventures.blogspot.com/2010/01/setting-up-clojure-repl-with-emacs-and.html
17:49hiredman~dirt simple
17:49clojurebotsimple setup is http://www.thelastcitadel.com/dirt-simple-clojure
17:49`NateThanks
17:50hiredmandoesn't tell you how to get clojure.jar or clojure-contrib.jar
17:58`NateI don't think it's the classpath, the command (System/getProperty "java.class.path") shows both the clojure.jar and the clojure-contrib.jar to be on the classpath
17:58`Nateyet (:use clojure.contrib.str-utils) still doesn't work
18:00`Natehiredman: I have the right jars on the classpath, is there any way that I could have messed up the creation of the contrib jar?
18:01esbenado I need to do something special to get clojure to use both of my cpu-cores? (I have a pure breadth first algorithm - which only use one core :( )
18:01`NateI built it with "ant -Dclojure.jar=/path/to/clojure.jar"
18:01hiredman`Nate: how do you know you have the right jars on the classpath?
18:02`Nate(System/getProperty "java.class.path") in the repl
18:02hiredmanah
18:02hiredmanwhere did you get contrib?
18:02`Natethe git repo
18:02hiredmanspecifically?
18:03`Nategit://github.com/richhickey/clojure-contrib.git
18:04{newbie}does anyone here use a free java profiler with clojure?
18:04Chousukeesbena: there's no automatic parallelisation.
18:04Chousukeesbena: but you can use futures or agents or whatnot
18:05hiredman`Nate: what about (:use clojure.contrib.base64)
18:05`Nateno dice
18:06hiredmanso your jar is busted
18:06`NateI also tried putting the src/ directory of clojure-contrib on the path
18:06`Natenot sure if that should have worked
18:06`Natebut it didn't
18:06hiredmanwhat is the output of the ant run?
18:06`Natethanks for all of the help, by the way
18:06`Nateone sec
18:06hiredmanpastebin please
18:07esbenaChousuke: I use pmap on the top level - shouldn't that spawn more threads?
18:07hiredman(doc pmap)
18:07clojurebot"([f coll] [f coll & colls]); Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead."
18:07Chousukeesbena: yes
18:07Chousukeesbena: however, make sure you're not spawning too many threads.
18:08`Natehiredman: http://pastebin.com/meae327d
18:08esbenaChousuke: I know .. but it bugs me greatly that the threads doesn't run on the second core..
18:08Chousukeesbena: maybe the work is too lightweight
18:09Chousukeesbena: ie. you don't get enough work to distribute beneficially across multiple cores.
18:09hiredmanand without changing directories, staying right where you are, what does java -cp ../clojure/clojure.jar:clojure-contrib.jar clojure.main -e "(use 'clojure.contrib.base64)" output?
18:10Chousukeesbena: pmap is also semi-lazy
18:10`Natenothing: looks like it worked
18:10`Natelooks like I may have a problem with my clj script
18:10hiredman`Nate: possibly
18:11`NateI can probably take it from here, thanks
18:11hiredmanpeople tend to turn out pretty horrible scripts
18:11hiredmanI recommend against using them
18:12`Nateheh, thanks
18:13`Nateok, I got it working
18:13`Natemuch appreciated
18:25scodeHmm, is there an idiomatic way to do a get whereby you can distinguish between nil-the-value and nil-it-didn't-exist?
18:25scodeSupposing I want to implement an associative structure (lru cache) where I would like to avoid a two-way test-and-get.
18:25the-kennyscode: You can supply an "nil" parameter
18:26the-kenny,(doc get)
18:26clojurebot"([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."
18:26the-kenny(get {:foo nil} :bar false)
18:26the-kenny,(get {:foo nil} :bar false)
18:26clojurebotfalse
18:26the-kenny,(get {:foo nil} :foo false)
18:26clojurebotnil
18:26scodethe-kenny: Ah! Great. Thanks!
18:26the-kennyYou're welcome
18:26scode(This is a case where I like multiple return values like in CL :))
18:26the-kennyscode: Yeah, I like them too
18:27mebaran151hiredman, did you ever get the app-engine sdk into maven?
19:06the-kenny_schulte_: org-babel looks really awesome, thank you!
19:15jolbythe-kenny: If you are using org-babel and Clojure together, there is a little documentation covering setup/basic usage now: http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-clojure.php
19:19the-kennyjolby: Thanks!
19:30tolstoyI notice on the mailing list there's an RC2 for clojure.contrib 1.1. Alas, no mention of actually where to download it.
19:30tolstoyIs there a place to download clojure-contribs?
19:31tolstoyAh: http://code.google.com/p/clojure-contrib/
19:42I314159Hi
19:42I314159Does anyone know if there's an example of using the trace library online?
19:49scottjAny existing code for getting a seq of all the connections between a node and all other nodes of a graph? I know c.contrib has a graph library but given {:a [:b] :b [:a :d] :d [:b :e] :e [:d]} if I pass :b I want to get ((:b :a) (:b :d) (:b :d :e))
19:51scottjand I don't think the contrib graph.clj has that functionality
19:55scottjI314159: http://wave.thewe.net/2009/12/17/logging-and-debugging-in-clojure-followup-complete-tracing/
19:56I314159thx!
20:53technomancydid anything change in clojure.test in the past month that would cause rebinding clojure.test/test-var to quit working?
20:53technomancyhrm; no changes to clojure.test since the first of december
20:59sethstechonmancy: w/r/t leiningen, is the logo the mustachioed gentleman at http://technomancy.us/131?
21:00sethsopps, that should have said technomancy:
21:00technomancyseths: yep
21:00technomancyI need to integrate it into the readme so it shows on github.
21:01sethsgreat! Unless you prefer otherwise I'll use it in a presentation?
21:02sethsprobably the small version on Flickr
21:02technomancythe best version I have is http://p.hagelb.org/leiningen.png
21:02technomancycomplete with background transparency
21:03sethsrunning into a 403 on that
21:04technomancymy bad; try again
21:05sethssame thing, might be some caching somewhere
21:05sethsthe image on technomancy.us has transparency, size works for me
21:05technomancyok
21:05sethsthx!
22:09Drakesonusing clojars.org, how can I download a jar file directly?
22:10Drakesonis there a "lein download foo/bar version" ?
22:19liebkeDrakeson: you can browse the repository directly: http://clojars.org/repo/
22:22Drakesonliebke: cool. thanks :)
22:22liebkenp
22:27Drakesonhow does one hunt for libraries? is there a way to obtain a local cache of some meta-data about libraries in clojars and maven repositories?
22:35mebaran151heh, I just accidentally deleted my homedir
22:35mebaran151I'm debating whether now should be the time I become a unix hacker
22:39mebaran151*emacs hacker
22:40Drakesongo for it
22:41arohnerif you become an emacs hacker, your entire home dir will be open in emacs
22:41arohnerand then you can just C-x s
22:41mebaran151unix has taught me how not to value my data
22:41mebaran151the data is ephemeral
22:41mebaran151anything I care about I put up on bitbucket
22:42mebaran151because it is simply inevitable that I will destroy my homedir
22:42mebaran151that's what I learned as a sysadmin :)
22:43mebaran151that's why it is absolutely necessary to send snapshots to s3 (whch I did for all my customers)
22:44mebaran151alright, where should I start as a lisp hacker
22:44mebaran151*emacs hacker
22:50mebaran151I'm on Ubuntu 9.10
22:51hiredmaneh?
22:52mebaran151having destroyed my homedir, I think it's a sign I should be using emacs for clojure dev
23:02mebaran151how do I get the classpath slime is using?
23:11defnmebaran151: first step, get emacs23 and compile from source
23:12defnmebaran151: step two, start reading other people's configs and build a small config of your own. only edit your config with emacs
23:13defnmabes: step three, become frustrated and consider giving up
23:13defnmebaran151: step four, resist this urge and alias vim to emacs -nw
23:15blbrown_win~
23:15clojurebotNo entiendo
23:15blbrown_win~(+ 1 1)
23:15clojurebot:negative/num-1 + :positive/num-1 = :zero/zero
23:15blbrown_win~(+ 1.0 1.0)
23:15clojurebotFAQ #1 is http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b
23:15blbrown_win~help
23:15clojurebothttp://www.khanacademy.org/
23:16blbrown_win`(+1 1)
23:16blbrown_winwhat is the syntax to invoke a command
23:16chouser,
23:16clojurebotEOF while reading
23:16blbrown_win,(+ 1 1)
23:16clojurebot2
23:17blbrown_win,(new java.util.Date)
23:17clojurebot#<Date Mon Jan 11 20:23:17 PST 2010>
23:18blbrown_winhmm, clojurebot must be in... Texas!
23:19hiredman nope
23:22RaynesI would probably use Vim, but then I installed M-x nterm, M-x paredit, and actually tried VimClojure. :D
23:22Raynesnterm > eshell
23:24RaynesI don't believe there is a way to run a shell inside of Vim like you can in Emacs. Dreamkiller.
23:25defnDo people use emacs as a java ide?
23:25defnIs it better to learn eclipse or netbeans?
23:25defn(as opposed to emacs)
23:25RaynesIt could be a Java IDE.'
23:26defnsure it 'could', but do people do it, and are those people effective?
23:26somniumdefn: if youre in emacs already try out cedet first
23:26defni have cedet
23:26somniumthen Im not sure what youre looking for in the ides
23:27defnoh, i didnt mean to suggest ive used cedet
23:27defnonly that i have it
23:29RaynesEmacs is an effective IDE for pretty much anything, if you know what you're doing it.
23:36G0SUBI need some tips about configuring the logging system when using c.c.logging. can anyone help?
23:36ctdeanMaybe, go ahead
23:37G0SUBctdean: well, I want all my logs to go to a file, which is rotated, etc.
23:37defnRaynes: yeah I mean, i figured as much, but that doesn't mean it's always the *best* IDE
23:37G0SUBctdean: I would also like to change the log format
23:38Raynesdefn: Well, there really /isn't/ a best IDE for anything. It's really what works best for you.
23:38RaynesIf that is Netbeans or Emacs, so be it.
23:38ctdeanG0SUB: So what you need to do is create a .properties file (or files) and put them in your classpath. Since the logging system uses existing java libararies you need to configure those libs
23:38arohnerdefn: emacs is the best thing on the planet for editing text, period. Personally, I expect my editor to be just that, an editor
23:39ctdeanI use log4j and I can post my .properties files if you'de like
23:39arohnerI use other tools when I want to debug or profile
23:39G0SUBctdean: please do. thanks in advance.
23:40arohnerdefn: I don't expect my editor to refactor my code. I claim I'm productive, but I'm used to what some people would call primitive development environments. it works for me. YMMV
23:41ctdeanlog4j .properties files http://gist.github.com/274916 http://gist.github.com/274915
23:42blbrown_winhiredman what is wrong with the #java administrators never understood that community
23:42RaynesAll hail the gist.
23:42somniumand at a glance, things like Xrefactory exist
23:42somnium^^ wrt emacs capabilities vs. ides
23:42hiredmanblbrown_win: huh?
23:42G0SUBctdean: so I put it somewhere in the classpath. do I have to load the file explicitly?
23:43ctdeanG0SUB: Yes, put it in the root of your classpath with those filenames. No need to load them yourself, the lib will do it
23:43hiredmanthere was a #jvm for a few days once
23:43hiredmanit had three people in it
23:44G0SUBctdean: cool. any other config needed? or can I just use (logging/debug) etc. straightaway?
23:45ctdeanG0SUB: I think that's it. make sure the directory exists for the file, load c.c.logging, and go nuts
23:45G0SUBctdean: hehe, yahoo! Any refs for what else I can put in those properties files?
23:46ctdeanG0SUB: btw, I didn't know much about this before I created those two files. SO I just read the docs log4j, etc
23:49mebaran151defn, do I really need emacs23, 22 isn't good enough?
23:49Raynesmebaran151: emacs 23, it's whats for dinner, tonight.
23:50G0SUBctdean: "Note: your log configuration should display the name that was passed to the logging implementation, and not perform stack-inspection, otherwise you'll see something like "fn__72$impl_write_BANG__39__auto____81" in your logs."
23:50G0SUBctdean: does the current config address that?
23:50defnmebaran151: it makes a huge difference in comfort
23:51defntft ftw
23:51ctdeanG0SUB: you're testing the limits of my knowledge here :), I think that is the %c in conversionPattern property.
23:51ctdeanTry it and see!
23:52G0SUBctdean: ah, no problem. I am a complete Java n00b. that's why I was asking. Thanks a lot :)
23:52mebaran151defn
23:52mebaran151okay
23:52mebaran151apt-getting
23:53defnno, dont get the package
23:53defncompile from source
23:53mebaran151I gotta compile it? why's
23:53defnwhat distro are you on?
23:53defnubuntu 9.10?
23:53ctdeanG0SUB: it's all good, I know a lot about Java, but very little about the libs, go figure, lol. sort of an oxymoron
23:53mebaran151Ubuntu 9.10
23:53G0SUBctdean: hehe
23:53mebaran151it seems pretty recent
23:53defnthe package doesnt have cedet setup right which became annoying
23:53mebaran151okay
23:53mebaran151sigh
23:53defnitll probably work for your fine though
23:54defnjust get the package since compiling cramps your style
23:54defn;)
23:54G0SUBctdean: java is more about the huge number of libs than the language I presume.
23:55mebaran151defn, nah, I'll compile from the source
23:55mebaran151what dev packages do I need?
23:56mebaran151ls
23:58qbgIs anyone else unable to build clojure-contrib using the latest master snapshot?