#clojure log - Nov 26 2009

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

0:00 somnium: alexyk: for bootstrapping its probably faster to use java interop than congomongo, JSON/parse creates BasicDBObjects that you can pump straight into the collection

0:00 it must be faster, since congomongo just wraps it with a function call :p

0:01 alexyk: somnium: cool, will study

0:04 _ato: about JIT, if you call things twice in repl, does it matter if it's the first time or second?

0:05 'cause the stuff was slow the first time and fast the second time

0:05 somnium: I have a clojure-new and contrib standing by :)

0:05 _ato: yeah, it'll get fast the first few times you call it

0:06 cause the JIT doesn't optimise until it's seen a few runs through, as it does all this timing stuff to figure out how best to optimise it

0:07 _mst: isn't "a few" something like "a thousand" with -server?

0:08 _ato: yeah... "a few" means "a thousand" for a tight inner loop :p

0:08 _mst: heheh

0:09 _ato: as opposed to "a fair amount" which would be "a million" or "a lot" which would be "a billion"

0:10 _mst: so if I say "Hey _ato, could you lend me a few bucks"...

0:10 you'll probably refuse

0:10 zaphar_ps: is there a way to make private multi-methods?

0:11 _ato: zaphar_ps: (defmulti #^{:private true} my-multi ...}

0:11 there might be a nice macro to do it in contrib

0:12 nope looks like there's not

0:12 someone should add one

0:12 zaphar_ps: :-)

0:13 that works

0:13 _ato: _mst: it's all relative. I'd lend you a few won :-P

0:13 zaphar_ps: and your right someone should add one

0:14 _ato: I would, but it seems Rich still hasn't got my CA yet. :(

0:14 might have to send another one

0:15 maybe the Post couldn't read my terrible handwriting :p

0:19 alexyk: nice, 100M twit scan stabilized at 8 GB RAM

0:20 somnium: so the branch is just "new", right?

0:23 * hiredman has 200,000 won in his desk drawer

0:23 somnium: alexyk yeah, if you cloned clojure from github you should already have it

0:24 alexyk: yep... then it's cooking, although with the old congomongo :)

0:25 why does clojure CPU usage jumps to 300-500% in a single-threaded program? I mean, may be one thread is loading from mongo, but 300-500%? Is it parallel GC?

0:26 it flips between 100% and 200-500%

0:29 somnium: alexyk: hmm, I seem to have misplaced it, but I should time to post it this weekend. It just mapped the coerce functions to protocols on IPersistentMap, ClojureDBObject, String ... seriously kills the function call overhead

0:29 alexyk: somnium: cool, let me know when you find/push it!

0:31 still looks like clojure likes it RAM quite filling... 10 GB already for reducing into an update-in map with 5 million keys

0:31 or is it GC not bothering

0:32 _ato: could GC not bothering if you've got a large max heap

0:32 alexyk: do you guys recommend some GC option? I like to set -Xmx50g for these works

0:32 hiredman: ther are options you can pass to the jvm so it will print out GC statistics

0:32 ~google headius jvm flags

0:32 clojurebot: First, out of 249 results is:

0:33 Headius: My Favorite Hotspot JVM Flags

0:33 http://blog.headius.com/2009/01/my-favorite-hotspot-jvm-flags.html

0:33 _ato: if you've got 50G of RAM to burn, sure give it as much as you like

0:36 alexyk: hiredman: nice options, thx

0:37 is using the "new" branch OK for everyday research coding? no deployment, no nothin'

0:39 somnium: it seems to work okay with compojure as long as everything is recompiled

0:39 though I'm not qualified to answer that question :p

0:40 alexyk: are the bug fixes merged from new to 1.1, or the other way?

0:41 _ato: bugfixes from 1.1 will be merged into new

0:41 alexyk: _ato: so the development is on 1.1, and new is for purely experimental stuff?

0:42 _ato: "new" is just for types and protocols and reify related features. Those features used to be called "new new" as they used to be implemented using the the "new" special form

0:43 (new ...)

0:43 hiredman: most developement seems to be on new these days

0:43 somnium: the way new is moving it feels like 1.0 could almost be deprecated

0:44 hiredman: within the last two days or so there has been renewed interest in pushing 1.1 out the door, so 1.1 should kind of settle down for bugfixing

0:45 somnium: the new branch stuff will not be in the 1.1 release

0:45 * somnium somnium pouts

0:46 notallama: i'm really liking protocols.

0:46 somnium: me too

0:50 alexyk: somnium: I'm pondering parallelization of mongo scan. Say I split my collection into 8, for the 8 cores I get. Or into 32, for the 32 actual ones (8 quad-cores). Then I create N threads, each opens a mongo connection to its collection, and they all start going. Possible?

0:51 then in STM they all sync/merge their maps.

0:51 somnium: alexyk: its possible, but mongo is single threaded

0:51 alexyk: until 1.1.4 they say

0:51 alexyk: so they're all going to block while one talks to its cursor

0:51 alexyk: somnium: you mean one mongod will not serve more than one client thread??

0:51 somnium: yep

0:51 alexyk: man...

0:51 somnium: on the brightside its very fast, but still, you have to created multiple mongods

0:52 alexyk: somnium: ah, I can do that.

0:52 I wish I woudln't have to shard manually.

0:52 somnium: I haven't experimented with that to much, but they have some utilities I think

0:53 alexyk: When it becomes multi-threaded, I wonder how clojure can be used to do the split/merge I described automatically. E.g. creating N cursors into the same collection at offsets...

0:53 somnium: concurrent reads will help a lot, writes will always lock the whole collection they say

0:53 alexyk: somnium: I write once, then just read. I can write derivatve results into new collections.

0:57 somnium: create size-of-db/num-of-cores futures maybe? It's not guaranteed to be in 1.1.4 unfortunately, but its scheduled

0:58 I expect clojure's STM will make it relatively painless

0:58 alexyk: looked at protocols -- smacks of OO to me! :)

0:59 I got tied up in Scala typesystem instead of doing work already once... :)

1:00 somnium: its kind of like a mix-in only compositional OO, very unique

1:00 I'm eager to see more examples of its use in the wild

1:02 alexyk: somnium: 100M twits done in 2800 secs, 13 GB max out of 20 GB allotted, not bad! :)

1:02 mongod load was 7% max

1:02 you're not banging hard enough on it :)

1:02 or it's the java driver

1:03 somnium: should it be higher?

1:03 have to ask the mongodevs

1:03 alexyk: somnium: I dunno... I like high % :)

1:04 I mean, if we read faster than it can serve, it should go to 100% CPU

1:04 somnium: its all c++ and they have to make concurrent

1:04 cark: well it's mostly doing io so i don't see why the processor would go crazy

1:05 i bet the bottleneck is your clojure processing

1:05 alexyk: cark: true

1:05 disk IO, forget 100%, 7% is good enough

1:06 cark: what's the charge on your java process ?

