00:02 (quit) acarrico: Ping timeout: 248 seconds 00:03 (quit) shriphani: Ping timeout: 252 seconds 00:16 (join) Nisstyre-laptop 00:22 (join) sizz 00:25 (join) sethalve_ 00:25 (join) chandler_ 00:26 (nick) chandler_ -> Guest74971 00:27 (quit) sizz_: Ping timeout: 255 seconds 00:27 (quit) jaimef_: Ping timeout: 255 seconds 00:27 (quit) chandler: Ping timeout: 255 seconds 00:27 (quit) sethalves: Ping timeout: 255 seconds 00:30 (quit) micro__: Ping timeout: 255 seconds 00:31 (join) micro__ 00:31 (nick) micro__ -> Guest90214 00:33 (join) jaimef 00:37 (quit) maxigas: Ping timeout: 252 seconds 00:38 (quit) dnolen: Ping timeout: 256 seconds 00:39 (join) eikonos 00:39 (quit) eikonos: Changing host 00:39 (join) eikonos 00:43 (quit) jaimef: Ping timeout: 245 seconds 00:43 (quit) Licenser: Ping timeout: 245 seconds 00:43 (join) Licenser 00:51 (quit) greghendershott: Ping timeout: 255 seconds 00:51 (quit) rapacity: Ping timeout: 255 seconds 00:51 (quit) mattmight: Ping timeout: 260 seconds 00:51 (quit) dca: Ping timeout: 260 seconds 00:51 (join) dca 00:51 (join) dented42 00:51 (quit) Nisstyre-laptop: *.net *.split 00:51 (quit) stchang: *.net *.split 00:51 (quit) hyko: *.net *.split 00:51 (quit) bartbes: *.net *.split 00:51 (quit) parcha: Ping timeout: 255 seconds 00:51 (join) mattmigh` 00:52 (join) brum 00:52 (join) rapacity1 00:52 (join) jaimef 00:52 (join) greghendershott_ 00:52 (join) parcha_ 00:55 (join) acarrico 00:56 (join) JStoker 00:56 (join) Nisstyre-laptop 00:56 (join) stchang 00:56 (join) bartbes 00:56 (join) hyko 00:59 (quit) JStoker: Excess Flood 01:00 (join) JStoker 01:02 (join) ASau` 01:03 (quit) JStoker: Excess Flood 01:05 (join) JStoker 01:08 (quit) ASau: Ping timeout: 245 seconds 01:14 (quit) vkz: Ping timeout: 272 seconds 01:36 (join) shriphani 01:49 (join) ohama 01:58 (quit) brum: Remote host closed the connection 02:19 (join) zacts 02:21 (quit) mithos28: Quit: mithos28 02:23 (join) mithos28 02:29 (join) brum 02:32 (quit) jonrafkind: Ping timeout: 248 seconds 02:37 (quit) brum: Ping timeout: 260 seconds 02:41 (quit) Licenser: Ping timeout: 250 seconds 02:42 (quit) yacks: Ping timeout: 260 seconds 02:43 (join) Licenser 02:50 (join) jonrafkind 02:53 (join) yacks 02:55 (quit) jao: Ping timeout: 272 seconds 02:58 (join) jao 02:58 (quit) jao: Changing host 02:58 (join) jao 02:58 (nick) jao -> Guest29974 03:00 (join) cdidd 03:04 (join) brum 03:10 (quit) zacts: Quit: ERC Version 5.3 (IRC client for Emacs) 03:13 (quit) noam_: Ping timeout: 245 seconds 03:13 (quit) brum: Ping timeout: 260 seconds 03:13 (quit) ohama: Ping timeout: 250 seconds 03:13 (join) zacts 03:18 (join) noam 03:27 (join) ohama 03:37 (quit) Nisstyre-laptop: Quit: Leaving 03:46 (quit) zacts: Remote host closed the connection 03:49 (join) zacts 03:56 (quit) shriphani: Read error: Connection reset by peer 03:57 (join) shriphan` 04:04 (join) basdirks 04:05 (join) brum 04:09 (quit) jrslepak: Ping timeout: 264 seconds 04:10 (join) jrslepak 04:10 (quit) brum: Ping timeout: 260 seconds 04:16 (quit) jonrafkind: Ping timeout: 248 seconds 04:16 (quit) bjz: Read error: Connection reset by peer 04:33 (quit) sizz: Quit: No Ping reply in 180 seconds. 04:33 (join) sizz 04:34 (quit) sethalve_: Remote host closed the connection 04:36 (quit) racycle: Quit: racycle 04:40 (join) soegaard 05:02 (join) vkz 05:06 (join) bjz 05:29 (quit) soegaard: Quit: soegaard 05:29 (quit) mithos28: Quit: mithos28 05:38 (join) soegaard 05:41 (join) Skola 05:58 (join) bitonic 06:04 (join) noam_ 06:06 (quit) shriphan`: Read error: Operation timed out 06:06 (join) brum 06:08 (quit) noam: Ping timeout: 248 seconds 06:10 (join) jeapostrophe 06:12 (quit) brum: Ping timeout: 260 seconds 06:21 (quit) cdidd: Remote host closed the connection 06:30 (quit) stchang: Read error: Operation timed out 06:33 (join) stchang 06:34 (join) cdidd 06:46 (quit) ambrosebs: Remote host closed the connection 07:00 (join) sirdancealo2 07:02 (quit) sirdancealo2: Read error: Connection reset by peer 07:03 (join) sirdancealo2 07:05 (join) sirdancealo3 07:05 (quit) sirdancealo2: Read error: Connection reset by peer 07:05 (quit) sirdancealo3: Read error: Connection reset by peer 07:05 (join) sirdancealot 07:10 (join) Kaylin 07:17 (quit) yacks: Ping timeout: 260 seconds 07:37 (quit) soegaard: Quit: soegaard 07:39 (join) ambrosebs 07:39 (quit) Kaylin: Read error: Connection reset by peer 07:46 (join) maxigas 07:47 (part) maxigas 07:51 (join) soegaard 07:56 (join) yacks 07:57 (part) greghendershott_ 08:10 (join) greghendershott_ 08:11 (quit) greghendershott_: Quit: ZNC - http://znc.in 08:21 (join) greghendershott 08:22 (join) Fare 08:39 (join) mizu_no_oto 08:42 (join) mye 08:44 (nick) ASau` -> ASau 09:00 (join) jschuste` 09:01 (quit) bjz: *.net *.split 09:01 (quit) rapacity1: *.net *.split 09:01 (quit) jschuster: *.net *.split 09:01 (quit) eli: *.net *.split 09:01 (quit) DarthRamone: *.net *.split 09:04 (join) DarthRamone 09:04 (quit) DarthRamone: Changing host 09:04 (join) DarthRamone 09:07 (join) rapacity1 09:46 (join) bjz 09:53 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:58 (join) didi 10:01 (join) mizu_no_oto 10:05 (quit) mizu_no_oto: Client Quit 10:07 (join) racycle 10:08 (join) mizu_no_oto 10:55 (nick) rapacity1 -> rapacity 10:55 (join) rapacity 11:02 (join) SunMoonStar 11:11 (join) brum 11:12 (quit) ambrosebs: Remote host closed the connection 11:12 (join) anRch 11:13 (join) ambrosebs 11:18 (join) Guest74971 11:18 (nick) Guest74971 -> chandler 11:23 (join) mithos28 11:25 (join) ddrone 11:26 ddrone: Hi! 11:26 ddrone: What is the recommended way to deal with multi-dimensional arrays in Racket? 11:26 ddrone: I am using vector of vectors and custom functions for array access, but that is not very convenient 11:26 ddrone: Is there any better way to do that? 11:31 mye: ddrone: maybe http://docs.racket-lang.org/math/array.html 11:34 ddrone: mye: Thanks! 11:36 ddrone: And I have one more question: what is the usual way to iterate over a contiguous range of numbers in Racket, when I need something like C-style for loop? 11:38 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 11:38 bremner: ddrone: did you see http://docs.racket-lang.org/guide/for.html?q=for&q=for/range#%28part._sequences%29 ? 11:39 rudybot: http://tinyurl.com/blrq7pz 11:39 soegaard: rudybot: (for/list ([x (in-range 2 5)]) (* 2 x)) 11:39 rudybot: soegaard: your sandbox is ready 11:39 rudybot: soegaard: ; Value: (4 6 8) 11:41 ddrone: bremner: Nope. Seems like I need to search documentation more thoroughly :( 11:44 (join) mizu_no_oto 12:03 (quit) didi: Read error: Operation timed out 12:06 (quit) anRch: Quit: anRch 12:07 (quit) soegaard: Quit: soegaard 12:18 (join) soegaard 12:23 (quit) bjz: Quit: Leaving... 12:25 (join) RacketCommitBot 12:25 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/Dejtfg 12:25 RacketCommitBot: racket/master 8c3eb7d Matthew Flatt: slideshow/pict: add `#:alpha' argument to `pin-line' 12:25 RacketCommitBot: racket/master 5e20f51 Matthew Flatt: fix mark handling for impersonatored procedures to match docs... 12:25 (part) RacketCommitBot 12:46 (join) eli 12:46 (quit) eli: Changing host 12:46 (join) eli 12:48 (quit) ambrosebs: Remote host closed the connection 13:12 (quit) bitonic: Ping timeout: 246 seconds 13:15 (join) jonrafkind 13:22 (quit) acarrico: Ping timeout: 264 seconds 13:27 eli: stamourv, samth, mithos28: ping 13:30 (quit) soegaard: Quit: soegaard 13:37 (join) acarrico 13:43 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 13:48 eli: stamourv, samth, mithos28: ping 13:48 (quit) yacks: Quit: Leaving 13:49 offby1: hark 13:49 eli need one of the TR people... 13:50 eli: bremner: BTW, there's a problem with that patch for the pl language, which you'll run into if you get to boxes. 13:56 (join) bitonic 13:58 (join) soegaard 14:01 (quit) acarrico: Ping timeout: 248 seconds 14:04 (join) ijp 14:10 (nick) jschuste` -> jschuster 14:14 (join) adu_ 14:23 (quit) vkz: Quit: vkz 14:28 Fare: is there a racket port of the Omniscient Debugger ? 14:28 soegaard: The stepper can step backwards. 14:28 soegaard: It works for the teaching languages. 14:44 (quit) jeapostrophe: Read error: Operation timed out 14:50 (quit) zacts: Ping timeout: 250 seconds 15:00 (join) gridaphobe 15:05 (quit) gridaphobe: Remote host closed the connection 15:08 (quit) adu_: Read error: Connection reset by peer 15:09 (join) adu_ 15:26 (quit) brum: Remote host closed the connection 15:31 (quit) adu_: Quit: adu_ 15:48 (quit) Twey: Excess Flood 15:51 (join) dyoo 15:52 (join) adu_ 15:57 (join) brum 15:58 (join) Twey 16:05 (quit) brum: Ping timeout: 250 seconds 16:07 (join) jao 16:07 (quit) jao: Changing host 16:07 (join) jao 16:11 (join) rich1 16:18 rich1: how can i make current-input-port read from 16:21 (quit) basdirks: Ping timeout: 250 seconds 16:23 (join) bjz 16:24 dyoo: rich1: it should default to reading from stdin already. 16:25 dyoo: are you seeing something contrary to this? 16:25 rich1: remembering from yesterday i got an error when running on windows using port->lines and current-input-port... 16:26 dyoo: odd! 16:26 dyoo: If you can show an example, maybe we can figure this out. That should have worked. What error did you receive? 16:26 rich1: it's most probably my fault though 16:27 (quit) mithos28: Quit: mithos28 16:27 rich1: http://paste.opensuse.org/67607359 16:27 dyoo: rich1: ok, looking... 16:27 dyoo: huh, this is taking a while to load... 16:27 rich1: the error i get is... expected input-port? given procedure: current-input-port 16:28 dyoo: sorry, the suse paste still isn't showing up. 16:28 rich1: i'll paste the liens here, 16:28 dyoo: ah 16:28 rich1: #lang racket 16:28 rich1: (for ([l (port->lines current-input-port)]) 16:28 rich1: (display l)) 16:28 dyoo: put parens 16:28 dyoo: around current-input-port 16:28 rich1: doh! 16:28 dyoo: It's a parameter. You call it to get its current value. 16:29 dyoo: note, though, that port->lines works on current-input-port by default it you omit the argument. 16:29 rich1: i feel so silly. thanks though, i'll try that 16:29 dyoo: so you can just say: (for ([l (port->lines)]) (display l)) 16:29 dyoo: rich1: no worries. I think you can actually get away with something simpler... 16:30 dyoo: You should be able to say: 16:30 dyoo: (for ([l (in-lines)]) (display l)) 16:30 dyoo: The difference being that it's streaming through stdin, rather than sucking the whole thing at a time. 16:30 (join) mithos28 16:31 rich1: nice. i'm making a "filter" program, i just happend to strip it down to plain display while figuring how to make it work 16:31 rich1: s/happend/happened 16:32 dyoo: rich1: looking back at the error message, it should hopefully be a little clearer what the system was trying to tell you 16:32 (join) brum 16:33 rich1: yeh looking back it was obvious - wood and trees 'n all that 16:33 dyoo: :) 16:37 (quit) brum: Ping timeout: 260 seconds 16:44 (quit) dyoo: Ping timeout: 248 seconds 16:45 (quit) ddrone: Ping timeout: 245 seconds 17:03 (join) mizu_no_oto 17:05 mithos28: eli: ping 17:06 (join) basdirks 17:08 (quit) jao: Ping timeout: 248 seconds 17:09 rich1: when side effects don't play a part, is the preference to use begin over begin0 or vice versa? 17:10 mithos28: rich1: When would you use begin/begin0 when there are no side effects? 17:10 rich1: in a cond... 17:11 rich1: tell a lie, my example uses side effects, doh 17:11 mithos28: ok, well that would be why I was confused 17:12 (quit) adu_: Quit: adu_ 17:12 eli: mithos28: ? 17:13 mithos28: is there a dev repo for pl? 17:14 eli: mithos28: It's eli/pl 17:14 eli: (Just checked that it's open for reading) 17:15 eli: That is -- eli/pl on our git server. 17:19 (quit) basdirks: Ping timeout: 248 seconds 17:20 (join) Kaylin 17:24 (quit) Skola: 17:29 (quit) jonrafkind: Ping timeout: 246 seconds 17:33 (join) brum 17:37 (quit) brum: Ping timeout: 248 seconds 17:38 eli: mithos28: Are you *.102.230? 17:38 mithos28: If you are asking if I just unblocked on IP, then yes 17:39 eli: Yes. 17:39 dented42: is there a version of syntax-case that works with boxes and hash tables? 17:39 mithos28: It wasn't accepting my ssh key credentials, and then totally blocked me out 17:39 mithos28: I was also likely doing something incorrectly aswell 17:40 mithos28: I'm not seeing eli/pl on here, http://git.racket-lang.org/ 17:41 eli: mithos28: Yes, trying to ssh as yourself is a common confusion which leads to your ip being blacklisted, hence that page. 17:41 eli: The web page shows only the public shared repos, not the private ones. 17:41 mithos28: ah 17:41 (join) zacts 17:41 eli: (Doing that requires a new gitolite version, and un-laziness on my side.) 17:42 mithos28: Well now I'm getting a better error message 17:42 (quit) bjz: Quit: Leaving... 17:42 mithos28: R access for pl/eli DENIED to endobson 17:42 mithos28: and thats because I have it reversed 17:42 eli: This is weird. 17:42 mithos28: It should be eli/pl 17:42 mithos28: which worked 17:42 eli: Ah, yes. 17:43 (join) adu_ 17:44 mithos28: Back to the original problem, are you suggesting that struct: should have something like #:constructor-return? Or is it that you want to be able to make ML style types/struct in some manner? 17:45 eli: mithos28: not much time, so I'll try to summarize... 17:45 eli: Having `struct:' have that option would be great -- instead od a step down from removing it from the internal form, it would be available in the user-visible form. 17:46 eli: Now, the reason for this, is that I think that most of the advantage that you'd get from an ML-style type definition is if you do a bunch of struct definitions and use their union, 17:46 (quit) Kaylin: Quit: Leaving. 17:46 eli: and if you forbid using the specific struct types -- 17:47 eli: in my syntax, the main point of (define-type T [N Number] [S String]) is that you can't use the N and S struct types, only T 17:48 eli: On top of that, if you add some way to mark these types as things that shouldn't appear in a user-visible type, then you won't be able to write any code that is specific to one of them -- you'll have to deal with both. 17:48 (quit) rich1: Quit: Leaving. 17:48 eli: I never tried it completely, of course, but I think that doing that would make it possible to use just a quick my-define-type-style macro and `match' to get an ML-style thing. 17:49 eli: Probably some more work would be needed to warn you about the specific missing types if you don't cover the whole set of variants, but that's the basic idea. 17:49 mithos28: right but struct: defines the type with the same name as the constructor 17:49 eli: Yeah, and an important part of my code is that it hides the types again. 17:50 eli: But in addition I don't use `match' -- I have `cases', which is very similar (especially now, after the change of making struct constructors into match expanders) 17:51 eli: Unifying them is something that I would love to have, since currently my students need to be aware that there's both `cases' and `match', both used in a different way. 17:51 mithos28: Well match currently has some issues in TR, with inference 17:52 mithos28: But it seems that what you really want from TR is a better way of making your own structure types 17:53 mithos28: Be that through struct: or through a more primitive form (that doesn't exist yet) 17:56 eli: mithos28: Not exactly -- I want a way to define a bunch of `struct:'s and mark a union of them all as a disjoint union, which requires forbidding using them directly. 18:00 mithos28: The issue is that struct: form is supposed to mimic Racket's struct form. You want to implement making a user defined datatype in the style of ML. I'm sugessting that instead of using struct: to that end, that TR should provide another lower level form. This form would allow TR to expose more knobs to the outside world, without complicating the standard use case of struct: 18:00 (quit) bitonic: Ping timeout: 245 seconds 18:00 mithos28: I don't think you actually care about expanding out to the struct: form, just something that gets the job done (and is a public api). 18:01 (join) acarrico 18:03 (quit) soegaard: Quit: soegaard 18:11 (quit) cdidd: Remote host closed the connection 18:12 (join) dnolen 18:13 eli: mithos28: Well, this is not contradicting what Racket's `struct' is doing. 18:13 eli: All I want is to say that `foo' and `bar' are structs that are an implementation of a single "higher-level" type, so I want TR to not allow me to use one and not the other. 18:14 eli: IOW, this is all stuff that is in HtDP-style comments -- which is where all of the type information in untyped Racket goes too. 18:14 mithos28: Right, and to implement this, you need to hide the types added by struct: 18:16 (join) anRch 18:20 eli: mithos28: Yes, and the reason that this is not contradicting plain racket code is that this kind of programming is something that happens anyway. So TR has no role in changing code meaning, just in throwing type errors. 18:23 mithos28: eli: I see your point, that R code does this. And I now think that TR should support something like this out of the box for that reason. 18:24 (join) jeapostrophe 18:25 mithos28: But when think about a rough sketch of how it would work, I believe that reusing struct: will have issues 18:25 eli: mithos28: Yeah, it would be very nice if it did it out of the box... 18:25 eli: And I think that the difficulty will be mostly in `match' -- the structs are harmless (since, after all, my implementation uses plain structs). 18:26 mithos28: have you tried to get it to work with struct-copy, or struct-out 18:27 mithos28: The whole static info is a pain to deal with 18:27 mithos28: I'll try to hack something up 18:29 mithos28: On a slightly different note, why do you need to define an environment for pl (using the TR internal api) instead of just writing a TR library that re-exports the functions under the types you want? 18:33 (join) jonrafkind 18:33 (join) kvda 18:33 (join) brum 18:34 eli: mithos28: re the struct thing -- (a) I'd be semi-impressed if you manage to do something quick: impressed because samth kept talking about problems, but not too much because my claim was that it shouldn't be too hard 18:35 eli: (b) Yes, I see the point about doing something more than a simple macro+type thing if you want to deal with the meta information -- but I think that generally speaking it should be close to being simple, still. 18:36 eli: For example, maybe a `struct-copy' would be translated to a cond that does the specific copy based on the input type, and with the restriction of using only the union, these conds would always have one branch for each variant. 18:36 eli: (c) No rush -- I've been using my thing for ages, and I can go on using it... 18:36 eli: As for the the pl language: you're probably saying that after you saw my last commit message -- 18:37 eli: I thought about it too when I wrote it, and I think that it might be possible to do things without the internal stuff. Just that there are tons of details. 18:38 eli: That thing has been around since before TR existed -- for example, the reason for those `r:begin's in the code is that I used to have the same code used both in the plain racket version and in lazy racket, so for the splicing effect of Racket's `begin' I had to explicitly use it. 18:38 eli: (Since in lazy racket `begin' is something different.) 18:38 eli leaves 18:38 (quit) brum: Ping timeout: 248 seconds 18:42 (quit) kvda: Ping timeout: 256 seconds 18:58 (join) kvda 18:59 (join) ambrosebs 19:02 (quit) ambrosebs: Remote host closed the connection 19:03 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 19:04 (join) ambrosebs 19:07 (quit) dnolen: Ping timeout: 252 seconds 19:09 (quit) adu_: Quit: adu_ 19:11 (quit) anRch: Quit: anRch 19:17 (join) dnolen 19:23 (join) adu_ 19:26 (quit) adu_: Client Quit 19:27 asumu: dented42: what do you mean by "works with boxes"? 19:30 (quit) dnolen: Ping timeout: 264 seconds 19:34 (join) brum 19:37 (quit) mye: Quit: mye 19:38 (join) didi 19:38 (quit) brum: Ping timeout: 245 seconds 19:46 offby1 pictures a "Bekins Moving and Storage" truck 19:59 (join) EzeQL 19:59 EzeQL: hi, whas the short for cdr(car ? 19:59 mithos28: cdar 20:00 EzeQL: ty 20:00 mithos28: the ds and the as stay in the same order 20:01 (join) mizu_no_oto 20:04 EzeQL: ty 20:15 (join) zyoung 20:16 dented42: asumu: syntax-case lets you match list patterns as well as vector patterns, ie #(a b), but you can't match things inside of boxed literals or hash tables. 20:17 dented42: even though syntax-e (which I understand that syntax-case is built on top of) can extract boxes and hash tables from syntax objects. 20:17 mithos28: dented42: It is just that syntax-case doesn't recognize those as valid patterns 20:18 dented42: right 20:18 mithos28: there should be no technical reason it couldn't work on boxes 20:18 (quit) zacts: Quit: ERC Version 5.3 (IRC client for Emacs) 20:18 dented42: I know 20:18 dented42: that's my point, I would like it to work on boxes; but I'm unsure how to accomplish that. 20:19 mithos28: You have syntax objects which have boxes in them? 20:19 dented42: yes 20:20 dented42: rudybot: (syntax-e #'#&2) 20:20 rudybot: dented42: your sandbox is ready 20:20 rudybot: dented42: ; Value: #&# 20:20 mithos28: syntax-parse handles boxes 20:22 asumu: No hashes though, yet. 20:23 (join) EzeQL_ 20:23 dented42: mithos28: I thought about that, but it doesn't do hashes, and I don't want to expose it's other behaviors. 20:23 mithos28: dented42: What are you trying to do? 20:24 dented42: I'm writing a macro that expands to a use of syntax case, and I currently pass the pattern that the 'user' specifies directly to syntax-case, and if I used syntax-parse then I'd have to do something to escape all of it's 'extra' behaviors. 20:25 mithos28: So just use syntax-parse to ensure that the pattern is valid before passing it to syntax-parse 20:25 (join) EzeQL__ 20:26 mithos28: You don't want the user to see an error message in terms of syntax-case/syntax-parse when they are not using either of those and only your macro 20:26 (join) zacts 20:27 (quit) EzeQL: Ping timeout: 260 seconds 20:28 (quit) EzeQL_: Ping timeout: 252 seconds 20:29 dented42: mithos28: but even so, syntax parse doesn't allow hash tables as patterns. 20:30 mithos28: dented42: Right, but I cannot help you with that as you havent explained what you are trying to od 20:31 mithos28: eli: When you get back, I have a rough sketch at https://github.com/shekari/racket/commit/8300b02077ab6ade194aa12d78dad346953d2bc2 20:31 rudybot: http://tinyurl.com/bbsfa3p 20:34 dented42: a macro that rewrites syntax trees, it should walk through the syntax tree (lists, vectors, hashes, boxes, structs) and starting at the leaves and working it's way up, it should match each node using the patterns the user provides, and replace the node with the syntax object that the user returns. 20:35 (join) brum 20:35 mithos28: Cannot you just handle the hash patterns manually then? 20:36 (quit) zyoung: Remote host closed the connection 20:37 asumu: Hmm, it's strange. Syntax-case seems to accept #&x as a valid pattern, but doesn't match on it correctly. 20:37 dented42: that's what I want to do, but I'm not sure how to go about doing it. 20:37 asumu: rudybot: (syntax-case #&5 () [#&x #'x]) 20:37 rudybot: asumu: your sandbox is ready 20:37 rudybot: asumu: error: ?: bad syntax in: #&5 20:37 asumu: rudybot: eval (require syntax/parse) (syntax-parse #&5 [#&x #'x]) 20:37 rudybot: asumu: ; Value: # 20:39 (quit) brum: Ping timeout: 245 seconds 20:39 dented42: asumu: well wouldn't syntax case just assume that it's a const pattern? 20:39 dented42: rudybot: (syntax-case #&5 () [#&5 #'indeed]) 20:39 rudybot: dented42: error: ?: bad syntax in: #&5 20:39 dented42: er 20:39 dented42: (syntax-case #'#&5 () [#&5 #'indeed]) 20:39 dented42: rudybot: (syntax-case #'#&5 () [#&5 #'indeed]) 20:39 rudybot: dented42: error: #:1:15: ?: bad syntax in: #&5 20:51 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 20:52 (quit) jonrafkind: Ping timeout: 256 seconds 20:53 dented42: mithos28: I thought I would first write a version of syntax-case that allows patterns in boxes and hashes, and have my rewriter macro use that. 20:54 mithos28: dented42: seems reasonable 20:54 arrdem: how far down does Racket define car/cdr? c(a|d)*r? 20:54 offby1: there ought to be an automated way to answer that question. 20:54 offby1: rudybot: caadr 20:54 rudybot: *offby1: THen write: (list (caar (last table)) (caadr (last table))), not (cons (caar (last (cdr table))) (cons (caadr (last (cdr table))) '())) 20:54 offby1: rudybot: eval caadr 20:54 rudybot: *offby1: your sandbox is ready 20:54 rudybot: *offby1: ; Value: # 20:54 offby1: rudybot: eval caaaaaaaaaadr 20:54 rudybot: *offby1: error: caaaaaaaaaadr: undefined; cannot reference an identifier before its definition in module: 'program 20:54 mithos28: arrdem: I think it is to 5 a|rs 20:54 (join) mizu_no_oto 20:54 offby1: that was 10 20:55 offby1: rudybot: eval caaaaaadr 20:55 rudybot: *offby1: error: caaaaaadr: undefined; cannot reference an identifier before its definition in module: 'program 20:55 offby1: rudybot: eval caaaadr 20:55 rudybot: *offby1: error: caaaadr: undefined; cannot reference an identifier before its definition in module: 'program 20:55 offby1: rudybot: eval caaadr 20:55 rudybot: *offby1: ; Value: # 20:55 offby1: there ya go 20:55 mithos28: or 4 20:55 arrdem: ok, idle curiosity thanks 20:56 offby1: exercise: extend racket so that it accepts any number and combination of "a" and "d". 20:56 offby1: So that, on the fly, it figures out what "caaadddaaar" means. 20:56 (quit) mizu_no_oto: Client Quit 20:56 offby1: (I suspect this has actually been done) 21:00 arrdem: I would have thought it was in the language core given that Racket has a reputation for making semantics easy to manipulate. 21:01 mithos28: The issue is that that means that an inifinte number of identifiers are bound 21:01 mithos28: and that is tricky to represent 21:02 mithos28: for an example on how to do it, https://github.com/shriram/roman-numerals 21:06 (part) SunMoonStar 21:11 (quit) kvda: Quit: z____z 21:11 (join) Kaylin 21:11 didi: offby1: Yeah, but I suspect it will be a macro, so not applicable as the normal c*r procedure. 21:13 (join) tsion 21:13 (quit) tsion: Changing host 21:13 (join) tsion 21:14 (nick) EzeQL__ -> EzeQL 21:15 (join) kvda 21:24 (join) jao 21:24 (quit) jao: Changing host 21:24 (join) jao 21:28 (join) yacks 21:31 (join) brum 21:43 (part) EzeQL 21:44 (quit) didi: Remote host closed the connection 21:48 asumu: You could hack it by changing #%app like the link mithos28 pointed out, but I don't think it's worth it just to have weird c[ad]*r functions. 21:48 asumu: Those are usually a code smell. 21:49 (join) mizu_no_oto 21:50 (quit) Kaylin: Read error: Connection reset by peer 21:53 eli: mithos28: I'm not following; do you mean that I should define the union, then define the variants that make it with the union as their `#:type-name'? 22:03 eli: mithos28: Or, after I saw PR13572, you're probably just allowing a different identifier for the type, which means that I can use it to hide the types -- in that case, it's a step forward, but the real thing is to prevent the variant sub-types from appearing in output also. 22:03 mithos28: eli: But the types have to exist, how else can you type the accessors? 22:04 eli: (continuing) For example, say that I write a `match' that handles only variant A -- that means that the A type (whatever name it has) appears in the output type of the function, and I'm thinking of something that will detect that A appears and throw an error about it. 22:04 eli: I'm not sure which of my blurbs your "but" applies to... 22:05 mithos28: Oh, you are complaining that I didn't implement constructor-return, not that the printed type may have the variants 22:06 (join) didi 22:07 (join) Nisstyre-laptop 22:09 eli: I'm not complaining about anything -- just trying to figure out what exactly you've done, and then how it would help get to what I want... 22:10 mithos28: Right now all I have is that it is possible to make the variant type names not be bound in the users program 22:11 mithos28: If I implemented constructor-return so that you could specify the types that the constructor returned, what else would you need? 22:12 eli: Ah, I see where you're getting at. 22:14 eli: This commit adds a way to hide the type; another one will (supposedly) add the constructor-return, so that they don't return the specific type; then a future one (which is probably the hardest) would have some way to check that any inferred type is not one that has occurrences of A,B,... -- so they'd only have the whole union. 22:16 mithos28: Can you explain why you want the third one? 22:16 mithos28: I think I know how to do it, but want to make sure I understand it 22:16 eli: Here's what I think would happen -- 22:17 eli: I do whatever is the equivalet of (define-type T [N Number] [S String]) 22:17 eli: Then, I write (define (foo x) (match x [(N n) n])) 22:18 eli: assuming a smart enough inference (which I think is far from what exists now), this would infer the type of `foo' as (N -> Number) 22:18 mithos28: Actually (Any -> Number) right now 22:18 eli: Since this type is a toplevel type, it would be (somehow™) checked to see that it doesn[t have any of these hidden types. 22:19 eli: (Yes, I remember that the inference is all inputs being `Any') 22:20 mithos28: By 'match' do you mean racket/match or some other implementation 22:20 eli: In any case, when you see that N is, and you know that N is one of the variant subtypes of T, then you'd spit out an error message saying that you're missing cases for subtypes(T) - {N}, which in this case will complain about a missing S. 22:20 mithos28: That would be very hard 22:20 mithos28: Because we do have a case for it 22:20 eli: I mean `racket/match' -- since you would also have other ways to do this. 22:21 mithos28: its the error case that raises an exception 22:21 eli: Like (define (foo x) (cond [(N? x) (N-whatever x)])) 22:21 eli: You mean the implicit error at the end of a `match' that throws an exception? 22:21 mithos28: yes 22:22 eli: IIRC, Sam did add some syntactic form that allows throwing a type error 22:22 eli: So yes, it would be a slightly tweaked `match' that would have an implicit type error instead of the implicit runtime error. 22:22 eli: (Which many people would like regardless of this whole thing.) 22:24 mithos28: If you don't provide annotations it will be impossible given that by typechecking does not have a unification step 22:24 mithos28: and so by the time we get to the match, we only know that the value can have type Any 22:25 mithos28: if you annotate the argument to foo, then I think the current machinery would be enough to give you the correct error message 22:26 eli: So you're saying that there would never be such inference -- in that case maybe you're right... 22:26 eli: I think that just having the check that I described would be enough to get something working, and the next step would be to make it available and see if people can break it -- and if so, how. 22:27 mithos28: you mean implement the other match which raises a type-error if it gets to the end? 22:35 (join) shriphani 22:35 eli: mithos28: Yeah, if that's all that is needed, then that would be great. 22:36 eli: (I kind of half expecting it to be as simple as that as long as you don't care about error messages -- and that's where the real fun will begin.) 22:36 mithos28: I don't see how this brings up a new class of error messages 22:37 eli: Actually, even this would be wrong: (define (foo x) (match x [(N n) #t] [_ #f])) 22:37 eli: So there should be something to prevent it too. 22:37 mithos28: Why is that wrong? 22:37 eli: You get an effective `N?' predicate. 22:38 mithos28: Right, so? 22:38 (quit) eikonos: Ping timeout: 255 seconds 22:39 eli: Maybe you're right and there's no harm in that. 22:39 mithos28: I could write out all the other cases instead of doing a catch all, and it amounts to the same thing 22:39 eli: In my class language it's possible too: 22:39 mithos28: You cannot do anything with a N 22:39 eli: (define (foo x) (and (T? x) (cases x [(N _) #t] [else #f]))) 22:40 eli: Yeah, ok, so that's not a problem, it seems. 22:41 offby1: eli: before I file a bug: is it intended that "raco test" exit with status 0 regardless of whether the test(s) passed? 22:41 (quit) didi: Remote host closed the connection 22:42 mithos28: offby1: What do you mean the tests passed? raco test has no notion of tests 22:43 offby1: mithos28: well, if I say "raco test foo.rkt", and foo.rkt says (module+ test (check-equal? #t #f)), that (correctly) emits a message about the test failing. 22:43 offby1: But the process still exits with a status of 0, which seems wrong, and is less useful than if it were to exit with 1. 22:44 mithos28: Thats an issue with rackunit 22:44 eli: offby1: I have nothing to do with `raco test' -- but I assume that it just runs the code as mithos28 says, so it's really rackunit's fault that it just prints errors but doesn't throw an error on failure. 22:44 offby1 rubs chin 22:44 mithos28: if you run it through racket you also get an exit code of 0 22:44 offby1: well, happily, I don't have to choose a component when submitting a bug report :) 22:45 eli: Unlike, say, my much (simpler™ and better™)™ tests/eli-tester 22:45 offby1: maybe I'll call it a "feature request" 22:45 offby1: :) 22:45 mithos28: eli: Can tests in your system be run in parallel 22:45 eli: Just to clarify -- you're asking for a change to rackunit, and given that there's a lot of code built on it, slim chances of a change, probably. 22:46 offby1: *shrug* 22:46 eli: mithos28: The idea is that you just run stuff in Racket, so you can write a function that dispatches tests in parallel or whatever. 22:46 eli: (Except that you'll need to do some synchronization yourself, probably.) 22:47 eli: (I could probably do something about it, but I don't know of cases where parallel testing would be good...) 22:47 mithos28: TR integration testing 22:47 mithos28: each test is independent but they each take a bunch of time 22:47 eli: Oh, right., of course 22:48 eli: In any case, you could probably do the same with rackunit too. 22:48 eli: (But I'm guessing -- I almost refuse to touch that thing.) 22:49 mithos28: The issue is sending the frameworks concept of a test across the places boundary 22:49 mithos28: and rackunits concept of a test includes a thunk 22:50 eli: Yeah, and that's how you'd do it, supposedly. 22:51 (quit) ijp: Quit: The garbage collector got me 22:53 (join) shriphan` 22:55 (quit) Nisstyre-laptop: Quit: Leaving 22:56 (quit) shriphani: Ping timeout: 248 seconds 22:56 asumu: I think you could implement offby1's feature request as follows: raco test would parameterize rackunit's test failure handler. 22:56 asumu: If anything failed, it sets a flag. 22:56 asumu: raco test does (exit 1) if the flag is set. 22:57 asumu: (obviously would not work if someone closer to the test does the parameterization too) 22:57 eli +1s asumu 22:58 (join) Nisstyre-laptop 22:58 eli: jeapostrophe: See above -- I don't think that you should have closed it. 22:58 jeapostrophe: boo 22:58 eli: hoo 22:58 jeapostrophe: raco test should not interop with a particular testing library 22:58 jeapostrophe: its should is just to run the submodule for a whole bunch of files 22:59 eli: Either way, the main point is that offby1's PR should have been interpreted as a rackunit feature request. 22:59 jeapostrophe: if the submodule wants to exit, so be it 22:59 mithos28: jeapostrophe: Won't that prevent the other submodule from running? 22:59 jeapostrophe: as a rackunit feature request is possibly valid, but not as raco test one, which it was 23:00 jeapostrophe: mithos28: yes, which is why i think it is a bad idea but there's nothing raco test can do to stop it 23:00 mithos28: jeapostrophe: Shouldn't raco test do more to be involved in testing than just running a bunch of submodules 23:00 jeapostrophe: no 23:01 mithos28: then why does it have the name 'test' instead of run-submod? 23:01 eli smiles, "told-you-so" style 23:02 eli: That was exactly my point, when jeapostrophe made it -- that it should just be a generic tool that runs some specified submodule. 23:02 jeapostrophe: because it is the most common submodule to run /and/ what you are proposing is tyrannically mandating one testing library which many don't like 23:02 eli: If it was presented this way, then there wouldn't be expectations like offby1's -- which IMO are complete justified. 23:02 asumu: There's nothing to stop our imaginary 'raco test' from setting parameters for other testing systems. 23:02 offby1 smiles, "told-you-so" style 23:03 jeapostrophe: DrRacket is commonly used to edit racket code but is actually a scribble, C, datalog, etc editor 23:03 eli: Exactly -- since it's *already* called "test"... 23:03 jeapostrophe: but we don't argue about it being called DrRacket rather than DrEditAnything 23:03 eli 's exactly was at asumu's suggestion. 23:03 (quit) brum: Remote host closed the connection 23:03 offby1: well, I don't much care how it's done; I'd just like an easy way to say "please run all the tests in this project and exit 0 if and only if they all pass". 23:04 eli: No, that's unrelated. The thing is that "raco test" is a name that suggests doing something for tests rather than a generic run-some-submodule-defaulting-to-test which it is. 23:04 (join) brum 23:04 jeapostrophe: it does do things for tests, test is the default submodule 23:04 jeapostrophe: that's the thing it does for tests 23:04 eli: So as long as it has the "test" name, I see no problems adding to it some way to tell what it runs that it's running inside it. 23:04 jeapostrophe: offby1: that's a rackunit feature request and a bad one imho because you'll die at the first failing test/test suite rather than seeing them all 23:04 offby1: jeapostrophe: I don't think that follows. 23:05 offby1: Or if it does follow, it shouldn't. 23:05 jeapostrophe: eli: that goes against the racket "it's all in the program" philosophy 23:05 eli: jeapostrophe: and *that* would be a bad design on rackunit's side. 23:05 jeapostrophe: ya, so make a patch that does something sensible 23:05 eli bahs 23:05 jeapostrophe: but don't make a hack where raco test runs these submodules in a totally foreign way 23:05 offby1: perhaps a separate program -- "test". It loads and runs every "test" module it finds, and does the thing I want. No need for it to be part of "raco". 23:06 jeapostrophe: this reminds me of the frustration that DrRacket can't actually run racket code 23:06 jeapostrophe: because it messes up the context to break everything 23:06 jeapostrophe: raco test shouldn't be like that 23:06 eli: Look, I'm not talking about some foreign way of running things, I'm talking about the current situation which offby1 -- as a plain naive user -- is surprised at. In that light, I think that his expectation is fully justified. 23:06 jeapostrophe: your test submodules should run just like normal 23:06 jeapostrophe: i disagree 23:06 jeapostrophe: rackunit already doesn't exit 1 23:06 jeapostrophe: why would raco test if you used it with rackunit? 23:07 eli sighs 23:07 jeapostrophe: i sigh too 23:07 jeapostrophe: and i need to go to bed 23:07 jeapostrophe: feel free to re-open it if you want to continue this discussion 23:07 eli: I'm taking offby1's point, nothing else: the fact that it exits with 0 is just surprisingly bad. 23:07 jeapostrophe: i don't want to stand in the way if you want to patch raco test 23:07 jeapostrophe: but i don't believe in it so i can't do it 23:08 jeapostrophe: <3 23:08 jeapostrophe: nite 23:08 mithos28: couldn't we have (module+ rackunit ) and not have to do too much crazy with raco test 23:08 eli: It happens that this is the result of combining a too-simplistic tool which "raco test" is, and the lack of proper exception throwing in rackunit. The former is more forgivable, the latter is not. 23:08 eli: (IMO) 23:09 (quit) brum: Ping timeout: 264 seconds 23:09 mithos28: eli: could a different test runner solve that? 23:12 (quit) tsion: Quit: Leaving 23:12 (quit) jeapostrophe: Ping timeout: 245 seconds 23:13 mithos28: What should tools do when they find an infinite loop in a directory structure (with symlinks)? 23:15 (join) tsion 23:25 (join) zacts` 23:25 (join) paddymahoney 23:25 (quit) zacts: Ping timeout: 245 seconds 23:35 eli: mithos28: My whole point is that "raco test" is, by vitue of its name, a test runner -- I think that jeapostrophe misunderstood what I said initially, but I think that it's rackunit's fault for not making test fialures an error. 23:36 (join) brum 23:37 mithos28: I was saying that rackunit has a concept of test-runner, which would allow one to change how it treats failures 23:38 eli: In that case the fault is in how people use it -- probably something like using `check-equal?' etc as-is instead of inside the runner thing. 23:39 eli: That would still be an I-told-you-so thing, since my biggest complaint against rackunit is that it's way too complicated. 23:39 mithos28: I agree 23:39 mithos28: Testing is hard 23:41 (quit) brum: Ping timeout: 248 seconds 23:42 (join) brum 23:43 (quit) tsion: Quit: Leaving 23:49 (quit) em: Ping timeout: 246 seconds 23:49 (quit) mizu_no_oto: Quit: ["Textual IRC Client: www.textualapp.com"] 23:51 (join) em 23:53 mithos28: eli: Is newdocs supposed to still be up? 23:54 (join) Kaylin 23:54 eli: mithos28: I'm rebuilding it, it will be up in a few minutes' 23:54 eli: s/'/./ 23:54 mithos28: ok, great. 23:55 eli: Are you using it regularly or something? 23:55 mithos28: no, I was just actually reading the thread and decided that I should take a look 23:56 eli: Ah, good coincidence then. 23:56 eli: When it comes up, the smaller banner is no longer going to be there., 23:56 eli: Since nobody seemed to like that. 23:56 mithos28: I have no idea what that was 23:57 eli: Matthew didn't like the fact that the navbar takes a lot of space at the top. 23:57 eli: And one experiment I did was a smaller logo and "(((racket)))" text, so it takes less space. 23:58 eli: But two people didn't like the non-uniformity, and nobody liked the narrower thing.