00:04 (join) bjz 00:10 bjz: how would I display an expression without evaluating it? e. (define (display-exp exp) (fprintf (current-output-port) "~a: ~a\n" exp)) 00:10 bjz: (sorry pretty new to this) 00:13 bjz: so for that example I'd want this (display-exp (+ 1 2)) to output (+ 1 2): 3 00:36 (join) dsantiago 00:40 bjz: any ideas? been googling around, but I'm having trouble coming up with useful search terms 00:42 Kaylin: \ 00:44 ski: rudybot: eval (define-syntax-rule (display-exp exp) (fprintf (current-output-port) "~a: ~a\n" 'exp exp)) 00:44 rudybot: ski: Done. 00:44 ski: rudybot: eval (display-exp (+ 1 2)) 00:44 rudybot: ski: ; stdout: "(+ 1 2): 3\n" 00:44 bjz: ? 00:45 (quit) jeapostrophe: Read error: Operation timed out 00:46 ski: this defines `display-exp' as a macro, so that the argument form `(+ 1 2)' is passed to it (at macro-expansion-time, ~= compile-time), and not just the value which results from evaluating that expression 00:46 ski: an alternative is to do something like 00:47 ski: (define (display-exp exp) (fprintf (current-output-port) "~a: ~a\n" exp (eval exp ???)) 00:47 ski: but then you have to call it like 00:47 ski: (display-exp '(+ 1 2)) 00:47 bjz: oh cool 00:47 bjz: thankyou so much! 00:47 ski: and you have to fill the `???' in the definition with something. to tell how to interpret the symbols occuring in the passed argument 00:47 bjz: :D 00:48 ski: possibly `(current-namespace)' will work for `???', though i think it is normally better to be more specific 00:49 ski: yw :) 00:49 bjz: http://docs.racket-lang.org/reference/eval.html ? 00:49 ski: yes 00:50 bjz: hehe cheers 00:50 ski: also see "Pattern-Based Syntax Matching" 00:50 bjz: yeah I would never have found thet 00:50 bjz: *that 00:52 ski: `(define-syntax-rule (macro-name arguments ...) template)' and `(define-syntax macro-name (syntax-rules (literals ...) (((macro-name arguments ...) template) ...))' 00:52 ski: are probably the easiest to understand, on that page 00:53 ski: (the former one is a shorthand of a special case of the latter one) 00:54 (quit) SeanTAllen: Ping timeout: 244 seconds 00:55 (quit) sid0: Ping timeout: 272 seconds 01:08 (quit) Kaylin: Read error: Connection reset by peer 01:15 bjz: ski: it works! 01:15 bjz: ski: :D 01:19 ski: happy to help :D 01:20 (quit) yoklov: Quit: computer sleeping 01:23 (join) EmmanuelOga 01:31 (join) SeanTAllen 02:23 (join) mceier 02:44 (quit) jacius: Remote host closed the connection 03:04 (quit) elliottcable: Read error: Operation timed out 03:10 (quit) tauntaun: Ping timeout: 252 seconds 03:10 (quit) acarrico: Ping timeout: 265 seconds 03:11 (join) tauntaun 03:11 (nick) tauntaun -> Guest56248 03:13 (join) elliottcable 03:17 (quit) hash_table: Ping timeout: 244 seconds 03:17 (quit) getpwnam: Ping timeout: 244 seconds 03:17 (quit) jonathansizz: Ping timeout: 250 seconds 03:19 (join) acarrico 03:56 (join) ingo_ 03:57 (part) ingo_ 04:10 (quit) stchang: Read error: Operation timed out 04:11 (join) stchang 04:15 (quit) cdidd: Quit: Leaving 04:17 (join) cdidd 04:33 (join) gciolli 04:40 (quit) cdidd: Ping timeout: 246 seconds 04:47 (join) bitonic 04:49 (quit) gciolli: Quit: Leaving. 05:01 (quit) EmmanuelOga: Ping timeout: 244 seconds 05:09 (quit) bjz: Quit: Leaving... 05:13 (quit) acarrico: Ping timeout: 244 seconds 05:38 (join) acarrico 05:57 (join) jyc 06:17 (join) bjz 06:43 (quit) bitonic: Quit: ERC Version 5.3 (IRC client for Emacs) 06:44 (join) bitonic 06:57 (quit) jyc: Read error: Connection reset by peer 07:15 (join) masm 07:49 (quit) bjz: Ping timeout: 250 seconds 08:05 (quit) Shviller: Ping timeout: 244 seconds 08:05 (join) Shviller 08:08 (join) bjz 08:11 (join) jeapostrophe 08:17 (join) jesyspa 09:15 (quit) jeapostrophe: Ping timeout: 240 seconds 09:24 (join) gciolli 10:03 (join) jeapostrophe 10:03 (quit) jeapostrophe: Changing host 10:03 (join) jeapostrophe 10:08 (quit) jeapostrophe: Ping timeout: 265 seconds 10:14 (join) getpwnam 10:14 (join) jonathansizz 10:14 (join) hash_table 10:15 (quit) bitonic: Remote host closed the connection 10:16 (quit) bjz: Quit: Bye! 10:27 (join) brelrj 10:27 brelrj: Hey guys place-image function not working for BSL 10:27 brelrj: what could be going wrong? 10:32 brelrj: is anybody on this mailing list.. using it for the first time.. ! 10:33 (join) anRch 10:37 (quit) brelrj: Ping timeout: 245 seconds 11:01 chandler: no, nobody is on this mailing list 11:03 bremner: itym 'mu 11:15 (join) bitonic 11:15 asumu: That's a new one. 11:44 (join) Kaylin 11:46 (join) jeremyheiler 11:48 (quit) masm: Ping timeout: 248 seconds 11:53 (join) jonrafkind 12:14 (join) cdidd 12:19 (quit) anRch: Quit: anRch 12:47 (quit) jeremyheiler: Quit: Computer has gone to sleep. 12:48 (join) yoklov 12:48 (quit) yoklov: Remote host closed the connection 12:49 (quit) gciolli: Quit: Leaving. 12:52 (quit) cataska: Ping timeout: 244 seconds 13:22 (join) masm 13:22 (quit) mceier: Quit: leaving 13:31 (join) EmmanuelOga 13:41 (join) dyoo 13:41 dyoo: brelrj: if you can tell us more details about what's going wrong, someone here should be happy to help 13:41 dyoo: also, please feel free to ask on the mailing list: http://lists.racket-lang.org/users/ 13:45 (part) dyoo 13:50 (quit) jonrafkind: Ping timeout: 245 seconds 14:05 (join) jeremyheiler 14:14 (quit) Kaylin: Quit: Leaving. 15:01 (join) MayDaniel 15:19 (quit) EmmanuelOga: Ping timeout: 244 seconds 15:20 (join) dzhus 15:36 (join) dnolen 15:39 (join) jonrafkind 15:39 (quit) jonrafkind: Changing host 15:39 (join) jonrafkind 15:52 (join) mceier 16:00 (quit) jeremyheiler: Quit: Computer has gone to sleep. 16:12 (join) brel 16:12 brel: hey guys empty-piece function is being shown as unrecognized with Dr-racket 16:12 brel: and bsl 16:12 brel: what could be going wrong? 16:15 brel: anyone else there on this chat group man? 16:18 (join) Kaylin 16:20 bremner: yes 16:24 brel: hey man waiting for an answer 16:25 brel: still not found a solution.. I am working on windows 7 system 16:25 brel: and I have racker verions 5.2 16:25 brel: *racket 5.2.1 16:25 bremner: brel: you may have to idle a while in the channel before someone answers your question. 16:27 brel: oh no I found it.. I just had to add (require 2htdp/image).. and now it works fine 16:32 (quit) brel: Ping timeout: 245 seconds 16:42 (join) anRch 16:49 (join) jacius 17:00 (join) jao 17:00 (quit) jao: Changing host 17:00 (join) jao 17:22 (join) anRch_ 17:25 (quit) anRch: Ping timeout: 264 seconds 17:25 (nick) anRch_ -> anRch 17:32 (join) zyoung 17:38 (quit) cdidd: Quit: Leaving 17:39 (quit) MayDaniel: 17:42 (join) cdidd 17:52 (nick) em -> ninkasi 17:57 (join) jeremyheiler 17:58 (quit) dzhus: Ping timeout: 248 seconds 18:35 (join) EmmanuelOga 18:35 (quit) EmmanuelOga: Client Quit 18:36 (quit) jesyspa: Quit: leaving 18:57 (quit) bitonic: Remote host closed the connection 18:57 (join) bitonic 19:02 (quit) mceier: Quit: leaving 19:31 (join) jyc_ 20:07 (quit) Kaylin: Read error: Connection reset by peer 20:13 (join) yoklov 20:14 (quit) stchang: Read error: Operation timed out 20:15 (join) cataska 20:18 (join) stchang 20:32 (quit) jeremyheiler: Quit: Computer has gone to sleep. 20:41 (join) bjz 20:46 (quit) masm: Quit: Leaving. 20:52 (quit) dnolen: Ping timeout: 244 seconds 21:10 (quit) jacius: Quit: Leaving 21:52 (join) jeremyheiler 22:00 (join) antithesis 22:01 (quit) bjz: Quit: Leaving... 22:02 (join) bjz 22:17 (join) brendan_ 22:18 (quit) bjz: Ping timeout: 246 seconds 22:24 (join) Kaylin 22:39 asumu: yoklov: values are often impersonated to redirect the operations on them. 22:39 asumu: One example is if a value like a box has a contract on it. 22:40 asumu: (or a mutable vector) 22:40 yoklov: hm, so it's not uncommon for code to use impersonators without realizing that's happening? 22:40 asumu: Well, it depends. If you accept vectors from an unknown source, then yes. 22:41 asumu: But if you only use a function internally with known data structures, you could be fine. 22:41 (quit) jeremyheiler: Quit: Computer has gone to sleep. 22:41 yoklov: hm, okay. 22:43 yoklov: I'll still stick with unsafe-vector-set and unsafe-struct set over the asterisked alternatives, because from what i can tell they're the same speed. 22:46 yoklov: i do wish there were a struct-ref and struct-set! to match unsafe-struct-ref and unsafe-struct-set!, though. 22:47 asumu: yoklov: struct->vector and vector-ref should work 22:48 asumu: if what you want is index based struct access. 22:49 yoklov: I'd still need to change code around to do (require (filtered-in … ) racket/unsafe/ops) to switch safe operations to unsafe ones 22:50 asumu: Oh, you also wanted the identifiers to match up. 22:52 yoklov: i guess i could use write them and require it separately. 22:54 yoklov: though, i don't think I can get unsafe-struct-set! that way 22:57 (quit) _tca: Quit: Lost terminal 22:59 (quit) bitonic: Remote host closed the connection 23:03 (quit) antithesis: Quit: antithesis 23:07 (join) adu 23:11 (join) emma 23:20 (join) antithesis 23:25 bremner: so how much chaos would ensue if we renamed /usr/bin/planet to /usr/bin/racket-planet in Debian? 23:28 jonrafkind: 12.3 23:30 adu: 12.3 chaos? 23:42 jonrafkind: yes, 1 chaos is defined by how crazy your cat gets when you shine a laser pointer on the floor 23:44 yoklov: lol 23:45 yoklov: is that scale linear or logarithmic? 23:46 jonrafkind: bremner, what about making /usr/share/racket and putting planet in there, so people that really want it can just add that to their $PATH, and then symlink it to /usr/bin/racket-planet 23:52 bremner: jonrafkind: something like that would certainly be possible. At this point I'm curious if some racket tools (raco?) rely on the name planet 23:53 jonrafkind: debian should champion the effort to clean up the mess that is the unix program namespace 23:59 offby1: don't you call me a tool!