1:06 alexyk: cark: it was 100% CPU to 750% at some point

1:06 cark: there you go

1:07 that's _you_ not banging hard enough =P

1:07 alexyk: cark: my first 2 lines of clojure doing work :)

1:07 of 100 lines of scala before it

1:07 under the banner of "screw types"

1:08 cark: anyways don't worry about performances quite yet

1:08 just do what you want to do with this data

1:10 alexyk: cark: I have too much of it, so the test here was if clojure is up to it at all, with immutable maps and all that. Scala has mutable maps which I can update like Perl, almost, after doing all types right; I could use immutable ones, too, but it's easy to get the mutable ones, here I have to reduce over all data.

1:10 somnium: the real project is rewriting mongodb in clojure :p

1:10 alexyk: somnium: NO!

1:10 I need my json fast :)

1:11 technomancy: http://twitter.com/yukihiro_matz/status/5959547376 <= "I got to look into metadata in Clojure." (from Matz, of Ruby fame)

1:11 somnium: if the jvm propaganda is true, it should be equivalent to c++ in raw speed

1:12 alexyk: how do I sort a map of {int int} by value descending?

1:12 somnium: technomancy: that is awesome

1:12 cark: aldebrn: what do you want to sort, keys or values ?

1:12 hiredman: somnium: the place it should shine in long running backends

1:13 cark: err alexyk i mean

1:13 alexyk: cark: values

1:13 hiredman: because the jvm start up time can be ignored and the jvm has time to optimize

1:13 cark: well you don't sort a map ....

1:13 you may sort the values

1:13 alexyk: cark: I mean convert to tuples and sort those

1:13 as a vector

1:13 _mst: alexyk: looking at your original example, it seems that you could save a bit of GC overhead by reducing into a (transient {}) assuming it's all single-threaded

1:13 cark: (sort (vals my-map))

1:14 alexyk: cark: I need keys too

1:14 somnium: yeah, + I wonder what the codebase reduction size alone would be, no garbage-collection and manual locks ...

1:14 * somnium shivers

1:14 hiredman: ,(sort {:a 1 :b 2})

1:14 clojurebot: ([:a 1] [:b 2])

1:14 alexyk: _mst: just that, (transient {}) ?

1:15 hiredman: and descending?

1:15 hiredman: alexyk: reverse

1:15 alexyk: hiredman: cheating :)

1:15 cark: that's sorted by key then value hiredman

1:15 hiredman: cark: so?

1:16 cark: he wants sorted by value

1:16 _mst: http://paste.pocoo.org/show/153006/

1:16 hiredman: ,(sort-by (comp > val) {:a 1 :b 2})

1:16 clojurebot: ([:a 1] [:b 2])

1:16 hiredman: ,(sort-by (comp < val) {:a 1 :b 2})

1:16 clojurebot: ([:a 1] [:b 2])

1:16 _mst: something like that :)

1:16 hiredman: grrr

1:16 _mst: oh, without (get-twits)--my test version, sorry

1:16 hiredman: ,(doc sort-by)

1:16 clojurebot: "([keyfn coll] [keyfn comp coll]); Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator."

1:17 hiredman: ,(sort-by val > {:a 1 :b 2})

1:17 clojurebot: ([:b 2] [:a 1])

1:17 hiredman: ,(sort-by val < {:a 1 :b 2})

1:17 clojurebot: ([:a 1] [:b 2])

1:17 cark: ,(sort-by (comp < second) {:a 1 :b 2})

1:17 clojurebot: ([:a 1] [:b 2])

1:17 cark: ,(sort-by (comp > second) {:a 1 :b 2})

1:17 clojurebot: ([:a 1] [:b 2])

1:17 hiredman: forget the comp

1:18 alexyk: _mst: ah, so it's kinda reusing the map in a mutable way?

1:18 _mst: yep, building it up initially then making it persistent at the very end

1:19 cark: ,(sort (map (fn [[a b]] [b a]) {:a 1 :b 2}))

1:19 clojurebot: ([1 :a] [2 :b])

1:20 cark: ,(into (sorted-map) (map (fn [[a b]] [b a]) {:a 1 :b 2}))

1:20 clojurebot: {1 :a, 2 :b}

1:21 cark: that's better !

1:27 alexyk: cark: timings: 1st version: 52 sec , 2nd: 20 sec. Still *a lot* for just 7.5 million pairs!

1:28 I added reverse to both to get descending order

1:28 cark: well it's constructing a tree

1:28 alexyk: how do I flatten the map first into a vector of pairs?

1:28 cark: a map is a seq, so you may consider it flattened

1:29 somnium: ,(seq {:a 1 :b 2})

1:29 clojurebot: ([:a 1] [:b 2])

1:29 hiredman: woa

1:29 no

1:29 maps are not seqs

1:29 they are Sequable

1:29 cark: yeah sorry it's sequable !

1:29 hiredman: so most sequence functions call seq on their arguments

1:31 cark: i beleive sort uses java sort and copies everything in an array or something, so that would make it slow as well

1:32 did someone try making a merge sort in clojure ?

