00:00 (quit) askhader: *.net *.split 00:00 (quit) klutometis: *.net *.split 00:02 (quit) stamourv: Ping timeout: 265 seconds 00:02 (quit) mahsohn: Ping timeout: 260 seconds 00:02 (join) askhader 00:02 (join) klutometis 00:02 (join) mahsohn 00:03 (quit) mahsohn: *.net *.split 00:03 (quit) alexsuraci: *.net *.split 00:03 (quit) paul_stansifer: *.net *.split 00:03 (quit) Baughn: *.net *.split 00:03 (quit) chandler: *.net *.split 00:03 (quit) rapacity: *.net *.split 00:03 (quit) jonrafkind: *.net *.split 00:03 (quit) samth_away: *.net *.split 00:03 (quit) jao: *.net *.split 00:03 (quit) mattmight: *.net *.split 00:03 (quit) jay-mccarthy: *.net *.split 00:03 (quit) j3parker: *.net *.split 00:04 (quit) cky: Quit: cky 00:04 (join) cky_ 00:05 (join) mahsohn 00:05 (join) jonrafkind 00:05 (join) alexsuraci 00:05 (join) samth_away 00:05 (join) jao 00:05 (join) paul_stansifer 00:05 (join) chandler 00:05 (join) rapacity 00:05 (join) Baughn 00:05 (join) mattmight 00:05 (join) jay-mccarthy 00:05 (join) j3parker 00:06 (quit) mahsohn: *.net *.split 00:06 (quit) alexsuraci: *.net *.split 00:06 (quit) paul_stansifer: *.net *.split 00:06 (quit) Baughn: *.net *.split 00:06 (quit) chandler: *.net *.split 00:06 (quit) rapacity: *.net *.split 00:06 (quit) jonrafkind: *.net *.split 00:06 (quit) samth_away: *.net *.split 00:06 (quit) jao: *.net *.split 00:06 (quit) mattmight: *.net *.split 00:06 (quit) jay-mccarthy: *.net *.split 00:06 (quit) j3parker: *.net *.split 00:06 (nick) cky_ -> cky 00:08 (nick) Lajla -> 17SAA5PG8 00:08 (join) Lajla 00:08 (join) mahsohn 00:08 (join) jonrafkind 00:08 (join) alexsuraci 00:08 (join) samth_away 00:08 (join) jao 00:08 (join) paul_stansifer 00:08 (join) chandler 00:08 (join) rapacity 00:08 (join) Baughn 00:08 (join) mattmight 00:08 (join) jay-mccarthy 00:08 (join) j3parker 00:09 (quit) mahsohn: *.net *.split 00:09 (quit) alexsuraci: *.net *.split 00:09 (quit) paul_stansifer: *.net *.split 00:09 (quit) Baughn: *.net *.split 00:09 (quit) chandler: *.net *.split 00:09 (quit) rapacity: *.net *.split 00:09 (quit) Lajla: *.net *.split 00:09 (quit) jonrafkind: *.net *.split 00:09 (quit) samth_away: *.net *.split 00:09 (quit) jao: *.net *.split 00:09 (quit) mattmight: *.net *.split 00:09 (quit) jay-mccarthy: *.net *.split 00:09 (quit) j3parker: *.net *.split 00:10 (quit) clklein: Write error: Broken pipe 00:11 (join) clklein 00:11 (quit) shkk: *.net *.split 00:11 (quit) tcoppi: *.net *.split 00:11 (quit) tewk: *.net *.split 00:11 (quit) bremner: *.net *.split 00:12 (join) shkk 00:12 (join) tcoppi 00:12 (join) tewk 00:12 (join) bremner 00:14 (quit) 17SAA5PG8: Ping timeout: 258 seconds 00:14 (join) Lajla 00:14 (join) mahsohn 00:14 (join) jonrafkind 00:14 (join) alexsuraci 00:14 (join) samth_away 00:14 (join) jao 00:14 (join) paul_stansifer 00:14 (join) j3parker 00:14 (join) jay-mccarthy 00:14 (join) mattmight 00:14 (join) Baughn 00:14 (join) rapacity 00:14 (join) chandler 00:15 (quit) mahsohn: *.net *.split 00:15 (quit) alexsuraci: *.net *.split 00:15 (quit) paul_stansifer: *.net *.split 00:15 (quit) Lajla: *.net *.split 00:15 (quit) jonrafkind: *.net *.split 00:15 (quit) samth_away: *.net *.split 00:15 (quit) jao: *.net *.split 00:15 (quit) mattmight: *.net *.split 00:15 (quit) jay-mccarthy: *.net *.split 00:15 (quit) j3parker: *.net *.split 00:18 (join) Lajla 00:18 (join) mahsohn 00:18 (join) jonrafkind 00:18 (join) alexsuraci 00:18 (join) samth_away 00:18 (join) jao 00:18 (join) paul_stansifer 00:18 (join) mattmight 00:18 (join) jay-mccarthy 00:18 (join) j3parker 00:59 (quit) shkk: 01:49 (join) Sonja 01:49 Sonja: hi 02:26 (part) Sonja 02:38 (quit) jonrafkind: Ping timeout: 265 seconds 02:40 (join) pdelgallego 03:11 (quit) Lajla: Ping timeout: 265 seconds 03:21 (quit) mahsohn: Remote host closed the connection 03:30 (join) masm 04:48 (join) hanDerPeder 04:49 (join) ebzzry 04:50 ebzzry: Do Racket developers use DrRacket to develop Racket? 04:53 (join) Lajla 05:12 (quit) hellmage: Remote host closed the connection 05:12 (join) hellmage 05:17 clklein: ebzzry: Yes, mostly 05:38 Lajla: clklein, are you heterosexual fashion designer Calvin Klein? 06:36 clklein: yes 06:54 (part) hellmage 07:07 (join) kingping 07:07 kingping: Hello folks 07:14 Lajla: clklein, you don't say. 07:14 Lajla: what's it like to be heterosexual? 07:14 bremner: like being homesexual, but different. 07:17 kingping: Will second and consequent calls to mcons in (mcons 5 (mcons 4 (mcons 3 '()))) create a new list (mutable pairs) ? 07:17 kingping: Or Scheme will just allocate a memory for a new element and set its pointer to an existing list. 07:33 Lajla: kingping, you mean racket will, mcons is as far as I know, not a Scheme function. 07:33 Lajla: kingping, but cons and mcons create a cons pair, not a list per se. 07:33 Lajla: THe thing is more what the other function _Returns_ 07:33 Lajla: Like, fi we do (cons x (func .... )) 07:34 Lajla: It will just cons those two values, x and (func ...) 07:34 Lajla: The issue is whether the expressions we cons return newly allocated memory or not. 07:34 kingping: Lajla: Yep, indeed, each fun will create its own pair. Just to make sure.. 07:34 Lajla: bremner, are you heterosexual? 07:38 bremner: I sense we might be just a bit offtopic... 07:41 (join) Spewns 07:43 Spewns: hiya 07:43 (join) eli 07:44 kingping: hey Spewns 07:44 Spewns: howsit going? 07:45 Lajla: eli, was that you on stackoverflow? 07:45 eli: Lajla: where? 07:46 kingping: I'm writing a data serializer, a target format is bytevector. I wonder what's the best way to construct it: 1) writing some globally allocated variable until I construct all the data; 2) create bytevectors recursively for each nested element and then to append both in the calling function. 07:46 Lajla: eli; http://stackoverflow.com/questions/3328512/why-multiple-namespaces/3330981#3330981 07:47 kingping: The second approach seems to me more natural for functional programming. 07:48 kingping: But the first one I guess could possibly be faster. 07:48 eli: Lajla: Ah -- yes, that's me. 07:49 eli: Lajla: `lambda' was close to what it is in Emacs -- a special form that evaluates to itself. 07:49 eli: ((list 'lambda (list 'x) (list '+ 'x 1)) 10) 07:49 Lajla: eli, hmm, in emacs, functions are just lists that start with the symbol lambda? 07:49 eli: Yes -- see that example. 07:49 Lajla: Amazing 07:50 Lajla: I did not know that. 07:50 eli: (Ugh, actually it requires a `funcall' too.) 07:50 Lajla: (lambda (x) (+ x 1)) was thus a special form that evaluated to ... (lambda (x) (+ x 1))? 07:50 Lajla: Yeah, I guess. 07:50 Lajla: That's why the namespaces were different. 07:50 eli: It's obviously not working right if you want a lexically scoped language, so Emacs gets away with it. 07:51 eli: Yes to this question too -- try this: (listp (lambda (x) x)) 07:51 eli: Or (car (lambda (x) x)) 07:52 Lajla: eli, well, I don't run emacs here, but I'll take your word for it. 07:52 eli: But this kind of peculiarity is almost gone now, I think that ELisp is the only main language in use that does this. 07:53 eli: There's also newlisp, which makes a point out of having a very fast `eval' -- and that's kind of obvious: it's `eval' is as fast as anything else, because you cannot compile any code. (So actually it would all be slow...) 07:53 eli: If you do get to an emacs, you should try `M-x ielm' -- it gives you an emacs lisp repl which you can try these things out. 07:54 Lajla: Hmm, quite interesing. 07:54 Lajla: That is so ugly and yet so beautiful at the same time if you remember it was 1960s... 07:55 eli: Yeah, that's a good way to put it. 07:55 eli: If you look at newlisp, and overcome the first "blech" reaction, you'll see that it has a kind of a consistent feel to it. 07:56 eli: Especially when you see how they cope with the lack of lexical closures: 07:57 eli: instead of a closure that keeps the data, they'd encourage using `eval' to create a function (one of these lambda list things) with the closed-over data hard-wired into it, 07:57 eli: or there's also a way (IIRC) to capture the current dynamic environment, and re-use it later on. 07:58 Lajla: Hmm, my own lisp supports environments as first class objects to be caputered and used in eval. 08:01 eli: Lajla: Well, unless you have some point you want to make about dynamic scope, I don't see any reason to do that... 08:02 eli: Specifically, it's bad because it kills compilation in a similar way that having a dynamically scoped language does. 08:02 eli: For example (let ((x 1)) ...stuff...) and (let ((y 1)) ...stuff...) cannot be compiled to the same code. 08:03 eli: Also, (let* ((x 1) (x x) (x x)) ...stuff...) is problematic (and you often get such things when macros add let-bindings for various reasons). 08:04 Lajla: eli, why? You can just capture the current environment as a first-class procedure which can be applied to data to result into its evaluation. 08:04 Lajla: Its no worse than continuations 08:04 eli: And also, with (let ((x (whatever))) (foo x) (bar)) racket will know that `x' is no longer needed when it gets to the (bar) call, so it won't hold a reference to its value -- which can be important in some cases to avoid memory leaks. 08:04 Lajla: You just call/ce 08:05 eli: "Why?" to which part? 08:05 Lajla: Well, it will still know it when there's no call/ce in it. 08:05 Lajla: Well, to which part are there continuations? 08:05 Lajla: The obvious thing here is to make up for the fact that set! et al are gone. 08:05 Lajla: Purely functional. 08:06 Lajla: So you have your first class environments and functions that operate on them to make up for that. 08:06 eli: I'm not following you. Continuations do not interfere with compilation (and related transformations). 08:06 Lajla: Neither does this interfere with compilation. 08:07 Lajla: You have your static scope and your language is purely functional, and you can just capture environments with some special form as first class objects. 08:07 Lajla: Or well, technically they are constructed at compile time. 08:07 Lajla: Or it's possible to do that. 08:07 eli: When you compile (lambda (x) E) and (lambda (y) E) they must be compiled to two different functions. 08:08 Lajla: No, that's not how environments work. 08:08 eli: Because if I write in my code (define foo (lambda (x) (bar))) or (define foo (lambda (y) (bar))), I can get different results. 08:08 Lajla: It's more like that if you have (random-environment (list 'zero? 'k)) 08:08 Lajla: It will then evaluate zero? to what ever it was bound to in that environment 08:09 eli: OK, let's start earlier -- do you have a function that returns the current environment? 08:09 Lajla: Sure 08:09 eli: What's it called? 08:09 Lajla: See it like (eval datum environment) 08:09 Lajla: call/ce 08:09 Lajla: But see it like (eval datum environment) but then written as (environment datum) 08:10 eli: `call/ce' calls a function with the current environment? 08:10 Lajla: Exactly. 08:10 eli: Is it a schemish syntax? 08:10 Lajla: Well, it's a lisp. 08:11 eli: If I runt this code: 08:11 Lajla: I haven't yet given too much tought about the praecise syntax, but just assume scheme syntax. 08:11 eli: (define (bar) (call/ce (lambda (e) (e 'x)))) (define (foo x) (bar)) (foo 2) 08:11 eli: what do I get? 08:12 Lajla: What ever the symbol x evaluated to at the location of call/ce 08:13 Lajla: Probably an error if it's not bound there. 08:14 eli: So that example would throw an error, right? 08:14 Lajla: eli, well, yeah, if x is not bound at the place where call/ce is. 08:15 eli: What if I change the `bar' definition to (define-syntax-rule (bar) (call/ce (lambda (e) (e 'x))))? 08:15 Lajla: What's 'define-syntax-rule'? 08:15 eli: Just define `bar' to be the same but as a macro. 08:16 Lajla: Ahhh 08:16 eli: Actually, if you don't have macros, then I'll skip this and go to a simpler example: 08:16 Lajla: So then basically you get the same as: (define (foo x) (call/ce (lambda (x) e 'x))) (foo 2) right? 08:17 Lajla: (lambda (e)* 08:17 eli: (define (foo x y) (call/ce (lambda (e) (e y)))) (foo 2 'x) 08:17 Lajla: Ahh. 08:17 Lajla: That evaluates to 2. 08:17 eli: ok, and: 08:17 eli: (define (foo xx y) (call/ce (lambda (e) (e y)))) (foo 2 'x) 08:17 eli: ? 08:18 Lajla: Error, again. 08:18 Lajla: x is not in the environment 08:18 eli: OK, that's exactly the point. 08:18 eli: I have two functions that are identical modulo alpha-renaming, but they don't behave in the same way. 08:19 eli: IOW, just renaming an identifier can change how some code runs. 08:19 Lajla: YEah, but that can happen from the moment you have eval and you can create symbols. 08:19 eli: Not in most Schemes. 08:21 eli: If you try any counter example, you'll see that you can only get a different program for replacing a name in data that gets fed into `eval' , 08:21 eli: but Racket's compiler will still compile (lambda (x) x) and (lambda (xx) xx) to exactly the same code -- and `eval' cannot interfere with that. 08:22 eli: ...and as a result of that, `eval' can never see local bindings, which always confuses newbies. 08:22 Lajla: (define (f x) (= (eval (string->symbol "x") (current-environment)) x)) 08:22 eli: (Newbies of *any* (sane) language with `eval'.) 08:23 eli: I don't know what you're trying to get to with that, but it still compiles independently of the argument name `x' to the function itself. 08:24 Lajla: It does? 08:24 Lajla: what does (current-environment) evaluate to then? 08:24 eli: Yes. 08:25 eli: (define (f whatever) (= (eval (string->symbol "x") (current-environment)) whatever)) 08:25 eli: will compile to exactly the same code. 08:25 eli: (current-environment) returns the current environment that holds *toplevel* bindings used in `eval' etc. 08:26 Lajla: Ahhh 08:26 eli: It's actually something that is very similar to a hash table that maps symbols to values. 08:26 Lajla: Yeah 08:26 Lajla: that's also in my language. 08:26 eli: (Rather than something that is tied to what the code actually is.) 08:26 eli: So, for example: 08:26 Lajla: There's an environment->struct primitive 08:27 eli: (let ([x 1] [y 2]) (current-evironment)) will return the same thing as (current-environment). 08:27 Lajla: I wonder why it's a thunk then and not just current-environment 08:27 eli: Because we don't have magical variables that get set by the implementation. 08:28 eli: Otherwise it could be one. 08:30 Lajla: Well, aren't all primitives that? 08:30 Lajla: Or it only applies to functions? 08:32 eli: Not really. 08:33 Lajla: Why aren't they? 08:33 eli: In any case, and more to the point -- Racket `current-environment' is a parameter, and applying it as a function on no arguments returns its current value. 08:34 Lajla: Ahh, in that case. 08:34 Lajla: in that way* 08:34 Lajla: I didn't know that it could change. 08:34 eli: (`current-namespace', actually) 08:38 Lajla: eli, well, I see your point I guess. But it's actually not as bad as it seems, I had been purposely incomplete for brevity's sake, call/ce is actually not a function. The language is purely functional so a function should return the same result on the same arguments regardless of location. Environments are actually catched with {call/cc ...} which is not a list at list at all and follows slightly different semantics. 08:38 Lajla: s/slight/unrelated 08:42 eli: Lajla: I know it's not as bad as it seems -- if you have proper lexical scope, then I'd label it as "questionable utility". IIRC, Python has something similar which is some historical baggage from times when their environments were really just hash tables. 08:42 eli goes out 09:02 Lajla: eli, well, it's needed in this case because of the purely functional stuff and all. THe only way to manipulate environments is let them pass through funcions. 09:02 Lajla: but bubye. 09:25 ebzzry: clklein: Hmm. That's interesting. 09:27 (quit) kingping: Quit: x 09:43 (join) sstrickl 09:53 Lajla: ebzzry, ooohh 10:05 (quit) cky: Quit: Rebooting. 10:13 (join) cky 10:23 (quit) hanDerPeder: Ping timeout: 276 seconds 10:47 (join) stamourv 11:10 (quit) masm: Quit: Leaving. 11:25 (join) hanDerPeder 12:01 (nick) samth_away -> samth 12:01 samth: tewk, ping 12:17 (join) adadglgmut 12:20 (join) masm 12:36 (quit) adadglgmut: Quit: Leaving 12:49 (join) jonrafkind 13:36 (join) blake_johnson 14:56 (quit) jonrafkind: Read error: Connection reset by peer 14:56 (join) jonrafkind 15:18 (join) anRch 15:40 (join) jsnikeris 15:41 jsnikeris: I have a procedure that accepts a list of numbers, and I want to generate a sequence witn in-range and use that sequence as input to my procedure. Any idea how I do so? 15:42 jsnikeris: Is a sequence a better representation...should I switch y procedure to accept a equence?' 15:42 jay-mccarthy: (for/list ([i (in-range ...)]) i) 15:42 chandler: I don't understand what you're asking. Do you want to modify your procedure that currently accepts a list so that it accepts a sequence? Or do you want to enumerate the sequence into a list? 15:42 clklein: jsnikeris: How about (your-function (for/list ([i (in-range 10)]) i))? 15:43 (quit) blake_johnson: Quit: blake_johnson 15:44 (join) blake_johnson 15:47 clklein: jsnikeris: A list is one particular form of sequence; others include strings, vectors, and whatever mysterious opaque thing that `in-range' produces. 15:47 jay-mccarthy: clklein: the text at the bottom of the "Testing" page for Redex doesn't look like it is written in English 15:48 jay-mccarthy: also, it begs the question, "Why isn't there a form of redex-match that explains why a term doesn't match when it does not?" 15:50 clklein: That does seem like one of those sentences that only makes sense if you already understand its meaning. I'll try to improve it. 15:51 clklein: Robby and I have briefly discussed writing such a debugging form, but we weren't really sure what it's output would be. 15:51 jay-mccarthy: there are also many typos in the final paragraph 15:52 clklein: I'll fix those too. 15:52 clklein: I don't think it would be too hard to automate the "simplify sub-terms until you get a match" process, but there the output is just "your term doesn't match but this similar one does" 15:53 samth: clklein, ryan has an algorithm for doing this well 15:53 samth: it's in his icfp paper 15:54 clklein: Is it the one where you assume it intended alternative is the one that consumes the most input? 15:54 samth: yes 15:54 samth: although it 15:54 samth: 's more complicated because its on sexps 15:54 clklein: right 15:56 clklein: I'll ask Ryan for a copy of his paper. 15:57 samth: http://www.ccs.neu.edu/scheme/pubs/icfp10-cf.pdf 15:57 clklein: oh, great 15:59 samth: pretty early, i think 16:03 jonrafkind: where is ryan btw 16:03 samth: you're at his school 16:04 jonrafkind: oh hes standing right next to me! 16:04 jonrafkind: obviously hes not here.. 16:05 samth: well how would we know where he is? 16:05 sstrickl: you mean you didn't clip a tracking beacon to him when he was here? 16:05 jay-mccarthy: he flushed it 16:05 jay-mccarthy: unless he is the salt lake 16:05 jay-mccarthy: is IN* 16:08 samth: well, have you ever seen ryan and the great salt lake in the same room? 16:08 jay-mccarthy gasps 16:09 clklein: I've always found that suspicious. 16:11 (join) Nanakhiel 16:13 (quit) Lajla: Ping timeout: 248 seconds 16:23 (quit) ebzzry: *.net *.split 16:23 (quit) alexsuraci: *.net *.split 16:23 (quit) paul_stansifer: *.net *.split 16:23 (quit) masm: *.net *.split 16:23 (quit) Spewns: *.net *.split 16:23 (quit) samth: *.net *.split 16:23 (quit) jao: *.net *.split 16:23 (quit) mattmight: *.net *.split 16:23 (quit) Nanakhiel: *.net *.split 16:23 (quit) jay-mccarthy: *.net *.split 16:23 (quit) hanDerPeder: *.net *.split 16:23 (quit) j3parker: *.net *.split 16:26 (join) Nanakhiel 16:26 (join) masm 16:26 (join) hanDerPeder 16:26 (join) Spewns 16:26 (join) ebzzry 16:26 (join) alexsuraci 16:26 (join) samth 16:26 (join) jao 16:26 (join) paul_stansifer 16:26 (join) mattmight 16:26 (join) jay-mccarthy 16:26 (join) j3parker 16:27 (quit) ebzzry: *.net *.split 16:27 (quit) alexsuraci: *.net *.split 16:27 (quit) paul_stansifer: *.net *.split 16:27 (quit) masm: *.net *.split 16:27 (quit) Spewns: *.net *.split 16:27 (quit) samth: *.net *.split 16:27 (quit) jao: *.net *.split 16:27 (quit) mattmight: *.net *.split 16:27 (quit) Nanakhiel: *.net *.split 16:27 (quit) jay-mccarthy: *.net *.split 16:27 (quit) hanDerPeder: *.net *.split 16:27 (quit) j3parker: *.net *.split 16:28 (join) Nanakhiel 16:28 (join) masm 16:28 (join) hanDerPeder 16:28 (join) Spewns 16:28 (join) ebzzry 16:28 (join) alexsuraci 16:28 (join) samth 16:28 (join) jao 16:28 (join) paul_stansifer 16:28 (join) mattmight 16:28 (join) jay-mccarthy 16:28 (join) j3parker 16:29 (quit) ebzzry: *.net *.split 16:29 (quit) alexsuraci: *.net *.split 16:29 (quit) paul_stansifer: *.net *.split 16:29 (quit) masm: *.net *.split 16:29 (quit) Spewns: *.net *.split 16:29 (quit) samth: *.net *.split 16:29 (quit) jao: *.net *.split 16:29 (quit) mattmight: *.net *.split 16:29 (quit) Nanakhiel: *.net *.split 16:29 (quit) jay-mccarthy: *.net *.split 16:29 (quit) hanDerPeder: *.net *.split 16:29 (quit) j3parker: *.net *.split 16:30 (join) Nanakhiel 16:30 (join) masm 16:30 (join) hanDerPeder 16:30 (join) Spewns 16:30 (join) ebzzry 16:30 (join) alexsuraci 16:30 (join) samth 16:30 (join) jao 16:30 (join) paul_stansifer 16:30 (join) mattmight 16:30 (join) jay-mccarthy 16:30 (join) j3parker 16:31 (quit) anRch: Write error: Broken pipe 16:33 (quit) blake_johnson: Quit: blake_johnson 16:37 (join) shkk 16:44 clklein: jay-mccarthy: I pushed an improvement. Let me know if you think it still needs work. (And, of course, you're welcome to give it a crack yourself.) 16:44 jay-mccarthy: looks good 16:48 tewk: samth: pong 16:49 tewk: is there a match-values? 16:49 jay-mccarthy: match* is kinda that 16:50 sstrickl: match* isn't documented, is it? 16:50 sstrickl: at least last time I looked for docs, I didn't see any 16:50 jay-mccarthy: i don't think it is 16:50 sstrickl: yeah, I meant to poke samth about that already 16:50 sstrickl: if he comes back in, I will 16:54 (nick) Nanakhiel -> Lajla 16:59 (join) blake_johnson 17:01 Lajla: eli, by the way, say we have (define (f x) (call/cc x)), this same function would be compiled to different code depending on its location in the source, right? 17:06 shkk: Lajla: Hi Captain !! 17:22 eli: Lajla: No. (And BTW, you could just (define f call/cc).) 17:22 Lajla: eli, yeah, I realized that. 17:23 Lajla: But why not exactly, call/cc is effectively a different object depening on where it's placed in the source, right? 17:23 Lajla: Or does Racket determine call/cc at runtime? 17:24 (quit) shkk: 17:24 eli: `call/cc' is a plain function, as far as a (naive) compiler or interpreter is concerned. Implementing it means that you need to be able to reify the runtime context (= stack), but calling it is not different than any other function. 17:26 Lajla: Hmm, you don't say. 17:27 Lajla: I always more or less assumed that all occurences of call/cc in the source would pretty much be resolved at compile time. 17:27 Lajla: And transformed into lambda abstractions based on their position 17:28 eli: You can't resolve call/cc at compile time -- it captures the *dynamic* context. 17:29 Lajla: Well, not completely, but I take it you can transform it into some lambda-abstraction-esque thing which shares memory and is thus mutated accordingly with the rest of the program. 17:30 (quit) hanDerPeder: Quit: hanDerPeder 17:33 (join) hanDerPeder 17:37 (quit) hanDerPeder: Client Quit 18:05 samth: tewk, how hard would it be to give a flag to set the initial heap size 18:05 samth: ? 18:06 tewk: You mean the initial nursery size? 18:06 samth: i'd like both 18:08 tewk: I dont' see how initial heap size would make a difference. 18:08 samth: it would gc less 18:08 samth: i assume major collections happen when the heap is near-full 18:10 samth: if you look here: http://haskell.org/ghc/docs/6.12.1/html/users_guide/runtime-control.html 18:10 samth: there are a bunch of options, many of which would be nice 18:15 tewk: samth: both those parameters grow exponentially so the cost should be minimal. 18:16 samth: I've definitely experienced situations where artifically requiring extra modules reduces runtime 18:17 (quit) blake_johnson: Quit: blake_johnson 18:18 tewk: In the past we have optimized for minimal memory footprint, I think we should set the default values for common case usage which is drracket web-server typed-scheme. 18:19 tewk: What modules are you requiring, typed-scheme? 18:19 samth: that's probably right 18:20 samth: collects/tests/racket/benchmarks/shootout/spectralnorm.rkt 18:20 tewk: It wouldn't be too hard to add then options. 18:20 samth: look at that file, you'll see requires of racket/trace and racket/contract 18:20 samth: the program slows down if you remove them 18:20 jonrafkind: how can that be? 18:20 samth: i tried requiring some more modules, but that slowed it down 18:21 samth: jonrafkind, GC effects 18:21 jonrafkind: unreal.. 18:21 tewk: does the timing occur after module load? 18:22 samth: no, the timing is for the whole run 18:22 tewk: hmmm that doesn't make as much sense 18:22 samth: ie, % time racket spectractnorm.rkt 500 18:55 (join) hanDerPeder 18:59 (quit) hanDerPeder: Client Quit 19:10 (quit) sstrickl: Quit: sstrickl 19:13 (nick) samth -> samth_away 19:40 (quit) masm: Quit: Leaving. 19:48 (join) hanDerPeder 20:08 (join) shkk 20:11 jonrafkind: how do I use a module-path-index in typed/racket ? 20:17 stamourv: jonrafkind: did you try it? 20:19 jonrafkind: well I wrote Module-Path-Index 20:20 stamourv: oh, a module-path-index is a type? 20:20 stamourv: or rather, would be? 20:20 jonrafkind: yea 20:20 stamourv: I assumed it was a path 20:20 stamourv: then we'd need to add a base type for it, and add types for functions dealing with them 20:21 jonrafkind: i was trying to convert that check tool I wrote to typed/scheme 20:21 jonrafkind: i use unstable/generics, though. will that work with typed/racket ? 20:21 stamourv: after a quick look at the docs for m-p-is, it doesn't look too hard 20:21 stamourv: no idea about unstable/generics 20:22 stamourv: but if you want m-p-is, I can try to add them tomorrow, if I have time 20:22 jonrafkind: ok, its not a huge deal. but if its easy for you then it would be nice 20:23 (quit) shkk: Ping timeout: 276 seconds 20:23 stamourv: shouldn't be too hard, I guess, looks like a simple base type 20:23 stamourv: or am I missing something? 20:23 jonrafkind: so basically if I do (define-struct: foo ...) I can use `foo' as a type, right? 20:23 stamourv: yep 20:23 jonrafkind: yea i think its a simple base type 20:24 jonrafkind: also see if you can add resolved-module-path 20:24 stamourv: and I'd advise on using define-struct: rather than struct: for the moment 20:24 stamourv: struct: has a bug if you try to provide (struct-out ...) 20:24 jonrafkind: oh, i was just using whatevers in the typed-racket docs 20:24 jonrafkind: oh oops, use define-struct: and not struct:, ok 20:24 jonrafkind: thats what im using right now 20:24 stamourv: I know 20:25 (join) shkk 20:25 jonrafkind: is there an Any type or something? 20:26 stamourv: there is 20:26 stamourv: although it just means that you know nothing about the type 20:27 jonrafkind: right, or typed-racket can't deal with it yet 20:27 stamourv: but if you combine it with predicates, occurrence typing will make everything work 20:27 jonrafkind: ah ok 20:27 stamourv: as in: you have a function with an arg of type Any, if you check number? on it, you can use it as a number in the then branch 20:27 stamourv: if you don't, then you can only call functions that accept the any type 20:28 jonrafkind: but that only works for predicates known to typed-racket right? 20:28 stamourv: right 20:28 (quit) pdelgallego: Ping timeout: 265 seconds 20:28 stamourv: module-path-index? won't work 20:28 jonrafkind: right 20:30 stamourv: although, as a quick hack, you could probably try require/typed the m-p-i functions you want, and have them accept Any 20:32 jonrafkind: typed-check.rkt:236:2: Type Checker: Error in macro expansion -- untyped variable: parse-loop51 in: (match something ((list exported (list paths ...)) (symbol:multiple-modules (populate-symbol exported) (map extract-module paths)))) 20:33 jonrafkind: i gotta run, i'll deal with this later 20:33 stamourv: alright 20:33 stamourv: I'll try to add that stuff tomorrow 20:37 (quit) jonrafkind: Ping timeout: 245 seconds 20:51 (quit) hanDerPeder: Quit: hanDerPeder 21:03 (quit) shkk: 21:26 (join) Gwyth 21:27 (join) hellmage 23:12 (join) jsnikeri` 23:16 (quit) jsnikeris: Ping timeout: 240 seconds 23:19 (quit) jsnikeri`: Ping timeout: 276 seconds