#clojure logs

2010-10-20

00:28notsonerdysunnyHello everybody...
00:28notsonerdysunnyGood Morning
00:29notsonerdysunnyI remember reading that the concept of "private" is only convention .. and it is easy to acess the namespace private vars with some special syntax
00:29notsonerdysunnycan anybody correct me If I am wrong?
00:29notsonerdysunnyor can you tell me how to acess the private vars..
00:30notsonerdysunnyit can very usefull from the repl
00:32zkimnotsonerdysunny: I think it's #'foo/private-var
00:50LauJensenMorning guys
00:59notsonerdysunnyzkim: I don't quiet get it
00:59notsonerdysunnylet us say I am in namespace user
00:59notsonerdysunnyand spread is a private variable in 'clojure.core
01:00notsonerdysunnyactually spread is a function
01:00notsonerdysunnycan you show me how to call it from 'user namespace
01:00zkimnotsonerdysunny: so I believe #'clojure.core/spread would work
01:00zkim,(doc spread)
01:00clojurebotNo entiendo
01:00zkimduh
01:00zkim(#'clojure.core/spread arg1 arg2)
01:00zkim,(#'clojure.core/spread arg1 arg2)
01:00clojurebotjava.lang.Exception: Unable to resolve symbol: arg1 in this context
01:01zkim,(#'clojure.core/spread 1)
01:01clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer
01:01zkimwhat's the arglist for spread?
01:01zkim,(#'clojure.core/spread [1 2 3])
01:01clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer
01:01zkimugh
01:02zkimnotsonerdysunny: well, you get the idea
01:03notsonerdysunnyzkim .. I wan't to run the (clojure.rep/source #'clojure.core/spread)
01:03notsonerdysunnyzkim .. I wan't to run the (clojure.repl/source #'clojure.core/spread)
01:03notsonerdysunnyzkim: but does not seem to work
01:03zkimnotsonerdysunny: i think source takes a symbol?
01:04zkim,(doc source)
01:04clojurebot"clojure.contrib.repl-utils/source;[[n]]; Prints the source code for the given symbol, if it can find it. This requires that the symbol resolve to a Var defined in a namespace for which the .clj is in the classpath. Example: (source filter)"
01:04notsonerdysunnyyea thanks zkim
01:04notsonerdysunnyit does work..
01:53duncanm_dum de dum
01:57Deranderduncanm: my brother's name is duncan.
01:57Deranderour last name is Moreland
01:57Deranderare you my brother?
01:58duncanmno i'm not
01:58Deranderjust checking
02:24_rata_hi
02:33G0SUB_rata_
02:33_rata_G0SUB, what?
02:33G0SUB_rata_: I just greeted you :)
02:34_rata_hi :)
02:34_rata_can an agent contain refs?
02:37G0SUB_rata_: yes.
02:38_rata_thanks
02:38tomojLicenser: yo
02:38tomojerr
02:38tomojLauJensen: yo
02:39Licenserhi tomoj
02:39_rata_is there a predicate that returns true for lists, vectors, sets and seqs, but not for maps?
02:39tomojsorry misping
02:42tomojsets aren't sequential
02:42tomojwhy do you want such a predicate? just curious
02:43G0SUB,(map #(and (coll? %) (not (map? %))) [[1 2 3] '(1 2 3) #{1 2 3} {:a 1 :b 2 :c 3} (seq [1 2 3])])
02:43clojurebot(true true true false true)
02:44G0SUB_rata_: ^^^^^
02:44_rata_G0SUB, thanks again :)
02:45G0SUB_rata_: you are welcome.
02:46_rata_tomoj, because I'm writing a function called choice that for maps selects one key based on the weights given by the values, but when the function receives another collection, I want it to assume a uniform distribution
02:47tomoj#(and (not (map? %)) (coll? %)) ?
02:48_rata_tomoj, yes, that works
02:49tomojhmm
02:49tomojwhat if you make a Distribution protocol and implement it for maps and collections?
02:49tomojthen you could create custom distributions with reify or whatever too
02:49_rata_I don't think such a basic function requires so much sophistication
02:50tomojsure, I was thinking a suite of distribution-related functions
02:50_rata_It's just an appendix of the program... it's indeed in the misc.clj file :)
02:50_rata_yeah, that would be great
02:50tomojI guess incanter already has something like that
02:51_rata_I suppose clojure.contrib.probabilities.finite-distributions is for that, but could understand it
02:54_rata_s/could/couldn't/
02:54sexpbot<_rata_> I suppose clojure.contrib.probabilities.finite-distributions is for that, but couldn't understand it
02:58LauJensenHi tomoj, hows the screencast coming along?
02:58tomojthat's what I was going to ask you about
02:58G0SUBLauJensen: are you coming to Conj?
02:58LauJensenG0SUB: Unfortunately not - I fly out to Frankfurt this monday for Conj Labs
02:58tomojI'm working on some code now and I was considering recording so I can go back and look and what I was doing
02:59G0SUBLauJensen: what about cgrand?
02:59LauJensenG0SUB: He'll be there
02:59G0SUBLauJensen: OK. Will miss you at the Conj.
02:59LauJensenYea dont rub it in - I already feel guilty for not going :)
02:59tomojhmm.. guess I will watch and try to clip out parts that look good
03:00tomojthe point to try to get a rough guess about whether my paredit chops are good enough yet for your satisfaction :)
03:00LauJensenhehe - Yea Im really hoping I'd be impressed. Its been a while since I added something new to my toolbox
03:02tomojif you were not impressed, I am enough of a zealot to believe that it's only because I haven't yet achieved paredit nirvana
03:02tomoj(and thus should delay any screencasting)
03:03DeranderI only use paredit for slurp, barf and raise
03:03DeranderI am underutilizing it
03:03G0SUBLauJensen: hehe
03:03LauJensenDerander: Makes me barf as well
03:03Deranderaw
03:03LauJensentomoj: Well - I'd be happy to do a preview of it before you go live :)
03:03tomojthanks
03:04LauJensenAnd note, Im not an unfair critic - If its cool, I'll use it, if not, I'll tell you why I think I have a better alternative
03:04G0SUBtomoj: are you doing a paredit screencast?
03:05tomojI'd like to
03:05DeranderI'd like to watch
03:06G0SUBtomoj: cool. let me know if you need any help in choosing what features to show :)
03:07TobiasRaedermorning everybody
03:09tomojmy notes so far https://gist.github.com/c811ee55a2a136291f7c
03:09tomojer, https://gist.github.com/raw/c811ee55a2a136291f7c/34514ed44e968fa754d57c486741a04fe2feeb36/paredit.org
03:09tomojeh, guess gist does a decent job at that .org
03:39esjMorning good people
03:41lypanovmorning esj
04:02lpetithi there
04:03esjmorning brother-of-lau
04:04LauJensenMorning guys
04:07raekhow is "Lau" pronounced in Danish anyway? With a diphthong like German "au"? With or without stød?
04:28tomojhmm.. I just felt like I wanted to extend a protocol to [Ljava.lang.Byte;
04:28tomojdoes that even make any sense?
04:28hiredmanno
04:29hiredmanif you are going to extend it something it should be [B
04:29tomojoh
04:29tomojso can you extend to [B
04:30LauJensenraek: Its not too different from "wow" :)
04:32esjmorning Lau, didn't see you wander in
04:33LauJensenMorning esj. I greeted you 30 minutes ago when you walked in :)
04:33tomojaha
04:33esjLauJensen: no, that was your brother, Laurent.
04:33tomojyou can do (extend-protocol FooProtocol io/*byte-array-type* (...))
04:33esjanyway....
04:49LauJensenAnybody here with some design-fu and 5 minutes to spare?
05:44ossarehwill something like this cause a memory issue eventually? (defn loop-with-delay [delay-ms fn] (Thread/sleep delay-ms) (fn) (loop-with-delay delay-ms fn)) (loop-with-delay 1000 #(prn "hello"))
05:45ossarehmemory or fd issue..
05:47Chousuke_ossareh: use recur instead
05:47LauJensenossareh: Its similar to this
05:47LauJensen,(letfn [(tst [] (tst))] (tst))
05:47clojurebotjava.lang.StackOverflowError
05:47LauJensenAnd yes it will overflow due to a limitation of the JVM. Do what Chousuke_ said instead
05:47LauJensen,(letfn [(tst [] (tst))] (recur))
05:47clojurebotExecution Timed Out
05:47lypanovanyone other than me want a llvm based clojure after all the crap with oracle?
05:48Chousukelypanov: wait, what.
05:48ChousukeLauJensen: even
05:48lypanov(yeah i know it has a huge downside - no java integration)
05:48ChousukeLauJensen: why did that time out
05:48Chousukewhy did it even work?
05:48LauJensenChousuke: Because clojurebot kills it if it doesnt return after 10 secs. It will never return
05:48ossarehChousuke: thanks! (and LauJensen too)
05:49ChousukeLauJensen: no but you made a function that calls itself.
05:49ChousukeLauJensen: then you just called recur
05:49Chousukewhere's the recur target?
05:49Chousukewhat.
05:49LauJensenChousuke: The function itself or loop constitute recur targets
05:49LauJensen(defn call-me [] (do stuff) (recur)) calls itself
05:49ChousukeLauJensen: but you don't call recur within the function
05:50LauJensenhehe, right, I misplaced it
05:50LauJensen,(recur)
05:50clojurebotExecution Timed Out
05:50Chousukehuh
05:51lpetit,(macroexpand-1 '(recur))
05:51clojurebot(recur)
05:51lpetithum
05:51ossareh(doc recur)
05:51clojurebotPardon?
05:51ossareh,(doc recur)
05:51clojurebotNo entiendo
05:51lpetit,(doc recur)
05:51clojurebotGabh mo leithscéal?
05:51lpetitargh
05:51lypanovlol
05:52ossarehlypanov: what crap with oracle?
05:52lypanovossareh: suing google over dalvik for example.
05:52lypanovi'm just waiting for who is next.
05:52Chousukerecur is a special form
05:53Chousukeso the doc for it is on the website
05:53lypanovand seeing what oracle did with openoffice, i trust them even less than i trusted sun to keep the jvm going well.
05:54lypanovossareh: ah, already discussed? one sentence conclusion would be fine :)
05:54LauJensenlypanov: What happend to openoffice?
05:55lypanovLauJensen: http://arstechnica.com/open-source/news/2010/10/oracle-wants-libreoffice-members-to-leave-ooo-council.ars
05:56ossarehlypanov: to the best of my knowledge the google / dalvik situation has no baring on any languages running on the JVM. dalvik is cross compiler from java code to another VM. Oracle are suing google because they beleive some IP is being infringed upon in the dalvik VM. (disclaimer: this is what I get from SF coffee shops - I've not read much about it)
05:57lypanovgoogle went dalvik route exactly so they could ignore then suns control over what java is.
05:57LauJensenlypanov: Well. Oracle has always been clear in their intent. I dont think they can kill Java though.
05:58lypanovthey own java and with the dalvik move they made that clear.
05:58lypanovgiven the openoffice move, whats next, attacks on icetea?
05:59lypanovossareh: btw afaiu it more relates to the use of the java language. so yes, i agree with you, it has nothing to do with clojure.
05:59lypanovi
05:59lypanovoops
05:59lypanovi just don't think oracle is going to continue the jvm in a way we might like seeing 3 years from now. and i don't want to use mono... so yeah.
06:02ossarehLauJensen: that worked very nicely - thanks
06:02LauJensennp
06:09notsonerdysunnyhow would one compare two strings .. is there a native function?
06:09notsonerdysunnyfor ordering
06:10esji'd use the java .equals
06:11esjbut probably a better way exists
06:11LauJensen,(sort [ "cde" "abc"])
06:11clojurebot("abc" "cde")
06:11jarpiain,(doc compare)
06:11clojurebot"([x y]); Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable"
06:12LauJensenor the other way around
06:12LauJensen,(sort #(compare %2 %1) [ "cde" "abc"])
06:12clojurebot("cde" "abc")
06:12LauJensennotsonerdysunny: good enough for ordering?
06:13esjpretty slick
06:16cgrandlittle known feature, all fns are potential comparator, Clojure knows ho wto turn an order fn in a comparator
06:16cgrand,(sort < [5 4 8])
06:16clojurebot(4 5 8)
06:16cgrand,(sort > [5 4 8])
06:16clojurebot(8 5 4)
06:17notsonerdysunny(compare [1 2 3] [4 5 6])
06:17notsonerdysunny,(compare [1 2 3] [4 5 6])
06:17clojurebot-1
06:17notsonerdysunnythanks LauJensen
06:18LauJensennp
06:18cgrand,(sort (comp - compare) [ "cde" "abc"])
06:18clojurebot("cde" "abc")
06:18cgrand(comp - XXX) reverse the XXX comparator
06:18notsonerdysunnycool .. :)
06:19notsonerdysunny8)
06:19notsonerdysunny8]
06:19notsonerdysunny8*)
06:33noidi,(meta (with-meta 'foo {:type :foo}))
06:33clojurebot{:type :foo}
06:34noidi,(meta ^{:type :foo} 'foo)
06:34clojurebotnil
06:34noidiwhy the difference?
06:34Chousukenoidi: you're putting the metadata on the list (quote foo), not on the symbol foo
06:34noidiwhat makes it even stranger is that the reader macro works e.g. for vectors
06:35noidiChousuke, ah, of course :)
06:35Chousukenoidi: since it's read-time.
06:35Chousuke,(meta '^{:type :foo} foo)
06:35clojurebot{:type :foo}
06:37noidithanks
06:43notsonerdysunny(doc ^)
06:43clojurebotUnmatched delimiter: )
06:43notsonerdysunny(doc ^ )
06:43clojurebotUnmatched delimiter: )
06:43notsonerdysunny(doc '^ )
06:43clojurebotUnmatched delimiter: )
06:43notsonerdysunny,(doc '^ )
06:43clojurebotUnmatched delimiter: )
06:45noidinotsonerdysunny, http://clojure.org/reader
06:45noidiunder "macro characters"
06:47notsonerdysunnythanks noidi ..
07:00noidi"Use the bang! only for things not safe in an STM transaction."
07:00noidihas this been elaborated somewhere?
07:00noidii.e. what things are and are not safe
07:01Chousukenoidi: referentially transparent functions are safe
07:01noidiFor example, I have a function that adds an event listener to a Swing widget. Should I add the bang or not?
07:01Chousukeprobably.
07:02Chousukethough I suppose if the unsafeness is obvious, you might not have to. :/
07:02noidiI think that guideline would be simpler if it talked about side effects and not STM transactions
07:02noidibut apparently some side effects are OK, since e.g. println does not end in a bang
07:02ChousukeI suppose the ! is meant to convey "this function looks safe, but is not!"
07:03noidiyeah, makes sense
07:07noidiso maybe the rule of thumb for code not part of clojure itself could be "end the function name in a bang iff it calls a function ending in a bang"
07:09Chousukeor if it does io but that is not immediately obvious
07:10LauJensenChousuke: if thats the case then add-actionlistener doesnt require a bang, but actionlistener! would
07:13Chousukemaybe
07:13Chousukeor maybe it's just preference :P
07:15noidiI still think that either the rule is not detailed enough, or println & co are named wrong
07:16noidithe "not safe" part is quite ambiguous. is incorrect operation "not safe"? or only the loss of data?
07:17Chousukewell, I suppose println is safe because it only prints things multiple times
07:17Chousukewhich usually doesn't affect anythign
07:17Chousukebut adding even listeners more than once probably is not safe
07:17Chousukeevent*
07:18Chousukewriting to a file certainly is not safe.
07:18noidiyeah
07:19noidiprintln in a transaction is a bug, but it doesn't get the program (or the rest of the system) in a messed up state (unless your doing something very very wrong, like driving another program with commands in your stdout:)
07:26noidiSo maybe the revised rule of thumb could be "End the function name in a bang! iff either of the following is true: a) The function calls a function ending in a bang. b) Someone will get in trouble if the function gets called 1000 times when you only asked for one." :)
07:30_ViWhy "(complie qqq)" fails with just "No such file or directory" when there is no "classes" directory? I think it should create one automatically or explicitly tell user to do it.
07:40LauJensenIm very happy to announce that Conj Labs is expanding our operation to new areas, read more about it on our new website http://conj-labs.eu/ or here http://news.ycombinator.com/item?id=1810777
07:41LauJensenBig thanks to lypanov and esj for helping with the site :)
07:41lypanovhttp://www.conj-labs.eu/
07:42lypanov(first one didn't work for me, saw the old one, could just be silly safari)
07:43LauJensenlypanov: its your cache
07:44lypanovaye, seems to be! congratz on new site!
07:45LauJensenThanks!
07:47TobiasRaeder@LauJEnsen Grats, sounds really nice and @lypanov me too, well might have to opportunity to visit the next conj-lab, a bit depending on the location :D
07:48LauJensenTobiasRaeder: Next lab is in London, pretty close to you
07:48TobiasRaeder@LauJensen Frankfurt is about the same i guess but yeah. Nice when is it?
07:48TobiasRaederIf my company doesn't pay i might just put some cash aside for it ;)
07:48LauJensenTobiasRaeder: All details are on the site, November30-December2
07:48TobiasRaederah okay, didnt see the new date already announced
07:49LauJensenIts just out today
07:49LauJensenJust now actually :)(
07:49TobiasRaeder:)
07:53cemerickLauJensen: European domination around the corner, it seems? :-)
07:53cemerickCongrats :-)
07:53LauJensencemerick: Thanks buddy
07:54RaynesMorning cemerick.
07:54cemerickMorning
07:54RaynesAnd LauJensen <3
07:54esjHello Raynes
07:54cemerickRaynes: Damn, it's Raynes on a schedule! ;-)
07:55RaynesI woke up before the alarm went off, thankfully.
07:55RaynesI hate waking up to an alarm.
07:55RaynesMight as well slap me in the face to wake me up.
07:55Raynes:\
07:56cemerickMmm, radio is always better.
07:56lypanovthat reminds me, need to get one of those big light things.
07:56esjthis year I finally cracked and got one of those slowly lighting lamp guys. Its great.
07:56esjcomes with canned bird song too :)
07:56RaynesI set my phone's alarm tone to a Rooster.
07:56RaynesIt only makes sense, living in Alabama and all.
07:57cemerickRaynes: That sounds *horrible* :-P
07:57@rhickeysometimes way too early
07:57RaynesOh, trust me, it is. Loud.
07:57cemerickrhickey: I can sympathize with that one.
07:58cemerickSome days, I quite envy folks that trickle into work @ 9AM, after having gone to breakfast, or picking up a coffee and a paper or something.
08:00chouserworking from home, from asleep to typing in IRC in ~2 minutes
08:01chouserthough calling that "work" is of course a stretch
08:18DrakesonWhere did clojure.contrib.io/spit go?
08:20RaynesCore.
08:21lpetit(doc spit)
08:21clojurebot"([f content & options]); Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer."
08:21lpetit(ns-resolve 'spit)
08:21lpetit,(resolve 'spit)
08:21clojurebot#'clojure.core/spit
08:22DrakesonRaynes: oh, cool.
08:22Drakesonthanks
08:23Drakeson,(resolve 'slurp*)
08:23clojurebotnil
08:24Drakesonis clojure.core/slurp now similar to clojure.contrib.io/slurp*?
08:26RaynesDrakeson: Yeah. It uses clojure.java.io/reader.
08:26RaynesSo, it can slurp URLs and such.
08:27DrakesonI remember slurp was getting the encoding wrong. does clojure.java.io/reader care about encoding of the file?
08:27Drakesonsomething like reading utf-8 as latin-1
08:31LauJensenin .io you could set that as an argument
08:31tomojwhat is the difference between clojure.java.io and clojure.contrib.io?
08:32Drakesontomoj: the latter is gone
08:32tomojoh, I see
08:32tomojgone in 1.3.0-SNAPSHOT ?
08:32Drakesonyes
08:32tomojshoot
08:32Drakesonit's for the better
08:33Drakesonspit is the new io/spit, slurp is the new io/slurp*, ...
08:34tomojhmm
08:34tomojI don't see io/spit or io/slurp* in 1.2.0, are they only in the snapshot?
08:34Drakesonyes.
08:35Drakesonoh, wait, what?
08:35tomojI don't see clojure.java.io/spit or clojure.java.io/slurp*
08:37tomojoh, I misparsed
08:37tomojgot it
08:37Drakesonno more (:require [clojure.contrib.io :as io]) on top of every ns
08:38cemerickcontrib.io still exists, it's just a bit more sparse now
08:38ChousukeInstead it will be clojure.java.io :P
08:38@rhickeyTag line of the day - The CA is a hurdle, get over it!
08:39cemerickrhickey: should set that as the channel topic or something :-P
08:40@rhickeycemerick: I like the idea of having CAs at the Conj
08:40cemerickrhickey: I suggested it to wooby a while back -- haven't heard whether it's a go or not
08:40cemerickpresumably, you could print off a stack and leave them on the sponsor table or whatever
08:41cemerick(in the worst case, that is)
08:42DrakesonI wish I could put (:require [clojure .string .xml ...]) to mean (:require [clojure [string :as string] [xml :as xml] ...])
08:43cemericksome flavour of auto-aliasing has been discussed at length before
08:43cemerickit's a bit of a gnarly problem
08:44@rhickeycemerick: I'm sure we can, but I'm not carrying blank CAs on the plane - we can print some at the office there I presume
08:44cemerickheh, yeah, I wouldn't have suggested differently
08:45@rhickeycemerick: so, it's a go
08:45cemerickexcellent
08:45@rhickeyMany Conj attendees already have CAs
08:45cemerickYeah, I'd figured. Might as well get it to 100%.
08:47@rhickeynot really a goal - I only want people who want to contribute. CAs on their own are just more work for me
08:48lpetitrhickey: so how many CA to print, btw ;-)
08:48Emekahi
08:48@rhickeywe can get show of hands day one and print as needed
08:49kryftCA?
08:49clojurebotCA is Contributor Agreement: http://clojure.org/contributing
08:49kryftAh
08:49kryftWell, that was handy.
08:49kryftI wish the bot could handle all my stupid questions. :)
08:49Chousukeheh
08:50kryftAh, I finally have time to read JoC again. Chapters 6 and 7 (functional programming and laziness) are coming up. *drool*
08:51kryftI can't wait to start coding.
08:51kryftAlso, I can't wait to replace matlab with incanter. ;)
08:53javehello
08:54TobiasRaederhi :)
08:54javeI'm trying to make a macro that wraps the deftemplate macro in enlive
08:55javebut aparently I dont understand macros, so I have some issues
08:56TobiasRaederjust go ahead and make a gist or pastepin of the code you got or explain what your exactly trying
08:56jave`(deftemplate x "x.svg" [] ~@(y "a" :1 :2))
08:56javedeftemplate is an enlive macro
08:57javeI want to mace a macro "y" that returns a list like ([:1] (lala) [:2] (lala2))
08:58javeand have it be spliced into the arg list of deftemplate
08:58javethe "y" macro seems to work when I examine the output with macroexpand
09:02TobiasRaeder@jave can you make a gist with your macro etc?
09:02TobiasRaeder@jave just to have the complete code at one glance
09:02javehmm ill try
09:03javehavent used gist before, but its basicaly a paste service?
09:04TobiasRaederyeah
09:04TobiasRaederor pastebin or whatever you feel comfortable with
09:04javeyes
09:05Raynes$whatis gist
09:05sexpbotgist = http://gist.github.com
09:06RaynesIt also has Clojure highlighting.
09:06RaynesBut then again, lots of things do these days.
09:08javehttp://gist.github.com/636376
09:08javeso basically I just want to make a macro that uses macros to build long argument lists
09:09javebut aparantly I'm missing something
09:10javeit feels like the backtick operator doesnt work the way I'm used to
09:11chouserjave: I don't think you need ~ on any of the right-hand forms
09:12javehmm yes ive been experimenting with that. the svgtemplate macro wants function object there so it felt better to evaluate them there. but I dont think its necessary either, no
09:14chouseryou generally only use ~ when you have some data local to the macro itself that you want to insert into the form your macro is generating
09:15javeah
09:15chouserbut, does that fix your problem?
09:15javeno
09:15javeproblem is I get stuff like "java.lang.IllegalArgumentException: Wrong number of args (15) passed to: PersistentVector (NO_SOURCE_FILE:157)" that doesnt tell me anything
09:16RaynesIt tells you a lot, actually.
09:16chouseryeah, I just spotted that
09:16javehmm oh?
09:16Raynes$ ([1 2 3] 3 4 3)
09:16sexpbotjava.lang.IllegalArgumentException: Wrong number of args (3) passed to: PersistentVector
09:16RaynesSomething like that is happening somewhere.
09:17chouseroverview-unit appears to expand to a list whose first element is a vector, like Raynes just showed.
09:17RaynesA place where a vector is being used as a function and being passed the wrong number of arguments.
09:17RaynesVectors actually *are* functions, but they only take one argument (an index to look up within themselves).
09:17javeso, thats probably what I'm not getting then
09:17Raynes$ ([1 2 3] 1)
09:17sexpbot⟹ 2
09:18javeI wanted to splice in a list like that in another list with ~@
09:18javebut thats not quite the right way then?
09:21chouserit might work for overview-unit to simply be a function
09:22chouserwhen a macro expands to a list, Clojure will try to evaluate that list. When a function returns a list, you have just a list
09:26javeuhm, now it works, sort of
09:26gary_postermaravillas: I'm around now :-)
09:47s450r1rhickey: I'm glad to read you're interested in taking CAs at the Conj. I have mine ready to turn in :-)
09:47_foguschouser: That sounds very Zen!
10:00esj_fogus: good point, macros and Zen have the same root: suffering :)
10:01_fogusesj: Quote of the day!
10:02esj:)
10:04Raynes$max
10:04sexpbotThe most users ever in #clojure is 289
10:04Raynes~max
10:06Raynes$max
10:06sexpbotThe most users ever in #clojure is 290
10:06RaynesOh boy, it's working.
10:06cemerickhrm, clojurebot had it up in the mid 300's a while back
10:06Raynescemerick: I just now wrote that plugin.
10:06RaynesSo, the maximum users right now is all it's ever known.
10:07cemerickI figured...but if we can get the old number to plug in as the real known basis... :-)
10:07cemerick~max
10:07cemerickfeh
10:07Raynesclojurebot: ping
10:07clojurebotPONG!
10:07cemerickclojurebot has been vacillating between genius and short-bus lately.
10:08RaynesI thought you said you wouldn't be around today?
10:08RaynesI kind of wish I hadn't have packed yesterday. I have absolutely nothing to do but sit on nails and wait for tomorrow morning. :\
10:08cemerickplans changed, I get to bother all of you for another 7 hours or so
10:09lypanovRaynes: go port clojure to llvm.
10:09lypanovRaynes: and stand up. nails are bad.
10:09RaynesWhoa, horsey. I only have a day. ;)
10:10lypanovdo half of it then! :P
10:10Raynes:p
10:10lypanovthe other half can be finished over the coming 6 months
10:12cemerickclojure-on-chicken still seems like a better target
10:12RaynesBawk
10:15lypanovcemerick: on llvm has the advantage that in short term java libs can also run atop of vmkit and transition the rest over time
10:15Rayneslypanov: You never actually sent a blank line.
10:16lypanoveven worse. i see one.
10:16RaynesThe IRC protocol doesn't accept blank messages.
10:16lypanovcan't reproduce. i either entered a space or no one sees what i see and colloquy is smoking something good.
10:21cemericklypanov: I don't think "transitioning" java libs is a realistic option/objective.
10:21lypanovthen no transition, keep using them. but still requires vmkit no?
10:24cemerickOnly if using jvm libs is an absolute requirement. ClojureCLR certainly doesn't use them.
10:24lypanovi'm confused.
10:24cemerickThus the chicken/gambit target, both of which have rich libraries.
10:24cemerickOr ObjC.
10:24lypanovwhat do you mean by "transitioning" libs isn't a realistic objective then if you don't think we need existing jars?
10:26cemerickWe're talking past each other. You suggested llvm as a better host option because we can use jvm libs, which I don't really think is a driving consideration for a Clojure host platform.
10:26cemericke.g. if you need jvm libs, use the....jvm :-)
10:26lypanovah no, i was just saying that llvm has the added bonus that current code would actually work.
10:27lypanovi don't personally feel that in the long term the java side of things is at all important.
10:27cemerickI think it's critically important, if you care about the jvm or its libs. :-)
10:27lypanovbut good bindings to both existing c libs, and existing jvm libs, is just dang useful.
10:27cemerickIf not, then you might as well target a platform that is maximally suitable.
10:28lypanovagreed. so, llvm :P
10:28cemerickhah
10:29lypanovdon't know enough on chicken to comment.
10:29cemerickAs schemes go, it's pretty damn nice. Compiles to C as an intermediary.
10:29cemerickThere was a fellow from apple in here a while back.
10:30cemerickI half suspect the next impl will come out of nowhere -- someone knocking on it for a year quietly to avoid the bikeshedding, etc.
10:30lypanovscala llvm just randomly appeared.
10:32cemericklypanov: there's scala on llvm? Link?
10:32cemerickI see some msg board chatter about the possibility, but nothing concrete.
10:32lypanovhttp://github.com/greedy/scala
10:34cemerickthanks; very early days, then
10:34lypanov*nod*
10:34lypanovand not much activity
10:37lypanovcemerick: http://github.com/greedy/scala/blob/HEAD/README.llvm
10:37lypanovthe remaining stuff looks like fun :P
10:37cemerickYeah, I just skimmed that :-)
10:38cemerickAside from the geek porn aspect, I don't have any real use-case for a non-JVM/CLR Clojure, so it's all a bit academic.
10:38Chousukesomething that starts up really quickly would be nice
10:39chouserChousuke: amen
10:39chouserand better access to unix
10:39lypanovand c libs bindings that don't make you want to kill bunnies
10:39Rayneschouser: Your finger trees talk is on the first day of the Conj isn't?
10:39RaynesI'm pretty eager to hear that one.
10:39chouseryep
10:39cemerickI knew that would bring out the command-line jockeys...
10:39RaynesGoody.
10:39chousercemerick: :-)
10:39Chousukechouser: what's the status of your FT implementation anyway?
10:40chouserChousuke: I estimate about 2 days from being done enough to talk about. :-P
10:40Chousukeheh :P
10:40cemerickhell, what about a parrot/perl 6 hosting of clojure?
10:40RaynesParrot would be fun.
10:40cemerickThat might actually be attractive. *tons* of libs.
10:41RaynesI've been meaning to play with Perl 6. I wish they had threads implemented though. :(
10:41cemerickWow, they've really got the duke nukem forever release schedule down pat, huh?
10:41RaynesThey're doing Star releases every month now.
10:41Chousukewell, DNF came through. :D
10:41cemerickI've no idea what that means.
10:42Chousukeand it looks awesome enough.
10:42RaynesStar releases being "Okay for you to use, but be careful and expect bunnies to be killed."
10:42cemerickah
10:42cemerickand none of the frills included…like threads? :-O
10:42RaynesNo threads yet.
10:43Raynescemerick: http://rakudo.org/announce/rakudo-star/2010.09
10:43RaynesNo macros yet either.
10:46chousermet some people at strange loop who have a *lot* of rather well-engineered perl5 code to manipulate human genome data
10:47chouserand who work with biology folks who have been forced to learn perl5 to do their jobs, and aren't really interested in learning something else
10:47lypanovbah. automatically rewriting perl5 into clojure can't be any more difficult that human language parsing. i'd say just automate it.
10:47lypanovpoor biologists :(
10:48cemerickI was sorta excited about the prospect of perl 6 until clojure came along
10:48chouserso, they're hoping perl6 actually flies sometime soon
10:48RaynesThis is why we can't have nice things.
10:48chousercemerick: me too. now I'm ruined for any language with mutable collections or locals
10:49cemerickchouser: clojure on perl.....
10:50chouserperl6's macros and grammar manipulation were the main thing catching my eye
10:50lypanovchouser: it screamed "20 year project" to me
10:51lypanovthe specs took longer to write than i imagine most of clojure impl took.
10:57chouserhah! the mongodb query language is (mostly) homoiconic
10:57lypanovtrue. just data structures.
10:58chouserright
11:09s450r1chouser: I was pretty interested in Perl 6 when they first started talking about it as well, but then encountered Ruby, and decided not to wait. Now, clojure's come along and totally ruined me ;-)
11:12s450r1... and I have to use C# 1.1 at work...
11:13chouserbut you can do macros in C#, can't you? AST re-writing?
11:17edoloughlinCake looks nice. The persistent JVM would be a boon for those of us without the time to learn both Emacs and Clojure at the same time!
11:24lypanovedoloughlin: its helping me a lot. vimclojure (if you have experience there) isn't bad at all either.
11:34s450r1chouser: ah, you made me look again... as far as I can tell, you can do run-time macros in C# 3.0 and later, but not compile-time macros. When I looked a couple years ago, I seriously considered the Boo programming language which does have compile time macros, but they were dropping .NET 1.1 support :-p
11:34edoloughlinI'm using Eclipse & Counterclockwise. Mylyn is its killer feature.
11:36s450r1I console myself with the thought that we'll probably be moving to .NET 3.5 (maybe 4) within a year, and that hopefully Clojure for .NET will be more production-ready by then.
11:38chousers450r1: huh, I don't know what a run-time macro would be
11:43s450r1chouser: I got that phrase from http://themechanicalbride.blogspot.com/2007/03/runtime-macros-in-c-30.html
11:47lpetitchouser: isn't runtime macros somehow always reevaluated when called, something like that ? (so that you don't have to recompile every dependent code when you change a macro ?
12:00chouserlpetit: hm, dunno
12:00Drakesonhow does one do with-local-vars now?
12:05bhenryhttps://gist.github.com/8dbce1459f942b64c3a2 this makes output for a spreadsheet. i'm using ring. can i send the report as it fetches without holding onto the head? as it is now, a large report would create a giant string and send it to the browser all at once.
12:16s450r1lpetit: that seems to be case for the link I posted above. The author created a Macro.GetValue method that takes an Expression tree that automatically gets converted from a "lambda function", manipulates that Expression tree, compiles the manipulated Expression tree into a function and runs the function.
12:18lpetits450r1: yep. I think CL has runtime macros, too ..
12:24chousers450r1: but if you can keep a refernce to that compiled expression and use it each time, that's essentially the same as clojure macros, isn't it? code manipulated and compiled once, then reused as needed at runtime
12:26jonasenI can't get ants.clj to run with latest clojure. It fails on (send-off animator animation). Is it just me and my setup or can someone confirm this?
12:27Kruppes450r1: Could I get a link to what you guys are talking about? Sounds interesting but I missed the link.
12:27dnolenjonasen: latest clojure like 1.2.0?
12:27s450r1Kruppe: http://themechanicalbride.blogspot.com/2007/03/runtime-macros-in-c-30.html
12:27jonasendnolen: no, 1.3.0-master-SNAPSHOT
12:28jonasenaccording to (agent-error animator) it's a NPE
12:28Kruppes450r1: thanks :)
12:28dnolenjonasen: that's under some big changes, probably should wait for things to settle down.
12:31dnolenjonasen: or build your own 1.3.0 from a rev prior to the dynamic stuff.
12:34SirNickIs there any way to use defrecord and overwrite the seq method? Doing it directly results in a duplicate method error
12:34chouserif your defrecord isn't going to be a regular map, you want deftype instead
12:35chouserHm... "C# cannot translate arbitrary expressions or code blocks into data, only lambda functions so we will need to nest our expression inside one"
12:36SirNickchouser: but then I won't get the hashCode function or being able to use assoc
12:36chouserSirNick: yeah, you'll have to write those yourself
12:36lpetitchouser: sure, the code examples are a demonstration that it would not scale well "as is"
12:36SirNickdrat
12:36SirNickthanks
12:36chouserSirNick: some day we'll have a set of such functions available as a map to be merged into your deftype via extend
12:37chouserbut I don't know of such a thing yet
12:37SirNickchouser: yea that would be quite nice
12:38s450r1chouser: that sounds right. But the amount of code and brittleness of the code for the macro the author wrote seems painful. I'd rather have Lisp's macros ;-) Still, it's good to keep in mind.
12:39Kruppechouser: is it just me or is clojure slowly getting all the tools for typical O-O
12:39Chousuketypical, except immutable? :P
12:40KruppeChousuke: haha true i suppose.
12:40nathellcontrib devs: is issue #98 looked at?
12:40ChousukeClojure has no "native" tools for data encapsulation as far as I know.
12:40chouserKruppe: it's had most of them for quite a while
12:40chouserChousuke: closures. :-P
12:40Chousukechouser: well, I guess :P
12:41Kruppechouser: well yeah, you could use closures to roll your own. Like people do in scheme.
12:41chouserclosures for encapsulation, multimethods and heirarchies for inheritence and polymorphism
12:42Kruppechouser: deftype and defrecord plus protocols and this potential map of functions you could add to something
12:42chousermaps with type metadata for "type", that is the grouping of values into objects
12:42jonasendnolen: It works with a rev from 2010-10-14
12:43chousernamespaces for grouping methods
12:43chouserit's all there, just not all glommed onto the same "class" concept
12:44chouserand not all at best JVM speed until deftype and defprotocol
12:44Kruppechouser: yeah. Almost feels like I can use CLOS in clojure now (almost).
12:44dnolenjonasen: makes sense, the dynamic stuff landed right after that. You'll probably have to wait a while for all that to shakeout.
12:45jonasendnolen: ok, thanks!
13:02amalloy~source defn
13:16qbgHmm... :static -> :dynamic; 1.3 is going to be a huge change from 1.2...
13:19ohpauleez qbg: it's going to be a big change, but for 80% of all development, nothing will change. Your code will just be magically faster
13:19ohpauleezI pulled that percentage out of the air, it very well could be higher, but I don't see it being much lower
13:20qbgMeh, using binding on a var bound to function always felt strange anyways
13:21qbgStill, with the semantic changes, I'd be tempted to push the version number much closer to 2.0, but then again, I'm not Rich
13:22ohpauleezWell it's going to be 1.3, but we're branding it as Clojure3. We have a whole marketing team on it
13:22ohpauleez</java joke>
13:22qbg*pained groan*
13:25chouseronce upon a time, the major version number was going to match the age of clojure in years
13:25cemerickohpauleez: man, that wasn't even funny :-P :-)
13:26duncanmi'm coding some stuff with incanter, and i always :require the incanter libraries
13:26duncanmbut everytime i start up SLIME, i get these warnings: WARNING: flatten already refers to: #'clojure.core/flatten in namespace: incanter.transformations, being replaced by: #'clojure.contrib.seq-utils/flatten
13:26duncanmwhy is that happening?
13:26ohpauleezchouser: so the minor version isn't that far off then
13:26ohpauleezcemerick: haha I do what i can
13:26chouserohpauleez: good point
13:27lrennduncanm: you're using an old version of lein-swank.
13:27cemericklrenn: I suspect not, those warnings are coming due to incanter's ns decl's
13:28raekduncanm: note that swank-clojure.el (the elisp package, not the clojure lib) is deprecated
13:28duncanmoh
13:28lrennoh, missread that. I LuaJenson got the same errors yesterday due to an old swank dep.
13:28duncanmlrenn: lemme fix
13:29duncanmlrenn: where can i get the latest version?
13:29duncanmraek: i'm using lein
13:29duncanmand i have :dev-dependencies [[swank-clojure "1.2.1"]]
13:30lrennduncanm: no, i was wrong. this seems to affect other libs because flatten was added to clojure.core
13:30lrennduncanm: it's just that I ran into it yesterday with lein-swank i immediately thought of that.
13:30raekok. great! then at least that is not the problem. (just checking)
13:31duncanmlrenn: but shouldn't :as be scoping the name inside a namespace?
13:31cemerickduncanm: you're seeing those messages because incanter is `use`ing namespaces that contain functions of the same name as functions in clojure.core.
13:32cemerickThey'll only go away when incanter switches to use the clojure.core versions of those fns
13:32duncanmcemerick: instead of 'require as'... so, no harm then
13:32lrennduncanm: what version of contrib are you using?
13:32duncanm1.2.0
13:32cemerickduncanm: well, the fns in question were migrated into clojure.core, so incanter doesn't actually need the references to c.c.seq-utils etc.
13:33duncanmright
13:34duncanmokay, so my dev env isn't as messed up as i thought
13:34duncanmonwards to more bugfixing
13:34duncanmthanks!
13:37amalloyhooray, mailed in my CA today
13:38amalloysoon: fix all those damn doc ambiguities that have been bugging me
13:40cemerickamalloy: Thank you, ahead of time :-)
13:41ohpauleezamalloy: You beat me, I need to get on that!
13:46lrenni wonder if it makes sense for clojure-contrib to do what swank-clojure did...(when-not (ns-resolve 'clojure.core 'flatten)
13:57amalloylrenn: that's an incomplete expression. what is it that swank-clojure did with flatten?
13:59lrennamalloy: http://github.com/technomancy/swank-clojure/blob/master/src/swank/util.clj
13:59lrennit then evals the defn.
14:14rickmodeRing question: I'm getting NullPointerException at flash.clj:11 when trying to use wrap-flash. Anyone familiar with Ring's wrap-flash?
14:18lrennrickmode: wild guess, but are you using the wrap-session middleware? It looks like it would be required.
14:19rickmodelrenn: I tried that too. Something like (def app (-> #'my-routes (wrap-session) (wrap-flash) ......))
14:20bhenryrickmode can you gist the stacktrace?
14:21rickmodebhenry: ya... one sec while I figure out gist (I use github, but haven't used gist yet)
14:23lrennrickmode: (def app (-> my-routes wrap-session wrap-flash))
14:23amalloyrickmode: if you're using emacs, there's a package to have it create gists for you
14:23rickmodelrenn... oh... no parens? odd
14:23rickmodeamalloy: I'll look into that, thanks
14:24rickmodeamalloy: I use aquamacs (I need the mac training wheels still)
14:24RaynesThe parens are just irrelevant. They don't hurt anything.
14:24amalloyheh. no training wheels for windows users, so i just dove in
14:24Raynes$ (-> "a" (println"))
14:24sexpbotjava.lang.Exception: EOF while reading string
14:24Raynes$ (-> "a" (println))
14:24sexpbot⟹ a nil
14:24RaynesExcept ones eyes, that is.
14:24Raynes;)
14:25amalloy,(macroexpand '(-> "a" println))
14:25clojurebot(println "a")
14:25amalloy,(macroexpand '(-> "a" (println)))
14:25clojurebot(println "a")
14:25rickmodelrenn: http://gist.github.com/636998
14:25rickmodeer. bhenry: http://gist.github.com/636998
14:25RaynesIt only puts parens around them if they aren't already there.
14:26rickmodemy source file: http://gist.github.com/636999
14:27amalloythe one i've seen trip people up a few times is
14:27amalloy,(-> [1 2] ((fn [[a b]] [b a])))
14:27clojurebot[2 1]
14:29amalloypeople seem to forget the extra layer of parens around the fn to insert [2 1] into the invocation rather than the definition
14:29bhenryrickmode: when does the null pointer exception happen? what are you running?
14:29Raynes$ ((-> [a b] (fn [b a])) 1 2)
14:29sexpbot⟹ [2 1]
14:29rickmodebhenry: hitting any page. E.g., hitting http://localhost:8080/
14:30bhenryokay
14:30rickmodebhenry: runs fine w/o wrap-flash
14:31Raynesrickmode: Your first mistake is hitting those pages. Don't hit them! Just tap them very gently.
14:31amalloyRaynes: but my way is cooler. you don't get many excuses to include [[...]] or ((...)) in a single line of clojure
14:31rickmodeRaynes: alas the web is a blunt instrument.. lol
14:40rickmodeamalloy lrenn: ugh... it's order dependent. I need to put wrap-session *after* wrap-flash. The wrapper are used bottom up with respect to the order in the the thread (->) call. So lrenn you were right. It was my guess too, but I had the order wrong.
14:41rickmodeThanks guys. Just talking about it got me to the solution and a deeper understanding of these wrappers.
14:47nickikanybody used sandbar?
14:49rickmodenickit: I looked at it. It seems cool and I'm learning stuff looking at it. However it embodies a certain type of web site, so it isn't a general framework. I'm sticking with compojure myself.
14:51nickik@rickmode i use compojure to. Sandbar just provides some stuff you can use with compojure (or a other framework)
14:51nickik*too
14:51nickikthats what brenton does in his blog too
14:52rickmodenickit: indeed. Looking closely at the form and validation stuff specifically, it embodies a certain style of form and validation. Specifically how it renders inputs with labels and how it renders error messages.
14:53rickmodenickit: can't hurt much to try it / learn it.
14:53cemerickthe form stuff is interesting; I generally go for spring-security for auth things though
14:56rickmodecermerick: Does the use of Spring flow smoothly with Clojure? (I haven't considered using any Java libs / frameworks mainly because I'm not a fan of the bloat.)
14:57cemerickrickmode: Spring in general, no; spring-security, yes
14:58cemerickIt's a very slim module, focused solely on auth stuff
14:58rickmodecemerick: is there a clojure wrapper? (perhaps that even necessary)
14:58rickmodeer.. perhaps *that's not* even necessary
14:58cemerickit's fundamentally declarative
14:59tonylhello
14:59cemerickYou rope a servlet filter into your app via an extension to the web.xml
14:59tonyldoes anybody know if clojure has a language specification somewhere?
15:00cemerickIf you're not up to speed with that world, it's probably a day or two of fiddling...but then you have a highly reliable and well tested auth system with *tons* of plugins for e.g. oauth, openid, ldap, etc etc.
15:00tonylor how does clojure-clr is following clojure in jvm?
15:03tonylso no language spec? just the api documentation and what is explained in clojure.org?
15:03rickmodecemerick: I did java web stuff for years, so that's not a problem for me. I've used Java nearly exclusively from 2000 on, so I have a healthy appreciation of what it got right (GC, package structure, anonymous classes, inner classes) and a strong distaste for using it now.
15:03amalloytonyl: language specification? i mean, the syntax is "lisp", and the standard functions are the API docs. there's nothing left to specify
15:03cemericktonyl: there is no formal language spec, no
15:03cemerickwhat amalloy said :-)
15:04tonylwhat about the interoperability with the jvm?
15:04amalloyjust the special form . and some convenience macros
15:04RaynesWhy would that be in a spec? You can't interop with the JVM on the CLR.
15:04kmcamalloy, there's more a language than syntax and standard library
15:04amalloy(which are all in the API docs)
15:04kmcthere's this thing called "semantics"
15:04rickmodetonyl: Clojure is layered on top of those host language and runtime. It doesn't hide it.
15:04tonyltrue
15:05kmcClojure differs from Common Lisp in a number of ways, syntactic and semantic
15:05cemerickrickmode: In that case, I'd absolutely say use spring-security. I fundamentally wouldn't trust a reimplementation of such a thing if I could lay my hands on one that's trusted and widely vetted
15:05cemerickRaynes: . is the interop form on the CLR too
15:05tonylthanks for clarifying it guys
15:05kmcdon't forget that every special form constitutes new syntax
15:05Raynescemerick: Good point.
15:06kmcit's a dumb lie that "Lisp syntax is just parentheses"
15:06cemerickkmc: untrue; let, do, etc are special forms, but not syntactic constructs
15:06kmccemerick, how do you figure?
15:06cemerickKeywords, symbols, reader macro bits are.
15:06Raynes-> (doc let)
15:06sexpbot⟹ "Special Form: Please see http://clojure.org/special_forms#let&quot;
15:06kmcLisp languages have three layers of syntax; special forms are the top layer
15:06cemerickkmc: because they follow standard fn call semantics
15:06kmcno they don't
15:06kmcnot even close
15:07kmcthe fn call semantics are eval, then apply
15:07kmcthat doesn't tell you how to resolve a 'let'
15:07cemerickok, I retract that :-)
15:07kmcor a 'fn'
15:07kmcif i type (let (x 3 y 4) x) into DrScheme, it says "syntax error"
15:07kmcbecause in Scheme you write (let ((x 3) (y 4)) x)
15:07cemerickBut the point being, `fn` isn't syntax.
15:07kmcbut in Clojure you write (let [x 3 y 4] x) and not (let [(x y) (y 4)] x)
15:07kmcnow, tell me how this is not syntax
15:07cemerickwell, arg lists/vectors *are* syntax
15:08kmcno i mean, "let" has syntax, it expects a vector of even length
15:08kmcbut in Scheme, it expects a list of pairs
15:08kmcyou can map between these two trivially; it's really silly to say that this arbitrary choice is part of the semantics of "let"
15:08cemerickOK, defining syntax of enclosing forms is not the same as being different syntax.
15:09kmccemerick, what i'm saying is that the old claim that "Lisp syntax is just s-expressions" is false and disingenuous
15:09kmcto write syntactically correct Lisp / Scheme / Clojure you need to know how each special form works
15:09cemerickwell, I wouldn't argue with that
15:09chouserkmc: how about: Clojure's syntax is simple and regular compared to most non-Lisps
15:09cemerickBut special forms themselves are not syntax the way, e.g. #"regex" is.
15:10kmcchouser, i'll agree with that
15:10kmcR6RS is quite explicit about the fact that Lisp-like languages have three syntactic layers, while most languages have two
15:10chouserkmc: cool. I've also been uncomfortable with "lisp has no syntax"
15:10technomancyI don't think anyone actually says "lisp has no syntax" apart from being tongue-in-cheek.
15:10kmcLisp syntax *is* just s-expressions, if Lisp is just a language for writing nested lists
15:11kmcit's 'eval' that imposes that third layer
15:11rickmodekmc: maybe the wording should be "lisps have minimalist syntax"
15:11kmcwell, that depends
15:11kmchow many special forms does CL have?
15:11kmci don't know, really
15:12turbofailmaybe the wording should be "lisps have as much syntax as you feel like adding or using"
15:12cemerickkmc: There's way more syntax in clojure that is unassociated with special forms. They're not the determinant of the degree of syntax that exists.
15:14kmcdon't know what you mean
15:14hiredmanregex literals have syntax, but are not a special form
15:14kmcright
15:15kmcthere's also reader macros and other stuff i didn't talk about
15:15kmcwhich even further supports my claim that "lisp has no syntax" is a dumb lie
15:15kmcbut is not central to that claim
15:15hiredmanwell regex's are more or less reader macros, clojure just doesn't expose an extension mechanism for reader macros
15:15kmceven the untyped lambda calculus has one special form :)
15:15amalloyheh. i made the original dumb, lying claim, and i have to say i've been convinced
15:16cemerickamalloy: is that what this whole thing is about? :-)
15:16kmcamalloy, i don't mean to call you personally dumb etc.
15:16kmcit's an oft-repeated claim which has been annoying me a lot
15:16hiredmanthe point of lisp is, regular syntax (first thing in a list drives how the list is evaluated) and the ability to add syntax via macros
15:17amalloykmc: i know. if i'm offended i'll let you know by breaking into your house and leaving a note
15:17kmchaha
15:17tonylwhat about vectors and maps? are they extended syntax just structures?
15:17hiredmanthey are literal syntax for structures
15:17amalloyanyone have experience with cascalog? i'm researching ways to persist hadoop's map/reduce output to mysql, and was quite pleased to see cascalog listed as the only wrapper around Cascading
15:18hiredmanjust like () is literal syntax for list structures
15:18tonylbut lists literals can be called as a fn
15:19hiredmannope
15:19hiredmanlist literals are evaluated as function application
15:19kmcthink of your whole program as being inside an explicit (quote)
15:19tonylok, makes more sense now
15:20hiredmanvector literals are also evaluated
15:20kmcthen, that list literal is passed to eval
15:20hiredmanthey just are not evaluated as function application
15:20tonylwhat are vectors evaluated into?
15:20kmc(eval [inc 3]) ⇒ [2 3]
15:20kmc(eval (inc 3)) ⇒ 4
15:20kmcerr
15:20kmc(eval [inc 3]) ⇒ [inc 3]
15:20hiredmantonyl: into vectors that have their arguments evaluated
15:20kmchmm that's not right either
15:20hiredman,[(inc 1)]
15:20clojurebot[2]
15:21defn,(eval [inc 3])
15:21clojurebotDENIED
15:21kmcbecause the symbol 'inc' will get resolved to a function value
15:21defnoh..right..
15:21arkhbasic ns issue and using leiningen: Exception in thread "main" java.lang.Exception: namespace 'arkh_utils' not found after loading '/arkh_utils' (core.clj:1)
15:21arkhmy core.clj starts like this: (ns syslog-relay.core (:use [arkh_utils]) ...)
15:22hiredmanif vectors were not evaluated then [(inc 1)] would be the same as '[(inc 1)]
15:22hiredmanarkh: arkh-utils
15:22tonylbut they are evaluated, but not into a fn
15:23hiredmanlists are not evaluated into a fn unless they start with the special form that tells the compiler to evaluate into a fn
15:23arkhhiredman: I thought dashes were substituted with underlines?
15:23hiredmanthey are evaluated as a function application
15:23hiredmanarkh: yes, in filenames
15:23Raynesarkh: In file names.
15:23hiredmanarkh_utils.clj should have the namespace arkh-utils
15:23turbofailis there a repo for clojure-in-clojure?
15:23arkhoh ... (:use [arkh-utils])
15:23hiredmanbut also
15:24hiredman~namespaces
15:24clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
15:24tonyl,(werw 3 4)
15:24clojurebotjava.lang.Exception: Unable to resolve symbol: werw in this context
15:24tonyl,'(rwer 4 5)
15:24clojurebot(rwer 4 5)
15:24kmc,(doc rwer)
15:24clojurebotNo entiendo
15:24kmchehe
15:24tonylhehe
15:25arkhhiredman, Raynes: thanks - that was it. Silly me!
15:25tonylyeah i was testing that lists are alway being evaluated as a fn call unless they are quoted
15:26hiredmanI very much recomend writing a lisp interpreter
15:26tonylyeah, that is what I am going to try to do
15:26hiredmanin clojure?
15:26tonylI am reading on compiler and interpreters and was thinking of using a subset of clojure to implement
15:27tonyl:P I need to do more reading apparently
15:28tonylthanks for helping me understand a bit more
15:30arkh... hmm, and moving away from s
15:30arkher, 'single segment namespaces'
15:31hiredmanlike, my guess for the bytecode that clojure emits for a vector like [(inc 1)] is, resolve the var inc, load the constant 1, call IFn.invoke(Object), create an array of size 1, load the result of the invoke into the array, call IPersistentList/create
15:31hiredmaner
15:31hiredmanIPersistenVector/create
15:32hiredmanIFn.invoke being a function call (inc 1)
15:35tonyl,(eval [(inc ^Integer 1)])
15:35clojurebotMetadata can only be applied to IMetas
15:35tonylinteresting
15:37hiredmanhttp://www.infoq.com/presentations/Towards-a-Universal-VM if I recall the presentor mentions simulating runtimes on the jvm, which is restrospect was it kind of, "well of course", but when I first heard him say it it really tied together a lot of loose ends in my mind
15:37hiredmanwhich in retrospect was kind of
15:38tonylthanks for the link
15:38cemerickwhat's that java-in-java project? That was interesting.
15:38hiredmanmaxine
15:39amalloytonyl: also, clojurebot won't do eval
15:39amalloy,(map class [1 (int 1)])
15:39clojurebot(java.lang.Integer java.lang.Integer)
15:43hiredmanmaxine has a lot of stuff stubbed out, so for example, if I try to run jetty I get a NotImplemented exception
15:43tonyl,(eval (inc 4))
15:43clojurebotDENIED
15:43amalloyaww. i guess that's not surprising. but at any rate, (int 1) is an int rather than an Integer
15:43tonylthanks for the headsup amalloy, just starting here :P
15:43amalloytonyl: he implicitly evals everything starting with a comma, but you can't call eval directly because it would stop him from imposing security restraints
15:43tonylyeah, understandable
15:43arkhamalloy: how is it an int when (class (int 1)) returns Integer?
15:43amalloyarkh: (class) has to box it back into an Integer before you can call class
15:43tonyl,(type (int 1))
15:43clojurebotjava.lang.Integer
15:43arkhamalloy: oh yeah
15:43tonylso clojure doesn't use primitives?
15:43hiredmanint is a function, but not really, so it can return primitives
15:43arkhp.s., if there were ever a tree primitive, they should call it an 'ent'
15:43amalloytonyl: only in very limited ways, though this is being expanded in 1.3 as i understand it
15:43hiredmantonyl: as of 1.2 clojure functions can only take Objects and return Objects
15:43hiredmanlocals inside functions can be primitive
15:44Raynes$ (class (Integer. 3))
15:44sexpbot⟹ java.lang.Integer
15:44Raynes~max
15:44Rayneshiredman: What happened to max?
15:44amalloy,(* 1000000 1000000)
15:44clojurebot1000000000000
15:44amalloy,(* (int 1000000) (int 1000000))
15:44clojurebotjava.lang.ArithmeticException: integer overflow
15:44tonylbut in cases like this (def count 1) that is a primitive
15:45tonylor is it boxed too
15:45amalloytonyl: no, it's boxed
15:45tonyldang, alright
15:46tonylif they change that in 1.3 that would speed up some use cases
15:46tonylbut they would lose metadata functionality... mm.... interesting
15:47hiredmanuh
15:47hiredmanIntegers can't have metadata regardless
15:48tonylduh, that's true :P
15:48tonylI wonder what could they loose then.
15:49tonylI need to dig in more into the source code
15:49chouserWhat you lose is that primitives are not Objects. This complicates everything.
15:50hiredmanindeed
15:50tonylan example would be methods invocations?
15:51chousertonyl: to the JVM there is no such thing as a funcion. Clojure functions are JVM methods that take 0 or more Object methods and return an Object
15:51chouserright there you lost the ability to pass in or return primitives
15:52tonylwow, big hurdle.
15:54chouserIn 'master' right now, some Clojure functions are JVM static methods that can take args of different types. They can't be closures and Clojure will look at them when compiling a call to one of these in order to generate the right method call signature.
15:54chouserhiredman: hey, will you be in NC?
15:54amalloyclojure functions are actually classes with invoke methods, right, not individual methods
15:55hiredmanchouser: yessir
15:55chouseramalloy: no such thing as an individual method on the JVM, so right.
15:55chouserhiredman: fantastic! can't wait to meet you.
15:55hiredman:)
15:58tonylso if the JVM supported individual functions would clojure had gone that way instead of a fn maps to a java class?
16:00amalloyprobably not. that doesn't map well to closures
16:01hiredmanthe different between a first class function that closes over lexical scope and a an object is close to nil
16:01hiredmandifference
16:01amalloyclosures are implemented as a java class, with a constructor that takes N args corresponding to the lexical bindings it closes over
16:01amalloyi think
16:03hiredmaninfact as oo is very simulationish, using objects to simulate a language runtime makes a certain kind of sense
16:03chouser(let [a 1 b 2 c 3] (show (fn [x y] (+ x y a b c))))
16:03chouser[ 3] <init> (long,long,long)
16:04chouseramalloy: right
16:04chouseralso, an optional map for metadata: [ 2] <init> (IPersistentMap,long,long,long)
16:06tonylwow, that just blow my mind, to kind of know how clojure is structure from Java
16:06tonyl*blowed
16:06amalloychouser: oh, clever. i found that out by looking at javap, but show is a teeeny bit easier
16:06amalloy*blew :)
16:06chouseramalloy: :-)
16:06tonylamalloy: thanks :P
16:22ddonnellwhat's the clojure equivalent of ruby's File.expand_path(File.dirname(__FILE__))
16:24jjidohow can I make a future that starts after the caller completes some bookkeeping only (to prevent the future operations from using stale data)?
16:25amalloyjjido: well, the best way would be to do the bookkeeping first :P
16:26jkkramerddonnell: i don't think there's an easy __FILE__ equivalent
16:27jkkramer,(.getAbsolutePath (java.io.File. ""))
16:27clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
16:27amalloyjkkramer: that's the cwd, not the script file
16:27amalloy,(System/getProperty "user.dir")
16:27clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
16:27jkkrameri know, just showing what the rest of it would be
16:27chouser,*file*
16:27clojurebot"NO_SOURCE_PATH"
16:28jkkramerah, right
16:28amalloyjjido: but if you needed to, you could do something like (let [args (promise) f (future (do-stuff-with @args))] (deliver args (updated-bookkeeping-data)) f)
16:29ddonnellthanks
16:32jjidoamalloy: that looks like what I want to do
16:36alexykok so everybody pumped for conj? conference, not just the function?
16:38technomancyso pumped.
16:39mefestoim pumped :)
16:40tonylI wish I could, maybe next year
16:40chousermy pumped/worried ratio is going up as my slides approach completion.
16:40alexykchouser: technomancy: can't believe I'll see the men behind the nicks! this is so cool
16:41alexykdon't worry about the slides, you can just stand and bask :)
16:41technomancyI hope the badges have room for nicks on them as well as names.
16:41alexykI'm having a problem of calling people by nicks
16:41chouseralexyk: Don't say things like that.
16:41alexykninjudd is especially hard to shake off
16:41jweissoh, good call, although my nick is pretty easy to guess from my name
16:41chouseralexyk: like "bask" I mean. Calling me "Chouser" is fine.
16:42alexykchouser: bask in the gratitude of teh IRC users I mean :)
16:42chouseralexyk: I understood, just not the direction my ego needs to be nudged.
16:42alexykchouser: ok, then go get 'em slides! :)
16:43jweisswow, 312 users in here now. the channel doesn't seem that much more active though
16:43chouserright-o!
16:43alexykexceeded #scala a while ago
16:43chouserScala seemed to have a lot of draw at Strange Loop. More than Clojure, I think.
16:44alexykscala is nice, I was surprised by teh warm reception there, since my shift of focus a bit back... but they go together against pure Java I'd say
16:44alexykScala folks see Clojure in much friendlier terms than vice versa
16:45jweissi really dont' know enough about scala to actually scoff. i just didn't see anything about it that made me want to learn it.
16:45chouserhm, as in Scala guy might think "at least Clojure is functional" and a Clojure guy might think "bah, Scala is all mutable"?
16:45alexykchouser: remind the speakers to write their nicks on the badges; or, in fact, the organizers to ask folks to write them while registering
16:45Chousukescala has scary syntax :P
16:45alexykchouser: Scala is as mutable or immutable as you want :)
16:46alexykScala has void space instea of parens!
16:46alexykteh vacuum is so empty there, cold and dangerous
16:46alexyktokens can just mash together! brrrrr
16:47chouserI'd bet the badges are all printed by now, don't you think?
16:47technomancyI'll have my github shirt on that has a blank on the back for you to fill in http://github.com/________ in marker
16:47alexykchouser: yeah, but people can use things called "pens" in teh 20th centiry!
16:48alexyktechnomancy: well, at least the speakers have big pics! the rest we'll have to imagine from github ones
16:48alexyke.g. lancepantz has an animal there, and ninjudd a cartoon
16:49alexykdefn: you here?
16:49defnalexyk: i am
16:49defnare you my roomate?
16:49alexykdefn: you bet! I'l arrive at 4 pm in fact
16:49ninjuddalexyk: that is me in contrasty mode
16:50alexykninjudd: really you? looks very abstract!
16:50defnalexyk: my flight leaves at 7:30am tomorrow morning -- i should be in by around 11am
16:50alexykdefn: and I'll have a mtg right away... if you like I can call the hotel and tell them to give you the key if you like
16:51alexykbtw, how about some beer tmrw evening? do folks have plans already?
16:51defnalexyk: that might be nice -- im going to try and take a nap, i need to take a bus at 2:30am this evening so I'm going to be a little bit out of it
16:51defnbeer == good
16:51alexykI learned there's an unnannounced dinner for sponsors
16:51alexykand I wonder what we nonsponsors are gonna do
16:51defnlet's crash it and act like we're with Akami
16:52defn;)
16:52chouserheh
16:52alexykdefn: that's an option, and we may end up with them anyways :)
16:52mefestodid someone mention beer? :)
16:53alexyklots of it! if that airport dive serves any good one... NC is not known for beer is it?
16:53alexykmade of tobacco leaves may be
16:53defni know Asheville has some coice brew
16:53defnchoice*
16:53defnunfortunately that's ~7 hours away if memory serves
16:53alexykbut we're gonna be stuck in the airport right?
16:53jweissi'm a local if you guys are looking for a place to hang
16:53defnding ding ding!
16:55alexykjweiss: wow cool! how about we'll get a group going and ping you
16:55defn,(conj ["clojure"] "love")
16:55clojurebot["clojure" "love"]
16:56alexykok so we'll see if we can get a group and ping the locals
16:56alexykto escape into the wild
16:56lancepantzwow, we get in at 5:45
16:57Rayneslancepantz: 5:45PM Thursday?
16:57lancepantzyeah
16:57RaynesWhat timezone?
16:57alexyklancepantz: not bad, coming from the wrong side and all :)
16:57lancepantznc time
16:58lancepantzyeah, i think the car is picking me up at like 7am
16:58Rayneslancepantz: I should be there about two hours before you.
17:04alexykok I think I got a reasonable quorum for a pitcher or two!
17:05mefestoalexyk: add me to that list please :)
17:06alexyksecond pitcher filled!
17:08alexykhow do we check when a nick was last seen here? does clojurebot do that still?
17:08chouser~seen stuarthalloway
17:08clojurebotno, I have not seen stuarthalloway
17:08Raynessexpbot has a $seen command.
17:08Raynes$seen stuarthalloway
17:08sexpbotstuarthalloway was last seen quitting 721 hours and 10 minutes ago.
17:08RaynesRocked his world.
17:08chouserwow
17:09alexyk~(/ 721 24)
17:09alexykclojurebot: (/ 721 24)
17:09Raynes$ (/ 721 24)
17:09sexpbot⟹ 721/24
17:09chouserheh
17:09Raynes$ (/ 721 24.0)
17:09sexpbot⟹ 30.041666666666668
17:09RaynesAlso, you're looking for a comma.
17:09Raynes,3
17:09clojurebot3
17:10alexykwow, nice arrow there sexpbot
17:10alexykthx Raynes
17:10RaynesI <3 my arrow.
17:10alexyk$seen somnium
17:10sexpbotsomnium was last seen quitting 587 hours and 50 minutes ago.
17:10chouser,(print "/me is stoked")
17:10alexyk$seen liebke
17:10sexpbotliebke was last seen quitting 669 hours and 39 minutes ago.
17:10clojurebot/me is stoked
17:10alexykthese people, are they taking vacation in September or what?
17:10Rayneschouser: I'm stoked to see/meet you in person. :3
17:10RaynesAnd see your finger trees talk.
17:11chouser:-)
17:11alexykthe whole program is a feast
17:11duncanmi'm starting to use transients, and i have a line of code that used to do (apply conj a b c)
17:11alexykI wish I had a paper JofC to get it signed
17:11RaynesLuckily, it's way before cemerick's, so I wont be asleep yet.
17:11Raynes;)
17:11duncanmnow 'a' is a transient, and (apply conj! a b c) doesn't work anymore
17:11jolyI'm hoping for leftovers. Any word on whether we'll get video after the event?
17:11duncanmbecause the signature of conj vs. conj! is slightly different
17:11Raynesjoly: It's been confirmed that it will ve taped.
17:12alexykthey put liebke last and I'll have to head for the airport, what a shame
17:12chouserduncanm: a and b are elements, and c is a seq of elements?
17:12jolyRaynes: sweet! I'll be looking forward to it
17:13Raynesalexyk: What? I thought Stuart Halloway's talk was last?
17:13duncanmchouser: a is the seq
17:13Raynesalexyk: Or are you only staying for the first day?
17:13alexykRaynes: ah right
17:13RaynesWell, even that isn't the first.
17:13alexykthat's what I meant: shame, shame! :)
17:13Rayness/first/last/
17:13duncanmchouser: i switched it to (reduce conj! ....) maybe that's working now
17:13sexpbot<Raynes> Well, even that isn't the last.
17:13alexyksexpbot: can you pass the Turing test?
17:13Raynesrhickey has a loooooooo...oooong keynote as the last talk of the day on Friday.
17:13alexykRaynes: that's what we're paying for!
17:14jkkramerduncanm: are you aware of 'into'? it uses transients under the hood
17:14alexykflights out are idiotic, teh latest I could get was 5:50 pm
17:15chouserI'm leaving the next morning
17:15cemerickRaynes: You'll either be amused or irritated; hopefully not snoring :-)
17:15alexykjkkramer: from where?
17:15jkkramerrochester, ny
17:15alexykjkkramer: RPI?
17:15cemerickthat's a brutal drive
17:15Raynescemerick: It's pretty late in the day man, I can't promise anything. ;)
17:15jkkramergoing to stockpile some books on tape
17:15cemerickI drove to Durham once. Not fun.
17:16Raynesjkkramer: That would have been my drive if cemerick hadn't raised money to buy me plane tickets. :<
17:16alexykI should have stayed till Sunday too, but the flight is done
17:16RaynesWell, I wouldn't have been able to go in the first place...
17:16jkkrameralexyk: no...i went to RIT
17:16RaynesBut still, had I been able to, that would have been my drive.
17:16alexykjkkramer: right, mixing remote parts of NY here :)
17:16defnalexyk: sorry im at work doing 3 things
17:17defnalexyk: you have my cell # yes?
17:17Raynesdefn: Did you get my PM?
17:17alexykdefn: yep, so I'll call on touchdown ~ 4 pm
17:18chouser#clojureconj tweets will likely also work well for organizing last-minute social groupings
17:18defngot it buddy, thanks
17:18alexykchouser: yes, my iPad 3G will be catching those
17:19defnclojureconj.ataconapp.com is something the shop I work for built for Rails Rumble -- it's a little rough around the edges, but it's handy if you're looking for a schedule and recent #clojureconj tweets
17:19alexykbut good old cells are still more reliable I think; we'll see what works best
17:20U555is there a conference coming up?
17:20alexykU555: tmrw! http://clojure-conj.org
17:20alexyks
17:21defn(and yet he is)
17:21amalloyRaynes: mutter. sometime this week i'll see if i can get sexpbot to know about days, weeks, etc
17:22Raynesamalloy: I was about to mention that to you. ;P
17:22amalloyjust caught up with the backlog
17:22amalloy(of #clojure messages)
17:22clizzini don't suppose anyone here uses slime and vimpulse together?
17:23fhdIs there a function that returns true when the argument is a vector and otherwise false?
17:23jkkramer,vector?
17:23clojurebot#<core$vector_QMARK_ clojure.core$vector_QMARK_@18aa6a7>
17:23chouser(doc vector?)
17:23clojurebot"([x]); Return true if x implements IPersistentVector"
17:23jkkramerer, yeah
17:23fhdchouser: Thanks!
17:23fhdchouser: was looking for "isvec" and such :P
17:24chouser:-)
17:24Raynes-> (doc list?)
17:24sexpbot⟹ "([x]); Returns true if x implements IPersistentList"
17:24amalloy,(vector? (transient []))
17:24clojurebotfalse
17:24Raynesmap? seq? etc
17:24RaynesThe names are consistent.
17:24amalloy,(vector? [])
17:24clojurebottrue
17:24jjidodo promises get garbage collected normally if nobody holds reference, even if they are not realised?
17:24chouser,(ifn? {})
17:24clojurebottrue
17:25U555I wasn't aware people so involved with clojure were in this channel
17:25amalloyjjido: i'd be surprised if the answer were no
17:25U555looking at the conference lineup
17:25chouserjjido: should be -- it's just an object
17:26jjidook thanks
17:26RaynesU555: That's one of the things I love about Clojure. You don't have to go far to reach the 'team', if you will.
17:27chouserjjido: there's CountDownLatch and an atom in there, but I don't know of any reason either of those would break GC
17:27jkkramerit's hard to resist gushing about it to normals
17:27Raynestechnomancy: I have to save all my pants for the plane. :(
17:28amalloyRaynes: good thing you're not driving, then. you'd have to spread the same supply over a longer period
17:28Raynesamalloy: No, I mean I expect to void myself several times on the planes.
17:28RaynesI've never been on a plane before.
17:28amalloyah
17:28RaynesNot so hot on heights.
17:28alexykRaynes: I hope you're older that 7! :)
17:29errklenDuff: different library, same situation. came here to contemplate the matter
17:29Raynesalexyk: 4, actually. Mommy says I'm special.
17:29U555"it's hard to resist gushing about it to normals" <--- surely you mean muggles
17:30alexykRaynes: tell mommy she did a good job with those Lisp preschools!
17:30duncanmhow do i force a LazySeq (produced from filter)? isn't doall?
17:30amalloyRaynes: my HS physics teacher told me that, while he know how planes worked, he always worried that if he stopped believing mid-flight it would crash
17:30amalloyduncanm: dorun
17:30alexykBernoulli effect is all you need to repeat, as a mantra
17:31U555duncanm why do you want to force it?
17:32turbofailthe bernoulli effect is not what gives an airplane most of its lift
17:32chouseralexyk: not sure I ever saw one
17:32alexykturbofail: well it doesn't hurt :)
17:32amalloyturbofail: but the real explanation is too complicated. i prefer the bernoulli one
17:32alexykchouser: I got one in 1993, before they renamed it zip drive
17:33chouseroh, I didn't know they were the same thing. I think I must have read bernoulli drive ads in Byte or something.
17:33duncanmis there a perf difference between sorting a Seq and a Java array?
17:33alexykchouser: thet had a bigger cartridge. I still have one for Mac SE/30, it's SCSI!
17:33technomancywow, zip drives... not quite old enough to be retro-cool, but getting there.
17:33amalloyduncanm: not much. sort is a call to Collections/sort
17:34amalloyor maybe i'm thinking of shuffle
17:34duncanmhmm
17:34amalloy~source sort
17:34hiredmanI think my first linux install was on a zipdisk
17:34alexyktechnomancy: take some Seattle air with you in a jar for nostalgic exiles
17:34chouserduncanm: clojure.core/sort will copy whatever you give it into a new array and call Arrays/sort on it
17:35alexyktechnomancy: or some good coffee :)
17:36technomancyI haven't figured out how to make actual Good Coffee myself yet, just to recognize it when I drink it.
17:36technomancytea is much easier to get right while traveling, as long as you can get water that's hot enough.
17:37alexyktechnomancy: alas, it can't be reproduced outside ot Seattle :(
17:37nDuffalexyk, ...you mean "Italy", right?
17:37chouserI have a terrible time getting good tea while travelling
17:37chouserand my standards are pretty low
17:38technomancychouser: well it still takes some effort, but it helps that the only external dependency is boiling clean water.
17:38alexyknDuff: nope! "Italy" means, gimme 10 euros cause you look American! :)
17:38chousertechnomancy: oh, I see -- making it yourself.
17:39amalloychouser: yes, as long as the TSA hasn't started banning tea on flights that should be an easy way to make decent tea
17:49fhdYeah, just released another version of Clostache :)
17:49fhdAnyways, gotta get some sleep too. Bye!
17:51defnchouser: i added you as a presenter on clojureconj.ataconapp.com for your presentation.
17:51jjido,(doc deliver)
17:51clojurebot"([promise val]); Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception."
17:51chouserdefn: thanks
17:55jjidowhy does promise come before val? is that more English: (deliver someone val)... Then in Java notation, which would be better? deliver(someone, val) or deliver(val, someone)?
17:56chousersomeone.deliver(val) ?
17:56jjidochouser: no choice here heh
17:56jjidothanks
18:00alexykdefn: Atacon sounds "attaboy"! :) atatcon! good conference! here's a rawhide
18:01alexykdefn: what, reload to get tweets?!
18:04alexykdefn: after signing in with Twitter, tweets update
18:10alexykninjudd: tried to do cake install in github checkout, am getting: /opt/portage/usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': File exists - /home/alexyk/.m2/repository/org/clojure/clojure/1.2.0 (Errno::EEXIST) -- ?
18:11alexykwhy would it want to mkdir for clojure??
18:12ninjuddthat was a bug that has been fixed
18:12alexykninjudd: I just did a pull right now
18:12alexykshoul I repull
18:12alexyk?
18:12ninjuddjust remove /home/alexyk/.m2/repository/org/clojure/clojure/1.2.0
18:13ninjuddi may need to do that automatically in that error case
18:13alexykninjudd: my valuable clojure is there! promise you'll put it back?
18:13ninjuddyes
18:13alexykok
18:14alexykhmm it's not even a directory :( rm it
18:16alexykninjudd: after rm, cake install finishes fine
18:22duncanmhmm, how do i use lein repl?
18:22duncanmi can't figure out how to load my source files
18:23amalloy,(doc load)
18:23clojurebot"([& paths]); Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise."
18:23ninjuddalexyk: thanks. i checked in a change to fix it automatically in the future
18:23hiredmanuh
18:24hiredmanif you have everthing laid out in the proscribed manner in ./src then you can just use require to require your namespaces
18:24alexykninjudd: cool! I voted for cake in #clojureconj tweet. :)
18:24amalloyninjudd: any plans for a lein-like javac task? i just discovered i can't build cascalog with cake because it uses the lein javac hook
18:25ninjuddamalloy: cake supports java compilation out of the box
18:26amalloyi tried cake compile and got 40 errors
18:26ninjuddalexyk: thanks!
18:27amalloy(this after cake deps)
18:27ninjuddamalloy: is it because it is trying to hook a non-existent function?
18:27amalloyno, they were javac errors
18:28ninjuddamalloy: this is building cascalog from the source?
18:28amalloyyeah
18:28amalloyfresh github
18:29lancepantzamalloy: i'll take a look at it, just a second
18:29lancepantzi've been meaning to check out cascalog anyways
18:30amalloyit looks like the issue is build path somehow. cake isn't seeing the hadoop jars
18:31amalloy(ie it's invoking javac fine, but seeing the wrong build path)
18:32lancepantzamalloy: so you get the exception when you run 'cake compile'?
18:32amalloyyeah
18:33lancepantzno problems on my box
18:33amalloyhuh
18:33duncanmdoes a list-comprehension run anything in parallel?
18:34amalloy [compile] /home/akm/src/clojure/cascalog/src/jvm/cascalog/MemorySourceTap.java:29: package org.apache.hadoop.fs does not exist
18:34amalloy [compile] import org.apache.hadoop.fs.Path;
18:34amalloyand then a few dozen more just like it
18:35lancepantzamalloy: what os?
18:36amalloyubuntu 10.04
18:36duncanmi have a bit of code right now that's running slow
18:36amalloyduncanm: no, it doesn't
18:36lancepantzk, let met try on an ubuntu box
18:36duncanmi'm looping thru a list, and basically keeping a gap buffer during the iteration
18:37duncanmi have an entry and some bins and i'm trying to put the entry into one of the bins based on some criteria
18:38duncanmif the entry fits into an existing bin, then i put it in and return a new seq of bins, if it doesn't fit, i add a new bin to the end with the entry
18:38duncanmhttp://gist.github.com/637492
18:38amalloyduncanm: you sound like you're reinventing a medium-size wheel here. is there some reason you need to do the loop by hand?
18:39duncanmamalloy: i'm trying not to
18:39duncanmamalloy: i'd just use map if i know that an entry *always* fit into something
18:40duncanm(map f coll) only returns an answer as long as coll, but in this case, there are times when i need it to be coll+1
18:40amalloyso you have...a set of predicates you're testing or something?
18:40duncanmamalloy: the link above has a snippet of the code
18:41amalloyyeah, i just want to be sure i'm reading it right since i don't know what your "trails" are
18:42duncanmamalloy: a trail is a seq of entries
18:42duncanman entry is a PersistentHashMap
18:43amalloylancepantz, ninjudd: could it be i'm using an old version of cake?
18:43lancepantzpossibly, try doing a cake upgrade
18:45amalloyduncanm: perhaps you want update-in
18:45duncanmhmmm
18:45duncanmamalloy: maybe...
18:45lancepantzamalloy: it just compiled one of our redhat boxes too
18:46lancepantzi think we have an ubuntu one too, i'll double check that one
18:46amalloy(update-in all-buckets [(get-bucket-for item)] (fnil conj []) item)
18:46duncanmfnil?
18:47amalloy,(doc fnil)
18:47clojurebot"([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."
18:47amalloy,(update-in {} [:test] (fnil conj []) :val)
18:47clojurebot{:test [:val]}
18:49amalloy,(update-in {:test [10]} [:test] (fnil conj []) :val)
18:49clojurebot{:test [10 :val]}
18:49amalloyduncanm: that way you can be agnostic about whether a bucket already exists
18:52amalloylancepantz: i no longer get compiler errors with 0.5.3 but it hangs forever at what looks like some kind of debug output
18:52lancepantzthat happened to me once
18:52lancepantzwe've been trying to figure out how that happens, but its very inconsistent
18:52lancepantzctrl-d out then run it again
18:53amalloyi get it consistently
18:53amalloywell. apparently not consistently. 3 times in a row, then the fourth worked
18:53lancepantzafter a cake kill all?
18:54amalloyno, just a ctl-c. lemme try that
18:54amalloyyes, still getting it
18:54lancepantzbuilt fine on this ubuntu box
18:55lancepantzhas this happened to you before on other projects?
18:55amalloythe debug output has happened before, though i can't remember when. the problem i had with compiling before, no
18:55lancepantzyeah, the debug, i think its unrelated to compiling
18:56amalloyhttp://gist.github.com/637522 if you're interested in debug output
18:56lancepantzty
18:57amalloyhuh. and again, worked on exactly the fourth try. this is interesting
18:57lancepantzyeah, i got the same thing that one time
18:57lancepantzreally
18:57amalloybelieve it or not
18:57amalloygonna try from scratch one more time
18:57amalloydamn. first try this time. must have been a coincidence
18:59lancepantzit's happening pretty consistently on this redhat box
18:59duncanmamalloy: but then i'll need to come up with some form of key
19:02amalloyduncanm: uhhhhh...it's pretty easy to use the integers from 0 to infinity as a key if you don't have any meaningful primary identifying feature
19:03lancepantzamalloy: let me know if you find any correlations with that debug output
19:04lancepantzi've got to get some stuff done before going to nc
19:04hiredmantechnomancy recomends http://github.com/toolmantim/bananajour for conj goers
19:04duncanmamalloy: but i need entries that go into the same bin to 'hash' to the same key
19:04technomancyyes, it's great for any conf where the wifi may be shaky
19:04duncanmthe same 'trail'
19:04technomancygotta let the codes flow
19:13amalloyduncanm: just make (get-bucket-for-object) take an object and the current map then, if you must
19:26sdeobaldOut of curiosity, is there a convenience function that anyone's aware of which basically does the opposite of 'bean'? -- construct a zero-arg bean, set a bunch of properties, return that obj.
19:28amalloysdeobald: i'm not sure that would be possible. the class has to be known at compile time, and at compile time it can't know what properties you'll be setting, right?
19:29sdeobaldHmm.
19:29sdeobaldThe class needs to be known. It doesn't need to know what setters it's planning on calling, though, does it?
19:30hiredmanyou can use reflection
19:30amalloyno. but those setters have to exist
19:30sdeobaldTrue.
19:30sdeobaldhiredman: right
19:31sdeobaldI'm going to assume that's a no, then. ;)
19:33alexykninjudd: say I use cake install to create a jar our of a project A, A.jar. I then make it a dependency of a project B. A has src/a.clj. I used to (require 'a) when in A. How do I achieve the same effect in B now?
19:34hiredman~namespaces
19:34clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
19:35ninjuddalexyk: just require it the same way
19:36alexykhiredman: right; my A files are all declared in namespace A. I'm a bit confised on teh interplkay of A.jar on the class path with src/a.clj and that declaring (ns 'a)
19:39raekjar files work somewhat like additional src/ directories, if that makes any sense
19:41raekif foo/bar/baz.clj exists in some jar file (which is, basically, just a zipped directory) or in the src/ directory (or in any other directory/jarfile on the classpath), then you can (require 'foo.bar.baz)
19:44_rata_hi clojurians
19:50alexykthe problem was naming files with dashes in them
19:52_rata_I'm having a difficult time designing a clojure program... I'm trying to implement a CTCM (continuous-time Markov chain) simulator and would like to make it entirely based on immutable data, so each time I call gen-event it returns a copy of the state passed to it with the corresponding changes
19:54_rata_the problem is that the state contains mutually-referencing objects... or at least that's the way I think will make the program run faster
19:57_rata_I can't figure out a way to make the state immutable
19:58_rata_and efficient
19:58amalloy_rata_: a recurring subject in #clojure
19:59amalloyyou can't get mutally-referring immutable objects (maybe changing with pods?), but you have a couple options
20:00hiredmanyou can via indirect references
20:00amalloyyou can have a top-level hashmap, which maps type1 objects to type2 objects, and vice versa
20:01amalloywhich i think is the same as what hiredman just said, but i'm not sure. care to expand, hiredman?
20:01_rata_what's pods?
20:01_rata_*what are
20:02hiredmanyou can keep a ref of objects globaly, and generate your immutable data structure with references into the "global"
20:03amalloyRH is working on pods for 1.3 or some future version. i don't really understand them, but they're supposed to magically fix every problem we have
20:03hiredmanmeh
20:03_rata_hahahahaha
20:04amalloyseriously though, i think the idea is to have well-defined boundaries for mutation of objects, which would probably allow this sort of thing
20:04cpfrhey is there an elegant way to pass a list of arguments to a function as a lis
20:05amalloyum. pass a list as a list? you just pass it. do you mean, you have N separate items but your function wants a seq, or the reverse of that?
20:05jjidoHow do you wait for two promises in parallel? put one of the waiters in a future?
20:06jjido,(doc &)
20:06clojurebotTitim gan éirí ort.
20:06amalloyjjido: wait for both, or for the first one?
20:06hiredmanwhat is the diference between waiting serially and waiting in parallel?
20:07jjidocpfr: use (defn myfunc [& args] ....args is now a list...) (myfunc arg1 arg2 arg3)
20:07hiredman(answer: none; if you feel there is one feel free to present proof)
20:07danlarkinhiredman: parallel is faster, of *course*
20:07jjidoamalloy: wait for EITHER
20:07hiredmanPARALLEL AND MUNCTIONAL
20:07hiredmanFOR MEN
20:07jjidohiredman: not in CPS
20:08jjidohiredman: there will only be one promise delivered
20:08cpfrjjido, is there any simpler way
20:08hiredmanthere is no way to do that without polling in a loop
20:08cpfrI didn't define this function
20:09hiredmane.g. wait in one promise till a timeout then wait on the other
20:09jjidocpfr: your question is not clear
20:09amalloyhiredman: can you do it even with a loop? there's no non-blocking deref for promises as far as i know
20:09hiredmanamalloy: you can simulate one
20:10pmbauer,(doc apply)
20:10clojurebot"([f args* argseq]); Applies fn f to the argument list formed by prepending args to argseq."
20:10pmbauer@cpfr ?
20:10jjidohiredman: I don't see why I need that, my solution looks like it would work: (future (workwithp1 @p1)) (workwithp2 @p2)
20:11cpfrpmbauer, jjido allow me to make it more clear
20:11amalloythen you leave deadlocked threads scattered all over the jvm, jjido
20:11cpfrassume (defn add [x y] (+ x y))
20:11hiredmanwhat amalloy said
20:11jjidoamalloy: should I care?
20:11hiredmanyes
20:11cpfrand assume add is some function i didnt write
20:11amalloyjjido: um, yes? they won't get GCed
20:11hiredmanthat is a horrible thing to do
20:11cpfri wish to be able to do (add '(2 3))
20:11amalloy,(apply add [1 2 3 4])
20:11clojurebotjava.lang.Exception: Unable to resolve symbol: add in this context
20:12amalloy,(apply + [1 2 3 4])
20:12clojurebot10
20:12cpfr,(apply / [10 2])
20:12pmbaueryep
20:12clojurebot5
20:12cpframalloy, well I feel stupid now
20:12cpfrthanks :)
20:12amalloyjjido: you could do it your way, if you provided some "special" value that your promises should never return
20:13jjidoamalloy: hiredman: ok, I see what I need. I will use only one promise and make it a pair (x, y)
20:13amalloyyes, i agree that's better
20:14jjidoor a map {:x p1result, :y p2result}
20:14amalloyjjido: your architecture may make this hard, but i like [result, where-it's-from]
20:15hiredmana pair is very respectable
20:15_rata_amalloy, how are "well-defined boundaries" for mutation of objects?
20:16amalloylike i said, i don't know much about pods. he's supposed to be talking about them at the conj this weekend
20:16hiredmanwell one set of boundaries would be a thread
20:20iveyIs Colin Jones in here?
20:22_rata_mmmm... I don't understand pods yet, but will read about it
20:23_rata_where's going to be the Conj?
20:24TeXnomancyivey: how's the beach? =)
20:25iveyTeXnomancy: Nice. Cool breeze, waves lapping on the shore. Barge just went by.
20:25defnintense jealousy starting to crop up... must suppress anger...
20:25iveyheh, I earned it. Also, sharing a 1.5 bath really old house with inlaws
20:26iveyso it's a little nuts. I went to pick up takeout and had to go early to wait at the bar.
20:26moogatronichad to cause a beer sounded delightful?
20:27amalloy_rata_: north carolina
20:27iveyhad to, because a bourbon sounded damn near essential
20:27moogatroniclol. yeah, i try to avoid stays with inlaws when possible, unless there is a damn-nice unrelated outcome potential.
20:28iveyIt's a free beach house on the water. It's an OK trade-off.
20:31_rata_amalloy, do you know if they are making videos of the presentations?
20:36amalloythey want to, but last i heard it was up in the air
20:36RaynesNo, they are.
20:36amalloynice
20:36Raynes@clojure_conj confirmed it to me in a tweet a few days ago.
20:36RaynesI assume whoever is behind @clojure_conj would know.
20:36_rata_ok, nice
20:37amalloyhm. too bad i'm already busy next weekend or i could have my own one-man mini-conj watching them all
20:37defnthe fact that there arent 3 simultaneous presentations going on at any given time slot makes the video thing a lot easier
20:37defnno need for 3 nice video cameras, people to handle A/V stuff, etc.
20:40_rata_oh, this problem is very difficult to solve... I want an immutable data structure that you say change x to y and it changes it recursively on every place where there's an x
20:40amalloy_rata_: see clojure.walk
20:40amalloyit looks like you might want that
20:40_rata_it could be the key or the value of a map or anything into a collection
20:41amalloy~source macroexpand-all
20:41clojurebotGabh mo leithscéal?
20:41_rata_amalloy, ok, I'll check it
20:41amalloyclojurebot: contrib?
20:41clojurebotcontrib is http://github.com/richhickey/clojure-contrib/tree/master
20:41qbg_rata_: What big O do you want?
20:41hiredman,(doc mexpand-all)
20:41clojurebot"clojure.contrib.macro-utils/mexpand-all;[[form]]; Perform a full recursive macro expansion of a form."
20:42iveychouser: finally got my CA done, and posted to the list with that xml code from weeks back. any updated thoughts on where it might belong?
20:43amalloy_rata_: http://github.com/clojure/clojure/blob/master/src/clj/clojure/walk.clj
20:43_rata_amalloy, but I think clojure.walk will go over the entire collection... not just the places where there could possibly be an x... I need a way to specify where an x could appear
20:43amalloy,(doc tree-seq)
20:43clojurebot"([branch? children root]); Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the tree."
20:43_rata_qbg, lineal in the size of the places where x could appear ^
20:44chouserivey: I saw your email, but haven't had the time yet to look at the code or anything
20:44chouserit may be fine in lazy-xml
20:44iveykk no hurry. just trying to maximize my free hack time this week
20:44amalloy_rata_: you can use clojure.walk with a specialized inner function
20:45technomancyssshhhh... the longer the CA takes to process the more time he has to work on leiningen. =)
20:45_rata_amalloy, ok, maybe that's what I'm looking for :)
20:46iveyheh
20:49iveytechnomancy: how do you decide whether you're in TeX mode or not?
20:50technomancyivey: TeXnomancy is my alt. nick for when I reconnect and my old connection hasn't dropped yet. better than just adding a dash on the end or some such =)
20:50alexyklatex nomancy; bibtex nomancy; ...
20:51iveylatexnomancy is for after-hours
20:51alexykindeed
20:57defnalexyk: get to bed!
20:58alexykdefn: call the hotel or you'll have to walk around it!
20:59defnhaha
20:59defnspeaking of which, did you call them?
20:59alexyktrying to get warm, eyeing pretty ladies inside drinking martinis
20:59defnis that proust?
20:59alexykdefn: I delegated it to you! :)
21:00alexykI'll follow up on your findings
21:00defnhaha, i dont think they'll take someone's request: "hey uh, i want a key to Alexy's room."
21:00alexyknot proust, just me :)
21:00alexykdefn: OK, I'll call them then
21:01defni could try to social engineer it for kicks
21:01alexykdefn: you can get into rhickey's room that way too!
21:01defnbahaha, im imagining myself with a giant toothy grin, arms spread as if waiting for a hug: HI!!!
21:02defnas he walks into his room
21:02alexykas he slowly turns a corner with a Tazer!
21:03defnlittle does he know I packed a /Samurai sword!/
21:03alexykdefn: rhickey is the ultimate ninja of this realm, so you'd have no chance
21:03defnConj /this!/
21:03defnthat's what I'd say...
21:04alexykinto /that!/ will be the last thing you'll hear...
21:04defnah, clojure humor...
21:04defnthe pinnacle of comedy
21:05defnthe zenith, the apex
21:05alexykthe summit of subtlety!
21:05alexykthe culmination of the apogee
21:06defnland-line Cisco phone, you say?
21:06defnIs that a land line nowadays?
21:06alexykit has an old voip wire coming out of it
21:06alexykbulging with packets
21:07alexykbb
21:07defnkk
21:09alexykok "David," you're all set
21:09alexykor we hoep so!
21:10alexyk(why is it when people hear Devin, they repeat David?)
21:10defngood question
21:11defnI get called all sorts of names, usually by older folks
21:11alexykwell they don't say Devil at least
21:11defnDavin, Dovin, Daven, Dev-on
21:11alexykDEVONThink!
21:11defndo you use it?
21:12alexykI have it, but not use it... :(
21:12defnit's a neat idea but sort of hard to use
21:12defni used it a long time ago though, it mighe be better on my shiny new MBP
21:12alexykI hoard all kinds of tools for teh Mac... ok back to thesis :)
21:12defnalexyk: as long as we're getting to know eachother I think I'll share last night's dream with you:
21:12defnI had a dream about minnows -> frogs -> toilet -> scientists + evolutionary biology.
21:13alexykhmm
21:14alexykas long as the scientists are unharmed
21:14defnthere were minnows living in toilets that were morphing into new species, i had scientists studying my toilet, so whether they were harmed or not is i suppose debatable
21:15defnokay get back to your thesis, i think ive sufficiently embaressed myself for the evening
21:15defnthanks for calling the hotel, seeya in ~18 hours
21:15alexykdefn: dreams with toilets are quite typical of adolescents fumbling for identity, nothing to be embarrased about! see ya!
21:16defnhahaha -- well played
21:23alexykok #clojure! get ready for teh FIRST EVAR Conj 2010! Go Clojure! over and out
21:26tomojaww shucks
21:26tomojI didn't know it was so soon
21:27maravillasnot coming tomoj?
21:30maravillasgary_poster: seems we're on opposing schedules. i just saw your question about groups in the triangle area a couple days ago...wanted to mention that i don't know of a clj user group in the area, but there is http://trifunc.org that meets sporadically
21:30tomojdidn't get funded in time
21:30tomojoh well
21:31gary_postermaravillas: still here for a few more seconds :-) thanks, cool!
21:32maravillasah, great :)
22:04jjidoMy future does not get fired http://gist.github.com/637783
22:05jjidoI see the printlns though
22:09jjidook must be something in coroutine
22:11_rata_amalloy, the problem with clojure.walk is that it calls the inner for every element in the collection, not just where I know they could be inside the hierarchy of objects... hierarchy in the sense of nested data structures
22:12hiredmanyou may want to look at clojure.zip
22:12amalloy_rata_: no, it calls inner for every element at the top level. prewalk and postwalk only delve deeper because they include another walk call
22:12_rata_ah ok
22:13amalloyif your inner function *sometimes* calls walk again, you can control the recursion. though maybe clojure.zip is a better solution; i've never used it and hiredman is a smart guy
22:16hiredman,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next (zip/replace 5))
22:16clojurebot[5 {:changed? true, :l [], :pnodes [(a (b (c d) e) f) (b (c d) e)], :ppath {:l [a], :pnodes [(a (b (c d) e) f)], :ppath nil, :r (f)}, :r ((c d) e)}]
22:16hiredman,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next (zip/replace 5) zip/root)
22:16clojurebot(a (5 (c d) e) f)
22:18amalloythree nexts? if it's starting from the root and traversing depth-first, i don't understand why it takes three nexts to get to b
22:19hiredman,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/node)
22:19clojurebota
22:19hiredman,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/node)
22:19clojurebot(b (c d) e)
22:19hiredman,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next zip/node)
22:19clojurebotb
22:19amalloyah
22:19amalloythanks
22:36amalloy,(map (comp vector zip/node) (take-while (complement zip/end?) (iterate zip/next (zip/seq-zip '(a (b (c d)) e)))))
22:36clojurebot([(a (b (c d)) e)] [a] [(b (c d))] [b] [(c d)] [c] [d] [e])
22:38hiredman,(pl (↕map (replicate 3 (↕apply vector $ (↕map range $ 10 inc · inc · inc) call · ⌽* $ 10 · call · (⌽+ -2) map)) shuffle)))))
22:38clojurebot([10 70 30 60 40 80 50 100 20 90] [90 30 100 70 10 50 80 40 20 60] [70 100 50 10 60 80 40 90 30 20])
22:39amalloyhiredman: wow, some kind of character-encoding issue there. half of your message looks like gibberish to me
22:40hiredmanI recommend you remedy the character encoding issue immediately. you're not ircing if you're not in unicode
22:42danlarkinhiredman: the RFC might have something to say about that!
22:42Deranderhiredman: what does ⌽ and ↕ mean in that code?
22:42Deranderwhat do*
22:43hiredmanclojurebot: transformr?
22:43hiredmanclojurebot: transforml?
22:43hiredmanclojurebot: ping?
22:43clojurebotPONG!
22:44hiredmanclojurebot: transform
22:44clojurebottransform is http://github.com/hiredman/odds-and-ends/blob/8a84e6ddbad9d71f714ba16c3e1239633228a7eb/functional.clj
22:44hiredmanpl is a code rewriting macro
22:45Deranderoh interesting
22:47hiredman,(pl (λ.x (in x) 1))
22:47clojurebotjava.lang.Exception: Unable to resolve symbol: in in this context
22:47hiredman,(pl (λ.x (inc x) 1))
22:47clojurebotjava.lang.ClassFormatError: Illegal field name "." in class sandbox$eval4689$fn__4690
22:47hiredman,(pl (λx (inc x) 1))
22:47clojurebot2
22:48dnolenfun
22:48amalloyoh. so those silly symbols are all supposed to be there? not an encoding issue after all, then :P
22:49dnolenamalloy: λ <- silly symbol?! blasphemer
22:49amalloythe first one didn't have any lambdas :P
22:49dnolen;)
22:50amalloyif i'd seen a lambda i would have immediately assumed hiredman was up to some kind of tricks
22:52hiredmandanlarkin: all rfcs that mention other encodings shall be embraced and extended
22:53danlarkin:'(
23:26_rata_buuu http://confreaks.net/videos/127-elcamp2010-clojure
23:28arrummzenIs "Macro Expansion Time" during compile time or during runtime?
23:28arrummzen(Is it more like macro expansion in C or lazy evaluation in Haskell?) =)
23:29hiredmanright before compile time (the expansion actually happens as the first step in the compiler)
23:29arrummzenThanks =)