HDTenEightyP/NetNews huggingface dataset:
From: bevan@cs.man.ac.uk (Stephen J Bevan)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 31 Aug 92 18:46:49 GMT
Organization: Department of Computer Science, University of Manchester
In-reply-to: bh@anarres.CS.Berkeley.EDU's message of 31 Aug 92 16:51:43 GMT

In article <17timvINN7b8@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

   What Logo does on an error is tell you the error, the procedure in
   which it happened, and the line of the procedure definition that
   contains the error.

Is this part of a Logo standard or is the above confusing the language
with the implementation?  The only Logo I ever used (on a CP/M
machine) certainly didn't do the above on encountering an error.

bevan
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 30 Aug 92 02:33:29 GMT
	<JINX.92Aug29101908@chamarti.ai.mit.edu>
	<17o70sINNi2e@agate.berkeley.edu>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: bh@anarres.CS.Berkeley.EDU's message of 29 Aug 92 16:01:32 GMT

In article <17o70sINNi2e@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

|   You know, I have to agree with the original poster that this is not the
|   sort of thing one would wish to present to a beginner.  Remember, you're
|   on page 184 before you learn what an "environment" is.  Meanwhile all
|   that argle-bargle is pretty intimidating.

I won't disagree with this.  There is a large tension in a system
aimed both at experienced users and stark novices between being overly
verbose and "nice" and being useful.  However, I know that I strongly
disagree with changing the behavior of the system as the
(hypothetical) course progresses.  I don't think this is what you are
proposing, however.

The system distributed by MIT is not the system that is used directly
by students in 6.001 or 6.003 at MIT.  The system given to students is
typically built on top and often is "nicer" to novices at the expense
of being cumbersome to experienced users.  When the experienced users
who develop the system (including me) have tried to force themselves
to use the system with such niceties, we haven't been able to stomach
it for long.

Remember also that the systems that we set up for students are usually
centered on Edwin, which (like Emacs) is much more easily customizable
than the minimal vanilla system.
Newsgroups: comp.lang.scheme
From: brianbec@microsoft.COM (Brian Beckman)
Subject: (none)
Organization: The Internet
Date: Tue, 1 Sep 1992 13:25:25 GMT

Guillermo writes:
>|   I'd like to be able to invoke small scheme programs from the shell and
>|   not have it take several seconds to load and occupy several megabytes
>|   of swap space.
>|   --
>
>I agree this would be nice to have, however, I try to use the shell as
>little as possible :-).

Why not just hook up a scheme environment to *ALL* the OS entry points
and use scheme as your shell?  You could even call it the "schell"
or "schnell" :-).  Dutch, German, or English pronunciation optional.
This wouldn't be hard, especially with siod or xscheme.  Get out the old
man pages and just start typing.  Or use some sort of dynamic linking.
Siod is ineluctably going this way, in fact.  Gjc just
announced a new version (2.9) with hookups to more C runtime &
OS entry points (some file I/O this time).

=b=

Newsgroups: comp.lang.scheme
From: jeff@aiai.edinburgh.ac.UK (Jeff Dalton)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 31 Aug 92 15:20:02 GMT
Organization: The Internet

> Date: 30 Aug 92 04:28:33 GMT
> From: Brian Harvey <bh@anarres.cs.berkeley.edu>

> The behavior I want would be *less* verbose:
> 
>         > (+ 2 a)
>         Unbound variable: a
> 
>         >
> 
> Short and sweet.  It should be possible for an advanced user to ask
> for pause-on-error behavior in which Scheme would attempt to preserve
> the environment in which the error occurred, but you should have to
> ask for it.  (This is how Logo does things.

I would find it completely unacceptable.  Reasons: 1. I often have
more than one variable with the same name and so I need to know what
function it is in, at least.  2. I may not want to give up the whole
computation just because of an error.  3. I may want to look around
a bit to find out more about the error.

However, I think it's important for the break look (debugger) to be
as much like the top level as possible.  In particular, it should
work to type expressions in the usual way.  Popping back one level
should be easy, such as typing a single character.

I can see how beginners might find it confusing (or something)
to have to type a character that gets them back to the top level,
but it's not hard to get used to it.

But if you want it to work the other way, it's easy to get an
Emacs mode such as ILisp to always send the "pop" command for
you when an error occurs.

> Date: 30 Aug 92 14:23:23 GMT
> From: "Guillermo J. Rozas" <jinx@zurich.ai.mit.edu>

> I'm sorry, but I disagree strongly with this view of the world.
> It is very close to the C/Unix printing "segmentation violation (core
> dumped)" and giving you back a shell prompt.