1:33 alexyk: (time (def us3 (sort #(> (%1 1) (%2 1)) (vec users)))) ; that's just 10 secs

1:35 cark: nice =)

1:35 alexyk: are vectors more suitable for sorting than lists?

1:36 cark: @def sort

1:36 pff how did that work again hiredman ?

1:37 hiredman: ~def sort

1:37 cark: thanks

1:37 hiredman: clojurebot: source sort

1:38 etc

1:38 alexyk: cute

1:38 cark: that last one is easy to remember

1:38 anyways you may test it with seq instead of vec

1:39 hiredman: hmmmm

1:40 cark: should be faster no ?

1:40 hiredman: you might look at doing some kind of in place quicksort with a transient vector

1:40 alexyk: hah: http://twitter.com/yukihiro_matz/status/5883125759

1:42 somnium: what happens if you send a potentially block action to agent with send instead of send-off?

1:42 rlb: somnium: you might block all the agent threads if you do it enough (I think)

1:43 cark: there is only a limited number of threads

1:43 somnium: ah, ok, send-off get its a dedicated thread

1:43 rlb: it's definitely not what you want to do.

1:43 somnium: send-off pulls from an expandable thread pool

1:43 alexyk: cark: seq is about the same is vec. if it's all sent off to Java, prolly doesn't matter much.

1:44 cark: vec does construct a vector, but it's very fast

2:04 defn: vec is faster than a seq

2:05 alexyk: What does Matz mean "more conservative"?

2:05 Maybe the word he was looking for was "slower"

2:06 alexyk: defn: probably)

2:06 how do I sort a vec in place with transient?

2:08 hiredman: don't know that there is anything existing for that

2:09 defn: any estimates on how long this will take: (time (reduce + (range 1 1000000000)))

2:10 hiredman: a long time

2:10 for future reference

2:11 ,1e8

2:11 clojurebot: 1.0E8

2:22 defn: how the hell do i compile my .clj file

2:22 hiredman: why?

2:23 anyway

2:23 defn: i dunno, my friend is giving me crap about using unix time versus (time)

2:23 hiredman: ~compile

2:23 clojurebot: the unit of compilation in clojure is the namespace. namespaces are compiled (not files). to compile a namspace the namespace needs to be on the classpath and so does ./classes/ (and the directory needs to exist) because clojure writes the class files to that directory. http://clojure.org/compilation

2:23 hiredman: defn: I fail to see what that has to do with compilation

2:24 defn: i need to run my clj file from the command line with `time`

2:24 $ time java myfile

2:24 hiredman: you can do that without compilation

2:24 defn: oh? how?

2:24 alexyk: _mst: indeed, your ! version did it in 1900 secs, instead of the original 2800 secs

2:24 hiredman: time java clojure.main file

2:25 cark: but then you're benchmarking compilation

2:25 hiredman: which does not take much time

2:25 cark: depends on the program =/

2:25 hiredman: unless you loading something complex, jvm startup time will drown out compile time

2:25 defn: (time (/ (* 1000000000 (inc 1000000000)) 2))

2:26 hiredman: you are

2:26 defn: that's what im compiling

2:26 hiredman: defn: that is dumb

2:26 defn: i agree

2:26 like i said, im humoring him

2:26 hiredman: so tell you friend to buzz off

2:26 your

2:26 defn: if i tell him to buzz off, im down to 1

2:26 lol

2:26 hiredman: and go fork a github project or start one

2:27 or ignore his jibs

2:27 cark: http://github.com/cark/clj-exe-jar

2:27 that's a sample executable jar project

2:30 defn: god my friend is annoying

2:30 this guy thinks C > * no matter what

2:31 hiredman: have you ever heard of fan death?

2:31 defn: no

2:31 what's that?

2:31 hiredman: http://en.wikipedia.org/wiki/Fan_death

2:32 a belief far stranger than "C > * no matter what" held by far more people

2:32 defn: haha

2:33 i mean i can see why he'd believe that and all, but it doesn't change the fact that his 600 lines of gruelingly optimized C will only match my 100 lines of clj

2:34 in short, this guy just absolutely despises it when he doesnt know something that someone else does, so he belittles it until he learns about it

2:34 it's really annoying

2:35 i try to humor him and explain things, but he has things condescending attitude towards things he doesn't grok

2:35 this*

2:36 i need to move, no one here gets it

2:37 hiredman: who is more silly, the man who throws pearls before swine? or the swine who ignore the pearls for their slop?

2:37 defn: the man

2:37 he knows better

2:38 or..was that rhetorical? :)

2:38 hiredman: I wasn't actually expecting an answer

2:38 defn: i mean, a pig ignoring some pearls seems plausible, an idiot throwing them in front of pigs, now that's silly

2:38 IMO

2:39 cark: i think your friend is right, c is the best language for a lot of things. clojure is best for other things

2:40 defn: yeah and ive totally offered that, but the difference is i know some C, and he knows nothing of clojure

2:40 he calls some of the things ive explained to him about clojure "magic"

2:40 cark: anyway why do you need to convert him ?

2:40 defn: "impossible", etc.

2:40 i dont

2:41 it's just discussion that comes up about projects we're working on, and he gets all "go more low level" on me

2:41 but he does this without any knowledge of clojure whatsoever

2:42 i think that's the main thing that aggravates me: he knows absolutely nothing about clojure and talks about it like he's an authority

2:42 cark: i can understand that point of view, it sometimes amaze me to see how much memory or cycles i'm using with higher level languages

2:42 then i think at developement time, and i feel better =)

2:43 defn: cark, yeah, i dont know, i wish you could have a conversation with the guy -- it's not so much the content of what he says, it's his lack of perspective that makes it all so suspect

2:43 cark: hehe i'd rather leave the guy to you =)

2:44 defn: haha *stab*

2:46 sorry for airing out the dirty laundry here, but this guy pisses me off when it comes to code, he thinks because he got his undergrad that he knows everything there is to know about CS, very arrogant with absolutely no public projects, no experience outside of his comfort zone, etc.

2:46 i think he's in for a rude awakening

2:46 s/think/hope ;)

2:47 cark: i don't think having public projects is a good measure of a programmer's worth

2:47 it only makes it visible

2:48 defn: i get the sense that he has no projects

2:48 other than critiquing other people's projects

2:49 cark, you're right to play devil's advocate, i am probably being too harsh, but i'm reminded of Alan Kay's quote:

2:49 Perspective is worth 80 IQ points.

2:49 cark: =)

2:52 defn: so cark, what's up?

2:52 how goes the clojue?

2:53 clojure*

2:53 cark: heh well currently doing the last touches to a clojure application that's already running at a customer's

2:53 still using 1.0

2:54 defn: nice. 1.1.0 is looking pretty promising

2:54 cark: i want new !

2:54 defn: what sort of app>

2:54 ?*

2:54 cark: that's a web app, talking to telephony equipment

2:55 and managing customer/agents/pricelists all that stuff

2:55 defn: like muxes?

2:55 cark: like voip switches

2:55 defn: ahhh

2:56 touchy stuff

2:56 SLA's and all of that

2:56 cark: pretty boring actually !

2:56 defn: yeah but if it goes down...

2:56 cark: hehe yes, we have lots of testing going on

2:56 defn: oh man, black friday

2:56 dont get me started

2:57 clients are losing their minds, conference bridges for 4-12hrs per day

2:57 massive testing, etc. to get ready for xmas

2:57 cark: mhh i'm pretty well insulated from end-users

2:58 i have the filter of my direct customer

2:58 he takes care of interaction with end-users

2:58 defn: *nod*

2:58 cark: that's very convenient believe me =)

2:59 defn: I am not so lucky -- living where I do I'm stuck providing support

2:59 Like I said before, I need to move...

2:59 are you W. coast?

3:00 cark: i'm from europe =)

3:00 defn: ah, wherabouts?

3:00 cark: belgium

3:00 defn: beautiful country

3:00 I visited there in 2003

3:00 cark: nice, where are you from ?

3:00 defn: The states, WI

3:00 cark: that's quite a trip !

3:01 defn: :)

3:01 Have laptop. Will travel.

3:01 http://en.wikipedia.org/wiki/Have_Gun_–_Will_Travel

3:01 cark: i've spent a couple months in texas working for a small telco

3:02 that remains a great memory

3:02 defn: where in TX?

3:03 cark: San Antonio, that year the spurrs won

3:03 defn: haha, Dennis Rodman!

3:03 cark: though i don't know a bit about basketball, it was fun to see the poeple go crazy =)

3:04 defn: that was what? 1997? 98?

3:04 cark: i'm not quite sure

3:04 was before 2000

3:04 defn: Do you guys still refer to telcos as PTTs?

3:05 cark: it has been a while since i heard that =)

3:05 defn: hehe

3:05 cark: we sy providers, carriers etc

