9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] silly(?) acme coffee list program
@ 2002-02-28 21:55 Axel Belinfante
  0 siblings, 0 replies; only message in thread
From: Axel Belinfante @ 2002-02-28 21:55 UTC (permalink / raw)
  To: 9fans

Some time ago I wrote a (silly?) acme coffee list ('spreadsheet-like')
rc script, to get some experience with 'programming' acme
(and to try to confront colleagues with acme :-)
 <URL:http://www.cs.utwente.nl/~belinfan/plan9/streep.tgz>
To play with it: unpack the tar file, open coffeelist in acme,
and follow the instructions (put there for the colleagues).

My first attempt at acme programming (and scripting rc).
Meant to replace the on-paper list on which people just put a mark
when they take a cup (in the mean time obsoleted by 'the boss'
 introducing free coffee,  we still have a beer list for the
 friday afternoon so there is still a potential use :-)

Basically, the list contains for each person a line containing
several fields, where each field consists of a name followed by
a number, eg. for cups total, cups today, total amount to pay.
The order of the fields doesn't matter, and not all fields
need to be there. In addition, there is a line containing the
price per cup, and some overall numbers. The script 'streepje'
('mark' in dutch) increments the fields's numbers in the
selected line, and adds missing fields. The script 'paid'
resets fields's values to zero.

This is very much a toy.
After Russ' comment quite some time ago (about acd?) of
mainly using the power of acme('s regular expressions etc),
I tried to do this here as well.
The coffe-list file (= window) name is hard coded.
One improvement could be to sort the updates that
have to be done on reverse address order, such that the
field value addresses do not have to be gotten again
when doing the updates.
Another could be to make it a real program that handles
all user interaction in the coffeelist window, but that
seemed a bit difficult from rc.
(There might be a newer version on my fs, but currently
 I'm unable to check that.)

Anyway, enjoy (or not),
Axel.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-02-28 21:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-28 21:55 [9fans] silly(?) acme coffee list program Axel Belinfante

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).