#clojure log - Feb 18 2009

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

0:00 technomancy: I'm close

0:00 cooldude127: WOO

0:00 technomancy: after you push, the overlays should show on any failure, not just the last, right?

0:00 ideally?

0:01 also did you figure out why it was global?

0:01 technomancy: why don't you look into making it buffer-local. =)

0:01 I'm working on the multiple-failures-per-test problem.

0:04 cooldude127: technomancy: thing is, it is supposed to be!

0:07 technomancy: ok well one problem is that the body of (define-minor-mode) is run both when the mode is enabled and when it is disabled

0:07 i think

0:08 technomancy: woot; fixed it

0:08 I might add that I beat you.

0:08 cooldude127: lol

0:08 push it

0:09 technomancy: pushed!

0:11 cooldude127: technomancy: FAIL

0:11 technomancy: wha?

0:11 cooldude127: wrong type argument: sequencep, :pass

0:11 technomancy: cooldude127: you need to restart your slime

0:11 cooldude127: technomancy: may i ask why?

0:12 technomancy: or maybe just call clojure-test-load-reporting

0:12 that second one should do it actually

0:13 cooldude127: technomancy: this is AWESOME

0:13 technomancy: yay!

0:13 cooldude127: it works fine on with-test?

0:13 cooldude127: technomancy: yes, idk how, but yeah

0:13 technomancy: heh; cool

0:14 cooldude127: yeah

0:14 technomancy: I think I'm going to use defface instead of setting the bg-color

0:14 so you can have it look decent for dark or light backgrounds

0:15 cooldude127: technomancy: good plan. but now you should figure out this buffer-local thing, cuz it's got me baffled

0:16 also, have you noticed that it's been a while since anyone else in here spoke?

0:16 like, about an hour

0:20 technomancy: hmm, something's not working

0:20 defn: I think I just decided what I want to do with my life.

0:21 technomancy: defn: bind function literals to vals?

0:21 defn: Ding ding ding!

0:21 What do we have for them Johnny?

0:21 A BRAND NEW CAR!

0:22 cooldude127: technomancy: i decided to start using the clojure-test-mode in a new file with a new ns, and i have a test i know show fail, but it's not getting highlighted

0:23 defn: cooldude127: what does the 127 stand for?

0:23 cooldude127: defn: not a damn thing

0:23 defn: cooldude127: 2nd question, are you actually a cool dude?

0:23 cooldude127: yes

0:23 defn: would you believe i have been asked that before?

0:23 defn: cooldude127: final question, do you not have any desire to get rid of numbers on your nick?

0:24 cooldude127: not really, since i use this for a lot of things. i randomly picked it the first time i used IRC, and i just kept using it

0:24 defn: Part of me wants to chastize you for not being elite, while the other part of me would like to commend you for not falling victim to peer pressure.

0:24 cooldude127: lol

0:25 defn: if i were to remove them, i would have so many accounts to change

0:25 defn: Another part of me wonders if you're over 30?

0:25 cooldude127: defn: nope. 18

0:25 silkarn: how does memoize work? can it memoize a function internally? a (memoize naive-fib)?

0:25 technomancy: picking a nick is hard

0:25 you don't realize when you're in high school that it might stick with you the rest of your life

0:25 cooldude127: technomancy: exactly

0:25 defn: Yeah, I've had a bunch of them. I can actually give you the whole history of my life in screen names.

0:25 Well history from 12->

0:25 cooldude127: lol

0:26 technomancy: enough chit-chat. pay attention to my problems :p

0:26 defn: I was originally XxPuMT2KiLLxX on AOL

0:26 technomancy: cooldude127: well I got faces working, but the one that works with the default colors is bad; you can't read strings in it

0:26 cooldude127: oh crap

0:26 Chouser: <-- Zorph

0:26 technomancy: defn: then you learned to keep your cat off your keyboard, right?

0:26 defn: hahaha!

0:27 technomancy: cooldude127: you'll have to send me a test case to repro

0:27 oh, actually I haven't really tried switching ns

0:28 defn: I was originally XxPuMT2KiLLxX, then I was known as "Jack" on Ultima Online not because my name is Jack, but because my lumberjack became my main character, then I was "code" (and still am on 1 irc server), then I became qed, then tao, and lately 'defn'

0:28 lisppaste8: cooldude127 pasted "this is what doesn't work" at http://paste.lisp.org/display/75684

0:28 defn: my name is devin in real life, so defn just might stick

0:29 cooldude127: defn: that's cool, i like that

0:29 honestly sometimes i can't believe people take me seriously on here with this nick

0:29 danlarkin: sooo building jars is *the worst*

0:29 defn: haha -- im trying hard!

0:30 sometimes people who dont give a shit about certain things (like personal hygene for instance), are REALLY good at other things

0:30 cooldude127: defn: i figure that by helping people out enough, they won't care about my nick

0:30 technomancy: danlarkin: ugh. I've been putting that off.

0:30 cooldude127: lol

0:30 technomancy: distributing code as tarballs is not that bad. =)

0:31 defn: cooldude127: it also lends a certain sort of legitimacy to what you say, too

0:31 cooldude127: yeah

0:31 danlarkin: technomancy: for a project with a lot of deps (like mine) ohhhh what a headache

0:31 defn: people who are named "monad" or some shit tend to be arrogant ass hats

0:31 cooldude127: lol

0:31 defn: why the lucky stiff is the perfect balance of knowledge and moniker IMHO

0:31 cooldude127: i've considered switching my nick to something like my initials

0:32 something simple and short

0:32 defn: yeah using your real name is cool because its like "hey, i actually stand by what i say"

0:32 silkarn: can someone explaing memoizing to me? I see how to use it for caching, like check if in hashmap else retrieve from database but how do I memoize a function? like naive fibonacci? how does the memoize function catch the output? where in clojure.lang can I find memoize?

0:32 cooldude127: yeah

0:32 technomancy: _why is the man

0:32 defn: _why is literally my hero

0:32 i think the stuff he's working on with hackety is so incredibly noble and "right"

0:32 he is my moral programming compass

0:32 durka42: ~source memoize

0:33 cooldude127: silkarn: memoization takes advantages of closures, so the function has a reference to a map that stores the args and corresponding values

0:34 danlarkin: silkarn: http://clojure.org/atoms has a good example of memoization

0:34 defn: _why is also the first programmer i ever read or followed that wasn't 100% technical, with no apologetics for being artsy and abstract

0:34 cooldude127: danlarkin: in fact i think that is the actual memoize source code

0:34 defn: im a _why-type programmer

0:34 cooldude127: defn: yeah _why's poignant guide is AMAZING

0:35 defn: he makes me feel like so much less of an outsider in the programming community -- my ideas are usually like "ooo let's make a generative art thingy that makes neat stuff to look at for no good reason!"

0:35 technomancy: cooldude127: that file you pasted works if you toss a (run-tests) on the end

0:35 defn: cooldude127: yeah that is a fantastic book

0:35 cooldude127: technomancy: you're right, it does! WHY?

0:35 defn: cooldude127: i got my girlfriend to learn ruby with that book

0:36 someone you would NEVER expect to dip their toes in

0:36 cooldude127: defn: was she a computer-type person before that?

0:36 technomancy: defn: at RailsConf I heard him stop someone in the hall to explain all about Dog Scouts: http://www.dogscouts1.com/

0:36 defn: cooldude127: no, not at all

0:36 cooldude127: lol wow

0:36 technomancy: no context or anything, just "so there are these dogs that are scouts and get badges and stuff..."

0:36 very surreal.

0:36 defn: dude wtf

0:36 cooldude127: i can't imagine my girlfriend learning how to program

0:36 defn: why cant i be that awesome

0:36 cooldude127: defn: i wonder about that sometimes

0:37 technomancy: cooldude127: well I'm done for tonight. I'll push out my stuff, but if you have any leads please keep it rolling.

0:37 cooldude127: technomancy: of course

0:37 defn: those are the thoughts going on in my head that i filter so as to look in control and useful

0:38 sometimes in the middle of a meeting at work i just want to say "diana ross" or "muppet babies rule"

0:38 technomancy: cooldude127: pushed out; lemme know how it goes.

0:38 defn: cooldude127: sorry to interrupt you guys

0:39 i just like technomancy

0:39 i have a man crush on him

0:39 cooldude127: we all do

0:39 especially after emacs-starter-kit

0:40 danlarkin: I think I liked it better when this channel was 99% on topic :-/

0:40 cooldude127: lol

0:40 defn: does a channel name always dictate what on-topic is?

0:41 cooldude127: it's supposed to

0:41 defn: what if all of the stuff im saying is generated by clojure?

0:41 danlarkin: then I'd love to see your code :)

0:41 cooldude127: technomancy just pimped his clojure-test-mode on twitter

0:41 defn: haha! touche

0:41 cooldude127: damnit growl

0:42 defn: what if what im typing is really just obfuscated clojure being interpreted and molded to fit the current context?

0:43 after all my nick is 'defn'

0:43 slashus2: What is a concrete example of where atoms would be very useful besides that of memoize. Would I use it inside of a function were I want a locally mutable reference?

0:43 cooldude127: slashus2: i think so, but you should probably try to avoid needing that

0:43 hiredman: (map (partial map inc) (replicate 10 (range 10)))

0:44 cooldude127: purely functional code is better

0:44 hiredman: D[D[D[D[D[D,(map (partial map inc) (replicate 10 (range 10)))

0:44 the hell

0:44 ,(map (partial map inc) (replicate 10 (range 10)))

0:44 clojurebot: ((1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10))

0:44 slashus2: I know that, but an atom is much better than using a reference inside of a function?

0:45 ref*

0:45 cooldude127: slashus2: yes

0:45 hiredman: ,(let [f #(fn [& y] (apply % (reverse y))] ((f map) (replicate 10 (range 10)) (partial map inc)))

0:45 clojurebot: Unmatched delimiter: ]

0:46 hiredman: ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 10 (range 10)) (partial map inc)))

0:46 clojurebot: ((1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10))

0:46 slashus2: I am still adjusting. Came from a world of mutability.

0:46 cooldude127: slashus2: try some haskell first. get forced out of it

0:46 :)

0:46 slashus2: noo

0:46 :-P

0:46 hiredman: atoms are better for local low contention things

0:46 refs for global high contention

0:48 slashus2: Say in a genetic algorithm, I am trying to do a single crossover mating on two vectors. I could create an atom referencing the first part of the slice, and then use that atom to construct the rest of the offspring's dna.

0:49 hiredman: ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 10 (range 10)) ((f partial) inc map)))

0:49 clojurebot: ((1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10) (1 2 3 4 5 6 7 8 9 10))

0:50 defn: How hard would it be to make something similar to that of say, a TI-89?

0:51 Why does Texas Instruments have such a monopoly on the graphing calculator?

0:51 slashus2: A clojure powered graphics calculator!

0:51 hiredman: slashus2: I have never done any genetic programming, but it seems like that could just be a function of the two vectors, why do you need some mutable state?

0:52 slashus2: I am still partial to looping and mutation.

0:52 defn: slashus2: Yeah I'd love to do it-- I just don't really know where to start, but I suppose if I think about it long enough...

0:52 slashus2: I will grow out of it.

0:52 danlarkin: it's very, very hard

0:52 hiredman: ,(vec (map + [1 2 3 4] [10 20 30 40]))

0:52 clojurebot: [11 22 33 44]

0:52 defn: danlarkin: really?

0:53 danlarkin: really

0:53 defn: danlarkin: What is so difficult in your estimation?

0:54 danlarkin: they use very advanced formulae in those calculators for derivation and integration

0:54 in order to give you an answer in a reasonable amount of time

0:54 hiredman: ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 3 (range 3)) ((f partial) inc map)))

0:54 clojurebot: ((1 2 3) (1 2 3) (1 2 3))

0:54 cooldude127: danlarkin: i have some symbolic math code in clojure that understands a few derivative rules :)

0:55 defn: cooldude127: I would love to see it!

0:55 cooldude127: it's mostly ported from the PAIP book

0:55 hiredman: obfuscation would be easier if clojure had a built in flip function

0:55 cooldude127: defn: it's in math/symbolic.clj on http://github.com/cooldude127/clojure-code/

