00:00:21 This and libev solve different problems. 00:00:29 arcfide: I believe that the R5RS *requires* the behavior that I think it does because I can't find anything which suggests it does *not* require it. There is no suggestion that what is on the right-hand side of a `let-syntax' form is ever expanded, and the language which specifically applies hygienic behavior to literals in the derived syntax forms does not cover `syntax-rules'. 00:00:37 faure [n=moe@CPE001217e40caa-CM0018c0c09832.cpe.net.cable.rogers.com] has joined #scheme 00:00:40 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 00:00:58 libev fails spectacularly to scale in certain dimensions. You really, really don't want to serialize every continuation of your application through a stack of event callbacks. 00:01:53 The only reason that that performs better in C programs than using threads is that C can't use a more compact general representation for its continuations than a contiguous block of memory, which is probably the main reason why a thread is so expensive in C. 00:02:06 arcfide: Thus, as far as I can determine, surrounding lexical bindings have no effect on the right-hand side of a `let-syntax' binding. 00:02:26 kiko_ [n=user@67.207.130.53] has joined #scheme 00:02:41 Scheme is not limited so; hence you don't need to waste your time serializing your continuations through a collection of event callbacks -- the thread system can do that for you. 00:03:21 (Maybe Chez is limited so, however, if it maps Scheme threads injectively to OS threads.) 00:03:49 -!- jonrafkind [n=jon@155.98.68.48] has quit [Read error: 148 (No route to host)] 00:04:01 emma [n=em@unaffiliated/emma] has joined #scheme 00:06:37 Riastradh: Well, I don't have to use native threads, but I haven't studied enough of your cml code to know whether or how this could be done, or if it should be done. 00:06:47 Conversely, while you could write an application in a completely event-driven style using CML as the main event loop, that wouldn't be a very effective use of the abstractions that CML provides, and it probably wouldn't perform very well, since it would serve as a level of interpretive overhead between your application and libev or a select loop or something. 00:08:10 If you want to read the code, start with primitive.scm, and then move to mailbox.scm or channel.scm, thinking of BASE-RENDEZVOUS as MAKE-PRV. Then read rendezvous.scm to see how negative acknowledgement fits into the picture. 00:12:32 chandler: Okay, so, it seems to me that you have two issues. One, you think that an keywords bound by a 'let-syntax' should not affect the definitions of other keywords by 'let-syntax' bindings inside the body of the first 'let-syntax'; secondly, it seems that you take issue with the rebinding of 'syntax-rules' in your grovel example. Are these the only two issues? 00:13:49 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 00:16:01 -!- faure [n=moe@CPE001217e40caa-CM0018c0c09832.cpe.net.cable.rogers.com] has left #scheme 00:18:24 -!- ebzzry [i=rmm@122.53.87.97] has quit [Read error: 110 (Connection timed out)] 00:20:28 chandler: Reading over R5RS, I think I can change your mind. :-) I'm surprised others have not tried to do so. 00:22:55 jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has joined #scheme 00:23:31 *jcowan* unvanishes, whonking and ittying 00:23:44 It's a good day to be a Scheme weenie. 00:23:46 *offby1* beams generously 00:23:54 see? I'm reformed. 00:24:01 jcowan: Why? 00:24:03 *jcowan* is glad to see it. 00:24:19 Because this is the day I shrink the size of my T1 proposal 00:24:34 And there was much rejoibing. 00:24:40 Hahahaha. 00:24:45 *arcfide* shakes his head. 00:25:20 Then I have to do the work on optionality in R5RS. 00:25:25 s/optionality/implicit & 00:27:46 arcfide: And what do you mean, then, by shaking your head? 00:28:10 I just find it very entertaining to see all this discussion. 00:28:17 I have lost the race to keep up with it. 00:28:52 Although I have received some interesting private correspondence regarding strings. 00:29:03 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit ["leaving"] 00:31:37 Can you summarize it? 00:33:15 Unicode is stupid because it makes life harder than current technology warrants, and making character specific functions harder to implement doesn't make sense despite the utility of string level operations. 00:34:20 Adamant [n=Adamant@unaffiliated/adamant] has joined #scheme 00:34:28 Life is hard, I'll agree to that. But not because of Unicode. 00:34:36 anybody using scheme on a mac? 00:34:39 "Writing systems are hard, let's go shopping and just do numbers." 00:34:49 sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has joined #scheme 00:34:58 lighterthanair: I used to, before I drowned my Mac in a pool of unintentional Mac poison. 00:35:24 jcowan: Perhaps I should clarify. 00:35:32 -!- synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has quit [Remote closed the connection] 00:35:41 -!- metasyntax [n=taylor@pool-71-127-125-129.aubnin.fios.verizon.net] has quit ["Nichts mehr."] 00:36:04 jcowan: Change Unicode is stupid to: why aren't we all just using 64-bit characters and external compression libraries? 00:36:27 synx [i=synx@gateway/gpg-tor/key-0xA71B0C6A] has joined #scheme 00:38:06 shame. 00:38:13 my condolences. 00:38:40 lighterthanair: It's okay, I managed to pick up a Thinkpad and put Slackware on it. Works quite well. 00:39:00 i'm so sorry to hear that. 00:40:09 lighterthanair: Did you have a question about Scheme on Mac? 00:40:33 -!- tltstc [n=tltstc@cpe-76-168-78-251.socal.res.rr.com] has quit [] 00:40:35 looking for a scheme or lisp app for a mac powerpc. 00:40:49 not the intel chip. 00:41:45 lighterthanair: Are you looking for an actual application or just a Scheme implementation? 00:42:02 what's the difference? 00:42:23 -!- pfo [n=pfo@chello084114049188.14.vie.surfer.at] has quit [Read error: 60 (Operation timed out)] 00:42:24 i want to learn scheme. 00:42:25 lighterthanair: One would be like a text editor written in Scheme, and the other would be like a Scheme compiler. 00:42:36 lighterthanair: Then you probably want a Scheme implementation. 00:42:39 okay, it sounds like i'm looking for a compiler. 00:42:53 We really don't need more than 21 bits worth of characters, until we join the Galactic Empire. In which case only the (expensive) FTL gateways will need to use EmpireCode, not the solar Internet. 00:43:16 lighterthanair: Then there are a number of options. 00:43:51 Of course, if they *conquer* us, it may be a different story. 00:44:15 Writing systems, unlike IP addresses, aren't growing even linearly, never mind exponentially. 00:44:17 lighterthanair: You can use Petite Chez Scheme (http://www.scheme.com), DrScheme/mzscheme/PLT (http://www.plt-scheme.org), MIT Scheme (http://www.gnu.org/software/mit-scheme/), and many others. 00:44:41 mit scheme doesn't seem to have a powerpc version, unless i missed something. 00:44:55 lighterthanair: I believe you can compile it for the PPC using the C Back End. 00:45:07 they said they took out that option. 00:45:10 i forget why. 00:45:10 That may require more knowledge about compiling MIT Scheme than you care about. 00:45:17 The C Back End? 00:45:19 It's there. 00:45:29 Recently added (back?), actually. 00:45:30 not according to their website. 00:45:42 There may not be a precompiled PPC version, though. 00:46:14 lighterthanair: They have their "Portable C" option. 00:46:21 how much knowledge would it require? are we talking 101 level or, like 409? 00:46:36 lighterthanair: How much about compiling unix programs do you know? 00:46:41 jack. 00:46:43 0. 00:46:46 nada. 00:46:47 zip. 00:46:56 lighterthanair: Does ./configure; make; make install mean anything to you? 00:47:20 pfo [n=pfo@chello084114049188.14.vie.surfer.at] has joined #scheme 00:47:20 i followed the instructions once for ruby. thank goodness the person wrote out each command, step by step, and wrote out what the result should be. 00:47:27 lighterthanair: If not, then you should probably consider one of the other implementations until you're a little more experienced with that. 00:47:30 i do play in the terminal, but ... 00:47:58 okay. are there any differences between chez and plt that make one better than the other? 00:48:09 lighterthanair: Basically, it consists of taking a runtime code (precompiled) and compiling the "microcode". You can then install as you see fit. 00:48:19 lighterthanair: Let's not get into that. :-) 00:48:40 okay, which version do you recommend, if any? 00:48:51 between the different options. 00:49:00 lighterthanair: If you install SWL with Petite Chez, you'll have a GUI editor and REPL, but DrScheme is well loved by some who first learned Scheme. 00:49:23 lighterthanair: I'm one of the only (the only?) guys in here who uses Chez as his daily system. Guess which one I use and recommend? 00:49:35 lighterthanair: It doesn't matter too much when you are just learning. 00:49:43 okay. 00:49:58 lighterthanair: Just pick one and stick to the basic language features until you feel more comfortable. 00:50:04 ah. 00:50:11 Then you can start learning how the different implementations work, and can pick the one you like. 00:50:17 okay. 00:50:39 Chez and PLT are both used extensively in education. 00:51:02 -!- dysinger [n=dysinger@adsl-99-181-31-201.dsl.pltn13.sbcglobal.net] has quit [Success] 00:51:26 Of course, there are about five to ten other systems that I haven't mentioned that people would recommend if they weren't asleep. 00:51:48 lighterthanair: Both PLT and Chez have complete documentation. 00:52:05 good. 00:52:12 i think i'm going to need that. 00:52:29 asleep on a friday night? i hope you mean drunk. 00:52:35 You might also play with Chicken, Gambit (C based compilers), and Scheme48 (a fan favorite around here). 00:52:41 lighterthanair, MIT Scheme worked perfectly well on Mac OS X/PowerPC when I last tried it, using the C back end. 00:53:17 lighterthanair: If Riastradh is willing to help, he could probably walk you through the MIT Scheme installation without trouble. :-) 00:53:17 thanks, riastradh, when i geek up a couple of levels, i'll look into installing it. 00:53:21 really? 00:53:34 not now, though, i need to install leopard soon. 00:53:40 lighterthanair: It's really not hard, but if you've done almost no compilation before, you may not like it. 00:53:41 As arcfide said, it is merely a matter of `./configure; make; make install'. 00:53:50 If you need it in a little more detail: 00:54:02 yeah. but if anything goes wonky, i don't know how to address it. 00:54:18 *arcfide* points at the MIT Scheme resident wizard => Riastradh. 00:54:31 Fetch the tarball, say mit-scheme-c-20090107.tar.gz. Run `gunzip -c < mit-scheme-c-20090107.tar.gz | tar xf -', and then `cd mit-scheme-20090107/src' and `./configure; make; sudo make install'. 00:54:44 *lighterthanair* copying 00:54:58 ...oops. 00:55:01 Hang on. 00:55:02 That's not right. 00:55:03 *arcfide* chuckles. 00:55:04 I forgot. 00:55:06 that's okay. i'll .. 00:55:09 delete it. 00:55:13 Riastradh: Getting rusty there. 00:55:14 Anyway, you just follow the instructions at . 00:55:34 this is for a powerpc mac 00:55:38 Yes? 00:55:55 lighterthanair: If I had to suggest my two personal favorite Schemes, it would be MIT Scheme and Chez Scheme. 00:56:07 from the site you gave me, "When built this way, the system runs slower than when it is built using the native-code compiler. For this reason, you will usually want to use native-code binaries when running on a 32-bit Intel architecture machine." 00:56:10 *arcfide* pokes chandler. 00:56:26 lighterthanair: That's a non-issue for you. 00:56:27 lighterthanair, right. But you are not on a 32-bit Intel architecture machine. Hence you want the portable C version. 00:56:43 yes, arcfide, i wanted to stick with mit because i was going to use their scip lectures. 00:56:47 or is that sicp? 00:57:15 SICP. 00:57:28 I hope you have a copy of the book? It's a great read. 00:57:34 ah, okay, Riastradh. i saw them mention intel and thought oh no. 00:57:40 the book is online. 00:57:45 and i'm on a budget. 00:58:21 brb 01:01:37 back 01:01:55 and thanks very much for the info and the site. 01:03:06 Riastradh: Do your objections to SRFI 0, expressed back in 2004 on the srfi-55@ list, still hold? 01:03:18 I agree that SRFI 0 is a hack, but sometimes people need a hack. 01:04:09 jcowan: I've been thinking on that one, and I have to say that I don't really like SRFI-0 either in most cases. I'm not sure I think it's better than using separate files for implementation specific code. 01:04:38 arcfide, to summarize my earlier discussion of CML and libev: libev knows a lot about how to deal with the operating system's notion of I/O, and would be a useful implementation for an event loop to run on each processor; CML is an abstraction for programmers to use for the processes in a program that deal with multiplexed event sources. 01:05:49 arcfide: I'm not sure what you mean by my first issue. 01:06:05 jcowan, well, that was a thoroughly fruitless discussion. Can you summarize what my views were? 01:06:18 chandler: (let-syntax ([syntax-rules ...]) (let-syntax ([blah (syntax-rules ...)]) ...)). 01:06:22 -!- sepult [n=user@xdsl-87-78-27-74.netcologne.de] has quit [Read error: 60 (Operation timed out)] 01:06:53 arcfide: OK. So I'm actually not sure what you mean by my second issue. 01:06:58 But let's deal with the first. 01:07:28 chandler: (syntax-rules () [(_ ...) (begin (define-syntax syntax-rules ...) (define-syntax blah (syntax-rules ...)))]). 01:07:44 Summary: 1) Felix is arrogant; 2) Felix doesn't listen; 3) If it doesn't work in Scheme 48, epic fail! 01:07:50 chandler: Am I correct in your assesment of the first? 01:08:30 SRFI 0 is the same as C preprocessor conditionals; they suck, but they can save you if used judiciously. 01:08:42 jcowan: Many people love to host their systems. I am personally not fond of Aubrey Jaffer's approach to things. I don't know that making such conclusions benefits us very much though. 01:09:00 sepult [n=user@xdsl-87-78-30-131.netcologne.de] has joined #scheme 01:09:16 Dark-Star [i=Darkstar@p57B57ED7.dip.t-dialin.net] has joined #scheme 01:09:17 s/to host/to advertise and argue from/ 01:09:19 arcfide: I'm not quite sure what you meant by that. I'll rephrase it: I think per the R5RS, bindings in phase 0 do not shadow bindings or affect literals in phase 1 (of which there are two examples in the R5RS, `syntax-rules' and `...') 01:09:36 jcowan, you missed `4) Riastradh was a trifle too emphatic about the discussion'. 01:09:48 arcfide: If you can point to justification in the R5RS for another behavior, I'd like to hear it. I've been unable to find it. 01:09:48 -!- sepult [n=user@xdsl-87-78-30-131.netcologne.de] has quit [Remote closed the connection] 01:10:03 arcfide: Either way, some common implementations will be in the wrong here :-) 01:10:25 chandler: Yes, I have such, but I want to address your rephrasing. Let me construct the right response once I have determined whether R5RS addresses your specific issue. 01:10:29 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit [Read error: 110 (Connection timed out)] 01:10:37 why does (foldl (lambda (x y) (and x y)) #t my-list) work (on plt-scheme) but (foldl and #t my-list) doesn't? 01:10:46 jcowan, but, in any case, most times I use cpp conditionals, I regret it later on, and seek better ways to go about doing it. 01:11:03 sepult [n=user@xdsl-87-78-30-131.netcologne.de] has joined #scheme 01:11:19 Dark-Star, AND is a name for a macro, not for a procedure. It does not have independent meaning outside the first element of a list. 01:11:21 Dark-Star: `and' is not a function. It is a macro. 01:11:33 Dark-Star, or rather, AND is a name for a macro, not for a variable (whose value is a procedure). 01:12:04 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit ["Lost terminal"] 01:12:34 okay, makes sense. it's annoying, though ;-) 01:12:49 jcowan, moreover, Scheme ought to have a more principled system of controlling bindings than C. Cpp conditionals are mostly about testing whether this or that variable (function, macro, &c.) is defined. 01:12:54 I think it did work once, though 01:13:13 Maybe in lazy Scheme, Dark-Star. 01:14:51 -!- derdon [n=derdon@p4FC8D63C.dip.t-dialin.net] has left #scheme 01:15:46 chandler: Okay, yes, it's what I thought. 01:16:06 chandler: In my interpretation the definition of lexical scoping in R5RS *requires* the ability to shadow. 01:16:09 -!- Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has quit [Read error: 54 (Connection reset by peer)] 01:16:22 I see a few relevant sections here. 01:16:32 Poeir [n=Poeir@c-98-222-133-165.hsd1.il.comcast.net] has joined #scheme 01:17:47 Sections 3.1 and 4.3 seem the most helpful here. 01:18:40 My first observation is that the concept of phases was introduced explicitly in R6RS, and is not a concept explicitly detailed in R5RS, or at least, I can find no occurance of the term. 01:18:44 Maybe I missed something. 01:19:05 Phases are irrelevant in the R5RS. 01:19:09 The R5RS has a concept of bindings, which can either be syntax transformers or values. 01:19:11 Riastradh: Exactly. 01:20:26 *jcowan* thinks evilly of a SRFI 7 front-end to Chicken. 01:21:21 I doubt whether there is any useful content in that discussion, jcowan, either from me or from anyone else. 01:21:36 chandler: In section 4.3, you see the following, "A syntactic keyword of a macro may shadow variable bindings," and vice versa. 01:22:14 I think ncurses sucks. 01:22:43 chandler: I read the R5RS as allowing only one binding to any given identifier at any point in the program. 01:23:01 This is true whether the code is being expanded or evaluated. 01:23:12 Right. But how does that apply to the right-hand side of let-syntax? I can't refer to any bindings there, except inside the template. 01:23:33 I'm asserting that `syntax-rules' is not a reference to a binding. 01:23:35 chandler, yes you can: you can refer to the binding of the name SYNTAX-RULES. 01:23:39 chandler: But it is. 01:24:00 chandler: Every bound identifier is bound either to a syntax transformer or to a value. 01:24:09 The R5RS doesn't say much about how that happens, as far as I know, and thereby allows both Scheme48's approach and MIT Scheme's approach. 01:24:41 In Scheme48, the right-hand side of each DEFINE-SYNTAX is evaluated one phase up, and SYNTAX-RULES is defined to be a macro that expands to an expression of a procedure; thus, the value of a SYNTAX-RULES expression is a procedure. 01:24:50 chandler: Additionally, R5RS defines lexical scoping in terms of program regions, and uses the term "program text." 01:24:52 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 01:25:13 In MIT Scheme, the right-hand side of each DEFINE-SYNTAX is expanded just like any other form, and SYNTAX-RULES is a macro that expands not into an expression at all but into a transformer keyword. 01:25:24 chandler: R5RS is even explicit about the change of environment that occurs during expansion time for the body of a let-syntax form. 01:25:39 It is keywords such as ER-MACRO-TRANSFORMER and SC-MACRO-TRANSFORMER that actually do any evaluation (at one phase up, if MIT Scheme had the concept of phases). 01:25:52 arcfide: I'm asserting that since `syntax-rules' is, per the R5RS, the *only* thing that can appear on the right side of a `let-syntax' form, it is more like a literal than a bound value. But, the R5RS authors did not extend hygiene to this literal. 01:26:02 -!- Guest53038 [n=moe@p54A0C821.dip.t-dialin.net] has left #scheme 01:26:18 chandler: They identified them as syntactic keywords, not as literals. That makes a difference. 01:27:09 Right. As such, I believe it falls into a no-man's-land, where a literal `syntax-rules' is expected - even if, in phase 0, it has been shadowed. 01:27:23 *jcowan* vaguely remembers that there are procedure versions of AND and OR (without lazy evaluation, of course) in some systems. 01:27:25 chandler: Don't mistake the use of phasing here. 01:27:36 Read the semantics for 'let-syntax'. 01:27:58 Riastradh: I agree, there isn't, but I was led to read the SRFI 0 discussion as a result. 01:28:31 At any rate, I haven't yet decided whether to propose SRFI 55 for Thing One; 01:28:56 chandler, I don't think the R5RS or its authors had any particular intent about how the name SYNTAX-RULES was to be interpreted. A more important discussion is of which semantics is preferable (MIT Scheme's or Scheme48's). 01:29:09 I think that some mechanism for "load the file(s), if findable, that implement module foo" is a Good Thing. 01:29:09 "The is expanded ..."; chandler, in other words, the body of the first let-syntax is expanded in a syntactic environment containing the new bindings to any keywords that were bound in the clauses of the 'let-syntax' form. 01:29:43 Riastradh: I'm not trying to argue from intent; I'm trying to argue from what is. :-) 01:30:08 chandler: Additionally, 'let-syntax' is explicitly considered a binding form, and it binds the identifiers in its clauses. 01:30:24 jcowan, I have no more hope for the Scheme report process, but I think that any half-arsed moduloid system will get in the way of making a good one. That's similar to why I didn't want the R6RS's RAISE-CONTINUABLE. 01:31:17 According to the R5RS' definition of lexical scoping, any occurance of the identifiers bound by the 'let-syntax' form inside the body forms must refer to the new bindings, not any other bindings. 01:32:38 lighterthanair_ [n=lightert@63.118.151.12] has joined #scheme 01:32:50 -!- lighterthanair [n=lightert@63.118.151.12] has quit [Read error: 104 (Connection reset by peer)] 01:33:22 chandler: Note here that there is simply no concept of phasing taking place when speaking in terms of the R5RS semantics. 01:33:42 With low-level macros, you need a fully arsed system, but I don't see that a half-arsed one damages Thing One very much, since it only has syntax-rules. 01:34:15 I *really* don't want to see a module system standardize for Scheme that fails to control top-level environments. 01:34:29 What do you mean by "control"? 01:34:33 `standardized' 01:35:01 I don't want to see a (REQUIRE-EXTENSION FOO) that has the effect of making all the top-level bindings of foo.scm wherever the REQUIRE-EXTENSION occurred. 01:35:01 -!- lighterthanair_ [n=lightert@63.118.151.12] has quit [Client Quit] 01:35:06 arcfide: Perhaps I'm being purposefully obtuse here, but I'm still stuck on whether it *is* a reference to a binding. I can't find any references to it as such; there's no description of what it's bound to, or returns. 01:35:18 chandler: Section 3.1 details the ideas behind lexical scoping in R5RS and I believe enforces a single binding per binding per identifier model. 01:35:38 chandler: Reference to what? syntax-rules? 01:35:45 (Single binding per binding per identifier?) 01:36:14 So you object to (import foo) at the top (interactive) level? 01:37:00 REPLs may have many operations that make zero sense to standardize. 01:37:19 That was your point #6. 01:37:25 arcfide: Yes, to `syntax-rules' being bound. The use of `syntax-rules' is described as being a part of the `pattern language'. 01:37:49 davazp [n=user@79.153.148.56] has joined #scheme 01:37:52 Whether syntax-rules is bound seems to me an implementation question. 01:38:11 arcfide: clearly not every identifier mentioned in the R5RS is bound: `else', for instance, is not. 01:38:27 From a pure R5RS standpoint, it is an uninterpreted identifier which serves as part of the define-syntax, let-syntax, and letrec-syntax macros, just as else serves as part of the syntax of the cond macro. 01:38:35 What he said. 01:38:35 No, chandler, but every name has at most one meaning. You can't use COND's meaning of ELSE if you have bound ELSE to your own meaning. 01:38:47 chandler: Okay, let's assume for a moment that syntax rules is a literal for every macro that expects a transformer. 01:38:57 (at most one meaning in any particular lexical environment, that is) 01:39:43 arcfide: Aha! Now, have a look at the beginning of 4.2. 01:40:15 Riastradh: I believe that is untrue of ELSE. 01:40:31 chandler: The comparison of literals is specific in the syntax-rules definition, I believe it is a bound-identifier=?, or, if bound, they must be bound to the same "thing". When you bind syntax-rules, you are in effect "renaming" that identifier for the scope of that let-syntax form, meaning that any macro defined elsewhere to use the syntax-rules "literal" will not identify "syntax-rules" as said literal. 01:40:37 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 01:40:40 rudybot___: eval (let ((else #f)) (cond (else 'riastradh-wins) (#t 'jcowan-wins))) 01:40:41 Riastradh: your sandbox is ready 01:40:41 Riastradh: ; Value: jcowan-wins 01:40:49 ...um, I got that backwards. 01:40:53 Heh! 01:41:34 The behavior of `else' is defined by - and here I'm perhaps incorrecly asserting that it is defined *only* by - the language at the beginning of 4.2. 01:41:52 rudybot___: eval (let ((else #f)) (cond (#f 1) (else 2))) 01:41:52 jcowan: your sandbox is ready 01:42:02 ) 01:42:04 argh 01:42:08 ebzzry [i=rmm@122.53.94.172] has joined #scheme 01:42:13 -!- ebzzry [i=rmm@122.53.94.172] has quit [Read error: 104 (Connection reset by peer)] 01:42:29 rudybot___: eval (let ((else #f)) (cond (else 'riastradh-loses))) 01:42:40 lol 01:42:41 Looks like nothing ishappening. 01:42:47 See? I don't lose. 01:43:11 rudybot___: eval (list (let ((else #f)) (cond (else 'riastradh-loses)))) 01:43:11 Riastradh: ; Value: (#) 01:43:13 chandler: We can go by the macro definition given in Chapter 7. 01:43:48 arcfide, isn't concurrency more interesting than these fiddly details of the R5RS? 01:44:05 Riastradh: Yes. I just couldn't resist when chandler baited me. 01:44:09 Not for those who have chosen to undertake the burden of becoming standardizers, no. 01:44:32 arcfide: This is mostly pointless, yes. 01:44:39 I believe there is an XKCD comic on people being *WRONG* on the Internet! 01:45:23 chandler: Do you see now, though, why this should break? PLT and Scheme48 I believe change the semantics, but I don't know how they rationalize it in terms of R5RS. Of course, it is not necessary for them to do so. 01:45:46 arcfide: It does not hardly matter when `syntax-rules' and `...' are the only keywords in question, and the R6RS did define what happens here. 01:46:07 chandler: Well, it matters for cases like you created. 01:46:08 arcfide: Scheme48 works perfectly here! 01:46:26 chandler: You said that it doesn't error out in your groveler code! 01:46:30 chandler: It should error out. 01:46:42 No, it shouldn't - should it? 01:46:48 Yes, it should. 01:46:55 I didn't understand the point of that code. It doesn't introduce any new identifiers -- all of them are bound someplace. 01:47:01 Or at least, I am arguing that R5RS semantics dictates that it should. 01:47:17 jcowan: Which example? 01:47:49 chandler: When you redefine syntax-rules in your groveler macro, hygiene requires that all the "syntax-rules" identifiers in the scope of that definition be renamed. 01:47:59 The FizzBuzz example 01:48:31 chandler: lexical scoping puts that second definition in the scope of the first according to R5RS (I believe). 01:48:36 arcfide: Eh heh! But what about in (quote syntax-rules) ? 01:48:47 Where? 01:48:52 chandler: Can you show me the code again? 01:48:55 As an example. 01:49:22 It's not in the code, but I'm pointing out that not all references to the identifier are renamed. 01:49:26 The identifier is still renamed, it's just that during expansion quote doesn't care how the underlying references or wraps look. 01:49:37 Only those which could actually be a reference to the binding. 01:49:48 Semantically, it doesn't matter, because quote will discard the wraps and give you only the raw symbol. 01:50:17 And since (in Scheme48) the reference on the right-hand side *can't* refer to the binding, the wraps are discarded there as well. I think. 01:50:30 Huh? 01:50:57 Why shouldn't the first define syntax effect the syntactic environment of further macro definitions? 01:51:11 s/effect/affect/ 01:51:27 The use of `syntax-rules' on the right side of a `let-syntax' can, in Scheme48, no more refer to a surrounding phase-0 binding than a quoted use can. 01:51:46 Why do you keep talking about phase-0? 01:51:56 Because that's how Scheme48's semantics works, arcfide. 01:52:02 Because it *is* a matter of phasing. 01:52:32 So is it the case that internal define-syntax definitions are as if specified by letrec*-syntax? 01:52:35 In my understanding of it, the binding created by let-syntax *should* affect the phase-1, which is where macro expansion happens. 01:52:39 In Scheme48 *and* in PLT. Chez is the odd-man-out here for mushing all the phases together into one big happy environment. 01:53:04 jcowan: There are no internal define-syntax forms in R5RS. 01:53:05 We already knew that Chez's phase semantics is a bug, chandler. 01:53:21 jcowan: In the R6RS? Yes, definitionally I think. 01:53:51 Yes, the R6RS. I had in fact forgotten that the R5RS doesn't support them. 01:54:15 In any event, I'm too tired to keep at this, and it's really rather boring. 01:54:32 Okay. 01:54:35 On to concurrency. 01:54:36 *jcowan* urges that we move on to something more edifying. 01:54:41 Concurrency is good. 01:54:51 arcfide: What's more interesting is that even *without* the syntactic rebinding of `syntax-rules', Larceny chokes on that code. 01:54:55 jcowan, internal syntax definitions should be specified as in , and in particular either SCAN-R6RS-BODY or SCAN-R5RS-BODY (the difference between which two procedures being whether mixed definition/expression sequences are permitted). 01:55:09 http://paste.lisp.org/display/86941 for reference. 01:56:30 If anyone turns *that* in as his FizzBuzz code, *hire him.* 01:56:43 Riastradh: I'm going to try to play with your code tomorrow. 01:56:59 Riastradh: I think I see how you are approaching the IO-rendezvous stuff, and it makes sense. 01:57:08 jcowan: Or run, screaming!! 01:58:00 I'll start looking at how to implement your CML stuff tomorrow, and hopefully I'll have few questions. On the other hand, you may as well email me pointers if you have any that are not in the README. 01:58:09 *jcowan* is glad to say he has never interviewed a non-Fizzbuzzer candidate 01:59:03 jcowan: This originally started as a "what not to do on an interview programming test" example. 01:59:44 I guess it depends on where you are interviewing. 01:59:56 -!- arcfide [n=arcfide@adsl-99-50-231-131.dsl.bltnin.sbcglobal.net] has left #scheme 01:59:59 Obscure language? Check. Odd style? Check. Hairy recursive macros doing hygienic inseretion? Check. Mutation via `letrec' + `call/cc'? Check. 02:00:17 I suppose :-) 02:00:29 At Google, f'rinstance ... 02:00:52 I blew away one of my interviewers by answering his question in six words. 02:01:07 (I cheated, of course; I had read the answer somewhere and wasn't inventing it from first principles.) 02:01:58 Was it one of these answers? http://www.codeslate.com/2007/01/you-dont-bury-survivors.html 02:02:20 No. 02:02:51 "Sort this way (gesture across), then that way (gesture down)." That should be enough to reconstruct what the question was, certainly! 02:03:15 Oh. 02:03:42 *eli* questions the last occurrence of "happy" in the log 02:04:41 *chandler* vanishes for the evening 02:04:52 I think that's "happy" in the sense of "happy because unaware that there's anything to be concerned about". 02:05:10 Yeah, that sounds right. 02:05:33 There was some comedy show in israel a while ago, with the motto of "dumb but optimistic". 02:05:56 http://catb.org/jargon/html/H/happily.html 02:06:14 Sounds like the Top Gear motto: "ambitious, but rubbish". 02:16:45 So, what about them Concurrents? 02:17:34 *Fare* finds unforeseen problems when trying to cleanly build a 1500 file Lisp system. 02:18:26 *Fare* hopes that a PLT .zo requires less mucking around to load than a CL fasl. 02:19:09 Loading .zo files happens automatically, doesn't it? 02:19:20 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 02:19:26 And has exactly the effects you asked for? 02:20:36 As far as I know, anyway, it does the right thing, much better than Common Lisp does. 02:20:45 can't be worse. 02:21:02 That's a terrifying thought. 02:21:02 Common Lisp has to much open air sausage 02:21:48 *Fare* laughs at CL "fast" loading files. 02:21:52 Heheheh. 02:22:48 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [] 02:22:58 it's sure not fast when you have to do it 47284 times. Takes me about 88 minutes. 02:23:14 that's about 9 files per second average. 02:23:20 *jcowan* wonders if the Lisp (broad sense) community will be the last refuge of programmers who *understand* their programs. 02:23:40 I'd rather my program understand me. Sigh. 02:23:54 wasn't that the original promise of Lisp? 02:24:15 Sorta. 02:24:34 jcowan, anyway, the concurrent subject concurrently discussed by me and arcfide was , which I wrote yesterday. 02:25:10 This is not so much about concurrency as about communicating between concurrent processes, however. 02:25:35 are you using threads or fork? 02:25:48 or green threads, or what? 02:26:11 Communicating between concurrent shared-memory processes, to be more precise. That code is agnostic to the mechanism of concurrency, however. 02:27:58 *jcowan* tries to find the high-level explanation of CML, fails. 02:28:05 dmoerner [n=dmr@69.26.214.2] has joined #scheme 02:28:15 Here's a summary as brief as I can make it on the fly: 02:29:29 An event is something that happens once. For example, if I typed `t' at my terminal, my action if typing it would be an event. On the other end of the terminal abstraction, to the program reading the terminal, at any time, there may be the event of the next character to be typed at the terminal, for which event the program will often wait. 02:30:53 Emphatically, the objects that CML deals with are not events, although events are involved. A rendezvous is an object that at any given time is in one of two states: enabled, with some value associated with it; or blocked. Given a rendezvous, a program can wait until the event of the rendezvous' becoming enabled. In this way, a rendezvous is a sort of abstract description of a set of related events. 02:31:34 it's a stream of futures? 02:32:03 For example, the program sitting behind a terminal might have a rendezvous that is enabled when there is input pending that I have sent but that the program has not read. The program can /synchronize/ this rendezvous, which is to wait for the rendezvous to become enabled (i.e. to wait until there is pending input) and consume the pending input. 02:32:41 Rendezvous can be composed in several ways: given two rendezvous, you can make a third rendezvous that is enabled whenever either of the two is enabled, with the value of whichever of the two is enabled (or the value of an arbitrary one when they are both enabled). 02:32:45 This all sounds very Ada. 02:32:54 But more so. 02:33:17 Given a rendezvous and a procedure, you can make a rendezvous whose value is the value of the procedure applied to the value of the original rendezvous. 02:33:31 (...and which is enabled whenever the original rendezvous is enabled.) 02:33:40 -!- luz [n=davids@189.122.90.116] has quit ["Client exiting"] 02:33:59 so it's futures with user-visible synchronization state? 02:34:02 *jcowan* now understands *why* R6RS-ites want to restrict library bodies to definitions followed by expressions, at least. 02:34:16 jcowan, why? 02:34:35 Because library bodies are *bodies*, the same as non-top-level begin bodies, lambda bodies, etc. And that's the rule for them. 02:34:55 The other view holds that libraries are like top-level begin, a trivial wrapper around what remain top-level forms in essence. 02:35:00 uh? 02:35:33 The construction of rendezvous can be delayed until synchronization; for example, a rendezvous for when a server sends a reply to a particular request, will send the request when you synchronize it and then reduce to the rendezvous of waiting for a message from the server. 02:35:44 *Fare* see "toplevel forms" and dreads the conjured specter of EVAL-WHEN. 02:36:06 No, the issue is the same in a pure interpreter. 02:36:29 By rule (dating from MacLisp days), defines in a top-level begin are not scoped to the begin, but have global scope. 02:37:41 I thought they did that because they wanted to allow to compile the definitions together without having to care for the capture of continuations as forms have uncontrollable side-effects (with dynamic redefinition) in between definitions. 02:37:49 Finally, when you synchronize on a choice of such rendezvous, so that you have sent requests to two servers and are waiting for a reply from either one of them, whichever one is slower to reply may wish to know that you have selected the other one; when this happens, if you ask for it, CML can send a negative acknowledgement to the slower server. 02:38:03 Fare, no, that happens whether or not you allow expressions or definitions to be intermixed. 02:38:13 You can always turn an expression into a definition, after all, by generating a dummy name. 02:38:21 yes 02:38:25 Which is what the semantics of R6RS top-level bodies does. 02:38:39 which is why I think they're trying hard and only end pissing me 02:38:48 and making the language awkward 02:38:50 Riastradh: Thanks. 02:38:57 Quite, Fare. 02:39:24 "RnRS, the Lisp that wanted to be ML" 02:39:26 I have a guess for the real reason why the restriction exists: because it exists in Chez's MODULE form. 02:39:46 AFAIK, the reason for the top-level-begin rule is to make it possible for top-level macro calls to expand to more than a single top-level form. 02:40:36 So I was thinking of trying to make a text based game, but the parsing is just flummoxing me. 02:40:36 who'd care if they hadn't crippled non-toplevel forms. 02:40:56 it's like making a problem, then creating more problems to work around it. 02:41:05 Crippled how? 02:41:21 I'd like to have "north" be a procedure, that moves the player to whatever room is marked as northwards 02:41:36 But "go north" should also call that procedure 02:42:04 so (go north) would take a procedure as an argument, make sure it's an exit, then call it. 02:42:11 but... 02:42:17 "say hello how are you" 02:42:27 "Error: undefined symbol hello" 02:42:35 jcowan, different scoping rules. 02:42:45 I'm sorry, but you are too obscure for me. 02:42:55 quoting symbols and enclosing strings in "" is something I'm not sure players would grok all that well 02:42:58 incapacity to affect the rest of the current scope. 02:43:29 so... how to handle that? Should it be required they go {say "hello how are you"} 02:43:50 -!- Fare [n=Fare@ita4fw1.itasoftware.com] has quit ["Leaving"] 02:43:55 Write your own reader, synx. 02:44:20 but what should my reader do, is what I'm trying to figure out. 02:44:25 *jcowan* nods. 02:45:44 Without quotation marks I'm not sure there's any consistent way to do it. Otherwise you have to have an un-quotation syntax which seems tricky... 02:45:46 say hello how are you ,(name (first (send here list-people)))) 02:46:07 but then "go north" would result in "North is a symbol not an exit procedure." 02:46:12 you'd have to say go ,north 02:46:29 Figure out how to express it in S-expressions, then write a reader which accepts your preferred external syntax and generates those S-expressions. 02:46:41 -!- Nshag [i=user@Mix-Orleans-106-2-250.w193-248.abo.wanadoo.fr] has quit ["Quitte"] 02:47:05 easy to express it in S-expressions, but getting the reader to generate them I'm struggling with. 02:47:16 For an interactive user interface, synx, you may want to make the behaviour of the parser dependent on the command. 02:47:20 E.g., in Scheme48, if you type 02:47:21 ,load foo.scm 02:47:22 (say "hello how are you") and (go north) and (north) are the 3 s-exps I've considered so far 02:47:34 it gets read as (LOAD "foo.scm"). But if you type 02:47:37 ,run (+ 1 2) 02:47:41 it gets read as (RUN (+ 1 2)). 02:47:49 hmm... 02:48:28 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 02:48:41 So with load and run, load would be a special syntax that stringifies its arguments? 02:49:17 The parser looks at its entry for LOAD in some table and says, `Aha! I am supposed to read one argument, a pathname.' 02:50:44 so I guess you'd specify how the arguments parse, when creating a new command? 02:51:17 Right. 02:52:03 could work I guess... trying to think how I'd write a parser that had a list of commands, with argument parsing rules... 02:53:32 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 02:55:19 Fare [n=Fare@ita4fw1.itasoftware.com] has joined #scheme 03:00:34 -!- jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has quit ["Leaving"] 03:01:20 Adamant [n=Adamant@unaffiliated/adamant] has joined #scheme 03:09:01 -!- tjafk1 [n=timj@e176204227.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 03:09:26 tjafk1 [n=timj@e176205170.adsl.alicedsl.de] has joined #scheme 03:10:39 -!- Fare [n=Fare@ita4fw1.itasoftware.com] has quit ["Leaving"] 03:13:08 -!- Dark-Star [i=Darkstar@p57B57ED7.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 03:18:41 phax [n=phax@unaffiliated/phax] has joined #scheme 03:22:37 rcy [n=rcy@S01060013104bf489.ok.shawcable.net] has joined #scheme 03:34:25 synx: MUD ? 03:34:38 syntropy_: more like MU 03:34:53 sounds neat 03:35:02 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 54 (Connection reset by peer)] 03:36:20 *eli* rolls his eyes at jcowan 03:38:01 it is pretty spiff syntropy_. I've got a general framework for persistent objects over a sqlite thingy, just need to write a parser for it now really. 03:38:56 synx: neato, i'd be interested in testing it. I often emulate the same approach when trolling people. 03:39:16 "Where do you want to go?" 03:39:22 "Uhh, I dunno." 03:39:25 "Parse error." 03:40:15 eno [n=eno@nslu2-linux/eno] has joined #scheme 03:41:51 The R6RS list has now passed the readability point - in the time that I can finish reading the latest N messages, M>N new messages have been posted. 04:04:34 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 04:11:54 ct2rips [n=ct2rips@92.73.184.88] has joined #scheme 04:15:46 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 04:16:36 chris_bryant [n=chris_br@76.170.255.101] has joined #scheme 04:19:53 The average message rate is nearly fifty per day now. 04:23:10 kniu [n=kniu@ELMUNDO.RES.CMU.EDU] has joined #scheme 04:37:25 -!- nothingHappens [n=nothingh@173-25-176-111.client.mchsi.com] has quit ["Ex-Chat"] 04:39:05 peter_12 [n=peter_12@204.239.250.1] has joined #scheme 04:40:11 -!- chris_bryant [n=chris_br@76.170.255.101] has quit ["Leaving"] 04:42:45 -!- dmoerner [n=dmr@69.26.214.2] has quit ["Leaving"] 04:43:02 dmoerner [n=dmr@69.26.214.2] has joined #scheme 04:50:33 -!- rcy [n=rcy@S01060013104bf489.ok.shawcable.net] has quit [Read error: 54 (Connection reset by peer)] 04:50:49 -!- dmoerner [n=dmr@69.26.214.2] has quit ["Leaving"] 05:01:08 -!- peter_12 [n=peter_12@204.239.250.1] has quit [] 05:14:09 -!- davazp [n=user@79.153.148.56] has quit [Remote closed the connection] 05:14:33 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 05:33:32 patmaddox [n=patmaddo@75.217.252.83] has joined #scheme 05:42:15 patmaddo_ [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has joined #scheme 05:47:24 hello 05:47:25 (first (first (first hand))) 05:47:31 is there a better way to do this? 05:47:34 hand is a list 05:47:41 rudybot___: doc third 05:47:42 *offby1: your r5rs sandbox is ready 05:47:42 *offby1: no docs for a current binding, but provided by: lang/htdp-beginner, scheme/list, scheme, lang/htdp-advanced, mzlib/list, lang/htdp-intermediate, lang/htdp-beginner-abbr, lazy, srfi/1, lang/htdp-intermediate-lambda 05:47:43 i want to get the first character of the first element of a list 05:47:51 offby1: is that for me? 05:47:54 sorta 05:48:01 rudybot___: ghost rudybot 05:48:03 rudybot___: nick rudybot 05:48:03 -!- rudybot___ is now known as rudybot 05:48:08 *whew* 05:48:47 meh 05:48:49 Piratero: if your scheme has srfi support (most do), you can use that library; it provides "second", "third", etc up to ... I dunno 05:49:01 yes, second is available 05:49:06 rudybot: eval (require srfi/1) 05:49:07 *offby1: error: reference to an identifier before its definition: require in module: 'program 05:49:17 rudybot: init scheme 05:49:17 *offby1: your scheme sandbox is ready 05:49:21 rudybot: doc third 05:49:21 *offby1: http://docs.plt-scheme.org/reference/pairs.html#(def._((lib._scheme%2Flist..ss)._third)) 05:49:32 *offby1* gives rudybot a Milk-BoneŽ 05:49:45 thanks 05:49:46 *rudybot* wags his tail 05:49:51 (second '(hello there)) 05:49:58 that returns: there 05:50:01 rudybot: eval (second '(hello there)) 05:50:01 *offby1: ; Value: there 05:50:04 *syntropy_* watching District 9 05:50:05 it does indeed. 05:50:15 syntropy_: in Soviet Union, District 9 watches _you_ 05:50:17 *offby1* slaps thigh 05:50:21 I'm sorry; it had to be said. 05:50:31 -!- patmaddox [n=patmaddo@75.217.252.83] has quit [Read error: 145 (Connection timed out)] 05:57:06 in playing cards, what is the numerical value on the card called? 05:57:15 if the suit is the rank, what is the numerical value called? 05:58:04 -!- MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has quit ["DOWNLOADING LATEST VERSION OF THE INTERNET"] 05:59:32 heh 05:59:40 the numerical value _is_ the rank, and the suit is the suit. 06:09:27 ah 06:09:29 doh 06:10:45 :) 06:10:49 someone lied to you, I suspect 06:11:14 I've written some scheme to handle cards. I _think_ I used vectors, not lists; lemme check .. 06:11:24 i'm using lists 06:11:28 it's for a course... 06:11:52 ah 06:12:00 doesn't much matter, I suspect 06:12:04 yeah 06:12:09 if your hand had 10,000 cards, then it might. 06:19:52 that was a fantastic movie 06:24:57 ? 06:25:00 ah 06:25:02 D9 07:02:41 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 07:07:28 peter_12 [n=peter_12@d75-157-234-75.bchsia.telus.net] has joined #scheme 07:08:35 -!- peter_12 [n=peter_12@d75-157-234-75.bchsia.telus.net] has quit [Client Quit] 07:19:58 ejs [n=eugen@31-9-135-95.pool.ukrtel.net] has joined #scheme 07:24:52 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 07:36:01 bpalmer [n=user@unaffiliated/bpalmer] has joined #scheme 07:40:50 -!- patmaddo_ [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has quit [Read error: 110 (Connection timed out)] 07:52:37 chris_bryant [n=chris_br@cpe-75-84-206-87.socal.res.rr.com] has joined #scheme 08:03:24 -!- ASau [n=user@83.69.240.52] has quit [Connection reset by peer] 08:03:38 z0d [n=z0d@unaffiliated/z0d] has joined #scheme 08:08:44 rcy [n=rcy@S01060013104bf489.ok.shawcable.net] has joined #scheme 08:10:59 hrm! 08:11:13 'Bad number in a comparison: (("" "") a)' 08:11:19 what in the world is ("" "") 08:11:28 a list of empty strings? 08:13:42 oh, nevermind 08:13:46 silly me! 08:19:48 ASau [n=user@83.69.240.52] has joined #scheme 08:20:34 -!- chris_bryant [n=chris_br@cpe-75-84-206-87.socal.res.rr.com] has quit ["Leaving"] 08:21:27 patmaddox [n=patmaddo@180.sub-75-217-143.myvzw.com] has joined #scheme 08:32:00 -!- syntropy_ [n=who@unaffiliated/syntropy] has quit [Read error: 110 (Connection timed out)] 08:41:17 syntropy [n=who@unaffiliated/syntropy] has joined #scheme 08:48:23 danfowler1 [n=Dfowler@ip-66-9-231-206.autorev.intellispace.net] has joined #scheme 08:54:08 -!- syntropy [n=who@unaffiliated/syntropy] has quit [Read error: 104 (Connection reset by peer)] 08:54:13 syntropy_ [n=who@unaffiliated/syntropy] has joined #scheme 08:59:06 -!- Adamant [n=Adamant@unaffiliated/adamant] has quit [Read error: 104 (Connection reset by peer)] 08:59:12 Adamant [n=Adamant@unaffiliated/adamant] has joined #scheme 09:03:19 hrm... 09:03:29 if i have a list of numbers: -1 <= x <= 1 09:03:51 where 1 represents win, 0 tie, -1 lose 09:04:26 would the amount of wins minus the number of wins be the total of losses minus the amount of wins? 09:05:31 can i just do something like: (define ... (if (if (= n 0) 0 (- (win-tie-or-lose (...))) 09:05:32 ve [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 09:05:54 where i just recursively subtract every element together recursively 09:07:28 -!- danfowler [n=Dfowler@ip-66-9-231-201.autorev.intellispace.net] has quit [Read error: 110 (Connection timed out)] 09:16:40 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit [Read error: 60 (Operation timed out)] 09:28:51 -!- patmaddox [n=patmaddo@180.sub-75-217-143.myvzw.com] has quit [Read error: 60 (Operation timed out)] 09:42:53 Piratero: what's the difference between "amount" and "number of"? 09:56:05 i don't know, to me, they're the same 10:03:24 Piratero: alright, to me too. I was confused by your using them like they are different. 10:03:44 yeah 10:03:54 Piratero: then "amount of wins minus the number of wins" equals 0 10:03:58 well, i have to sum up the amount of wins, then subtract them by the number of losses 10:04:11 but if i have say, '(1 -1 0 1) 10:04:21 wouldn't i just: 1 - -1 - 0 - 1 10:06:00 Piratero: if wins are +1 and losses are -1 then your total ``score'' is the sum of all of them right? 10:06:18 the problem says to "minus" the losses from the wins 10:06:29 i guess that would force it to sum (+) them up 10:06:45 Piratero: if the losses are already ``minus one'', then you will ``minus'' them by adding them 10:07:09 cornucopic [n=r00t@202.3.77.134] has joined #scheme 10:07:16 right 10:07:26 so, if i have: 1 - -1 - 0 - 1 10:07:35 it'd really be: 2 - -1 - 0 10:07:42 results in 3 10:07:52 "1 - -1 + 0 - 1" returns 1 10:08:48 Piratero: you just made so many typos I can't judge whether you understand 10:09:06 if the list of wins and losses is (1 -1 0 1) then 10:09:24 hkBst: this expression is in infix, it wouldn't work in stk 10:09:35 the total score is (+ 1 -1 0 1) or 1 + (-1) + 0 + 1 = 1 10:09:49 ok 10:23:45 -!- danfowler1 [n=Dfowler@ip-66-9-231-206.autorev.intellispace.net] has quit [Read error: 104 (Connection reset by peer)] 10:28:10 Edico [n=Edico@unaffiliated/edico] has joined #scheme 10:34:19 -!- cornucopic [n=r00t@202.3.77.134] has quit ["so long.."] 10:34:38 cornucopic [n=r00t@202.3.77.134] has joined #scheme 10:35:51 danfowler [n=Dfowler@ip-66-9-231-206.autorev.intellispace.net] has joined #scheme 10:37:42 npe [n=npe@94-224-251-223.access.telenet.be] has joined #scheme 10:40:49 -!- cornucopic [n=r00t@202.3.77.134] has quit ["so long.."] 10:41:07 cornucopic [n=r00t@202.3.77.134] has joined #scheme 10:49:50 Nshag [i=user@Mix-Orleans-106-4-201.w193-248.abo.wanadoo.fr] has joined #scheme 10:50:09 -!- npe [n=npe@94-224-251-223.access.telenet.be] has quit [] 10:53:34 danfowler1 [n=Dfowler@ip-66-9-231-201.autorev.intellispace.net] has joined #scheme 11:00:30 -!- rcy [n=rcy@S01060013104bf489.ok.shawcable.net] has quit [Read error: 104 (Connection reset by peer)] 11:07:49 -!- danfowler [n=Dfowler@ip-66-9-231-206.autorev.intellispace.net] has quit [Read error: 110 (Connection timed out)] 11:12:17 -!- cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has quit [Read error: 104 (Connection reset by peer)] 11:14:18 cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has joined #scheme 11:19:04 metasyntax [n=taylor@pool-71-127-125-129.aubnin.fios.verizon.net] has joined #scheme 11:31:39 bwat74 [n=bwat@host-90-232-63-5.mobileonline.telia.com] has joined #scheme 11:32:28 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 11:33:09 -!- bwat74 [n=bwat@host-90-232-63-5.mobileonline.telia.com] has quit [Read error: 104 (Connection reset by peer)] 11:35:25 npe [n=npe@94-224-251-223.access.telenet.be] has joined #scheme 11:36:36 bwat74 [n=bwat@host-90-232-71-169.mobileonline.telia.com] has joined #scheme 11:38:05 faux [n=user@1-1-4-21a.gkp.gbg.bostream.se] has joined #scheme 11:52:58 -!- bwat74 [n=bwat@host-90-232-71-169.mobileonline.telia.com] has quit [Remote closed the connection] 11:57:03 syntropy [n=who@unaffiliated/syntropy] has joined #scheme 11:57:18 -!- syntropy_ [n=who@unaffiliated/syntropy] has quit [Read error: 104 (Connection reset by peer)] 12:00:27 -!- faux [n=user@1-1-4-21a.gkp.gbg.bostream.se] has left #scheme 12:06:33 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 12:14:18 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Read error: 104 (Connection reset by peer)] 12:23:46 Edico [n=Edico@unaffiliated/edico] has joined #scheme 12:29:42 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 12:42:04 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit ["Lost terminal"] 12:53:29 -!- Pepe_ [n=ppjet@AMontsouris-152-1-35-147.w82-123.abo.wanadoo.fr] has quit [Read error: 110 (Connection timed out)] 12:54:28 luz [n=davids@189.122.90.116] has joined #scheme 12:58:39 Kaonashi [n=Tanami@CPE-121-220-128-148.sa.bigpond.net.au] has joined #scheme 13:26:34 -!- Kaonashi [n=Tanami@CPE-121-220-128-148.sa.bigpond.net.au] has quit [""codingssss""] 13:32:41 -!- sepult [n=user@xdsl-87-78-30-131.netcologne.de] has quit [Connection timed out] 13:38:20 -!- bombshelter13__ [n=bombshel@206.80.252.37] has quit [Read error: 104 (Connection reset by peer)] 13:43:25 patmaddox [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has joined #scheme 13:56:28 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit [""] 14:03:15 sepult [n=user@xdsl-87-78-100-204.netcologne.de] has joined #scheme 14:12:31 kssreeram [n=kssreera@122.174.135.218] has joined #scheme 14:14:01 -!- emma [n=em@unaffiliated/emma] has quit [Read error: 110 (Connection timed out)] 14:15:10 higepon297 [n=taro@122.135.46.206] has joined #scheme 14:17:21 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 14:19:09 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 14:39:25 incubot: your score is so minus i'm nonplused about it. 14:39:29 so can I basically tell the GP system: these are the allowed moves in bridge. Here's how to compute the score. Now go figure out a strategy? 14:40:21 that reminds me yet again to see if there are open source bridge gamezes... 14:40:49 MrFahrenheit [n=RageOfTh@users-38-235.vinet.ba] has joined #scheme 14:48:35 emma [n=em@unaffiliated/emma] has joined #scheme 14:49:04 sladegen: there aren't. 14:49:06 I've looked. 14:50:57 albacker [n=eni@APuteaux-552-1-94-107.w90-44.abo.wanadoo.fr] has joined #scheme 14:52:47 tyoo bad... 14:53:03 you can look at what I've got 14:53:13 went nowhere but there might be an idea in it 14:54:40 mngbd [n=user@081-003-214-196.yesss.at] has joined #scheme 14:55:12 i had playing rather than programming on my mind ;) 14:58:39 dzhus [n=sphinx@93-81-153-51.broadband.corbina.ru] has joined #scheme 15:22:10 -!- cornucopic [n=r00t@202.3.77.134] has quit ["so long.."] 15:24:33 -!- hiyuh [n=hiyuh@KD124214245222.ppp-bb.dion.ne.jp] has quit ["|_ e /\ \/ i |/| G"] 15:25:13 m811: thanks, nice text :) 15:25:42 Riastrad1 [n=rias@pool-141-154-58-196.bos.east.verizon.net] has joined #scheme 15:26:48 _Pb [n=Pb@75.131.194.186] has joined #scheme 15:30:44 -!- higepon297 [n=taro@122.135.46.206] has quit [Read error: 148 (No route to host)] 15:32:00 daiki [n=daiki@softbank220058035093.bbtec.net] has joined #scheme 15:33:05 cky_ [n=cky@98.105.30.117] has joined #scheme 15:34:08 -!- cky [n=cky@cpe-024-211-255-249.nc.res.rr.com] has quit [Nick collision from services.] 15:36:04 -!- daiki [n=daiki@softbank220058035093.bbtec.net] has quit [Client Quit] 15:37:15 attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has joined #scheme 15:39:34 -!- Riastradh [n=rias@pool-151-203-232-134.bos.east.verizon.net] has quit [Read error: 110 (Connection timed out)] 15:42:44 -!- cky_ [n=cky@98.105.30.117] has quit [Read error: 145 (Connection timed out)] 15:44:37 cky [n=cky@98.105.13.33] has joined #scheme 15:46:04 dmoerner [n=dmr@multilink.greenhill.org] has joined #scheme 15:47:05 -!- rstandy [n=rastandy@net-93-144-246-162.t2.dsl.vodafone.it] has quit [Read error: 104 (Connection reset by peer)] 15:50:24 rstandy [n=rastandy@net-93-144-246-162.t2.dsl.vodafone.it] has joined #scheme 15:50:52 hiyuh [n=hiyuh@KD124214245222.ppp-bb.dion.ne.jp] has joined #scheme 16:02:44 -!- cky [n=cky@98.105.13.33] has quit [Read error: 60 (Operation timed out)] 16:02:45 cky_ [n=cky@h145.104.133.98.ip.windstream.net] has joined #scheme 16:15:42 -!- Riastrad1 is now known as Riastradh 16:15:54 cky [n=cky@166.165.238.17] has joined #scheme 16:21:42 singhv [n=vsingh@CPE0014bf4af6c2-CM000a739caee2.cpe.net.cable.rogers.com] has joined #scheme 16:22:10 cky__ [n=cky@98.132.149.238] has joined #scheme 16:25:46 -!- albacker [n=eni@APuteaux-552-1-94-107.w90-44.abo.wanadoo.fr] has quit [Client Quit] 16:28:45 cky___ [n=cky@h167.149.132.98.ip.windstream.net] has joined #scheme 16:29:10 -!- cky_ [n=cky@h145.104.133.98.ip.windstream.net] has quit [Read error: 110 (Connection timed out)] 16:29:20 -!- cky___ [n=cky@h167.149.132.98.ip.windstream.net] has quit [Client Quit] 16:32:25 -!- cky__ [n=cky@98.132.149.238] has quit [Read error: 145 (Connection timed out)] 16:33:00 -!- cky [n=cky@166.165.238.17] has quit [Nick collision from services.] 16:50:38 -!- _Pb [n=Pb@75.131.194.186] has left #scheme 16:56:38 -!- dzhus [n=sphinx@93-81-153-51.broadband.corbina.ru] has quit [Remote closed the connection] 17:15:06 -!- ejs [n=eugen@31-9-135-95.pool.ukrtel.net] has quit [Read error: 110 (Connection timed out)] 17:17:36 jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has joined #scheme 17:23:56 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 110 (Connection timed out)] 17:26:50 -!- emma [n=em@unaffiliated/emma] has quit ["Leaving"] 17:29:43 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 17:31:15 Guest63853 [n=moe@p54A0E14F.dip.t-dialin.net] has joined #scheme 17:32:23 arcfide [n=arcfide@99.50.231.131] has joined #scheme 17:33:02 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 17:33:45 -!- attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has quit [Read error: 113 (No route to host)] 17:37:31 yome [n=usah@70.48.77.153] has joined #scheme 17:39:05 -!- mngbd [n=user@081-003-214-196.yesss.at] has quit [Read error: 110 (Connection timed out)] 17:41:06 mmc1 [n=mima@cs137104.pp.htv.fi] has joined #scheme 18:01:37 -!- patmaddox [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has quit [Read error: 110 (Connection timed out)] 18:07:14 Phaze [n=PhazeDK@0x5da32b16.cpe.ge-0-1-0-1104.soebnqu1.customer.tele.dk] has joined #scheme 18:07:43 masm [n=masm@bl7-207-47.dsl.telepac.pt] has joined #scheme 18:09:11 -!- sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has quit [] 18:09:33 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 18:10:24 -!- merus [n=merus@128.211.176.50] has quit ["Leaving"] 18:17:19 -!- dmoerner [n=dmr@multilink.greenhill.org] has quit [Read error: 110 (Connection timed out)] 18:25:27 -!- phax [n=phax@unaffiliated/phax] has quit ["Leaving"] 18:31:58 edwardk [n=edwardkm@209-6-103-127.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has joined #scheme 18:33:21 -!- rstandy [n=rastandy@net-93-144-246-162.t2.dsl.vodafone.it] has quit [Read error: 110 (Connection timed out)] 18:36:26 -!- edwardk1 [n=edwardkm@209-6-103-127.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com] has quit [Read error: 60 (Operation timed out)] 18:40:21 merus [n=merus@pal-176-050.itap.purdue.edu] has joined #scheme 18:47:06 ve_ [n=a@94-193-95-252.zone7.bethere.co.uk] has joined #scheme 18:47:41 attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has joined #scheme 18:49:57 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Nick collision from services.] 18:49:58 -!- ve_ is now known as ve 19:02:38 ventonegro [n=alex@189.100.202.233] has joined #scheme 19:06:32 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 19:14:44 dmoerner [n=dmr@multilink.greenhill.org] has joined #scheme 19:22:23 stepnem [n=stepnem@88.103.132.186] has joined #scheme 19:27:34 sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has joined #scheme 19:28:43 -!- REPLeffect [n=REPLeffe@69.54.115.254] has quit [Read error: 113 (No route to host)] 19:29:36 dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 19:33:25 dysinger [n=dysinger@adsl-99-40-53-122.dsl.pltn13.sbcglobal.net] has joined #scheme 19:41:44 tmilford [n=tmilford@76.89.231.7] has joined #scheme 19:42:02 anyone know how i would add a keybinding to drscheme to revert a file? 19:48:46 tmilford: what OS are you on? 19:49:20 if Mac, you might be able to do something through the System Prefs / Keyboard & Mouse / Keyboard Shortcuts menu 19:49:33 emma [n=em@unaffiliated/emma] has joined #scheme 19:50:44 chris_bryant [n=chris_br@cpe-76-170-255-101.socal.res.rr.com] has joined #scheme 19:52:23 -!- ventonegro [n=alex@189.100.202.233] has quit [] 19:56:20 -!- sepult [n=user@xdsl-87-78-100-204.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 19:57:37 tmilford: You mean revert because of external changes to the file? 19:59:03 jonrafkind [n=jon@98.202.86.149] has joined #scheme 19:59:23 patmaddox [n=patmaddo@152.sub-75-217-104.myvzw.com] has joined #scheme 20:02:37 sepult [n=user@xdsl-87-78-100-204.netcologne.de] has joined #scheme 20:05:27 eli: yes 20:05:58 -!- dysinger [n=dysinger@adsl-99-40-53-122.dsl.pltn13.sbcglobal.net] has quit [Read error: 60 (Operation timed out)] 20:06:16 (i like drscheme's debugger, but it doesn't compete with emacs for editing text) 20:06:45 tmilford: In this case when you run the file it should ask you if you want to revert it. There's also a tool somewhere that automatically reverts the file on external changes -- drsync, I think. 20:07:28 thanks. i just realized you were *the* eli :) amazing technical support for a saturday afternoon :) 20:08:08 "the"? 20:08:16 You mean the one on the plt mailing list? 20:08:44 as in, the PLT eli. 20:08:57 Ah, yes, I'm PLT Eli... 20:09:03 -!- jonrafkind [n=jon@98.202.86.149] has quit [Remote closed the connection] 20:09:14 And saturdays are as good for hacking as any other time. 20:10:03 agreed. 20:13:24 jonrafkind [n=jon@98.202.86.149] has joined #scheme 20:13:42 Wow! It's *the* eli. 20:13:58 haesbaer1 [n=haesbaer@c925a8c5.virtua.com.br] has joined #scheme 20:14:41 *eli* notes that a chandler has spoken 20:17:10 Dark-Star [i=Darkstar@p57B55266.dip.t-dialin.net] has joined #scheme 20:18:38 *jcowan* is the jcowan of #scheme 20:18:51 chandler: I feel sorry for you; you really took a little heat for calling that macro trick unhygienic. 20:18:52 :-) 20:19:07 OT: On Mac OS X, is the 64-bit memory model LP64 (like Linux) or LLP64 (like Win64)? 20:20:22 arcfide: I managed to summon Aziz, which surprised me :-) 20:20:33 jcowan: It's LP64. 20:21:33 Thanks. 20:21:49 chandler: Indeed. :-) 20:22:25 Right now I'm 179 unread messages behind and still trying to make it to the 60 messages I have marked as "Send Reply." Ack! 20:22:43 Ignore everything except top-of-thread messages from me. :-) 20:23:20 jcowan: Oh, I never did understand what you meant by "altering" as distinct from creating fresh locations or mutating existing locations. 20:23:56 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 20:24:01 -!- bweaver [n=user@75-148-111-133-Chattanooga.hfc.comcastbusiness.net] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 20:24:08 jcowan: The first message I really want to get to was something about symbols and gensym. 20:24:12 "I am not sure anyone has questioned the scope of toplevel bindings. It seems 20:24:13 clear that the scope should be the entire toplevel for every toplevel binding." 20:24:37 Is Andre here suggesting that nobody has questioned the R6RS-style two-pass expansion, or am I misreading him? 20:24:55 Two-pass expansion? 20:24:57 Two-pass doesn't apply to the top level. 20:25:05 I don't get why people make this two-pass thing such a big deal. 20:25:09 Oh, I suppose you can think of it as two passes. 20:25:14 I mean, you always do two passes, REPL or no. 20:25:33 jcowan: You do. Each form is expanded and then evaluated. 20:25:44 *jcowan* nods. 20:25:52 -!- sepult [n=user@xdsl-87-78-100-204.netcologne.de] has quit [Read error: 54 (Connection reset by peer)] 20:26:06 As I posted yesterday, the real conflict is between whether "library" is a mere wrapper, or whether its contents are truly a body. 20:26:14 jcowan: I don't understand why people have this sort of aversion two expanding forms first, and then evaluating them. They act like it has never been done before! 20:26:55 jcowan: Well, even then, why should we, for example, prevent forward macro references when it is natural to allow them, and makes life easier is some cases? 20:26:57 If library bodies are like internal "begin", then two-pass is somewhat plausible. If they are like top-level "begin", it's not. 20:27:03 -!- npe [n=npe@94-224-251-223.access.telenet.be] has quit [] 20:27:12 jcowan: I just read that message. 20:28:03 jcowan: You're saying that you want to enforce a left to right, expand and evaluate each form in order before proceeding to the next sort of operation inside of a library? 20:28:27 -!- dmoerner [n=dmr@multilink.greenhill.org] has quit [Read error: 110 (Connection timed out)] 20:28:44 jcowan: I thought that R6RS top-level programs followed the same expansion process and scope rules as libraries, essentially, with top-level expressions behaving as if they were variable definitions with unique dummy names. 20:29:02 arcfide, chandler: yes. 20:29:04 Why does anyone even talk about the nonsense of `top-level programs' outside of libraries? 20:29:16 chandler: All top level programs are implicitly wrapped in a library form. 20:29:20 arcfide: Right. 20:29:22 Riastradh: I have no idea. 20:29:40 Riastradh: I don't understand what you are objecting to. 20:30:27 -!- haesbaert [n=haesbaer@c925a8c5.virtua.com.br] has quit [Read error: 113 (No route to host)] 20:31:05 In my opinion, the semantics of evaluating the contents or body of a library as stated in R6RS is fine. It is, IIRC, the same as a LET wrapping with imports, and the top-level is the same. The only difference is how the REPL should behave, and I thnk that's easy to handle. Just handle each form as it comes in, piece by piece. Maybe I'm missing something very obvious. 20:31:17 Someone, somewhere, somehow has to be instantiated. The "top-level program" is just an unnamed library which is the library that causes other libraries to become instantiated. In my opinion, it doesn't make sense *not* to have it. 20:32:12 arcfide: Yes, there's a certain amount of gnashing of teeth at the impedence mismatch between the two approaches. Why does the REPL behave differently? 20:32:32 chandler: A Top level progam, however, is still considered a single unit. For example, there is a REPL like evaluation model for files that you can use with Chez Scheme which just reads and evaluates each form from input as if you had typed them on the REPL. I think some people want to call this the top-level, but they confuse that with top-level programs. 20:33:02 arcfide: I also find the R6RS library model to be very difficult to understand. It doesn't map naturally to any intuitive kind of binding form, in the same way that the "one-pass" approach does. You really have N passes of expansion as you hop around the program looking for things which might be definitions. 20:33:24 chandler: How is it difficult to understand? 20:33:45 I thought the rest of my statement explained that. 20:33:51 And what exactly is a "one-pass" approach? That I find rather strange. 20:33:56 Because you can't tell by inspection what are definitions and what are expressions, arcfide 20:34:15 Sorry. I think the terminology is killing us here. Am I using these terms the same way that others have used them? 20:34:26 I think so. 20:35:06 It's difficult to understand because there's no `letrec*-a-bunch-of-identifiers-which-might-be-syntactic-definitions-and-might-be-variable-definitions' binding form in the language. 20:35:16 By one-pass, I mean that no form can use any syntax that is not defined in an earlier form (or an import) 20:35:23 jcowan: You mean human inspection? You just expand each form in turn, and it will become obvious what is and is not a definition. 20:35:31 "In turn"? 20:35:45 No, you can't, because there may be loops. 20:35:49 Yes, you go from left to right, and expand each form. 20:36:02 Absolutely not. 20:36:03 That only works under the one-pass constraint I just mentioned. 20:36:08 chandler: Sure. 20:36:14 At least, not in the R6RS. 20:36:41 It's more of a reduction process. You have to keep reducing top-level forms until you're sure you've found all the definitions, and that what remains are expressions. 20:36:52 A form may appear to be an expression, but it turns out to be a syntax definition based on a (meta) syntax definition appearing later. 20:37:05 chandler: Sure it does, you don't evaluate the right hand sides of definitions until all definitions have been accounted for, you extend the syntacitc environment as you encounter syntax definitions, and at the end you...&c. I'm missing something that you guys are pointing to here. 20:37:13 Which is why I get confused at the use of "two-pass": it's actually N-pass. 20:37:43 jcowan: Of course, but you're still just expanding the form until you get it to one of the forms you understand. 20:38:19 jcowan: And then you know what to do with it. You handle it as you should, and move on until all the definition forms have been encountered. Then you start the process of binding the variable definitions, and then move on to the expressions. 20:39:04 -!- tmilford [n=tmilford@76.89.231.7] has left #scheme 20:39:20 _Pb [n=_Pb@75.131.194.186] has joined #scheme 20:39:25 ... Wait, "move on"? No, you need to start again at the top, and keep going until you are sure that you have accounted for all definitions. 20:40:10 chandler: No, you don't start back at the top, you've already identified all the definitions. 20:40:34 How? By backtracking as soon as something expands into a syntax definition that appeared in a prior form? 20:40:52 That's another implementation technique, but you're still making an unbounded number of passes through the program. 20:41:06 Chapter 10 describes this pretty clearly, I thought. 20:41:10 jcowan, I am objecting to having two different `top-level' semantics (a `top-level program' versus `the top level of a library') when it adds absolutely nothing to the language, and one would suffice. 20:41:20 Riastradh: Ah. 20:41:24 Riastradh: Agreed. 20:41:48 chandler: Okay, so, you have some that you want to evaluate. You must first expand this . 20:41:55 RageOfThou [n=RageOfTh@users-42-189.vinet.ba] has joined #scheme 20:42:12 The expander processes each of the forms (initial) in the body from left to right. 20:42:13 *offby1* eats plenty and expands 20:42:15 Call one thing the `top level'. Heck, I think it would be good if lambda bodies shared semantics with the top level, with the constraint that a body have an expression at the end. 20:42:39 arcfide: Processes them by doing what? 20:43:33 It checks to see whether they are a macro use, a define-syntax form, a define form, a begin form, a let-syntax or letrec-syntax form, or an expression/non-definition. 20:43:57 Initially, *nothing* is a macro use. 20:44:07 (unless defined in the imports) 20:44:14 ... Er, yes. 20:44:23 What's the current argument? I lost track back when I objected to `top-level programs' earlier. 20:44:29 Uses of macros defined in subsequent forms are treated as expressions. 20:44:43 We are trying to understand how forward references to macros can possibly work. 20:44:50 we = chandler and me 20:44:51 Riastradh: That the crazy N-pass expansion process of top-level library forms in the R6RS is crazy. 20:44:57 A macro use is any form whose first element is a syntactic keyword. 20:45:08 To be sure. 20:45:13 Right. And since it's a forward macro use, it's not a syntactic keyword. 20:45:21 chandler: It's not a forward use. 20:45:35 It will be if it gets defined later. 20:45:39 (as syntax) 20:45:40 OK. Assume I have two top-level forms: (foo) (define-syntax foo ...) 20:45:43 jcowan: And you can't do that. 20:45:49 Whaaaaat?? 20:45:49 You lose, chandler! 20:45:50 You CAN! 20:46:48 chandler: You can't. 20:46:59 OK. I'm re-reading over the rules in Chapter 10. 20:47:02 So there *are* no forward references to macros? 20:47:20 I do lose, I guess. 20:47:26 (library (test) (export nothing) (import (rnrs)) (foo) (define-syntax foo (identifier-syntax 'foo) (define nothing 'nothign)) => Attempt to reference unbound idnetifier foo. 20:47:36 Yikes. 20:47:45 Unbalanced parentheses, arcfide. 20:47:51 Riastradh: Oops, sorry. 20:47:56 I hope you get the gist there. 20:48:00 No, I don't. 20:48:18 (library (test) (export nothing) (import (rnrs)) (foo) (define-syntax foo (identifier-syntax 'foo)) (define nothing 'blah)) 20:48:34 chandler: You can do something like this, though: 20:48:35 What the heck is that supposed to do? 20:48:50 Obviously there's some reference to an unbound name FOO. 20:49:00 But the body (define-syntax foo ...) (foo) (... use of bar as syntax ...) is still possible? 20:49:04 Oh, wait. You can do forward macro references in top-level bodies, but only if the result expands into an expression. 20:49:10 chandler: (library (test) (export blah) (import (rnrs)) (define foo blah) (define-syntax blah (identifier-syntax 'foo))) 20:49:13 That's a forward macro reference. 20:49:40 Basically it's two pass, and forward references are only allowed in expression contexts. 20:49:48 That's perfectly acceptable, arcfide, in one sensible semantics. Another sensible semantics is the one Bawden prefers, in which DEFINE-SYNTAX is not necessary. 20:49:52 Riastradh: It just illustrates that you can't use a macro during expansion of undeferred forms when it is not defined. 20:50:23 (Sorry, that's syntactically acceptable; at run-time it is an error.) 20:50:32 chandler: What happens is that the right hand side of definitions are defered for expansion until all definiions are encountered, then they are evaluated in turn and bound. 20:50:47 In Bawden's semantics, you can't do (DEFINE FOO BLAH) (DEFINE BLAH (IDENTIFIER-SYNTAX ...)), because the macro expander needs to classify the BLAH in (DEFINE FOO BLAH) to find out what kind of binding to make for te name FOO. 20:50:51 Right. I understand now. 20:51:08 (But you can do (DEFINE FOO (LIST BLAH)) (DEFINE BLAH (IDENTIFIER-SYNTAX 'FOO)).) 20:51:48 chandler: Note also, that if I had defined the FOO syntax before i used (FOO), then it would have been fine. 20:52:07 Riastradh: Do you mean DEFINE there or DEFINE-SYNTAX? 20:52:07 What's defined before it's used isn't the issue. 20:52:19 I mean DEFINE, arcfide. DEFINE-SYNTAX is not necessary in Bawden's semantics. 20:52:25 Right. I get it now. I had messed up my mental model of what things were deferred. 20:52:54 OK. So now I will re-assert that these semantics are confusing, because they just confused the hell out of me. 20:53:04 However, keywords such as ER-MACRO-TRANSFORMER or SC-MACRO-TRANSFORMER (read that as `syntactic closures' or as `SYNTAX-CASE' -- whichever you prefer) are necessary in Bawden's semantics. 20:53:05 If forward macro references are allowed, they should be allowed. If they are not allowed, they should not be allowed. 20:53:11 Riastradh: Wait, you mean the expander does the classification, rather than relying on some explicit DEFINE-SYNTAX form? 20:53:19 Yes, arcfide. 20:53:45 What's wrong with the good old rule, the simple plan, of not using syntax before it's defined? 20:53:54 chandler: I didn't find them confusing in the least, a single read through R6RS Chapter 10 was sufficient and coincided with what I would have naturally expected. 20:53:58 I don't want to be restricted by that rule, jcowan! 20:54:05 Riastradh: How is recognizing those keywords on the right-hand side of `define' identifably different than marking those bindings with `define-syntax'? 20:54:19 jcowan: What if I want to put my messy syntax at the bottom of my file for better hiding so the file reads better? 20:54:35 arcfide: OK, so, obviously I am dumber than the average bear then. 20:54:52 Riastradh: What are the advantages of Bawden's semantics? 20:55:00 arcfide: That's probably the least compelling argument for semantics that I've seen today. 20:55:07 sepult [n=user@xdsl-87-78-100-204.netcologne.de] has joined #scheme 20:55:53 chandler, if you require that the macro transformer system be identified in each transformer, rather than privileging one particular system, then DEFINE-SYNTAX becomes redundant, because you always have the indication. 20:56:00 Riastradh: So, in other words, I couldn't make a proper macro using (DEFINE x (lambda (x) do some stuf))? 20:56:11 Riastradh: Is that what you mean by the keywords being necessary? 20:56:28 That's right, arcfide. You would instead write (DEFINE X (SYNTAX-CASE-TRANSFORMER (LAMBDA (X) (SYNTAX-CASE ...)))). 20:56:39 .... 20:57:05 Riastradh: No, I'm still confused here. This makes `ER-MACRO-TRANSFORMER' into a phase-shifting syntax? 20:57:22 That's right, chandler: it has what I called MIT Scheme's semantics last night. 20:57:24 Essentially, yes. 20:57:34 Ah. 20:58:01 Presumably this does not apply if you have redefined the transformer identifier. 20:58:15 And if I use `LET' to bind one of these? 20:58:19 Riastradh: I'm not sure I get the benefits of removing DEFINE-SYNTAX if you have to "tag" everything anyways. 20:58:22 Or is there still a `LET-SYNTAX'? 20:58:32 arcfide: Me neither. 20:58:50 And from what you say, Riastradh, it eliminates the ability to have macro forward references. 20:59:03 The benefit of just having DEFINE rather than DEFUN, DEFPARAMETER, DEFCONSTANT, .... 20:59:06 -!- MrFahrenheit [n=RageOfTh@users-38-235.vinet.ba] has quit [Read error: 110 (Connection timed out)] 20:59:48 jcowan: I actually have a DEFINE-CONSTANT and DEFINE-INTEGRABLE and might be adding a DEFINE-FOREIGN soon. 21:00:13 chandler, well, you can make LET-SYNTAX unnecessary if you make LET a special operator rather than a simple macro. 21:01:09 jcowan, that's correct: if you define ER-MACRO-TRANSFORMER to be a variable, say, then a subsequent (DEFINE FOO (ER-MACRO-TRANSFORMER ...)) will bind FOO to be a variable, too, rather than a macro. 21:01:18 Riastradh: I assume that there would be some underlying concept like SYNTAX-LAMBDA that would let new macro systems like SYNTAX-CASE, SC, or ER be added to an existing system without a lot of work? 21:01:30 Riastradh, arcfide: I just find it weird to think that (foo (bar x)), where foo is not defined, *might* turn out to be a syntactic form rather than a call of foo. 21:01:38 What do you mean `some underlying concept'? None of the systems is (necessarily) privileged, arcfide. 21:02:13 Maybe SC-MACRO-TRANSFORMER is the primitive one, to which ER-MACRO-TRANSFORMER and SYNTAX-CASE-TRANSFORMER expand. 21:02:35 It doesn't matter, provided that the semantics of each system be specified. 21:03:12 jcowan: You won't have foo defined with DEFINE and DEFINE-SYNTAX, so I would think it would be easy to see. 21:03:25 -!- m811 [n=user@84-50-207-42-dsl.est.estpak.ee] has quit [Read error: 113 (No route to host)] 21:03:37 Riastradh: You mean you still have to convert one to the other in this Bawden system? 21:03:45 Sorry, I don't understand, arcfide. 21:03:47 Yes, I see what you mean, sorry. 21:03:51 No, don't worry about it. 21:03:54 OK. 21:04:19 In any case, that's independent of forward references -- except that it requires deeper classification than a system with DEFINE-SYNTAX. 21:04:34 Riastradh: Do you like this Bawden system? 21:04:48 Oh, golly, now you're asking me hard questions about things like opinions! 21:05:13 Riastradh: Well, it's good to know about it, but I'd be a littel surprised if you actually supported this system. 21:05:15 Ask me only easy questions, please. Technical certitudes -- none of this opinion business! 21:05:23 Haha, okay. 21:05:23 :-) 21:05:37 Come on, this is IRC, opinions are supposed to fly free and wild in this land! 21:05:52 What's more relevant, I think, is that nobody uses this Bawden system, so it's unlikely to be adopted. 21:06:17 Some of us have even known to draw *incorrect* conclusions based on misunderstandings and incomplete information. 21:07:36 Riastradh: So, technical question: Isn't there an advantage in that `LETREC' does something in this system that is unique, that is, extend the environment with a number of variable and syntactic definitions at the same time? 21:08:36 And doesn't this perhaps explain the R6RS semantics in a way that it can be described as the effect of a single binding operator, rather than a multi-step conversion into an existing binding operator? 21:10:07 No, I don't think so. 21:10:19 To which question, or both? 21:10:25 Both. 21:10:36 LETREC clauses can't be macro invocations. 21:10:43 *jcowan* chuckles at the absurd MIT Scheme copyright notice 21:10:43 (The clauses themselves, that is, rather than their right-hand forms.) 21:10:50 Hmm? 21:10:58 Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 21:10:58 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 21:10:58 2006, 2007, 2008 Massachusetts Institute of Technology 21:11:06 Blame GNU conventions. 21:11:15 Riastradh: Why not? Is it semantically inconsistent? 21:11:27 jcowan: The absurd part is that 2009 is not included? :-P 21:11:28 Er, perhaps I'm missing something. 21:11:33 chandler, you couldn't use LETREC to shadow bindings, then. 21:11:40 Cowmoo [n=Cowmoo@c-68-55-111-252.hsd1.va.comcast.net] has joined #scheme 21:11:43 -!- ct2rips [n=ct2rips@92.73.184.88] has quit [Remote closed the connection] 21:11:59 When the program goes out of copyright in 2206, nobody will care that some bits remain in copyright until a few years later. 21:12:08 Copyright 1986 MIT would suffice. 21:12:19 -!- sepult [n=user@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 21:12:19 Riastradh: OK. You've lost me at the point of "clauses can't be macro invocations" 21:12:24 jcowan: I usually see a range. 21:12:52 For a person, as opposed to an institution, it's even more pointless. Copyright expires 70 years after your death, no matter when you wrote the work. 21:12:56 chandler, in a body (library or lambda), you can write (foo x) and have it expand to (define x 5). You can't write (letrec ((foo x)) ...) and have that be treated as (letrec ((x 5)) ...). 21:13:10 Fortunately. 21:13:21 jcowan: Yes, and it doesn't even need to be declared. 21:13:29 grettke [n=grettke@69.23.38.57] has joined #scheme 21:13:39 Riastradh: OK. So that definitely addresses the second question, though I think it would reduce the multi-step R6RS process to one forward expansion pass. Back to the first question... 21:14:02 Ah, good. 21:14:14 The first question is of whether LETREC does something unique: making variable and syntactic bindings simultaneously. 21:14:26 Yes. 21:14:34 -!- arcfide [n=arcfide@99.50.231.131] has left #scheme 21:14:35 Well, the question was of whether what it does is unique, not of what it does. 21:14:36 -!- grettke [n=grettke@69.23.38.57] has left #scheme 21:15:13 I suppose that if you have identifier transformers, you can achieve this effect using a combination of `LETREC' and `LETREC-SYNTAX'. 21:15:20 s/2206/2106 21:15:28 <_Pb> dreamscheme is great 21:15:30 arcfide [n=arcfide@adsl-99-50-231-131.dsl.bltnin.sbcglobal.net] has joined #scheme 21:15:33 And the answer is still `no', because you can have the same property (and the property that macro invocations can expand into definitions, which they cannot in LETREC clauses) with DEFINE and DEFINE-SYNTAX in bodies. 21:15:40 Are identifier transformers a Good Thing? 21:15:44 No, jcowan. 21:15:49 Oh. I always forget about inner `define-syntax'. 21:15:50 I rather thought not. 21:15:56 jcowan: Yes! Ignore that Riastradh fool. 21:16:02 *chandler* shifts about nervously 21:16:02 Why, chandler? 21:16:07 jcowan: Identifier transformers? 21:16:11 *Riastradh* sifts about flourly. 21:16:25 IDENTIFIER-SYNTAX and friends. 21:17:19 *jcowan* notes what (quit) does on MIT Scheme. I never played around with it before. 21:17:24 i kinda like them, but not the set! extension 21:17:35 offby1, you need to call the /me police on jcowan. 21:17:47 Oops. 21:17:55 Just a missing newline. 21:18:08 jcowan: I like identifier transformers. :-) 21:18:27 jcowan: Putting aside the R6RS version of them (which allows you to expand differently if the identifier is being called as a procedure versus used as a variable, not to mention the `set!' ugliness), the ability to have an identifier expand as syntax is quite useful. 21:18:39 I'm not sure I've actually heard an argument *against* them. 21:18:49 Certainly the concept is integral to the definition of module systems. 21:19:06 chandler: It is useful to allow them to expand into one thing when called as an identifier and another when called as a macro. 21:19:17 chandler, in fact, attempts to unify definitions and syntax definitions by transforming them into some common LETREC-MIXED form (see SRFI 24) is a big mess, and ends up being more divisive than unifying, because it makes future extension harder. 21:19:27 s/attempts/attempting/1 21:19:31 arcfide: eh? How can you tell? 21:19:39 jcowan: Sorry? 21:19:55 "one thing when called as an identifier and another when called as a macro" -- what does that mean? 21:20:16 chandler: For example, you may want the macro to do something normally, but break down into a procedural analogue if called as an identifier. 21:20:25 chandler: Why are identifier transformers integral to the definition of module systems? 21:20:40 jcowan: You can call the macro (macro ...) or use it as an identifier (foof ... macro ...). 21:20:42 jcowan: In the R6RS version of identifier macros, the `foo' in (list foo) may expand differently than the `foo' in (foo list) 21:20:57 Ah. So "identifier" => "variable". 21:21:08 or rather, "argument" 21:21:25 jcowan: It's really the difference of whether the form passed to the macro tranformer is a pair or a single identifier. 21:21:28 I believe I was just denounced on r6rs-discuss for even suggesting such a thing. 21:21:30 dysinger [n=dysinger@dsl081-064-072.sfo1.dsl.speakeasy.net] has joined #scheme 21:21:46 arcfide: No, it's a matter of whether it's in the car of the form or somewhere else. 21:21:58 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 21:21:59 jcowan: Um... 21:22:04 jcowan: I don't think so. 21:22:13 Counterexamples? 21:23:16 Historically, syntax keywords are only magic in the car; anywhere else, they are variables. Now you want some identifiers to be keywords in the car *and* macro calls when not in the car, elaborated differently. 21:23:25 s/magic/recognized 21:23:28 rudybot: init scheme 21:23:29 arcfide: your scheme sandbox is ready 21:23:37 jcowan: The most useful function of identifier macros is, in my opinion, the ability to introduce a new name for an existing binding which behaves identically to a reference to that binding. This is essentially what an `import' clause in a module system is. 21:23:43 rudybot: eval (define-syntax me (lambda (x) (list #'quote x))) 21:23:52 rudybot: eval (me) 21:23:52 arcfide: error: me: return value from syntax expander was not syntax: (# #) 21:23:58 Oh foo. 21:24:01 chandler, so here's the process: For each form, expand it until you can classify it. If it is an expression, sequester it away; if it is a definition, bind its name to a variable, and sequester its expression away as an initialization; if it is a syntax definition, bind its name to the transformer; and if it is a sequence, apply the rule recursively. 21:24:21 rudybot: eval (define-syntax me (lambda (x) #`(quote #,x))) 21:24:25 rudybot: eval (me) 21:24:25 arcfide: ; Value: (me) 21:24:36 rudybot: eval (list 'a 'b 'c me) 21:24:37 arcfide: ; Value: (a b c me) 21:24:40 Riastradh: The process of what? (I've lost context.) 21:24:42 jcowan: Voila. 21:24:52 Narrenschiff_ [n=ritchie@xolotl.plus.com] has joined #scheme 21:25:02 -!- _Pb [n=_Pb@75.131.194.186] has quit ["Leaving"] 21:25:12 jcowan: The process really isn't different. 21:25:29 chandler, finally, you have classified everything and obtained a sequence of expressions that you can compile. Compiling the subexpressions requires classifying them (to expand their macros and to be sure that they are expressions), and for lambda bodies, recursively processing them by the above rule. 21:25:48 Forms are examined. If a single identifier is found and evaluated and it resolves to a macro transformer, call the macro transformer on the single identifier. 21:26:00 chandler, I just gave you a whole process of macro expansion! It's considerably more straightforward than I suspect the R6RS made it out to be. 21:26:19 offby1: ; Value: (dough ray me) 21:26:39 karlw [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 21:26:46 So what is the virtue of identifier syntax other than to save typing? That it is mildly context-sensitive? 21:27:09 Riastradh: I understand the process (now), but I will likely mess it up again at some time in the future unless I revisit this concept often, for the simple reason that I don't expect forward macro references to be half-allowed, such that they are allowed in certain contexts if they expand to the right kind of thing. 21:27:13 jcowan: An example of its use would be in a DEFINE-INTEGRABLE form. 21:27:18 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 21:27:31 jcowan: To provide another name for a lexical binding. 21:27:42 Bad example, arcfide. 21:27:49 DEFINE-INTEGRABLE should *not* be a part of the macro expansion process. 21:27:52 It's too easy to screw up there. 21:27:52 Riastradh: Sorry, I couldn't think of another one off the top of my head. 21:27:59 -!- ASau [n=user@83.69.240.52] has quit ["off"] 21:28:00 Do most people use SISC for JVM support? 21:28:15 Riastradh: Well, it depends a lot on the implementaiton. 21:29:24 jcowan: here is a better example of identifier-syntax usage. http://xacc.wordpress.com/2009/08/21/ironscheme-clr-shorthand/ 21:31:02 like syntactic tagging of identifiers 21:33:20 Riastradh: Alright, now that I have darcs installed and I am done with the monotone upgrade, I'm going to start tackling CML. 21:33:30 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 21:34:05 I'm considering cloning XFig in JVM with Rhino and a Scheme embedded. 21:34:11 I am working on fixing some subtle details of process resumption in Scheme48, arcfide. 21:34:16 arcfide: you gonna make that run on R6RS? 21:34:43 karlw: Sorry, too late: http://tams-www.informatik.uni-hamburg.de/applets/jfig/ 21:35:45 leppie: It will be close. 21:36:42 chandler: It's open source? 21:37:27 Oh, hm, no, it's not. 21:37:33 Whoops. I thought it was. 21:37:58 -!- sclv__ [n=sclv@c-68-32-44-18.hsd1.nj.comcast.net] has quit [] 21:39:37 -!- Narrenschiff_ [n=ritchie@xolotl.plus.com] has quit [] 21:39:41 Does anyone have experience with the XFig source code? 21:40:10 No, sorry. 21:41:52 However, these details won't affect a mutex-based implementation of the parameters that Scheme-CML needs. 21:42:19 Hmm... that may be worth buying anyway. 21:42:46 (except that you'll need to implement one more operation when I finish) 21:43:24 *Riastradh* vanishes. 21:45:51 -!- sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has quit [] 21:46:13 -!- Phaze [n=PhazeDK@0x5da32b16.cpe.ge-0-1-0-1104.soebnqu1.customer.tele.dk] has quit ["Leaving"] 21:46:47 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 21:48:01 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 21:49:01 I figured it's important to write an application that a lot of people will use that relies on Scheme extensively. 21:49:50 Perhaps, instead of using Java, you should use PLT. 21:50:10 You will be able to write more of your application in Scheme, using Scheme style. 21:50:19 Riastradh: What do you mean that you need a mutex based implementation of parameters? 21:50:26 Does that mean that the parameters must be thread safe? 21:51:16 Has anyone written an interactive drawing program or library in PLT? 21:52:06 I'm not sure. I thought there was a demo program along those lines. 21:53:31 What I do not understand is why R6RS insists on definitions before expressions in bodies at all, given that it explains (in the section on top-level programs) how to trivially change such a mixed sequence into definitions only with at most one expression. 21:54:21 The benefit of Java is that you get the class library and non-Scheme people may decide to work on your code. 21:56:13 I'll have to plan for a while before deciding which ``platform'' to use. 21:56:23 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 22:00:23 chandler pasted "a "simple" module system with identifier-syntax" at http://paste.lisp.org/display/86991 22:00:54 jcowan: This explains what I meant about identifier syntax being integral to module systems. (Pay no attention to the weakness of this particular one! :-) 22:01:04 rudybot: init http://paste.lisp.org/display/86991/raw 22:01:07 chandler: your "http://paste.lisp.org/display/86991/raw" sandbox is ready 22:01:12 rudybot: eval 'my-output-please 22:01:12 chandler: ; Value: my-output-please 22:01:13 chandler: ; stdout: "2\n1\n4" 22:02:05 Ah, you mean integral to their definition, not to their use. The user need not know that he is typing identifier macros at every turn. 22:02:27 phax [n=phax@207-229-157-200.mart-bsr1.chi-mart.il.cable.rcn.com] has joined #scheme 22:03:39 jcowan: Exactly. 22:03:42 ASau [n=user@83.69.240.52] has joined #scheme 22:04:30 sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has joined #scheme 22:04:51 But this need not be so: Chicken's hard-coded module system, for example, does not depend on, nor does Chicken provide, identifier macros. 22:06:01 Of course. Lots of things can be "magic" behind the scenes in a real implementation, but ultimately the general concept - that of providing a lexical "alias" - is the same. 22:06:25 Yes. However, that does not exercise the full generality of identifier macros by any means. 22:06:40 jcowan: One philosophy that I rather like says that if you want to implement something for Scheme, you should be able to do it in Scheme, and shouldn't have to resort to other languages. I think this is similar. If I would want or need it for implementing Scheme, doesn't it make sense that I can do it in Scheme. 22:07:40 You mean, short of a metacircular interpreter? 22:07:56 You can't define if in pure Scheme without circularity. 22:08:07 Unfortunately, I don't have enough free time to develop any non-trivial applications. 22:08:26 Right. So we have a few levels of identifier macros. One, where it can only expand into another identifier; it's *just* a lexical alias. Two, where you can expand into any form, which means that ordinary little `foo' is potentially side effecting. Three, what the R6RS provides. 22:08:44 There's a three? zomg 22:08:53 I thought R6RS provided #2. 22:09:06 No. CL provides level two. 22:09:10 Yes. 22:09:10 jcowan: If I have to write a whole interpreter for my extension, I'm not sure I like that, in most cases. 22:09:27 chandler: It is possible to have any arbitrary code form inserted for an identifier in R6RS. 22:09:30 jcowan: foof implemented `if' in pure Scheme the other day. 22:09:41 I have to worry about math classes. 22:09:54 arcfide: Which is why, imho, modules should not be an extension. 22:10:13 So what is #3? 22:10:23 arcfide: Right. But I'm referring to what it provides beyond level two: the ability to vary the expansion depending on how it is used. 22:10:25 3 = 2. 22:10:28 Ah. 22:10:33 Oooh. 22:10:50 On whether it is in the car of a form or some other position. 22:10:55 R7RS-large: number macros! 22:11:21 (+ 1 2) is interpreted thus: 1 recompiles the world, 2 resets the system, and *then* + is invoked. 22:11:46 jcowan: I can understand that, but I think it should be possible to implement modules in Scheme. I don't think those are one of the "core" programming paradigms. 22:12:15 Hopefully, though, I'll eventually take computational geometry or something along those lines. There's some C++ functional computational geometry library that may heavily influence the scripting interface. 22:12:40 Evidently the SC doesn't agree. 22:13:04 For a long time syntax-rules wasn't "core" either, and yet it is not implementable (short of a new evaluator) in R4RS Scheme. 22:13:29 -!- Piratero [n=user@c-24-7-64-72.hsd1.ca.comcast.net] has quit [Read error: 113 (No route to host)] 22:14:02 jcowan: I think the SC is adding a module system for reasons of portability, not for reasons of it being one of those "general" forms that make other forms unnecessary. I don't necessarily disagree with them there. 22:15:22 -!- dysinger [n=dysinger@dsl081-064-072.sfo1.dsl.speakeasy.net] has left #scheme 22:16:07 *jcowan* nods. 22:16:25 I am cooking up post for r6rs-discuss on something I call "feature groups". 22:16:35 is there a concise summary of R6RS-small vs R6RS-large somewhere? 22:16:53 There is only one R6RS. 22:16:57 -!- foof [n=user@dn157-046.naist.jp] has quit [Read error: 54 (Connection reset by peer)] 22:17:03 I thought there were two? 22:17:04 It's the forthcoming R7RS that will be split into small and large languages. 22:17:09 oh 22:17:13 I appear to have missed one! 22:17:20 foof [n=user@dn157-046.naist.jp] has joined #scheme 22:17:24 forcer [n=forcer@e177148223.adsl.alicedsl.de] has joined #scheme 22:17:49 well, is there a draft anywhere of what the difference between the R7RSes will look like? 22:17:50 -!- emma [n=em@unaffiliated/emma] has quit [Connection timed out] 22:18:47 http://scheme-reports.org/2009/working-group-1-charter.html and http://scheme-reports.org/2009/working-group-2-charter.html 22:18:52 explain the difference in *goals*. 22:19:02 But those are not final yet either. 22:19:08 It's very, very early in the process. 22:19:10 I was looking for a difference in outputs, really 22:19:11 oh 22:19:28 Can't look at the output until we've done the process! 22:19:37 (the final output, anyhow) 22:19:37 Elly: As in, people are still killing each other over whether it should even be called R7RS. 22:19:38 lazy evaluation! 22:20:15 -!- sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has quit [] 22:20:17 Feature groups are disjoint with modules: they are things in the core that may, as a whole, be included or left out without losing conformance to small Scheme. 22:21:10 Based on remarks in the charter, the IEEE < R4RS < R5RS relationship, and the internal comments in R5RS about implementation restrictions. 22:26:47 tltstc [n=tltstc@cpe-76-90-95-21.socal.res.rr.com] has joined #scheme 22:29:17 Hmm, question: are #s in numbers actually useful to anyone? I note that R6RS dropped them. 22:31:23 jcowan: Are say what? 22:31:38 1.2### and that. 22:31:48 O_O 22:31:59 ~_O.... 22:32:06 O_~.... 22:32:09 ?_? 22:32:22 *jcowan* tries to imagine eyes that look like question marks, fails. 22:32:55 I use #x.... and family, but I don't know that I know what that one is. 22:33:10 1.2### is an inexact number. 22:33:32 antoszka [n=antoszka@unaffiliated/antoszka] has joined #scheme 22:34:54 Riastradh: your queue is a first in first out data structure, right? 22:35:19 It would be a pretty surprising queue that was not. 22:42:37 No, arcfide, it's actuallly a seventh-in has probability 1/e of being the first out, and the rest are all worse than that -- their probabilities of being the first out are not merely transcendental but noncomputale real numbers. 22:44:12 arcfide, when I said something about `a mutex-based implementation of the parameters' earlier, I meant `parameter' in the general sense, not in the particular confusing sense irksomely taken for the term by PLT Scheme and Chez. 22:45:06 The parameters are ENTER-CRITICAL-SECTION, EXIT-CRITICAL-SECTION (which will be no-ops in Chez, I imagine), DEFINE-LOCKED-RECORD-TYPE, SUSPEND, MAYBE-RESUME, (later WITH-SUSPENSION-CLAIMED), and the random stuff such as queues. 22:47:25 -!- phax [n=phax@unaffiliated/phax] has quit [Remote closed the connection] 22:47:57 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 22:50:53 -!- masm [n=masm@bl7-207-47.dsl.telepac.pt] has quit ["Leaving."] 23:01:13 Riastradh: Is the name in the 'spawn' procedure important? 23:02:05 Riastradh: Hrm, are the time rendezvous procedures gone? 23:05:15 -!- kniu [n=kniu@ELMUNDO.RES.CMU.EDU] has quit [Read error: 60 (Operation timed out)] 23:05:25 No, they're not gone; they're still implemented in mit-time.scm and s48-time.scm, just like before. 23:05:29 kniu [n=kniu@ELMUNDO.RES.CMU.EDU] has joined #scheme 23:05:36 The name is not semantically important. It is useful for debugging purposes. 23:05:52 Okay. 23:06:59 (Given words such as `semantic', i.e. related to the correctness of the program relative to some intended specification, and `pragmatic', i.e. related to practical issues of the program's performance, there ought to be a similar pretentious^Werudite word meaning `for debugging purposes only'.) 23:09:10 Ppjet6 [n=ppjet@82.123.221.147] has joined #scheme 23:09:25 Riastradh: Elucidatory? 23:09:53 Insectoid? 23:11:39 -!- Ppjet6 is now known as Pepe_ 23:14:08 Blargh! Scheme48 loses. 23:14:45 'insectoid' is pretty good there 23:15:36 too bad RAID is already taken 23:26:15 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 23:28:00 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 23:34:27 Who was the one the other day asking whether call-with-values could ever be used reasonably? 23:34:36 Sorry, I mean, where it was the more natural solution. 23:34:50 jcowan: Was it you? 23:34:56 *arcfide* eyes chandler. 23:35:04 It was one of you, wasn't it? 23:36:01 Riastradh: You have a whole set of locked-fields things that your locked-record-type accepts but with which is does nothing. Is this intentional? 23:38:12 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 23:38:35 No, but it might have been. It's notable that let-values and receive can potentially be implemented more efficiently than call-by-values, though. 23:39:39 jcowan: Hrm, okay. Well, I found an instance where I think it makes the code nicer. 23:39:40 ... for the same reason that catch can be etc. than call/cc. 23:40:19 Before, I couldn't find the old code that I used with it, but Riastradh's locked record stuff is one place where it makes sense. 23:40:58 The (with-locked-object obj thunk) procedure can be defined as (define (with-locked-object x thunk) (with-mutex (get-mutex x) (call-with-values thunk values))). 23:50:16 -!- patmaddox [n=patmaddo@152.sub-75-217-104.myvzw.com] has quit [Read error: 110 (Connection timed out)] 23:52:06 CaptainMorgan [n=CaptainM@c-24-62-183-102.hsd1.ma.comcast.net] has joined #scheme 23:56:16 CATCH vs CWCC is silly. LET-VALUES has no straightforward macro expression. It has a complicated one, but the particular definition imposes more semantics than the programmer said by writing LET-VALUES. 23:57:15 What is (CALL-WITH-VALUES THUNK VALUES) supposed to accomplish? 23:57:30 Obviously it may make the call to THUNK a non-tail call, but aside from that, of course. 23:58:40 arcfide, the locked fields tell you which ones are not supposed to be read from or written to when the object is not locked. (I have not been entirely faithful about this in the code, though, because the actual constraint I used is a little different.) 23:58:53 You can use this information to add some consistency checks to the record accessors. 23:59:13 (E.g., to signal an error if you try to read from the field when the object is not locked.) 23:59:34 R7RS needs T-shirts.