HDTenEightyP/NetNews huggingface dataset:
From: mkrogers@unix.amherst.edu (MICHAEL K ROGERS)
Subject: Re: area in closed curve; similar to net work calculation
Summary: Green's Theorem applied to a piecewise linear path.
Organization: Amherst College
X-Newsreader: TIN [version 1.1 PL7]
Date: Tue, 17 Nov 1992 22:32:40 GMT

mark@hubcap.clemson.edu (Mark Smotherman) wrote:
>
> I want to get a reference to the first use/publication of an algorithm
> to find the area within a discretized closed curve.  While CAM is the
> application for which I came up with the algorithm, I later found the
> same type of problem as a net work calculation for a heat engine in
> a freshman physics text (figure 19-8, Sears and Zemansky, University
> Physics, 4th ed., 1970, p. 271).  So I expect this algorithm has been
> around for quite a while.
> 
> Given a closed curve completely described by unit movements LRUD (left,
> right, up, and down), calculate the enclosed area.  The description
> may be clockwise or counterclockwise and of arbitrary shape.
> 
> 
> area = 0;
> counter = ARBITRARY_VALUE;  /* makes more sense visually if it is large */
>                             /* enough so that counter never goes negative */
> while( moves_are_left() ){
>     move = next_move();
>     switch(move){
>         case L:
>             area = area - counter;
>             break;
>         case R:
>             area = area + counter;
>             break;
>         case U:
>             counter = counter + 1;
>             break;
>         case D:
>             counter = counter - 1;
>             break;
>     }
>     area = abs(area);

Green's Theorem implies that the path integral around the
boundary of a region of  y dx  equals the area of the region
(given by the double integral over the region of  dx dy ).
Your algorithm does the most straightforward evaluation
of the path integral  int y dx  I can think of.  Of course
the algorithm may be older than Green's Theorem which was
discovered about 1828.
Newsgroups: comp.programming
From: nogurtso@nyx.cs.du.edu (Nick Ogurtsov)
Subject: Help!
Organization: Nyx, Public Access Unix (sponsored by U. of Denver Math/CS dept.)
Disclaimer1: Nyx is a public access Unix system run by the University of
Disclaimer2: Denver for the Denver community.  The University has neither
Disclaimer3: control over nor responsibility for the opinions of users.
Date: Thu, 19 Nov 92 00:01:03 GMT

Hi,
I have a problem. I'm new in C language, so can anyone help me?
Could anyone write a piece of C code to show how to use findfirst()?
In compiler I use it's defined as:
int findfirst(const char *filename,
              struct ffblk *ffblk, int fattrib);
(Returns 0 on success).

ffblk is defined as:

struct ffblk{
        ...,
        ...,
        char fname[13],
        ...};

Could anyone show me how to display found file name on the screen? (from
 ffblk.fname).

Any help will be greatly appreciated!!!

Thanks.

Nick.
From: jac@ds8.scri.fsu.edu (Jim Carr)
Newsgroups: comp.programming,sci.physics,sci.math
Subject: Re: area in closed curve; similar to net work calculation
Date: 18 Nov 92 22:12:48 GMT
Reply-To: jac@ds8.scri.fsu.edu (Jim Carr)
Followup-To: comp.programming
Organization: SCRI, Florida State University

In article <BxxCGI.MsD@news.cso.uiuc.edu> pkk36438@uxa.cso.uiuc.edu (Polygon) writes:
>
>		Once a professor showed me an instrument which you can use
>	to trace a closed curve on paper by hand and the meter gives the
>	value of the area.  The error is claimed to be within 2%.  

It is called a planimeter, if my memory of "old engineer stories" from 
my dad is accurate. 

>                                                                  He also
>	told me that people don't use that any more, so I can't give you
>	any reference on that.

I imagine so.  I doubt if they use 10-place log tables either.  (One of 
my dad's colleagues _wore out_ more than one book of these per year, so 
he saved money by buying an HP-35 for the original list of $350 back in 
the good old days when mini-computers read punched paper tape.)

--
J. A. Carr                                    |  "The New Frontier of which I  
jac@gw.scri.fsu.edu                           |  speak is not a set of promises
Florida State University  B-186               |  -- it is a set of challenges."
Supercomputer Computations Research Institute |   John F. Kennedy (15 July 60)
Newsgroups: comp.programming
From: sjm@bcrki65.bnr.ca (Stuart MacMartin)
Subject: Re: first-year programming languages
Organization: Bell-Northern Research Ltd., Ottawa, Canada
Distribution: na
Date: Fri, 20 Nov 1992 14:43:47 GMT

In article <1992Nov19.000628.18932@linus.mitre.org> crawford@boole.mitre.org (Randy Crawford) writes:
>
>But programming in assembly has almost nothing to do with computer science.
>Weeding out those CS majors who would rather not putz along in assembly 
>would eradicate a lot of talented people who otherwise might excel at 
>cognitive modelling or database work.
>
>Like algorithms and computability, assembly has its place in teaching one
>aspect of CS.  But don't make too much of it.  For all the same reasons
>you advocate the teaching of assembly you could justify the teaching of
>turing machine programming or DFA/stack machine/ATN machine programming.

...or study of algorithms, or compiler design.

The one thing that annoys me about CS departments is how much they downplay
learning some kind of assembly language.  More specifically, there is too
much downplay of microprocessor-controlled devices: after all, that would
be engineering, not CS.

There are several reasons why I think this is important (but I don't want
to overemphasize this either):

1.  Microprocessor controlled devices have totally different constraints
    than workstations and Macs.  Tight memory and speed constraints require a
    different mindset than a SPARC workstation.  

    When people study algorithms and make a selection of which they want,
    it has to be in the context of what resources are available.  I have
    known several people who claimed to be well trained in CS who did not
    understand this point.  What better way to drive home this point than
    to do a project where all your basic ideas of good CS-isms do not apply?

2.  History of CS and programming.

3.  Some understanding of what is happening behind the scenes.  Perhaps
    actually studying a machine language is not essential to learn this,
    but it sure helps.
    
Perhaps I am a few years out of date, but 8 years ago if you wanted to
hire someone to work with microprocessor controlled devices, many people
who studied CS were at a disadvantage because the gut feel they had been
taught had to be untaught.

Stuart
--
: Stuart MacMartin                                    email: sjm@bnr.ca      :
: Bell-Northern Research                              phone: (613) 763-5625  :
: PO Box 3511, Stn C, Ottawa, K1Y-4H7, CANADA    Standard disclaimers apply. :
From: dpn2@po.CWRU.Edu (Damien P. Neil)
Newsgroups: comp.programming
Subject: Re: first-year programming languages
Date: Wed, 18 Nov 1992 23:55:18 GMT
Organization: Case Western Reserve University
Distribution: na
NNTP-Posting-Host: b63519.student.cwru.edu

I took an Intro to CS course at Carnegie Mellon, and they have a rather 
interesting approach: they start students out with a pseudolanguage called 
Karel. This language strongly resembles Pascal, but all it can be used for 
is to move a simulated robot around and have it interact with a simple 
world.

The interpreter and editor are integrated and designed so that students can 
almost completely ignore syntax, and just concentrate on the concepts of 
programming. It is possible to write a large portion of the program using 
only a mouse.

This language teaches concepts like control structures, structured 
programming, and even recursive algrothms before students learn what a 
variable is. (There are no variables in Karel.)

After covering Karel extensively, the course moves on to Pascal. The Pascal 
interpreter is identical in interface to the Karel compiler, and has a 
number of very nice features. (Although it is far, far too slow for any real 
work.) Some of the nice bits include the nicest call stack that I have 
_ever_ seen. It makes the most beautiful representations of linked lists...

The final project in the class is to write a Karel interpreter, which brings 
the whole course full circle. I found it an excellent approach. Even though 
I was quite familiar with the mechanics of programming when I took it, I 
learned a huge amount about programming style. Enough, in fact, to make 
up for being forced to program Pascal on a Mac... :-)
+-------------+------------------+---------------------------------+
| Damien Neil | dpn2@po.cwru.edu | Case Western Reserve University |
+-------------+------------------+---------------------------------+
Newsgroups: comp.programming,sci.physics,sci.math
From: dnl@convex.is.macsch.com (David Lombard)
Subject: Re: area in closed curve; similar to net work calculation
Organization: MacNeal-Schwendler Corp.
Date: Fri, 20 Nov 92 21:40:56 GMT

