00:16 (quit) freakazoid: Quit: Computer has gone to sleep. 00:21 (quit) ambrosebs: Ping timeout: 244 seconds 01:05 (join) freakazoid 01:25 (quit) EmmanuelOga: Ping timeout: 244 seconds 01:54 (quit) kudkudyak: Ping timeout: 244 seconds 01:58 (nick) gf3_ -> gf3 02:02 (quit) freakazoid: Quit: Computer has gone to sleep. 02:03 (quit) jrslepak: Quit: Leaving 02:14 (quit) realitygrill: Quit: realitygrill 02:29 (join) ambrosebs 02:34 (join) kudkudyak 02:35 (join) freakazoid 02:38 (quit) wsimpson: Quit: Leaving. 02:57 eli: stamourv: You're doing more than needed -- the main problem was just a way to specify where stuff goes. 03:03 (quit) freakazoid: Quit: Computer has gone to sleep. 03:09 (quit) noam_: Read error: Connection timed out 03:09 (join) noam_ 03:11 (join) sindoc 03:18 (join) sindoc1 03:19 (quit) sindoc: Read error: Connection reset by peer 03:23 (quit) sindoc1: Ping timeout: 240 seconds 03:24 (join) archaic 03:35 (join) Shvillr_ 03:35 (quit) Shviller: Disconnected by services 03:35 (nick) Shvillr_ -> Shviller 03:47 (quit) karswell: Ping timeout: 240 seconds 04:01 (part) archaic: "ERC Version 5.3 (IRC client for Emacs)" 04:33 (join) sindoc 04:43 (join) crk 04:44 (join) archaic 04:44 (quit) jao: Ping timeout: 240 seconds 04:45 crk: is there a way to print a function in racket 04:45 crk: say I have a function defined, I "run" the code in drracket or in Emacs so that it gets loaded into the interpreter 04:45 crk: now is there a command that might print the whole code of a function? 04:48 crk: the thing is, I'm writing the CPS versions of some programs and I want to print the continuation function in each recursive call 04:48 crk: for better explaining what's going on 04:51 sindoc: crk: Have you looked at http://docs.racket-lang.org/reference/stxops.html ? 05:20 (quit) sindoc: Quit: Leaving. 05:41 (join) masm 06:11 (join) sindoc 06:24 (quit) Lajla: Ping timeout: 248 seconds 06:26 (join) epsil 06:43 (quit) noam_: Read error: Connection reset by peer 06:43 (join) noam_ 07:00 (join) karswell 07:14 (join) MayDaniel 07:33 (quit) sindoc: Quit: Leaving. 07:35 (quit) MayDaniel: Read error: Connection reset by peer 08:02 (quit) archaic: Read error: Connection reset by peer 08:10 (join) wsimpson 08:52 _p4bl0: hello, I creating a reader module which uses a parser generated by the parser-tools. My parser generates syntax objects. My parser generator thus takes an additional argument which is a syntax object and which is used to set the context when creating syntax objects. In the reader module in my read-syntax function, I don't know how I should proceed to get the context of the generated module form before generating it (so I can pass it to 08:52 _p4bl0: the parser). 08:55 crk: sindoc, I went through it but I'm not sure how I'd use it to get what I want 08:57 _p4bl0: here: http://pastie.org/3000276 : I'd like CTX to be a syntax object with the same context as the module form created just after. How can I do that? 09:09 (join) MayDaniel 09:33 (join) otzi 09:48 (join) jao 10:08 (nick) chaozzbubi -> ChaozZBubi 10:48 (join) dobroerlanger 10:51 dobroerlanger: Hello. I am looking for a Scheme with the best C/C++ interfacing. Is it possible to pass lambda into C method and to use that lambda inside C++ object in Racket? 10:55 kudkudyak: dobroerlanger: you may look at guile. 11:11 otzi: Anyone knows an image processing library for racket? 11:32 (join) yoklov 11:36 (quit) noam_: Read error: Connection reset by peer 11:36 (join) noam_ 11:43 (join) freakazoid 11:57 asumu: otzi: By image processing you mean like imagemagick? 11:58 asumu: (collects/ffi/examples has an example imagemagick FFI binding) 11:59 (join) Blkt 12:02 otzi: I mean something that allows me to process images triplet by triplet 12:04 asumu: otzi: If you have a bitmap% object, you can use get-argb-pixels to get the byte representation out of it. 12:04 asumu: And work on that. If that's the kind of thing you mean. 12:06 (quit) freakazoid: Quit: Computer has gone to sleep. 12:09 (join) freakazoid 12:11 (quit) freakazoid: Client Quit 12:12 otzi: hm, looks promissing, thanks 12:18 (join) dsantiago 12:19 (part) wsimpson 12:24 (join) freakazoid 12:24 (join) realitygrill 12:25 (quit) freakazoid: Client Quit 12:25 (nick) ChaozZBubi -> chaozzbubi 12:35 (join) jonrafkind 12:39 (quit) Blkt: Quit: ERC Version 5.3 (IRC client for Emacs) 12:47 epsil: can a function and a macro have the same name? 12:48 jonrafkind: no 12:48 (join) EmmanuelOga 12:48 jonrafkind: well, not at the top level at least 12:48 jonrafkind: you can always shadow a binding, so yes thats allowed 12:48 jonrafkind: sorry, top level is ok too, but not at the module level 12:50 epsil: I get a "duplicate definition" error for (define (foo) 1) (define-syntax-rule (foo) 2) 12:50 jonrafkind: yea at the module level you can't do that 12:51 jonrafkind: thats like doing (define foo 1) (define foo 2) 12:51 epsil: ah, okay 12:51 epsil: I'll do something else then 12:51 jonrafkind: but if you are in a new lexical scope its ok 12:51 jonrafkind: (define foo 1) (let () (define foo 2) ...)) 12:54 (quit) noam_: Read error: Connection reset by peer 12:55 (join) noam_ 12:58 (quit) yoklov: Quit: Leaving. 13:04 (quit) loz`: Remote host closed the connection 13:04 (join) loz` 13:11 (join) jrslepak 13:14 (join) Lajla 13:24 (join) sindoc 13:31 (join) yoklov 14:13 (quit) Demosthenes: Quit: leaving 14:16 (quit) kudkudyak: Quit: Leaving. 14:16 (join) kudkudyak 14:29 (quit) sindoc: Quit: Leaving. 14:29 (nick) Lajla -> hahahahla- 14:31 (nick) hahahahla- -> IKEAnnesP 14:33 (quit) realitygrill: Quit: realitygrill 14:43 (nick) chaozzbubi -> ChaozZBubi 14:47 (join) realitygrill 15:09 (nick) samth_away -> samth 15:23 (quit) MayDaniel: Read error: Connection reset by peer 15:30 (join) MayDaniel 15:33 (quit) MayDaniel: Client Quit 15:51 ozzloy: does racket have symbolic math libs? 15:52 jonrafkind: not that I know of 15:52 ozzloy: k 15:54 (join) malkomalko 16:03 (join) epsi47 16:06 (quit) epsil: Ping timeout: 252 seconds 16:08 (quit) epsi47: Quit: WeeChat 0.3.5 16:14 ozzloy: . 16:42 ChaozZBubi: using drracket, what's the difference between using “%a” etc in signatures and “any”? 16:42 ChaozZBubi: it seems to not have any effects. 16:43 samth: ChaozZBubi: are you using the DeinProgramm languages? 16:43 samth: or rather, Die Macht der Abstraction? 16:44 ChaozZBubi: yes. it's actually german? Oo 16:44 samth: yup 16:44 samth: i'm not sure exactly what %a does there 16:44 ChaozZBubi: Die Macht der Abstraktion. 16:44 samth: unfortunately, those languages are under documented in english 16:45 (quit) realitygrill: Quit: realitygrill 16:46 ChaozZBubi: well I am german so it doesn't matter. I was just confused for a moment, because I tried to start drracket with english “LANG” to see how it's called in the english version ^^ 16:46 ChaozZBubi: “under documented”? 16:47 ChaozZBubi: so the usual use of %a is, to force the same type for parameters and/or return-value? 16:50 samth: ChaozZBubi: yes, that's what it's for 16:51 samth: by "under documented" i mean there's no docs whatsoever in english 16:51 samth: but i'm not sure exactly how the signature language enforces that 16:52 (quit) jao: Ping timeout: 240 seconds 16:54 ChaozZBubi: hm I see 16:54 samth: but i do think something is explained in the DMdA textbook 16:55 ChaozZBubi: I might take a look 16:56 (join) realitygrill 16:57 (quit) EmmanuelOga: Ping timeout: 244 seconds 16:58 ChaozZBubi: doesn't say much about it. 16:58 samth: sorry about that 16:59 samth: but your thought is right -- %a is for saying that the input and output are the same sort of thing 17:00 ChaozZBubi: (or two arguments the same? e.g. %a %a -> %b ) 17:00 samth: yes 17:00 samth: but probably that particular signature is a bad idea 17:01 samth: you should give a specific specification to the output, or reference one of the inputs 17:02 (join) acarrico 17:04 ChaozZBubi: yea well, that was an example 17:04 ChaozZBubi: if it returns e.g. an record, of course I would use the type for the record. 17:05 (quit) jonrafkind: Ping timeout: 255 seconds 17:10 (join) EmmanuelOga 17:13 ChaozZBubi: or else it would be like returning “any” there.. so you wouldn't know how to deal with it. 17:20 (topic) -: Racket -- http://racket-lang.org -- logs @ http://racket-lang.org/irc-logs 17:20 (names) -: gabot stchang chandler masm rapacity Shvillr SHODAN eMBee jrslepak sethalves bfulgham crk yoklov danking_ jamessan snorble jrslepak_ abbe noelw offby1 Dulak Guest96097 jschuster dpritchett cky bremner stamourv @ChanServ ozzloy eli hyko mironovd zerokarmaleft shadgregory rudybot Shviller otzi dobroerlanger dsantiago noam_ loz` IKEAnnesP acarrico EmmanuelOga lorx|ssh_ shachaf _p4bl0` ernestas sir_lewk em realitygrill malkomalko karswell ambrosebs jaimef ernst 17:20 (names) -: cataska rgrinberg aidy tauntaun 17:20 (join) asumu 17:20 (join) ChaozZBubi 17:20 (join) ohwow 17:21 (quit) ChaozZBubi: Write error: Broken pipe 17:21 (join) zakwilson_ 17:21 (join) tonyg 17:21 (join) mattmight 17:21 (join) petey 17:21 (quit) karswell: Remote host closed the connection 17:22 (join) ChaozZBubi 17:25 (join) ec 17:25 (join) samth 17:25 (join) wtetzner 17:25 (join) mario-goulart 17:25 (join) GeneralMaximus 17:25 (join) gf3 17:26 (join) kudkudyak 17:27 (quit) zakwilson_: Quit: http://quassel-irc.org - Chat comfortably. Anywhere. 17:27 (join) zakwilson 17:29 (nick) zakwilson -> zakwilson_ 17:29 (nick) zakwilson_ -> zakwilson 17:32 (quit) kudkudyak: Quit: Leaving. 17:35 (nick) _p4bl0` -> _p4bl0 17:36 (join) sindoc 17:46 (join) epsil 17:47 (quit) malkomalko: Remote host closed the connection 17:47 (quit) lorx|ssh_: Read error: No route to host 17:51 (quit) sindoc: Ping timeout: 248 seconds 18:08 (join) sindoc 18:18 (join) malkomalko 18:54 epsil: how do I obtain the function bound to a symbol? 18:54 epsil: e.g., say I have a variable containing '+ 18:54 epsil: how do I go from there to the /function/ +? 18:55 offby1: look for "namespaces" in the manual. 18:55 offby1: Also eval might work ... 18:55 offby1: rudybot: (eval '+) 18:55 rudybot: *offby1: your sandbox is ready 18:55 rudybot: *offby1: ; Value: # 18:55 offby1: rudybot: doc eval 18:55 rudybot: *offby1: http://docs.racket-lang.org/reference/eval.html#(def._((quote._~23~25kernel)._eval)) 18:55 (join) jonrafkind 18:56 epsil: yeah, I currently use eval 18:56 samth: epsil: but probably the best thing to do is make a hash table that maps symbols to procedures, instead of using eval 18:57 epsil: I originally had the string "+", which I converted to a symbol with string->symbol, which I then spliced into a list representing a function call, which I then passed to eval. 18:59 samth: epsil: what are you implementing? 18:59 epsil: samth: a parser combinator framework 19:00 samth: so do you need to handle arbitrary symbols and turn them into racket functions? 19:00 samth: or just some particular list? 19:01 epsil: samth: I want to specify a semantic action for certain strings, like "+" and "-", which maps them to the corresponding racket function 19:01 samth: epsil: then i'd use the hash-table approach 19:02 samth: rudybot: (hash "+" + "-" -_ 19:02 rudybot: samth: I mean, any hash can be broken or weakened given sufficient computing power, why even let them try? 19:02 samth: rudybot: (hash "+" + "-" -) 19:02 rudybot: samth: your lang/htdp-advanced sandbox is ready 19:02 rudybot: samth: error: #:1:1: hash: this function is not defined in: hash 19:02 samth: rudybot: init 19:02 rudybot: samth: your lang/htdp-advanced sandbox is ready 19:02 samth: rudybot: init racket 19:02 rudybot: samth: your sandbox is ready 19:02 samth: rudybot: (hash "+" + "-" -) 19:02 rudybot: samth: ; Value: #hash(("+" . #) ("-" . #)) 19:02 samth: rudybot: (define h (hash "+" + "-" -)) 19:02 rudybot: samth: Done. 19:02 samth: rudybot: (hash-ref h "+") 19:02 rudybot: samth: ; Value: # 19:02 epsil: I currently have this: (lambda (a op b) (eval `(,op ,a ,b))) 19:02 epsil: where op is one of the symbols '+ and '- 19:03 samth: then create the hash table with the procedures you want to handle 19:03 samth: and do this: 19:03 samth: (lambda (a op b) ((hash-ref my-ht op) a b)) 19:04 epsil: okay, but why is that better than eval? 19:04 epsil: or, alternatively, why is eval a poor choice in this case? 19:04 epsil: (as I assume it is) 19:04 samth: Matthew recently wrote a long piece about this 19:04 samth: http://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html 19:04 rudybot: http://tinyurl.com/62xs38x 19:05 epsil: thanks, I'll look into it! 19:34 (quit) sindoc: Ping timeout: 268 seconds 19:52 (quit) epsil: Ping timeout: 244 seconds 19:57 (quit) tauntaun: Ping timeout: 240 seconds 19:59 (join) tauntaun 20:16 (join) freakazoid 20:35 (nick) ChaozZBubi -> chaozzbubi 20:41 (quit) acarrico: Ping timeout: 248 seconds 20:50 (quit) yoklov: Quit: Leaving. 20:55 (quit) masm: Quit: Leaving. 20:58 (join) yoklov 21:00 (quit) yoklov: Read error: Connection reset by peer 21:00 (join) yoklov 21:18 (nick) samth -> samth_away 21:18 (quit) samth_away: Quit: Ex-Chat 21:37 (quit) tauntaun: Read error: Connection reset by peer 21:41 (quit) freakazoid: Quit: Computer has gone to sleep. 21:43 (join) acarrico 21:59 (quit) yoklov: Quit: Leaving. 22:11 (quit) ambrosebs: Remote host closed the connection 22:13 (join) ambrosebs 22:40 (quit) acarrico: Ping timeout: 240 seconds 22:42 (join) yoklov 22:53 (join) acarrico 22:57 loz`: 1 22:57 loz`: hi, i see semaphores in racket 22:58 loz`: what does internal couter reflect? 22:58 loz`: *counter 22:59 loz`: usually counter is amount of "locks" on this semaphore 23:00 loz`: and then zero counter means free semaphor 23:01 loz`: but reference says "when this counter is zero, the semaphore can block a thread’s execution until another thread increments the counter" 23:09 (quit) EmmanuelOga: Ping timeout: 244 seconds 23:10 (join) EmmanuelOga 23:16 eli: jonrafkind: How is your tool different from `raco make'? 23:17 jonrafkind: its not. keep reading your email 23:18 eli: jonrafkind: Heh... And I was getting ready to tell about the bad choice for a name. 23:18 jonrafkind: yea.. i couldnt think of another one 23:18 jonrafkind: eli, can you show me a screenshot of how you set up the irc commit bot on github? 23:25 ozzloy: how does one find the path of the current file? i've had this before but i can't find it now 23:25 offby1: there's a library called "etc" that includes a function like "current-source-directory" or something. 23:25 offby1: It's a surprisingly-long name. 23:26 ozzloy: i have a file that provides functions but can also be run by itself. i'd like it to only do some stuff when it is run directly and not when some other file requires it 23:26 eli: jonrafkind: server: irc.freenode.net; port: 6667; room: #racket; Nick: RacketCommitBot; then check "Message Without Join", and "Active". 23:26 jonrafkind: do you know what pressing 'test' is supposed to do on that page? 23:27 eli: ozzloy: What offby1 suggests won't work for that. Your best bet ATM is to define a `main' and use command-line arguments that run it when you use it directly. 23:27 RacketCommitBot: [racket] none pushed 3 new commits to master: http://git.io/uOUyeg 23:27 RacketCommitBot: [racket/master] Fix type of `remove-duplicates'. - Sam Tobin-Hochstadt 23:27 RacketCommitBot: [racket/master] Filesystem errors are not internal typed racket errors. - Sam Tobin-Hochstadt 23:27 RacketCommitBot: [racket/master] Don't run the slides. - Sam Tobin-Hochstadt 23:27 eli: jonrafkind: That. 23:27 jonrafkind: ok 23:28 eli: jonrafkind: The "without join" feature require some flag on the channel. 23:28 eli: Without it you won't see anything. 23:28 ozzloy: offby1, aha! this-expression-file-name and this-expression-source-directory 23:28 offby1: ozzloy: : http://docs.racket-lang.org/mzlib/mzlib_etc.html?q=current-source#(form._((lib._mzlib/etc..rkt)._this-expression-source-directory)) 23:28 ozzloy: jinx 23:28 jonrafkind: eli, you mean without the flag the bot won't even join? 23:28 offby1 rolls up his sleeve 23:28 offby1: ozzloy: I thought I was the only one who said "jinx". 23:29 ozzloy: eli, wait, are you saying those two functions won't do it? 23:29 ozzloy: offby1, twinsies! 23:29 ozzloy: (now i'm just playing) 23:29 eli: jonrafkind: The flag asks it to not join -- but then you need a channel that allows sending messages to it without joining. 23:29 eli: (IIRC.) 23:30 offby1: .oO("twinsies"?) 23:30 offby1: there ain't room enough in this channel for two bots! 23:30 jonrafkind: eli, do you know what that flag is? 23:30 eli: ozzloy: Yeah, it won't help you to distinguish being required "directly" or by something else. There's currently no notion of such a "directly". 23:30 rudybot gets all huffy 23:30 eli: jonrafkind: No idea. 23:30 eli: ozzloy: Speaking about rudybot, see offby1's sources -- he's doing exactly what I suggested... 23:31 offby1: rudybot: source 23:31 rudybot: *offby1: git clone git://github.com/offby1/rudybot.git 23:35 jonrafkind: eli, its -n fwiw 23:37 ozzloy: eli, wait, are you saying that running a file via `./foo.rkt` makes that file get required? 23:38 jonrafkind: eli, I see that cia.vc will stay in the channel and can accept github commit messages, in case #racket should have +n again 23:39 (quit) yoklov: Quit: Leaving. 23:40 ozzloy: i'm not worried about a.rkt being able to distingush between being required by b.rkt and being required by d.rkt indirectly through c.rkt. i want to distinguish in a.rkt whether it was run via `./a.rkt` or it was required (by b.rkt, let's say) 23:40 ozzloy: are you saying those amount to the same thing? i could see that 23:43 (join) freakazoid 23:45 ozzloy: i like "el-buggo" 23:46 offby1: ozzloy: I've since started using the github issue tracker. 23:48 ozzloy: understandable 23:49 ozzloy: btw, at first i thought eli was saying you, offby1, are a bot. i was quite astonished at how well you did on the turing test! 23:50 offby1: yep, got a scholarship from it, actually 23:50 ozzloy: lulz 23:51 ozzloy: hmm... this whole passing a flag thing, idk... 23:55 (quit) otzi: Ping timeout: 240 seconds 23:56 (join) yoklov 23:58 (part) yoklov 23:58 (quit) EmmanuelOga: Ping timeout: 244 seconds