00:15 (join) yoklov1 00:35 (quit) tauntaun: Ping timeout: 255 seconds 00:50 (join) racket 00:50 racket: [racket] plt pushed 1 new commit to master: http://bit.ly/k9VRlw 00:50 racket: [racket/master] Fix the unit contract tests due to changes in contract violation reports. - Stevie Strickland 00:50 (part) racket 01:01 (quit) yoklov1: Quit: Leaving. 02:28 (join) realitygrill 02:31 (quit) acts_as_david: Remote host closed the connection 03:17 (quit) zarus: Quit: Leaving 03:25 (join) masm 03:26 (quit) jonrafkind: Read error: Operation timed out 03:34 (quit) Skola: Ping timeout: 258 seconds 03:36 (join) Skola 04:19 (quit) realitygrill: Ping timeout: 276 seconds 05:04 (join) regular 05:05 regular: hi all! has racket regexps support for named captures? things like (?P\d+) I cannot find anything in the documentation and Google gives nothing. 05:32 (quit) regular: Ping timeout: 252 seconds 05:36 (quit) shachaf: Ping timeout: 260 seconds 06:25 (join) racket 06:25 racket: [racket] plt pushed 4 new commits to master: http://bit.ly/kn7reX 06:25 racket: [racket/master] macro-stepper: first step to making macro stepper aware of syntax tainting - Ryan Culpepper 06:25 racket: [racket/master] macro-stepper: more work on syntax tainting - Ryan Culpepper 06:25 racket: [racket/master] unstable: added ppict, pslide - Ryan Culpepper 06:25 (part) racket 06:45 (join) MayDaniel 06:49 (join) dnolen 07:09 (quit) MayDaniel: Read error: Connection reset by peer 07:41 (quit) dnolen: Quit: dnolen 08:04 (quit) masm: Ping timeout: 276 seconds 08:35 (join) shachaf 08:58 (join) masm 09:36 (join) anRch 09:38 (join) lucian 09:47 (join) mithos28 10:05 (join) bugQ 10:12 (quit) mithos28: Quit: mithos28 10:13 (join) mithos28 10:19 (join) tauntaun 10:31 (quit) anRch: Quit: anRch 11:10 (quit) mithos28: Quit: mithos28 11:20 (join) yoklov1 11:20 (join) mithos28 11:21 (join) yoklov2 11:21 (quit) yoklov1: Read error: Connection reset by peer 11:26 (join) jonrafkind 11:28 (quit) janne: Ping timeout: 252 seconds 11:28 (join) _janne 11:36 (quit) yoklov2: Quit: Leaving. 11:36 (quit) bugQ: Ping timeout: 250 seconds 11:36 (join) yoklov1 11:37 (join) yoklov2 11:37 (quit) yoklov1: Read error: Connection reset by peer 12:06 yoklov2: is there any particular reason why if you create a bitmap from a canvas with make-bitmap, you can't set the pixels with set-argb-pixels? 12:27 (join) bugQ 12:43 yoklov2: that is quite frustruating 12:46 yoklov2: i guess i can just make on-paint draw a normal bitmap to the screen or something along those lines 12:47 yoklov2: *sigh* coffee time 12:47 (quit) yoklov2: Quit: Leaving. 12:48 (join) Daemmerung 12:50 (quit) bugQ: Ping timeout: 258 seconds 12:56 (join) bugQ 13:07 (quit) roblally: Quit: roblally 13:13 (quit) masm: Ping timeout: 255 seconds 13:40 (join) dnolen 13:56 (join) yoklov 14:11 (join) masm 14:40 (quit) mithos28: Quit: mithos28 14:46 (join) realitygrill 14:49 (quit) bugQ: Ping timeout: 240 seconds 14:49 (join) neilv 14:50 neilv: is the users@racket-lang email list server stuck? i posted 15 minutes ago, and the post is in mailman's web archive, but hasn't come through email to me 14:51 neilv: you know how i like hearing myself talk 14:52 ohwow: hold on, lemme check my mail 14:53 ohwow: neilv: Re: Generated Symbols? 14:53 neilv: yes 14:53 ohwow: Well, I got your mail :) 14:54 neilv: ok, thanks. it's probably stuck in the middle of going through the distribution list 14:54 (quit) realitygrill: Quit: realitygrill 15:02 _p4bl0: Hi there, I have a problem with macros. If in the Racket REPL I make some definition in a (begin ...), those definitions are still available out of the (begin ...) block. But if I have a macro expanding to a (begin ...) block then after the call to the macro the definition are gone, is that normal behavior? 15:03 neilv: toplevel and begin are funny. would it avoid confusion if your macro uses expanded to "define-values" instead of "begin"? 15:05 ohwow: I dont like multiple return values concept :| 15:05 _p4bl0: I need it to return a single value but at the same time to make some definition, I can't do that without begin I guess 15:05 ohwow: I think function sure return one value, like in "normal" math. 15:05 ohwow: But that's just me, I am p stupid 15:05 _p4bl0: http://pastie.org/2159528 here is a minimal example of what I'm talking 15:05 _p4bl0: about 15:07 _p4bl0: this is really a strange, unexpected behavior 15:07 ohwow: can't you use (locals)? 15:08 _p4bl0: ohwow: what is it? 15:08 _p4bl0: oh okay 15:08 _p4bl0: I'll try 15:10 neilv: are you trying to do an mit-scheme-like "define", or something else? 15:10 _p4bl0: it doesn't work, I mean, it work the same way with and without the macro using local, but I want the other behavior 15:10 (join) mithos28 15:11 _p4bl0: neilv: something else I guess 15:12 neilv: oh, i see. there are actually two tricky things here. are you're knowingly trying to violate hygiene? 15:12 _p4bl0: oh... 15:12 _p4bl0: yea 15:12 _p4bl0: didn't thought about it 15:13 _p4bl0: oh actually no I don't think so 15:13 neilv: you're trying to have the macro introduce a binding for "bar", when "bar" was not provided to the macro 15:14 _p4bl0: nope in the real case bar is provided to the macro 15:14 _p4bl0: I'll try to explain what I'm trying to do 15:15 (join) JuanDaugherty 15:15 neilv: http://pastie.org/2159559 15:16 neilv: syntax-rules is the old way. i haven't used define-syntax-rule yet, but perhaps you can try it 15:18 _p4bl0: according to the doc it is the exact same thing 15:18 _p4bl0: I have a function F, which return 2 values: the first one is a quoted lambda expression, and the second one is its "actual" return value. I'd like to make a CALL macro which would return the "actual" return value, and redefine F as (eval ). 15:20 _p4bl0: http://pastie.org/2159581 this is what I've done 15:21 _p4bl0: it works if I type the (begin...) block without the macro, vut if I use the macro then I have the behavior I described earlier: name isn't redefined 15:22 (join) roblally 15:22 ohwow: hm 15:22 ohwow: Is it necessary for you to make it a macro? 15:22 ohwow: because it can be a function 15:23 _p4bl0: ohwow: but if it is a function then the (define name ...) won't be visible outside of it, am i wrong? 15:23 ohwow: yeah, but you could use (set! name ..) 15:28 _p4bl0: it seems the set! if the function as no effect outside of the function 15:31 _p4bl0: see http://pastie.org/2159611 15:32 _p4bl0: BUT with the set inside the begin in the macro version it seems to be working 15:33 ohwow: > (define-syntax-rule (hohai n) 15:33 ohwow: (begin 15:33 ohwow: (set! bar n) 15:33 ohwow: n)) 15:33 ohwow: > (define bar 5) 15:33 ohwow: > bar 15:33 ohwow: 5 15:33 ohwow: > (hohai 10) 15:33 ohwow: 10 15:33 ohwow: > bar 15:33 ohwow: 10 15:33 ohwow: > yeah 15:33 ohwow: ooopps 15:33 ohwow: sorry for that 15:33 ohwow: shoul've used the pastebin 15:33 neilv: _p4bl0: are you new to racket and scheme? 15:34 _p4bl0: neilv: not new, but inexperienced 15:34 _p4bl0: neilv: did I say something stupid? ^^ 15:34 neilv: i think possibly you are trying to do things that racket and scheme intentionally try to prevent 15:35 neilv: could you say why you want to do this macro stuff? perhaps there is a more idiomatic way to do what you ultimately want 15:38 _p4bl0: neilv: it's working now using set!, I don't think I'm trying to do something that hygien would prevent 15:39 (join) realitygrill 15:40 ohwow: redefining top-level binding is not idiomatic in scheme 15:40 neilv: for example, you could make something like "http://pastie.org/2159611" work in common lisp, but not in racket/scheme, because racket/scheme intentionally prohibit doing that sort of thing 15:40 _p4bl0: thanks ohwow and neilv :-) 15:40 ohwow: please correct me, neilv, if i am wrong 15:41 neilv: so, are you trying to implement a new language, or a library for something? 15:41 _p4bl0: nope, just playing 15:42 neilv: playing is good 15:42 _p4bl0: neilv: http://pastie.org/2159656 here, like this it works 15:43 neilv: _p4bl0: are you sure that the "val" part is not evaluated twice there? (see the "dummy" in what i posted earlier) 15:44 _p4bl0: neilv: the evaluation of val has no side-effect so it's not a problem that it's evaluated twice 15:45 neilv: ok, so long as you understand that normally you would want your macro to ensure the evaluation happened only once 15:45 _p4bl0: neilv: I have no problem with the theory ;-) 15:46 (join) jao 15:46 neilv: cool 15:46 _p4bl0: neilv: I already read a few papers by the PLT team and many blog post / web pages about lisp, scheme, hygienic macros... 15:51 (join) jb55 15:51 (quit) neilv: Quit: Leaving 15:52 (join) neilv 15:55 yoklov: wait, so _p4bl0 15:55 _p4bl0: yoklov: yes? 15:56 yoklov: you're trying to make (call name arg) define function and result, and then also whatever you provide to it with name 15:56 yoklov: ? 15:57 _p4bl0: yoklov: nope I want (call name arg) to eval (name args) which returns two values let's say v1 and v2. Then I cant to redefine name as (eval v1) and to return v2. 15:58 _p4bl0: function and result are just temporary name for inside the macro 15:58 yoklov: i see. 15:59 _p4bl0: it's working fine now 15:59 yoklov: oh okay then. 15:59 (quit) realitygrill: Quit: realitygrill 15:59 _p4bl0: yoklov: thanks :-) 16:02 yoklov: regardless p4bl0, if you're looking to learn more about macros, this helped me a lot: http://hipster.home.xs4all.nl/lib/scheme/gauche/define-syntax-primer.txt 16:03 neilv: that's jrm's syntax-rules primer. that's how i started learning 16:03 yoklov: yeah 16:03 yoklov: its way better than most of the other things i've seen 16:04 yoklov: though tragically is just a flat text file 16:04 yoklov: not even formatted with tex, brutal. 16:06 neilv: someone should ask jrm if he would mind them marking it up in scribble and putting it in planet as "/jrm-syntax-rules-primer". 16:08 neilv: syntax-rules is old-school and esoteric, so i doubt much discussion of it will get into the official racket docs 16:08 neilv: but for someone who wants to learn syntax-rules for whatever reason, jrm's text file is the best intro i've seen 16:09 yoklov: hm, the thing is 16:09 yoklov: there are some other guides that assume you know syntax rules when talking about syntax case 16:10 _p4bl0: yoklov: "tragically is just a flat text file" <-- does not compute 16:10 _p4bl0: ;-) 16:10 yoklov: lol, yeah, at the same time a flat text file is so satisfying to read 16:10 yoklov: you feel like a immense programming badass 16:10 _p4bl0: thanks for the link, apparently I already bookmarked it some times ago (there's the star in my firefox urlbar) 16:11 yoklov: regardless I've never found a guide to syntax-case as good as that one for syntax-rules. 16:11 _p4bl0: syntax-parse is the new way to go anyway :-p 16:11 yoklov: ugh yeah and theres that which i haven't even looked at yet. 16:12 _p4bl0: I just read the paper in the train a few weeks (month?) ago, but never used it. 16:15 yoklov: I'm sure theres some incredibly compelling problem that it solves brilliantly and elegantly, but I just… already know (though I use the term loosely :p) two ways of defining macros. 16:15 yoklov: also syntax parse just sounds so much more intimidating. 16:15 _p4bl0: = more fun 16:16 yoklov: I mean, maybe. 16:17 yoklov: but what was wrong with syntax-case? 16:17 yoklov: it seems fine to me. 16:17 _p4bl0: more fun, at least for those of us who are as much interested in the theory as in using it to actually code. 16:19 yoklov: I am interested in the theory, but I don't think I have the background in it to really make much use of whatever syntax-parse has to offer. 16:19 mithos28: Are syntax-objects supposed to keep their source location when in compiled code? 16:19 _p4bl0: yoklov: from what I remember syntax-parse allows to write macros which are easier to understand (when reading them) in particular regarding to error checking (and reporting) 16:20 yoklov: hrm 16:21 (quit) Skola: Ping timeout: 276 seconds 16:21 _p4bl0: yoklov: https://docs.google.com/viewer?url=http%3A%2F%2Fwww.ccs.neu.edu%2Fscheme%2Fpubs%2Ficfp10-cf.pdf is the paper talking about it 16:21 rudybot: http://tinyurl.com/3omwc5f 16:21 _p4bl0: mithos28: dunno, sorry 16:24 mithos28: ok, thanks, because compiling my code makes it produce different results which is annoying 16:24 yoklov: hm this doesn't seem that bad 16:35 yoklov: wow this is actually really cool. 16:36 _p4bl0: 8-) 16:37 _p4bl0: everything PLT does is "really cool", at least. 16:37 yoklov: i mean define-syntax-class? fairly thoroughly awesome. 17:21 (quit) neilv: Read error: No route to host 17:36 (quit) tauntaun: Quit: Ex-Chat 17:37 (join) tauntaun 18:02 (nick) elliottcable -> ec|detached 18:12 (quit) dnolen: Quit: dnolen 18:33 (quit) lucian: Read error: Connection reset by peer 18:37 (join) lucian 18:38 (join) dnolen 18:43 (quit) dnolen: Client Quit 18:46 (join) bugQ 18:53 (quit) jb55: Ping timeout: 258 seconds 19:07 (quit) Demosthenes: Ping timeout: 240 seconds 19:18 (join) Demosthenes 19:22 (quit) masm: Quit: Leaving. 19:24 (quit) DT``: Ping timeout: 258 seconds 19:36 (join) DT`` 19:45 (quit) Lajla: Ping timeout: 240 seconds 20:22 (quit) DT``: Quit: DT`` 20:26 (join) DT`` 20:39 (quit) yoklov: Quit: Leaving. 20:46 (join) yoklov 20:47 (join) Lajla 20:52 (nick) ec|detached -> elliottcable 20:54 (quit) yoklov: Quit: Leaving. 21:21 (quit) bugQ: Ping timeout: 250 seconds 21:36 (join) bugQ 22:01 (join) dnolen 22:05 (quit) bugQ: Ping timeout: 252 seconds 22:10 (join) bugQ 22:52 (quit) mithos28: Quit: mithos28 23:02 (join) mithos28 23:06 (join) mithos28_ 23:06 (quit) mithos28: Ping timeout: 255 seconds 23:06 (nick) mithos28_ -> mithos28 23:11 (quit) dnolen: Quit: dnolen 23:36 (join) neilv 23:36 (quit) neilv: Changing host 23:36 (join) neilv 23:43 (join) ehine1