#clojure logs

2009-08-14

00:18eyerisI just installed vimclojure from bitbucket
00:18eyeris:scriptnames shows it loaded the scripts
00:18eyerisHowever the mappings, such as \ef, do not work.
00:19eyerisThey are not displayed by :map <LocalLeader>
00:20mikem`_eyeris: i think those are only mapped when the nailgun server is running
00:21eyerisIt is running
00:21eyerisNGServer started on 127.0.0.1, port 2113.
00:25mikem`_eyeris: ah yes, you also need to open a .clj file
00:25mikem`_s/file/buffer/
00:25eyerisI did.
00:26mikem`_and your ~/.vimrc has the relevant entries? clj_want_gorilla et al?
00:27eyerisI have the clj_want_gorilla set
00:27mikem`_ok, at this point I'm not sure. sorry
00:28eyerisnp
00:46eyerisWhen I try to use the ng client from the cmd line I get
00:46eyerisclojure.contrib.pprint.PrettyWriter
00:46eyerisThat exception is right on the vimclojure page.
00:47eyerisThe explanation is that I didn't AOT compile clojure-contrib, but I did and the .jar is in my CP
00:51eyerisFixed that.
00:52durka42what was it?
00:53eyerisclojure-contrib wasn't actually AOT compiling. It was just silently failing
00:53eyerisThough now I am CP hell...
00:55eyerisYay! it works now!
01:24clojurei really like vimclojure, since it saves me from using emacs/slime
01:46lrenni was just thinking how emacs + slime + paredit + clojure is the most fun I've ever had coding in my entire life.
01:51albinopretty bold statement there
03:25lowlycoderafter typing in 'ant' in the clojure dir; it builds clojure for me ... however, how do I install clojure?
03:25lowlycoderI want it in /usr/local/whatever
03:30arbschtlowlycoder: I don't believe there is a standard way to do that. I set mine up roughly according to the debian java package conventions, and with a custom clj launcher
03:37eevar2lowlycoder: here's my install, stuffing all jars of interest in /opt/clojure-libs: http://pastebin.org/8749
03:38eevar2(except the compojure deps)
03:40tomojso far I've just been unzipping clojure, clojure-contrib, and any jars a project depends on into project/target/dependency for clojure-project
03:40tomojgetting pretty annoying
03:41mikem`_eevar2: what do you put in your CLASSPATH variable then? how do you start the clojure REPL or clojure apps?
03:43cschreinerwish there was a one-click-installer for clojure
03:43eevar2mike: java -cp "/opt/clojure-libs/*" clojure.lang.Repl # should work, assuming you have java1.6+
03:44eevar2iirc 1.5 doesn't like * in the class path
03:46mikem`_eevar2:
03:46mikem`_eevar2: ok, cool, thanks for sharing :)
03:46eevar2http://pastebin.org/8946 # my real/current/working .emacs config. the one i pasted earlier might have been bogus
03:47eevar2i.e. not setting the class path correctly
03:48tomojeevar2: if you have project-specific dependencies, do you add to swank-clojure-extra-classpaths for that project?
03:49eevar2neh, i just stuf the jars into my global library
03:49tomojah
03:49eevar2if for whatever reason you need to work with different versions of the same library, that might be an issue
03:49tomojthat would mean you never have to create special slime repls for different projects with different classpaths like clojure-project does... sounds like a good idea
04:00JesterMonkeyHello ?
04:02tomojhello
04:14eevar2tomoj: working with multiple files gets a bit hairy if you dont make sure you're in the correct dir. and you'll want '.' in your classpath as well, which the crap i posted earlier doesn't include ;)
04:19tomojhmm
04:19tomojmaybe I'll stick with clojure-project for now
05:04DrJoke(life restart)
05:11sethsis there a historical reason why (inc Integer/MAX_VALUE) overflows?
05:11seths(+ 1 Integer/MAX_VALUE) just automatically promotes to Long
05:11sethsand Long/MAX_VALUE to BigInteger
05:13carkmight be worth making a post about it on the mailing list
05:19febelinghow often are the irc logs posted? I can only see the ones from a couple of days ago
05:27tomojit seems like the intention is for (inc Integer/MAX_VALUE) to not overflow
05:28tomojthe inc method in IntegerOps checks whether the first operand is less than Integer.MAX_VALUE
05:30sethsI am putting together a quick post to the mailing list
05:31seths(dec Integer/MIN_VALUE) also over (under?) flows
05:32tomojweird, because the dec method in IntegerOps does a similar check there
05:32tomojs/first operand/argument/
05:33sethsI haven't checked in the source, but I just updated from Github
05:34seths"checked in" the source = read it :-)
05:35tomojmaybe it's something to do with inlining?
05:35tomojI dunno
05:42Fossii guess if it's intended behaviour, it should be documented
05:42Fossibut i doubt it
05:42Fossiat least it's not what i would expect
05:43tomojfrom the source code it looks to me like it's not intended
05:44tomojbut that was my first dip into the java source
05:45sethsI was sort of expecting (inc) and (dec) to be macros
05:45sethsexpanding to (+) and (-)
05:46tomojthen (iterate inc 1) wouldn't work, would it?
05:47sethshaven't used iterate yet :-)
05:50sethsneat
05:52tomojalso stuff like
05:52tomoj,(map inc [3 4 5])
05:52clojurebot(4 5 6)
05:53sethsI am seeing the limits of my clojure-fu :-)
05:54sethsI don't understand why this hangs: (take 10 (iterate (fn [val] (+ 1 val)) 1)
05:55sethsbut this works: (defn bad-inc [val] (+ 1 val)) (take 10 (iterate bad-inc 1))
05:55tomojthe first doesn't hang for me
05:55tomojdid you really forget the extra ) at the end?
05:55_mstam I going mad or are you missing a right paren on both of those?
05:56_mstyeah :)
05:56sethsGAAAAAHHHHHH
05:56sethssorry
05:56tomojslime tells you "[input not complete]" in the minibuffer
05:57tomojand the auto-indentation gives a hint too
05:57Fossihighlight-parentheses-mode ftw
05:58sethsI'm ashamed to say the repl is not running in Emacs
05:58sethsunlike IRC
05:58Fossieh, for me it's the other way round ;)
05:58sethsI really need to stop being lazy about slime
05:59tomojit's very much worth it imo
05:59tomojonce you have slime installed you can just use the clojure-install function from clojure-mode to set most everything up
06:00Fossitomoj: i should've known that
06:00sethscool, thanks
06:01sethsah, good post on the overflow on the newsgroup
06:01sethsInteger.MAX_VALUE is an int, not an Integer
06:02tomojah, that explains why the checks in java didn't work
06:03seths,(inc (+ 1 Integer/MAX_VALUE))
06:03clojurebot2147483649
06:03seths,(.getClass Integer/MAX_VALUE)
06:03clojurebotjava.lang.Integer
06:03sethshmm
06:04tomojthe distinction between int and Integer is somewhat hidden
06:04tomojI don't understand it myself yet
06:05tomojah, I think I may see the problem
06:05tomojintegers are boxed on function calls
06:05tomojbut inc is inlined
06:06tomojso the inc(int x) in clojure.lang.Numbers is called
06:06tomojwhich does throwIntOverflow if x is Integer.MAX_VALUE
06:12sethstomoj: that would be a great addition to the posting on the newsgroup
06:13tomoj,(inc (identity Integer/MAX_VALUE))
06:13clojurebot2147483648
06:13mikehincheythat's what should promote instead of throw
06:13tomojis there a clearer way to box besides identity?
06:14mikehincheyunchecked_inc should be used if you want the exception
06:15tomojalso, is there a way to check whether a certain value is boxed or not?
06:15tomoj(class foo) won't work because foo gets boxed
06:16mikehincheyI think it's assumed you know what you're doing when you use java interop
06:16tomojunfortunately I don't :(
06:17tomojie. I don't understand how to use unboxed ints for performance
06:17tomojand I can't really investigate it because (class <int>) is still Integer
06:18mikehincheylike I said, I think the inc behavior is wrong, so you wouldn't have to know for this case
06:19tomojright, but for performance optimization, I'd like to know
06:19mikehincheyI suppose that would require a new special form, since a fn or macro can't know if something is primitive or not
06:20Chousukethe compiler does know though.
06:20mikehincheyright
06:20Chousukebut arguments to function calls are always boxed.
06:20tomojwell
06:20Chousukeif you want primitive math, you need a (loop ...)
06:21tomojI saw something in here the other day about using (int ..) in binding forms
06:21tomojI don't see that explained anywhere on clojure.org
06:21mikehincheyinlined fns can avoid boxing
06:21Chousukewell, yeah, but that's because the function is never really called :/
06:22Chousuketomoj: should be in the java interop section
06:22tomojChousuke: ah, hadn't looked there. thanks
06:23tomojyup, I see it now. cool
06:29tomoj,(+ 1 Integer/MAX_VALUE)
06:29clojurebot2147483648
06:29tomoj,(+ (int 1) Integer/MAX_VALUE)
06:29clojurebotjava.lang.ArithmeticException: integer overflow
06:33rsynnottaren't Java integers 64bit these days?
06:33rsynnottor is that just Long?
06:34tomojapparently they are 32bit
06:35tomojotherwise there would be no overflow there
06:35tomojright?
06:35rsynnottyep, they seem to be :)
06:35rsynnottI must have imagined the 64bit thing
06:35rsynnott,(+1 Long/MAX_VALUE)
06:35clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn
06:35rsynnott,Long/MAX_VALUE
06:35clojurebot9223372036854775807
06:35rsynnottah
06:35tomojwe don't have a +1
06:36rsynnottyep, that's 64bit :)
06:36rsynnottooh, missed a space, yes
06:59seths06:58 *** banisterfiend JOIN
07:33Fossiwhat's the keybinding for getting the repl again?
07:33Fossiin emacs that is
07:34ChousukeM-x slime? :/
07:35ChousukeI don't quite understand the question :P
07:35Fossithere is a keybinding to get the buffer with the open repl somehow
07:35Chousukehmmh
07:35Fossiinstead of having to go through M-x b *sl TAB r TAB
07:36Chousukeheh.
07:37arbschtC-c C-z does slime-switch-to-output-buffer
07:38ChousukeI have fuzzy completion in the minibuffer from some addon. I'm not sure which, I cloned some set of emacs customisations from github and just tweaked them. :P
07:38rsynnottdoesn't slime have fuzzy completion anyway?
07:39rsynnottoh, fuzzy completion in emacs itself?
07:39ChousukeI can just got C-x b slre<tab> and it switches
07:39arbschtemacs yeah - I use icicle
07:39ChousukeI think it might be that. or just ido.el? :/
07:39clojurebotthat is not what I wanted
07:39ChousukeI'm not sure what, but it's nice :D
07:39Fossiyeah, i need to get that as well
07:40FossiC-c C-z almost does what i want, only that it opens the buffer in another window
07:40ChousukeI also have rather nice tabcompletion in clojure-mode buffers.
07:41Chousukeagain, not sure which part of my .emacs.d does it but it's also nice :P
07:42Fossidamn ctrl-w
07:42Fossii need to disable that for pidgin :(
07:43Chousukeheh
07:43ChousukeI would hate that. I'm pretty used to deleting words with ctrl-w
07:44Chousukethe one nice thing about the mac command key is that it doesn't interfere with application shortcuts using control
07:45Chousukethe downside is the lack of an alt gr, making emacs somewhat less pleasant :P
07:45Fossiwell, remapping should be trivial
07:45Fossii think i might switch ctrl and alt/meta when i go back to dvorak
07:45Chousukewell, yeah, but using cmd as meta then makes emacs unable to utilise the commmon mac shortcuts.
07:46Fossiah, ok
07:46Chousuke-m
07:46Chousuke:P
07:46Chousukethough for now, that doesn't matter much.
07:47Chousukeit's a bit annoying sometimes though, because Cocoa emacs has some cmd-shortcuts in its menus and I'm not sure what the traditional emacs equivalents are.
07:48andyfingerhutOut of curiosity, does anyone happen to know what is stored in the 8 bytes (32-bit system) or 16 bytes (64-bit system) of every java.lang.Object? Reflection on fields doesn't seem to give me the answer for that class like it does for others.
07:48Chousukehm, though, problems like that are easily solved with f1 k :P
08:01Neronusandyfingerhut: I know at least that its default constructor does nothing (not setting any fields, no nothing)
08:04Fossihmm. doesn't work
08:07tomojhmm.. I get tab-completion in the repl but not in my source buffers
08:12Fossi"gtk-key-theme-name = "Emacs" " hmmmm
08:13Fossiin source buffers i have dabbrev-expand on M-/
08:13Fossikinda sufficient
08:13fsmHello everyone. My raytracer is improving: http://tu.be/graphics/teapot2.png
08:15Neronusandyfingerhut: I suggest: One pointer to the super object (which is null for object, or the object itself, I don't know what the jvm does) and one pointer pointing somewhere denoting the type of the instance
08:16andyfingerhutNeronus: thanks. sounds plausible. I'll keep Google searching. Trying to figure out where all those 48 bytes go on my 64-bit machine for each clojure.lang.Cons and clojure.lang.LazySeq.
08:16Chousukekeybindings with / in them always cause problems to me
08:16Fossifsm: nice
08:17ChousukeI use a Finnish layout so there's no single key that gives me /
08:17fsmthanks
08:17FossiChousuke: that's why i use an us-altgrintl layout (typematrix 2030)
08:18Fossiworst is comment-region on a german keyboard
08:18Fossimeta alt-gr ctrl -
08:18Chousuke:P
08:19Fossialthough there's still a possibility for shift in there ;)
08:19Fossiapart from (), the layout is pretty nice
08:19Fossibut those suck on most layouts
08:20Chousukemaybe I should tell emacs to output parentheses from å instead of the useless letter
08:20Fossiwith paredit you rarely need ) anyway
08:20Chousukeparedit doesn't work with viper too well though :/
08:20Fossiso one letter or å Å would be sufficient
08:21Chousukeviper overrides paredit's parentheses deletion protection and then completely confuses paredit
08:21Fossibut i also like the intl layout for letting me type all those characters easily :D
08:21Chousuketo the point that with paredit mode enable, I can't even re-balance the s-exprs because paredit thinks things are unbalanced.
08:22Chousukeenabled*
08:22ChousukeI suppose I could just tell emacs to use a US layout.
08:23Fossiwell, that's kinda a mood point about paredit
08:23Fossinever c&p
08:23Fossior you will have to go through hell to fix it
08:23Chousukeit's not about cut'n'paste though.
08:24Chousukeif I just delete a line with viper, it will confuse paredit if it happens to cause the parens to become unbalanced.
08:24Fossiyou can always rebalance them by pasting a ")"
08:24Fossiwell, that's more or less cutting
08:25AWizzArdhttp://www.csd.uwo.ca/staff/magi/personal/humour/Computer_Audience/Boot%20It.html
08:25Fossiyou should use paredit-kill for deleting anyway
08:27ChousukeI need a better keyboard anyway :/
08:27Fossitypematrix rocks
08:27Chousukethe macbook keyboard is very much not emacs-friendly
08:27Fossihaven't found a better one and i searched quite some
08:28Fossiit's a little strange at first, but it pays
08:29Chousukemmh
08:29Chousukecontrol key seems to be in a bad position :/
08:29Fossia real small downside is that the backspace is so close to the enter key
08:30Fossiso sometimes i send messages in irc/im that i wanted to correct, but that's prolly because i don't touch type correctly
08:30Fossithat's why i thing i'll switch alt and ctrl when i go dvorak again
08:30ChousukeI read some advice for buying a keyboard for emacs use, and it said that the control key should be pressable with the palm
08:30Fossi*think
08:31Chousukewhich makes a lot of sense.
08:31Fossithe right control key is kinda nice thoughand the inline cursor keys
08:31ChousukeI don't use enter that much actually
08:31Chousukejust ctrl-m
08:32Chousukeoften it doesn't work though :(
08:32Fossiah, didn't know that one yet
08:33Chousukein irssi it seems ctrl-j works too
08:33Fossiwell, th etypematrix is not really emacs centric
08:33Chousukehmm, and in a regular shell
08:33Chousuketwo different linechars I guess
08:34Fossiprolly cr lf
08:34Chousukein slime ctrl-j seems to just add a line, and ctrl-m actually sends input
08:35Fossinewline-and-indent is great
08:35Fossii guess i should bind that to RET in clojure-mode
08:36ChousukeI need to get over my current tiredness
08:36Chousukethen I might write regexp pattern support for my reader!
08:37ChousukeIt's really fun to write.
08:38ChousukeI think of the simplest method to accomplish something, write it out, and then test it, and most of the time it just works :P
08:39ChousukeI guess it helps a lot that I'm not working with a stateful stream. writing a small function to add a bit of functionality and then testing it is really easy. no need to reset the stream or anything :)
08:40Chousukethough I thing that might turn out to be a problem later on :/
08:41ChousukeBut I think I'll worry about it after I have a working reader for non-stateful input.
09:08cemerickwow, clojure is the 21st most popular language on github. That's sort of amazing, IMO.
09:08AWizzArdcemerick: and the number of chatters here in the channel is increasing again
09:09AWizzArdnext January we will have a new peak
09:09cemerickheh, maybe
09:09cemerick#clojure is a far less important indication, I think
09:09LauJensencemerick: Whats #1 and #2 ?
09:09cemerickruby and javascript
09:09cemerickhttp://github.com/languages
09:10cemerickdefinitely the web-2.0 crowd
09:11cemerickclojurebot: popularity-on-github is <reply>Clojure ranked #21 on 8/14/2009
09:11clojurebotAlles klar
09:11LauJensenOk - Am I evil for hoping Clojure will never get above #15? :)
09:11andyfingerhutAnybody here use github commercially? I only have a free account. It is darned convenient.
09:11cemerickandyfingerhut: we looked at it very briefly, but it's *incredibly* expensive
09:11LauJensenandyfingerhut: None that Ive heard of, Im even migrating my freebies off Github to Gitorious
09:12Chouser"I'm very envious of the attention [arc] gets" --rhickey http://clojure-log.n01se.net/date/2008-02-12.html#12:08a
09:12Chouserhas anyone heard arc mentioned anywhere recently? I haven't.
09:13Chouserwhat a difference 18 months can make
09:13LauJensenArc compiles to native though? *jealous*
09:14cemerickLauJensen: can gitorious be set up on a server by a mere mortal now? It was simply impossible IMO when I tried it some months back.
09:14LauJensencemerick: Dunno, I just use their webservice, havent set anything up myself
09:14cemerickChouser: I talked with a couple of MIT folks a few weeks ago that are using it actively. The Graham connection explains that, I think.
09:14LauJensenAnd that only took < 2 minutes
09:15Chousercemerick: huh. ok.
09:15cemerickI wouldn't look to random researchers at MIT for trend datapoints ,tho :-)
09:20rsynnottwow, people are using arc? Amazing
09:20rsynnottI thought it just died
09:21cemerickI'm starting a new project, probably going to push it to github. Do folks prefer clj-dbm or cljdbm? I was trying to get a sense of whether there's a naming convention to these things at the moment, but it seems not.
09:22Fossididn't even know it was released
09:24arbschtclj-dbm. to me, cljdbm risks implying cl-jdbm
09:26arbschtthere's precedent in clj-html, clj-android etc. from clojure.org/libraries
09:26Fossii also like clojure- or clj- better
09:33LauJensencemerick: Whats the full name of the project?
09:34cemerickLauJensen: clj-dbm, or some variant
09:34cemerickit's a wrapper for the jdbm library
09:34LauJensenDoes dbm not stand for something?
09:34cemerick(with lucene integration)
09:35cemerickdatabase manager
09:35LauJensenI'd probably go with clojure-dbm, but it would be nice to get consensus on a convention
09:35cemerickthe DBM model has been around for a long, long time http://en.wikipedia.org/wiki/Dbm
09:35LauJensenWe've been happy with ClojureQL
09:35cemerickjdbm happens to be a java impl
09:44tomojI was thinking about doing something with agent watchers and automatic json conversion with couchdb
09:53LauJensenI recently implemented an ajax chat using compojure/json/clojureql. Quite nice way to develop
10:10andyfingerhutanyone have some quick hints for a Java newbie on how to run a Clojure program with the right options so that a Java debugger can get all the info it needs to be useful? I'm trying out a free eval of jDebugTool. Not sure if that tool is any good or not. Recommendations for something free or with a trail eval period are welcome.
10:14andyfingerhutI'm currently starting the java process with these debug-enabling options: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
10:14clojurebot
10:15andyfingerhutAnd then I run jDebugTool separately and attach to that process.
10:31Fossisomebody *really* needs to write an elisp script to clean up imports ;D
10:41mblinnsonofcim michael vick
10:41mblinnoops
10:41mblinnsorry, carryon
10:58Anniepooclojurebot: paste
10:58clojurebotlisppaste8, url
10:58lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
11:00lisppaste8Anniepoo pasted "RT/ROOT_CLASSLOADER" at http://paste.lisp.org/display/85380
11:01Chouserheh
11:02ChouserI guess that's what I get for recommending you look at my own code...
11:02LauJensenAnniepoo: Sweet with the title :)
11:02Anniepooit's urping at this location. I take it you're doing some deep magic getting the class loader
11:02Chouserthe interface has changed
11:02AnniepooLJ, yah, thanks for the tip, and I quit marking them one hour too
11:04Anniepooyah, it's private now
11:04ChouserTry this instead: (RT/baseLoader)
11:04Chouseror wait for me to commit an update
11:04Anniepoolol
11:05Anniepoothat didn't work
11:05AnniepooUnable to find static field: baseLoader in class clojure.lang.RT (textjure.clj:323)
11:05Chouseryou need the parens
11:06Anniepooah
11:07Chousertested and pushed.
11:10Anniepoopasting throws exception
11:10lisppaste8Anniepoo annotated #85380 "pasting throws exception in textjure" at http://paste.lisp.org/display/85380#1
11:12Anniepoothis is better than being rubbed with a brick, that's for sure!
11:13Anniepoowhat's the upper and middle panels for?
11:13Anniepoo(sorry, the upper - you've set a max size)
11:22Chouserthe upper panel is meant to be a text editor
11:22Chousernothing useful there yet though.
11:23Anniepooah, ok
11:23Chouserhuh, I don't know anything about that paste error.
11:23Anniepoodunno, could be related to me running in IntelliJ
11:24AnniepooI'm insanely tempted to ignore everything I have to do for the next week and build my own tiny IDE in Clojure
11:29ChouserAnniepoo: I understand the temptation. textjure demostrates how for I got before returning to my senses.
11:29AnniepooLOL
11:30Anniepoowell, I should know the language better before doing it
11:30Fossii guess a native editor would be nice
11:30Fossithen again, emacs is just so damn effective
11:31ChouserI got bogged down trying to write a general "parser" for multi-keystroke vi-like command sequences.
11:31Anniepooah, Cl port of YACC?
11:31cemerickFossi: ...at causing madness and general mayhem? ;-)
11:32NeronusAt being a mail client
11:32Fossicemerick: apparently, that lasts only a few years ;)
11:32AnniepooI could write something saner in the time it'd take me to memorize the emacs commands for the third time in my life
11:33Fossii thought so too
11:34Fossinow i miss things like forward-delete-word in other programs
11:34ChouserFossi: dW
11:34Chousersorry
11:34ChouserI should restrain myself. But that's an example of what I wanted to be able to parse.
11:35Anniepoosure - and I've got them memorized for IntelliJ - it's ctrl shift right arrow del
11:36FossiAnniepoo: exactly my point.
11:36cemerickI've never understood the attraction of arcane stuff like dW and all the emacs-isms. Visual feedback is always good, incantations are always bad.
11:36Chouservim apparently has a giant C switch statement that munges global variables as you type. bleh
11:36AnniepooI'm with cemerick
11:36cemerickProgrammers are more like civilians than we generally like to think.
11:36AnniepooI've been programming since Unix was an interesting new OS
11:37Fossiwell, just from my experience from the last two month of clojure with emacs compared to eclipse and java, the editing feels much faster
11:37KnekkIncantations are merely useful shortcuts
11:37LauJensencemerick: Emacs is very transparent, speedy and flexible. I'd get annoyed just from the 5 second start up time of Eclipse
11:38Anniepooand fail to understand the fascination in some quarters for stuff that went out with pin matrix printers
11:38Fossithen again, you prolly can't do things like paredit does them with more syntax
11:38cemerickLauJensen: speedy and flexible, but only for a particular definition of those terms. The notion of transparency is laughable though (IMO, of course)
11:38AnniepooI'd agree with Fossi, most ANY decent editor that you have memorized the keys for is better than
11:39Anniepooany other editor you haven't
11:39LauJensencemerick: Laughable?
11:39FossiAnniepoo: well, i have them down for eclipse i think
11:39Fossiit's just that it's not or only barely possible to kill things in the current scope for example
11:39Anniepooah, that's interesting
11:40Fossiand ctrl-shift-right del is rediculous from the amount of finger movement compared to meta-d
11:40Anniepoowell, yes, and I'm on IntelliJ, which knows about and is wonderful for Java, but won't, for example, double click highlight str-utils as one identifier
11:40cemerickLauJensen: emacs does lots of the same kind of stuff that vim does, except it's user-extensible, so bindings can be changed by things other than user action.
11:41LauJensenSo how is that laughable ?
11:41cemerickchorded keybindings, basic lack of visual feedback, etc etc etc.
11:41Knekkelisp is way easier to use than vim macros
11:41FossiAnniepoo: i wouldn't even think of using emacs for java
11:41cemerickLauJensen: it's not what I would consider "transparent"
11:42AnniepooOK, Fossi, you're making a more convincing argument
11:42LauJensenBy transparent I meant - I dont have to worry about 6 different windows I rarely use and an abundance of tools that are unnecessary for editing .clj files. Perhaps I used the wrong word
11:42Fossii guess it would be really cool to have a seperate editor for clojure, it's just going to be hard to be as effective as emacs is for lisps
11:43Fossithat was my whole point :)
11:43tomoj+1 for slime/paredit
11:43Knekkhow many times do you reach for the mouse when you are using your IDE? Learn to love keyboard shortcuts, a.k.a. incantations
11:43cemerickyeah, it's totally a personal preference, likely not with much of a defensible basis.
11:44AnniepooFossi, I suspect the solution is to effectively wrap emacs in something
11:45Fossidunno
11:45Anniepoobut you've convinced me to try it, I'll get set up to do emacs and I'll make myself a set of flashcards and spend a few hours memorizing keystrokes
11:46cemerickKnekk: IRC'ing from the train?
11:46Fossii just edited away and took a look at a new keystroke every few days
11:46Knekkcemerick: aint' technology grand? brb
11:46Anniepooyes, but I've found when I change editors it's well worth it to make a stack of index card flashcards
11:46Anniepoofind a coffee house somewhere
11:47Anniepooa couple mocha's later I'm a lot more productive
11:47LauJensenWhats the attraction of this IntelliJ people are talking about?
11:47AnniepooLau, for Java it's wonderful
11:48Anniepooit has incredibly intelligent refactoring
11:48Anniepooit's in many ways another approach to dealing with the ceremony of Java
11:48LauJensenLooking at the site now. Cemerick whats your editor of choice?
11:48LauJensenAnniepoo: Anything Clojure-specific for it?
11:49Anniepooyou can do most refactorings as single keystrokes
11:49cemerickNetBeans. IntelliJ is very, very nice for Java, but NB has a much richer plugin ecosystem (for what I care about, I suppose), and a very good clojure environment.
11:49rsynnott'ceremony of Java' - I am imagining people sacrificing explicit casts to the gods, here
11:50Anniepooyes, there's a (not all that hot, but OK) La Clojure plugin
11:50LauJensenAnniepoo: Refactoring - I've never tried it - Is that where you editor is smarter than you in dividing your code into logical factions ?
11:50cemerickIt's Java capabilities are good, but not close to IntelliJ. If I were dedicated to programming in Java for many years to come, I'd probably buy it.
11:50cemerickbah, its*
11:51AnniepooLau, it's where my editor is a darn sight faster than me in doing something like
11:52ChouserIf I couldn't use vim, I'd definitely use emacs. I've never tried an IDE that didn't end up annoying me, while I got quite far with emacs once.
11:52Anniepooadding a parameter to a method call and propagating it everywhere
11:52tomojunfortunately I think clojure will never have that kind of thing
11:52LauJensenk
11:53Anniepootomoj, why not? it's be a lot easier to write for Clojure, and with it's Lisp heritage, there's lots of AI/NLP oriented programmers around to do that sort of thing
11:53Anniepoobrb
11:53tomojhmm
11:53tomojbut clojure is dynamic
11:54tomojthere are no good refactoring editors for ruby because it's dynamic
11:54cemericktomoj: I've heard very good things about the NB ruby environment and its refactoring
11:54cemerick(never used it myself, tho)
11:54tomojit's nothing compared to intellij, from what I've heard
11:55ChouserI think if you accept that even in Java refactoring is perfect 100% of the time, then you can make progress on a dynamic language like Clojure.
11:55tomoje.g. in ruby if you see foo.some_method, there's no way to know what foo is, so you can't rename or add parameters to some-method
11:56AnniepooIntelliJ has it's weaknesses - the module/project system is obscure, and the GUI builder is weak
11:56cemerickhas anyone heard of plans to add contrib.def to clojure itself (core, or some other ns)?
11:57cemerickAnniepoo: oh, yeah, the GUI builder. That thing is *horrible*.
11:57cemerickdirectly generates classfiles, last time I tried it *ugh*
11:57andyfingerhutany jswat users here?
11:57Anniepoocemerick, you can set that
11:57Anniepooit's in project settings
11:57cemerickahha
11:58cemerickthe fact that it's an option at all makes me question the entire product top-to-bottom
11:58AnniepooJBuilder from Borland has a lovely, lovely GUI builder
11:58cemerickgenerating classfiles that are *intended* to be added to source control is insanity
11:58rsynnottBorland always was good at GUI builders
11:58Knekkwhat did I miss?
11:58Anniepoocemerick, forcing users to do what you think is good for them is probably more insane
12:00cemerickAnniepoo: is there any use case for versioning the artifacts of code generation? In this neck of the woods, that's what build processes are for.
12:01Chousukecemerick: maybe you should prompt it on the group. core could use a def- and defmacro- at least, if not defvar and defvar-
12:01Anniepooactually, I can indeed think of a few. I mostly do graphics related stuff, and often work with asset pipelines
12:01Chousukecemerick: I think it's somewhat counterintuitive to have defn- but no def- :/
12:02cemerickChousuke: OK, I will. Any idea why it's defvar- and not def-?
12:02Anniepooit's not uncommon to have odd semi-automated processes
12:02Chousukecemerick: it supports a docstring
12:03cemerickAnniepoo: yeah, I'll definitely grant you the asset case. But UI layouts aren't graphical assets.
12:03Anniepoohmm....
12:03AnniepooI currently have a project that has a bunch of wood workshop files
12:03AnniepooI assume if I pass you my project you have wood workshop installed and configured correctly?
12:04Anniepoo;c)
12:04cemerickChousuke: Oh, I see. Yeah, a regular def- would be good
12:04ChousukeI'd like the defvar macros too though.
12:05Chousukeactually, having them but not def- would be enough I guess.
12:05Chousukedef could remain the low-level special form it is :)
12:13Fossi+1 for def- and defmacro-
12:14carki use defonce quite a bit too
12:14carkin clojure.contrib.def
12:14carkand its variant defonce-
12:14Fossii rarely use any of them because i can't be bothered to import them
12:15Fossiwhich is a shame
12:15Fossiespecially generating docs without the private things would be pretty useful
12:30drewrI hate spending 3 hours debugging a fn with lazy-seq only to discover I wasn't recurring correctly
13:01drewris there a lazy flatten somewhere?
13:01drewrI thought the one in seq-utils would be
13:01Chousuke~def flatten
13:02Chousukeseems lazy to me.
13:02drewr,(flatten [[1 2 3] [4 5 6] [7 8 (iterate inc 0)]])
13:03clojurebotExecution Timed Out
13:03drewr,(flatten [[1 2 3] [4 5 6] [7 8 9]])
13:03clojurebot(1 2 3 4 5 6 7 8 9)
13:03drewrwhoops
13:03carkbut clojurebot tries to print it
13:03drewr,(take 4 (flatten [[1 2 3] [4 5 6] [7 8 (iterate inc 0)]]))
13:03clojurebot(1 2 3 4)
13:03drewrhm
13:03drewr,(firt (flatten [[1 2 3] [4 5 6] [7 8 (iterate inc 0)]]))
13:03clojurebotjava.lang.Exception: Unable to resolve symbol: firt in this context
13:03drewr,(first (flatten [[1 2 3] [4 5 6] [7 8 (iterate inc 0)]]))
13:03clojurebot1
13:04drewrI guess it is. Interesting.
13:08cemerickit's too bad that one cannot import an inner class; e.g. (import 'org.apache.lucene.document.Field$Store), then use Store/YES
13:09drewr~import-static
13:09clojurebotExcuse me?
13:09drewr~def import-static
13:10drewrmaybe not
13:10cemerickyeah, that won't help
13:10cemericktotally not a big deal
13:14drewrflatten doesn't act lazily with side effects perhaps
13:14drewrI'm returning batches of data from a database with lazy-seq
13:15drewrif I do (take 1 (flatten (get-batches ...))) it hits the database for all matching batches
13:15drewrbut if I do (take 1 (get-batches ...)), it only hits the db to get the first batch
13:16cemerickwhoa, doseq supports the same filtering as for!
13:18abedragot a strange question if anyone is around to help
13:19abedraI have some code http://gist.github.com/167970
13:19abedrathat produces an error
13:19abedrabut if I copy the top function into the repl and just paste the innards of the second funtion to the repl it works
13:19Chousukedefn is missing the parameter list
13:19abedraoh good lord
13:20mudphoneit happens to everyone
13:20abedrawow
13:20abedratime for sleep
13:20abedrathanks
13:20mudphone(or maybe just me)
13:20RaynesNever happened to me. >_>
13:20abedralol
13:20mudphonejust me then :)
13:21RaynesOf course, I had several embarrassing mistakes that seemed equally stupid. Just not this particular one.
13:21Raynes:)
13:21mudphonelast night I tried to use defn, without calling it...
13:21mudphonedefn... instead of (defn
13:21mudphoneoh boy
13:21lrennhappened to me last night. writing lots of deftests can do that.
13:22mudphonethe interesting thing is the error
13:22mudphonejava.lang.Exception: Can't take value of a macro:
13:23mudphone... anyway...
13:24Chousuke,def
13:24clojurebotjava.lang.Exception: Unable to resolve symbol: def in this context
13:24mudphonein my case it was
13:24mudphone,defn
13:24Chousukethat's rather interesting
13:24clojurebotjava.lang.Exception: Can't take value of a macro: #'clojure.core/defn
13:24Chousuke,(def def 0)
13:24clojurebotDENIED
13:24Chousukedamn.
13:24cemerickbetter than when I first started learning clojure, and was doing (filter #(nil? %) ...), etc.
13:24cemerick:-(
13:25Chousukewell, that's quite normal :P
13:25abedra:)
13:25Chousukeeventually you grow to notice such redundancy and eliminate it.
13:25cemerickthat's what I get for being away from scheme for so long
13:26Chousukeand filtering nils is interesting too. :)
13:27mudphonesome people like their nils
13:27Chousukeheh.
13:31cemerickChousuke: yeah, I was just tossing out an example, and nil? came to mind first
13:33Chousukeheh.
13:46jwhitlarkDoes anyone know if "The Little Schemer" has anything to offer for working in clojure? Is it lisp focused or scheme focused?
13:46osaundersI don't understand. There's not-any? but no any? Is that right?
13:47mblinnscheme
13:47mblinnbut it's very enjoyable
13:47stuartsierraosaunders: "any?" is effectively "some"
13:48cemericknot-any? probably should have been none?
13:48osaundersstuartsierra: Thanks. Can't help being annoyed by that naming inconsistency though.
13:48technomancyis "some" a CL-ism?
13:48mudphonejwhitlark: I'm currently reading "The LIttle Schemer"
13:48technomancythat would certainly explain the annoying inconsistency
13:48mudphonejwhitlark: I think it's worth checking out, if you're new to lisp
13:48stuartsierra"some" is slightly different, it returns the thing found, instead of true/false
13:48jwhitlarkI'm just trying to figure out if has a wider applicability to lisp.
13:48technomancyjwhitlark: definitely worth a read.
13:48stuartsierraThe predicates ending in "?" usually return a boolean.
13:49osaundersAh.
13:49stuartsierraI believe it's also a CL function.
13:49jwhitlarkmudphone: I've been using lisp off and on for a while, but I'm really aiming for a deeper understanding now that I'm trying to do production work in clojure.
13:50stuartsierraYou could (defn any? [pred coll] (if (some pred coll) true false))
13:51stuartsierracorrection: "some" returns the first logical true value returned by the predicate.
13:51mudphonejwhitlark: rich hickey has a clojure bookshelf on Amazon
13:52mudphonejwhitlark: clojure bookshelf: http://www.amazon.com/Clojure-Bookshelf/lm/R3LG3ZBZS4GCTH
13:53stuartsierrathat's one comprehensive list!
13:53jwhitlarkohhh. Christmas time!
13:53stuartsierraIf you can plow through every one of those books, you'll be a rockstar programmer for sure.
13:55jwhitlarkI'm working through On Lisp at the moment. I've got a month's vacation to get caught up on the things I've been missing.
13:55gkoIs there already a FTP clojure library ?
13:56mudphonejwhitlark: there are three books in "The Little Schemer" series... in case the first one is too basic for you
13:57mudphonestuartsierra: let's see if I can plow through AND understand them :)
13:57osaundersstuartsierra: Thanks for the any? def but I think some will do fine. Probably why any? isn't defined.
13:58stuartsierraexactly
13:58osaundersIs a bookshelf the books his owns?
13:58osaunders*he owns
13:58osaundersThe list author says: "Books that influenced Clojure, in no particular order
13:59osaunders^ answered my own q.
13:59mudphoneactually, first heard of the list from technomancy's blog
14:00osaunders36 programming books is a lot of work.
14:00osaundersI get through probably little over 6 programming books a year.
14:01osaundersI read something once that suggested the best ratio for programming awesomeness was 70% programming 30% reading.
14:01osaundersOf course the time you spend programming should be on stuff that challenges you,
14:01clojurebotthat is not what I wanted
14:03osaunders(print pie),
14:03mudphoneravi_n = ravi_nemani ???
14:22drewrstuartsierra: do you want patches for c.c.http.agent, or is it still a work in progress?
14:23drewractually, c.c.http.connection
14:23stuartsierradrewr: happy to have corrections/bugfixes
14:24stuartsierrabut I wouldn't bother with assembla patches, it's still a work in progress
14:24stuartsierraI've actually been wondering if I should remove it from contrib altogether until I'm satisfied it's finished.
14:24drewrworks well for me with a couple of bugfixes
14:25stuartsierrahit me, then
14:25technomancystuartsierra: I'm of that opinion. it's not difficult to create new repositories for experimental or in-progress code.
14:25technomancyas long as you've got mechanisms for dependency resolution, of course.
14:25stuartsierraIt doesn't depend on much, just duck-streams.
14:26technomancystuartsierra: right, I mean for code depending on http.agent
14:26stuartsierraoh, right
14:26lisppaste8drewr pasted "c.c.http.connection fixes" at http://paste.lisp.org/display/85390
14:26technomancygood thing corkscrew is around! </self-promotion>
14:26stuartsierrahow's that coming, by the way?
14:27drewrI'm using jdk6; not sure if that makes a difference with regard to setting streaming mode before connecting
14:27technomancystuartsierra: it's done. as much as I need is done anyway.
14:27drewrbut that's why I had to move .connect around
14:27stuartsierracool
14:27technomancyjust waiting for the vast throngs of users to tell me how they like it. =)
14:27drewrs/move/copy/
14:28stuartsierradrewr: I think you're right.
14:28stuartsierrathe streaming mode should be set before .connect, always
14:34cemericka generalized dependency resolution utility and linker would be great
14:34technomancycemerick: what's a linker?
14:36cemericktechnomancy: broadly, given a program, it determines all transitive dependencies, and produces "object code" (in our case, just a merged jar, etc) that contains only what you need to run the given program
14:37technomancycemerick: gotcha. yeah, if you've got dependency resolution down, then that's pretty trivial.
14:37cemerickwhich we don't, yet (AFAIK)
14:37technomancycemerick: take a look at corkscrew. =)
14:37cemericktechnomancy: I saw maven and ran away. Sorry. :-(
14:38drewrstuartsierra: thanks
14:38technomancycemerick: heh; the whole point of corkscrew is that you don't have to use maven.
14:38drewrah, you broke the typo out into a separate commit, good
14:38stuartsierrayeah, someone posted that on the list
14:38cemericktechnomancy: "It currently requires that Maven be installed to work. This requirement should be removed in future versions."?
14:39technomancyyou don't have to interact with it is what I mean.
14:39cemerickah
14:40technomancyonce I get it so you don't need maven installed I will be sure to hide any references to that word deep away in the code so it doesn't frighten people away.
14:40cemerickright now we're using git submodules for dependencies. I'm hoping subtree merging gets into the git mainline eventually, as that would be a nearly-ideal scenario.
14:41cemericktechnomancy: I'm highly allergic to maven. It's one of those tools that demands that it own your entire world.
14:42technomancycemerick: maybe in Java that's true
14:42technomancyin Clojure you can use it only for dependency resolution and it's very simple
14:42lrenntechnomancy: did you consider ivy since you're only using the dependency resolution?
14:43technomancylrenn: I considered it. they both support maven's repository format... when in doubt, choose the tool that doesn't consider XML to be a programming language.
14:43technomancygreenspun's tenth and all
14:44cemericktechnomancy: that's interesting. I may take another look if git subtrees don't materialize.
14:44technomancyI mean, when you consider the fact that the creator of ant has publicly apologized for it and decided to give up his career in programming... that says a lot.
14:44Chousukesubtree merging?
14:45technomancyand it's a good thing too; he's much better at photography.
14:45lrenntechnomancy: agreed re: xml and ant, but you could have used ivy just to fetch the deps, no xml required (i think anyway).
14:46technomancylrenn: corkscrew is 200 lines of code. if someone wants to rewrite it to use ivy I would be fine with that.
14:46cemerickChousuke: http://navarra.ca/?p=520 and http://github.com/apenwarr/git-subtree/tree/master
14:49Chousukehmm
14:49Chousukegit submodules aren't that bad once you get used to them, but they're not very flexible.
14:49Chousukeyou can't follow a "moving target"
14:50cemerickThat's not my real gripe with them. The real issue IMO is that the submodule dir (that contains the hash to be checked out) is a constant source of merge conflict.
14:54Chousukecemerick: interesting
14:54ChousukeI hope it gets merged.
14:54cemerickone step closer to svn:externals, which is the only thing I miss from svn
14:55weissjanybody know how to use jline? how do you go back to history?
15:13cemerickdoes proxy not support implementing overloads with different arities?
15:14Chouserit does
15:14cemerick(e.g. even with -byte<>-int-int-style names?)
15:14cemerickhrm
15:14ChouserI can never remember how, though. you might have to overload all the arities and handle them inside the one fn
15:14cemerickOh, right. I remember now. :-P
15:19cemerickChouser: yup, thanks for the reminder :-)
15:21ChouserI'm not sure I've ever had to do it myself, or at least so rarely I always forget.
15:23cemerickthis was precipitated by proxying an abstract class that had a writeBytes(byte[], int, int) method, but provided a (byte[], int) default impl -- and I figured I could leave the latter to do its thing
15:24AnniepooI can't believe it, I was loving this language before, and having to go through a compile cycle. Now I'm altering the code as it runs! A-freeeking mazing!!!!
15:26AnniepooWhooo HOOOO!!!!!
15:26Chousuke:D
15:33weissji was using clojure-dev in eclipse but the repl sucks so bad there bc jline doesn't work in eclipse. so now i'm using a plain repl in linux console. what do i call to load a file and run it? that's what the eclipse env does behind the scenes. load-file just loads it
15:35weissjer, maybe my previous environment would switch ns, this one doesn't
15:36weissjwhat's that
15:37Chouserhttp://github.com/mmcgrana/ring
15:37Chouser(defmulti app :uri) (ring.jetty/run {:port 8080} app) ; whee!
15:38Chousukeheh
15:39Chousuke github is slow :(
15:39ChousukeI hear they're working on it though. I wish them success :)
15:40hiredmanindeed
15:49lrenntechnomancy: after looking at corkscrew, ivy is of no use to you since you use it to build.
15:49lrenntechnomancy: i think you might have some issues with a few of you shell scripts as well.
15:49lrenntechnomancy: other than that, pretty neat.
15:50technomancylrenn: well that's basically my first non-joke shell script, so no surprises there.
15:50lrenntechnomancy: yeah, while trying to debug it I saw the comment :)
15:50technomancyusing corkscrew to build is just bonus though; it'd be pretty easy to move that out of maven.
15:50stuartsierraAre agent actions dispatched with "send-off" queued in the order they are sent?
15:50technomancywell, so says me anyway since I have yet to encounter a non-trivial build process modulo dependency resolution.
15:50weissjwhat's wrong with (-> @testscript getClass getDeclaredMethods) ? -> doesn't work like ..?
15:51Chousukeweissj: you need .getClass and .getDeclaredMethods
15:51weissjoh right
15:51stuartsierrai.e. if I write (do (send-off a one) (send-off a two) (send-off a three)) do I know that the actions will execute in the order one,two,three?
15:52technomancystuartsierra: pretty sure it will; you can double check what class is used for queueing in Agent.java if you want to be sure.
15:52stuartsierraok
15:53stuartsierraIt appears to work.
15:58stuartsierra,(let [a (agent [])] (dotimes [i 1000] (send a conj i)) (await a) (apply < @a))
15:58clojurebottrue
16:09weissjis there a compliment to nil?
16:09weissji mean a compliment to (nil?) ?
16:09Chouser(complement nil?)
16:09Chouser:-)
16:10weissji know there's (not nil?)
16:10weissjbut i mean one fn
16:10ChouserYeah, I understand. I don't think so.
16:10weissjk
16:11Chouser#(not (nil? %)) or (complement nil?)
16:11cemerickthere's always if-not and when-not, too
16:11Chousermany higher level things have their own complementes
16:11Chouserright, if-not, when-not, remove instead of filter
16:17drewrI have a doseq that is traversing a lazy-seq of stuff from a db that's somehow running out of heap
16:17drewrif I babysit it and run System/gc periodically, it frees memory up
16:18drewrbut I shouldn't have to do that
16:19drewrI can count the whole stream and it doesn't run out of memory
16:19Chouserew
16:19Chousersorry
16:19drewrI guess I'm doing something in the doseq that's holding onto the head
16:20Chouserif you're actually holding the head, I don't thing a System/gc would help.
16:20drewrright, that's what I thought
16:20drewrof course me calls to .freeMemory are completely unscientific
16:20drewrit may just be illusory
16:21tomojwhy is it unscientific?
16:21tomojtoo many other variables?
16:21drewrjust randomly hitting it from the repl
16:21drewrto see if it's rising or falling
16:37ChousukeChouser: heh, I should've used #() in my golfing attempt :(
16:47hiredman:D
16:48hiredmanclojurebot responded to ~def + in a xmpp muc
16:49hiredman ~ping still gets me a NPE
16:50technomancyhiredman: you got clojurebot on xmpp?
17:03osaundersjava.lang.RuntimeException: java.lang.ClassCastException: java.lang.Integer
17:03osaundersThat means I'm trying to execute a number right?
17:03osaunders,(1)
17:03clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn
17:04osaundersCan that exception occur for any other reason?
17:05hiredmanthose are the same exception but for different reasons
17:05hiredman java.lang.ClassCastException means something is trying to cast something to something it isn't
17:05osaundersOh wait, I worked it out.
17:06osaunders,(conj 1 [])
17:06clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection
17:06osaunders,(conj [] 1)
17:06clojurebot[1]
17:06osaunders:-)
17:19osaundersWhen do you use let? I haven't yet needed it.
17:20tomojall the time? :)
17:21osaundersWhy?
17:22hiredmanfor local names
17:22osaundersYou don't need that though.
17:22osaundersRight?
17:23tomojI assume clojure is still turing complete without it
17:23Chousukeyou do, unless you want to do a lot of unnecessary typing/computation
17:23technomancyosaunders: you never _need_ it. you use it sometimes to cache values in order to avoid calculating them twice, and sometimes just to give a value a more readable name.
17:23tomojbut it can be useful
17:23tomojhere's a simple example: I'm matching a string against a regex with re-matches
17:23tomojwell.. guess that's not a really good example
17:24ChousukeI mean, which is better: (let [x (first s)] (+ x x x)) or (+ (first s) (first s) (first s))?
17:24tomojthat's a good example :)
17:24osaunders(apply + (repeat (first s)))
17:24osaunders3 in there
17:24Chousukeyou forgot take 3
17:24Chousukebut that's contrived
17:25Chousukenever mind that (* 3 (first s)) is even better :P
17:25tomojI have some code here where I have to do some conditionals based on a string, but it needs to be parsed to an int before I can check it
17:25Chousukebut still, let is not something you'd want to do without.
17:25tomojrather than reparse it in every single conditional, I use let to bind it to a local name
17:25Chousukeespecially because it has destructuring
17:25osaundersHm.
17:25osaundersI don't think I get this language at all sometimes.
17:26Chousukewhat, specifically?
17:26technomancyis it a common pattern to have properties that need to get set before a given class loads?
17:27technomancyI was assuming they were getting checked at runtime, but that was not the case.
17:27Chousukeosaunders: let is like temporary variables in other languages.
17:27weissjif i'm calling a java method that has a vararg String... i can't pass it ["hi" "there"], how do i give it a type hint
17:27osaundersChousuke: I'm not saying that just because of let.
17:27hiredmangod
17:27technomancy~doc into-array
17:27clojurebotI don't understand.
17:27Chousukeosaunders: though of course, let bindings are not variable at all :P
17:27hiredmanosaunders: your code isn't full of calls to defs is it?
17:28hiredmandef
17:28tomoj,(let [[match? month day year] (re-matches #"(\d+)-(\d+)-(\d+)" "08-14-2009")] [match? month day year])
17:28clojurebot["08-14-2009" "08" "14" "2009"]
17:28Chousuketomoj: durr.
17:29ChousukeI forgot the existence of re-matches completely.
17:29tomojis there something better?
17:29osaundershiredman: Hm, yeah I guess it is.
17:29Chousukepat*
17:30hiredmanosaunders: :(
17:30Chousukeosaunders: then you're most likely doing it wrong :/
17:30hiredmanvery very wrong
17:30Chousukethough hopefully not.
17:30tomojthe fact that clojure can be used that way is somewhat scary
17:30Chousukeosaunders: are those defs inside functions?
17:30osaundersActually no, in this case I don't think I am.
17:30hiredmandef is only ever for global names, and you should never be re-defing stuff
17:30technomancytomoj: it's a side-effect of allowing interactive development
17:30osaundersBut I can see that it will be unsustainable.
17:31tomojtechnomancy: I guess it's not really all that scary. I've just been reading "Out of the Tar Pit" today
17:31technomancyhehe
17:31technomancytomoj: I wouldn't be averse to a warning when using def in a non-toplevel context
17:32hiredmanso clojurebot is also in clojure@conference.thelastcitadel.com if anyone wants to play with him via xmpp
17:33tomojso does that mean I can evaluate clojure in gmail now?
17:33tomoj:)
17:33hiredmansure
17:34tomojnot sure when I would want to do that really, but cool
17:34clojurebotthat is not what I wanted
17:34hiredmanI think getting into a mutiluser chat with gmail is weird
17:34tomojoh, I see
17:35osaundersWhat did clojurebot just say that?
17:35osaunders*Why did
17:35Chousukeit does that sometimes.
17:36osaunderslol
17:37osaundersLike a swearing uncle... "Oh he does that sometimes."
17:37Chousuke~want
17:37clojurebotIt's greek to me.
17:37Chousukehmm
17:37osaunders~uncle
17:37clojurebotGabh mo leithscéal?
17:37ChousukeI wonder which word he reacted to
17:38Chousuke~that
17:38clojurebotthat is not what I wanted
17:38osaunderswant something
17:38osaundersthat
17:38Chousukeclojurebot: forget that
17:38clojurebotI forgot that
17:38osaunderswant that
17:39osaundersclojurebot: forget want
17:39clojurebotI forgot want
17:39Chousukehm
17:39osaundersclojurebot: your own head
17:39clojurebotGabh mo leithscéal?
17:39osaundersclojurebot: forget your own head
17:39clojurebotI forgot your own head
17:39Chousukehow did he forget want when he had no definition for it? :P
17:39Chousukeosaunders: don't abuse the bot please.
17:39osaundersAww :(
17:39Chousukeit'll really forget some useful factoid if you keep that up :P
17:40osaunderslol OK
17:40lrennI don't suppose there is a way to add a jar to the classpath at runtime eh? I just wrote some wrappers around ivy and it'd be supper nifty to not only download the files, but add them to the classpath as well.
17:41Chousukeanyway, clojurebot is programmed to randomly respond to some statements with a factoid, using a fuzzy matching algorithm :P
17:41Chousukelrenn: add-classpath
17:41Chousukelrenn: but that's supposed to be repl-only :P
17:42Chousukelrenn: you should instead make it print out the proper classpath invocation so it can be configured at startup.
17:42technomancylrenn: the only way to do that is to unpack the jars into a directory and have that directory on the classpath at JVM boot.
17:42technomancymanaging a dynamic classpath is just asking for trouble
17:43lrennChousuke: I'm fine with it being repl only. Now I can do (rezolve "org" "name" "version") and have it available at the repl.
17:43Chousukeyou should rename that function :P
17:43lrenntechnomancy: agreed, but using it with emacs/slime wouldn't be too much trouble. if it blows up i'll just restart slime :)
17:43lrennChousuke: I should, but clojure already has a resolve :)
17:43Chousukelrenn: ivy-find? :P
17:44Chousukelrenn: "gimme"? :D
17:44lrennChousuke: was thinking of prefixing it all. I'm just screwing around right now. I'll probably got that route. Find will be reserved for searching (which is in ivy as well).
17:52lowlycoderhow do I actually install clojure into /usr/local; rahter than something like java -cp ~/build/clojure/clojure.jar clojure.main
17:52Chousukeshort answer: you don't. but you can put a launcher script in some bin directory.
17:53lowlycodergot it; question 2: how do I get openGL in clojure? perferably with access to opengl 3.0 functions
17:53Chousukehmmh
17:53Chousukethere are java opengl libraries. through them I suppose.
17:53Chousukethen there was that clojure opengl library, ...
17:53Chousukebut I forgot what it's called.
17:54Chousukeah, http://github.com/ztellman/penumbra/tree/master
17:54lowlycodercloggle?
17:54Chousukecloggle was the other one. but penumbra looks neater :)
17:55ChousukeI've never done anything with opengl so I'm not fit to judge :P
17:58lowlycoderit appears penumbra has GLSL support
17:58lowlycodernice :-)
18:02lowlycoderokay, it looks very very strongly like glsl support is in there
18:02lowlycoderi'm convincd this is the right library
18:02lowlycoderthanks :-)
18:35andyfingerhutIf I've got a possible performance bug to tell Clojure developers about, is it best to send it to the Clojure Dev group, or is there some other preferred method?
18:36andyfingerhutHmm, maybe not, since the info for that Google group says only members can post.
18:36hiredmanthe google group is moderated
18:36hiredmanor at least it was
18:36hiredmanyour first post had to be ok'ed by rich
18:36andyfingerhutSo the regular Clojure group, then?
18:37hiredmanI think that may be best
18:37hiredmanI am kind of curious to hear about this performance bug
18:38andyfingerhutI had a little test program for allocating different kinds of data structures, and one created 500K PersistentVectors.
18:39andyfingerhutI used jmap -histo:live to see what objects were live at the end of that, and there were 500K instances of java.util.concurrent.atomic.AtomicReference still around, live.
18:39andyfingerhutThis was purely sequential code.
18:39Chousukeyou can also use the support system on assembla I guess.
18:40andyfingerhutMy guess is that those should be temporarily allocated while creating a vec, but the references to them should perhaps be set to null after the (vec ...) call is finished.
18:40hiredmanwell, gc doesn't happen in the blink of an eye
18:40andyfingerhutTrue. But is it true that "jmap -histo:live" actually searches out and only reports live objects, as the documentation implies?
18:40hiredmanno idea
18:41hiredmanyeah take it to the group
18:41Chousukeno-one will fault you even if it happens to be a false alarm. :)
18:41Chousukeat least, I hope no-one will
18:41andyfingerhutIf they do, I can live with it :)
18:42ChousukeThe group behaves quite well usually. :P
18:42andyfingerhutYeah, I hope I haven't stirred up trouble by starting these benchmarks. Certainly wasn't my intent to cause trouble.
18:44jnudieandyfingerhut: trouble maker...
18:45ChousukeI think benchmarks are fine as long as they are done to accomplish some objective.
18:46andyfingerhutWell, I've given my objective -- figure out what styles of Clojure code give what kind of performance. I certainly don't deal with large data sets all the time, but when I do, I don't want to give up a big constant factor in time or space.
18:47Chousukebut you really may have found a memory leak here, so it's worth discussing on the group.
18:47andyfingerhutI will send it soon.
18:48Chousukeand most times it *is* rather difficult to squeeze the best performance out of Clojure.
18:48andyfingerhutI may even end up with a few additional tips to add to Rich's list of how to improve Clojure performance in inner loops.
18:48Chousukeusing arrays is no pleasant.
18:48Chousukenot*
18:48andyfingerhutbut his current list is pretty darn good.
18:51ChousukeRich once said that he'd rather work on "fundamental" performance than micro-optimisations. I should find the quote from the logs I guess :/
18:51hiredmanChousuke: architectual
18:52Chousukeright.
18:52Chousukewe have transients, chunked seqs and new new already coming up in the next version. And I guess primitive vectors and non-boxing functions are possible too.
18:53hiredman:2009:May:25:17:45:54 rhickey : other than that, things are so simple, architectural things (like the chunked seqs we are discussing) yield much more bang for the buck than micro-optimization
18:54dnolenChousuke: non-boxing functions? has much been said about that?
18:54Chousukednolen: more than about primitive vectors :P
18:54hiredmanjust rhickey dropping hints I think
18:54hiredman"I think I have way to do this"
18:54hiredmanor something like
18:55dnolenwhich probably means it will happen :)
18:55Chousukednolen: I think he plans on adding overloads to IFn for a certain number of long and double arguments
18:55dnolenwow that's cool.
18:55andyfingerhutSo my examining the memory utilization was initiated by the "Uncle Bob looking for Clojure help" message a couple days ago.
18:56dnolenandyfingerhut: I have a version of his code now that runs in 500ms instead of +25000ms.
18:56ChousukeI think one of the primary difficulties in making clojure code performant is telling when boxing and unboxing happens.
18:56andyfingerhut(def r (java.util.Random.))
18:56andyfingerhut(defn rands [] (repeatedly #(.nextGaussian r)))
18:56andyfingerhut(defn points [] (take 400000 (partition 2 (rands))))
18:56andyfingerhut(let [hull-points (time (hull (points)))]
18:56hiredman:(
18:56andyfingerhutWoops. Didn't mean to do all those lines like that.
18:56andyfingerhutBut it is fairly short.
18:56hiredmanlisppaste8: url?
18:56lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
18:57Chousukethat, and I suppose using arrays can lead to reflection that *warn-on-reflection* doesn't report :/
18:57andyfingerhutIf you realize the list returned by defn points, guess how much memory is used per 2d coordinate (all 400K of them) on a 64-bit JVM
18:57Chousukewhich of course kills performane.
18:57Chousuke+c
18:57dnolenandyfingerhut: for that example using vectors is pointless
18:57dnolenvectors are wrong for that kind of iteration heavy code over primitives
18:58dnoleneven creating an empty vector in a loop that tight is expensive
18:58dnoleneven creating an object is expensive
18:58dnolenhttp://github.com/swannodette/convex-hull/tree/master
18:58andyfingerhutEvery one of the 400K points, in a fully realized list, allocates 2 Doubles (expected), 3 Cons's (expected), and *4* LazySeq's (surprised me at first. I know why 3 of them, but the 4th is still a mystery)
18:59Chousukednolen: that's very ugly though :/
18:59andyfingerhutAnd on a 64-bit machine, each Cons and each LazySeq is 48 bytes of mem
18:59andyfingerhutSo for 2 8-byte doubles, on a 64-bit machine we are spending 384 bytes of mem.
19:00dnolenChousuke: exactly. optimization is not pretty.
19:00andyfingerhutI'm not saying that this program ought to be coded this way, but when you look at his code, it looks fairy reasonable and natural.
19:00andyfingerhuts/fairy/fairly/
19:00dnolenalso I have a sneaking suspicion now that javac does certain high level byte code optimizations for the JVM that the Clojure compiler currently does not do.
19:01dnoleneverything in my version is inlined and optimized, and the Java version is still about 6 times faster.
19:01andyfingerhutOn a 32-bit JVM, it's better, but still 200 bytes per 2d point.
19:02Chousukednolen: maybe because not everything in the java version is inlined?
19:02Chousukeor is it?
19:02Chousukeremember, too much inlining can hurt performance too
19:03dnolenChousuke, javac doesn't crazy kinds of analysis. if you have a for loop with no operation, that code actually gets removed!
19:03dnolenbasically, it'll be some time before you can compete with javac.
19:03hiredmandnolen: I'm pretty sure the jit does that
19:03ChousukeClojure pretty much depends entirely on hotspot for optimisation
19:03JAS415when is there gonna be a GCC frontend for clojure :-p
19:03dnolenhiredman: not as far as I could tell, this doesn't happen in clojure for example. empty loop/recur with no ops takes up time.
19:04Chousukeif hotspot fails to optimise, you just get unoptimised gode :P
19:04Chousuke... code.
19:04JAS415hotspot is really good
19:04JAS415especially if you run a function more than once
19:04ChousukeJAS415: yeah, it is. but probably optimised for java...
19:04JAS415it'll get faster and faster
19:04JAS415code is code :-P
19:05Chousukebut code patterns are not identical between languages.
19:06konrwhat clojure tutorial do you guys recommend me reading?
19:07andyfingerhutwhat's your background in other prog languages?
19:07Chousukekonr: here is some good stuff http://java.ociweb.com/mark/clojure/
19:07konrI did some cool things with lisp, know a bit about python and c and web things, but nothing about java
19:08tomojuhh
19:08tomojthat page plays a soundclip, lol?
19:08Chousukeit does?
19:08tomojI thought we stopped doing that several years ago
19:09Chousukeoh it does.
19:09andyfingerhutI've got some Lisp/Scheme background before coming to Clojure, too, and I wouldn't call it a tutorial, but I really enjoyed the "Clojure for Lispers" on clojure.blip.tv. About 3 hours long between 2 videos.
19:09tomoj<embed> with autostart
19:09hiredmanhaha
19:09hiredmanis that friends?
19:09tomojisn't that like 10 years ago stuff
19:10Chousukeoh, yeah.
19:10ChousukeWatch all of Rich's talks.
19:10Chousukeif that doesn't sell you clojure, nothing will.
19:10tomojwhere are they? youtube?
19:10hiredman~blip.tv
19:10clojurebotblip.tv is http://clojure.blip.tv/
19:10tomojnice
19:10tomojdoes he defend against no tests in one of those?
19:11hiredmanhttp://www.artima.com/designtechniques/hotspot2.html some of these tips seem to be at odds with clojure
19:11hiredmanno'
19:11andyfingerhutNot in the Clojure for Lispers one, at least. I haven't watched them all. He does definitely mention functional code being easier to test.
19:11hiredmanthere is another video somewhere of the talk where I think someone asked about that
19:12hiredmanbut I forget where that video is
19:12tomojI read technomancy say that he mentioned the paper Out of the Tar Pit while defending
19:12tomojI'd be interested to hear what else he said about it
19:12hiredmanI imagine he just said "there is a great paper about that: Out of the Tar Pit"
19:13Chousukehiredman: yeah, and it does say on the page that this "lore" is outdated by hotspot :)
19:13Chousukeor supposed to be, anyway
19:13technomancytomoj: that was the bay area clojure meeting.
19:14technomancyand he didn't defend against "no tests" he defended against "you should be the one writing the tests"
19:14technomancybig difference
19:14andyfingerhutChousuke: "lore" about "JVM is slow", or lore about testing?
19:14Chousukeandyfingerhut: lore about how to make java programs fast.
19:14tomojtechnomancy: I see
19:15tomojtest-first vs test-later ?
19:15hiredmanhttp://kotka.blip.tv/file/2286313/ is the bay area clojure meetup
19:15technomancytest-first vs regression tests, yeah.
19:16tomojI'm glad the question wasn't "no tests?"
19:16tomojthat scared me
19:16tomojhiredman: thanks
19:19JAS415testing?
19:23tomojwow, I never realized this
19:23tomojmultimethods are like a duckier version of duck-typing
19:24tomojinstead of "does it quack like a duck?" you get to pick whatever question you want.. cool :)
19:25andyfingerhutReminds me of a line from a weird Monty Python sketch: "Maurice, you haven't got something a little less _ducky_, have you?"
19:25hiredmanit's dispatch as it's own thing without being part of a type system
19:25tomojwonder if someone has thought of a cute name for it
19:43lowlycoderif comma is white space, what's unquote?
19:44lowlycoderthe cond change seems really stupid
19:48tomojunquote is ~
19:49Carkhwhat cond change ?
19:49tomoj,`(foo ~(inc 3))
19:49clojurebot(sandbox/foo 4)
19:49tomojcond is different from CL
19:49tomojI think arc made the change too
19:49Carkhoh i was worried for a second =P
19:50Carkhit doesn't make a whole lot of a difference from cl
19:50tomojseems sensible to me
19:50tomojwhy do you need those extra parens?
19:51Carkhso you can have pultiple statements
19:51Carkhmultiple
19:51Carkhbut cl is not as functional as clojure so that make sense for cl
19:51tomojah, implicit progn
19:51tomojyeah
19:52Carkhso i would disagree that the change is stupid
19:52tomojI think do is meant to me very explicit in clojure
19:52tomojyou want to be easily able to see anytime something is nonfunctional
19:52Carkhit is not mere syntactic easing, it conveys a meaning
19:54tomojwow, arc's `if` is anaphoric
19:55tomojaccording to graham, mccarthy said he got cond wrong and it had too many parens :)
19:55Carkhwell i still beleive it makes perfect sense to have those extra parens for CL
19:56Carkhwhatver mccarthy might think about it =)
20:09lowlycoderat the clojure repl, C-C and C-D both terminate, the repl, but C-h gives me ^H rather than deleting the previous char; how do I fix this (C-h works fine at the zsh shell, so I think it's java/clojure specific)
20:10technomancylowlycoder: you'll want to run your repl inside the rlwrap tool
20:10technomancyjava's console IO is crapforbrains
20:11lowlycodernice; thanks!
20:33lowlycoderuser=> (require 'quoted-namespace-symbol)
20:33lowlycoderjava.io.FileNotFoundException: Could not locate quoted_namespace_symbol__init.class or quoted_namespace_symbol.clj on classpath: (NO_SOURCE_FILE:0)
20:33lowlycoderuser=>
20:33lowlycoderclojure was started with: "rlwrap java -cp clojure.jar clojure.main"
20:34lowlycoderuser=> (require quoted-namespace-symbol)
20:34lowlycoderjava.lang.Exception: Unable to resolve symbol: quoted-namespace-symbol in this context (NO_SOURCE_FILE:8)
20:36technomancylowlycoder: most likely "quoted-namespace-symbol" was intended as a placeholder for the name of a real namespace.
20:36technomancywhat are you trying to do
20:36technomancy?
20:36lowlycoderpage 37 of the clojure book
20:36technomancyright.
20:37technomancyyou want to replace that with the name of the library you want to require.
20:42mebaran151that could really screw somebody up, if somebody actually named a library that
20:43tomojif it's a grey block with blue text, you're not supposed to type it
20:43tomojyou're supposed to type the reddish text that looks like it's at a repl
20:48lowlycoderto use clojure.contrib ... do I use clojure-1.0.0 or clojure from git?
20:49hiredmanclojure contrib is a seperate package
20:49lowlycoderright, but it depends on a version of clojure
20:49hiredmansort of
20:49hiredmanthere is a branch of contrib to maintain 1.0 compat
20:50lowlycoderhmm, i just built clojure-contrib.jar
20:50lowlycoderhow do I get (require 'clojure.contrib.str-utils) to work?
20:50hiredmanthen you should be fine
20:50hiredmanthe jar needs to be in your classpath
20:52lowlycoderrlwrap java -cp ~/clojure/clojure/clojure.jar:~/clojure/clojure-contrib/clojure-contrib.jar clojure.main
20:52lowlycoderClojure 1.0.0-
20:52lowlycoderuser=> (require 'clojure.contrib.str-utils)
20:52lowlycoderjava.io.FileNotFoundException: Could not locate clojure/contrib/str_utils__init.class or clojure/contrib/str_utils.clj on classpath: (NO_SOURCE_FILE:0)
20:54hiredman,(require 'clojure.contrib.str-utils)
20:54clojurebotnil
20:54hiredmanworks here
20:54hiredman*shrug*
20:54lowlycoderhow do you start clojure?
20:55_mstlowlycoder: your second ~/ in the above command line might not be expanding
20:55hiredmanjava -cp etc:etc clojure.main
20:58lowlycoderhmm, it appears that i'm not building clojure-contrib properly
20:58lowlycoderls -l ~/clojure/clojure/clojure.jar
20:58lowlycoder-rw-r--r-- 1 x x 1502501 2009-08-14 17:41 /home/x/clojure/clojure/clojure.jar
20:58lowlycoderant -Dclojure.jar=~/clojure/clojure/clojure.jar
20:58lowlycoderstill gives me:
20:58lowlycoder [echo] WARNING: You have not defined a path to clojure.jar so I can't compile files.
20:58lowlycoder [echo] This will cause some parts of clojure.contrib not to work (e.g., pretty print).
20:58lowlycoder [echo] To enable compiling, run "ant -Dclojure.jar=<...path to clojure.jar..>"
20:58_mstyeah, it's your ~'s
20:59_mststart using $HOME instead of ~ and it should be alright
20:59lowlycoderyeah, it is apparently
20:59Carkhthe contrib warning is only for c.c.pprint
21:00lowlycoderis there some var I can export in my ~/.zshrc to make my life easier?
21:00lowlycoderwoot, rinally got: (require 'clojure.contrib-str-utils) to work
21:03hiredmanlowlycoder: you running jdk1.6?
21:03hiredman1.6 can have * in the classpath
21:03lowlycoderyes
21:03lowlycoderi'm running 1.6
21:03hiredmanso you puts all your jars in ~/.jars/
21:04hiredmanand CLASSPATH="$HOME/.jars/*" in your .zshrc
21:04lowlycodersymlinks okay?
21:04hiredmansure
21:04hiredman.jars or where ever
21:05lowlycoderexport CLASSPATH="$HOME/*.jars/*"
21:05lowlycoderdo i need something else?
21:05hiredmansetopt allexport
21:06hiredmanwoa
21:06hiredmanthat won't work
21:06hiredman* in the classpath is not the samething as the shell glob
21:07konrthese clojure videos are so cool <3
21:08konrthe video is not synchronized, though. Is there a way to download them?
21:09hiredmanon blip.tv?
21:09konryes
21:09hiredmanyeah you go down on the right side
21:09hiredmanthere should be a "files" menu or something
21:09lowlycoderhow do I take a clj file and turn it into a *.jar ?
21:09hiredmanI forget exactly
21:09hiredmanlowlycoder: a jar is just a zip file
21:10hiredmanso it kind of depends
21:10hiredmanif you just want to bundle clojure files up, you can just jar them up and put the jar on the classpath
21:10hiredmanif you actually want to AOT compile the clojure files to class files the process is slightly more involved
21:11lowlycoderi can just jar up a bunch of *.clj files?
21:11hiredmansure
21:11hiredmanas long as they have the correct namespace stuff
21:11durka42that will not do what you expect though, doesn't a jar have a bunch of hidden files
21:11durka42i mean a jar that can be run with java -jar
21:11hiredmandepends
21:12hiredmandurka42: you don't know what he expects
21:13durka42this is true
21:13durka42i made a baseless assumption
21:14lowlycoderi want to build jar files that operate kinda like *.so files
21:15lowlycoderi.e. things other clojure apps can load up and use functions from
21:15hiredmanclojurebot: the point of moby dick is "be yourself"
21:15clojurebotAlles klar
21:15hiredmanlowlycoder: yeah, you can just jar up the files and directory structure
21:15lowlycoderjust jar up the *.clj files?
21:15lowlycoderthey aren't even compiled ....
21:15hiredmanyep
21:15hiredmanno problem
21:15lowlycoderso what, java automatically loads up teh source, runs clojure, then converts them to jvm byte code?
21:16lowlycoderhow does java even know how to handle clojure files?
21:16hiredmannope
21:16hiredmanyou need the clojure.jar
21:17hiredmanlowlycoder: when you require namespaces the clojure runtime searchs the classpath for the implementation of the namespace
21:17hiredman~classpath
21:18hiredmanclojurebot: hello?
21:18hiredmancrap, I left a debugging println in somewhere
21:18clojurebotclasspath is (System/getProperty "java.class.path")
21:19clojurebotBUENOS DING DONG DIDDLY DIOS, fRaUline hiredman
21:20hiredman~namespaces
21:20clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
21:20hiredman~compile
21:20clojurebotthe unit of compilation in clojure is the namespace. namespaces are compiled (not files). to compile a namspace the namespace needs to be on the classpath and so does ./classes/ (and the directory needs to exist) because clojure writes the class files to that directory. http://clojure.org/compilation
21:21hiredmanshare and enjoy
21:59_hrrldDoes anyone know where I can find an example of using clojure.contrib.logging successfully? I'm calling trace, but it's not clear where the log output is going.