#clojure logs

2010-11-05

00:18rata_good night :)
00:26quilehey any recommendations for clojure lib to send tweets?
00:30amalloyquile: http://www.lmgtfy.com/?q=clojure+twitter+library
00:30quileuh, i asked for recommendations, you know, like personal opinions.
00:30cemerickamalloy: wiseass :-P
00:31quilegood way to put off n00bs
00:31rdeshpandehey guys
00:31rdeshpandenewbie question: (reduce (fn [mymap [k v]] (assoc mymap k v)) {} (map vector [1,2,3] [4,5,6]))
00:32rdeshpandehwo does mymap get assigned?
00:32rdeshpandeoh nevermind
00:32cemerickrdeshpande: assigned? It's an argument going into the fn being used in the reduce…
00:32rdeshpandejust reread the reduce docs
00:33rdeshpandedidnt' stick the first time :/
00:33Raynescemerick: I think he just wanted to use sexpbot's lmgtfy you plugin.
00:33Raynesquile: There is clojure-twitter.
00:33Raynes$google sexpbot-twitter
00:33sexpbotFirst out of 32 results is: ivey's sexpbot-twitter at master - GitHub
00:33sexpbothttp://github.com/ivey/sexpbot-twitter/tree/
00:34RaynesThat's a sexpbot plugin that ivey wrote for sending tweets from sexpbot. Might be a nice example of doing what you want to do.
00:34RaynesAnd some shameless self-promotion. <3
00:34cemerickRaynes: Sure, I was just poking at amalloy. He's good people. :-)
00:34RaynesHe sure is. <3
00:34quileRaynes: yes, i found it on clojars; just seems overkill for what i need... just need to send a tweet from a bot
00:34cemerickquile: It's hard to beat #clojure's noob-friendliness IMO, if you want to put it that way.
00:34amalloyrdeshpande: by the way, i assume you're practicing either reduce or assoc, but you could do the same thing with conj: &|(reduce conj {} (map vector [1,2,3] [4,5,6]))|&
00:34sexpbot⟹ {3 6, 2 5, 1 4}
00:35iveyclojure-twitter is pretty easy to use
00:35quilecemerick: yeah for the most part it seems to be, i just have little patience for snide remarks
00:35iveyquile: and now that you need oauth to send tweets ... you don't want to do oauth by hand
00:35rdeshpandeamalloy: ah cool. working through labrepl right now
00:35Raynesquiesce: You could probably get by using the API directly, but either way, you're going to need a JSON parser and a http client.
00:35quileivey: thanks for the tip
00:35cemerickquile: *shrug* I wouldn't read too much into a lmgtfy link. :-)
00:35RaynesBut yeah, oauth is oh mah gawd.
00:36quiesceI'll assume that was a tab-error and move on.
00:36quileRaynes: hell yes
00:36Raynesquile: I assure you, he loves you very much.
00:36quilehahaha nice
00:36Raynesquiesce: Yes, it was. Sorry.
00:37amalloylmgtfy is a bad habit :P
00:38Raynesamalloy: Also, if you want a bug to fix, I don't think the lmgtfy command encodes URLs properly.
00:38Raynes$lmgtfy *##@$!@~$!`@
00:38sexpbothttp://www.lmgtfy.com/?q=*##@$!@~$!`@
00:39amalloyRaynes: the doc could use a tweak too - i assumed it meant @nick, not @ nick
00:39RaynesProbably.
00:39RaynesI haven't touched that plugin in at least 30 years.
00:39cemerickamalloy: a critical weapon in more…uncivilized arenas. ;-)
01:34LauJensenMorning all
01:44cemerickLauJensen: good night :-)
01:44LauJensenNight :)
03:10ppppaulheeeeeeeeeeeeeeeey
03:10ppppaulanyone awake?
03:11seancorfieldi am
03:11seancorfieldbarely
03:12seancorfieldhey kumarshantanu
03:12kumarshantanuseancorfield: hi
03:13ppppauli'm trying to set up emacs to use clojure
03:14seancorfieldkumarshantanu: where are you based? google suggests bangalore but i wanted to ask :)
03:14kumarshantanuseancorfield: I am at Bangalore
03:14seancorfieldpppaul: i've tried emacs a couple of times but i just can't get on with it :(
03:14ppppauli installed clojure from the ubuntu repo, and i would like to know how do i find what a var in bash points to?
03:14seancorfieldkumarshantanu: ok, same place as macromedia's teams (i worked for macromedia)
03:14seancorfieldadobe has their teams in noida
03:15ppppaul'clojure' is a symbol on my system, but i would like to find out what it's pointing to
03:15kumarshantanuseancorfield: Adobe has offices at Noida and Bangalore, yes
03:15seancorfieldi almost got to bangalore when i was their senior IT architect...
03:16ppppauli have clojure running on emacs, the learning curve is a bit high, but i feel that the more i learn, the more useful i'm finding emacs to be
03:16seancorfieldi'm using eclipse + ccw
03:16seancorfieldand leiningen from the command line
03:16kumarshantanuseancorfield: so I guess that where your ColdFusion linkage came from? you seem to be working a lot in CF
03:17seancorfieldyeah, i was a C++ / Java guy when i joined macr... then they bought allr... and i created a team to rewrite macromedia.com... and was told to use cfml
03:18kumarshantanuseancorfield: cool
03:18seancorfieldit's one of the original scripting languages for the jvm... but most folks just know about the proprietary c++ version allaire had
03:19seancorfieldand now i work with railo which is a jboss project that provides a free open source cfml engine on the jvm
03:19seancorfieldso i'm using clojure + cfml on railo / tomcat
03:19amalloyppppaul: what do you mean, a var in bash?
03:19kumarshantanuseancorfield: I saw Railo
03:20ppppaulwhen i'm in bash, i type in 'clojure' and it runs a script or something.... i don't know what it's doing
03:20ppppauli'm just calling 'clojure' a var
03:20seancorfieldnearly half past midnight here so i must head to bed... laters
03:20ppppauli don't know the terminology
03:20amalloyah
03:20amalloyclojure is a command on your PATH
03:20amalloyyou can find out where it is on the filesystem with "which clojure"
03:20kumarshantanuseancorfield: sure, good night
03:20ppppaulthanks
03:21ppppaulthank you soooo much!
03:22ppppaulnow i can figure out how to get my 'clj' script to work... i hope
03:33amalloyppppaul: good luck. i'm off to bed
03:49ppppaulwoot! clojure is completely working in emacs now
03:50coldheadaww
03:51ppppaulthe repo for ubuntu doesn't work properly (classpath isn't set up for contrib)
03:53samxhow would you add two arrays together element wise ? That is, (array+ [1 2] [3 4]) => [4 6] ? I can come up with a small function to do that, but just wondering if there's some higher order function in the standard libraries that would make it trivial.
03:55Raynes&(map + [1 2] [3 4])
03:55sexpbot⟹ (4 6)
03:55ppppaulthat doesn't make sense to me
03:56samxthat sounds good :-) thx
03:56ppppaul&(map + [1 2])
03:56sexpbot⟹ (1 2)
03:56ppppauloh, now it makes sense
03:56ppppaulmaybe i should go to sleep
03:57coldheadnever sleep
03:57coldheadsleep is the enemy
03:57ppppaul&(apply [1 2] +)
03:57sexpbotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$_PLUS_
03:58ppppauli still sorta don't understand what map is doing in the above code
03:59ppppaul(doc map)
03:59clojurebot"([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]); Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments."
03:59ppppaulok, now i get it
04:00ppppaul&(map % [1 2 3 4 5] [60 70 80 90 100])
04:00sexpbotjava.lang.Exception: Unable to resolve symbol: % in this context
04:00LauJensen&(time (dotimes [_ 1e6] (map + (range 1e5) (range 1e5))))
04:00sexpbot⟹ "Elapsed time: 146.31 msecs" nil
04:00LauJensen&(time (dotimes [_ 1e6] (apply + (range 1000))))
04:00ppppaul&(map * [1 2 3 4 5] [60 70 80 90 100])
04:00sexpbot⟹ (60 140 240 360 500)
04:00sexpbotExecution Timed Out!
04:01LauJensenThats how much faster inlining is
04:01ppppaulhuh?
04:01ppppaulwhat the hell is [_ 1e6]?
04:01LauJensen&1e6
04:01sexpbot⟹ 1000000.0
04:01ppppauloh
04:01ppppauland _?
04:01LauJensenand _ is my way of saying that an argument goes there, but Im disregarding it
04:01ppppaul&[_ 1e6[
04:01sexpbotjava.lang.Exception: EOF while reading
04:01LauJensen&(dotimes [i 5] (print i " "))
04:01sexpbot⟹ 0 1 2 3 4 nil
04:02ppppaul&[_ 1e6]]
04:02sexpbotjava.lang.Exception: Unable to resolve symbol: _ in this context
04:02ppppaul&[_ 1e6]
04:02sexpbotjava.lang.Exception: Unable to resolve symbol: _ in this context
04:02ppppauloh
04:03ppppaul&(dotimes [i 1000] (print i " "))
04:03sexpbot⟹ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77... http://gist.github.com/663802
04:03LauJensenRaynes: Can you make the gist include the expression and the caller ?
04:04RaynesLauJensen: I don't see why not.
04:04ppppaulnot sure
04:04LauJensenRaynes: Great
04:04ppppaul(doc dotimes)
04:04clojurebot"([bindings & body]); bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1."
04:05ppppaul&(dotimes [10] (+ 1 3))
04:05sexpbotjava.lang.IllegalArgumentException: dotimes requires exactly 2 forms in binding vector
04:05ppppaul&(dotimes [n 10] (+ 1 3))
04:05sexpbot⟹ nil
04:05ppppaul&(dotimes [n 1e9] (+ 1 3))
04:05sexpbot⟹ nil
04:05ppppaul&1e9
04:05sexpbot⟹ 1.0E9
04:06ppppaul&(dotimes [n 1e99] (+ 1 3))
04:06sexpbotjava.lang.IllegalArgumentException: Value out of range for int: 9223372036854775807
04:06ppppaulout of range?
04:06ppppaulthought that we were allowed to have big numbers in clojure
04:06ppppaul&1e99
04:06sexpbot⟹ 1.0E99
04:06LauJensen&(clojure-version)
04:06sexpbot⟹ "1.2.0"
04:07ppppaul&(* 1e99 1e200)
04:07sexpbot⟹ 9.999999999999999E298
04:07LauJensenAh, ppppaul dotimes is using a primitive int for the loop, it cant overflow
04:07LauJensen~source dotimes
04:07ppppaul(doc dotimes)
04:07clojurebot"([bindings & body]); bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1."
04:07ppppauloh
04:08ppppaul&(/ 1e99324234234 1e20234234240)
04:08sexpbot⟹ NaN
04:08ppppaul&(* NaN NaN)
04:08sexpbotjava.lang.Exception: Unable to resolve symbol: NaN in this context
04:08ppppaulall this nan is making me hungry
04:09RaynesOh. Line numbers are included in metadata.
04:09ppppaulyeah
04:09RaynesThat's useful.
04:09ppppaul&(meta (val meta))
04:09sexpbotjava.lang.ClassCastException: clojure.core$meta cannot be cast to java.util.Map$Entry
04:09ppppaul&(meta meta)
04:09sexpbot⟹ {:line 182}
04:10ppppaul&(meta #'meta)
04:10sexpbot⟹ {:ns #<Namespace clojure.core>, :name meta, :file "clojure/core.clj", :line 178, :arglists ([obj]), :doc "Returns the metadata of obj, returns nil if there is no metadata.", :added "1.0"}
04:10ppppaulyo, what's the diff between #' and (val)???
04:10RaynesThere isn't one.
04:10RaynesI mean, the first one is a reader macro.
04:10RaynesBut it does essentially the same thing.
04:11ppppaulmy code says otherwise
04:11ppppaul&(meta (val meta))
04:11sexpbotjava.lang.ClassCastException: clojure.core$meta cannot be cast to java.util.Map$Entry
04:11ppppaul&(meta #'meta)
04:11sexpbot⟹ {:ns #<Namespace clojure.core>, :name meta, :file "clojure/core.clj", :line 178, :arglists ([obj]), :doc "Returns the metadata of obj, returns nil if there is no metadata.", :added "1.0"}
04:12ppppaul&^meta
04:12sexpbotjava.lang.Exception: EOF while reading
04:12Raynesval != var
04:12ppppauloh shit
04:12Raynes&(meta (var meta))
04:12sexpbot⟹ {:ns #<Namespace clojure.core>, :name meta, :file "clojure/core.clj", :line 178, :arglists ([obj]), :doc "Returns the metadata of obj, returns nil if there is no metadata.", :added "1.0"}
04:12ppppaul&(meta (var meta))
04:12sexpbot⟹ {:ns #<Namespace clojure.core>, :name meta, :file "clojure/core.clj", :line 178, :arglists ([obj]), :doc "Returns the metadata of obj, returns nil if there is no metadata.", :added "1.0"}
04:12ppppaul(doc val)
04:12clojurebot"([e]); Returns the value in the map entry."
04:12ppppaulhmmmm
04:13ppppaul&(val (meta (var meta)))
04:13sexpbotjava.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.Map$Entry
04:14ppppaul&(val :doc (meta (var meta)))
04:14sexpbotjava.lang.IllegalArgumentException: Wrong number of args (2) passed to: core$val
04:14ppppaulhow would i use 'val'?
04:15ppppaulit would be really great if the documentation had examples
04:16Raynes&(val (first {:one :two}))
04:16sexpbot⟹ :two
04:16Raynesclojuredocs.org has examples
04:18ppppaulthanks a lot!
04:19ppppaul:D
04:21ppppaulclojuredocs is awesome!
04:22ppppaul&:doc (meta #'meta)
04:22sexpbot⟹ :doc
04:27Raynespppaul: Wrap it in parens.
04:27ppppaul&(:doc (meta #'meta))
04:27sexpbot⟹ "Returns the metadata of obj, returns nil if there is no metadata."
04:27clojurebotYou don't have to tell me twice.
04:34RaynesLauJensen: Man, you've got me staying up all late now.
04:34LauJensenSure, blame it on the european guy
04:34RaynesYou tell me to add one thing and I end up adding two things, and the next thing you know, it's nearly 4AM.
04:35LauJensenWhat did you add?
04:35RaynesI'm adding a source command.
04:35LauJensengreat, when you're done, upgrade to 1.3-alpha-2
04:35RaynesNo way man.
04:36RaynesIt's too late for such antics.
04:36RaynesI'll upgrade when 1.3 is official, because I have about 6 million dependent libraries to update along with it.
04:36RaynesLauJensen: https://gist.github.com/663825 This what you had in mind?
04:37LauJensenYea exactly
04:37clojurebotIt's greek to me.
04:37RaynesAwesome.
04:38LauJensenIf you want to get really fancy, make it insert an \n for every 80 characters :)
04:38LauJensenBut other than that, good work :)
04:38RaynesThat's a good idea. Too bad gist can't word-wrap.
04:41Raynes......
04:41Raynes(-> "println" symbol resolve meta :line)
04:41RaynesI was testing with println, and I hardcoded it.
04:42RaynesSat here for the past 5 minutes wondering why I was getting the same link every time.
04:43l_a_mhi
04:44LauJensenRaynes: When you reach that point, sleep is required
04:44l_a_mwhich library can i use in a CL project to use the GAE framework ?
04:44LauJensen,google clojure GAE framework
04:44clojurebotjava.lang.Exception: Unable to resolve symbol: google in this context
04:44LauJensen~google clojure GAE framework
04:44clojurebotFirst, out of 11900 results is:
04:44clojurebotClojure Games
04:44clojurebothttp://clojure-games.org/
04:44l_a_mi see appengine-magic, appengine.clj, ...
04:45RaynesLauJensen: I agree.
05:10RaynesLauJensen: Your requested functionality is in the live sexpbot now. We also have a $source command now.
05:11LauJensen$source apply
05:11sexpbothttp://is.gd/gJZeN
05:11RaynesAlso, sexpbot has a $google command, for future reference.
05:11LauJensenExcellent, great job Raynes, and in record time
05:11LauJensenWhile you were busy I've almost implement ClojureQL as relational algebra, its astoundingly awesome
05:11RaynesThank you. Now it's Raynes's sleepy time.
05:12LauJensenGood night
05:12RaynesCute.
05:12RaynesBy the way, I didn't implement the inserting newlines functionality yet. I or amalloy will get that tomorrow.
05:13LauJensen(apply str (-> col (partition 80) (interpose "\n"))) right?
05:13Raynes$mail Make the clojure plugin's 'trim' function insert newlines every 80 characters when gisting truncated results. I want it on my desk by 8:00pm.
05:13sexpbotMessage saved.
05:13RaynesIndeed.
05:13RaynesToo tired.
05:13RaynesGood night, kind sir. <3
05:13LauJensenSleep tight :)
05:21RaynesI just realized that I mailed a user named 'Make' rather than amalloy. Excuse me while I correct my tired mistake.
05:21Raynes$mail amalloy Make the clojure plugin's 'trim' function insert newlines every 80 characters when gisting truncated results. I want it on my desk by 8:00pm.
05:21sexpbotMessage saved.
05:24octei'm trying to find some kind of memory leak in my clojure application.. it'll run fine for a while but after leaving it for a day or so it'll use up all of it's heap
05:24octei did a dump now when it's full and there's an insane amount of instances of class clojure.lang.PersistentHashMap
05:30octeseems to be related to Vars..
05:38octethe leakage should be caused by this, or the callback it call: http://paste.lisp.org/display/116260
05:38octeis there anything obviously wrong with that method?
05:38octefunction
05:47octeexcept that the file isn't being closed.. hm
05:47octeis the combination of make-local-variables and recursing a bad idea?
06:28bsteuberhi
06:29bsteuberusing clojure.java.sh seems to have clojure hang after finishing
06:29bsteubercould anyone try https://gist.github.com/663939 on his computer?
06:30bsteuberand tell me whether the program stops after printing the contents
06:32yonatan_bsteuber: it works ok for me
06:32bsteuberI'm using snow leapard with clojure 1.2.0
06:33bsteuberand get like 10 seconds hang after it's done
06:33yonatan_using Clojure 1.2.0-master-SNAPSHOT on linux. no delay here.
06:34bsteuberok, so seems to be a mac-only problem
06:35bsteuberit's annoying my for a while now - first thought it'd be leiningen's fault
06:36bsteuberany mac users out there to confirm/deny?
06:45mrBliss`bsteuber: I'll try it in a sec
06:45rdsrbsteuber, the same happens for me too
06:45rdsrmines a mac 10.5.8
06:45rdsrI guess its a leopard
06:46bsteuberactually, it doesn't happen with 1.2.0-master-SNAPSHOT
06:46bsteuberdunno which one, though
06:46bsteuberso seems to have sneaked in during a newer change
06:47rdsrhmmm
06:48mrBliss`It returns immediately on my machine, 1.2 on Snow Leopard via Emacs
06:50bsteubermrBliss`: via emacs? you mean a shell-buffer?
06:51mrBlissbsteuber: I do it in a repl. I'll try it with java -cp ...
06:51rdsrwierd it returns immedialtely when u run it from a repl
06:51bsteuberyes
06:52bsteuberI was suspecting some sort of stream-not-flushed issue
06:52bsteuberbut not sure
06:53mrBlissit prints immediately, but doesn't stop
06:53bsteuberok, so same behavior
06:54bsteuberso it's mac-only clojure-1.2.0-only
06:54bsteuberand shell-only
06:54bsteuberI'll file a bug report then
06:54leafwwhat is the official clojure contrib git repository? There are so many online.
06:55rdsrbsteuber: by shell-only do u mean the shell contrib library?
06:55mrBlissleafw: https://github.com/clojure/clojure-contrib
06:55mrBlissbsteuber: it ends after +20 seconds
06:56bsteuberoh, even more than for me
06:56mrBlissthe fix is:
06:56leafwmrBliss: thanks
06:56mrBliss(shutdown-agents) at the end of your file
06:56mrBlisssh uses futures and future uses agents under the hood
06:57mrBlissand (shutdown-agents) shuts down the agent thread pool
06:57bsteubermrBliss: yeah, that works
06:57rdsroh ok,
06:57bsteuberbut it shoudln't be this way, should it? :)
06:57rdsrthks, a little bit of learning everyday :)
06:58mrBlissbsteuber: it's not transparent
06:59mrBlissit should be mentioned in the docs
07:00bsteuberbut I think a command like sh shouldn't require a user to do cleanup - on specific operating systems only :)
07:00mrBlissbsteuber: I'm gonna try it on Windows now
07:04mrBlissSame thing happens on Windows. It's just the thread pool, platform doesn't matter.
07:05bsteuberok, same with linux - so with 1.2.0 (instead of SNAPSHOT) you need to do it always
07:06l_a_mi've got this error : Caused by: java.lang.Exception: Unable to resolve symbol: save-entity in this context
07:06l_a_mbut from : http://r0man.github.com/appengine-clj/appengine.datastore-api.html#appengine.datastore/save-entity
07:06l_a_msave-entity seems public ?
07:07l_a_mi put this line in my ns : (:use [appengine.datastore])
07:08mrBlissaha
07:08mrBliss(:use [appengine datastore])
07:08esjbsteuber: a little digging. clojure-1.2.0-master-20100607.150309-85.jar returns immediately, but by clojure-1.2.0-master-20100730.140143-92.jar its lagging out. Don't have any more around to check against.
07:08mrBlissl_a_m: lose the dot or the brackets
07:11bsteuberesj: ic, so I guess they might have switched to the future implementation in that time
07:11esjyeah
07:14bsteuberah, it's that one: http://dev.clojure.org/jira/browse/CLJ-124
07:16bsteuberso let's hope it'll be dealt with soon :)
07:16bsteuberand in the meantime I call (shutdown-agents) anywhere :)
08:05fogus_LauJensen: How does your rel algebra differ from the one in clojure.set?
08:05LauJensenfogus_: I have no idea
08:05fogus_oh
08:05fogus_well then
08:06LauJensenfogus_: Perhaps you can take a look at my readme and tell me, if you know clojure.set
08:09fogus_Well for one, yours appears to be backed by a real DB
08:09fogus_;-)
08:09LauJensenYea, did you literally mean clojure.set?
08:09LauJensenI thought you might be aluding to some library
08:10LauJensenfogus_: ClojureQL is an abstraction on top of your SQL database. CQL lets you interact with that database using the primitives (not all yet) defined in the relational algrebra papers
08:10fogus_I meant the relational algebra ops in the clojure.set ns (project, join, etc...)
08:12LauJensenI have project, join, rename (which might work differently) and select. I dont see select in theirs and rename is bound to be a little different
08:17fogus_Oh, select is there
08:17fogus_takes a predicate though
08:18LauJensenIf they're both based on relational algebra, they'll pretty much being doing the same thing using the same primitive operations. The difference will be mostly in the usage and implementation. My is protocol based and useful for SQL interop.
08:30sthuebnerLauJensen: I like you test suite! :-)
09:00l_a_mdoes someone use appengine.clj ?
09:00l_a_mhttps://github.com/r0man/appengine-clj ?
10:39apgwozRaynes: awww, you're too kind. I actually did some stuff to it even!
11:05sdeobaldIs it at all common for production deployments of clojure apps to be raw .clj files? Or is it almost always the case that folks jar up their stuff?
11:14cemerickpretty quiet in here today so far…
11:14cemerickrhickey: ping
11:16jochenso I say hi, I am new - here and to clojure :-)
11:17cemerickjochen: welcome! :-)
11:18jochenthank you! Could you answer me a few questions about irc?
11:19cemerickas best I can, sure
11:20jochengreat! So here the first one: there is a list on the left showing about 250 users, are they all active at the moment?
11:20cemerickThey're all connected and in the room. Obviously, they're all either lurking or busy elsewhere.
11:21jochenok, nd is there a possibility to address someone directly other than typing e.g. cemerick: as the first word?
11:21cemerickjochen: You can see logs for this channel for the past ~3 years here: http://clojure-log.n01se.net/
11:22cemerickmost irc clients will highlight any message containing the user's handle anywhere (i.e. my client highlighted your last msg as directed towards me)
11:22cemerickbut it's good practice to prefix direct addresses with handle:
11:22jochenyep, worked with your info about the backlog!
11:23jochenCan you also start a private chat?
11:23cemerickjochen: yes, by prefixing a message with "/msg handle <initial private msg here>"
11:27jochencemerick: worked, too! Thank you for all the info!
11:28cemerickno problem :-)
11:52fliebelmorning (UGT)
11:55fliebelI'm having a seriously wicked issue here. I figured out a function that is twice as fast as the other one, but the result is just… Slightly off, but only for a few positions. So I'm thinking I'm doing something very ureliably that overflows stuff end such, but I don't know what yet: https://gist.github.com/663096
11:58cemerickfliebel: FYI, it's been *very* quiet this morning
11:58cemerickand now I'm taking off :-P
11:58fliebelokay :)
11:59cemerickdefinitely post to the list, if you haven't done so already
11:59cemerickGood luck, for what that's worth :-)
11:59fliebelyea, I did. Thanks :)
12:06@rhickeycemerick: pong
12:07replacarhickey: think you just missed him...
12:07@rhickeyah
12:07cemerickJust on my way out…
12:09cemerickrhickey: This might require more discussion, but: a fair quorum of clojure dev tooling leads seems to be in basic agreement about pooling efforts to build a single (perhaps set of) libraries for backend support of such tooling.
12:09cemericke.g. introspection, completion, refactoring, etc, etc
12:09@rhickeyok
12:09cemerickThis seems like a perfect fit for the clojure.tools umbrella, yes?
12:10@rhickeyyes, let's not neglect enclojure's stuff here as they were/are way ahead on e.g. context-sensitive completion
12:10cemerickabsolutely; Eric was the first to pipe up in agreement of Meikel's initial proposal :-)
12:11@rhickeywhere is the thread?
12:11cemerickno public thread; it's in a reply-all round-robin at the moment
12:11@rhickeyugh
12:11cemerickseems to be the flavour of the month or something ;-)
12:11@rhickeynot a good flavor
12:12@rhickeywe need to stop doing that
12:12technomancysrsly
12:12cemerickyeah
12:12cemerickI think people are getting drawn towards that to avoid the bikeshedding :-/
12:13@rhickeycemerick: that's why there's clojure-dev
12:13cemericktechnomancy: hey Phil; are you on board with this tooling effort, and separately, the notion of it being in contrib?
12:14technomancycemerick: I think it's a good idea, but it will probably be a while before Emacs can take advantage of it
12:14cemerickhrm, hugod should be recruited as well
12:14technomancyyes, definitely
12:15cemericktechnomancy: because of the tie to the SLIME commands, etc?
12:15@rhickeytechnomancy: is not nrepl an easy path for exposing Clojure stuff to emacs/slime?
12:15technomancyyeah, it's harder to justify investment when much of that functionality already exists, albeit in a hacked-together way
12:16technomancyrhickey: long term? definitely.
12:16cemerickI think the common tooling effort is going to put everyone else at least on par, if not ahead of SLIME in short order.
12:16cemerick(or so I hope :-))
12:17technomancy"broken gets fixed, but half-assed lasts forever" <= especially true of swank
12:17@rhickeyheh
12:18cemerickrhickey: OK, my second question is, where might we reasonably carve out a spot for this project (/group of projects) on dev.clojure.org, so people can work on design notes, etc.? There was talk of having per-project wikis and JIRA projects (certainly my preference), but I suspect that's a ways off yet?
12:19@rhickeyper-project Jira will definitely be the way, wiki's I think just need hierarchical nesting of some sort
12:19@rhickeyyou can put an overview page under http://dev.clojure.org/display/design/Tools
12:19cemerickAny reason for the latter?
12:20@rhickeycemerick: less admin, more interconnections between things
12:20cemericki.e. it costs nothing to have as many spaces as we need
12:21@rhickeycemerick: I think a space for something once it's a lib makes sense, but these early discussions are prior to that level of detail
12:21cemerickah, ok
12:21cemerickThat delineation makes perfect sense.
12:21cemerickI thought you meant everything in one space, no matter project status.
12:22@rhickeythere's already a data.xml space
12:22@rhickeyand test.benchmark
12:22cemerickah, hadn't been to the dashboard in a while
12:23cemerickyikes
12:24@rhickeyStu's pushing them through, new alpha soon
12:24cemericknifty
12:24cemerickrhickey: OK, that's all I have, thanks. I'm remarkably late, gotta run; I assume you saw my last mail on the build/release stuff. If not, have a look @ http://dev.clojure.org/display/design/Common+Contrib+Build#CommonContribBuild-November3,2010%28Chas%29
12:24cemerickComments/discussion most wanted at some point. :-)
12:25@rhickeycemerick: will look through that, thanks!
12:26hiredmanrhickey: does "No one should try to do any design work for async in Clojure without thoroughly understanding what Erik Meijer has done with .Net Reactive Extensions." mean the async/await/Task<T> stuff? or the push based collection stuff?
12:27@rhickeyhiredman: the Observable abstraction first, then the map/reduce/filter duals
12:27@rhickeyI'm concerned about a full push-based duplication of the seq lib, also the fact that the endpoint of observable is inherently non-functional
12:28@rhickeybut understanding this gives us a shared vocabulary for discussing pros/cons
12:28@rhickeythe composability is certainly cool
12:29hiredmanthey certainly have let the FP guys go to town
12:43raekanyone have a favourite link for this Erik Meijer and .Net Reactive Extensions things?
13:05esjraek: I came across this somehow: http://rxwiki.wikidot.com/start which seems comprehensive
13:06raekI'm listening to this now: http://www.hanselman.com/blog/HanselminutesPodcast198ReactiveExtensionsForNETRxWithErikMeijer.aspx
13:06raekan interview with the man himself
13:07lpetithelo
13:08pdloganraek: similar or related kinds of things in java or clojure... http://www-sop.inria.fr/meije/rp/Junior/ ("JR" - Java reactive kernel) and...
13:09pdlogan http://intensivesystems.net/tutorials/stream_proc.html ("conduit" - streams for clojure where streams are another angle on "reactivity")
13:11hiredmanhttp://dev.clojure.org/display/design/Channels
13:28fliebelraek: Where are those guys from? They sound Dutch...
13:29mrBlissfliebel: you're right http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29
13:36woobyanybody know where read-lines now lives (if anywhere?)
13:40amalloywooby: line-seq?
13:40amalloyi'm not sure what read-lines did/does, but line-seq sounds related
13:44woobyamalloy: cool, thanks, definitely related... read-lines just handled making a reader for you if necessary
13:44djpowellI wonder about retention issues when converting an observable to a sequence - I assume you'd use a blocking queue - but normally I use a bounded queue for that sort of thing to avoid runaway memory usage; but it sounds nasty to block the event firer.
13:45amalloy&(doc clojure.java.io/reader)
13:45sexpbot⟹ "([x & opts]); Attempts to coerce its argument into an open java.io.Reader. Default implementations always return a java.io.BufferedReader. Default implementations are provided for Reader, BufferedReader, InputStream, File, URI, URL, Socket, byte arrays, character arrays, and String. If argument is ... http://gist.github.com/664517
13:45replacawhen I want to know what functions something has and I see that the library has autodoc which answers my question in 1 second, I feel like my life has not been entirely wasted
13:45amalloywooby: ^^
13:46amalloy~source line-seq
13:46amalloyso line-seq requires a reader, but (reader) turns just about anything into a reader
13:47woobyrock on, thanks again
13:47djpowellyou can use with-open around your reader too, as long as you don't intend to use the line-seq from it outside of that block
13:48djpowell&(doc with-open)
13:48sexpbot⟹ "Macro ([bindings & body]); bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order."
13:48technomancyI think read-lines wasn't promoted because its laziness would lead to a resource leak
13:51djpowellclojure.diff looks cool, but diffing vectors and sequences by comparing elements at identical positions seems a bit meh - that isn't what diff does
13:52djpowellwould anyone be interested in a version that is more diff-ish?
13:53replacadjpowell: what do you mean by "more diffish" here?
13:54djpowell[1 2 3] and [2 3 4] -> [1] [2 3] [4]
13:54djpowellhttp://www.ics.uci.edu/~eppstein/161/960229.html
13:54djpowelluse a longest common subsequence algorithm
13:55woobythat would be fun to implement
13:55djpowelli've got one
13:55djpowellie match the sequences so that they have the maximal number of matches, whilst staying in order
13:55replacadjpowell: you might want to propose that on the list and show how it differs/is uperior to what we have
13:57replacaesp. for test output
13:58replacathen maybe we could have an "improved" clojure.diff before 1.3
13:58djpowellhmm, there are pros and cons
13:59djpowellit might be closer to what people might want, but in some cases (vectors as tuples) it might not; and it uses a bit of memory
13:59replacammm, I see
14:02fliebelwhere's the docs for clojrue.diff?
14:03apgwozls
14:03apgwozerr...
14:03djpowellah
14:03djpowellclojure.data/diff
14:04djpowell&(doc clojure.data/diff)
14:04sexpbotjava.lang.Exception: Unable to resolve var: clojure.data/diff in this context
14:06fliebel&(require 'clojure.data)
14:06sexpbotjava.io.FileNotFoundException: Could not locate clojure/data__init.class or clojure/data.clj on classpath:
14:08Lajla,(range 20)
14:08clojurebotLajla: Gabh mo leithscéal?
14:08Lajla->(range 20)
14:08sexpbot⟹ (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
14:09Lajla(map (fn [x] '(I worship your shadow)) (range 20))
14:09amalloyclojurebot: lolwhat. that was not a hard question
14:09Lajla->(map (fn [x] '(I worship your shadow)) (range 20))
14:09clojurebotExcuse me?
14:09sexpbot⟹ ((I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship your shadow) (I worship ... http://gist.github.com/664543
14:09Lajlaamalloy, they made him ignore me. =(
14:09LajlaBecause they hate me.
14:09LajlaBecause I'm the second best programmer int he world, right behind the Microsoft Chief Software Architect.
14:09amalloyLajla: given what you just made sexpbot do i can see why
14:10Kad_k_LaP,(range 20)
14:10clojurebot(0 1 2 3 4 5 6 7 8 9 ...)
14:10Lajlaamalloy, I wanted to know if map was caleld map in clojure, that's all.
14:10LajlaThey dislike me because I use 'I worship your shadow' all the time in my testing.
14:11hiredmanLajla tends to spam, so I have him on ignore, and since he liked to make clojurebot say weird things I have clojurebot ignore him
14:11amalloyLajla: because it's annoying channel spam. if you want to test things verbosely, just /msg sexpbot
14:11kzarHow do you view documentation for something at the REPL?
14:11amalloyhiredman: yeah i'm inclined to agree
14:11amalloykzar: (doc something)
14:12Lajlaamalloy, I will not bend the glory of His Shadow to accomodate your wretched human imperfections.
14:12kzaramalloy: Is there anything else? Dumb example but I didn't know what sets where earlier and I tried (doc #{}) and didn't get much
14:12LajlaTrain more by searching for waldo.
14:13raekkzar: reader syntax is documented at http://clojure.org/reader
14:13djpowellkzar: no there isn't any online help for things like that - clojure.org is probably the best bet
14:14kzarOK, good to know thanks
14:14fliebelkzar: also check the page on special forms.
14:14raekbut for everything that is something that is contained in a var, you should be able to use doc
14:15fliebelor find-doc if you don't know the name. But this poses somewhat of a recursive problem, since I keep forgetting whether it's doc-find or find-doc. I could of course use doc-find or find-doc to find out, but then I need to...
14:16amalloyfliebel: (try (doc-find foo) (catch Exception _ (find-doc foo))) - problem solved
14:16replacafliebel: I recommend putting a post it on your monitor
14:17fliebelamalloy: Or define an alias, so both work :)
14:17kzarheh I'm glad I'm not the only one who can never remember stuff like that
14:17amalloykzar: nth is my weak spot
14:18Kad_k_LaP->,(range 20)
14:18sexpbot⟹ (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
14:18Kad_k_LaP&(range 20)
14:18sexpbot⟹ (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
14:18amalloyi always try &|(nth 10 (range 20))|& instead of &|(nth (range 20) 10)|&
14:18sexpbot(nth 10 (range 20)) java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.Number
14:18sexpbot(nth (range 20) 10) ⟹ 10
14:18fliebelamalloy: I only keep forgetting whether it's seq or number first.
14:19kzarEmacs tells you when you're typing it though
14:20amalloykzar: yeah, but i'm so sure it's (nth n coll) that i don't even look at the eldoc
14:20amalloyit's a tough nut to crack
14:22fliebelamalloy: I think it's bad UI design. Only when you think about the implications for looping, apply and partials you realize it makes sense.
14:22kzaramalloy: Yea I guess it's deeply ingrained the wrong way around. Two ways to get past that: associate the wrong way with pain, like do something painful when you get it wrong. Another less insaine idea is to just keep typing it the right way over and over until that way is ingrained more
14:23amalloyhahaha
14:23fliebelIt should be called nth-of, then it instantly makes sense to put the coll first.
14:23amalloyi definitely need more self-mutilation in my life, kzar
14:23kzarheh
14:25amalloyfliebel: wow you're right, it does
14:25Raynesapgwoz: Ping.
14:25apgwozRaynes: Pong.
14:26apgwozwhat's up?
14:26Raynesapgwoz: I'm looking over your changes. Fun stuff.
14:26RaynesI mostly want to think you for fixing my abomination of a css file.
14:26apgwozindeed.
14:26apgwozhaha
14:26Raynesthank*
14:26Raynes:>
14:26apgwozthere's still some stuff to do of course
14:26fliebelamalloy: And we should have something like .bashrc to set your own aliases like this. Maybe I'm going to add this to cake.
14:27apgwozbut, *i* think it looks better than before. ymmv
14:27Kad_k_LaP(defalias nth-of nth)
14:27fliebels/I'm going/should sometime/
14:27sexpbot<fliebel> amalloy: And we should have something like .bashrc to set your own aliases like this. Maybe should sometime to add this to cake.
14:27RaynesI'm going to throw it into a branch and look at it in a second.
14:27RaynesAnyways, thanks for taking an interest in this!
14:27amalloyfliebel: does user.clj still work?
14:27apgwozno problem!
14:27Kad_k_LaP,(defalias nth-of nth)
14:27clojurebotjava.lang.Exception: Unable to resolve symbol: defalias in this context
14:27Kad_k_LaP:P
14:28fliebelamalloy: user.clj?
14:28replacadefalias is in contrib
14:28fliebelKad_k_LaP: I think that floats around in contirb
14:28replacauser.clj lets you run your own funcs before it starts the repl
14:28fliebelAnd again, I'm to slow :(
14:28pppaulcan someone tell me the difference in using slime-repl from the normal one in lisp?
14:28pppaulemacs*
14:29Kad_k_LaPfliebel: practically everything I think of for clojure already exists :P
14:29alpheuspppaul: what's the normal repl?
14:29clojurebotwhose job is<reply>that is ssideris_s job
14:29Kad_k_LaPfliebel: the number of libraries is quite nice :)
14:30Raynesapgwoz: Oh man! This is very pretty.
14:30pppaulthe non-slime one
14:30RaynesI *love* the Clojuresque colors.
14:30fliebelIs there anything like PEP's for Clojure?
14:30apgwozRaynes: I think it makes sense to tie it together as much as possible.
14:31Raynesapgwoz: It's exactly what I'm aiming for.
14:31Kad_k_LaPfliebel: I think we will need something like that :)
14:31apgwozRaynes: cool!
14:31fliebelKad_k_LaP: I agree
14:32apgwozi'm planning to continue tweaking, make it a bit more pretty and clean up the text in the tutorial area.
14:32Kad_k_LaPə
14:32Raynesapgwoz: Keep me posted, and let me know when you want me to pull with a pull req or whatever.
14:32apgwozRaynes: sure thing
14:32apgwozmight get a chance to do more this weekend, but most likely sometime next week, unfortunately.
14:32replacafliebel: remind me what PEPs are again. Design docs for Python?
14:33Raynesapgwoz: No hurry. It's more than has been done in quite a while. ;)
14:33Kad_k_LaPsomething like RFC's for Python if I'm correct
14:33amalloyreplaca: more like style standards, i thought? i guess google would know
14:33amalloy$google pep python
14:33sexpbotFirst out of 24500 results is: PEP Index - Python
14:33sexpbothttp://www.python.org/dev/peps/
14:33Kad_k_LaP$google define:pep
14:33sexpbotFirst out of results is:
14:34apgwozRaynes: I did have a problem this morning when working on it though. Had all sorts of security errors. It wasn't until I commented out the sandbox stuff that it actually worked.
14:34kzarThe PEP's seem to be quasi-religious documents they always refer to
14:34apgwozdo you have a policy file that will force it to work?
14:34replacaI thought fliebel might tell us, casue that would also help us know in what sense he meant it
14:34Raynesapgwoz: Yeah. I should have mentioned that.
14:34kzarthere's a PEP for style that people talk about a lot, there's a bunch of other ones too
14:34amalloyapgwoz: there's a policy file in sexpbot which you could use
14:34amalloyif tryclojure doesn't have one
14:34Kad_k_LaPso PEP's are really like RFC's
14:35Raynesapgwoz: Right, use example.policy in sexpbot. I'll add it to the tryclojure repository and to the readme.
14:35Kad_k_LaPthey are proposed, discussed and remain as a reference
14:35apgwozRaynes, amalloy: appreciated.
14:36replacawell Clojure is less formal still, being younger, but design discussion is happening here: http://dev.clojure.org/display/design/Home
14:36Kad_k_LaPit's really just going from toy to big tool
14:36clojurebotTitim gan éirí ort.
14:36Kad_k_LaPat least it's not seen as a toy language any more by practically any article
14:38fliebelSorry, was afk, PEP is Pythen Enhancement Proposal.
14:40fliebelThere are thousands of them, ranging from "I wan this to be in Python" to features that made it into Python, to PEP 8: style guid to PEP 20, zen of Python. which are sortof the 10 commandments for Python.
14:41Raynesapgwoz: https://github.com/Raynes/tryclojure/wiki/Running-Tryclojure
14:41fliebelCan anyone submit stuff to the design space, or only Clojure devs?
14:41Kad_k_LaPlike bug 1 in Ubuntu's bugtracker :P
14:41fliebelKad_k_LaP: Is that the "Windows majority" thing?
14:42Kad_k_LaPfliebel: exactly
14:47amalloyreassign the bug to windows vista? he seems to be taking care of it
14:48rickmodeTrying to wrap my head around binding vs. with-bindings. What is the intended usage of with-bindings?
14:59replacawith-bindings works when you don't have a priori static knowledge of what things yuo're going to bind
14:59replacarickmode: almost always you should use binding
15:00rickmodereplaca: i'm getting that... i know it's an unusual subtly. I'm really trying to nail down def, set!, binding and with-bindings in my head.
15:04replacarickmode: except for the syntax difference, the two perform the exact same function
15:05replacawithin that hierarchy
15:05replacaand you can think of them essentially as stack pushes (thread-local) on def'ed vars
15:11rickmodereplaca: given (declare *v*), (binding [*v* 1] *v*) works, but (with-bindings [*v* 1] *v*) fails with *v* unbound
15:14pppaulcan someone give me an example of how to use cond-let?
15:14pppaul(clojure.contrib.cond/cond-let [a 3, b 4, c 5] ((< a b c)("true") :else ("false")))
15:15replacayeah, really you should do a def before doing either kind of bind
15:15pppaul&(clojure.contrib.cond/cond-let [a 3, b 4, c 5] ((< a b c) "true" :else "false"))
15:15sexpbotjava.lang.ClassNotFoundException: clojure.contrib.cond
15:15pppaul&(symbol cond-let)
15:15sexpbotjava.lang.Exception: Unable to resolve symbol: cond-let in this context
15:15rickmode replaca: i realize i'm using a vector with-binding instead of a map
15:16pppaul&(doc cond-let)
15:16sexpbotjava.lang.Exception: Unable to resolve var: cond-let in this context
15:16kzarI saw some Java that used 8000f , what does that mean?
15:16replacarickmode: I don't think that declare guarantees a root binding - it's meant for forward refs
15:16amalloypppaul: it does all the tests first
15:17pppaulhmmm
15:17pppaulwhy wouldn't it bind the local vars first?
15:18amalloyuser=> (cond-let [[a b]] [1 2 3] b)
15:18amalloy2
15:18rickmodereplaca: My example was bad. You were correct, however the usage of with-bindings is like this: (declare *v*) (with-bindings {#'*v* 1} *v*)
15:19pppaulok thanks
15:19amalloyie, it iterates through the tests, binding the first one that is non-nil, and then evaluates the associated expr with the binding
15:19pppaulthat is sorta confusing
15:20amalloywell, don't use cond-let then. i don't have a need for it myself, but presumably someone finds this behavior useful
15:21amalloywhat's the form you were hoping cond-let would simplify for you?
15:21pppaul(let ... (cond
15:22amalloyeh. that really only saves like five characters; the cond-let behavior lets you quickly express a more complex concept
15:23pppaul;)
15:28pppaul&(reduce + (range 1e4))
15:28sexpbot⟹ 49995000
15:28pppaul&(reduce + (range 1e8))
15:28sexpbot⟹ 4999999950000000
15:29pppaul&(time (reduce + (range 1e8)))
15:30sexpbot⟹ "Elapsed time: 7872.037 msecs" 4999999950000000
15:32pppaul(doc doall)
15:32clojurebot"([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time."
15:38replacarickmode: right. still, I'm not sure you can rely on declare providing a root binding for you. As it turns out, it currently does, but that's more of an implementation detail.
15:40kzarIs it normal to quite often get "Evaluation aborted." without any clues when trying things?
15:40AWizzArdkzar: type: *e
15:40rickmodereplaca: you're right. (declare foo) leaves foo unbound. That can be good if one intends foo to *always* be used within a binding, I guess.
15:40rickmodewould cause an exception
15:41kzarAWizzArd: Cool thanks
16:00seancorfield,(declare foo)
16:00clojurebotDENIED
16:00seancorfield->(declare foo)
16:00sexpbotjava.lang.SecurityException: Code did not pass sandbox guidelines: (def)
16:00seancorfieldheh, ok, i'll stick to the repl...
16:01seancorfieldi was curious whether the bots were running a recent enough version to show the new/recent Unbound var behavior
16:01seancorfield,(clojure-version)
16:01clojurebot"1.2.0"
16:01seancorfield->(clojure-version)
16:01sexpbot⟹ "1.2.0"
16:01seancorfieldand that answers that :)
16:02seancorfieldnot sure when it changed but (declare foo) (type foo) -> clojure.lang.Var$Unbound on 1.3.0-master-SNAPSHOT
16:05rata_hi all
16:09seancorfieldquestion about doall...
16:10seancorfieldaccording to the source, it looks like (doall 1 some-lazy-seq) should only realize the first element and leave the rest unrealized
16:10seancorfieldbut if i do (def foo (doall 1 (map println [1 2 3 4 5 6]))) it prints all 6 elements
16:10seancorfieldthis definition prints none of them as expected (def foo (map println [1 2 3 4 5]))
16:11seancorfieldah, it's chunking...
16:11seancorfield(def foo (doall 1 (map println (range 100)))) prints 0..31
16:12hiredmanhttps://github.com/hiredman/die-geister ;; async task library
16:14cemerickseancorfield: you *almost* don't have to worry about chunking ;-)
16:20seancorfieldcemerick: thanx, i'll try to *almost* remember that :)
16:22seancorfieldbtw, who is responsible for this page: http://clojure.org/contributing - i wonder if my surname can be corrected (to remove the 'n')?
16:23cemerickseancorfield: I think only Rich can change that.
16:23seancorfieldalso, how long does it normally take for applications to join clojure-dev to be approved?
16:23seancorfieldthanx cemerick - makes sense
16:24seancorfieldi'm just curious... not pushing... i'm a bit busy with 50 web site launches right now so, unfortunately, clojure is taking a back seat until i get those out..
16:24cemerickseancorfield: you mean the ML?
16:24seancorfieldyup
16:24cemerickShouldn't take long at all. chouser might be able to help there.
16:24seancorfieldonce i saw i was listed on the contributing page, i applied to join the mailing list
16:24clojurebothttp://clojure.org/contributing
16:25cemerickclojurebot's tourette's seems to have gotten worse of late :-P
16:25amalloyyeah
16:25amalloyclojurebot: shut up
16:25clojurebotNo entiendo
16:26amalloydamn. i think he has a shut up command, but i guess it's for privileged users?
16:26hiredmanwhen I reimplemented it, I may not have used the same percentage chance
16:27cemerickhiredman: did his brain get wiped at some point? There are a bunch of things that he seems to have forgotten about from early on.
16:27hiredmanuh, I don't think so
16:27cemerickhuh, ok
16:27hiredmanthere may be some commands that haven't been re-implemented yet
16:28hiredman(like shut up)
16:28hiredman(which I think amalloy was the first to try and use)
16:29amalloyyeah, i only knew about it since i found it when i was looking through the source to fix his "source" factoid
16:30hiredmanbumped the random response from 1/200 to 1/1000
16:31rata_some days ago one person (I don't remember who) pointed out that lazyness could be the culprit of another person's performance problem because of the overhead lazyness involves... is this so? is the overhead of lazyness noticeable? is it right to abuse of lazy seqs?
16:31cemerickhiredman: thanks; FWIW, I was just idly whining more than anything else :-)
16:32hiredmanI had noticed it too, and was planning to change it, but just hadn't yet
16:47rata_nobody wants to make me feel better saying "don't worry, lazyness isn't involves a noticeable overhead, use it as much as you want"? :)
16:49amalloyrata_: i don't know about laziness's overhead, but your head will hurt less if you use laziness. it's hard not to in clojure
16:50defnim a mvn noob -- can anyone help me out with getting https://github.com/bgruber/lazytest-listen to build? It's comaplining that com.stuartsierra.lazytest is not on my classpath -- i grabbed a recent version of the lazytest jar that ninjudd put out on clojars inside the lazytest-listen directory, but im not sure how to point at it, and im also not sure if I need to edit something other than the pom.xml dependency which points at com.stuartsierra... Any help is
16:54arohneris there a way to get set behavior in a datastructure that preserves insertion order?
16:55arohnerbasically, a vector that doesn't contain duplicates
16:55amalloydefn: it should be downloading the dependency automatically
16:56arohneroh, (distinct my-vector)
16:56amalloyarohner: beat me to it
16:57amalloydefn: have you run mvn compile?
16:57defnonly mvn install amalloy
16:58arohnerfind-doc is my friend
16:58defnCompiling com.iheardata.lazytest-listen.harmony to /Users/defn/src/lazytest-listen/target/classes
16:58defnException in thread "main" java.io.FileNotFoundException: Could not locate com/stuartsierra/lazytest/watch__init.class or com/stuartsierra/lazytest/watch.clj on classpath: (harmony.clj:1)
16:59cemerickdefn: if it can't find some class, the dependencies in the pom are borked
16:59cemerickwould help more, but gotta run, sorry :-(
17:02amalloydefn: it looks like listen wants version 1.0 of lazytest, and stuart is up to 1.2
17:04amalloy1.2 dpesm
17:04amalloyer
17:05amalloy1.2 doesn't seem to have the file that listen is looking for -
17:06amalloyi'm not so hot at maven myself, so that's the best i can do for you
17:08ymasorywhat's the index-of function for vectors?
17:11defnamalloy: so do i need to find 1.0 and specify it manually? or what?
17:12amalloydefn: i don't know actually
17:13amalloyit looks like it found 1.0 okay on my machine, and that doesn't have the function he wants either
17:13amalloyso...
17:13amalloyymasory: why would you want that?
17:14ymasoryamalloy: i know it's not beautiful
17:15amalloywell, maybe show the context you want it in, so that if anything makes more sense we can spot it?
17:16ymasoryfunny, there's a whole blog post on this: http://copperthoughts.com/p/initial-thoughts-on-clojure-mostly-awesome/
17:17amalloyi mean, you could write one yourself but my first pass is pretty awful:
17:17amalloy(let [vec [:a :b :c]] (some (comp #{:c} vec) (range (count vec))))
17:18amalloy&(let [vec [:a :b :c]] (some (comp #{:c} vec) (range (count vec))))
17:18sexpbot⟹ :c
17:18amalloy&(let [vec [:a :b :c]] (first (filter (comp #{:c} vec) (range (count vec)))))
17:18sexpbot⟹ 2
17:19amalloyymasory: ^^?
17:19ymasoryyeah i think this is an indication that i shouldn't be doing things this way
17:20ymasoryalthough it's nice to have the option of linear-time operations in the stdlib
17:20ymasoryi'll put on my refactoring hat
17:20amalloy*chuckle*
17:58kzarI'm getting "Wrong number of args(5) passed to core$for", any ideas? (for [tone tones] (.write tone 0 (count tone)))
18:00amalloykzar: that looks fine to me, and if i enter it in the repl (with a faked-up definition of tones) it works. are you sure that's your whole statement?
18:01kzaramalloy: Yea it's definately closed in a way that means I'm not passing all that stuff to for. I think maybe it's got something to do with what .write returns?
18:02amalloyno, cause .write isn't getting a chance to be called
18:02kzaramalloy: It's inside a doto, could that matter?
18:02amalloyyessssss
18:03kzaramalloy: So can you not put for loops inside a doto?
18:03amalloytry gisting the (doto ... (for...)) thing, or even just macroexpanding it locally
18:04kzarI've just thought of a better way to do this, I was going to loop through and write each byte array, I could just join all the arrays and write them at once
18:04amalloy(doto x (for [a b] (c a))) will expand into (let [x# x] (for x# [a b] (c a)) x#)
18:05amalloy&(macroexpand '(doto x (for [a b] (c a))))
18:05sexpbotjava.lang.IllegalArgumentException: Wrong number of args (5) passed to: core$for
18:05kzaroh I see
18:05kzaramalloy: Thanks man, that was confusing me
18:06amalloy&(macroexpand '(doto x ("for" [a b] (c a))))
18:06sexpbot⟹ (let* [G__11374 x] ("for" G__11374 [a b] (c a)) G__11374)
18:07amalloybut remember (for) is lazy. i fear you're about to run into another problem
18:08kzarI was forKED on a few levels there 'eh
18:08amalloy*groan*
18:08kzarheh
18:10amalloywell, now i know a new question to ask when someone's code generates impossible errors: "Is it inside a macro that rewrites your code to something different?"
18:10kzarheh yea, I did wonder but I assumed I was just being dumb
18:11amalloyyeah, sadly doto can not read your mind and realize you don't want form x to be changed
18:11amalloythere is a gross hack you can use though
18:11kzarI guess you could only apply the doto magic to functions starting with a '.'
18:12amalloy&(macroexpand '(doto x (whatever) (#(.write %))))
18:12sexpbot⟹ (let* [G__11378 x] (whatever G__11378) ((fn* [p1__11377#] (dot p1__11377# "write")) G__11378) G__11378)
18:12technomancynooooo... /me wants to keep his (doto 'clojure.set require in-ns) trick. =)
18:12amalloyhahaha that's horrible
18:12technomancyI know.
18:13technomancyI'm allowed to like horrible things.
18:13amalloyno arguments here
18:13amalloyyou should consider rewriting your code with enough macros that you never type the same symbol twice
18:13kzarI'm well on my way to a sub-bass clojure powered rendition of Smoke on the Water
18:14amalloysounds fun, kzar
18:25amalloyanyway kzar you can't do that doto .-magic stuff, because lots of functions have side effects. eg println, my-special-log-fn...
18:28kzaramalloy: Yea gotya
18:32Raynesamalloy: You.
18:33amalloy*cower*
18:33Raynesamalloy: Have you done any sexpbotty things while I've been gone? Such as fixed the source command to work with contrib functions.
18:33amalloyRaynes: no, been busy today
18:33amalloyplus, a coworker brought her puppy to the office
18:33RaynesDamn. That means I have to do it.
18:34amalloyyeah, i still plan to do the wordwrap stuff but not right away
18:36amalloyinstead i get to work with such lovely gems as foreach( array(1,2,3,4,5,6) as $i )
18:41octe(18
18:43Raynesamalloy: Actually, it looks like contrib functions don't store line numbers in their metadata. So, nothing needs to change.
18:43RaynesIt wouldn't work regardless.
18:46amalloyRaynes: untrue?
18:46Raynes&(meta clojure.contrib.json/pprint-json)
18:46sexpbot⟹ {:ns #<Namespace clojure.contrib.json>, :name pprint-json}
18:46amalloyuser=> (:line (meta #'clojure.contrib.math/expt))
18:46amalloy101
18:46Raynes&(meta clojure.contrib.math/expt)
18:46sexpbotjava.lang.ClassNotFoundException: clojure.contrib.math
18:47Raynes&(require clojure.contrib.math)
18:47sexpbotjava.lang.ClassNotFoundException: clojure.contrib.math
18:47RaynesHe lies.
18:47Raynes&(require 'clojure.contrib.math)
18:47sexpbotjava.io.FileNotFoundException: Could not locate clojure/contrib/math__init.class or clojure/contrib/math.clj on classpath:
18:47amalloyi don't see meta for json either, at my repl
18:47amalloyso it looks like a by-package issue
18:48RaynesRight. If it works for *some* of them, it still needs to be fixed then.
18:48RaynesI'll do it in a little while. I've got a shower to clean.
19:10kzarIf I've got a vector of vectors how can I use map with them? Something like (map + [[1 2 3] [1 2 3]])
19:17kzarOh I got it (apply #(map + %1 %2) [[1 2 3] [1 2 3]])
19:18amalloykzar: a little over-verbose there
19:18rata_$(apply map + [[1 2 3] [1 2 3]])
19:18rata_,(apply map + [[1 2 3] [1 2 3]])
19:18clojurebot(2 4 6)
19:18amalloy&(apply map + [[1 2 3] [1 2 3]])
19:18sexpbot⟹ (2 4 6)
19:19rata_it was &, not $
19:20kzaroo thanks guys
19:25rata_good bye guys, see you tomorrow
19:25kzarcya
19:25KirinDave,1
19:26clojurebot1
19:26KirinDaveSo why did that syntax change?
19:26KirinDaveOh, it didn't.
19:26KirinDaveIt's a new bot.
19:26dysingerit's so useful
19:26dysinger:|
19:26KirinDaveWhee.
19:27KirinDaveSometimes it helps when explaining something
19:27amalloysexpbot has been around for quite a while, KirinDave
19:27KirinDaveamalloy: I've never seen him used for anything before today. Usually it's clojurebot
19:27amalloyyeah, he's not as popular. getting more so though
19:28dysingercalling it "he" might be contributing to that
19:28amalloyhe also has some &|(apply str (repeat 3 "sweet "))|& new features
19:28sexpbot⟹ "sweet sweet sweet "
19:29KirinDaveOh that's coo
19:30amalloyyeah. it also allows multiple evals per msg: &|(range 4)|& vs &|(take 4 (drop 4 (range)))|&
19:30sexpbot(range 4) ⟹ (0 1 2 3)
19:30sexpbot(take 4 (drop 4 (range))) ⟹ (4 5 6 7)
19:33KirinDaveThat's pretty awesome.
19:33KirinDavedysinger: What's wrong with anthropomorphizing technology? I think it's probably an essential skill for our craft!
19:34dysinger:)
19:34amalloyKirinDave: the only complaint i've heard is that lambdabot is female so why aren't clojurebot and sexpbot
19:34KirinDaveamalloy: Lambdabot sounds like a female
19:34KirinDavesexpbot being called female makes implicit sex jokes.
19:34amalloydoes she? i haven't been in #lisp forever
19:35KirinDaveamalloy: I mena the name.
19:35amalloyor do you just mean the name ends with a
19:35amalloyah
19:35hiredmanclojurebot is a cold unfeeling genderless mechanism
19:35technomancythat way we don't feel as bad about abusing it
19:35amalloyhiredman: Cool story, bro
19:35hiredman~clojurebot is a cold unfeeling genderless mechanism
19:35clojurebotOk.
19:39amalloyKirinDave: you prefer explicit sex jokes? (ha, ha)
19:39KirinDaveamalloy: Do you really want to get into this conversation at 4:30 on a friday? :D
19:39KirinDaveI've got clojure to write.
19:43qedDoes anyone know the link to that blog post or talk that demonstrated how clojures patens are on the outside instead of inside?
19:52scgilardithis mentions it (search for "fewer"): http://thinkrelevance.com/blog/2008/08/12/java-next-2-java-interop.html
19:54danishkirelI am playing with protocols: https://gist.github.com/665050 Unfortunately I don't get what I am expecting. Can I extend protocols with interfaces like I am trying to do?
19:56amalloydanishkirel: not a protocol expert here, and this doesn't address your question at all, but why have nsim? just (def nsim (complement sim)) once and you're done forever
19:56danishkirelThe goal is to be able to compare vectors of numbers that are nearly but not identical (due to numerical precision).
19:57danishkirelHey. Thanks. Didn't think about that.
19:58amalloyi wouldn't expect you can extend-protocol to interfaces, but i don't know. you could do this with a multimethod instead, which would be my choice
19:58amalloybut maybe just because i understand multimethods and not protocols :P
19:58danishkirelI tried to extend clojure.lang.PersistentVector which accomplishes what I need but I thought doing it on ISeq is way cooler
19:59amalloyyou also don't need to do the manual loop yourself. check for equal lengths, then:
19:59amalloy(every? (partial apply sim) (map vector a b)) should be the same as your loop
19:59danishkirelmultimethods would probably work. I just thought the dispatch would also work on implemented Interfaces.
20:01danishkirelYeah amalloy but the check for equal lengths might double the costs - I might have to traverse the seq twice.
20:01amalloy&(counted? [])
20:01sexpbot⟹ true
20:01amalloy&(counted? ())
20:01sexpbot⟹ true
20:02amalloy&(counted? (range 10))
20:02sexpbot⟹ false
20:02amalloyhm
20:03dysingeramalloy: you know that your clojure repl at the command line on your desktop can evaluate clojure too right ?
20:04amalloydysinger: hilarious, but i'm pointing this out for danishkirel, who was worrying about the cost of (count seq)
20:05dysinger:)
20:05amalloydysinger: actually i do all my work via /msg sexpbot (...)
20:05amalloyit's getting to be a pain for larger programs
20:06danishkirelGreat! Didn't know counted? and also didn't know Lists can be counted in constant time in clojure :)
20:10amalloydanishkirel: just note the thing about (range) - lazyseqs aren't counted, and i think that's true even if you walk them then count them
20:11amalloyyeah, thinking about it i'm sure they never get counted
20:12danishkirelLot's of work to count infinite lazy seqs...
20:13amalloyyeah, and even finite ones are a problem
20:14danishkirelI think (every? identity (map sim a b)) is sexier than (every? (partial apply sim) (map vector a b)) :o
20:15danishkirelThanks for the insights amalloy. Good night everyone.
20:17tomojtoo bad every? isn't variadic
20:17tomoj*(every? < [1 2 3] [4 5 6])
20:20amalloy&(every? identity (map < [1 2 3] [4 5 6])) ; isn't that bad
20:20sexpbot⟹ true
20:20tomojs/too/a bit/
20:38Raynesdysinger: I saw you at the Conj. I should have introduced myself. :<
20:38RaynesFun lightning talk, by the way.
20:38dysinger:)
20:38dysingersorry to hear you got sick
20:39RaynesYeah. I was just happy it didn't kick in until after the conference ended.
20:39qedchouser: Have a link to your finger tree slides handy?
20:39RaynesWas a crappy trip home though. Especially getting through ATL.
20:39qedIm at a bar and am struggling to explain
20:39qed<- defn
20:40Raynesqed: I think they're in a repository on github.
20:41qedAh cool. Kudos if you provide a link before I can find it on mu phone
20:42Raynesqed: https://github.com/Chouser/talk-finger-tree
20:42qedThanks buddy
20:42amalloyRaynes: nearly done with word wrap. for some reason it's not wrapping the line with <sexpbot> right
20:43RaynesIs the arrow screwing it up?
20:43pppauli made cons!
20:43amalloynot sure. it shouldn't
20:43RaynesAlso, did I hardcode 'sexpbot' as the bot's name?
20:43RaynesIf so, fix that please. Look for the :name key in the irc map.
20:44RaynesI've got to run again. Keep me posted.
20:45chouserqed: http://talk-finger-tree.heroku.com/ if you haven't found that already
20:45qedYou rule.
20:45qedThanks.
20:45qedchouser: What was your impression of cljc?
20:46qedWas that a "good" attempt?
20:46chouserqed: haven't looked at it deeply enough yet
20:47amalloyk
20:47amalloyand yeah, you hardcoded
20:48qedIm very interested to know if it is solid. A ton of work to just plop into a github repo.
20:48pppaulfinger trees sound creepy
20:48qedSurprising he didn't solicit
20:48qedMuch help
20:49amalloyRaynes: okay, it was wrapping fine, but i was too dumb to notice
20:50pppaul(double-list [1 2 3 4])
20:50pppaul&(double-list [1 2 3 4])
20:50sexpbotjava.lang.Exception: Unable to resolve symbol: double-list in this context
20:50pppaul&(double-list 1 2 3 4)
20:50sexpbotjava.lang.Exception: Unable to resolve symbol: double-list in this context
20:50chouserpppaul: they're not in clojure itself
20:51pppaulnoticed
20:51seancorfieldchouser: someone indicated you might be responsible for clojure-dev mailing list approvals?
20:51pppaul&(triple-list 1 2 3 4 5)
20:51sexpbotjava.lang.Exception: Unable to resolve symbol: triple-list in this context
20:52pppaul&(lusty-list 1 2 3 4 5)
20:52sexpbotjava.lang.Exception: Unable to resolve symbol: lusty-list in this context
20:52seancorfield->(triple-list 1 2 3 4 5)
20:52sexpbotjava.lang.Exception: Unable to resolve symbol: triple-list in this context
20:52seancorfieldis there any difference between & and -> for sexpbot ?
20:53chouserseancorfield: sorry, no. I have some privs on the clojure group, but not clojure-dev.
20:53seancorfield'k... just curious...
20:54pppaul&(prn /u20002)
20:54sexpbotjava.lang.Exception: Invalid token: /u20002
20:54pppaul&(prn "/u20002")
20:54sexpbot⟹ "/u20002" nil
20:54pppaul&(prn "\u20002")
20:54sexpbot⟹ " 2" nil
20:55pppaul&(prn \u20002)
20:55sexpbotjava.lang.IllegalArgumentException: Invalid unicode character: \u20002
20:55pppaul&(prn \u2002)
20:55sexpbot⟹ \  nil
20:56amalloyseancorfield: no, & and -> are the same
20:56pppaul&(def cons :cons)
20:56sexpbotjava.lang.SecurityException: Code did not pass sandbox guidelines: (def)
20:56amalloy(except that there's an &|'inline|& version and no such thing for ->)
20:56sexpbot⟹ inline
20:57pppaulit would be really nice if sexpbot wasn't in a sandbox
20:57amalloypppaul: no, it wouldn't. you could abuse the bejeezus out of him, even by accident
20:57amalloyyou have a repl for that
20:57pppaullol
20:58seancorfieldthanx amalloy
20:58pppaulit would be nice for it to have some more freedom
20:58pppaulit would be cool if it could store some stuff in memory
20:59amalloypppaul: what if i did &(def str +)
20:59amalloythen anyone who wanted to use str would be screwed
20:59pppaulcould implement limitations
20:59amalloyyes, we did. it's called the sandbox :P
20:59pppaulahaha
20:59wsimpsonlol.
20:59pppauli want to bring my own sand in
20:59amalloyeverything that's sandboxed is because it's dangerous to leave open
21:00pppaul&(System.getProperty "java.class.path")
21:00sexpbotjava.lang.ClassNotFoundException: System.getProperty
21:00amalloyppp System/getProperty
21:01pppauloh yeah
21:01pppaul&(System/getProperty "java.class.path")
21:01sexpbotjava.security.AccessControlException: access denied (java.util.PropertyPermission java.class.path read)
21:01amalloyokay, granted. we could probably allow that
21:02pppaulit would be cool if you could allow people to define new symbols
21:03Raynesamalloy: No, we couldn't allow that.
21:03amalloyRaynes: "probably" :P...why not?
21:03Raynesamalloy: The JVM sandbox doesn't allow that. In general, stuff like that should be left alone.
21:03Raynes,(System/getProperty "java.class.path")
21:03clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission java.class.path read)
21:03RaynesHe agrees.
21:03amalloyRaynes: the jvm sandbox has configurable permissions
21:04RaynesI'm aware. But I don't like cherry picking.
21:04Raynes:p
21:04amalloysure. i'm not volunteering to allow it either
21:04amalloybut it wouldn't be harmful
21:05RaynesYeah.
21:05pppaulit would be really nice to allow for new symbol creation :)
21:05Raynespppaul: There are a whole crapload of complications that come from allowing for def.
21:05pppaulreally?
21:05RaynesEven if they could be resolved perfectly, it's not really worth the trouble. The best thing would be to have a per-person sandbox that deletes itself.
21:06RaynesIt's something to think about anyway.
21:06amalloyyes, per-person sandbox is on my "don't i wish" list
21:06pppaulthis sandbox sounds lonely
21:07pppaulwhat would be rules for deleting/resetting?
21:07amalloyN idle minutes would be my guess
21:07amalloycause sandboxes cost memory
21:08pppaulsounds like it could be confusing for people who use it
21:08amalloyyep
21:08amalloyso: one sandbox
21:09pppaul&(dotimes 1e100000 (* 1e500 1e500))
21:09sexpbotjava.lang.IllegalArgumentException: dotimes requires a vector for its binding
21:09pppaulaw
21:09pppaul(doc dotimes)
21:09clojurebot"([bindings & body]); bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1."
21:09amalloy&(dotimes [_ 1e100000] (* 1e500 1e500))
21:09sexpbotjava.lang.IllegalArgumentException: Value out of range for int: 9223372036854775807
21:10pppaul&(dotimes [i 1e1] (prn i))
21:10sexpbot⟹ 0 1 2 3 4 5 6 7 8 9 nil
21:10pppaul&(dotimes [i 1e1] (prn (range i)))
21:10sexpbot⟹ () (0) (0 1) (0 1 2) (0 1 2 3) (0 1 2 3 4) (0 1 2 3 4 5) (0 1 2 3 4 5 6) (0 1 2 3 4 5 6 7) (0 1 2 3 4 5 6 7 8) nil
21:11pppaul&(Thread/sleep 100)
21:11sexpbot⟹ nil
21:11pppaul&(Thread/sleep 1e1000000)
21:11pppaulzzz
21:11sexpbotExecution Timed Out!
21:12pppaulhow did you guys set up the time-out?
21:13pppaul(doc consl)
21:13clojurebotExcuse me?
21:14pppaul(doc clojurebot)
21:14clojurebotGabh mo leithscéal?
21:14pppaulwhat do people think of the finger trees?
21:17pppaulthe finger trees are supposed to replace vectors right?
21:19Raynesamalloy: Using a dirty deprecated Thread method.
21:20pppaulalways walking on the dirty side
21:20Rayneshttps://github.com/Raynes/sexpbot/blob/master/src/sexpbot/utilities.clj#L17
21:20RaynesI believe Chousuke wrote the original version of that function.
21:23amalloyRaynes: what? i wasn't watching
21:23Raynesamalloy: I replied to the wrong person.
21:23RaynesSorry.
21:25amalloyRaynes: how do i find the bot's name? i'm trying (-> @bot :config ((:server irc)) :bot-name) but getting NPE, i assume i'm using the wrong key somewhere
21:25RaynesDon't look in bot.
21:25RaynesLook in irc.
21:25RaynesUnder :name
21:25Raynes(-> @irc :name)
21:25amalloyoh
21:25amalloyk
21:26DeranderHey, is it possible to clojure.xml/parse a string containing xml?
21:26RaynesThe name can change during runtime, so looking in the configuration wont suffice.
21:27pppaul(doc clojure.xml/parse)
21:27clojurebot"([s] [s startparse]); Parses and loads the source s, which can be a File, InputStream or String naming a URI. Returns a tree of the xml/element struct-map, which has the keys :tag, :attrs, and :content. and accessor fns tag, attrs, and content. Other parsers can be supplied by passing startparse, a fn taking a source and a ContentHandler and returning a parser"
21:27jjidopppaul: finger trees are great as immutable structure, vectors are more useful as mutable structure
21:27amalloyRaynes: https://gist.github.com/665108 - any other features you want before i push?
21:27Deranderpppaul: that's the one. is it possible to make a string act as a file, inputstream or string?
21:28pppaulyeah, make it a stream
21:28pppaulsomehow
21:28Raynesamalloy: That's great.
21:28pppauli haven't used java in a long time
21:28jjidoDerander: strings are standard Java strings
21:28pppaulmaybe there are some examples
21:28amalloyDerander: there's something in clojure.java.io that does this
21:28Deranderamalloy: searching
21:28amalloyit's (with-in-str) or something like that
21:28Deranderjjido: yes
21:29Deranderamalloy: (as-file)?
21:29Derandertesing
21:29Raynes&(clojure.xml/parse (java.io.ByteArrayInputStream. (.getBytes "<x>blah</x>")))
21:29sexpbot⟹ {:tag :x, :attrs nil, :content ["blah"]}
21:30RaynesDerander: ^
21:30DeranderRaynes: thank you sir
21:31jjidoamalloy: what did you change in the bot?
21:31amalloyjjido: just now?
21:31jjidoyes
21:31amalloyhe word-wraps truncated results when he gists now
21:32amalloy(though it's not live yet; just my private sexpbot)
21:33DeranderRaynes: beautiful
21:33jjidoamalloy: the gist does not look truncated
21:34amalloy&(clojure.string/join " " (repeatedly 400 #(rand-int 1000)))
21:34sexpbot⟹ "218 885 379 490 168 370 927 708 923 106 250 958 47 428 498 611 788 195 892 809 108 694 519 300 880 326 887 559 608 983 127 298 118 215 24 385 365 246 379 482 733 662 551 166 902 116 406 162 695 702 347 330 53 771 496 460 682 809 618 548 747 670 874 142 405 895 7 568 894 53 179 327 355 71 243 706 56... http://gist.github.com/665110
21:34amalloyjjido: he truncates here, gists the whole thing
21:34jjidoamalloy: ooh nice!
21:34amalloywell, he's always done that
21:34amalloyi just made the gist prettier
21:34jjidoyeah
21:35amalloyRaynes: pushed to new branch wrap. heading home now
21:37alexykso how do we typehint with ^ -- a^String or String^a ?
21:39alexyk^String a, while I so hoped for a^String...
22:07samxtrying to get the netbeans/enclojure debugger working with clojure with little luck so far.. I'm able to start the debugger, but if I set a breakpoint and start the debugger, I just get the following error: 'Not able to submit breakpoint LineBreakpoint icm.clj : 47, reason: No executable location available at line 47 in class icm$eval3'. Anyone have a clue on what's wrong?
22:11amalloysamx: maybe your clojure forms were compiled without line number info in the classfiles?
22:11amalloyyou could try javap -l icm$eval3 to see
22:11amalloy(that's lower-case L)
22:12RaynesIt's obvious in my font.
22:13Raynesamalloy: Doooooood. That's a regeeeeeex. You're totally maintaining that monstrosity.
22:13amalloyRaynes: no worries. it's a pretty simple one
22:14RaynesNo regex is simple.
22:14RaynesEver.
22:15amalloy*smile* yeah, i know the feeling
22:15samxhmm.. i wasn't generating class files; maybe that's the problem
22:16amalloysamx: in theory it shouldn't be a problem, but it might be a way to find out what's going on
22:16amalloyawww Raynes, you fixed the exploit? i was planning a hilarious weekend of getting sexpbot kickbanned
22:16RaynesIndeed, I did. :p
22:18Raynesamalloy: Your changes are live.
22:18amalloysweet. i was just looking at the repo
22:18amalloybein like :( no changes
22:20amalloyRaynes: so i was kinda annoyed at having to pass bot-name through three levels of function calls. what are your thoughts about using (bindings) to make frequently-useful things like @bot and @irc available for free? i don't really know whether that's frowned on in clojure
22:21RaynesThere isn't really a good way to do that in that plugin.
22:22amalloywhy not? isn't that what dynamic bindings are for?
22:22RaynesYeah, but what would be the default?
22:22RaynesThere wouldn't be a default. You'd just be using dynamic binding to set it to avoid threading it through functions to get it where it needs to be.
22:23RaynesThat isn't a very good thing to do.
22:23amalloyright
22:23amalloyokay
22:26amalloyRaynes: is there a reason the gh-pages branch still exists?
22:26RaynesNo. It's useless and old.
22:26amalloyk. i'ma kill it
22:28amalloyall gone!
22:28Raynesamalloy: Has any changes been made to github.clj lately?
22:29amalloyummmmm, not that i can recall, why?
22:29Raynessexpbot stopped reporting commits a few days ago, but it's still responding to curl: curl -d"b=b" commits.acidrayne.net
22:29amalloygit log github.clj says last change was oct 25
22:29RaynesNo errors or anything. I'm inclined to think that github is broken, but that would be arrogant of me.
22:29RaynesWhat was that change?
22:29amalloyRaynes: github made some changes recently
22:30amalloysomething to do with https vs http
22:30RaynesThat could be the problem.
22:30amalloyninjudd was talking about them messing up cake
22:30clojurebotcheesecake is delicious.
22:30amalloyso he might be able to help
22:30RaynesShut up.
22:31ninjuddclojurebot: cake is http://cake.foolambda.com
22:31clojurebotOk.
22:31ninjuddclojurebot: cake?
22:31clojurebotcake is http://cake.foolambda.com
22:31ninjuddthank you
22:31amalloyninjudd: i've tried that before. he seems to forget after a while
22:31ninjuddcron job
22:31amalloyhe really loves cheesecake
22:31amalloyclojurebot: clojurebot?
22:31clojurebotclojurebot is like life: you make trade-offs
22:32amalloyhm. what happened to cold, unfeeling mechanism?
22:32RaynesThe https stuff wouldn't matter. It's redirection.
22:32RaynesI never request anything.
22:32RaynesI can test this though to see if it's working.
22:40Raynesninjudd: It actually was. Since I configure all of the repo urls beforehand, all my configuration is wrong because it's https now.
23:04hiredmanclojurebot: clojurebot is a multimap
23:04clojurebotIk begrijp
23:07Raynesclojurebot: sexpbot is not a clojurebot
23:07clojurebotAlles klar
23:08kzarclojurebot: paradox is not a paradox
23:08clojurebotOk.
23:24pppaul&(take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))
23:24sexpbot⟹ ([1 0] [2 0] [2 1] [3 0] [3 1] [3 2] [4 0] [4 1] [4 2] [4 3] [5 0] [5 1] [5 2] [5 3] [5 4] [6 0] [6 1] [6 2] [6 3] [6 4] [6 5] [7 0] [7 1] [7 2] [7 3] [7 4] [7 5] [7 6] [8 0] [8 1] [8 2] [8 3] [8 4] [8 5] [8 6] [8 7] [9 0] [9 1] [9 2] [9 3] [9 4] [9 5] [9 6] [9 7] [9 8] [10 0] [10 1] [10 2] [10 3] [... http://gist.github.com/665166
23:24pppaul&(take 100 (for [x (range 100000000) y (range 1000000) :while (< (* y y) x)] [x y]))
23:24sexpbot⟹ ([1 0] [2 0] [2 1] [3 0] [3 1] [4 0] [4 1] [5 0] [5 1] [5 2] [6 0] [6 1] [6 2] [7 0] [7 1] [7 2] [8 0] [8 1] [8 2] [9 0] [9 1] [9 2] [10 0] [10 1] [10 2] [10 3] [11 0] [11 1] [11 2] [11 3] [12 0] [12 1] [12 2] [12 3] [13 0] [13 1] [13 2] [13 3] [14 0] [14 1] [14 2] [14 3] [15 0] [15 1] [15 2] [15 3]... http://gist.github.com/665167
23:25pppaul&(take 100 (for [x (range 100000000) y (range 1000000) :while (= (* y y) x)] [x y]))
23:25sexpbotExecution Timed Out!
23:25pppaul&(take 100 (for [x (range 100) y (range 100) :while (= (* y y) x)] [x y]))
23:25sexpbot⟹ ([0 0])
23:25pppaul&(take 100 (for [x (range 1000) y (range 1000) :while (= (* y y) x)] [x y]))
23:25sexpbot⟹ ([0 0])
23:25pppaul&(take 100 (for [x (range 1000) y (range 1000) :while (= (+ y y) x)] [x y]))
23:25sexpbot⟹ ([0 0])
23:26pppauli have no idea what i'm doing
23:26pppaul&(take 100 (for [x (range 1000) y (range 1000) :while (= y x)] [x y]))
23:26sexpbot⟹ ([0 0])
23:27pppaul&(take 100 (for [x (range 10) y (range 10) ] [x y]))
23:27sexpbot⟹ ([0 0] [0 1] [0 2] [0 3] [0 4] [0 5] [0 6] [0 7] [0 8] [0 9] [1 0] [1 1] [1 2] [1 3] [1 4] [1 5] [1 6] [1 7] [1 8] [1 9] [2 0] [2 1] [2 2] [2 3] [2 4] [2 5] [2 6] [2 7] [2 8] [2 9] [3 0] [3 1] [3 2] [3 3] [3 4] [3 5] [3 6] [3 7] [3 8] [3 9] [4 0] [4 1] [4 2] [4 3] [4 4] [4 5] [4 6] [4 7] [4 8] [4 9]... http://gist.github.com/665170
23:27pppaul&(take 100 (for [x (range 10) y (range 10) ] [(* x y)]))
23:27sexpbot⟹ ([0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [0] [2] [4] [6] [8] [10] [12] [14] [16] [18] [0] [3] [6] [9] [12] [15] [18] [21] [24] [27] [0] [4] [8] [12] [16] [20] [24] [28] [32] [36] [0] [5] [10] [15] [20] [25] [30] [35] [40] [45] [0] [6] [12] [18] [24] [30] [36] ... http://gist.github.com/665171
23:28pppaul&(take 100 (for [x (iterate inc 10) y (iterate inc 10) ] [(* x y)]))
23:28sexpbot⟹ ([100] [110] [120] [130] [140] [150] [160] [170] [180] [190] [200] [210] [220] [230] [240] [250] [260] [270] [280] [290] [300] [310] [320] [330] [340] [350] [360] [370] [380] [390] [400] [410] [420] [430] [440] [450] [460] [470] [480] [490] [500] [510] [520] [530] [540] [550] [560] [570] [580] [590]... http://gist.github.com/665172
23:28amalloyomg pppaul. please use /msg
23:28pppaul^_^
23:35Raynespppaulese use /msg :P
23:53defnhttp://www.thinkgeek.com/gadgets/travel-outdoors/ab44/
23:53defnordered.