00:01:05 You can easily create monomorphic procedures for specific uses, like (define (vector-map-2 f vec1 vec2) (vector-map f vec1 vec2)) 00:01:34 where f for vector-map-2 has type number->number->number, whereas for vector-map you don't know how many arrows it has. 00:01:59 -!- ray [i=ray@drong.notacat.org] has quit [Read error: 60 (Operation timed out)] 00:02:03 Fare [n=Fare@128.30.7.73] has joined #scheme 00:02:51 -!- weinholt [i=weinholt@debian/emeritus/weinholt] has quit [Read error: 60 (Operation timed out)] 00:02:54 weinholt [i=weinholt@debian/emeritus/weinholt] has joined #scheme 00:03:18 jrtayloriv [n=jrt4@cpe-69-205-162-163.stny.res.rr.com] has joined #scheme 00:03:26 ray [i=ray@drong.notacat.org] has joined #scheme 00:03:35 -!- jrtayloriv [n=jrt4@cpe-69-205-162-163.stny.res.rr.com] has left #scheme 00:04:10 seamus_android [n=alistair@212.183.140.48] has joined #scheme 00:04:11 -!- seamus_android [n=alistair@212.183.140.48] has left #scheme 00:04:22 seamus_ [n=alistair@212.183.140.48] has joined #scheme 00:10:43 mabes [n=mabes@bmabey.fttp.xmission.com] has joined #scheme 00:16:10 foof, identifier macros can detect that 00:16:52 -!- phax [n=phax@unaffiliated/phax] has quit ["Leaving"] 00:17:12 emma [n=em@unaffiliated/emma] has joined #scheme 00:18:48 jcowan, it is possible to implement SYNTAX-CASE atop an extension of syntactic closures that riaxpander implements. 00:18:49 -!- arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has quit [Read error: 60 (Operation timed out)] 00:19:04 What is that extension? 00:19:04 -!- lighterthanair [n=lightert@38.105.245.18] has quit [] 00:19:29 BTW, I looked at riaxpander but didn't find any documentation for using it directly, rather than as a macroexpander for various Scheme systems. 00:23:43 chandler, how do you implement LETREC and LETREC* in terms of LET and identifier macros, without, say, SET! as well? 00:24:07 You don't; you use `SET!' as well. 00:25:55 If you know how to implement R6RS `letrec' in terms of `let' and `set!' without R6RS-style identifier macros, I'd love to hear about it; I can't see how myself. 00:26:06 jcowan, if you're using it from Chicken (i.e. you've loaded chicken.scm), just call (RIAXPANDER:EXPAND (MAKE-CHICKEN-ENVIRONMENT)). 00:26:21 chandler, what is different about the R6RS's LETREC? 00:26:23 Riastradh: What is the extension of syntactic closures you referred to? 00:27:01 Riastradh: The requirement that implementations detect and signal an error on uses of the bound variables while evaluating the inits. 00:27:06 chandler: There's a definition at the end of alexpander.scm that shows how. 00:27:15 chandler, ah. 00:27:32 jcowan: Does that implement the requirement I just mentioned? 00:27:52 The extension is granting access to the set of interned aliases in the caller of a macro. (Actually, this is more of an extension to explicit renaming.) 00:28:07 chandler: Yes, IIRC. 00:28:35 Go to http://petrofsky.org/src/alexpander.scm and search for safe-letrec. 00:28:50 or rather safe-letrec* 00:28:58 Oh; that's rewriting `set!'. 00:29:00 s/rather / 00:29:44 (I think...) 00:30:07 Macros: read-only code 00:30:25 "(fluid-let-syntax ((set! new-set!))" 00:30:32 That's cheating. 00:30:53 I think identifier-syntax is less objectionable than that. 00:31:20 The main objection to IDENTIFIER-SYNTAX does not apply to FLUID-LET-SYNTAX. 00:31:29 Riastradh: Is that extension necessary for syntactic closures, or just for ER? 00:32:05 Fine, but I think there are plenty of reasons to object to `fluid-let-syntax'. 00:32:25 It is necessary for SYNTAX-RULES. 00:32:51 neccessary in what system, Riastradh? 00:32:59 Sorry, let me rephrase my question: Is the extension you described necessary to implement `syntax-rules' or `syntax-case' on syntactic closures? 00:33:12 Yes, chandler. 00:34:14 *jcowan* departs for the day, having set the cat among the pigeons nicely, and perhaps pleased Arthur Gleckler. 00:34:34 samth, SYNTAX-CASE lets you introduce names in the usage environment of a macro. For example, if (BLOCK ) is supposed to expand to (CWCC (LAMBDA (EXIT) )) where EXIT is bound in , this makes it possible to use BLOCK in the output of a macro composably. 00:35:00 Vanilla explicit renaming and syntactic closures doesn't support this. 00:35:53 -!- jcowan [n=jcowan@72.14.228.129] has quit ["Leaving"] 00:36:09 right 00:36:25 that's actually very similar to 'syntax parameters' in PLT Scheme 00:36:28 Riaxpander does, though. 00:36:56 Syntax parameters are a bit different. Riaxpander doesn't (directly) support them. 00:37:01 http://docs.plt-scheme.org/reference/stxparam.html#%28form._%28%28lib._scheme/stxparam..ss%29._syntax-parameterize%29%29 00:37:03 -rudybot_:#scheme- http://tinyurl.com/yjgbvaw 00:37:19 I think fluid-let-syntax gives you enough to implement syntax-parameterize 00:37:24 but i'm not sure 00:37:40 geckosenator [n=sean@adsl-67-112-204-194.dsl.sntc01.pacbell.net] has joined #scheme 00:39:04 and they're used for very much the same thing: http://blog.plt-scheme.org/2008/02/dirty-looking-hygiene.html 00:39:35 (I have hacked them up by abusing riaxpander's history, but, well, it's an ugly hack.) 00:39:49 -!- Nshag [i=user@Mix-Orleans-106-4-242.w193-248.abo.wanadoo.fr] has quit [Remote closed the connection] 00:40:35 syntax parameters are implemented using a function called `syntax-local-get-shadower' 00:40:37 Riastradh: Isn't that specifically the point of the syntactic-closure free-variables? 00:40:51 (binding EXIT in the body) 00:40:52 which basically gives you an identifier that would shadow the given id 00:41:10 which is exactly what `fluid-let-syntax' is doing 00:41:48 foof, that works for other syntactic closures macros. It does not work for explicit renaming macros or for SYNTAX-RULES macros. 00:41:56 http://docs.plt-scheme.org/reference/stxtrans.html#%28def._%28%28quote._~23~25kernel%29._syntax-local-get-shadower%29%29 00:41:58 -rudybot_:#scheme- http://tinyurl.com/yf2gf8v 00:42:28 -!- eldragon [n=eldragon@84.79.67.254] has quit [Connection timed out] 00:42:44 OK, you said syntactic-closures, so I was confused. 00:44:04 Although for both ER and syntax-rules you could walk the body to replace references to EXIT, that's hacky and fragile. 00:44:16 My understanding of `fluid-let-syntax' is that in something like (define-syntax a (syntax-rules () ((_) 1))) (define-syntax b (syntax-rules () ((_) 2))) (define-syntax c (syntax-rules () ((_) (b)))) (define-syntax d (syntax-rules () ((_) (fluid-let-syntax ((a b)) (c))))), (d) -> 2. 00:44:22 Is this how syntax parameters work as well? 00:45:05 foof: Can you find references to EXIT that were written lexically where BLOCK was written, as opposed to those inserted by some other macro? 00:45:13 Another way to put it, foof, is that it doesn't work. 00:47:28 chandler, did you mean to rebind b, not a? 00:47:34 Riastradh, could you perhaps phrase that in a more optimistic way? 00:47:44 chandler: With ER you can, but not with syntax-rules. 00:48:13 samth: I meant for `c' to expand to `a' actually. 00:48:22 kilimanjaro, how about this? `You are a moron even to consider the hypothesis that there could even exist a universe in which this might conceivably think about working.' 00:48:22 nothingHappens [n=nothingH@173-25-176-111.client.mchsi.com] has joined #scheme 00:48:49 Riastradh, "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." 00:48:50 chandler, that's certainly how syntax parameters work 00:49:11 kilimanjaro, that's a good one. 00:49:28 samth: OK. I don't like them either, then! :-) 00:49:37 chandler: they're very useful 00:49:41 see: http://blog.plt-scheme.org/2008/02/dirty-looking-hygiene.html 00:49:58 they're a much better approach to many cases where you think you want to break hygiene 00:50:01 Riastradh, credited to the good Sir Charles Babbage, fyi 00:50:15 kilimanjaro, of course. 00:52:45 samth: Yikes; I wouldn't actually want an `if*' that behaves like the one you have there. 00:52:53 Why would I want to do this? 00:53:14 chandler, because you've changed your name to Paul Graham and become hip and fashionable. 00:53:25 You did this last Thursday; don't you remember? 00:53:37 I don't think the paperwork's gone through yet. 00:53:49 Emulating Arc is a sure sign that you're doing something wrong. 00:54:05 -!- geckosenator [n=sean@adsl-67-112-204-194.dsl.sntc01.pacbell.net] has quit [Read error: 104 (Connection reset by peer)] 00:54:22 Or, should I say "Emltng Arc is sre sgn tht ur doin it rong"? 00:55:23 indeed, chandler 00:56:48 however, there are actually cases where you want that behavior 00:57:00 for example, in class system, `this' behaves that way 00:57:31 I'm baffled by the assertion that "The resulting macro does not break hygiene." 00:58:04 -!- jonrafkind [n=jon@155.98.68.48] has quit [Read error: 145 (Connection timed out)] 00:58:42 chandler pasted "syntax-parameterize" at http://paste.lisp.org/display/89074 00:58:49 rudybot_: init http://paste.lisp.org/display/89074/raw 00:58:50 chandler: your "http://paste.lisp.org/display/89074/raw" sandbox is ready 00:58:55 rudybot_: eval (t2 1 2) 00:58:56 chandler: ; Value: (2 . 2) 00:59:08 samth: I don't see how this behavior can be described as hygienic. 00:59:40 The `it' that t1 captured didn't come from the input to the transformer. 01:01:21 why do you say that? 01:01:30 `it' is bound at the top of the file 01:02:23 `it' doesn't behave like an ordinary parameter, though. 01:02:26 rudybot_: eval (if* 1 (let ((c (lambda () it))) (if* 2 (cons (c) it)))) 01:02:26 chandler: ; Value: (1 . 2) 01:02:37 -!- masm [n=masm@85.242.115.178] has quit [Read error: 145 (Connection timed out)] 01:02:54 right 01:02:54 -!- dmoerner [n=dmr@89-78.res.pomona.edu] has quit ["Konversation terminated!"] 01:03:04 dmoerner [n=dmr@89-78.res.pomona.edu] has joined #scheme 01:03:14 but there's no failure of hygiene 01:03:22 masm [n=masm@bl7-205-98.dsl.telepac.pt] has joined #scheme 01:03:25 actually, hygiene is not well defined 01:03:30 so who's to say 01:03:35 but i think it's hygenic 01:03:49 and it doesn't have the problems of unhygenic macros 01:04:05 for example, writing hygenic macros that expand into `if*' works just fine 01:04:12 as you've demonstrated 01:04:40 whereas, if you write `if*' by breaking hygiene in the conventional way, everything breaks 01:05:22 It doesn't have the problems of unhygienic macros? So the inadvertent capture of the `it' that was closed over by `m' is not a problem? 01:06:00 -!- masm [n=masm@bl7-205-98.dsl.telepac.pt] has quit [Client Quit] 01:06:03 dmoerner_ [n=dmr@89-141.res.pomona.edu] has joined #scheme 01:06:08 I'm not aware of any definition of hygiene which admits that; it seems like a textbook problem of unhygienic capture to me. 01:06:52 An `if*' with catpure such that (let ((it 1)) (if* 2 it)) is actually much less problematic. 01:06:56 er, "capture" 01:07:22 er, and such that ... -> 2 01:08:14 but that defeats local reasoning about your program 01:08:55 with the syntax-parameter version, you need to know what the binding of `it' is, which makes sense, since it's a free variable 01:09:03 And the form of capture that this provides doesn't? How else would you determine that the use of `it' in `m' refers to the one bound by `t1'? 01:09:47 but in the unhygenic version, bindings have nothing to do with it 01:10:40 Of course, but the inability to properly close over a lexical binding in a macro is an inherent part of unhygienic macro systems. 01:10:47 You've reintroduced the same problem again. 01:11:18 And I still don't see how this is useful. 01:12:03 samth pasted "untitled" at http://paste.lisp.org/display/89075 01:12:29 there's an example of how having a binding is useful 01:12:37 Syntax parameters implement syntactically dynamic scope; an IF* such that (LET ((IT 1)) (IF* 2 IT)) yields 2 merely treats IF* as a binding form with the name IT assumed to have been supplied in the input. 01:12:50 The latter is still syntactically lexically scoped. 01:14:17 The binding form version of `if*' is still hygienic; it never binds an identifier that isn't present in its input. 01:14:33 patmaddox [n=patmaddo@ip68-111-70-47.oc.oc.cox.net] has joined #scheme 01:14:51 Well, yes. 01:14:57 samth: That doesn't demonstrate to me how the dynamic-scope version of `it' is useful. 01:15:16 Riastradh: Are you aware of a definition of hygiene that admits the `syntax-parameterize' version of `if*'? 01:15:41 that won't work with the regular non-hygenic `if*' 01:15:53 'that' = the module prefixing example 01:16:13 samth annotated #89075 "untitled" at http://paste.lisp.org/display/89075#1 01:16:29 also, see that annotation for something that works with the syntax-parameterize version 01:18:13 LIKE-OR works with the definition of IF* that chandler has in mind. 01:18:42 right, i just demonstrated that to myself 01:18:43 And it doesn't work with the syntax-parameterize version! 01:18:52 rudybot_: init http://paste.lisp.org/display/89075,1/raw 01:18:52 no, it does 01:18:53 chandler: your "http://paste.lisp.org/display/89075,1/raw" sandbox is ready 01:18:59 -!- offby1` is now known as offby1 01:19:11 rudybot_: ghost rudybot 01:19:13 rudybot_: nick rudybot 01:19:14 -!- rudybot_ is now known as rudybot 01:19:36 rudybot_: (if* 1 (like-or #t it)) 01:19:41 rudybot: eval (if* 1 (like-or #t it)) 01:19:41 chandler: ; Value: #t 01:19:42 chandler: ; stdout: "1\n" 01:19:55 Er, that's not what I wanted to do. 01:20:41 Actually, I'm not sure I can demonstrate the brokenness with this particular macro :-) 01:21:12 Try (define-syntax-rule (or-list x y z) (if* x (list y it) z)). 01:22:07 rudybot: eval (define-syntax-rule (or-list x y z) (if* x (list y it) z)) 01:22:07 works the same with both implementations 01:22:29 QinGW [n=wangqing@203.86.89.226] has joined #scheme 01:22:36 rudybot: eval (if* 1 (or-list 2 it 3)) 01:22:36 chandler: ; Value: (2 2) 01:22:39 -!- tessier [n=treed@kernel-panic/sex-machines] has quit ["Changing server"] 01:22:42 samth: Absolutely not. 01:22:54 that's very strange 01:22:59 No, that's not strange at all. 01:23:07 i just ran them both, and they both produced (2 1) 01:23:09 tessier [n=treed@216.105.40.113] has joined #scheme 01:23:19 *That*'s strange. 01:24:00 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:24:18 wait, i was wrong 01:24:31 i wasn't trying the same example, of course 01:25:33 So that doesn't compose very well. 01:25:47 The implementation of OR-LIST is leaky. 01:26:11 chandler pasted "a binding if* for compare-and-contrast" at http://paste.lisp.org/display/89077 01:26:21 yes, it seems that way 01:26:23 rudybot: init http://paste.lisp.org/display/89077/raw 01:26:24 chandler: your "http://paste.lisp.org/display/89077/raw" sandbox is ready 01:26:30 rudybot: eval (if* 1 (or-list 2 it 3)) 01:26:30 chandler: error: reference to an identifier before its definition: or-list in module: 'page 01:26:37 rudybot: eval (define-syntax-rule (or-list x y z) (if* x (list y it) z)) 01:26:41 rudybot: eval (if* 1 (or-list 2 it 3)) 01:26:41 chandler: ; Value: (1 2) 01:26:45 "'page"? 01:26:47 samth: So, why is this useful? 01:27:13 it avoids the problems of expanding into unhygenic macros 01:27:23 chandler, because you can treat it as an imported name, and rename it with the module system. 01:27:42 it gives the name a binding, which means it plays better with the rest of the system 01:27:46 including the module system 01:27:48 Expanding into what unhygienic macros? 01:28:38 Riastradh, often if you want to expand into an unhygenic macro such as `if*', the new macro must be unhygenic too 01:29:19 Riastradh: I'm sure that there has to be some way of solving that problem on its own. 01:29:25 if you want to implement `while' on top of the loop/break macro 01:29:53 What? The definition of IF* that chandler gave does not require this, if I understand correctly what you are saying. 01:31:55 Consider a definition of LOOP, using the same approach as chandler's IF*, expanding (LOOP ...) to (CWCC (LAMBDA (EXIT) (LET L () ... (L)))), where EXIT is bound in each like IT for IF*. Then the following definition of WHILE works: 01:32:14 (define-syntax while (syntax-rules () ((while condition command ...) (loop (if (not condition) (exit)) command ...] 01:32:43 And because the capture is hygienic, it composes nicely. 01:32:46 i don't think `exit' will work properly in the body of `while' 01:32:54 I'm positive that it does. 01:33:04 chandler: how is that capture hygenic? 01:33:12 Edward Kmett does neat things with parsing things incrementally and in parallel, with monoids, in Haskell. 01:33:21 Because it never binds an identifier that was not present in the input to the macro. 01:33:26 I don't think you've tested this, samth! I haven't either, but I have full confidence that someone here will eventually. 01:33:46 Riastradh: I haven't tested this for this specific macro 01:33:53 but i've run into this problem numerous times 01:34:04 (Oops, I lied. I have tested this, just not this evening.) 01:34:40 I *know* it works, modulo implementation bugs, because I know how all the pieces work. But, just for samth, I'll actually write the code. 01:35:48 -!- dmoerner [n=dmr@89-78.res.pomona.edu] has quit [Read error: 110 (Connection timed out)] 01:36:11 Isn't it interesting that for this subject of name capture we always gravitate toward contrived examples that we never encounter in real programs? 01:36:55 so, the place where i've used syntax parameters most 'for real' is in the implementation of match 01:37:07 where there's a syntax parameter representing the failure continutation 01:37:52 which means that you can generate code in one place that calls (fail), and have it work correctly in the context you put it into 01:38:48 offby1, what docs does rudybot search? 01:38:57 But that also means that it doesn't compose very well. You can work around that, of course, by writing (let ((f (lambda () (fail)))) (match ... (f) ...)). 01:39:37 Riastradh, this is just in the implementation 01:40:53 ok, i need to get something to eat, and the place i'm going closes soon 01:40:59 \nick samth_food 01:41:03 -!- samth is now known as samth_food 01:42:28 I wouldn't be surprised if there wasn't at least one composability problem with the use of syntax parameters there. 01:43:14 I don't see what's wrong with just passing the failure continuation. 01:43:22 That too. 01:43:43 -!- samth_food is now known as samth_away 01:44:23 Probably because it's a gigantic pile of hair anyway, foof, and this required fewer global transformations of the hair. 01:44:39 Syntax parameters do add expressiveness to the language. 01:44:46 -!- iv_s [n=iv_s@92.124.58.47] has left #scheme 01:45:04 -!- seamus_ [n=alistair@212.183.140.48] has quit ["Leaving"] 01:45:06 -!- Fare [n=Fare@128.30.7.73] has quit [Read error: 145 (Connection timed out)] 01:46:39 Riastradh: I've encountered situations where I want to use hygienic captures. If, for example, I define a certain form as having a collection of named fields (whose names are unique to that form), it can be useful to bind all of those fields to lexicals in a single binding form without having to re-type the names again. (Perhaps this is a different kind of capture than what you were referring to, however.) 01:49:29 -!- mrsolo [n=mrsolo@nat/yahoo/x-lkksxlpjftypucxy] has quit ["Leaving"] 01:52:30 That's the kind of name capture I was referring to. 01:52:36 I.e., IF*'s. 01:53:15 Right. I think we use contrived examples because the real examples come up in situations that are too hairy to put into a small example. 01:53:20 Most examples of anything are contrived. 01:57:32 True -- but most of the examples we gravitate toward (AIF, BLOCK, LOOP, WHILE, &c.) are particularly ill-advised, rather than merely contrived and unlikely in real programs. 01:59:11 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 02:06:04 -!- patmaddox [n=patmaddo@ip68-111-70-47.oc.oc.cox.net] has quit [Remote closed the connection] 02:06:16 eldragon [n=eldragon@84.79.67.254] has joined #scheme 02:08:27 -!- syntropy|desktop [n=who@unaffiliated/syntropy] has left #scheme 02:16:23 chandler: Replying late, but your "(scheme:define-syntax define-syntax ...)" doesn't work because the {sc,rsc,er}-macro-transformers also return procedures. 02:17:12 Oh. I suppose you could make them tagged procedures of some kind. 02:18:49 Or you could just plea for some sanity in the syntax-case-oriented implementations and ask them to use a wrapper! 02:21:04 It also doesn't work in riaxpander because they're not expressions at all, and in fact they are expanded at the wrong phase. 02:24:51 -!- Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has quit ["Leaving"] 02:26:28 Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has joined #scheme 02:56:33 -!- pinchyfingers [n=tommy@c-69-137-129-212.hsd1.pa.comcast.net] has quit [Remote closed the connection] 03:01:11 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Read error: 113 (No route to host)] 03:09:14 tjaway [n=timj@e176216079.adsl.alicedsl.de] has joined #scheme 03:09:25 -!- tjafk [n=timj@e176206065.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 03:13:05 patmaddox [n=patmaddo@99.88.146.32] has joined #scheme 03:14:13 thesnowdog [i=thesnowd@114.73.55.109] has joined #scheme 03:15:00 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 03:15:57 -!- Axioplase_ is now known as Axioplase 03:17:00 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 03:18:50 schemer999iphone [n=schemeri@166.205.133.120] has joined #scheme 03:25:48 QinGW2 [n=wangqing@203.86.89.226] has joined #scheme 03:29:32 -!- patmaddox [n=patmaddo@99.88.146.32] has quit [Remote closed the connection] 03:32:44 QinGW3 [n=wangqing@203.86.89.226] has joined #scheme 03:33:33 -!- CaptainMorgan [n=CaptainM@24.62.183.102] has quit ["Leaving"] 03:33:42 -!- QinGW [n=wangqing@203.86.89.226] has quit [Connection timed out] 03:37:36 -!- schemer999iphone [n=schemeri@166.205.133.120] has quit ["Colloquy for iPhone - http://colloquy.mobi"] 03:37:38 QinGW [n=wangqing@203.86.89.226] has joined #scheme 03:41:59 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Success] 03:42:39 -!- QinGW3 [n=wangqing@203.86.89.226] has quit [Read error: 145 (Connection timed out)] 03:46:41 mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 03:47:59 -!- QinGW2 [n=wangqing@203.86.89.226] has quit [Connection timed out] 03:53:23 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 03:57:52 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 04:04:08 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 04:08:56 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit ["Leaving."] 04:10:19 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 04:13:52 QinGW2 [n=wangqing@203.86.89.226] has joined #scheme 04:14:32 jonrafkind [n=jon@98.202.86.149] has joined #scheme 04:14:50 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 04:17:46 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 04:18:16 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [Client Quit] 04:18:35 -!- QinGW [n=wangqing@203.86.89.226] has quit [Success] 04:23:02 -!- MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has quit [Remote closed the connection] 04:26:43 -!- QinGW2 [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 04:28:53 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Connection timed out] 04:30:23 QinGW [n=wangqing@203.86.89.226] has joined #scheme 04:33:52 sepult [n=levgue@xdsl-87-78-28-160.netcologne.de] has joined #scheme 04:34:14 -!- mabes [n=mabes@bmabey.fttp.xmission.com] has quit [Remote closed the connection] 04:34:43 -!- zeroish [n=zeroish@135.207.174.50] has quit [Read error: 145 (Connection timed out)] 04:35:26 -!- eldragon [n=eldragon@84.79.67.254] has left #scheme 04:43:11 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 04:43:34 bombshelter13_ [n=bombshel@76.10.149.209] has joined #scheme 04:52:35 saccade [n=saccade@65.78.24.131] has joined #scheme 04:58:18 zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has joined #scheme 04:59:26 -!- QinGW [n=wangqing@203.86.89.226] has quit [Connection timed out] 05:14:47 QinGW [n=wangqing@203.86.89.226] has joined #scheme 05:18:51 Anyone here use VMware or other emulators? 05:19:26 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 05:22:46 yes chroot 05:23:09 I mean hardware emulators. 05:23:14 somtimes qemu and wine, never tried xen, but have to... 05:23:44 kqemu doesn't work here, cause processor has not the option for it 05:24:05 attila_lendvai [n=ati@catv-89-134-66-153.catv.broadband.hu] has joined #scheme 05:25:28 I'm wondering about the relative slowdown. I had run VMWare on a 1GHz PPC, emulating x86, and it wasn't fast enough to realistically run Linux. 05:26:03 virtualbox is better i think 05:26:12 By Linux do you mean "Linux with tedious windowing and desktop systems that will remain unmentioned here" 05:26:12 But I understand that some emulators can take advantage of emulating the same arch in itself, not losing much performance. 05:26:17 but xen maybe even better... 05:26:33 Jafet: I mean a console-only Debian install. 05:26:49 It ran, but it wasn't usable for productive work. 05:27:10 I also tried Windows on it and that was a joke. 05:27:39 Hmm. Maybe it isn't optimized for PPC (or the other way round) 05:27:44 Isn't PPC a risc? 05:27:47 yes 05:29:28 But mostly I'm looking for a ballpark relative slowdown. Is it 2%? 10%? 50%? 4000% slower? 05:30:15 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Connection timed out] 05:31:44 For CPU intensive tasks, that is, notably compiling with gcc. 05:35:23 my virtualbox flies 05:35:49 butthen again I just got a Core i7 860 :) 05:36:53 quanta costa ? 05:37:07 Core i7 860 ?? 05:37:09 I would say about 20% slowdown, more if you have slow virtual hard disks 05:37:18 sepult, Intel CPU 05:37:42 leppie: thanks! 05:37:42 leppie: yes i know, how much did you spend for it ? 05:37:53 i just have a core2duo 05:38:08 intel R chip or so 05:39:02 sepult: a lot! R6000 (~$800) for CPU 4GBRAM and mobo 05:39:24 was 1st upgrade in 2 1/2 years 05:39:38 early XMAS pressy to myself 05:40:22 wah, i just spent around 500 for my whole pc.... 05:40:25 chandler: ping 05:41:02 maybe i should just change the chip next year or so... 05:41:07 I just wanted something that would last another 3 odd years 05:41:23 mobo seems to be ok i hope... 05:41:35 sepult: the Q9550 is a good cpu if your motherboard can accept that, but my old one could not 05:42:10 so either way, my 'upgrade' was going to be expensive :( 05:42:27 leppie: that's the problem, i think next time i buy a puter i'll 05:42:27 spend very much for the mobo... 05:43:15 lol, I just got the cheapest one for the 1156 socket, still 2 times more expensive than I ever paid for a mobo 05:43:35 but at least not a stock Intel one again 05:43:54 no really, next time i'll get something like asus-deluxe or so... 05:44:06 I got asus LE :p 05:44:24 i have asus p5 something or so 05:44:31 i'm not really into all this overclocking anymore 05:44:51 leppie: i let the bios decide when to run faster ... 05:45:19 leppie: i think there is an auto mode for it or so.... 05:45:45 the i7 's has speedstep and turbo, so that is slike 05:45:48 argg 05:45:58 that is like the same I guess 05:46:23 or i should wait for larrabee ??....hmmm...... 05:47:01 I cant even max out my CPU's when playing NFS Shift 05:48:19 now to make IronScheme work on 8 CPUs concurrently :) 05:48:45 8 CPU's ???? 05:49:10 how did you fit them on your mobo ? 05:49:11 lol 05:51:25 i guess he means 8 cores... perhaps 2 by 4... 05:52:15 oh 05:52:17 lol 05:52:37 so 2 x quadcore 05:55:36 ya, but i'm out of touch with modern 64-multi-core-bitnockness, being stuck on old 3000+ athlon. 05:56:00 bitnikness... 05:56:16 incubot: how is your cores? 05:56:22 Consoles are already taking multithreading to the extreme, and we can expect that on personal computers in the next few years as dual cores go mainstream (this generation actually). 06:02:58 timcharper [n=timcharp@c-24-10-150-71.hsd1.ut.comcast.net] has joined #scheme 06:03:12 sepult: quad core and hyperthreading = 8 logical CPU's 06:03:57 Great for gentoo 06:04:03 make -j 8 06:04:10 great for most things 06:06:22 does anyone know how to get mzscheme to output a stacktrace when it blows up? (using the command line) 06:06:38 this doesn't work: mzscheme -W debug --syslog debug -l errortrace assign_1.29.scm 06:08:18 nevermind, found it! thanks :) been googling for hours, finally found the -t option 06:08:23 timcharper: `-lt' 06:08:53 timcharper: For future reference, `mzscheme -h' is even closer than google. 06:09:22 Hm, how does stack tracing work with tail recursion anyway? Never thought about it 06:09:23 eli: I tried that first :) nothing in there referenced "errortrace" 06:10:00 timcharper: Did you try the first part of the errortrace manual? 06:10:22 timcharper: http://docs.plt-scheme.org/errortrace/ -- and see the "quick instructions". 06:10:32 that's where I finally found it 06:10:47 Jafet: It works. 06:11:06 Er, sounds great. 06:11:25 timcharper: Well, if that's where you found it, then you could have ran `plt-help errortrace'. 06:12:00 Jafet: You can try drscheme -- when there's an error, it draws arrows over your code, which visualize the stacktrace -- and this will not include tail calls. 06:13:06 very nice, thank you for the tip 06:13:24 gnomon_ [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 06:15:31 eli, nice, never noticed 06:18:34 Jafet: http://tmp.barzilay.org/x -- that's a demonstration I show in class. Most students see how the arrows are drawn here, and they just assume that there's some drscheme bug. 06:18:50 (Copy paste the code as is to see the full effect) 06:19:02 You can read on continuation marks to know how it's done. 06:22:13 -!- jonrafkind [n=jon@98.202.86.149] has quit [Read error: 110 (Connection timed out)] 06:31:23 CaptainMorgan [n=CaptainM@c-24-62-183-102.hsd1.ma.comcast.net] has joined #scheme 06:42:38 -!- gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Read error: 110 (Connection timed out)] 06:53:02 leppie|work [i=3ebd5e7b@gateway/web/freenode/x-tmcgprubvtfarkkj] has joined #scheme 07:09:18 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Read error: 60 (Operation timed out)] 07:11:19 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 07:14:13 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 07:15:00 QinGW [n=wangqing@203.86.89.226] has joined #scheme 07:20:08 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 07:24:59 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 60 (Operation timed out)] 07:26:21 npe [n=npe@195.207.5.2] has joined #scheme 07:28:05 swathanthran [n=user@unaffiliated/shyam-k/x-8459115] has joined #scheme 07:30:04 QinGW [n=wangqing@203.86.89.226] has joined #scheme 07:30:14 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 07:35:48 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 07:42:28 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 07:50:08 QinGW2 [n=wangqing@203.86.89.226] has joined #scheme 07:50:43 -!- QinGW [n=wangqing@203.86.89.226] has quit [Connection timed out] 07:55:36 -!- QinGW2 [n=wangqing@203.86.89.226] has quit [Read error: 131 (Connection reset by peer)] 07:56:32 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 110 (Connection timed out)] 07:56:36 QinGW [n=wangqing@203.86.89.226] has joined #scheme 08:00:04 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 08:00:24 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 08:02:16 -!- zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has quit [] 08:04:53 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 08:05:19 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 08:07:10 mike8901 [n=mike@resnet-46-184.dorm.utexas.edu] has joined #scheme 08:07:37 Is there a built-in scheme function that's a CPS equivalent of empty? 08:10:08 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 08:10:53 QinGW [n=wangqing@203.86.89.226] has joined #scheme 08:14:52 -!- mike8901 [n=mike@resnet-46-184.dorm.utexas.edu] has quit [] 08:15:50 ASau [n=user@77.246.231.43] has joined #scheme 08:17:56 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 08:21:56 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 54 (Connection reset by peer)] 08:23:05 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 08:26:25 QinGW2 [n=wangqing@203.86.89.226] has joined #scheme 08:27:23 schmir [n=schmir@mail.brainbot.com] has joined #scheme 08:28:04 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 08:28:45 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 08:30:19 borism [n=boris@195.50.199.134] has joined #scheme 08:30:32 QinGW3 [n=wangqing@203.86.89.226] has joined #scheme 08:30:32 -!- QinGW2 [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 08:30:33 hkBst [n=hkBst@37pc222.sshunet.nl] has joined #scheme 08:31:16 delt0r___ [n=delt0r@62-47-135-56.adsl.highway.telekom.at] has joined #scheme 08:33:11 -!- proq [n=user@unaffiliated/proqesi] has quit [Connection timed out] 08:33:34 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 110 (Connection timed out)] 08:34:32 -!- timcharper [n=timcharp@c-24-10-150-71.hsd1.ut.comcast.net] has quit [] 08:37:04 QinGW [n=wangqing@203.86.89.226] has joined #scheme 08:37:09 -!- dmoerner_ is now known as dmoerner 08:41:07 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 08:41:18 QinGW [n=wangqing@203.86.89.226] has joined #scheme 08:42:49 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Connection timed out] 08:42:52 mmc [n=mima@esprx01x.nokia.com] has joined #scheme 08:46:02 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 08:46:18 -!- rudybot [n=luser@q-static-138-125.avvanta.com] has quit [Remote closed the connection] 08:46:25 -!- marcoecc [i=me@gateway/gpg-tor/key-0x9C9AAE7F] has quit [Remote closed the connection] 08:46:33 rudybot [n=luser@206.124.138.125] has joined #scheme 08:49:24 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 60 (Operation timed out)] 08:51:17 QinGW [n=wangqing@203.86.89.226] has joined #scheme 08:51:26 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 54 (Connection reset by peer)] 08:51:47 -!- QinGW3 [n=wangqing@203.86.89.226] has quit [Connection timed out] 08:53:58 jrtayloriv [n=jrt4@cpe-24-24-93-232.stny.res.rr.com] has joined #scheme 08:54:14 -!- jrtayloriv [n=jrt4@cpe-24-24-93-232.stny.res.rr.com] has left #scheme 08:55:32 -!- delt0r___ [n=delt0r@62-47-135-56.adsl.highway.telekom.at] has quit [Read error: 110 (Connection timed out)] 08:55:54 delt0r___ [n=delt0r@62-47-131-116.adsl.highway.telekom.at] has joined #scheme 08:57:09 -!- dmoerner [n=dmr@89-141.res.pomona.edu] has quit [Remote closed the connection] 09:00:55 -!- dfeuer [n=dfeuer@wikimedia/Dfeuer] has quit [Read error: 113 (No route to host)] 09:07:18 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 09:07:45 . 09:11:02 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 09:11:12 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 09:11:28 nowhere_man [n=pierre@lec67-4-82-235-57-28.fbx.proxad.net] has joined #scheme 09:16:18 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 09:16:38 QinGW [n=wangqing@203.86.89.226] has joined #scheme 09:16:50 -!- xwl_ [n=user@147.243.236.60] has quit [Remote closed the connection] 09:17:17 xwl_ [n=user@147.243.236.60] has joined #scheme 09:18:28 -!- xwl_ [n=user@147.243.236.60] has quit [Remote closed the connection] 09:19:57 -!- xwl [n=user@125.34.175.196] has quit [Remote closed the connection] 09:20:05 xwl_ [n=user@147.243.236.60] has joined #scheme 09:22:37 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 09:23:28 -!- swathanthran [n=user@unaffiliated/shyam-k/x-8459115] has quit [Read error: 113 (No route to host)] 09:25:22 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 104 (Connection reset by peer)] 09:26:16 QinGW [n=wangqing@203.86.89.226] has joined #scheme 09:30:09 QinGW1 [n=wangqing@203.86.89.226] has joined #scheme 09:36:51 QinGW2 [n=wangqing@203.86.89.226] has joined #scheme 09:41:14 QinGW3 [n=wangqing@203.86.89.226] has joined #scheme 09:46:58 -!- QinGW [n=wangqing@203.86.89.226] has quit [Connection timed out] 09:52:31 -!- QinGW1 [n=wangqing@203.86.89.226] has quit [Success] 09:54:37 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Read error: 110 (Connection timed out)] 09:55:30 Edico [n=Edico@unaffiliated/edico] has joined #scheme 09:57:09 -!- QinGW2 [n=wangqing@203.86.89.226] has quit [Connection timed out] 09:58:19 QinGW [n=wangqing@203.86.89.226] has joined #scheme 10:02:17 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Remote closed the connection] 10:08:05 -!- QinGW [n=wangqing@203.86.89.226] has quit [Read error: 131 (Connection reset by peer)] 10:08:49 -!- QinGW3 [n=wangqing@203.86.89.226] has quit [Connection reset by peer] 10:21:54 sepult` [n=levgue@xdsl-87-78-168-94.netcologne.de] has joined #scheme 10:25:48 seamus_android [n=alistair@212.183.140.20] has joined #scheme 10:31:34 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 10:37:24 -!- sepult [n=levgue@xdsl-87-78-28-160.netcologne.de] has quit [Success] 10:42:50 morphir [n=morphir@84-52-234.12.3p.ntebredband.no] has joined #scheme 10:44:07 I want a scheme that has opengl/glut bindings, and a repl where I can code interactivly on the visuals. 10:44:22 I want a pony. 10:44:32 :) 10:44:50 Edico [n=Edico@unaffiliated/edico] has joined #scheme 10:45:00 I know chicken has this 10:45:30 morphir: Also check out Fluxus for PLT. 10:45:43 ypsilon has the opengl/glut bindings, but interactive coding is tricky because of GLUT's insistence on never returning control 10:46:07 define tricky 10:46:46 when you call glut it only ever returns to your code when calling an event handler 10:46:59 it would be cool if I could illustrate the scheme features just by applying functions interactively 10:47:16 so if the window is open, you need to put code in to implement your own repl 10:47:21 I would learn much better from that I think 10:47:36 -!- kilimanjaro [n=kilimanj@cpe-173-172-99-25.austin.res.rr.com] has quit [Remote closed the connection] 10:48:08 It should be possible to do it with freeglut though, as it gives you more control over the event loop 10:48:25 fluxus seems to be something of what I like 10:48:44 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 10:49:05 but those guys are doing all these abstract things which makes no sense in a engineers wolrd 10:49:09 world* 10:50:15 I would love to use (map behaviour objects) 10:50:25 morphir: Why not just use chicken, if you know it has that? 10:50:41 sjamaan: I dont know how to use it 10:51:00 You could ask its author for some examples 10:51:16 xwl [n=user@125.34.175.196] has joined #scheme 10:52:20 I suppose I could. 10:53:10 talking interactively with a glut window is awkward without parallel processing support 10:57:58 -!- Alice_I_W [i=stepnem@server1.bshellz.net] has quit [Remote closed the connection] 10:58:38 I suppose this is what is wrong with lisp in general 10:58:47 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 10:58:58 when you want to do something, there is always some exception 10:59:20 *morphir* is sick half-assed implementation 10:59:32 +s 11:00:28 You can get round most problems by messing about with continuations, but event-driven systems are fundamentally time-based and hard to work with a functional language. 11:07:28 morphir: ypsilon and ikarus has GL/GLUT bindings 11:07:54 morphir: Look on the Ikarus mailing list for various examples 11:10:30 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 11:15:20 mario-goulart [n=user@67.205.85.241] has joined #scheme 11:16:32 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 11:16:55 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 11:23:30 marcoecc [i=me@gateway/gpg-tor/key-0x9C9AAE7F] has joined #scheme 11:23:58 masm [n=masm@bl10-6-75.dsl.telepac.pt] has joined #scheme 11:25:48 leppie|work: thanks 11:32:24 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 11:41:46 -!- lisppaste [n=lisppast@common-lisp.net] has quit ["Want lisppaste in your channel? Email lisppaste-requests AT common-lisp.net."] 11:41:49 lisppaste [n=lisppast@common-lisp.net] has joined #scheme 11:42:29 ve [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 12:02:51 -!- emma [n=em@unaffiliated/emma] has quit [Read error: 110 (Connection timed out)] 12:03:09 cornucopic [n=r00t@202.3.77.129] has joined #scheme 12:03:29 foof` [n=user@FLH1Afr049.osk.mesh.ad.jp] has joined #scheme 12:03:41 -!- foof [n=user@FLH1Afr049.osk.mesh.ad.jp] has quit [Read error: 60 (Operation timed out)] 12:07:56 -!- Axioplase is now known as Axioplase_ 12:12:48 lighterthanair [n=lightert@38.105.245.18] has joined #scheme 12:13:41 is it possible that the PLT require planet syntax changed again? 12:14:29 -!- cornucopic [n=r00t@202.3.77.129] has quit ["so long.."] 12:14:48 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 12:28:56 -!- greyhame [n=jao@119.Red-83-33-230.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 12:29:47 dsa [n=Silicon@p5081618B.dip.t-dialin.net] has joined #scheme 12:29:50 -!- dsa [n=Silicon@p5081618B.dip.t-dialin.net] has left #scheme 12:33:01 greyhame [n=jao@55.Red-79-144-20.dynamicIP.rima-tde.net] has joined #scheme 12:34:34 -!- lighterthanair [n=lightert@38.105.245.18] has quit [] 12:43:35 untouchabl [i=untoucha@dhcp-129-64-166-32.dorm.brandeis.edu] has joined #scheme 12:47:03 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 12:48:48 eli; pong 12:53:28 cornucopic [n=r00t@202.3.77.129] has joined #scheme 12:58:20 -!- greyhame [n=jao@55.Red-79-144-20.dynamicIP.rima-tde.net] has quit [Read error: 60 (Operation timed out)] 13:01:17 -!- untouchable [i=untoucha@dhcp-129-64-166-32.dorm.brandeis.edu] has quit [Read error: 110 (Connection timed out)] 13:02:18 Jafet1 [n=Jafet@unaffiliated/jafet] has joined #scheme 13:02:25 greyhame [n=jao@79.144.22.60] has joined #scheme 13:02:45 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 13:03:04 -!- Jafet1 is now known as Jafet 13:08:46 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 13:16:03 -!- bombshelter13_ [n=bombshel@76.10.149.209] has quit [Client Quit] 13:17:09 -!- cornucopic [n=r00t@202.3.77.129] has quit ["so long.."] 13:17:27 cornucopic [n=r00t@202.3.77.129] has joined #scheme 13:18:58 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 13:20:01 -!- greyhame [n=jao@79.144.22.60] has quit [Read error: 131 (Connection reset by peer)] 13:22:29 greyhame [n=jao@80.31.222.101] has joined #scheme 13:25:00 chturne [n=chturne@host217-42-7-13.range217-42.btcentralplus.com] has joined #scheme 13:32:14 langmartin [n=user@exeuntcha.tva.gov] has joined #scheme 13:32:31 mabes [n=mabes@166.70.220.118] has joined #scheme 13:32:41 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 13:35:21 jao` [n=jao@154.Red-88-16-204.dynamicIP.rima-tde.net] has joined #scheme 13:36:44 -!- greyhame [n=jao@80.31.222.101] has quit [Read error: 104 (Connection reset by peer)] 13:41:40 -!- jao` [n=jao@154.Red-88-16-204.dynamicIP.rima-tde.net] has quit [Read error: 60 (Operation timed out)] 13:44:15 greyhame [n=jao@94.Red-213-98-194.dynamicIP.rima-tde.net] has joined #scheme 13:45:49 -!- greyhame [n=jao@94.Red-213-98-194.dynamicIP.rima-tde.net] has quit [Client Quit] 13:46:13 -!- chturne [n=chturne@host217-42-7-13.range217-42.btcentralplus.com] has quit [Remote closed the connection] 14:05:30 -!- xwl [n=user@125.34.175.196] has quit [Remote closed the connection] 14:11:52 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 14:12:16 -!- sstrickl [n=sstrickl@pool-129-44-182-54.bos.east.verizon.net] has quit [] 14:13:00 -!- leppie|work [i=3ebd5e7b@gateway/web/freenode/x-tmcgprubvtfarkkj] has quit [Ping timeout: 180 seconds] 14:18:04 -!- copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has quit [Read error: 110 (Connection timed out)] 14:23:07 -!- mabes [n=mabes@166.70.220.118] has quit [Remote closed the connection] 14:25:29 bohanlon [n=bohanlon@pool-173-48-104-141.bstnma.fios.verizon.net] has joined #scheme 14:28:28 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 14:28:40 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 14:28:43 -!- delt0r___ [n=delt0r@62-47-131-116.adsl.highway.telekom.at] has left #scheme 14:29:29 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 14:34:22 MrFahrenheit [n=RageOfTh@users-38-53.vinet.ba] has joined #scheme 14:34:52 Fare [n=Fare@c-24-218-127-11.hsd1.ma.comcast.net] has joined #scheme 14:38:15 arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has joined #scheme 14:38:47 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Remote closed the connection] 14:40:44 -!- cornucopic [n=r00t@202.3.77.129] has quit ["so long.."] 14:51:12 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 14:57:28 -!- fisher_ [n=kvirc@89.252.62.139] has quit [Read error: 54 (Connection reset by peer)] 14:58:04 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 14:58:27 bweaver [n=user@c-68-60-0-190.hsd1.tn.comcast.net] has joined #scheme 14:58:49 -!- gnomon_ is now known as gnomon 14:59:37 mabes [n=mabes@74.81.243.253] has joined #scheme 15:01:46 copumpkin [n=pumpkin@dhcp-212-245.cs.dartmouth.edu] has joined #scheme 15:06:38 -!- leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 15:10:15 heh. The fluxus community reminds of the demo scene from the good'ol amiga days .. 15:12:08 -!- Fare [n=Fare@c-24-218-127-11.hsd1.ma.comcast.net] has quit [Read error: 113 (No route to host)] 15:13:06 Fare [n=Fare@c-24-218-127-11.hsd1.ma.comcast.net] has joined #scheme 15:16:20 -!- samth_away is now known as samth 15:17:21 leppie [n=lolcow@dsl-241-191-148.telkomadsl.co.za] has joined #scheme 15:17:49 sstrickl [n=sstrickl@nomad.ccs.neu.edu] has joined #scheme 15:21:42 -!- nothingHappens [n=nothingH@173-25-176-111.client.mchsi.com] has quit [Remote closed the connection] 15:33:35 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 15:43:46 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Remote closed the connection] 15:44:08 MichaelRaskin [n=MichaelR@213.171.48.239] has joined #scheme 15:44:26 -!- SucKman is now known as StucKman 15:44:44 -!- npe [n=npe@195.207.5.2] has quit [] 16:03:42 -!- ASau [n=user@77.246.231.43] has quit ["off to home"] 16:07:26 jlongster [n=user@c-68-59-187-95.hsd1.tn.comcast.net] has joined #scheme 16:11:31 spiffer [n=siva@117.192.7.94] has joined #scheme 16:13:12 Would you all recommend foof-loop? 16:15:06 Alice_I_W [i=stepnem@server1.bshellz.net] has joined #scheme 16:19:50 nope, not me, I have my own looping library with lazy comprehensions and deferred execution 16:20:16 nothing against foof-loop, I was just used to what I wrote :) 16:21:04 Care to share it? I'm evaluating which one to use. 16:21:16 it's only for R6RS 16:21:34 but it did run under Chez at some stage 16:22:12 funny that you would assume I'm not running an R6RS system! But I'm not. 16:22:20 https://ironscheme.svn.codeplex.com/svn/IronScheme/IronScheme.Console/ironscheme/linq2.sls 16:22:26 -rudybot:#scheme- http://tinyurl.com/yhdd543 16:22:43 only 1 hairy macro :p 16:22:56 foof-loops syntax-rules scares the shit out of me :o 16:23:04 Well, I recommend the use of foof-loop, but you could probably guess that. 16:23:13 Foof-loop is appropriate even in your tight inner loops. 16:24:44 There's really only one hairy macro in foof-loop too. 16:26:07 Riastradh: your definition of hairy is way more extreme than mine :) 16:26:50 -!- rstandy [n=rastandy@net-93-144-227-32.t2.dsl.vodafone.it] has quit [Read error: 60 (Operation timed out)] 16:26:57 Riastradh: I think I'll try foof-loop first. After making sure everything works fine in syntax-case mode in Gambit. 16:28:06 jlongster: foof-loop does not use syntax-case 16:28:22 Most of the `macros' in foof-loop are just descriptions of loop patterns. For example, the IN-LIST iterator just says that you bind LIST to be the list expression outside the loop, have a loop variable for each pair of the list, end when the pair is not actually a pair, bind the element variable to be the car of the pair, and update the pair to be its cdr. 16:28:49 it could probably be written much more concisely in other macro systems, I believe 16:29:01 Now, there's a little bit of silliness to work around Scheme systems that generate poor code for (let ((f cdr)) ... (f x) ...), and then a little bit of syntax checking, but that's all. 16:29:31 leppie: By "syntax-case" mode, I mean the mode which Gambit loads in the portable syntax-case system, which also provides syntax-rules 16:29:41 ahh ok :) 16:29:49 that's a heavy syntax-rules 16:29:51 The one hairy macro, foof-loop, could be written slightly more concisely using SYNTAX-CASE, sure, although not much. 16:29:58 ...er: the one hairy macro, LOOP, &c. 16:30:35 syntax-rules just breaks my brain 16:30:56 If syntax-rules breaks your brain, how do you use syntax-case? 16:31:05 -!- spiffer [n=siva@117.192.7.94] has left #scheme 16:31:07 i really see some funny stuff, and have no idea to interpret them 16:31:21 There's nothing interesting going on in `syntax-rules' that isn't part of `syntax-case' too. 16:31:24 chandler: syntax-case is much more natural IMO 16:31:32 How can it be? 16:31:40 I just don't understand. 16:31:57 well when you start using procedural transformers 16:32:24 `syntax-rules' returns a procedure too. 16:32:39 (Not necessarily -- maybe in the R6RS it does.) 16:33:01 but you have no expand time 'procedural' layer 16:33:12 like you have in lower level systems 16:33:17 (Yes, in the R6RS, and in psyntax-based implementations too.) 16:33:18 jlongster: I would heartily recommend foof loop as an user of it. 16:34:08 leppie: I'm not exactly sure what you're saying. I've seen a number of macros you've pasted that could have been trivially written with `syntax-rules'; were those macros confusing? 16:34:09 npe [n=npe@94.224.251.223] has joined #scheme 16:34:48 maybe trivial for a long time syntax-rules user, but I had that choice not knowing either 16:34:57 leppie: SYNTAX-CASE contains all the normal mental overhead of SYNTAX-RULES, plus the overhead of procedural macros. The thing that makes it easier in certain cases is that you don't have to think about the process of transforming your code in the pure pattern matching language of SYNTAX-RULES, and can use any number of procedures that you write to do your bidding. This is nice if you don't use it irresponsibly. :-) 16:35:01 jonrafkind [n=jon@crystalis.cs.utah.edu] has joined #scheme 16:35:07 arcfide: Thanks. I'm so tired of writing complicated (let loop ...)'s 16:35:12 wy|d [n=wyld@fl-69-69-20-190.dhcp.embarqhsd.net] has joined #scheme 16:35:56 leppie: ? I mean trivial in the sense of a trivial rewrite from (lambda (stx) (syntax-case stx () (pattern #'expansion) (pattern2 #'expansion2) ...)) to (syntax-rules () (pattern expansion) (pattern2 expansion2)) . 16:36:02 jlongster: I only avoid foof loop or other such macros in the case that I want the library to be as self contained as possible. That does not happen often. 16:36:10 leppie: I also say the above as an avid SYNTAX-CASE user. 16:36:12 leppie, consider your MAKE-ITERATOR procedure. That is not really very much different foof-loop iterator definitions. Take a look at, say, foof-loop's IN-PORT, for an easy one. There are more parts to a foof-loop iterator, but aside from that, it's just supplying information about the structure of the loop, only at the syntactic level (what variables get bound with what expressions?) rather than the procedural level (what proc 16:36:19 "(what proc" 16:36:22 yes, i do use syntax-rules for trivial cases, of course :) 16:36:25 (what procedures are applied?). 16:36:33 leppie: I would say, don't use a procedural macro system unless you really have a good reason that makes SYNTAX-RULES inadequate. 16:37:00 arcfide: right. I think it's valuable to be really comfortable with (let loop ...), map, and fold, but it's certainly a pattern that should be made more efficient when writing an application. 16:37:18 jlongster: I also make heavy use of MAP and FOLD. 16:37:24 And, I do use DO. :-) 16:37:32 arcfide: i do try :) 16:37:36 There's at least one aspect of `syntax-case' which I find to be quite confusing. I'm never quite able to remember where I can expect to have an unwrapped syntax object and where I might have a wrapped one. 16:37:36 seamus_android: are you IRC-ing from an Android phone?! 16:37:46 I'm sure I will somewhat too. I don't know how much foof-loop will replace. 16:37:49 jlongster, also, you should use , rather than -- the one in the tmp directory, although not `officially' published, has a much better-written introduction. 16:37:50 arcfide: `do'?! 16:38:48 Riastradh: thanks. That's already been indexed as the second result for `foof-loop` in google. 16:39:59 Oh, cool, it does have lazy looping as well. 16:40:15 I think I'm about to be able to code 5% faster. 16:40:27 I think I like with-syntax too much, that does not work with syntax-rules does it? 16:40:28 Yes. And there's (with an unfinished attempt at documentation in nested-foof-loop.txt). 16:41:01 Hmm. 16:41:25 I just looked at your four uses of WITH-SYNTAX in linq2.sls, leppie. Three of them are completely superfluous! 16:41:25 leppie: Not quite, but what are you using it for? 16:41:47 Riastradh: probably :p I wrote that more than a year back 16:41:50 Usually I find `with-syntax' to be a complete bother. 16:41:51 And I don't just mean `you could theoretically rewrite these with SYNTAX-RULES'; I mean that you could just take them out. 16:43:21 I'm rather annoyed at the specialness of syntax bindings in `syntax-case'. It always feels like syntax is a second-class citizen. The reuse of the same lexical wart that CL uses for functions doesn't help either. 16:43:28 GENERATE-TEMPORARIES is useful only if you need a number of temporaries dependent on the size of the input to the macro. For a fixed list of temporaries, you can just put each one in the template, and it will be hygienically renamed. 16:43:39 chandler, you mean the specialness of pattern variables? 16:43:54 Yes. 16:44:33 Yes: that's the only real barrier to implementing SYNTAX-CASE in terms of syntactic closures or explicit renaming (even given access to the caller's alias cache). 16:45:25 I believe it can be done in riaxpander, by introducing a new type of denotation to which the SYNTAX-CASE special operator binds names. 16:45:46 (But that is not portable to other implementations of syntactic closures, such as what you get in MIT Scheme.) 16:48:34 o well, i'm still learning 16:50:30 I don't think I should mind SYNTAX-CASE so much if the SYNTAX form were done away with, pattern variables were ordinary variables, and syntactic templates were written with explicit unquotation. But that would mean that SYNTAX-RULES would cease to have as trivial a definition in terms of SYNTAX-CASE. 16:50:43 Whether not having such a trivial definition is an issue, well... 16:52:02 slimy_lotus [n=Adium@cuscon128732.tstt.net.tt] has joined #scheme 16:55:03 -!- Fare [n=Fare@c-24-218-127-11.hsd1.ma.comcast.net] has quit [Read error: 113 (No route to host)] 16:55:10 chandler: re "`syntax-rules' returns a procedure too" etc -- either you insist on trekking on down some obscure agenda, or you just don't get it. 16:55:15 Yes, `syntax-rules' returns a procedure (when it does, for the picky) -- but it's one that is written in some obscure low-level language, and I'm sure that you'd agree that your average TM/assembly code is much harder to comprehend than the equivalent scheme code. 16:55:21 Actually, in this case the "programming language" that you're using is more like using CFGs -- and those are even *less* clear than TMs. 16:55:24 In any case, my guess would be that this is why leppie finds hairy `syntax-rules' macros more difficult to read. 16:55:28 Alternatively, just drop into some random line in srfi 86 and see if you can tell what it does... (Actually, if you prefer `syntax-rules', you should be comfortable with the code in that srfi.) 16:55:31 Rewrite rules work fine when they describe a transformation in a straightforward way, but when abused as a programming language, you get chulent. 16:55:41 (And now, I'll disappear again.) 16:55:47 *eli* goes poof 16:56:37 I don't think SRFI 86 is an argument against SYNTAX-RULES. It would have been just as revolting if implemented in SYNTAX-CASE. 16:56:47 wow, I guess that was pretyped of i'm lagging or you are a damn fast typist 16:57:12 I looked away for a minute, and I missed a lot! 16:57:17 I'm guessing he was lagging. 16:57:17 If I look in the English description in SRFI 86, I am just as baffled, if not more so, as I am by looking in the SYNTAX-RULES mess. 16:57:33 -!- gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Read error: 60 (Operation timed out)] 16:57:44 gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 16:57:59 lol SRFI 86 is gibberish to me up to ;;; auxiliaries 16:58:29 SRFI 86 is gibberish to me from the word `Abstract' on. 16:58:34 then I still cant understand it, but it looks more followable 16:58:51 eli: The point I was making was a simple point. There's nothing confusing about `syntax-rules' that isn't also present in `syntax-case', and this I think is indisputable. Hairy `syntax-rules' macros can of course be more confusing, but I don't understand why one would assert that there's something intrinsically confusing about `syntax-rules' itself. 16:58:59 -!- mmc [n=mima@esprx01x.nokia.com] has quit [Remote closed the connection] 17:00:06 And those ones from SRFI 100, field-sort and group-sort 17:00:36 it's almost looking like ASCII art to me, like a bear or something 17:01:38 -!- jonrafkind [n=jon@crystalis.cs.utah.edu] has quit [Read error: 113 (No route to host)] 17:02:03 I suppose `syntax-rules' is to blame for the horrible naming conventions in use there! 17:02:27 -!- saccade [n=saccade@65.78.24.131] has quit ["This computer has gone to sleep"] 17:03:07 Curiously, SRFI 100 is implemented with SYNTAX-RULES, SYNTAX-CASE, and DEFINE-MACRO. 17:03:25 Oh, I see. There is an alternative implementation that is unhygienic. 17:04:28 I found it odd to have sorting in syntax-rules when it should be easier with syntax-case like the define-macro version 17:05:52 You could have ended your sentence at the word `odd' -- although that is a mild understatement when the subject is Mr Soo's SRFIs. 17:06:35 yeah, the rest I didnt really bother to read, that just caught my eye when I scanned through it 17:08:08 What a funny name. 17:09:36 -!- wy|d [n=wyld@fl-69-69-20-190.dhcp.embarqhsd.net] has quit [] 17:09:52 mrsolo_ [n=mrsolo@nat/yahoo/x-nasyaeiztwgggfiz] has joined #scheme 17:10:10 -!- borism [n=boris@195.50.199.134] has quit [Connection timed out] 17:10:34 rstandy [n=rastandy@net-93-144-187-146.t2.dsl.vodafone.it] has joined #scheme 17:22:21 Fare [n=Fare@ita4fw1.itasoftware.com] has joined #scheme 17:22:43 -!- copumpkin [n=pumpkin@dhcp-212-245.cs.dartmouth.edu] has quit ["Leaving..."] 17:25:38 -!- rusoc [n=hendrix@host-85-118-227-114.academ.org] has quit [Read error: 110 (Connection timed out)] 17:26:04 hotblack23 [n=jh@91.5.72.187] has joined #scheme 17:26:36 Riastradh: I consider the trivial definition of syntax-rules in syntax-case to be a major advantage fo rme, as this also means that it is easy for me to switch back and forth from syntax-rules to syntax-case. 17:26:58 I don't know if this is a general advantage, but it is important to me, personally. 17:27:56 chandler: I'm not sure what you mean about knowing when you can have unwrapped syntax objects, and when you can have wrapped ones? 17:28:49 arcfide: syntax-case accepts lists too 17:29:13 leppie: Lists? I'm sorry, what do you mean here when you talk about syntax-case here? 17:29:23 Do you mean the form 'syntax-case' or do you mean the system? 17:29:33 the form 17:29:46 Where does 'SYNTAX-CASE' ever expect a list? 17:30:34 (with-syntax (((e ...) (map foo #'(bar ...))))) ... 17:31:03 in the expression position - it usually converts that to a syntax object 17:31:05 and that 2nd syntax is really a list 17:31:05 I see only syntax objects there, and in my opinion, you should to. 17:31:13 s/to./too./ 17:31:24 Anyways, I have to go, but I'll try to explain myself further later. 17:31:29 -!- arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has quit ["G2G!"] 17:32:31 that always confuse me a little 17:33:45 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Connection timed out] 17:39:01 swathanthran [n=user@117.204.81.127] has joined #scheme 17:39:39 -!- mabes [n=mabes@74.81.243.253] has quit [Read error: 131 (Connection reset by peer)] 17:39:44 *swathanthran* wonders how many days it takes for an average student to cover sicp working wholely on it..:) 17:40:35 the average student watches football on tv, doesn't cover sicp. 17:41:06 thats why there is this condition " working wholely on it" 17:41:38 nothingHappens [n=nothingH@173.25.176.111] has joined #scheme 17:43:48 mabes [n=mabes@74.81.243.253] has joined #scheme 17:44:21 i am working wholely on it.. and its been about couple of weeks.. and just doing exercise 2-11:) 17:45:14 s/been about/about to be/ :)) 17:48:17 rusoc [n=hendrix@host-85-118-227-114.academ.org] has joined #scheme 17:48:57 greyhame [n=jao@81.Red-83-44-253.dynamicIP.rima-tde.net] has joined #scheme 17:50:09 jonrafkind [n=jon@crystalis.cs.utah.edu] has joined #scheme 17:50:42 minion: memo to arcfide: What I mean is that I never know whether #'foo is a list or a wrapped list. 17:50:42 Remembered. I'll tell arcfide when he/she/it next speaks. 17:51:49 -!- morphir [n=morphir@84-52-234.12.3p.ntebredband.no] has quit ["leaving"] 17:51:57 which is better to provide local variable ? define or let? 17:52:25 or its ok to use either? 17:54:07 It is preferable to use LET when you don't need a recursively bound variable. 17:54:37 ok. 17:55:06 bombshelter13_ [n=bombshel@76.10.149.209] has joined #scheme 17:56:05 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 17:57:13 MononcQc [n=Ferd@207.253.180.96] has joined #scheme 18:00:52 Nshag [i=user@Mix-Orleans-106-1-167.w193-248.abo.wanadoo.fr] has joined #scheme 18:03:24 arcfide [i=arcfide@140-182-147-196.dhcp-bl.indiana.edu] has joined #scheme 18:05:18 -!- bombshelter13_ [n=bombshel@76.10.149.209] has quit [Remote closed the connection] 18:06:27 minion: Give me my memo. 18:06:28 arcfide: does torturing a poor bot with things beyond its comprehension please you? 18:06:29 arcfide, memo from chandler: What I mean is that I never know whether #'foo is a list or a wrapped list. 18:06:42 minion: It gets the job done. 18:06:43 i don't know what you're referring to 18:07:05 chandler: Does it matter to you whether it is one or the other? 18:07:47 chandler: You can't really know unless you rely on some sort of system specific behavior, so in general, you shouldn't bother to determine that. It's just a syntax object. 18:11:02 wingo [n=wingo@124.Red-88-0-164.dynamicIP.rima-tde.net] has joined #scheme 18:11:07 good day schemers! 18:11:56 wingo: 'ello. 18:12:15 hello sir hsu. 18:12:48 wingo: That reminds me of someone I once met whose name was Susu Xu (pronounced "sue sue sue"). 18:13:01 :) 18:13:09 ah, but the tones, the tones 18:13:27 wingo: Indeed, but at that point, I don't think it matters. ;-) 18:13:35 :) 18:13:44 how rolls the descot train? 18:14:16 wingo: I've released the Beta code, and I'm working on User level tutorials, examples, documentations, and proof of concepts. 18:14:46 Additionally, I have two utilities I plan to write which will make it easy to build Descot files, and will make it easy to use Descot files to generate system specific module declarations for portability. 18:15:07 However, it appears that no one wants to say anything too much, until they see User guides. 18:15:11 I can understand that. 18:15:28 People want to be able to *play* with things. 18:15:45 arcfide: It matters, because I want to use `map', `find', `exists', etc. on syntax objects. This is, after all, why I'm using a procedural macro system, right? 18:15:45 yeah i have not fully grokked what its impact might be. 18:15:55 Riastradh: of course. 18:16:07 good evening, Riastradh & chandler. 18:16:23 chandler: Yes, so if you construct a list, then you use it, otherwise, you don't want to rely on it being a list until you check that it is. 18:16:53 Riastradh: I don't really expect people to grasp the whole thing just by some well documented source code. I wasn't complaining about that. 18:18:11 People also want to be able to read Scheme code, not tangled code or whatever the term is. 18:18:37 chandler: Since you can't guarantee whether it is a list or a wrapped list, you need to check it first, otherwise, you should only do those things if you know what you have constructed. I've never had to atually check that though, because the cases where I want to do such things are obviously either wrapped or unwrapped. 18:18:58 Perhaps I'm not quite getting the obviousness of it. 18:19:01 Just curious: what's the portable way to turn a wrapped list of syntax objects into a list of syntax objects? 18:19:12 (for some value of `portable') 18:19:23 I know it's spelled SYNTAX-E in PLT Scheme, but that's all I know. 18:19:34 Riastradh: a loop with syntax-case i think 18:19:41 *Riastradh* blinks. 18:19:54 *wingo* has been doing too much of that lately. 18:19:56 I think the R6RS makes some guarantees about when things are unwrapped, but I never remember the rules off the top of my head. 18:20:21 I frankly don't understand why any object other an identifier needs to be wrapped, but perhaps I'm not getting something fundamental. 18:20:43 chandler: you could have other info attached to the form. 18:20:48 source information for example. 18:21:01 i think that's right, anyway... 18:21:10 That's not information I want to be concerned with as a macro author, though. 18:21:42 i dig that. 18:21:57 Not keen on syntactic closures, chandler? 18:22:02 syntax objects are a bit of a mess that way. 18:22:40 chandler: i think they could always be wrapped; that would be a consistent behavior 18:22:45 Riastradh, syntax-e is relatively easy to implement 18:22:51 I believe they are in PLT Scheme, wingo. 18:22:54 but i think that because syntax-case comes from dybvig 18:22:57 It's Chez that is random about when things are wrapped. 18:23:03 and he's big on efficiency 18:23:17 at the cost of uniformity in some cases 18:23:21 For example, I think that (SYNTAX (FOO)) can yield a list or a warped list depending on what context you evaluate it in. 18:23:25 things are the way they are. 18:23:43 "The output produced by syntax is wrapped or unwrapped according to the following rules." (list of rules follows) R6RS Library document, 12.4 18:23:49 Efficiency?? psyntax? 18:23:54 Riastradh: that is surprising; but hey. 18:23:55 "the copy of ( ) is a list if contains any pattern variables," 18:24:08 Riastradh: hey, it's not bad if you implement multiple values well ;) 18:24:34 samth pasted "untitled" at http://paste.lisp.org/display/89103 18:24:40 it's strictly O(n), and doesn't cons much more than necessary. 18:24:53 Riastradh, that has an implementation of `syntax->list' 18:25:21 s/syntax-e/syntax->list/, no? 18:25:36 wingo, probably 18:25:43 k 18:25:45 wingo, yes 18:25:54 I'm well aware of how to implement this operation, but I can't help but feel that I'd be happier if *only* identifiers were wrapped. 18:26:20 it's very useful to have source locations, hygenic info, etc on other forms as well 18:26:43 *Riastradh* blinks. 18:26:55 Well, that's even more nonsense than I expected in psyntax. 18:26:55 Riastradh, you've done that a lot 18:27:04 Sorry, my last blinking was unrelated to anything said here. 18:27:10 yes guile uses the source locations too 18:27:23 (define string-append (let ((app string-append)) (lambda args (if (for-all string? args) (apply app args) ((write args)))))) 18:27:40 don't know of a use for the hygienic things on nonidentifiers tho 18:28:12 wingo, that's how #%app works hygenically in PLT, by taking the binding information from the pair of parens representing the application 18:28:14 Riastradh: what could that mean? 18:28:24 samth: ah, i see. tx. 18:28:54 Riastradh: an error mechanism? :) 18:28:58 that's hilarious! 18:29:10 -!- npe [n=npe@94.224.251.223] has quit [] 18:29:26 not in my copy of psyntax :) 18:30:39 samth: I'd assert that pair identity is enough to get good source location information without wrapped objects. The only thing you can't do is to store precise source location identity for a non-identifier atom. 18:31:40 chandler: i understand plt can do that (source info for e.g. `.') 18:32:19 chandler: in Typed Scheme, if you write (+ 3 "foo"), it highlights "foo" 18:32:25 as an error 18:32:31 cornucopic [n=r00t@202.3.77.173] has joined #scheme 18:32:35 "foo" has enough identity to be useful 18:32:53 wingo, psyntax does not run in strictly linear time, since it uses alists to represent environments. 18:32:56 i wouldn't want to have certain cases where i couldn't give good error messages 18:33:28 Riastradh: i understand leppie's version uses hash tables 18:33:28 but point granted, yes. 18:33:32 (and who knows what chez does.) 18:33:43 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Read error: 60 (Operation timed out)] 18:33:44 I also do full source annotations for the input, what is left after psyntax is a guess 18:34:23 wingo: I have a hybrid system now, goes to hashtables if bigger than some value of N 18:34:25 Geesh. The top-level `psyntax-r6rs' directory is full of some pretty abject nonsense. 18:34:30 10 or 20 I think 18:34:54 -!- MichaelRaskin [n=MichaelR@213.171.48.239] has quit [Read error: 110 (Connection timed out)] 18:35:00 https://www.ohloh.net/languages/20 18:35:06 I printed them all out and 'eye-tuned' it :p 18:35:15 eli owns ohloh. 18:35:40 though linas seems to be coding like crazy 18:35:47 not hardly. "RANKED 9365 OF 268953" 18:36:01 saccade [n=saccade@dhcp-18-188-73-161.dyn.mit.edu] has joined #scheme 18:36:08 yes but who cares who owns php 18:37:10 I like those stats ;) 18:37:40 they are fun :) 18:37:42 Riastradh: I think a better definition of 'syntax->list' is (define (syntax->list x) (with-syntax ([(a ...) x]) #'(a ...))). 18:37:53 perhaps not representative, but certainly fun 18:38:19 arcfide, I must say it is completely non-obvious why that should do anything at all, except perhaps to strip source location information from the original list. 18:38:25 well at least you can see that something is happening to scheme 18:38:41 Riastradh: That should not strip source location information. 18:38:47 What? 18:38:49 Then what does it do? 18:39:23 If the resulting list is wrapped with source location information, then it is wrapped; otherwise, it is not wrapped, and it has no source location information. 18:39:35 Riastradh: It "pushes" the wraps down at least one level if you pass it a wrapped list. 18:39:53 So the list *doesn't* have source location information. 18:40:28 Riastradh: No, but if you assume that you want that, you're not losing any more information than any other method for turning a syntax into an unwrapped list. 18:40:40 And that information is still in the sub-elements. 18:40:46 s/sub-// 18:41:12 So either (1) it does what I asked completely non-obviously or (2) it obviously doesn't do what I asked. Neither situation is desirable! 18:42:01 Chez Scheme also has a built-in syntax->list. 18:42:43 Riastradh: You wanted a wrapped list to go to an unwrapped list of syntax objects.... 18:42:51 That's right. 18:43:04 It is not clear to me why (syntax ) should ever yield anything but a wrapped something. 18:43:34 I accept that there are rules governing when this is the case, but that doesn't make it any more 18:43:42 ...^J argh. 18:43:59 ...but that doesn't make it any more justified or obvious. 18:44:26 -!- attila_lendvai [n=ati@catv-89-134-66-153.catv.broadband.hu] has quit [Read error: 60 (Operation timed out)] 18:45:37 Another version, if you prefer: (define (syntax->list x) (syntax-case x () [() '()] [(a . b) (cons #'a (syntax->list #'b))])). 18:45:50 That's what samth pasted. 18:45:57 Riastradh: His was more confusing. 18:46:08 copumpkin [n=pumpkin@dhcp-210-109.cs.dartmouth.edu] has joined #scheme 18:47:07 -!- copumpkin [n=pumpkin@dhcp-210-109.cs.dartmouth.edu] has quit [Remote closed the connection] 18:49:45 what's with-syntax ? 18:50:31 oh, it's a standard part of syntax-case in r6rs. 18:51:15 -!- slimy_lotus [n=Adium@cuscon128732.tstt.net.tt] has quit ["Leaving."] 18:52:16 Fare: very handy for converting variables to pattern variables 18:53:25 I code like crazy 18:53:43 i think you commit like crazy :p 18:53:47 mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 18:53:54 well, yes 18:54:04 if it works, commit 18:54:18 yeah, I should more often commit per bug 18:54:48 but I go on these nice coding stretches and just fix bugs along the way 18:55:38 why is (let () ...) used instead of (begin ...) in http://docs.plt-scheme.org/r6rs-lib-std/r6rs-lib-Z-H-13.html#node_idx_1152 ? 18:55:53 heh im a recnet #1 contributor! -- that was for a long & complicated bit of natural-language+reasoning work 18:55:53 Riastradh: I'm not sure why you consider my former 'syntax->list' definition as non-obvious. It is only non-obvious if you don't know what 'synax' does, in which case, of course you won't understand it. 18:56:06 -!- marcoecc [i=me@gateway/gpg-tor/key-0x9C9AAE7F] has quit [Remote closed the connection] 18:56:08 Jus tthe same with any other procedure or form. 18:57:00 Fare, (LET () ...) admits internal definitions in ... wherever you put it; (BEGIN ...) does not. 18:57:29 arcfide, you can apply whatever arbitrary rules to whatever procedures you want; that doesn't make them any more intuitive. The basic idea of SYNTAX is to construct a syntax object -- but sometimes it doesn't! 18:57:47 Riastradh, you mean like (define ...) ? 18:57:58 Fare, yes, that's what an internal definition looks like. 18:58:17 internal definitions in Scheme are SO unintuitive. 18:58:18 choas [n=lars@p5B0DD7BD.dip.t-dialin.net] has joined #scheme 18:58:34 Fare: Yes, absolutely! 18:58:39 marcoecc [i=me@gateway/gpg-tor/key-0x9C9AAE7F] has joined #scheme 18:59:03 I'd like to obsolete them in R7RS. 18:59:25 I don't want to obsolete them. I use them all the time. 18:59:42 wouldn't you prefer a PLT-like local ? 18:59:46 No. 18:59:48 -!- ray [i=ray@drong.notacat.org] has quit [Read error: 60 (Operation timed out)] 18:59:49 Why are they unintuitive? 18:59:51 ray [i=ray@drong.notacat.org] has joined #scheme 18:59:52 why not? 18:59:56 Riastradh: Lists of syntax objects are valid syntax objects. 19:00:09 I shouldn't mind if internal definitions were made more consistent with top-level definitions, now. 19:00:09 mario-goulart, they behave VERY differently from the same definitions at the toplevel. 19:00:14 arcfide, that's a pun. 19:00:20 heh. that ranking is alarming, since I'm a scheme newbie ... oh well 19:00:55 Riastradh, but that would be a backward incompatibility 19:01:03 Fare, no, not really. 19:01:05 Fare: I don't understand. Care to provide an example? 19:01:42 mario-goulart, I'm sure you can google for scheme define let-rec and have fun. 19:01:44 Fare, the R5RS semantics of internal definitions is preserved by the R6RS semantics of internal definitions, and the R6RS semantics of internal definitions is preserved by the top-level semantics of definitions. 19:02:01 mario-goulart: (define x 5) (write x) (define y x) is valid at the top level but not in an internal scope. 19:02:24 ah, ok. 19:02:35 (define x 5) (define y x) (write x) is valid at the top level and in an internal scope in the R6RS, but not in an internal scope in the R5RS. 19:02:46 (define (x) 5) (define (y) (x)) (write (x)) is valid in all of the above. 19:03:31 That's really confusing. 19:03:47 wouldn't the solution be to either 1- have each internal define create a new scope, or 2- prevent multiple-entry for continuations between two such defines? 19:04:14 since the prevent multiple-entry path has already been chosen for let-rec 19:04:30 Suggestion (1) is no good, because that means interchanging (define (x) 5) and (define (y) (x)) would cease to be valid. 19:05:24 so that leaves 2- 19:05:35 do you follow r6rs-discuss? 19:05:35 Suggestion (2) is not great, because while it is reasonable to say that top-level forms should be executed only once, the same is not so for the bodies of procedures in general. 19:05:49 Fare: see fixing letrec 19:05:59 the waddell papers iirc 19:06:04 What does that have to do with it, wingo? 19:06:24 Riastradh: how to transform letrec into Y 19:06:31 Y is where you really win 19:06:31 wingo: I've seen a presentation about the idea of it at the scheme workshop 19:06:43 chandler: The rules are really simple if you think of thus: if you have any patterns that require substitution, you get an unwraped object, if the entire form has no pattern variables in it, then it can be wrapped. 19:06:46 That is an implementation detail, wingo. 19:06:49 i wish i could have been there, at the boston pole. 19:06:49 Rather, it will be wrapped. 19:06:50 It has nothing to do with semantics. 19:07:05 Riastradh: you are right, indeed. 19:07:07 (other than that it is constrained to preserve the semantics) 19:07:09 wingo: Y doesn't work the same in applicative platforms as in lazy platforms. 19:07:16 but i am interested in implementation details. 19:07:30 We're discussing semantics, wingo, not implementation details. 19:07:36 Fare: it has different forms of course. 19:07:36 chandler: (with-syntax ([a 3]) (values #'a #'3)). 19:07:46 Riastradh, operational semantics IS semantics. 19:07:47 chandler: => 3 #. 19:07:48 Riastradh: It helps to have an agreed-upon correct reference implementation 19:07:50 Riastradh: very well :) 19:08:03 "implementation details" == small-step operational semantics. 19:08:10 This is absurd. 19:08:16 http://wingolog.org/archives/2009/08/10/goto- 19:08:43 maybe you mean "I'm interested in denotational semantics" 19:08:45 The paper wingo cited is about taking a *particular* semantics, and then transforming LETREC into another form, preserving its semantics, but making it easier for other parts of the compiler to reason about it. 19:08:57 We are talking about *choices* of semantics, however they be implemented. 19:09:08 Operational versus denotational has nothing to do with it. 19:10:01 dunno 19:10:10 so i'm sure you're right of course :) 19:10:11 SvekloC [n=sveklo@unaffiliated/sveklo] has joined #scheme 19:10:26 but i knew there was letrec, and there was Y -- but i didn't know how to make it to the latter from the former. 19:10:30 Choosing a different semantics might invalidate the transformation of the paper wingo cited; there might be a similar, but nonetheless distinct, transformation that preserves the different semantics. 19:10:45 sure :) 19:11:04 wingo, also, it's not about transforming LETREC into Y. It's about identifying the parts of LETREC that can be trivially transformed into Y, and also identifying the parts that can be trivially transformed into LET, and then leaving the hard parts to be handled the hard way. 19:11:19 yes, i know. i implemented it. 19:11:35 arcfide: Knowing that, I still need to stop and think about it. 19:11:38 though i suppose, to be fair, one can implement without understanding. 19:11:39 -!- MononcQc [n=Ferd@207.253.180.96] has left #scheme 19:11:47 And it's not at all obvious at a glance to me that (list? (with-syntax ((a 3)) #'(a 3))) -> #f 19:11:54 chandler: I guess it just makes sense to me. It's fairly simple in practice, I tihnk. 19:12:47 chandler: Either some insertions need to be made when copying, or, when copying we can take the thing directly. Taken directly, we just wrap it, if we have to modify it, we don't wrap the whole thing. 19:13:04 arcfide, it is not remotely obvious to me why (with-syntax ((a 3)) (values #'a #'3)) should yield two distinct values. 19:13:19 You can repeat that there are rules about this, but that doesn't *justify* the rules. 19:14:26 emma [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-psudrylgjazlldce] has joined #scheme 19:17:23 dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 19:17:25 Riastradh: One uses a pattern variable, the other doesn't. Let me see if I can justify it in a way that might make sense to you. 19:17:56 slimy_lotus [n=Adium@cuscon128732.tstt.net.tt] has joined #scheme 19:17:56 Why does it matter whether one involves a pattern variable and one doesn't? 19:18:12 *wingo* with Riastradh on this one.. 19:18:27 That is a distinction lacking a difference, as far as I can tell. 19:19:25 In the case where there are no pattern variables, then the syntax information on the template form is the same throughout, and we need only wrap the whole thing. If there are pattern variables, then each pattern variable may have a unique wrapping on it, and we can't just wrap the whole thing in a single wrap. 19:20:15 see, the efficiency thing. 19:20:25 wingo: This isn't just efficiency. 19:21:23 Why is there a choice about whether to wrap the whole thing or not? 19:21:38 emmy [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-mnkkwwgoggifedqe] has joined #scheme 19:21:44 Riastradh: Could you explain that? 19:21:54 I am not sure where you are going with this. 19:22:36 You just spoke of a decision about whether to wrap the whole result or not. 19:22:39 Why does that decision matter? 19:22:43 -!- emma [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-psudrylgjazlldce] has quit [Read error: 131 (Connection reset by peer)] 19:22:46 Why doesn't SYNTAX just *always* wrap the whole object? 19:23:05 Is it some phantom efficiency paranoia? 19:23:31 If it did, there would have to be another primitive to get a list back out of the syntax object. 19:23:52 after a weekend hacking scheme, on monday morning i find myself expecting { to make a nicely balanced pair of braces. 19:24:07 not to mention M-p. 19:24:12 chandler, huh? Doesn't SYNTAX->LIST, defined recursively with SYNTAX-CASE, do the right thing? 19:24:56 You're right, not sure what I was thinking there. 19:25:42 In any case, I think there should be such a primitive -- that is, to unwrap a wrapped object. 19:25:55 Riastradh: If you encounter a wrapped syntax object, then that entire object has that syntactic information. However, some forms may have different syntactic information in it, and this breaks that model. 19:25:58 (As I said, in PLT Scheme, when I last looked at this, there was such a primitive, called SYNTAX-E.) 19:26:09 arcfide, sorry, what are `this' and `that model'? 19:26:31 Too many `this's and `that's; fewer relative pronouns, please! 19:26:34 Riastradh: how is that not syntax->datum? 19:26:42 you mean to unwrap only once? 19:26:53 :) 19:26:53 wingo: I think Riastradh was referring to a primitive to push the wraps down a level, not to unwrap the object completely. 19:26:59 ok 19:27:07 Riastradh: I have to think about it, but you don't want something like: #)>. Either you want # or (# # #). 19:27:15 Why not, arcfide? 19:27:22 I don't see why any one is preferable over the others. 19:27:34 for purposes of implementation details! :) 19:27:39 actually there is one reason 19:27:45 circular data structures 19:28:02 What do circular data structures have to do with it? 19:28:04 not sure how useful that is 19:28:17 well, that you wrap the whole thing, and don't go enumerating its parts... 19:28:27 but dybvig does mention them in his papers 19:28:38 Given a wrapped syntax with information X, you rely on that information holding for all the components of the given wrapped syntax. 19:28:57 -!- schmir [n=schmir@mail.brainbot.com] has quit [Remote closed the connection] 19:29:03 Who relies on that? Why? 19:29:06 arcfide: oh come on -- you should admit, it is an efficiency hack. 19:29:21 hacks are ok in many contexts. 19:29:22 Certainly I don't expect that to be the case if `syntax object' includes syntactic closures. 19:29:33 Debugging and source code correlation for one. 19:29:53 As a user, I don't have any information about the contents of the wrap other than those exposed by `syntax-case' and the standard identifier comparison predicates. 19:29:53 Pray elaborate, arcfide. 19:29:53 So, there's not much I can rely on. 19:30:50 Suppose a macro takes C as input, and generates (A B C). I don't see any reason why the output shouldn't look like #)>, where the inner # contains source location for C and the outer contains source location for the macro. 19:31:24 Riastradh: indeed that is the case in plt afaiu. 19:33:20 chandler: syntax->list pushes syntax down one level. 19:33:48 What are you saying that in relation to? 19:33:53 Riastradh: Most SYNTAX-CASE systems have a primitive to unwrap a wrapped object. 19:34:02 chandler: ^^^ 19:34:22 Yes, it pushes the wraps down a level. 19:34:49 For what it's worth, I believe Larceny in R6RS mode does not wrap any object other than an identifier. 19:34:57 dstorrs pasted "Including a template within a template" at http://paste.lisp.org/display/89112 19:35:31 how do you unwrap a vector, a structure, etc. ? Or do you never have to? 19:35:32 dstorrs: What is that monstrosity? 19:35:36 Anyone got a second to look at some code? I'm trying to write a macro that will define web server functions. 19:35:40 Fare: syntax->vector. 19:36:09 how do you even know it's a vector? (and what if it's a structure?) 19:36:41 Fare: structures don't normally have a read syntax. 19:36:47 arcfide: it's a macro that defines a function. the function take a set of standard arguments, plus whatever additional args you specify. It evals whatever body expressions you give it, then returns the result of reading in a template 19:36:53 you can syntax-case x () (#(a b c ...) ...) 19:37:30 everything works except for the part where I'm trying to include one template into another. 19:38:00 wingo: Partially, I believe this is efficiency, but not entirely. 19:38:12 wingo, and if some implementation provides one, you lose, and/or you should never ever look inside for the purposes of ,-expansion or whatever? 19:38:18 wingo: It is also useful in the same way that quote is useful instead of just using LIST. 19:38:23 chandler pasted "Looking at some syntax objects" at http://paste.lisp.org/display/89114 19:38:46 I'd like to have a template that has the line: @(include-template (file @css-path)) but that chokes most horribly, saying "bad `file' path at: ...(file css-path)..." 19:38:51 Fare: well if an implementation provides an extension... it's implementation-specific :) one would hope they extend the syncase matcher too. 19:39:08 arcfide: Have a look at the output from Larceny 19:39:57 wingo: which means that can't provide an extension modularly without having to maintain a fullblown implementation. 19:40:01 arcfide: i will have to mull that over; but unless you are comparing syntaxen with eq?... which seems dodgy... 19:40:19 Fare: you can't have a pony without feeding it. 19:40:33 jay-mccarthy: you about, perchance? 19:40:40 some implementations might have such extension mechanism of course... 19:40:42 yup 19:40:58 is it feasible to have one template that include-template's another? 19:41:13 yup 19:41:58 wow economy has smashed open-source projects: https://www.ohloh.net/languages/compare?commit=Update&l0=c&l1=cpp&l2=java&l3=php&l4=python&l5=-1&measure=commits 19:42:00 -rudybot:#scheme- http://tinyurl.com/yg7bqcf 19:42:15 wingo: I can't buy or sell a saddle without also buying or selling a pony. 19:42:48 jay-mccarthy: is it possible to have a template that includes another template, but which template is specified via variable? 19:43:12 no, templates are compile-time things 19:43:15 Fare: i had a dream the other night it was 1820 and i had a pony named google. I decorated him with plastic lanyards. then i was back to now and was slightly embarrassed that the pony's name was google. 19:43:23 you could write a macro or a parameterized template 19:43:25 that does not answer your concern of course. 19:43:53 linas: I think bad languages are just on the decline! Compare to https://www.ohloh.net/languages/compare?measure=commits&percent=&l0=lisp&l1=scheme&l2=-1&commit=Update 19:43:55 -rudybot:#scheme- http://tinyurl.com/ylhae6j 19:44:04 schmir [n=schmir@mail.brainbot.com] has joined #scheme 19:44:10 (define (template inner) (include-template "main.html")) where main references @inner as a string 19:44:29 then (define (use1 ...) (template (include-template "use1.html"))) 19:44:30 etc 19:45:03 linas: wow, that is interesting. 19:45:30 With some other languages for comparison: https://www.ohloh.net/languages/compare?measure=commits&percent=&l0=lisp&l1=scheme&l2=erlang&l3=ocaml&l4=haskell&l5=-1&commit=Update 19:45:32 -rudybot:#scheme- http://tinyurl.com/yl85ykx 19:45:43 Could not find SML on the list 19:45:45 chandler: yes but what about https://www.ohloh.net/languages/compare?measure=commits&percent=&l0=lisp&l1=scheme&l2=bat&l3=-1&commit=Update 19:45:47 -rudybot:#scheme- http://tinyurl.com/yz7tqbs 19:45:48 emma [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-vftkmesplvibzldk] has joined #scheme 19:45:48 erm...not quite sure that's what I'm looking for. 19:45:55 -!- emmy [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-mnkkwwgoggifedqe] has quit [Remote closed the connection] 19:46:25 wingo: We will never fully address the problem of mental illness. 19:46:51 can you take a quick glance at the code I posted and let me know if I'm totally SOL? http://paste.lisp.org/display/89112 19:47:19 `define-macro'? Yes, you're SOL. :-) 19:47:43 chandler: i assume you are referring to my pony, google. 19:47:59 I can explicitly pass in the include-template line, but that seems clumsy. 19:48:25 chandler: what's wrong with define-macro? the fact that it's unhygenic? 19:48:37 wingo: No, I'm referring to the people who are writing batch scripts today. 19:48:40 In this case, that was a feature, not a bug. :> 19:48:51 I'm confident that `define-macro' is a bug. 19:49:38 chandler: Ok. *why* is it a bug? 19:49:56 dstorrs: you could get that with what i am suggesting in two ways 19:50:12 What implementation are you using here anyway? 19:50:28 Time to go... 19:50:30 first, you could have @css-content bound rather than @css-path and have define-page use include-template 19:50:31 It's a bug because it does nothing but provide "opportunities" to introduce bugs. 19:50:42 chandler: PLT 4.2.1 19:50:50 it's a gateway bug 19:50:56 Oh, dear. You have no reason to use `define-macro' at all, then. 19:51:16 dstorrs: do you not want it to have a (define ...) in the expansion? 19:51:18 -!- arcfide [i=arcfide@140-182-147-196.dhcp-bl.indiana.edu] has left #scheme 19:51:26 second, you could use templates at expansion time with define-for-syntax and that sort of magic 19:51:51 depends on the implementation of course 19:51:56 wingo: I don't really care what the expansion is, as long as it works. 19:51:56 dstorrs: btw i agree that define-macro is horrible, particularly how you've done it 19:52:06 dstorrs: heh. 19:52:26 "I don't care if it works, as long as it works." 19:52:35 ah yes i see the define now. 19:52:40 -!- Fare [n=Fare@ita4fw1.itasoftware.com] has quit ["Leaving"] 19:52:44 my bad for not reading it well. 19:53:06 actually, since guile added native define-syntax support, i haven't looked back at all 19:53:20 i haven't written a defmacro in months 19:53:23 jay-mccarthy: Well, we are trying to create a macro that defines a function, where the function has standard arguments added to it. To my understanding, that means we need an unhygenic macro in order for the new arguments to be visible in the defined function. 19:53:42 dstorrs: you can use syntax-case 19:53:48 no dstorrs, you simply need to pass the name to it 19:53:49 if your system supports it 19:54:12 both of those will work and you could use parameters for the same purpose i imagine 19:54:14 the graphs suggest that scheme coders do it out of love, no matter what, but C/C++/Java/PHP/Python have *many* coders writing open source only while they're employed 19:54:18 syntax-rules literals confuse me. 19:54:32 -!- cornucopic [n=r00t@202.3.77.173] has quit ["so long.."] 19:54:47 How are they confusing? 19:54:58 lol chandler, not again :p 19:55:08 They match if the identifier in the input refers to the same binding as the identifier in the pattern. 19:55:11 i think if i could answer that i would have the matter straight :) 19:55:33 leppie: See, I just don't get it. It's just a funny syntax for `free-identifier=?'. And if you don't understand that, do you understand the system at all? 19:55:42 "How does chocolate taste?" 19:56:13 yes I do understand that 19:56:49 jay-mccarthy: Ok, I get you. Thanks for the pointers. 19:56:55 dstorrs: np 19:57:04 Then how can you not understand literals? (syntax-case stx (lit) ((_ lit) #'expansion)) -> (syntax-case stx () ((_ v) (free-identifier=? #'v #'lit) #'expansion)) 19:57:16 chandler: then why do some people urge you to export your literals from r6rs modules? 19:57:21 figurative you of course. 19:58:20 wy|d [n=wyld@fl-69-69-20-190.dhcp.embarqhsd.net] has joined #scheme 19:58:51 I suppose it's so that there is a binding for the literal to refer to, as opposed to an unbound identifier from the top level. That way, if some other module happens to export a like-named identifier, you'll actually get a name conflict instead of just discovering that the literal doesn't work. 19:59:15 -!- wy|d is now known as deke 20:00:35 and if you shadow it, you are lost forever 20:01:29 but then again you could rename if the rewrite effort is too big 20:01:33 jay-mccarthy: btw, I don't suppose you have any intention of ever making templates a run-time thing, do you? Or, at least, providing an option to have them so? 20:01:52 Because, honestly, having them be compile time is more pain than benefit. 20:02:04 chandler, you can also rename them on import if they are bound. 20:02:57 MichaelRaskin [n=MichaelR@195.91.224.225] has joined #scheme 20:03:50 I'm not sure I've quite got my mental model around renaming on import yet, but I suppose that most of the issue that exist around that in my mind don't exist if macros can't expand into library or import forms. 20:06:54 dstorrs: i wanted them to be efficient AND i wanted to allow them to get the lexical scope of where they are included AND didn't want you to have to declare what identifiers came from the includer 20:07:29 dstorrs: if they are run-time then you need to basically represent them as functions 20:07:57 dstorrs: if they are "schemey" they would take fixed arguments, if they are not they would take the whole environment 20:08:29 dstorrs: if they took fixed arguments, youd need to inspect them to determine which ids are bound 20:09:15 dstorrs: my initial thought was to find everything unquoted in @, but it was quickly not workable 20:09:43 dstorrs: you could probably hack something with 'eval' but i haven't tried to do it because i can't do something elegant 20:10:14 dstorrs: and finally... templating systems always go back and try to get compilability and fail... i started with it 20:17:38 patmaddox [n=patmaddo@ip68-111-70-47.oc.oc.cox.net] has joined #scheme 20:18:19 jay-mccarthy: Well, I really appreciate the work you've done on the web server. It's a great tool, and we couldn't have made anything like the progress we have without it. 20:18:58 word :) 20:19:22 That said... ( you knew that was coming, right? :> ) 20:19:52 ...the templating situation isn't really up to the standards of Template::Toolkit or other systems I've used. This case of trying to straightforwardly compose templates based on runtime information-- 20:20:02 or even information created at macro expansion time-- 20:20:29 is a prime example. A templating system that doesn't make it easy to compose page elements is very underpowered. 20:22:08 Actually, that's not fair. I'd say there I really only have two complaints: lack of easy composability, and needing to restart to test template changes. 20:22:25 The rest of the templating system is nice. I was too harsh the first time, my apologies. 20:26:23 re restarting: the template language has all of scheme, so it can have effects and globals, so there is no way to "port" the state when you change it, so you need to restart the servlet. if you are using the cli, then going to /conf/refresh-servlets will reload everything 20:26:57 re composing: do you mean something other than having dynamic templates? 20:27:37 Deformative [n=joe@bursley-183118.reshall.umich.edu] has joined #scheme 20:27:48 -!- Deformative [n=joe@bursley-183118.reshall.umich.edu] has left #scheme 20:29:28 I want to have page templates that consist of, e.g., a basic skeleton, then an index.scrbl / faq.scrbl, etc. The page gets rendered by taking the basic skeleton and plugging in the elements that are needed. 20:29:56 So you want a parameterized template right? 20:30:24 But "the elements that are needed" is determined at runtime--e.g., based on the (is-logged-in?) function, they will either see a "Welcome _dstorrs_" or a "_Login_ | _Register_" message 20:30:46 okay 20:31:18 everywhere else in scheme such parameterization is done with functions 20:31:24 and the same works in this case 20:34:17 jay-mccarthy pasted "Dynamic Templates" at http://paste.lisp.org/display/89121 20:34:38 similarly you can use eval to get dynamicism like you can elsewhere in scheme 20:34:41 RageOfThou [n=RageOfTh@users-120-250.vinet.ba] has joined #scheme 20:35:18 Template systems should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. 20:38:43 template systems should use church numerals. 20:39:15 #t 20:39:16 happiness is a warm feature :) 20:40:02 gnomon_ [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 20:40:03 jay-mccarthy annotated #89121 "How to run" at http://paste.lisp.org/display/89121#1 20:40:16 -!- Mr_Awesome [n=eric@c-98-212-135-60.hsd1.il.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 20:43:28 *sigh* 20:44:02 Good grief. I hope you weren't seriously recommending the use of unary EVAL. 20:44:46 i'm not recommending it because i think anything useful you would do can be done with a function, but it can be done 20:45:03 Hm. Actually, I think that unary `eval' on a syntax object is probably just as well specified as two-argument `eval'. 20:45:15 jay-mccarthy: Once again, I'm forced to sincerely thank you for invalidating my last day of work with 5 lines of code. 20:45:20 slom [n=ibook@pD9EB7AA6.dip.t-dialin.net] has joined #scheme 20:45:28 No, it's not, chandler. 20:45:36 What do the literal names in the template mean? 20:46:21 All kidding aside, it's much appreciated. As a thought, this would be a great thing to put in the web server and/or Continue docs. 20:46:44 I'm sure I can't be the only Scheme newbie who has beaten his head against trying to make this work. 20:46:44 Surely not what they meant in the phase at which the template was evaluated! That would break everything. But the template is not being used to create a syntax object occurs in the output of a macro, so we don't know what macro it uses the definition environment of. 20:47:27 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Remote closed the connection] 20:47:30 Fair enough. I've forgotten what PLT does with one-argument `eval' anyway. 20:48:10 dstorrs: the template docs already have parameterized templates in blog-posted and blog-posts... you just want strings that happen to come from other templates rather than data structures.... and i don't want to encourage eval so i won't show that trick in the docs :) 20:49:28 Your docs, your call. For what it's worth, I guarantee this is a pretty common use case in commercial web apps. 20:50:09 maybe a faq... :) 20:50:20 chandler, it uses the `current namespace', i.e. the nearest REPL's environment, basically. 20:51:17 That doesn't seem like it's any less of a phasing problem than using binding information from a syntax object. 20:51:48 The syntax object's binding information isn't associated with run-time values at all. 20:52:20 But the whole `current namespace' concept in PLT is a design bug. 20:52:47 -!- MrFahrenheit [n=RageOfTh@users-38-53.vinet.ba] has quit [Read error: 110 (Connection timed out)] 20:53:15 -!- SvekloC [n=sveklo@unaffiliated/sveklo] has quit [Read error: 145 (Connection timed out)] 20:55:15 SvekloC [n=sveklo@unaffiliated/sveklo] has joined #scheme 21:05:56 davazp [n=user@79.153.148.56] has joined #scheme 21:10:47 -!- gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Read error: 110 (Connection timed out)] 21:10:55 arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has joined #scheme 21:13:00 -!- slom [n=ibook@pD9EB7AA6.dip.t-dialin.net] has left #scheme 21:18:09 -!- sstrickl [n=sstrickl@nomad.ccs.neu.edu] has quit [] 21:28:59 -!- choas [n=lars@p5B0DD7BD.dip.t-dialin.net] has quit ["leaving"] 21:30:17 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 21:39:16 -!- arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 21:48:27 Narrenschiff [n=ritchie@xolotl.plus.com] has joined #scheme 21:52:09 mmc [n=mima@89.27.122.78] has joined #scheme 21:52:30 -!- mmc [n=mima@89.27.122.78] has quit [Read error: 131 (Connection reset by peer)] 21:55:16 Mr_Awesome [n=eric@c-98-212-135-60.hsd1.il.comcast.net] has joined #scheme 21:55:22 -!- deke [n=wyld@fl-69-69-20-190.dhcp.embarqhsd.net] has left #scheme 21:56:00 -!- emma [n=a59bcafe@gateway/web/flash/eris.tuxhacker.org/x-vftkmesplvibzldk] has quit [Remote closed the connection] 22:00:07 -!- mario-goulart [n=user@67.205.85.241] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 22:05:49 -!- SvekloC [n=sveklo@unaffiliated/sveklo] has quit ["Leaving..."] 22:07:31 -!- weinholt [i=weinholt@debian/emeritus/weinholt] has quit [Remote closed the connection] 22:07:33 weinholt [i=weinholt@debian/emeritus/weinholt] has joined #scheme 22:10:34 -!- bweaver [n=user@c-68-60-0-190.hsd1.tn.comcast.net] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 22:15:08 -!- wingo [n=wingo@124.Red-88-0-164.dynamicIP.rima-tde.net] has quit [Read error: 113 (No route to host)] 22:15:42 bombshelter13_ [n=bombshel@76.10.149.209] has joined #scheme 22:17:24 Fare [n=Fare@ita4fw1.itasoftware.com] has joined #scheme 22:18:08 -!- davazp [n=user@79.153.148.56] has quit [Read error: 131 (Connection reset by peer)] 22:27:34 Summermute [n=scott@c-76-114-212-247.hsd1.dc.comcast.net] has joined #scheme 22:27:50 -!- nothingHappens [n=nothingH@173.25.176.111] has quit ["Leaving"] 22:30:09 -!- Narrenschiff [n=ritchie@xolotl.plus.com] has quit [] 22:33:24 gnomon [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has joined #scheme 22:33:29 -!- Baconizer [n=baconize@unaffiliated/baconizer] has left #scheme 22:36:39 -!- dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has quit ["night all"] 22:36:53 -!- gnomon_ [n=gnomon@CPE001d60dffa5c-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Read error: 104 (Connection reset by peer)] 22:39:37 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 22:40:11 -!- Summermute [n=scott@c-76-114-212-247.hsd1.dc.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 22:41:07 -!- swathanthran [n=user@unaffiliated/shyam-k/x-8459115] has quit [Read error: 113 (No route to host)] 22:43:57 -!- mabes [n=mabes@74.81.243.253] has quit [Remote closed the connection] 22:44:41 -!- saccade [n=saccade@dhcp-18-188-73-161.dyn.mit.edu] has quit ["This computer has gone to sleep"] 22:46:10 sepult`` [n=levgue@xdsl-87-78-72-106.netcologne.de] has joined #scheme 22:47:50 -!- samth is now known as samth_away 22:49:20 phax [n=phax@unaffiliated/phax] has joined #scheme 22:49:24 sstrickl [n=sstrickl@pool-129-44-182-54.bos.east.verizon.net] has joined #scheme 22:53:15 -!- rstandy [n=rastandy@net-93-144-187-146.t2.dsl.vodafone.it] has quit [Read error: 110 (Connection timed out)] 22:55:52 -!- jonrafkind [n=jon@crystalis.cs.utah.edu] has quit [Read error: 113 (No route to host)] 23:00:54 -!- sepult` [n=levgue@xdsl-87-78-168-94.netcologne.de] has quit [Connection timed out] 23:02:19 arcfide [i=arcfide@99.186.239.61] has joined #scheme 23:03:54 -!- phax [n=phax@unaffiliated/phax] has quit ["Leaving"] 23:07:16 -!- nickgibbon [n=nring@210.8.201.244] has left #scheme 23:08:10 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 23:10:20 nickgibbon [n=nring@210.8.201.244] has joined #scheme 23:15:21 emma [n=em@unaffiliated/emma] has joined #scheme 23:15:35 -!- hotblack23 [n=jh@91.5.72.187] has quit ["Leaving."] 23:16:07 -!- jlongster [n=user@c-68-59-187-95.hsd1.tn.comcast.net] has quit [Read error: 113 (No route to host)] 23:20:17 dfeuer [n=dfeuer@wikimedia/Dfeuer] has joined #scheme 23:20:44 mabes [n=mabes@bmabey.fttp.xmission.com] has joined #scheme 23:24:02 -!- mabes [n=mabes@bmabey.fttp.xmission.com] has quit [Remote closed the connection] 23:30:39 schmir` [n=schmir@p54A906EC.dip0.t-ipconnect.de] has joined #scheme 23:32:37 ventonegro [n=alex@c9519399.virtua.com.br] has joined #scheme 23:34:09 -!- arcfide [i=arcfide@99.186.239.61] has quit [Remote closed the connection] 23:34:21 arcfide [i=arcfide@adsl-99-186-239-61.dsl.bltnin.sbcglobal.net] has joined #scheme 23:42:03 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit ["ChatZilla 0.9.85 [Firefox 3.5.3/20090824101458]"] 23:43:19 -!- DerGuteMoritz [n=syn@85.88.17.198] has quit ["\quit"] 23:44:57 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 23:49:02 -!- schmir` [n=schmir@p54A906EC.dip0.t-ipconnect.de] has quit [Read error: 113 (No route to host)]