Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #9111
| From | no.top.post@gmail.com |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | existing code to build a 'sed-like'? |
| Date | 2012-01-21 14:34 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <jfeido$5uj$1@dont-email.me> (permalink) |
When in 2008, I asked about <4thing a kinda sed>, smartass Saushev wrote:
> Forth is universal programming language (surprise!).
So I'm really going to have to eleborate:--
The bloke who wrote some of the most used apps of M$, and then
spent the millions earned to have a space ride, appropriately
wrote that <choice should be limited in computing>.
Eg. there should be ONE-only only route to the goal if possible.
This means minimal syntax. And leads to a strictly-typed Pascal
approach, like a train strictly limited to its track-route, instead
of a C free-chicken type of traveller which can hop and fly in
any direction.
Just look at this extract of `man ed` :--
An address range is two addresses separated either
by a comma or semicolon. The value of the first
address in a range cannot exceed the value of the
the second. If only one address is given in a
range, then the second address is set to the given
address. If an n-tuple of addresses is given where
n > 2, then the corresponding range is determined
by the last two addresses in the n-tuple. If only
one address is expected, then the last address is
used.
And more and more options are described.
Based on how productive ETHOberon *IS* [minimum effort for maximum
output], I'm looking to find/build a 'sed' like editor, to fit with a
concatinative, i.e. forth-like programming style system.
Since forth's founding philosophy as repeated by C. Moore is "keep it simple"
I'm hoping that 'the standard forth editor' would be a good starting point.
Is it; according to what I'm trying to describe?
A further important factor is that [although I hate stack-shuffling], the
concatenative style: where you can serially transform your data, and when
building/testing stage N, you don't need to be concerned about stages
before N-1.
Although the syntax is a mess, conceptually *nix scripts are very efficient
[ito of initial effort and maintainability]; where eg. they can write:-
list all the files in directory-tree D |
which are less than N days old |
and contain string string1 |
....
and also contain stringN |
but take only the 3 smallest of these files|
and select the one which has stringS the least times repeated.
Because *nix syntax is so bad, and I don't want to get married/familiar
with another language, [I can't understand my own code after 6 months]
can forth help by concatenating [hopefully existing] functions?
I get the impression that forth programmers don't code at a high level.
Is that because no libraries of convenient tools/functions exist,
for such functions to just be concatenated?
== TIA.
Back to comp.lang.forth | Previous | Next — Next in thread | Find similar
existing code to build a 'sed-like'? no.top.post@gmail.com - 2012-01-21 14:34 +0000
Re: existing code to build a 'sed-like'? Doug Hoffman <glidedog@gmail.com> - 2012-01-21 10:16 -0500
Re (2): existing code to build a 'sed-like'? no.top.post@gmail.com - 2012-01-22 06:36 +0000
Re: existing code to build a 'sed-like'? "Elizabeth D. Rather" <erather@forth.com> - 2012-01-21 08:25 -1000
Re: existing code to build a 'sed-like'? "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-01-21 15:54 -0500
Re (2): existing code to build a 'sed-like'? no.top.post@gmail.com - 2012-01-22 10:03 +0000
csiph-web