#clojure logs

2010-09-04

04:34Rayneschouser: Whenever you hop back on: I replied to the group post with some snapshots. <3
05:04triyo.quit
05:05triyooops
06:19ryoko-shaI'm trying to construct a loop in which an index integer variable is parsed from a string via (java.lang.Integer/parseInt "1'), but am getting an exception java.lang.RuntimeException: java.lang.IllegalArgumentException: recur arg for primitive local: i must be matching primitive (test.clj:10)
06:19ryoko-sha...mystified
06:21ryoko-shasince (type 1) => java.lang.Integer and also (type (java.lang.Integer/parseInt "1")) => java.lang.Integer
06:21mrBlisstry wrapping it in (int ..)
06:21mrBlissInteger != int
06:22ryoko-shayep same deal !
06:23mrBlisswhat are the other arguments to the recur call?
06:24ryoko-sha (recur (+ i 1))...
06:24ryoko-shacouldn't be simpler!
06:24LaPingvino(unchecked-add i 1) ?
06:24mrBlisstry wrapping that in (int ..) or replace it by (inc ..) (I'm also guessing a bit ;-)
06:25LaPingvino+ is not simple :P
06:25LaPingvino+ is a function on (add)
06:28ryoko-sha[LaPingvino] - bingo! thanks (unchecked-add)
06:28ryoko-shais (unchecked-add) very naughty in some way?
06:28LaPingvino(+) does the boxing
06:29LaPingvinowhich destroys the primitives
06:29LaPingvinobasically :)
06:29ryoko-shathanks - its all al learning experience!
06:29LaPingvinoryoko-sha: unchecked-add can cause overflows
06:29LaPingvinobecause you use primitives
06:29mrBlissit's in the name:
06:30mrBliss,(unchecked-add Integer/MAX_VALUE 1)
06:30clojurebot-2147483648
06:30LaPingvinoand it will not automatically change the type to a higher capacity
06:30LaPingvinothere you go :)
06:30ryoko-shasuper
07:26raek,(doc num)
07:26clojurebot"([x]); Coerce to Number"
07:26raekhttp://gist.github.com/442269 <-- primitives and recur, with comment from rhickey
07:27raek(the bug that the example illustrated has been fixed)
07:30raekryoko-sha: I had to insert a call to num in the loop form: (defn fact [n] (loop [n n, (num 1)] (if (zero? n) acc (recur (dec n) (* acc n)))))
07:30raek*sigh* the loop binding vector should of course have been [n n, acc (num 1)]
07:32raekI don't think you should have to resort to unchecked-add
07:48ryoko-sharaek: yep - that worked for me - thanks
07:49raekI think that will throw an exception on overflow, rather than silently wrap around
07:50ryoko-shabetter - although my values for i are very small - defensive programming etc...
08:11fliebel*puzzled* what is the long way to make a map/dict/whatever? {:i "mean" :those "things"}
08:12mrBliss,(hash-map :a 1 :b 2)
08:12clojurebot{:a 1, :b 2}
08:12fliebelah… I was thinking in the map direction, but map is something else :P
08:12mrBliss,(zipmap [:a :b] [1 2])
08:12clojurebot{:b 2, :a 1}
08:13mrBlisslooks more like the other map :-)
08:13raek,(into {} [[:a 1] [:b 2]])
08:13clojurebot{:a 1, :b 2}
08:24fliebelCan anyone give em an example of max-key? the docs are chinese to me, but the fn name sounds like what I need. I want to get the key from a map whose number is the heigest.
08:25raekhttp://clojuredocs.org/v/1506
08:25raekthe key function should return a number
08:26fliebelah...
08:26raekthe element in the sequence for which the key function returns the highest number is the one returned by max-key
08:27fliebelraek: so Can I apply that to a map?
08:28fliebel,(apply max-key {:a 1 :b 3})
08:28clojurebot[:b 3]
08:28fliebelyay!
08:29fliebeluuhm, nope
08:33fliebelokay, this seems to work :)
08:33fliebel,(apply (partial max-key last) {:a 1 :b 3 :c 2})
08:33clojurebot[:b 3]
08:38raek(apply max-key key {1 :a, 10 :b, 100 :c})
08:38raek,(apply max-key key {1 :a, 10 :b, 100 :c})
08:38clojurebot[100 :c]
08:39fliebelty
08:39raekthe "key" function that the docs refer to could be called the "scale" function
08:39raekas in "pick the element that has the highest value on this scale"
08:40raek,(apply max-key val {:a 1, :b 10, :c 100})
08:40clojurebot[:c 100]
09:07fliebelWhat is the proper way to do this?
09:07fliebel,(map reverse {:a 1 :b 2})
09:07clojurebot((1 :a) (2 :b))
09:08mfexhey fliebel, the proper way to do that is to do it that way :)
09:08fliebelmfex: I mean, I want a map witht he keys and values switched
09:09Raynes-> (into {} (map reverse {:a 1 :b 2}))
09:09sexpbotjava.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Map$Entry
09:09Rayneswut
09:09fliebelyea...
09:09Raynes-> (apply hash-map (map reverse {:a 1 :b 2}))
09:09sexpbot=> {(2 :b) (1 :a)}
09:09fliebeltried all of that...
09:10_mst,(let [m {:a 1 :b 2 :c 3}] (zipmap (vals m) (keys m)))
09:10clojurebot{3 :c, 2 :b, 1 :a}
09:11_mst(it always takes me about three minutes to remember that it's called "zipmap" :)
09:11fliebel_mst: Yea, I never get there at all, I end up browsing the sipper package.
09:11fliebel*zipper
09:13mfex,(into {} (map (juxt val key) {:a 1 :b 2}))
09:13clojurebot{1 :a, 2 :b}
09:13Raynes->(into {} (map (comp vec reverse) {:a 1 :b 2}))
09:13sexpbot=> {2 :b, 1 :a}
09:14RaynesI like mine better.
09:14Raynes:D
09:14hoeck,(clojure.set/map-invert {:a 1 :b 2 :c 3})
09:14clojurebot{3 :c, 2 :b, 1 :a}
09:14RaynesI like his the best.
09:15Raynes>_>
09:15fliebelhoeck: Yea, that's the better way to do things :)
09:15RaynesWhy are there map functions in the set namespace...?
09:15RaynesThey trick me out.
09:16hoeckmaybe because of their relational nature
09:17ssideriswhat's wrong with (apply hash-map (map reverse {:a 1 :b 2}))
09:17ssiderisit looks like the easiest to read
09:17ssiderisapart from the map-invert of course
09:17hoeckcore.set has also rename-keys, index and join functions
09:17fliebelssideris: Try it...
09:17Raynesssideris: The fact that it doesn't work is a pretty bad deal breaker.
09:18ssiderisoops, yeah sorry
09:18Raynes:)
09:18ssiderisbut the zipmap solution is ok, right?
09:19fliebelThis is how map-invert does it: (reduce (fn [m [k v]] (assoc m v k)) {} m))
09:21jcromartieI'm playing with designing a system that uses the SICP notion of "streams" for representing the state of an object
09:21jcromartiebec
09:22Raynesssideris: I think any of the examples above are reasonable.
09:22jcromartiebecause the sequence of states of certain things over time is really important for the type of system I'm building
09:22jcromartiebut I've hit a couple of spots where I'm not really sure how to represent things
09:23fliebelIs there any difference between using a map as a function with a key as argument, or the reverse? Both seem to work.
09:23jcromartiemostly because you can't serialize functions
09:23jcromartiefliebel: only one works when the map is nil
09:25jcromartie(and that's the keyword-as-fn)
09:28mfexfliebel: :keyword as the function works when the map is nil and with records as well, but for maps with keys that are not lookup functions there is no choice
09:44fliebelIs there something like rand-nth that lets you define the odds of getting certain items? The easy way out is letting certain items occur more often in the seq, but that seems stupid.
09:48raekfliebel: look at the "wrand" function in rhickey's ant.clj example
09:48raekhttp://raek.se/ants.clj
09:50fliebelraek: That looks like what I need :
09:50fliebel:)
10:24BahmanHi all!
10:25ssiderisfliebel: what you want to do is called "roulette selection"
10:26ssiderisit's used in genetic programming among other things
11:02fliebelAaah, the dreaded "Can only recur from tail position"… what is considered the tail position? I'm sure this has been asked before, I'm even sure *I* asked it before. I'm recurring from the if clause of an if-let, with and else clause following.
11:04fullets,((fn [x] (if-let [_ (pos? x)] (recur (dec x)) :done)) 3)
11:04clojurebot:done
11:05fulletsCould you pastebin your code?
11:06fliebelfullets: http://gist.github.com/564552
11:06fliebel(near the end)
11:06fliebelline 43
11:09fulletsThat let is the final statement in the if
11:09fulletsThat is, there is no else clause as written
11:10fliebelyou're right, I think I got my parens mixed up…
11:13fliebelyea, works :)
11:14fliebelSee here, my new and improved rock-paper-scissors bot: http://gist.github.com/564552
11:18fliebelIt has zero randomness and will hopefully improve over time. By knowing how it works, you can win.
11:19lpetithello
11:19fliebellpetit: hey
11:21lpetitdo some people have feedback on ccw version 62 to give ? I'm considering releasing a corrective version, so if more must be included ...
11:21lpetit... now's the time for it :)
11:44kumarshantanulpetit: I have a small correction request for CCW
11:45kumarshantanulpetit: when one wants to create a clojure file with dash in the file name, it should say "Consider using underscore instead of dash"
11:46kumarshantanulpetit: instead of simply saying "invalid filename"
12:03zmyrgelhi, how can I cast java class in clojure?
12:08zmyrgelfor example, findComponentAt returns Component which I want to cast to JLabel
12:41kumarshantanuzmyrgel: casting is not required in clojure
12:42kumarshantanuzmyrgel: because clojure is a dynamically types language
12:46zmyrgelkumarshantanu: so in the above scenario it automatically finds the that the Component is actually JPanel and I can call JPanels method for it?
12:47kumarshantanuzmyrgel: yes, it depends on the object type, not on the reference type (because there is no reference type in clojure)
12:52zmyrgelkumarshantanu: ok, thanks
13:03ApeShotSo I've compiled the latest clojure.jar and clojure-contrib.jar, and put them in the lib folder of my clojure project, and started up (successfully) slime from within emacs, but I can't (use 'clojure.contrib.string) or (use 'clojure-contrib.string), even though there does seem to be such a lib in the clojure-contrib source I compiled from. Any idea what gives?
13:16ApeShotI have been away from clojure for a few months, at least - has something changed in the way that libraries work?
13:16ApeShotI can (use 'clojure.contrib.str-utils) but, though it executes without error, this does not seem to actually import any of the functions in that library
14:01fliebel What functions are there to return a lazy cumulative map/seq? So that every item is itself plus every previous item. [1 2 3] -> [1 3 6] and then with a hash-map. *browsing the core docs*
14:03somnium,(take 5 (reductions + (iterate inc 0)))
14:03clojurebot(0 1 3 6 10)
14:03fliebelsomnium: Nice :) thank you
14:04somniumoh, I guess we can do (range) nowadays instead (iterate ...)
14:04somniumnp
14:04arohnermap entries can't hold metadata?
14:04fliebelsomnium: With the slight difference that I'm not doing a list of 1 2 3, but rather 1 5 8, and then want to have 1 6 something
14:05arohnerI wish everything, including ints and strings, could hold metatdata
14:05fliebelarohner: Anything that's java can't
14:05arohnerfliebel: I know. It's just getting annoying
14:07kumarshantanuwhat's the best way to transform [:a 10 :b 20 :c 30] --> {:a 10 :b 20 :c 30} ? the two ways I know are (reduce #(assoc %1 (first %2) (last %2)) {} (partition 2 [:a 10 :b 20 :c 30])) and (apply assoc {} [:a 10 :b 20 :c 30])
14:08tomojarohner: how would you get a map entry with some metadata into a map?
14:08arohnertomoj: using into
14:08arohner(into {} seq-of-map-entries
14:09chouser,(apply array-map [:a 10 :b 20 :c 30])
14:09clojurebot{:a 10, :b 20, :c 30}
14:10tomoj,(let [x (first {:a 2})] (identical? x (first (into {} [x]))))
14:10clojurebotfalse
14:10kumarshantanuarohner: (with-meta {:a 10 :b 20} {:motd "Hello World"})
14:10tomojI suppose it would copy the metadata in if it were there
14:13somniumhas anyone done an ADT library with deftype/defrecord?
14:16somniumintegers aren't valid names for fields, right?
14:16arohnersomnium: right
14:17somniumbut something like {:ADT_TAG t, T0 a ... TN z}, and then a pattern matching macro could add the right field names
14:17somniumthen you could use ADT pattern matching internally, but still plug the class into protocols
14:17kumarshantanuchouser: thanks, that's the first kind of use of array-map I noticed now
14:18somniumhmm, maybe I'll give it a go
14:18kumarshantanuadded an example @ array-map on clojuredocs.org too
14:19somniumthis red-black-tree implementation convinced me of their potential utility: http://gist.github.com/561648
14:20tomojsomnium: https://gist.github.com/cf84a59543e31f42d2a2
14:20tomojre ints as field names
14:20tomojnot that that's a good thing to do!
14:21somniumtomoj: yeah, just some ordered naming convention for (TAG a ... n) matching like haskell
14:21tomoj,(class (symbol "1"))
14:21clojurebotclojure.lang.Symbol
14:22somnium?
14:23tomojmy point was that while (defrecord Foo [1 2 3]) fails, with a macro we can do it
14:23somniumright
15:02fliebelI give up… How can I get a map sorted by its values? There are all sorts of ways to do it, but none actually works for me :(
15:04tomojyou can't, really
15:05arohnerclojure's sorted maps are sorted by key
15:05tomoj,(sort-by val {:a 3 :b 2 :c 1})
15:05clojurebot([:c 1] [:b 2] [:a 3])
15:05tomojbut once you've done that you don't have a map anymore
15:05arohnerif your map is 1:1, you can swap the keys and values
15:08fliebelI can live with tomoj's thing… I'm just doing ugly things I guess
15:09fliebelarohner: That could also work
15:11LauJensenMap lookups are usually by keys tomoj, so sort-by val makes a lot of sense to me
15:12n2n3,
15:12clojurebotEOF while reading
15:12n2n3,(System/exit 0)
15:12clojurebotjava.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
15:13n2n3,{}
15:13clojurebot{}
15:31jkkramerfliebel: clojure.contrib.priority-map was recently added -- http://github.com/clojure/clojure-contrib/blob/master/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj
15:31jkkramerit sorts by value
15:32fliebeljkkramer: Nice, but it's solved already. Good for next time :)
15:33LauJensenjkkramer: Whats the use case for something like that?
15:33jkkramerLauJensen: priority queue, for one
15:33jkkramerLauJensen: http://clj-me.cgrand.net/2010/09/04/a-in-clojure/
15:35LauJensenok, will take some time to grok
15:36LauJensenhmm, no I think I get it
15:37jkkrameri found out about this right after jerry-rigging a sorted-set priority queue for dijkstra's algorithm
15:48LauJensenjkkramer: for fun or work ?
15:49jkkramerLauJensen: currently for fun. writing a general-purpose graph lib
15:49LauJensencool
15:51jkkramerplanning to make a mailing list post about it to get some feedback
15:51jkkramerseems there's no fleshed-out graph lib for clojure yet
15:57cmihaiWhat was that tool that gave command history to any repl called?
15:57fliebeljline?
15:57fliebelrlwrap?
15:57cmihaiThat was the one, thanks :-)
15:58LauJensencmihai: slime
15:59cmihaiNah, I wanted it for db2 :P
15:59emhjkkramer: cool. I'm also working on a graph library. more special purpose than general though. for my master thesis, due in 1 week
15:59cmihaiI remembered using it in conjunction with clojure, just forgot the name
15:59LauJensenemh: ouch, work fast :)
16:00emhyeah :)
16:02jkkrameremh: awesome. i'm trying to write a protocol- & record-based API that would be easy for anyone to write algorithms for
16:04jkkrameremh: are you doing anything fancy like multigraphs? or just simple/weighted/directed graphs?
16:05emhjkkramer: I'm also using protocols heavily. if you want to peek at my very work-in-progress-thesis, look here: http://rasmus.uib.no/~ehv022/thesis.pdf
16:05emhjkkramer: just simple undirected graphs for now. will probably extend it later
16:05emhafter thesis
16:06emhdepends on if I get a ph.d. after
16:07emhjkkramer: since I'm pressed for time I can't make it as elegant as I would wish. just have to crank out code as fast as possible
16:09jkkrameremh: very interesting!
16:10jkkrameremh: the concept of neighborhoods is new to me
16:10emhjkkramer: thx. we had all of it implemented in Java, but it's a huge ugly mess. I figured I'd have to rewrite in pseudo-code for presentation in my thesis, but clojure is sufficiently close to pseudocode so..
16:11emhjkkramer: neighborhoods are very important in the decompositions, so I devote more data structures and protocols to them than would be normal in a general graph lib
16:12jkkrameremh: http://gist.github.com/565453 is the basic graph API so far. there are also some basic algorithms to go with it
16:13jkkrameremh: would be cool to be able to mix in capabilities with protocols. e.g., labeled graphs, neighborhoods
16:14emhjkkramer: yeah
16:14emhjkkramer: looks pretty good
16:14emhjkkramer: one thing I've thought about is whether it's worth distinguishing between read / write interfaces for graphs
16:15emhjkkramer: since read-only graphs might be implemented more efficiently
16:16jkkrameremh: interesting. with protocols you could define ReadonlyGraph record(s), and it could still work with all the polymorphic methods, and be able to convert easily to a writeable graph
16:17emhhmm, yeah, true, easy to do conversions
16:19emhI need to get some nice infrastructure for mixins and defaults later. I looked at the methods a la carte lib, looks like a nice start at least
16:21emhhttp://onclojure.com/2010/08/26/reusable-method-implementations-for-deftypes/
16:23emhI'm using some quick hacks right now, sometimes implementing protocols on top of the Java interfaces for other protocols. for example implementing tex serialization protocol on top of interfaces for Graph protocol etc
16:26jkkramerseems there's still a lot of sussing out to be done when it comes to best practices for protocols, types, and records
16:26emhagreed
16:59LauJensenDoes anyone have some pointers on how to make a design resizeable (grow/shrink) using contrib.miglayout
16:59LauJensen?
16:59pdkmy favorite thing about freenode's ircd is that it makes you leave half the channels you're on just to change your name if you dc
17:07LauJensenbozhidar: ^^
17:07bozhidarLauJensen: hi
17:07LauJensenbozhidar: hi - got a clue about my q above?
17:09bozhidarLauJensen: I haven't gotten to using contrib.miglayout yet, but miglayout supports this on two levels
17:09bozhidarfirst you can declare growing columns/rows
17:09bozhidarand min/preferred/max sizes
17:09bozhidarand then you can use the same technique on the components themselves
17:10bozhidarwhen you add them to a container using miglayout
17:10LauJensenI might be in trouble with the wrapper then, I think it only supports components restraints. My setup is jframe -> jpanel -< jsplitpane -> 2 components. Where in that do you see the columns?
17:11bozhidarin the MigLayout object constructor
17:11bozhidarit takes a string representation
17:11bozhidarof the layout
17:11bozhidarwith settings for every row and column
17:11bozhidaractually two strings
17:11LauJensenoh
17:11bozhidarone for the rows
17:12bozhidarand one for the columns
17:12bozhidarnew MigLayout("wrap 1", "[grow]", "[grow]") - layout with one row and one column that grow
17:13bozhidaryou should add additional [] for every other row/column you have
17:14LauJensenI don't think the wrapper lib supports constructor args, can they be passed in after construction ?
17:14LauJensenhmm, no actually it might
17:14LauJensenbozhidar: Thanks for the tips, I'll fiddle
17:15bozhidarthere are setters for them
17:15bozhidarbut oddly they take different arguments
17:15LauJensenoddly?
17:15bozhidarI personally always use the constructors
17:15LauJensenI have Java so bad - We mock PHP for being inconsistent, but Java is right up there with PHP
17:15LauJensens/have/hate
17:16bozhidarhmm
17:16bozhidarI looked at the sources
17:16bozhidareven though the setters take Object
17:16LauJensenI iterate through some components, calling setBackground on them. Then I notice 2 of them arent affected. Google the first one and the answer comes up that under certain LookAndFeels its not guaranteed the calls to setBackground would be respected..?!
17:16bozhidarinstead of String
17:16bozhidarthey are internally cast to String
17:16bozhidarand parsed the same way
17:17bozhidarbut this way you can pass something of type AC(which I've never seen so far)
17:18bozhidarthis seems like a rather poor design decision - an overloaded method would have been easier to grasp
17:19bozhidarwell, Swing is a pretty nasty story
17:19LauJensenbozhidar: And when the entire panel doesn't react to resizes at all, thats miglayout I have to blame?
17:19bozhidarthere is simply no way to do everything the same way on totally different platforms
17:19bozhidarI don't if you're aware of the performance issues when you're using GTK+ L&F
17:20bozhidarwhen you start resizing the frame long enough
17:20bozhidarthe JVM dies
17:21bozhidarif the panel is in another container - you'll have to configure it's layout manager as well
17:21LauJensenthe panel is just in a jframe
17:21bozhidarif it's a top level panel(one contained directly in a JFrame) only setResizable(false) on the frame
17:21bozhidarmight be causing something like that
17:22jkkrameris there a way to use 1.3 contrib complete with lein? [org.clojure.contrib/complete "1.3.0-SNAPSHOT"] doesn't seem to work
17:22jkkramerindividual modules work
17:25bozhidarLauJensen: I think that JFrame used by default BoxLayout which would make the panel grow/shrink, but you can explicitly set some layout just to be on the safe side
17:25bozhidarI personally don't set manually the layout for my frames
17:25LauJensenyea, I'll have to import miglayout myself it seems
17:25bozhidarI just add one panel to each frame and set the panel as the frame's content pane
17:26LauJensenso you dont add it ?
17:27bozhidarI use code like this setContentPane(topPanel);
17:27LauJensenyea me too, no change
17:28bozhidarmaybe you've set some size restrictions on the frame?
17:28LauJensenNot that I know
17:30LauJensenof
17:31bozhidarhmm, I can't think of anything else
17:31bozhidarmaybe something is wrong with the wrapper
17:32LauJensenEither Im not getting it, or its half baked
17:39LauJensenbozhidar: both the panel and JFrame have (.setLayout "fill" "[grow]" "[grow]") and still do not react to resizes
17:40LauJensen(and the jtabbedpane)
17:41bozhidarLauJensen: AFAIK JFrame's setLayout method expects a layout object
17:41LauJensenI get no errors
17:43bozhidarit should be (doto (JFrame.) (.setLayout (MigLayout. "wrap 1" "[grow]" "[grow]")))
17:43LauJensenwhy?
17:43clojurebothttp://clojure.org/rationale
17:43LauJensenhehe
17:44bozhidarbecause according to the JFrame javadoc the method's signature is public void setLayout(LayoutManager manager)
17:45bozhidarit puzzles me that your invocation is not causing an error
17:45LauJensen(MigLayout. "wrap 1" ...) returns a manager right?
17:46LauJensenoh
17:46bozhidaryes
17:46LauJensenI wrote it wrong here
17:46LauJensensorry
17:46LauJensen (.setLayout (MigLayout. "wrap 1" "[grow]" "[grow]"))
17:46LauJensenI wonder if constructing a JPanel with a Layout as its argument is similar to setting the layout later
17:47bozhidarit's the same
17:47bozhidarjust a matter of taste most of the time
17:47LauJensenit is - but I cant be sure with all of these other inconsistencies
18:16Rayneschouser: Pingzors.
21:03danlarkininteresting tidbit, which I suppose makes sense when you take the time to think about it: the datastructure returned by (promise) mutates when delivered upon
21:03danlarkinso putting it inside a reference type is meaningless
21:04hiredmanhow so?
21:04hiredmana promise is a promise delivered or not, dereferencing blocks until it has been delivered to
21:04danlarkin,(let [a (ref {:foo (promise)})] (deliver (:foo @a) :ok) a)
21:04clojurebot#<Ref@1ffa176: {:foo #<core$promise$reify__5534@1805bdb: :ok>}>
21:05danlarkinyeah I don't mean derefing the promise, but that it gets mutated inside a reference type
21:05danlarkinsee I don't have a dosync there
21:06hiredmanmutated how? if you ever look inside the promise you will always find the same value
21:07danlarkinit's mutated in the sense that first it was outstanding and then it was delivered
21:08danlarkinand since it's contained inside a ref in my example, it just exhibits different behavior than when persistent datastructures are in a ref
21:08danlarkinits behavior is obviously correct, it just tripped me up for a minute
21:08hiredmanif from an observer's perspective something cannot be observered to changed, is mutable?
21:09danlarkinI don't get what you're driving at
21:09hiredmandanlarkin: you wouldn't happen to know how to write applescript that takes input from quicksilver would you?
21:10danlarkinI do not. I tried to write a QS plugin once and found it much easier to just make it a shell script
21:11hiredmanok
21:14danlarkinso as a corollary to my discovery, I have a question. Is there a way, other than promise/deliver, to block on some arbitrary, programmer defined thing (ie not I/O)
21:14danlarkin(while @foo) or something is not true blocking, since it will just poll it every nanosecond or something
21:20hiredmanthere are a few blocking queues in j.u.concurrent
21:20hiredmanand there are always Locks
21:23danlarkinlocks to the rescue! who'd've thought
21:24ataggartdoes awaiting on an agent qualify?
21:25danlarkininteresting thought, but await only blocks on actions sent from the thread on which you await
21:25ataggartah right
21:30ataggartcan anyone think of an environmental issue that would cause a binding to not be applied? There are 3 tests in contrib which are failing, but only do so on the build machine.