3:05 say

3:05 defn: I worked with a German guy who refused to call them anything but PTTs

3:06 as if our teclos provided telegraph service

3:06 lol

3:06 telcos*

3:06 cark: erm well they did not so long ago

3:06 defn: yeah i think they stopped in the late 90s

3:06 but still, pretty ancient tech. :)

3:06 cark: hehe yes

3:06 i think we catched up tho

3:08 defn: sure you did!

3:08 cark: you know what, while in texas, i was working on a web site interfacing with telephony switches .... looks like i am time warping =/

3:09 defn: the infrastructure is there i suppose

3:09 it's easier now

3:09 that's for sure

3:10 cark: im' really not much in infrastructure/cable stuff. customer wants something i get it done, i'll never touch the telephony/networking stuff

3:11 defn: i get the firehose of alerts and alarming for all of the telephony/networking for my company

3:11 and need to develop monitoring systems to distribute that info appropriately

3:11 cark: ah man, that must be sometimes annoying

3:11 defn: very.

3:12 but it is rewarding also

3:12 cark: i changed direction when i first received a call on new year's eve

3:12 that day i decided it wouldn't do

3:12 defn: i will eventually move in a different direction

3:12 cark: ah sure when you save the day, it's very rewarding

3:13 defn: im slowly learning about concurrency and and parallelism and all of that business

3:13 my goal is to make that sort of thing my du jour

3:13 move away from the reactive stuff

3:13 and go more towards the proactive development side

3:13 that's where my passion is

3:14 cark: well there's always a reactive part, and pressure from customers and such

3:14 defn: parse 1,000,000,000 log entries in 10min, that sort of that

3:14 yeah im sick of that TBQH

3:14 cark: that never goes away =)

3:14 defn: our customers dont know how good they have it, i am frequently abused

3:15 what got you into the PTT stuff?

3:15 cark: man that's quite a story

3:16 i've always played with computer, and programming

3:16 but never thought about making it my job

3:16 my brother the same

3:16 one day some guy calls my brother and ask him to do a "quick software" for him

3:17 he says, i won't do that, talk to my brother ... i spent 10 years writing and perfecting that software

3:18 it sold quite well too =)

3:18 and there i was in the loop

3:18 defn: hehe, that is quite the story! :) I felt the same way when I realized I could make money from programming

3:19 I was studying music, guitar performance, jazz guitar, and then I realized that all of the time I wasn't playing guitar I was spending on my computer doing XYZ, tinkering

3:20 guitar is my love that should be protected from financial gain

3:20 and programming is my passion which ought to be exploited!

3:20 cark: hehe

3:21 then you have programmers that don't touch a computer excpet between 8:00 and 16:00

3:21 defn: come one, come all! exploit me!

3:21 yeah i dont understand that

3:21 and i never will

3:21 to me they are phonies

3:21 cark: or maybe we're monomaniacs =)

3:21 defn: hahaha

3:22 *maybe*

3:22 I mean, if you had to choose the person writing you software where you have an agreement with a client to guarantee 99.99% uptim

3:22 uptime*

3:23 would you want a 9am-5pm guy? or would you want a 24/7 guy?

3:23 it seems like a no brainer

3:23 cark: right, but what they want is not 99.99%

3:23 they want it cheap and for yesterday

3:24 unless you're working for google i guess

3:24 defn: that's a dilemma as well, I suppose

3:25 but even in that scenario, it is implied that 99.99% uptime is a requirement

3:25 AND that they wanted it yesterday, for free

3:25 cark: =)

3:25 there's the famous "cheap, quick, quality : pick 2 of these"

3:26 * defn writes that down

3:27 defn: sometimes you will meet someone with vision though

3:27 someone who has some long term vision who can justify spending more to get what he needs for 5 years

3:27 versus what he needs tomorrow

3:28 those are the good managers

3:28 cark: i had not much chance in that regard i guess

3:29 defn: ive had 2

3:29 they understood that what i did was important to me, and that i worked hard to make it good

3:30 and they told the customer to piss off when they rushed me

3:30 unfortunately it seems like those guys move around a lot

3:31 cark: i don't think that this is a good survivalbility skill for a manager these dys

3:31 days

3:32 it's all about quick time to market

3:33 anyways, it's time for me to go

3:33 good err nnight i guess

3:33 nice talking to you

3:35 defn: you too cark -- good night :)

7:07 esj: alright - too quiet in here. I'll ask a question: In the docs the performance of the collection datastructures is spec'd like "Vectors support access to items by index in log32N hops." Am I correct to understand that this is log_32(N), and not log(32*N), and that by hops we're talking about the lookup to go down a level in the trie ?

7:14 Chousuke: yeah, it's log_32

7:14 esj: thanks, this makes more sense now.

7:16 Ringding: I have a related question: given two huge trees which differ by exactly one element, is it possible to find this element efficiently?

7:17 I.e., can I access the trie's internal structure?

7:24 _ato: Ringding: that's an interesting idea

7:24 AWizzArd: Was suggested several times. Currently it is not decided how to output such information.

7:28 the-kenny: hm strange.. I have jsr166y.jar in my classpath, but if I do (import 'clojure.parallel), I get an exception.

7:29 ClassNotFound: jsr166y.forkjoin.ParallelArray

7:29 AWizzArd: Is this class in the .jar file? Can you check (System/getProperty "java.class.path") and see if it *really* includes this .jar?

7:31 the-kenny: AWizzArd: It's included in java.class.path. I'll have a look into the .jar..

7:31 hm.. I see no classfile for ParallelArray.

7:33 If I look at the source it's in /jsr166/src/extra166y

7:43 AWizzArd: the-kenny: maybe the .jar was not the right one? Perhaps there is a more complete version somewhere.

7:43 the-kenny: AWizzArd: hm.. It's the .jar mentioned on clojure.org

8:07 AWizzArd: Yesterday the NEW branch (git) was merged so that it now also includes the updates of the Master branch. Now when I compile (defn #^bytes foo [] ...) I get an error message that bytes is already defined in clojure.core.

8:07 How can I type hint that a function returns an array of (native) bytes?

8:07 the-kenny: AWizzArd: That should be #^bytes

8:08 AWizzArd: (defn #^bytes foo ...) is working for me.

8:08 AWizzArd: In the repl or in a .clj file?

8:09 ok, so I assume this error message comes from somewhere else

8:10 SergeyDidenko: hi. Could anybody suggest a shorter way to write (not( nil? arg))

8:11 the-kenny: AWizzArd: In a REPL

8:12 SergeyDidenko: oh, I see probably there is no such way, because it's nothing to gain in space

8:12 the-kenny: SergeyDidenko: Just arg? Or (boolean arg), if you want a boolean.

8:12 ,[(boolean 42) (boolean nil)]

8:12 clojurebot: [true false]

8:13 SergeyDidenko: thanks Kenny, I see

8:17 AWizzArd: seems that contribs http-agent is broken

8:18 yup

8:18 it defines the function bytes which now was introduced into core

8:29 the-kenny: AWizzArd: I think that has been fixed in one of the latest commits to contrib

8:29 AWizzArd: Ha! http://github.com/richhickey/clojure-contrib/commit/5055f41c8bc99747392396d622f17f723470858e

8:34 AWizzArd: the-kenny: yes, that fix makes http-agent compile. But when you (use http-agent) in your ns then you will also have to exclude bytes.

8:38 chouser: AWizzArd: don't 'use' namespaces :-P

8:39 at least not without listing the specific vars you want to bring in

8:43 the-kenny: (use [clojure.contrib.http-agent :as hagent]) :)

8:43 Chousuke: the-kenny: I think in that case you're supposed to use require :P

8:47 the-kenny: Heh, ok

8:47 I have to go to school now... second time today ;) I'll be back later

8:50 AWizzArd: chouser: often I require them. It just sometimes is more convenient to simply use a ns.

9:02 chouser: seems more convenenient, but it's a lie. :-)

10:44 ambient: so if i want to have an up to date Clojure dev environment in emacs, is there a list anywhere what do I need? swank-clojure-project... what else?

10:44 it's a bit hard to keep up with all new stuff

10:45 the-kenny: ambient: clojure-mode is helpful too ;)