Not quite that bad, since you get the variable name and since starting
up again is (usually) simpler and faster than "recompile and run it
under the debugger".

> Date: Sun, 30 Aug 1992 18:25:48 GMT
> From: Matt Wright <matt@volga.berkeley.edu>

> >I'm sorry, but I disagree strongly with this view of the world.
> >It is very close to the C/Unix printing "segmentation violation (core
> >dumped)" and giving you back a shell prompt.
> >
> >Your answer of having to tweak a flag or whatever is analogous to
> >saying "recompile and run it under the debugger".
> 
> I disagree.  You way is analogous to having it be so that typing "mial"
> instead of "mail" opens up a new shell with a fresh set of environment
> variables and puts you into the debugger, instead of printing an error
> message and giving you another prompt.

No it's not.  Look, these things happen to me, and to lots of other
people reading this newsgroup.  If being able to do some debugging
after an "undefined variable" error really was that much like entering
a new shell after mistyping a command, do you think we'd be incapable of
seeing that it was the same?  

The only time it's the same is when the undefined variable is in
the expression you just typed to Scheme.

Now, if you said that Scheme ought to avoid entering a debug loop
in that case, I might agree with you.

-- jd
Newsgroups: comp.lang.scheme
From: thinman@netcom.com (Technically Sweet)
Subject: Re: CLOS - SCOOPS extensions to scheme
Date: Fri, 04 Sep 92 17:45:40 GMT
Organization: International Foundation for Internal Freedom
Distribution: comp

The MEROON package is a mini-CLOS-like object package
for generic R4RS Scheme.  (Except, it uses non-standard
macros.)  You can use it with PC-Scheme, DEC Scheme->C,
and (maybe) Chez Scheme.  I've got it running with Scheme->C.

Meroon is available from nexus.yorku.ca:pub/scheme/new/meroon.*.tar.Z.
Scheme->C is on gatekeeper.dec.com or decwrl.dec.com in pub/plan/scheme
or pub/plan/lisp or somewhere.  You'll have to poke around.

-- 

Lance Norskog

Data is not information is not knowledge is not wisdom.
Newsgroups: comp.lang.scheme
From: thinman@netcom.com (Technically Sweet)
Subject: Re: wots going on here!?
Date: Tue, 01 Sep 92 23:12:54 GMT
Organization: International Foundation for Internal Freedom

sommerfeld@apollo.hp.com (Bill Sommerfeld) writes:
>"#[unspecified IF alternative at line xxx character yyy of source file zzz.scm]"

>or some other such reference back to the source code which would point
>the beginner right at the bug.

>These could be generated *once* when reading in the source.

The old BSD Pascal interpreter/compiler used this convention:

	line xx of file yy: unknown whoziwhatsis:
		a := b + c; d = 3;
	----------------------^

This is still the best error reporting I've seen.
I used it on a recent interpreter project.

-- 

Lance Norskog

Data is not information is not knowledge is not wisdom.
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 2 Sep 92 16:12:45 GMT
	<JINX.92Aug31170432@chamarti.ai.mit.edu>
	<17ur1oINNem6@agate.berkeley.edu>
	<JINX.92Sep1033012@chamarti.ai.mit.edu>
	<SOMMERFELD.92Sep1131757@gourmet.apollo.hp.com>
	<t6jnlga.thinman
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: thinman@netcom.com's message of 1 Sep 92 23:12:54 GMT

In article <t6jnlga.thinman@netcom.com> thinman@netcom.com (Technically Sweet) writes:

|   sommerfeld@apollo.hp.com (Bill Sommerfeld) writes:
|   >"#[unspecified IF alternative at line xxx character yyy of source file zzz.scm]"
|
|   >or some other such reference back to the source code which would point
|   >the beginner right at the bug.
|
|   >These could be generated *once* when reading in the source.
|
|   The old BSD Pascal interpreter/compiler used this convention:
|
|	   line xx of file yy: unknown whoziwhatsis:
|		   a := b + c; d = 3;
|	   ----------------------^
|
|   This is still the best error reporting I've seen.
|   I used it on a recent interpreter project.

