00:00 dented42: yes 00:01 dented42: It's my understanding that provide/contract is deprecated/legacy and considered bad style in new code nowadays. 00:01 Nisstyre-laptop: yeah it seems like it was replaced 00:02 Nisstyre-laptop: dented42: are you sure your syntax is correct? http://stackoverflow.com/a/8608875/903589 00:02 Nisstyre-laptop: the example here "(provide (contract-out [f (-> p? p?)]))" 00:02 Nisstyre-laptop: seems to imply yours should be "(contract-out (bar (string?))))" 00:02 dented42: I don't see a difference, isn't that what I did? 00:03 dented42: oh 00:03 Nisstyre-laptop: see if that works 00:03 dented42: no, -> is a function that produces a contract, whereas string? is both a predicate and a contract. 00:03 Nisstyre-laptop: well I wasn't sure if it was a macro or not 00:04 Nisstyre-laptop: fair enough 00:04 Nisstyre-laptop: I don't use contracts often because they tend to slow things down for me 00:04 dented42: right 00:04 dented42: this paste isn't actually the code I'm working on, it's the simplest thing I could come up with that reproduces my problem. 00:05 dented42: my 'real' code is providing a function. 00:05 Nisstyre-laptop: that error message is terrible anyway 00:05 dented42: agreed 00:05 dented42: I try to use contracts as a matter of course, and then disable them if/when performance becomes an issue. 00:06 Nisstyre-laptop: yeah, that's a good way of doing it 00:06 Nisstyre-laptop: if I needed a lot of them I would just use typed Racket 00:07 (quit) dnolen: Ping timeout: 260 seconds 00:13 Nisstyre-laptop: dented42: yeah I'm getting the same error 00:15 Nisstyre-laptop: dented42: I think it has something to do with this http://docs.racket-lang.org/reference/syntax-model.html#%28tech._phase._level%29 00:15 rudybot: http://tinyurl.com/axhohtq 00:19 dented42: hm, possibly 00:22 Nisstyre-laptop: dented42: the comments of the source say "For now, only work in the base phase of the `contract-out' binding." 00:22 (quit) juanfra__: Quit: juanfra__ 00:22 (join) juanfra 00:22 (quit) juanfra: Changing host 00:22 (join) juanfra 00:27 (quit) cdidd: Read error: Operation timed out 00:53 (join) asvil 00:57 (quit) yacks: Quit: Leaving 01:15 (join) rohni 01:22 (quit) jao: Ping timeout: 248 seconds 01:24 (quit) mceier: Quit: leaving 01:29 (quit) rohni: Quit: Leaving. 01:29 (join) cataska 01:40 (join) myx 01:50 (quit) gridaphobe: Remote host closed the connection 01:53 (quit) vipjun: Quit: Leaving. 02:03 (join) vipjun 02:10 (quit) sizz: Read error: Operation timed out 02:10 (join) sizz 02:19 (join) sizz_ 02:19 (quit) sizz: Ping timeout: 255 seconds 02:27 (join) mceier 03:13 (quit) mye: Quit: mye 03:20 (join) mye 03:20 (quit) mye: Client Quit 03:34 (join) hkBst 03:35 (join) rmathews_ 03:36 (quit) rmathews: Ping timeout: 240 seconds 03:36 (nick) rmathews_ -> rmathews 03:38 (quit) Nisstyre-laptop: Ping timeout: 260 seconds 03:50 (join) rohni 03:53 (join) yacks 03:54 (join) noelw 04:04 (quit) hkBst: Remote host closed the connection 04:05 (quit) myx: Read error: Operation timed out 04:06 (join) hkBst 04:07 (part) vipjun 04:11 (quit) yacks: Read error: Connection reset by peer 04:13 (join) bitonic 04:18 (quit) bitonic: Ping timeout: 248 seconds 04:22 (join) yacks 04:23 (join) bitonic 04:28 (join) didi 04:28 (join) Fare 04:57 (join) tfb 04:59 (quit) asvil: Remote host closed the connection 05:12 (quit) yacks: Read error: Operation timed out 05:22 (join) yacks 05:37 (quit) hkBst: Ping timeout: 248 seconds 05:49 (join) hkBst 05:49 (quit) hkBst: Changing host 05:49 (join) hkBst 06:07 (join) Slavisa 06:11 (join) jeapostrophe 06:11 (quit) jeapostrophe: Changing host 06:11 (join) jeapostrophe 06:30 (quit) bitonic: Ping timeout: 264 seconds 06:36 (join) anonymous 06:36 (nick) anonymous -> Guest44415 06:40 (join) vkz 06:47 (quit) EzeQL_: Ping timeout: 248 seconds 06:52 (quit) juanfra: Quit: juanfra 06:53 (join) juanfra 07:02 (join) bitonic 07:10 (join) soegaard 07:30 (join) rmathews 07:58 (join) bjz 08:05 (quit) Slavisa: Remote host closed the connection 08:06 (join) mizu_no_oto 08:10 (quit) bitonic: Ping timeout: 248 seconds 08:14 (join) ijp 08:31 (quit) juanfra: Quit: juanfra 08:31 (join) juanfra 08:40 (quit) rmathews: Quit: ... 08:42 (quit) Fare: Ping timeout: 248 seconds 08:44 (join) bitonic 08:53 (join) Fare 09:01 (quit) vkz: Quit: vkz 09:04 (join) vkz 09:07 (quit) jeapostrophe: Ping timeout: 264 seconds 09:21 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 09:23 (join) cdidd 09:28 (join) EzeQL 09:28 (quit) hkBst: Read error: Connection reset by peer 09:29 (join) hkBst 09:29 (quit) hkBst: Changing host 09:29 (join) hkBst 09:35 (join) vipjun 09:42 (quit) yacks: Read error: Connection reset by peer 09:49 (join) dnolen 09:55 (quit) tfb: Quit: sleeping 09:56 didi: Is it possible to change arbitrarily how a struct is printed in the REPL? 09:59 (quit) hkBst: Ping timeout: 256 seconds 10:00 (join) hkBst 10:00 (quit) hkBst: Changing host 10:00 (join) hkBst 10:02 (quit) vkz: Quit: vkz 10:03 didi: Apparently the answer lies within `gen:custom-write'. 10:04 anonymou2: I am on 4.3.3 10:04 anonymou2: Couldn't you tell me, please 10:04 anonymou2: Is it possible to use something like this open-parentheses function: 10:05 anonymou2: >(open-parentheses (list 1 2 3)) 10:05 anonymou2: Result: 1 2 3 10:05 anonymou2: (+ (open-parentheses (list 1 2 3))) 10:05 anonymou2: Result: 6 10:05 anonymou2: Etc. 10:06 anonymou2: Maybe the function "open-parentheses" already exists, but named differently? 10:06 anonymou2: is* 10:06 anonymou2: has been* 10:07 bremner: maybe you want "apply" 10:07 anonymou2: rudybot: (apply '(1 2 3)) 10:07 rudybot: anonymou2: your sandbox is ready 10:07 rudybot: anonymou2: error: apply: arity mismatch; the expected number of arguments does not match the given number expected: at least 2 given: 1 arguments...: '(1 2 3) 10:08 anonymou2: rudybot: (list 1 2 (apply 3 4 5)) 10:08 rudybot: anonymou2: error: apply: contract violation expected: procedure? given: 3 argument position: 1st other arguments...: 4 5 10:08 anonymou2: I want the last to result in '(1 2 3 4 5) 10:08 bremner: maybe a _little_ doc reading? 10:09 anonymou2: bremner: I am on 4.3.3 and it is about "apply" 10:09 bremner: well, it isn't exactly what you asked for. You may need several different functions. 10:10 anonymou2: s/apply/open-parentheses in the last two expressions 10:10 (quit) hkBst: Ping timeout: 248 seconds 10:10 anonymou2: My question was inspired by "apply" 10:11 anonymou2: The function seemed two strange and non-universal for me 10:11 anonymou2: s/and/since too 10:11 (join) hkBst 10:12 didi: rudybot: (eval `(+ ,@'(1 2 3))) 10:12 rudybot: didi: your sandbox is ready 10:12 rudybot: didi: ; Value: 6 10:14 anonymou2: didi: thx, that's it! 10:14 bremner: didi: does that work with non-literal lists? 10:14 didi: anonymou2: That's actually pretty bad. 10:14 didi: bremner: I don't know. 10:15 anonymou2: didi: thanks. Where can I read why? 10:15 anonymou2: and what should I prefer 10:15 anonymou2 is going to continue to read the docs, but slooowly 10:16 anonymou2: ...relatively 10:16 didi: anonymou2: Well, when you learn Racket you'll see why, I guess. 10:16 (quit) mceier: Quit: leaving 10:16 didi: It uses `eval', it won't work with non-literal lists (as noted by bremner), ... 10:17 (quit) hkBst: Ping timeout: 248 seconds 10:17 anonymou2: I am hesitated to ask but it is too interesting: should I prefer "apply" whenever possible? 10:17 (join) anRch 10:18 bremner: prefer it to what? 10:18 didi: anonymou2: ^ 10:19 anonymou2: bremner: ,@ 10:19 bremner: I would say yes, if only because more people will understand your code. 10:20 anonymou2: thank you! 10:25 anonymou2: 12/away 10:25 anonymou2: sorry 10:25 (join) EzeQL_ 10:29 (quit) EzeQL: Ping timeout: 248 seconds 10:29 (quit) rohni: Quit: Leaving. 10:37 (join) hkBst 10:43 (join) EzeQL__ 10:43 (join) yacks 10:46 (quit) EzeQL_: Ping timeout: 244 seconds 11:01 (join) jao 11:01 (quit) jao: Changing host 11:01 (join) jao 11:05 (quit) yacks: Ping timeout: 244 seconds 11:07 (join) rohni 11:16 fasta: How can I compile a sequence of trunk builds faster? 11:16 fasta: It seems to have to start all over all the time, which is a complete waste of resources. 11:16 fasta: A good system would require time dependent on the size of the impact of the change. 11:18 bremner: ,pony 11:18 bremner: oops, wrong channel. 11:22 (quit) hkBst: Quit: Konversation terminated! 11:24 fasta: bremner: I just don't understand why people build such output insensitive systems in the first place. 11:25 fasta: Why is there nobody who says "Wait a minute here, cowboys, this is not how we were told to create systems". 11:25 (join) mceier 11:26 didi: rudybot: Why didn't _you_ respond to bremner's call? 11:26 rudybot: didi: and then you further were wrong when you claimed bremner's problem was contribution and not assignment. 11:32 (quit) noelw: Quit: noelw 11:35 (quit) dnolen: Ping timeout: 252 seconds 11:38 (join) noelw 11:39 (join) RacketCommitBot 11:39 RacketCommitBot: [racket] plt pushed 3 new commits to master: http://git.io/iETY3g 11:39 RacketCommitBot: racket/master f13829d Robby Findler: esc;h history note 11:39 RacketCommitBot: racket/master e503850 Robby Findler: fix the c:x;n keybinding when used with online check syntax info... 11:39 RacketCommitBot: racket/master 8fb4905 Robby Findler: add a 'jump to previous binding occurrence' keybinding 11:39 (part) RacketCommitBot 11:39 (quit) anRch: Quit: anRch 11:39 (join) Nisstyre-laptop 11:41 (quit) Nisstyre-laptop: Read error: Connection reset by peer 11:41 (join) Nisstyre-laptop 11:47 stamourv: fasta: raco setup only rebuilds what needs to be rebuilt. 11:47 stamourv: But, if someone changed something in the `racket' collect, which most of the tree depends on, pretty much everything needs to be rebuilt. 11:50 (quit) bitonic: Remote host closed the connection 11:53 (join) bitonic 11:54 (join) anRch 12:00 (join) francisl 12:01 (join) dnolen 12:09 (quit) Nisstyre-laptop: Quit: Leaving 12:10 (join) Nisstyre-laptop 12:13 (join) vkz 12:14 (quit) noelw: Quit: noelw 12:14 (join) rmathews 12:15 (join) RacketCommitBot 12:15 RacketCommitBot: [racket] plt pushed 4 new commits to master: https://github.com/plt/racket/compare/8fb49059cbe9...13b205aa0a63 12:15 RacketCommitBot: racket/master 7e88895 Eric Dobson: Add testcases for many already fixed bugs.... 12:15 RacketCommitBot: racket/master 7d6888f Eric Dobson: Improve types for exit and in-naturals. 12:15 RacketCommitBot: racket/master 36cc322 Eric Dobson: Improve type of make-immutable-hash.... 12:15 (part) RacketCommitBot 12:15 fasta: stamourv: how does this translate to the usual configure && make steps? 12:16 fasta: stamourv: for example is it a lemma that make clean is never needed? 12:16 stamourv: fasta: `make install' runs `raco setup'. 12:16 fasta: stamourv: if not, then your statement is your wrong. 12:17 stamourv: You pretty much never need `make clean'. 12:17 fasta: is wrong* 12:17 fasta: stamourv: pretty much is not never. 12:17 stamourv: I don't think I've ever needed it, but maybe you could need it at some point? 12:18 fasta: stamourv: I think I needed it already in the past, and I think it's a build system failure when it is needed. 12:18 stamourv: The only times I've had to really start afresh (e.g. nuking the build directory) is when I'm adding primitives to the runtime, which you probably won't have to do. 12:18 (join) jeapostrophe 12:18 stamourv: fasta: Just to make sure we're talking about the same thing, are we talking about the C part of the build, or the Racket part? 12:18 fasta: stamourv: the whole thing. 12:18 stamourv: i.e. `make' vs the `raco setup' part of `make install'. 12:19 fasta: stamourv: make then 12:19 stamourv: Ok, that part should be reasonably fast, and you should only need to rebuild it if someone changes the compiler or runtime, which doesn't happen all that often. 12:20 stamourv: And I would assume that it rebuilds only the necessary bits, but I'm not too familiar with that part of the build process, so there may be some tricky bits. 12:22 (quit) rohni: Quit: Leaving. 12:25 fasta: Just with one tiny patch difference, the build still needs a complete bootstrap as if nothing was compiled before. 12:26 (join) mithos28 12:27 stamourv: fasta: I guess it would depend on what the patch modifies. Do you have an example? 12:28 fasta: stamourv: it added some test files... (I just tried it on what was committed a few minutes ago) 12:28 stamourv: You mean the commits a just pushed? 12:28 fasta: stamourv: yes 12:28 stamourv: That shouldn't affect the C part of the build. 12:28 stamourv: And only a small portion of the Racket part. 12:29 mithos28: stamourv: TR affects a large part of the racket build time 12:29 fasta: Please add a test for compilation times then. 12:29 (join) dauterive 12:29 stamourv: fasta: Did that commit force a compelte rebuild on your machine? 12:29 fasta: stamourv: yes 12:30 stamourv: mithos28: Well, it's a small portion of the code, but the since the `math' collection is huge, you're right, it does account for a significant portion of the time. 12:30 stamourv: fasta: Then that sounds like a bug, it shouldn't do that. 12:30 stamourv: Can you describe your system? 12:30 fasta: stamourv: how are you compiling racket? 12:30 mithos28: raco setup -D 12:30 stamourv: make && make install 12:31 (quit) acarrico: *.net *.split 12:31 (quit) rudybot: *.net *.split 12:31 fasta: stamourv: no configure? 12:31 stamourv: Or, if I'm in a tight edit-compile loop, raco setup of the relevant bits. 12:31 (quit) jeapostrophe: Ping timeout: 245 seconds 12:31 stamourv: No, I don't reconfigure. 12:31 stamourv: Ah, maybe that's the difference. 12:32 mithos28: fasta: how long does it take to do a full build on your machine from scratch? 12:32 fasta: I guess, what I am saying is there should be a program which solves the problem "compile racket as fast as possible depending on the environment". 12:32 fasta: mithos28: 20-30 minutes, I think. 12:32 mithos28: do you pass --disable-docs to configure? 12:32 fasta: It also doesn't use all my cores. 12:32 fasta: No 12:33 fasta: I want the docs. 12:33 fasta: But if nothing changed, it shouldn't take time for the docs. 12:33 stamourv: fasta: Why do you reconfigure for each build? 12:33 stamourv: I'm not too familiar with build systems, but it looks like an odd thing to do. 12:33 mithos28: if a single c file changes, then that transitively affects every doc file 12:33 fasta: stamourv: because things could have changed. 12:34 mithos28: fasta: only if the configure script or related files changed 12:34 mithos28: fasta: how often do you recompile? 12:34 stamourv: fasta: Fair. Although that would usually cause make to fail, so you can know when you need to reconfigure. 12:34 fasta: mithos28: anyway, this shows that it takes some work to get it to work. 12:35 stamourv: fasta: It looks like you know a lot about build systems. Do you have a suggestion on how to fix it? 12:35 fasta: stamourv: use tup. 12:35 stamourv: What is it? 12:35 fasta: A build system which has better dependency tracking, which replaces make. 12:36 stamourv: How portable is it? 12:36 (join) acarrico 12:36 (join) rudybot 12:36 fasta: You can integrate autoconf too, if you are smart. 12:36 fasta: stamourv: windows, linux, and I think BSD. 12:36 fasta: stamourv: it's written in Python. 12:36 mithos28: but racket doesn't use make for the majority of its build 12:37 fasta: mithos28: all I know is that my builds take 0.001 seconds to decide whether something needs to be rebuild. 12:37 fasta: mithos28: and the things it rebuilds are absolutely minimal. 12:38 mithos28: fasta: well then your system is likely incorrect, 12:38 fasta: mithos28: no, it's not. 12:38 mithos28: how does it determine if a file needs to be rebuilt? 12:38 fasta: mithos28: it's just that make is an ill designed system for the problem at hand. 12:39 mithos28: fasta: Like I said, make is not the issue when building racket 12:39 fasta: mithos28: racket uses its own adhoc system with make like semantics. 12:39 fasta: mithos28: if you want to see how Tup works, google it. 12:39 (quit) francisl: Quit: francisl 12:39 fasta: Don't ask me trivial questions. 12:40 mithos28: how fast is a disk read on your machine? 12:40 fasta: mithos28: it never stats in the first place. 12:40 fasta: mithos28: or at least, not all of the files. 12:41 fasta: Tup is designed, like I said. 12:41 fasta: It's not a hack like all of the other tools in this space. 12:42 fasta: If you had any balls, you would write a program which would output different types of files. 12:42 (join) gridaphobe 12:42 fasta: One would be a Make backend. 12:42 fasta: Another would be Tup. 12:42 fasta: This is how some projects have already adopted Tup. 12:42 bremner: ok, you lost me at "if you and any balls' 12:42 asumu: fasta: please keep things civil. 12:43 fasta: Anyway, there is a technical solution to this problem. 12:43 fasta: You don't even have to do the hard work (which was creating Tup). 12:43 mithos28: fasta: if this is easy, then please provide a patch. 12:44 fasta: It's probably a month work for a skilled person. 12:44 mithos28: That is a ton of work 12:44 fasta: Yeah, you get that if you don't plan ahead. 12:45 (quit) didi: Ping timeout: 240 seconds 12:45 mithos28: If you think racket's build system is incorrect, and rebuilds more than necessary, provide an example. 12:47 (quit) gridaphobe: Remote host closed the connection 12:48 fasta: mithos28: bug nr 1 is that you don't even advertise that any command works to build it except for configure && make && make install 12:48 fasta: mithos28: and that command rebuilds everything all the time. 12:48 (join) gridaphobe 12:48 mithos28: Then submit that as a documentation bug 12:49 fasta: mithos28: so, I am not sure what you want me to say and I think it is very clear that I would like to see a ./buildracketinacachedway command which intelligently handles rebuilds using project specific knowledge. 12:49 fasta: Long term, you should just abandon your homegrown build system. 12:50 fasta: Build systems are typically selected by people who just use what they always have used before. 12:50 fasta: I explained a few years ago to Google Chromium engineers how they were doing everything wrong and they didn't agree. Meanwhile a few years later they pretty much did exactly what I told them. 12:51 fasta: I suppose someone with a brain must have been listening. 12:51 mithos28: tup is not ninja 12:51 fasta: I know that. 12:51 fasta: Ninja is a step in the right direction. 12:52 mithos28: how does tup avoid the process startup overhead? 12:52 ijp: asumu: he was like this on #emacs earlier too 12:53 fasta: Tup is documented. 12:53 fasta: I don't see the point in explaining things which I also learned from using the system and reading the documentation. 12:53 mithos28: fasta: So? asking you is faster since it wasn't obvious 12:56 mithos28: I just skimmed the mailing list, and https://groups.google.com/forum/?fromgroups=#!topic/tup-users/5-VRtQP9aPE says that tup is incorrect 12:56 mithos28: And it is a post from someone I would trust to know these things 13:03 fasta: mithos28: in some theoretical case which never occurs in normal use and he says he has part of it already fixed and it can be fixed easily completely. 13:04 (quit) Fare: Ping timeout: 255 seconds 13:05 mithos28: Actually probably pretty common in racket code 13:07 (quit) soegaard: Quit: soegaard 13:17 (join) mye 13:17 (join) didi 13:21 (quit) Nisstyre-laptop: Quit: Leaving 13:23 (join) dyoo 13:26 (join) RacketCommitBot 13:26 RacketCommitBot: [racket] plt pushed 4 new commits to master: http://git.io/CcG3Fw 13:26 RacketCommitBot: racket/master f8a0d6d Matthew Flatt: configure: add more guidance/reporting on non-recommended options 13:26 RacketCommitBot: racket/master 4271d98 Matthew Flatt: ffi/unsafe: fix a bug in conversion to UTF-16... 13:26 RacketCommitBot: racket/master fdd8dc9 Matthew Flatt: JIT: fix bug in checking certain values before unboxing... 13:26 (part) RacketCommitBot 13:30 (quit) mithos28: Quit: mithos28 13:37 (quit) anRch: Quit: anRch 13:40 (quit) mye: Quit: mye 13:49 (quit) rmathews: Quit: ... 13:51 (join) rohni 13:51 (quit) snorble_: Ping timeout: 252 seconds 13:57 (join) mye 13:58 (join) soegaard 13:58 (quit) bitonic: Ping timeout: 245 seconds 13:59 (join) snorble_ 14:13 (join) mizu_no_oto 14:22 (quit) gridaphobe: Remote host closed the connection 14:22 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 14:23 (join) gridaphobe 14:25 (join) mithos28 14:29 (quit) gridaphobe: Remote host closed the connection 14:29 (join) gridaphobe 14:30 (join) mizu_no_oto 14:33 (quit) gridaphobe: Remote host closed the connection 14:33 (join) gridaphobe 14:35 (join) larskristjansen 14:37 (quit) larskristjansen: Client Quit 14:38 (join) francisl 14:38 (join) RacketCommitBot 14:38 RacketCommitBot: [racket] plt pushed 1 new commit to master: http://git.io/Oms6pw 14:38 RacketCommitBot: racket/master e720d1d Robby Findler: add parameterize* to tabing and smart opening square bracket pref defaults 14:38 (part) RacketCommitBot 14:40 (quit) didi: Ping timeout: 248 seconds 14:44 (join) didi 14:47 (quit) mithos28: Quit: mithos28 14:48 (join) mithos28 14:50 (join) larsk 14:51 (quit) mizu_no_oto: Quit: Computer has gone to sleep. 14:51 (join) anonymou2 14:51 (join) vkz_ 14:53 (quit) mye: Quit: mye 14:53 (quit) vkz: Ping timeout: 248 seconds 14:53 (nick) vkz_ -> vkz 14:55 (join) mye 14:58 (join) EzeQL_ 14:59 (join) bjz_ 15:00 (quit) bjz: Read error: Connection reset by peer 15:01 (quit) francisl: Quit: francisl 15:02 (quit) EzeQL__: Ping timeout: 248 seconds 15:03 (quit) anonymou2: Ping timeout: 252 seconds 15:14 (join) francisl 15:18 (join) tilde` 15:24 (join) francisl_ 15:28 (join) francisl__ 15:28 (quit) francisl: Ping timeout: 248 seconds 15:28 (nick) francisl__ -> francisl 15:31 (quit) francisl_: Ping timeout: 244 seconds 15:34 mithos28: stamourv: ping 15:34 stamourv: mithos28: pong 15:35 mithos28: have you gotten a chance to look at the optimizer issue that I brought up in https://github.com/plt/racket/pull/221 15:36 stamourv: Not yet. 15:36 stamourv: I'm not sure I'd call it an optimizer issue, though. 15:37 stamourv: All the optimizer does is look up the types of expressions in the type table. 15:37 mithos28: Right, and I believe that is not what it should do 15:38 mithos28: because adding expected types of Any shouldn't reduce optimizations 15:38 stamourv: What do you suggest the optimizer do instead? 15:38 mithos28: I don't have a good answer. 15:39 stamourv: Any other solution I've thought of would involve duplicating parts of either the typechecker or of the types of some functions, neither of which are desirable. 15:40 mithos28: Don't you just need tc-funapp 15:40 mithos28: and since you are in the optimizer stage, it won't return an error 15:41 stamourv: Also, would adding expected types of `Any' give odd behavior at the REPL? I forget the details of your patch, but since any type works at the REPL, would all expressions entered at the REPL end up typechecking as any? 15:41 mithos28: Yes it would, but my patch is not doing that 15:41 stamourv: Re-running the typechecker sounds like a bad idea, though. Would be pretty slow. 15:42 (join) myx 15:42 mithos28: It is adding better expected types in argument positions 15:42 stamourv: And you'd probably want to cache the results, which would basically do what the type table does currently. 15:42 mithos28: The other question is should the optimizer be worrying about these cases 15:42 stamourv: So in the end, you'd just have 2 typechecking passes, one to check, and the other to assign types. 15:42 stamourv: Which cases? 15:43 mithos28: things like (display (+ 2.0 3.0)) 15:43 mithos28: where you are doing a computation which could be optimized, but the wanted result is not necesarily a number 15:44 mithos28: my change is making that now more like (display (ann (+ 2.0 3.0) Any)) 15:46 stamourv: On the one hand, you're right that these cases are probably not the optimizations that actually matter. On the other, I'm hesitant to just kill optimizations, some of which may end up actually mattering. That, and this change would be the optimizer unpredicatble, which is a bad thing for optimizers to be. 15:47 stamourv: What does your patch fix again? I've paged it out. 15:48 mithos28: It looks at arity information of a function type to determine which cases are actually relevant in an application. If there is only one it uses the types as expected types for the argument expressions. 15:49 mithos28: Before this only worked when there was one arity. 15:50 stamourv: So, if `display' only had a single arity, it's argument would never have gotten optimized in the first place. Right? 15:50 mithos28: right. 15:50 (quit) larsk: Quit: larsk 15:50 stamourv: Hmm, that's disappointing. We're probably missing out on some optimizations because of that. 15:51 mithos28: But the expected type is needed for the inferencer 15:51 mithos28: which is why I am working to push it to more places 15:51 stamourv: Dunno how feasible that would be, but here's an idea: try typechecking without an expected type, and if that fails, try again with the expected type. 15:52 stamourv: Not sure if the typechecker's control flow would make that easy. Even if it did, that may cause slowdowns since some code would essentially need to be typechecked twice. 15:52 mithos28: what else is the type table used for? 15:52 stamourv: AFAIK, nothing else. 15:52 stamourv: That is, just the optimizer. 15:53 mithos28: What if we changed it so that the type was added before the check below? 15:53 mithos28: But then you would need to do subtype instead of check for equality 15:54 stamourv: 1 second, bringing up the code. 15:54 stamourv: Which code do you have in mind? 15:54 mithos28: Nothing 15:55 mithos28: I just know thats how it must be working 15:56 stamourv: Ok, so what would that change mean? What type would we have before the check-below? 15:57 mithos28: So check-below takes a type that type-checking returned and an expected type, it either raises an error if the type is not a subtype of check-below, or returns the expected type 15:57 mithos28: i.e. throws away 'unwanted' information 15:58 stamourv: Ok, I see. Yeah, that sounds like it would work. 15:58 mithos28: It looks like it might be complicated though 15:58 mithos28: because check below is called way before add-typeof-expr is called 15:59 stamourv: Could `check-below' be the one that adds types to the table? 15:59 mithos28: no, because it is about types not expressions 16:00 mithos28: so one issue is that add-typeof-expr is called in about 10 different places currently 16:00 (join) samth 16:00 (quit) samth: Changing host 16:00 (join) samth 16:01 (join) adu 16:02 stamourv: Doesn't check-below also take an expression argument? 16:02 mithos28: No, just two types/tc-results 16:02 stamourv: And yeah, some of these call sites would probably need to remain, if there's no check-below nearby. 16:02 (join) francisl 16:02 stamourv: Oh, ok, I was wrong. 16:03 stamourv: Ok, so it sounds like we do compute the relevant info (the precise type) no matter what, so now the issue is to not throw it away prematurely. 16:03 stamourv: Does that sound right? 16:03 mithos28: right 16:04 stamourv: Good, so the problem should be fixable. 16:04 stamourv: Could be worse. ;) 16:05 stamourv keeps hitten unfixable problems with continuation marks these days. 16:06 stamourv: So, would returning the precise type from `check-below' (either with multiple return values, or with a box passed as an argument) work? 16:06 mithos28: The precise type is the first argument 16:07 stamourv: Err, so why don't we use that with `add-typeof-expr' then? 16:07 stamourv: I'm not sure I understand the problem. 16:07 mithos28: because add-typeof-expr is called much later and in a different place than check-below 16:08 stamourv: (Sorry, I'm working on a lecture at the same time, so I'm not 100% concentrated.) 16:08 (join) larsk 16:08 stamourv: Would it be possible to just pipe the information through? 16:08 stamourv: Or maybe attach it to the expression with a syntax property. 16:09 mithos28: It would be, but I think the better solution is to just move the to call to add-typeof-expr 16:09 stamourv: Is there a reason why it's that late? Can the type change between the `check-below' and it? 16:10 mithos28: Its because its not very clear whos resposibility it is to call them 16:11 mithos28: It actually might not be as hard as I portrayed it, in tc/send they are adjacent 16:12 stamourv: In theory, `add-typeof-expr' can be called as soon as the type is known. 16:12 stamourv: It was added as an afterthought when the optimizer was written, so calls to it may not be in the best possible place. 16:13 stamourv: So, sounds like it should work. 16:13 mithos28: I think so. 16:13 mithos28: I'll take a look this afternoon 16:13 stamourv: Excellent, thanks! 16:13 stamourv: I'll try to have a look at more pull requests later today. 16:14 stamourv: But for now, that lecture is my priority. 16:14 stamourv: Have you heard back from eli about commit access? 16:14 mithos28: nope 16:15 stamourv: I'll remind him next time I see him. 16:28 (quit) francisl: Remote host closed the connection 16:28 (join) francisl 16:31 (quit) soegaard: Quit: soegaard 16:32 (quit) dnolen: Ping timeout: 248 seconds 16:40 (join) ijp` 16:43 (quit) ijp: Ping timeout: 264 seconds 16:51 (nick) ijp` -> ijp 17:10 (quit) ASau: Ping timeout: 256 seconds 17:18 (quit) larsk: Quit: larsk 17:24 (quit) rohni: Quit: Leaving. 17:26 (join) rohni 17:30 (quit) cdidd: Ping timeout: 248 seconds 17:34 (join) RacketCommitBot 17:34 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/85f9fbbaee42706cfa926395ecfa6ec6ac8d4723 17:34 RacketCommitBot: racket/master 85f9fbb Robby Findler: interactivity fix for online check syntax... 17:34 (part) RacketCommitBot 17:36 (quit) tilde`: Quit: kthxbai 17:42 (join) anRch 17:46 (join) cdidd 17:48 (quit) myx: Quit: ัƒัˆั‘ะป 17:59 (quit) adu: Quit: adu 18:04 (quit) mithos28: Quit: mithos28 18:10 (quit) rohni: Quit: Leaving. 18:12 (join) adu 18:14 (join) EzeQL__ 18:17 (join) mithos28 18:18 (quit) EzeQL_: Ping timeout: 264 seconds 18:47 (quit) anRch: Quit: anRch 18:50 (quit) francisl: Ping timeout: 240 seconds 19:00 (quit) didi: Quit: ERC Version 5.3 (IRC client for Emacs) 19:00 (quit) adu: Read error: Connection reset by peer 19:01 (join) adu 19:02 (quit) adu: Read error: Connection reset by peer 19:04 (join) adu 19:05 (join) tfb 19:06 (quit) tfb: Client Quit 19:12 (join) racycle 19:12 (join) RacketCommitBot 19:12 RacketCommitBot: [racket] plt pushed 5 new commits to master: https://github.com/plt/racket/compare/85f9fbbaee42...7235c6435504 19:12 RacketCommitBot: racket/master d46411d Matthew Flatt: ffi/unsafe: add `_size', `_ssize', `_ptrdiff', `_intmax', `_uintmax'... 19:12 RacketCommitBot: racket/master 79c4af4 Matthew Flatt: racket/base: add `impersonator-ephemeron' 19:12 RacketCommitBot: racket/master dbdfd42 Matthew Flatt: racket/snip: fix `style-list%' `notify-on-change' and contracts... 19:12 (part) RacketCommitBot 19:15 (quit) racycle: Remote host closed the connection 19:19 (join) RacketCommitBot 19:19 RacketCommitBot: [racket] plt pushed 1 new commit to master: https://github.com/plt/racket/commit/7323dde0eabf54dafb85d0e882ccefbf33e5535f 19:19 RacketCommitBot: racket/master 7323dde Danny Yoo: Revert most of the change to word break, but introduce a nbsp for browser metrics.... 19:19 (part) RacketCommitBot 19:22 (nick) EzeQL__ -> EzeQL 19:23 (join) bitonic 19:26 (join) tsion 19:26 (quit) tsion: Changing host 19:26 (join) tsion 19:27 (quit) dyoo: Quit: dyoo 19:30 (join) bitonic` 19:32 (quit) bitonic: Ping timeout: 244 seconds 19:39 (join) RacketCommitBot 19:39 RacketCommitBot: [racket] plt pushed 2 new commits to master: http://git.io/ymGI4A 19:39 RacketCommitBot: racket/master d043a08 Matthew Flatt: fix `plt-games' launcher 19:39 RacketCommitBot: racket/master 2d5884b Matthew Flatt: scribble: fix "on this page" rendering... 19:39 (part) RacketCommitBot 19:40 (part) tsion: "Leaving" 19:43 (join) racycle 20:03 (join) francisl 20:04 (quit) francisl: Client Quit 20:07 (join) rmathews 20:31 (join) dnolen 20:32 (quit) gridaphobe: Remote host closed the connection 20:34 (quit) adu: Quit: adu 20:40 (quit) bjz_: Ping timeout: 252 seconds 20:41 (join) bjz 20:42 (join) jeapostrophe 20:42 (quit) jeapostrophe: Changing host 20:42 (join) jeapostrophe 20:47 (join) adu 20:53 (quit) mithos28: Quit: mithos28 21:16 (quit) juanfra: Quit: juanfra 21:26 (join) Nisstyre-laptop 21:40 (join) dnolen` 21:40 (quit) dnolen: Ping timeout: 256 seconds 21:45 (quit) bitonic`: Ping timeout: 244 seconds 21:45 (quit) dauterive: Quit: Leaving 21:48 (quit) adu: Quit: adu 21:52 (quit) racycle: Quit: racycle 22:02 (join) yacks 22:05 (join) mye_ 22:07 (quit) mye: Ping timeout: 252 seconds 22:07 (nick) mye_ -> mye 22:07 (join) adu 22:22 (join) Slavisa 22:26 (quit) rmathews: Quit: ... 22:37 (quit) yacks: Remote host closed the connection 22:54 (quit) dnolen`: Remote host closed the connection 23:00 (join) rmathews 23:08 (quit) hyko: Ping timeout: 255 seconds 23:08 (quit) jeapostrophe: Ping timeout: 256 seconds 23:13 (join) hyko 23:24 (quit) hyko: Read error: Operation timed out 23:31 (join) francisl 23:34 (join) hyko 23:43 (quit) francisl: Quit: francisl 23:50 (quit) bjz: Ping timeout: 245 seconds 23:50 (join) bjz 23:51 (join) yacks 23:51 (join) racycle 23:54 (join) anonymous 23:55 (nick) anonymous -> Guest88554 23:56 (quit) bjz: Ping timeout: 260 seconds 23:57 (join) bjz