In article <BxxCGI.MsD@news.cso.uiuc.edu> pkk36438@uxa.cso.uiuc.edu (Polygon) writes:
>		Once a professor showed me an instrument which you can use
>	to trace a closed curve on paper by hand and the meter gives the
>	value of the area.  The error is claimed to be within 2%.  He also
>	told me that people don't use that any more, so I can't give you
>	any reference on that.
>

I guess I'm showing a *little* age, but, the instrument is known as
a planimeter.  I forget the exact mechanics, but I'm certain it's an
analog of Green's theorem.  If you'ld like to wonder a bit more, another
device known as an integator would give moments of inertia along
with areas & etc.

Regards,
DNL

                 MY_COMMENTS = MY_OPINIONS = NOBODY_ELSES;

David N. Lombard    The first thing we do,         The MacNeal-Schwendler Corp
dnl@macsch.com      Let's kill all the lawyers.    815 Colorado Blvd
(213) 259-4911      II Henry VI, IV.ii             Los Angeles, CA  90041
From: paul@hal.COM (Paul Sander)
Newsgroups: comp.programming
Subject: Re: representing international languages
Summary: Doesn't do everything, but might be an ISO standard
Date: 24 Nov 92 01:00:41 GMT
Organization: HaL Computer Systems, Inc.
NNTP-Posting-Host: parlo.hal.com

