#clojure log - May 27 2009

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

1:18 mark_the_pirate: is emacs + slime the best choice for clojure?

1:21 hellllllllllo :-)

1:21 durka42: i think the question is, is emacs + slime the best choice for you :)

1:21 i like vim better but that's me

1:23 arohner: mark_the_pirate: emacs + slime is the best choice if you already know emacs

1:23 mark_the_pirate: what is your vim setup like? i use vim exclusively, but wanting to branch off into clojure it feels like i emacs+slime offers more

1:23 arohner: mark_the_pirate: it does, and emacs is better :-)

1:23 mark_the_pirate: i mean with the REPL built in and all

1:23 durka42: well there is kotarak's vimclojure

1:23 which has a repl built in

1:23 arohner: but to be honest, slime is pretty powerful, but it's also a pain to keep up to date

1:24 the slime devs aren't very useful

1:24 mark_the_pirate: hmm, i'll look into vimclojure

1:24 thanks!

1:47 has anybody read the programming clojure beta ebook? will the paper copy be worth it?

1:52 aaronharsh: I'm having trouble resolving an "No matching method found" error. is anyone up for looking at some code?

1:53 hiredman: sure

1:54 aaronharsh: perfect. where should i paste the code? i'm guessing the problem is obvious, but there's 40 lines of code around the line that's giving me a problem

1:55 hiredman: lisppaste8: url?

1:55 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

1:56 aaronharsh pasted "No matching method found" at http://paste.lisp.org/display/80889

1:56 aaronharsh: Exception in thread "Thread-0" java.lang.RuntimeException: java.lang.IllegalArgumentException: No matching method found: write for class com.sun.media.sound.DirectAudioDevice$DirectSDL

1:56 on the call to .write in play-queued-sound

1:57 i get a Reflection warning for that line

1:57 hiredman: ~javadoc com.sun.media.sound.DirectAudioDevice

1:58 ah

1:58 aaronharsh: ~javadoc javax.sound.sampled.SourceDataLine

2:01 hiredman: aaronharsh: you might try casting the arguments to the method

2:02 (int ...)

2:04 aaronharsh: you mean the arguments to .write?

2:04 hiredman: yeah

2:04 aaronharsh: how does one cast the byte[] buffer?

2:05 hiredman: actually, to start, check the types of everything

2:05 (doto buffer (-> class prn))

2:07 aaronharsh: com.sun.media.sound.DirectAudioDevice$DirectSDL

2:07 [B

2:07 java.lang.Integer

2:07 hiredman: ahhh

2:07 aaronharsh: .. the three arguments to .write

2:07 hiredman: wiat

2:07 no

2:07 you only have two arguments there

2:07 and .write takes three

2:08 the first thing that looks like an argument is actually the object the methiod is called on

2:08 aaronharsh: well that's embarassing

2:08 hiredman: "P

2:08 :P

2:09 aaronharsh: aside from actually paying attention to your code, is there a nicer way to diagnose those errors?

2:10 hiredman: well, no matching method errors mean either there is no method of that name, or there no method of that name with a type signature matching your call

2:12 aaronharsh: the other time i ran into the "No matching method", it was because the runtime was trying to do reflection on a private class (which is why there are type annotations on source-line and target-line). but i suppose those are weird edge cases

2:13 hiredman: oh

2:13 Yeah

2:13 aaronharsh: thanks for your help

2:13 hiredman: sure

2:54 vy: Does anybody know what's the status of Stuart's book?

2:58 cataska: dead tree version is shipped

7:45 cemerick: what was the fate of clojure.contrib.enum?

10:07 lisppaste8: scottj pasted "time function that runs n times and returns avg, min, and max" at http://paste.lisp.org/display/80902

10:07 jwinter: just saw that the pragprogs are now shipping Programming Clojure. Yay!

10:09 scottj_: I'm trying to create a function like the builtin time but that I can pass a number n and have it evaluate the argument that many times and return the avg, min, max, and total. I've started here http://paste.lisp.org/+1QFA but I'm not sure how to finish it. the bench macro needs to eval expr at the right time, I think there needs to be a `, and maybe some vars need to be var#. any help?

10:19 Chouser: scottj_: when writing a macro it's always a good idea to write out an example expansion by hand.

10:20 you've got an example call there, so that's good. Now write out what you'd like the macro to produce for that.

10:21 I'd recommend something like: (bench-results 500 (for [_ (range 500)] (time2 (+ 2 2))))

10:22 that should make your 'bench' macro much simpler, and then you just need to write a bench-results function.

10:35 danlarkin: there's something in contrib similar to this, I think

10:50 Chouser: any chance import will ever allow use of the short name of nested class names?

10:51 (import '(com.foo.bar.packge.OuterClass InnerClass))

10:51 * Chouser is tired of writing Descriptors$MethodDescriptor

10:53 rhickey: Chouser: I'm loathe to introduce the further overloading of . - possibly might consider aliases for classnames, but couldn't do it by default - many nested classes have non-unique names

10:54 Chouser: (import '(com.foo.bar.packge.OuterClass$MiddleClass InnerClass))

10:54 rhickey: (OuterClass is not a package above)

10:54 Chouser: wouldn't have to overload . to help a bit

10:55 rhickey: I don;t understand that last bit

10:55 outer/middle/inner - doubly nested?

10:55 Chouser: yeha

10:55 yeah

10:56 I just mean that I wouldn't need to be able to say Outer.Inner -- I'm okay with Outer$Inner if Inner by itself were also an option

10:56 rhickey: . is overloaded if it is not a package name compnent separator

10:56 component

10:57 Chouser: Anyway, explicit aliases would be quite alright by me.

10:57 rhickey: it adds a lot of rules to use it as both a package component separator and a package/classname separator and a class/nested class separator

10:58 Chouser: yes, I'm not arguing to allow Outer.Inner when Outer is a class.

11:00 rhickey: (import '(com.p1.p2.p3.c1 c2)) still has overloading

11:00 http://java.sun.com/docs/books/jls/third_edition/html/names.html#106941

11:01 stuartsierra: Symbol macros could handle class aliasing.

11:02 rhickey: stuartsierra: not really, symbol macros don't exist yet, and they have all kinds of interactions with name interpretation in various contexts

11:03 at least aliases have a known relationship to their 'expansion'

11:06 I'm extremely reluctant to add symbol macros - symbol-macrolet is all I want, nice and local

11:07 stuartsierra: ok

11:07 Chouser: yikes. yeah, that's a lot of rules

11:07 but we're already allowed com.p1.p2.c1

11:08 rhickey: Chouser: yes, and many of them require context we don't have

11:08 Chouser: not where a package name is expected

11:08 Chouser: ah, ok.

11:09 It's just sad to see a perfectly pretty little function collapse under the weight of a couple #^Descriptors$ServiceDescriptor

11:10 I had a macro for a while to try to help reduce the need for them, but it wasn't really helping.

11:10 rhickey: I think aliases would be easiest and would mirror the support for namespace aliasing. I'm a little concerned people will start calling String S, and StringBuilder SB and further obfuscation, but I share the pain with some of these classnames

11:14 cgay: anyone interested in typos on the web pages?

11:15 http://clojure.org/concurrent_programming -- "an synchronous"

11:15 highly important bug :)

11:17 Chouser: cgay: fixed, thanks

11:36 bit-shift's are all boxed.

11:40 hm, but Long/rotateRight takes primitives, and bit-and is inlineable

11:44 cemerick: what is the recommended way to define enum classes in clojure these days? clojure.contrib.enum seems to have disappeared.

11:45 rhickey: cemerick: stuartsierra was here a while ago, was that his thing?

11:45 cemerick: yeah, I think so

11:47 stuartsierra: clojure.contrib.enum didn't work after gen-and-load-class went away.

11:47 rhickey: ah

11:48 does it have utility as an ahead-of-time thing?

11:48 stuartsierra: I don't think so, but I'll look.

11:49 It never was 100% equivalent to Java's "enum" keyword, it just generated a class that extended java.lang.Enum.

11:50 rhickey: I'm working on modularity issues these days, and one thing that's apparent is that making a newly named class universally accessible by name is unsustainable in the face of the various modular classloading schemes

11:50 thus the problems of add-classpath and gen-and-load-class

11:50 stuartsierra: ok

11:51 rhickey: you can't force all classloaders to be rooted in a dynamic classloader you control

11:52 stuartsierra: Can you migrate classes from one classloader to another?

11:52 rhickey: I can't - each modular classloading system (Netbeans, OSGi, web app servers) can do whatever they want

11:54 Chouser: can you work with unnamed dynamically-generated classes? make non-reflective calls, etc.?

11:54 rhickey: Chouser: sure, through a statically-known interface

11:54 stuartsierra: Ok. Can the framework provide a for Clojure to use?

11:54 provide a classloader for Clojure to use?

11:56 Chouser: The JVM has got to be one of Clojure's biggest weaknesses. Of course also a big strength.

11:56 rhickey: stuartsierra: the problem is that there is no standard way to provide a *dynamic* classloader - so any classloader you are given you must make a parent of a new dynamic classloader - but the framework doesn't know about that

11:56 stuartsierra: Yeah, I thought it might be something like that.

11:57 gnuvince: Chouser: although, were it not for the JVM, this channel would have 5 users instead of 120

11:57 rhickey: Chouser: these are not weaknesses - they are really the products of a good design. Putting everything in a big global bucket isn't that great an idea, from security, reliability and understandability standpoints

11:57 Chouser: gnuvince: I know

11:57 rhickey: In following CL's global world semantics I inherited a weakness I'd like to remove

11:58 Chouser: any reason there aren't bit ops for longs in clojure.lang.Numbers?

11:59 rhickey: I.e. when running under an app server it would be good if different Clojure web apps had some isolation from each other, having to put themselves in a single namespace map is bad

11:59 stuartsierra: rhickey: agreed

11:59 Chouser: but local classname semantics doesn't preclude dynamic local named classes, does it?

11:59 rhickey: Chouser: just missing, no reason

11:59 clojurebot: Who??

12:00 rhickey: Chouser: the problem is the expectations - people use things like add-classpath and gen-and-load-class and expect them to be available everywhere

12:01 stuartsierra: That's a tough one.

12:02 Chouser: ok. I'm going to pretend bit-and supports primitive longs, and imagine that I'm not using reflection and reboxing on every call to bit-and... :-)

12:03 rhickey: really? I'd be fine if something was some kind of repl-server, and add-classpath and gen-and-load in one repl had no effect in another.

12:03 rhickey: when AOT-compiled code is loaded, it is done so by a classloader I can't reparent

12:04 Chouser: is that a strength or a weakness?

12:04 rhickey: Chouser: I think that add-classpath per-REPL is likely

12:04 Chouser: ok, cool.

12:05 rhickey: what I am doing is removing the root classloader, then moving to using the context classloader, which can be set by a REPL to be a dynamic classloader, and what you are asking for will work

12:05 and there will be an understandable context for the visibility of dynamic things

12:06 stuartsierra: sounds reasonable

12:13 cemerick: ugh, customers are a joy sometimes.

12:14 stuartsierra, rhickey: so enums should just go in .java files?

12:15 stuartsierra: for now, yes

12:15 rhickey: cemerick: I guess for now

12:15 cemerick: OK. Worksforme.

7:15 Chouser_: thunderstorm

7:17 rhickey: Chouser: I don't want to give the impression I am anti-dynamic, Clojure is full of dynamic things. But is reasonable, IMO, to accept some limits on the dynamism of constructs (classnames) designed for static scenarios, whose static nature conveys a significant benefit - performance.

7:17 I guess the primary tension is with exception types, since the catch mechanism in the JVM is class based, forcing the use of classes in programs that wouldn't otherwise need to bother

7:18 but I appreciate your pressure to keep the source-only dynamic story a good one :)

7:20 cemerick: rhickey: that's only really true in a java-interop context, though, right? It seems like there could be a clojure-only try/catch that dispatched the handling of exceptions to a multimethod or something.

7:20 s/true/relevant

7:21 rhickey: cemerick: right, I've only exposed the bare mechanism at present

7:21 but personally think defining a new class for every type of problem to be pretty silly, even in Java

7:21 cemerick: definitely

7:22 stuartsierra: Depends on how you have to define those classes. Clojure defines a new class for every function, after all.

7:22 rhickey: stuartsierra: classes whose identity matters

7:22 Chouser_: fwiw, I've now got working my first real clojure lib for java consumption

7:22 cemerick: things seem to be a lot more serene around here of late. I'm thinking that a lot of people are just happily doing work with clojure, instead of looking for solutions to language issues they're hitting.

7:22 rhickey: Chouser: cool

7:22 Chouser_: and it looks and works great.

7:23 a single .clj defines a class of static factory methods, an interface, and requires an implementation .clj

7:23 rhickey: cemerick: I hope so. on my end I have: modularity, chunked seqs, 'instance' and clojure-in-clojure on the drawing board

7:24 Chouser_: the implementation is in a separate namespace/package. You can use this on it's own from Clojure.

7:24 I can reload the whole imp file or individual vars as needed.

7:24 Chousuke: hm

7:25 cemerick: rhickey: hrm, I don't rightly know what any of those are, really (though I certainly have my preconceived notions). I've just been getting things done, too. :-)

