00:01 (join) cdidd 00:14 (quit) jao: Ping timeout: 264 seconds 00:17 (join) kvda 00:24 (quit) brum: Remote host closed the connection 00:24 (join) rmathews 00:25 (join) ASau 00:26 (quit) dsantiago: Ping timeout: 260 seconds 00:29 (join) dsantiago 00:32 (join) Kaylin 00:35 (join) ambrosebs 00:35 (quit) vipjun: 00:36 (quit) cdidd: Read error: Connection reset by peer 00:41 (join) cdidd 00:56 eli: rudybot: later tell someone something 00:56 rudybot: eli: Thank bpalmer: I'll work with it, will come back later if more questions 00:57 eli: cky: I don't think that offby1 implemented the later tell thing. 00:57 eli: cky: As for that minesweeper code, it's *ancient*... 00:59 eli: stamourv: That code-ayatollah thing is something I use for checking students (in the early homework), but I posted it hoping that someone would extend it and make it more generally applicable. (There's no reason for it to be better for students, other than the particular set of checks that I made it do.) 01:00 eli: bremner: Did you do some quick racket+etc tutorial in your class? 01:00 eli: asumu: ping 01:11 (quit) sirdancealot: Quit: ragequit 01:12 (join) cantcode 01:12 eli: So everybody's dead? 01:16 (part) eli: "*sigh*" 01:16 (join) eli 01:16 eli sighs 01:19 (join) asvil 01:22 (join) brum 01:27 (quit) brum: Ping timeout: 272 seconds 01:31 jonrafkind heaves 01:31 (quit) yacks: Remote host closed the connection 01:32 (quit) mceier: Quit: leaving 01:33 (join) yacks 01:40 (join) basdirks 01:50 (join) RacketCommitBot 01:50 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/1R_lSg 01:50 RacketCommitBot: racket/master b84a7bc Eli Barzilay: Fix typo in `string-replace' keyword name. 01:50 (part) RacketCommitBot 02:00 (quit) rmathews: Quit: ... 02:06 (quit) basdirks: Ping timeout: 255 seconds 02:23 (join) brum 02:23 (join) jao 02:24 (quit) jao: Changing host 02:24 (join) jao 02:28 (quit) brum: Ping timeout: 272 seconds 02:47 (join) rohni 02:53 (quit) crundar: Quit: Leaving 02:56 (quit) jonrafkind: Ping timeout: 276 seconds 02:57 (join) mceier 03:06 (quit) ivan`: Ping timeout: 248 seconds 03:08 (quit) Kaylin: Quit: Leaving. 03:08 (join) ivan` 03:13 (join) rmathews 03:13 (quit) ASau: Excess Flood 03:13 (join) soegaard 03:20 (quit) gridaphobe: Remote host closed the connection 03:31 (join) basdirks 03:33 (quit) ambrosebs: Remote host closed the connection 03:33 (quit) rmathews: Ping timeout: 272 seconds 03:34 (join) gridaphobe 03:37 (join) rmathews 03:41 (join) tilde` 03:46 (join) rmathews_ 03:47 (quit) rmathews: Ping timeout: 276 seconds 03:47 (nick) rmathews_ -> rmathews 03:47 (quit) gridaphobe: Remote host closed the connection 03:49 (quit) tilde`: Quit: kthxbai 03:49 (quit) bjz: Quit: Bye! 03:49 (join) hkBst 03:50 (join) RacketCommitBot 03:50 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/4-Q5zg 03:50 RacketCommitBot: racket/master ca304aa Eli Barzilay: New Racket version 5.3.3.7. 03:50 (part) RacketCommitBot 03:52 (join) bjz 03:54 (quit) hkBst: Remote host closed the connection 03:54 (join) hkBst 03:54 (quit) hkBst: Changing host 03:54 (join) hkBst 04:15 (join) egnarts-ms 04:18 (join) gridaphobe 04:22 egnarts-ms: in Racket reference, it is noted that if "in-list", "in-range", etc. sequence functions appear directly in "for" iteration clause, this may increase performance 04:22 egnarts-ms: i guess this is because those identifiers have compile-time (phase 1) bindings ? 04:23 (quit) soegaard: Quit: soegaard 04:23 egnarts-ms: and syntax transformer of "for" can figure out something (at compile time) 04:24 mithos28: egnarts-ms: Sorta, they don't have phase1 bindings but phase1 looks at the phase0 bindings 04:27 (quit) gridaphobe: Ping timeout: 276 seconds 04:27 egnarts-ms: mithos28: this means that there's no way for Racket programmer to describe some sequence in phase 1 terms, right ? 04:28 mithos28: egnarts-ms: I'm not sure what you are asking. 04:29 mithos28: you could bring in racket/sequence at phase1 and use them there, but that is totally seperate from using it at phase 0 04:29 egnarts-ms: mithos28: i mean, by telling at compile time how to iterate vs. figuring out everything at run-time (AFAIU, as by using make-do-sequence, which is a run-time generator of sequences) 04:30 egnarts-ms: mithos28: for example, i wanna iterate through naturals like this: 1, n, 2, n-1, 3, n-2, etc. 04:30 (quit) hkBst: Ping timeout: 246 seconds 04:31 mithos28: you can use define-sequence-syntax 04:31 mithos28: which is how the built in ones are implemented 04:31 (join) caterpillarsandw 04:32 (quit) kvda: Quit: z____z 04:34 (join) finishingmove 04:34 (part) finishingmove 04:34 egnarts-ms: mithos28: ah, thank you for pointing to this.. Racket contains really a lot of stuff :) 04:34 (join) hkBst 04:36 (quit) racycle: Quit: racycle 04:36 caterpillarsandw: I get this error when I try to (load) a file: "#%top-interaction: unbound identifier;". Any idea how to fix it? 04:37 mithos28: caterpillarsandw: Don't use load, and save yourself a ton of pain 04:37 caterpillarsandw: Why? There aren't really any other alternatives when writing r5rs-compliant code. 04:38 (join) bitonic 04:38 mithos28: to solve the current issue you need to bind #%top-interaction 04:38 mithos28: #lang r5rs? 04:39 caterpillarsandw: Yeah, I'm using that. 04:40 mithos28: and what is the issue? 04:40 mithos28: You are loading code from that file? 04:41 caterpillarsandw: Well, I have a file written in r5rs from a library I wrote, and I'm trying to load it with drracket. Only the code that's trying to load it has the "#lang r5rs" line. 04:42 mithos28: Did you read the warning about loading on the page that describes r5rs 04:42 mithos28: #lang r5rs* 04:42 mithos28: load works the way you would expect it to in racket not r5rs 04:43 caterpillarsandw: I haven't, but I'll check it out now. 04:43 mithos28: You probably don't want #lang r5rs 04:43 mithos28: you probably want to write module free code 04:44 mithos28: so just 'racket -l r5rs/init -f ' 04:45 mithos28: without a #lang r5rs 04:46 mithos28: I would not recommend writing such code, but if you are using an existing library it should work 04:49 caterpillarsandw: That seems to work. Thanks. 05:02 asvil: it seems that last racket commit fails on tests/racket/optimize.rktl 05:03 (quit) jao: Ping timeout: 272 seconds 05:21 (quit) neilv: Ping timeout: 264 seconds 05:24 (quit) caterpillarsandw: Quit: Lost terminal 05:25 (join) brum 05:30 (quit) brum: Ping timeout: 272 seconds 05:34 (quit) rohni: Quit: Leaving. 05:39 basdirks: In Haskell when we create a variation of a function we usually temporarily rename it by appending a single quote 05:39 basdirks: f, f' 05:39 basdirks: what's the convention in racket/scheme? 05:51 hkBst: basdirks: a * can be used, though it's a weak convention 05:51 hkBst: weak, because it also carries the connotation of repetition 05:51 hkBst: as in let let* 05:52 basdirks: yeh 05:52 hkBst: basdirks: most alphanumerics are available for use in identifiers though 06:07 (join) rohni 06:17 (join) zacts 06:19 (join) vkz 06:32 (quit) merijn: Ping timeout: 248 seconds 06:35 (quit) egnarts-ms: Ping timeout: 245 seconds 06:36 asvil: sorry, optimize.rktl fails only on racketcgc 06:38 (join) ambrosebs 06:51 (join) noelw 07:15 (join) jeapostrophe 07:26 (quit) yacks: Ping timeout: 264 seconds 07:26 bremner: asvil: as part of the normal build process? 07:27 asvil: bremner: no, tests do not run as part of build process 07:27 (quit) ambrosebs: Remote host closed the connection 07:27 bremner: oh, ok. 07:27 asvil: I use tests for keeping my racket changes valid 07:28 (join) ambrosebs 07:28 (join) basdirks_ 07:29 (join) yacks 07:31 (join) mceier_ 07:31 (join) m4burns_ 07:33 (quit) mceier: Disconnected by services 07:33 (nick) mceier_ -> mceier 07:35 (quit) basdirks: *.net *.split 07:35 (quit) m4burns: *.net *.split 07:50 (quit) rohni: Quit: Leaving. 08:10 (join) brum 08:12 (join) RacketCommitBot 08:12 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/BXGjFQ 08:12 RacketCommitBot: racket/master 8a08cfc Robby Findler: adjust plai test suite tests to check the ports that things now go to 08:12 (part) RacketCommitBot 08:13 (join) mizu_no_oto 08:14 (join) didi` 08:15 (nick) didi` -> didi 08:15 (quit) noelw: Ping timeout: 255 seconds 08:19 (quit) hkBst: Remote host closed the connection 08:19 (join) hkBst 08:21 (join) jeapostr1phe 08:25 (quit) hkBst: Read error: Connection reset by peer 08:28 (join) hkBst_ 08:28 (quit) hkBst_: Changing host 08:28 (join) hkBst_ 08:30 (quit) jeapostr1phe: Ping timeout: 264 seconds 08:31 (quit) bitonic: Ping timeout: 240 seconds 08:36 (quit) brum: Remote host closed the connection 08:39 (join) rmathews 08:54 (join) RacketCommitBot 08:54 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/q2LJrQ 08:54 RacketCommitBot: racket/master 7734966 Matthew Flatt: `equal?' hashing: shortcut and some caching for structure transparency 08:54 RacketCommitBot: racket/master 7a8c2ff Matthew Flatt: improve complexity of `hash-iterate-{key,value}'... 08:54 RacketCommitBot: racket/master 39aafe3 Matthew Flatt: change `eq?' hashing to avoid dropping the low bit for fixnums 08:54 (part) RacketCommitBot 08:55 (join) ambroseb_ 08:59 (quit) ambrosebs: Ping timeout: 264 seconds 08:59 (join) vkz_ 09:00 (quit) rmathews: Read error: Connection reset by peer 09:00 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:01 (quit) vkz: Ping timeout: 272 seconds 09:01 (nick) vkz_ -> vkz 09:05 (join) carleastlund 09:05 (join) rmathews 09:11 (quit) ambroseb_: Remote host closed the connection 09:14 (join) brum 09:14 (join) mizu_no_oto 09:15 (quit) bjz: Read error: Connection reset by peer 09:19 (quit) brum: Ping timeout: 244 seconds 09:23 asumu: eli: pong 09:25 (join) bitonic 09:30 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:35 eli: asumu: Your change was too simplistic. 09:36 eli: The problem is that you made the LHS column also specified with a negative margin, so on a narrow screen it would get out of view with no way of scrolling left to it. 09:37 eli: It took me some time but I managed to get around this by adding a container around the whole thing with the right overall size. (And you can see that in newdocs.racket-lang.org now.) 09:39 eli: As for the ,rr vs ,r -- the former uses a table etc, so it's not going through the usual channels of things like `only-in', and I don't think that there's a way to make it work. 09:39 eli: And re the zazzle thing -- I don't know if it should be up on the page, maybe that's a point to raise on the list, or something. 09:44 asumu: eli: oh okay. The version on newdocs looks good, though it's kinda weird that the "version-specific listing" box is now just empty. 09:45 eli: Yeah, that's actually a bug. 09:45 eli: There's a div with a `hide_when_on_the_web' class around the text, but the whole thing is inside a

