00:09 asumu: adu: anything in particular that prompted that? :) 00:10 (join) adu_ 00:12 (quit) adu: Ping timeout: 245 seconds 00:12 (nick) adu_ -> adu 00:38 (quit) mithos28: Quit: mithos28 00:44 (quit) dto: Remote host closed the connection 00:48 (quit) Fare: Ping timeout: 272 seconds 00:49 (quit) dauterive: Quit: Leaving 00:53 (join) ambrosebs 00:53 (join) adu_ 00:55 (join) mithos28 00:57 (join) bjz 00:58 (join) soegaard 01:15 (quit) asvil: Ping timeout: 245 seconds 01:35 (join) Kaylin 01:38 (quit) mceier: Quit: leaving 01:40 (quit) soegaard: Quit: soegaard 01:42 (quit) jao: Ping timeout: 256 seconds 01:44 (quit) kvda: Quit: z____z 01:49 (quit) adu_: Quit: adu_ 01:55 (quit) Kaylin: Read error: Connection reset by peer 02:32 (join) mceier 02:36 (join) Kaylin 02:45 (quit) mithos28: Quit: mithos28 02:51 (quit) ASau: Quit: I be back. 03:01 (join) mithos28 03:06 (quit) jonrafkind: Ping timeout: 272 seconds 03:08 (quit) racycle: Quit: racycle 03:18 (join) noam__ 03:21 (quit) noam_: Ping timeout: 256 seconds 03:29 (quit) mithos28: Quit: mithos28 03:31 (join) egnarts-ms 03:41 (join) hkBst 03:42 (quit) sirdancealo2: Ping timeout: 264 seconds 03:47 (quit) Nisstyre-laptop: Ping timeout: 245 seconds 03:50 (join) jao 03:51 (quit) jao: Changing host 03:51 (join) jao 03:57 (join) rohni 03:58 (join) sirdancealo2 04:00 (join) bitonic 04:02 (join) basdirks 04:04 (quit) ambrosebs: Remote host closed the connection 04:16 (quit) Kaylin: Read error: Connection reset by peer 04:24 (quit) jao: Ping timeout: 252 seconds 04:39 (quit) sirdancealo2: Ping timeout: 256 seconds 05:13 (quit) vipjun: Ping timeout: 260 seconds 05:16 (join) vu3rdd 05:16 (quit) vu3rdd: Changing host 05:16 (join) vu3rdd 05:38 (join) ambrosebs 05:50 (quit) rohni: Quit: Leaving. 05:54 (join) mye 05:55 (join) sirdancealo2 06:28 (quit) bitonic: Ping timeout: 256 seconds 06:30 (quit) sirdancealo2: Ping timeout: 245 seconds 06:41 (quit) vu3rdd: Read error: Connection reset by peer 06:43 (join) sirdancealo2 06:43 (join) vu3rdd 06:43 (quit) vu3rdd: Changing host 06:43 (join) vu3rdd 06:50 (quit) vu3rdd: Read error: Connection reset by peer 06:54 (join) rohni 06:59 (quit) yacks: Ping timeout: 255 seconds 07:02 (quit) sirdancealo2: Ping timeout: 245 seconds 07:02 (join) didi 07:03 (part) troydm: "What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset" 07:06 (join) ambroseb_ 07:06 (quit) ambrosebs: Ping timeout: 255 seconds 07:12 (join) yacks 07:13 (join) sirdancealo2 07:19 (join) jeapostrophe 07:19 (quit) jeapostrophe: Changing host 07:19 (join) jeapostrophe 07:33 (quit) ambroseb_: Ping timeout: 276 seconds 07:35 (join) vu3rdd 07:35 (quit) vu3rdd: Changing host 07:35 (join) vu3rdd 07:38 (join) bitonic 07:38 (quit) sirdancealo2: Ping timeout: 245 seconds 07:38 (join) sizz_ 07:38 (quit) sizz: Ping timeout: 245 seconds 07:39 (join) mye_ 07:40 (quit) mye: Ping timeout: 240 seconds 07:40 (nick) mye_ -> mye 07:41 (join) vipjun 07:53 (join) cdidd 08:00 (join) sirdancealo2 08:01 (join) vkz 08:10 (quit) vkz: Quit: vkz 08:10 (join) mizu_no_oto 08:12 (join) ambrosebs 08:16 (join) asvil 08:18 (join) marcin 08:19 (quit) marcin: Client Quit 08:22 (quit) cored: Ping timeout: 256 seconds 08:24 (join) cored 08:24 (quit) cored: Changing host 08:24 (join) cored 08:27 egnarts-ms: are Racket hash tables reasonably lightweight ? for example, can they be used like dictionaries in Python or plain objects in JS ? 08:28 didi: egnarts-ms: Try it. :^) 08:29 egnarts-ms: i mean, when there are pretty many of small hashtables (3-10 key-value pairs) 08:29 egnarts-ms: didi: i will :) 08:29 didi: egnarts-ms: For small tables, I use assocs. But that's just me. 08:30 (join) Fare 08:31 egnarts-ms: didi: yeah, this is traditional Lisp approach. but you know, what's wrong with alists is that you always worry whether they're still appropriate (not too long) 08:32 egnarts-ms: in other words, they're not scalable, to my mind 08:32 didi: egnarts-ms: I say they will always be. 08:32 didi love some assoc in the morning 08:32 egnarts-ms: didi: what's the need for hashtables then ? 08:33 didi: egnarts-ms: You'll have to ask someone more knowledgeable than me. I like both. 08:35 egnarts-ms: didi: :) okay. i just incline to believing that Python/JS-like approach is really good: you need key-value mapping and you use dictionaries/objects, and that's it 08:35 egnarts-ms: didi: no extra philosophy or design decision 08:35 didi: egnarts-ms: You have that too with Racket. 08:35 didi: egnarts-ms: And freedom to choose. 08:36 egnarts-ms: didi: (though i'm not sure that, say, Python dictionaries are well-optimized) 08:36 didi: egnarts-ms: Also, there is `dictionary'. 08:36 egnarts-ms: didi: ... for large number of entries 08:37 didi: egnarts-ms: AFAIK, Python's dictionaries are hash tables. 08:37 didi: egnarts-ms: Observe that the key has to be hashble. 08:37 egnarts-ms: didi: yes, they are 08:38 egnarts-ms: didi: BTW, Racket `dictionary' is not first-class 08:38 egnarts-ms: https://github.com/plt/racket/blob/master/collects/racket/private/dict.rkt 08:38 didi: egnarts-ms: What do you mean? 08:38 egnarts-ms: `dictionary' is one of 1) hashtable, 2) assoc, ... (something else) 08:38 didi: egnarts-ms: Ye. 08:39 didi: It's an abstraction. 08:40 egnarts-ms: didi: i think i just should measure performance with Racket hashtables 08:40 didi: egnarts-ms: That's the spirit. 08:46 (join) RacketCommitBot 08:46 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/59FcYQ 08:46 RacketCommitBot: racket/master e6dc9c2 Robby Findler: use clipping in the recent commit to actually test bounding boxes 08:46 (part) RacketCommitBot 08:46 (join) Nisstyre-laptop 08:46 (join) zyoung 08:56 (join) RacketCommitBot 08:56 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/JZfphQ 08:56 RacketCommitBot: racket/master 74c3c13 Matthias Felleisen: added a void contract to fix setup 08:56 (part) RacketCommitBot 08:58 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 08:59 (join) mizu_no_oto 09:01 (quit) mizu_no_oto: Client Quit 09:04 (join) vkz 09:06 (quit) Nisstyre-laptop: Ping timeout: 260 seconds 09:15 (join) anRch 09:17 (join) soegaard 09:17 (join) mizu_no_oto 09:21 (quit) Twey: Excess Flood 09:22 (join) Twey 09:28 (join) myx 09:39 (quit) jeapostrophe: Ping timeout: 245 seconds 09:40 soegaard: asumu: The Racket version of this task looks fishy: http://rosettacode.org/wiki/Modular_Arithmetic 09:49 (join) jeapostrophe 09:49 (quit) jeapostrophe: Changing host 09:49 (join) jeapostrophe 09:56 (join) sstrickl 09:56 (quit) sstrickl: Changing host 09:56 (join) sstrickl 10:04 (join) racycle 10:04 asumu: soegaard: hmmm, does it need another `mod`? 10:06 asumu: egnarts-ms: you can just use dictionary functions (e.g., dict-ref, etc.) and then it doesn't matter if you use alists or hashtables. 10:06 asumu: (or rather, you can switch whenever it's convenient then) 10:06 (quit) cored: Quit: leaving 10:14 (quit) anRch: Quit: anRch 10:19 (quit) soegaard: Quit: soegaard 10:19 (quit) hkBst: Quit: Konversation terminated! 10:21 (join) mithos28 10:46 (join) neyuh 10:50 (quit) neyuh: Ping timeout: 245 seconds 10:54 (quit) mceier: Quit: leaving 11:04 (quit) sirdancealo2: Ping timeout: 255 seconds 11:06 (join) dyoo 11:10 (quit) didi: Ping timeout: 255 seconds 11:14 (join) mye_ 11:16 (quit) yacks: Read error: Connection reset by peer 11:16 (join) cored 11:17 (quit) basdirks: Ping timeout: 245 seconds 11:17 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 11:17 (join) yacks 11:18 (quit) yacks: Max SendQ exceeded 11:19 (join) yacks 11:19 mithos28: samth, stamourv: Would either of you have time to look at my pull requests? I think I addressed all of stamourv's points. 11:20 (quit) ambrosebs: Remote host closed the connection 11:21 stamourv: mithos28: Planning to do it today. 11:22 (join) Agent-P 11:22 Agent-P: Hello 11:22 Agent-P: I need Help with "JAVA" 11:22 mithos28: stamourv: Great 11:23 stamourv: Agent-P: You may want to try #java for that. 11:23 mithos28: Agent-P: This is the #racket room, you may have better luck in a java specific one. 11:23 Agent-P: #java Cannot join channel (+i) - you must be invited 11:23 Agent-P: I must be Invited to join the Chanel ! 11:23 Agent-P: So if someone is on the #java channel please invite me ! 11:23 (join) sirdancealo2 11:24 stamourv: Agent-P: Maybe there's a ##java ? 11:25 dyoo: what's the java question, out of curiosity? 11:25 mithos28: stamourv: Do you know why subtype and cgen have totally different code even though they need to do almost exactly the same thing 11:26 dyoo: agent-p: … and does your question have a relationship to racket in any way? That might make it ok :) 11:27 mithos28: I'm trying to figure out how I can use prototypes (in odersky's sense) to make inference better 11:27 Agent-P: well 11:27 mithos28: and it would require a function almost exactly like subtype but with a slight twist 11:27 Agent-P: I copied this anywhere but no one seems to be interested ... 11:27 Agent-P: no it does not have any relation with Racket ... 11:27 Agent-P: I need help .. It's about Decorators in Java .. I am trying to program a game but I get Failures and one Error ! Please Help ... ! 11:27 Agent-P: this is my Test : 11:28 Agent-P: http://pastebin.com/GMSv6wee 11:28 Agent-P: and this is my Class 11:28 Agent-P: http://pastebin.com/0uyR794B 11:28 dyoo: agent-p: darn. Completely out of scope for me. I don't think I can help; I havne't played with decorators. 11:28 stamourv: mithos28: I don't know. I haven't spent much time in the inferencer. 11:29 mithos28: ok, I knew sam would be the better person to ask but its hard being online at the same time as you east coasters 11:29 Agent-P: well 11:29 Agent-P: I'm here 11:30 Agent-P: All time ! 11:30 Agent-P: I just need to find a solution for this :) 11:30 mithos28: Agent-P: But I doubt you have an answer to my question. 11:30 stamourv: mithos28: samth's also traveling a lot these days. 11:31 Agent-P: which question ? 11:31 mithos28: Yeah, he said 11:31 (quit) dyoo: Quit: dyoo 11:31 mithos28: Agent-P: Why subtype and cgen have totally different code even though their algorithims are almost identical 11:32 Agent-P: That wasn't my idea ... 11:33 mithos28: Right which is why I doubted you having an answer to it. :) 11:33 Agent-P: It's a project i don't have the right to change anything .. I know it's weird but I have to live with that ! 11:33 (quit) egnarts-ms: Ping timeout: 245 seconds 11:33 Agent-P: yep :/ 11:37 (join) dyoo 11:37 (quit) Agent-P: Read error: Connection reset by peer 11:37 (quit) rohni: Quit: Leaving. 11:40 (join) didi 11:50 stamourv: mithos28: I think I've looked at all at the ones you updated. 11:50 stamourv: Looking at the new ones now. 11:50 mithos28: Great, those two should be simple. Unlike the poly dots one which is a much larger overhaul 11:53 (join) jbclements 11:55 (quit) zyoung: Ping timeout: 245 seconds 11:56 (join) zyoung 11:56 (quit) jeapostrophe: Ping timeout: 255 seconds 11:58 (quit) vu3rdd: Ping timeout: 272 seconds 12:02 (join) jeapostrophe 12:03 (join) basdirks 12:03 (join) Aune 12:03 (join) mceier 12:04 stamourv: mithos28: Right, I didn't feel comfortable reviewing that one. 12:05 stamourv: asumu: Could you have a look at it? You've been working with polydots more than I have. 12:05 asumu: stamourv: sure 12:05 mithos28: and breaking them :P 12:06 mithos28: http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&pr=13576 12:07 asumu: That's not a recent regression is it? It doesn't seem to work in 5.3 either. 12:07 mithos28: Oh, not you then. I assumed it was related to you fixing the scoping 12:08 mithos28: stamourv: Have you added optimizer tests recently? 12:08 asumu: I don't think so. My guess is that has never worked. :p 12:08 asumu: (although I did break some nested Alls with the scope change) 12:09 stamourv: mithos28: I think so, why? 12:09 mithos28: because I'm getting diffs now from them when trying to run the integration tests on all of these commits 12:10 mithos28: If you added them thats good, it means that just more things need to be cleaned up with the check-below commit 12:10 mithos28: if you hadn't that would imply an interesting interaction between my commits 12:11 sstrickl: mithos28: shouldn't that technically be (lister . args)? Though that syntax doesn't seem to work at all with define: 12:12 mithos28: except that it looks bad, vector-length is doing a known-length optimization when it should. Well I'll work on that commit some more 12:12 stamourv: Ok, I checked. Yes I did add new optimizer tests. The latest were added on Feb 20. 12:12 stamourv: sstrickl: Nice to see you here, I was planning to email you today. 12:13 sstrickl: stamourv: oh, well, then I chose wisely 12:13 stamourv: sstrickl: But I guess I can just talk to you here instead. :) 12:13 sstrickl: stamourv: what's up? 12:13 stamourv: It's about `define/contract'. 12:13 mithos28: sstrickl: To annotate an identifier in TR you do (var : Type). (lister . (var : Type)) reads equivalent to (lister var : Type) 12:13 (quit) basdirks: Ping timeout: 250 seconds 12:13 sstrickl: okay, what specifically about it? 12:13 stamourv: I've been working on contract-aware profiling, and noticed something problematic about `define/contract' in one of my example programs. 12:13 sstrickl: mithos28: oh, right, sorry, it's been long enough since I've worked with TR syntax that I'd forgotten. 12:14 stamourv: Basically, `define/contract' applies its contract every time the `define/contract'ed function is called. 12:14 stamourv: This can get *very* expensive. 12:14 sstrickl: stamourv: Oh, I bet it can. 12:14 stamourv: In the example I had (a game that Matthias wrote), contract *application* time accounted for about 20%. 12:15 stamourv: Now, `define/contract' needs to do that because the defined identifier can be mutated, so it may need to re-apply the contract, in case there's a new value there. 12:15 sstrickl: stamourv: yep 12:15 stamourv: So in a sense, this means that `define/contract' applies the contract to the *location*, not the *value*. 12:16 stamourv: Now, if we were to change it to contract the value, we'd only need to apply the contract once. 12:16 stamourv: Of course, that would mean that, if the identifier is mutated, the contract "goes away". 12:16 sstrickl: stamourv: if there was a nice way of ensuring that there's no mutations _within_ the region (it's easy to do without), then we could always allow for marking contracted identifiers as immutable/mutable, and default functions to immutable and normal identifiers to mutable 12:17 sstrickl: stamourv: yep, exactly 12:17 sstrickl: (I've been thinking about this for a while, since obviously you're not the only person who runs into this issue :/) 12:17 mithos28: Couldn't you just reapply the contract on set! 12:17 stamourv: Checking for mutability could fix that, but that would require local-expand, which is probably not desirable here. 12:17 sstrickl: mithos28: that's the part that makes it easy for without, but remember that you can mutate the value within the region as well 12:18 sstrickl: what you might be able to do, though, is create a set!-transformer for the identifier within the region, that does the right things, but I've never tried to see if I can actually do that 12:18 mithos28: sstrickl: Yes that would be what I was thinking 12:18 stamourv: sstrickl, mithos28: Right. That sounds doable. 12:19 stamourv: And that should preserve the semantics, too. 12:19 sstrickl: right 12:19 stamourv: Now, I'm not sure which semantics makes more sense though, contracting the location or the value. 12:19 sstrickl: so yeah, I've had that idea rolling around my head, but things have been busy enough around here that I haven't had a chance to make that change, sorry :/ 12:20 stamourv: I'm kinda tempted to give it a try. 12:20 sstrickl: go for it! I'll be more than happy to look at what you do and check it before you commit it 12:20 stamourv: I've been playing in the contract system a fair amount, so maybe I could do it. 12:20 mithos28: This is one of the reasons I love Racket. That something like this is even possible. 12:20 stamourv: I'll look into it, maybe later today. 12:20 stamourv: mithos28: Agreed! 12:20 sstrickl: stamourv: fantastic, thank you :) 12:21 mithos28: and the best part is that at runtime you pay no cost for it if it is not mutated 12:21 stamourv: sstrickl: If that doesn't work, then the future Contract Coach will at least warn you about it. 12:21 sstrickl: stamourv: you're a good man and thorough 12:21 stamourv: :) 12:21 sstrickl: stamourv: excellent, though I hope it does because I'd rather not make people even LESS likely to use them except in times of extreme need 12:22 sstrickl: (it does work, rather) 12:22 stamourv: Agreed. 12:22 mithos28: Yes, I really want contracts on by default in TR. 12:22 mithos28: The issue is that they are just too slow currently 12:22 stamourv: But even if it doesn't work, the Contract Coach wouldn't recommend removing the contract, just turning them into provide/contract. 12:23 sstrickl: stamourv: yeah, of course 12:23 stamourv: Which, with submodules, can basically end up giving you similar code. 12:23 stamourv: mithos28: chrdimo is looking into it, actually. 12:23 stamourv: The new option contracts could be a solution. 12:23 mithos28: what are option contracts, I have seen some commits about them 12:23 sstrickl: I've seen his commits about those go by, but haven't read them enough to get the idea about it 12:24 mithos28: Yeah Google is not helpful 12:24 mithos28: I'm not looking for stocks 12:24 stamourv: They're basically contracts that you can check partially, or not at all, and still have a reasonable blame story. 12:24 sstrickl: oh, interesting 12:25 stamourv: So, IIUC, chrdimo's plan would be to enable the TR contracts by default, but either disable the checking, or only check the first n times the boundary is crossed. 12:25 sstrickl: is there a particular venue he's planning on targeting that work with? I'd be interested in seeing the theory writeup 12:25 stamourv: It wouldn't provide as much checking, but it would still catch some bugs, and would help contracts stay in sync with the code, which is currently a big problem. 12:26 stamourv: sstrickl: IIRC, he wrote about them in is thesis. 12:26 sstrickl: stamourv: yeah, agreed. I remember doing TR work in the past where we'd turn on contracts then realize how badly they'd fallen behind 12:26 sstrickl: oh, then I should check that out. 12:26 mithos28: stamourv: I thought half the issue was that we didn't want the contract require in production TR 12:26 (join) jonrafkind 12:27 (join) RacketCommitBot 12:27 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/qb4C2Q 12:27 RacketCommitBot: racket/master 9f01d26 Eric Dobson: Cleanup kw/opt lambda annotations. 12:27 RacketCommitBot: racket/master d59a600 Eric Dobson: Make kw/opt lambda special checks work with other expected values.... 12:27 RacketCommitBot: racket/master ddf0c39 Eric Dobson: Reduce unnecessarily complicated restrict case. 12:27 (part) RacketCommitBot 12:27 stamourv: mithos28: IIUC, option contracts with checking turned off should be pretty low overhead. 12:28 stamourv: chrdimo is looking into it now, so we'll know the answer soon, I hope. 12:28 stamourv head out for lunch. 12:28 mithos28: ok, I have a optimizer question now that I have gotten the other code in 12:28 stamourv: s/head/heads/ 12:28 stamourv: mithos28: Is it quick? 12:28 mithos28: not really 12:28 mithos28: I'll catch you another day 12:29 stamourv: I'll be back in 1h or so. 12:29 mithos28: I'll be at work by then 12:29 stamourv: Or you can just paste it here, and I can answer it when I'm back. 12:29 stamourv: Or you can send me an email. 12:29 mithos28: Its more back and forth 12:29 (quit) dyoo: Quit: dyoo 12:29 (join) dauterive 12:29 stamourv: Ok, whenever you want. 12:31 sstrickl: stamourv: BTW, I'll try to stay on, so if you do start working on the stuff we discussed and need questions answered, feel free to ping me or /msg me, send me an email if I've disappeared 12:31 (join) dyoo 12:36 (join) soegaard 12:36 soegaard: asumu: No. The problem is that (f 10) is computed without using modular exponentiation. It ought to use modexpt instead of expt. 12:39 (quit) myx: Ping timeout: 260 seconds 12:40 (join) ASau 12:47 (join) Kaylin 13:01 (quit) Kaylin: Read error: Connection reset by peer 13:06 (quit) dauterive: Quit: Leaving 13:12 (quit) ASau: Ping timeout: 264 seconds 13:12 (join) snorble_ 13:15 (quit) asvil: Ping timeout: 245 seconds 13:17 (join) ASau 13:19 (quit) Aune: Quit: Hath Deprated 13:20 (join) Aune 13:20 (join) basdirks 13:25 (quit) basdirks: Ping timeout: 256 seconds 13:29 (quit) jeapostrophe: Ping timeout: 272 seconds 13:30 (join) rich1 13:32 (join) RacketCommitBot 13:32 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/4-m2rg 13:32 RacketCommitBot: racket/master 2170e17 Robby Findler: tidy up gui... 13:32 RacketCommitBot: racket/master 4997800 Robby Findler: make-traversal's optional argument is now ignored... 13:32 (part) RacketCommitBot 13:37 (join) basdirks 13:46 rich1: as an example, given... 13:46 rich1: (define (logb n b) (/ (log n) (log b))) 13:46 rich1: (define (log256 n) (logb n 256)) 13:47 rich1: should log256 be a define or a macro - alternatively, as a define will racket automatically optimise it away 13:48 didi: rich1: Procedure. 13:48 rich1: didi: gotcha. 13:49 jbclements: rich1: I claim that logb may very well be inlined, leading to the same performance you'd get from a macro; was that your question? 13:50 rich1: jbclements: yes - you put it much clearer 13:50 rich1: out of interest why does racket binding of log have arity 1, but the rnr6 binding have 2 to allow for custom base? 13:52 (join) anRch 13:52 jbclements: rich1: I'm guessing it's for symmetry with "exp", but you might well respond that there's then no analog to "expt". I'm guessing it was personal preference on mflatt's part. 13:54 rich1: righto 13:57 stamourv: rich1: If you want to check whether your helper function is being inlined, you can use the Optimization Coach DrRacket plugin. 13:58 (join) DanBurton 14:00 rich1: stamourv: nice, it also said that logb was inlined as well as log256 14:01 rich1: does racket base inlining on the size of expression or "deterministicness" ? 14:02 rich1: found an entry in the manual, reading 14:02 stamourv: Size of function body is the main factor. 14:04 didi: rich1: Be careful with macros like that. If you find a bug, you'll have to eval all the procedures that uses it. 14:05 didi: Something like this will be impossible: 14:05 didi: rudybot: (define (foo) 42) 14:05 rudybot: didi: Done. 14:05 didi: rudybot: (define (bar) (foo)) 14:05 rudybot: didi: Done. 14:05 didi: rudybot: (bar) 14:05 rudybot: didi: ; Value: 42 14:05 didi: (define (foo) 7) 14:05 didi: rudybot: (define (foo) 7) 14:05 rudybot: didi: Done. 14:05 didi: rudybot: (bar) 14:05 rudybot: didi: ; Value: 7 14:06 asumu: soegaard: ah, right. The issue was that the problem statement explicitly said that wasn't allowed. 14:06 asumu: So maybe I should just remove the entry. 14:06 soegaard: It is a rather strange task description. 14:09 soegaard: If only modexpt support a modulus of +inf.0 ... 14:10 soegaard: Since the task is to demonstrate that operators can be redefined, it would we fine to define new versions of +,-, and expt in a submodule and use them instead. 14:10 rich1: didi: are you saying if bar was a macro, that the 2nd application of bar would be 42 ? 14:10 didi: rich1: Yeap. 14:11 asumu: soegaard: yeah, that's a good point. Or even just (define + mod+) 14:11 didi: rich1: No. 14:12 soegaard: Yeah, but then f doesn't work for general numbers. 14:12 didi: rich1: I mean, If `foo' was a macro. 14:13 soegaard: Actually I can't see that one can solve the task if numbers in Z/pZ are represented as plain numbers. 14:14 rich1: didi: ok cool, good catch. 14:14 jbclements: didi: … but #lang racket doesn't allow the redefinition of an identifier anyway. 14:14 soegaard: "It should behave the same way with normal and modular integers" implies that one can look at an integer and see what type it is. 14:15 jbclements: rich1: the classic problem with a macro is that it can't then be passed as a function. 14:15 didi: jbclements: Sorry, I don't know what you mean. 14:15 rich1: jbclements: e.g. to map? 14:16 asumu: soegaard: I find this to be a problem with Rosetta in general. Their task statements are often silly. 14:16 soegaard: Yes! 14:16 didi: rich1: Yes, like `map'. 14:16 didi: Some wrap macros inside lambdas, but... 14:17 rich1: starting to see why the style guide says use define :) 14:17 rich1: much simpler 14:22 (quit) yacks: Quit: Leaving 14:24 (join) serhart 14:27 (quit) Aune: Quit: Hath Deprated 14:28 didi: jbclements: Oh, I see what you meant. Right. 14:32 (join) jeapostrophe 14:32 (quit) jeapostrophe: Changing host 14:32 (join) jeapostrophe 14:39 (quit) anRch: Quit: anRch 14:53 (quit) jeapostrophe: Read error: Operation timed out 14:59 (quit) bitonic: Ping timeout: 252 seconds 15:03 (join) jao 15:03 (quit) jao: Changing host 15:03 (join) jao 15:04 (quit) rich1: Quit: Leaving. 15:17 (join) elazul 15:19 (quit) vkz: Quit: vkz 15:21 (quit) soegaard: Quit: soegaard 15:24 (quit) didi: Ping timeout: 245 seconds 15:26 (join) didi 15:41 (join) rich1 15:42 (join) soegaard 15:44 soegaard: Nice examples: http://srfi.schemers.org/srfi-13/srfi-13.html#string-replace 15:47 stamourv: soegaard: That's a horribly unintuitive function/interface, though. 15:48 stamourv: It's a bad sign that the best documentation is the function body itself. 15:48 (join) bitonic 15:49 soegaard: The convention follows substring. 15:49 stamourv: Yes, but with 4 magic numbers. 15:49 soegaard: Well, the last two are optional :-) 15:50 stamourv: Yes, but I'm not sure the extra flexibility is worth the extra confusion. 15:50 stamourv: Removing the implicit substring on s2 would make the function a lot clearer, IMO. 15:51 (quit) jonrafkind: Ping timeout: 255 seconds 15:51 soegaard: True. 15:52 soegaard: I ended up reading srfi 13 when searching for string-prefix? and string-suffix? 15:53 soegaard: Eli added some useful string functions to racket/string, but there some nice additional ones in srfi 13. 15:56 rich1: how can i remove duplicates from a list? make another but check for each element if it's already in there? 15:56 soegaard: An amusing aside: string-prefix? is startsWith in Python. Guess which language came from academia :-) 15:56 Fare: remove-duplicates ? 15:57 rich1: Fare: knew i was missing something - search for unique, distinct though 15:57 rich1: s/search/searched 15:58 soegaard: Is there a blessed way of adding additional keywords to the documentation? 15:58 Fare: rich1: actually, that's a CL name -- dunno if scheme and/or racket has that name 15:58 Fare: rich1: that said, you realize that checking for duplicates in a list is in O(n), don't you? 15:58 stamourv: soegaard: There's a scribble command for it, I forget what it's called. Lemme look it up/ 15:59 (join) mizu_no_oto 16:00 dyoo: rich1: http://docs.racket-lang.org/reference/pairs.html?q=remove-duplicates#%28def._%28%28lib._racket%2Flist..rkt%29._remove-duplicates%29%29 16:00 rudybot: http://tinyurl.com/bz76d6a 16:00 stamourv: rudybot: (require scribble/base) 16:00 rudybot: stamourv: Done. 16:00 stamourv: rudybot: doc index 16:00 rudybot: stamourv: http://docs.racket-lang.org/scribble/base.html#(def._((lib._scribble%2Fbase..rkt)._index)) 16:00 stamourv: rudybot: doc section-index 16:00 rudybot: stamourv: http://docs.racket-lang.org/scribble/base.html#(def._((lib._scribble%2Fbase..rkt)._section-index)) 16:00 stamourv: soegaard: ^ 16:00 soegaard: stamourv: thanks 16:02 rich1: Fare: won't it be O(n) for the single duplicate check - making it larger for the whole list case ? 16:02 (quit) acarrico: Ping timeout: 245 seconds 16:03 Fare: rich1: well, the trick is to convert the list to a hash-table, then do the check in linear time in the second pass 16:04 Fare: of course, you could argue that the hash-table is log n rather than constant time. 16:04 Fare: but yes, naive remove-duplicates could be O(n^2) 16:04 Fare: I don't know how naive the racket implementation is 16:04 rich1: Fare: nice. i really do stand on the shoulder of giants. i was thinking more of sorting then looping as the sort complexity has to be taken into account 16:04 dyoo: Fare: it uses a hashtable 16:05 dyoo: Fare: if the equality is one of the blessed ones, like equal? or eq? 16:05 soegaard: For small lists the O(n^2) appoach is faster. 16:06 dyoo: and it does that if the lists are short enough. See: http://git.racket-lang.org/plt/blob/HEAD:/collects/racket/list.rkt#l233 16:06 rich1: for this case i'll be dealing up to 16k elements 16:07 Fare: does racket use dynamic code generation to determine the break-even point depending on processor architecture, memory pressure, etc.? 16:07 Nisstyre: rich1: is there some reason it has to be a list in the first instance? 16:07 (join) dauterive 16:07 dyoo: Fare: the threshold in the code appears to have been derived empirically 16:07 rich1: Nisstyre: no, i just need to read 1 element per line from a file - perform an action on each of them, then filter duplicates from that result 16:08 Fare: interesting that it's set at 40. I would have guessed between 16 and 32. 16:08 soegaard: Surprising to see let-syntax to pop up in that context. 16:08 Fare: I suppose hashing is quite expensive. 16:08 asumu: soegaard: well string-starts-with? is rather long. ;) 16:09 soegaard: ;-) 16:09 (join) rohni 16:14 (join) noam 16:16 (join) Kaylin 16:17 (quit) noam__: Ping timeout: 245 seconds 16:21 (join) jonrafkind 16:48 (quit) rohni: Quit: Leaving. 16:51 (quit) mizu_no_oto: Ping timeout: 276 seconds 16:53 (join) mizu_no_oto 16:59 stamourv: sstrickl: I'm close to having a patch. 16:59 stamourv: It's not very pretty though. 16:59 sstrickl: stamourv: well, still, an ugly patch is a patch that can be cleaned up if needed, but better than no patch! 17:00 stamourv: Right. 17:00 stamourv: One slight issue is that it adds a hidden keyword to `with-contract'. 17:00 stamourv: You're already using one, but the one I add could be abused a bit more. 17:01 stamourv: The real solution would be to have a helper macro that takes these that `with-contract' expands into. 17:01 stamourv: That would take a bit of work to get the error messages right, so I'm not going to do it now. 17:01 (join) rohni 17:01 (join) RacketCommitBot 17:01 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/b9sSNA 17:01 RacketCommitBot: racket/master 1ed7e8c Burke Fetscher: Redex: generation for judgment-form side-conditions... 17:01 (part) RacketCommitBot 17:02 sstrickl: stamourv: Yeah. Well, wait, to make sure, which hidden keyword are you talking about? I thought I documented all the keywords in existence already 17:03 stamourv: No, there's also `#:region'. 17:03 stamourv: Which only seems to be used from `define/contract'. 17:04 sstrickl: I thought I'd documented that, but if not it could be. 17:04 sstrickl: Yeah, the whole point is to be able to give a more user-friendly name to the sexp used for naming the blame object (so define/contract uses `(function ,name) or `(definition ,name) depending on if it's a function-style def) 17:04 sstrickl: so anything else that expands into with-contract is more than welcome to use it as desired 17:05 sstrickl: so I guess it should be documented, I'll have to put that on a list somewhere 17:05 stamourv: Ok. 17:05 stamourv: The keyword I added is not really meant to be used publically. 17:06 stamourv: It specifies an identifier that shouldn't be contracted in all cases. 17:06 stamourv: Anyway, sending you the patch now. 17:06 sstrickl: Okay, thanks, will take a look 17:07 stamourv: The keyword I'm talking about is `#:define/contract-id'. 17:07 stamourv: I haven't run the tests yet, doing it now. 17:07 stamourv: Tried it on one example and it worked. 17:09 stamourv: Actually, fixing the interface to avoid exposing my hook shouldn't be too hard. 17:09 stamourv: I think I can get it done before happy hour. 17:09 sstrickl: Okay, I'll check out the patch as-is, and if you have an updated one to throw at me later, I'll look it over also. 17:09 (join) acarrico 17:10 stamourv: Sounds good. 17:10 stamourv: The interface changes shouldn't affect the semantics. 17:10 eli: soegaard: Which other ones? -- All I have on my todo list ATM is `string-index'. 17:11 soegaard: string-prefix? and string-suffix? and string-contains? 17:11 eli: soegaard: (re srfi-13, that is.) 17:11 sstrickl: stamourv: you're testing this with mutation within the contracted region as well, right? 17:12 sstrickl: stamourv: or is your solution only protecting against mutation from without? 17:13 stamourv: sstrickl: Haven't thought about that. 17:13 stamourv: It should be the same as before. 17:13 stamourv: I think. 17:13 sstrickl: stamourv: ... that's why I mentioned it earlier, and why I haven't taken the route you did with d/c. 17:13 (quit) basdirks: Ping timeout: 260 seconds 17:14 stamourv: Ok, maybe I misunderstood earlier. 17:14 sstrickl: No, rewrapping on access or mutation from outside (and leaving the original value uncontracted) avoids when the server mutates that value as well when the client does. 17:14 stamourv: I see. 17:15 stamourv: So in that case, we'd need 2 set!-transformers, one for the inside, that wraps only on mutation, and one for the outside, that's the current one. 17:15 stamourv: Right? 17:15 (quit) bitonic: Read error: Operation timed out 17:16 (quit) jao: Ping timeout: 248 seconds 17:16 sstrickl: Kinda. The problem is that case then causes contracts to be checked when the inside mutates it, and then the inside accesses it. 17:16 sstrickl: (that is, when values are flowing purely internally) 17:16 sstrickl: Now you see why there hasn't been a quick fix to this :) 17:17 stamourv: Mmm, I see. 17:17 sstrickl: What you _can_ do, though, is keep two values in sync, one used for the inside, one used for the outside, and every time there's a mutation internally, change both values, but with the external one getting the contract appropriately. 17:17 (join) bitonic 17:18 stamourv: How would you do that? 17:18 sstrickl: And then on the outside, you don't have to wrap on access (win!), but you do have to change both values appropriately with appropriate contract wrapping on mutation. 17:18 sstrickl: hmm, I'll outline my thoughts over email, okay? 17:18 sstrickl: or maybe I can find the old discussion of this with Robby and forward it 17:18 sstrickl: since I outlined the solution there also 17:19 (join) anRch 17:20 stamourv: Sounds good. 17:20 sstrickl: stamourv: found it, forwarding now 17:20 stamourv: Thanks. 17:21 sstrickl: stamourv: No, thank _you_ for putting time in on this :) 17:21 stamourv: Ok, I think I fixed the interface. 17:21 stamourv: Well, I'm procrastinating. ;) 17:21 sstrickl: stamourv: hey, productive procrastination is useful sometimes. 17:21 stamourv: I'm writing an experience report for ICFP with Neil ⊥, but writing doesn't work today. 17:21 stamourv: Agreed. 17:33 (quit) anRch: Quit: anRch 17:33 (quit) serhart: Quit: Leaving. 17:35 (join) kvda 17:36 (join) RacketCommitBot 17:36 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/wqlFJg 17:36 RacketCommitBot: racket/master d9c81a5 Robby Findler: declare failing test should not have failed... 17:36 (part) RacketCommitBot 17:39 (join) RacketCommitBot 17:39 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/Tx9Rbg 17:39 RacketCommitBot: racket/master eee43eb Robby Findler: like d9c81a593, but this time only 4 pixels... 17:39 (part) RacketCommitBot 17:42 (join) Kaylin1 17:42 (join) basdirks 17:44 (quit) rich1: Quit: Leaving. 17:45 (quit) Kaylin: Ping timeout: 240 seconds 17:49 jonrafkind: where are the pdf links on the newdocs page? 17:49 (quit) basdirks: Ping timeout: 255 seconds 17:49 jonrafkind: also changing the version brings you to the old docs style page 17:50 jonrafkind: oh wait i see, you have to click on one of the specific manuals, like the guide, to see the pdf link 18:11 (quit) soegaard: Quit: soegaard 18:24 (join) jeapostrophe 18:24 (quit) jeapostrophe: Changing host 18:24 (join) jeapostrophe 18:25 (quit) vipjun: Ping timeout: 245 seconds 18:25 (quit) zyoung: Ping timeout: 250 seconds 18:32 (join) mithos28_ 18:37 (quit) mithos28: Read error: Connection reset by peer 18:37 (quit) cipher: Remote host closed the connection 18:37 (nick) mithos28_ -> mithos28 18:52 (quit) kvda: Quit: z____z 18:53 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 19:01 (quit) dyoo: Quit: dyoo 19:03 (quit) bitonic: Remote host closed the connection 19:04 (join) bitonic 19:04 (quit) rohni: Quit: Leaving. 19:05 (join) Kaylin 19:07 (quit) Kaylin1: Ping timeout: 255 seconds 19:08 (join) ambrosebs 19:10 (quit) bitonic: Remote host closed the connection 19:10 (join) bitonic 19:12 (quit) jbclements: Quit: jbclements 19:18 (quit) elazul: Quit: Leaving 19:19 (join) jbclements 19:20 (quit) Mattykins: Remote host closed the connection 19:22 (join) Mattykins 19:25 (quit) didi: Quit: ERC Version 5.3 (IRC client for Emacs) 19:30 (join) DanBurto_ 19:32 (quit) jonrafkind: Ping timeout: 256 seconds 19:34 (quit) DanBurton: Ping timeout: 272 seconds 19:36 (quit) eikonos: Ping timeout: 245 seconds 19:38 (join) eikonos 19:38 (quit) eikonos: Changing host 19:38 (join) eikonos 19:39 (join) mizu_no_oto 19:46 (quit) DanBurto_: Remote host closed the connection 19:47 (quit) jeapostrophe: Ping timeout: 260 seconds 19:49 (join) kvda 19:50 (join) DanBurton 19:55 (join) jao 19:55 (quit) jao: Changing host 19:55 (join) jao 20:08 (quit) DanBurton: Remote host closed the connection 20:13 (quit) jbclements: Quit: jbclements 20:23 (quit) bjz: Read error: Connection reset by peer 20:26 (quit) eikonos: Ping timeout: 250 seconds 20:34 (join) eikonos 20:34 (quit) eikonos: Changing host 20:34 (join) eikonos 20:47 (join) cipher 20:47 (quit) cipher: Changing host 20:47 (join) cipher 20:54 (quit) mye_: Quit: mye_ 20:57 (quit) jao: Ping timeout: 248 seconds 21:06 (join) zyoung 21:13 (join) mye 21:16 (quit) mye: Client Quit 21:35 (quit) dauterive: Quit: Leaving 21:36 (join) jeapostrophe 21:36 (quit) jeapostrophe: Changing host 21:36 (join) jeapostrophe 21:38 (quit) ambrosebs: Remote host closed the connection 21:39 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 21:43 (quit) pono: Ping timeout: 264 seconds 21:44 (join) pono 21:45 (quit) pono: Changing host 21:45 (join) pono 21:56 (quit) bitonic: Ping timeout: 245 seconds 22:01 (join) ambrosebs 22:11 (join) yacks 22:23 (join) jonrafkind 23:05 (quit) jeapostrophe: Ping timeout: 245 seconds 23:19 (quit) zyoung: Remote host closed the connection 23:43 (join) verahsa 23:44 verahsa: I'm having a small issue with figuring out how to execute two separate commands on either a cond expression or something similar... would someone be willing to lend me some advice? :) 23:49 Nisstyre: verahsa: paste your code to ideone.com 23:49 Nisstyre: (use the guile option but don't run it) 23:50 verahsa: http://ideone.com/HRt3Gg 23:51 Nisstyre: okay, so where is the problem here? 23:51 verahsa: in the lgrep function, i need to both evaluate sublist of a & the first element of b as well as recursively call lgrep on a and the remainder of b 23:51 verahsa: the (lgrep SL1 lst) should return multiple lines of the list "lst", not just the first 23:51 Nisstyre: verahsa: so you want to return both things? 23:52 verahsa: I'm wanting to evaluate sublist for each element, and return any true element 23:52 verahsa: i can't seem to get *both* to work 23:52 Nisstyre: this looks like a good job for pattern matching 23:52 Nisstyre: have you looked at that? 23:53 Nisstyre: http://docs.racket-lang.org/reference/match.html 23:53 verahsa: I looked at that earlier, but it wasn't cooperating for some reason. 23:54 verahsa: Ah.... yeah, I remember now... match only returns a one item. I'm matching lists, and have to return each list that matches the search list, not just one of them or the portion of them that matches. 23:55 (join) kirk 23:55 (nick) kirk -> ksefchik 23:57 ksefchik: Would anyone be able to help me out with racket crashing?