7:25 Chouser_: when running Java tests, I can make adjustments to the imp .clj and rerun the test without a recompilation (unlike changes made the the .java test itself)

7:26 Chousuke: I did some optimisation on iTerm. cut CPU consumption to less than a third when there's a lot of output, and broke blink support in the process.

7:26 all in all, a great success!

7:27 rhickey: Chouser_: are you using proxy to implement the interface?

7:27 Chousuke: I'm sure the code has a bazillion places left to optimise but I'm satisfied with removing the worst idiocy I could find :P

7:28 Chouser_: rhickey: yep, I'm using proxy all over the place

7:29 (proxy [Afn RpcCallback] ...) (proxy [APersistentMap RpcChannel] ...)

7:30 in fact I've got a couple places proxying APersistentMap to provide read-only access to a custom object's "members" while also implementing some particular interface for its instance methods

7:30 rhickey: Chouser_: is there anything about 'implement' as we've discussed that would preclude you using it instead of proxy? the model you've used (but using 'instance') is the approach I'd prefer people take vs gen-class

7:31 Chouser_: heh, I was just thinking recently about making that a feature of 'instance' since I think it will be so common

7:32 (exposing closed-over 'fields' via map interface)

7:37 * rhickey just accepted - speaking at JAOO in Denmark in October

7:40 Chouser_: no, instance would be fine

7:40 The one bit of hackery I've done on top of proxy is done in a macro and would work fine with 'instance'

7:41 and that's just to provide delegating to an IPersistentMap instance, so if you build that in I wouldn't even need that much hackery

7:41 dnolen: question: so does remove-ns not unload a namespace?

7:41 rhickey: Chouser_: cool. And is gen-class overkill for the factory and if so, do you have ideas about a simpler interface?

7:42 Chouser_: it is a bit much -- saying #^{:static true} each time is a bit annoying

7:42 I hadn't thought about alternatives. maybe :static-methods, and then you just use what you need?

7:42 dnolen: I note that using remove-ns, require doesn't actually reload that lib.

7:43 rhickey: Chouser_: I want to make definterface + deffactory + instance the easiest (and fastest) possible thing to do

7:43 defactory?

7:43 gnuvince: It would be more in line with defn

7:45 Chousuke: I don't like defactory :/

7:45 defn works because it sounds like "define"

7:46 (well, kind of, anyway)

7:46 rhickey: defactory, as in - I work in defactory

7:47 * rhickey ducks

7:47 Chousuke: :p

7:47 technomancy`: maybe it's the opposite of refactoring

7:49 cemerick: heh, that's like when I saw defonce for the first time -- "deFONZ"? I thought rhickey was exposing his Happy Days fetish. :-P

7:49 danlarkin: Dr. Acula

7:53 eivindgl: Hi, I'm new to clojure, emacs and slime (but really impressed). I'm having trouble entering user input into the slime REPL. any idea how I can run the example using BufferedReader in this example? http://java.ociweb.com/mark/clojure/article.html#ConditionalProcessing

7:53 technomancy`: I love reading the promo snippets at the beginning of the Clojure book and thinking, "hey, I recognize most of those names".

7:55 dnolen: elvindgl: you can put data into the REPL right? (+ 1 2 3) works?

7:55 Chouser_: technomancy`: you have paper?

7:55 technomancy`: Chouser_: no, just the PDF

7:56 eivindgl: dnolen: yes, but I want my program to read user input, and I'm not able to do that from the slime repl

7:56 technomancy`: oh crap; the appendix still links to Bill Clementson's "Seventeen complicated steps to hopefully get started using SLIME with Clojure as well as a bunch of Common Lisp implementations."

7:56 that page does more harm than good. =(

7:56 * rhickey wants paper!

7:57 dnolen: elvindgl: sounds like you want to write a program that can be run at the shell?

7:58 eivindgl: dnolen: yes, this is more of an emacs then an clojure question. But it would make testing easier

8:07 danlei: does anyone know what the latest revision with a working add-classpath is?

8:07 kotarak: Somewhere around 1368. If in doubt use the release.

8:07 technomancy`: no such thing. =)

8:08 danlei: :)

8:08 kotarak: technomancy` has a point on the other hand.... :)

8:09 danlei: I think I'll stick with the release for some time then, thanks.

8:15 technomancy`: danlei: what do you want to use it for?

8:16 danlei: technomancy`: repl

8:16 technomancy`: danlei: adding a dependency?

8:17 danlei: my strategy for deps has been just to unpack them all in one place; that way my classpath only has three entries and never needs to change. much more manageable that way.

8:17 rhickey: danlei: why not put it on the classpath?

8:17 danlei: technomancy`: say I create some test directory/ns and want to add it to the classpath from the repl (my sessions tend to last long), I'd use add-classpath

8:17 rhickey: I don't restart often

8:18 sddiew: If I modify clojure.jar (strip debugging info and/or remove some .class files as well as .clj to reduce size) + add some of my own classes and distribute it trough .jnlp would that be 'derivative work' (do I have to provide source code for my application?)

8:18 technomancy`: danlei: for each project, set your classpath to src/:test/:classes/:dependencies/

8:18 then it never has to change

8:19 danlei: technomancy`: would also be an option, I agree

8:19 do you plan to ditch it?

8:19 technomancy`: ditch add-classpath

8:19 ?

8:20 danlei: well, yes?

8:20 sounds a little like it's discouraged

8:20 technomancy`: I don't use it anymore as I find the unchanging classpath a lot more manageable.

8:21 danlei: it's never worked properly for bytecode IIRC

8:21 kotarak: It was maybe never really encouraged...

8:21 technomancy`: would have been nice to see more of a warning in its docstring though, that caused a lot of confusion

8:21 danlei: well, I wouldn't use it for production code or something. at the repl, i find it convenient. but that's habits, I guess.

8:22 technomancy`: I actually find it less convenient since you have to manually set it in the REPL instead of having it declared somewhere.

8:22 then you restart your repl and you forget what you've added

8:22 danlei: well, I always do things at the repl which aren't declared somewhere ;9

8:23 but I see the point

8:23 technomancy`: the more you diverge in the repl from what's on disk, the easier it is to get confused later on

8:23 danlei: I guess that depends on each persons workflow and preferences

