HDTenEightyP/NetNews huggingface dataset:
From: manis@cs.ubc.ca (Vincent Manis)
Newsgroups: comp.lang.scheme
Subject: Re: applying or
Date: 31 Dec 1992 17:21:04 -0800
Organization: Institute for Pure and Applied Eschatology
NNTP-Posting-Host: columbia.cs.ubc.ca

In article <1992Dec31.181545.19917@sharebase.com>
dyer@airplane.sharebase.com (Scot Dyer) writes: 
>Even in Algol, implicit delayed evaluation of procedure parameters was
>allowed -- a scary coincidence, yes? :)
Er, yes, and if you want to know the truth about `call-by-name', read
Don Knuth's article `Algol 60 Confidential', which appeared in CACM
sometime around '68. Name parameters and own[*] variables were ideas which
were very elegant indeed; the only problem with them was that they
couldn't be implemented efficiently (or at all, as in the case with own
array variables with dynamic bounds). I'm a great fan of elegance, but I
like my programs to run at speeds somewhat faster than glacial, too.

[*] Own variables were Algol 60's counterpart of statics. The problem
was that own variables were first class, which led to things like

  procedure foo(i); 
     integer i;
  begin
     own integer a[i];
     integer j;
     if i < 10 then
        for j := 1 to i do
           read(a[j]);
     else
        a[11] := a[12]; 
  end; 

  foo(9);  foo(12); foo(9); foo(12); 

It really helps when designing a programming language to be able to
attribute a meaning to all legal programs!

-- 
\    Vincent Manis <manis@cs.ubc.ca>      "There is no law that vulgarity and
 \   Computer Science, Langara College     literary excellence cannot coexist."
 /\  100 W. 49th Ave, Vancouver, BC, Canada (604) 324-5205  -- A. Trevor Hodge
/  \ Co-author of ``The Schematics of Computation'', Prentice-Hall, Jan 1994
Newsgroups: comp.lang.scheme
From: bartlett@pa.DEC.COM ("Joel F. Bartlett")
Subject: Features/ports/bug fixes for MCC's patches to Scheme->C
Organization: The Internet
Date: Tue, 22 Dec 1992 02:25:01 GMT

David Eckelkamp at MCC has released a new set of patches for the 01nov91 release of
Scheme->C.  When used in conjunction with the earlier patches,
MCC01-01nov91.patches,
they do the following:

1. Correct support for some machines and fix a minor bug reading floating point
   numbers.

2. Add support for the HP9000/700 (aka snake), the HP9000/300 (the 68k based HP s),
   the SONY-NEWS machine, and partial support for the IBM RS/6000.

3. Include some features that were developed here at MCC, including CATCH/THROW
   functions, opaque objects, a simple object system using opaque objects, and a
   different interface to external C functions.  The MCC additions are
documented more
   fully in the file MCC-additions in the top level directory after this patch is
   applied.

The patches are found in the file pub/DEC/Scheme-to-C/MCC02-01nov91.patches
on gatekeeper.dec.com.  Please direct all questions related to using the patches to
David Eckelkamp (eckelkamp@mcc.com).

jfb
From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
Newsgroups: comp.lang.scheme
Subject: Re: Are interpreters now as fast as compiled code used to be?
Date: 23 Dec 92 16:53:58 GMT
	<1992Dec17.191058.28471@prodigy.bc.ca>
	<JAFFER.92Dec23012204@camelot.ai.mit.edu>
Organization: M.I.T. Artificial Intelligence Lab.

I retimed pi in both SCM and C.

kleph.ai.mit.edu (HP 9000/350):
  (pi 1000 4) ==> 624.5
  time pi 1000 4 ==> 11.0
  ratio ==> 56.7

Pixel 80 (10 Mhz 68000):
  (pi 100 5) ==> 28.25
  time pi 100 5 ==> 1.75
  ratio ==> 16.14

camelot.ai.mit.edu (HP 9000/720):
  (pi 1000 4) ==> 55.85
  time pi 1000 4 ==> 3.4
  ratio ==> 16.4

