#clojure log - Feb 26 2008

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

17:43 Chouser: would it be bad form to work with lists of zip locs?

17:44 I guess as an example, think of a node with lots of siblings (each with potentially deep trees).

17:45 rhickey: no - you just need to understand that each represents an independent editing path

17:45 Chouser: right, ok.

17:46 So if I want a subset of that list of siblings, I can either have a straigt list of locs, or I can ... I guess, remove the siblings that I don't want.

17:47 Would there be a lot of duplicated data if I used a list?

17:48 I think that's what I need to do, because I want to include nodes from different locations in the tree, but I think I want naviagtion from any of them to behave as if they were all in their original place in the original tree.

18:28 rhickey: that will work fine

21:52 ericthor_: rich, u there?

21:52 rhickey_: yup

21:53 ericthor_: java singleton class...want to use as a proxy for a clojure implementation.

21:54 The class is statically mapped into a manifest.

21:55 I think this may be the only place I need to do this and then I can stay in clojure....should I just forward the calls to clojure bound Vars or is there a more elegant way?

21:55 rhickey_: are there lots of calls? is there an interface?

21:55 ericthor_: no...just 3

21:56 yes there is an interface

21:56 3 functions that is

21:56 rhickey_: if you use vars, try the new RT.var(ns,name)

21:56 ericthor_: i have a clojure 'implements' variable

21:57 how do i forward calls to java to that? is that simple?

21:57 from java

21:57 rhickey_: How do you initialize the singleton?

21:58 ericthor_: it is done in some black magic in the background

21:58 rhickey_: do you put ctor params in some xml thing?

21:58 ericthor_: I am binding to a clojure variable that I know is already initialized at the time the singleton is instantiates

21:58 instaintiaed

21:58 u know what i mean

21:58 no ctor parameters...there is NO state in the class

21:59 rhickey_: but is there a mechanism for initializing/

21:59 ?

21:59 ericthor_: yes

21:59 rhickey_: what is it/

21:59 ericthor_: I was hoping to save that mystery for another day

21:59 trying to move forward

21:59 rhickey_: ok then use vars, easy enough

21:59 ericthor_: ok

22:00 once I figure out how to tap into the static mappings dynamically, all this goes away (or moves where i want it to be anyway)

22:00 thanks

22:00 rhickey_: sure

22:00 ericthor_: RT.Vars it will be

22:15 i just call IFn.invoke?

22:16 on the vars?

22:16 rhickey_: given a var v, v.invoke(args)

22:17 will call the fn held by v

22:17 or keyword or map

22:17 ericthor_: perfect :)

22:33 I'm in...it's clojure pastures from here on in!

22:33 thanks

22:33 rhickey_: great!

22:33 ericthor_: RT.Var is nice...thanks

Logging service provided by n01se.net