Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Center meeting at 4pm in 2C-543.


devel / comp.lang.forth / Re: A useful program, watdoido

SubjectAuthor
* A useful program, watdoidonone
+- Re: A useful program, watdoidosjack
`* Re: A useful program, watdoidoHans Bezemer
 `* Re: A useful program, watdoidoPaul Rubin
  `* Re: A useful program, watdoidoKerr-Mudd, John
   +* Re: A useful program, watdoidominforth
   |+* Re: A useful program, watdoidoKerr-Mudd, John
   ||`* Re: A useful program, watdoidodxf
   || +* Re: A useful program, watdoidoKerr-Mudd, John
   || |`* Re: A useful program, watdoidominforth
   || | `- Re: A useful program, watdoidodxf
   || `* Re: A useful program, watdoidoAnton Ertl
   ||  +- Re: A useful program, watdoidoKerr-Mudd, John
   ||  `* Re: A useful program, watdoidodxf
   ||   `* Re: A useful program, watdoidoalbert
   ||    `* Re: A useful program, watdoidodxf
   ||     +* Re: A useful program, watdoidoalbert
   ||     |`* Re: A useful program, watdoidodxf
   ||     | +* Re: A useful program, watdoidomhx
   ||     | |`* Re: A useful program, watdoidodxf
   ||     | | `* Re: A useful program, watdoidoAnton Ertl
   ||     | |  +- Re: A useful program, watdoidodxf
   ||     | |  `- Re: A useful program, watdoidodxf
   ||     | `* Re: A useful program, watdoidoalbert
   ||     |  +- Re: A useful program, watdoidominforth
   ||     |  `- Re: A useful program, watdoidodxf
   ||     `* Re: A useful program, watdoidomhx
   ||      +* Re: A useful program, watdoidoAnton Ertl
   ||      |`- Re: A useful program, watdoidodxf
   ||      +* Re: A useful program, watdoidoalbert
   ||      |`* Re: A useful program, watdoidomhx
   ||      | `- Re: A useful program, watdoidoalbert
   ||      `- Re: A useful program, watdoidoHans Bezemer
   |+* Re: A useful program, watdoidoAnton Ertl
   ||`* Re: A useful program, watdoidoGerry Jackson
   || +- Re: A useful program, watdoidoAnton Ertl
   || +* Re: A useful program, watdoidoalbert
   || |+* Re: A useful program, watdoidoahmed
   || ||`- Re: A useful program, watdoidoAnton Ertl
   || |`- Re: A useful program, watdoidoGerry Jackson
   || `- Re: A useful program, watdoidodxf
   |`- Re: A useful program, watdoidoalbert
   `* Re: A useful program, watdoidoalbert
    `* Re: A useful program, watdoidomhx
     `- Re: A useful program, watdoidomhx

Pages:12
Re: A useful program, watdoido

<upiftk$2i898$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26076&group=comp.lang.forth#26076

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: do-not-use@swldwa.uk (Gerry Jackson)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Fri, 2 Feb 2024 10:24:52 +0000
Organization: A noiseless patient Spider
Lines: 135
Message-ID: <upiftk$2i898$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<07897c331ad14cc94cf96ecd1a50d97b@www.novabbs.com>
<2024Jan31.105910@mips.complang.tuwien.ac.at> <upfjl6$1vmfh$1@dont-email.me>
<nnd$4971326f$757e83ff@ceaa621099c58433>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Feb 2024 10:24:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="26faebcabe8cb3fd7281e841422f6eca";
logging-data="2695464"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j++u+tVJQrYIV9R79g/539yuFG4sOO5M="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ZfVXTdPABrLP/H7G5lrb87AfYlw=
In-Reply-To: <nnd$4971326f$757e83ff@ceaa621099c58433>
Content-Language: en-GB
 by: Gerry Jackson - Fri, 2 Feb 2024 10:24 UTC

On 01/02/2024 11:27, albert@spenarnc.xs4all.nl wrote:
> In article <upfjl6$1vmfh$1@dont-email.me>,
> Gerry Jackson <do-not-use@swldwa.uk> wrote:
>> On 31/01/2024 09:59, Anton Ertl wrote:
>>> minforth@gmx.net (minforth) writes:
>>>>>> Hans Bezemer <the.beez.speaks@gmail.com> writes:
>>>>>>> : days/month 15662003 swap 1- 2* rshift 3 and 28 or ;
>>> ...
>>>> Even my dumb compiler (TOS cached) already translates this to:
>>> ...
>>>> 0000000000406242 <mf_DAYSslashMONTH>:
>>>> 406242: 4c 89 e0 mov %r12,%rax
>>>> 406245: 41 bc b3 fb ee 00 mov $0xeefbb3,%r12d
>>>> 40624b: 48 8d 44 00 fe lea -0x2(%rax,%rax,1),%rax
>>>> 406250: 49 89 c4 mov %rax,%r12
>>>> 406253: 41 bc b3 fb ee 00 mov $0xeefbb3,%r12d
>>>> 406259: c4 42 fb f7 e4 shrx %rax,%r12,%r12
>>>> 40625e: 4d 89 27 mov %r12,(%r15)
>>>> 406261: 41 bc 03 00 00 00 mov $0x3,%r12d
>>>> 406267: 49 8b 07 mov (%r15),%rax
>>>> 40626a: 83 e0 03 and $0x3,%eax
>>>> 40626d: 49 89 07 mov %rax,(%r15)
>>>> 406270: 41 bc 1c 00 00 00 mov $0x1c,%r12d
>>>> 406276: 49 89 c4 mov %rax,%r12
>>>> 406279: 49 83 cc 1c or $0x1c,%r12
>>>> 40627d: c3 retq
>>>
>>> Yes, this is a case (straight-line code) where existing Forth systems
>>> do well. Let's see:
>>>
>>> gforth-fast (development):
>>> $7FA5FDC99158 lit 1->2
>>> $7FA5FDC99160 #15662003
>>> 7FA5FD93F812: mov r15,$08[rbx]
>>> $7FA5FDC99168 swap 2->1
>>> 7FA5FD93F816: mov $00[r13],r15
>>> 7FA5FD93F81A: sub r13,$08
>>> $7FA5FDC99170 1- 1->1
>>> 7FA5FD93F81E: sub r8,$01
>>> $7FA5FDC99178 2* 1->1
>>> 7FA5FD93F822: add r8,r8
>>> $7FA5FDC99180 rshift 1->1
>>> 7FA5FD93F825: mov rax,$08[r13]
>>> 7FA5FD93F829: mov ecx,r8d
>>> 7FA5FD93F82C: add r13,$08
>>> 7FA5FD93F830: shr rax,CL
>>> 7FA5FD93F833: mov r8,rax
>>> $7FA5FDC99188 lit and 1->1
>>> $7FA5FDC99190 #3
>>> $7FA5FDC99198 and
>>> 7FA5FD93F836: add rbx,$48
>>> 7FA5FD93F83A: and r8,-$10[rbx]
>>> $7FA5FDC991A0 lit 1->2
>>> $7FA5FDC991A8 #28
>>> 7FA5FD93F83E: mov r15,$08[rbx]
>>> $7FA5FDC991B0 or 2->1
>>> 7FA5FD93F842: or r8,r15
>>> $7FA5FDC991B8 ;s 1->1
>>> 7FA5FD93F845: mov rbx,[r14]
>>> 7FA5FD93F848: add r14,$08
>>> 7FA5FD93F84C: mov rax,[rbx]
>>> 7FA5FD93F84F: jmp eax
>>>
>>> iforth lxf SwiftForth x64 vfx64
>>> pop rbx dec ebx -8 [RBP] RBP LEA DEC RBX
>>> lea rbx, [rbx -1 +] shl ebx, 1h EEFBB3 # 0 [RBP] MOV SHL RBX, #1
>>> lea rbx, [rbx*2 0 +] mov eax, #EEFBB3h RBX DEC MOV RCX, RBX
>>> mov rcx, rbx mov ecx, ebx RBX SHL MOV EBX, #00EEFBB3
>>> mov rbx, $00EEFBB3 d# shr eax, cl RBX RCX MOV SHR RBX, CL
>>> shr rbx, cl and eax, #3h 0 [RBP] RBX MOV AND RBX, #03
>>> and rbx, 3 b# or eax, #1Ch 8 [RBP] RBP LEA OR RBX, #1C
>>> or rbx, #28 b# mov ebx, eax RBX CL SHR RET/NEXT
>>> push rbx ret near 3 # RBX AND
>>> ; 1C # RBX OR
>>> RET
>>>
>>> - anton
>>>
>>
>> How does this simple lookup solution compare?
>>
>> : d/m s\" 0\x1f\x1c\x1f\x1e\x1f\x1e\x1f\x1f\x1e\x1f\x1e\x1f" drop + c@ ;
>> : x 13 1 do i d/m . loop ;
>> x 31 28 31 30 31 30 31 31 30 31 30 31 ok
>
> Four year period is better:
> 2 : | OVER , + ; : 5m 31 | 30 | 31 | 30 | 31 | ;
> 3 DATA TABLE ( start of month within leap period) -1
> 4 31 | 28 | 5m 5m 31 | 28 | 5m 5m 31 | 29 | 5m 5m
> 5 31 | 28 | 5m 5m , : T[] CELLS TABLE + @ ;
>
>>

A leap year shouldn't be difficult to handle, a typical algorithm is

: leap-year? ( y -- 0 | 1 ) \ Returns 1 for a leap year, otherwise 0
dup 3 and if 0= exit then \ Return 0 if not divisible by 4
dup 400 mod 0= if drop 1 exit then
100 mod if 1 exit then
0
;p

and use it with:

\ days/month ignores leap years
: days/month ( month -- days )
s\" 0\x1f\x1c\x1f\x1e\x1f\x1e\x1f\x1f\x1e\x1f\x1e\x1f"
drop + c@
;

: days-in-month ( year month -- n )
days/month dup 28 > if nip exit then \ Exit if not February
swap leap-year? +
;

That definition of leap year is a bit slow with the MODs and can be
better, particularly if the range of years is restricted. For example
if the range is restricted to 1901 to 2099, LEAP-YEAR? can be defined as
: leap-year? ( year -- 0 | 1) 3 and 0= negate ;
as the year 2000 was a leap year

If only a few non-leap year century dates like 1900 are in the range,
they can be tested for specifically.

If a wider range is needed a bit vector can be used. In a 64 bit Forth,
500 years would take only 8 cells.

A completely general solution isn't feasible as the year in which
various countries adopted the Gregorian calendar varies from the 16th
century to the 20th century so days per month varies by country e.g. in
the UK September 1752 had only 19 days.

--
Gerry

Re: A useful program, watdoido

<nnd$284a1352$39200c5b@b8f5f21687ce8306>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26091&group=comp.lang.forth#26091

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upd5f5$1f2mm$1@dont-email.me> <2024Jan31.180137@mips.complang.tuwien.ac.at> <upeigu$1n4af$1@dont-email.me>
From: albert@spenarnc.xs4all.nl
Subject: Re: A useful program, watdoido
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$284a1352$39200c5b@b8f5f21687ce8306>
Organization: KPN B.V.
Date: Mon, 05 Feb 2024 12:15:18 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 33
Injection-Date: Mon, 05 Feb 2024 12:15:18 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2473
 by: albert@spenarnc.xs4all.nl - Mon, 5 Feb 2024 11:15 UTC

In article <upeigu$1n4af$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
<SNIP>
>Perhaps not, but for me it does. Let's talk about expectations since
>we all have them.
>
>A non-Forth programmer acquaintance said he thought it (Forth) wasn't
>a HLL at all - more like assembler (and he was well-versed in asm).
>Apparently even asm coders have expectations and straying too far
>doesn't go down well. Hence prefix assemblers in forth, $ prefix
>to denote a hex number, recognizers etc. When Mitch Bradley suggested
>parsers h# f# for hex and float respectively one could hear the
>proverbial pin drop. Personally I'd wear it in a forth environment but
>finding another so-inclined would be difficult. Harder still would be
>finding an app end-user that tolerated Albert's approach to command-line
>parsing. Giving end-users what they expect is the best policy. They
>don't care what language the app was written in or in making things easy
>for the programmer.
>

Seriously, what Mitch and I are doing is close to classical Forth.
I don't change any thing about parsing. I just introduce A PREFIX flag
that allows matching a dictionary entry if it is merely a prefix of
another word. The result is that `` H# 0A '' can be collated to
`` H#0A ''. The world has not noticed yet that it amounts to a netto
simplification of the Forth systems.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat purring. - the Wise from Antrim -

Re: A useful program, watdoido

<uptlcd$u5lq$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26095&group=comp.lang.forth#26095

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Wed, 7 Feb 2024 03:05:34 +1100
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <uptlcd$u5lq$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upd5f5$1f2mm$1@dont-email.me> <2024Jan31.180137@mips.complang.tuwien.ac.at>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 6 Feb 2024 16:05:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5bfeec72258cbe11cb81e0fbe1ecf12";
logging-data="988858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194vJckHhY89/Gml7GzEVs6"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GVdeRA8wfb3WTystNWhCjqcRGjY=
Content-Language: en-GB
In-Reply-To: <nnd$284a1352$39200c5b@b8f5f21687ce8306>
 by: dxf - Tue, 6 Feb 2024 16:05 UTC

On 5/02/2024 10:15 pm, albert@spenarnc.xs4all.nl wrote:
> In article <upeigu$1n4af$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
> <SNIP>
>> Perhaps not, but for me it does. Let's talk about expectations since
>> we all have them.
>>
>> A non-Forth programmer acquaintance said he thought it (Forth) wasn't
>> a HLL at all - more like assembler (and he was well-versed in asm).
>> Apparently even asm coders have expectations and straying too far
>> doesn't go down well. Hence prefix assemblers in forth, $ prefix
>> to denote a hex number, recognizers etc. When Mitch Bradley suggested
>> parsers h# f# for hex and float respectively one could hear the
>> proverbial pin drop. Personally I'd wear it in a forth environment but
>> finding another so-inclined would be difficult. Harder still would be
>> finding an app end-user that tolerated Albert's approach to command-line
>> parsing. Giving end-users what they expect is the best policy. They
>> don't care what language the app was written in or in making things easy
>> for the programmer.
>>
>
> Seriously, what Mitch and I are doing is close to classical Forth.
> I don't change any thing about parsing. I just introduce A PREFIX flag
> that allows matching a dictionary entry if it is merely a prefix of
> another word. The result is that `` H# 0A '' can be collated to
> `` H#0A ''. The world has not noticed yet that it amounts to a netto
> simplification of the Forth systems.

Not that simple if the interpreter and headers need changing. At the
time of ANS many forths already supported floats and hex in the form
we know. Changing that would require a strong argument. In practice
200x only added quoted characters. The latter being redundant it was
looks over substance.

Re: A useful program, watdoido

<nnd$219a8477$44c8b6bc@1a120388e0d84887>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26097&group=comp.lang.forth#26097

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me>
From: albert@spenarnc.xs4all.nl
Subject: Re: A useful program, watdoido
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$219a8477$44c8b6bc@1a120388e0d84887>
Organization: KPN B.V.
Date: Wed, 07 Feb 2024 15:10:05 +0100
Path: i2pn2.org!i2pn.org!news.furie.org.uk!nntp.terraraq.uk!news.quux.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 51
Injection-Date: Wed, 07 Feb 2024 15:10:05 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: albert@spenarnc.xs4all.nl - Wed, 7 Feb 2024 14:10 UTC

In article <uptlcd$u5lq$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 5/02/2024 10:15 pm, albert@spenarnc.xs4all.nl wrote:
<SNIP>
>> Seriously, what Mitch and I are doing is close to classical Forth.
>> I don't change any thing about parsing. I just introduce A PREFIX flag
>> that allows matching a dictionary entry if it is merely a prefix of
>> another word. The result is that `` H# 0A '' can be collated to
>> `` H#0A ''. The world has not noticed yet that it amounts to a netto
>> simplification of the Forth systems.
>
>Not that simple if the interpreter and headers need changing. At the
>time of ANS many forths already supported floats and hex in the form
>we know. Changing that would require a strong argument. In practice
>200x only added quoted characters. The latter being redundant it was
>looks over substance.
>

That argument backfires. ciforth contains no floating point.
Without changing "the interpreter and headers", I can add floating
point, *including* the denotations for floating point literals.
I repeat:
"
The world has not noticed yet that it amounts to a netto
simplification of the Forth systems.
"

The hex additions by $ triggered me to make this invention in the first
place. I was confronted by loads of Marcel Hendrix programs freely using
$ hex constants. There was no way I'd tolerate this pollution of the
kernel forth. So I made it a loadable extension.
Maybe we come to our senses and adopt 0x for the hex prefix, such as
used in Win32Forth. In ciforth this means change in one line in a
loadable screen:
"
: $ BASE @ >R HEX (NUMBER) R> BASE ! POSTPONE SDLITERAL ;
PREFIX IMMEDIATE
"
The change is $ --> 0x .

People that would rather not be bothered by prefixes either way,
can ignore the subject. They can keep PREFIX in the back of their mind
in case they need it. No $1 , no 0x1 .
A library sits there, and is invisible.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat purring. - the Wise from Antrim -

Re: A useful program, watdoido

<0c5c6838a692f81cab2239d84212245a@www.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26098&group=comp.lang.forth#26098

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Wed, 7 Feb 2024 17:47:15 +0000
Organization: novaBBS
Message-ID: <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upd5f5$1f2mm$1@dont-email.me> <2024Jan31.180137@mips.complang.tuwien.ac.at> <upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2024003"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
X-Rslight-Site: $2y$10$jY10q5OrBv0PwtRnU1V9WuziebD3lvA8ifyVx/VAJDrDtuyiNY40S
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: mhx - Wed, 7 Feb 2024 17:47 UTC

Out of curiosity: How do we postpone `` H# 0A '' ?

-marcel

Re: A useful program, watdoido

<2024Feb7.193948@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26099&group=comp.lang.forth#26099

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!nntp.comgw.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Wed, 07 Feb 2024 18:39:48 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 33
Message-ID: <2024Feb7.193948@mips.complang.tuwien.ac.at>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upd5f5$1f2mm$1@dont-email.me> <2024Jan31.180137@mips.complang.tuwien.ac.at> <upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
Injection-Info: dont-email.me; posting-host="b7626ad448d241929f65e416494d58c8";
logging-data="1641001"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4+wpFLMxce65lTtYmdL2R"
Cancel-Lock: sha1:Mb9HXDiNHsOkQSWiNvoiPCu6x10=
X-newsreader: xrn 10.11
 by: Anton Ertl - Wed, 7 Feb 2024 18:39 UTC

mhx@iae.nl (mhx) writes:
>Out of curiosity: How do we postpone `` H# 0A '' ?

h# 0a postpone literal

Apart from the H# this is the Forth-94 and -2012 way to postpone an
integer number.

Let's see which systems already support

: foo postpone $0a ; immediate
: bar foo ;
bar .

Gforth-0.7.3: undefined word (at the $0a)
Gforth development: bar prints 10 (as intended)
iforth (5.1-mini): $0a ?
SwiftForth x64: $0a ?
VFX 64: bar prints 10 (as intended)

Yes, I don't have the latest versions of all systems installed, let me
know if your system has learned new tricks in the meantime.

Anyway, for the fans of H#, how do you write the equivalent of
"postpone $0a" (as supported by development Gforth and VFX 64)? And
why is your equivalent better IYO?

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: A useful program, watdoido

<nnd$092d84cc$43538b7b@9c209b1afd3bcb62>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26100&group=comp.lang.forth#26100

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
From: albert@spenarnc.xs4all.nl
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$092d84cc$43538b7b@9c209b1afd3bcb62>
Organization: KPN B.V.
Date: Wed, 07 Feb 2024 21:19:03 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 18
Injection-Date: Wed, 07 Feb 2024 21:19:03 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1480
 by: albert@spenarnc.xs4all.nl - Wed, 7 Feb 2024 20:19 UTC

In article <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>,
mhx <mhx@iae.nl> wrote:
>Out of curiosity: How do we postpone `` H# 0A '' ?

That is the reason you don't us that type of prefixes, and
that you avoid postponing arbitrary parsing expressions.

In my book H#0A is a number and behaves the same in interpreter and
compilation mode. Same a 1.03E-10 .

>
>-marcel
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat purring. - the Wise from Antrim -

Re: A useful program, watdoido

<uq15s4$1kll2$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26101&group=comp.lang.forth#26101

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 11:05:26 +1100
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <uq15s4$1kll2$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upd5f5$1f2mm$1@dont-email.me> <2024Jan31.180137@mips.complang.tuwien.ac.at>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
<uptlcd$u5lq$1@dont-email.me>
<0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
<2024Feb7.193948@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Feb 2024 00:05:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="033859c30cfd13b689cf2ddb55e45a73";
logging-data="1726114"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CpAzRvM94MA/oRzsYcl4D"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Bx9zQv4M6sfggMeWTh8VdFzYX5U=
In-Reply-To: <2024Feb7.193948@mips.complang.tuwien.ac.at>
Content-Language: en-GB
 by: dxf - Thu, 8 Feb 2024 00:05 UTC

On 8/02/2024 5:39 am, Anton Ertl wrote:
> mhx@iae.nl (mhx) writes:
>> Out of curiosity: How do we postpone `` H# 0A '' ?
>
> h# 0a postpone literal
>
> Apart from the H# this is the Forth-94 and -2012 way to postpone an
> integer number.
>
> Let's see which systems already support
>
> : foo postpone $0a ; immediate
> : bar foo ;
> bar .
>
> Gforth-0.7.3: undefined word (at the $0a)
> Gforth development: bar prints 10 (as intended)
> iforth (5.1-mini): $0a ?
> SwiftForth x64: $0a ?
> VFX 64: bar prints 10 (as intended)
>
> Yes, I don't have the latest versions of all systems installed, let me
> know if your system has learned new tricks in the meantime.
>
> Anyway, for the fans of H#, how do you write the equivalent of
> "postpone $0a" (as supported by development Gforth and VFX 64)? And
> why is your equivalent better IYO?

The only system I'm aware actively using H# et al is Bradley's. It's
possible he has no use for what you ask in which case why support it?
Certainly no Forth standard has deemed it necessary and systems that
support it appear to be in the minority. If you wish you may add
DX-Forth to the list.

Re: A useful program, watdoido

<18c959289e22ab302d9fd37aa0d85b1d@www.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26102&group=comp.lang.forth#26102

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 00:03:37 +0000
Organization: novaBBS
Message-ID: <18c959289e22ab302d9fd37aa0d85b1d@www.novabbs.com>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <0c5c6838a692f81cab2239d84212245a@www.novabbs.com> <nnd$092d84cc$43538b7b@9c209b1afd3bcb62>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2054951"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
X-Rslight-Site: $2y$10$NQdEpYI2X8VwiM4qb35ZROSB7v.bZQS.ontdrRN4djB3IuaCGlfPW
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: mhx - Thu, 8 Feb 2024 00:03 UTC

albert@spenarnc.xs4all.nl wrote:

> In article <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>,
> mhx <mhx@iae.nl> wrote:
>>Out of curiosity: How do we postpone `` H# 0A '' ?

> That is the reason you don't us that type of prefixes, and
> that you avoid postponing arbitrary parsing expressions.

Yes. Say I want to postpone a number and store it in a rewritten
colon definition. Not only do I have to parse the parsing
expression `` H# 0A '' in the original, I have to store it
in the rewritten definition as `` H# 0A '' again, because
it is too dangerous to say `` 0A '' or `` 10 '' and
of course I can't use `` $0A '' or `` #10 '', much less
`` H#0A '' :--)

-marcel

Re: A useful program, watdoido

<uq1g1t$1ln91$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26103&group=comp.lang.forth#26103

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 13:59:09 +1100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uq1g1t$1ln91$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
<uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 8 Feb 2024 02:59:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="033859c30cfd13b689cf2ddb55e45a73";
logging-data="1760545"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pDXolSdGDyvPp4WGJ+ygu"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9ccRjJR+y8kwY6D9NC8lGWKXVhE=
Content-Language: en-GB
In-Reply-To: <nnd$219a8477$44c8b6bc@1a120388e0d84887>
 by: dxf - Thu, 8 Feb 2024 02:59 UTC

On 8/02/2024 1:10 am, albert@spenarnc.xs4all.nl wrote:
> In article <uptlcd$u5lq$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>> On 5/02/2024 10:15 pm, albert@spenarnc.xs4all.nl wrote:
> <SNIP>
>>> Seriously, what Mitch and I are doing is close to classical Forth.
>>> I don't change any thing about parsing. I just introduce A PREFIX flag
>>> that allows matching a dictionary entry if it is merely a prefix of
>>> another word. The result is that `` H# 0A '' can be collated to
>>> `` H#0A ''. The world has not noticed yet that it amounts to a netto
>>> simplification of the Forth systems.
>>
>> Not that simple if the interpreter and headers need changing. At the
>> time of ANS many forths already supported floats and hex in the form
>> we know. Changing that would require a strong argument. In practice
>> 200x only added quoted characters. The latter being redundant it was
>> looks over substance.
>>
>
> That argument backfires. ciforth contains no floating point.
> Without changing "the interpreter and headers", I can add floating
> point, *including* the denotations for floating point literals.
> I repeat:
> "
> The world has not noticed yet that it amounts to a netto
> simplification of the Forth systems.
> "

What is simple about H#0A ? H# 0A is simple because it requires no
system changes. But it also contradicts the notion forth understands
numbers. If it's ok for forth to differentiate doubles from singles,
why not floats, hex etc.

Re: A useful program, watdoido

<03135bf8daaa96219c63fc71b229734e@www.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26104&group=comp.lang.forth#26104

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 08:16:51 +0000
Organization: novaBBS
Message-ID: <03135bf8daaa96219c63fc71b229734e@www.novabbs.com>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887> <uq1g1t$1ln91$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2090340"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$rH8npOR7A6yNsugI3ho9MOO7/y.tXSJKycA8vp./jGojfKc.NQoky
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: mhx - Thu, 8 Feb 2024 08:16 UTC

dxf wrote:
[..]
> What is simple about H#0A ? H# 0A is simple because it requires no
> system changes. But it also contradicts the notion forth understands
> numbers. If it's ok for forth to differentiate doubles from singles,
> why not floats, hex etc.

IMHO there isn't anything wrong with a standard conforming system
that has an humpty-dumpty facility to redefine or define words that
recognize `` H#0A '' for what I want it to mean.

In fact, I *expect* to be able to modify any Forth to do exactly
what I want. The `problems` with that start when I want to use
my new features in a Standard Program, or when I want to use a
Forth that has non-standard facilities that clash with my own
vision on how they should behave.

The easy way out is to wait for a standard Forth that is dumb
as a brick (no problem) but generates Vfx performance-quality code,
with a library that extends it to (e.g.) Gforth that can target
anything from standard phones to super computers.

-marcel

Re: A useful program, watdoido

<8ba8767a-4580-402f-af67-83604608a10fn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26105&group=comp.lang.forth#26105

  copy link   Newsgroups: comp.lang.forth
X-Forwarded-Encrypted: i=1; AJvYcCVhd1O3RdzXAnKUTv8Dw7txiOGdjS+Cp9rOU9e3WwoyGp8vm0Ipu0tox+QZpNTYedpfok+Wz+uDm0S3bsYl4KMtfMWRiOCvc3fd+e4BKK4uZUgc7CM=
X-Received: by 2002:a05:622a:15d1:b0:42c:3d18:a384 with SMTP id d17-20020a05622a15d100b0042c3d18a384mr373438qty.6.1707381749383;
Thu, 08 Feb 2024 00:42:29 -0800 (PST)
X-Forwarded-Encrypted: i=1; AJvYcCVEX5DnVcImVcJak4WQ34G8inJXtPY8cVnRcUbrNX1Hkfd4HluO3ey05cnt4RmA8zu74ZfKcLEwdkidasCg66m0xWwJd0Je7Lc3k6Lp3iZYKGg=
X-Received: by 2002:a05:622a:199a:b0:42c:845:5ff0 with SMTP id
u26-20020a05622a199a00b0042c08455ff0mr624321qtc.5.1707381749129; Thu, 08 Feb
2024 00:42:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 8 Feb 2024 00:42:28 -0800 (PST)
In-Reply-To: <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upd5f5$1f2mm$1@dont-email.me>
<2024Jan31.180137@mips.complang.tuwien.ac.at> <upeigu$1n4af$1@dont-email.me>
<nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8ba8767a-4580-402f-af67-83604608a10fn@googlegroups.com>
Subject: Re: A useful program, watdoido
From: the.beez.speaks@gmail.com (Hans Bezemer)
Injection-Date: Thu, 08 Feb 2024 08:42:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Hans Bezemer - Thu, 8 Feb 2024 08:42 UTC

On Wednesday, February 7, 2024 at 6:50:52 PM UTC+1, mhx wrote:
> Out of curiosity: How do we postpone `` H# 0A '' ?
>
> -marcel
I'd say: don't over complicate it:

hex
0A constant #0A
decimal

Solved.. Worst case scenario: you have to define 256 constants. But how often does THAT happen?

Hans Bezemer

Re: A useful program, watdoido

<uq29d9$1tk4h$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26106&group=comp.lang.forth#26106

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 21:11:53 +1100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uq29d9$1tk4h$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
<uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887>
<uq1g1t$1ln91$1@dont-email.me>
<03135bf8daaa96219c63fc71b229734e@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 8 Feb 2024 10:11:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="033859c30cfd13b689cf2ddb55e45a73";
logging-data="2019473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rrv51sDynC9vUJSPzYlBN"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:spcvgqehvR4oXyhhk7frpTl87Mg=
Content-Language: en-GB
In-Reply-To: <03135bf8daaa96219c63fc71b229734e@www.novabbs.com>
 by: dxf - Thu, 8 Feb 2024 10:11 UTC

On 8/02/2024 7:16 pm, mhx wrote:
> dxf wrote:
> [..]
>> What is simple about H#0A ?  H# 0A  is simple because it requires no
>> system changes.  But it also contradicts the notion forth understands
>> numbers.  If it's ok for forth to differentiate doubles from singles,
>> why not floats, hex etc.
>
> IMHO there isn't anything wrong with a standard conforming system
> that has an humpty-dumpty facility to redefine or define words that recognize `` H#0A '' for what I want it to mean.

How many compiler/languages support this? AFAIK if an application required
an interpreter, the programmer wrote one. That has to be better than
shoe-horning forth's interpreter to do it.

"I don't like the idea of a Forth, old or new, that does everything." - Moore

Re: A useful program, watdoido

<nnd$5ecc7dca$1454d986@093c12dcca819dda>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26107&group=comp.lang.forth#26107

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <0c5c6838a692f81cab2239d84212245a@www.novabbs.com> <nnd$092d84cc$43538b7b@9c209b1afd3bcb62> <18c959289e22ab302d9fd37aa0d85b1d@www.novabbs.com>
From: albert@spenarnc.xs4all.nl
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$5ecc7dca$1454d986@093c12dcca819dda>
Organization: KPN B.V.
Date: Thu, 08 Feb 2024 12:41:03 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 29
Injection-Date: Thu, 08 Feb 2024 12:41:03 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1943
 by: albert@spenarnc.xs4all.nl - Thu, 8 Feb 2024 11:41 UTC

In article <18c959289e22ab302d9fd37aa0d85b1d@www.novabbs.com>,
mhx <mhx@iae.nl> wrote:
>albert@spenarnc.xs4all.nl wrote:
>
>> In article <0c5c6838a692f81cab2239d84212245a@www.novabbs.com>,
>> mhx <mhx@iae.nl> wrote:
>>>Out of curiosity: How do we postpone `` H# 0A '' ?
>
>> That is the reason you don't us that type of prefixes, and
>> that you avoid postponing arbitrary parsing expressions.
>
>Yes. Say I want to postpone a number and store it in a rewritten
>colon definition. Not only do I have to parse the parsing
>expression `` H# 0A '' in the original, I have to store it
>in the rewritten definition as `` H# 0A '' again, because
>it is too dangerous to say `` 0A '' or `` 10 '' and
>of course I can't use `` $0A '' or `` #10 '', much less
>`` H#0A '' :--)

It hurts. Don't do that.

>
>-marcel
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat purring. - the Wise from Antrim -

Re: A useful program, watdoido

<nnd$7d34a308$23cc7aa8@093c12dcca819dda>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26108&group=comp.lang.forth#26108

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887> <uq1g1t$1ln91$1@dont-email.me>
From: albert@spenarnc.xs4all.nl
Subject: Re: A useful program, watdoido
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$7d34a308$23cc7aa8@093c12dcca819dda>
Organization: KPN B.V.
Date: Thu, 08 Feb 2024 12:43:37 +0100
Path: i2pn2.org!i2pn.org!paganini.bofh.team!3.eu.feeder.erje.net!feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 18
Injection-Date: Thu, 08 Feb 2024 12:43:37 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1623
 by: albert@spenarnc.xs4all.nl - Thu, 8 Feb 2024 11:43 UTC

In article <uq1g1t$1ln91$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 8/02/2024 1:10 am, albert@spenarnc.xs4all.nl wrote:

>What is simple about H#0A ? H# 0A is simple because it requires no
>system changes. But it also contradicts the notion forth understands
>numbers. If it's ok for forth to differentiate doubles from singles,
>why not floats, hex etc.

Forth must not ony understand numbers, but all literals that come
with an application program. Used definable prefixes is ideal
for that. This contradicts nothing.
>
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat purring. - the Wise from Antrim -

Re: A useful program, watdoido

<99a37960c72986678073d5d79f544f0a@www.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26109&group=comp.lang.forth#26109

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Thu, 8 Feb 2024 16:28:52 +0000
Organization: novaBBS
Message-ID: <99a37960c72986678073d5d79f544f0a@www.novabbs.com>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887> <uq1g1t$1ln91$1@dont-email.me> <nnd$7d34a308$23cc7aa8@093c12dcca819dda>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2131135"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$Tcl/H/2.h46zRqJfR4dudu80xgVhX0IRc6u4QQmWmCCrUJne5L8vm
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
 by: minforth - Thu, 8 Feb 2024 16:28 UTC

Flexibilty is the inportant advantage. Prefixes may simplify parsing;
iow if it helps it helps, not much to discuss there.

E.g. parsing csv tables does not need prefixes, but Forth's flexibility
and compactness helps a lot.

Re: A useful program, watdoido

<uq3u0h$276f1$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26111&group=comp.lang.forth#26111

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Fri, 9 Feb 2024 12:09:38 +1100
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <uq3u0h$276f1$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887>
<uq1g1t$1ln91$1@dont-email.me> <nnd$7d34a308$23cc7aa8@093c12dcca819dda>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 9 Feb 2024 01:09:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2eb7c29e14ff043b0a278ce4701e8f45";
logging-data="2333153"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s8KTdLKVY8MrZzKp85uSY"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:wbK1pF8vumZ14KZyb1rzns69CtY=
In-Reply-To: <nnd$7d34a308$23cc7aa8@093c12dcca819dda>
Content-Language: en-GB
 by: dxf - Fri, 9 Feb 2024 01:09 UTC

On 8/02/2024 10:43 pm, albert@spenarnc.xs4all.nl wrote:
> In article <uq1g1t$1ln91$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>> On 8/02/2024 1:10 am, albert@spenarnc.xs4all.nl wrote:
>
>> What is simple about H#0A ? H# 0A is simple because it requires no
>> system changes. But it also contradicts the notion forth understands
>> numbers. If it's ok for forth to differentiate doubles from singles,
>> why not floats, hex etc.
>
> Forth must not ony understand numbers, but all literals that come
> with an application program.

Why - what other language compiler does?

> Used definable prefixes is ideal
> for that. This contradicts nothing.

Simply saying 'I can make my compiler do that' is no reason in itself.
ISTM if it were very important end-applications carry an extensible
compiler around with them, the world - not to mention forth target
compilers - would be following the lead.

25 years ago Jeff Fox predicted:

"I see ANSI Forth [...] can become one more failed attempt to find
the ideal portable scripting language."

It was uncannily accurate.

Re: A useful program, watdoido

<2024Feb9.171209@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26120&group=comp.lang.forth#26120

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Fri, 09 Feb 2024 16:12:09 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 37
Message-ID: <2024Feb9.171209@mips.complang.tuwien.ac.at>
References: <nnd$688f6514$2847ddd2@e099b08a19891604> <upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306> <uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887> <uq1g1t$1ln91$1@dont-email.me> <03135bf8daaa96219c63fc71b229734e@www.novabbs.com> <uq29d9$1tk4h$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="99bf139f82bdabde322cdca8ac1e0da8";
logging-data="2845302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188ob0xNo30+XhtbPr6sumx"
Cancel-Lock: sha1:6XM7FR8QIgi413E1Gmw8+kme7Lo=
X-newsreader: xrn 10.11
 by: Anton Ertl - Fri, 9 Feb 2024 16:12 UTC

dxf <dxforth@gmail.com> writes:
>> IMHO there isn't anything wrong with a standard conforming system
>> that has an humpty-dumpty facility to redefine or define words that recognize `` H#0A '' for what I want it to mean.
>
>How many compiler/languages support this?

Most Forth systems support extending the text interpreter.

Concerning other languages: I expect that Lisp and Prolog systems have
such capabilities.

>AFAIK if an application required
>an interpreter, the programmer wrote one. That has to be better than
>shoe-horning forth's interpreter to do it.

Why do you think so?

Greenspun's tenth rule is:

|Any sufficiently complicated C or Fortran program contains an ad hoc,
|informally-specified, bug-ridden, slow implementation of half of
|Common Lisp.

So, yes indeed, any sufficiently complicated application requires an
interpreter, and C and Fortran programmers write one. And the result
is bug-ridden and slow. Does not sound better to me.

>"I don't like the idea of a Forth, old or new, that does everything." - Moore

That's why we have Forth systems that are extensible.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: A useful program, watdoido

<uq6luu$2sm8b$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26123&group=comp.lang.forth#26123

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Sat, 10 Feb 2024 13:10:39 +1100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uq6luu$2sm8b$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
<uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887>
<uq1g1t$1ln91$1@dont-email.me>
<03135bf8daaa96219c63fc71b229734e@www.novabbs.com>
<uq29d9$1tk4h$1@dont-email.me> <2024Feb9.171209@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 10 Feb 2024 02:10:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a350d93e1d3129fc032ea59af25fac65";
logging-data="3037451"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1IqBNlVgvCEqIUTIv6JpW"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:8cfkQwwRboCwWQozw1b6ggShAI4=
In-Reply-To: <2024Feb9.171209@mips.complang.tuwien.ac.at>
Content-Language: en-GB
 by: dxf - Sat, 10 Feb 2024 02:10 UTC

On 10/02/2024 3:12 am, Anton Ertl wrote:
> ...
> Greenspun's tenth rule is:
>
> |Any sufficiently complicated C or Fortran program contains an ad hoc,
> |informally-specified, bug-ridden, slow implementation of half of
> |Common Lisp.
>
> So, yes indeed, any sufficiently complicated application requires an
> interpreter, and C and Fortran programmers write one. And the result
> is bug-ridden and slow. Does not sound better to me.
>
>> "I don't like the idea of a Forth, old or new, that does everything." - Moore
>
> That's why we have Forth systems that are extensible.

You may - but does Moore? IIRC he said Forth should be small enough that
it can be thrown away. The only reason I see for doing that is when it's
no longer fit for purpose. This, of course, contrasts with an industry
that promotes the compiler. ISTM application code written with primitives
is going be simpler and more easily altered when the time comes than code
hooked to, and reliant upon, on a specific compiler. I certainly don't
want to make my complier any more complicated than it is. I'm kind of
glad I'm at the point where I can forget about how it works (or ought to
work).

Re: A useful program, watdoido

<uqa45q$tikl$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=26141&group=comp.lang.forth#26141

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.furie.org.uk!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: A useful program, watdoido
Date: Sun, 11 Feb 2024 20:31:39 +1100
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uqa45q$tikl$1@dont-email.me>
References: <nnd$688f6514$2847ddd2@e099b08a19891604>
<upeigu$1n4af$1@dont-email.me> <nnd$284a1352$39200c5b@b8f5f21687ce8306>
<uptlcd$u5lq$1@dont-email.me> <nnd$219a8477$44c8b6bc@1a120388e0d84887>
<uq1g1t$1ln91$1@dont-email.me>
<03135bf8daaa96219c63fc71b229734e@www.novabbs.com>
<uq29d9$1tk4h$1@dont-email.me> <2024Feb9.171209@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 11 Feb 2024 09:31:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ed4f478fa1290876ec1a3119364e49f";
logging-data="969365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1998BjxqgoSOskGYtS0IotX"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VBkQ2uyl7tNh+yYvr52RWUPJmt4=
Content-Language: en-GB
In-Reply-To: <2024Feb9.171209@mips.complang.tuwien.ac.at>
 by: dxf - Sun, 11 Feb 2024 09:31 UTC

On 10/02/2024 3:12 am, Anton Ertl wrote:
> dxf <dxforth@gmail.com> writes:
>>> IMHO there isn't anything wrong with a standard conforming system
>>> that has an humpty-dumpty facility to redefine or define words that recognize `` H#0A '' for what I want it to mean.
>>
>> How many compiler/languages support this?
>
> Most Forth systems support extending the text interpreter.
>
> Concerning other languages: I expect that Lisp and Prolog systems have
> such capabilities.
>
>> AFAIK if an application required
>> an interpreter, the programmer wrote one. That has to be better than
>> shoe-horning forth's interpreter to do it.
>
> Why do you think so?

Because it's almost always not what you wanted. Using CATCH to stop the
interpreter aborting is a workaround. Feeding CREATE to EXECUTE-PARSING
is a workaround. Much easier to write the function you want it than to
retrofit an existing one. When complaints were made to ANS that OF was
inadequate, the response was the user can always contrive something that
OF will swallow.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor