[Oberon] Incremental evolution of piping system?

eas lab lab.eas at gmail.com
Tue Dec 20 11:37:16 CET 2016


Where is Oberon's "DoIt" facility?
-----------------------
The idea is that if you "ask the time", you don't want to have
to get married to the respondent, like with gmail that gives
you only the minimum info, at each query, in order to keep you
"engaged" and waste your time, to be able to manipulate you,
to earn money.

So, to find out the time, you don't want to have to start
and run a further live-program.
-----------------------------
Ie. I use:  `g1277 L WiFi`  <-3 tokens: 1 verb + 2 args
 to:
use a textOnlyHttpFetcher to fetch the contents of all URLs
 listed in file:L,
appending them to File:WiFi [the evolving book on WiFi],
and heading each fetch by the URL,
and terminating eah appended fetch by "<><><><><>";
which allows stepping through the evolving WiFi<book>,
    from the <contents list at the top>,
and where <find next "<><><>" > is equivalent to stepping
   to the next chapter.

This one-artillery-shot/DoIt as opposed to the live-TV show
paradigm, could be an incremental step towards giving ETHO
piping ability.
------------------------

The simplest approach to achieve concatenation of functions, may be
to just use 2 files A & B, to alternate the function-chain through?

So using V4, which is all I've got now, as an example task:
Show first 8 most recently modified fileNames of <Directory>:
[this stack-concept function is ESSENTIAL for when working in
a directory, which has already MANY files, swamping the new
relevant ones.]
-----------------------

System.Directory /C:/Users/Public/CRG/LynxW32/*\d  > A
CutOffTopLines (2, A)  > B
SwapWiteCharDelimitedFields(1,2,B) > A
ReOrderStupidDateFields(A)   > B
ReverseOrderLines(B)   > A
ShowFirstLines(8,A)

It seems that a refinement of the 6 stages above, is that A, B can be
global constants and are redundant args to the listed functions.

A function is a procedure with input parameter/S and
preferably ONE output.

So it seems to be simplifying to:
 System.Directory /C:/Users/Public/CRG/LynxW32/*\d | CutOffTopLines(2) |
  SwapWiteCharDelimitedFields(1,2) |  ReOrderStupidDateFields |
  ReverseOrderLines |  ShowFirstLines(8)

As I recall, S3 has already got several of these functions.

One perceived value of such an extension to ETHO is the
 ability to write in our nice syntax; building a set of usefull functions
 which can easily be concatenated to do common jobs, without
 starting an extra live program.
Of course the aspect of stand-alone utilities, and piping capability within
the existing OS, are separate considerations.

NB. no extra temporary variables are introduced,
 and any extra filter/function can be introduced at any stage in the chain.
 Eg. in the above example: "skip all files named *.Obj".

 == Chris Glur.

PS. How would I, with this lame M$ system:
 mark, with 3 or less key-strokes, the ID of a <worked on file> in any
directory,
 so that V4 [or other program] can immediately access such file ?

Under *nix, you can call a universally accessible script eg. `Lz` to:
  write the directory & most recently changed file/S to a file <known by V4>;
 wherby V4, will just look into the pre-agreed file to get the needed info.


More information about the Oberon mailing list