8:25 * technomancy` doubts it

8:26 danlei: The ting is, I like dynamic control at the repl, as much as possible, thats a personal preference of mine. You're free to doubt it, but it's what I prefer. Anyways, I don't want to argue about preferences, thanks for the tip.

8:26 technomancy`: I just mean if you begin to rely on changes you've made without leaving a trail of what happened, you'll have trouble repeating them later on.

8:28 sddiew: Is removing some .class files from clojure.jar considered 'derivative work' under EPL?

8:28 danlei: well, there's always history and cut and paste. that's how I work. stay in the repl for some time (maybe an hour), paste something to a file, change something here, try something there. It's just what works for me. and my sessions do tend to last long. Maybe it's just because I'm used to an image-ish approach (think smalltalk, common-lisp)

8:29 technomancy`: danlei: right, as long as you're diligent in making sure what's on disk matches what's going on in your current instance there's no problem.

8:30 * danlei nods

8:44 Raynes: http://www.twopotscreamer.com/lisp-superiority-myth/ I've been reading this for 3 minutes and it feels as if it's taken half my life. :|

8:46 At least (at the /very/ least) he recommends Clojure for the implied idiots who intend to stick with LISP.

8:47 rhickey: danlei: next time you restart, try 1376 for new-style add-classpath support in repl

8:48 rsynnott: oh, dear, he spells it in caps

8:48 rhickey: sddiew: no, repackaging is not derivative work

8:48 Raynes: rsynnott: A lot of people do. Just not the majority.

8:49 rsynnott: as a general rule, people who say LISP do not use LISP :)

8:49 sddiew: rhickey: thanks for clarifying.

8:50 Raynes: rsynnott: I say LISP...

8:50 * rsynnott is puzzled that he chose to compare it to ruby, haskell and erlang, of all things

8:50 technomancy`: Raynes: any points he gained from recommending Clojure are canceled out immediately by referring to Scala as a "modern LISP"

8:50 what a joker

8:51 Raynes: I agree. And besides that, that is the /longest/ thread of nothing I've ever read.

8:51 sddiew: ,(defn (symbol "a b") 2)

8:51 clojurebot: DENIED