10:45 ambient: yeah, i know that one too :P

10:45 the-kenny: ambient: swank-clojure and clojure-mode is enough... I don't know if there is anything else. (But I never searched for more)

10:45 ambient: integrating all the pieces together is what's hard

10:46 because there are so many ways that how things are, they could be done in a more convenient manner, and I bet somebody has already done that, but it's somewhere deep inside the web where I can't find it

10:46 there's no reason that starting a new project and loading third-party libraries should be so difficult

10:47 perhaps what I'm asking is hand-holding so I digress and will dig some more

10:48 usually the answer to a question is as good as the question and my question is very vague :)

10:49 hoeck: ambient: if you're on windows, you can try clojurebox, and then replace the installed packages with newer ones from github or so

10:49 ambient: currently on ubuntu 9.10, the drivers actually work now and I'm exstatic :)

10:50 i installed with emacs-starter-kit and swank-clojure

10:50 but how to manage my libraries and projects, that's whole another thing

10:50 the-kenny: ambient: Just check out one or two clojure projects on github.

10:51 hoeck: ambient: yeah, at home I'm on Ubuntu too and I was amazed that everything (including suspend to ram) worked out of the box : )

10:51 Chousuke: well, there's the build tool leiningen, which probably works well with swank-clojure-project as they're written by the same person :P

10:51 though I'm not sure if there's any real integration yet.

10:51 ambient: the-kenny: well i've already done that, installed and even used penumbra. it's just the management and convenience, letting the computer do the boring stuff for me

11:06 Ringding: the-kenny: I've setup my Emacs/Clojure environment last week and found that all tutorials and HOWTOs out there did not work...

11:07 I've got a running setup now, but it took a lot more time than I had expected

11:07 Oh sorry, I meant ambient

11:07 ambient: have you documented any of your work?

11:08 Ringding: Unfortunately, I have to leave now. Will be back in ~15 hours

11:08 ambient, sorry, no

11:08 ambient: heh, ok

11:08 Ringding: I can jot it down for you if you're patient till tomorrow :)

11:09 ambient: i just need the final steps

11:09 i already know how to install the bare essentials

11:35 churib: stupid beginner question: why doesnt (deref (future (println "hello"))) prints anything?

11:35 ambient: ,(print "foo")

11:36 clojurebot: foo

11:36 ambient: hmm

11:36 print should return nil

11:36 churib: yeah, thats printed at the repl, but no "hello"

11:37 ambient: ,(deref (future "foo"))

11:37 clojurebot: "foo"

11:38 krumholt_: churib, do u use emacs?

11:38 churib: yes

11:38 krumholt_: churib, look in the *inferior-lisp* buffer

11:38 the hello should be there

11:39 churib: aah, there it is

11:39 wow, thanks!

11:39 krumholt_: churib, np

11:40 AWizzArd: How can I type hint the return type String[] ?

11:41 krumholt_: AWizzArd, i think you can't because String is not primitie, but i might be wrong

11:42 primitie = primitiv

11:44 Chousuke: hmm

11:44 ,(make-array String 0)

11:44 clojurebot: #<String[] [Ljava.lang.String;@bea6af>

11:45 Chousuke: so use #^"[Ljava.lang.String"

12:11 qed: I had a dream about clojure last night, something about #^

12:12 dysinger: I had a dream about clojure too - only I was just up at 3am writing code - oh wait - that was work

12:12 qed: lol

12:47 ambient: when i try swank-clojure-project and input the correct project root with correct directory structure it just spams message "Polling "/tmp/slime.11785".. (Abort with 'M-x slime-abort-connection'.)" and nothing seems to happen :\

12:49 the-kenny: ambient: Take a look at *inferior lisp*.

12:49 That mostly means that swank-clojure has failed to start

12:49 ambient: no class found: clojure/main

12:50 the-kenny: Oh, and you can stop the polling with M-x slime-abort-connection

12:50 ambient: Looks like clojure.jar isn't in your classpath ;)

12:51 ambient: one would think that swank-clojure knows where to find it because it's in .swank-clojure and it automatically installed them all

12:51 the-kenny: swank-clojure is hard to install, yes, but it gets better with every release.

12:53 ambient: if i manually created my project with maven it would perhaps be easier to attach swank-clojure into that?

12:53 the-kenny: Yes, I use this alot

12:53 Knekk: cd /var/www/virtual/jorge.hotoldermale.com/app

12:53 err

12:53 haha

12:53 the-kenny: Just make sure the files for swank-clojure are in the classpath

