00:05 (quit) bro_grammer: Ping timeout: 245 seconds 00:13 (join) bjz 00:30 (quit) jeapostrophe: Read error: Operation timed out 00:33 (join) mye_ 00:36 (quit) mye: Ping timeout: 245 seconds 00:38 (quit) Kaylin: Read error: Connection reset by peer 00:45 (join) noam 01:09 (quit) mceier: Quit: leaving 01:10 (join) dsantiago 01:16 asumu: eli: ordered a mug... will see in about a week how it turns out. 01:29 (quit) mithos28: Quit: mithos28 02:00 (join) hkBst 02:00 (quit) hkBst: Changing host 02:00 (join) hkBst 02:04 (join) mithos28 02:11 (quit) mithos28: Read error: Connection reset by peer 02:11 (join) mithos28_ 02:17 Cryovat: asumu: Product sample for official merchandise? ;) 02:22 (join) korky 02:25 asumu: Cryovat: yep, from here: http://www.zazzle.com/elibarzilay 02:25 (part) korky 02:27 vu3rdd: asumu: I want one of those and a sticket.. wonder if they will ship it all the way to India. 02:28 vu3rdd: s/sticket/sticker 02:29 (join) mceier 02:30 vu3rdd: looks like they do. 02:33 Cryovat: Ah, cool :) 02:58 (quit) dsantiago: Quit: Computer has gone to sleep. 03:06 (join) RacketCommitBot 03:06 RacketCommitBot: [racket] plt pushed 8 new commits to release: https://github.com/plt/racket/compare/d68afc364d3e...76d2de48558c 03:06 RacketCommitBot: [racket/release] adjust check-expect so it rewrites the error messages - Robby Findler 03:06 RacketCommitBot: [racket/release] add a test case for check-expect expressions where the first position has an error - Robby Findler 03:06 RacketCommitBot: [racket/release] ffi/com: remove stray quote - Matthew Flatt 03:06 (part) RacketCommitBot 03:11 (quit) Shviller: Ping timeout: 240 seconds 03:12 (join) Shviller 03:13 (join) mye 03:15 mye: drracket on retina is _wrong_;-( 03:16 mithos28_: mye: yep I have already filed a bug 03:20 (quit) jonrafkind: Ping timeout: 255 seconds 03:38 (join) djcoin 03:44 (join) antithesis 03:48 (quit) cdidd: Read error: Connection reset by peer 03:53 (quit) mye: Quit: mye 04:15 (quit) mithos28_: Quit: mithos28_ 04:21 (join) lebro 04:38 (quit) bjz: Quit: Leaving... 04:57 (quit) djcoin: Quit: WeeChat 0.3.2 04:57 (join) djcoin 05:03 (quit) antithesis: Quit: antithesis 05:09 (quit) vu3rdd: Ping timeout: 244 seconds 05:16 (quit) lebro: Remote host closed the connection 05:25 (join) antithesis 05:30 (join) MightyFoo 05:32 (join) cdidd 06:16 MightyFoo: is it possible to clear drracket's interactions output pane? 06:21 (join) soegaard 06:21 (join) vu3rdd 06:21 (quit) vu3rdd: Changing host 06:21 (join) vu3rdd 06:48 (join) MayDaniel 06:52 (quit) DrDuck: Ping timeout: 244 seconds 06:52 (quit) soegaard: Read error: Connection reset by peer 06:52 (quit) MightyFoo: Ping timeout: 244 seconds 06:52 (quit) mattmight: Ping timeout: 240 seconds 06:53 (quit) gabot: Ping timeout: 244 seconds 06:53 (topic) -: Racket -- http://racket-lang.org -- logs at http://racket-lang.org/irc-logs/ 06:53 (names) -: gabot samth_away tim-brown DrDuck1 MayDaniel vu3rdd cdidd antithesis djcoin Shviller mceier hkBst noam mye_ PfhorSlayer jrslepak cataska stchang karswell mario-goulart sizz_ ASau jschuster DraX @ChanServ jamessan Nisstyre noelw acarrico imami|afk Araq DGASAU` Demosthenes SHODAN sethalves errstr bremner juanfra lusory Shvillr danl_ndi BeLucid asumu ivan` offby1 rudybot jrslepak_neu rotty ivan\ hyko ozzloy danking em m4burns dspt otterdam surrounder pmatey 06:53 (names) -: anonus eMBee igibson Cryovat bartbes elliottcable tewk antono chandler tauntaun eli Haffe gf3 friscosam spanner rapacity cky 06:55 (join) soegaard_ 06:55 (join) server_failure 06:55 (join) mattmigh` 06:55 (join) Shambles_1 06:55 (nick) soegaard_ -> soegaard 06:55 (join) ssbr_ 06:55 (join) treefor 06:55 (quit) ssbr_: Changing host 06:55 (join) ssbr_ 06:56 (join) masm 07:04 tim-brown: i tried to print a view of my definitions window last night from drracket; and i got 1 page out with the definitions running off the bottom. 07:04 tim-brown: is printing a known weakness of drracket? 07:18 soegaard: Don't know. 07:32 (join) dalaing 07:36 (join) bjz 07:45 (join) jeapostrophe 07:45 (quit) jeapostrophe: Changing host 07:45 (join) jeapostrophe 08:06 (join) kanak 08:09 tim-brown: rudybot: (for/sum 08:09 rudybot: tim-brown: (for/sum ([b a]) (+ 2 (* 10 b))) 08:09 tim-brown: ([i (in-range 1000000)] [beat (in-cycle 9999 (in-value (displayln ".")))]) 08:09 tim-brown: i) 08:09 tim-brown: rudybot: (for/sum ([i (in-range 1000000)] [beat (in-cycle 9999 (in-value (displayln ".")))]) i) 08:09 rudybot: tim-brown: your sandbox is ready 08:09 rudybot: tim-brown: ; Value: 499999500000 08:09 rudybot: tim-brown: ; stdout: ".\n" 08:10 tim-brown: why do i only get a single dot printed out -- i'm trying to get a "heartbeat" out of this long running loop 08:16 (part) dalaing 08:20 soegaard: rudybot: (for ([j (in-range 10)] [i (in-cycle (in-range 3) (in-value (displayln ".")))]) (displayln i)) 08:20 rudybot: soegaard: your sandbox is ready 08:20 rudybot: soegaard: ; stdout: ".\n0\n1\n2\n#\n0\n1\n2\n#\n0\n1\n" 08:22 soegaard: tim-brown: I think in-cycle evaluates each seq only once. Then it concatenes them and then keeps reusing the same list. 08:26 tim-brown: soegaard: you seem to at least be getting a periodical # coming out 08:26 tim-brown: (although not the desired periodical dot) 08:26 soegaard: yeah - but that could be same void printed over and over again. 08:27 tim-brown: i don't quite get why it's being printed out, though ... if the displayln is being called, it should be with the dot 08:27 tim-brown: if displayln isn't being called, then what's printing #\n 08:28 tim-brown: ? 08:33 soegaard: tim-brown: https://github.com/soegaard/this-and-that/blob/master/heart-beat/in-heart-beat.rkt 08:33 rudybot: http://tinyurl.com/cwqh3sr 08:35 soegaard: tim-brown: I was printing the i. I think in-cycles generates the list (0 1 2 #) and just runs through the same list repeatedly 08:35 tim-brown: thanks for that -- it's useful 08:35 tim-brown: oh -- not the "j" 08:38 tim-brown: docs for in-cycle says, though: "where each seq is initiated afresh in each iteration" 08:38 tim-brown: which doesn't seem to be evidenced here 08:39 tim-brown: or am i mssing something? 08:39 tim-brown: [btw. that in-heart-beat might make for a nice e.g. in the documentation] 08:44 soegaard: tim-brown: Something is unclear in the docs, I thought your in-cycle solution would work too. 08:44 tim-brown: im(h)o that's not unclear -- that looks like a bug in in-cycle 08:48 soegaard: tim-brown: https://github.com/soegaard/this-and-that/blob/master/heart-beat/in-effect.rkt 08:48 rudybot: http://tinyurl.com/cjowd58 08:48 soegaard: Here is a sequence that works with your in-cycle solution. 08:49 soegaard: I think our confusion comes from in-value. The docs say it produces one value only. 08:50 soegaard: The question is whether in-value can be "restarted" or not. 08:50 tim-brown: so is it not a sequence that can be "initiated afresh"? 08:50 soegaard: apparently not 08:53 (nick) samth_away -> samth 08:54 (quit) djcoin: Ping timeout: 248 seconds 08:54 (quit) acarrico: Ping timeout: 248 seconds 08:56 tim-brown: i'd be (reasonably) happy if in-value was documented as "not afresh-initiateable"; i can see (especially if you use it with the same frequency i do) that in-value might get too perfoemance-costly to be restartable 08:56 (join) hash_table 08:57 soegaard: Ask the mailing list for rationale. 09:09 (join) acarrico 09:14 (quit) hash_table: Ping timeout: 255 seconds 09:21 tim-brown: how do i give the mzc optimiser more fuel... i'm getting: 09:21 tim-brown: mzc optimizer: no inlining, out of fuel 09:23 samth: tim-brown: fuel is how the optimizer determines when to stop inlining 09:23 samth: it's not something you give it 09:23 samth: where are you getting that message? 09:24 tim-brown: from the debug log (PLTSTDERR=debug) stream; running "racket -t my-module.rkt" 09:25 tim-brown: was surprised to see it cluttering up my debug 09:25 (quit) bjz: Quit: Bye! 09:25 tim-brown: an now i feel cheated out of optimized code! 09:26 tim-brown: i'm also getting positive reports, too: 09:26 tim-brown: mzc optimizer: inlining: involving: #(doloop ... 09:27 samth: tim-brown: yes, the debug-level now includes lots of logging from the optimizer 09:28 samth: if you don't want to see it, run 'raco make mymodule.rkt' first 09:29 tim-brown: can i crank up the optimization at all to make fewer "no inlining" and more "inlining"? 09:29 samth: tim-brown: no 09:29 samth: you can explicitly ask for more inlining 09:29 samth: rudybot: doc begin-encourage-inline 09:29 rudybot: samth: your typed/racket sandbox is ready 09:29 rudybot: samth: no docs for a current binding, but provided by: racket/performance-hint 09:29 samth: rudybot: (require racket/performance-hint) 09:29 rudybot: samth: Done. 09:29 samth: rudybot: doc begin-encourage-inline 09:29 rudybot: samth: http://docs.racket-lang.org/reference/performance-hint.html#(form._((lib._racket%2Fperformance-hint..rkt)._begin-encourage-inline)) 09:30 samth: but the optimizer decides how much to inline based on its own judgment 09:30 tim-brown: of course 09:30 samth: note that more inlining isn't necessarily better 09:31 tim-brown: i was going to ask whether this "fuel limit" provided the "best" overall results 09:32 samth: tim-brown: i don't know how you could decide 'best' over all racket programs 09:33 samth: surely there are some where a different decision would be better 09:41 tim-brown: which is why i put "best" in quotes 09:42 tim-brown: and, i guess, why gcc has 160 optimisation switches (or is it 80*on + 80*off) 09:42 samth: tim-brown: i don't know if it has a -finline-harder switch, though 09:43 tim-brown: not specifically "harder", but there *are* 3 inlining switches! 09:43 (join) djcoin 09:44 (join) soegaard 10:05 (quit) hkBst: Quit: Konversation terminated! 10:15 (quit) jeapostrophe: Ping timeout: 246 seconds 10:29 (join) hash_table 10:31 (join) bjz 10:39 (quit) mceier: Quit: leaving 10:42 (join) anRch 11:03 (quit) jrslepak: Quit: This computer has gone to sleep 11:18 (join) RacketCommitBot 11:18 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/38e90b52c4936f85bed6103a568b769b29541760 11:18 RacketCommitBot: [racket/master] Fixes parallel raco make of relative paths including subdirectories - Kevin Tew 11:18 (part) RacketCommitBot 11:18 (part) antithesis 11:18 soegaard: Is this useful? 11:18 soegaard: https://github.com/soegaard/this-and-that/blob/master/declare/declare.rkt 11:36 samth: soegaard: neat 11:38 (join) jrslepak 11:39 (quit) anRch: Quit: anRch 11:39 (join) stamourv 11:40 asumu: soegaard: that's cool 11:41 asumu: struct accessors can be awfully wordy 11:41 (join) jeapostrophe 11:41 (quit) jeapostrophe: Changing host 11:41 (join) jeapostrophe 11:42 soegaard: I tried similar stuff before, but it got too complicated. This is simpler. 11:42 (join) Fare 11:42 Fare: Hi! 11:43 stamourv: Fare: Hi! 11:43 stamourv: vu3rdd: Re Racket stickers: http://www.ccs.neu.edu/home/stamourv/images/racket-laptops.jpg 11:43 Fare: There is a 1998 paper on combining units and mixins. But said mixins only have single inheritance and single dispatch 11:43 Fare: can you combine units with something more closy like swindle? 11:44 Fare: (I suppose swindle has first-class classes, and therefore you can) 11:45 Fare: on the other hand, I fear that namespace issues might arise when trying to extend classes across modules. 11:45 asumu: Fare: Potentially, but mixins are easier to reason about WRT scope. 11:45 asumu: Which is important for the 1998 paper. 11:46 Fare: asumu: I'm not entirely sure what you mean. 11:46 asumu: Fare: when you apply a mixin, only the resulting class will see the extra methods. 11:46 Fare: (I'm writing this paper on my CL interface library, and want to better understand how it compares to stuff done with PLT) 11:46 asumu: With CLOS, the addition of methods is more global. 11:47 asumu: (with the disclaimer that I don't understand CLOS very well) 11:47 Fare: what about with swindle? 11:48 asumu: I don't think anyone has tried, but since Swindle is mostly TinyCLOS I suspect it's an issue. 11:48 Fare: asumu: fire away, if you make incorrect assumption, I can correct them. 11:48 Fare: the global aspect is sometimes a feature when it comes to extension 11:49 asumu: Fare: also, the combination of units & mixins is partly trying to make up for the drawbacks of mixins: that they can't support the kind of extension CLOS & multimethods do. 11:49 asumu: So arguably, you don't need to use units if you already have multimethods. 11:49 asumu: I speculate that the reason for the 1998 paper is because the authors didn't want something so global. 11:50 Fare: especially since the 1998 papers's mixins have single inheritance, single dispatch, no method combination. 11:51 Fare: asumu: well, I still needed a mechanism for parametric polymorphism. But yes, I see how some features compensate for the lack of others, in either language. 11:53 Fare: I admit I had read that paper long ago, and just re-read it now. It's "just" a combination of two ideas. Neither of the ideas is novel, the cool thing is that they combine well. 11:54 Fare: interesting how you immediately know what I'm talking about. 11:56 Fare: In a way, the proof of the pudding is -- are these features actually used in PLT libraries. 11:57 Fare: and if so, do they yield elegant code. 11:57 (join) mceier 11:59 asumu: Fare: Yeah, I knew this paper because I'd read it and my first thought was: "can I make the combination into a language feature/macro?" 11:59 asumu: I don't think this combination is used much. 12:00 asumu: Partly, I think, because units are a fairly heavyweight feature. 12:00 asumu: (to clarify: mixins & units *are* used together, but not in this particular pattern) 12:01 asumu: (see the DrRacket tool API for an example of their use) 12:02 (nick) DGASAU` -> DGASAU 12:05 (join) nilyaK 12:12 (quit) noelw: Quit: noelw 12:26 (join) mithos28 12:31 (join) jonrafkind 12:33 vu3rdd: stamourv: :) 12:33 vu3rdd is watching the racketcon 2011 video 12:35 (quit) Fare: Ping timeout: 245 seconds 12:40 tim-brown: night all 12:40 tim-brown: have a nice weekend 12:46 (quit) tim-brown: Quit: WeeChat 0.3.8 12:51 soegaard: What is the name for "is this char in this string"? something like (is-char-in-string? c str) 12:53 (join) Fare 12:55 (quit) mithos28: Quit: mithos28 12:55 (join) dsantiago 12:55 (join) mithos28 12:56 (quit) djcoin: Quit: WeeChat 0.3.2 12:56 jonrafkind: regexp? 12:56 Fare: jonrafkind, thanks a lot for the source of your honu paper. Served me well. Good paper, too. 12:57 jonrafkind: oh cool 12:57 Fare: I suppose your syntax classes are related to syntax/parse 12:58 soegaard: It is a short definition, but it's got to have a name. 12:58 soegaard: (define (char-in-string? c str) (for/or ([s (in-string str)]) (eqv? c s))) 12:58 mithos28: soegaard: I'm not sure that makes too much sense as a question when unicode is in the picture. Is 'e' in the string 'e' + '' or does it normalize that to ''? 12:59 soegaard: mithos28: Hmm. 12:59 soegaard: Luckily I need it for a very restricted set of characters :-) 13:00 mithos28: But I don't think it exists for that reason. Thinking about a string as a sequence of characters leads to problems like that 13:06 soegaard: rudybot: (define (char-in-string? c str) (for/or ([s (in-string str)]) (eqv? c s))) 13:06 rudybot: soegaard: Done. 13:07 soegaard: rudybot: (define (char-in-string? c str) (for/or ([s (in-string str)]) (eqv? c s))) 13:07 rudybot: soegaard: (define (char-in-string? c str) (for/or ([s (in-string str)]) (eqv? c s))) 13:07 soegaard: rudybot: (define (char-in-string? c str) (for/or ([s (in-string str)]) (eqv? c s))) 13:07 rudybot: soegaard: Done. 13:07 soegaard: rudybot: (char-in-string? #\ó "fóo") 13:07 rudybot: soegaard: ; Value: #t 13:07 soegaard: (char-in-string? #\ó "foo") 13:16 (quit) dsantiago: Quit: Computer has gone to sleep. 13:22 (quit) mithos28: Quit: mithos28 13:24 vu3rdd: does Racket provide a way to get argument list of any given function? 13:25 vu3rdd: I see that there is a procedure-arity function. 13:26 samth: vu3rdd: what do you mean by the 'argument list'? 13:27 vu3rdd: something like the SBCL's sb-introspect:function-lambda-list 13:28 vu3rdd: for eg: (argument-list 13:29 vu3rdd: sorry.. 13:30 vu3rdd: (argument-list cons) => (cons arg1 arg2) .. something like that? 13:33 (quit) jrslepak: Quit: This computer has gone to sleep 13:41 samth: vu3rdd: if you don't need the actual names, then you can build that out of procedure-arity 13:41 samth: but the actual names aren't stored 13:42 vu3rdd: samth: thanks. 13:42 (join) mye 13:46 (quit) mye: Client Quit 14:01 (quit) jonrafkind: Ping timeout: 255 seconds 14:16 (join) jrslepak 14:17 (join) ASau` 14:18 (join) puzzlemath 14:25 (quit) vu3rdd: Remote host closed the connection 14:25 (quit) soegaard: *.net *.split 14:25 (quit) masm: *.net *.split 14:25 (quit) server_failure: *.net *.split 14:25 (quit) cdidd: *.net *.split 14:25 (quit) ASau: *.net *.split 14:25 (quit) Demosthenes: *.net *.split 14:25 (quit) m4burns: *.net *.split 14:26 (join) cdidd 14:26 (join) soegaard 14:26 (join) masm 14:26 (join) server_failure 14:26 (join) Demosthenes 14:26 (join) m4burns 14:26 puzzlemath: After upgrading to MacOS 10.8 (Mountain Lion) I became painfully aware that DrRacket in the Mac compiled distribution (5.2.1) "cannot be opened because it is from an unidentified developer." Is anyone working on this? 14:28 stamourv: puzzlemath: A new release is due in a couple of days, maybe that's been fixed? 14:28 stamourv: Could you try the pre-release installer? 14:28 stamourv: http://pre.racket-lang.org/release/installers/ 14:28 stamourv: If they don't work, that's definitely a bug. 14:30 puzzlemath: The workaround is to modify the default security preferences in the System Preferences. But some users (i.e., novice students) might be confused. 14:35 soegaard: stamourv: It is due to Gatekeeper. See https://developer.apple.com/resources/developer-id/ 14:35 stamourv: Right. I don't know if someone fixed it. 14:35 puzzlemath: The executable contained in the pre-release installer suffers from the same security pitfall. 14:35 soegaard: The question is if PLT has a developer id at Apple? 14:36 (quit) otterdam: *.net *.split 14:36 (quit) gf3: *.net *.split 14:36 (quit) bjz: *.net *.split 14:36 (quit) acarrico: *.net *.split 14:36 (quit) anonus: *.net *.split 14:36 (quit) pmatey: *.net *.split 14:36 (quit) surrounder: *.net *.split 14:36 (quit) PfhorSlayer: *.net *.split 14:36 (quit) danl_ndi: *.net *.split 14:36 (quit) BeLucid: *.net *.split 14:36 (quit) asumu: *.net *.split 14:36 (quit) eMBee: *.net *.split 14:36 (quit) sethalves: *.net *.split 14:36 (quit) igibson: *.net *.split 14:36 (quit) DraX: *.net *.split 14:36 (quit) Cryovat: *.net *.split 14:36 (quit) ssbr_: *.net *.split 14:36 (quit) Shambles_1: *.net *.split 14:36 (quit) mattmigh`: *.net *.split 14:36 (quit) MayDaniel: *.net *.split 14:36 (quit) Shviller: *.net *.split 14:36 (quit) sizz_: *.net *.split 14:36 (quit) juanfra: *.net *.split 14:36 (quit) hyko: *.net *.split 14:36 (quit) ozzloy: *.net *.split 14:36 (quit) tewk: *.net *.split 14:36 (quit) elliottcable: *.net *.split 14:36 (quit) bartbes: *.net *.split 14:36 (quit) Nisstyre: *.net *.split 14:36 (quit) imami|afk: *.net *.split 14:36 (quit) errstr: *.net *.split 14:36 (quit) antono: *.net *.split 14:36 (quit) jamessan: *.net *.split 14:36 (quit) Araq: *.net *.split 14:36 (quit) danking: *.net *.split 14:36 (quit) em: *.net *.split 14:36 (quit) bremner: *.net *.split 14:36 (quit) Shvillr: *.net *.split 14:36 (quit) rudybot: *.net *.split 14:36 (quit) jrslepak_neu: *.net *.split 14:36 (quit) rotty: *.net *.split 14:36 (quit) eli: *.net *.split 14:36 (quit) tauntaun: *.net *.split 14:36 (quit) Haffe: *.net *.split 14:36 (quit) chandler: *.net *.split 14:37 stamourv: I think so. 14:37 (join) dsantiago 14:37 (join) bjz 14:37 (join) acarrico 14:37 (join) ssbr_ 14:37 (join) Shambles_1 14:37 (join) mattmigh` 14:37 (join) MayDaniel 14:37 (join) Shviller 14:37 (join) PfhorSlayer 14:37 (join) sizz_ 14:37 (join) DraX 14:37 (join) gf3 14:37 (join) Haffe 14:37 (join) eli 14:37 (join) tauntaun 14:37 (join) chandler 14:37 (join) antono 14:37 (join) tewk 14:37 (join) elliottcable 14:37 (join) bartbes 14:37 (join) Cryovat 14:37 (join) eMBee 14:37 (join) otterdam 14:37 (join) em 14:37 (join) danking 14:37 (join) ozzloy 14:37 (join) hyko 14:37 (join) rotty 14:37 (join) jrslepak_neu 14:37 (join) rudybot 14:37 (join) asumu 14:37 (join) BeLucid 14:37 (join) danl_ndi 14:37 (join) Shvillr 14:37 (join) juanfra 14:37 (join) bremner 14:37 (join) errstr 14:37 (join) DGASAU 14:37 (join) Araq 14:37 (join) imami|afk 14:37 (join) Nisstyre 14:37 (join) jamessan 14:38 soegaard: No worries then. 14:38 (join) anonus 14:38 (join) pmatey 14:38 (join) surrounder 14:39 (quit) karswell: Remote host closed the connection 14:42 (join) RacketCommitBot 14:42 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/ebd2e356002dfd240aebaee1f7eac3648656ffd9 14:42 RacketCommitBot: [racket/master] Remove accidentally added file. - Vincent St-Amour 14:42 (part) RacketCommitBot 14:43 (part) puzzlemath 14:49 (join) karswell 14:51 (join) sethalves 14:51 (join) igibson 14:58 (quit) nilyaK: Read error: Connection reset by peer 15:42 (join) korkyra 15:44 korkyra: what is the most elegant way to write function group sucth that, for example, (group 3 '(1 2 3 4 5 6 7 8)) evaluates to '((1 2 3) (4 5 6) (7 8)) ??? 15:44 korkyra: i come to this: http://paste.lisp.org/display/130845 15:45 korkyra: but wonder it can be written more concisely 15:49 stamourv: korkyra: That's the most common way I've seen it written. 15:49 korkyra: really? 15:49 (nick) ASau` -> ASau 15:49 stamourv: I've certainly written it like that. 15:50 korkyra: oh, great 15:50 stamourv: Chicken has `chop', but I think that only covers the n=2 case. 15:52 korkyra: it's interesting that such a common function isn't included in the racket's standard set of list manipulation functions 15:54 stamourv: Yeah, maybe it should. 15:54 stamourv: Maybe it's in `unstable/list', let me check. 15:55 korkyra: i only know that group is included in "utility function" in Paul Graham's "On Lisp" 15:56 korkyra: But I forgot how he implemented it 15:56 stamourv: I don't see it in `unstable/list'. Want to submit a pull request? 15:57 korkyra: I do not know how to do it 15:57 stamourv: It's easy. Do you have a Github account? 15:57 korkyra: no, i only ude git locally 15:57 korkyra: use 15:58 stamourv: If you prefer, you can also send me a patch, using `git format-patch'. 16:00 korkyra: tell me how and i will 16:00 stamourv: Sure. 16:00 soegaard: korkyra: I wanted to use split-at but the corner case worked differentialy than expected: http://paste.lisp.org/display/130845#1 16:00 stamourv: So, you already have the hard part, the implementation of `group'. 16:00 (quit) kanak: Quit: Leaving. 16:00 korkyra: and i have git installed 16:00 stamourv: Clone the Racket repo, and build it. 16:01 stamourv: By default, it does a self-contained build, so you can have multiple versions around. 16:01 asumu: I like this implementation of 'group': https://gist.github.com/3250962 16:02 stamourv: So, to use your newly-built Racket, you need to run the `racket' executable that's in the `bin' subdirectory of the cloned repo. 16:02 stamourv: (On Unix, put it in your path.) 16:02 (join) RacketCommitBot 16:02 RacketCommitBot: [racket] plt pushed 3 new commits to master: https://github.com/plt/racket/compare/ebd2e356002d...03605b697dc4 16:02 RacketCommitBot: [racket/master] ffi/unsafe: show errors from a finalizer - Matthew Flatt 16:02 RacketCommitBot: [racket/master] scribble/base: generalize `itemlist' to splice/coerce some arguments - Matthew Flatt 16:02 RacketCommitBot: [racket/master] adjust timeout for parallel-plot test - Matthew Flatt 16:02 (part) RacketCommitBot 16:02 stamourv: Then, once you have that working, you can edit the file `collects/unstable/list' to add your new function. 16:02 asumu: (just felt like practicing some good ol' design recipe style programming---though, err, lemme put some purpose statements on that) 16:03 stamourv: After you run `raco setup' (using the `raco' executable from the repo), you can `(require unstable/list)' (again, with the `racket' from the repo), and you'll be able to use `group'. 16:04 korkyra: and how i can push a patch to repo? 16:04 stamourv: Once that works, you should add docs (`unstable/scribblings/list.scrbl') and tests (`unstable/tests/list.rkt'). 16:04 stamourv: You can commit to your local git repo using `git commit'. 16:05 korkyra: ok, but on github? 16:05 stamourv: To push it to the Racket git repo, you can send me the patch (`git format-patch') or send a pull request on github. 16:05 stamourv: To send a pull request on github, you need an account there, and you need to clone the Racket repo in your account. 16:06 stamourv: You can push your local changes to your github clone, and github has a button to submit a pull request. 16:06 korkyra: ok, tommorow i will open an account on gihub and do that 16:06 korkyra: thanks 16:06 stamourv: Then, a core Racket dev will merge the pull request, or merge the patch. 16:06 korkyra: but maybe asumu's version is better? 16:07 stamourv: Thanks to you! That's going to be a useful addition! 16:07 stamourv: Pick whichever one you prefer. 16:07 stamourv: If you want, you can benchmark them to see which is faster. 16:07 stamourv: Just remember to include docs and tests. :) 16:07 korkyra: with time function? 16:07 stamourv: Yes. 16:07 korkyra: ok 16:07 asumu: Yeah, it doesn't matter to me either way. I just wanted some practice. 16:08 stamourv: (BTW, I won't be active on IRC tomorrow, but I'll probably be on email if you need help.) 16:08 stamourv: (I'll be back on IRC on monday.) 16:08 korkyra: thank you, stamourv! :) 16:08 stamourv: No proble. :) 16:11 stamourv: korkyra: Actually, you may want to name the function `chop' instead of `group', to be consistent with chicken. 16:11 stamourv: http://wiki.call-cc.org/man/4/Unit%20data-structures#chop 16:11 stamourv: What do you think? 16:12 korkyra: ok, no problem 16:12 stamourv: Great! 16:13 (join) jonrafkind 16:13 (quit) jonrafkind: Changing host 16:13 (join) jonrafkind 16:20 soegaard: The function is called partition in Mathematica. They have generalized it somewhat: http://reference.wolfram.com/mathematica/ref/Partition.html 16:22 asumu: I like how a "see also" for that is a function called "CellularAutomaton" 16:28 soegaard: :-) 16:28 soegaard: Probably an inside joke. Wolfram *loves* cellular automatons. 16:30 korkyra: Oh, one more question (i'm writing some code and occasionali found missing functions). In Haskell, there is a function called scan which do something like that: 16:30 korkyra: scan + a [x1, x2, x3,...] = [a, a + x1, (a + x1) + x2, ((a + x1) + x2) + x3,...] 16:30 korkyra: what's the equivalent in Racket? 16:32 soegaard: rudybot: (map (lambda (x) (+ x 3)) '(1 2 3 4)) 16:32 rudybot: soegaard: ; Value: (4 5 6 7) 16:32 korkyra: no 16:32 stamourv: I don't know of a function that does that, but let me try to write it. 16:32 soegaard: ah 16:32 soegaard: fold ? 16:32 stamourv: soegaard: It's a mix of map and fold. 16:32 korkyra: it's like a fold but 16:33 korkyra: but should have O(n) time too 16:33 soegaard: Do you have some nice examples (of how scan can be used)? 16:34 korkyra: for example, scan (/) 1 [1..n] = [1/0!, 1/1!,...,1/n!] 16:35 korkyra: (nice for computing e) 16:35 jrslepak: for/fold seems like the right tool here 16:36 jrslepak: compute sum in one accumulator, build list of intermediate results in another 16:36 stamourv: korkyra: Got it. 16:37 stamourv: rudybot: (define (scan f l) (define-values (list-acc val-acc) (for/fold ([list-acc (list (first l))] [val-acc (first l)]) ([x (in-list (rest l))]) (define new-val-acc (f x val-acc)) (values (cons new-val-acc list-acc) new-val-acc))) (reverse list-acc)) 16:37 rudybot: stamourv: your sandbox is ready 16:37 rudybot: stamourv: Done. 16:37 stamourv: rudybot: (scan + '(1 2 3 4)) 16:37 rudybot: stamourv: ; Value: (1 3 6 10) 16:38 korkyra: quite close, but initializing value is missing 16:38 stamourv: Oh, missed that part. 16:38 korkyra: but ok, i got it 16:38 stamourv: Actually, that makes it easier. 16:38 stamourv: My version just takes the first element of the list for that. 16:39 korkyra: that's called scan1 16:40 stamourv: rudybot: (define (scan f a l) (define-values (list-acc val-acc) (for/fold ([list-acc (list a)] [val-acc a]) ([x (in-list l)]) (define new-val-acc (f x val-acc)) (values (cons new-val-acc list-acc) new-val-acc))) (reverse list-acc)) 16:40 rudybot: stamourv: Done. 16:40 stamourv: rudybot: (scan + 0 '(1 2 3 4)) 16:40 rudybot: stamourv: ; Value: (0 1 3 6 10) 16:40 korkyra: yeah, bravo! :) 16:41 (quit) masm: Quit: Leaving. 16:42 stamourv: Fun exercises for a slow friday afternoon. :) 16:42 korkyra: rudybot: (scan / 1 '(1 2 3 4 5)) 16:42 rudybot: korkyra: your sandbox is ready 16:42 rudybot: korkyra: error: reference to an identifier before its definition: scan in module: 'program 16:42 korkyra: rudybot: (define (scan f a l) (define-values (list-acc val-acc) (for/fold ([list-acc (list a)] [val-acc a]) ([x (in-list l)]) (define new-val-acc (f x val-acc)) (values (cons new-val-acc list-acc) new-val-acc))) (reverse list-acc)) 16:42 rudybot: korkyra: Done. 16:43 korkyra: rudybot: (scan / 1 '(1 2 3 4 5)) 16:43 rudybot: korkyra: ; Value: (1 1 2 3/2 8/3 15/8) 16:43 korkyra: ??? 16:44 (join) tim-brown 16:45 tim-brown: on pc racket command line, i'm having trouble running "racket -m my-module.rkt" 16:45 tim-brown: getting "main: not defined or required into the top-level environment" 16:46 stamourv: korkyra: I may have gotten the arguments to `f' backwards in the implementation. 16:46 korkyra: hehehe 16:46 tim-brown: I define and provide main 16:47 korkyra: rudybot: (scan (lambda (x y) (/ y x) 1 '(1 2 3 4 5)) 16:47 rudybot: korkyra: the rinari version takes approx 5 mins to scan this project 16:47 korkyra: rudybot: (define (scan f a l) (define-values (list-acc val-acc) (for/fold ([list-acc (list a)] [val-acc a]) ([x (in-list l)]) (define new-val-acc (f x val-acc)) (values (cons new-val-acc list-acc) new-val-acc))) (reverse list-acc)) 16:47 rudybot: korkyra: Done. 16:47 korkyra: rudybot: (scan (lambda (x y) (/ y x) 1 '(1 2 3 4 5)) 16:47 rudybot: korkyra: Or is it iris scan? 16:47 korkyra: rudybot: (scan (lambda (x y) (/ y x)) 1 '(1 2 3 4 5)) 16:47 rudybot: korkyra: ; Value: (1 1 1/2 1/6 1/24 1/120) 16:47 korkyra: yeah 16:48 stamourv: tim-brown: Do you have the code available somewhere? 16:49 tim-brown: stamourv: simple 4-liner 16:49 tim-brown: #lang racket (provide main) (define (main) 42) 16:49 tim-brown: oh... with at least a CR after racket 16:51 stamourv: Yeah, I see the same thing. 16:51 tim-brown: windows isn't my native land 16:51 korkyra: but my is :) 16:51 stamourv: I see it on debian. 16:52 stamourv: tim-brown: That sounds like a bug to me. 16:53 tim-brown: i've cried "bug" once already today! 16:54 stamourv: Thanks for helping us find them. :) 16:55 tim-brown: better luck with: 16:55 tim-brown: racket -e "(require \"testmain.rkt\") (displayln (main))" 16:56 asumu: If you have a new enough version you could put it in a main submodule. 16:57 stamourv: (set! asumu (add1 asumu)) 16:59 tim-brown: it's 5.2.1 -- which isn't a nightly, but seems modern enough 17:00 tim-brown: March 2012, though - will we get a new release before Realm'o'Racket? 17:01 soegaard: I think submodules were introduced in 5.3 17:02 asumu: tim-brown: there will be a release in the next few days probably. 17:04 tim-brown: cool; i've been using the nightlies (on my Debian machine) 17:05 asumu: samth: I looked in src/racket/cmdline.inc and it does appear that there is code to support racket -m. 17:05 tim-brown: stamourv: did you try the -m on a more modern than 5.2.1 racket? 17:05 stamourv: I'm on git from today. 17:05 asumu: But since it's doing namespace-syntax-introduce stuff in C code, I have no idea. 17:07 tim-brown: right... the reason i'm asking is because i'm generating a lot of printout 17:07 tim-brown: this chokes drracket; which spends more time managing output than generating it! 17:08 korkyra: (loving you is choking mi stroooong...) 17:08 tim-brown: I recently asked if there is a way to clear the print history (and logs, too) programmatically; but the response (if any) was disappointing :-( 17:09 tim-brown: gtg, my fish is calling! 17:09 tim-brown: night all 17:09 (quit) tim-brown: Quit: Page closed 17:10 samth: the problem with -m is that you need -t -m 17:10 asumu: Oh argh. I think I've encountered that before too. 17:10 stamourv: samth: That's not very intuitive. 17:11 samth: basically you always need -t if you're doing anything interesting 17:11 samth: and i agree that it's annoying 17:11 korkyra: Today I wrote some code and left it in DrRacket before going out. When I returned, my laptop has been boiled, and the racket was occupied 1.5GB of RAM! 17:15 stamourv: Yeah, DrRacket can sometimes eat up a lot of memory. 17:16 stamourv: Less than Eclipse, though. ;) 17:16 Araq: that's no achievement 17:16 stamourv: Agreed. 17:16 jonrafkind: put that on the racket homepage. "Uses less memory than eclipse!" 17:17 Araq: that's as useful as "racket is a programming language" 17:17 korkyra: maybe Microsoft should rewrite DrRacket :) 17:18 chandler: "uses less memory than Mail" 17:18 (quit) hash_table: Ping timeout: 245 seconds 17:18 jonrafkind: "racket is a programming language" beat out the other slogans "racket is not a tumor" 17:18 stamourv: It is also not a large truck. 17:19 Araq: "racket is king of trivial slogans"? 17:19 (join) anRch 17:19 jonrafkind: "racket: we make programming languages not slogans" 17:19 stamourv: Actually, that one is not bad. 17:19 Araq: "and yet we could resist to use one ..." 17:20 korkyra: "racket (unfortunately) is not Shen" :)) 17:20 Araq: *couldn't 17:20 stamourv: jonrafkind: I seem to remember an advertisement using something like that. 17:20 chandler: ugh. seriously? are we doing that again? 17:20 jonrafkind: like for a car company or something? 17:20 korkyra: it's just a joke 17:21 stamourv: jonrafkind: Maybe. We make cars, not logos, or something. 17:21 jonrafkind: "we cant afford a PR company" 17:21 Araq: "racket: vorsprung durch lack of syntax" 17:22 stamourv: rudybot: tr8 ne en vorsprung durch 17:22 rudybot: stamourv: "racket: vorsprung durch lack of syntax" 17:22 stamourv: err 17:22 stamourv: rudybot help tr8 17:22 stamourv: rudybot: help tr8 17:22 rudybot: stamourv: bug ..., help [], version, quote, source, url, seen , uptime, t8 ..., init [], eval ..., give ..., apropos ..., desc , doc 17:22 stamourv: rudybot: t8 ne en vorsprung durch 17:22 rudybot: stamourv: projection by 17:22 stamourv: rudybot: t8 de en vorsprung durch 17:22 rudybot: stamourv: projection by 17:22 Araq: more like "advantage by" 17:23 stamourv: Ah, I see. 17:23 stamourv: My german is very rusty, and my dutch almost non-existent. 17:23 Araq: thought it was common knowledge as Audi has the slogan "vorsprung durch technik" 17:24 Araq: (or used to have? dunno) 17:24 chandler: used to have 17:24 jrslepak: common among people who watch car commercials? ¬_¬ 17:25 stamourv: Heading out. Have a nice weekend y'all. 17:34 (join) lebro 17:35 Fare: What's the recommended way to write .scrbl documents that share common material, i.e. full paper vs extended abstract? 17:35 Fare: also, is htdp2e written using scribble, and is the source available online? 17:40 jonrafkind: cant you just have two "top" modules that contain a bunch of @include-section's ? 17:42 samth: Fare: yes, and no 17:55 (quit) soegaard: Quit: soegaard 18:06 (quit) jeapostrophe: Ping timeout: 244 seconds 18:13 (quit) jrslepak: Quit: This computer has gone to sleep 18:17 (join) RacketCommitBot 18:17 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/0ea03360c34b311809816904daa33675176effca 18:17 RacketCommitBot: [racket/master] template: improve syntax property support - Ryan Culpepper 18:17 (part) RacketCommitBot 18:19 (quit) anRch: Quit: anRch 18:23 (quit) MayDaniel: Read error: Connection reset by peer 18:27 (join) hash_table 18:30 (join) MayDaniel 18:32 (quit) MayDaniel: Client Quit 18:38 Fare: jonrafkind, well, I'd like to have more control. Maybe some conditional-inclusion of text depending on some flag set in the top module. 18:40 (join) Kaylin 18:47 (join) jrslepak 19:01 (quit) Kaylin: Quit: Leaving. 19:02 jonrafkind: well that doesn't sound too hard. you could make a parameter 19:09 (join) yoklov 19:21 (quit) lebro: Ping timeout: 246 seconds 19:46 (join) jeapostrophe 19:47 (quit) jeapostrophe: Changing host 19:47 (join) jeapostrophe 19:47 (quit) mceier: Quit: leaving 19:49 (quit) korkyra: Ping timeout: 245 seconds 19:51 (quit) acarrico: Read error: Operation timed out 20:08 (join) acarrico 20:11 (join) bro_grammer 20:14 (quit) hash_table: Ping timeout: 272 seconds 20:23 (quit) stchang: Read error: Operation timed out 20:24 (join) Kaylin 20:26 (join) stchang 20:29 (quit) bjz: Quit: Leaving... 21:35 (join) jackhammer2022 21:44 mye_: rudybot: (require plot) 21:44 rudybot: mye_: your sandbox is ready 21:44 rudybot: mye_: error: file-or-directory-modify-seconds: `read' access denied for /home/erich/.racket/racket-prefs.rktd 21:45 mye_: rudybot: (plot3d (polar3d (λ (θ ρ) 1) #:x-min 2 #:y-min 2 #:z-min 2)) 21:45 rudybot: mye_: error: reference to an identifier before its definition: plot3d in module: 'program 22:00 (quit) eli: Ping timeout: 252 seconds 22:08 mye_: http://docs.racket-lang.org/plot/renderer3d.html#(def._((lib._plot/main..rkt)._polar3d)) 22:08 mye_: latitude and longitude seem to be mixed up 22:39 (join) mithos28 22:52 (join) RacketCommitBot 22:52 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/1a77f4ee0e56aacde4ced673cbd68f21fd963027 22:52 RacketCommitBot: [racket/master] added recontract-out - Ryan Culpepper 22:52 (part) RacketCommitBot 22:53 mithos28: awesome, I was waiting for recontract-out for a while 23:11 Fare: Ahem. Is there an include that isn't an include-section ? 23:15 (join) blabla 23:16 blabla: any resources on trees/graphs with racket ? 23:16 mithos28: blabla: What are you trying to do? 23:18 blabla: I want to learn implementations of these data structures with racket 23:18 (join) hash_table 23:19 mithos28: You want to look at implementations to learn how they work, or you want to learn how to implement them yourself in racket? 23:20 Fare: lil-ilc2012.scrbl:1:0: module: identifier is already imported 23:20 blabla: mithos28: the second one 23:21 (quit) bro_grammer: Ping timeout: 240 seconds 23:21 mithos28: http://htdp.org/2003-09-26/Book/curriculum-Z-H-19.html#node_sec_14.2 23:22 mithos28: Those are a bunch of exercises for working on binary search trees. Was that the sort of thing you were looking for? 23:22 blabla: mithos28: I am going through this, but I am looking for some more implementation examples too 23:23 blabla: infact I should have said "both" to the answer for your last questions, my bad 23:23 blabla: question 23:24 blabla: i found this: http://www.emba.uvm.edu/~snapp/teaching/cs32/src/graphsearch.scm 23:26 mithos28: http://planet.racket-lang.org/display.ss?package=pfds.plt&owner=krhari 23:26 mithos28: that is a bunch of data structures, I don't think there are any pure trees in there 23:27 mithos28: Actually maybe look at the set implementation 23:28 blabla: mithos28: I am not much accustomed to typed racket but this looks interesting: http://planet.racket-lang.org/package-source/krhari/pfds.plt/1/5/redblacktrees.ss 23:28 rudybot: http://tinyurl.com/bpb6pjg 23:28 blabla: thanks 23:29 mithos28: If you know racket, it should be pretty readable 23:29 mithos28: : is used to indicate typed racket stuff 23:30 blabla: (: xor : Boolean Boolean -> Boolean) here for example like a "Contract" 23:31 mithos28: Yep, except that it is checked before you run the program, so you know that you don't call it with bad values 23:33 blabla: cool, got it, thanks 23:40 Fare: OK, solved the provide/require issues. But how do I parameterize around a require, or otherwise set my flag around the require? 23:40 Fare: or before 23:41 mithos28: Fare: What are you trying to do? I think I missed the begining of your problem 23:42 mithos28: TR's optimizer is fun to break 23:42 Fare: trying to extract both a short and a long version of a same scribble document 23:43 Fare: so all the document is in ds.scrbl, with two toplevel modules long.scrbl and short.scrbl 23:43 Fare: how do I do things differently in ds.scrbl depending on which it's required from? 23:44 (quit) jeapostrophe: Ping timeout: 272 seconds 23:44 mithos28: Could you use a parameter and check its value? 23:44 Fare: how? 23:44 Fare: how do I change the parameter? 23:45 mithos28: (current-document 'short) 23:45 Fare: (parameterize ((foo 1)) (require ...)) ==> require: not at module level or top level 23:45 mithos28: if you have defined current-document as a parameter 23:45 mithos28: don't use parameterize 23:47 (quit) blabla: Ping timeout: 245 seconds 23:50 Fare: doesn't look like it's run before the require. 23:52 mithos28: yeah thats right 23:53 mithos28: Put it in a function? 23:53 mithos28: I'm not a scribble expert, AKA never use it 23:55 Fare: all require's happen at compile-time. 23:56 mithos28: actually its a bit different than that 23:56 mithos28: all requires are discovered at expansion, and all required modules are instantiated before the module is instantiated 23:57 Fare: so my flag-changing should happen in a required module? 23:58 mithos28: You shouldn't parameterize over who is requiring you 23:58 mithos28: you should export something that is supposed to be parameterizable 23:58 mithos28: a function or a unit 23:59 mithos28: if you are really stuck on sticking with require, using dynamic require might solve your issue 23:59 Fare: indeed, that works!!! 23:59 mithos28: Which?