In article <1992Nov21.133724.1@camins.camosun.bc.ca>
morley@camins.camosun.bc.ca writes:
>
>Yes, UNICODE is a 16 bit character set that is supposed to be able to represent
>all characters in all alphabets of all languages, plus various other characters
>and symbols.  Windows NT has support for programming with UNICODE and/or the
>normal ASCII character sets.
>

Slight clarification:  UNICODE includes all of the alphabet characters for
those languages that have alphabets.  It does not contain all of the Kanjii
or Chinese characters, and probably omits lots of others (though it does
include some of the more common ones).

Last I heard, the ISO was close to publishing a standard.  This was a few
months ago.  If anyone has any more recent news, please post.  The ISO
publication number and an address would be most appreciated.

Many thanks in advance!
-- 
Paul M. Sander  (408) 379-7000  |  "If everything were easy, where would be
HaL Computer Systems, Inc.      |   the challenge?"
1315 Dell Avenue                |
Campbell, CA  95008  USA        |
From: strat@matt.ksu.ksu.edu (Steve Davis)
Newsgroups: comp.programming
Subject: Re: first-year programming languages
Date: 18 Nov 1992 16:29:43 -0600
Organization: Kansas State University
Distribution: na
NNTP-Posting-Host: matt.ksu.ksu.edu

lnosek@ux4.cso.uiuc.edu (Luke Nosek) writes:

>	Here at U of I they're starting us out on MIT Scheme, a dialect of
>LISP. What was surprising what how easy it was to learn this language - there
>is not much to be learned in scheme - it is a languange with little dogma.

I agree.  I'm taking Chez Scheme as part of a class called
"Introduction to Programming Languages" (CIS 605) in which we started
off learning how the basic architecture of scheme works, and now are
looking at how to write parameterized functions to easily implement
simple interpreters and compilers using shared code.  Scheme is well
suited for learning the good-and-bad of recursion.

>	I suppose that's the reason they chose to start us out that way -
>because the learning curve for people thrown into pascal would cause them
>to concentrate more on the language than on the computer science.

At this school, there is much redundancy in the early classes, and the
introductary language is PASCAL.  But the higher-level classes are
(for the most part) in C.  The strange part is that the class that
teaches C is a technical *elective* that many CS students never take.