12:54 then (require 'swank.swank) (swank.swank/start-server "/tmp/swankport" :port 4242) and do a M-x slime connect

12:54 M-x slime-connect

12:55 Knekk: sorry about that

12:55 the-kenny: If you supply :dont-close true to start-server you can connect with multiple repls from emacs

12:56 ambient: thanks, i shall try that

13:49 alexyk: what does @ mean in: (@shelves shelf-name) ?

13:50 the-kenny: alexyk: it's a synonym for deref

13:50 Used by agents, refs etc.

13:50 esj: probably that @shelves is an atom or such being deref'd

13:50 to a map

13:50 alexyk: a ok

14:36 dysinger: ambient:

14:37 if your project was started with maven - just run "mvn depenency:copy-dependencies" and restart swank-clojure-project

14:37 we have swank setup to look for jars in target/dependency

14:38 "mvn dependency:copy-dependencies"

14:38 typo 1st time

16:15 hiredman: lisppaste8: url?

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

16:16 hiredman pasted "fn minus" at http://paste.lisp.org/display/91148

16:50 miltonsilva: Hi

16:51 jevgeni: hello. just wonder - is there a possibility to do reversible debugging with clojure?

16:52 miltonsilva: is it possible to do something like (defmethod xxx "/join" [] (println "joining")) and what fn would I pass to the multimethod ?

16:54 ordnungswidrig: miltonsilva: you whant to dispatch on the string value?

16:54 miltonsilva: exactly

16:58 I could map the strings to keywords.. but that would defeat the purpose.. what I what is to dispatch on value without adding unecessary code, but I have no idea what fn I would put in the multimethod in order to achieve that

16:58 ordnungswidrig: miltonsilva: i'll pastebin sth

17:02 lisppaste8: ordnungswidrig pasted "multimethod dispatch on value" at http://paste.lisp.org/display/91150

17:02 ordnungswidrig: miltonsilva: there you go

17:02 http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples/Multimethod

17:04 miltonsilva: thanks (to late)

17:05 qed: hmmm

17:06 ((read-json (PushbackReader. (InputStreamReader. (get-stream)))) "text")

17:06 how do i turn this into a lazy-seq?

17:07 This gets one tweet from the twitter stream, I want to (take n coll) from it, which I am guessing will require making it a lazy-seq

17:09 hiredman: making it a lazy seq like that would be pretty horrible

17:10 a single http connection per tweet

17:11 qed: (take 5 (lazy-seq (repeatedly #((read-json (PushbackReader. (InputStreamReader. (get-stream)))) "text")))) would work, but yeah, you're right, this ain't gonna work the way it currently stands

17:11 hiredman: dmesg

17:12 qed: the unix application?

17:14 miltonsilva: :( I still dont know how to dispatch on string values... there is no coerce to string :p

17:23 qed: hiredman: not sure i see what you're getting at with "dmesg"

17:27 ordnungswidrig: re

17:28 miltonsilva: ordnungswidrig: thanks but I still don't know how to dispatch on string values

17:28 ordnungswidrig: is there a way to alias a namespace like (ns (:require x [foo :as bar])) does?

17:28 miltonsilva: so it didn't work for you?

17:29 miltonsilva: ordnungswidrig: it works.. just not for strings for ints you put int chars.. char etc... but strings :S

17:29 ordnungswidrig: saw my example at paste.lisp.org ?

17:29 _ato: eh?

17:30 why would you ints or chars to dispatch with?

17:30 * ordnungswidrig is confused

17:30 hiredman: qed: wrong window

17:30 miltonsilva: I would like to dispatch on strings for the sole reason of not doing (cond etc etc etc )

17:32 _ato: right... but what does coercion have to do with it? You don't have to coerce anything to use a multimethod

17:33 lisppaste8: ordnungswidrig annotated #91150 "add missing defmulti" at http://paste.lisp.org/display/91150#1

17:33 miltonsilva: I know hence the :p what I would like is something like (defmulti tes str)

17:33 ordnungswidrig: lisppaste8: there you go

17:33 miltonsilva: argh. the paste was for you

17:33 miltonsilva: yes thats what I need thank you very much

17:36 ordnungswidrig: miltonsilva: I think you where confused by the pattern to use "int" to dispath on integer values like the fib example does

17:36 Guest15038: Hi there, i'm trying to do an http request that requires http authentification

17:36 what would be the best way to do that with clojure ?

17:37 miltonsilva: ordnungswidrig: one more question the fn this code passes to defmulti return the same value it receives... it seem a bit counter intuitive

17:37 _ato: miltonsilva: it returns the first value it receives

17:37 assuming that's the one you want to dispatch on

17:37 if you wanted to dispatch on the second arg you could make it return the second arg it receives

17:37 etc

17:38 if there's only one arg to your methods then you could just use "identity" instead of that functin

17:39 lpetit: Hi

17:39 ordnungswidrig: hi

17:39 lpetit: Where is it specified in the docs that the regexp pattern literal syntax does not need to double anti-slashes ?

17:40 _ato: Guest15038: I'd first try doing: http://user:pass@host/path

17:40 Guest15038: oh :( i didn't even know this could work with http

17:40 the-kenny: Guest15038: Wait, I gave some sample cod

17:40 Guest15038: thank you very much gonna test that

17:41 the-kenny: Guest15038: http://gist.github.com/243175 That's an example for twitter. The interesting part is the .setRequestProperty

17:41 qed: http://gist.github.com/243698 : Could anyone give me a hint as to how I can treat the stream of tweets as a lazy-seq?

17:41 the-kenny: is it you that gave me this code? :)

17:41 the-kenny: There is another way to identify with HttpUrlConnection through java.net.Authenticator, useful if you don't have direct access to the connection-object

17:42 qed: Yesterday? Yes

17:42 qed: hehe, im playing with it now, see comment above

17:42 Guest15038: the-kenny: well i kind of hoped i could get away with http.agent in clojure contrib, and not use any java stuff directly

17:42 taking a look at your code thank you very much

17:43 the-kenny: qed: I don't know, sorry.

17:44 Guest15038: nice it looks quite simple

17:44 qed: the-kenny: ah, bummer, right now that line 24 works, but it creates 5 separate http connections i think

17:44 the-kenny: Guest15038: Yes, looks like you can get away with http.agent

17:44 _ato: qed: they're what one per line right?

17:44 the-kenny: Guest15038: Take a look at the doc of the function http-agent, there is a parameter :headers

17:45 qed: _ato: the "tweets"?

17:45 the-kenny: Guest15038: Identifying in http isn't more than just a header

17:45 _ato: yeah

17:45 the-kenny: _ato: Yes, one tweet per line

17:45 _ato: (take 5 (map read-json (line-seq (PushbackReader. (InputStreamReader. (get-stream)))) "text"))

17:45 qed: ((read-json (PushbackReader. (InputStreamReader. (get-stream)))) "text") -- That gives me the text of what someone wrong in their tweet for one tweet

17:45 ahhhhh!

17:46 _ato: or does read-json not work from a string?

17:46 qed: it does work from a string

17:46 ,(doc read-json)

17:46 clojurebot: "clojure.contrib.json.read/read-json;[[] [s] [stream eof-error? eof-value]]; Read one JSON record from s, which may be a String or a java.io.PushbackReader."

17:46 Guest15038: the-kenny : thanks it seems to be working :)

17:46 with http.agent

17:46 i'm so lost when it comes to http, didn't even know authentication was a header

17:47 the-kenny: Guest15038: You're welcome :)

17:48 _ato: also since you're pulling duck-utils you could probably cleanup the ugly reader stuff too: (take 5 (map read-json (line-seq (reader (get-stream)))))

17:48 or some such

17:48 the-kenny: _ato: It's a continuous stream which doesn't end (except for maintenance etc)

17:49 Oh wait.. forget what I've said

17:49 hiredman: _ato: that won't work

17:49 qed: it does work

17:50 hiredman: _ato: that may or may not working depending on the format of the json you recieve

17:50 _ato: hiredman: it's one {...} per line

17:50 it's not a json list

17:50 qed: I keep getting 401s

17:51 the-kenny: qed: You have to enter your twitter username and password ;)

17:51 qed: haha yes

17:51 hiredman: _ato: sure, for this particular instance, but you are depending on being serverd not just valid json, but valid json in a particular format

17:51 qed: it will work one time, and continue to work for a minute, and then it will start giving me 401s

17:51 hiredman: qed: twitter only allows a certain number of api requests per hour

17:52 or something, I forget exactly

17:52 _ato: "Each account may create only one standing connection to the Streaming API. Subsequent connections from the same account may cause previously established connections to be disconnected. Excessive connection attempts, regardless of success, will result in an automatic and temporary ban of the client's IP address."

17:52 hiredman: you need to batch your queries

17:52 _ato: so a good thing you're not doing that one connection per tweet thing anymore :p

17:52 qed: hahaha

17:53 the-kenny: hiredman: He's using a new feature of the api, a continously open stream where the server "pushes" new tweets. He doesn't do real "queries"

17:54 qed: well, when i create a connection im querying

17:54 so all my testing is what's causing the problem

17:54 not the number of tweets i take in a given connection

17:55 the-kenny: hm.. I never had problems during early testing

17:56 qed: _ato thanks for the java cleanup

18:01 the-kenny: qed: Your defn on Github, right?

18:03 qed: yessir

18:03 the-kenny: qed: Is this your real twitter password in your gist?

18:04 qed: annddd deleted

18:05 you can post as me if you like, the-kenny, lol

18:05 ordnungswidrig: qed: you'd better change your password, not :-)

18:05 s/not/now/

18:05 qed: or your account will be sold on eBay...

18:05 the-kenny: qed: heh, I won't do something like this

18:06 qed: lol, im not too worried about my twitter pass

18:06 but thanks for telling me :)

18:07 (defn take-tweets [#^int n]

18:07 is that a valid type hint?

18:07 ordnungswidrig: qed: someone who pastes ones password on a ghist is suspect of using the same password everywhere ;-)

18:07 qed: ordnungswidrig: lol, i invite you to find out where else that pass is used :)

18:08 the-kenny: qed: Can I try too? :)

18:08 Chousuke: qed: functions can't have primitive arguments

18:08 they're always boxed

18:08 qed: Chousuke: so would I even use a type hint there?

18:09 Chousuke: probably not

18:09 qed: if it was #^Integer that'd be different though, yes?

18:09 _ato: qed: there's not much point using a type hint there, connecting to the server etc is going to much slower

18:09 Chousuke: maybe if you call some methods of Integer you can typehint it as #^Integer

18:09 ordnungswidrig: from time to time I thought of a service that will check _all_ web services for a given user / pw combination. I was a lazy boy, too, and I'm sure there a some i-forgot-about services where my former default user/pw combination would work.

18:09 Chousuke: but I doubt it's going to make a difference:P

18:09 qed: k, I was sort of under the assumption that it was good practice

18:10 but i guess clojure then needs to find out where I use that variable in my fn every time i call it

18:10 _ato: it's good practice to only do it when necessary (or when you get a warning from *warn-on-reflection*)

18:10 most of the time type hints aren't going to make the slightest bit of difference

18:10 qed: ordnungswidrig: there's a service out there like that

18:10 IIRC

18:10 the-kenny: qed: I think it's a bit ugly sometimes... I try to avoid it. However, I had one point in my code where I was forced to use it

18:10 ordnungswidrig: qed: you name it?

18:11 qed: its been awhile, it basically checks a bunch of services for a valid login, cant remember the pass :\

18:11 errr if it does pass

18:12 but no i dont remember the name

18:12 itd be real evil if they did it for bank accounts :)

