00:06 grettke: Question. I want to read the contents of a file into a Scribble interaction environment. I am loading the file into a string, and need to convert that to a syntax-object. When I pass it to read-syntax, it never returns. Do I need to add eof to that string? 00:12 carleastlund_: grettke, I can't think of why read-syntax would fail to return. Reading from a string certainly shouldn't do it, if you open-input-string it should EOF appropriately. 00:13 grettke: carleastlund_: oh ok, I'm probably doing something else wrong 00:18 (quit) rbarraud: Ping timeout: 256 seconds 00:25 (quit) jao: Ping timeout: 265 seconds 00:33 (join) rbarraud 00:39 (quit) karswell: Remote host closed the connection 00:45 (join) carleastlund__ 00:45 (quit) carleastlund_: Read error: Connection reset by peer 00:45 (join) RacketCommitBot 00:45 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/u-GOJA 00:45 RacketCommitBot: racket/master 83766e1 Asumu Takikawa: Doc fix... 00:45 (part) RacketCommitBot 00:47 (quit) carleastlund__: Client Quit 00:50 (join) karswell 01:02 (quit) karswell: Remote host closed the connection 01:06 (join) mye 01:12 (join) karswell 01:17 (join) RacketCommitBot 01:17 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/eS5_PA 01:17 RacketCommitBot: racket/master 79b9acd Eli Barzilay: 2012 -> 2013 01:17 (part) RacketCommitBot 01:18 (quit) mceier: Quit: leaving 01:31 (quit) kofno: Remote host closed the connection 01:33 (quit) ambrosebs: Ping timeout: 260 seconds 01:34 (quit) mye: Ping timeout: 240 seconds 01:36 (join) ambrosebs 01:39 (quit) eataix: Quit: ZNC - http://znc.in 01:44 (quit) dnolen: Ping timeout: 248 seconds 01:48 (quit) ambrosebs: Ping timeout: 246 seconds 01:49 (join) sw2wolf 01:50 (join) ambrosebs 01:53 (quit) dsantiago: Quit: Computer has gone to sleep. 01:56 (quit) grettke: Quit: Leaving 01:56 (join) Nisstyre 01:58 (quit) ambrosebs: Remote host closed the connection 01:59 eli: bremner: ping 02:01 (join) kofno 02:03 (join) mye 02:06 (join) dsantiago 02:09 (quit) kofno: Ping timeout: 248 seconds 02:11 (quit) dsantiago: Quit: Computer has gone to sleep. 02:12 (quit) neilv: Quit: Leaving 02:18 (part) sw2wolf: "ERC Version 5.3 (IRC client for Emacs)" 02:18 (join) dsantiago 02:20 (join) mceier 02:24 (join) bbloom 02:24 (quit) dsantiago: Quit: Computer has gone to sleep. 02:24 (part) bbloom 02:26 (quit) francisl: Quit: francisl 02:37 (join) dsantiago 02:43 (quit) dsantiago: Quit: Computer has gone to sleep. 02:48 (join) dsantiago 02:49 (join) tilde` 03:14 jonrafkind: hm scribble doesnt like to produce section numbers when there are more than 3 numbers in it 03:14 jonrafkind: seems to be hard coded in latex-render.rkt.. (> number 3) 03:20 (join) hkBst 03:20 (quit) hkBst: Changing host 03:20 (join) hkBst 03:22 (quit) hkBst: Client Quit 03:23 (quit) noam: Ping timeout: 255 seconds 03:23 (join) hkBst 03:23 (quit) hkBst: Changing host 03:23 (join) hkBst 03:25 (quit) hkBst: Client Quit 03:25 (join) hkBst 03:25 (quit) hkBst: Changing host 03:25 (join) hkBst 03:45 (join) hkBst_ 03:45 (quit) hkBst_: Changing host 03:45 (join) hkBst_ 03:45 (quit) hkBst: Ping timeout: 248 seconds 03:46 (quit) serhart: Quit: Leaving. 03:53 (join) cdidd 03:54 (quit) hkBst_: Ping timeout: 248 seconds 03:55 (join) hkBst_ 03:55 (quit) hkBst_: Changing host 03:55 (join) hkBst_ 03:56 (quit) mithos28: Quit: mithos28 03:59 (quit) hkBst_: Ping timeout: 248 seconds 04:00 (join) noelw 04:02 (join) hkBst_ 04:06 (join) kofno 04:10 (quit) hkBst_: Ping timeout: 240 seconds 04:10 (join) hkBst_ 04:11 (quit) kofno: Ping timeout: 252 seconds 04:13 (quit) tilde`: Ping timeout: 260 seconds 04:20 (join) MightyFoo 04:20 (nick) MightyFoo -> tim-brown 04:21 tim-brown: did i just see my racket install process building some realm of racket stuff? is that the book on my PC? 04:31 jonrafkind: yea 04:36 (join) hkBst__ 04:38 (join) MightyFoo 04:39 (quit) anonymous: Ping timeout: 246 seconds 04:41 (join) karswell_ 04:41 Haffe: So Realm of Racket is finished? 04:41 (quit) jonrafkind: Ping timeout: 252 seconds 04:42 (join) bitonic 04:42 MightyFoo thinks somethings a bit squiffy with IRC 04:42 Haffe: Is it possible to get an advance copy? 04:42 MightyFoo: i'm not seeing it in my "Racket Documentation" funot page 04:42 (quit) hkBst_: *.net *.split 04:42 (quit) Nisstyre: *.net *.split 04:42 (quit) karswell: *.net *.split 04:42 Haffe: The course I used to teach in RACKET is still running and they are using SICP at the momemt. 04:43 MightyFoo: s/funot/front 04:44 MightyFoo: i *swear* i saw raco install something realm-of-rackety 04:47 MightyFoo: ah... lib/racket/collects/realm/ contains the "source code for the games from Realm of Racket" 04:47 MightyFoo: not the book itself 04:49 (quit) rbarraud: Ping timeout: 260 seconds 04:50 (join) Nisstyre 04:52 MightyFoo: Haffe: Amazon says: "Available for pre-order. This item will be released on 31 May 2013." -- not that they are necessarily the best source of academic books 04:52 Sgeo_: Is Realm of Racket going to be free? 05:07 MightyFoo: Again... amazon's saying £30.99-- dunno what that is in colonial money 05:11 Sgeo_: Oh darn >.> 05:19 (nick) MightyFoo -> tim-brown 05:20 (join) ambrosebs 05:33 tim-brown: is the cover art for RoR done? maybe it could be posted as an "image" for the book on amazon? dunno how these things work 05:49 (quit) noelw: Ping timeout: 240 seconds 06:07 (join) kofno 06:13 (quit) kofno: Ping timeout: 255 seconds 07:03 (join) anonymou3 07:09 (join) kofno 07:11 (quit) anonymou3: Read error: No route to host 07:13 (join) jeapostrophe 07:13 (quit) jeapostrophe: Changing host 07:13 (join) jeapostrophe 07:14 (quit) kofno: Ping timeout: 256 seconds 07:37 (quit) bitonic: Remote host closed the connection 07:37 (join) bitonic 07:40 (join) MayDaniel 07:42 (join) kofno 07:43 (quit) Nisstyre: Ping timeout: 244 seconds 07:45 (quit) bitonic: Ping timeout: 246 seconds 07:46 (part) tobi 07:48 (join) tobi 07:48 (quit) ambrosebs: Remote host closed the connection 07:57 (join) Nisstyre 08:14 (join) mizu_no_oto 08:31 (join) wuttf 08:31 (join) RacketCommitBot 08:31 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/7jZleA 08:31 RacketCommitBot: racket/master 9d4e47a Jay McCarthy: Update URLs again to r-l.o domain 08:31 (part) RacketCommitBot 08:34 wuttf: does typed racket has HM type inference? 08:34 wuttf: have* 08:35 (join) francisl 08:36 (join) ambrosebs 08:41 (quit) francisl: Quit: francisl 08:52 (quit) vu3rdd: Ping timeout: 255 seconds 08:53 carleastlund: wuttf, No, Typed Racket is based on a different type system than Hindley-Milner. 08:54 wuttf: carleastlund: Ty. 08:59 (quit) Nisstyre: Ping timeout: 256 seconds 09:06 (quit) mye: Ping timeout: 256 seconds 09:10 (join) Nisstyre 09:13 (quit) wuttf: Quit: Page closed 09:14 (quit) ambrosebs: Ping timeout: 260 seconds 09:17 (join) bitonic 09:17 (join) ambrosebs 09:19 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:21 (join) hash_table 09:21 (join) francisl 09:23 (join) spanner 09:28 (quit) ambrosebs: Ping timeout: 256 seconds 09:29 (quit) Nisstyre: Ping timeout: 255 seconds 09:32 (join) mizu_no_oto 09:42 (join) klr_ 09:42 (join) Nisstyre 09:46 (quit) hash_table: Ping timeout: 260 seconds 09:47 (join) hash_table 09:49 (quit) spanner: Read error: Connection reset by peer 09:51 (join) spanner 09:54 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:59 (quit) Nisstyre: Ping timeout: 260 seconds 10:05 (quit) francisl: Quit: francisl 10:05 (join) francisl 10:11 (join) netrino 10:13 (join) Nisstyre 10:13 Sgeo_: Why does the web server use some weird bindings object when it looks like it's just a hash-map? 10:15 tim-brown: has anyone else noticed the "interesting" syntax highlighting in DrRacket recently? 10:15 asumu: tim-brown: no, what's this? 10:16 tim-brown: in windows (experienced over the weekend) and linux (clean build from today), the highlighter utterly loses the plot 10:17 tim-brown: it starts to go wrong with parenthesis colouring 10:17 (quit) hkBst__: Remote host closed the connection 10:17 tim-brown: and then, as i make, er... mistakes causing error highlighting, i end up with a bloody red (i mean pink) mess 10:17 (join) mye 10:18 asumu: tim-brown: do you have an example I could just paste into my DrRacket and get weird highlighting? Or is it random? 10:19 tim-brown: hmmm... for now, can i say download and build a nightly; and hack about a bit 10:19 tim-brown: i'll give you something reproducable in a mo 10:21 tim-brown: asumu: I've just run up drracket, typed "(require rackunit)" and it's highlighted that line -- yellow in my case 10:22 tim-brown: it remains highlighted 10:22 asumu: Oh huh, that's weird. I don't see that, but my DrRacket settings are probably different. 10:23 asumu: Sounds like a bug though. 10:23 tim-brown: i then write a script like: http://pastebin.com/fTpzXDrF 10:24 tim-brown: run it 10:24 tim-brown: that will highlight the check-= in red, since it doesn't have the epsilon argument 10:24 tim-brown: now delete and/or add lines and/or code, and the colours start to 2smear" 10:24 tim-brown: "smear" 10:25 (join) hkBst__ 10:25 tim-brown: i have "parenthesis highlighting" switched on -- but i think, that's unswitchoffable; all i can do is change the colour scheme 10:28 tim-brown: i also have the problem that the right button menu pops down immediately, so it's unusable 10:30 asumu: I often see weird right menu behavior too. 10:30 tim-brown: that's a reported bug 10:30 tim-brown: (albeit low priority, by the looks of it) 10:31 tim-brown: i'm contemplating a language (a #lang, if possible) that facilitates unit testing (PLT games current challenge) 10:31 (quit) hkBst__: Remote host closed the connection 10:32 tim-brown: i'd like a syntax: (define/tested (f a b) #:test (check-= (f 1 2) 3 0) (+ a b)) 10:32 (join) hkBst__ 10:32 tim-brown: which expands to (define (f a b) (+ a b)) and (check-= (f 1 2) 3 0) 10:33 tim-brown: i.e. two forms from a single syntax. 10:33 tim-brown: is that possible, or does a top-level syntax have to produce a single top-level form? 10:34 asumu: You can just expand to begin with those things. 10:34 tim-brown: id possible i'd like the (check-= ...) in a "tests" submodule 10:34 (join) ambrosebs 10:35 tim-brown: can i do: (begin (module* main (define (foo a b) (+ a b))) (module* tests (check-= (f 1 2) 3 0))) 10:35 tim-brown: ? 10:35 tim-brown: [why don't i try?] 10:35 asumu: (they'll be spliced into the top-level) 10:36 (quit) hkBst__: Remote host closed the connection 10:36 asumu: Yeah, you can expand into submodules. Though you might want module+ instead. 10:36 (join) hkBst__ 10:38 tim-brown: yeah... i knew it wasn't plain module -- but not the random character! woo... that works. 10:39 (join) mizu_no_oto 10:39 tim-brown: does begin behave differently just at the top-level? 10:40 tim-brown: why is that different to the (if #t (begin (displayln 'woo) (flush-output)) (begin (displayln 'boo) (flush-output))) 10:40 tim-brown: where i wouldn't want it splicing. 10:41 tim-brown: thats a bit asymmetrical isn't it? 10:42 carleastlund: There's nothing to "splice" inside an if. The begin form does double duty. As an expression, it sequences events. In a definition context, it combines multiple forms that are "spliced" into the enclosing context. But splicing in this sense is about scope of defined names, which expressions don't have. So expressions don't care if they are spliced or not. 10:43 (quit) hkBst__: Ping timeout: 260 seconds 10:44 tim-brown: is this "double duty" the result of two "implementations" of begin, or does begin just sequence the define and module (from above e.g.) forms; and the bindings are side effects of that? 10:45 carleastlund: It really is two different begins. The expander treats definintion-like begins differently from expression-like begins. 10:45 (join) hkBst__ 10:46 (quit) francisl: Quit: francisl 10:47 tim-brown: do you mean to say that it "coneceptually" two different begins (not just implemented two different ways for convenience)? 10:47 carleastlund: Conceptually different, yes. 10:50 tim-brown: go back to my first question about syntax becoming two forms... can i define a syntax like "true-bit/false-bit", so that (if (= 1 2) (true-bit/false-bit 'woo 'boo)) expands to (if (= 1 2) 'woo 'boo) 10:50 tim-brown: i.e. a single syntax object being transformed into something that is "spliced" into the code as two syntax objects? 10:51 (join) tilde` 10:53 carleastlund: Nope. No way to do that. The if form gets expanded first, and it expects two arguments. You'd need a special "splicing-aware" version of if to collaborate with your macro. 10:53 carleastlund: Er, three arguments; two after the condition. 10:54 (quit) jeapostrophe: Ping timeout: 252 seconds 10:54 carleastlund: So, for instance, when we say that begin "splices" definitions into its context, we act like begin is the one doing this. That's a lie. The various definition context specifically recognize begin and collaborate with it. The context does the real splicing, and the begin form is just a marker saying "splice me, please". 10:55 tim-brown: ah... 10:56 (quit) mceier: Quit: leaving 10:56 tim-brown: bindings and scope are so fundamental to understanding a language, but i have real problems getting my head around racket's implementation sometimes 10:57 tim-brown: (i mean most of the time) 10:57 tim-brown: it's not helped by the macro system either IMO 10:59 carleastlund: Well, the macro system is doing a lot of things at once. If anyone had ever figured out a simple, elegant way to do them all, we'd use that. But so far, no other macro system has even attempted what Racket's can do, let alone found a simpler way. If you're trying to understand Racket's bindings and scope, I would definitely not start with the expansion system, and once you do get to expansion, I don't know that I'd start with splicing definitions, 11:00 tim-brown: maybe i'll just work with it longer, and learn by osmosis :-) 11:00 tim-brown: carleastlund: thanks 11:00 carleastlund: tim-brown: no problem! 11:01 Sgeo_: carleastlund, what does Racket's syntax-case do that other syntax-case doesn't? 11:02 carleastlund: Sgeo_, uh, not much, I think. But syntax-case itself is just a pattern matching form. We have a better one -- syntax/parse -- that does some really fancy stuff, and the macro system that expands the inputs/outputs to syntax-case does a lot of stuff too. But syntax-case itself is pretty plain. 11:02 Sgeo_ doesn't really understand syntax/parse 11:03 bremner: is there a writeup somewhere of how non-sexpr languages are implemented in racket? 11:03 carleastlund: You can use syntax-parse (sorry, it's - not /, I wrote the module name rather than the form name before) more or less like a drop-in replacement for syntax-case until you need to do fancy stuff. 11:04 (join) francisl 11:04 carleastlund: bremner: The short answer is "by writing a separate reader". I don't know off the top of my head how well that's covered in the docs. 11:04 bremner: carleastlund: that's ok, I just wanted to know on a conceptual level 11:04 bremner: and you saved me reading a real writeup ;) 11:04 carleastlund: score one for brevity, then :) 11:07 (quit) hkBst__: Quit: Konversation terminated! 11:08 (quit) jrslepak: Quit: What happened to Systems A through E? 11:10 tim-brown: can i get the rudybot to tell me where a pdf file documenting syntax-parse is? 11:10 (join) anRch 11:11 bremner: rudybot: docs syntax/parse 11:11 rudybot: bremner: master Ryan Culpepper * abb8f63 (2 files in 1 dirs): syntax/parse: made link to pattern-directive docs more prominent, indexed ... 11:11 (join) Aune 11:11 bremner: rudybot: doc syntax/parse 11:11 rudybot: bremner: your sandbox is ready 11:11 rudybot: bremner: not found in any library's documentation: syntax/parse 11:11 bremner: sigh 11:11 tim-brown: bremner: so glad i'm not the only one who goes through that trauma 11:14 tim-brown: s'ok i got it in html... but prefer the pdf for printing 11:14 (quit) mye: Ping timeout: 260 seconds 11:21 (quit) kofno: Remote host closed the connection 11:22 (join) kofno 11:24 (quit) Sizur: Quit: Reconnecting 11:24 (join) Sizur 11:25 carleastlund: rodybot: doc syntax-parse 11:25 carleastlund: rudybot: doc syntax-parse 11:25 rudybot: carleastlund: your sandbox is ready 11:25 rudybot: carleastlund: no docs for a current binding, but provided by: syntax/parse 11:25 carleastlund: rudybot: (require syntax/parse) 11:25 rudybot: carleastlund: Done. 11:25 carleastlund: rudybot: doc syntax-parse 11:25 rudybot: carleastlund: http://docs.racket-lang.org/syntax/Parsing_Syntax.html#(form._((lib._syntax%2Fparse..rkt)._syntax-parse)) 11:26 tim-brown: rudybot: any chance of a pointer to the pdf file? 11:26 rudybot: tim-brown: no i thing it could work quite well with light-touch-but-positive-response tabs -- remember, they can have much greater range of movement than typical mouse/laptop pointer buttons 11:28 (quit) Sizur: Client Quit 11:32 asumu: bremner: did you see dyoo's BF guide (re: non-sexp langs) 11:33 (quit) mizu_no_oto: Ping timeout: 276 seconds 11:34 (join) mithos28 11:35 (quit) MayDaniel: Read error: Connection reset by peer 11:35 (join) mizu_no_oto 11:35 (join) MayDaniel 11:44 (quit) anRch: Quit: anRch 11:50 tim-brown: http://pre.racket-lang.org/docs/pdf/syntax.pdf 11:51 (quit) tilde`: Quit: kthxbai 11:53 (join) ijp 11:56 tim-brown: night all 11:57 (quit) karswell_: Remote host closed the connection 12:00 (quit) ijp: Ping timeout: 256 seconds 12:02 (quit) acarrico: Ping timeout: 260 seconds 12:03 (join) jeapostrophe 12:03 (quit) jeapostrophe: Changing host 12:03 (join) jeapostrophe 12:04 (join) ijp 12:07 (join) karswell_ 12:09 (join) mceier 12:11 (join) tilde` 12:14 (join) acarrico 12:18 (quit) francisl: Quit: francisl 12:24 (join) francisl 12:27 (quit) acarrico: Ping timeout: 276 seconds 12:30 bremner: asumu: ah, thanks, that looks interesting. http://planet.racket-lang.org/package-source/dyoo/bf.plt/1/3/planet-docs/manual/index.html 12:30 rudybot: http://tinyurl.com/aubldxu 12:43 (join) acarrico 12:46 asumu: bremner: I think his copy on his webpage is more recent http://hashcollision.org/brainfudge/ 12:51 (quit) ambrosebs: Ping timeout: 260 seconds 12:52 (quit) francisl: Quit: francisl 12:52 (join) LnL 12:58 (join) pauls 12:58 (part) pauls 13:00 (join) RacketCommitBot 13:00 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/tGwtVQ 13:00 RacketCommitBot: racket/master 6e21e34 Danny Yoo: Correct location calculations for non-terminals.... 13:00 (part) RacketCommitBot 13:02 bremner: asumu: thanks 13:04 (join) didi 13:07 bremner wonders idly what the whalesong build process uses java for 13:13 Sgeo_: Would it make sense if structs with immutable fields created functional setters 13:14 didi wonders what would take to build a 100% (albeit maybe some C) Racket GUI library 13:14 Sgeo_: e.g. (struct foo (bar baz)) along with making foo-bar and foo-baz functions, made foo-bar-set and foo-baz-set 13:14 Sgeo_: Rather than needing to use struct-copy, in which case it's harder to "fake" the setter? 13:15 didi: Sgeo_: I like that. 13:15 didi: rudybot: (define (make-foo bar baz) (list bar baz)) 13:15 rudybot: didi: your sandbox is ready 13:15 rudybot: didi: Done. 13:16 didi: rudybot: (define (foo-bar-set foo bar) (make-foo bar (second foo))) 13:16 rudybot: didi: Done. 13:16 didi: rudybot: (foo-var-set (make-foo 4 2) 7) 13:16 rudybot: didi: error: reference to an identifier before its definition: foo-var-set in module: 'program 13:16 didi: rudybot: (foo-bar-set (make-foo 4 2) 7) 13:16 rudybot: didi: ; Value: (7 2) 13:17 samth: bremner: to run the Google Closure compiler 13:18 bremner: oh, right. 13:18 bremner: that's like 3 helpful answers in one day. I better stop. 13:19 didi: bremner: You've reached your daily quota. Now there will be only unhelpful, somewhat funny, answers. 13:20 bremner: /query rudybot 13:21 (quit) jeapostrophe: Ping timeout: 264 seconds 13:23 ijp: didi: I thought the racket gui library is mostly racket code 13:24 didi: ijp: I guess it depends on what you define as "mostly". On Linux, it uses GTK+. 13:27 samth: ijp: the racket part is all racket code 13:27 samth: but it uses system libraries (like GTK) 13:31 (join) dyoo 13:31 bremner: didi: I guess most people prefer native look and feel, at least on platforms where that is well defined. 13:31 (join) ijp` 13:33 dyoo: bremner: you had a question on whalesong? 13:34 dyoo: ah: it uses Java just so it can run Google Closure Compiler 13:34 didi: bremner: Oh, I'm not advocating for a change. I find the GUI library _very_ pleasant to use. I was just wondering. 13:34 dyoo: bremner: no other good reason for the Java dependency other than that. 13:34 (quit) ijp: Ping timeout: 256 seconds 13:35 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 13:35 dyoo: bremner: with regards to non-sexpr based languages: the bf tutorial I cooked up is the beginnings of that: http://hashcollision.org/brainfudge 13:36 dyoo: bremner: and I'm trying to address the parser part of the story with ragg: http://hashcollision.org/ragg 13:36 (join) jrslepak 13:37 ozzloy: https://gist.github.com/4489783 what's the right way to test a parser failure? 13:38 didi: bremner: But I've been finding that the "Look and Feel" argument is losing ground. 13:39 ozzloy: dyoo, oh cool! i saw that code on github recently and was wondering when ragg would be up and running 13:39 dyoo: ozzloy: looking at your example now. Also note that I have a json-lite example in ragg: https://github.com/dyoo/ragg/blob/master/ragg/test/test-baby-json.rkt 13:41 dyoo: ozzloy: yeah, I'm writing docs for Ragg now. I caught most of the lingering weird bugs with location last night, so as soon as the docs are cooked, I'll post onto planet2. 13:42 ozzloy: where is planet2? it looks like it's in beta 13:42 ozzloy: from the google search 13:42 ozzloy: dyoo, also awesome! re: baby json 13:45 samth: dyoo: post now! 13:45 samth: post early and often 13:45 dyoo: ok, I can do that, and then revise the planet2 link as I get the docs ready. Give me a sec... 13:47 bremner: dyoo: thanks. 13:48 bremner: didi: dunno, I just assume that windows and mac users will see things differently than I do and get on with life. 13:48 (join) mjs2600 13:54 (join) jonrafkind 13:56 (quit) hash_table: Ping timeout: 240 seconds 13:57 ozzloy: so ... what's wrong with the check-exn at the end of https://gist.github.com/4489783 ? 13:58 (nick) ijp` -> ijp 14:03 (join) francisl 14:04 dyoo: ozzloy: ok, so I'm looking at the code 14:04 ozzloy: \o/ 14:04 ozzloy: thanks! 14:04 dyoo: your error handler is not saying anything about "true is not valid at top level" 14:05 dyoo: do you want your error handler to raise a particular srcloc exception? 14:05 ozzloy: er... 14:05 ozzloy: i guess so? 14:05 dyoo: :) 14:05 dyoo: Give me a second. 14:05 ozzloy: oh! 14:05 ozzloy: i remember seeing .... 14:06 (join) hash_table 14:06 ozzloy goes to the example directory 14:08 (quit) karswell_: Remote host closed the connection 14:09 ozzloy: there, racket/collects/parser-tools/examples/read.rkt 14:11 dyoo: ozzloy: you could replace the body of your error handler with raise-read-error (from the syntax/readerr library), after which your error test should be happier 14:12 ozzloy: yeah, that's what's in the read.rkt example 14:12 ozzloy: i had read it a while ago 14:12 ozzloy: but not recently enough to recollect 14:12 dyoo: ozzloy: revised version of your code: https://gist.github.com/4495946 14:12 dyoo: where I have no idea what to fill in the "???" thing. :) 14:13 (join) Kaylin 14:13 ozzloy: read.rkt puts in source-name 14:14 ozzloy: which is an argument to the parser generator 14:14 dyoo: The error message is not quite accurate though: it's not just the case that we'll see this error when something's disallowed by the toplevel. It's more general: it's when the parse fails because the grammar doesn't fit. 14:14 (quit) Kaylin: Read error: Connection reset by peer 14:14 ozzloy: i think i'll just make the parse error message "parse error" 14:14 dyoo: yeah, unfortunately I think that's the best we can do at the moment 14:18 (join) karswell_ 14:19 (join) jeapostrophe 14:19 (quit) jeapostrophe: Changing host 14:19 (join) jeapostrophe 14:20 ozzloy: thanks dyoo ! 14:20 (join) gridaphobe 14:22 ozzloy: dyoo, so what if i wanted to collect all the problems with a json document? 14:23 dyoo: ozzloy: I don't believe the parsing framework provides a recovery mechanism 14:23 ozzloy: continue parsing after encountering an error, and keep a list of encountered errors (later that list will be used to highlight the errors) 14:23 ozzloy: oh 14:23 dyoo: ozzloy: so if you wanted to do something like that, you may need to add your own error productions into the grammar 14:24 dyoo: so that these "errors" can be collected during the parse. There might be a better way to do this, but I don't know of it yet 14:26 ozzloy: i saw something about recovery, but i didn't quite understand it... "If the parser encounters an error, after invoking the supplied error function, it will try to use error productions to continue parsing." 14:26 dyoo: really? Huh! Can you send a link? I can take a look as well 14:27 dyoo: ah, I see it in the docs. But I've never seen parser-tools/yacc do what this described. :) 14:29 ozzloy: i'm trying to find code that used error and had a note about continuing parses after an error 14:29 ozzloy: it's somewhere on the internets 14:29 ozzloy: i saw it! 14:30 didi: ozzloy: A fuzzy picture doesn't count. 14:30 ozzloy: http://git.racket-lang.org/plt/blob/HEAD:/collects/parser-tools/examples/calc.rkt 14:30 ozzloy: it's in the other example! 14:30 rudybot: http://tinyurl.com/as9w35s 14:31 ozzloy: thanks rudybot 14:31 dyoo: ah. 14:31 (join) mye 14:31 ozzloy: so you understand that? 14:31 dyoo: So if the production starts with the word "error", then it's an error production. That would have been nice to see in the documentation proper. 14:32 ozzloy: does that mean if i had something like "true{}" i'd get back an empty hash? 14:32 ozzloy: and an error message about "true" 14:32 dyoo: I think so 14:33 ozzloy: assuming my parser was working and stuff 14:33 dyoo: But you have to make sure your error handler doesn't actually raise an exception, so that the parser knows to continue marching forward then. 14:33 ozzloy: right, i thought so 14:41 (quit) netrino: Ping timeout: 255 seconds 14:45 (quit) Demosthenex: Ping timeout: 245 seconds 14:54 ozzloy: http://docs.racket-lang.org/parser-tools/Parsers.html says "If it cannot, it raises exn:fail:read." so i thought i didn't actually need to raise that in my error handler 14:56 (join) Kaylin 14:58 (join) bro_grammer 15:02 (quit) hash_table: Ping timeout: 256 seconds 15:09 didi: rudybot: Give dyoo some cookie points for Rickrolling me with syntax rules. 15:09 rudybot: didi: error: reference to an identifier before its definition: some in module: 'program 15:10 (quit) Nisstyre: Ping timeout: 260 seconds 15:17 (quit) karswell_: Remote host closed the connection 15:19 (quit) myx: Ping timeout: 256 seconds 15:24 (join) Nisstyre 15:27 (join) karswell_ 15:27 (quit) kofno: Read error: Connection reset by peer 15:28 (join) ijp` 15:28 (join) kofno 15:33 (nick) ijp` -> ijp 15:34 dyoo: didi: :) 15:41 (join) Nisstyre-laptop 15:41 (quit) bro_grammer: Ping timeout: 240 seconds 15:43 samth: dyoo: where is this rickroll? 15:45 (quit) dyoo: Ping timeout: 252 seconds 15:46 (join) dyoo 15:46 dyoo: samth: sorry, got disconnected for a moment. It's at the beginning of the bf tutorial, where while loops are defined 15:47 samth: dyoo: ah, i remember that 15:49 (quit) Kaylin: Quit: Leaving. 15:49 dyoo: Does the ragg informal quickstart at the beginning of http://hashcollision.org/ragg/ read ok? I'm always worried that what makes sense to me might be completely alien to other people. 15:52 (quit) jonrafkind: Ping timeout: 276 seconds 15:55 chandler: dyoo: Perfect sense to me. 15:55 chandler: Is this on PLaneT now? 15:55 (quit) Nisstyre-laptop: Remote host closed the connection 15:56 chandler: (Doesn't seem so.) 15:56 dyoo: chandler: yes, it's on PLaneT2 at the moment, since I'm depending on it being a collection 15:56 dyoo: not on PLaneT1 yet 15:56 chandler: Ah. 15:57 dyoo: I think I'll make a .plt collection for people who want to use it on 5.3.1. Not yet though: I need to finish documentation first. 15:57 dyoo: Need to get section 2 in shape, because it's not immediately clear why having it return syntax objects is a good thing 15:57 chandler: It isn't? 15:58 dyoo: It's a _good thing_, but if it were obvious, someone would have already done it, right? :) 15:59 chandler: ... provided a sufficiently large set of someones, yes. I don't think the set of racket programmers is sufficiently large yet. :-) 16:01 dyoo: chandler: yeah. The current plan is to have section 2 show how to use syntax-parse to take the output for simple line drawings and interpret it, and then go further and make a #lang out of it. That way, we have a good, simple example that's obviously not s-expression based. And it's real: it comes directly from a Stack Overflow question from a few months ago. 16:01 (join) Kaylin 16:06 (quit) mjs2600: Ping timeout: 246 seconds 16:06 (quit) klr_: Quit: Lost terminal 16:09 (quit) francisl: Quit: francisl 16:09 chandler: dyoo: Sounds like a good plan to me! 16:10 (quit) ormaaj: Ping timeout: 252 seconds 16:10 (join) jonrafkind 16:12 (join) mizu_no_oto 16:12 (quit) Nisstyre: Ping timeout: 240 seconds 16:25 (join) ormaaj 16:27 (join) Nisstyre 16:35 (quit) Kaylin: Quit: Leaving. 16:54 (join) Kaylin 17:04 (quit) MayDaniel: Read error: Connection reset by peer 17:07 (quit) Kaylin: Ping timeout: 252 seconds 17:09 (quit) kofno: Remote host closed the connection 17:13 (quit) dca: Quit: ZNC - http://znc.in 17:13 (join) dca 17:15 (quit) Aune: Quit: L?mnar 17:19 (quit) karswell_: Remote host closed the connection 17:19 (quit) dca: Quit: ZNC - http://znc.in 17:19 (join) dca 17:23 (join) mjs2600 17:29 (join) karswell_ 17:30 (quit) dca: Quit: ZNC - http://znc.in 17:30 (join) dca 17:34 (quit) dca: Client Quit 17:34 (join) dca 17:41 (quit) karswell_: Remote host closed the connection 17:42 (quit) LnL: Quit: LnL 17:51 (join) kofno 17:51 (join) karswell_ 17:52 (quit) mye: Quit: mye 17:52 (quit) dca: Quit: ZNC - http://znc.in 17:53 (join) dca 17:54 (quit) jeapostrophe: Ping timeout: 244 seconds 18:00 (quit) dca: Quit: ZNC - http://znc.in 18:03 (join) dca 18:03 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 18:10 (quit) dca: Quit: ZNC - http://znc.in 18:11 (quit) cdidd: Remote host closed the connection 18:11 (join) dca 18:13 (join) RacketCommitBot 18:13 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/bpMZEA 18:13 RacketCommitBot: racket/master f577b49 Asumu Takikawa: Fix polydots... 18:13 RacketCommitBot: racket/master c5c6280 Asumu Takikawa: Change exception predicate for a test... 18:13 (part) RacketCommitBot 18:26 (quit) didi: Ping timeout: 240 seconds 18:30 (quit) jrslepak: Quit: What happened to Systems A through E? 18:34 (join) akenisuto 18:35 (quit) mjs2600: Ping timeout: 256 seconds 18:35 (join) serhart 19:02 (quit) kofno: Remote host closed the connection 19:15 (quit) Fare: Ping timeout: 245 seconds 19:16 (join) dnolen 19:19 (quit) acarrico: Read error: Operation timed out 19:26 (join) netrino 19:27 (join) nathanpc 19:28 dyoo: chandler: whew. Section 2 of the ragg docs is sorta done. 19:29 jonrafkind: do you really think 'ragg' is a good name 19:29 dyoo: It's short, and might make for puns. "Cleaning a ragg." "Making a ragg doll." 19:30 jonrafkind: it sounds disgusting to me 19:30 dyoo: :( really? 19:30 nathanpc: sorry for asking, but what's ragg? 19:30 jonrafkind: ya 19:30 nathanpc: a Racket project? 19:30 dyoo: nathanpc: http://hashcollision.org/ragg 19:30 nathanpc: hmm 19:31 dyoo: It's a project I'm in the middle of polishing for release 19:31 dyoo: I'm trying to get the docs ready. 19:31 nathanpc: oh nice 19:31 nathanpc: congratulations and good luck. 19:31 dyoo: if you have comments, please feel free to send them my way 19:31 chandler: dyoo: Why do you name the syntax transformers `compile-foo'? 19:32 dyoo: chandler: to parallel the construction of 'interpret-foo' in the last subsection 19:32 dyoo: the code there is intentionally meant to echo what the reader just saw 19:32 chandler: Heh, I wasn't really sure what the reason for the whole interpreter exercise was for. 19:33 dyoo: part of it is to fight the mistake that I've seen a few people make, to think that syntax-parse _has_ to be used with syntax transformers 19:34 (quit) bitonic: Ping timeout: 246 seconds 19:36 (join) acarrico 19:39 chandler: dyoo: Just out of curiosity, why replicate line/column/offset/span in your token struct instead of just having the struct wrap a syntax object? 19:39 chandler: dyoo: ... or maybe even just having tokens *be* syntax objects with particular properties? 19:40 dyoo: implementation detail. I wanted to be able to easily distiguish token values, and for that, I like having my own structure whose predicate I can trust. 19:42 dyoo: chandler: it might be a bad decision, frankly. I'll think about that a little more. 19:42 (join) Demosthenex 19:44 (join) jeapostrophe 19:44 (quit) jeapostrophe: Changing host 19:44 (join) jeapostrophe 19:45 chandler: dyoo: That seems reasonable, especially since you'd still want to have a `token' constructor that takes the token class and value. But it might be nice for it just to be a two-argument function that takes a class and a syntax object and returns a wrapper struct. 19:48 (join) jamessan 19:49 (join) didi 19:52 (quit) jonrafkind: Ping timeout: 256 seconds 19:53 (quit) Demosthenex: Ping timeout: 255 seconds 19:55 (join) Demosthenex 20:02 (quit) jeapostrophe: Ping timeout: 248 seconds 20:20 (quit) dyoo: Quit: dyoo 20:24 (join) kofno 20:33 (join) mizu_no_oto 20:40 (join) Kaylin 20:42 (quit) didi: Remote host closed the connection 20:50 (quit) notdan: Ping timeout: 260 seconds 20:50 (quit) Nisstyre: Ping timeout: 248 seconds 20:50 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:50 (quit) akenisuto: Remote host closed the connection 20:52 (join) notdan 20:56 (quit) notdan: Remote host closed the connection 20:57 (join) notdan 21:02 (quit) notdan: Ping timeout: 246 seconds 21:03 (join) notdan 21:08 (quit) notdan: Remote host closed the connection 21:09 (join) didi 21:10 (join) notdan 21:15 (quit) notdan: Remote host closed the connection 21:15 (join) Nisstyre 21:17 (join) notdan 21:21 (quit) notdan: Remote host closed the connection 21:22 (join) notdan 21:26 (quit) gridaphobe: Ping timeout: 240 seconds 21:27 (quit) notdan: Remote host closed the connection 21:28 (join) notdan 21:32 (quit) notdan: Ping timeout: 252 seconds 21:34 (join) RacketCommitBot 21:34 RacketCommitBot: [racket] plt pushed 5 new commits to master: http://git.io/yHDSSw 21:34 RacketCommitBot: racket/master 4d3a5ba Greg Hendershott: Use Racket lexer for code blocks.... 21:34 RacketCommitBot: racket/master 5ab048b Matthew Flatt: scribble/decode: fix contract on `decode-compound-paragraph'... 21:34 RacketCommitBot: racket/master 5134bc0 Matthew Flatt: scribble doc corrections... 21:34 (part) RacketCommitBot 21:35 (join) jrslepak 21:36 (join) notdan 21:41 (quit) notdan: Remote host closed the connection 21:41 (join) sw2wolf 21:41 (join) notdan 21:46 (join) mizu_no_oto 21:46 (quit) notdan: Ping timeout: 244 seconds 21:50 (quit) mceier: Quit: leaving 21:52 (join) notdan 21:52 (join) Fare 21:57 (quit) notdan: Ping timeout: 264 seconds 22:03 (join) notdan 22:08 (quit) notdan: Remote host closed the connection 22:09 (join) notdan 22:21 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 22:31 (join) jeapostrophe 22:31 (quit) jeapostrophe: Changing host 22:31 (join) jeapostrophe 22:39 (join) mizu_no_oto 22:43 (join) jonrafkind 22:47 (quit) jeapostrophe: Ping timeout: 256 seconds 22:57 (quit) nathanpc: Quit: Computer has gone to sleep. 23:02 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 23:10 (quit) Kaylin: Read error: Connection reset by peer 23:18 (quit) didi: Ping timeout: 255 seconds 23:41 (join) ambrosebs 23:42 (join) Kaylin 23:52 (quit) tilde`: Ping timeout: 276 seconds