#clojure logs

2008-02-26

17:43Chouserwould it be bad form to work with lists of zip locs?
17:44ChouserI guess as an example, think of a node with lots of siblings (each with potentially deep trees).
17:45rhickeyno - you just need to understand that each represents an independent editing path
17:45Chouserright, ok.
17:46ChouserSo 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:47ChouserWould there be a lot of duplicated data if I used a list?
17:48ChouserI 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:28rhickeythat will work fine
21:52ericthor_rich, u there?
21:52rhickey_yup
21:53ericthor_java singleton class...want to use as a proxy for a clojure implementation.
21:54ericthor_The class is statically mapped into a manifest.
21:55ericthor_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:55rhickey_are there lots of calls? is there an interface?
21:55ericthor_no...just 3
21:56ericthor_yes there is an interface
21:56ericthor_3 functions that is
21:56rhickey_if you use vars, try the new RT.var(ns,name)
21:56ericthor_i have a clojure 'implements' variable
21:57ericthor_how do i forward calls to java to that? is that simple?
21:57ericthor_from java
21:57rhickey_How do you initialize the singleton?
21:58ericthor_it is done in some black magic in the background
21:58rhickey_do you put ctor params in some xml thing?
21:58ericthor_I am binding to a clojure variable that I know is already initialized at the time the singleton is instantiates
21:58ericthor_instaintiaed
21:58ericthor_u know what i mean
21:58ericthor_no ctor parameters...there is NO state in the class
21:59rhickey_but is there a mechanism for initializing/
21:59rhickey_?
21:59ericthor_yes
21:59rhickey_what is it/
21:59ericthor_I was hoping to save that mystery for another day
21:59ericthor_trying to move forward
21:59rhickey_ok then use vars, easy enough
21:59ericthor_ok
22:00ericthor_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:00ericthor_thanks
22:00rhickey_sure
22:00ericthor_RT.Vars it will be
22:15ericthor_i just call IFn.invoke?
22:16ericthor_on the vars?
22:16rhickey_given a var v, v.invoke(args)
22:17rhickey_will call the fn held by v
22:17rhickey_or keyword or map
22:17ericthor_perfect :)
22:33ericthor_I'm in...it's clojure pastures from here on in!
22:33ericthor_thanks
22:33rhickey_great!
22:33ericthor_RT.Var is nice...thanks