18:12 Chousuke: hmm :P

18:13 ordnungswidrig: qed: hehe, as long as the use their account number and not the same username

18:13 qed: haha sure

18:13 Chousuke: my bank account password is actually pretty weak but you wouldn't be able to log in even if you knew it.

18:13 qed: yeah my bank has little questions you have to answer

18:13 Chousuke: or well, you could but all you could do is look at my saldo ;(

18:14 qed: i once forgot my password and they wanted me to recite my secret phrase

18:14 Chousuke: which is not very impressive.

18:14 ordnungswidrig: after the last leaks of customer data with bank account numbers, birthday and so on I'm sure there is abuse

18:14 qed: at my cell phone provide I need a customer password. It makes the people laugh every time. I thought it was for web only.

18:14 qed: my secret phrase was: inside-out cocoons in a monsoon filled with baboons bending silver spoons

18:15 Chousuke: Most banks here use a key card. they give you a number and you look up the corresponding one on the key card.

18:15 ordnungswidrig: qed: +1

18:15 qed: i got about halfway and she's liek "OKAY OKAY"

18:15 lol

18:15 the-kenny: My bank here forces everyone to use a 5 letter password for online banking.

18:15 ordnungswidrig: qed: I wonder that the cobol application was able to store such long value

18:15 qed: for a passphrase

18:15 qed: haha

18:15 Chousuke: the-kenny: anything besides that though?

18:15 the-kenny: because username/password is *not* enough for online banking

18:16 it's too weak.

18:16 ordnungswidrig: I like the mobile tan (sms) transaction authorization

18:16 qed: agreed

18:16 ordnungswidrig: It's the sth you know + sth you have thing.

18:16 the-kenny: Chousuke: They use pin/tan if you're logged in etc... but for logging in there is just username/password. (I'm in Germany)

18:16 _ato: most banks here SMS you with a code to confirm any transaction and some of them you can apply for a code generator dongle thing

18:16 yah

18:16 qed: i wonder if anywhere that delivers food is open on thanksgiving...

18:17 ordnungswidrig: qed: anywhere in germany for sure

18:17 Chousuke: my bank uses username/password + one time password

18:17 qed: haha ordnungswidrig

18:17 ordnungswidrig: Chousuke: paper otp?

18:17 qed: Chousuke: RSA?

18:17 Chousuke: ordnungswidrig: a key card kind of thing.

18:18 qed: ive never seen those

18:18 ordnungswidrig: qed: I think the only delivery turkeys, right?

18:18 qed: it looks like that's the case

18:18 Chousuke: ordnungswidrig: the bank application asks for a password corresponding to a certain index and you look it up on the card, type it in then it's used up

18:18 ordnungswidrig: qed: paypal did send RSA tokens for shipping cost about 2 years ago. never used it but it still keeps generating numbers.

18:19 qed: really? that's pretty cool

18:19 those keys arent that cheap

18:19 ordnungswidrig: Chousuke: that's the standard tan method in germany. I think it's call I-Tan (for indexed TAN)

18:19 qed: IIRC

18:19 Chousuke: ordnungswidrig: yeah. I think it's a fairly good system

18:20 qed: i think they're about 50$

18:20 ordnungswidrig: qed: a quick google told me they tokens would be about 60 USD per User.

18:20 qed: :)

