2009-02-18
| 00:00 | technomancy | I'm close |
| 00:00 | cooldude127 | WOO |
| 00:00 | cooldude127 | technomancy: after you push, the overlays should show on any failure, not just the last, right? |
| 00:00 | cooldude127 | ideally? |
| 00:01 | cooldude127 | also did you figure out why it was global? |
| 00:01 | technomancy | why don't you look into making it buffer-local. =) |
| 00:01 | technomancy | I'm working on the multiple-failures-per-test problem. |
| 00:04 | cooldude127 | technomancy: thing is, it is supposed to be! |
| 00:07 | cooldude127 | 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 |
| 00:07 | cooldude127 | i think |
| 00:08 | technomancy | woot; fixed it |
| 00:08 | technomancy | I might add that I beat you. |
| 00:08 | cooldude127 | lol |
| 00:08 | cooldude127 | push it |
| 00:09 | technomancy | pushed! |
| 00:11 | cooldude127 | technomancy: FAIL |
| 00:11 | technomancy | wha? |
| 00:11 | cooldude127 | wrong type argument: sequencep, :pass |
| 00:11 | technomancy | cooldude127: you need to restart your slime |
| 00:11 | cooldude127 | technomancy: may i ask why? |
| 00:12 | technomancy | or maybe just call clojure-test-load-reporting |
| 00:12 | technomancy | that second one should do it actually |
| 00:13 | cooldude127 | technomancy: this is AWESOME |
| 00:13 | technomancy | yay! |
| 00:13 | technomancy | cooldude127: it works fine on with-test? |
| 00:13 | cooldude127 | technomancy: yes, idk how, but yeah |
| 00:13 | technomancy | heh; cool |
| 00:14 | cooldude127 | yeah |
| 00:14 | technomancy | I think I'm going to use defface instead of setting the bg-color |
| 00:14 | technomancy | so you can have it look decent for dark or light backgrounds |
| 00:15 | cooldude127 | technomancy: good plan. but now you should figure out this buffer-local thing, cuz it's got me baffled |
| 00:16 | cooldude127 | also, have you noticed that it's been a while since anyone else in here spoke? |
| 00:16 | cooldude127 | like, about an hour |
| 00:20 | cooldude127 | technomancy: hmm, something's not working |
| 00:20 | defn | I think I just decided what I want to do with my life. |
| 00:21 | technomancy | defn: bind function literals to vals? |
| 00:21 | defn | Ding ding ding! |
| 00:21 | defn | What do we have for them Johnny? |
| 00:21 | defn | A BRAND NEW CAR! |
| 00: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 |
| 00:23 | defn | cooldude127: what does the 127 stand for? |
| 00:23 | cooldude127 | defn: not a damn thing |
| 00:23 | defn | cooldude127: 2nd question, are you actually a cool dude? |
| 00:23 | cooldude127 | yes |
| 00:23 | cooldude127 | defn: would you believe i have been asked that before? |
| 00:23 | defn | cooldude127: final question, do you not have any desire to get rid of numbers on your nick? |
| 00: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 |
| 00: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. |
| 00:24 | cooldude127 | lol |
| 00:25 | cooldude127 | defn: if i were to remove them, i would have so many accounts to change |
| 00:25 | defn | Another part of me wonders if you're over 30? |
| 00:25 | cooldude127 | defn: nope. 18 |
| 00:25 | silkarn | how does memoize work? can it memoize a function internally? a (memoize naive-fib)? |
| 00:25 | technomancy | picking a nick is hard |
| 00:25 | technomancy | you don't realize when you're in high school that it might stick with you the rest of your life |
| 00:25 | cooldude127 | technomancy: exactly |
| 00:25 | defn | Yeah, I've had a bunch of them. I can actually give you the whole history of my life in screen names. |
| 00:25 | defn | Well history from 12-> |
| 00:25 | cooldude127 | lol |
| 00:26 | cooldude127 | technomancy: enough chit-chat. pay attention to my problems :p |
| 00:26 | defn | I was originally XxPuMT2KiLLxX on AOL |
| 00: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 |
| 00:26 | cooldude127 | oh crap |
| 00:26 | Chouser | <-- Zorph |
| 00:26 | technomancy | defn: then you learned to keep your cat off your keyboard, right? |
| 00:26 | defn | hahaha! |
| 00:27 | technomancy | cooldude127: you'll have to send me a test case to repro |
| 00:27 | technomancy | oh, actually I haven't really tried switching ns |
| 00: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' |
| 00:28 | lisppaste8 | cooldude127 pasted "this is what doesn't work" at http://paste.lisp.org/display/75684 |
| 00:28 | defn | my name is devin in real life, so defn just might stick |
| 00:29 | cooldude127 | defn: that's cool, i like that |
| 00:29 | cooldude127 | honestly sometimes i can't believe people take me seriously on here with this nick |
| 00:29 | danlarkin | sooo building jars is *the worst* |
| 00:29 | defn | haha -- im trying hard! |
| 00:30 | defn | sometimes people who dont give a shit about certain things (like personal hygene for instance), are REALLY good at other things |
| 00:30 | cooldude127 | defn: i figure that by helping people out enough, they won't care about my nick |
| 00:30 | technomancy | danlarkin: ugh. I've been putting that off. |
| 00:30 | cooldude127 | lol |
| 00:30 | technomancy | distributing code as tarballs is not that bad. =) |
| 00:31 | defn | cooldude127: it also lends a certain sort of legitimacy to what you say, too |
| 00:31 | cooldude127 | yeah |
| 00:31 | danlarkin | technomancy: for a project with a lot of deps (like mine) ohhhh what a headache |
| 00:31 | defn | people who are named "monad" or some shit tend to be arrogant ass hats |
| 00:31 | cooldude127 | lol |
| 00:31 | defn | why the lucky stiff is the perfect balance of knowledge and moniker IMHO |
| 00:31 | cooldude127 | i've considered switching my nick to something like my initials |
| 00:32 | cooldude127 | something simple and short |
| 00:32 | defn | yeah using your real name is cool because its like "hey, i actually stand by what i say" |
| 00: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? |
| 00:32 | cooldude127 | yeah |
| 00:32 | technomancy | _why is the man |
| 00:32 | defn | _why is literally my hero |
| 00:32 | defn | i think the stuff he's working on with hackety is so incredibly noble and "right" |
| 00:32 | defn | he is my moral programming compass |
| 00:32 | durka42 | ~source memoize |
| 00:33 | cooldude127 | silkarn: memoization takes advantages of closures, so the function has a reference to a map that stores the args and corresponding values |
| 00:34 | danlarkin | silkarn: http://clojure.org/atoms has a good example of memoization |
| 00: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 |
| 00:34 | cooldude127 | danlarkin: in fact i think that is the actual memoize source code |
| 00:34 | defn | im a _why-type programmer |
| 00:34 | cooldude127 | defn: yeah _why's poignant guide is AMAZING |
| 00: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!" |
| 00:35 | technomancy | cooldude127: that file you pasted works if you toss a (run-tests) on the end |
| 00:35 | defn | cooldude127: yeah that is a fantastic book |
| 00:35 | cooldude127 | technomancy: you're right, it does! WHY? |
| 00:35 | defn | cooldude127: i got my girlfriend to learn ruby with that book |
| 00:36 | defn | someone you would NEVER expect to dip their toes in |
| 00:36 | cooldude127 | defn: was she a computer-type person before that? |
| 00:36 | technomancy | defn: at RailsConf I heard him stop someone in the hall to explain all about Dog Scouts: http://www.dogscouts1.com/ |
| 00:36 | defn | cooldude127: no, not at all |
| 00:36 | cooldude127 | lol wow |
| 00:36 | technomancy | no context or anything, just "so there are these dogs that are scouts and get badges and stuff..." |
| 00:36 | technomancy | very surreal. |
| 00:36 | defn | dude wtf |
| 00:36 | cooldude127 | i can't imagine my girlfriend learning how to program |
| 00:36 | defn | why cant i be that awesome |
| 00:36 | cooldude127 | defn: i wonder about that sometimes |
| 00: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. |
| 00:37 | cooldude127 | technomancy: of course |
| 00:37 | defn | those are the thoughts going on in my head that i filter so as to look in control and useful |
| 00:38 | defn | sometimes in the middle of a meeting at work i just want to say "diana ross" or "muppet babies rule" |
| 00:38 | technomancy | cooldude127: pushed out; lemme know how it goes. |
| 00:38 | defn | cooldude127: sorry to interrupt you guys |
| 00:39 | defn | i just like technomancy |
| 00:39 | defn | i have a man crush on him |
| 00:39 | cooldude127 | we all do |
| 00:39 | cooldude127 | especially after emacs-starter-kit |
| 00:40 | danlarkin | I think I liked it better when this channel was 99% on topic :-/ |
| 00:40 | cooldude127 | lol |
| 00:40 | defn | does a channel name always dictate what on-topic is? |
| 00:41 | cooldude127 | it's supposed to |
| 00:41 | defn | what if all of the stuff im saying is generated by clojure? |
| 00:41 | danlarkin | then I'd love to see your code :) |
| 00:41 | cooldude127 | technomancy just pimped his clojure-test-mode on twitter |
| 00:41 | defn | haha! touche |
| 00:41 | cooldude127 | damnit growl |
| 00:42 | defn | what if what im typing is really just obfuscated clojure being interpreted and molded to fit the current context? |
| 00:43 | defn | after all my nick is 'defn' |
| 00: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? |
| 00:43 | cooldude127 | slashus2: i think so, but you should probably try to avoid needing that |
| 00:43 | hiredman | (map (partial map inc) (replicate 10 (range 10))) |
| 00:44 | cooldude127 | purely functional code is better |
| 00:44 | hiredman | D[D[D[D[D[D,(map (partial map inc) (replicate 10 (range 10))) |
| 00:44 | hiredman | the hell |
| 00:44 | hiredman | ,(map (partial map inc) (replicate 10 (range 10))) |
| 00: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)) |
| 00:44 | slashus2 | I know that, but an atom is much better than using a reference inside of a function? |
| 00:45 | slashus2 | ref* |
| 00:45 | cooldude127 | slashus2: yes |
| 00:45 | hiredman | ,(let [f #(fn [& y] (apply % (reverse y))] ((f map) (replicate 10 (range 10)) (partial map inc))) |
| 00:45 | clojurebot | Unmatched delimiter: ] |
| 00:46 | hiredman | ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 10 (range 10)) (partial map inc))) |
| 00: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)) |
| 00:46 | slashus2 | I am still adjusting. Came from a world of mutability. |
| 00:46 | cooldude127 | slashus2: try some haskell first. get forced out of it |
| 00:46 | cooldude127 | :) |
| 00:46 | slashus2 | noo |
| 00:46 | slashus2 | :-P |
| 00:46 | hiredman | atoms are better for local low contention things |
| 00:46 | hiredman | refs for global high contention |
| 00: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. |
| 00:49 | hiredman | ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 10 (range 10)) ((f partial) inc map))) |
| 00: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)) |
| 00:50 | defn | How hard would it be to make something similar to that of say, a TI-89? |
| 00:51 | defn | Why does Texas Instruments have such a monopoly on the graphing calculator? |
| 00:51 | slashus2 | A clojure powered graphics calculator! |
| 00: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? |
| 00:52 | slashus2 | I am still partial to looping and mutation. |
| 00: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... |
| 00:52 | slashus2 | I will grow out of it. |
| 00:52 | danlarkin | it's very, very hard |
| 00:52 | hiredman | ,(vec (map + [1 2 3 4] [10 20 30 40])) |
| 00:52 | clojurebot | [11 22 33 44] |
| 00:52 | defn | danlarkin: really? |
| 00:53 | danlarkin | really |
| 00:53 | defn | danlarkin: What is so difficult in your estimation? |
| 00:54 | danlarkin | they use very advanced formulae in those calculators for derivation and integration |
| 00:54 | danlarkin | in order to give you an answer in a reasonable amount of time |
| 00:54 | hiredman | ,(let [f #(fn [& y] (apply % (reverse y)))] ((f map) (replicate 3 (range 3)) ((f partial) inc map))) |
| 00:54 | clojurebot | ((1 2 3) (1 2 3) (1 2 3)) |
| 00:54 | cooldude127 | danlarkin: i have some symbolic math code in clojure that understands a few derivative rules :) |
| 00:55 | defn | cooldude127: I would love to see it! |
| 00:55 | cooldude127 | it's mostly ported from the PAIP book |
| 00:55 | hiredman | obfuscation would be easier if clojure had a built in flip function |
| 00:55 | cooldude127 | defn: it's in math/symbolic.clj on http://github.com/cooldude127/clojure-code/ |
| 00:56 | hiredman | ,(import '(java.util LinkedList Collections)) |
| 00:56 | clojurebot | nil |
| 00:56 | defn | cooldude127: thanks so much |
| 00:57 | slashus2 | It would be cool if clojure had built-in symbolic math stuff. |
| 00: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 |
| 00:57 | slashus2 | It would be a really good thing. |
| 00: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))) |
| 00:57 | clojurebot | java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Collection |
| 00:58 | cooldude127 | slashus2: i'm gonna keep working on this, maybe it will become the definitive |
| 00: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)) |
| 00:58 | clojurebot | (#<LinkedList [3, 2, 1]> #<LinkedList [2, 1, 3]> #<LinkedList [3, 1, 2]>) |
| 00:58 | cooldude127 | hiredman: don't you have your own repl? :-p |
| 00:58 | slashus2 | Not very many good languages have thing feature built-in. |
| 00:58 | hiredman | I am trying to inject some clojure into #clojure |
| 00:58 | slashus2 | that* |
| 00:59 | slashus2 | That code makes my heart skip a beat. :-P |
| 01:01 | hiredman | I'll spare you the corrected shuffle that calls seq on the LinkedList |
| 01:02 | slashus2 | Flexing his functional programming muscles. |
| 01:02 | hiredman | ~hiredman |
| 01:02 | clojurebot | hiredman is slightly retarded |
| 01:03 | danlarkin | ok I'm off to bed, giving up on actually getting a jar tonight |
| 01: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? |
| 01:04 | cooldude127 | woo! : |
| 01:04 | cooldude127 | math.symbolic> (simp '(d (* 2 x) x)) |
| 01:04 | cooldude127 | 2 |
| 01:05 | cooldude127 | math.symbolic> (simp '(d (* 2 (** x 2)) x)) |
| 01:05 | cooldude127 | (* 2 (* 2 x)) |
| 01:05 | cooldude127 | could use a few more rules :) |
| 01: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. |
| 01:06 | defn | It should be like finger painting on a trackpad. |
| 01:08 | hiredman | slashus2: use rlwrap |
| 01:08 | hiredman | rlwrap java -jar clojure.jar |
| 01:10 | slashus2 | rl is referring to the readline library right? |
| 01:10 | hiredman | yes |
| 01:10 | defn | math.symbolic> (simp '(d (* x (** 2 x)) -1)) |
| 01:13 | cooldude127 | defn: that doesn't sound right |
| 01:14 | cooldude127 | nope, fails awesomely |
| 01:14 | cooldude127 | (+ (* x (d (** 2 x) -1)) (* (** 2 x) (d x -1))) |
| 01:14 | cooldude127 | math.symbolic> (simp '(d (+ (* 2 (** x 2)) (* 4 x)) x)) |
| 01:14 | cooldude127 | (+ (* 4 x) 4) |
| 01:14 | cooldude127 | yay |
| 01:15 | slashus2 | cooldude127: You should make to accept in-line input as well. |
| 01:15 | slashus2 | it* |
| 01:15 | cooldude127 | slashus2: what do you mean? |
| 01:15 | slashus2 | dx x**2 |
| 01:15 | slashus2 | or something like that |
| 01:16 | cooldude127 | slashus2: you mean infix |
| 01:16 | slashus2 | yes yes |
| 01:16 | cooldude127 | and to that i say: no |
| 01:16 | slashus2 | sorry |
| 01:16 | cooldude127 | not fun |
| 01:16 | cooldude127 | lol |
| 01:16 | cooldude127 | infix is gross and requires handling precedence |
| 01:16 | slashus2 | It would be nasty. |
| 01:17 | cooldude127 | the one i ported this from handles infix, but i didn't want to bother |
| 01:17 | cooldude127 | if you want to use lisp, use prefix |
| 01:18 | slashus2 | I know, I just wanted to see your reaction. |
| 01:18 | cooldude127 | lol |
| 01:18 | cooldude127 | well, i'm off to bed, i'm gonna work on this more tomorrow...err, today, but later |
| 01:18 | slashus2 | I thought you might do something like *head explodes*. |
| 01:18 | cooldude127 | haha |
| 01:18 | cooldude127 | i should have |
| 01:18 | cooldude127 | anyway, good night |
| 01:19 | slashus2 | night |
| 01:20 | defn | cooldude127: iyou gone yet? |
| 02: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) |
| 02:39 | qmrw | i guess i ask, how to convert Integer into a char? |
| 02:40 | slashus2 | (char 56)? |
| 02:42 | qmrw | man i feel so relieved and stupid, thanks! |
| 02:42 | slashus2 | (int \H) => 72 |
| 02:43 | qmrw | ah, now those two functions complete the picture |
| 03:29 | alinp | ,(doc lazy-seq) |
| 03: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." |
| 03:30 | alinp | hi |
| 03:31 | alinp | can anyone help me regarding a demo for lazy evaluation in clojure ? |
| 03:31 | alinp | I understand that the expression will not be evaluated unless needed |
| 03:32 | alinp | (I'm coming from strict env, java and it's little bit strange for me to understand the behavior of lazy evaluation) |
| 03:44 | alinp | ,(doc lazy-cons) |
| 03:44 | clojurebot | java.lang.Exception: Unable to resolve var: lazy-cons in this context |
| 03:44 | achim_p | alinp: anything specific you don't understand? |
| 03:45 | alinp | I need something like for idiots to explain what is lazy evaluation :) |
| 03:46 | alinp | the thing is that I know something about it, but I don't want to get the wrong idea and live with it |
| 03:46 | alinp | some examples with and without lazy evaluation will help a lot |
| 03:46 | alinp | to see what's the difference in a real example |
| 03:50 | alinp | user=> (doc lazy-cons) |
| 03:50 | alinp | java.lang.Exception: Unable to resolve var: lazy-cons in this context (NO_SOURCE_FILE:1) |
| 03:50 | alinp | c'mon ... |
| 03:51 | alinp | so... where's my lazy-cons ? |
| 03:51 | hiredman | lazy-cons is gone |
| 03: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. |
| 03:52 | hiredman | ~def lazy-seq |
| 03:52 | hiredman | (doc lazy-seq) |
| 03: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]) |
| 03:53 | alinp | slashus2: thanks, it's very clear now |
| 03:53 | alinp | at least as simple as it sounds |
| 03:53 | alinp | other q now: why lazy-cons was removed ? |
| 03:54 | achim_p | alinp: are you using the latest svn revision? |
| 03:54 | alinp | yes |
| 03:54 | hiredman | the creation of seqs needed to move up a level of abstraction to provide fully lazy seqs |
| 03:54 | alinp | oh, I see |
| 03:55 | achim_p | clojure's laziness model changed very recently - most of the (unofficial) documentation you'll find online won't reflect that ... |
| 03:55 | alinp | achim_p: I noticed that |
| 03:55 | alinp | so, btw |
| 03:55 | hiredman | achim_p: the official api page doesn't reflect it either |
| 03:55 | alinp | it's a good thing to use svn version ? |
| 03:55 | alinp | should I use some release ? |
| 03:55 | hiredman | alinp: most do |
| 03:56 | alinp | I see |
| 03:56 | alinp | it's very frustrating to find myself tomorrow without a function :) |
| 03:56 | alinp | I mean .. I write some piece of code today and tomorrow it makes no sense |
| 03:57 | hiredman | weird |
| 03:57 | alinp | maybe the doc should be up to release version ? |
| 03:57 | alinp | btw, the API doc from clojure.org is for release version ? |
| 03:57 | hiredman | the api page is targeted at the latest release which was from december |
| 03:58 | slashus2 | Is there a release schedule? |
| 03:58 | alinp | by realease I mean 20081217 |
| 03:58 | alinp | oh, ok |
| 03:58 | hiredman | slashus2: nope |
| 03:59 | alinp | thanks guys for infos |
| 03:59 | slashus2 | It will probably be a while before the language stabilizes I trust? |
| 03:59 | achim_p | alinp: i'd suggest switching back to svn <= 1286 for now |
| 03:59 | hiredman | rhickey is trying to get everything in shape for 1.0 because after that the ideal would be no breaking changes |
| 04:00 | alinp | so, there will be a 1.0 version .. yey |
| 04:00 | alinp | I asked on mailing list ... that maybe some -v arg should be available for clojure |
| 04:00 | hiredman | well, I was expecting 1.0 a month or two ago, so... |
| 04:00 | alinp | I'm pretty sure that will be, right ? when a version will be |
| 04:01 | alinp | one more q ... |
| 04:01 | alinp | hiredman: do you know if 1.0 will be a branch from current trunk ? |
| 04:01 | alinp | I mean, the trunk is targeted to be 1.0 ? |
| 04:01 | slashus2 | After the integration of full laziness, it will probably be pretty unstable for a while? |
| 04:02 | hiredman | what else would it be? |
| 04:02 | alinp | well, I don't know |
| 04:02 | alinp | maybe is working in parallel for version 1.0 to other branch |
| 04:02 | hiredman | slashus2: maybe a few days, a week at the most I imagine |
| 04:02 | alinp | that's why I'm asking |
| 04:03 | hiredman | rhickey moves fast |
| 04:03 | alinp | I really noticed that :) |
| 04:03 | hiredman | and contrib already builds, so it just needs so testing |
| 04:03 | hiredman | the main thing will be the libraries out there to catch up |
| 04:05 | hiredman | 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 |
| 04:06 | hiredman | uh, well, I guess it is yersterday now |
| 04:16 | alinp | hiredman: can you please tell me (or link) what exactly is a special form ? |
| 04:16 | alinp | form and special form |
| 04:16 | alinp | form != special form ? |
| 04:16 | alinp | :) |
| 04:17 | AWizzArd | special form is a subset of the set of all forms |
| 04:17 | AWizzArd | A form is something that can be evaluated |
| 04:18 | alinp | so, a function is a form ? |
| 04:18 | alinp | a function can be evaluated, right ? |
| 04:19 | AWizzArd | the code that you write down can potentially be a form |
| 04:19 | AWizzArd | the Common Lisp Hyperspec defines it as: form n. 1. any object meant to be evaluated. |
| 04:19 | hiredman | "form" more else means a s-expression |
| 04:19 | AWizzArd | no |
| 04:19 | AWizzArd | this is not a form: |
| 04:19 | AWizzArd | ,(hahaha 15) |
| 04:19 | clojurebot | java.lang.Exception: Unable to resolve symbol: hahaha in this context |
| 04:20 | AWizzArd | as long hahaha is not defined as a function the s-expression (hahaha 15) is not a form |
| 04:20 | hiredman | AWizzArd: I am not attempting to pin the thing down |
| 04:20 | AWizzArd | good :) |
| 04:21 | hiredman | I am giving a very inprecise, but in most cases good enough answer |
| 04:21 | AWizzArd | right |
| 04:21 | jdz | AWizzArd: i don't agree |
| 04:21 | alinp | ok, thank you |
| 04:21 | AWizzArd | jdz: what I said is from Kent Pitman |
| 04:22 | AWizzArd | I discussed this issue with him in April 2005. |
| 04:22 | jdz | so what you mean is that formness of an s-expression depends on dynamic context? |
| 04:23 | jdz | and one cannot talk about something being a form without first trying it in runtime environment? |
| 04:23 | AWizzArd | I asked him: "IF (foobar 1 2) is also a form, what then is /not/ a form?" |
| 04:23 | AWizzArd | He answered: "Something you don't intend to evaluate." |
| 04:23 | jdz | )foobar 1 2( definitely is not a form |
| 04:23 | AWizzArd | agreed |
| 04:24 | AWizzArd | 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). |
| 04:24 | AWizzArd | Also from Pitmans mail. |
| 04:25 | hiredman | alinp: special forms are forms that having something is not a function or a macro as the first (the operator position) |
| 04:25 | hiredman | def is not a function or a macro, (def a 1) |
| 04:25 | AWizzArd | http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#special_form |
| 04: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) |
| 04:25 | jdz | like, for instance, lambda |
| 04:27 | jdz | oh, i mean special operator above (using CL terminology) |
| 04:27 | AWizzArd | http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_f.htm#form |
| 04: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 |
| 04: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. |
| 04: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 |
| 04:29 | AWizzArd | Several things of what the CLHS states are true for all members of the Lisp family. |
| 04:30 | AWizzArd | 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. |
| 04:31 | hiredman | "there are only so many good names" |
| 04:31 | AWizzArd | Anyway, I have a question, maybe you have an idea: |
| 04:31 | AWizzArd | Problem: generating n pairwise different random numbers between a and b. The general idea would be: (take 4 (set (repeatedly (rand-int 20)))) |
| 04:31 | AWizzArd | but this does not work, as set eagerly tries to eat as much it can from the infinit set of random numbers |
| 04: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 :) |
| 04:33 | hiredman | hmmm |
| 04:33 | AWizzArd | (take-while (not= 4 (count (set (repeatedly (rand-int 20)))))) |
| 04:33 | jdz | achim_p: i don't think this example represents what you mean (whatever it is) |
| 04:33 | AWizzArd | I see no way to have infinit/lazy sets right now. |
| 04:33 | AWizzArd | Or is there maybe a nice trick to express this problem in a highlevel way? |
| 04:34 | jdz | AWizzArd: how about making a set from 4 elements taken from the inifinite sequence? |
| 04:34 | jdz | make it 8 |
| 04:34 | hiredman | you can, it just would not be a set, it would be a lazy seq |
| 04:34 | hiredman | hmm |
| 04:35 | AWizzArd | and the lazy seq does not have the semantics of storing only one copy of each object |
| 04:35 | hiredman | it could |
| 04:35 | hiredman | hmmm |
| 04:35 | hiredman | yeah, it would not be pretty |
| 04:35 | AWizzArd | ,(take 4 (set (take 1000 (repeatedly #(rand-int 20))))) |
| 04:36 | clojurebot | (0 1 2 3) |
| 04:36 | AWizzArd | ,(take 4 (set (take 1000 (repeatedly #(rand-int 20))))) |
| 04:36 | clojurebot | (0 1 2 3) |
| 04:36 | AWizzArd | :) |
| 04:36 | AWizzArd | this guy orders them ;) |
| 04: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. |
| 04:37 | hiredman | (doc hash-set) |
| 04:37 | clojurebot | Returns a new hash set with supplied keys.; arglists ([] [& keys]) |
| 04:37 | AWizzArd | achim_p: it has nothing to do with the behaviour of the reader. |
| 04: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) |
| 04:38 | hiredman | ,(take 4 (apply hash-set (take 1000 (repeatedly #(rand-int 20))))) |
| 04:38 | clojurebot | (0 1 2 3) |
| 04:39 | hiredman | ,(take 4 (apply hash-set (repeatedly #(rand-int 20)))) |
| 04:39 | AWizzArd | I suppose that killed the bot? |
| 04:39 | hiredman | nah |
| 04:39 | AWizzArd | ah okay, it stopes after 5 secs, good |
| 04:39 | hiredman | clojurebot: still good right? |
| 04:39 | clojurebot | No entiendo |
| 04:39 | jdz | i don't understand why you'd expect that to work, actually |
| 04:39 | hiredman | blew the heap |
| 04:40 | AWizzArd | jdz: how would you wish to state that problem to express the idea? |
| 04:40 | AWizzArd | I mean, in a highlevel and efficient way |
| 04:40 | hiredman | jdz: I site the case of "you never know" |
| 04:41 | AWizzArd | set could be growing lazily |
| 04:41 | hiredman | ,(let [a #(first %&)] (apply a (iterate inc 0))) |
| 04:41 | clojurebot | 0 |
| 04: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 |
| 04:42 | AWizzArd | jdz: the random numbers should be pairwise different |
| 04:42 | AWizzArd | if we just take n out of that seq then there could be duplicates |
| 04:42 | jdz | oh, right, no duplicates |
| 04:42 | AWizzArd | that is what makes it interesting imo |
| 04:43 | AWizzArd | there are lots of inefficient ways, and of course the efficient low-level way |
| 04:44 | AWizzArd | I am just curious if I maybe missed something that allows to express the idea in an elegant way, but is efficient as well |
| 04:44 | jdz | well, you can write your own lazy-sequence that has a set inbetween... |
| 04:44 | AWizzArd | for example, for shuffeling a vector I would love to say (sort random my-vector) |
| 04:44 | jdz | you can express it in a very elegant way using loop/recur :) |
| 04:45 | AWizzArd | but Java does not like it that 2 > 1, and 1 > 5, and 5 > 2 |
| 04:45 | AWizzArd | jdz: yes *g* |
| 04:45 | jdz | AWizzArd: shuffling a vector is not that trivial |
| 04:45 | jdz | if you want to do it correctly, that is |
| 04:46 | achim_p | AWizzArd: distinct? |
| 04:46 | jdz | and wanting your sort+random to work is a bad idea mio |
| 04:47 | jdz | *imo even |
| 04:47 | achim_p | ,(take 4 (distinct (repeatedly #(rand-int 20)))) |
| 04:47 | jdz | ,(doc distinct) |
| 04:47 | jdz | what, clojurebot is not threaded? |
| 04:52 | jdz | looks like distinct is what AWizzArd is after, but why does it not quite work? |
| 04:56 | achim_p | jdz: hmm, it doesn't? |
| 04:56 | achim_p | user=> (take 4 (distinct (repeatedly #(rand-int 20)))) |
| 04:56 | achim_p | (7 4 16 14) |
| 04:56 | jdz | oh, it does. it's just that clojurebot is dead |
| 05:03 | AWizzArd | achim_p: looks good, I must try it |
| 05:03 | AWizzArd | thx hiredman, jdz and achim_p |
| 05:03 | jdz | AWizzArd: the source to distinct is actually the loop/recur i had in mind :) |
| 05:06 | AWizzArd | yes, of course |
| 05:06 | AWizzArd | jdz: can we maybe use this example code of achim_p to shuffle a vector? |
| 05:07 | AWizzArd | though it would be damn inefficient, forget it |
| 05:07 | AWizzArd | idea was to use that code for generating the order of indexes |
| 05: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. |
| 05:09 | achim_p | should be n log n, right? you can shuffle in linear time, but not in pure clojure |
| 05: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 |
| 05:09 | AWizzArd | wtf, (time (def x (take 100000 (distinct (repeatedly #(rand-int 100000)))))) only takes 250-300 msecs on my machine?! |
| 05:10 | jdz | achim_p: why not? i'm just writing vector shuffling which i think will be linear time... |
| 05:10 | AWizzArd | ah, damn.. of course, as take is lazy |
| 05:12 | jdz | AWizzArd: what does laziness has to do with it? |
| 05:12 | jdz | *have |
| 05:13 | jdz | AWizzArd: i mean, where did you expect any slowness? |
| 05:13 | AWizzArd | well, just do (time (count x)) :) |
| 05:13 | achim_p | jdz, well, technically indexed access in clojure is logarithmic |
| 05:13 | AWizzArd | I wanted to see how big my vectors (which I want to shuffle) could be with that method |
| 05:14 | achim_p | that might matter for huge vectors - you won't beat java's shuffle |
| 05:14 | jdz | achim_p: there are no indexed accesses in that code... |
| 05:15 | achim_p | jdz: fisher yates shuffle? |
| 05:15 | AWizzArd | achim_p: you mean there already is a shuffle in Java? |
| 05:15 | AWizzArd | achim_p: schau mal deine Messages an :p |
| 05:15 | jdz | achim_p: no, i was talking about the AWizzArd's nanobenchmark |
| 05:15 | achim_p | AWizzArd: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#shuffle(java.util.List) |
| 05: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 :) |
| 05:23 | AWizzArd | clojurebot: max people |
| 05:23 | clojurebot | max people is 149 |
| 05:23 | AWizzArd | ,(.shuffle (java.util.Vector. [10 20 30 40])) |
| 05:23 | clojurebot | java.lang.IllegalArgumentException: No matching field found: shuffle for class java.util.Vector |
| 05:24 | jdz | ,(java.util.Collections/shuffle (java.util.Vector. [10 20 30 40])) |
| 05:24 | clojurebot | nil |
| 05:25 | jdz | ,(let [vec (java.util.Vector. [10 20 30 40])] (java.util.Collections/shuffle vec) (seq vec)) |
| 05:25 | clojurebot | (30 20 10 40) |
| 05:27 | AWizzArd | okay, I missed that shuffle was a static method, thx |
| 05:28 | AWizzArd | Hallo the Lau. |
| 05:28 | Lau_of_DK | Hey AWizzArd |
| 05:28 | Lau_of_DK | Any gen-class gurus in here ? |
| 05:35 | Lau_of_DK | 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 |
| 05:35 | Lau_of_DK | public class MyClass extends Class1 |
| 05:35 | Lau_of_DK | How do I expose that field? |
| 05:43 | cgrand | Lau_of_DK: :exposes {display {:get get-display :set set-display}} |
| 05:45 | cgrand | err I mean :exposes {display {:get getDisplay :set setDisplay}} |
| 06:02 | Lau_of_DK | cgrand: I get a "No matching field found" error - Do I need something like Class2$display ? |
| 06:14 | cgrand | Lau_of_DK: hmm, let me check genclass.clj |
| 06:19 | cgrand | Lau_of_DK: is "No matching field found" the exact message you get? |
| 06:21 | cgrand | or do you get "field, display, not defined in class, Class1, or its ancestors |
| 06:25 | cgrand | Lau_of_DK: hmm I think I got it: how do you _use_ the exposed field? |
| 06:28 | cgrand | you have to access it through (.getDisplay this) not through (.display this) |
| 06:39 | djpowell | hmm, anybody had any problems with using :load and :gen-class together? |
| 06:40 | djpowell | I seem to be getting Var blah/blah is unbound exceptions at runtime for a function that was in the loaded file |
| 06:42 | djpowell | Is :load pretty much a straight include |
| 06:44 | Lau_of_DK | cgrand: I think my usage was the problem :) |
| 06:45 | Lau_of_DK | It was - Thanks alot!! |
| 06:54 | djpowell | Ah, I think it might be cause I'm doing something with #= |
| 07:07 | djpowell | 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 |
| 07:07 | AWizzArd | the new clojure still does not work with slime, right? |
| 07:08 | AWizzArd | 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) |
| 07:09 | jwinter | What do you get when you start Clojure's stand-alone Repl? |
| 07:10 | AWizzArd | that works |
| 07:10 | jwinter | oh |
| 07:10 | arbscht | AWizzArd: that will be because swank-clojure has not been updated to work with the newly merged lazy features |
| 07:11 | AWizzArd | probably |
| 07: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 |
| 07:11 | AWizzArd | sure |
| 07:13 | djpowell | why? is there going to be some back compat added? |
| 07:14 | djpowell | oh ok - I see, just give time for tools to get updated |
| 07:15 | AWizzArd | ericthorsen: does Enclojure already support the new clojure.jar? |
| 07:15 | rfgpfeiffer | djpowell: back compat is (binding [rest next] ...) |
| 07:29 | djpowell | Has anyone experimented with definline btw? Is it worth the effort? |
| 07:35 | leafw | djpowell: it's just a thin layer over macros, really. |
| 07:35 | ericthorsen | AWizzArd: Not yet. As I understand it, Rich is in the midst of the merge (although it may already be up). |
| 07:36 | ericthorsen | 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 |
| 07:38 | djpowell | Is it related to the :inline metadata? |
| 07:39 | Chouser | djpowell: yes, it's related |
| 07:41 | AWizzArd | ericthorsen: sounds good, I will be glad to try out the new Enclojure then. |
| 07:41 | AWizzArd | I will try it with the version short before the lazy-merge |
| 07: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 |
| 07:42 | Chouser | however if the fn is called simply, in a context where a macro would work, the :inline expansion is used instead. |
| 07:43 | djpowell | Oh ok. |
| 07:44 | Chouser | definline produces both from a single macro-like definition, so you don't have to write both versions |
| 07:45 | Chouser | 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. |
| 07:46 | jdz | Chouser: is it something like compiler-macros of CL? |
| 07:46 | Chouser | jdz: I don't know CL well enough to say. Got a link? |
| 07:47 | jdz | file:///Users/jdz/Documents/Specifications/HyperSpec-7-0/HyperSpec/Body/26_glo_c.htm#compiler_macro |
| 07:48 | jdz | compiler-macros are a cross breed of macros and functions |
| 07:48 | jdz | that's why i think definline might be something similar |
| 07:49 | jdz | more information on compiler-macro: file:///Users/jdz/Documents/Specifications/HyperSpec-7-0/HyperSpec/Body/m_define.htm#define-compiler-macro |
| 07: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? |
| 07:54 | AWizzArd | I want such an array of one billion bits which should eat around 125 MB ram |
| 07:55 | jdz | BigInteger |
| 07:55 | Chouser | jdz: after some quick reading, I think that CL compiler-macros are used for rather different purposes than :inline fns |
| 07:56 | Chouser | jdz: :inline is a little performance hack to work around Java's lack of tagged numbers. |
| 07: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? |
| 07:57 | Chouser | the :inline and fn parts are expected to do the very same thing, not different things like compiler-macros |
| 07:58 | Chouser | ~def + |
| 07:59 | Chouser | ~def floats |
| 07:59 | leafw | [now that is a colol feature of clojurebot] |
| 07:59 | leafw | s/colol/cool/ |
| 08:00 | Chouser | hm, the floats link missed by a few lines. |
| 08:00 | Chouser | gotta go, bbl. |
| 08:00 | durka42 | yeah, some of the links are off. clojurebot could be reading metadata from a slightly out of date build |
| 08: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)) |
| 08:04 | jdz | looks like compiler macros are a higher level abstraction of what :inline metadata tries to provide. |
| 08:05 | jdz | or, if somebody has written (expt 2 3) in their code, compiler macro could replace that by 8. |
| 08:06 | jdz | would be an order of magnitude more useful if the envorinment access stuff was standardized (could use compiler inferences then, too) |
| 09:28 | gnuvince | Is anyone currently working on getting swank-clojure to work with the latest clojure trunk? |
| 09:28 | cooldude127 | is there a function in clojure that gives the first index of an element in a collection? |
| 09:28 | gnuvince | cooldude127: the first index? |
| 09:29 | cooldude127 | gnuvince: the index of the first occurence of an item |
| 09:29 | gnuvince | like (index-of \a "bar") => 1 |
| 09:29 | gnuvince | Something like that? |
| 09:29 | cooldude127 | yes |
| 09:29 | gnuvince | Not built-in as far as I know. |
| 09:30 | gnuvince | ,(some (fn [[i e]] (when (= e \a) i)) "bar") |
| 09:30 | clojurebot | java.lang.UnsupportedOperationException: nth not supported on this type: Character |
| 09:30 | cooldude127 | yeah, this is the sucky part about porting from CL. sometimes it has functions we don't |
| 09:30 | gnuvince | ,(some (fn [[i e]] (when (= e \a) i)) (indexed "bar")) |
| 09:30 | clojurebot | java.lang.Exception: Unable to resolve symbol: indexed in this context |
| 09:30 | gnuvince | ,(use 'clojure.contrib.seq-utils) |
| 09:30 | clojurebot | java.io.FileNotFoundException: Could not locate clojure/contrib/seq_utils__init.class or clojure/contrib/seq_utils.clj on classpath: |
| 09:30 | gnuvince | well, I suck at clojurebot it seems |
| 09:30 | cooldude127 | gnuvince: gotta use your own repl, clojurebot has no contrib |
| 09:31 | cooldude127 | plus i'm not on trunk |
| 09:31 | cooldude127 | and clojurebot is |
| 09:32 | gnuvince | (some (fn [[i e]] (when (= e \a) i)) (indexed "bar")) |
| 09:32 | gnuvince | 1 |
| 09:32 | cooldude127 | gnuvince: well maybe i can write my own with that |
| 09:32 | cooldude127 | cool |
| 09:33 | gnuvince | cooldude127: there's also a similar function in Stu's book |
| 09:33 | gnuvince | Page 70 in beta 7 |
| 09:33 | cooldude127 | the thing is i also need to make it support a start parameter |
| 09:33 | cooldude127 | to start looking at a certain point |
| 09:34 | durka42 | just take a substring of "bar"? |
| 09:35 | cooldude127 | durka42: i was thinking just do a subseq, then add back the start parameter |
| 09:35 | cooldude127 | it should be noted i don't plan to use this with strings |
| 09:35 | cooldude127 | lists |
| 09:35 | cooldude127 | are more what i'm interested in |
| 09:36 | durka42 | what are you on besides trunk? |
| 09:36 | cooldude127 | durka42: older trunk |
| 09:36 | cooldude127 | before the laziness |
| 09:36 | durka42 | ah |
| 09:36 | cooldude127 | i'm not ready |
| 09:37 | Chouser | wise |
| 09:37 | cooldude127 | i've got working clojure, i don't feel like messing with it yet |
| 09:38 | Lau_of_DK | swank-clojure and slime still are fitted to the new rev ? |
| 09:39 | djpowell | AWizard: Java has java.util.BitSet - will that do? |
| 09:41 | AWizzArd | yes, looks good to me |
| 09:41 | cooldude127 | wait does subseq not do what i think it does? |
| 09: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? |
| 09:42 | Chouser | cooldude127: works on sorted collections |
| 09:42 | Chouser | cooldude127: there's also subvec, but if you're just working on seqs, you probably just want drop |
| 09:43 | cooldude127 | Chouser: yeah actually figured that out on my own :) |
| 09:43 | Chouser | good! :-) |
| 09:43 | cooldude127 | the haskell experience before clojure was good for this |
| 09:46 | cooldude127 | sweet i got it working for at least 2 test cases :) |
| 09:48 | cooldude127 | make that 3 |
| 09:49 | cooldude127 | technomancy's clojure-test-mode is super cool, btw |
| 09:50 | cooldude127 | buggy as all hell, but at the very least it will run your tests in the repl |
| 10:22 | cooldude127 | 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 | cooldude127 | 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 | Chouser | I think. |
| 10:32 | jbondeson | Aor: you're probably going to have to scrape, the docs aren't in svn |
| 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 | jbondeson | 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 | Hun | turing complete is chomsky 0. regex cover regular strings (therefor the regular), which is chomsky 3 |
| 10:34 | Hun | 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 | Chouser | jbondeson: well... |
| 10:35 | jbondeson | it's not a regex anymore. |
| 10:36 | jbondeson | 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 | Hun | 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 | cooldude127 | those are the current rules |
| 10:40 | cooldude127 | 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 | cooldude127 | which i didn't know |
| 10:43 | cooldude127 | 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 | cooldude127 | it returns 2 |
| 10:44 | cooldude127 | 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 | danlarkin | ,(apply + [1 2 3]) |
| 10:46 | clojurebot | 6 |
| 10:46 | cooldude127 | danlarkin: wondering if we can call a symbol |
| 10:46 | cooldude127 | 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 | cooldude127 | Hun: yeah i see |
| 10:49 | cooldude127 | Hun: they're avoiding the problem that i'm dealing with here |
| 10:49 | cooldude127 | 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 | cooldude127 | SICP is pretty awesome |
| 10:52 | cooldude127 | 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 | cooldude127 | have it handle this problem |
| 10:53 | cooldude127 | i've watched the lectures, these guys are brilliant |
| 10:53 | cooldude127 | sussman was a co-creator of scheme, wasn't he? |
| 10:53 | Hun | iirc yes |
| 10:53 | Hun | together with the mighty steele |
| 10:53 | cooldude127 | of course |
| 10:54 | cooldude127 | 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 | yason | 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 | jbondeson | 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 | AWizzArd | ,('+ 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 | AWizzArd | ,('+ 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: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 | Chouser | 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 | Chouser | 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 | yason | 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 | Chouser | 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 | yason | 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 | cooldude127 | 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 | Chouser | I don't have an opinion yet, just asking. |
| 11:42 | Chouser | :rest |
| 11:44 | Bracki | What's clojure's equivalent of Python's dir()? |
| 11:44 | Bracki | 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 | Chouser | [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 | Chouser | 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 | Chouser | 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 | Chouser | 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 | danlarkin | ~source destructure |
| 12:19 | danlarkin | curious, wrong line number |
| 12:20 | Chouser | but I don't think that's being used here |
| 12:20 | Chouser | (defn f [& ls] (let [[x & xs] ls] x)) only consumes 2 items, as we'd expect for & (as opposed to &&) |
| 12:20 | Chouser | ,(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 | rhickey | the only problem with :rest is its length - doesn't feel like pattern matching |
| 12:38 | rhickey | [x : xs] might make Haskellers happy |
| 12:38 | rhickey | : is currently not a valid token |
| 12:39 | Chouser | looks suspiciously like infix notation. ;-) |
| 12:39 | Chouser | though I suppose & does too, come to think of it. |
| 12:39 | rhickey | right |
| 12:41 | rhickey | 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 | Chouser | ah |
| 12:41 | rhickey | :& is valid |
| 12:45 | rhickey | if not suggestive of anything |
| 12:47 | rhickey | && kind of suggests you are a step away from & |
| 12:47 | achim_p | [x ? xs], [x &? xs] ? |
| 12:47 | achim_p | '?' 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 | rhickey | 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 | Chouser | 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 | rhickey | Chouser: outside of apply that doesn't matter, unless you want () when no extra args supplied? |
| 12:55 | rhickey | (defn foo [&& xs] xs) |
| 12:55 | rhickey | (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 | gnuvince | I know it would surprise me. |
| 12:57 | rhickey | gnuvince: you can't use :as in fn already |
| 12:58 | rhickey | 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 | gnuvince | user> ((fn [[x & xs :as all]] [x xs all]) [1 2 3]) |
| 12:58 | gnuvince | [1 (2 3) [1 2 3]] |
| 12:59 | gnuvince | oh |
| 12:59 | gnuvince | 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 | danlarkin | I pronounce & as "and-args", and && makes sense to me as "lazy-and-args" |
| 13:10 | danlarkin | but that's probably just me |
| 13:15 | rhickey | I likes &&, it feels like :rest punishes those who want lazy, slightly |
| 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 | Chouser | 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 | jbondeson | i don't think it's an issue though |
| 13:18 | jbondeson | the existance of & makes && logical |
| 13:28 | cooldude127 | how long was it before scheme got macros? |
| 13:29 | cooldude127 | 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 | cooldude127 | 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 | cooldude127 | 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 | cooldude127 | 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 | jbondeson | looking at that code, porting to clojure may not *to* terrible |
| 13:47 | jbondeson | could be an interesting exercise. |
| 13:50 | jbondeson | i am just having a horrible typing day. |
| 13:54 | cooldude127 | is there a standard clojure mechanism for signaling an error? |
| 13:54 | cooldude127 | 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 | jbondeson | is error-kit functional? |
| 13:59 | cooldude127 | idk, i just made a function to wrap throwing the exception |
| 13:59 | cooldude127 | (defn error [& message] |
| 13:59 | cooldude127 | (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 | jbondeson | 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 | rsynnott1 | (though I'm not sure why anyone would WANT them) |
| 14:02 | jbondeson | rsynnott1: nostalgia |
| 14:03 | jbondeson | 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 | cooldude127 | so what is the right way, in a ns declaration, to say use this namespace renamed as this |
| 14:15 | cooldude127 | 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 | Chouser | ,(if (reverse nil) :t :f) |
| 14:22 | clojurebot | :f |
| 14:23 | Chouser | ^^ that returns true as of 1294 |
| 14:23 | Chouser | or :t rather |
| 14:23 | Chouser | 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 | cooldude127 | and there's no real way to recover |
| 14:31 | cooldude127 | 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 | Chouser | 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 | rsynnott1 | (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 | rsynnott1 | (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 | danlarkin | I shop here: http://goodleaftea.com/ :) |
| 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:57 | rhickey | Chouser: the strong Assam black teas take milk just fine |
| 14:58 | danlarkin | I like to take breakfast teas with milk |
| 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 | Chouser | :-) |
| 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 | defn | 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 | defn | i really like the book tbh |
| 15:11 | defn | 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 | defn | 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 | cooldude127 | 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 | technomancy | * that C-c ' won't work if you're on the first char of the overlay |
| 15:12 | technomancy | 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 | defn | 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 | technomancy | 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 | technomancy | it's still pretty rough around the edges |
| 15:18 | defn | so is production-ready code |
| 15:18 | defn | ;) |
| 15:18 | jwinter | technomancy: cool |
| 15:18 | cooldude127 | WOO! i just took over +, and it still workes |
| 15:18 | cooldude127 | *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 | defn | ... profit. |
| 15:23 | cooldude127 | holy shit i now have clojure understanding symbols in math |
| 15:23 | cooldude127 | 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 | cooldude127 | 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 | cooldude127 | http://tinyurl.com/bg3365 |
| 15:28 | cooldude127 | there is the code |
| 15:29 | cooldude127 | 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 | cooldude127 | now to make it know a few more rules |
| 15:32 | cooldude127 | if the cond in deriv gets out of hand, i might turn that into a map of predicates to functions for results |
| 15:32 | cooldude127 | 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 | jbondeson | you know, two birds with one stone |
| 15:38 | Chouser | heh |
| 15:39 | rhickey | Chouser: nice |
| 15:39 | Chouser | we all wonder that at times |
| 15:39 | rhickey | hah |
| 15:40 | rhickey | ! |
| 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 | Chouser | danlarkin: no, he understood me correctly. :-) |
| 15:41 | danlarkin | :-o |
| 15:41 | cooldude127 | WOO! clojure now understands the power rule of differentiation |
| 15:42 | cooldude127 | math.symbolic> (deriv (* 2 (** x 2)) x) |
| 15:42 | cooldude127 | (* 2 (* 2 x)) |
| 15:42 | cooldude127 | 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 | defn | 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 | jbondeson | "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 | Chouser | 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 | defn | 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 | Chouser | 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 | jbondeson | 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 | Chouser | 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 | Chouser | an I messed up earlier. bind-continue is called by continue, not continue-with. :-P |
| 15:58 | Chouser | and |
| 15:59 | Chouser | jbondeson: Unless I'm misunderstanding CL (quite possible!) it does do an unwind to the handler-bind given by an invoke-restart |
| 16:00 | Chouser | 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 | technomancy | 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 | Chouser | 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 | 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 | defn | 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 | defn | im having some trouble getting started |
| 16:16 | defn | im just at the curve right now i think |
| 16:16 | defn | 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 | cooldude127 | 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 | defn | 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 | 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 | defn | 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 | defn | 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 | defn | 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 | defn | 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 | 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 | defn | :) |
| 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 | technomancy | 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 | defn | 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 | defn | 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 | defn | I have to learn Java which sucks, so I found Clojure and here I am |
| 16:30 | defn | I'm going to try and talk my professor into letting me do my homework in Clojure |
| 16:30 | defn | :) |
| 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 | cooldude127 | made me understand AVL trees |
| 16:31 | cooldude127 | and red-black (even tho they weren't assigned) ;) |
| 16:32 | defn | i need to understand java better just for interop purposes |
| 16:32 | defn | 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 | cooldude127 | but i knew it before that |
| 16:32 | cooldude127 | and nobody learned anything |
| 16:32 | defn | Yeah I finally talked my professor into letting me do C for 2nd semester |
| 16:33 | defn | because I was a rowdy little anti-establishment, fuck M$ kid |
| 16:33 | cooldude127 | oh lol |
| 16:33 | cooldude127 | well so was i, i just used java on the mac :) |
| 16:33 | defn | haha nice |
| 16:33 | defn | 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 | vjr | 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 | leafw | 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 | vjr | 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 | leafw | 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 | jbondeson | 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 | defn | (func [6 7 8 10]) |
| 16:54 | cooldude127 | defn: (fun 6 7 8 10) |
| 16:54 | cooldude127 | 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 | cooldude127 | jbondeson: i think that's (lazy-seq (concat ...)) |
| 16:54 | jbondeson | err cons |
| 16:55 | jbondeson | is what i meant |
| 16:55 | defn | cooldude127: #<IllegalArgumentException java.lang.IllegalArgumentException: Wrong number of args passed to: user$func> |
| 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 | durka42 | #<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 | defn | (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 | cooldude127 | defn: z = 8, so assoc is trying to place 10 at index 8 of the vector |
| 16:57 | cooldude127 | but the vector is only 3 elements |
| 16:58 | cooldude127 | 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 | durka42 | is it when you compile clojure, or when you run programs |
| 17:15 | durka42 | 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 | hiredman | ugh |
| 17:20 | hiredman | I always get left over bits hanging around |
| 17:24 | jbondeson | progress... i got slime to show up |
| 17:25 | jbondeson | 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: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 | Bracki | The lists contain the neighbors. |
| 17:42 | Bracki | Valid approach or what could be improved? |
| 17:43 | Chouser | does the order of the neighbors matter? |
| 17:46 | Bracki | No. |
| 17:46 | Bracki | 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 | jbondeson | -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 | Chouser | ,(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 | technomancy | jbondeson: you probably want to check for empty? |
| 17:48 | technomancy | 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 | jbondeson | trying to track down this last exception... |
| 17:50 | jbondeson | 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 | 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 | Bracki | 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 | cooldude127 | :) |
| 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 | hiredman | 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 | durka42 | add . to the classpath to include it |
| 18:07 | hiredman | Bracki: have you looked at (for ...)? |
| 18:08 | hiredman | actually |
| 18:08 | hiredman | 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: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 | hiredman | ,((fn [{:keys a :or {a 2}}] a) {:a 1}) |
| 18:15 | hiredman | hmmm |
| 18:15 | Chouser | heh |
| 18:15 | hiredman | wow |
| 18:15 | hiredman | the jvm crashed hard |
| 18:15 | hiredman | # 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 | gridlock | and inside it i have a file mylib.clj |
| 18:17 | gridlock | (sorry net/brehaut/mylib) |
| 18:17 | gridlock | 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 | gridlock | 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 | technomancy | 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 | technomancy | cooldude127: this snippet may help with debugging: (map #(cons (str (:name (meta %))) (:status (meta %))) (vals (ns-interns *ns*))) |
| 18:34 | technomancy | 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 | cooldude127 | 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 | technomancy | 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 | cooldude127 | assuming it has tests? |
| 18:55 | cooldude127 | 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 | cooldude127 | 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 | technomancy | 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 | technomancy | no overlay means no message |
| 18:59 | cooldude127 | oh, well then this is expected :) |
| 18:59 | gnuvince_ | argh |
| 18:59 | gnuvince_ | 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 | gnuvince_ | 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 | te | you've been here all day on a wednesday |
| 19:01 | te | :) |
| 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 | te | 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 | cooldude127 | 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 | technomancy | (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 | technomancy | 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 | cooldude127 | but i don't think they're relevant |
| 19:12 | technomancy | gnuvince_: search for jbondeson: http://clojure-log.n01se.net/ |
| 19:13 | technomancy | 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 | technomancy | cooldude127: I need to add a "last-known-good" defvar for each dep in clojure-mode |
| 19:14 | technomancy | 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 | technomancy | though early breakage is better than later breakage |
| 19:15 | cooldude127 | but i don't think version differences are the problem here |
| 19:15 | cooldude127 | yeah |
| 19:16 | gnuvince_ | OK |
| 19:17 | gnuvince_ | 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 | technomancy | 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 | gnuvince_ | 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 | technomancy | 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 | hiredman | ,(#(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 | hiredman | mine fails |
| 19:30 | hiredman | [:a :b :c] is not a seq, but it said true |
| 19:30 | jbondeson | oh, yeah. |
| 19:30 | jbondeson | 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 | hiredman | ,(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 | hiredman | haha |
| 19:34 | hiredman | of course |
| 19:34 | taggart | ,(doc seq?) |
| 19:34 | clojurebot | "([x]); Return true if x implements ISeq" |
| 19:36 | jbondeson | seq? is used in 8 places... |
| 19:38 | jbondeson | seq? replacement didn't fix slime... hmmm |
| 19:40 | jbondeson | 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 | hiredman | (doc inverse) |
| 19:41 | hiredman | huh |
| 19:41 | hiredman | ,(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 | technomancy | plus possibly hl-line-mode |
| 19:45 | cooldude127 | technomancy: 2/3 :) |
| 19:46 | cooldude127 | technomancy: something went horribly wrong |
| 19:46 | cooldude127 | technomancy: M-x zenburn ... CRASH |
| 19:46 | technomancy | ...? |
| 19:46 | technomancy | 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 | cooldude127 | 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 | cooldude127 | technomancy: what laptop? |
| 19:48 | technomancy | thinkpad X61 |
| 19:48 | cooldude127 | nice |
| 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 | cooldude127 | 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 | hiredman | 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 | technomancy | 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 | technomancy | hiredman: yeah, the DPI makes all the difference |
| 19:56 | cooldude127 | technomancy: not that i knew of |
| 19:58 | cooldude127 | 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 | cooldude127 | 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 | technomancy | and .Xdefaults, but that's an X thing |
| 20:06 | cooldude127 | nvm i'm stupid |
| 20:09 | cooldude127 | technomancy: ok, i've eliminated fonts as the cause, the default font messes it up too |
| 20:09 | cooldude127 | 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 | cooldude127 | technomancy: nvm, fresh emacs-starter-kit is clean |
| 20:12 | cooldude127 | WTF am i doing wrong? |
| 20:13 | technomancy | fresh clone from me or you? |
| 20:13 | cooldude127 | technomancy: from you |
| 20:14 | cooldude127 | 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 | jbondeson | so i can track down the swank-clojure problems |
| 20:24 | jbondeson | 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 | jbondeson | 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 | cooldude127 | like + :) |
| 20:29 | jbondeson | hahaha |
| 20:29 | jbondeson | = isn't defined before if |
| 20:30 | jbondeson | of course |
| 20:30 | jbondeson | because = uses if |
| 20:31 | jbondeson | clojure.lang.Util/equiv it is! |
| 20:31 | jbondeson | 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 | silkarn | how do you spell inefficient? |
| 20:38 | silkarn | last one? |
| 20:38 | durka42 | yes, the last spelling |
| 20:39 | durka42 | it would be if they were really copied |
| 20:39 | durka42 | but the new vector generally shares structure with the old |
| 20:39 | durka42 | this stuff is rather advanced and there's no way i can explain it |
| 20:39 | durka42 | but i think rhickey has a video about it |
| 20:40 | durka42 | 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 | danlarkin | interesting |
| 22:00 | danlarkin | why are you wingdinging clojure! |
| 22:00 | hiredman | :) |
| 22:00 | hiredman | ?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 | hiredman | danlarkin: once you start it's hard to stop |
| 22:06 | hiredman | ,(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 | hiredman | I was thinking of using arrrows for function application without parens |
| 22:16 | hiredman | I guess I should $ |
| 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 | hiredman | it is a macro |
| 22:28 | dreish | Okay, nevermind then. |
| 22:28 | dreish | How about a macro called apl that implements APL? |
| 22:29 | dreish | 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 | hiredman | ,(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 | danlarkin | 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 | hiredman | ,(((?+) 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 | durka42 | 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 | durka42 | 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 | cooldude127 | 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 | hiredman | ,(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 | clojurebot | A Story About 'Magic' |
| 23:22 | clojurebot | 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 | cooldude127 | 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 | hiredman | ,(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 | durka42 | kind of a lazy partial |
| 23:39 | durka42 | but hiredman, what are you going to use ? for? |
| 23:49 | cooldude127 | so apparently you can't define your own var called "/" |
| 23:49 | cooldude127 | 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 | durka42 | 5 |
| 23:52 | cooldude127 | durka42: yeah, but i can't say (def / ...) |
| 23:52 | durka42 | true |
| 23:52 | durka42 | 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 | cooldude127 | 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 | cooldude127 | 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 | cooldude127 | ? |
| 23:56 | cooldude127 | 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 | durka42 | i mean, // |
| 23:57 | cooldude127 | durka42: also not allowed |
| 23:57 | cooldude127 | anything with a slash in it |
| 23:57 | cooldude127 | 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 | cooldude127 | someone in charge, this must not go unnoticed! |
| 23:58 | durka42 | user=> (eval `(def ~(symbol "user" "//") +)) |
| 23:58 | durka42 | #'user/// |
| 23:58 | durka42 | but then you can't use it :p |
| 23:59 | durka42 | 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 |