That is fine (and desirable) for syntactic errors.  Much harder (when
at all possible) for runtime errors.
From: sm86+@andrew.cmu.edu (Stefan Monnier)
Newsgroups: comp.lang.scheme
Subject: X-scm again !
Date: 30 Aug 92 15:42:04 GMT
Article-I.D.: andrew.EecJnAG00VotE2UF8c
Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA


A nice guy sent me a makefile for DECstation which seems to work !

BUT: when compiling, cpp has a problem: it needs Xm/Xm.h and
can't find it.

In /usr/include/X11/ I have XmAppl.h, XmWidget.h, Xmd.h, Xmu.h
(and others of course).
So the question: what should I use instead of Xm.h ?

	Stefan Monnier


-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------
Newsgroups: comp.lang.scheme
From: ted@nmsu.edu (Ted Dunning)
Subject: Re: wots going on here!?
Reply-To: ted@nmsu.edu
Organization: Computing Research Lab
	<JINX.92Aug30102323@chamarti.ai.mit.edu>
	<17s960INN2o6@agate.berkeley.edu>
Date: Tue, 1 Sep 1992 03:54:59 GMT


In article <17s960INN2o6@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

   So, indeed, when I'm teaching C, I tell my *beginning* students nothing
   about gdb; if they can't find their bugs by inspection I tell them to
   put in debugging printf's and recompile.  After a month or so of that,
   that's when I teach them about gdb.

bleah!!

when I teach c to beginning students, i start them out with codecenter
(was saber c).  that way we can talk about each sort of statement, one
at a time, and they can SEE structures as well as flow of control.
debugging by printf is the advanced technique... using a debugger is
what the beginners should learn first.  the debugger then becomes a
tool to learn the language.

--

REALLY, instead of hyping low impact soles, I think what we need
are more low impact souls.
					Greg Jahn
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 2 Sep 92 01:12:07 GMT
	<1992Sep1.145337.7208@lugb.latrobe.edu.au>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: 9241593t@lux.latrobe.edu.au's message of 1 Sep 92 14:53:37 GMT

In article <1992Sep1.145337.7208@lugb.latrobe.edu.au> 9241593t@lux.latrobe.edu.au (B. Leach) writes:

|   I have used a PC-scheme that had edwin builtin, is there a "hidden"
|   edwin builtin to the MIT scheme?
|

No.  Edwin is an optional system built on top of vanilla MIT Scheme.
It is a full-blown Emacs-like editor.

TI took a snapshot many years ago, trimmed it and shoe-horned it to
fit into a PC's memory, and packaged it with PC Scheme.

The full-blown edwin, and the restricted version shipped with PC
Scheme are not very close.
From: sm86+@andrew.cmu.edu (Stefan Monnier)
Newsgroups: comp.lang.scheme
Subject: Re: CLOS - SCOOPS extensions to scheme
Date: 3 Sep 92 20:13:28 GMT
Article-I.D.: andrew.Medi9c200awVQY5F8C
Distribution: comp
Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Excerpts from netnews.comp.lang.scheme: 4-Sep-92 CLOS - SCOOPS
extensions to.. Zoran Popovic@CS.CMU.EDU (647)


> I may be asking for too much but I am looking for a scheme with following
> properties:

>   * object-oriented extensions (multimethods, and operator overloading would
>     be great!)

>   * good foreign function interface (i.e. I want to call C easily from scheme,
>     and maybe even pass lambdas as callbacks to C)

>   * is relatively small so that it does not make an application into a huge
>     cpu-devouring monolith.

>   * works on SGI machines or at least on some MIPS architecture


> If you know of any scheme that has even a subset of these properties
> please let me know.  I will summarize.


> Zoran
> -- 
> 						Zoran Popovic
> 						zoran+@cs.cmu.edu