8:54 durka42: (eval `(def ~(symbol "a b") 2))

8:55 sddiew: I guess it doesn't make sense to use symbols with space...

8:55 technomancy`: sddiew: it's currently legal, though there's a pending patch to enforce readable symbols

8:56 speaking of which, I should bring that up again on the mailing list

8:58 sddiew: on the other hand might be useful (to convert easily between symbol/keyword/string etc.)

8:59 technomancy`: sddiew: yeah, but it's good to be able to assume that symbols can roundtrip through the reader without getting messed up

9:01 sddiew: maybe something like a\ b ?

9:02 technomancy`: sddiew: there was talk of using |foo bar| as delimiters for symbols

9:03 not a high-priority feature for Rich to work on, I'd imagine

9:03 sddiew: technomancy`: and what if somebody would like to include | in the symbol?

9:03 gnuvince: What's the problem with foo-bar?

9:04 technomancy`: gnuvince: I think this is for symbols that may come from arbitrary sources

9:04 sddiew: exactly

9:04 like user input etc.

9:04 technomancy`: sddiew: if you're interested in the feature, bring it up on the mailing list. rhickey is usually pretty good about accepting patches. =)

9:17 avital: good afternoon. i am trying to use exceptions for the first time in clojure and it seems like all my google searches led me to nonworking examples. the catch-clause seems to want a map - what structure should it have?

9:17 technomancy`: avital: catch takes an exception class and a name for the caught exception

9:18 hiredman: (try do stuff (catch Exception e (println e)))

9:18 avital: catch doesn't work at all

9:18 i'm using :catch

9:18 and trying to get that to work

9:18 dnolen: one caveat is that Exception cannot be variable, it has to be a real java Exception classname.

9:18 clojurebot: ?

9:18 avital: catch doesn't even evaluate in that scope

9:18 dnolen: (catch

9:19 avital: dnolen: yeah i'm just throwing an Exception

9:19 dnolen: not (:catch

9:19 hiredman: uh

9:19 :catch?

9:19 avital: this is my code [part of compojure]

9:19 (POST "/object/:id" (try

9:19 Chousuke: use pastebin

9:19 :p

9:19 lisppaste8: url

9:19 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

9:19 avital: oh

9:19 hehe

9:19 thanks

9:20 lisppaste8: avital pasted "catch exception" at http://paste.lisp.org/display/80923

9:20 hiredman: e

9:20 avital: what the hell

9:20 hiredman: not 'e

9:20 avital: we are in the future!

9:20 amazing

9:20 Chousuke: also the catch thing needs to be *inside* the try block

9:21 avital: java.lang.Exception: Unable to resolve symbol: catch in this context (web.clj:3)

9:21 Chousuke: not (try do stuff) (catch) but (try do stuff (catch))

9:21 avital: Chousuke oh yeah

9:21 * hiredman can't tell what is where without rainbow parens

9:21 avital: hmm it might be working now

9:21 Chousuke: similarly for finally.

9:21 * technomancy` is still waiting for an IRC bot that can mow his lawn

9:22 technomancy`: hiredman: yeah, every time I see someone paste a code snippet that's not highlighted in a blog or something my brain turns off.

9:22 kotarak: hiredman: yeah, rainbow parens were a nice idea (stole them from scheme.vim, IIRC)

9:22 Chousuke: the full structure is (try exprs* (catch ExceptionClass ename exprs*)* (finally exprs)?)

9:22 avital: ok it seems to work, i'm back to my crazy hacking now thanks guys

9:23 hiredman: technomancy`: http://www.friendlyrobotics.com/robomow/

9:24 technomancy`: hiredman: but can it go on IRC?

9:34 cp2: the real question is whether or not it can run crysis

9:37 hiredman: stick a beagleboard on it

9:38 some solar panels

9:38 * danlarkin remembers when the real question was whether you can make a beowulf cluster out of them

9:38 cp2: hah

10:09 alrex021: Are there some good real world examples of where Clojure is currently used to sole problems?

10:09 sddiew: final ebook is out, nice

10:10 alrex021: I am in process of learning Clojure and functional programming for that matter for the first time so hence am trying to see how it all comes together in real world

10:11 dnolen: alrex021: lots of people in this irc are using it to solve problems. I'm using it to rapidly iterate web user interfaces at a startup.

10:11 alrex021: sddiew: I just downloaded the final ebook ver couple of minutes ago. Enjoy the read so far.

10:11 danlarkin: I am using it to cause problems

10:11 technomancy: hah; nice

10:12 alrex021: it's not a "real-world problem", but the mire project might be good if you want to learn how a relatively small yet complete codebase is constructed.

10:12 ,mire

10:12 clojurebot: java.lang.Exception: Unable to resolve symbol: mire in this context

10:12 technomancy: clojurebot: mire?

10:12 clojurebot: mire is http://github.com/technomancy/mire/tree/master

10:13 alrex021: I come from a very string OOP background and almost 0% functional ptogramming knowledge, its some what of a mind $%#% at first. :)

10:13 dnolen: alrex021: totally.

10:13 alrex021: but getting a hack of it last few days and can see the benefits and the expressive nature of Clojure

10:14 * hack=hang

10:15 technomancy: thx having a look at mire at github

10:16 technomancy: alrex021: it's broken up into steps, so each one builds on the last incrementally. makes it easy to follow along.

10:20 alrex021: Generally speaking, are Clojure files (.clj) compiled to java bytecode or are the files loaded and interpreted at runtime?

10:21 stuartsierra: Nothing is ever interpreted. .clj files are usually loaded and *compiled* at runtime.

10:22 HAppyKAmikaze: but you can complite them and release as a library , isn't it?

10:22 alrex021: I see, thanks. Reason I just ask is to have a bit better understating what happens under the hood

10:22 stuartsierra: You can compile .clj files to .class files ahead-of-time (AOT), yes.

10:23 alrex021: I see, nice.

10:26 HAppyKAmikaze: are webjure and compojure working or they are still in a development state?

10:26 dnolen: everything is in the development state :)

10:26 but compojure is very usable right now.

10:27 tWip: webjure is fully working, I have some webjure modules in active productiom

10:27 production even

10:27 but I'm the author of webjure so I'm biased...

10:27 sddiew: =)

10:27 dnolen: so is most of contrib, and Enlive- that's stuff I use mostly, as well the gargantuan mass of Java libraries you can use from Clojure.

10:28 alrex021: Another thing I am trying to get my head around, coming from OOP background, is that there are so many functions + macros one needs to remember. How do you know what to use when? For working with sequences, like they show in the Programming Clojure book, there are so many variations. (Again appologies as I am really new to functionally programming concepts)

10:28 HAppyKAmikaze: say not a great problem for me, i'm still learning clojure, exactly i read one introduction article about it, so is a "little early" to learn a web framework :)

10:29 technomancy: alrex021: that comes with time I guess... plus get good with doc lookup.

10:29 eventually you should read core.clj top to bottom, but that's not a great place to start. =)

10:29 tWip: no It's never too early (or late) to learn

10:29 dnolen: alrex021: it is weird at first, if you're used to them being collected together by class/package. a lot of things you just won't use.

10:30 alrex021: i used clojure for like 5-6 months before I even looked at the concurrency stuff.

10:30 tWip: but to be honest, webjure requires you to be familiar with Java servlet things and Maven 2... compojure is more mature

10:31 dnolen: alrex021: one thing that offsets this is the interactivity of the REPL and Slime, very easy to try stuff out.

10:31 alrex021: I recommend creating a notes.clj, I have one that's like 3000 lines long of snippets of things collected from the mailling list, and my own tests.

10:32 stuartsierra: or even write little test functions as you go

10:32 alrex021: dnolen: thanks, that sound cool, will give that a try.

10:32 stuartsierra: test function? is that like unit tests :)

10:32 HAppyKAmikaze: what's slime?

10:33 stuartsierra: alrex021: yes. There's a testing framework (mine) in clojure.contrib.test-is

10:33 technomancy: HAppyKAmikaze: Clojure Emacs integration

10:34 stuartsierra: SLIME was originally made for Common Lisp, it's been hacked to support Clojure.

10:34 HAppyKAmikaze: ah ok thanks

10:34 technomancy: good luck getting the bot to tell you anything useful about it though. =)

10:34 alrex021: stuartsierra: oh great, is there an example of it how to create test that is?

10:34 tWip: isn't it Superior Lisp Interaction Mode for Emacs

10:34 or something like that, originally

10:34 stuartsierra: alrex021: yes, lots of examples in the source file test_is.clj

10:35 alrex021: I got SLIME for CLojure to work on my Mac with Aquamacs by the way...prety cool

10:35 StartsWithK: fyuryu: will you do the merge today?

10:35 alrex021: stuartsierra: is that in the trunk I take it?

10:35 on clojure-contrib tha tis

10:36 stuartsierra: yes

10:37 alrex021: ok I got it

10:38 Chousuke: alrex021: OOP languages generally don't help with the remembering problem either :)

10:38 I find clojure's functions much easier to keep in my head than a typical class hierarchy :/

10:39 drewr: I have a JVM that will not exit because of my agent activity. Any suggestions as to how to "kill" them?

10:40 Chousuke: shutdown-agents?

10:40 tWip: System/exit ?

10:40 alrex021: Chousuke: just after a decade of OOP..... Noun.verb .... when you see "verb on noun" its just takes maby some getting used to :)

10:40 fyuryu: StartsWithK: hi

10:40 drewr: Chousuke: That only keeps the agents from accepting more actions.

10:40 dnolen: Chousuke: this is true once you get it. But it would of course be nice to find all functions which can be used on lists and which on vectors.

10:40 Chousuke: alrex021: especially since you actually need to keep in mind also how the classes interact with each other. in clojure, you have a function, and you don't need to care about how it works.

10:41 unless it has side-effects of course.

10:41 drewr: tWip: That doesn't work in my script environment.

10:41 Chousuke: but those cases are isolated :)

10:41 alrex021: oohh "side-effect" thats anotherone that completelly though me off. Pure function, now thats better :)

10:41 StartsWithK: fyuryu: hi, just pushed new actions :) repl and completitions file now are working

10:41 alrex021: * though=threw

10:41 StartsWithK: and first ant wrapper is in

10:41 fyuryu: StartsWithK: I want to. But I can't get your branch to build - clojure.jar dependency problems

10:42 StartsWithK: Ivy can't retrieve it

10:42 Chousuke: alrex021: in functional setting, you don't "do" anything, so verbs don't make sense.

10:42 fyuryu: StartsWithK: does it build ok for you?

10:42 Chousuke: alrex021: instead, functions are transformations

10:42 StartsWithK: fyuryu: can you paste me the error message, yes it builds just fine for me

10:43 ant jar

10:44 alrex021: Chousuke: ok I see. So functions usually are used to transform a sequences or something and usually don't modify the actual data structure itself but return a new one.

10:44 Chousuke: yeah.

10:44 if they do modify things, they're not functions.

10:44 they're procedures.

10:45 alrex021: sure, that makes sense to me.

