#clojure logs

2008-10-14

01:58Lau_of_DKMorning gents
02:06hoeckgood morning Lau
02:09l_a_mhttp://www.pragprog.com/titles/shcloj/programming-clojure <-- interesting ...
02:11Lau_of_DKWho is Stuart Halloway?
02:15blabberl_a_m: :-)
02:55Lau_of_DKhoeck, do you work across the street from you house? :)
02:57hoeckLau_of_DK: haha, no, a couple of more streets are involved when heading to work
03:03Lau_of_DKOk, it was just like Hoeck quit (going to work) (2 minz later) Hoack joined #clojure
03:03Lau_of_DKAnyway, welcome back :)
03:08hoeckLau_of_DK: ah, so erc delayed my quit command, it was actually a 20 minute commute, though i would prefer a 2 min ride :)
07:17Lau_of_DKrhickey, have you begun work on consolidating all the pages of the documentation found on clojure.com in something thats more usuable. Maybe along the lines of a windows help file or something like that?
07:23emacsenLau_of_DK, A windows help file?
07:24emacsenNot "an info manual" but a Windows help file?
07:24cadslau that was terrible
07:31jdzwhat is an info manual? is there a reader for winblows? is there any other OS than winblows? you must be joking.
07:32jdzJava runs everywher. on every winblows out there! :)
07:32hoeckbeeing a windows user at work (and only there), helpfiles are not that bad, especially for fast api-call lookup, way better than big online helpsites like msdn
07:34cadsI think a nice interactive html file would be... nice
07:35emacsenjdz It's the native GNU help format
07:35emacsenjdz infotex produces them, and html
07:35emacsenand why am I talking to no one?
07:36cemerickinfo files are pretty useless for anyone who's not a serious unix/emacs user
07:36Guest85485html is a good lowest common denominator imho.
07:37cemerickthe current set of docs are pretty healthy, IMO. Some greasemonkey applied to the API page would be nice; I keep meaning to throw something together there.
07:39hoeckI'm pretty satisfied with doc and find-doc, docstring documentation is way better than with opensource cl's
07:39emacsencemerick, so? ;)
07:39cadshow simple is it to use clojure code from within java?
07:40hoeckI think, rhickey has done a very good job by documenting _every_ single boot.clj function plus all the ones in proxy and set
07:41cemerickcads: it's pretty straightforward; IIRC, use Var.find to get a handle to the var that holds whatever function you want to invoke (or value you want to access), and then .invoke or .get it as appropriate.
07:41cadsI have been playing with a java hosted ruby interpreter, and inside the jruby, java actually feels a lot friendlier... and now I have the crazy idea of making use of clojure facilities from inside ruby
07:42cemerickcads: yeah, that's sorta crazy, but certainly doable :-)
09:07rhickeyAOT compilation would definitely prefer one-file-per-namespace
09:07rhickeythoughts?
09:12tWipwhy is that? would AOT turn each namespace to its own class?
09:17rhickeytWip: yes
09:19tWipbut the compiler could find all definitions made in a namespace, even from multiple files?
09:20tWipor is that for clarity, to have one file for namespace
09:20cemerickrhickey: in principle, that's fine by me. Couple of things: (a) that impacts how genclass currently works quite a bit; would genclass' impl change significantly, or would AOT supercede genclass, or...? (b) I think having a way to specify how a namespace is composed would make the file/namespace relationship trivial to control (or, in the AOT case, unify)
09:25abrooksrhickey: Am I understanding correctly that the one-file-per-ns is on the AOT creation side and not a restriction on Clojure source files or is it a restiction of one namespace per Clojure source file, too?
09:26rhickeyabrooks: on the Clojure source side - on the gen side there are hundreds of class files
09:27rhickeyanyone with 1068 can look in the gen directory
09:27abrooksAh, right. Each fn is a function.
09:28abrooksrhickey: Would the namespace restriction be enforced all the time or only at AOT compile?
09:28rhickeymultiple files might be possible, but there would have to be stricter "include" semantics vs random load-files
09:28rhickeyabrooks: I'd like very much for there to be one set of rules for both AOT and not
09:28abrooksGood.
09:29tWipwould an AOT compiled clojure code when used runtime from the REPL behave "normally"?
09:29abrooksHow about the Repl? Is that considered a single file? It seems that switching namspaces there is important.
09:29tWipother than not being able to add definitions to it
09:29cemerickGiven how solid lib/use etc is in the latest builds, arbitrary file loading is definitely the ugly stepsister.
09:29rhickeytWip: try 1068 - all code goes via the disk and normal classloader except proxy/genclass
09:30tWipok, I'll check that out
09:30rhickeyAOT does not mean non-dynamic - it would just be that pre-compiled code could be loaded vs source - after that all dynamic capabilities apply
09:31rhickeyit's not a closed module system, nor a static one-time-def system
09:33rhickeyabrooks: to as great an extent as possible, compiling a file will yield a bunch of classfiles, one of which would be the Module class for the namespace. It would have a static load() method that when run should cause the same set of actions to occur as would loading the original file, except fn defs would also be loaded from classfiles rather than compiled on load
09:33rhickeyModule class will also have a main() method that will call the main fn in the ns if there is one
09:35rhickeycemerick: still need to work through the genclass story, it should only become easier
09:36cemerickrhickey: Sure. I'd suspect that genclass would roughly become obsolete, at least for a large portion of its common use-cases.
09:37rhickeycemerick: If I make it possible to cause more fns to become static methods, yeah, although genclass will still be needed to create instantiable object classes
09:38rhickeyAOT-ing genclass and proxy are interesting, as then only apps that truly do dynamic runtime code gen (few) will need the compiler/classloader at runtime
09:39rhickeyOpens possibility of ASM and Compiler-free delivery, substantially smaller runtime footprint, for phones say
09:46cemerickrhickey: are you still looking at generating source, or are you going straight to bytecode? (Sorry, I'm in no shape to follow head at the moment...)
09:46rhickeystraight to bytecode
09:53cemerickrhickey: Sounds delightful; hopefully I'll be able to dig in after I get my head above water again. Are you hoping to have AOT done before you label a build as "1.0"?
09:54rhickeycemerick: yes
09:55rhickeyhere's my idea for release numbers - first release of first year: 0.0, second 0.1 - I've missed all of these
09:56rhickeyfirst release of second year, 1.0, second 1.1 etc, third year, 2.0 etc
09:56rhickeyso the first release after this Thursday will be 1.0
09:57rhickeyI will try to stabilize AOT and all prior features for that release
09:58cemerickI'll try to make sure we test the snot out of the AOT for you. :-)
09:58cemerickThe release numbering strikes me as a little odd -- such a scheme would make it likely that major features would be introduced in "minor" releases.
09:59cemerick(unless you intentionally hold back features until late fall each year)
09:59rhickeypersonally I think major/minor numbering is usually meaningless, mostly based on vendors wanting you to pay again
10:00rhickeyat least these numbers mean something objective nth release in year m
10:00Guest85485what about release numbering based on promised compatibility?
10:01rhickeyGuest85485: again, rarely so clear
10:03karmazillaI don't follow why that ain't clear... code written for 1.1 is promised to work in 1.2?
10:03karmazillabut not so for 1.x and 2.x
10:03rhickeya release could contain a relatively small but breaking change and nothing else, doesn't justify major rev really
10:03cemerickrhickey: There's built-in expectations about "major" releases, though; even aside from the concerns of a commercial vendor, the "technology press" (into which I'll lump in proggit et al.) always gets more jazzed by X.0 releases than X.Y releases. That will only matter more and more as Clojure usage grows, ecosystems coalesce, etc.
10:04rhickeycemerick: so they'll get jazzed once a year! :)
10:05cemerickrhickey: LOL I needed that :-)
10:05leafwworked well for ubuntu
10:05tWipdo people really expect to change versions of important infastructure parts without retesting everything?
10:05rhickeyBeing a Lisp, there aren't the same kinds of semantics/syntax breaking changes there are in other languages when they need to add features. If I add a macro to boot.clj, it's no big deal
10:06tWipI've had micro version updates break things badly in open source libs.
10:07rhickeymost changes in Clojure are simple enhancements, if you don't use them, you don't care, breaking changes will get rarer
10:08rhickeyand just as easy to doc between 1.1 and 1.2 as between 1.1 and a forced-because-breaking 2.0
10:09rhickeyClojure is substantially less monolithic than most software/libs
10:10cemerickwe've only hit one breaking change in our time using Clojure -- the move to integrate lib into the core -- so I doubt that's much of a concern in the days ahead
10:11cadsmorning rhickey
10:11rhickeycemerick: that's a story that needs to be told more - people see the enhancements and presume instability...
10:11rhickeycads: hi
10:13cemerickI really don't know what to do vis a vis evangelism. In a private setting, it's not a problem, but a good portion of our customers would absolutely lose their minds if they knew what was running under the hood.
10:13rhickeycemerick: fair enough
10:13danlarkincemerick: ha!
10:14cemerickrhickey: no, actually, it sorta sucks :-/
10:15cemerickPresumably, once we get to a certain degree of critical mass on a couple of key measures, we can start testifying, but there's a lot of unknown risk before that day comes.
10:15rhickeycemerick: eventually it won't, I certainly appreciate everyone who's investing their own effort in learning and using Clojure in these early days
10:18blabberRich in his video on datastructure talks about 'manipulating' data structures, but how is that possible when they're immutable?
10:22rhickeyblabber: unfortunately there isn't a good word for 'efficiently making new changed versions', so I say "change" and make quotation mark signs with my fingers
10:22rhickeysuggestions welcome
10:24rhickeycemerick: one other 1.0 issue is getting in any known, pending, community-welcome breaking changes like Chouser's regex mods and the unification of binding syntax (deoseq et al taking vectors of bindings)
10:24blabberrhickey: you say 'manipulate' as well, which has made me pause the video :-) so you mean making new changed versions right
10:25rhickeyblabber: yes, that's about all you can do other than read from them
10:25blabberrhickey: thanks
10:28cemerickrhickey: sounds good
10:29cemerickwe coincidentally had some discussions around prolog here last week, although it looks like we'll be rolling our own logic framework, due to some unique requirements
10:31rhickeyinteresting
10:31cadsis there any source hosting place for people to put their clojure projects and share with the community?
10:32Chousercads: nothing clojure specific, other than clojure-contrib, but I see a lot of people using github
10:33cemerickcads: people have pushed clojure files up into the google group. Other than that, there's some stuff in the clojure-contrib area of sourceforge, and others have been creating projects in github.
10:36blabberall: are there clojure performance stats anywhere online?
10:36cadshah, zcode; a Z-Code interactive fiction interpreter written in clojure
11:01scgilardire: one-file-per-namespace, I think it's a significant convenience to allow a namespace's definition to span multiple clojure source files. Making the mechanism to allow that something other than "load (a random file)" sounds good to me.
11:07danlarkingit-gc is annihilating my computer right now
11:07scgilardire: binding-form unificaiton, I like it. I wonder if every place we use bindings has a clear meaning when multiple things are bound. Would doseq run all the sequences in parallel and some new dofor run through sequence N for each member of sequence N-1?
11:07karmazilladanlarkin: been a while since you ran it last?
11:09danlarkinkarmazilla: I wait until it prompts me :-D
11:09karmazillait does prompting?
11:10danlarkinyeah "new in 1.6"
11:10karmazillaah, don't think I've upgraded yet
11:11rhickeyscgilardi: multi-binding doseq would behave like imperative for
11:12Chouserwhat about scgilardi's tidy little patch for destructuring in binding -- I don't think you've commented on that yet.
11:14rhickeyChouser: I'm still on the fence about destructuring in binding - people are confused enough about dynamic vars, but it is essentially different in not introducing new names into scope
11:15Chouserhm! ok.
11:19scgilardirhickey: that essential difference is present whether or not binding does destructuring. I see destructuring as more related to providing values for the names rather than introducing them.
11:20rhickeyscgilardi: but it does both in the other places it is used
11:39abrooksrhickey: FWIW, I was confused when I discovered that binding didn't destructure. I don't think destructuring adds confusion to var binding. I also think that the utility quickly outstrips any possible detriment. How many times is one confused by vars vs. how many times can you keep using a useful mechanism like destructuring. Catering to the newbie vs. empowering the established user is Microsoft's error. Someone's only a ...
11:39abrooks... neophyte for a short time.
11:40abrooksrhickey: Egads. That looks like a rant but it's not. I'm feeling a bit overly verbose today, apparently.
11:44rhickeylet-bindings is only a macro away...
11:51rhickeyanyway, I hear you (all) and will revisit my misgivings :)
11:54Chouseranyone read Cringley? He's talking about Clojure, and doesn't even know it.
11:54Chouserhttp://www.pbs.org/cringely/pulpit/2008/pulpit_20081013_005498.html
11:54scgilardirhickey: sounds good, thanks! I've been looking through classfiles in gen. Pretty cool to see them all layed out there. :)
11:55leafwChouser: STM, but that is not unique to Clojure
11:55Chouserleafw: true
11:56djpowellJust wondering, will AOT clojure be able to run under a security manager? just thinking applets and stuff.
11:58Chouserdjpowell: I wouls assume so. Rich said something about the regular classloader.
12:06djpowellcool - I've found doing GUI stuff in clojure to be quite fun, thanks to being able to redef functions without restarting the app. I've been writing a rubbish platform game to experiment with things.
12:10asbjxrnHowdy
12:11asbjxrnGot a question about jars and manifests. I'm trying to package my app as described in the "Packaging APP" thread in the group.
12:12asbjxrnBut I need to include a library. I changed the class path in the manifest to "jar/clojure.jar lib" and put my lib in there. But clojure fails to find the lib.
12:14asbjxrnAnyone around that know what I might have missed?
12:14ChouserI know nothing. But multiple items in a classpath are usually separated by : aren't they?
12:15asbjxrnNot in the manifest file I think, because they are urls... http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html
12:15Chouserah, ok. see, I know nothing. :-)
12:15Chousersorry
12:15asbjxrnHmm. that is maybe a old page to look at, but I would think that hasn't changed.
12:16asbjxrnWell. My first attempt was with :
12:25asbjxrnfound the problem, the dir name needs to end with / so classpath is "jar/clojure.jar lib/"
12:50cadswhat is a good java framework that I might use with clojure to implement a light distributed application that could, for example, take advantage of the computers on my home network to compute some embarrassingly parallel function?
12:52cadsso something that would use minimal interprocess communication, but kind of wrap the details of setting up communications protocols, sockets, routing, and all those other unhappy details
12:54danlarkinhadoop?
12:55cemerickhadoop, shoal, and terracotta all hit different sweet spots
12:55cadshadoop seems pretty sweet
12:57cads.. now I want to compute a few terabytes of pi digits
12:58cemerickcads: Ah, yeah, hadoop is ideally suited for stuff like that.
12:58abrookscads: Using BBP?
12:59cadsmost likely :)
13:01abrooksAre there any other arbitrary digit extration formula for Pi? BBP is the only one I'm aware of (and likewise the only one I know that distributes Pi computation).
13:02abrooksWell.. I should say distributes Pi linearly. All the others still have summation that spills across a range of digits.
13:09cadsI think there have been a few improvements to the spigot algorithms (and that's what you'd use if you wanted to do naive parallelism)
13:09cadsbut there are others that are more efficient
13:10abrooksI just came across Bellard's formula (a BBP variant) which I had apparently come across before.
13:11cadsstuff like bpp gets really intensive for higher digits, so one would have to paralellize the computation for each digit too, eventually
13:13lisppaste8drewr pasted "REPL don't start" at http://paste.lisp.org/display/68508
13:13drewrIs that expected with the work that rhickey is doing right now?
13:14rhickeydrewr: put ./gen in your classpath
13:14drewrrhickey: Thanks!
13:23cadsabrooks: most other pi calculating efforts have been done in c. Do you think computing power has come far enough that you'd win by using java for a distributed project like pi simply because of platform independence?
13:26cadsthe record breaking project that calculated the quadrillionth digit of pi (it was a 0) was a windows app written in c
13:30Lau_of_DKEvening gents
13:31danlarkinLau_of_DK: afternoon
13:31Lau_of_DKrhickey, did you have any thoughts on my request for some improved consolidated documentation from earlier today?
13:32abrookscads: No... but I'm not intending to do any Pi calculations in Clojure either. :)
13:49sidewinder128clojure is a lisp 1 so is similar to scheme?
13:50Lau_of_DKits a lisp-1. You can see some of the difference on the wiki, if I remember correctly
13:51Lau_of_DKhttp://en.wikibooks.org/wiki/Clojure_Programming#Clojure_for_Scheme_Programmers
13:53sidewinder128thanks
14:06blabberwanted to know, are clojure datastructures built over java primitives?
14:07Chouserclojure data structures are primarily built of classes and arrays
14:07Chouserand bitfields
14:10kotarakChouser, hi, sorry had to leave on Sunday, did find out what the problem was with gen-interface/proxy/import?
14:22Chouserkotarak: yep
14:23Chousergen-interface doesn't make any constructors, so you can't use proxy.
14:23Chouserbut you can use gen-class to create something that implements a gen-interface'd Interface, and it seems to work fine.
14:25Lau_of_DKIs ther a better way to trace the steps of a function than inserting printlns? (I realise this is a dumb question if the answer is yes :) )
14:26ChouserI spend a lot of time these days doing that in a JavaScript debugger. But that's probably not a good general solution. ;-)
14:26Lau_of_DKDoesn't feel very efficient to say the least :)
14:26Lau_of_DKoh way... debug macro.. (with-debug), outputs all vars.. that'll be neat
14:27ChouserI'm under the impression that some of the simpler Java debuggers work fine on clojure code, though I've not tried that.
14:27Chouserjswat perhaps?
14:28Lau_of_DKno clue - I first touched on Java simultaniously with Clojure
14:29kotarakChouser, thanks. gen-class is a bit more work than proxy, but if it works...
14:37Chouseryeah, it's more work, but I think you need it if you want to create a new constructor.
14:40kotarakChouser, I'm actually surprised, that an Interface needs a constructor...
14:41ChouserI'm running up against the edge of my Java knowledge here, but I think the problem is that proxy needs a constructor since it's creating and instance, and gen-interface creates and Interface with no constructor.
14:43kotarakDoesn't proxy implicitly inherit from Object? (My naive view: everything inherits from Object)
14:44cemerickkotarak: yes, everything is an Object
14:44tWipwell there are primitives
14:45cemerickI don't know what's under the covers really, but autoboxing makes that distinction pretty fuzzy in practice
14:45tWipyes, nowadays that's true
14:45cemerickIn particular, everything that goes and out of Clojure is boxed.
14:46kotarakyes, there are primitives, but proxy creates an instance of an anonymous class
14:50cemerickLau_of_DK: I've debugged clojure code with the netbeans debugger with some limited success. The stack frames and line numbers can get mashed up some, but it works.
14:50Lau_of_DKyou recommend giving it a go ?
14:50cemerickI would, sure. Might not work, but there's little reason to not try.
14:50cemerickBetter debugging is ostensibly available in more recent builds of enclojure, but I'm still using one from August-ish.
14:51Lau_of_DKk
14:51Lau_of_DKI'll look into it. Although the thought of a (with debug macro isn't half bad
14:57drewrWhen did :refer-clojure show up?
14:58drewrIs that a new part of ns?
14:58ChouserSep 6th
14:59Chouserwhich was about a week after ns showed up.
15:00drewrDo you see anything syntactically wrong with the first line of http://github.com/jochu/swank-clojure/tree/master/swank/util/concurrent/mbox/mbox.clj?
15:00drewr"java.lang.Exception: Unable to resolve symbol: refer-clojure in this context"
15:01Chouserworks for me (SVN 1067)
15:01drewrThat's what I'm on.
15:02Chouseryou don't need "clojure/ns" though -- just use "ns", it has special resolution rules now, so it always means clojure/ns
15:02drewrk
15:05Chouserbut refer-clojure should be defined
15:05Chouser(doc refer-clojure)
15:07drewrHm, it works after killing my *inferior-lisp* buffer.
15:10Chouserif only emacs were written in clojure instead of some ancient brain-dead lisp.
15:10drewrI'm going to write Clomacs tonight.
15:10Chouserdrewr: I'll start using it tomorrow.
15:11Chouser...assuming it has vi keybindings.
15:11drewrHeh.
15:36isidoThis is probably stupid question, but when I have a list of booleans, how do I do and-operation to them?
15:37isidoThis doesn't work (and '(true true false))
15:37isidosince it has only one argument
15:38wwmorganisido: would every? work for you?
15:38isidoMaybe, I'll look into that
15:40isido(every? '(true true false)) returns "Wrong number of arguments", hmm
15:41wwmorganwell '(true true false) evaluates to a list of symbols, not booleans
15:41Chouserthis is complicated by the fact that "and" is a macro
15:41wwmorganyou probably want (every? identity (list true true false))
15:41Chouserthere you go.
15:42isidoYep, that's it. Thanks a lot.
15:48Lau_of_DKThis might just be something very easy to pick up, but would some of you mind helping me find this bug? http://paste.lisp.org/display/68515
15:48Lau_of_DK(also, hints on refactoring are most recommended/encouraged)
15:54hoeckLau_of_DK: looks more like your test-frac function is broken, but you didn't include its definition in your paste
15:57Lau_of_DKsorry, but why do you say that ?
15:58Lau_of_DK(I've added the test-frac)
16:00Lau_of_DKhoeck, ?
16:01wwmorganLau: doc strings for your functions are a great way to tell others (and remind yourself!) what each function is supposed to do
16:02Lau_of_DKwwmorgan, note taken
16:03hoeckLau_of_DK: that was just a guess
16:03Lau_of_DKk, I think you guessed it wrong this time hoeck
16:03hoeckLau_of_DK: sorry
16:04hoeckLau_of_DK: is test-frac is supposed to test the fraction function?
16:04Lau_of_DKdont worry about it :)
16:05Lau_of_DKBasically test-frac til run a loop from 'min' to 'top', calcucate all the decimal expansions of the fractions in that area, like (test-frac 1 3) will just call (fraction 1.0 1.0) (fraction 1.0 2.0) (fraction 1.0 3.0), and then tell you which one has the longest recurring cycle
16:05Lau_of_DKSo if there's a problem - and there is, it gives bad results for alot of numbers of 80 - then it lies in (fraction), which does the actual decimal expansion
16:08wwmorganLau: (fraction 1.0 100.0) returns "0.1" -- is this right?
16:09Lau_of_DKno, should be 0.01
16:12blabberI get the following error when trying to ru slime with clojure
16:12blabber*run
16:12blabberException in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Repl
16:12blabberany clues?
16:12Lau_of_DKdid you just update?
16:12blabberno the clojure I have is old by a week
16:13blabberit runs on the shell command line though
16:13Lau_of_DKThen it probably because you're not giving the full path to Java, or an incorrect path?
16:15blabber(setq swank-clojure-jar-path "/home/joel/repository/clojure_exec/clojure.jar")
16:15blabberthat is a valid path
16:16blabberThis is the error displayed in the inferior lisp buffer:
16:16blabberException in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Repl
16:16blabberCaused by: java.lang.ClassNotFoundException: clojure.lang.Repl
16:17blabberhmmm
16:18Lau_of_DKI think you need to review the emacs instructions on the wiki
16:19blabberI think I need to sleep
16:19blabberthanks anyway
16:20Lau_of_DKIs anybody looking at my lisppaste, or have we dropped it ? :)
16:21H4nslisppaste8: url
16:21lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
16:21H4nsLau_of_DK: what's wrong with it?
16:22wwmorganLau: there's a lot going on in fraction. Splitting it up a bit will improve readability and possibly expose the bug
16:22Lau_of_DKIt produces wrong results for higher numbers
16:22H4nsLau_of_DK: never mind me. i overlooked the "my"
16:23Lau_of_DKhehe
16:24Lau_of_DKwwmorgan, have you any suggestions for refactoring?
16:30wwmorganLau_of_DK: Just little stuff, since I don't understand the algorithm you're using. Like you don't need the (= true ...) in front of the some, and I'd indent the consequent S-exps in the cond
16:31Lau_of_DKI have followed clojure-mode's indenting, but I can see how yours would produce more readability
16:31drewrHow can I make the last argument to a function optional without having to parse the resulting arrayseq?
16:31Chouser(fn [a b & [c]] ...)
16:32drewrChouser: Oh yes.
16:33Chouseralthough then it's legal to call that with 4 or more args as well.
16:33Chouserof course you can also (fn thisfn ([a b] (thisfn a b nil)) ([a b c] ...))
16:34drewrThe latter is probably more idiomatic.
16:34Chouserhm, maybe.
16:39drewrIf the type of c varies, would it be best to promote all the args to a map?
16:41ChouserI wouldn't think so. You mean the fn will behave differently depending on the type of object passed in for c?
16:41drewrYes.
16:41drewrThen I could just use generic functions.
16:41drewrEr, multimethods.
16:42Chouseryou could use multimethods anyway, and dispatch on the 3rd arg if you really wanted to.
16:43drewrI don't always want to supply a third arg.
16:47lisppaste8Chouser pasted "dispatch on class of 3rd" at http://paste.lisp.org/display/68518
16:48drewrAh, nice.
16:53danlarkinis the JVM a reference-counting GC?
16:55waltersdanlarkin: no true GC is reference counting
16:55Chouserdanlarkin: I think it's more complicated than that.
16:56danlarkinwalters: what do you mean?
16:56waltersdanlarkin: http://en.wikipedia.org/wiki/Garbage_Collection
16:58danlarkinso why is it not true GC?
16:59waltersi would call it "memory management", but not garbage collection
17:00danlarkin"Garbage collection is often portrayed as the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system. However, many systems use a combination of the two approaches, and there are other techniques being studied (such as region inference) to solve the same fundamental problem."
17:00danlarkinI see where you're coming from
17:01ChouserI wouldn't mess with the word "true" here. Using reference-counting exclusively has some known deficiencies that most moden JVMs avoid.
17:01waltersi don't think any JVM uses reference counting, if it did it would be broken
17:02danlarkinperhaps it doesn't work within the confines of the JVM for whatever reason, but reference counting is a legitimate way to do GC
17:05danlarkinprovided you do cycle detection etc
17:07dudleyfdanlarkin: The JVM has several garbage collectors
17:07dudleyfhttp://www.ibm.com/developerworks/java/library/j-jtp11253/
17:14danlarkindudleyf: I see, thank you
21:10nicknullhow come clojure supports multimethods but no real OO?
21:11ChouserWhat features of "real OO" is it missing?
21:12nicknullyou know the answer, dont play rethorics
21:14aspectI'm glad somebody knows what is "real OO"
21:15ChouserI'm afraid I made a bad impression. I didn't mean to.
21:15aspectlooked like a troll to me
21:16Chouserwell, I think every feature of OO is avaible, if not in the "normal" way.
21:18ChouserBut I was afraid I was forgetting one, so I didn't want to sound overconfident. :-)
22:44pjb3Does anyone know if you can use proxy to extend a java class and override a method with a clojure function. and call the superclass from within the function?
22:44pjb3Does that make any sense?
22:46Chouseryes
22:47Chouser(doc proxy-super)
22:48pjb3Chouser: ah, proxy-super, thanks, I'll try that
22:57ChouserI'm completely failing to read any data from this socket.
23:09Chouserah. exceptions hiding inside an agent.
23:36jcriteshow might one translate "fluent style" java code into Clojure?
23:36jcritesfluent style being a().b().c().d().e(), esp. as used with factories
23:36arohnerjcrites: (doc ->) ?