Well, OO schemes are not really commonplace: try Oaklisp 
(hey: my teacher's gonna be happy)
Else, take SIOD: it is a tiny scheme, EASILY interfaced with C,
	which works almost on all machines. But it is not OO.
	If you want OO, you can try to implement it is C or Scheme
	(as the C source is quite short and simple)
	It is nice and customizable !

	Stefan Monnier

-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 1 Sep 92 07:30:12 GMT
	<JINX.92Aug31170432@chamarti.ai.mit.edu>
	<17ur1oINNem6@agate.berkeley.edu>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: bh@anarres.CS.Berkeley.EDU's message of 1 Sep 92 04:20:08 GMT

In article <17ur1oINNem6@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

|   I think it would be a major improvement to say "not a procedure" or
|   "not a function" [I am not religious about this] instead of
|   "not applicable."

I agree.

|   But the *really* right error message would be something like
|   "IF didn't return a value" (or COND didn't, or whatever it is).
|   The fact that the non-value was used in function position isn't
|   really what's wrong in this situation.

Except that you can't really expect the system to do that.
Both the COND and IF are legal (and the procedures in which they
appear), although probably not what the user meant.

A possibility would be to have multiple "unspecified" objects, one for
IF, one for COND, etc., so the object itself would print something like

"#[unspecified IF alternative]"

which would probably make the error easier to track.
However, it would probably still be confusing to a beginner.

|   Btw, is "read-eval-print level 1" the level I was at before the
|   error?  Putting it another way, what level am I at after getting
|   this message?  That's another unclear thing about the message.
|   I think it would be better if that option were called either
|   "evaluate expressions with local variables available" or else
|   "cancel this computation, return to toplevel" -- whichever it means.

I did not show the prompt (or the Emacs/Edwin mode line).
They always display the level number, so you would have seen the 1.
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 2 Sep 92 01:16:05 GMT
	<JINX.92Aug31170432@chamarti.ai.mit.edu>
	<17ur1oINNem6@agate.berkeley.edu>
	<JINX.92Sep1033012@chamarti.ai.mit.edu>
	<SOMMERFELD.92Sep1131757@gourmet.apollo.hp.com>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: sommerfeld@apollo.hp.com's message of 1 Sep 92 17:17:01 GMT

In article <SOMMERFELD.92Sep1131757@gourmet.apollo.hp.com> sommerfeld@apollo.hp.com (Bill Sommerfeld) writes:

|   How about
|
|   "#[unspecified IF alternative at line xxx character yyy of source file zzz.scm]"
|
|   or some other such reference back to the source code which would point
|   the beginner right at the bug.
|
|   These could be generated *once* when reading in the source.
|

That's a nice idea, but I don't like line or character positions, and
they don't generalize very well to expressions typed at top-level,
generated by macro expansion, or given to EVAL as arguments.

It also means that the code (and system) grows because of all such
objects to be tracked, so I don't think it would be desirable in
practice.

Given that the debugger can usually provide this information without
much effort, it hardly seems worthwhile for "regular" users, but is
probably something worth considering for novices.
Newsgroups: comp.lang.scheme
From: sommerfeld@apollo.hp.com (Bill Sommerfeld)
Subject: Re: wots going on here!?
Date: Tue, 1 Sep 1992 17:17:01 GMT
	<17tn1uINNkij@early-bird.think.com>
	<JINX.92Aug31170432@chamarti.ai.mit.edu>
	<17ur1oINNem6@agate.berkeley.edu>
	<JINX.92Sep1033012@chamarti.ai.mit.edu>
Organization: Hewlett Packard

In article <JINX.92Sep1033012@chamarti.ai.mit.edu> jinx@zurich.ai.mit.edu (Guillermo J. Rozas) writes:

   A possibility would be to have multiple "unspecified" objects, one for
   IF, one for COND, etc., so the object itself would print something like

   "#[unspecified IF alternative]"

   which would probably make the error easier to track.
   However, it would probably still be confusing to a beginner.

How about

"#[unspecified IF alternative at line xxx character yyy of source file zzz.scm]"

or some other such reference back to the source code which would point
the beginner right at the bug.

These could be generated *once* when reading in the source.
Newsgroups: comp.lang.scheme
From: pk@cs.tut.fi (Kellom{ki Pertti)
Subject: Re: wots going on here!?
Organization: Tampere Univ. of Technology, Finland.
	<JINX.92Aug31170432@chamarti.ai.mit.edu>
	<17ur1oINNem6@agate.berkeley.edu>
Date: Tue, 1 Sep 1992 08:34:42 GMT

In article <17ur1oINNem6@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
   But the *really* right error message would be something like
   "IF didn't return a value" (or COND didn't, or whatever it is).
   The fact that the non-value was used in function position isn't
   really what's wrong in this situation.

The interpreter (or compiled code for that matter) may not have the
faintest idea where the undefined value came from, because it may have
passed thru many procedure calls. What we really need is a Scheme lint
that would tell the user that he/she is using a value that may be
undefined. Undefinedness (sp?) should be a lot easier to to check than
general type inference, because it is contagious in the same way as
inexactness. 

I am currently writing a lint for Scheme, but I can not devote very
much time to it. I am planning on using it in my courses in order to
get rid of code like

  (define (foo x)
    (define bar 0)
    (define baz 0)
    (set! bar 10)
    ...)

that students sometimes write. I will say that I do not accept code
if lint complains about it, unless the student can convince me that
there really is no other option. If anyone has any code that analyzes
Scheme programs, I'd be more than happy to look at it.
--
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)


--
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 30 Aug 92 02:44:06 GMT
	<JINX.92Aug29101908@chamarti.ai.mit.edu>
	<17o70sINNi2e@agate.berkeley.edu>
	<1992Aug30.004706.22131@pasteur.Berkeley.EDU>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: matt@volga.Berkeley.EDU's message of 30 Aug 92 00:47:06 GMT

In article <1992Aug30.004706.22131@pasteur.Berkeley.EDU> matt@volga.Berkeley.EDU (Matt Wright) writes:

|   I agree that getting thrown into the debugger on errors is much
|   more of a nuisance than a help for a beginner.  (Actually, for
|   people like me who generate lots of errors anyway with typos,
|   brainos, etc., I still don't want to get thrown into the debugger
|   unless I ask for it.)

They do not get thrown into the debugger.
They get thrown into a nested read-eval-print loop where they can
evaluate ordinary expressions, etc., often in the context of the
error.

The debugger proper is invoked explicitly, and they can abort to the
top-level read-eval-print loop simply by typing ^G (Control-G).

For the courses that use Scheme, users (students) are typically asked
whether they want to debug the error or abort directly to the ordinary
REPL.

|   One system I've used that I like a lot is the one in Kyoto Common
|   Lisp---there's some global variable that says whether you want to be put
|   into the debugger; if it's false than a (possibly partial) stack trace is
|   printed on any error and you get a top-level REP loop.

Just as an aside, remember that because of tail recursion, you may not
have a stack trace at all in Scheme.  This is one of the main
arguments against requiring proper tail recursion in the language.
However, this is infrequently the case in novice code, occurring most
often in code written in CPS.

The main reason that I personally don't like automatically aborting is
because there is valid state at the point of the error that often
allows me to find out what caused the error.

I have often (as a TA) sat by students who on encountering an error
immediately aborted to top-level, and proceeded to stare at the same
code they had been staring at for hours, when a simple evaluation or
cursory examination of the context of the error would have immediately
guided them to the cause of the problem.

Part of the problem is that we teach students to understand correct
programs (and sometimes even to write or modify them), but not how to
make them correct (i.e. debug) when they are not.
From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
Newsgroups: comp.lang.scheme
Subject: Re: wots going on here!?
Date: 30 Aug 92 14:23:23 GMT
	<JINX.92Aug29223329@chamarti.ai.mit.edu>
	<17piphINNncj@agate.berkeley.edu>
Reply-To: jinx@zurich.ai.mit.edu
Organization: M.I.T. Artificial Intelligence Lab.
In-reply-to: bh@anarres.CS.Berkeley.EDU's message of 30 Aug 92 04:28:33 GMT

In article <17piphINNncj@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

|   The behavior I want would be *less* verbose:
|
|	   > (+ 2 a)
|	   Unbound variable: a
|
|	   >
|
|   Short and sweet.  It should be possible for an advanced user to ask
|   for pause-on-error behavior in which Scheme would attempt to preserve
|   the environment in which the error occurred, but you should have to
|   ask for it.  (This is how Logo does things.  Errors give a message
|   and return to toplevel, unless you have asked in advance for pause
|   on error.  In that case you get a special prompt and (because of good
|   old dynamic scope -- but that's another argument) *all* of the possibly
|   relevant variables are immediately accessible in the usual way without
|   you having to know anything about environments.)

I'm sorry, but I disagree strongly with this view of the world.
It is very close to the C/Unix printing "segmentation violation (core
dumped)" and giving you back a shell prompt.

Your answer of having to tweak a flag or whatever is analogous to
saying "recompile and run it under the debugger".

Please remember that there are programs that modify global state, and
thus re-running is not an option since they may not fail in the same
way or at all.