, so the line is still there. 09:46 eli: I'll get rid of it too, though it makes the whole hide_when_on_the_web thing redundant... 09:47 asumu: Also I wonder if having "Racket documentation" on the web version is redundant. 09:47 asumu: Given that you have a Racket banner and you're on the documentation tab. 09:50 eli: I think that that's fine. 09:50 eli: It's like "Resources for learning" or a button that says "download" on the respective pages. 09:51 asumu: I suppose so. 09:51 asumu: eli: also for the ,rr thing, I wasn't actually wanting to use `only-in` and such. I just wanted to be able to do ,rr "foo.rkt" 09:52 eli: That should work, no? 09:52 asumu: It doesn't seem to, but maybe I'm doing something wrong. 09:52 eli: If it works with ,en then it should work with ,rr too. 09:54 asumu: Oh, nevermind, it works on another machine. 09:54 asumu: Maybe the racket on this machine is out of date. 09:54 eli happily ignores it... 09:58 cky: eli: :-) (Re minesweeper, and yeah, I know rudybot doesn't really have later tell, but maybe soegaard is watching logs. I guess now. :-P) 09:58 cky: eli: BTW, what do you think of this? https://github.com/cky/racket/commit/3f2bcc442f8827ab14fbd8a34c9e20e010c05dda 09:58 rudybot: ?? 09:58 cky: eli: If it looks good to you, I'll send a formal pull request (or however you guys take patches). 10:01 eli: cky: Looks fine -- you tried+tested it, I assume? 10:01 eli: IOW, it's pull-ready, right? 10:01 (quit) asvil: Ping timeout: 272 seconds 10:03 cky: Yes, I've tested the code in http://stackoverflow.com/a/15109732/13 with it, both using #lang racket and #lang mzscheme. 10:04 (join) vkz 10:04 cky: If there are more things you think would be good to test, I can do that too. 10:06 (join) RacketCommitBot 10:06 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/XBLKcQ 10:06 RacketCommitBot: racket/master 9e93ee2 Chris K. Jester-Young: Convert srfi/61/cond to use modern module style.... 10:06 (part) RacketCommitBot 10:06 eli: cky: I think that's fine -- of course, if you want to contribute tests, then lots of srfis need more of them... 10:07 cky: I'll see what I can do, when I find the time. Meanwhile, thanks for the push. :-) 10:14 (join) brum 10:19 (quit) brum: Ping timeout: 264 seconds 10:21 (join) mizu_no_oto 10:26 (join) ambrosebs 10:36 (join) anRch 10:38 (join) gridaphobe 10:46 stamourv: mithos28: ping 10:50 (quit) Fare: Ping timeout: 246 seconds 10:55 (join) soegaard 10:59 (join) Kaylin 11:00 (quit) hkBst_: Quit: Konversation terminated! 11:01 cky: soegaard: You could use something like (define log2 (let ((invlog2 (/ (log 2)))) (lambda (x) (* (log x) invlog2))), but I don't think there's anything offering access to the x87 instruction for doing log2. 11:01 soegaard: Thanks 11:02 soegaard: I think I asked the wrong question. 11:02 soegaard: I was wondering why the "#lang r6rs" log takes 2 arguments and the racket one only one. 11:03 soegaard: I hope the optimzer lifts (log 2) automatically. Hmm. How can one check? 11:07 cky: I don't know. It's not like Racket has C++11 constexpr. ;-) 11:08 (join) jbclements 11:09 cky: soegaard: (eval `(define (log2 x) (* (log x) ,(/ (log 2))))) 11:09 cky: :-P 11:15 (join) brum 11:15 stamourv: soegaard: I'm pretty sure the Racket compiler would do that constant folding. 11:15 stamourv: To check, you can use raco decompile. 11:16 soegaard: stamourv: It does. I was just reading: http://docs.racket-lang.org/guide/performance.html 11:16 stamourv: Sadly, Optimization Coach doesn't report constant folding. Yet. :) 11:17 soegaard: cky: One of my favorite macro examples is define-constant. 11:17 soegaard: It is simplest macro I know that requires propgation of information in phase 1. 11:18 (quit) gridaphobe: Remote host closed the connection 11:18 (join) racycle 11:18 jbclements: rudybot: (for/sum ([i (in-range 1 1000)]) (/ 1 (sub1 (* 16 i i)))) 11:18 rudybot: jbclements: ; Value: 17428995982264011561162753415045345557728673910110907923451497974323927849609273608691673439998115825521790947205849074016472121433155960641958756492178165309577634724654424336300174523215089989974869313697003321037968938556532468410502533008154135115350210472139996595249644360678674922107018271840252586347456237355167652389964149972213893317964149222669208840782301669917262459334421699320780738194998694 11:20 jbclements: rudybot: (exact->inexact (for/sum ([i (in-range 1 1000)]) (/ 1 (sub1 (* 16 i i))))) 11:20 rudybot: jbclements: ; Value: 0.10723838703955514 11:20 (quit) brum: Ping timeout: 264 seconds 11:21 jbclements: can any math-folks here point me toward an analytic solution to the sum of the infinite series whose first 1K terms rudybot just summed for me? That is, sumof 1/16i^2 -1…. A wikipedia reference would be just dandy. 11:24 (quit) ambrosebs: Remote host closed the connection 11:24 (quit) basdirks_: Ping timeout: 256 seconds 11:29 (join) neilv 11:32 soegaard: jbclements: Plouffe's inverter is usally the place to go: http://pi.lacim.uqam.ca/ 11:32 (join) Fare 11:32 jbclements: soegaard: thanks! 11:32 soegaard: It seems there is something wrong today though... 11:38 soegaard: jbclements: Wolfram Alpha can also find closed forms: http://www.wolframalpha.com/input/?i=0.10723838703955514 11:40 soegaard: (4-pi)/8 ? 11:41 soegaard: http://www.wolframalpha.com/input/?i=sum+1%2F%2816n%5E2-1%29+from+1+to+infinity 11:41 rudybot: http://tinyurl.com/c9cm9cf 11:41 jbclements: soegaard: thanks! Wolfram alpha is … amazing. 11:42 (quit) anRch: Quit: anRch 11:45 soegaard: I think your problem is solved by the Wilf-Zeilberger algorithm. If you are interested the A=B book is amazing. http://www.math.upenn.edu/~wilf/AeqB.html 11:45 (join) bitonic` 11:46 (quit) bitonic: Read error: Connection reset by peer 11:46 (join) basdirks 11:47 (quit) Fare: Ping timeout: 264 seconds 11:49 (join) ryan_ 11:49 jbclements: soegaard: thanks, you've just *completely* distracted me from my work…. my fault entirely, I suppose. :) 11:49 soegaard: :-) 11:54 soegaard: The A=B book is a really good read for anyone interested in computer algebra. 11:57 (quit) basdirks: Ping timeout: 264 seconds 12:01 (join) cnonim 12:01 cnonim: how i cant print syntax object? 12:03 soegaard: cnonim: I use display in DrRacket. Then I click the little triangle to see the contents. 12:04 cnonim: ups, not noticed 12:07 (join) RacketCommitBot 12:07 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/K8c8eg 12:07 RacketCommitBot: racket/master 2236363 Matthew Flatt: fix bug in hashing shortcut for transparency 12:07 (part) RacketCommitBot 12:09 cnonim: drracket can select s-expr quickly? 12:10 bremner: cnonim: select how? like destructure? maybe look at match 12:10 soegaard: shift + alt + arraows 12:10 bremner: oh, sorry, I missed "dr" ;) 12:12 cnonim: thx, guys ;) it's cool 12:13 cnonim: may be drracket can change type of bracket? example from '()' to '[]' 12:15 cnonim: or remove parenthesis? example have [(...long...)] how i can remove () 12:15 (join) brum 12:17 (join) RacketCommitBot 12:17 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/5790667054568994d61c366b394be7deba28ce9a 12:17 RacketCommitBot: racket/master 5790667 Asumu Takikawa: Remove duplicate non-terminals in `define-extended-language`... 12:17 (part) RacketCommitBot 12:17 soegaard: You can find the keybindings in the edit menu. 12:20 (quit) brum: Ping timeout: 248 seconds 12:21 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 12:24 (join) mceier 12:24 soegaard: cnonim: ctrl+c ctrl+e 12:25 (quit) Kaylin: Quit: Leaving. 12:27 (join) basdirks 12:30 (nick) m4burns_ -> m4burns 12:46 (join) ASau 12:54 (quit) cnonim: Ping timeout: 255 seconds 12:59 (quit) neilv: Quit: Leaving 12:59 (join) jonrafkind 13:04 (quit) jeapostrophe: Ping timeout: 272 seconds 13:05 (join) jeapostrophe 13:07 (quit) bitonic`: Remote host closed the connection 13:07 (join) bitonic` 13:08 (join) mizu_no_oto 13:08 (join) Fare 13:09 (nick) Fare -> Guest58449 13:15 (join) rmathews_ 13:16 (quit) rmathews: Ping timeout: 264 seconds 13:16 (nick) rmathews_ -> rmathews 13:16 (join) brum 13:19 (quit) zacts: Quit: ERC Version 5.3 (IRC client for Emacs) 13:21 (quit) brum: Ping timeout: 248 seconds 13:21 (join) zacts 13:22 (quit) yacks: Read error: Connection reset by peer 13:35 (join) rmathews 13:39 (join) rmathews_ 13:40 (quit) rmathews: Ping timeout: 264 seconds 13:40 (nick) rmathews_ -> rmathews 13:48 (quit) whoops: Quit: Farewell 13:51 (quit) soegaard: Quit: soegaard 13:55 (join) whoops 13:59 (join) Guest52818 13:59 (quit) Guest52818: Changing host 13:59 (join) Guest52818 13:59 (quit) jeapostrophe: Ping timeout: 244 seconds 13:59 (quit) vkz: Quit: vkz 14:07 (join) vkz 14:09 (join) cnonim 14:16 (join) brum 14:21 (quit) brum: Ping timeout: 246 seconds 14:22 (join) didi 14:31 (join) merijn 14:38 cnonim: how in drracket find only words? 14:39 cnonim: example match next and not match next-result 14:39 cnonim: or regexp search may be 14:42 (join) soegaard 14:43 (quit) vkz: Quit: vkz 14:43 (join) RacketCommitBot 14:43 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/i9viHA 14:43 RacketCommitBot: racket/master 542c38e Matthew Flatt: equality: struct transparency and inspector shortcuts and caching... 14:43 RacketCommitBot: racket/master ca43204 Matthew Flatt: fix missing initialization of cached inspector reference... 14:43 (part) RacketCommitBot 14:54 (join) dauterive 14:57 (join) vkz 14:57 (quit) vkz: Client Quit 15:01 (join) jeapostrophe 15:01 (quit) jeapostrophe: Changing host 15:01 (join) jeapostrophe 15:08 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 15:09 (join) RacketCommitBot 15:09 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/m48WdA 15:09 RacketCommitBot: racket/master 43912be Asumu Takikawa: Some tweaks for Guide section 4 15:09 RacketCommitBot: racket/master 48d0677 Asumu Takikawa: Improve Guide section 5 15:09 RacketCommitBot: racket/master 2065c82 Asumu Takikawa: Guide chapter 6 tweaks 15:09 (part) RacketCommitBot 15:11 (join) RacketCommitBot 15:11 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/W7hHRw 15:11 RacketCommitBot: racket/master 5e9d1ce Eli Barzilay: Use the `not-on-the-web' style *around* the installation comment.... 15:11 (part) RacketCommitBot 15:13 (join) fasta 15:14 (join) mizu_no_oto 15:17 (join) brum 15:21 (quit) brum: Ping timeout: 248 seconds 15:23 (quit) cdidd: Remote host closed the connection 15:23 (join) dyoo 15:26 (quit) jbclements: Quit: jbclements 15:38 (quit) bitonic`: Remote host closed the connection 15:39 (join) BW^- 15:39 BW^-: hi guys - in this file, 15:39 BW^-: http://planet.plt-scheme.org/package-source/dherman/json.plt/4/0/main.rkt 15:40 BW^-: can you Please explain to me exactly how |for/haseq| in the |for/hasheq| procedure works? 15:40 BW^-: for/hasheq! 15:40 (join) gridaphobe 15:41 BW^-: isolated here: http://pastebin.ca/2326800 15:41 BW^-: soo, the for/hasheq has three arguments, at first the something-like "loop iterator" code, 15:41 BW^-: ([(key value) 15:41 BW^-: ... 15:41 BW^-: (values (string->symbol key) value)))) 15:41 BW^-: (lambda (port) 15:41 BW^-: (eq? (peek-char port) #\})))]) 15:41 BW^-: that one i understand 15:42 BW^-: but, how does the second and third arg to for/hasheq fit together? 15:42 stamourv: BW^-: `for/hasheq' iterates over a number of sequences, and returns an eq? hash-table. 15:42 BW^-: when are they invoked and of what effect are they? 15:42 stamourv: Let me show you an example. 15:42 stamourv: rudybot: init racjet 15:42 rudybot: stamourv: error: racjet: standard-module-name-resolver: collection not found collection: "racjet" in collection directories: /mnt/racket-5.3.2/collects in: racjet 15:42 stamourv: rudybot: init racket 15:42 rudybot: stamourv: your sandbox is ready 15:42 BW^-: stamourv: i'm trying to port it to gambit 15:43 stamourv: rudybot: (for/hasheq ([i (in-range 3)] [x (in-list '(a b c))]) (values i x)) 15:43 rudybot: stamourv: ; Value: #hasheq((1 . b) (0 . a) (2 . c)) 15:43 BW^-: stamourv: i ported all the rest to gambit but this little piece remains. 15:43 (quit) jonrafkind: Ping timeout: 248 seconds 15:43 BW^-: stamourv: right, great, i get that 15:43 BW^-: stamourv: now what about for/haseq:s second and third args?? 15:43 BW^-: i get completely lost on those two! 15:44 stamourv: There are not really arguments, `for/haseq' is not a function. 15:44 BW^-: yeah but a form or macro right 15:44 stamourv: Anything beyond the first subform (the sequences you're iterating over) is just part of the body. 15:44 BW^-: how would you call arguments to a macro? 15:44 stamourv: I'd call them subforms. 15:44 BW^-: aha 15:45 stamourv: `for/hasheq' contains an implicit begin for its body. 15:45 BW^-: oh really, so these are part of the body?: 15:45 BW^-: (when (eq? (peek-char port) #\,) 15:45 BW^-: (read-char port)) 15:45 BW^-: (skip-whitespace port) 15:45 BW^-: (values key value)) 15:45 stamourv: Yes. 15:45 BW^-: i.e. rows 19-22 15:45 BW^-: hmm 15:45 BW^-: but it doesn't make sense! )= 15:45 BW^-: =) 15:45 BW^-: so 15:45 BW^-: the input that this procedure takes 15:45 BW^-: is traversing over a JSON hashtable, e.g. 15:45 stamourv: The `values' at the end return the key and the value for the next addition to the hash-table. 15:45 BW^-: { "a": "b", "c": "d" } 15:46 BW^-: stamourv: but thati s already done then no? 15:46 stamourv: The `in-port-until' part does most of the parsing. 15:46 BW^-: stamourv: the values that outputs result into the hashtable is on row 16, no?? 15:46 stamourv: And binds the key and the value to `key' and `value'. 15:47 stamourv: No, these are the values that `in-port-until' will produce. 15:47 BW^-: stamourv: right,a nd the return point at row 16 is where the new hashtable element is actually passed into for/hasheq for insertion, no? 15:47 stamourv: These are bound to `key' and `value' on line 4. 15:47 BW^-: hm um 15:47 stamourv: No, that happens on line 22. 15:48 BW^-: really. hmm. 15:48 BW^-: i don't see how this fits together =) 15:48 stamourv: `in-port-until' is a sequence that generates 2 elements at a time. 15:48 BW^-: so what sense does in-port-until make at all? 15:48 BW^-: aha, so it does not actually invoke those two lambdas during the invocation of in-port-until ?? 15:48 BW^-: but it just makes like a sequence object for later use?? 15:48 stamourv: Its lambda argument tells it how to process its input stream. 15:48 BW^-: that at that time, then, will invoke the lambdas? 15:49 stamourv: Pretty much, yes. 15:49 BW^-: look, so, the input is like this { "a": "b", "c": "d" } 15:49 BW^-: so, the checking for comma is done at row 19 15:49 BW^-: but thec hecking for } at 18 15:50 BW^-: how does this fit together - i mean, where is the reading actually done? 15:50 stamourv: The checking on line 18 tells `in-port-until' to stop generating elements, which means that `for/hasheq' will stop, since the sequence it iterates over is over. 15:51 stamourv: After that, line 23 makes sure that we did indeed stop because we reached a closing brace (and not because we reached EOF, or something.) 15:51 BW^-: ok 15:51 BW^-: hjm 15:52 BW^-: i think in this port i'm making, i should just rewrite this into a new loop, this is the kind of format i was using anyhow already 15:52 BW^-: the |when| form, is that a synonym for |if|, or does it have properties of a loop? 15:53 stamourv: Re starting from scratch: That's probably a good idea. Gambit doesn't have anything like Racket's `for' loops. 15:53 (join) Kaylin 15:54 BW^-: thanks for the feedback. yeah, just looking at it now i think the logics expressed in this procedure are simple 15:54 stamourv: Re `when': One-armed `if's are forbidden in Racket (and are a terrible idea in general. very easy to make mistakes with them). 15:54 BW^-: i just need to wrap it to use of r5rs procedures only :) 15:54 stamourv: Also, `when' has an implicit `begin'. 15:54 BW^-: aha 15:54 BW^-: aha noted. than you for pointing out. 15:54 stamourv: BW^-: Good luck with that. There's really not much in R5RS. 15:55 BW^-: indeed. :) 15:55 stamourv: I hope you don't mind reimplementing the wheel. ;) 15:55 (quit) jeapostrophe: Ping timeout: 244 seconds 16:00 (join) rich1 16:00 BW^-: stamourv: hehe thanks. well, as far as i know this was never ported to gambit before. i ported this json lib like 4y ago but just ran into this usecase of using the hashtable aspect now 16:00 BW^-: i think i didn't port it originally because i got lost in the for/hasheq form. :) 16:01 BW^-: apart from this, of course code reuse should be maximized, little or no point in reinventing things. 16:01 BW^-: umm 16:01 BW^-: stamourv: are you sure that that code in for/hasheq is the body just ilke that 16:01 BW^-: just look at it 16:01 BW^-: (when* (eq? (peek-char port) #\,) 16:01 BW^-: (read-char port)) 16:01 BW^-: (skip-whitespace port) 16:02 BW^-: ^ this indeed reads out a comma section in a json string. but, right after that it ends with: 16:02 BW^-: (expect (read-char port) #\}) 16:02 BW^-: which reads out the last character in it. 16:02 BW^-: in for/hasheq's definition, the definition goes something like (for/hasheq test coooond-code ..... lastthing) 16:02 BW^-: sth like this 16:02 BW^-: i didn't get the point there 16:02 soegaard: Apropos one-armed if: http://stackoverflow.com/q/10863192/23567 16:02 BW^-: though supposedly (expect (read-char port) #\}) is |lastthing|. :) 16:03 dyoo: BW^: just following up no this: are you looking at dherman's json code? 16:03 BW^-: dyoo: yep 16:03 dyoo: If so, you probably want to look at the Racket standard library version instead 16:03 dyoo: my understanding is that the one in the standard library is a descendent of the code in planet 16:03 dyoo: let me see if I can find a uRL for you... 16:03 BW^-: dyoo: aha interesting. what's the URL? 16:03 BW^-: right 16:03 stamourv: BW^-: Re the comma part: That's just skipping the comma, so that the next time we get an element from the sequence, we're looking at an actual element, and not at the comma. 16:03 BW^-: i would guess they're very close in terms of code - this json lib is complete really. 16:04 dyoo: ah, found it: https://github.com/plt/racket/blob/master/collects/json/main.rkt 16:04 stamourv: Re parsing the closing brace: that's not actually in the `for/hasheq', that's in the `begin0'. 16:04 stamourv: Re implementation of `for/hasheq': The last form is special because it's the one that determines what goes in the hash. The others before it are executed for effect. 16:05 (quit) whoops: Quit: Farewell 16:07 BW^-: in PLT, do symbols GC? 16:08 stamourv: What is this PLT of which you speak? ;) 16:08 didi hopes it's food 16:08 didi <- hungry 16:08 stamourv is hungry too. 16:10 dyoo: bw^-: I believe they're usually in an interned table, but that they should be held weakly to be gc-able. 16:10 dyoo: trying to see if the "Inside" internal documentation mentions this... 16:10 (join) whoops 16:11 dyoo: they should be. They're tagged so that they cooperate with the 3m collector. There are details in http://docs.racket-lang.org/inside/im_memoryalloc.html#%28part._im~3a3m%29 16:12 (join) jonrafkind 16:12 (join) anRch 16:13 dyoo: BW^-: You could probably experiment by generating temporary random symbols in a loop, and watch if memory usage is bounded. Given that Racket has support for weak hash tables, it would be funky if symbols couldn't garbage collect. 16:14 cnonim: guys, i'm define syntax parameter, but i create some syntax in runtime, how i can put that syntax parameter to syntax created in runtime? 16:17 dyoo: cnonim: do you have an example on gist.github.com? 16:17 (join) brum 16:17 (join) jbclements 16:18 cnonim: one moment 16:22 (quit) brum: Ping timeout: 248 seconds 16:23 (join) Fare 16:23 cnonim: https://gist.github.com/cNoNim/c6d6b7f91ca63d868401 16:23 (nick) Fare -> Guest92657 16:23 cnonim: how i can put current value of verbosity-level for output "test at runtime"? 16:24 (quit) Guest52818: Ping timeout: 256 seconds 16:25 asumu: cnonim: I'm still confused why you need syntax parameters and not just regular parameters. 16:26 dyoo: this is slightly odd. I agree with asumu: I expected regular, runtime parameters here. 16:26 cnonim: i can do like https://gist.github.com/cNoNim/525aa84c8ecfc8fc0d5c 16:26 cnonim: but how i can put current value? 16:28 cnonim: if i use regular parameter i got "verbosity-level: unbound identifier in module (in the transformer environment, which does not include the run-time definition)" 16:29 cnonim: rudybot: (define verbosity-level (make-parameter 0)) 16:29 rudybot: cnonim: your sandbox is ready 16:29 rudybot: cnonim: Done. 16:29 dyoo: cnonim: https://gist.github.com/dyoo/5060281 16:29 asumu: If you use a regular parameter, you would just include it in the template and you wouldn't unquote it. 16:29 asumu: (yeah, see dyoo's snippet :)) 16:30 dyoo: cnonim: if you're doing stuff with eval and you're not writing a dynamic evaluator or repl, you're probably doing something "against the grain". 16:31 cnonim: (define-syntax (log stx) (syntax-case stx () ([_ num msg ...] #`(when (>= (verbosity-level) num) (apply printf (list msg ...)))))) 16:31 cnonim: rudybot: (define-syntax (log stx) (syntax-case stx () ([_ num msg ...] #`(when (>= (verbosity-level) num) (apply printf (list msg ...)))))) 16:31 rudybot: cnonim: Done. 16:32 cnonim: (log 0 "test") 16:32 cnonim: rudybot: (log 0 "test") 16:32 rudybot: cnonim: ; stdout: "test" 16:32 cnonim: rudybot: (log 1 "test") 16:32 rudybot: cnonim: Done. 16:32 cnonim: rudybot: (parameterize ([verbosity-level 1])(log 1 "test")) 16:32 rudybot: cnonim: ; stdout: "test" 16:33 dyoo: cnonim: does that match what you want then? 16:34 (quit) Kaylin: Quit: Leaving. 16:35 cnonim: one moment 16:37 (quit) jbclements: Quit: jbclements 16:37 (quit) ivan\: Quit: ERC Version 5.3 (IRC client for Emacs) 16:37 cnonim: syntax-parameter have best performance at runtime? or no? 16:37 dyoo: syntax-parameters don't exist at runtime; that's why I'm having difficulty understanding the question 16:38 (join) ivan\ 16:38 (join) Guest52818 16:38 dyoo: cnonim: by the way, Racket already has logging infrastructure, so you might just be able to use it: http://docs.racket-lang.org/reference/logging.html 16:41 cnonim: at runtime #'(when (>= #,(syntax-parameter-value #'verbosity-level) num) 'null) translated to (when (>= 0 1) 'null) and optimizer may be excluded that. i understand correctly? 16:41 cnonim: it's like preprocessor in plain C or C++ 16:42 (join) jbclements 16:42 dyoo: Yes, because the instructions are being omitted at compile time. But that means you can't look at or adjust verbosity level at runtime: it's already been omitted by then. 16:42 cnonim: on this i can write assert macroses and exclude them at production 16:43 cnonim: but on regular parameter I can not do that 16:43 cnonim: this is difference 16:44 dyoo: Yes. But don't expect to get performance by using eval at runtime: that's almost certainly going to be expensive. 16:45 cnonim: i do not use eval it was just example 16:47 cnonim: I define a syntactic object that defines the syntax object 16:47 cnonim: at runtime 16:48 (quit) dyoo: Quit: dyoo 16:52 (join) bitonic 16:52 (quit) gridaphobe: Remote host closed the connection 16:57 (quit) bitonic: Read error: Operation timed out 17:00 (quit) Licenser: Ping timeout: 260 seconds 17:04 (quit) bremner: Read error: Operation timed out 17:04 (join) gridaphobe 17:06 soegaard: Is this readable? http://rosettacode.org/wiki/Range_expansion#Racket 17:07 cnonim: racket have buffered io? 17:07 soegaard: yes 17:08 soegaard: unless you disable the buffer 17:08 soegaard: http://docs.racket-lang.org/reference/port-buffers.html?q=buffer 17:10 (quit) anRch: Quit: anRch 17:12 (quit) cnonim: Ping timeout: 255 seconds 17:13 (join) bremner 17:13 (quit) bremner: Changing host 17:13 (join) bremner 17:14 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 17:15 (join) mizu_no_oto 17:18 (join) brum 17:21 (join) Licenser_ 17:22 (nick) Licenser_ -> Licenser 17:24 (quit) brum: Ping timeout: 246 seconds 17:27 (join) Nisstyre-laptop 17:28 (quit) basdirks: Ping timeout: 240 seconds 17:29 (quit) mizu_no_oto: Ping timeout: 246 seconds 17:31 asumu: soegaard: looks good to me. (#:match-select was new to me though) 17:31 (join) basdirks 17:34 soegaard: great 17:36 (quit) basdirks: Ping timeout: 255 seconds 17:38 (quit) rich1: Quit: Leaving. 17:44 (join) yours_truly 17:48 greghendershott: I love the Oberon-2 code for it: http://rosettacode.org/wiki/Range_expansion#Oberon-2 17:49 (quit) yours_truly: Quit: Leaving 17:53 soegaard: !?! 17:53 greghendershott: Whereas in APL all that would probably boil down to one line like ⎕←{⍵/⍨~{⍵∨≠\⍵}⍵∊'<>'}txt 17:53 greghendershott: However they'd both take equally long to type out. :) 17:55 soegaard: I miss something shorter than string->number. 18:03 (join) bitonic 18:05 (quit) soegaard: Quit: soegaard 18:15 (quit) dauterive: Quit: Leaving 18:19 (join) brum 18:23 (quit) brum: Ping timeout: 245 seconds 18:24 (quit) gridaphobe: Remote host closed the connection 18:33 (quit) bitonic: Remote host closed the connection 18:33 (join) bitonic 18:37 (join) gridaphobe 18:38 (join) ambrosebs 18:52 (quit) ambrosebs: Remote host closed the connection 18:54 (quit) jonrafkind: Ping timeout: 246 seconds 19:06 greghendershott: soegaard: Well the opposite, number->string, is practically just ~a these days. Thanks to racket/format. That's pretty short. :) 19:11 (quit) SeanTAllen: Ping timeout: 255 seconds 19:12 Nisstyre-laptop: greghendershott: (define number->string ((curry format) "~a")) 19:12 Nisstyre-laptop: although that works for anything really, so idk why anyone would bother 19:19 (join) brum 19:21 (quit) Nisstyre-laptop: Quit: Leaving 19:24 (quit) brum: Ping timeout: 248 seconds 19:32 asumu: So clearly we just need co-~a and we'd be set. 19:36 (quit) didi: Ping timeout: 260 seconds 19:37 (join) yacks 19:37 (join) dnolen 19:40 (quit) gridaphobe: Remote host closed the connection 19:47 (join) mizu_no_oto 19:49 (join) ambrosebs 19:53 (quit) ambrosebs: Remote host closed the connection 19:56 (part) ryan_: "Ex-Chat" 20:09 (join) gridaphobe 20:17 (quit) jbclements: Quit: jbclements 20:18 (join) kvda 20:19 (join) brum 20:22 (quit) dnolen: Ping timeout: 260 seconds 20:24 (quit) brum: Ping timeout: 248 seconds 20:25 (join) brum 20:27 (quit) Guest52818: Ping timeout: 264 seconds 20:34 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:36 (join) jeapostrophe 20:52 (quit) carleastlund: Quit: carleastlund 20:57 (join) mizu_no_oto 20:58 (join) yeboot 20:59 yeboot: rudybot: firework 20:59 rudybot: yeboot: (define (firework-launcher) (thing-launcher firework (current-output-port) (random 10))) 20:59 yeboot: rudybot: (exit) 20:59 rudybot: yeboot: your sandbox is ready 20:59 rudybot: yeboot: error: evaluator: terminated (exited) 20:59 yeboot: rudybot: firework 20:59 rudybot: yeboot: your sandbox is ready 20:59 rudybot: yeboot: error: firework: undefined; cannot reference an identifier before its definition in module: 'program 21:00 (quit) brum: Remote host closed the connection 21:03 (quit) cantcode: Quit: ragequit 21:09 (quit) kvda: Quit: z____z 21:09 (join) SeanTAllen 21:13 (join) cantcode2 21:15 (quit) gridaphobe: Remote host closed the connection 21:15 (join) Kaylin 21:23 (join) brum 21:28 yeboot: what did the plt stand for in plt scheme? 21:33 (join) kvda 21:38 jaimef: Pupils Learning To Scheme 21:38 Nisstyre: yeboot: programming language theory 21:39 Nisstyre: http://en.wikipedia.org/wiki/Programming_language_theory 21:39 asumu: PLT doesn't stand for anything. 21:40 Nisstyre: asumu: well, "Programming Language Theory" seems like a valid interpretation at least 21:41 asumu: Yes, but it'd be a backronym. 21:41 Nisstyre: yeah 21:46 (join) RacketCommitBot 21:46 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/t3tnYg 21:46 RacketCommitBot: racket/master 3d0af84 Robby Findler: add macports default path as a place to look for aspell 21:46 (part) RacketCommitBot 21:49 (join) rmathews 21:50 yeboot: rudybot: (define (first-is-last alist) (append (rest alist) (list (first alist)))) 21:50 rudybot: yeboot: Done. 21:51 yeboot: rudybot: (first-is-last (list "alpha" "beta" "gamma")) 21:51 rudybot: yeboot: ; Value: ("beta" "gamma" "alpha") 21:51 yeboot: rudybot: (define define 2) 21:51 rudybot: yeboot: Done. 21:52 yeboot: rudybot: (define x 2) 21:52 rudybot: yeboot: error: x: undefined; cannot reference an identifier before its definition in module: 'program 21:52 yeboot: rudybot: (exit) 21:52 rudybot: yeboot: error: evaluator: terminated (exited) 21:53 yeboot: hah, I was about to do (define (exit) (displayln "rosebud") (exit)) 22:08 (quit) ijp: Quit: The garbage collector got me 22:33 (quit) bitonic: Ping timeout: 248 seconds 22:38 (join) ambrosebs 22:40 (quit) rmathews: Quit: ... 22:41 (quit) ambrosebs: Remote host closed the connection 22:42 (join) ambrosebs 22:43 (quit) jeapostrophe: Ping timeout: 276 seconds 22:44 (join) Guest52818 22:44 (nick) Guest52818 -> jao 22:44 (join) jao 22:49 yeboot: rudybot: exit 22:49 rudybot: yeboot: your sandbox is ready 22:49 rudybot: yeboot: ; Value: # 22:50 yeboot: rudybot: (define (death) (displayln "rosebud") (exit)) 22:50 rudybot: yeboot: Done. 22:50 yeboot: (define die death) 22:50 yeboot: rudybot: (define die death) 22:50 rudybot: yeboot: Done. 22:57 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 22:59 (quit) elly: Quit: gone 23:09 yeboot: rudybot: (define die (death)) 23:09 rudybot: yeboot: error: evaluator: terminated (exited) 23:09 yeboot: hahah 23:09 yeboot: rudybot: death 23:09 rudybot: yeboot: your sandbox is ready 23:09 rudybot: yeboot: error: death: undefined; cannot reference an identifier before its definition in module: 'program 23:10 yeboot: rudybot: (define (die) (displayln "rosebud") (exit)) 23:10 rudybot: yeboot: Done. 23:10 yeboot: rudybot: (die) 23:10 rudybot: yeboot: error: evaluator: terminated (exited) 23:10 yeboot: why won't he print rosebud? 23:19 (join) rmathews 23:33 (quit) yeboot: Read error: Connection reset by peer 23:34 (join) firefux 23:35 asumu: Does anyone know if net/dns has some tests somewhere that I just can't find? 23:35 asumu: (also how does one write a good DNS test anyway? Run a mock DNS server, populate it with test data, and query it?)