🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #170

Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays)

#170
From: Stephen P Spackman
Date: Mon, 13 Apr 1992 05:25
41 lines
2932 bytes
In article <ROCKWELL.92Apr12192640@socrates.umd.edu> rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) writes:
|Stephen P Spackman:
|>  You are searching in a tree, and you want to use the natural tree
|>  structure and not get it flattened to a vector. I *don't* know of a
|>  language with a type structure in which this very practical problem
|>  can be made to drop out notationally though - but wait another five
|>  or ten years, and you'll see it cropping up. It'll look like an
|>  alternate interface that makes an automatic coercion (an interface
|>  inheritance, actually) unnecessary.
|
|This doesn't look like a difficult problem.  As I understand it, you
|wish a function which will take as arguments a tree, and keys to look
|for inside that tree -- then return the sub-trees indicated by those
|keys.  Just about any language should be able to deal with this.

Yeah, but they all require you to know WHETHER it's stored as a tree,
which is irrelevant. Except the object-oriented ones, which FORBID you
to know that it represents a list, which is at least as brain-dead.

|Now, what is meant by a random-order scan?  Using J's scan with this
|random order "cons reduce" operation, I get results like:
|   cons_reduce\ (1,3,5,7,9)
|1                
|(1,3)            
|((1,3),5)        
|(1,((3,5),7))    
|((1,3),(5,(7,9)))
|
|Maybe you want a grove of "trees" where the partial results are
|interdependent?  Or what?

No, you are right. I'm being stupid again. I keep thinking I've
finally figured out what scans are good for, and then realising that
in fact I want a cons-reduce after all. Random-order scan has a couple
of plausible definitions, but you are right, cons-reduce is the thing
you actually want (and that in turn is built out of a restructuring
operation and an (identity, in this case) constructor-substitution).
----------------------------------------------------------------------
stephen p spackman         Center for Information and Language Studies
stephen@estragon.uchicago.edu                    University of Chicago
----------------------------------------------------------------------
Technical Details
Message-ID: <STEPHEN.92Apr13002547@estragon.uchicago.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!uchinews!tira!stephen
References: <ROCKWELL.92Mar21001252@socrates.umd.edu> <STEPHEN.92Apr10055926@estragon.uchicago.edu> <1992Apr10.184017.10041@newshost.lanl.gov> <STEPHEN.92Apr11043808@estragon.uchicago.edu> <ROCKWELL.92Apr12192640@socrates.umd.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!uchinews!tira!stephen
From: stephen@estragon.uchicago.edu (Stephen P Spackman)
Subject: Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays)
In-Reply-To: rockwell@socrates.umd.edu's message of 13 Apr 92 00:26:40 GMT
Message-ID: <STEPHEN.92Apr13002547@estragon.uchicago.edu>
Lines: 41
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago CILS
References: <ROCKWELL.92Mar21001252@socrates.umd.edu>
 <STEPHEN.92Apr10055926@estragon.uchicago.edu>
 <1992Apr10.184017.10041@newshost.lanl.gov>
 <STEPHEN.92Apr11043808@estragon.uchicago.edu>
 <ROCKWELL.92Apr12192640@socrates.umd.edu>
Date: Mon, 13 Apr 1992 05:25:41 GMT