18:20 qed: still, not very cheap for what they do

18:21 ordnungswidrig: qed: I think the process at the manufacturer and keeping the secret think secret it what makes the price. The hardware will be some dollars, I suppose.

18:21 qed: so, while we're talking about things i lug around at work all day (RSA Fob), i recently found out my boss had an RFID tag implanted into the skin between his thumb and index finger

18:22 ordnungswidrig: qed: scary. How did you find out? Are you wardriving on RFIDs?

18:22 _ato: does that mean he has to wear tin foil gloves all the time to prevent being tracked? ;-)

18:23 ordnungswidrig: ha ha

18:23 qed: hahaha nah, a guy i work with who has been there longer told me about it, and i looked it up, and it's apparently not that uncommon, well, i mean, he's not the only one, it's DEFINITELY uncommon

18:23 you go to a tatoo parlor where they do ball bearings in your arm, and wear stuff like that

18:23 and you get them to wrap it in some medical coating, and pop it in

18:24 ordnungswidrig: qed: but why? Ball bearings I can understand, but RFID?

18:24 qed: you can put stuff on it i guess, like store a tiny bit of data IIRC

18:24 he set it up to act as his badge

18:24 ordnungswidrig: but why :-)

18:25 qed: so he waves his hand in front of our card scanners, and walks in

18:25 ordnungswidrig: better they steal my card than my hand, I think.

18:25 qed: haha

18:25 idk, it's the only sort of tatoo i think id be up for

18:26 it'd definitely solidify my nerdiness, if that hasnt been done already

18:26 the-kenny: Yeah, it's pretty cool.

18:26 ordnungswidrig: qed: but only in combination with a pin code. and a second card you can hand out to a robber

18:26 qed: i think qed as a nick, hanging out in #clojure pretty much sealed the deal

18:26 ordnungswidrig: #clojure is nerdy?

18:26 qed: :X

18:27 i should qualify that i dont buy into that crap about nerd vs geek terminology, i use them both interchangeably, and with pride

18:28 ordnungswidrig: hmm, what if your boss changes the job. can his token be used at the new job or will he have to get another one :-)

18:28 the-kenny: ordnungswidrig: Aren't these chips writable?

18:29 _ato: I dunno, I'm only getting implants when they actually do something useful like IRC

18:29 Oh wait... that's probably not useful

18:29 ordnungswidrig: the-kenny: if they talk the same protocol

18:29 qed: yeah you can write it

18:29 _ato: You may as well just get a ring with an RFID tag in it instead of sticking it in your hand with chance of infection etc

18:29 qed: now there's an idea

18:29 ordnungswidrig: _ato: that sounds nice.

18:30 ringfid

18:30 qed: it has to be a cool looking ring though

18:30 the-kenny: http://xkcd.com/644/ :)

18:30 ordnungswidrig: one ring to identify them...

18:30 the-kenny: :-)

18:30 qed: i think this is probably what my boss got http://www.hvwtech.com/products_view.asp?ProductID=605&utm_source=Google&utm_medium=Product+Search&utm_campaign=Product+Search+(Nov09)

18:30 something like that

18:31 ordnungswidrig: * Not a medical tag – not for implanted use in humans or animals

18:31 qed: if it broke that would /suck/

18:32 ordnungswidrig: there exist injectable rfid tags for animals

18:33 qed: ahhh yeah, good point

18:33 _ato: yeah, it's quite common here to get pets tagged in case they lose their collar and someone finds them

18:33 qed: but umm, i doubt there are strict standards for rfids injected into pigs

18:34 i suppose if we're chopping our animal's genitalia off, we may as well implant them with gadgetry as well

18:34 _ato: http://www.flickr.com/photos/nadya/54670483/

18:34 qed: i want my cat to hum 2600

18:35 the-kenny: That's a fairly big needle in my opinion

18:36 qed: i dont see what the concern is with privacy for rfid, there are so many ways to disrupt something like that

18:36 _ato: ahh.. here we go, a video of tag being injected into someones hand: http://www.youtube.com/watch?v=mr0ozY2HWdM

18:37 qed: http://www.youtube.com/watch?v=fhOSV84RbVk&NR=1

18:37 next step, heroin

18:37 "My First Self-Injection"

18:38 _ato: yeah, I hit up with 5 RFID tags a day

18:38 qed: lol

18:38 tie the belt around my bicep

18:38 time to get my fix

18:39 the-kenny: It'd be funny if you get the tag into a vene... "Wait, I have to search where it is now..."

18:39 s/vene/vein/

18:39 qed: yeah that'd be awesome until it gets stuck in your heart

18:39 ordnungswidrig: the-kenny: lol

18:40 http://www.youtube.com/watch?v=vsk6dJr4wps

18:40 the self-injection variant.

18:41 qed: http://www.youtube.com/watch?v=TcPOLRAfQOA&feature=related

18:41 hahahaha

18:41 ExxonMobil Speedpass using his implant

18:47 ordnungswidrig: will sleep now. hibernate or like that. cu tomorrow

22:32 burny: Any clue's on how I can fix this stackoverflow, I think I need to make the evaulation lazy?

22:32 http://pastie.org/716780

22:33 cark: use recur

22:34 in the if : (recur (functor ...))

22:38 err (recur (/ iu 2) ...

22:38 and (recur (+ (* ....

22:38 burny: gotcha

22:40 hiredman: no coments on fn minus (http://paste.lisp.org/display/91148) all day

22:41 cark: huh what's this thing ?

22:44 hiredman: it's a fn replacement built on deftype

22:44 well, fn*

22:44 cark: but what's the goal ?

22:45 lisppaste8: hiredman annotated #91148 "add ignored symbols" at http://paste.lisp.org/display/91148#1

22:46 hiredman: cark: well, there is no goal per se

22:46 the fn stuff is currently in written in java

22:46 cark: did you check performances of this version ?

22:46 hiredman: nope

22:47 it was just something that popped into my head when I woke up this morning

22:48 cark: there is a bunch of missing ancestors tho

22:49 hiredman: cark: yeah, Callable and Runnable are the main ones

22:49 but that's easily done

22:49 you want to replicate all of AFn

22:50 cark: clojure in clojure ... =)

22:50 hiredman: exactly

22:51 AFn could be a protocol

22:51 cd

22:56 notallama: hiredman: i was just looking at that hydra thing you pasted. how does that "future" part work? it looks like it throws away the value.

22:57 hiredman: notallama: the future part just spins up another thread that takes care of moving values from the input queue to the output queues

22:57 I think there is an extra delay in the imlementation on lisppaste

22:58 JAS415: oh cool

22:58 so fn- holds onto the source

22:58 hiredman: oh yeah

22:58 I forgot about that part

22:59 notallama: ah yes, i now see what future actually does. i thought it did the body the first time it was deref'd.

23:04 JAS415: i figured out how to combine yaws and clojure :-D

23:04 need to write some macros or something now

Logging service provided by n01se.net