10:45 Chousuke: takes a while to get into programming in functinal style, but it's much more fun when you eventually get it :)

10:46 +o

10:46 tWip: but there's no enforcement... defn will still define a "function" that modifies things

10:46 Chousuke: yeah

10:47 HAppyKAmikaze: in some point you have to modify something if you want to do something :)

10:47 Chousuke: but it's good practice to avoid side-effects until it's absolutely necessary.

10:47 tWip: well until reasonably necessary, I'd say ;)

10:48 Chousuke: and avoid mixing a value transformation and side-effects in the same function.

10:48 lisppaste8: fyuryu pasted "ivy error" at http://paste.lisp.org/display/80931

10:48 Chousuke: but yeah, it's all just recommendations, nothing is set in stone

10:48 fyuryu: StartsWithK: that's after "ant compile"

10:49 alrex021: Chousuke: I believe so. Though a good question I have now is: Can one manage to learn functional programming well and not forgetting how to apply their OOP skills in other scenario where OOP better suit the solution to a given problem. (Just because the two are quite different..)

10:50 StartsWithK: fyuryu: no, just "ant jar" compile will be executed by jar command

10:50 target*

10:51 i'll remove most of build.xml later, and use CLOAK to compile itself, build.xml will be there just to get initial deps

10:51 at least until i add ivy wrapper

10:51 kotarak: StartsWithK: hi. I found some minor issues with the configurations.

10:51 Chousuke: alrex021: you can write in functional OOP style too: your objects are simply maps with attributes, and your "methods" are the functions that you specify are allowed to operate on maps with certain attributes.

10:52 StartsWithK: kotarak: in your ivy module build?

10:52 kotarak: StartsWithK: yes. the mapping between the configurations across modules were not correct.

10:53 StartsWithK: kotarak: how did it build then? it worked for me in the end, but i must say i didn't look at generated jars

10:53 Chousuke: alrex021: of course, since they're just maps, there's no enforced encapsulation, but it's not the end of the world :)

10:54 kotarak: StartsWithK: the build is ok. But when you depend on the "compiled" configuration this was only considered for the direct dependency. Transistive dependencies also retrieved the "source" configuration.

10:55 StartsWithK: kotarak: i was thinking about the speed problem, and i think there is a solution, but i must test that, if all classpaths used by each module were present in <java ..> call, maybe then fork would not be needed.

10:56 kotarak: you found the solution for that?

10:56 alrex021: Is it possible to use doc-find to only find specific type of fucntions (Say for example only give me functions that can transform lists..)

10:56 kotarak: StartsWithK: no. I have absolutely no clue about PermGen and whatever.... I'm normally not a Java guy...

10:57 alrex021: I am trying to find an effective way to use doc-find... How do you search for terms when you don't know the names of things you looking for...

10:57 StartsWithK: fyuryu: any luck with the build?

10:59 fyuryu: StartsWithK: yeah. I copied my locally built clojure.jar into lib/clojure-1.0.0.jar in the repo's folder and it went ok

11:00 StartsWithK: kotarak: well 5 min is not that bad if only one person does it and others pull from the repo

11:00 fyuryu: I wonder why ivy can't get it itself

11:01 kotarak: StartsWithK: yeah. I can live with that. That's the idea: the you pull pre-compiled jars from the repo....

11:01 StartsWithK: fyuryu: there is no ivy on your system, ant build downloads one, later ivy can get anoter ivy from maven repository

11:01 kotarak: StartsWithK: a solution would be nice, though

11:01 StartsWithK: kotarak: i'll try to find one, but i think it will require that build is done from clojure script and not ant with all that forking

11:02 fyuryu: now you can copy lib/ to bin/ and do export CLOAK_HOME=full/path/to/bin

11:02 after that ./cloak.sh will be your main launcher

11:02 kotarak: StartsWithK: I think the recursive build creates to much classes. But I'm not sure. As I said: I have no clue about these things...

11:03 StartsWithK: kotarak: i think that is the problem

11:04 so a single clojure build that would add-classpath to all the classpaths used and different settings for compile dirs for each module sould work, but that will need some testing

11:04 fyuryu: so chmod +c cloak.sh && ./cloak.sh -q repl-rlwrap

11:04 should generate rlwrap based repl script for cloak project wiht completitions

11:05 +x*

11:09 fyuryu: StartsWithK: I'm on Windows, so I'll have to write a .bat

11:09 StartsWithK: kotarak: if i bring up to date this ~40 clojure lib packages i made, would you consider hosting them in your repo? (they are like 6mb with clojure and contrib)

11:10 fyuryu: StartsWithK: I just pulled your changes and the build failed, but this time on ssh2

11:10 kotarak: StartsWithK: I can do that, but I have to watch traffic.... But for a start I can do that, yes.

11:11 StartsWithK: kotarak: http://code.google.com/p/truba/ its here, but i'll need a week to fix it

11:11 fyuryu: for now just go to ivy.xml and remove ssh2 dependancy then

11:11 kotarak: StartsWithK: np, just tell when I should pull the stuff into the repo.

11:12 StartsWithK: kotarak: nice :) i'll try to repackage other half too

11:12 and send them patches to have builds :/

11:15 kotarak: StartsWithK: wow, there are also projects of mine. :) You can safely ignore those. I will move those to Ivy in the next days.

11:17 StartsWithK: kotarak: the end goal is 80 libs i found, maybe there are some new ones now

11:18 and cloak based build that could be used for easy access to them

11:27 fyuryu: could the problem with clojure be the file:/// url i use? is there something else i should use for win?

11:36 fyuryu: StartsWithK: file:/// should work. Some other jars were fetched

11:38 StartsWithK: fyuryu: other jars don't use (except ssh2) repository from file:/// pattern, i'll try to get my hands on a win box to test this

12:21 danlei: rhickey: thank you

12:28 rhickey: danlei: for what?

12:38 danlei: rhickey: <rhickey> danlei: next time you restart, try 1376 for new-style add-classpath support in repl


12:39 rhickey: oh, sure, it was on the todo list, you and Chouser_ just nudged me into doing it today :)

12:39 danlei: :)

12:51 tashafa: ,(doc add-classpath)

12:51 clojurebot: "([url]); Adds the url (String or URL object) to the classpath per URLClassLoader.addURL"

15:04 wavis: what is this?

15:04 #<core$_SLASH___3350 clojure.core$_SLASH___3350@6b371a57>

15:07 cmvkk: looks like a function, wavis

15:08 specifically, the divide function.

15:09 wavis: okay... i got it with this expression:

15:09 2147483647 / 2147483648

