00:04 (quit) rbarraud: Read error: Connection reset by peer 00:08 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 00:28 (join) jonrafkind 01:27 (join) hellmage 01:30 (join) Rakko 01:36 (quit) emma: Ping timeout: 252 seconds 01:37 (join) emma 01:39 Rakko: Newbie question: is the command-line racket program supposed to be able to run scripts that start with #lang? I can only get such scripts to run in DrRacket. 01:41 (quit) hellmage: Ping timeout: 252 seconds 01:42 (quit) emma: Ping timeout: 252 seconds 01:48 jonrafkind: Rakko, yea you can do that 01:49 (join) emma 01:54 Rakko: jonrafkind: I can't get it to work. 01:54 (join) rbarraud 01:54 jonrafkind: can you give more details 01:55 jonrafkind: times up, time for sleep 01:56 Rakko: oh, damn 01:56 Rakko: was gonna give you a dl link 01:56 Rakko: night 01:56 Rakko: http://rakko.homeunix.com:8089/~eric/scmindent.scm -- for anyone interested 01:57 Rakko: if I try to run it either by just typing its name or by racket -r scmindent.scm, and feed it a scheme file to indent as input, it waits a second or so and then exits 01:57 Rakko: but if I take out #lang scheme at the beginning it works fine 01:58 Rakko: oh, I should add that it doesn't matter if I use #lang racket or #lang scheme 02:00 (quit) jonrafkind: Ping timeout: 264 seconds 02:38 (quit) Rakko: Quit: Rakko 03:07 (join) writer 03:30 (join) samth 03:30 samth: join #scheme 03:33 (join) stamourv 03:34 (join) hanDerPeder 04:44 (quit) rbarraud: Read error: Connection reset by peer 04:48 (join) rbarraud 05:19 (join) hellmage 06:00 (quit) hellmage: Ping timeout: 240 seconds 06:24 (join) hellmage 06:45 (quit) stamourv: Quit: ERC Version 5.3 (IRC client for Emacs) 06:49 (quit) emma: Remote host closed the connection 06:54 (quit) samth: Ping timeout: 255 seconds 06:58 (quit) rbarraud: Ping timeout: 245 seconds 07:06 (join) emma 07:12 (quit) hellmage: Ping timeout: 272 seconds 07:29 (quit) emma: Remote host closed the connection 07:30 (join) emma 07:37 (quit) emma: Ping timeout: 276 seconds 07:52 (quit) jao: Ping timeout: 265 seconds 07:52 (join) emma 08:15 (quit) emma: Ping timeout: 264 seconds 08:22 (join) samth 08:28 (join) emma 08:40 (join) chturne 08:47 (join) stamourv 08:52 (quit) emma: Ping timeout: 264 seconds 08:52 (join) emma 08:58 (quit) emma: Remote host closed the connection 09:06 (join) emma 09:10 (quit) emma: Read error: Connection reset by peer 09:11 (join) emma 09:16 (quit) emma: Ping timeout: 276 seconds 09:23 (join) emma 09:43 (join) b-man_ 09:56 (join) jeapostrophe 10:01 samth: jeapostrophe, have you seen this kind of error before: 10:01 samth: require: namespace mismatch; reference (phase 1) to a module "/home/samth/sw/plt/collects/typed-scheme/typecheck/def-export.rkt" that is not available (phase level 1) in: renamer 10:01 samth: renamer is something i've defined 10:01 samth: but i've never gotten that error 10:02 jeapostrophe: i've never gotten it but i think i can decipher it 10:06 (join) hellmage 10:12 (quit) jeapostrophe: Quit: jeapostrophe 10:32 (quit) b-man_: Remote host closed the connection 10:32 (join) b-man_ 11:01 samth: jay-mccarthy, you there? 11:01 samth: if you have a deciphering, that would be great 11:23 (quit) chturne: Remote host closed the connection 11:29 (join) jonrafkind 11:32 (quit) hanDerPeder: Quit: hanDerPeder 11:37 (join) chturne 11:39 jay-mccarthy: samth: i think it is saying that the def-export macro is used in a place where def-export.rkt is not required, because renamer is not actually bound inside the macro 11:39 samth: ah, ok 11:39 jay-mccarthy: i don't think define-for-syntax works that way 11:39 jay-mccarthy: (you basically want (for-template (for-syntax renamer)) 11:39 samth: ah, that makes sense 11:40 jay-mccarthy: but since you can't write that, i think you need to put renamer in another file and get it for-template 11:54 samth: hmm, that didn't work 11:55 samth: now i'm getting the same error, but the second phase 1 is now phase 0 11:56 (join) jeapostrophe 11:57 (join) _ryanc_ 11:58 (part) stamourv: "ERC Version 5.3 (IRC client for Emacs)" 11:58 jay-mccarthy: are you requiring for-template in def-export? 11:59 samth: `renamer' actually occurrs on the RHS of a define-syntax 12:00 samth: so it should normally just be required `for-syntax' 12:01 samth: i tried requiring it at phase 0 but that didn't help 12:03 jay-mccarthy: but it appears in a syntax template for a define-syntax rhs 12:03 jay-mccarthy: so from the perspective of def-export it is using it as a template 12:03 jay-mccarthy: maybe i'm crazy 12:03 samth: adding the for-template require didn't help 12:04 jay-mccarthy: requiring it normally doesn't help either? 12:04 jay-mccarthy: and in the other file is it define'd or define-for-syntax'd 12:05 samth: in the other file it's defined 12:06 samth: ok, i got it to work, by requiring "renamer.rkt" from typed-racket itself 12:06 samth: I think I can now construct a small example of the confusing behavior 12:07 samth: thanks for your help 12:12 (quit) jeapostrophe: Quit: jeapostrophe 12:13 _ryanc_: samth, how were you inserting the reference to renamer? 12:17 jay-mccarthy: _ryanc_: http://github.com/plt/racket/blob/master/collects/typed-scheme/typecheck/def-export.rkt 12:17 (notice) rudybot: http://tinyurl.com/3a465dd 12:18 (quit) samth: Ping timeout: 240 seconds 12:19 (join) hanDerPeder 12:20 _ryanc_: I seem to recall this error coming up before... I wonder if there was a regression in the module instantiation code. 12:21 jay-mccarthy: maybe it is a bug in the lazy instantiation? 12:22 _ryanc_: IIRC, it had to do with the order that modules were instantiated in... but that might have been a different error ("used before definition"?) 12:23 _ryanc_: anyway, sounds like samth is boiling it down to something smaller 12:32 jonrafkind: _ryanc_, should this file exist? collects/syntax/private/stxparse/runtime-prose.rkt 12:32 jonrafkind: i just did a pull --rebase and its missing from my tree 12:33 (quit) writer: Quit: writer 12:34 _ryanc_: jonrafkind, I moved it to syntax/parse/private/runtime-report.rkt 12:35 jonrafkind: hm, why am i getting an error about it not being found 12:35 jonrafkind: i ran make install.. 12:35 jonrafkind: ill rebuild the syntax collects 12:37 _ryanc_: had you changed anything in syntax/*? 12:38 jonrafkind: nah 12:39 jonrafkind: bleh same error.. 12:39 jonrafkind: it would be nice if the load handler told me who invoked it 12:39 _ryanc_: grep :) 12:40 jonrafkind: ok it was in my own file somehow 12:42 _ryanc_: ah... maybe you had changed current-fail-handler to debug something at some point? 12:42 jonrafkind: oh yea, that was probably why 12:42 jonrafkind: ok i erased the occurences in my own source, but the problem persists 12:43 _ryanc_: did you re-run setup? 12:43 jonrafkind: well i just erased all the compiled directories instead 12:43 _ryanc_: grep :) 12:43 jonrafkind: yea.. grepping the whole tree now 12:43 jonrafkind: nothin 12:44 _ryanc_: re-run setup for real this time 12:44 jonrafkind: ok 12:49 (join) uygur 12:53 uygur: Hello out there, I am from Java camp and played with Clojure a bit. I also found HOP web developement. Is there anything like HOP in Racket? I am also interested using Racket for scripting. Any guidance is appreciated. 13:02 jonrafkind: hop = higher order functions? 13:03 fjl: uygur: the ubiquitous package repository for racket lives at http://planet.plt-scheme.org/, maybe you'll find something there... 13:03 clklein: jonrafkind: probably hop.inria.fr 13:03 fjl: jonrafkind: HOP is Bigloo's web framework thing: http://hop.inria.fr/ 13:04 jonrafkind: well thats an awful choice for a name.. I thought hop was pretty standard for "higher order programming" 13:05 fjl: uygur: but as far as i know, nothing as comprehensive as HOP exists for Racket 13:07 fjl: uygur: if you're into web stuff, you should really try working with the web server that comes with Racket (http://docs.racket-lang.org/web-server/index.html). 13:20 (join) spidermario 13:24 (quit) hanDerPeder: Quit: hanDerPeder 13:28 (join) samth 13:28 (part) hellmage 13:29 samth: _ryanc_, you still around? 13:38 _ryanc_: samth, yes 13:39 samth: so, what was happening is that I had a macro which expanded to a use of renamer 13:39 samth: and a use of that macro was in the output of TR's #%module-begin 13:40 samth: and then I changed TR's module-begin to dynamic-require its implementation 13:40 samth: and then i got that error 13:40 samth: which i fixed by having the same module that defined #%module-begin require the def of renamer 13:41 samth: _ryanc_, hope that makes sense 13:42 _ryanc_: aha 13:43 _ryanc_: I suspected something of the sort, but I couldn't figure out how you were disconnecting the syntax from the require chain. 13:44 _ryanc_: Why dynamic-require? 13:44 samth: i would really like to have a way to say "this for-syntax computation doesn't need to be run at runtime" 13:44 samth: so that I can avoid loading the TR implementation at runtime 13:44 samth: right now, #lang typed/racket/base 1 is an order of magnitude slower than #lang racket/base 1 13:45 samth: even after precompiling 13:45 _ryanc_: when run as a script via racket, or run in drracket, or what? 13:46 samth: as a script on the command line 13:46 _ryanc_: lazy instantiation is supposed to help with this... apparently not enough? 13:46 samth: right, not nearly enough 13:46 _ryanc_: hmm, I wonder why not 13:47 samth: part of the problem is that YWIW works against lazy instantiation 13:47 samth: since you're inserting compile-time code that runs when the program runs 13:47 samth: so everything at phase 1 gets loaded 13:47 _ryanc_: I'm not sure exactly what you mean, but I think I disagree :) 13:48 _ryanc_: no, the idea is to only evaluate the phase 1 code if phase 1 is needed (by eval, for example) 13:49 samth: my understanding from reading the docs is that if you execute any phase 1 code, it loads all the phase 1 modules 13:49 (join) jao 13:49 _ryanc_: but "racket myprog.rkt" shouldn't execute any of the phase 1 code of myprog.rkt if it's already compiled (I think) 13:50 samth: ah, hmm, you seem to be right 13:50 samth: so then i'm not sure why this is happening 13:51 _ryanc_: TR has essentially no runtime support beyond contracts, right? 13:51 samth: right 13:51 _ryanc_: in other words, the goal should be "as fast as racket + racket/contract" 13:51 samth: no, as fast as racket/base + racket/contract 13:51 samth: which is a little faster 13:51 _ryanc_: yes, sorry 13:52 samth: but I'd take the former in a heartbeat right now 13:52 _ryanc_: perhaps you have unnecessary requires that cause things that are only needed at phase 1 to be loaded at phase 0 too 13:53 _ryanc_: we need a tool for inspecting and pruning module require graphs 13:53 samth: yeah, the module browser is ok but not great 13:53 samth: and really slow 13:54 _ryanc_: IIRC, it's not good at showing phases, and it doesn't help at all for detecting useless requires 13:55 samth: right 13:57 _ryanc_: maybe I can come up with something 13:59 samth: i think there are some places where i have excess requires 14:01 samth: i have a suspicion that there are some places where i'm doing excess requires to make the tests work 14:02 _ryanc_: actually, this may be a good fit with Jay's work 14:02 samth: yes, i think so 14:03 _ryanc_: There are two ways to approach the code to analyze what gets used: watch expansion using the macro-stepper tools, or inspect the compiled code. The first might have benefits, but I'm not sure yet if they actually help in this task. 14:06 _ryanc_: well, they might. Suppose a program used match, which expands into pure racket code (pretend match:error doesn't exist). If a macro doesn't leave any run-time references in a module, the macro's module might get marked as useless by a compiled-code analyzer. 14:07 samth: yeah 14:07 _ryanc_: although watching expansion has blind spots too, like side-effects 14:08 samth: although, i want to make sure that laziness is doing enough for me, so comparing the too might be instructive 14:10 _ryanc_: I'll look into it... 14:10 _ryanc_: after lunch 14:11 samth: ok 14:11 samth: it's after dinner here, so hurry up :) 14:12 samth: (i'm in the netherlands at ifl) 14:12 samth: if there was just a way to print every visited module, that would be helpful 14:13 _ryanc_: that should be easy to predict, harder to monitor 14:14 samth: but monitoring would be the really useful bit 14:16 _ryanc_: only if the prediction is wrong :) 14:16 _ryanc_: although I suppose monitoring might also provide a way of timing module instantiation, which would be useful on its own 14:17 _ryanc_: anyway, I'm off to lunch now 14:26 samth: maybe i can use `current-load' 14:29 (join) carleastlund 14:59 jay-mccarthy: samth: did neil do okay? 15:00 jay-mccarthy: _ryanc_: we already prune non-0 module references during the batch compiling 15:00 samth: his talk isn't for 2 days 15:01 jay-mccarthy: i thought it was on wednesday 15:01 jay-mccarthy: nevermind then :) 15:01 samth: jay-mccarthy, will the batch compiler work on TR? 15:01 jay-mccarthy: it already does 15:01 samth: :) 15:02 jay-mccarthy: (as much as it works on anything else which is about 90% probability on any given zo) 15:02 clklein: Can it demodularize itself yet? 15:03 samth: afaict, TR is always in the 10% for all tools 15:03 jay-mccarthy: oh ya 15:03 clklein: yay! 15:03 jay-mccarthy: well, we are currently working on a bug involving doubly cyclic closures 15:03 clklein: doubly cyclic? 15:04 clklein: captures two references to itself? 15:04 jay-mccarthy: a cyclic closure that contains another cyclic closure 15:04 clklein: ah 15:05 clklein: And when you say "closure" you mean the strangely named thing whose defining property is that it does NOT capture anything, right? 15:05 jay-mccarthy: ya :) 15:07 clklein: Robby insisted that we rename those things in the model. 15:14 (quit) emma: Remote host closed the connection 15:20 (join) emma 15:22 (join) shofetim 15:32 samth: btw, carleastlund, john woo is an uncredited director of many of the talks here 15:36 (quit) emma: Ping timeout: 240 seconds 15:38 (join) emma 15:40 _ryanc_: jay-mccarthy, I know you eliminate phase non-0 references, but I suspect the issue here is actual requires at phase 0 that aren't used. Perhaps you can prune those too, but it would be nicer to clean up the code; that's why an analysis tool would be useful. 15:40 samth: _ryanc_, try the following to see the problem 15:40 samth: [samth@hermes:~/tmp] cat testtr.rkt 15:40 samth: #lang typed/racket/base 15:40 samth: 1 15:41 samth: [samth@hermes:~/tmp] cat /home/samth/.racketrc 15:41 samth: (let ([loader (current-load)]) 15:41 samth: (current-load (lambda args 15:41 samth: (displayln args) 15:41 samth: (apply loader args) 15:41 samth: (displayln "done")))) 15:41 samth: [samth@hermes:~/tmp] r 15:41 samth: Welcome to Racket v5.0.1.4. 15:41 samth: > (require "testtr.rkt") 15:41 samth: you'll see a lot of output 15:42 _ryanc_: ah, that's very different from running "racket testtr.rkt", though 15:43 samth: no, i think it's the same thing 15:44 samth: if you do the same for a file written in racket/base, there's no loading other than the directly-requireed file 15:44 carleastlund: samth: bang, bang. 15:45 samth: carleastlund, i was killed multiple times 15:45 carleastlund: 'Bout time. 15:48 samth: oh, and _ryanc_, switching to dynamic-require of the implementation of #%module-begin reduces that output considerably 15:53 jay-mccarthy: _ryanc_: i eliminate all unused top levels which can mean removing all of a require's top levels 15:57 _ryanc_: samth, jay-mccarthy, after playing with the example Sam sent, I realized (and Matthew confirmed) that only *instantiation* happens lazily; all of the modules are still read in. 15:58 _ryanc_: that's why the load handler is printing everything out 15:58 samth: why does the load handler not print anything for something written in plain racket? 15:59 _ryanc_: because it's already loaded 15:59 samth: since that requires a bunch of files (namely, the implementation of `racket') 15:59 samth: ah, of course 15:59 _ryanc_: you might see it if you create a fresh namespace 16:02 _ryanc_: So the baseline "#lang racket/base + racket/contract" is wrong, unless you want to play creepy namespace tricks. 16:03 _ryanc_: The real baseline is "#lang racket/base + racket/contract + (for-label typed/racket/base)". 16:04 samth: why is that? 16:04 _ryanc_: I get testtr.rkt: 1.07s, baseline.rkt: 0.74s, testrb.rkt: 0.16s. 16:05 samth: also, changing the implementation of #%mb to be dynamic-required saves loading about 50 modules 16:05 _ryanc_: Because you have to load the entire implementation of TR even if you don't instantiate it. (Again, unless you do tricks like dynamic-require.) 16:10 samth: so, for me i get TR: 0.54 Baseline: 0.36 RB: 0.08 16:10 samth: that's with large parts of the implementation dynamic-required 16:10 samth: unfortunately, other parts of the implementation are required 16:11 samth: since they are harder to change 16:11 (join) tcoppi_ 16:14 (quit) tcoppi: Ping timeout: 276 seconds 16:20 _ryanc_: samth, I talked with Matthew about your dynamic-require hack and the possibility of another flavor of require that makes it safer and more official. 16:21 _ryanc_: The summary is that he's thought about it and hasn't thought of a combination that is both safe and useful (in cases such as yours). 16:21 samth: the hell with safe, i want fast! :) 16:21 _ryanc_: On the other hand, he sees the dynamic-require hack as reasonable, as long as you're aware of the sharp edges and the issues with eg creating executables for distribution. 16:22 _ryanc_: (At least, reasonable as filtered through my limited understanding of what you're doing :) ) 16:22 samth: so, programs written in TR should still be turnable into executables 16:22 samth: just not TR itself, right? 16:23 samth: the trouble is that there are portions that are harder to turn into dynamic-require 16:23 _ryanc_: maybe... something like that... 16:23 _ryanc_: like what? 16:24 samth: typed-scheme/private/base-env.rkt 16:24 samth: or (somewhat more simply) typed-scheme/private/base-types.rkt 16:25 samth: which expands into roughly: 16:25 samth: (begin (define-syntax Type (\ (stx) error)) (dict-set! type-table #'Type (make-a-type ...))) 16:26 samth: and the catch is that TR needs to provide Type 16:26 samth: but `make-a-type' depends on some substantial portion of the implementation 16:28 _ryanc_: does it need to? 16:28 samth: does which need to? 16:28 _ryanc_: can you minimize the dependencies of 'make-a-type'? 16:29 samth: (make-a-type ..) is just a stand-in for an arbitrary expression 16:29 samth: it doesn't exist as a particular function 16:30 _ryanc_: then can you minimize the dependencies of those expressions? eg just have a module of structure definitions that they refer to? 16:31 samth: not really 16:32 (part) fjl 16:32 _ryanc_: or change the dictionary from id => Type to id => (type-factory -> Type)? 16:37 _ryanc_: This is the problem with final-algebraic representations, you know. (Or perhaps, non-intial-algebraic representations.) 16:38 (quit) carleastlund: Quit: carleastlund 16:51 samth: unfortunately, that doesn't even help 16:51 samth: if I want to maintain the structure of the file, the relevant identifiers need to be required into it 16:51 samth: so even if i delay the computation, the require has already happened 16:52 samth: i've tried adding delays - it didn't help 17:16 _ryanc_: samth, the point was to eliminate the require and get the machinery currently coming from the require from the type-factory 17:19 (quit) samth: Ping timeout: 272 seconds 17:25 (join) anRch 17:42 (nick) tcoppi_ -> tcoppi 17:50 (quit) _ryanc_: Quit: Leaving 17:51 (quit) spidermario: Read error: Connection reset by peer 18:19 (part) shofetim: "ERC Version 5.3 (IRC client for Emacs)" 18:21 (quit) anRch: Quit: anRch 18:53 (join) tym 18:54 (quit) tym: Client Quit 19:14 (join) rbarraud 19:26 (join) jeapostrophe 19:37 (quit) b-man_: Remote host closed the connection 19:43 (join) hanDerPeder 19:48 (quit) emma: Ping timeout: 240 seconds 20:03 (join) emma 20:30 (quit) jeapostrophe: Quit: jeapostrophe 20:34 (join) jeapostrophe 21:03 (quit) hanDerPeder: Quit: hanDerPeder 21:19 (quit) rbarraud: Ping timeout: 255 seconds 21:26 (quit) jeapostrophe: Quit: jeapostrophe 21:56 (join) jeapostrophe 21:59 (quit) Lajla: Read error: Connection reset by peer 22:00 (join) Lajla 22:11 (join) rbarraud 22:25 (join) asumu 22:43 (quit) rbarraud: Ping timeout: 245 seconds 22:43 (join) rbarraud 23:02 (join) Rakko 23:32 (quit) rbarraud: Remote host closed the connection