00:02:34 It also needs politically offensive slogans to capture media attention. 00:05:09 Time for dinner. 00:06:53 -!- RageOfThou [n=RageOfTh@users-42-189.vinet.ba] has quit [Read error: 110 (Connection timed out)] 00:08:11 -!- CaptainMorgan [n=CaptainM@c-24-62-183-102.hsd1.ma.comcast.net] has quit ["Leaving"] 00:11:33 karlw1 [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 00:11:44 -!- karlw1 [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has left #scheme 00:16:31 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 00:20:01 -!- forcer [n=forcer@e177148223.adsl.alicedsl.de] has quit [Remote closed the connection] 00:21:04 forcer [n=forcer@85.177.148.223] has joined #scheme 00:21:55 mithrandir` [n=jao@80.31.223.29] has joined #scheme 00:22:44 -!- mithrandir` [n=jao@80.31.223.29] has quit [Client Quit] 00:23:35 -!- karlw [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 00:24:06 tjafk2 [n=timj@e176212014.adsl.alicedsl.de] has joined #scheme 00:24:55 Riastradh: I lose. 00:27:41 Guest17302 [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:28:13 -!- Guest17302 [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 00:31:21 sepult` [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:31:54 -!- sepult` [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 00:32:57 sepult` [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:34:00 phax [n=phax@unaffiliated/phax] has joined #scheme 00:34:10 Riastradh: could you explain the semantics of SUSPEND and MAYBE-RESUME? 00:34:53 -!- sepult` is now known as sepult 00:36:23 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 00:36:36 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:40:26 -!- tjafk1 [n=timj@e176205170.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 00:45:44 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 00:46:42 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:48:48 arcfide, you run SUSPEND at the end of a critical section to suspend the process. Aside from the token for the critical section, you give SUSPEND a procedure that sets up a record of the suspended process. This procedure takes as arguments a suspension constructor, a continuation if it still does want to suspend, and a continuation if it wants to back out and not suspend after all. 00:50:16 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Client Quit] 00:50:39 A suspension is a record of a suspended process, together with a procedure to be applied to some thunk when the process is resumed. If a process is waiting for one of a choice of several rendezvous to become enabled, each one may have a different procedure to be applied thus, corresponding with the procedure in (MAP-RENDEZVOUS ). 00:51:28 For any suspended process, there is likely to be more than one suspension; resuming any one of them will resume the process, but each in a different way. 00:52:38 -!- copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has quit [] 00:52:47 Riastradh: By "record of suspension," you mean some sort of bookkeeping note, not some Scheme structure? 00:53:11 What does this procedure associated with a suspension do? Anything? 00:53:27 copumpkin [n=pumpkin@c-24-63-67-154.hsd1.nh.comcast.net] has joined #scheme 00:53:38 I mean more precisely that the procedure you passed to SUSPEND stores suspension objects in data structures. 00:53:57 The procedure associated with a suspension corresponds with the procedures in (MAP-RENDEZVOUS ). 00:55:35 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 00:56:05 So, what is a suspension constructor? 00:56:42 I also noted that you seem to have some poll equivalent, but that the CML says that it removed 'poll' from the library. I wasn't sure whether that had anything to do with anything. 00:56:45 It is a procedure that takes a suspension procedure and returns a suspension. 00:57:05 I have no conception of what a "suspension" is. 00:57:14 A suspension is a description of a suspended process. 00:57:29 *arcfide* ponders. 00:58:29 And this suspension procedure is the one that would be passed in a call to 'suspend'? 00:59:05 What can you do with a suspension? You can resume the suspended process with it! 00:59:05 That's all. 00:59:45 Okay, I think I'm grasping it. 01:05:42 annodomini [n=lambda@wikipedia/lambda] has joined #scheme 01:06:09 jao [n=jao@80.31.223.29] has joined #scheme 01:06:16 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 01:09:26 Guest67737 [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 01:10:31 -!- Guest67737 [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 01:11:28 sepult` [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 01:11:38 arcfide, what you pass to SUSPEND is a procedure that stores suspensions in various data structures and then finally decides whether actually to suspend. 01:12:31 The first argument to the procedure that you pass to SUSPEND is a procedure that makes suspensions which you can store in data structures. 01:12:57 -!- sepult` is now known as sepult 01:13:01 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Client Quit] 01:14:04 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 01:14:32 When you resume a process, there are two procedures involved: the thunk with which you resume it, and the composition of the particular suspension that you resume. The thunk is what `base' rendezvous provide (but not acid ones, nor benign ones!); for example, when delivering a message along a channel to a suspended receiver, the thunk will just return the message. 01:14:45 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Remote closed the connection] 01:15:45 The composition is what mapped rendezvous provide, with a layer of indirection for the sake of the higher-level rendezvous to implement negative acknowledgements. When you actually resume a process, the action it takes as soon as it is resumed, in a tail position with respect to the call to SUSPEND, is to apply the composition of the resumed suspension to the thunk with which it was resumed. 01:17:31 sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has joined #scheme 01:18:36 I recommend that you take mit-mutex-suspend.scm almost verbatim, with the following changes: 1. Obviously, change MIT Scheme thread mutices to Chez mutices. 2. Instead of SUSPEND-CURRENT-THREAD and SIGNAL-THREAD-EVENT, add a field for a condition variable to the suspension token record, and use CONDITION-WAIT to suspend, rather than SUSPEND-CURRENT-THREAD, and CONDITION-SIGNAL (or CONDITION-BROADCAST -- it doesn't matter) to res 01:19:33 Well, of course. 01:19:36 :-) 01:20:19 Suspendable threads in Chez are basically done with three procedures: FORK-STHREAD, RESTART-STHREAD, and SUSPEND-STHREAD. 01:20:55 FORK-STHREAD returns a suspension record, and the other two take that record. 01:21:19 zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has joined #scheme 01:21:56 What is the token of the critical section? 01:25:10 -!- yome [n=usah@70.48.77.153] has quit ["Leaving"] 01:26:56 Riastradh: Is there a reason that your enter-critical-section seems to do nothing but call the given procedure? 01:31:47 Yes. I haven't yet ruled out whether critical sections are a useful parameter. 01:32:19 Riastradh: Will threads ever be suspended outside of themselves? That is, will another thread try to suspend some other thread? 01:32:52 For example, in a mutex-based multiprocessor implementation in which the mutices are all spin locks, during a critical section preemption might be disabled (and reenabled only if there is a spin lock owned by another thread on the same processor). 01:33:40 Processes are only ever suspended by themselves. They are never subject to involuntary suspension. 01:33:58 Riastradh: Oh, that makes life easier. 01:34:20 All you need are Chez's condition variables. I didn't know about *-STHREAD; they didn't turn up in the obvious place in the manual. 01:35:06 Riastradh: It's not something that is in the manual. It's something that you do when you want suspendable threads. 01:35:30 So, I don't need them at all. 01:35:31 :-) 01:35:53 Is this how CONDITION-WAIT &c. are implemented, rather than atop pthread_cond_wait or something? 01:36:10 Riastradh: A suspension token only needs to have enough information to restart the thread, right? 01:36:27 That's right. 01:36:50 Riastradh: No, suspendable threads are implemented using a suspension record containing a condition, mutex, and a flag. They're used when you want to allow other threads to suspend (request, rather than force) other threads. 01:37:00 I see. 01:37:05 So they have no use here. 01:37:09 Right. 01:41:40 Riastradh: The thread-then-thunk thing. Is this just used to pass the continuing thunk to the thread for resuming? 01:42:10 Yes. That is the procedure that the process actually calls in a tail position with respect to the call to SUSPEND. 01:42:33 In other words, when a thread is suspended and subsequently resumed, I assume that the thread that resumed this thread must have some way of telling the suspended thread what to do, and you do this by passing a thunk to it. But otherwise, there is no other use for this field, right? 01:43:26 Right. 01:43:32 Great! 01:43:36 moe [n=moe@p54A0C261.dip.t-dialin.net] has joined #scheme 01:43:37 I think I can write the code now. :-) 01:44:04 -!- moe is now known as Guest21911 01:44:36 -!- Guest21911 [n=moe@p54A0C261.dip.t-dialin.net] has quit [Client Quit] 01:54:41 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 01:58:02 arcfide pasted "Suspen and Resume" at http://paste.lisp.org/display/86995 01:58:08 Riastradh: Do these look bout right? 01:58:28 You don't need to loop there. 01:58:52 I assume WITH-MUTEX is syntax, not a procedure? 01:58:56 Yes. 01:59:01 So I can just rely on thunk being set? 01:59:10 Yes. Why else would CONDITION-WAIT return? 01:59:31 I wasn't sure if there was something else strange that could happen, since you had tha tloop in your MIT Scheme code. 01:59:38 Other than that, all seems well? 01:59:43 Right: that's because in MIT Scheme the thread may resume for other reasons. 01:59:55 (Anyone can send a `thread event', which causes the thread to resume.) 02:00:40 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 02:00:52 Oh, okay. 02:01:03 -!- Guest63853 [n=moe@p54A0E14F.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 02:02:50 -!- attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has quit [Read error: 113 (No route to host)] 02:04:58 lol I didn't realize that 'bing goes the innernet' actually won the bing jingle contest 02:05:04 good show, it deserved it 02:05:39 they have the innernet on computers now? 02:05:49 Bing is just.... 02:05:53 Yeah. 02:06:04 Riastradh: Okay...let's see what else needs to be done to get this thing working. 02:07:10 offby1: not just on--in 02:10:10 -!- sepult [n=levgue@xdsl-87-78-100-204.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 02:11:35 rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has joined #scheme 02:20:01 Guest414 [n=levgue@xdsl-87-78-29-222.netcologne.de] has joined #scheme 02:22:29 -!- Cowmoo [n=Cowmoo@c-68-55-111-252.hsd1.va.comcast.net] has quit [Remote closed the connection] 02:23:43 -!- Guest414 [n=levgue@xdsl-87-78-29-222.netcologne.de] has quit [Client Quit] 02:24:44 sepult [n=levgue@xdsl-87-78-29-222.netcologne.de] has joined #scheme 02:29:04 Riastradh: Hrm, I'm not sure I get this time stuff. 02:29:42 All that you need is some way to call a procedure (in an arbitrary thread) after some duration or at some real time. 02:31:03 Aaah, um...let me see if I can get this. 02:33:27 _Pb [n=_Pb@75.131.194.186] has joined #scheme 02:34:04 Darki [i=Darkstar@p57B55CAE.dip.t-dialin.net] has joined #scheme 02:34:12 <_Pb> hmm, is there an r4rs way to print out the hexadecimal value of a string or char? 02:36:14 Riastradh: What is the form of the argument passed to both of these time rendezvous? 02:36:23 <_Pb> or a way in general 02:36:29 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 02:36:33 AFTER-TIME-RENDEZVOUS takes a duration. AT-REAL-TIME-RENDEZVOUS takes a real time. 02:36:35 That is, is this an integer, float, date structure? 02:36:50 Milliseconds, at the moment. 02:36:53 dec142 [n=Declan@86.46.53.28] has joined #scheme 02:36:59 Integer or arbitrary real number if you like. 02:36:59 Milliseconds....okay. 02:37:03 arcfide: Yikes. I can see we will have to deal with the Chez subversives and this broken phasing behavior before any real progress can be made. PLT's behavior is absolutely correct: `x' is not defined at phase 1. Being able to write #`(cons #,x x) with both uses of `x' referring to the same binding is Just So Wrong. 02:37:23 -!- sepult [n=levgue@xdsl-87-78-29-222.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 02:37:35 chandler: Says who? 02:37:43 Me, of course! 02:37:44 What's unfortunate, chandler, is that they believe that implicit phasing is actually the solution to a problem. 02:37:55 (when in fact it is a solution in search of a problem that causes more problems than it solves) 02:38:32 r5rs number->string 02:38:33 http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_idx_350 02:38:34 -rudybot:#scheme- http://tinyurl.com/ku6zyr 02:38:46 *syntropy* growls at rudybot 02:38:52 _Pb: ^ see the second argument to this procedure. 02:39:21 _Pb: er, wait. `hexadecimal value of a string'?? 02:40:06 -!- chris_bryant [n=chris_br@cpe-76-170-255-101.socal.res.rr.com] has quit ["Leaving"] 02:40:08 <_Pb> chandler: sorry, i just realized that's not the problem 02:40:43 chandler: What if I actually want to use X in both my runtime code an my macro code? 02:40:53 <_Pb> this one procedure takes a C structure, and gets the individual elements by looking at certain bytes 02:41:25 That's perfectly sensible, arcfide, *if* you are merely using the same name for two different bindings at the two different phases, or if the name is imported at both phases. 02:41:26 chandler: And as a related issue, I don't like it when mutliple variables can refer to different things in different phases in the same "scope" in one unit of code. 02:41:58 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 02:43:03 chandler: Also, what gave you the idea that there are a lot of us Chezers out there? 02:43:08 arcfide: This is why the R6RS explicitly said that the bindings should have similar (I'm not sure what word was actually used) values across all phases, even in a separate-instantiation Scheme. 02:43:37 arcfide: The weasel wording in the R6RS to allow Chez's behavior gave me that idea :-) 02:43:38 chandler: Yes, but they allowed both possibilities. I see no way around allowing both possibilities, since the community disagrees on this. 02:44:14 I see a way around it. Fix the community! :-) 02:44:19 That's because part of the `community' (the `village'...?) is incorrigibly hard-headed and wrong. 02:45:27 -!- Dark-Star [i=Darkstar@p57B55266.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 02:45:35 chandler: I'd call it weasel wording to appease the PLT crowd and such. 02:45:55 arcfide, Riastradh: In any event, you two were doing something useful before I started lobbing grenades. Please, continue. 02:45:56 Clearly we need to envelop the Chez crowd in a giant submerged weather balloon so that they stop screwing up phases. 02:46:15 Bah. 02:46:16 That would be more effective than subtle attempts at psychological battery. 02:46:18 Humbug. 02:46:53 *arcfide* goes back to hacking CML. 02:47:27 On the contrary, arcfide, it is weasel wording to appease the Chez crowd, because the PLT crowd has good, legitimate reasons to use the same names at different phases for different bindings, whereas the Chez crowd just has some self-contratulatory papers showing that they successfully implemented broken phasing semantics that rules out the examples of the PLT crowd. 02:52:43 tjafk1 [n=timj@e176223189.adsl.alicedsl.de] has joined #scheme 03:08:56 -!- tjafk2 [n=timj@e176212014.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 03:10:55 -!- haesbaer1 [n=haesbaer@c925a8c5.virtua.com.br] has quit [Remote closed the connection] 03:13:39 -!- forcer [n=forcer@85.177.148.223] has quit [Read error: 145 (Connection timed out)] 03:15:10 kssreeram_ [n=kssreera@122.174.70.188] has joined #scheme 03:18:36 -!- kssreeram [n=kssreera@122.174.135.218] has quit [Read error: 110 (Connection timed out)] 03:18:36 -!- kssreeram_ is now known as kssreeram 03:19:49 patmaddox [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has joined #scheme 03:25:41 -!- Nshag [i=user@Mix-Orleans-106-4-201.w193-248.abo.wanadoo.fr] has quit [Read error: 60 (Operation timed out)] 03:26:48 -!- dec142 [n=Declan@86.46.53.28] has quit [Read error: 104 (Connection reset by peer)] 03:28:16 Riastradh: Do you have some basic code to test whether I have implemented this stuff correctly? 03:29:51 Run SEMAPHORE-TEST from semaphore.scm with #T or #F as an argument. 03:30:06 That's the closest there is to a test suite, which is something I need to work on. 03:30:16 (and by `work on', I mean `make') 03:30:56 Riastradh: yeah, I got an error with (semaphore-test #t), so I wanted to try to find out what I did wrong. 03:31:17 You can run simpler tests by hand, too. E.g., (let ((mbox (make-mailbox))) (mailbox-send mbox 'foo) (mailbox-receive mbox)) 03:31:54 Or (let ((channel (make-channel))) (spawn (lambda () (chanel-send channel 'foo))) (spawn (lambda () (write `(got ,(channel-receive channel))) (newline] 03:33:28 Riastradh: Channels and Mailboxes seem to work. 03:33:46 How about placeholders and nacks? 03:34:27 Your SUSPEND code has a bug. 03:34:40 If it is still , anyway. 03:34:41 Placeholders seem to work. 03:35:08 I didn't look closely at first, but you release the suspension token's mutex twice in SUSPEND. 03:35:53 What's the error you see, anyway? 03:35:56 Riastradh: Um, I release once to wait for the condition, and then again when I run the thunk. 03:36:14 Yes, but you have acquired the mutex only once. 03:36:20 The error is returning no values to a continuation that expects one. 03:36:39 Riastradh: I'm not sure what you are getting at. 03:37:03 After CONDITION-WAIT, the mutex is released. Then you release it again by returning from WITH-MUTEX without having acquired it. 03:37:27 CONDITION-WAIT releases the mutex, and then reacquires it before continuing. 03:38:51 Oh, I see. 03:38:51 (That's different from pthread_cond_wait and SRFI 18's MUTEX-UNLOCK!, neither of which acquires the mutex again -- you must explicitly acquire it if you want it.) 03:39:42 Yeah, hm, I wonder what I could have written that would be returning zero values to a single value return context.... 03:39:54 Can you show me all the code implementing the parameters for Chez? 03:40:09 Sure. 03:40:10 -!- _Pb [n=_Pb@75.131.194.186] has quit ["Leaving"] 03:40:12 Also, what does the debugger say about the continuation that received fewer values than it expected? 03:40:29 My interrupts aren't working, so I can't get to it. ;-) 03:40:35 i'm going to fix that. 03:40:37 Interrupts? 03:41:57 Oh! 03:44:10 Riastradh: What is the return value of SLEEP? 03:44:17 Unspecified. 03:46:15 Riastradh: By interrupts I mean that I can't get to the debugger because I can't break the execution of the current thread. 03:46:47 An error in one thread doesn't stop the entire program, so I need to break it manually. At the moment part of my program is stopping that from happening. 03:47:15 That's a bother. Scheme48 doesn't have that bug. 03:47:43 What's a bother, that errors don't cause the rest of the threads to stop? 03:48:01 At least at the REPL, yes. 03:50:53 It appears to be something about my editor, not Chez. 03:54:34 I believe there is a bug in my (pessimistic) implementations of SUSPEND. The suspension token must be locked during the call to PROCEDURE. 03:56:20 Riastradh: The debugger indicates that there was a pending call to 'nullary-procedure', and I think that's where the problem occurs. 04:02:09 arcfide pasted "Misc Stuff" at http://paste.lisp.org/display/86998 04:02:25 arcfide annotated #86998 "Locked Records" at http://paste.lisp.org/display/86998#1 04:02:45 arcfide annotated #86998 "Queues" at http://paste.lisp.org/display/86998#2 04:03:03 Use (CALL-WITH-VALUES NULLARY-PROCEDURE PROCEDURE). 04:03:03 bzzbzz [n=franco@modemcable240.34-83-70.mc.videotron.ca] has joined #scheme 04:03:11 arcfide annotated #86998 "Threading Stuff" at http://paste.lisp.org/display/86998#3 04:03:15 And similarly, (CALL-WITH-VALUES (LAMBDA () (UNARY-PROCEDURE ARGUMENT)) PROCEDURE). 04:03:52 Riastradh: Um...is the way you have them defined not correct? 04:04:13 You copied and pasted the definitions for MIT Scheme, right? 04:04:17 Yes. 04:04:26 Bad thing? 04:04:26 What's not correct is MIT Scheme's implementation of multiple return values. 04:04:33 Oh... 04:04:35 Copy and paste the definitions for Scheme48. 04:04:38 I see. 04:04:40 Okay. 04:06:09 sstrickl [n=sstrickl@pool-151-199-30-68.bos.east.verizon.net] has joined #scheme 04:07:39 -!- patmaddox [n=patmaddo@ip68-4-202-46.oc.oc.cox.net] has quit [Remote closed the connection] 04:14:19 annodomini [n=lambda@pool-141-154-58-196.bos.east.verizon.net] has joined #scheme 04:18:42 Riastradh: Well, that fixed most of it, now the semaphores go through, but some threads are still giving me problems. 04:19:03 dmoerner [n=dmr@69.26.214.2] has joined #scheme 04:21:16 Cowmoo [n=Cowmoo@c-68-55-111-252.hsd1.va.comcast.net] has joined #scheme 04:21:38 You need to fix the definition of SUSPEND so that it immediately locks the token's mutex as soon as it has created the token, rather than locking it before waiting on the condition variable. You also need to unlock it in the if-not-suspended case, just before calling the continuation passed to that. 04:21:56 (This may not be the source of the problem you are observing, but it is a race condition that needs to be fixed.) 04:22:39 -!- luz [n=davids@189.122.90.116] has quit ["Client exiting"] 04:23:04 Let me see if I can do that. 04:23:13 (WITH-MUTEX won't help you here.) 04:24:23 Eh? 04:24:27 Okay.... 04:24:30 *arcfide* examines the code. 04:25:03 is the mutex guaranteed to be acquired in the case of the if-not-suspended call? 04:25:16 Yes. Nobody will have unlocked it. 04:25:57 So I shouldn't release the lock after calling the procedure? 04:26:15 The passed in procedure, second argument to 'suspend'. 04:26:27 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 04:26:41 The second argument to SUSPEND shouldn't touch the mutex. 04:27:03 (It won't, in any of the code I have written -- because none of that code even knows about the mutex.) 04:27:45 No, I mean, you said that WITH-MUTEX won't help here, which I assume means that you can't just wrap the call to PROCEDURE in a WITH-MUTEX form. 04:27:59 That's right. 04:28:03 Why is that? 04:28:22 The mutex must remain locked until the non-suspended continuation is invoked? 04:28:26 Because control enters the IF-SUSPENDED procedure before PROCEDURE returns. 04:28:54 The IF-SUSPENDED procedure needs the mutex to be locked on entry and will leave the mutex unlocked on exit. 04:29:29 Or, control enters the IF-NOT-SUSPENDED procedure, which also leaves the mutex unlocked on exit; and furthermore, the call to the continuation passed to IF-NOT-SUSPENDED must be a tail call with respect to the call to SUSPEND. 04:32:07 No, I suppose there is a way to write it using WITH-MUTEX. 04:33:50 Hrm.... 04:34:37 I'm not sure I understand why I am doing this, but, okay. 04:38:24 arcfide annotated #86998 "Fixed Suspend?" at http://paste.lisp.org/display/86998#4 04:38:33 Riastradh: Is that what you meant? 04:38:34 -!- jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has quit [] 04:39:40 No. 04:39:54 Yeah, no, that's not going to work. :-) 04:40:06 What did you mean? 04:40:17 Riastradh annotated #86998 "SUSPEND for Chez" at http://paste.lisp.org/display/86998#5 04:40:57 Glargh. Scheme48 loses again. 04:41:30 Riastradh: What are these losses in Scheme48? 04:42:00 Scheme48 has no way to atomically unlock and wait. 04:42:40 annodomini [n=lambda@pool-141-154-58-196.bos.east.verizon.net] has joined #scheme 04:44:14 -!- zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has quit [] 04:45:29 The reason is that there is a race between other processes that want to resume the suspension by signalling the condition variable, and your process before it has actually suspended by waiting on the condition variable. 04:46:08 You avoid this by making sure that the suspension token is locked before you put it in any data structures where other processes can see it, and leaev it locked until you wait on the condition variable, which happens atomically with unlocking it. 04:49:24 Okay, that makes sense. 04:49:31 It doesn't fix my problem though. :-) 04:50:09 arcfide annotated #86998 "Bugs!" at http://paste.lisp.org/display/86998#6 04:50:25 Riastradh: I don't know if this is helpful in helping me or not, but I'm not sure where to look here. 04:50:25 What's the bug? 04:50:43 Or, what's the symptom that leads you to believe that there is a bug? 04:50:52 arcfide annotated #86998 "Error" at http://paste.lisp.org/display/86998#7 04:50:57 Riastradh: There you go. 04:51:07 Can you show me all your code, as it is now? 04:51:52 Riastradh: Sure, do you want all the components like last time? 04:51:58 Yes. 04:52:05 New or annotation? 04:52:15 New, to reduce clutter. 04:53:51 arcfide pasted "Misc" at http://paste.lisp.org/display/87000 04:54:04 arcfide annotated #87000 "Locked Records" at http://paste.lisp.org/display/87000#1 04:54:23 arcfide annotated #87000 "Queues" at http://paste.lisp.org/display/87000#2 04:54:41 arcfide annotated #87000 "Threads" at http://paste.lisp.org/display/87000#3 04:54:54 arcfide annotated #87000 "Time Stuff" at http://paste.lisp.org/display/87000#4 04:56:39 Time for printf debugging. 04:56:49 Hehehe. 04:59:02 Isn't it called "format debugging" in these parts? 04:59:42 jcowan: In this case, I will be using Chez's printf shortform of 'format' so, not exactly. 05:01:51 *jcowan* nods. 05:03:02 Well, display+write+newline debugging. Not all of us use SRFI-28. 05:03:10 cornucopic [n=r00t@202.3.77.180] has joined #scheme 05:03:57 Riastradh: If it helps any, I get the same error with #f as I do with #t. 05:04:13 Which thread did the error happen in? 05:04:54 Oh, you're going to make me add the debugging features. :-P 05:04:55 Hang on. 05:06:42 http://www.zeldman.com/2009/07/16/html-5-is-a-mess-now-what/ <- point #1 is relevant 05:07:00 I know, foof. How about we replace HTML 5 by the R7RS? 05:08:13 davazp1 [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 05:09:00 -!- davazp1 [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has left #scheme 05:10:41 Get used to it, d00ds. The barbarians, led by yours truly, are at the gates. 05:11:38 Riastradh: The error happens in the semaphore-test thread. 05:11:40 Do we have time to build the Great Wall of, um... Massachusetts? 05:11:44 "proclaim a new era of loaves and fishes before the oven has even finished preheating" <-- nice phrase 05:12:11 Mm, I don't know, foof. Which side are you on? ("They say in Harlan County / There are no neutrals there") 05:13:16 The left side. 05:14:26 blah, still too sleepy to thing of a clever reply 05:14:33 think of, even 05:14:34 `No, the right side!'? 05:14:57 darn, and you set that up perfectly too 05:15:03 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 05:16:04 BTW, as annoying as it is, I actually have been doing a fair bit of debugging with display+write+newline lately, for quickly switching between implementations. 05:16:53 Actually, you have now crossed to the right side, Riastradh. 05:16:58 Of The River That Flows Both Ways, that is. 05:17:09 How can you be in two places at once when you're not anywhere at all? 05:18:41 Be like Sir Boyle Roche's bird. 05:18:58 ir Boyle Roche, quoting from Jevons play (The Devil of a Wife), said on one occasion in the House, Mr. Speaker, it is impossible I could have been in two places at once, unless I were a bird. 05:19:02 s/ir/Sir 05:19:32 Riastradh: I think I know what is going on. 05:19:40 The expansion of rendezvous-case is wrong I think. 05:19:42 arcfide, I think we're all bozos on this bus. 05:20:06 Maybe not, I don't know. 05:20:17 Well, how does it expand? 05:20:18 Either you're on the bus, or you're off the bus. 05:20:49 Do you have to belong to the Question Authority to wear one of those buttons? 05:22:42 RENDEZVOUS-CASE is an awfully simple macro. It's hard to imagine how it could be wrong. 05:22:56 Riastradh: I bet you I could mess it up. 05:22:57 :-) 05:23:02 Perhaps you have not prepared rendezvous-syntax.scm correctly. 05:24:46 Riastradh: Voila, life is hunky-dory. You see, I define semaphore-test outside of the library, and failed to make visible all the required dependencies. 05:25:06 It works fine if you make sure you have the right forms visible. 05:25:28 Does this mean I've successfully ported over Scheme-CML!? 05:25:42 You mean you edited semaphore.scm? Why? 05:26:02 Riastradh: No, I just copied it out of the file and pasted it into the REPL, since I didn't export semaphore-test. 05:26:11 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Remote closed the connection] 05:26:21 Can't you evaluate code in the environment of a particular library at the REPL? 05:26:52 Probably, but I've never done it. 05:27:03 *foof* is on a skateboard hanging on to the bus with a grappling hook on the bumper 05:27:39 Wow, not too many things remind me of Back to the Future. 05:28:15 So, now I just need to try to come up with some CML rendezvous stuff for sockets. 05:28:57 foof, I'm not sure whether that's better or worse than e1f, who used his iBook to talk on IRC while in the shower. 05:28:57 OK, well, anyway, you've made a start, arcfide. Now I have to push my fixes to a number of race conditions (most of which don't affect you, actually), and you'll have to define one more procedure. 05:29:58 ...once I have debugged them, which will not happen this evening, for it is clearly too late now, and I shall have to let my voice fade out like this and cue the organist in order to go forward into the past^W^W^W^Wbackward into the future to when I do that debugging... 05:30:18 Hmmm... if I could come up with a way to chat while cycling it would be nice. 05:31:00 Riastradh: Bah. :-) Okay, I need to get to bed too. 05:36:14 Oh, happy programmer's day! 05:37:05 -!- arcfide [n=arcfide@adsl-99-50-231-131.dsl.bltnin.sbcglobal.net] has left #scheme 05:39:58 patmaddox [n=patmaddo@75.212.243.8] has joined #scheme 05:45:00 emmy [n=em@cpe-98-14-154-71.nyc.res.rr.com] has joined #scheme 05:48:49 REPLeffect [n=REPLeffe@69.54.115.254] has joined #scheme 06:04:49 zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has joined #scheme 06:07:56 -!- jonrafkind [n=jon@98.202.86.149] has quit [Read error: 60 (Operation timed out)] 06:18:04 skot9000 [n=skot@c-24-5-121-135.hsd1.ca.comcast.net] has joined #scheme 06:18:27 hello! 06:20:14 anyone here in CS61A? 06:20:20 -!- jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has quit ["Leaving"] 06:21:56 -!- mmc1 [n=mima@cs137104.pp.htv.fi] has quit [Read error: 110 (Connection timed out)] 06:27:01 Must be IRC dating hour 06:38:25 -!- skot9000 [n=skot@c-24-5-121-135.hsd1.ca.comcast.net] has quit ["dot.beep.out"] 06:47:12 emma [n=em@unaffiliated/emma] has joined #scheme 06:48:01 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 06:48:28 -!- dmoerner [n=dmr@69.26.214.2] has quit ["Leaving"] 06:54:12 -!- merus [n=merus@pal-176-050.itap.purdue.edu] has left #scheme 06:54:50 -!- kilimanjaro [n=kilimanj@70.116.95.163] has quit [Remote closed the connection] 07:02:10 Jafet1 [n=Jafet@unaffiliated/jafet] has joined #scheme 07:02:23 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 104 (Connection reset by peer)] 07:02:32 -!- Jafet1 is now known as Jafet 07:34:18 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit ["Leaving."] 07:47:02 dzhus [n=sphinx@95-24-103-108.broadband.corbina.ru] has joined #scheme 07:51:47 -!- kssreeram [n=kssreera@122.174.70.188] has quit [Read error: 104 (Connection reset by peer)] 07:52:02 kssreeram [n=kssreera@122.174.70.188] has joined #scheme 07:52:28 -!- kssreeram [n=kssreera@122.174.70.188] has quit [Read error: 54 (Connection reset by peer)] 08:19:44 -!- antoszka [n=antoszka@unaffiliated/antoszka] has quit ["+++ killed by SIGSEGV +++"] 08:46:51 -!- Darki is now known as Dark-Star 08:50:01 kssreeram [n=kssreera@122.174.70.188] has joined #scheme 08:54:04 -!- dzhus [n=sphinx@95-24-103-108.broadband.corbina.ru] has quit [Remote closed the connection] 08:57:00 -!- zanes [n=zane@c-76-24-24-236.hsd1.ma.comcast.net] has quit [] 08:57:11 masm [n=masm@85.240.95.186] has joined #scheme 09:00:01 -!- xwl_ [n=user@147.243.236.60] has quit [Read error: 104 (Connection reset by peer)] 09:00:13 xwl_ [n=user@147.243.236.60] has joined #scheme 09:07:03 -!- Summermute [n=scott@c-68-34-67-216.hsd1.dc.comcast.net] has quit [Read error: 110 (Connection timed out)] 09:25:41 -!- stepnem [n=stepnem@88.103.132.186] has quit [SendQ exceeded] 09:27:01 stepnem [n=stepnem@88.103.132.186] has joined #scheme 09:31:01 -!- stepnem [n=stepnem@88.103.132.186] has quit [Excess Flood] 09:32:10 stepnem [n=stepnem@88.103.132.186] has joined #scheme 09:36:17 Jafet [n=Jafet@unaffiliated/jafet] has joined #scheme 10:15:23 -!- ve [n=a@94-193-95-252.zone7.bethere.co.uk] has quit [Read error: 110 (Connection timed out)] 10:16:18 ve [n=a@94.193.95.252] has joined #scheme 10:45:10 -!- cornucopic [n=r00t@202.3.77.180] has quit ["so long.."] 11:04:31 -!- rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has quit [Read error: 104 (Connection reset by peer)] 11:05:12 rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has joined #scheme 11:05:22 Nshag [i=user@Mix-Orleans-106-3-113.w193-248.abo.wanadoo.fr] has joined #scheme 11:08:59 hkBst [n=hkBst@gentoo/developer/hkbst] has joined #scheme 12:01:59 -!- rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has quit [Read error: 104 (Connection reset by peer)] 12:02:35 rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has joined #scheme 12:03:34 -!- Pepe_ [n=ppjet@82.123.221.147] has quit [Remote closed the connection] 12:04:51 Edico [n=Edico@unaffiliated/edico] has joined #scheme 12:08:01 morning all 12:14:14 MrFahrenheit [n=RageOfTh@users-120-114.vinet.ba] has joined #scheme 12:15:02 is there a complete reference to the web-server module hierarchy ? if so, where? 12:26:51 -!- araujo [n=araujo@gentoo/developer/araujo] has quit ["Leaving"] 12:47:06 jeapostrophe [n=jay@69.169.141.110.provo.static.broadweavenetworks.net] has joined #scheme 12:52:11 mmc1 [n=mima@cs137104.pp.htv.fi] has joined #scheme 12:54:08 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 13:04:06 -!- rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has quit [Read error: 104 (Connection reset by peer)] 13:04:06 Jafet1 [n=Jafet@unaffiliated/jafet] has joined #scheme 13:04:16 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Nick collision from services.] 13:04:18 -!- Jafet1 is now known as Jafet 13:08:59 luz [n=davids@189.122.90.116] has joined #scheme 13:16:30 dmoerner [n=dmr@multilink.greenhill.org] has joined #scheme 13:20:59 rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has joined #scheme 13:23:30 -!- rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has quit [Read error: 104 (Connection reset by peer)] 13:31:25 rstandy [n=rastandy@net-93-144-217-229.t2.dsl.vodafone.it] has joined #scheme 13:55:50 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 14:03:22 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 14:12:28 rouslan [n=Rouslan@pool-70-109-151-129.cncdnh.east.myfairpoint.net] has joined #scheme 14:17:03 npe [n=npe@94-224-251-223.access.telenet.be] has joined #scheme 14:19:42 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Read error: 104 (Connection reset by peer)] 14:20:02 -!- kssreeram [n=kssreera@122.174.70.188] has quit [] 14:20:30 kssreeram [n=kssreera@122.174.70.188] has joined #scheme 14:21:35 -!- rouslan [n=Rouslan@unaffiliated/rouslan] has quit [Remote closed the connection] 14:23:15 alaricsp [n=alaricsp@relief.warhead.org.uk] has joined #scheme 14:32:25 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 14:32:38 albacker [n=eni@unaffiliated/enyx] has joined #scheme 14:35:09 sepult [n=levgue@xdsl-87-78-29-222.netcologne.de] has joined #scheme 14:41:23 -!- albacker [n=eni@unaffiliated/enyx] has quit ["Leaving"] 14:54:44 It would be awfully nice if someone wrote a code coverage tool for Scheme48. 15:14:29 -!- sepult [n=levgue@xdsl-87-78-29-222.netcologne.de] has quit [No buffer space available] 15:17:43 annodomini [n=lambda@pool-141-154-58-196.bos.east.verizon.net] has joined #scheme 15:20:38 zeroish [n=zeroish@135.207.174.50] has joined #scheme 15:21:27 jonrafkind [n=jon@98.202.86.149] has joined #scheme 15:22:14 -!- dmoerner [n=dmr@multilink.greenhill.org] has quit [Read error: 110 (Connection timed out)] 15:22:44 albacker [n=eni@unaffiliated/enyx] has joined #scheme 15:23:21 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 15:23:48 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 15:34:10 -!- patmaddox [n=patmaddo@75.212.243.8] has quit [Read error: 145 (Connection timed out)] 15:35:42 dmoerner [n=dmr@multilink.greenhill.org] has joined #scheme 15:37:50 jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has joined #scheme 15:38:19 Is there any reliable way to tell how many distinct precisions of inexact numbers a Scheme implementation supports? 15:38:40 -!- joast [n=rick@76.178.178.72] has quit ["Leaving."] 15:39:46 You mean how many bits in the mantissa? 15:44:35 Or how many internally distinct types of inexact numbers (e.g. hypothetically using both 32-bit and 64-bit floats in different places in the same implementation)? 15:45:25 The latter, specifically with reference to R5RS 6.2.4 and the floating-point exponent letters s, d, f, l. 15:45:36 I would have thought that eqv? would do the job, but it doesn't. 15:47:33 Do any implementations actually have multiple precisions? 15:49:07 offby1` [n=user@q-static-138-125.avvanta.com] has joined #scheme 15:49:58 rudybot_ [n=luser@q-static-138-125.avvanta.com] has joined #scheme 15:50:21 jcowan, maybe you could use the precision procedure from r6rs page 16 with different exponent letters? 15:51:19 no idea if it's guaranteed to work... 15:51:52 Thanks. I should have said "R5RS Scheme" 15:52:29 What I'm trying now is to take a monstrously precise number, pi to 1000 digits, in the 5 forms, and then see which ones are = to each other. 15:52:32 -!- Mr_Awesome [n=eric@c-98-212-143-245.hsd1.il.comcast.net] has quit [Remote closed the connection] 15:52:34 -!- masm [n=masm@85.240.95.186] has quit [Remote closed the connection] 15:53:03 Presumably it will get truncated in all forms except perhaps l (if anyone does variable-length flonums), but differently in Schemes that work so. 15:55:28 there's nothing r6rs specific about that procedure 15:55:30 -!- annodomini [n=lambda@wikipedia/lambda] has quit [] 15:56:15 weinholt pasted "precision" at http://paste.lisp.org/display/87014 15:58:20 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from services.] 15:58:29 sladegen [n=nemo@unaffiliated/sladegen] has joined #scheme 16:02:27 -!- jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has quit [Read error: 60 (Operation timed out)] 16:04:11 -!- rudybot [n=luser@q-static-138-125.avvanta.com] has quit [Read error: 110 (Connection timed out)] 16:04:31 -!- offby1 [n=user@pdpc/supporter/monthlybyte/offby1] has quit [Read error: 110 (Connection timed out)] 16:07:05 -!- offby1` is now known as offby1 16:09:37 -!- dmoerner [n=dmr@multilink.greenhill.org] has quit [Read error: 110 (Connection timed out)] 16:15:13 -!- Jafet [n=Jafet@unaffiliated/jafet] has quit [Read error: 60 (Operation timed out)] 16:17:38 jcowan [n=jcowan@cpe-74-68-154-139.nyc.res.rr.com] has joined #scheme 16:18:32 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 16:19:31 choas [n=lars@p5B0DE044.dip.t-dialin.net] has joined #scheme 16:19:57 Okay. 16:20:42 -!- choas [n=lars@p5B0DE044.dip.t-dialin.net] has quit [Client Quit] 16:21:18 I've tested the 1000-digit numbers in five precisions against PLT, Gauche, MIT, Bigloo, scsh, guile, kawa, SISC, and Petite Chez, and gotten either "they are all the same" or "what is this 3.14...s0 jazz?" responses 16:21:23 choas [n=lars@p5B0DE044.dip.t-dialin.net] has joined #scheme 16:21:40 -!- choas [n=lars@p5B0DE044.dip.t-dialin.net] has quit [Client Quit] 16:21:52 So it looks like this feature of R5RS is thoroughly obsolete. Either my tests are flawed, or Schemes support only one precision of inexact numbers. 16:22:34 I wonder why that is. 16:23:07 I suspect because there's not much point in using anything but C doubles, unless you are a numerical maniac. 16:24:12 I could imagine at least one advantage to supporting 32-bit short floats: they can be passed around unboxed on a 64-bit word size host. 16:25:13 *jcowan* nods. 16:25:35 It's a little too soon, though, to see Schemes built from the ground up for 64 bits only. 16:25:42 Do any Schemes implement arbitrary-precision floats ala CLISP? 16:26:10 I don't think so, or my tests would have shown it -- unless they use some other magic notation rather than 3.1459...L0 16:26:12 Why is this soon? I believe that SBCL and other 64-bit CLs do pass SINGLE-FLOATs unboxed. 16:26:48 Single is the default precision in CL (I think), but in Scheme it's either double or long or both. 16:27:15 Single is the default default precision in CL, yes. 16:27:21 The default precision is user-settable. 16:27:24 That is 1.0e0 means 1.0d0 or 1.0l0; it cannot mean 1.0s0 or 1.0f0 if those are distinct. 16:27:35 (in R5RS) 16:28:13 CL implementations are not required to make short- and long-floats distinct. They could provide just one precision. 16:28:19 Nor is Scheme 16:28:51 there are 8 possible cases, depending on the three binary parameters s=f, f=d, and d=l (which I have just invented). 16:29:02 Then it occurred to me to wonder if anyone actually, like, cares. 16:29:20 s/binary/boolean 16:29:44 8? Interesting; there are only 6 possible cases in CL, I think. 16:29:45 clhs short-float 16:29:45 http://www.lispworks.com/reference/HyperSpec/Body/t_short_.htm 16:29:56 Mr_Awesome [n=eric@c-98-212-143-245.hsd1.il.comcast.net] has joined #scheme 16:30:34 Oh, sorry, only 5. 16:31:03 No, six. They don't call out the case of all being distinct, because that's implicit. 16:31:39 I must be counting wrong. There is one way of having all the types be the same, two ways of having two distinct types, two ways of having three distinct types, and one way of having four distinct types. 16:31:43 Oh, that is six. 16:31:49 *chandler* thwaps self upside the head. 16:31:50 patmaddox [n=patmaddo@232.sub-75-212-182.myvzw.com] has joined #scheme 16:32:18 -!- ski_ [n=md9slj@remote1.student.chalmers.se] has quit ["Lost terminal"] 16:32:47 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 16:34:12 -!- rapacity [n=prwg@unaffiliated/rapacity] has quit ["Lost terminal"] 16:35:39 So they don't allow the cases "short = single = double, long" or "short, single = double, long", both of which seem completely natural to me. 16:36:13 namely "doubles and arbitraries" and "immediates, doubles, and arbitraries" at the implementation level. 16:36:42 I wonder if that was deliberate or just an oversight. 16:37:52 I'll translate my code into CL (trivial) and run it against several to see what happens. 16:38:00 s/several/several CLs 16:39:18 I always feel faintly guilty that I just handwave about floating-point numbers in PL design, for I have a strong impression that, for some people, being able to do consistently repeatable FP (rather than just "as much precision as I can have, please") is important, although I'm not sure why 16:40:16 Personally, I feel that FP should just be used for "engineering quantities" from the real world that therefore have error margins to begin with... but, hearsay has it, some people really do care about getting precise IEEE single-precision float semantics sometimes 16:40:25 Who are these people? What is their actual need? Should we worry about this? 16:40:29 (keeps me awake at night) 16:41:07 People who have monstrous homogeneous arrays full of single-floats, to begin with. 16:41:23 True, people for whom 32 bits per float is a heavy cost 16:41:34 steiger [n=steiger@189.105.104.187] has joined #scheme 16:41:38 Originally C did all FP arith in double (the first instruction of every PDP-11 C program put the FPP in double mode, and the kernel relied on you never changing it back) 16:41:39 But srfi-4 can give that while the implementation itself still thinks in terms of big floats 16:41:53 Well, you know the sandpile maxim of FP arithmetic? 16:41:54 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit [Remote closed the connection] 16:41:59 With a bit of messy conversion 16:42:00 I do not, know 16:42:04 "Every time you move one, you get a little less sand and a little more dirt." 16:42:24 Single-float arithmetic keeps better precision than widening everything to double and then force-truncating it back to single when you store it. 16:42:30 Interesting 16:43:00 So if the original numbers are correct to within one ulp (bit in the last place), 16:43:16 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 16:43:25 when you multiply them, you get errors on the order of 2 ulps. Single-float logic will give you back that ulp. 16:43:38 ski_ [n=md9slj@remote1.student.chalmers.se] has joined #scheme 16:43:42 It's easy to find operations that start with good-enough accuracy and come out with all bits garbage. 16:44:08 I see. It has some mechanism in the lower-order bits that is "aware" of the shortage of precision there, and avoids making it worse, while converting to doubles "overspecifies" the lower-order bits and makes things worse? 16:44:15 Just so. 16:44:18 *nod* 16:44:31 Hmmmkay, worth implementing, then ;-) 16:44:34 Thanks 16:44:48 If you are a numerical weenie (aka "scientific programmer") then yes. 16:45:44 C '89 and C++ imposed strict rules: if the numbers are single floats, the math must be single-float too, at the expense of doubling the number of library calls in C. 16:46:07 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 16:46:20 I just installed Gambit (an oversight) and tested. Same damn thing. 16:46:28 I know some of these scientific programmer types, but they all seem to know less about the implementation side of it than I do, and "just do what the manual says" wrt. numerical issues without any idea why, when I asked ;-) 16:46:56 Chibi has optional immediate floats, but that's a fixed compile-time option. 16:48:19 And it's not 32-bit floats in 64-bit tagged words, it's n-4 bit floats, which is weird and gives surprising results, so I may drop support for it. 16:48:27 (I was just curious when I implemented it.) 16:51:07 skinnylover [n=chatzill@195.238.188.231] has joined #scheme 16:52:20 If you are just clearing out the 4 bits and using native float operations, that will not work. 16:52:25 Notoriously so. 16:53:04 I've heard talk of tagging systems that make all non-float values look like IEEE NaNs, relatedly 16:53:12 *jcowan* too. 16:54:08 I've now tested CLs: ABCL, CCL, CMUCL, ECL, and SBCL all take the short=single, double=long view. 16:54:12 In CLisp they are all different. 16:54:29 *jcowan* examines CLisp doco 16:54:40 jcowan: Why not? I'm clearing out only the least significant mantissa bits. 16:56:58 See the discussion above about over-specificness. The error represented by those zero bits will grow and multiply and eat your program's accuracy down to nothing. 16:57:47 araujo [n=araujo@gentoo/developer/araujo] has joined #scheme 16:57:48 As opposed to the error represented by the next four bits that wouldn't fit into the native precision to begin with? 16:57:56 Ah. On CLisp, single and double are IEEE, long is 32-bit exponents with variable-length mantissas, and short is a 25-bit format done in software. 16:58:12 foof: Yes 16:59:04 Oh, you mean because I'm not doing any rounding? 17:01:29 Yes. 17:03:13 *alaricsp* dreams of mainstream CPUs bringing back tagged arithmetic instructions 17:03:25 -!- Dark-Star [i=Darkstar@p57B55CAE.dip.t-dialin.net] has quit [] 17:03:46 I wonder what percentage of code executed these days is from dynamic languages? Particularly on servers... 17:03:57 You'd think it a valuable market to suck up to. 17:04:26 You think a newcomer can compete with the x86 on price and performance? 17:04:38 No, I mean Intel/AMD add the damned things 17:05:15 to x86 17:07:58 Phaze [n=PhazeDK@93.163.43.22] has joined #scheme 17:13:05 -!- Cowmoo [n=Cowmoo@c-68-55-111-252.hsd1.va.comcast.net] has quit [Remote closed the connection] 17:17:49 dmoerner [n=dmr@multilink.greenhill.org] has joined #scheme 17:18:02 -!- dmoerner [n=dmr@multilink.greenhill.org] has quit [Client Quit] 17:24:07 There is no market, only monoculture 17:33:19 *jcowan* tests the infamous quadratic formula problem a=1, b=-20000, c=1 against various CLs. They all get it wrong. 17:34:11 The two roots differ by about 10e-4, but in less than IEEE double precision, that is completely lost, given the naive implementation of the quadratic formula. 17:34:18 They all report 20000 and 0, which is absurd. 17:35:02 If the second root were 0, we'd have 1*0^2 + -20000*0 + 1 = 0, or 1 = 0. 17:35:33 Yay for 1 = 0, the cornerstone of angry-wife logic! 17:35:37 So you have to say (quad 1d0 -20000d0 1d0) to get it right. 17:35:48 *jcowan* bets that all Schemes get this right. 17:36:27 Were we lesser men, this could be twisted into a press release about the superiority of Scheme. Sigh. 17:36:41 *foof* starts typing 17:37:58 *My* wife never asserts 1 = 0 no matter how angry she gets. 17:39:14 mreggen_ [n=mreggen@cm-84.215.28.167.getinternet.no] has joined #scheme 17:40:52 _Pb [n=Pb@75.131.194.186] has joined #scheme 17:44:13 Yes, most Schemes do get it right, showing that their sole FP type is IEEE double. 17:44:29 MIT does not like you to type multiple-valued expressions at the REPL, for some reason. 17:46:53 It just returns a closure. 17:47:00 And Bigloo will only print the first value. 17:47:57 All of petite, mzscheme, scsh, guile, kawa, sisc, csi, and gsi get it right and print both values. 17:48:31 And so does chibi, modulo its representation of multiple values. 17:48:58 *jcowan* wins! 17:49:31 -!- mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has quit [Read error: 110 (Connection timed out)] 17:49:32 *jcowan* wishes, BTW, that MIT Scheme didn't hog the name "scheme" for its executable. 17:50:00 When I type "lisp" I get told what CLs I have installed, but I have to type "schemes" for the same effect. 17:50:19 debian? 17:50:35 Ubuntu. 17:50:40 But "lisp" and "schemes" are local aliases 17:50:43 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 17:50:47 maintained by hand. 17:51:00 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 17:51:07 Oh, they don't use the alternatives mechanism? 17:51:29 alias mitscheme=/usr/bin/scheme; alias scheme=...? 17:52:09 No. 17:52:13 er, 17:52:20 foof: No; elly: I could. 17:52:35 $ schemes 17:52:37 Try mzscheme, gosh, scheme, gsi, csi, bigloo, scsh, guile, kawa, sisc, petite, or chibi-scheme. 17:52:57 That also reminds me that you can't get to Gauche by typing "gauche". 17:53:11 Yeah, that was probably a mistake. 17:53:46 dysinger [n=dysinger@adsl-99-8-229-230.dsl.pltn13.sbcglobal.net] has joined #scheme 17:54:16 $ lisp 17:54:16 Try abcl, ccl, clisp, cmucl, ecl, sbcl, or Heckle and Jeckle. 17:55:02 File a bug report. MIT should be installed as mit-scheme. 17:55:12 Okay. 17:55:15 Try mzscheme, gosh, mit-scheme, gsi, csi, bigloo, scsh, guile, kawa, sisc, petite, or chibi-scheme. 17:55:20 jcowan: Does (setf *read-default-float-format* 'double-float) fix your CL problem? 17:55:23 Actually, I loaded that direct, not via apt-get. 17:55:30 chandler: Presumably. 17:55:59 In retrospect, having single-float be the default default was the wrong decision, but at the time, it probably made sense. 17:56:04 At least it is only the default default, not the default. 17:56:06 It suggests, though, that the default default should be changed, if such a simple formula with such small arguments (fixnums, indeed) produces such rubbish. 17:56:30 Actually, maybe it doesn't. 17:56:32 Oh. If you arguments are fixnums, the read default can't be the issue. 17:56:35 Right. 17:56:44 It's the fact that sqrt returns single-floats given exact arguments. 17:57:03 This probably has to do with the ANSI rules of float contagion and the rules of float substitutability. 17:57:07 clhs sqrt 17:57:08 http://www.lispworks.com/reference/HyperSpec/Body/f_sqrt_.htm 17:57:12 clhs 12.1.3.3 17:57:12 http://www.lispworks.com/reference/HyperSpec/Body/12_acc.htm 17:58:01 Indeed. So that's the trouble. 17:58:31 Right. Basically, if you are expecting double-everywhere semantics in CL, the sensible thing to do is probably to create a DOUBLE-CL package that shadows and redefines the functions listed in table 12-8 to upgrade rational arguments to double floats before calling the actual function. 17:59:05 ... and to set *READ-DEFAULT-FLOAT-FORMAT* to DOUBLE-FLOAT. 17:59:15 *jcowan* nods. 17:59:28 (Amazing how you can tell a robocaller from just one syllable after a while.) 17:59:39 Then the rule of floating point contagion will work in your favor (though I'm not convinced that upgrading from lower-precision to higher-precision types really is the right decision. I think the CLISP authors also feel the same way.) 18:00:09 I think that was an invalid parenthetical splice. 18:00:30 I've seen such things before, though they are a little odd. 18:00:56 I'd change the first . to ; and move the second . out of the parens if I were copy-editing it. 18:01:06 Right, me too. 18:02:23 fschwidom [n=fschwido@p5B269F6D.dip0.t-ipconnect.de] has joined #scheme 18:02:50 Hmm. 18:03:09 My take is that when you are forced to go from exact to inexact values, you should get the most precise available kind of inexact value; in CL terms, a long-float. 18:03:43 That might lead to bad performance in CLisp, though. 18:05:05 Well, there's no upper bound on the most precise kind of float available in CLISP. :-) 18:05:15 Or maybe there is, and that upper bound is user-settable. 18:05:51 I would agree with that statement in general. But should (* 0.5s0 0.5d0) return a single or a double float? 18:06:12 That's a different question, about contagion within floats rather than between rationals and floats. 18:06:53 Right. That's the rule of floating point contagion I mentioned earlier as being an area where Bruno Haible disagrees with the ANSI authors (and I'm inclined to believe that he has good reasons for doing so). 18:08:22 A language I'm playing with now sorta reverts to Fortran II rules: no implicit numerical conversions at all. 18:08:37 If you want u16, or s32, or single-float, cast! 18:09:20 u16_var + u8_var = compile-time error 18:09:38 Is u16_var + u16_var an explicitly modular operation? 18:09:58 Yes. The language comes out of the C tradition, but with many changes. (I didn't invent it.) 18:10:04 What is the language? 18:10:13 Classified, sorry. 18:10:32 OK. 18:11:44 I hope there will be a public release this year or early next. It's very interesting for many reasons. 18:12:38 arcfide [n=arcfide@adsl-99-50-231-131.dsl.bltnin.sbcglobal.net] has joined #scheme 18:12:51 Is this "Classified" as in US Gov't, or "Classified" as in NDA'd? 18:13:11 The latter. 18:13:35 I have no USG clearances, and I only know what every Google employee can know. 18:13:44 Ah. :-) 18:13:49 (And not all of that.) 18:14:15 *chandler* is intrigued by this, but will evidently have to wait and see. 18:14:20 I was very annoyed a while back when someone mentioned Google Chrome on a mailing list, because that put me in position of material non-public information. 18:14:36 s/position/possession 18:14:43 And I could have used the cash. 18:14:53 We are all in that position. 18:15:05 Though not all of our secrets are worth paying for. :-) 18:15:30 RageOfThou [n=RageOfTh@users-120-185.vinet.ba] has joined #scheme 18:16:00 kilimanjaro [n=kilimanj@70.116.95.163] has joined #scheme 18:16:18 For what it's worth, I have been dallying with a programming language that sort-of follows that rule, except that upcasts are allowed. (Integer types of any range can also be defined: you could have an integer type whose range is 2 to 13, for instance.) 18:17:17 :o 18:18:02 how about a prime type? or a pentagonal number type? 18:18:46 No; I only have ranges for now. The purpose is to prove the safety of array subscript operations. Yes, you can also have an array whose valid indices are from 2 to 13. 18:19:07 you're checking this statically? :o 18:19:11 Yes. 18:19:20 interesting 18:20:02 The problem with upcasts is, which way is up? 18:21:22 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 18:21:32 A cast from type A to type B is an upcast if A is a subtype of B - at least that's how I was using the term. 18:21:34 One of the differences between old C and C '89 is what happens when an unsigned number meets a signed one, and they may or may not be of different precisions. 18:22:23 Right. I don't even have floats right now. 18:22:29 I'm only working with exact integers. 18:23:15 *chandler* wanders off to find some food. 18:27:08 Riastradh: How's the pushing coming? 18:29:06 -!- _Pb [n=Pb@75.131.194.186] has quit ["Leaving"] 18:31:52 chandler: http://www.lysator.liu.se/c/rat/c2.html, section 3.2.1.1 of the ANSI C rationale, explains where the problem arises and the two kinds of promotion rules, signedness-preserving and and value-preserving. 18:32:05 -!- MrFahrenheit [n=RageOfTh@users-120-114.vinet.ba] has quit [Read error: 110 (Connection timed out)] 18:39:39 sepult [n=levgue@87.78.72.199] has joined #scheme 18:40:12 Hmm, I'm thinking that make-list should be promoted from SRFI-1 to small Scheme, for the sake of consistency. I'm always annoyed when it doesn't exist and I have to define it. 18:40:41 vector:string:list::make-vector:make-string:??? 18:41:25 yip 18:41:25 make-pair 18:42:13 make-love-not-strings! 18:42:33 make-lists-not-fists 18:44:43 masm [n=masm@85.240.95.186] has joined #scheme 18:47:24 jcowan: In this toy language, there is no general concept of "signedness" - and I don't think either of those promotion rules applies, since the underlying integer type representation is unbounded (and thus there is a supertype of the equivalents of C's signed long and unsigned long. 18:47:32 +) 18:47:40 -!- sepult [n=levgue@87.78.72.199] has quit [Remote closed the connection] 18:48:06 chandler: I sent you a note about Chez's gensym operation. Gensyms which are never printed or whose representations are neve required will never be able to collide with other symbols. 18:48:36 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 18:48:50 chandler: I think that there is a small possibility of collision otherwise, but very unlikely. 18:49:17 arcfide: The point I was making is that the required property is that the gensym not be eq? to any existing symbol. I believe that Chez holds to that property. 18:49:42 Is that really enough? 18:49:43 Thus, it doesn't matter that the gensym may be written and read. 18:50:01 I thought gensyms had to be not eq? to any symbol existing or creatable in future. 18:50:15 For the lexically surrounding purposes, yes. I don't remember the context anymore. 18:50:20 chandler: I also don't think it should be eq? to future symbols. 18:50:40 arcfide: If that "future symbol" is returned from `read', it certainly can be. 18:51:12 You don't need to tack on a statement about the future. If each return value from (gensym) is not eq? to any previously created symbol, then it will not be eq? to any symbol created by (gensym) in the future. 18:51:26 chandler: Unless you generated the representation from an old symbol (in which case it had already been generated and is not a new symbol), it should not be possible. 18:52:08 (eq? (gensym) (read )) should never be true. 18:53:37 Does Chez have a stepper? 18:53:44 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 18:54:02 chandler: Stepper? Ah, not in the usual sense. You usually just have to put (BREAK) where you want them. 18:54:19 At least, I'm not aware of any stepper. :-) 18:54:43 chandler: You might be able to simulate it with trace. 18:54:46 What's more, (eq? (gensym) (string->symbol foo)) should be false for any foo. 18:54:57 jcowan: Yes. 18:55:07 ... Yuck. 18:55:08 > (let ((g (gensym))) (cons g (eq? g '#{g4 q8fbeb8bz4htowm-e}))) 18:55:08 Error in intern-gensym: unique name "q8fbeb8bz4htowm-e" already interned. 18:55:12 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 18:55:24 Well, then, just skip it and generate a new name! 18:55:28 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 18:55:56 Huh?? 18:56:18 How exactly did you get yourself to that? 18:56:36 By observing the sequence in the printed representations of several gensyms. :-) 18:56:56 chandler: Well, that's balogne. 18:57:00 :-) 18:57:10 I'm surprised that it gives you that error, though. 18:58:28 -!- leppie [n=lolcow@41.244.199.242] has quit [Read error: 131 (Connection reset by peer)] 18:59:05 leppie [n=lolcow@41.244.199.242] has joined #scheme 18:59:42 chandler: Can you share the session that you followed to get that? 19:01:22 chandler pasted "complete session" at http://paste.lisp.org/display/87021 19:03:10 FYI, it's *not* the call to `gensym' that failed, but the attempt to print the symbol. 19:03:53 chandler annotated #87021 "a simpler demonstration" at http://paste.lisp.org/display/87021#1 19:04:19 Yes, so I might consider this a bug. 19:04:45 Because that should update the interning stuff that Chez uses, and you should get a new thing. 19:05:31 I'm sure it is a bug :-) 19:05:55 Hmm. 19:06:06 For what it's worth, there's no pattern I can see to the printed gensyms that Ikarus produces. 19:06:18 What is #{...} 19:06:20 ? 19:07:14 I suspect the interning is happening on the re-read. 19:07:27 jcowan: It's Chez Scheme's gensym syntax. 19:07:35 It allows gensyms to be printed and reread. 19:07:46 chandler: I've sent a note to Kent. It should get fixed. :-) 19:08:00 jcowan: I think you forgot to start Gambit in hygienic mode. 19:08:32 arcfide: I could've sworn I sent him mail about this about five years ago... Oh well. I certainly don't have my sentbox from back then. 19:08:34 chandler: I've actually been surprised by the number of hygiene issues you pointed out (disregarding the PLT/Chez discrepency). 19:09:11 -!- patmaddox [n=patmaddo@232.sub-75-212-182.myvzw.com] has quit [Read error: 110 (Connection timed out)] 19:09:15 chandler: Well, if he doesn't consider this a bug, I might like to hear his support of why it isn't. 19:09:21 I doubt that one could argue for that, though. 19:09:31 Likely I never sent the email, or he never got around to reading it (or fixing it). 19:09:50 Re hygiene, me too. This is Tricky Stuff. As I said, `syntax-case' seems to encourage implementors to actually get the details right. 19:09:54 I think it would be a pretty obscure and unusual use case that would lead to this bug in normal code. 19:10:24 Oh, fo sho! But seeing a sequence like this in printed gensyms is an invitation to try to break it. :-) 19:10:44 Indeed, and Chez Scheme's reputation is at stake. It is supposed to be the stable Scheme. ;-) 19:12:17 chandler: A lot of implementations use portable syntax-case, either from Kent or Aziz's updates to it. 19:12:27 Navid [n=chatzill@S0106002129b81fbd.vn.shawcable.net] has joined #scheme 19:12:35 I suspect the best, if not the easiest, fix would be to make the external representation print a string instead of a symbol. 19:12:43 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 19:12:46 jcowan: Oh no! 19:12:48 :-P 19:13:00 Anyway, does "stable" mean "bug for bug compatible"? 19:13:12 jcowan: I don't think it's wrong in general to have readable gensyms, so long as they follow the properties that arcfide and I talked about. 19:13:16 As I've argued before, gensyms are just strings that answer #t to symbol? anyhow. 19:13:22 It can certainly make some kinds of debugging either. 19:13:46 er, "easier". 19:13:50 jcowan: I would say stable means that I can rely on it working well, according to documentation and written expectations, and doing so in a predictable fashion without unexpected results. 19:14:10 -!- Navid [n=chatzill@S0106002129b81fbd.vn.shawcable.net] has quit [Client Quit] 19:14:17 chandler: I had occassion to turn on the gensym printing for the first time in a while the other day for debugging. 19:14:31 jcowan: Gensyms are different than that. 19:14:39 How? 19:14:50 jcowan: They don't have to be interned, and so they don't have to have any string representation for most cases, making them more effecient. 19:15:08 Chicken has string->uninterned-symbol, but the resulting symbol does not know it is uninterned, and prints its name just like a normal symbol. 19:15:29 jcowan: In Chez Scheme, a gensym takes the place of uninterned symbols. 19:15:32 Okay, a tad more space efficiency, say 4 bytes. 19:15:45 jcowan: There is also garbage collection effeciency, I believe. 19:16:06 Surely 2^32 rereadable gensyms should be enough for everyone. 19:16:36 Is there any meaningful way in which Scheme symbols are "interned", except as an implementation technique? There's no way to retrieve the set of interned symbols, as there is in CL. 19:16:38 *arcfide* chuckles. 19:17:00 Would I know if the implementation was reaping symbols behind my back? 19:17:05 Do any implementations do this now? 19:17:12 jcowan: Additionally, I fully consider strings to be mutable objects, whereas I expect symbols to be immutable. 19:17:14 Chicken does if you set a run-time switch. 19:17:19 #;1> (define x (string->uninterned-symbol "foo")) 19:17:19 #;2> x 19:17:19 foo 19:17:19 #;3> (eq? x 'foo) 19:17:19 #f 19:17:50 Calling gensym in Chicken returns uninterned symbols named g0, g1, .... 19:17:59 Probably the fixnum limit is the upper bound. 19:18:03 jcowan: If you use lot's of gensyms, then it makes sense to have them effecient. Chez Scheme uses lots of them, I imagine. 19:18:33 *jcowan* nods. 19:19:11 jcowan: Anyways, symbols really are atomic units. They aren't really meant to be exploded in the normal case. Strings are, I think, expected to be constantly decomposed. 19:19:24 Or composed. 19:19:27 Both Scheme48 and MzScheme reap symbols. 19:19:38 chandler: What do you mean by reaping symbols? 19:19:59 (let loop ((n 0)) (if (symbol? (string->symbol (number->string n))) (loop (+ n 1)) #f)) uses a bounded amount of memory. 19:20:03 Garbage collecting them. 19:20:33 Doing that requires weak references, at least under the covers, or a special hack in the GC. 19:20:33 Oh, yes, then Chez Scheme reaps gensyms too. 19:20:52 chandler's asking about ordinary Scheme symbols, not gensyms. 19:20:57 chandler: Also, Chez Scheme has OBLIST which returns a list of interned symbols. 19:21:10 And it makes () self-evaluating, boo. 19:21:37 jcowan: Yes, that was an interesting find. :-) 19:22:11 chandler: In Chez Scheme, if a symbol can be determined not to have any top-level bindings to it, and has no property list, it can be reclaimed. 19:22:34 Ah, property lists. 19:23:00 I convinced Felix to provide those by default; nobody's going to use a feature that requires you to recompile Chicken. 19:23:04 jcowan: ... what's this about () being self-evaluating? 19:23:14 In Chez, () is self-evaluating. 19:23:15 chandler: In Chez Scheme, () is self-evaluating. 19:23:25 -!- blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has quit [] 19:23:44 ... Oh. Somehow I read jcowan's statement as an implication that () must be self-evaluating if symbols are reaped, which confused the heck out of me. 19:23:50 Hmm, maybe that's been fixed. Doesn't seem to show up in Petite 7.9.3 19:24:12 blackened` [n=blackene@ip-89-102-28-224.karneval.cz] has joined #scheme 19:24:12 jcowan: Ack! No!!! My self-evaluating ()s!!!! 19:24:17 *arcfide* weeps and mourns their death. 19:24:38 -!- leppie [n=lolcow@41.244.199.242] has quit [] 19:24:44 Now look what I've done. 19:24:46 Wait, does that mean that something *good* came out of R6RS? 19:24:47 *arcfide* gasps. 19:24:59 Arcfide weeps, leppie quits, arcfide gasps, when will it ever end? 19:25:09 Wait... 19:25:17 *jcowan* waits. 19:25:21 Bah.... 19:25:41 Nope, well and truly gone. 19:25:59 I thought for a moment that I could enable a special syntax reader in Chez to get them back, but that doesn't seem to be the case. 19:26:43 The MacLisp OBLIST just reminded me of self-eval (), chandler. No logical connection between the two. 19:27:03 I actually think the CL rule is better, but that's just me. 19:27:31 -!- davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has quit [Read error: 54 (Connection reset by peer)] 19:27:37 The rule of self-evaluating objects? 19:27:49 jcowan: Chapter 16 of the CSUG v8 is an interesting read...the Compatibility features built into Chez Scheme. 19:27:50 It's certainly more consistent, but it doesn't really resolve the issue of () for you. 19:28:18 arcfide: Regarding your expectation that strings be mutable, this is now two things that we need to adjust your expectations on. :-) 19:28:40 leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 19:28:43 Two things? 19:29:11 This, and your expectations of phasing behavior. There might be more. 19:29:28 chandler: You probably won't make much headway with either. 19:29:29 :-) 19:29:58 chandler: I'm fine in making it easier for compilers to optimize the immutable string case, but I don't way say, the equivalent of MCONS for strings. 19:30:18 For example, requiring explicit import of the destructive stbring operations is fine for me. 19:30:24 I don't see how a mutable, fixed-length string is useful. I would rather either have an immutable string or an editable (insert and delete) text object, like a gap buffer. 19:30:43 sepult [n=user@xdsl-87-78-72-199.netcologne.de] has joined #scheme 19:31:09 *jcowan* can afford to be indifferent to phasing behavior 19:31:26 chandler: Don't forget the other alternative, a general vector containing characters. 19:32:03 Which is quite reasonable on a Unicode system, at least a 32-bit one. 19:32:05 Well, that's what a gap buffer would be implemented as (modulo the gap). 19:32:13 Quite. 19:32:54 *jcowan* wrote a BufferGap class in Java long ago, as part of an attempt to implement DEC Teco in Java, with full Unicode support and all. 19:33:41 *chandler* would like to see a version of Riastradh's texts API proposal that also incorporated editable texts. 19:34:11 There are three kinds of people, those who, when they hear about Teco, ask "DEC or MIT"?; those who etc. assume DEC; and those who say "Huh?". 19:34:15 I'd just like to see a PL with proper Unicode support... if such a thing is even possible! 19:34:38 Unicode hurts me. 19:34:52 I think jcowan is leading the charge, here. 19:35:02 Life hurts. 19:35:42 *chandler* just noticed that in his most recent email, the "you" misdirected to jcowan where it really referred to Aziz. 19:35:44 The pain of Unicode is the pain of the world's Real World writing systems. 19:36:40 -!- sepult [n=user@xdsl-87-78-72-199.netcologne.de] has quit ["ERC Version 5.3 (IRC client for Emacs)"] 19:36:48 Part of what hurts me about Unicode is that they decided to take all-preserving interoperability with other encodings as a requirement. So encodings with >1 redundant ways of encoding the same glyph mean we need redundant codespoints in Unicode... 19:37:21 alaricsp: That is the single thing I hate most about Unicode 19:37:26 Oh, that reminds me. 19:37:41 ecraven: indeed 19:37:41 jcowan: Do I remember you suggesting the use of NKFC in one of these discussions? 19:37:55 If Unicode had done that it would remain a very pretty charset with even less takeup than Scheme. 19:38:13 chandler: I was saying that Scheme identifiers should be NKFC'd before use. 19:38:16 Then the related fact that we have dedicated codepoints for many roman letter+diacritical mark combos (but not, of course, all) 19:38:23 Yikes. *Why*? 19:38:38 1-1 interconvertibility with standard character sets. 19:38:44 Indeed 19:38:47 JIS is full of stuff like "1." 19:38:52 as a character 19:39:01 That too ;-) 19:39:03 and . is not even a diacritic. 19:39:24 There are two main sources of letter+diacritic codes: 19:39:30 1) 1-1 convertibility 19:39:30 they even have ligatures or digraphs as codepoints 19:39:31 Is this really the user's expectation, though? Perhaps I don't quite know enough about the use of those code points to understand why this is a good idea. 19:39:39 2) ISO insisted on a set of them, whose origin is forgotten. 19:40:08 The idea was that you could use Unicode as a pivot between arbitrary charsets without having to maintain context in the decoder. 19:40:16 s/charsets/encodings 19:40:42 There's a standard for normalising Unicode; personally, I'd say that normalised Unicode should be the *default*, with a set of codepoints reserved for "alternate encoding shifts" that are invisible diacritics applied to characters to select a particular alternative code in some other encoding. 19:40:55 Or it might be treated as a zero-width space or something. 19:41:04 The set of such bogus codepoints has been frozen since 2000, with the exception of some hanzi. 19:41:29 Either way, rather than have a codepoint for "1.", just say that this JIS character goes to "MAGIC1" + 1 + . 19:41:51 For instance, if Unicode weren't 1-1 compatible (and even codepoint compatible) with 8859-1, it wouldn't have survived two seconds. 19:42:08 "Those who want to play in the Real World need to learn Real World moves." --Foonly 19:42:16 Eg, deal with the common case (people want to think about characters in some reasonable sane way) and then support the uncommon case (this 1-1 interop thing) with something that everyone else can just ignore. 19:42:45 Most systems don't want to have to deal with a denumerable infinity of characters. 19:42:56 lolcow [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has joined #scheme 19:42:56 jcowan: Right. And I'd fully support applying one of NFD or NFC on identifiers, just to achieve consistency. 19:43:11 -!- leppie [n=lolcow@dsl-244-199-242.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 19:43:14 I could understand arguments for either. 19:43:26 But is a superscript 5 in an identifier *really* the same as the unsuperscripted version? 19:43:37 There is that. 19:44:07 Sorry, I should have made clear: it was your suggestion of the use of canonical decomposition that I was questioning. 19:44:14 s/canonical/compatibility/ 19:44:24 You *are* suggesting canonical (de)composition. 19:44:26 Do I have this backwards? 19:44:28 yes. 19:44:33 Whoops. :-) 19:44:56 Right. Compatibility decomposition. 19:45:02 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 19:45:08 I think the big issue around comp-decomp is things like the fullwidth ASCII set, 19:45:14 Sorry, I get turned around very easily with this terminology. 19:45:19 where you may not even know if you are typing conventional or fullwidth letters. 19:45:32 "Canonical" is used in the canonical way here. 19:45:39 Right. 19:45:57 But the hashing algorithm in my brain is not very robust to collisions, and so occasionally I make an incorrect retrieval. 19:46:12 Precisely: No Unicode-conformant process should expect another process to behave differently if it sends it one canonical form vs. another. 19:46:50 you just used canonical in the canonical way 19:46:57 Right. Which is why, as I said, I would expect one of NFC or NFD to be applied to the input. I'm open to hearing arguments for either, or even an argument that it should be up to the implementation as long is it always follows the same rule. 19:47:21 The argument against the third way is that it makes string-length implementation-dependent. 19:47:57 Defining what the "length" of a Unicode string is is left as an exercise to the reader... 19:48:14 Number of codepoints is the easy, yet some how not-quite-useful-for-much, answer 19:48:28 Sure, but string-dgc-length would be the same. :-) 19:48:33 True. 19:48:51 But treating strings as a sequence of DGCs has its own problems, because the number of DGCs is infinite. 19:49:06 How about number of characters? Strip out all the zero-widths and diacritics. That has some meaning to a human, at least. 19:49:27 "A million grave accents after the A / A million graves after the A / Add one there / Stack it on top / A million-and-one grave accents after the A" 19:49:38 ;-) 19:50:11 yes, but the resulting string is gibberish, especially in Indic languages where the vowels are diacritics. 19:50:41 Unicode is hard, let's go shoppiing 19:50:54 Riastradh's approach, which is a variant of ICU's (ICU is the gold-standard i18n library for Java and C++), 19:51:25 uses external iterators to move down a sequence of whatevers in whatever unit you please, from codepoints to paragraphs. 19:51:43 karlw [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has joined #scheme 19:51:50 Yes. Moving away from the idea of a string as some kind of homogenous vector does seem necessary. 19:52:45 For reference, here's Riastradh's proposal: http://mumble.net/~campbell/proposals/new-text.txt 19:52:55 Early Unicode implementations seemed to spread the idea that Unicode == strings with 16-bit characters, which still faintly lingers on. I'm looking at you, Java and Windows 95. 19:53:10 And once the vector interpretation is gone, the argument for point-by-point mutability is seriously weakened. 19:53:11 -!- dysinger [n=dysinger@adsl-99-8-229-230.dsl.pltn13.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 19:53:29 alaricsp: That was the intention. Then the Ideographic Rapporteur Group went wild. 19:53:42 (an ISO, not a Unicode institution) 19:53:46 jcowan: I'm not sure that the use of compatibility decomposition on identifiers really makes much sense in general - particularly if some form of escaping syntax is added so that arbitrary identifiers may be used. 19:53:59 Good 'ole ISO 19:54:04 I hear you on the full-width forms, for sure. 19:54:25 But the other formatting distinctions eliminated in compatibility decomposition seem to have *some* value. 19:54:30 Strings should just be syntactic sugar for lists of characters. 19:54:50 karlw: I continue to be less than impressed with your ability to actually meaningfully add to a discussion. 19:54:52 alaricsp: It depends. ISO JTC1/SC2/WG2, the Universal Character Set committee, is just fine; it works hand in hand with Unicode to keep ISO 10646 and Unicode in perfect sync. 19:55:06 karlw: That is the viewpoint I am arguing against. 19:55:18 "Character" is a vague and context-dependent term. 19:55:35 jcowan: I don't think you need to argue with him. 19:55:36 chandler: If we are to fix the world, it has to be one hindbrain at a time. 19:55:47 Not arguing (me, argue?), just explaining. 19:56:02 I haven't seen him actually produce a meaningful-in-context contribution to any discussion here yet. Maybe it's happened and I've missed it. 19:56:07 *jcowan* nods. 19:56:21 "Instead of trying to prove your opponent wrong, try to see in what sense he may be right." --Robert Nozik 19:56:24 s/ik/ick 19:57:31 *karlw* shuts up and gets back to work. 19:57:32 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit [Remote closed the connection] 19:58:26 After all, under a mere reinterpretation of terms, everything anyone says, as long as they are not self-contradictory, can be taken to be truths about integers. 19:58:32 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 19:58:41 per the Loewenheim-Skolem theorem. 19:59:06 MononcQc [n=parseido@modemcable062.225-20-96.mc.videotron.ca] has joined #scheme 19:59:18 I will bring that up next time I am in a heated discussion with an angry wife! 20:00:24 The point of the aphorism is to avoid heated discussions at all. 20:00:41 After all, since it's obvious that many agreements are underlyingly about definitions. 20:00:49 Yes, it is 20:00:49 s/\./, 20:01:05 it follows that by mere redefinition, the angry wife is quite correct -- and so are you. So leave it at that. 20:01:59 Nozick gives the example of people from two tribes who speak the same language, except that their words for "circle" and "ellipse" are interchanged. 20:02:13 I take great pleasure in meeting her angry arguments with the most obtuse logical defences possible, which initially enrages her further, then results in her realising she's having her leg pulled, whereupon the argument collapses into laughter, you see ;-) 20:02:15 Heh 20:03:03 So when two people meet, not knowing each other's tribes, and look at an ambiguous figure on the ground, they may claim "It's a circle!" and "It's an ellipse", 20:03:12 but they have no way to tell if the disagreement is real or semantic. 20:03:32 jcowan: That supposes that neither party is contradicting themselves, which is a very poor assumption. 20:03:41 (True, chandler.) 20:03:48 I am often accused of pedantry in my argument, at which point I exclaim "I think that if you consult the dictionary definition of pedantry, it refers explicitly to *unnecessary* attention to detail; and since, in this case, I am right, and you are wrongly accusing me of being wrong, this level of attention to detail is not unnecessary; and, therefore, I am not being pedantic"; I then duck behind a solid object. 20:04:01 Current reporting on public health leads me to believe that an increasing number of people contain multitudes, and thus may contradict themselves. 20:04:05 But there are ways to discriminate: for example, the question "Is it only slightly circular, or is it *very* circular?" 20:04:25 *jcowan* certainly does; over 90% of his cells are non-human. 20:04:50 jcowan: That was an obesity joke, actually. 20:05:12 Typically my cells are bigger rather than more numerous, however. 20:05:40 -!- mreggen_ [n=mreggen@cm-84.215.28.167.getinternet.no] has quit ["leaving"] 20:05:49 Or maybe it's both. 20:06:17 *jcowan* weighs 375 lb = 170 kg = 27 stone 20:08:23 I'm underweight. Really should exercise more. I'm quite the geek stereotype; pale, gaunt, tired-looking. 20:09:10 I'm not sure that's a geek stereotype. 20:09:19 It's one stereotype. 20:09:24 *jcowan* groans. 20:09:34 Did you try the Polish sausage at the State Fair? The wurst are full of passionate intensity. 20:10:41 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit [Read error: 104 (Connection reset by peer)] 20:14:55 That's the wurst thing I ever heard! 20:16:13 sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has joined #scheme 20:19:32 Anyway. The whole idea that normal people just wanting to mess with strings need to think about normalisation and stuff is rather upsetting. IMHO, what programmers expect of a string is to get DGCs as "characters". Regardless of the fact that they're variable-length structures in Unicode. 20:20:20 After all, users of application software expect two strings that look identical to be equivalent; if they read some text from the screen and type it in, they'll be annoyed if it's invisible different, and gives them FILE NOT FOUND or whatever. 20:21:15 And so either programmers have to manually deal with normalisation issues, or the string library they use should do it for them (with some kind of extra API for working at the codepoint level if they want to write one of these 1-1 inter-charset conversion tools) 20:22:56 So I'd be all for a Scheme that works at the DGC level, yet allows implementations to restrict to a subset of available DGCs if they want to - such as ASCII or an ISO-8859-N, or even some restricted form of Unicode with a maximum number of diacritics per DGC (to have fixed-width characters), or just implement full Unicode (using small (interned?) strings as DGCs) if they have room. 20:28:40 attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has joined #scheme 20:28:45 arcfide: Almost surprisingly, other people here told you that multiple phases are very strongly "about creating a stable" *program*. The fact that r6rs allows this doesn't make the confusion you get by "mushing all the phases together into one big \"happy\" environment". 20:29:14 masm1 [n=masm@bl7-194-132.dsl.telepac.pt] has joined #scheme 20:36:46 -!- masm [n=masm@85.240.95.186] has quit [Read error: 145 (Connection timed out)] 20:37:00 So anyway, I have organized R5RS + my suggested changes into 15 feature groups, of which an implementation is conformant if it implements the core feature group. 20:37:38 The other 14 are: bignums, ratios, flonums, ieee-float, transcendental-functions, complex-numbers, delay, eval, repl, transcripts, multiple-values, files, reader, writer. 20:38:42 That should appease the Minimalists, ya think? The list comes partly from comparing IEEE to R4 to R5, scrutinizing R5 carefully, and the SC's list in the WG1 charter. 20:39:15 Would anybody notice if transcripts were removed? 20:39:50 What are transcripts when they're at home? 20:40:18 I'm not fond of the idea of a bignums-optional Scheme. I forget who raised the point, but a Scheme without a full numeric tower is likely enough to be constrained to specific-purpose applications that it can just declare itself to be "Scheme, except with broken numbers". 20:41:11 I agree that fixnum-only is a toy, but fixnum-flonum is not necessarily a toy. 20:42:41 I disagree. I can't see a good reason *not* to implement arbitrary-precision integer arithmetic on anything other than a toy or under very specialized requirements. 20:43:00 If Chibi can do it, anything can! :-) 20:43:21 There's a reasonable argument for a fixnum-only Scheme being fine, particularly if somebody has a nice portable "full tower in terms of fixnums" implementation available. I'm all for making things optional, if a slow-but-functional portable implementation can just be downloaded and slapped on. 20:43:38 We don't have the right primitives for that, 20:43:43 nor do I think R6RS does. 20:43:49 Can you outline that reasonable argument? 20:43:55 flonum-only will give me nasty flashbacks to ZX Spectrum BASIC. 20:43:55 Henry Baker said "See any manual on assembly-language programming." 20:44:06 Flonum-only is not possible. 20:44:24 alaricsp: Or nasty flashbacks to JavaScript. 20:44:30 Or Perl 20:44:46 Indeed, most Basics are fixnum-flonum or flonum-only. 20:45:00 Right. Toys, all of them. 20:45:02 Personally I don't think I've ever used flonums in anger except in such languages. 20:45:05 Well, small integers (which fixnums are OK for) are probably the most-used numbers around, so if you're going to implement any numbers, that's where to start. So that's my recursive base case ;-) 20:45:20 But in any case it's irrelevant: Scheme dictates that certain procedures accept or return exact integers. 20:45:40 Yes, you need exact integers to count the lengths of things 20:45:46 The Q language is flonum+bignum, with no fixnums at all, but it boxes everything. 20:46:27 And in fact IEEE double floats make pretty good fixnums in an all-boxed environment: they are precise up to 10^53. 20:46:40 For what it's worth, I think the concept of a "fixnum" is broken too, and it's one of the things I most loathe about the R6RS. There was no good reason to include the concept when unlimited-range integers were required. 20:47:01 Some people want access to high performance, is all. 20:47:02 I don't care if they exist under the hood, or if IEEE doubles are used to represent them. 20:47:17 It's possible to do useful exact integer arithmetic with word-sized integers without boxing. 20:47:33 Hold on, let me retrieve the paper I'm referring to. 20:48:03 http://jcsu.jesus.cam.ac.uk/~csr21/papers/modular/modular.pdf 20:48:30 Now, if you can make it so it's possible to write bignums and rationals (which can be inexact, by rounding sometimes to keep the num+denom within bounds), in terms of that - which can be done using BCD representation in strings, if you must, and override + and - and friends to dispatch on them - then you can at least have all the functionality you want, even if it's then rather slow on your implementation. 20:48:54 At the moment that SBCL gained optimization for efficient, unboxed modular arithmetic on unboxed integers, fixnums as a user-visible efficient type became irrelevant. 20:49:30 chandler: I agree, I think; "fixnum" and "bignum" are entirely implementation techniques, and such terms should be kept out of a language spec. Bounds on complexity of numerical operations, however, are another matter... 20:49:34 Absolutely. That's why there should be no (substantive) mention of fixnums, except a restriction that no small Scheme may limit the range of integers to less than 2^24 of them. 20:49:45 or even 26 20:49:58 Why mention them at all, or that particular bound? 20:50:22 Because I don't want an implementation that limits itself to 1, 0, and -1 to claim conformance. 20:50:45 Even when dealing with limited integers, there needs to be a portable lower bound on the limits. 20:50:51 Oh. You still haven't convinced me that there's any good reason not to require support for effectively-unlimited size exact integers. 20:53:14 Historically, requiring bignums has been a non-starter. 20:53:24 Maybe in 2009 things have changed -- but I doubt it. 20:54:40 *Why*? 20:55:09 I don't get it. There are many available implementations - even off the shelf libraries with extremely good performance. Multiple other languages have now adopted them as the default integer type. 20:57:52 The same holds for ratios, but I hear nobody demanding that ratios be made mandatory except those who want all Schemes to do the whole tower. 20:58:02 Or complex numbers, for that matter. 20:58:22 *jcowan* wishes we had a term for "non-real complex numbers" 20:59:06 chandler: Note, also, that on 64-bit hardware fixnums are probably at least 60 bits, and make pretty durn good integers. 21:00:16 In the same sense that reference counting makes a pretty darned good garbage collector: which is to say, not at all. 21:00:30 -!- karlw [n=Karl_Win@adsl-99-157-202-134.dsl.pltn13.sbcglobal.net] has left #scheme 21:01:45 jcowan: "support for imaginary numbers" is probably a good way of saying "support for non-real complex numbers", no? 21:01:45 "Moon sighed and told the novice the following story:" 21:01:55 yes, thanks. 21:03:16 jcowan: I'll be your imaginary duck here: I believe that implementations should be required to provide support for rationals of unbounded precision and size, but I would be OK if flonums were optional, nor do I care about imaginary numbers. 21:03:23 meme [n=meme@137.54.26.163] has joined #scheme 21:03:50 Hi 21:04:03 new to scheme 21:04:25 new to meme 21:04:30 Hello meme! We're debating the future version of Scheme. Please don't be afraid. 21:04:39 thanks 21:04:50 chandler: Why do you draw the line there, out of interest? 21:04:55 *offby1* wonders if meme is selfish 21:06:11 *jcowan* invents anti-chandler, who wants flonums but doesn't care about unbounded precision. 21:06:19 Who's to choose between them, and why? 21:06:28 Hey, meme, if you're new, you're untainted. Straw poll: Do you think that all Scheme implementations, in order to conform to the standard, need to be able to support integers without any bound other than available memory, or can a system that cannot (natively) express an integer over, say, 2^24, still call itself a Scheme system? 21:07:05 That's a question about values, not about rules. 21:07:33 Indeed, anti-chandler thinks unlimited precision is bad, because it makes his programs run too slow. 21:07:44 anti-chandler might be somebody doing digital signal processing work: everything must be real-time, bounded-size. 21:08:02 Quite. 21:08:06 alaricsp: Sorry, I wasn't clear. What I mean is that if (let loop ((n 0) (l '())) (if (exact? n) (loop (+ n 1) (cons n l)) n)) terminates in something other than an out-of-memory error, something's wrong in your implementation. 21:08:13 alaricsp: support integers without any bound other than available memory 21:08:20 It's amazing how much faster a numerical Scheme program can become just by inserting a single judicious decimal point. 21:09:13 meme: thanks; you are in chandler's camp, FYI ;-) 21:09:17 As far as domains requiring everything to be bounded, you can explicitly bound your computations if required. You could, for instance, make the same argument for allowing implementations to limit the length of lists at some arbitrary number not related to available resources. 21:09:59 alaricsp: actually, the code example I gave is bad; it should double the integer, not add 1 to it. 21:10:24 If i have 2 lists and want to be able all to see the possible variations if the items from list 1 were to replace some of the items in list 5 21:10:32 which looping method would be the best to use 21:10:49 BTW my first list has a length of 2 and hte later 4 21:10:52 Oh, my argument for not mandating bignums is purely that some programmers might not want them, and some implementations might not want to provide them. Sure, such implementations calling themselves "micro-Scheme" rather than "Scheme" is really quite acceptable; we are only discussing names for dialects rather than anything fundamental, I think. Which gets to claim the unadorned name Scheme? :-) 21:11:20 tail-recursion or do-loop? 21:11:37 If you don't want them, don't use them. Please tell me why an implementation shouldn't provide them, any more than an implementation shouldn't provide `call-with-current-continuation' or proper tail calls or etc. etc. etc. 21:11:59 meme: My default vote is for tail-recursion, generally, but that's personal as much as anything 21:13:13 chandler: I don't think that argument's sound: lists are conceptually collections, numbers are conceptually atoms. 21:13:24 mreggen [n=mreggen@cm-84.215.28.167.getinternet.no] has joined #scheme 21:13:36 In R7RS, nobody gets to claim the name Scheme, I think. 21:13:40 Or all do. 21:14:13 outsider's view: I would liek all implementations to behave the same, and to tell me explicitly if there's something that might break when migrating. As such bignums are a good idea. If there's a limit to be put, either they all have it or they mention they don't and give an alternative way to do things 21:14:13 chandler: Memory space (for the code) and effort (writing the code) are the two main reasons for an implementation to eschew a feature. Sometimes, too, the presence of a feature exacts a performance cost even when not used (checking for bignums when doing addition etc), I guess. This applies for "modular" features that can be left in or out easily; it doesn't really apply for "conceptual features of the paradigm" such as call/cc and proper tail c 21:14:16 sniff, holiday over :( back to silly work in morning 21:14:18 jcowan: I'm not sold on this hard-and-fast distinction between collection-foo and atom-foo. 21:14:22 -!- lolcow is now known as leppie 21:14:37 leppie: Me too ;-) 21:14:49 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 60 (Operation timed out)] 21:14:50 You're known as leppie too? 21:15:13 No, I'm back to work from a holiday 21:15:19 lolcow became leppie 21:15:30 Anyone have comments on the other feature groups I mentioned? 21:15:52 I asked what a transcript was, and I don't remember anyone telling me :-) 21:15:55 jcowan: Ultimately, both lists and integers possess the property of having a size, which is the amount of storage consumed by their representation. (Let's say "vectors" here to avoid confusion, actually.) 21:15:58 ieee-float, transcendental-functions, complex-numbers, delay, eval, repl, multiple-values, files, reader, writer 21:16:10 jcowan, I noticed that not one of the modules in your list said anything about character sets... 21:16:20 s/Ultimately/At the brain-dead implementation level I shouldn't have to think about 21:16:44 jcowan: Why is the amount of storage consumed by an integer more important than the amount of size consumed by a vector, such that implementations may provide a hard limit on one that is substantially smaller than the limit on the other? 21:16:52 Laziness, I say! 21:16:59 -!- phax [n=phax@unaffiliated/phax] has quit ["Leaving"] 21:17:12 Conceptual atomicity. Numbers are not a mere sequence of digits or bigits. 21:17:15 chandler, http://jwz.livejournal.com/854482.html 21:17:33 gnomon: I've read it. Funny. 21:17:33 jcowan, "bigits"? 21:17:47 eno [n=eno@nslu2-linux/eno] has joined #scheme 21:17:56 gnomon: My views on Unicode in small Scheme are at http://docs.google.com/View?docID=dc46qrdf_15hgfdgtgx 21:17:58 jcowan: As I said, I'm not sold on the well-formedness of this concept of atomicity. 21:17:58 That they are not, jcowan, so why should implementations make them appear so? 21:18:22 so if i have a ( x y) and (1 2 3 4 5) 21:18:25 Riastradh: I don't understand. 21:18:38 jcowan: Particularly since, conceptually, there are an unbounded number of them. I would be much less inclined to disagree if you said that booleans were atomic, since there are only two of them. 21:18:45 gnomon: bigits are the base-2^32 or whatever digits used under the covers in implementing bignums. 21:18:58 as lists and wish to produce all possible variation wat would be the best way to go about it 21:19:08 meme: Is this homework? 21:19:10 jcowan, ah, thank you for the definition of bigit. 21:19:14 In a fixnum-only implementation, you have limited the number of bits available to an integer. 21:19:22 chandler: yes 21:19:27 (ignoring floating-point numbers for the moment) 21:19:39 At least one implementation of Posix 'dc' used base 100 bigits stored in bytes. 21:19:42 meme: If you were to write down all of them by hand, how would you do it? 21:19:44 chandler: i am trying to get an idea if a loop is feasible or recursion 21:19:54 The number of bits is always limited, Riastradh. 21:20:00 meme: Ignore `do' for the moment. You don't want it. 21:20:20 meme: If you were to do this by hand, how would you do it? 21:20:32 Fixnum-only implementations sharply limit the number of exact integers, neither more nor less. 21:20:44 chandler: hmmm I would just go through each element in the 2nd list and replace them with the first elemtn in list 1 21:20:50 index 0 21:20:53 In particular, they are not allowed to exhibit 2's-complement wrapping or anything. 21:21:04 The answers are either correct, inexact, or not forthcoming. 21:21:06 and redo the same for the 2nd element 21:22:04 meme: the suggests an outer recursion on the 2nd list, does it not? 21:22:07 -!- Phaze [n=PhazeDK@93.163.43.22] has quit ["Leaving"] 21:22:11 chandler: so i would call car for the first list and cdr for the 2nd and have it go throught the 2nd list and replace each element one by one 21:22:31 meme: What if the first list were (x y z)? 21:22:49 chandler: cdr cdr 21:23:05 And if it were (x y z a b c)? 21:23:47 cahndler: ok i see wat u are saying 21:24:55 -!- rudybot_ is now known as rudybot 21:25:24 jcowan: The amount of storage used by the implementation to represent an integer may vary, but I don't think "conceptually atomic" means "does not consume a measurable amount of storage". Requiring that the size of a representable exact integer be limited by something other than the amount of storage available more sharply exposes the representation than does limiting size by the amount of available memory. 21:26:10 chandler:thanks 21:37:21 -!- npe [n=npe@94-224-251-223.access.telenet.be] has quit [] 21:37:58 OK. The discussion on r6rs-discuss leads me to believe that two-pass is really a horrible hack. 21:38:20 syntropy_ [n=who@unaffiliated/syntropy] has joined #scheme 21:38:41 It depends on what it means. See my latest. 21:39:11 *jcowan* thinks the whole idea of let-syntax is basically wankery anyhow. 21:39:30 r2q2 [n=user@dhcp-vlan3242-31-12.wireless.uic.edu] has joined #scheme 21:39:31 ....?! 21:39:33 Why? 21:39:55 Top-level define-syntax is good enough for me. 21:40:10 Good for you! 21:40:15 -!- meme [n=meme@137.54.26.163] has quit [] 21:40:16 I'm not sure what to say beyond that. :-) 21:40:18 I think it's good to extend the syntax of your language, but I don't see any need to do so incompatibly in different parts of the program. 21:40:22 Sure. 21:40:27 Everybody has their limit of flexibility. 21:40:49 -!- fschwidom [n=fschwido@p5B269F6D.dip0.t-ipconnect.de] has quit [Remote closed the connection] 21:40:59 For example, by no means can you make Scheme recognize procedure calls in which the last element of a form specifies the procedure. And this is a Good Thing, say I. 21:41:26 I think you're assuming that a `let-syntax' introduced by a top-level `define-syntax' is an example of incompatible extension, but I don't think it is. 21:42:11 The point of let-syntax is to delimit a particular syntax to a particular scope, or region of the program. 21:42:15 That is, (define-syntax foo (syntax-rules () ((_ mumble body ...) (let-syntax ((mumble blah)) body ...)))) 21:42:22 Right. 21:42:34 You could lift that to a global syntax, provided you do not want to use the same syntax keyword incompatibly elsewhere, eh? 21:43:31 -!- albacker [n=eni@unaffiliated/enyx] has quit ["Leaving"] 21:45:51 Provided you lift everything it depends on... 21:48:01 -!- sepult [n=levgue@xdsl-87-78-72-199.netcologne.de] has quit [Remote closed the connection] 21:48:23 What does syntax-rules syntax depend on? 21:50:12 chandler: I simply cannot understand your code in your r6rs-discuss posting 21:50:32 Can you explicate it somewhat? 21:50:58 It depends. Can I get Apple Mail to find a message by message-iD? 21:51:01 No, no I can't. 21:51:13 Can you give me the subject line and date when it was sent? 21:51:15 Date: Fri, 11 Sep 2009 08:16:51 -0500 21:51:23 Subject: Re: [r6rs-discuss] Re-hashing 21:51:56 Is this the one where I asked you to fill in the blanks? 21:52:01 Yes. 21:52:41 OK. The subject of the conversation was reloading of changed libraries, was it not? 21:52:53 Or redefining of libraries, however you want to put it. 21:53:11 Sorry I'm not sure I'm following the discussion properly as I'm 21:53:12 doing something else at the same time. I was just pointing out 21:53:12 that a macro defined with let-syntax may expand into local 21:53:12 variables, so if you "lift" the definition, you have to do some 21:53:12 fancy footwork to keep the references to the local working. Like 21:53:12 peforming an alpha renaming first, etc 21:53:52 bawden: We've switched topics, I think. 21:54:12 Piratero [i=18074048@gateway/web/freenode/x-fshmwxbluybgkyin] has joined #scheme 21:54:20 Hello everyone! 21:54:29 -!- Edico [n=Edico@unaffiliated/edico] has quit ["Ex-Chat"] 21:54:42 -!- syntropy [n=who@unaffiliated/syntropy] has quit [Read error: 110 (Connection timed out)] 21:54:53 jcowan: The idea here was to lay out an example of several library redefinitions in sequence. 21:55:02 If I have a procedure that returns a procedure using lambda, can I modify lambda's arguments before it is passed? 21:55:09 jcowan: It starts with a definition of a library containing a single mutable cell - which I called `locative'. 21:55:19 Piratero: I don't understand your question. Can you give some example code? 21:55:21 lisppaste: url 21:55:21 To use the lisppaste bot, visit http://paste.lisp.org/new/scheme and enter your paste. 21:55:46 chandler: Sure. 21:56:01 -!- Nshag [i=user@Mix-Orleans-106-3-113.w193-248.abo.wanadoo.fr] has quit ["Quitte"] 21:56:42 bawden: I think you are right, but I don't see a practical example at the moment. Can you cite one? 21:57:38 jcowan: The next library definition is `foo', which exports a single binding `a'. 21:58:11 jcowan: `bar' imports `locative' and `foo', and sets the `locative' library's cell to a closure of the binding of `a'. 21:58:12 Piratero pasted "lambda" at http://paste.lisp.org/display/87025 21:58:37 chandler: There ya go! 21:58:38 jcowan: I then instantiate all the libraries by importing them into a top-level program, and call the closure I just created. 21:58:48 jcowan: This much should be uncontroversial so far... 21:59:00 jcowan: I then redefine the library `foo'. 21:59:22 Okay, stop here till I catch up. 21:59:48 Piratero: Your code makes no sense. 22:00:02 Yeah, I'm aware of that. 22:00:02 Piratero: You can't do (lambda ((butlast x)) ...). 22:00:20 You're trying to put a procedure call where an identifier should go. 22:00:25 Right 22:00:32 chandler: Proceeed. 22:00:39 or with two e's if you prefer. 22:00:43 jcowan: I have to go in a minute, so we may not get through this. 22:00:47 But you know what results I'm trying to obtain? 22:01:06 jcowan: I then redefine the library `foo', and then at the top-level reimport `foo'. 22:01:27 jcowan: The question is: did the redefinition of `foo' cause the existing binding of `a' to have been mutated, or was a fresh binding created? 22:01:42 jcowan: So, the first blank can be 1 or 2, corresponding to one of those two possibilities. 22:02:57 jcowan: I think the rest of the examples follow from there: they should all be 1 or 2, depending on whether the binding of `a' was set, or a fresh binding created in the redefinition. 22:04:01 My answer to the first blank is 1, because you have not redefined locative, and locative still has the old view of foo. 22:06:09 No, that's bogus; foo doesn't import locative. 22:06:12 I can't ever remember the syntax for syntax-rules, but something like: 22:06:12 (let ((rv '())) 22:06:12 (let-syntax ((save (syntax-rules ((save x) (set! rv (cons x rv))))))) 22:06:12 ...code that uses 'save'... 22:06:12 rv) 22:06:46 Sure. I meant a place where binding local variables outside a let-syntax is done in anger. 22:07:22 It's because bar has not been redefined. 22:07:26 Well I have no idea what you are talking about then. Gotta go. 22:11:24 jcowan: Right. Also note the caveat I gave below: I'm assuming that the R6RS rule of one-instantiation-at-phase-0 is preserved. If not, things could be different. 22:11:52 chandler pasted "absolute nonsense" at http://paste.lisp.org/display/87026 22:12:13 -!- hkBst [n=hkBst@gentoo/developer/hkbst] has quit [Remote closed the connection] 22:12:39 arcfide: Regarding phases, I'd like to challenge you to explain the meaning of this program *before* running it in Chez Scheme. (http://paste.lisp.org/display/87026) 22:13:26 chandler: I think the answer is 1, 1, 2 22:13:39 Not until bar is redefined does it pick up the changes to foo. 22:13:56 The well-dressed REPL will have a way to force this to happen, perhaps. 22:14:06 (Although if the libraries are in files, it won't have to.) 22:14:49 mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #scheme 22:15:24 jcowan: OK. Can you explain how redefining `bar' causes the binding it captured for `a' earlier to be mutated? 22:15:34 This is the middle ground that I'm not seeing. 22:16:02 Actually, I have to go now, but if you could reply to the list, I think that'd be wonderful. 22:16:53 (By the way, Chez and Ikarus respond differently to the program I just pasted, which once again points out how surprising this phase behavior can be.) 22:18:03 Because it reimports foo. 22:18:16 Redefining it throws away the old bar and makes a new bar, with the new foo inside. 22:25:09 I have posted. 22:25:28 Okay, which should be next, libraries or feature groups? 22:25:55 -!- dstorrs [n=user@cpe-98-14-187-196.nyc.res.rr.com] has quit [Remote closed the connection] 22:25:59 dstorrs` [n=user@cpe-98-14-187-196.nyc.res.rr.com] has joined #scheme 22:26:56 -!- tltstc [n=tltstc@cpe-76-90-95-21.socal.res.rr.com] has quit [Read error: 60 (Operation timed out)] 22:27:52 -!- sphex__ [n=nobody@modemcable244.185-56-74.mc.videotron.ca] has quit [Read error: 104 (Connection reset by peer)] 22:28:03 sphex [n=nobody@modemcable244.185-56-74.mc.videotron.ca] has joined #scheme 22:28:28 Ppjet6 [n=ppjet@ram94-7-82-232-191-53.fbx.proxad.net] has joined #scheme 22:28:46 -!- syntropy_ [n=who@unaffiliated/syntropy] has quit [Remote closed the connection] 22:28:47 -!- rmrfchik [n=rmrfchik@linuxhacker.ru] has quit [Remote closed the connection] 22:28:52 syntropy [n=who@unaffiliated/syntropy] has joined #scheme 22:29:09 -!- eno [n=eno@nslu2-linux/eno] has quit [Remote closed the connection] 22:29:14 eno [n=eno@nslu2-linux/eno] has joined #scheme 22:29:16 -!- mmc1 [n=mima@cs137104.pp.htv.fi] has quit [Read error: 110 (Connection timed out)] 22:29:23 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Remote closed the connection] 22:31:18 -!- Ppjet6 is now known as Pepe_ 22:36:12 tltstc [n=tltstc@cpe-76-90-95-21.socal.res.rr.com] has joined #scheme 22:37:42 sladegen [n=nemo@unaffiliated/sladegen] has joined #scheme 22:38:52 davazp [n=user@56.Red-79-153-148.dynamicIP.rima-tde.net] has joined #scheme 22:42:07 rmrfchik [n=rmrfchik@linuxhacker.ru] has joined #scheme 22:43:13 -!- masm1 [n=masm@bl7-194-132.dsl.telepac.pt] has quit ["Leaving."] 23:09:18 reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #scheme 23:09:30 -!- reprore [n=reprore@ntkngw598092.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit [Remote closed the connection] 23:21:46 patmaddox [n=patmaddo@213.sub-75-215-64.myvzw.com] has joined #scheme 23:27:04 chandler annotated #87026 "more unobviousness!" at http://paste.lisp.org/display/87026#1 23:27:40 -!- RageOfThou [n=RageOfTh@users-120-185.vinet.ba] has quit [Read error: 110 (Connection timed out)] 23:27:49 Well, that looks *almost* like proper phasing behavior there! Except if I evaluate the `define' and the following form one-by-one, it does work. 23:29:26 "At the top level of a program (begin ...) is equivalent to the sequence of expressions, definitions, and syntax definitions that form the body of the begin." 23:29:37 Except in Chez! 23:30:31 dec142 [n=Declan@86.46.53.28] has joined #scheme 23:31:55 (It does "work" in Ikarus, FWIW.) 23:39:17 syntropy_ [n=who@unaffiliated/syntropy] has joined #scheme 23:41:39 -!- attila_lendvai [n=ati@catv-89-132-189-132.catv.broadband.hu] has quit [Read error: 113 (No route to host)] 23:46:24 Finally, cheat a little bit on the sockets and maybe I'll actually get Descot released! 23:46:45 -!- bpalmer [n=user@unaffiliated/bpalmer] has left #scheme 23:47:04 chandler: Let me take a look at this "challenge." 23:47:36 -!- syntropy [n=who@unaffiliated/syntropy] has quit [Read error: 145 (Connection timed out)] 23:51:32 -!- dec142 [n=Declan@86.46.53.28] has left #scheme 23:51:58 rcy [n=rcy@S01060013104bf489.ok.shawcable.net] has joined #scheme 23:55:30 joast [n=rick@76.178.178.72] has joined #scheme 23:56:43 chandler: :-) 23:56:46 Okay... 23:56:46 -!- joast [n=rick@76.178.178.72] has quit [Client Quit] 23:57:06 So, what should that return? (Don't run it first!) 23:57:16 Modius [n=Modius@24.174.112.56] has joined #scheme 23:57:21 chandler: I took pencil and paper and wrote down my answer before running it. Then I ran it. 23:57:22 I was right. 23:57:41 chandler: Firstly, there are for different results we could get from this as I understand Chez's model. 23:58:11 That's because the order of evaluation is unspecified in two places, the second bunch of let-syntax clauses and the call to list with its arguments. 23:58:34 I happen to know that in most cases Chez does a right to left order of evaluation, but my answer did not take that into account, so I create four potential answers. 23:59:08 Oh! Well, assume left-to-right in the body; that's what I meant. 23:59:14 You can't do that. 23:59:20 ANyways. 23:59:22 ... Assume I *wrote* it correct.y 23:59:25 "correctly"