0:56 hiredman: ,(import '(java.util LinkedList Collections))

0:56 clojurebot: nil

0:56 defn: cooldude127: thanks so much

0:57 slashus2: It would be cool if clojure had built-in symbolic math stuff.

0:57 gregh: SICP also has some symbolic differentiation code: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-18.html#%_sec_2.5.3

0:57 slashus2: It would be a really good thing.

0:57 hiredman: ,(let [f #(fn [& y] (apply % (reverse y))) shuffle #(let [a (LinkedList. %)] (Collections/shuffle a) a)] ((f map) ((f map) (replicate 3 (range 3)) ((f partial) inc map)) (partial map shuffle)))

0:57 clojurebot: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Collection

0:58 * hiredman dies

0:58 cooldude127: slashus2: i'm gonna keep working on this, maybe it will become the definitive

0:58 hiredman: ,(let [f #(fn [& y] (apply % (reverse y))) shuffle #(let [a (LinkedList. %)] (Collections/shuffle a) a)] ((f map) ((f map) (replicate 3 (range 3)) ((f partial) inc map)) shuffle))

0:58 clojurebot: (#<LinkedList [3, 2, 1]> #<LinkedList [2, 1, 3]> #<LinkedList [3, 1, 2]>)

0:58 cooldude127: hiredman: don't you have your own repl? :-p

0:58 slashus2: Not very many good languages have thing feature built-in.

0:58 hiredman: I am trying to inject some clojure into #clojure

0:58 slashus2: that*

0:59 That code makes my heart skip a beat. :-P

1:00 * danlarkin appreciates hiredman's efforts

1:01 hiredman: I'll spare you the corrected shuffle that calls seq on the LinkedList

1:02 slashus2: Flexing his functional programming muscles.

1:02 hiredman: ~hiredman

1:02 clojurebot: hiredman is slightly retarded

1:03 danlarkin: ok I'm off to bed, giving up on actually getting a jar tonight

1:04 slashus2: The behavior of the repl when you run java -jar clojure.jar doesn't have an up arrow history feature, or allow you to hit the back arrow. Is this normal?

1:04 cooldude127: woo! :

1:04 math.symbolic> (simp '(d (* 2 x) x))

1:04 2

1:05 math.symbolic> (simp '(d (* 2 (** x 2)) x))

1:05 (* 2 (* 2 x))

1:05 could use a few more rules :)

1:06 defn: Why don't paint applications ever let you use a trackpad like a wacom? You have to click the mouse button.. It ruins the whole thing.

1:06 It should be like finger painting on a trackpad.

1:08 hiredman: slashus2: use rlwrap

1:08 rlwrap java -jar clojure.jar

1:10 slashus2: rl is referring to the readline library right?

1:10 hiredman: yes

1:10 defn: math.symbolic> (simp '(d (* x (** 2 x)) -1))

1:13 cooldude127: defn: that doesn't sound right

1:14 nope, fails awesomely

1:14 (+ (* x (d (** 2 x) -1)) (* (** 2 x) (d x -1)))

1:14 math.symbolic> (simp '(d (+ (* 2 (** x 2)) (* 4 x)) x))

1:14 (+ (* 4 x) 4)

1:14 yay

1:15 slashus2: cooldude127: You should make to accept in-line input as well.

1:15 it*

1:15 cooldude127: slashus2: what do you mean?

1:15 slashus2: dx x**2

1:15 or something like that

1:16 cooldude127: slashus2: you mean infix

1:16 slashus2: yes yes

1:16 cooldude127: and to that i say: no

1:16 slashus2: sorry

1:16 cooldude127: not fun

1:16 lol

1:16 infix is gross and requires handling precedence

1:16 slashus2: It would be nasty.

1:17 cooldude127: the one i ported this from handles infix, but i didn't want to bother

1:17 if you want to use lisp, use prefix

1:18 slashus2: I know, I just wanted to see your reaction.

1:18 cooldude127: lol

1:18 well, i'm off to bed, i'm gonna work on this more tomorrow...err, today, but later

1:18 slashus2: I thought you might do something like *head explodes*.

1:18 cooldude127: haha

1:18 i should have

1:18 anyway, good night

1:19 slashus2: night

1:20 defn: cooldude127: iyou gone yet?

2:38 qmrw: how do I convert an integer into a Character or String? I tried (Character. 65) but that gives exception java.lang.ClassCastException: java.lang.Integer (NO_SOURCE_FILE:0)

2:39 i guess i ask, how to convert Integer into a char?

2:40 slashus2: (char 56)?

2:42 qmrw: man i feel so relieved and stupid, thanks!

2:42 slashus2: (int \H) => 72

2:43 qmrw: ah, now those two functions complete the picture

3:29 alinp: ,(doc lazy-seq)

3:29 clojurebot: "([& body]); Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. Any closed over locals will be cleared prior to the tail call of body."

3:30 alinp: hi

3:31 can anyone help me regarding a demo for lazy evaluation in clojure ?

3:31 I understand that the expression will not be evaluated unless needed

3:32 (I'm coming from strict env, java and it's little bit strange for me to understand the behavior of lazy evaluation)

3:44 ,(doc lazy-cons)

3:44 clojurebot: java.lang.Exception: Unable to resolve var: lazy-cons in this context

3:44 achim_p: alinp: anything specific you don't understand?

3:45 alinp: I need something like for idiots to explain what is lazy evaluation :)

3:46 the thing is that I know something about it, but I don't want to get the wrong idea and live with it

3:46 some examples with and without lazy evaluation will help a lot

3:46 to see what's the difference in a real example

3:50 user=> (doc lazy-cons)

3:50 java.lang.Exception: Unable to resolve var: lazy-cons in this context (NO_SOURCE_FILE:1)

3:50 c'mon ...

3:51 so... where's my lazy-cons ?

3:51 hiredman: lazy-cons is gone

3:51 slashus2: alinp: (range 10) would be a good example of a function returning a lazy sequence. I could do (range 1000000000) and it wouldn't take any time; it only guarantees that I will have up to that many numbers if I request them; not loading all of those numbers into memory. (take 5 (range 100000000)) will take the first 5 numbers of that lazy sequence.

3:52 hiredman: ~def lazy-seq

3:52 (doc lazy-seq)

3:52 clojurebot: Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. Any closed over locals will be cleared prior to the tail call of body.; arglists ([& body])

3:53 alinp: slashus2: thanks, it's very clear now

3:53 at least as simple as it sounds

3:53 other q now: why lazy-cons was removed ?

3:54 achim_p: alinp: are you using the latest svn revision?

3:54 alinp: yes

3:54 hiredman: the creation of seqs needed to move up a level of abstraction to provide fully lazy seqs

3:54 alinp: oh, I see

3:55 achim_p: clojure's laziness model changed very recently - most of the (unofficial) documentation you'll find online won't reflect that ...

3:55 alinp: achim_p: I noticed that

3:55 so, btw

3:55 hiredman: achim_p: the official api page doesn't reflect it either

3:55 alinp: it's a good thing to use svn version ?

3:55 should I use some release ?

3:55 hiredman: alinp: most do

3:56 alinp: I see

3:56 it's very frustrating to find myself tomorrow without a function :)

3:56 I mean .. I write some piece of code today and tomorrow it makes no sense

3:57 hiredman: weird

3:57 alinp: maybe the doc should be up to release version ?

3:57 * hiredman has no lazy-cons calls

3:57 alinp: btw, the API doc from clojure.org is for release version ?

3:57 hiredman: the api page is targeted at the latest release which was from december

3:58 slashus2: Is there a release schedule?

3:58 alinp: by realease I mean 20081217

3:58 oh, ok

3:58 hiredman: slashus2: nope

3:59 alinp: thanks guys for infos

3:59 slashus2: It will probably be a while before the language stabilizes I trust?

3:59 achim_p: alinp: i'd suggest switching back to svn <= 1286 for now

3:59 hiredman: rhickey is trying to get everything in shape for 1.0 because after that the ideal would be no breaking changes

4:00 alinp: so, there will be a 1.0 version .. yey

4:00 I asked on mailing list ... that maybe some -v arg should be available for clojure

4:00 hiredman: well, I was expecting 1.0 a month or two ago, so...

4:00 alinp: I'm pretty sure that will be, right ? when a version will be

4:01 one more q ...

4:01 hiredman: do you know if 1.0 will be a branch from current trunk ?

4:01 I mean, the trunk is targeted to be 1.0 ?

4:01 slashus2: After the integration of full laziness, it will probably be pretty unstable for a while?

4:02 hiredman: what else would it be?

4:02 alinp: well, I don't know

4:02 maybe is working in parallel for version 1.0 to other branch

4:02 hiredman: slashus2: maybe a few days, a week at the most I imagine

4:02 alinp: that's why I'm asking

4:03 hiredman: rhickey moves fast

4:03 alinp: I really noticed that :)

4:03 hiredman: and contrib already builds, so it just needs so testing

4:03 the main thing will be the libraries out there to catch up

4:05 clojurebot got updated to lazy today, the amount of changes required was a few lines here and there. I had one function that someone else contributed that I did not unstand stop working

4:06 uh, well, I guess it is yersterday now

4:16 alinp: hiredman: can you please tell me (or link) what exactly is a special form ?

4:16 form and special form

4:16 form != special form ?

4:16 :)

4:17 AWizzArd: special form is a subset of the set of all forms

4:17 A form is something that can be evaluated

4:18 alinp: so, a function is a form ?

4:18 a function can be evaluated, right ?

4:19 AWizzArd: the code that you write down can potentially be a form

4:19 the Common Lisp Hyperspec defines it as: form n. 1. any object meant to be evaluated.

4:19 hiredman: "form" more else means a s-expression

4:19 AWizzArd: no

4:19 this is not a form:

4:19 ,(hahaha 15)

4:19 clojurebot: java.lang.Exception: Unable to resolve symbol: hahaha in this context

4:20 AWizzArd: as long hahaha is not defined as a function the s-expression (hahaha 15) is not a form

4:20 hiredman: AWizzArd: I am not attempting to pin the thing down

4:20 AWizzArd: good :)

4:21 hiredman: I am giving a very inprecise, but in most cases good enough answer

4:21 AWizzArd: right

4:21 jdz: AWizzArd: i don't agree

4:21 alinp: ok, thank you

4:21 AWizzArd: jdz: what I said is from Kent Pitman

4:22 I discussed this issue with him in April 2005.

4:22 jdz: so what you mean is that formness of an s-expression depends on dynamic context?

4:23 and one cannot talk about something being a form without first trying it in runtime environment?

4:23 AWizzArd: I asked him: "IF (foobar 1 2) is also a form, what then is /not/ a form?"

4:23 He answered: "Something you don't intend to evaluate."

4:23 jdz: )foobar 1 2( definitely is not a form

4:23 AWizzArd: agreed

4:24 An expression is an object that either does not appear at all in a form or appears in a place that doesn't follow normal evaluation rules. e.g., in (defun foo (x) (declare (fixnum x)) (+ x 3)) the expression (fixnum x) appears, but is not something intended to be executed (nor is it executed; its position in the expression prevents the evaluator from reaching it).

4:24 Also from Pitmans mail.

4:25 hiredman: alinp: special forms are forms that having something is not a function or a macro as the first (the operator position)

4:25 def is not a function or a macro, (def a 1)

4:25 AWizzArd: http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#special_form

4:25 jdz: i'd say special forms are the ones you cannot express in the language itself (they have to be implemented by lower-level means)

4:25 like, for instance, lambda

4:27 oh, i mean special operator above (using CL terminology)

4:27 AWizzArd: http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#form

4:27 hiredman: see, my answer "forms are basically s-expressions" is far more useful an answer then arguing about symatics and pasting stuff from the hyperspec

4:28 AWizzArd: hiredman: it is not my answer vs yours. I already agreed that in most cases s-expressions can be seen as equal to forms. It is just the matter of providing the definitions.

4:29 hiredman: AWizzArd: clojure is not common lisp, and while it may use some of the same terms as cl they do not have the same symantic content

4:29 AWizzArd: Several things of what the CLHS states are true for all members of the Lisp family.

4:30 It makes no sense to invent a completely new vocabulary for Clojure. And especially not one that contradicts the one that already is in use for some decades.

4:31 hiredman: "there are only so many good names"

4:31 AWizzArd: Anyway, I have a question, maybe you have an idea:

4:31 Problem: generating n pairwise different random numbers between a and b. The general idea would be: (take 4 (set (repeatedly (rand-int 20))))

4:31 but this does not work, as set eagerly tries to eat as much it can from the infinit set of random numbers

4:32 achim_p: the (non-)formness of "(foobar 1 2)" in clojure might be different from CL, because CL does different things to symbols read during read time. anybody remember the details? i sure don't :)

4:33 hiredman: hmmm

4:33 AWizzArd: (take-while (not= 4 (count (set (repeatedly (rand-int 20))))))

4:33 jdz: achim_p: i don't think this example represents what you mean (whatever it is)

4:33 AWizzArd: I see no way to have infinit/lazy sets right now.

4:33 Or is there maybe a nice trick to express this problem in a highlevel way?

4:34 jdz: AWizzArd: how about making a set from 4 elements taken from the inifinite sequence?

4:34 make it 8

4:34 hiredman: you can, it just would not be a set, it would be a lazy seq

4:34 hmm

4:35 AWizzArd: and the lazy seq does not have the semantics of storing only one copy of each object

4:35 hiredman: it could

4:35 hmmm

4:35 yeah, it would not be pretty

4:35 AWizzArd: ,(take 4 (set (take 1000 (repeatedly #(rand-int 20)))))

4:36 clojurebot: (0 1 2 3)

4:36 AWizzArd: ,(take 4 (set (take 1000 (repeatedly #(rand-int 20)))))

4:36 clojurebot: (0 1 2 3)

4:36 AWizzArd: :)

4:36 this guy orders them ;)

4:36 achim_p: i roughly remember rhickey stating "a symbol is just a symbol in clojure" and that it would be different in CL. thus i'd argue (hahaha 1 2) is a form regardless of hahaha being defined.

4:37 hiredman: (doc hash-set)

4:37 clojurebot: Returns a new hash set with supplied keys.; arglists ([] [& keys])

4:37 AWizzArd: achim_p: it has nothing to do with the behaviour of the reader.

4:37 jdz: achim_p: that would be the other way around actually, because CL has dynamic environment (there could be a symbol-unbound handler established, like it is in the REPL usually)

4:38 hiredman: ,(take 4 (apply hash-set (take 1000 (repeatedly #(rand-int 20)))))

4:38 clojurebot: (0 1 2 3)

4:39 hiredman: ,(take 4 (apply hash-set (repeatedly #(rand-int 20))))

4:39 AWizzArd: I suppose that killed the bot?

4:39 hiredman: nah

4:39 AWizzArd: ah okay, it stopes after 5 secs, good

4:39 hiredman: clojurebot: still good right?

4:39 clojurebot: No entiendo

4:39 jdz: i don't understand why you'd expect that to work, actually

4:39 hiredman: blew the heap

4:40 AWizzArd: jdz: how would you wish to state that problem to express the idea?

4:40 I mean, in a highlevel and efficient way

4:40 hiredman: jdz: I site the case of "you never know"

4:41 AWizzArd: set could be growing lazily

4:41 hiredman: ,(let [a #(first %&)] (apply a (iterate inc 0)))

4:41 clojurebot: 0

4:41 jdz: i don't quite understand what you want to achieve, because i think what you want is (hash-set (take 4 (repeatedly #(rand-int 20))), but it clearly is not because then you'd write it that way

4:42 AWizzArd: jdz: the random numbers should be pairwise different

4:42 if we just take n out of that seq then there could be duplicates

4:42 jdz: oh, right, no duplicates

4:42 AWizzArd: that is what makes it interesting imo

4:43 there are lots of inefficient ways, and of course the efficient low-level way

4:44 I am just curious if I maybe missed something that allows to express the idea in an elegant way, but is efficient as well

4:44 jdz: well, you can write your own lazy-sequence that has a set inbetween...

4:44 AWizzArd: for example, for shuffeling a vector I would love to say (sort random my-vector)

4:44 jdz: you can express it in a very elegant way using loop/recur :)

4:45 AWizzArd: but Java does not like it that 2 > 1, and 1 > 5, and 5 > 2

4:45 jdz: yes *g*

4:45 jdz: AWizzArd: shuffling a vector is not that trivial

4:45 if you want to do it correctly, that is

4:46 achim_p: AWizzArd: distinct?

4:46 jdz: and wanting your sort+random to work is a bad idea mio

4:47 *imo even

4:47 achim_p: ,(take 4 (distinct (repeatedly #(rand-int 20))))

4:47 jdz: ,(doc distinct)

4:47 what, clojurebot is not threaded?

4:52 looks like distinct is what AWizzArd is after, but why does it not quite work?

4:56 achim_p: jdz: hmm, it doesn't?

4:56 user=> (take 4 (distinct (repeatedly #(rand-int 20))))

4:56 (7 4 16 14)

4:56 jdz: oh, it does. it's just that clojurebot is dead

5:03 AWizzArd: achim_p: looks good, I must try it

5:03 thx hiredman, jdz and achim_p

5:03 jdz: AWizzArd: the source to distinct is actually the loop/recur i had in mind :)

5:06 AWizzArd: yes, of course

5:06 jdz: can we maybe use this example code of achim_p to shuffle a vector?

5:07 though it would be damn inefficient, forget it

5:07 idea was to use that code for generating the order of indexes

5:09 djpowell: SimpleDateFormat is a pain. It is so un-thread-safe that it mutates itself during a call to .parse if I remember. You can imagine the hilarity that caused when I was writing a web-based calendar sync app once.

5:09 achim_p: should be n log n, right? you can shuffle in linear time, but not in pure clojure

5:09 djpowell: it might be handy if there was a way to have a dynamic var rebound to a new instance of an object in each thread for using such un-thread safe objects

5:09 AWizzArd: wtf, (time (def x (take 100000 (distinct (repeatedly #(rand-int 100000)))))) only takes 250-300 msecs on my machine?!

5:10 jdz: achim_p: why not? i'm just writing vector shuffling which i think will be linear time...

5:10 AWizzArd: ah, damn.. of course, as take is lazy

5:12 jdz: AWizzArd: what does laziness has to do with it?

5:12 *have

5:13 AWizzArd: i mean, where did you expect any slowness?

5:13 AWizzArd: well, just do (time (count x)) :)

5:13 achim_p: jdz, well, technically indexed access in clojure is logarithmic

5:13 AWizzArd: I wanted to see how big my vectors (which I want to shuffle) could be with that method

5:14 achim_p: that might matter for huge vectors - you won't beat java's shuffle

5:14 jdz: achim_p: there are no indexed accesses in that code...

5:15 achim_p: jdz: fisher yates shuffle?

5:15 AWizzArd: achim_p: you mean there already is a shuffle in Java?

5:15 achim_p: schau mal deine Messages an :p

5:15 jdz: achim_p: no, i was talking about the AWizzArd's nanobenchmark

5:15 achim_p: AWizzArd: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#shuffle(java.util.List)

5:17 jdz: achim_p: i actually can't remember exact names of the correct shuffling algorithms because i came up with a correct one myself when i needed it :)

5:23 AWizzArd: clojurebot: max people

5:23 clojurebot: max people is 149

5:23 AWizzArd: ,(.shuffle (java.util.Vector. [10 20 30 40]))

5:23 clojurebot: java.lang.IllegalArgumentException: No matching field found: shuffle for class java.util.Vector

5:24 jdz: ,(java.util.Collections/shuffle (java.util.Vector. [10 20 30 40]))

5:24 clojurebot: nil

5:25 jdz: ,(let [vec (java.util.Vector. [10 20 30 40])] (java.util.Collections/shuffle vec) (seq vec))

5:25 clojurebot: (30 20 10 40)

5:27 AWizzArd: okay, I missed that shuffle was a static method, thx

5:28 Hallo the Lau.

5:28 Lau_of_DK: Hey AWizzArd

5:28 Any gen-class gurus in here ?

5:35 I have Class1, which is inherited from Class2, Class2 has a protected member: display, which I need to expose to my own class, which has Class1 as superclass, like

5:35 public class MyClass extends Class1

5:35 How do I expose that field?

5:43 cgrand: Lau_of_DK: :exposes {display {:get get-display :set set-display}}

5:45 err I mean :exposes {display {:get getDisplay :set setDisplay}}

6:02 Lau_of_DK: cgrand: I get a "No matching field found" error - Do I need something like Class2$display ?

6:14 cgrand: Lau_of_DK: hmm, let me check genclass.clj

6:19 Lau_of_DK: is "No matching field found" the exact message you get?

6:21 or do you get "field, display, not defined in class, Class1, or its ancestors

6:25 Lau_of_DK: hmm I think I got it: how do you _use_ the exposed field?

6:28 you have to access it through (.getDisplay this) not through (.display this)

6:39 djpowell: hmm, anybody had any problems with using :load and :gen-class together?

6:40 I seem to be getting Var blah/blah is unbound exceptions at runtime for a function that was in the loaded file

6:42 Is :load pretty much a straight include

6:44 Lau_of_DK: cgrand: I think my usage was the problem :)

6:45 It was - Thanks alot!!

6:54 djpowell: Ah, I think it might be cause I'm doing something with #=

7:07 I think my problem was that #= stuff is read at read time, so having a file that defines a function used in an #= expression, and then tries to use it doesn't work, cause the function doesn't get implemented until after read time

7:07 AWizzArd: the new clojure still does not work with slime, right?

7:08 I just checked out 1291, but when starting slime it still complains java.lang.Exception: Unable to resolve symbol: lazy-cons in this context (core.clj:70)

7:09 jwinter: What do you get when you start Clojure's stand-alone Repl?

7:10 AWizzArd: that works

7:10 jwinter: oh

7:10 arbscht: AWizzArd: that will be because swank-clojure has not been updated to work with the newly merged lazy features

7:11 AWizzArd: probably

7:11 arbscht: as rich suggested in the announcement, if you're not interested in updating tools and libraries, best to wait instead of updating your clojure

7:11 AWizzArd: sure

7:13 djpowell: why? is there going to be some back compat added?

7:14 oh ok - I see, just give time for tools to get updated

7:15 AWizzArd: ericthorsen: does Enclojure already support the new clojure.jar?

7:15 rfgpfeiffer: djpowell: back compat is (binding [rest next] ...)

7:29 djpowell: Has anyone experimented with definline btw? Is it worth the effort?

7:35 leafw: djpowell: it's just a thin layer over macros, really.

7:35 ericthorsen: AWizzArd: Not yet. As I understand it, Rich is in the midst of the merge (although it may already be up).

7:36 AWizzArd: We have a release that will go up today and then we are going to integrate the new clojure.jar as the next task

7:38 djpowell: Is it related to the :inline metadata?

7:39 Chouser: djpowell: yes, it's related

7:41 AWizzArd: ericthorsen: sounds good, I will be glad to try out the new Enclojure then.

7:41 I will try it with the version short before the lazy-merge

7:41 Chouser: a fn with :inline metadata can be treated like a function (passed to 'map' or 'filter', stored in a collection, etc.) in which case the :inline stuff is ignored

7:42 however if the fn is called simply, in a context where a macro would work, the :inline expansion is used instead.

7:43 djpowell: Oh ok.

7:44 Chouser: definline produces both from a single macro-like definition, so you don't have to write both versions

7:45 it's useful if your fn takes primitive args and passes them along to Java methods or other inline fns. It allows you to avoid a box/unbox round.

7:46 jdz: Chouser: is it something like compiler-macros of CL?

7:46 Chouser: jdz: I don't know CL well enough to say. Got a link?

7:47 jdz: file:///Users/jdz/Documents/Specifications/HyperSpec-7-0/HyperSpec/Body/26_glo_c.htm#compiler_macro

7:48 compiler-macros are a cross breed of macros and functions

7:48 that's why i think definline might be something similar

7:49 more information on compiler-macro: file:///Users/jdz/Documents/Specifications/HyperSpec-7-0/HyperSpec/Body/m_define.htm#define-compiler-macro

7:53 AWizzArd: does Java have bit arrays? Those that store bits in real bits, and not use bytes under the hood to represent a single bit?

7:54 I want such an array of one billion bits which should eat around 125 MB ram

7:55 jdz: BigInteger

7:55 Chouser: jdz: after some quick reading, I think that CL compiler-macros are used for rather different purposes than :inline fns

7:56 jdz: :inline is a little performance hack to work around Java's lack of tagged numbers.

7:57 jdz: Chouser: i have not seen any uses of definline myself (actually now is the first time i first see it exists); can you please point to some uses of it?

7:57 Chouser: the :inline and fn parts are expected to do the very same thing, not different things like compiler-macros

7:58 ~def +

7:59 ~def floats

7:59 leafw: [now that is a colol feature of clojurebot]

7:59 s/colol/cool/

8:00 Chouser: hm, the floats link missed by a few lines.

8:00 gotta go, bbl.

8:00 durka42: yeah, some of the links are off. clojurebot could be reading metadata from a slightly out of date build

8:03 jdz: Chouser: well, compiler-macros are expected to do the same thing as the original function; a conforming implementation can freely ignore them. the point of them is to perform some preprocessing if argument types or values are known at compilation time (like, it can rewrite (expt x 2) as (* x x))

8:04 looks like compiler macros are a higher level abstraction of what :inline metadata tries to provide.

8:05 or, if somebody has written (expt 2 3) in their code, compiler macro could replace that by 8.

8:06 would be an order of magnitude more useful if the envorinment access stuff was standardized (could use compiler inferences then, too)

9:28 gnuvince: Is anyone currently working on getting swank-clojure to work with the latest clojure trunk?

9:28 cooldude127: is there a function in clojure that gives the first index of an element in a collection?

9:28 gnuvince: cooldude127: the first index?

9:29 cooldude127: gnuvince: the index of the first occurence of an item

9:29 gnuvince: like (index-of \a "bar") => 1

9:29 Something like that?

9:29 cooldude127: yes

9:29 gnuvince: Not built-in as far as I know.

9:30 ,(some (fn [[i e]] (when (= e \a) i)) "bar")

9:30 clojurebot: java.lang.UnsupportedOperationException: nth not supported on this type: Character

9:30 cooldude127: yeah, this is the sucky part about porting from CL. sometimes it has functions we don't

9:30 gnuvince: ,(some (fn [[i e]] (when (= e \a) i)) (indexed "bar"))

9:30 clojurebot: java.lang.Exception: Unable to resolve symbol: indexed in this context

9:30 gnuvince: ,(use 'clojure.contrib.seq-utils)

9:30 clojurebot: java.io.FileNotFoundException: Could not locate clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on classpath:

9:30 gnuvince: well, I suck at clojurebot it seems

9:30 cooldude127: gnuvince: gotta use your own repl, clojurebot has no contrib

9:31 plus i'm not on trunk

9:31 and clojurebot is

9:32 gnuvince: (some (fn [[i e]] (when (= e \a) i)) (indexed "bar"))

9:32 1

9:32 cooldude127: gnuvince: well maybe i can write my own with that

9:32 cool

9:33 gnuvince: cooldude127: there's also a similar function in Stu's book

9:33 Page 70 in beta 7

9:33 cooldude127: the thing is i also need to make it support a start parameter

9:33 to start looking at a certain point

9:34 durka42: just take a substring of "bar"?

9:35 cooldude127: durka42: i was thinking just do a subseq, then add back the start parameter

9:35 it should be noted i don't plan to use this with strings

9:35 lists

9:35 are more what i'm interested in

9:36 durka42: what are you on besides trunk?

9:36 cooldude127: durka42: older trunk

9:36 before the laziness

9:36 durka42: ah

9:36 cooldude127: i'm not ready

9:37 Chouser: wise

9:37 cooldude127: i've got working clojure, i don't feel like messing with it yet

9:38 Lau_of_DK: swank-clojure and slime still are fitted to the new rev ?

9:39 djpowell: AWizard: Java has java.util.BitSet - will that do?

9:41 AWizzArd: yes, looks good to me

9:41 cooldude127: wait does subseq not do what i think it does?

9:42 AWizzArd: djpowell: do you happen to know if it will try its best to use really just bits under the hood? (BitSet. 1billion) <-- needs +/- 125 MB ram?

9:42 Chouser: cooldude127: works on sorted collections

9:42 cooldude127: there's also subvec, but if you're just working on seqs, you probably just want drop

9:43 cooldude127: Chouser: yeah actually figured that out on my own :)

9:43 Chouser: good! :-)

9:43 cooldude127: the haskell experience before clojure was good for this

9:46 sweet i got it working for at least 2 test cases :)

9:48 make that 3

9:49 technomancy's clojure-test-mode is super cool, btw

9:50 buggy as all hell, but at the very least it will run your tests in the repl

10:22 pattern matching is some cool shit

10:23 Chouser: cooldude127: you're doing that in clojure, or something else?

10:23 cooldude127: i'm porting the patmatch.lisp from PAIP to clojure

10:23 Chouser: ok

10:23 cooldude127: for use with the symbolic math stuff

10:24 and it's awesome!

10:29 Aor: Hi. Is there anywhere to download the Clojure documentation, or will I have to scrape the site to get it?

10:29 jbondeson: regex are drugs: you start out in the gateway regex, and the next thing you know you're moving onto the hardcore stuff and you're writing 300+ char regex with multiple negative lookaheads...

10:30 danlarkin: well they /can/ express anything, after all :)

10:30 gnuvince: regexes are turing complete?

10:31 danlarkin: they can express any DFA or NFA

10:31 jbondeson: there are patterns they can't match, like counting.

10:32 Chouser: jbondeson: that's just weak Java regexen. Perl regex can do that.

10:32 I think.

10:32 jbondeson: Aor: you're probably going to have to scrape, the docs aren't in svn

10:32 * gnuvince shudders

10:33 Hun: perl regex are turing complete (even without using eval. you can do recursion)

10:33 gnuvince: When I learned to program, the more I got comfortable with regexes, the more I tried to avoid them.

10:33 danlarkin: that's an implementation detail.. regular expressions themselves (the formal language) are turing complete

10:33 jbondeson: Chouser: no they can't (ex-perl regexer). you can't match x 'Q' chars followed by x+1 'R' characters

10:33 where x is variable

10:33 Hun: but it's better in my experience to use a real parser generator once it gets more complicated than about 150 chars (all regex combined)

10:33 gnuvince: http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/0d05837df1efe075

10:34 Hun: danlarkin: no, they aren't

10:34 turing complete is chomsky 0. regex cover regular strings (therefor the regular), which is chomsky 3

10:34 there are a few layers between

10:34 cooldude127: SHIT! clojure doesn't have the dotted pair notation does it?

10:35 Hun: jbondeson: you can do that by using recursion or eval in the regex. but perl's regex aren't regular

10:35 Chouser: jbondeson: hm, even using (?{ }) ?

10:35 jbondeson: Chouser: that's not regex, that's using perl IN the regex

10:35 Chouser: cooldude127: use a vector length 2

10:35 jbondeson: well...

10:35 jbondeson: it's not a regex anymore.

10:36 it's code embedded in a regex that fires on a match

10:36 Hun: true

10:36 Chouser: jbondeson: then using your defintion of regex, I concur. :-)

10:36 cooldude127: Chouser: that's not what i mean tho. i'm dealing with the pattern matching, and i'm having a problem where i sort of need to splice in a match (substitute to get (+ 1 2 3) instead of (+ (1 2 3))

10:37 Hun: i did that in CL once by using (apply #'apply list)

10:37 i'm not sure if that's good style... don't think so

10:37 jbondeson: Chouser: by the same token if you get the results of the match object in java and loop through to determine a match in java. perl just makes a shortcut

10:37 danlarkin: Hun: you're right... seems my knowledge of automata is slipping :(

10:37 cooldude127: Hun: i was looking for an easy syntactical way because these are in a list of rules

10:38 AWizzArd: When someone connects to my compojure program, how can I find out which IP it was?

10:38 Hun: is this lisp or just a string? ergo can you be sure it's well-formed?

10:38 cooldude127: Hun: who you talkin to?

10:38 Hun: cooldude127: to you

10:39 cooldude127: k, well then it's lisp: http://tinyurl.com/d49ddo

10:39 those are the current rules

10:40 i want one that splits up (+ 1 2 3 4 5) into (+ (+ 1 2) (+ 3 4 5)) and so on until i only have to deal with 2 addends

10:41 Hun: i'd use something like a (reduce (lambda (x y) (list '+ x y)))

10:41 cooldude127: Hun: except this is not executable code. these are unevaluated lists of rules

10:41 Hun: hmm. ok, that breaks it down to a right-hanging tree. you could go on from there

10:42 cooldude127: maybe i shouldn't use rules for this part, maybe this is better done in code

10:42 Hun: i'm not sure. can you do a funcall on a symbol in clojure?

10:42 cooldude127: Hun: i think you just resolve the symbol

10:42 Hun: ergo can you (apply '+ '(1 2))

10:43 cooldude127: yes you can do that

10:43 which i didn't know

10:43 you can also do ('+ 1 2)

10:43 Hun: then most of your problems should be solved, together with the reduce

10:44 cooldude127: oh wait, that doesn't work actually

10:44 it returns 2

10:44 not 3

10:44 Hun: (playing zippy) Looks like you are trying to build a math application. Maybe you want to read the corresponding pages in SICP.

10:44 danlarkin: ,(#'+ 1 2)

10:44 clojurebot: 3

10:44 cooldude127: oh

10:45 Hun: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-16.html

10:46 danlarkin: don't see why you need to quote it though

10:46 ,(apply + [1 2 3])

10:46 clojurebot: 6

10:46 cooldude127: danlarkin: wondering if we can call a symbol

10:46 as in something extracted from a quoted list

10:47 Hun: cooldude127: that link's for you. they are doing something similar there

10:47 danlarkin: ,(resolve '+)

10:47 clojurebot: #'clojure.core/+

10:47 danlarkin: ,(apply (resolve '+) [1 2 3])

10:47 clojurebot: 6

10:48 cooldude127: k

10:48 Hun: yeah i see

10:49 Hun: they're avoiding the problem that i'm dealing with here

10:49 they only deal with two items as well

10:50 Hun: they're doing some really cool stuff in that book. like constructing a numeric tower from scratch

10:50 cooldude127: yeah i've seen some of it

10:50 SICP is pretty awesome

10:52 Hun: damnit, now you've got me wondering whether this rule-based method is the way to go.

10:52 Hun: :)

10:52 cooldude127: i like the elegance of the SICP method. all my logic is in code

10:52 Hun: never underestimate the code some guys wrote 20 years ago

10:52 cooldude127: and to fix this problem, i would just change the way make-sum works

10:52 have it handle this problem

10:53 i've watched the lectures, these guys are brilliant

10:53 sussman was a co-creator of scheme, wasn't he?

10:53 Hun: iirc yes

10:53 together with the mighty steele

10:53 cooldude127: of course

10:54 hey well i'll bbiab. i'm in class and it just ended so i have to head to the next one

10:54 yason: hey, I have a quick question. Is there a high-level changelog for Clojure somewhere?

10:55 I spent lots of time learning it a few months ago but now there's lots of new stuff and I'd just like to see the diffs, in the sense of what to read about in order to catch up

10:56 jbondeson: yason: the svn log is pretty high level

10:56 though it doesn't give any specifics about how to call the new stuff

10:56 yason: jbondeson: it's not the primary version control that developers use?

11:02 AWizzArd: but don't forget:

11:03 ,('+ 1 2)

11:03 clojurebot: 2

11:03 AWizzArd: :)

11:03 cooldude127: ok i'm back, and now for a new git branch to scrap all my old work :)

11:03 Hun: hrhr

11:04 cooldude127: Hun: was that supposed to be haha?

11:04 Hun: something like that

11:04 AWizzArd: I think he means:

11:04 ,('+ 1 2)

11:04 clojurebot: 2

11:04 cooldude127: Hun: what's your keyboard layout?

11:05 Hun: dvorak

11:05 AWizzArd: It will try to look up the 1st element in '+ and if it doesn't find it, returns the default of 2

11:05 Hun: hrhr can be typed with one hand, haha needs both

11:05 Aor: Hm, so no-one knows if there's offline documentation? I'll take that as a no then...

11:05 * Aor grabs WinHTTrack for scraping

11:06 cooldude127: Hun: i thought it could be colemak, what i use, cuz a and r are right next to each other

11:06 AWizzArd: Hun: I use the NEO-Layout. For me it's the same as with dvorak.

11:06 Chouser: yason: you might get such a changelog with the next release.

11:07 yason: until then the svn log is probably your best bet

11:07 Hun: also i think of ernie from sesame street :)

11:07 yason: Chouser: ok, that sounds reasonable. I've spotted some experimental stuff such as streams by observing the clojure mailing list but it's probably best to catch-up with non-experimental features first

11:08 Chouser: there's definitely demand for some kind of weekly or monthly high-level update on the world of clojure, but nobody has taken on the task that I know of.

11:08 yason: I haven't heard definitively, but I think streams will be abandoned.

11:08 yason: Chouser: there are both low-level and high-level commits in the svn changelog but their number is low enough for one person to skim through them

11:09 Chouser: Part of the constant change :)

11:09 Chouser: Items on the issues page name the svn rev where the change went in, but I don't think there's currently any link the other direction.

11:10 It'd be nice to have an automated page for that too.

11:11 yason: Chouser: method calls inside doto seems to require the prefix .dot now...

11:12 I guess most of such changes are found automatically when the program doesn't work. Might take time to spot the documentation change though

11:13 Chouser: this might be useful too: http://clojure.org/space/changes

11:15 yason: Chouser: it is, thank you

11:21 cooldude127: damnit clojure, now i can't name my stuff var? cuz you took it!

11:21 clojurebot: svn rev 1292; fixed (= (lazy-seq nil) nil)

11:25 AWizzArd: is it possible to name something + in ones own namespace?

11:26 cooldude127: AWizzArd: yes, if you shadow the old one i think

11:26 clojurebot: svn rev 1293; fixed bean, patch from Chouser

11:26 cooldude127: AWizzArd: not a wise choice

11:26 but i think you can

11:28 AWizzArd: ,(find-doc "shadow")

11:28 clojurebot: nil

11:29 cooldude127: it's something in use i think

11:32 rhickey: So, for lazy destructuring - && ?

11:34 AWizzArd: rhickey: looks good

11:34 danlarkin: we'll have to use that when destructuring a lazy sequence? would that be incompatible with regular seqs?

11:35 rhickey: danlarkin: no, you can use & or && with any sequential thing, the former will force to seq/nil, i.e. it maps to next, the latter will not, i.e. it maps to rest

11:38 danlarkin: rhickey: ah, good. yeah && seems fine to me

11:40 Chouser: that's better than '&rest'?

11:40 I don't have an opinion yet, just asking.

11:42 :rest

11:44 Bracki: What's clojure's equivalent of Python's dir()?

11:44 And how do I inspect a struct?

11:44 Chouser: ,(keys (ns-publics 'clojure.zip))

11:44 clojurebot: (lefts down insert-left up next path children vector-zip append-child zipper branch? end? leftmost edit replace insert-right root insert-child prev seq-zip xml-zip make-node rights node right left remove rightmost)

11:45 Chouser: Bracki: I guess it depends on what you're inspecting. For a struct just print it -- either 'prn' or return it at the repl.

11:45 shoover`: Chouser: the variable to capture the rest is usually called rest, so I think [a b && rest] is better than [a b &rest rest]. &rest start to look like CL or elisp

11:46 Bracki: Just returning leads to this: java.lang.IllegalArgumentException: Wrong number of args passed to: PersistentStructMap

11:46 Chouser: shoover`: no, you can't call it rest unless you wan to shadow the builtin fn by that name -- i'd recommend against it.

11:47 [a b :rest etc :as all] doesn't look too bad, does it?

11:47 shoover`: Chouser: oh yeah, that :) guess I shouldn't look at clojure.core/and and /or

11:48 Chouser: shoover`: yes, clojure.core shadows builtins too much for my liking.

11:48 shoover`: I'll buy :rest

11:48 Chouser: But I guess it's more dangerous in code that will be edited by mere mortals.

11:49 danlarkin: I like && more than &rest

11:49 Bracki: What's clojure's toString equivalent?

11:49 Chouser: Bracki: sounds like you're calling something instead of just returning a value.

11:49 Bracki: str

11:49 cooldude127: Bracki: str

11:50 Bracki: Chouser: so how do I return it?

11:50 Chouser: danlarkin: I think I do too. &rest is kinda ugly. I think I'd prefer :rest or && over &rest

11:51 achim_p: i prefer && too. it stands out more than :rest + it's shorter + it's more consistent (unless we get :next too)

11:51 dreish: Me three.

11:51 Chouser: ,(create-struct foo :a :b :c)

11:51 clojurebot: java.lang.Exception: Unable to resolve symbol: foo in this context

11:51 cgrand: would (fn [x && args] ...) be possible?

11:51 rsynnott1: :rest is a little weird, as there's confusion with key arguments

11:52 Chouser: ,(create-struct :a :b :c)

11:52 clojurebot: #<Def clojure.lang.PersistentStructMap$Def@1e03a61>

11:52 Chouser: ,(struct (create-struct :a :b :c) 1 2 3)

11:52 clojurebot: {:a 1, :b 2, :c 3}

11:52 Bracki: ,(defstruct thingy :a :b)

11:52 clojurebot: DENIED

11:53 dreish: ,(.format System/out "P4 %d %d\n" (into-array [100 100]))

11:53 clojurebot: #<PrintStream java.io.PrintStream@194566d>

11:53 dreish: ,(.format System/out "P4 %d %d\n" #=(into-array [100 100]))

11:53 clojurebot: java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined: [Ljava.lang.Integer;@11456c5

12:01 danlarkin: well there's a patch for hiredman, he shouldn't be allowing create-struct

12:01 Chouser: danlarkin: why not?

12:02 defstruct has a side effect of creating a Var, but create-struct does not.

12:02 achim_p: lisppaste8: url

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

12:03 danlarkin: oh... yes... I rescind my comment

12:03 lisppaste8: achim_p pasted "destructuring too eager?" at http://paste.lisp.org/display/75719

12:04 achim_p: destructuring expressions like [x & xs] seem to do more work than before since full laziness has been introduced ...

12:04 Chouser: with && that ought to be reduced to printing just 1

12:04 but going to 3 now is interesting.

12:06 dreish: Does it macroexpand to roughly the same things, plus or minus s/rest/next/?

12:13 achim_p: dreish: & is just a symbol, it's not a macro. the destructuring is happening on the java side of things

12:15 Chouser: ,(macroexpand '(let [[a & r] s]))

12:15 clojurebot: (let* [vec__1958 s a (clojure.core/nth vec__1958 0 nil) r (clojure.core/nthnext vec__1958 1)])

12:17 ozy`: ,(macroexpand '(let [a b] (f x)))

12:17 clojurebot: (let* [a b] (f x))

12:17 danlarkin: isn't there like a destructure function or something

12:18 ~source destructure

12:19 curious, wrong line number

12:20 Chouser: but I don't think that's being used here

12:20 (defn f [& ls] (let [[x & xs] ls] x)) only consumes 2 items, as we'd expect for & (as opposed to &&)

12:20 ,(macroexpand '(fn f [x & xs] x)

12:20 clojurebot: EOF while reading

12:21 Chouser: ,(macroexpand '(fn f [x & xs] x))

12:21 clojurebot: (fn* f ([x & xs] x))

12:32 wlr: how about &n -> next and &r -> rest ?

12:32 rhickey: if it's going to include a word, a keyword like :rest is best

12:33 Chouser: I doubt we'll get a gratuitous breaking change making & invalid.

12:33 rhickey: & maps to & in fn

12:33 Chouser: rhickey: are you looking at the fn & being less lazy than before?

12:34 achim_p: ,(macroexpand '(fn [x & xs]))

12:34 clojurebot: (fn* ([x & xs]))

12:34 rhickey: Chouser: trying not to think about that - only matters for apply

12:36 Chouser: heh, ok.

12:36 * Chouser continues to try to think about it.

12:36 rhickey: the only problem with :rest is its length - doesn't feel like pattern matching

12:38 [x : xs] might make Haskellers happy

12:38 : is currently not a valid token

12:39 Chouser: looks suspiciously like infix notation. ;-)

12:39 though I suppose & does too, come to think of it.

12:39 rhickey: right

12:41 except they'd expect [a : b : cs] instead of [a b : cs]

12:41 Chouser: and since i've not heard anybody ask for (x & xs) to do cons, I guess nobody will ask for (x : xs)

12:41 ah

12:41 rhickey: :& is valid

12:45 if not suggestive of anything

12:47 && kind of suggests you are a step away from &

12:47 achim_p: [x ? xs], [x &? xs] ?

12:47 '?' is currently a legal name though

12:49 gnuvince: rhickey: might it not be confused with logical and like in Java?

12:49 jbondeson: i don't think : is the way to go simply because it has those roots in list construction in haskell. something with & would be ok to me (even &:)

12:49 rhickey: gnuvince: oh yeah, Java, sure, it might

12:50 jbondeson: but its meaning here would match Haskell's at least for the [x : xs] case

12:51 Chouser: would fn get this too?

12:51 jbondeson: rhickey: true, but then you do get to the issues of : not actually *being* a list construction. dunno. it's a tough one.

12:51 rhickey: Chouser: what would it mean for fn?

12:51 jbondeson: it would certainly make me feel at home to use :

12:52 rhickey: jbondeson: it's not construction when used in pattern matching, which is similar to this binding situation

12:53 jbondeson: rhickey: it is a deconstruction, but it's the list deconstruction because it matching the construction as x -> x' : xs -> x

12:53 Chouser: (fn [a : b]) would get b as an unforced lazy-seq instead of a forced seq. But of course you asking means I must be missing something...

12:54 something like the fact that I'm asking for 'b' at all means I'm likely to at *least* see if it's empty or not.

12:54 * Chouser drops it.

12:54 rhickey: Chouser: outside of apply that doesn't matter, unless you want () when no extra args supplied?

12:55 (defn foo [&& xs] xs)

12:55 (foo) -> ()

12:55 Chouser: right, very little value. I withdraw my request.

12:56 rhickey: I'm not sure it won't come up eventually, lazy apply

12:56 gnuvince: It might be surprising for some people to discover that [x & xs] works in both fn and let, but [x : xs] only works with let.

12:56 I know it would surprise me.

12:57 rhickey: gnuvince: you can't use :as in fn already

12:58 Chouser: I wonder about the empty test always being present

12:58 gnuvince: ,((fn [x & xs :as all] [x xs all]) [1 2 3])

12:58 clojurebot: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: Unsupported binding form: :as

12:58 gnuvince: Did that change recently?

12:58 user> ((fn [[x & xs :as all]] [x xs all]) [1 2 3])

12:58 [1 (2 3) [1 2 3]]

12:59 oh

12:59 duh

12:59 rhickey: gnuvince: the actual fn args are not a destructuring form

12:59 gnuvince: ,((fn [[x & xs :as all]] [x xs all]) [1 2 3])

12:59 clojurebot: [1 (2 3) [1 2 3]]

12:59 gnuvince: rhickey: oh, I get it.

13:08 danlarkin: I still prefer && over all the other suggestions

13:10 I pronounce & as "and-args", and && makes sense to me as "lazy-and-args"

13:10 but that's probably just me

13:15 rhickey: I likes &&, it feels like :rest punishes those who want lazy, slightly

13:16 * Chouser has no objection.

13:16 jbondeson: i can live with &&. i'll just have to stop thinking "boolean-and"

13:16 Chouser: were you thinking bit-and for &

13:16 or does Java not have that?

13:16 rhickey: Chouser: it does, good point

13:17 jbondeson: haven't used too much of the destructuring forms, but yeah, years of C have ingrained the ampersands into my brain

13:17 i don't think it's an issue though

13:18 the existance of & makes && logical

13:28 cooldude127: how long was it before scheme got macros?

13:29 cuz as far i can tell, SICP has no trace of them

13:29 Hun: pretty early. but scheme's macros are a whole different case

13:29 cooldude127: oh i know

13:29 Hun: http://www.cs.indiana.edu/~dyb/pubs/tr356.pdf

13:29 cooldude127: stupid hygienic macros

13:30 jbondeson: whoa now... hygenic macros can be nice

13:30 Hun: your down-to-earth-macros are afaik only implementation specific

13:30 cooldude127: jbondeson: hygienic macros can be REALLY daunting tho

13:31 clojure and CL macros are really easy to wrap your head around by comparison: here's some code, now translate it into some other code

13:33 wow i'm being a good little coder: all my functions have a with-test block around them

13:34 jbondeson: the only problem with that is it makes your functions harder to read.

13:34 cooldude127: only a little, but it's SO CONVENIENT

13:37 jbondeson: when i first opened up a code file with everything wrapped in with-test i said, "holy crap there are no functions defined!"

13:37 cooldude127: haha

13:38 it reminds me of python's doctest, but more useful

13:38 jbondeson: it could probabaly be a bit more readable if the function body is explicitly separated from the test cases by a comment or something

13:38 rhickey: It's not either/or - I'd welcome a hygienic macro package for Clojure

13:40 jbondeson: clojure makes it a little nicer since you don't have to clutter your code with 8billion gensyms

13:40 gregh: I saw an implementation of hygenic macros in terms of lisp macros once

13:40 jbondeson: gregh: that had to be one nasty macro.

13:40 gregh: http://www.ccs.neu.edu/home/dorai/mbe/mbe-lsp.html

13:44 jbondeson: some times i miss CL code: "(cddadr synruledef)"...

13:46 looking at that code, porting to clojure may not *to* terrible

13:47 could be an interesting exercise.

13:50 i am just having a horrible typing day.

13:54 cooldude127: is there a standard clojure mechanism for signaling an error?

13:54 do i need to throw an exception?

13:58 jbondeson: i do believe so

13:59 danlarkin: or you can use error-kit!

13:59 jbondeson: though i think it was Chouser that was working on a CL-like error system

13:59 is error-kit functional?

13:59 cooldude127: idk, i just made a function to wrap throwing the exception

13:59 (defn error [& message]

13:59 (throw (Exception. (apply str message))))

13:59 danlarkin: functional as in usable? yes

14:00 jbondeson: hey look at that, error-kit is in contrib

14:00 i missed him adding it in

14:00 danlarkin: there's some documentation in his mailing list posting about it

14:01 jbondeson: haha, i love the "== EXPERIMENTAL ==" comment

14:02 rsynnott1: jbondeson: you could always write your own version of the cadadr-type things

14:02 (though I'm not sure why anyone would WANT them)

14:02 jbondeson: rsynnott1: nostalgia

14:03 next up: clojure.contrib.pretend-you-are-coding-cl

14:03 cooldude127: haha

14:06 clojurebot: svn rev 1294; fixed reverse and sort to return () on empty coll

14:12 cooldude127: error kit looks cool

14:15 so what is the right way, in a ns declaration, to say use this namespace renamed as this

14:15 do i require it, then alias?

14:17 achim_p: cooldude127: (ns foo (require [clojure.zip :as zip]))

14:17 cooldude127: that's what i was looking for

14:22 Chouser: assert-if-lazy-seq only complains on lazy seqs, not on empty persistent lists.

14:22 ,(if (reverse nil) :t :f)

14:22 clojurebot: :f

14:23 Chouser: ^^ that returns true as of 1294

14:23 or :t rather

14:23 and no exception thrown.

14:29 rhickey: Chouser: yeah, some of the library stuff still uses LazySeq.EMPTY, like ASeq.more(), but long-term, that's not going to be the case, will eventually use PersistentList.EMPTY. That is also its own type - PersistentList.EmptyList - we could check for that too I guess

14:30 cooldude127: Chouser: nice work with error-kit, i like

14:30 Chouser: cooldude127: using any continues yet?

14:31 cooldude127: Chouser: nope, this is a really simple use

14:31 Chouser: ok

14:31 cooldude127: i have one defined error and it's only raised from one place

14:31 and there's no real way to recover

14:31 so yeah, about as basic as it can be

14:32 Chouser: I don't know if I'll be comfortable calling it non-experimental until I (or somebody at least) has a real-world use case involving continues.

14:32 hiredman: clojurebot: ping?

14:32 clojurebot: PONG!

14:32 cooldude127: haha

14:33 Chouser: rhickey: so LazySeq.EMPTY would go away?

14:34 rhickey: Chouser: I think so

14:35 Chouser: and nil punning on something that returns PersistentList-or-nil is ok, so the assert would indeed be more useful if it checked for PersistentList.EmptyList as well.

14:36 bleh, tea bag burst.

14:37 danlarkin: that'll teach you to use tea bags

14:39 jbondeson: clearly another point in the argument for coffee and against tea

14:40 danlarkin: nah, I just think he should brew loose leaf tea

14:40 slashus2: Just cut open the tea bag and put it in a coffee maker.

14:48 rsynnott1: and then never use the coffee maker for coffee again, as it will taste odd

14:49 (tea likes to lay down layers of basically unremovable tannin)

14:50 rhickey: danlarkin: yes, loose tea rules

14:51 jbondeson: i'm surrounded by tea lovers! D=

14:52 Chouser: I've considered loose tea, though never very seriously. I'd need to do research. :-)

14:53 jbondeson: Chouser: if i'm reading this right, 'handle' + 'continue-with' are analogous to 'handle-bind' + 'invoke-restart', right?

14:53 rhickey: my supplier: http://www.specialteas.com/

14:53 rsynnott1: just get a teapot; it's fairly simple

14:54 (and then you can follow the memory aid 'one spoon per person and one for the pot' which I always found slightly creepy; apparently the pot requires a sacrifice of tea leaves)

14:54 * Chouser is not a tea snob, and will avoid ridicule only by *not* mentioning his supplier or brand.

14:54 danlarkin: I shop here: http://goodleaftea.com/ :)

14:54 * rhickey is a tea snob, apparently :)

14:55 danlarkin: Chouser: once you taste fresh tea you'll never go back

14:56 Chouser: can I still put cream in it?

14:56 * Chouser wonders if he needs to duck now.

14:57 rhickey: Chouser: the strong Assam black teas take milk just fine

14:57 * cemerick plans on bringing a fine 2009 vintage case of Diet Raspberry Snapple to the ILC :-P

14:58 danlarkin: I like to take breakfast teas with milk

14:59 * rsynnott1 avoids milk in all circumstances

14:59 slashus2: http://www.adagio.com/ <-- They make some good tea. I use that little tea infuser on the front page.

15:00 Chouser: So CachedSeq and FnSeq went away, but LazyCons did not?

15:01 rhickey: Chouser: it will

15:01 Chouser: probably right after I update the graph?

15:01 :-)

15:03 rhickey: gone

15:06 clojurebot: svn rev 1295; got rid of LazyCons

15:06 Chouser: are streams dead?

15:07 hiredman: rhickey: zip/next is throwing LazySeq used in 'if', sometimes, when using a seq-zip

15:08 defn: ,(assoc [1 2 3] 3 4)

15:08 clojurebot: [1 2 3 4]

15:08 defn: that is so bad ass

15:08 cooldude127: is it completely evil to want to take over the + and * bindings to add symbolic math to them?

15:08 defn: cooldude127: i think the short answer is yes

15:09 technomancy: 14:07:15 < cooldude127> is it completely evil to want to take over the + and * bindings to add symbolic math to them?

15:09 mrsolo: hmm how outdated is programming clojure?

15:09 defn: mrsolo: as in the book?

15:09 mrsolo: yes

15:09 hiredman: mrsolo: it gets updated

15:09 defn: it isn't outdated. it's not even released yet.

15:09 cooldude127: defn: i mean it would preserve the old functionality when given numbers, just do it different when it gets symbols and stuff

15:09 defn: you can get the beta though

15:09 hiredman: cooldude127: I think it is fine, that is what namespaces are for

15:09 mrsolo: ok

15:09 defn: cooldude127: yeah that's cool

15:09 cooldude127: WOOO

15:09 mrsolo: thanks

15:10 defn: mrsolo: no problem

15:10 rsynnott1: mrsolo: it was updated about two days ago, I think

15:10 cooldude127: this means i can piggyback off of eval and stuff

15:10 rsynnott1: (actually, pragmatic programming's weird release style is particularly suited to clojure for that reason)

15:10 defn: yeah

15:10 i really like the book tbh

15:11 the book is fairly short, and if you are a lisp coder you wont have a problem

15:11 technomancy: cooldude127: I'm not seeing the clojure-test minor mode getting invoked for every buffer like you were mentioning

15:11 defn: however for me, it seems like a good two runs of the book start to finish is a requirement

15:11 luckily it's only about 250pgs

15:11 cooldude127: technomancy: hmm, idk my emacs has been running for a while, i'll check it fresh later

15:12 technomancy: the rest of it is still buggy. overlays don't always happen

15:12 technomancy: I got errors highlighted differently now.

15:12 cooldude127: / aren't timed right

15:12 mrsolo: *cough* my lisp/scheme whatever is actually better than java.. can anybody recommend some java api books?

15:12 cooldude127: oh cool

15:12 technomancy: oh, one known problem is that Cc

15:12 * that C-c ' won't work if you're on the first char of the overlay

15:12 you have to be further into it

15:12 defn: son of a bitch weavejester!

15:12 cooldude127: technomancy: well even that isn't working. the overlay always seems to show up on C-c C-, if it is there

15:12 defn: http://github.com/weavejester/clojure-over-ajax/tree/master

15:12 stole my idea

15:13 technomancy: oh nice.

15:13 hiredman: rhickey: jumped the gun on zip/next, moving up to the tip of trunk fixed it

15:13 technomancy: should put up an interactive tutorial like http://tryruby.hobix.com

15:13 defn: yeah i was just about to buy tryclojure.com

15:14 hiredman: yay! my pet macro works again!

15:16 technomancy: cooldude127: the slime-needs-to-be-loaded-first problem is still there, but I think I know the workaround

15:16 cooldude127: what is it?

15:16 technomancy: need to use slime-connected-hook

15:16 cooldude127: oh

15:16 technomancy: since it's async

15:16 all this callback stuff is crazy... it feels like I'm writing JS.

15:16 cooldude127: lol

15:17 jwinter: are you working on slime-clojure?

15:17 technomancy: jwinter: sort of

15:17 jwinter: errr swank-clojure

15:17 technomancy: jwinter: I'm building a tool on top of it

15:17 defn: technomancy: the install tool?

15:17 technomancy: no, a test runner: http://github.com/technomancy/clojure-mode/tree/clojure-test-mode

15:17 defn: oh cool!

15:18 technomancy: the install tool is more or less done, I think.

15:18 defn: that's a great project technomancy

15:18 technomancy: modulo bug fixes

15:18 it's still pretty rough around the edges

15:18 defn: so is production-ready code

15:18 ;)

15:18 jwinter: technomancy: cool

15:18 cooldude127: WOO! i just took over +, and it still workes

15:18 *works

15:19 technomancy: brb; lunch

15:19 cooldude127: and it does cool stuff

15:19 defn: technomancy: you need to write a testing framework and then write a book on doing TDD with it

15:19 ... profit.

15:23 cooldude127: holy shit i now have clojure understanding symbols in math

15:23 this is awesome

15:24 defn: cooldude127: cant wait to see your code

15:24 lisppaste8: cooldude127 pasted "i love life (symbolic math)" at http://paste.lisp.org/display/75730

15:25 defn: im very interested in doing algebra/calculus with clojure

15:25 cooldude127: defn: this is the result

15:25 i'll get the current code online and post a link

15:27 defn: cool

15:28 cooldude127: defn: started out as porting code from SICP, but this made it branch out into a whole new world of awesomeness

15:28 http://tinyurl.com/bg3365

15:28 there is the code

15:29 if you have a variable that you're going to use a lot, you could clean up the expressions by doing something like (def x 'x)

15:30 defn: brilliant

15:30 cooldude127: oh man this is fun

15:31 now to make it know a few more rules

15:32 if the cond in deriv gets out of hand, i might turn that into a map of predicates to functions for results

15:32 you know, a rule system that doesn't suck

15:32 Chouser: new graph up: http://tinyurl.com/clojure-classes

15:34 gnuvince: Time for Rich to move some classes around ;)

15:38 jbondeson: no, no, he'll wait until Chouser fixes ClojureScript as well.

15:38 you know, two birds with one stone

15:38 Chouser: heh

15:39 rhickey: Chouser: nice

15:39 * rhickey wonders "what was I thinking?"

15:39 Chouser: we all wonder that at times

15:39 rhickey: hah

15:40 !

15:40 Chouser: Chousuke's idea of using "badges" insted of trying to make every interface a box with arrows has helped a lot

15:40 danlarkin: haha, I think he meant we all wonder that of ourselves, but I guess it works both ways

15:40 Chouser: it allows you to see the ref stuff at the bottom right, vs. the collection stuff above, and also the points of interaction

15:41 danlarkin: no, he understood me correctly. :-)

15:41 danlarkin: :-o

15:41 cooldude127: WOO! clojure now understands the power rule of differentiation

15:42 math.symbolic> (deriv (* 2 (** x 2)) x)

15:42 (* 2 (* 2 x))

15:42 not completely simplified, but it knows the answer!

15:42 rhickey: google group now over 1500 members!

15:42 jbondeson: now try (deriv (sin (**x 2)))

15:42 cooldude127: jbondeson: :(

15:42 jbondeson: >=D

15:42 jwinter: Chouser: new graph looks great, nice job.

15:42 Chouser: jwinter: thanks!

15:43 defn: Chouser: yeah im checking it out right now

15:43 very nice

15:44 cooldude127: ah crap, how is this thing going to understand the chain rule

15:46 jbondeson: Chouser: i think my error-kit question got lost in the sea of tea-talk earlier.

15:46 "if i'm reading this right, 'handle' + 'continue-with' are analogous to 'handle-bind' + 'invoke-restart', right?"

15:47 Chouser: ah, i saw that, but forgot to follow up, sorry.

15:47 Let me go look at the CL docs for a sec...

15:47 cooldude127: nvm, i made it understand the chain rule :)

15:48 jbondeson: that should be "handler-bind" not "handle-bind"

15:48 defn: Chouser: that's great man

15:48 err cooldude127

15:49 Chouser: jbondeson: invoke-restart is more like continue

15:49 cooldude127: defn: yeah, hang on i'll post some more examples in a minute

15:49 Chouser: jbondeson: I didn't see a CL equiv. of continue-with

15:50 jbondeson: note that continue-with doesn't take the name of a continue/restart, just a value.

15:50 jbondeson: Chouser: aahhhh

15:50 cooldude127: defn: note that it only understands chain rule on a case by case basis.

15:53 jbondeson: Chouser: i'm trying to see if error-kit can do an automatic restart (continue) without a stack unwind. bind-continue looked close

15:55 condition and restart logic is all muddled in my head from lack of recent use

15:55 Chouser: bind-continue will do a partial stack unwind

15:56 up to the point of the bind-continue, instead of all the way up to the handler/continue-with that calls it.

15:56 danlarkin: hey I know this is pretty far off topic, but what part of speech would "these" be considered in the following sentence: "I've determined these documents to be invalid."? it's not a verb, noun, pronoun, adverb, conjunction, interjection, proposition... so does that make it an adjective?

15:57 jbondeson: Chouser: hmmm... interesting. wonder how CL manages a no-unwind

15:57 Chouser: jbondeson: the only construct currently in error-kit that does *no* stack unwind on a raise is continue-with

15:58 an I messed up earlier. bind-continue is called by continue, not continue-with. :-P

15:58 and

15:59 jbondeson: Unless I'm misunderstanding CL (quite possible!) it does do an unwind to the handler-bind given by an invoke-restart

16:00 I was trying to do the same thing there.

16:01 Chousuke: danlarkin: it's a demonstrative, says wikipedia

16:01 Chouser: danlarkin: I vote adjective: http://www.merriam-webster.com/dictionary/this[2]

16:01 shoover`: demonstrative pronouns?

16:02 danlarkin: Chousuke: link?

16:02 Chousuke: http://en.wikipedia.org/wiki/Demonstrative

16:06 danlarkin: so wikipedia says it's a demonstrative determiner

16:07 technomancy: is anyone currently working on fixing swank-clojure to work with the lazy branch?

16:07 I have a sinking feeling that it won't happen unless I do it. =)

16:07 jbondeson: Chouser: i believe you are correct, however, handler-bind will call the provided function without unwinding the stack, which along with restarts taking arbitrary arguments allows for in-place recovery.

16:07 danlarkin: but merriam webster indicates it's an adjective, *sigh*

16:08 defn: Any ideas on doing formant analysis on parts of speech?

16:09 Chouser: jbondeson: where does the return value of the provided function go?

16:09 danlarkin: Hm, I think demonstrative determiners /are/ adjectives... adjective it is then.

16:10 shoover`: technomancy: I bet it will happen in a week or two, but you can't know when for sure

16:10 jbondeson: Chouser: i belive it is disregarded, as typically they are used to call a restart. but i haven't looked at the spec

16:10 Chouser: so where does control go after invoke-restart?

16:11 technomancy: shoover`: I've had some patches to clojure-mode that have been sitting around for a few weeks. (same maintainer)

16:11 Chouser: My impression was that it goes to the handler-bind, and returns from there.

16:11 which seems like the definition of a stack unwind to that point.

16:12 jbondeson: i belive it continues from the restart-case

16:12 Chouser: I suppose I could actually write some CL code and see what it does. *grimace*

16:13 jbondeson: (i'm refreshing my memory with the exception handler chapter from practical cl)

16:13 Chouser: hey, me too.

16:14 defn: i need to read PCL

16:14 * defn stabs himself

16:14 Chouser: "programming clojure" is more fun.

16:14 defn: did you do PCL before clojure though?

16:14 Chouser: no

16:14 defn: hmmm

16:15 what langs are you familiar with

16:15 jbondeson: the last time i used that was for repairing out of context objects from very high up in the stack

16:15 Chouser: I'm still messing up my use of CL terminology

16:16 * technomancy felt like elisp and scheme were useful to know when picking up clojure

16:16 defn: im having some trouble getting started

16:16 im just at the curve right now i think

16:16 just need to keep marinating myself in it and ill start to understand it

16:17 jbondeson: Chouser: yeah, i am almost positive now that the restart-case will allow for immediate execution of a restart-case when a handler-bind is defined for the error

16:17 Chouser: handler-bind is up high, uses invoke-restart to send control to a restart-case, which is higher than where the 'error' was raised.

16:17 technomancy: defn: it can be tempting to try something non-trivial as your first project; I found it helpful to not be too ambitious.

16:17 cooldude127: how did it take me so long to find "git add -p"

16:17 Chouser: doesn't that mean that the stack unwinds from error up to the restart-case?

16:17 cooldude127: it reminds me of darcs record, and i loved it

16:17 technomancy: cooldude127: that's nothing; you should see magit.

16:17 cooldude127: technomancy: i use magit

16:17 technomancy: i know what it does

16:18 defn: technomancy: yeah i just have never programmed in a language like this, so i dont know what ambitious is

16:18 cooldude127: technomancy: but i don't know how to split hunks in magit

16:18 jbondeson: Chouser: restart-case throws the error

16:18 defn: and im still struggling to understand how to keep things functional, etc.

16:18 id idnt know anything about persistence or immutable data until clojure

16:18 technomancy: cooldude127: yeah, that's the one thing that's missing for me

16:18 defn: i mean i suppose i knew of them, but not by those terms

16:18 Chouser: jbondeson: doesn't the original detection of the error happen below that?

16:18 cooldude127: technomancy: i discovered that just now, and it's perfect!

16:18 cemerick: rhickey: I seem to remember you saying that at some point after AOT was in place, that generated classnames would become deterministic -- e.g. user/foo would compile into a class like user$foo, which would make invoking arbitrary fns from java-land pretty easy. Is that still in the works, or did I misunderstand something?

16:19 technomancy: defn: what languages have you used before?

16:19 Chouser: jbondeson: like the first example under "Condition Handlers", the def of parse-log-entry

16:20 defn: technomancy: Ruby, C++, Limbo

16:20 Chouser: jbondeson: the error is thrown right there with (error ...) isn't it?

16:20 jbondeson: Chouser: right, i believe you are correct

16:20 defn: I've played with a lot more, but not as seriously as those

16:20 jbondeson: Chouser: i guess the throwing of the error there just makes it the immediate restart

16:20 technomancy: defn: I'm working on an introductory screencast to Clojure

16:21 defn: Chouser: I'm just struggling with the API -- I don't really know how to put the pieces together

16:21 rhickey: cemerick: the classnames are not a path to the fn object in any case. proxy names are now deterministic

16:21 technomancy: should be ready in a week or so

16:21 jbondeson: Chouser: so if you have an error further down it will have to wind back to the restart-case

16:21 defn: technomancy: is that going to be peepcode?

16:21 jbondeson: I think i finally understand this.

16:21 Chouser: jbondeson: yes, ok, I think that's exactly how error-kit works.

16:21 technomancy: defn: yeah

16:21 defn: can i beta it if it is? ;)

16:21 cemerick: ah, it was proxy names!

16:21 technomancy: it won't be long...

16:22 * cemerick is getting senile early.

16:22 defn: technomancy: here is a question that i dont really know the answer to: Is learning clojure a good idea for someone who might not need concurrency or some of the other benefits?

16:22 Chouser: cemerick: you see that's been done?

16:23 defn: i mean, is using clojure going to be beneficial for doing basic stuff?

16:23 Chouser: defn: yes

16:23 cooldude127: defn: clojure is a good overall language

16:23 technomancy: defn: depends on how basic, I guess.

16:23 cemerick: Chouser: I'm not working with proxies at all, I don't think.

16:23 defn: i just see a lot of people using it for doing complex, expensive calculations

16:23 Chouser: cemerick: oh, ok.

16:23 defn: so i start to wonder if im playing with something that is beyond what i need

16:24 cooldude127: defn: there's plenty of basic stuff that can be done in clojure

16:24 technomancy: defn: well learning to express your problems in functional terms is valuable no matter what your needs.

16:24 cooldude127: agreed

16:24 defn: technomancy: yeah ill buy that for sure

16:24 im taking calculus concurrently with this, so that's been kind of interesting

16:24 cooldude127: defn: what kind of calculus?

16:24 cemerick: Chouser: that may change as the java portion of our codebase gets smaller, and now that proxy construction isn't reflective

16:24 defn: cooldude127: just differential

16:24 vjr: lisps are new again with clojure!

16:25 defn: analytic geometry

16:25 etc.

16:25 cooldude127: defn: wait, like derivatives and integrals and stuff?

16:25 defn: yea

16:25 technomancy: you might still end up using ruby for putting up a simple CRUD web app, but it's always good to have access to more tools.

16:25 Chouser: defn: you liked that graph? Take a look at the clojure code that produced it. no STM, no multithreading. It's the kind of thing I would have done in perl/python/ruby before.

16:25 jbondeson: Chouser: now all i have to do is translate all that back into the functions in error-kit

16:25 cooldude127: defn: my symbolic math is probably interesting to you isn't it?

16:25 technomancy: since the kinds of things clojure is good for are generally more interesting that simple CRUD web apps. =)

16:25 defn: Chouser: that makes me happy to hear :)

16:26 cooldude127: yeah it is -- i would like to write something like that because i did something similar in C++ with my Logic course

16:26 Chouser: defn: there's one tiny little macro that would have been too much trouble to try to do in those langs (except maybe ruby).

16:26 jbondeson: think i may just translate all those function in practical cl into error-kit...

16:26 defn: cooldude127: it is nice to program your way to understanding

16:26 cooldude127: that way you learn a lang and math at the same time

16:26 cooldude127: defn: that's what i'm doing in calculus 3 (which is basically linear algebra)

16:26 * defn nods

16:26 Chouser: jbondeson: yeah, well -- it could use the CL names, but I didn't want to create any false expectations. the arg lists for example don't work exactly the same way, I don't think.

16:27 defn: cooldude127: i saw your other source files for your symbolic math

16:27 cooldude127: defn: look at the math/linalg* stuff in my clojure-code repo, i coded a lot of that stuff in class while we learned the concept

16:27 defn: lots of linalg

16:27 :)

16:27 vjr: anyone ever read the Edward Lee paper on "The Problem with Threads"?

16:27 jbondeson: technomancy: you got swank-clojure fixed yet, you know now that you know it's you or nothin? ;)

16:27 cooldude127: defn: if i don't do it, i won't learn it

16:27 defn: cooldude127: yeah, and you learn clojure in the process!

16:28 jbondeson: Chouser: i think you're absolutly right to have distinct names

16:28 defn: when im sitting there doing problems in math I think: you know, I could just code this and understand every case pretty easily

16:28 technomancy: jbondeson: give me a few days.

16:28 jbondeson: I want to finish this testing thing first. =)

16:28 jbondeson: technomancy: DAYS?!? =P

16:28 defn: cooldude127: you're too smart for 18

16:28 cooldude127: defn: well, that wasn't my first experience in clojure, but you could say that you're always learning a language, no matter how much

16:28 defn: im 23 and am just taking calculus I

16:28 i had a very bad public school education in math

16:28 cooldude127: defn: i'm a freshman at georgia tech

16:28 defn: ah, congrats

16:29 cooldude127: thanks :)

16:29 technomancy: jbondeson: I'm sure it would go faster with help. =)

16:29 defn: im a junior at UW Madison (technically)

16:29 but i have at least 3 more years of study

16:29 cooldude127: oh

16:29 defn: i just transfered into their Computer Science program

16:29 I have to learn Java which sucks, so I found Clojure and here I am

16:30 I'm going to try and talk my professor into letting me do my homework in Clojure

16:30 :)

16:30 Chouser: jbondeson: ok, thanks for the vote of confidence. :-)

16:30 cooldude127: defn: well, the problem is there aren't too many good choices for a data structures class like what i'm in, since the nice languages don't have low-level enough data structures (like arrays)

16:30 leafw: would be such a pun if all these java schools suddently turned into lisp schools via clojure.

16:30 cooldude127: the better languages do too much for you

16:31 vjr: java is great for writing real langs like ruby and clojure - maybe. :)

16:31 Chouser: jbondeson: I'd be very interested to know if you get a real working case using continue/bind-continue

16:31 cooldude127: defn: but i've done certain homework assignments in clojure before i did them in java just to wrap my head around it

16:31 made me understand AVL trees

16:31 and red-black (even tho they weren't assigned) ;)

16:32 defn: i need to understand java better just for interop purposes

16:32 i was in AP computer programming and did some J# stuff

16:32 cooldude127: defn: yeah it helps

16:32 defn: (this is in high school)

16:32 cooldude127: ewwww

16:32 defn: but i dont remember much

16:32 cooldude127: defn: yeah we did real java in AP comp sci

16:32 but i knew it before that

16:32 and nobody learned anything

16:32 defn: Yeah I finally talked my professor into letting me do C for 2nd semester

16:33 because I was a rowdy little anti-establishment, fuck M$ kid

16:33 cooldude127: oh lol

16:33 well so was i, i just used java on the mac :)

16:33 defn: haha nice

16:33 brb 2seconds

16:35 vjr: so who here has done threaded apps?

16:35 rhickey: I have

16:35 vjr: ok! we all know you have..

16:35 cooldude127: lol

16:36 leafw: vjr: I have as well.

16:36 vjr: have you done the same app or two in clojure as a comparison?

16:36 shoover`: I'm looking at a lock right now and wondering why it's there!

16:36 leafw: vjr: for some small ones, yes.

16:36 mrsolo: i have but no

16:37 leafw: vjr: clojure wins flat: no verbosity, no forgetting locks, trivial creation of Runnables and Callables.

16:37 vjr: leafw: and? what was the verdict. Pretend rich isn't here.

16:37 leafw: you answered thanks.

16:38 leafw: vjr: and pmap is just the right thing. If only I could specify the maximum number of cores that it uses.

16:38 would need a global mvar *max-cores* and then use a binding around it or something.

16:39 vjr: leafw: very cool. I asked this earlier. Has anyone read the Edward Lee from Berkley paper on the problem with threads?

16:39 leafw: vjr: I use threads, I am happy that someelse designs them. So no.

16:40 vjr: I was wondering what some here might think where clojure fits in that paper..

16:40 I'll post it to the mailing list.

16:41 leafw: rhickey: haven't seen any enhancement proposal to regulat max-threads for pmap. Would you consider it?

16:42 a global var would do; then with a binding one could modify it.

16:46 vjr: as i read that paper, it gets better and better. Quite a few remarks about Java.

16:49 rhickey: leafw: I don't like the global var idea, but am amenable to controlling the threads

16:52 jbondeson: technomancy: how are you planning on debugging swank-clojure?

16:52 technomancy: jbondeson: grep -r rest ?

16:52 defn: ,(defn func [x y z k] (assoc [x y z] z k))

16:52 clojurebot: DENIED

16:52 technomancy: I haven't really thought about it much. =)

16:52 Lau_of_DK: Is Slime/swank-clojure still broken in latest versions ?

16:52 jbondeson: haha

16:53 Lau_of_DK: yeah, unless someone updated in the last hour

16:53 defn: why doesn't this work?

16:53 Lau_of_DK: k

16:53 defn: (defn func [x y z k] (assoc [x y z] z k))

16:53 (func [6 7 8 10])

16:54 cooldude127: defn: (fun 6 7 8 10)

16:54 or add an extra set of brackets

16:54 jbondeson: technomancy: i did a very naive replace of (lazy-cat ..) -> (lazy-seq (cat ...)) and ended up with no errors in swank, but slime went into infinite loops, so i was just curious if you had any ideas how to debug that

16:54 cooldude127: (defn funct [[x y z k]] ...)

16:54 jbondeson: i think that's (lazy-seq (concat ...))

16:54 jbondeson: err cons

16:55 is what i meant

16:55 defn: cooldude127: #<IllegalArgumentException java.lang.IllegalArgumentException: Wrong number of args passed to: user$func>

16:55 * jbondeson has dumb fingers today

16:55 cooldude127: oh

16:55 technomancy: jbondeson: the lack of a test suite is frustrating.

16:55 durka42: ,(doc concat)

16:55 clojurebot: "([] [x] [x y] [x y & zs]); Returns a lazy seq representing the concatenation of the elements in the supplied colls."

16:55 cooldude127: defn: is that the original, or with what i said?

16:55 durka42: what is this?

16:55 technomancy: jbondeson: If you fork it on github to start the effort, I'll jump in once I get a chance.

16:55 durka42: => (doc concat)

16:55 #<CompilerException java.lang.NoClassDefFoundError: clojure/lang/Compiler$TheVarExpr (REPL:14)>

16:56 defn: cooldude127: with what you said

16:56 technomancy: probably announce it on the list as well

16:56 cooldude127: defn: with both, or just one?

16:56 defn: both and just one

16:56 jbondeson: technomancy: that would require me to not suck with git, but if i get anywhere will do

16:56 cooldude127: either one alone should work

16:56 technomancy: jbondeson: eh; github can hold your hand through it. =)

16:56 defn: cooldude127: (defn func [[x y z k]] (assoc [x y z] z k))

16:56 (func [6 7 8 10])

16:56 jbondeson: will it make me warm hot chocolate when i get scared?

16:57 defn: cooldude127: #<IndexOutOfBoundsException java.lang.IndexOutOfBoundsException>

16:57 cooldude127: defn: i know why

16:57 defn: z = 8, so assoc is trying to place 10 at index 8 of the vector

16:57 but the vector is only 3 elements

16:58 but anyway, i need to go eat some food

16:58 technomancy: jbondeson: it'll probably pour you some scotch if I know the github guys.

16:59 jbondeson: technomancy: it better be 18 year Glenmorangie...

17:12 lisppaste8: hiredman pasted "amazingly frustrating zippers" at http://paste.lisp.org/display/75738

17:13 jbondeson: holy lazy-seq in if hunting batman

17:15 durka42: when do you turn that flag on?

17:15 is it when you compile clojure, or when you run programs

17:15 the assert-on-lazy-seq flag

17:16 Chouser: durka42: when you compile clojure

17:19 hiredman: I cannot seem to make a general function that takes the loc (in zipper speak) of a � and removes the the element preceding it(p) the elementing following it(f) and replaces the � with some kind of list containing p and f

17:19 ugh

17:20 I always get left over bits hanging around

17:24 jbondeson: progress... i got slime to show up

17:25 but i get an initialization error...

17:29 Bracki: In a list of structs how can I access a specific struct?

17:33 durka42: nth?

17:36 * hiredman wins

17:38 Bracki: Well, wrong question. How do I check if something is in a list?

17:38 Chouser: Bracki: if you put your structs in a set instead, then you can call the set as a function.

17:38 technomancy: ,(doc clojure.contrib.seq-utils/includes?)

17:38 clojurebot: java.lang.Exception: Unable to resolve var: clojure.contrib.seq-utils/includes? in this context

17:39 technomancy: I call BS; there's totally an includes? function in seq-utils.

17:40 Bracki: Well to model a graph would you use a map of maps? I currently have a map of lists.

17:41 The lists contain the neighbors.

17:42 Valid approach or what could be improved?

17:43 Chouser: does the order of the neighbors matter?

17:46 Bracki: No.

17:46 Not yet.

17:46 jbondeson: hmmm.. what does the 'and' used with a lazy-seq get you? i'm assuming a wrong result, right?

17:46 -the

17:46 Chouser: Then I'd recommend a map of sets, which would allow quick answers to the question "is x your neighbor".

17:47 ,(and (map inc ()) :wanted?)

17:47 clojurebot: java.lang.Exception: LazySeq used in 'if'

17:47 technomancy: jbondeson: yeah, that's suspect since nil won't get returned

17:48 jbondeson: you probably want to check for empty?

17:48 jbondeson: or switch to using next instead of rest maybe?

17:49 jbondeson: technomancy: false positive, that will trip a LazySeq in if condition

17:49 technomancy: oh you mean it will cause it to get realized?

17:49 jbondeson: it'll trip an assertion

17:50 trying to track down this last exception...

17:50 the repl works, it just aborts every slime action like tab-completion and doc lookup

17:54 Chouser: ,(and (seq (map inc ())) :wanted?)

17:54 clojurebot: nil

17:54 Chouser: ,(and (seq (map inc '(4))) :wanted?)

17:54 clojurebot: :wanted?

18:02 hiredman: ,(use 'clojure.contrib.seq-utils)

18:02 clojurebot: java.io.FileNotFoundException: Could not locate clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on classpath:

18:02 hiredman: :\

18:03 lisppaste8: bracki pasted "This doesn't work yet" at http://paste.lisp.org/display/75741

18:03 * cooldude127 finally learned how to handle nick collisions

18:03 Bracki: Can somebody help me to get this recursive? (find-path) should return an empty set otherwise conj the found value to itself.

18:04 Or do I have to pass the set containing the found edges as an argument?

18:05 cooldude127: Bracki: i'm still learning graphs

18:05 :)

18:05 hiredman: Bracki: instead of calling find-path recursively you would use recur

18:06 Bracki: ah. how does that work?

18:06 hiredman: well, you just replace (find-path ...) with (recur ...)

18:07 and you do need to carry around the set containing the result

18:07 gridlock: is the current working directory included in the classpath for java by default?

18:07 durka42: no

18:07 add . to the classpath to include it

18:07 hiredman: Bracki: have you looked at (for ...)?

18:08 actually

18:08 I think you can use reduce

18:11 Bracki: Does clojure support optional arguments that have a default value?

18:12 hiredman: no, but you can use hash destructuring to much the same effect

18:12 * hiredman tries to remember how that works

18:13 Chouser: not directly, but you can do (fn foo ([x] (foo x 2 3)) ([x y] (foo x y 3)) ([x y z] ...main body here...))

18:14 hiredman: that would be a simpler way

18:15 ,((fn [{:keys a :or {a 2}}] a) {:a 1})

18:15 hmmm

18:15 Chouser: heh

18:15 hiredman: wow

18:15 the jvm crashed hard

18:15 # SIGSEGV (0xb) at pc=0x2817b39e, pid=55066, tid=0x28201c00

18:15 cooldude127: lol

18:16 leafw: j #gnome

18:16 gridlock: i seem to be quite confused as to how the lib facility is supposed to work; the docs make it seem like it should be straight forward

18:17 hiredman: ,((fn [{:keys a :or {a 2}}] a) {:a 1})

18:17 clojurebot: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Symbol

18:17 gridlock: i have a path net.brehaut.mylib

18:17 and inside it i have a file mylib.clj

18:17 (sorry net/brehaut/mylib)

18:17 the file has (ns net.brehaut.mylib)

18:17 cooldude127: gridlock: you probably just want net/brehaut/mylib.clj

18:18 hiredman: ,((fn [{:keys [a] :or {a 2}}] a) {:a 1})

18:18 clojurebot: 1

18:18 hiredman: ,((fn [{:keys [a] :or {a 2}}] a) {:b 3})

18:18 clojurebot: 2

18:18 gridlock: cooldude127: should i then be able to use require ?

18:19 eg (require net.brehaut.mylib)

18:19 hiredman: (require 'net.brehaut.mylib)

18:19 cooldude127: gridlock: as long as it's on your classpath

18:19 hiredman: and whatever directory "net" is in needs to be in your classpath

18:19 gridlock: hiredman: aha! thanks :)

18:19 hiredman: if you use :require inside (ns ...) you don't need the quote

18:28 Bracki: Oh well, I'm not able to do this. Too late.

18:33 technomancy: cooldude127: pushed out a new rev of clojure-test-mode; should handle launching slime automatically

18:33 I am seeing an intermittent failure to highlight errors though.

18:34 cooldude127: technomancy: yeah that's confusing the hell out of me

18:34 technomancy: would love to have some more eyes on it, maybe see if you can get it consistently reproducible

18:34 cooldude127: this snippet may help with debugging: (map #(cons (str (:name (meta %))) (:status (meta %))) (vals (ns-interns *ns*)))

18:34 it should show all the test-result-metadata for all the vars in the namespace

18:38 cooldude127: technomancy: in a minute i will take a look

18:41 technomancy: what's been changed in clojure-mode.el?

18:43 technomancy: cooldude127: now after slime connects it will automatically enable slime-mode for any clojure-mode buffers

18:44 cooldude127: sweet

18:46 technomancy: yeah, adapted from a patch submitted on the mailing list

18:46 I wonder if I should try to usurp the maintainership of clojure-mode in the absence of jochu... =)

18:54 cooldude127: technomancy: so the expected behavior is when i load a clojure buffer, a slime repl will open?

18:54 assuming it has tests?

18:55 also i still don't know why but the first test i tried to make fail didn't show

18:55 technomancy: cooldude127: yeah. I don't like the way it screws with the window setup, but it's better than having to invoke it manually

18:55 cooldude127: technomancy: i don't really mind, since i probably wanted that anyway

18:56 but yeah, my tests aren't highlighting, and also, i'm not sure how C-c ' is supposed to work, cuz i've never seen it done anything

18:57 technomancy: it should give you an "expected FOO, got BAR" if you press it while the point is in an overlay

18:57 that actually works pretty reliably for me

18:57 cooldude127: technomancy: doesn't work at all for me, keep in mind mine are all with-test blocks

18:58 technomancy: oh right; dang

18:58 cooldude127: plus if i can't see the highlight, doesn't that mean the overlay didn't work?

18:59 technomancy: yeah

18:59 no overlay means no message

18:59 cooldude127: oh, well then this is expected :)

18:59 gnuvince_: argh

18:59 I hate it when you two talk together

19:00 technomancy: cooldude127: it works for me on that match-variable sample you sent me

19:00 gnuvince_: My coloring script gives you both the same color and your nicks are the same length

19:00 So I need to actually read to know who says what

19:00 technomancy: cooldude127: it could also be the slime version too. =\

19:00 cooldude127: technomancy: well i'm working with a completely different file now

19:00 technomancy: gnuvince_: hehe.

19:00 cooldude127: technomancy: are you on the merged trunk yet?

19:00 technomancy: still in my branch

19:01 te: tech & cooldude127 -- do you guys have jobs

19:01 you've been here all day on a wednesday

19:01 :)

19:01 cooldude127: te: no, i'm in school

19:01 technomancy: cooldude127: there's your incentive for dropping the number from your nick; to make gnuvince happy. =)

19:01 te: cooldude127: well im in school and working 50 hours a week

19:01 i envy you

19:01 cooldude127: lol

19:01 technomancy: te: I'm taking a break. =)

19:01 te: luckily my work lets me play with clojure and such

19:01 technomancy: been very productive today

19:01 te: :)

19:01 cooldude127: te: then i envy you

19:01 gnuvince_: Still no word on swank-clojure?

19:01 cooldude127: i'm poor

19:02 technomancy: gnuvince_: jbondeson was looking into it.

19:02 gnuvince_: ok

19:05 cooldude127: technomancy: what's the date on your slime?

19:08 apparently i tried to change the font-size in emacs and i crashed it

19:09 technomancy: cooldude127: http://groups.google.com/group/clojure/browse_thread/thread/2acedf58af32de77

19:09 (lists all the shas of the dependencies)

19:09 cooldude127: technomancy: broken link

19:09 technomancy: oh well, it's the latest thread in the group

19:10 cooldude127: lol

19:10 technomancy: "test-is integration via SLIME"

19:10 merged into trunk finally btw.

19:11 gnuvince_: I'm looking into swank-clojure: is there more than changing the calls to lazy-cons into lazy-seq/cons?

19:11 technomancy: gnuvince_: jbondeson said he tried that and it seemed to work on the swank side, but then slime would go into conniptions.

19:12 gnuvince_: ok

19:12 cooldude127: technomancy: ok i'm two git commits ahead of you on clojure

19:12 but i don't think they're relevant

19:12 technomancy: gnuvince_: search for jbondeson: http://clojure-log.n01se.net/

19:13 cooldude127: I merged yours already

19:14 cooldude127: technomancy: no i mean clojure.git, and i'm on the same swank and slime versions

19:14 technomancy: oh, right

19:14 cooldude127: I need to add a "last-known-good" defvar for each dep in clojure-mode

19:14 so the updater doesn't break things for you

19:15 cooldude127: or things just need to be less fragile

19:15 technomancy: that too. =)

19:15 though early breakage is better than later breakage

19:15 cooldude127: but i don't think version differences are the problem here

19:15 yeah

19:16 gnuvince_: OK

19:17 I'll probably look into that tomorrow at work when I pretend to do something ;)

19:17 technomancy: gnuvince_: send a shout out to the mailing list

19:17 don't want to duplicate effort

19:18 gnuvince_: technomancy: I'll wait until I'm sure no emergency come up at work

19:18 Like *another* fucking website

19:19 jbondeson: gnuvince_: i've gotten to the point where i have a slime repl, but the extra stuff with doc-strings and tab-completion are still not working.

19:20 gnuvince_: jbondeson: do you have a fork on github?

19:21 jbondeson: not yet, was going to do that as soon as i got this pesky exception on load out of the way

19:21 technomancy: I've got to say... after all this Clojure, elisp is starting to sound like tarzan-speak.

19:21 cooldude127: technomancy: tell me about it

19:21 technomancy: "Me get list. Me add to list. GRaaaah!"

19:22 cooldude127: haha

19:23 technomancy: I wonder what the odds would be of getting hash-table literals into 24.

19:23 they'd probably be better if I could write C. =)

19:23 cooldude127: lol

19:24 jbondeson: i think i found the next problem... swank uses seq?, and (seq? '()) => true

19:24 technomancy: that would do it

19:25 chavo_: jbondeson: is this a ClassCastException when you load slime?

19:25 hiredman: ,(seq? nil)

19:25 clojurebot: false

19:25 jbondeson: chavo_: no, Compiler error when loading swank/slime functions

19:25 hiredman: ,(seq? (seq '()))

19:25 clojurebot: false

19:26 hiredman: (def are-you-really-a-seq? (comp seq? seq))

19:26 jbondeson: ,(seq? 1)

19:26 clojurebot: false

19:26 jbondeson: ,(seq? (seq 1))

19:26 clojurebot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Integer

19:26 hiredman: ah

19:27 jbondeson: yeah

19:27 hiredman: that would be a problem

19:27 jbondeson: need to have some utility function

19:28 hiredman: (#(or (not (seq? %)) (seq %)) '())

19:28 ,(#(or (not (seq? %)) (seq %)) '())

19:28 clojurebot: nil

19:28 hiredman: ,(#(or (not (seq? %)) (seq %)) [:a :b :c])

19:28 clojurebot: true

19:28 jbondeson: ,(and (seq? '()) (not (empty? '())))

19:28 clojurebot: false

19:28 hiredman: hmmmmm

19:29 jbondeson: though yours is a little more clojure-esqe

19:30 hiredman: eh?

19:30 mine fails

19:30 [:a :b :c] is not a seq, but it said true

19:30 jbondeson: oh, yeah.

19:30 well

19:31 hiredman: ,(#(or (and (seq? %) (seq %)) %) [:a])

19:31 clojurebot: [:a]

19:31 jbondeson: i could change my (not (empty? ..)) to a (seq ...)

19:32 hiredman: ,(#(or (and (seq? %) (seq %)) %) '())

19:32 clojurebot: ()

19:32 hiredman: hmmm

19:32 ,(seq? '())

19:32 clojurebot: true

19:32 hiredman: ,(seq '())

19:32 clojurebot: nil

19:33 hiredman: ,(#(and (seq? %) (seq)) :a)

19:33 clojurebot: false

19:33 hiredman: ,(#(and (seq? %) (seq)) '())

19:33 clojurebot: java.lang.IllegalArgumentException: Wrong number of args passed to: core$seq

19:33 hiredman: ,(#(and (seq? %) (seq %)) '())

19:33 clojurebot: nil

19:33 hiredman: ,(#(or (and (seq? %) (seq %)) %) '())

19:33 clojurebot: ()

19:33 hiredman: oh!

19:33 haha

19:34 of course

19:34 taggart: ,(doc seq?)

19:34 clojurebot: "([x]); Return true if x implements ISeq"

19:34 * hiredman goes back to work

19:36 jbondeson: seq? is used in 8 places...

19:38 seq? replacement didn't fix slime... hmmm

19:40 now to somehow find any potential (if '() .. ) forms which don't trip the lazy-seq if detection

19:40 hiredman: ,(doc sequence)

19:40 clojurebot: "([coll]); Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields ()"

19:40 hiredman: ugh

19:41 (doc inverse)

19:41 huh

19:41 ,(doc inverse)

19:41 clojurebot: java.lang.Exception: Unable to resolve var: inverse in this context

19:41 hiredman: ,(doc invert)

19:41 clojurebot: java.lang.Exception: Unable to resolve var: invert in this context

19:42 hiredman: ,((complement sequence) '())

19:42 clojurebot: false

19:42 hiredman: ,((complement sequence) 1)

19:42 clojurebot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Integer

19:43 AWizzArd: ,((complement sequence) [1])

19:43 clojurebot: false

19:44 cooldude127: technomancy: curious about your emacs appearance settings (from that screenshot)

19:45 technomancy: cooldude127: inconsolata and zenburn

19:45 plus possibly hl-line-mode

19:45 cooldude127: technomancy: 2/3 :)

19:46 technomancy: something went horribly wrong

19:46 technomancy: M-x zenburn ... CRASH

19:46 technomancy: ...?

19:46 using the starter kit?

19:46 cooldude127: yeah

19:46 jbondeson: i wonder if i can patch clojure to assert on finding a persistent empty list in an if

19:46 cooldude127: technomancy: idk i'm updating my emacs to a newer build

19:47 technomancy: also, what's your font-size?

19:47 technomancy: cooldude127: 22 since I have a really high-dpi display

19:47 cooldude127: technomancy: wow

19:47 technomancy: yeah, I've got a 12-inch laptop with a reasonable number of pixels

19:47 cooldude127: i'm on a 22" 1680x1050, i don't think i can pull that off

19:48 technomancy: what laptop?

19:48 technomancy: thinkpad X61

19:48 cooldude127: nice

19:48 * cooldude127 is so fucking intrusive :)

19:48 technomancy: which afaik is the only such laptop that qualifies as both 12-inch and reasonable number of pixels unfortunately

19:48 cooldude127: k brb upgrading emacs

19:49 technomancy: yeah that didn't fix shit

19:50 technomancy: I've heard of problems with color-theme on cocoa

19:52 cooldude127: technomancy: it's definitely something to do with my config, cuz with no init-file, once i actually get the right stuff loaded, zenburn applies fine

19:52 hiredman: technomancy: what is the resolution on that?

19:53 technomancy: hiredman: 1440x1024

19:53 hiredman: hmm

19:53 that doesn't seem high enough for 22

19:53 technomancy: hiredman: unfortunately the newer thinkpads aren't as high-res =\

19:53 hiredman: I still used 10 on my 1920x1200 display

19:54 technomancy: hiredman: it's a little on the big side; I usually use that size at the end of the day

19:54 hiredman: ah

19:54 technomancy: with dejavu sans mono at 18 or so otherwise

19:55 what's the physical size of your 1920x1200?

19:55 cooldude127: technomancy: remember that .emacs bisecting thing we wanted? yeah, REALLY wish we'd done something with that right now

19:56 hiredman: 24" so the dpi is not so good

19:56 technomancy: cooldude127: wasn't someone going off to write that?

19:56 hiredman: yeah, the DPI makes all the difference

19:56 cooldude127: technomancy: not that i knew of

19:58 technomancy: shouldn't i have a ~/.emacs.d/custom.el file?

19:59 technomancy: cooldude127: only if you use M-x customize

20:01 cooldude127: technomancy: well, considering i set the font using emacs' gui, i assumed it had

20:02 ok it got changed outside customize, but god knows where

20:04 cp2: ahhhhhhhhhhh snake

20:04 technomancy: cooldude127: I use the set-default-font function

20:04 and .Xdefaults, but that's an X thing

20:06 cooldude127: nvm i'm stupid

20:09 technomancy: ok, i've eliminated fonts as the cause, the default font messes it up too

20:09 technomancy: in fact, i'm pretty sure that the only stuff left is emacs-starter-kit

20:10 technomancy: cooldude127: sorry; I can't test on OS X. =\

20:10 cooldude127: technomancy: only way to be sure is to pull a fresh emacs-starter-kit and check

20:12 technomancy: nvm, fresh emacs-starter-kit is clean

20:12 WTF am i doing wrong?

20:13 technomancy: fresh clone from me or you?

20:13 cooldude127: technomancy: from you

20:14 it's very much one of my changes

20:15 technomancy: oh well in that case you might be able to git bisect

20:15 cooldude127: oh snap!

20:19 technomancy: gotta take off... later folks.

20:21 jbondeson: damnit, i'm in a chicken and egg problem with changing the if macro. i need or, but or uses if...

20:22 durka42: changing the if macro?

20:22 jbondeson: want to expand the assert-if-lazyseq to also assert when it sees a clojure.lang.PersistentList/EMPTY

20:22 so i can track down the swank-clojure problems

20:24 multi-level if*'s it is

20:26 gnuvince_: Am I the only one who thinks wrapping with-open inside a try/catch form is not as elegant as it could be?

20:26 jbondeson: error-kit? >_>

20:28 anybody got any bets on how badly i screwed stuff up by messing with such a fundamental macro?

20:29 cooldude127: jbondeson: i safely messed with fundamental mathematical operators

20:29 like + :)

20:29 jbondeson: hahaha

20:29 = isn't defined before if

20:30 of course

20:30 because = uses if

20:31 clojure.lang.Util/equiv it is!

20:31 holy crap it compiled

20:35 Chouser: jbondeson: congrats. As Rich said, it's hard working up that high in core.clj, isn't it?

20:35 silkarn: im playing around with scheme and opengl now and I see the vectors in Scheme are not dynamically resizeable. how are clojure vectors implemented so achieve automatic resizing? is there a hidden penalty instead? because it is very nice not having to reverse a lot at the end of tailrec functions.

20:36 jbondeson: course it didn't find the issue, heh. back to the drawing board (still keeping in the change)

20:37 durka42: silkarn: the vectors never change. you get a new one

20:38 silkarn: isnt tht very innefficent?

20:38 how do you spell inefficient?

20:38 last one?

20:38 durka42: yes, the last spelling

20:39 it would be if they were really copied

20:39 but the new vector generally shares structure with the old

20:39 this stuff is rather advanced and there's no way i can explain it

20:39 but i think rhickey has a video about it

20:40 this is where someone more experienced than me jumps in and explains structural sharing and bagwell's data structures

21:10 Chouser: jbondeson: does Rich have your CA? He seemed open to that change, perhaps you could get a patch in.

21:11 jbondeson: Chouser: yeah, i've had a couple patches in.

21:11 Chouser: ah, cool.

21:58 hiredman: ,(pl (?map (replicate 3 (?apply (vector (?map (range 10) inc � inc � inc)) call � (?* 10) � call � (?+ -2) map)) shuffle))

21:58 clojurebot: ((90 40 80 50 30 70 100 20 10 60) (90 70 80 100 20 60 30 10 50 40) (40 10 90 60 80 70 50 100 20 30))

21:59 danlarkin: ?

21:59 interesting

22:00 why are you wingdinging clojure!

22:00 hiredman: :)

22:00 ?map is replaced by (flip map)

22:03 gnuvince_: (doc flip)

22:03 danlarkin: why all the effort into flipping and making unreadable code

22:03 hiredman: flip returns a function that does the same thing, but takes arguments in oppposite order

22:04 danlarkin: once you start it's hard to stop

22:06 ,(pl (?map (replicate 3 (?apply (vector (?map (range 10) inc � inc � inc)) char � call � (?* 10) � call � (?+ -2) map)) shuffle))

22:06 clojurebot: ((\( \d \ \P \2 \newline \F \Z \< \) (\ \< \ \( \Z \F \d \newline \2 \P) (\P \ \newline \ \Z \2 \( \< \d \F))

22:08 gnuvince_: eerily looks like bad Haskell

22:11 hiredman: orly

22:12 I was thinking of using arrrows for function application without parens

22:16 I guess I should $

22:19 * danlarkin would be scared to see code written in HOS

22:19 danlarkin: that is, hiredman obfuscated style

22:23 dreish: This is all my fault for pointing out that cjbot could be made to do anything using #=(eval x), isn't it?

22:27 hiredman: ,(pl inc $ 3)

22:27 clojurebot: 4

22:27 dreish: Unless this is all being done through a macro called pl. I thought maybe you had gone nuts editing the reader.

22:27 hiredman: eh

22:28 it is a macro

22:28 dreish: Okay, nevermind then.

22:28 How about a macro called apl that implements APL?

22:29 Since you seem to be moving in that direction.

22:29 hiredman: ,(pl (map call � ?+ $ 5 range $ 3))

22:29 clojurebot: java.lang.Exception: Unable to resolve symbol: � in this context

22:30 hiredman: hmm, works in the repl

22:30 dreish: ,(apl (~R?R�.�R)/R<-1??R)

22:30 clojurebot: Invalid token: /R<-1??R

22:30 hiredman: ,(pl (map call � ?+ $ 5 range $ 3))

22:30 clojurebot: java.lang.Exception: Unable to resolve symbol: � in this context

22:31 hiredman: ,(macroexpand-1 '(pl (map call � ?+ $ 5 range $ 3)))

22:31 clojurebot: (do (map call � ((uncurry +) 5) (range 3)))

22:41 cooldude127: hiredman: i must say i'm often scared of the code you create

22:42 hiredman: it's ok, my code doesn't make it into anything important

22:42 ,(pl (map call � ?+ $ 5 range $ 3))

22:42 clojurebot: (5 6 7)

22:43 danlarkin: ,(map + 5 (range 3))

22:43 clojurebot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: Integer

22:43 danlarkin: blah blah blah

22:44 you know what I meant, compiler!

22:45 hiredman: ? uncurries, but I can't tell when to stop taking arguments, so you need to either call the uncurried function at the end with no args, or call call on it

22:46 ,(((?+) 1) 2)

22:46 clojurebot: java.lang.Exception: Unable to resolve symbol: ?+ in this context

22:46 hiredman: ,(pl (((?+) 1) 2))

22:46 clojurebot: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn

22:46 hiredman: hmmm

22:57 cooldude127: why are we messing around with APL anyway?

23:03 ozy`: what's that about APL?

23:05 hiredman: ,(pl (((??filter � map inc � dec range $ 5) call � ?not= $ 2 )))

23:05 clojurebot: (0 1 3 4)

23:05 durka42: aah

23:05 cooldude127: WHYY!!!

23:06 hiredman: I don't know

23:06 ozy`: that looks more like haskell than APL

23:09 durka42: especially the $

23:09 is it the haskell $?

23:11 ozy`: without knowing what all the functions are supposed to do I'd guess in the affirmative

23:12 cooldude127: looks more like an argument placeholder

23:13 durka42: ,(doc $)

23:13 clojurebot: java.lang.Exception: Unable to resolve var: $ in this context

23:14 cooldude127: yeah not an operator

23:17 durka42: just a symbol that the pl macro interprets

23:17 where's kotarak these days

23:17 hiredman: a $ b -> (a b)

23:18 durka42: right

23:18 ozy`: ,(doc pl)

23:18 clojurebot: "([& forms]); "

23:18 hiredman: :P

23:18 ozy`: that's helpful

23:18 cooldude127: doc fail!

23:19 it should replace the empty message with something like "Document your code, dumbass!"

23:20 durka42: maybe that should be automatically included in :test

23:22 hiredman: (doc pl)

23:22 ,(doc pl)

23:22 clojurebot: "([& forms]); magic"

23:22 durka42: ~google more magic switch

23:22 clojurebot: First, out of 1700000 results is:

23:22 A Story About 'Magic&#39;

23:22 http://catb.org/jargon/html/magic-story.html

23:23 durka42: that's the one

23:23 cooldude127: clojurebot: you rule!

23:23 clojurebot: It's greek to me.

23:23 cooldude127: :(

23:23 can't understand my compliments

23:25 hiredman: http://github.com/hiredman/odds-and-ends/blob/41a1d49a52e4b559dc9599b444a69174ea0e5f55/functional.clj

23:25 ozy`: if you want to get truly APL-like behavior, you need every function to be an infix operator, with reader macros for HOF application (compose, fold), implicit scalar->vector->matrix and scalar->function auto-promotion, and a strict regiment of naming all functions with single characters

23:27 hiredman: ,(macroexpand-1 '(pl a � b))

23:27 clojurebot: (do (comp a b))

23:28 ozy`: that's what I thought that did :p

23:28 cooldude127: that's nifty

23:28 ozy`: ,(macroexpand-1 '(pl a $ b))

23:28 clojurebot: (do (a b))

23:28 cooldude127: hiredman: what are you doing to insert those damn interpuncts?

23:28 ozy`: ,(macroexpand-1 '(pl +/ a b))

23:28 clojurebot: Invalid token: +/

23:28 durka42: ,(macroexpand '(pl (??filter)))

23:28 clojurebot: (do ((uncurry (flip filter))))

23:29 durka42: is uncurry like partial?

23:29 hiredman: cooldude127: I have "/." mapped

23:29 cooldude127: oh

23:29 hiredman: durka42: the url for the source I pasted it

23:30 durka42: yes, it confuses me

23:30 hiredman: it is like a partial that keeps going

23:31 ,(pl (call (((?+ 1) 2) 3)))

23:31 clojurebot: 6

23:31 hiredman: until you call it with no args

23:32 durka42: oh, cool

23:32 kind of a lazy partial

23:39 but hiredman, what are you going to use ? for?

23:49 cooldude127: so apparently you can't define your own var called "/"

23:49 clojure can do it, but i can't!?

23:49 durka42: well clojure already did

23:49 cooldude127: yeah but i want to :(

23:50 hiredman: "/" is special

23:50 cooldude127: i'm trying to take over the math operators

23:50 hiredman: find a similar unicode character :P

23:50 cooldude127: hiredman: that's just mean to users

23:50 durka42: please don't :p

23:50 cooldude127: hiredman: this is why you scare me :)

23:51 hiredman: I have no users

23:51 cooldude127: there is no good alternative

23:51 durka42: user=> (binding [/ +] (apply / [2 3]))

23:51 5

23:52 cooldude127: durka42: yeah, but i can't say (def / ...)

23:52 durka42: true

23:52 because of the name conflict

23:52 hiredman: no

23:52 cooldude127: durka42: no that's not why

23:52 hiredman: it is because / is special

23:52 cooldude127: durka42: i already renamed it

23:52 durka42: i see

23:52 cooldude127: hiredman: well this blows

23:52 durka42: yeah, you can't do user//

23:52 hiredman: *shrug*

23:53 cooldude127: why not!? why shouldn't i be able to?

23:54 as long as it is just slashes, there should be no ambiguity

23:54 hiredman: because / is generally namespace/function serperator

23:54 cooldude127: yeah, but / is obviously the "/" symbol in the current namespace

23:54 and user// is obviously the "/" symbol in the user namespace

23:54 hiredman: obviously

23:55 cooldude127: so i should be able to do that

23:55 hiredman: obviously

23:56 cooldude127: in the meantime, is there a decent symbol ON THE KEYBOARD that could substitute

23:56 ?

23:56 i wish this was a typewriter, i would do : on top of -

23:56 hiredman: too bad % is taken too

23:56 cooldude127: lol

23:56 durka42: / ?

23:56 i mean, //

23:57 cooldude127: durka42: also not allowed

23:57 anything with a slash in it

23:57 and backslash is also already taken

23:57 hiredman: "div"

23:57 cooldude127: hiredman: yeah i might have to, but it's much uglier

23:58 someone in charge, this must not go unnoticed!

23:58 durka42: user=> (eval `(def ~(symbol "user" "//") +))

23:58 #'user///

23:58 but then you can't use it :p

23:59 i seem to have nullpointered the LispReader

23:59 cooldude127: durka42: if i successfully remove the mapping to / in clojure.core, i could probably use it

Logging service provided by n01se.net