The moral seems to be that interpreter penalty is not too large with
an instruction cache if that cache is large enough.
Newsgroups: comp.lang.scheme,comp.lang.c
From: josh@viewlogic.com (Josh Marantz)
Subject: Re: applying or
Organization: Viewlogic Systems, Inc.
Date: Fri, 1 Jan 1993 18:46:55 GMT


>A large number of _later_ Algol derivates contain the 'and then' and 'or then'
>control constructs.  The reasoning in seperating them was that in many cases
>the conditional evaluation was required for correct code (as in a check for
>divide-by-zero or null-pointer-dereference), but that WHERE IT WASN'T
>(required) the compiler could generate more efficient code for 'and' and 'or'
>by having the choice of which to evaluate "first."  (What's currently in the
>machine registers?  Hmmm....)  So take your pick of Algol, Simula, SAIL, etc.

At DEC, using Vax PL/I, there were many cases where code checked for
NULL pointers and then dereferenced them after an AND.  The code would
work perfectly when the optimizer was on, but if you turned it off,
say to debug, the code would break.  Before there was a decent Vax
Debugger, many people developed large applications with this style,
never compiling without the optimizer.  With the advent of the
debugger, the code stopped working!

I was sort of glad to move to C/Scheme, where this short-circuiting
was guaranteed, although I never thought about the compiler
optimizations that the short-circuit guarantee prevents!  Would it be
legal for a C or Scheme compiler to avoid the short-circuiting if it
could prove there were no side effects involved, and if it looked like
a fruitful optimization?
-- 
Joshua Marantz                          You make my life and times
Viewlogic Systems,                        a book of bluesy Saturdays
josh@viewlogic.com                      And I have to choose...
Newsgroups: comp.lang.scheme
From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
Subject: Re: applying or
Organization: M.I.T. Artificial Intelligence Lab.
Date: Sat, 2 Jan 1993 04:07:51 GMT

An applicable version of or is defined in comlist.scm in SLIB.  The
definitions follow:

(define (and? . args)
  (cond ((null? args) #t)
	((car args) (apply and? (cdr args)))
	(else #f)))

(define (or? . args)
  (cond ((null? args) #f)
	((car args) #t)
	(else (apply or? (cdr args)))))
From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
Newsgroups: comp.lang.scheme
Subject: Re: applying or
Date: 25 Dec 1992 23:50:39 GMT
Organization: University of California, Berkeley
NNTP-Posting-Host: anarres.cs.berkeley.edu

One reason AND and OR are special forms is so that you can have one
clause that checks the validity of another, e.g.,

	(and (not (zero? num)) (> (/ 1 num) 7))

If AND were an ordinary procedure, Scheme would evaluate both argument
expressions before invoking the procedure, so it would try to divide by
zero before noticing that it's supposed to avoid the second clause in
that case.


Another reason is just efficiency.  If you see an expression like

	(or (= 2 (+ 1 1)) (prime? 184893479827823480745907830796137))

you can save a lot of time by noticing that the first clause is true.


Of course, you *could* do this sort of computation even if AND and OR were
ordinary procedures, by avoiding AND and OR and using IF instead in such
cases.  But this way is deemed more aesthetically pleasing.


I think it would be nice if the standard specified that AND and OR are
*also* ordinary procedures, so they could be mapped over lists and so on.
The standard recommends against, but allows, the use of keywords as
symbols other than in the car of an expression.  I would change this to
allow the overloading but prebind all such symbols to procedures that
do the same as the special form.  (I wouldn't really care except for the
exercise in The Book that expects you to map cons-stream over a matrix.)
Newsgroups: comp.lang.scheme
From: roberts@angelo.amd.com (Dave Roberts)
Subject: Re: Implementing continuations
Organization: Advanced Micro Devices, Santa Clara, CA
Date: Tue, 22 Dec 1992 01:07:32 GMT

In article <1992Dec15.201735.21731@netcom.com> thinman@netcom.com (Technically Sweet) writes:
>I would have thought that the primary issue was keeping the 
>interpreter code area in cache?  And, of course, using memory
>mapping to implement continuations.

Speaking of which, how do most Scheme implementations handle
continuations.  I started thinking about this and couldn't think of a
very easy way to deal with it.  Exactly what state must be saved?  How
is the stack handled?  How do you use memory mapping to implement
continuations?

Dave Roberts
david.roberts@amd.com
Newsgroups: comp.lang.scheme
From: clu@malihh.hanse.de (Carsten Lutz)
Subject: Re: applying or
Organization: malihh, Hamburg, Germany
Date: Fri, 25 Dec 1992 19:00:21 GMT

In <BztK4w.1Lt@malihh.hanse.de>,I (Carsten Lutz) write:
>In <BztJDI.1J1@malihh.hanse.de>, I write:
>>I tried to write a little procedure which implements an "or"-function but
>>additionally checks if it's arguments are booleans. My approach was the
>>following:
>>
>> (define (b-or . oplist)
>>   (if (boollist? oplist)
>>       (apply or oplist)
>>       'not-a-bool))
[...]
>And second of course I know a way to write my procedure b-or:
>
>(define (b-or . oplist)
>  (cond ((null? oplist) #f)
>        ((not (boolean? (car oplist))) 'not-a-bool)
>        ((eq? (car oplist) #t))
>        (else (apply b-or (cdr oplist)))))
>
Ok, I think I start to bother some of you by posting the third
article about this subject, but the two b-or's above doesn't do
the same thing ( If the first would work at all ). Imagine evaluating

(b-or #t 'foobar)

The first one would return 'not-a-bool, but the second one
returns #t. So I had to rewrite the second approach:

  (define (b-or . oplist)
    (define (or-internal . oplist)
      (cond ((null? oplist) #f)
            ((eq? #t (car oplist)) #t)
            (else (apply or-internal (cdr oplist)))))
    (if (boollist? oplist)
        (apply or-internal oplist)
        'not-a-bool))
  
This is now really ugly because or-internal is in fact an or. 
If you like it all-in-one:

(define (b-or . oplist)
  (define (or-internal . oplist)
    (cond ((null? (cdr oplist)) (car oplist))
          ((not (boolean? (cadr oplist))) 'not-a-bool)
          ((eq? (cadr oplist) #t) (apply or-internal
                                         (cons #t (cddr oplist))))
          (else (apply or-internal (cons (car oplist) (cddr oplist))))))
  (apply or-internal (cons #f oplist)))

I don't like this very much either. What's the best solution ?

greetings,
		Carsten

P.S.: Thanx for your patience with me. ;-)
-- 
* Carsten Lutz, Rellingen, FRG / clu@malihh.hanse.de ( NeXTmail accepted )  *
*   Voice : +49 4101 512493  Fax: +49 4101 27757  Traily : +49 4101 22306   *
From: pk@cs.tut.fi (Kellom{ki Pertti)
Newsgroups: comp.lang.scheme
Subject: Re: applying or
Date: 28 Dec 92 10:06:20
Organization: Tampere Univ. of Technology, Finland.
Distribution: world
	<1hg6ofINN7ev@agate.berkeley.edu>
NNTP-Posting-Host: talitiainen.cs.tut.fi
In-reply-to: bh@anarres.CS.Berkeley.EDU's message of 25 Dec 1992 23:50:39 GMT

In article <1hg6ofINN7ev@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
   Of course, you *could* do this sort of computation even if AND and OR were
   ordinary procedures, by avoiding AND and OR and using IF instead in such
   cases.  But this way is deemed more aesthetically pleasing.

I've never liked the way AND and OR are defined. I don't claim that
they are not convinient, I'm just not very fond of control structures
posing themselves as logic operators to the unwary. 
--
Pertti Kellom\"aki (TeX format)  #       These opinions are mine, 
  Tampere Univ. of TeXnology     #              ALL MINE !
      Software Systems Lab       #  (but go ahead and use them, if you like)


Newsgroups: comp.lang.scheme
From: 71020.1774@compuserve.COM (Terry Kaufman)
Subject: Spread of Scheme and SICP?
Organization: The Internet
Date: Tue, 22 Dec 1992 14:46:37 GMT

Vincent Manis <manis@cs.ubc.ca> writes:

>As a college educator who uses Scheme, I believe that Logo is a better
>HS preparation for university CS studies which use Scheme than Scheme
>is. There are several reasons for this:

>- most HS CS students will never take further CS studies, and Logo has
>the virtue of having a syntax which is (though less elegant, to my eye)
>easier to learn than that of Scheme.  
> ...

For the last six years, we've been teaching an introductory CS course to
secondary school students using Scheme.  We used Logo for several years
prior to that.  We found that our students actually had an easier time
learning Scheme than Logo, because Scheme's syntax is more consistent.
This is not to say they had difficulty learning Logo, but only that
Scheme was easier for them and in addition, they derived all of the
benefits that Scheme has over Logo in terms of elegance, flexibility, and
expressiveness.  

It would be a mistake to discourage high school teachers from using
Scheme.  Besides as it continues to grow in popularity at the university
level, Scheme has a much better chance than Logo to displace BASIC and
Pascal in high schools.

... Terry
From: manis@cs.ubc.ca (Vincent Manis)
Newsgroups: comp.lang.scheme
Subject: Re: applying or
Date: 30 Dec 1992 22:04:59 -0800
Organization: Institute for Pure and Applied Eschatology
NNTP-Posting-Host: columbia.cs.ubc.ca

In article <24517@alice.att.com> ark@alice.UUCP () writes, re McCarthy and:
>Of course, in lazy languages, there's no difference.
>So perhaps people who can't tell them apart are guilty of lazy thinking?
Well, far be it from me to cast aspersions on the users of lazy
languages, but, if the shoe fits...

Andrew correctly takes me to task for not explicitly saying that lazy
languages (or for that matter, any language, including Scheme, which has
thunks), `control' is an even more blurred matter than in conventional
languages. 

The worst of all worlds is Smalltalk, in which one says 

  (a > 0) and: [(a/x) > 1] 

where the square brackets are Smalltalk's equivalent of a procedure.
From having taught Smalltalk and Scheme, I must say that Smalltalk's
perceived asymmetry gives students a lot more problems than Scheme's use
of a special form. 


-- 
\    Vincent Manis <manis@cs.ubc.ca>      "There is no law that vulgarity and
 \   Computer Science, Langara College     literary excellence cannot coexist."
 /\  100 W. 49th Ave, Vancouver, BC, Canada (604) 324-5205  -- A. Trevor Hodge
/  \ Co-author of ``The Schematics of Computation'', Prentice-Hall, Jan 1994
Newsgroups: comp.lang.scheme
From: thinman@netcom.com (Technically Sweet)
Subject: standards
Organization: International Foundation for Internal Freedom
Date: Mon, 21 Dec 1992 18:52:27 GMT

fox@cs.nyu.edu (David Fox) writes:

>It turns out that the reason there has been no eval in the
>scheme standard is due to the standards folks having difficulty
>agreeing on the semantics.  

Oh gosh, and in another ten years we'll have standard macro
and object systems!

Sometimes it doesn't matter what you do, as long as you just DO
SOMETHING and get on with life.

-- 

Lance Norskog

Data is not information is not knowledge is not wisdom.
Newsgroups: comp.lang.scheme
From: dyer@airplane.sharebase.com (Scot Dyer)
Subject: Re: applying or
Reply-To: dyer@airplane.sharebase.com (Scot Dyer)
Organization: NCR/ShareBase Corporation
Date: Thu, 31 Dec 92 18:15:45 GMT

From: manis@cs.ubc.ca (Vincent Manis)
/// In article <MOB.92Dec30090646@strident.think.com> mob@strident.think.com
/// (Mario O. Bourgoin) writes:
/// >I am at a loss for naming an existing programming language that has AND
/// >and OR and where they do not have the same behavior as they do in Scheme.
/// >Would some programming language cogniscenti be kind enough to name a few?
/// 
/// ISO Pascal, for one. Ada, for another (Ada has both McCarthy and
/// `operator' booleans: I think the former is written `and then', and the
/// latter just as `and').

A large number of _later_ Algol derivates contain the 'and then' and 'or then'
control constructs.  The reasoning in seperating them was that in many cases
the conditional evaluation was required for correct code (as in a check for
divide-by-zero or null-pointer-dereference), but that WHERE IT WASN'T
(required) the compiler could generate more efficient code for 'and' and 'or'
by having the choice of which to evaluate "first."  (What's currently in the
machine registers?  Hmmm....)  So take your pick of Algol, Simula, SAIL, etc.

I don't believe any of these languages guarantee that all the sub-expressions
will be evaluated*.  I think the biggest difference is whether the compiler is
allowed to try to optimize which order things are eval'ed in.

/// The subject of this thread is a clear indication why there's a problem.
/// People insist on thinking of `and' as a procedure, no doubt because many
/// computers have an AND instruction. `and' is a control operation, just as
/// are `if' and `cond'.

This is an inconsistancy in Scheme itself, IMHO.  I think the distinction
between "special forms" and "procedures" could be avoided entirely if
"lambda" were revisited.  This would be more expensive, yes, but elegant.

Even in Algol, implicit delayed evaluation of procedure parameters was
allowed -- a scary coincidence, yes? :)

+------------------------+-----------------------------------------------+
|Scot Dyer_Rivenburgh    | "Land of song," said the warrior bard,	 |
|dyer@eagle.sharebase.com| "Though all the world betrays thee,		 |
+------------------------+  One sword, at least, thy rights shall guard, |
|(He's right, you know.) |  One faithful harp shall praise thee."	 |
+------------------------+-----------------------------------------------+

* except ISO Pascal which I know squat about.  It would be wirthian to provide
a "clean operator" (and damn the awkwardness that _everything_ can't be an
"operator!")
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.scheme
Subject: Re: applying or
Date: 25 Dec 1992 18:22:20 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <BztJDI.1J1@malihh.hanse.de> clu@malihh.hanse.de (Carsten Lutz) writes:
>1. How can I pass a list of arguments to "or" ? apply doesn't work and I don't
>   see another way.

You already answered this in your second posting: wrap it into a function
of your own.

>2. Which where the criteria for choosing syntactic keywords. E.g. why are
>   "or" and "and" syntactic keywords but "+" or "-" are not ?

Because "or" and "and" are required to perform "short circuit" evaluation,
i.e. they only evaluate enough arguments to determine the result.  "+" and
"-" are ordinary functions, whose arguments are always evaluated.

>I should mention my version of scheme:

Why?  Your question is about the language, not your implementation.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: weltman@adoc.xerox.com (Rob Weltman)
Newsgroups: comp.client-server
Subject: NFS and RPC
Keywords: NFS,RPC
Date: 30 Dec 92 15:59:39 GMT
Reply-To: weltman@adoc.xerox.com
Organization: Xerox PARC, Palo Alto, CA


Why is NFS so slow?
-------------------

  I followed the initial discussion in this group about RPC, TCP, and
UDP with great interest. At about the same time, a friend did a series
of benchmarks in a network of Sparcstation 2's, to compare the file
transfer performance using TCP sockets, NFS (write to remote-mounted
disk), and RPC using TCP. The files were large (around 2 MB or larger).
RPC using TCP was slightly slower than straight sockets using TCP, as
expected. What was surprising was that it was so slow to just do a
large write to the open file descriptor of a remote mounted file.

  It turned out to be much faster to:

  - have a small server process on the remote machine open a file there
  - transfer the file to the remote process with RPC or socket
  - have the remote process write to the file

  Some improvement over the open/write to the remote file was obtained
by mmapping the remote file instead, but this is still slower than using
the remote process.

  Can NFS be tweaked for better performance? Are there other settings
that affect NFS performance this drastically?

  Thanks for any clues!

Rob



---

---------------------------------------------
| Rob Weltman                               |
| Xerox                                     |
| 3400 Hillview Ave, building 5             |
| Palo Alto, CA  94303                      |
|                                           |
| weltman@adoc.xerox.com                    |
| phone (415)-813-7477   fax (415)-813-6792 |
---------------------------------------------
Newsgroups: comp.client-server
From: paul@sqltech.DIALix.oz.au (Paul Templeman)
Newsgroups: comp.client-server
Subject: Recent forcast info on growth of Client/Server ?
Distribution: world
Date: Thu, 31 Dec 92 18:07:48 GMT
Organization: Sequel Technology
Reply-To: paul@sqltech.DIALix.oz.au

I'm after after some market research forcasts for growth of the
client/server market worldwide. Can someone point me to a publication
and issue ? The info must be referenced, ie. IDC etc.

Any help much appreciated...

Paul...

-------------------------------------------------------------------------------
| Paul Templeman             |  Sequel Technology   |  Phone : +61 9 417 5713 |
| Technical Director         |  16 Bloodwood Circle |  Pager : +61 9 483 5822 |
| paul@sqltech.DIALix.oz.au  |  South Lake 6164     |                         |
|                            |  Western Australia   |                         |
-------------------------------------------------------------------------------
From: lamy@dmr.ca
Newsgroups: comp.client-server
Subject: seeking review of message queueing
Date: 22 Dec 92 19:24:12 GMT
Organization: DMR Group, R&D
Originator: lamy@bond.crim.ca

I have found only sketchy descriptions of message queuing schemes.  Is anyone
aware of a review of currently available implementations?  I would also
much appreciate finding pointers to a discussion of the relative technical
merits of message queuing compared with DCE or ONC (Sun-Netwise) RPC.

I am aware of a discussion group at boeing but have only seen a list of products
Is the mailing list active?

Jean-Francois Lamy                                       | lamy@dmr.ca
Research and Development				 | clouso!dmr.ca!lamy
DMR Group, Montreal, Canada H3B 4G7			 |
From: lupe@ukw.uucp (Lupe Christoph)
Newsgroups: comp.client-server
Subject: Re: Sun RPC time-out question
Date: 20 Dec 92 16:46:20 GMT
Organization: cic

guido@cwi.nl (Guido van Rossum) writes:

>Is there an expert on Sun RPC in this group?

>I am in the process of re-implementing Sun RPC.  All the documentation
>I have are RFC1014 (XDR) and RFC1057 (RPC), and RFC1094 (NFS).  I have
>a question that isn't answered by these documents:

I'm wondering why you do that, given that Sun's implementation is
publicxly available in source.

>When using the UDP version, how does the client recover from lost
>packets?  When the call packet is lost, a simple retransmission is
>enough, however, when a reply packet is lost, a retransmission can
>cause the request to be executed twice.  How does e.g. an NFS client
>handle this if the request is not idempotent (like RENAME)?  Is there
>a way for the client to tell from the failing reply from the second
>try that the first try must have succeeded even though the response
>got lost?

A client cannot know if his request got lost, or the response. Both
result in a timeout. The client will retransmit or give up, depending
on circumstance.

>Note that I need to know how the existing Sun RPC implementation
>handles this situation, not how it could be done in a hypothetical
>system (I know all about Amoeba's RPC, for instance).

If the request is not idempotent, you need to activate the server
cache with svcudp_enablecache(). Note that is an undocumented
function. Get the 4.0 rpcxdr source and look there for details.

>Pointers to sources or documents are welcome!

Sources: see above, docs: RTFS ;-)
-- 
| ...!unido!ukw!lupe  (German EUNet, "bang")     |  Disclaimer:            |
| lupe@ukw.UUCP       (German EUNet, domain)     |  This is an unofficial  |
| suninfo!alanya!lupe (Sun Germany)              |  opinion of Christoph & |
| Res non sunt complicanda praeter necessitatem. |  Imschweiler Consulting |