Stratocaster
-- 
	   Steve Davis (I'm a student, not a spokesperson!)
      strat@cis.ksu.edu - Kansas State University - Manhattan KS
				   
The perfect .signature file.  Approximated but never actually attained.
Newsgroups: comp.programming
From: lnosek@ux4.cso.uiuc.edu (Luke Nosek)
Subject: Re: first-year programming languages
Organization: University of Illinois at Urbana
Distribution: na
Date: Wed, 18 Nov 1992 21:26:20 GMT

	Here at U of I they're starting us out on MIT Scheme, a dialect of
LISP. What was surprising what how easy it was to learn this language - there
is not much to be learned in scheme - it is a languange with little dogma.

	I suppose that's the reason they chose to start us out that way -
because the learning curve for people thrown into pascal would cause them
to concentrate more on the language than on the computer science.
Newsgroups: comp.programming
From: norwest@tessa (norwest)
Subject: Re: Need a text manipulation tool / programming language.
Date: Mon, 23 Nov 1992 13:54:50 GMT
Organization: University of Iowa, Image Analysis Facility

In article <1992Nov21.235606.1497@leland.Stanford.EDU> felciano@summit.stanford.edu (Ramon M. Felciano) writes:
>
>Hi --
>
>I'm looking for a tool or programming language designed for the
>manipulation of text files. I've got a number of similarly formatted
>files that I want parsed into my program. Before I can do that,
>however, I need to "massage" these files into the same format. I tried
>writting a tool to do this, but the result starting looking more and
>more like a language syntax parser (aagh!)
>
>Are there any tools (Mac, Unix, or other) that do something like this?
>I guess I'm sort of looking for a glorified grep with language
>constructs (e.g. if-thens).
>
>Thanks!
>
>Ramon
>
Sounds like a job for awk.  If you are not running a UNIX environment
there should be gnu versions of awk that you can obtain.
Good luck,  

Alex.
From: ctrcsa@iapa.uucp%mailhost.ecn.uoknor.edu (Chris S. Arnold)
Newsgroups: comp.programming
Subject: Re: first-year programming languages
Date: 20 Nov 92 13:43:45 GMT
Distribution: na
Organization: FAA / Mike Monroney Aeronautical Center

I know there has been a lot of response to this letter, but I figured I might as well get my two cents in.  In my schooling, my first language was Pascal, followed by Fortran.  
In my opinion, Pascal is a very good language to start out with.  It teaches you good structuring techniques and syntax rules that follow you through any language you learn. 

CSA
Newsgroups: comp.programming
From: jane@helix.nih.gov (Jane Small)
Subject: Re: 1993 IEEE Computer Society National Programming Contest
Followup-To: comp.programming
Organization: /u0/jane/.organization
Date: Fri, 20 Nov 1992 20:01:31 GMT
From: vladimir@Eng.Sun.COM (Vladimir Ivanovic)
Newsgroups: comp.programming
Subject: Re: Need a text manipulation tool / programming language.
Date: 22 Nov 92 13:51:32
Organization: Sun Microsystems, Inc.
NNTP-Posting-Host: cocteau
In-reply-to: felciano@summit.stanford.edu's message of Sat, 21 Nov 92 23:56:06 GMT
X-Md4-Signature: 8289eca3e08added8090dba92ce8fd88

Try Emacs.  It's a text editor, has built-ins for text manipulation,
commands which understand charaters, words, sentences and regions, and has
an extension language for creating new commands.  Best of all, it has a
learn mode:  you edit one unit and it'll redo those same actions on any
number of other units.

It will be slower than say awk.

-- Vladimir
--
Vladimir G. Ivanovic                            Sun Microsystems, Inc
(415) 336-2315                                  MTV12-33
vladimir@Eng.Sun.COM                            2550 Garcia Ave.
{decwrl,hplabs,ucbvax}!sun!Eng!vladimir         Mountain View, CA 94043-1100
                         Disclaimer: I speak for myself.
Newsgroups: comp.programming,sci.physics,sci.math
From: orourke@sophia.smith.edu (Joseph O'Rourke)
Subject: Re: area in closed curve; similar to net work calculation
Organization: Smith College, Northampton, MA, US
Date: Wed, 18 Nov 1992 20:55:51 GMT

In article <BxxCGI.MsD@news.cso.uiuc.edu> pkk36438@uxa.cso.uiuc.edu (Polygon) writes:
>		Once a professor showed me an instrument which you can use
>	to trace a closed curve on paper by hand and the meter gives the
>	value of the area.  

The instrument is called a planimeter.
From: zeller@vax.sonoma.edu (ERIC ZELLER)
Newsgroups: comp.programming
Subject: graphics on mac
Date: 21 Nov 92 00:54:00 GMT
Organization: Sonoma State University
News-Software: VAX/VMS VNEWS 1.41

Does anyone know where I can get hold of a library of source code routines that
will display various images (GIF, TIFF, QRT..) on a 24 bit macintosh display.
need source code cause I'm doing an animation. Currently my routines take 10
minutes to display each image and it's slightly unnacceptable, even for a
macintosh...



'and take my intestines to use for guitar |     EZ Writer
strings, that someone can play as they    |     zeller@sonoma.edu
sing this sad song.' --"As I walked"      |  	P.O. Box 64
		     Garisson Keilor      |	Cotati, CA, 94931-0064
Newsgroups: comp.programming
From: uesu03@giac1.oscs.montana.edu (Lou Glassy)
Subject: Re: representing international languages
Keywords: n
Organization: Montana State University, Bozeman  MT
Date: Tue, 24 Nov 1992 02:42:03 GMT

In article <1erurpINN2ja@parlo.hal.COM> paul@hal.COM (Paul Sander) writes:
!In article <1992Nov21.133724.1@camins.camosun.bc.ca>
!morley@camins.camosun.bc.ca writes:
!> [ about UNICODE ]
!
!Slight clarification:  UNICODE includes all of the alphabet characters for
!those languages that have alphabets.  It does not contain all of the Kanjii
!or Chinese characters, and probably omits lots of others (though it does
!include some of the more common ones).
!
!Last I heard, the ISO was close to publishing a standard.  This was a few
!months ago.  If anyone has any more recent news, please post.  The ISO
!publication number and an address would be most appreciated.

I'll see what info I can rustle up about UNICODE's status.  My understanding
was that the ISO standardization effort (ISO-10646(?), a 32-bit character
set) was merged with UNICODE (the 16-bit character set privately cooked up
by the Unicode Consortium). 

BTW, Unicode's pretty neat, IMHO.  It doesn't all of every possible character
set, but seems to include enough (more than ASCII) to be useful for the
non-latin-alphabet-using people on the planet.

Lou.

-- 
Lou Glassy (uesu03@giac1.oscs.montana.edu)   Watch the field behind the plow
Earth Sciences Department                    Turn to straight, dark rows
Montana State University                     Put another season's promise
Bozeman, Montana 59715 USA                   In the ground...  --Stan Rogers
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.programming
Subject: Re: Parsing mathematical functions.
Date: 15 Nov 92 17:47:25 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <1e25e1INN8sr@matt.ksu.ksu.edu>, strat@matt (Steve Davis) writes:
>I've been thinking about a problem for a high-school level computer
>programming contest.  The problem I was considering was one that would
>input a function and two numbers, and output an approximation of the
>function integral.  Of course the hard part for the computer isn't
>getting the integral, it's parsing the mathematical function!
>
>Since this would be a high-school level contest, with solution
>elegance being the next highest priority to having a working solution,
>I would want to define the parsing problem in a simple and language
>inspecific way.

IMHO, the first thing you should do is give up on standard expression format,
unless knowledge of parsing techniques (like recursive descent) is common
among your students.

A reasonable alternative you might consider is the so-called "reverse Polish
notation", where all operators are in the postfix position:

  sqrt(x*x+y*y) becomes x x * y y * sqrt

The advantages of this notation is that it can be parsed (and thus,
interpreted) in a simple left-to-right scan.  You'd probably still have
to explain how to use a stack to evaluate the expression, though.

If you want to stick with standard expression format, it seems to me that
you'd pretty much have to have a mini-compiler-writing course, to explain
how operator precedence and evaluation order is captured by a grammar
(which means parse trees, derivations, and probably at least an aside
on ambiguity...)

>Where can I find discussion (on the Internet if
>possible!) of this specific parsing problem.

Well, one of the canonical texts on parsing is

	_Compilers: Principles, Techniques and Tools_, by Aho, Sethi
		and Ullman (ISBN 0-201-10088-1)

Perhaps more to the point of your query is

	_The UNIX Programming Environment_, by Kernighan and Pike
		(ISBN 0-13-937681-X)

Chapter 8 of this book concerns itself with program development, and
the program they develop starts as a 4-function calculator and is
developed into an interpreter for a C-like language.

On the whole, I'd say your best course of action is to choose another
problem for your contest, since judging by my experience, the knowledge
required for the given program is way beyond anything the average
high-schooler knows.

-- 
Caught an internal error--.brainrc restored
Newsgroups: comp.programming,comp.theory,comp.graphics,sci.math.num-analysis
From: pattis@cs.washington.edu (Richard Pattis)
Subject: Re: first-year programming languages
Organization: Computer Science & Engineering, U. of Washington, Seattle
Distribution: na
Date: Tue, 17 Nov 92 19:57:00 GMT

Because no one has mentioned it ....

A good final project in CS1 is to have the students write a simple machine
emulator.  Nothing burns in the mechanics of the fetch/execute like actually
making them write the code that implements it. Such a program (along with a
simpler loader) uses most of the intereresting language features taught in CS1.
One could provide a simulator and ask the students to upgrade it with various
tracing modes - including using a terminal screen to show the state of the
computation via registers, etc.

In CS2, it is possible to explore writing simple asmblers,  in the context
of learning different association table implementations (arrays, linked
lists, trees, hash tables) to store name -> location bindings.

Certainly CS majors need to understand machines at various levels of
abstraction. Good curricula can be implemented top-down as well as bottom-up.
Each has its own strengths and difficulties, but students can arrive at the
same destination through different paths, so long as their guides are familiar
with the terrain.

Rich Pattis
-- 
------------------------------------------------------------------------------
  Richard E. Pattis                     "Programming languages are like
  Department of Computer Science         pizzas - they come in only "too"
    and Engineering                      sizes: too big and too small."