15:10 cmvkk: yeah, what are you trying to do there? if you want a ratio, you shouldn't have spaces around the slash.

15:10 if you want a divide expression, you want (/ ...)

15:10 wavis: oh, ok. i'm obviously new

15:10 cmvkk: yeah math is a bit weird in clojure

15:11 wavis: i'm here because i think i need a language that handles numbers correctly... there's a Rational class I've scavenged in scala, but I'm realizing that really big numbers might give it trouble

15:12 cmvkk: clojure should work fine with big numbers of any type, i think

15:12 although i've never tried it with ratios before

15:13 wavis: hrm, well thanks. :) it's time for me to head home from work though.

15:13 will investigate further soon

15:13 replaca: ,(2147483647 2147483648)

15:13 clojurebot: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn

15:13 replaca: ,(/ 2147483647 2147483648)

15:13 clojurebot: 2147483647/2147483648

15:14 wavis: oh clojurebot is cool

15:15 timothypratley: Clojure 1.1.0-alpha-SNAPSHOT

15:15 user=> (.sleep Thread 1)

15:15 java.lang.IllegalArgumentException: No matching method found: sleep for class ja

15:15 va.lang.Class (NO_SOURCE_FILE:0)

15:15 anyone else get this?

15:15 clojurebot: this is not a bug

15:17 cmvkk: timothypratley, you want the static method syntax. (Thread/sleep 1)

15:17 or well, at least doing it that way doesn't cause an error

15:18 timothypratley: well... the static way works for (Thread/sleep 1)

15:19 but

15:19 (Thread/sleep 1)

15:19 (println "fine")

15:19 (defn forever[x] (while true (Thread/sleep 1) (print \-)))

15:19 (forever 1)

15:19 cmvkk: yes that runs forever, shouldn't it?

15:20 timothypratley: ah I think i'm just missing flush

15:20 cmvkk: oh i see what you mean

15:22 * dreish is baffled by clojurebot's apparent sentience.

15:23 timothypratley: with flush it does what I expected :)

15:24 thanks

15:24 cmvkk: does it print out one dash at a time for you? i was surprised to find that even with flush it printed out like a hundred at a time, every few seconds.

15:25 timothypratley: 1 is millisecs

15:25 (defn forever[x] (while true (Thread/sleep 100) (print \-) (flush)))

15:25 that looks a bit nicer :)

15:26 cmvkk: oh, so it does. in that case, i'm not sure how it only filled up half the screen for the 30 seconds i let it run.

15:26 oh well.

15:50 amitava: hi, clojure nube - experienced oo developer - need advise

15:50 a typical piece of java code (from apache poi)

15:51 InputStream inp = new FileInputStream("workbook.xls"); HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inp)); ExcelExtractor extractor = new ExcelExtractor(wb);

15:52 objects used to construct object - in turn used to construct another object

15:52 cmvkk: yes

15:52 amitava: akin to the .. macro

15:53 any shortcut to this pattern?

15:54 danlarkin: amitava: yes, checkout ->

15:54 (doc ->)

15:54 clojurebot: "([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."

15:55 amitava: pardon my ignorance - but can u use the java snippet to demonstrate?

15:55 cmvkk: (-> (FileInputStream "workbook.xls") POIFSFileSystem. HSSFWorkbook. ExcelExtractor.)

15:56 amitava: wow - that's cool :-)

15:56 cmvkk: that should be FileInputStream. "workbook.xls"

15:56 i forgot the dot

15:56 i think it works that way anyway

15:56 ,(-> (String. "Hello") StringBuilder.)

15:56 clojurebot: #<StringBuilder Hello>

16:03 amitava: another question - (defn fname "foo.txt")

16:03 hiredman: def

16:03 amitava: (FileInputStream. fname)

16:03 hiredman: not defn

16:03 amitava: java.lang.IllegalArgumentException: No matching ctor found for class java.io.FileInputStream (NO_SOURCE_FILE:0)

16:03 hiredman: ~jdoc java.io.FileInputStream

16:04 amitava: on the other hand - (FileInputStream. "foo.txt") works

16:04 cmvkk: yeah you probably meant def not defn

16:05 try (class fname) and see if it gives you String.

16:05 amitava: duh - nube afterall :-(

16:05 thx

17:06 ozzilee: Does the ns macro syntax make anyone else want to tear their hair out, or is it just me? How do I exclude clojure.core/compile? (:refer-clojure :exclude compile) doesn't do it.

17:07 Chouser: it's not just you

17:07 (ns foo (:refer-clojure :exclude [compile]))

17:08 dreish: It's nothing that couldn't be fixed by more extensive documentation.

17:08 ns deserves its own long page.

17:09 Chouser: true

17:09 cmvkk: THIS. the namespaces page doesn't really describe it at all.

17:09 ozzilee: Hrm, it still won't work. "can't def compile because namespace foo refers to:#'clojure.core/compile"

17:09 Yeah, documentation would help.

17:09 Chouser: ozzilee: the namespace needs to not exist when you do the ns call.

17:10 or you can just un-map it afterwards

17:10 ozzilee: Chouser: Let me start up a fresh repl here.

17:10 Chouser: (ns-unmap *ns* 'compile)

17:12 ozzilee: Ah, (:refer-clojure ...) needs to be the first line in (ns ...)

17:13 Uh, nevermind.

17:13 Either my mind or my computer is playing tricks on me :-)

17:20 Here's a start on some docs. Don't have time to expand on it right now unfortunately. http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Using_the_.28ns.29_macro

18:52 I want to create a macro that returns a list of it's arguments, in quoted form. Can anyone show me how this is possible?

18:53 (defmacro foo [& args] (apply quote args)) obviously doesn't work, but that's the idea.

18:56 cmvkk: (defmacro foo [& args] (cons 'list (for [arg args] `(quote ~arg)))) maybe

18:57 hiredman: hmmm

18:58 cmvkk: but even with that, there's no difference between (foo a b c) and '(a b c) right?

19:00 hiredman: (defmacro foo [& args] (cons 'quote args)) ?

19:00 cmvkk: that's the same as (quote a b c) which only returns a

19:00 wait

19:01 yeah

19:02 ozzilee: I think maybe I'm making things too complicated for myself. I've got a function (compile [& exprs]) which takes quoted expressions, i.e. (compile '(alert foo) '(alert bar))

19:03 cmvkk: and you want to be able to do it without the quotes?

19:03 ozzilee: I'm trying to make a macro so that the expressions don't need to be quoted. (mcompile (alert foo) (alert bar))

19:03 Yeah.

19:03 cmvkk: so just make compile a macro.

19:03 once it's a macro, it automatically won't try to evaluate the arguments.

19:05 ozzilee: cmvkk: Hrm...

19:06 Okay, inside compile I say (map compile-expr expressions). (map compile-expr ~expressions) doesn't do what I want...

19:07 hiredman: ozzilee: code speaks a thousand words

19:07 lisppaste8: url

19:07 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

19:07 cmvkk: you can only use the tilde in a backquoted form. if you're only trying to keep the arguments from being evaluated, you don't really need to do any backquoting.

19:08 or actually

19:08 ozzilee: hiredman: Yeah, I think I got it now, let me paste it up though.

19:08 cmvkk: here's how you do it: (defmacro mcompile [& args] `(apply compile ~args)) then you use your original compile function like normal.

19:08 or something like that.

19:09 damn that's wrong too. i'm striking out today.

19:09 hiredman: (defmacro foo [args & foo] `(quote ~args)) will behave just like (quote ...)

19:10 cmvkk: i think i meant (defmacro mcompile [& args] (apply compile args))

19:12 lisppaste8: ozzilee pasted "late-night macros" at http://paste.lisp.org/display/80952

19:13 ataggart: anyone present who uses IDEA on a mac?

19:14 cmvkk: compile-expr returns a string?

19:15 hiredman: ozzilee: seems like you could just (lets [exprs (list 'quote expressions)] ...)

19:15 er, let

19:15 cmvkk: (defmacro compile [& expressions] `(apply str ~(map compile-expr ~expressions)))

19:15 i think that would work

19:16 er, without the tilde on expressions

19:16 hiredman: cmvkk: depends when he wants compile-expr to happen

19:16 cmvkk: true, if compile-expr has side-effects it might be a problem, or if it takes a long time.

19:16 hiredman: in that case the result of the maco is just a string

19:17 cmvkk: well, it's (apply str (a list of strings)) but yeah

19:17 hiredman: which is evaluates to ittself

19:17 so, uh, ?

19:17 cmvkk: either way, you'd end up with the same result though right?

19:18 hmm

19:18 actually

19:18 hiredman: when I am told 2 + 3 = 4 I do not quible which order 2 and 3 are in

19:19 cmvkk: i guess it depends on the context that the macro is evaluated in.

19:20 ozzilee: cmvkk: That gives me a NullPointerException

19:20 cmvkk: heh, hmm

19:20 hiredman: a macro that returns a string, or really anything self evaluating is not a good macro

19:20 macros are for performing transforms over code

19:21 cmvkk: i would argue that that is not necessarily the case.

19:21 ozzilee: hiredman: Hrm. I'm writing a javascript generator. The string output is the compiled javascript.

19:22 cmvkk: have you looked at clojurescript, or whatever that project is called?

19:22 hiredman: cmvkk: I win

19:22 ozzilee: I'm just trying to avoid having to quote the forms to compile. For convenience.

19:22 Yeah, clojurescipt is something different. It's a re-implementation of clojure in javascript.

19:22 hiredman: ozzilee: you write a compile function and a compile macro

19:23 then you have the compile macro emit a form

19:23 which is a call to the compile function

19:23 ozzilee: hiredman: That was my first attempt...

19:23 cmvkk: that is basically what his original paste is, i'm thinking. which actually seems okay.

19:23 hiredman: the way you are currently writting it is a recipe for disaster, doing all the work at compile time

19:24 cmvkk: no, i believe that was me.

19:24 ozzilee: Hrm. Maybe if I make the copmile fn take a list of exprs instead of & exprs? Does that make things easier?

19:24 hiredman: ozzilee: so you already have a compile function that takes a list of quoted expressions?

19:24 cmvkk: take a look at his original paste.

19:24 ozzilee: hiredman: It takes [& expressions]

19:24 That's not the original paste, let me annotate it quick.

19:24 cmvkk: it takes one expression, and the result of the compile macro uses map over it.

19:25 hiredman: (defmacro mcompile [& expressions] `(apply compile '~expressions))

19:27 where compile is your function that takes vararg quoted expressions

19:27 cmvkk: i think the key here is the quote before the tilde. he basically had `(apply str (map compile-expr '~expressions)) which is basically the same thing.

19:27 but with a compile function that only takes one argument.

19:28 * ozzilee is busy un-screwing-up his original code...

19:29 hiredman: :)

19:31 ozzilee: Okay, it works now.

19:31 I think my problem was that I wanted to somehow (compile '~@exprs).

19:32 I've obviously been up too late.

19:33 lisppaste8: ozzilee annotated #80952 "sanity" at http://paste.lisp.org/display/80952#1

19:35 ozzilee: One step closer to writing javascript with macros and sexprs. Thanks for the help guys :-)

19:37 arohner: has anyone gotten visualvm to work in OSX?

19:38 hiredman: http://denverdev.blogspot.com/2008/09/setting-up-sun-visualvm-on-mac-osx.html <-- I think this guy did

19:39 arohner: I've read several pages of google results

19:39 and what's really frustrating is I know this used to work on my box. I don't know why it stopped

19:40 hiredman: did the 1.6 jdk move?

19:40 how is not working?

19:42 arohner: when I try to attach to my clojure process, it takes a long time, then prints "attach: task_for_pid(47950) failed (5)"

19:48 hiredman: maybe launch the clojure repl with -Dcom.sun.management.jmxremote as an arg to java?

19:55 arohner: http://smallcultfollowing.com/nikolog/2006/06/04/virtualdesktops-and-procmod-groups/

19:55 that finally fixed it

19:55 I have no clue why

19:55 or rather, I have no clue why I'm seemingly the only person with this problem

19:56 hiredman: no one else is updating?

19:59 arohner: *shrug* I don't know

20:00 but now it's midnight, and I spent a good part of the day getting my profiler working rather than profiling

20:31 cads: yay!

20:32 just realized that I should totally write a paper using clojure for the code implementation

20:32 you can do that in a lisp :)

20:58 hiredman: I should really try to write some scala or something, #scala has given me such a negative opinion of the language without ever using it

21:44 adityo: good morning to all..another glorious today in my path towards learning clojure

22:00 cads: hiredman: there's things in the scala community we don't have here in clojure yet, I got a bit jealous when I came across scala-check

22:01 I've seen a few snippets of scala code and I just don't seem to like it very much, but I'm interested in it too

23:25 djpowell: clojure-dev tells me that I can't create a new clojure file with a hyphen in the name. Is that correct?

23:31 eevar2: i think you should use an underscore in file names where you want dashes in the clojure name space

23:32 s/where/when

Logging service provided by n01se.net