Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

RADIO SHACK LEVEL II BASIC READY >_


devel / comp.lang.forth / Re: gForth Block File Question

SubjectAuthor
* gForth Block File QuestionVan Kichline
+* Re: gForth Block File QuestionVan Kichline
|`* Re: gForth Block File Questiondxforth
| `* Re: gForth Block File Questiondxforth
|  +* Re: gForth Block File QuestionVan Kichline
|  |`* Re: gForth Block File QuestionBrian Fox
|  | +- Re: gForth Block File Questiondxforth
|  | `* Re: gForth Block File QuestionVan Kichline
|  |  +* Re: gForth Block File QuestionS Jack
|  |  |+- Re: gForth Block File QuestionVan Kichline
|  |  |+- Re: gForth Block File QuestionBrian Fox
|  |  |`- Re: gForth Block File Questiondxforth
|  |  `* Re: gForth Block File QuestionAndy Valencia
|  |   +- Re: gForth Block File QuestionVan Kichline
|  |   `- Re: gForth Block File Questionnone
|  +* Re: gForth Block File QuestionRuvim
|  |+* Re: gForth Block File Questiondxforth
|  ||+* Re: gForth Block File QuestionAnton Ertl
|  |||`* Re: gForth Block File Questiondxforth
|  ||| `* Re: gForth Block File QuestionAnton Ertl
|  |||  +* Re: gForth Block File Questionminf...@arcor.de
|  |||  |+- Re: gForth Block File Questiondxforth
|  |||  |`* Re: gForth Block File QuestionAnton Ertl
|  |||  | `- Re: gForth Block File Questionnone
|  |||  `* Re: gForth Block File Questiondxforth
|  |||   `* Re: gForth Block File QuestionAnton Ertl
|  |||    `* Re: gForth Block File Questiondxforth
|  |||     `* Re: gForth Block File QuestionAnton Ertl
|  |||      +- Re: gForth Block File QuestionVan Kichline
|  |||      `- Re: gForth Block File Questiondxforth
|  ||`* Re: gForth Block File Questionnone
|  || `- Re: gForth Block File Questiondxforth
|  |`- Re: gForth Block File QuestionVan Kichline
|  `- Re: gForth Block File QuestionAnton Ertl
`- Re: gForth Block File Questionminf...@arcor.de

Pages:12
Re: gForth Block File Question

<167859284307.22763.12722674216596088048@media.vsta.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22779&group=comp.lang.forth#22779

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: van...@vsta.org (Andy Valencia)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Sat, 11 Mar 2023 19:47:23 -0800
Lines: 12
Message-ID: <167859284307.22763.12722674216596088048@media.vsta.org>
References: <tugqu9$26lh7$2@dont-email.me> <1a7fbdeb-b34c-4d08-9ef1-1bf5dc2bdb2en@googlegroups.com> <be3888a8-c017-4c4c-a6f7-1ddde7327000n@googlegroups.com> <81cccdfa-dccc-42cf-9a73-63606d20055bn@googlegroups.com>
X-Trace: individual.net l+gy3ZfcZ8hjwfkTuZ6LLgqxsHN6e+fDm4E1lt56rHFxUhUicg
X-Orig-Path: media
Cancel-Lock: sha1:o6m9veYKo9/HkdFf2NCrDviI2zc=
User-Agent: rn.py v0.0.1
 by: Andy Valencia - Sun, 12 Mar 2023 03:47 UTC

S Jack <sdwjack69@gmail.com> writes:
> I like block files and wouldn't care for a Forth that doesn't support
> them. The way they worked originally, as in FigForth, I find neat. I
> also like the simple coding of the Fig editor.

I should mention my block editor with vim-ish key bindings:

https://vsta.org/cgi-bin/fview.py?path=/src/vi.txt

Andy Valencia
Home page: https://www.vsta.org/andy/
To contact me: https://www.vsta.org/contact/andy.html

Re: gForth Block File Question

<af6facb0-7e56-4a65-9330-f3e23c833ad2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22780&group=comp.lang.forth#22780

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:95:0:b0:3bd:176a:d773 with SMTP id c21-20020ac80095000000b003bd176ad773mr8854362qtg.6.1678604166822;
Sat, 11 Mar 2023 22:56:06 -0800 (PST)
X-Received: by 2002:a37:418b:0:b0:742:f3f8:77ae with SMTP id
o133-20020a37418b000000b00742f3f877aemr2114235qka.6.1678604166513; Sat, 11
Mar 2023 22:56:06 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 11 Mar 2023 22:56:06 -0800 (PST)
In-Reply-To: <167859284307.22763.12722674216596088048@media.vsta.org>
Injection-Info: google-groups.googlegroups.com; posting-host=50.46.219.106; posting-account=VRZdRQoAAAByg2veNn4xonsritzF12hS
NNTP-Posting-Host: 50.46.219.106
References: <tugqu9$26lh7$2@dont-email.me> <1a7fbdeb-b34c-4d08-9ef1-1bf5dc2bdb2en@googlegroups.com>
<be3888a8-c017-4c4c-a6f7-1ddde7327000n@googlegroups.com> <81cccdfa-dccc-42cf-9a73-63606d20055bn@googlegroups.com>
<167859284307.22763.12722674216596088048@media.vsta.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af6facb0-7e56-4a65-9330-f3e23c833ad2n@googlegroups.com>
Subject: Re: gForth Block File Question
From: vkichl...@gmail.com (Van Kichline)
Injection-Date: Sun, 12 Mar 2023 06:56:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1739
 by: Van Kichline - Sun, 12 Mar 2023 06:56 UTC

On Saturday, March 11, 2023 at 7:50:06 PM UTC-8, Andy Valencia wrote:
> I should mention my block editor with vim-ish key bindings:
>
> https://vsta.org/cgi-bin/fview.py?path=/src/vi.txt
>
> Andy Valencia
> Home page: https://www.vsta.org/andy/
> To contact me: https://www.vsta.org/contact/andy.html
I will give this a try, thanks!

Re: gForth Block File Question

<2023Mar12.092557@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22783&group=comp.lang.forth#22783

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Sun, 12 Mar 2023 08:25:57 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2023Mar12.092557@mips.complang.tuwien.ac.at>
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com> <3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com> <tugqku$26lh7$1@dont-email.me> <tugqu9$26lh7$2@dont-email.me> <tuhdph$2cpfj$1@dont-email.me> <tuhh4p$2dn7r$1@dont-email.me> <2023Mar11.105604@mips.complang.tuwien.ac.at> <tuhmfi$2embi$1@dont-email.me> <2023Mar11.121730@mips.complang.tuwien.ac.at> <d694f0e2-e64e-4b12-a1f3-12d2ba73efb4n@googlegroups.com>
Injection-Info: dont-email.me; posting-host="06ffb0499ff2a83bd1dde10380255465";
logging-data="3159472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IhEI+97bM1MM341jHE0b/"
Cancel-Lock: sha1:x0prMzvCDOlXuSLdAlcE/xlGxqY=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sun, 12 Mar 2023 08:25 UTC

"minf...@arcor.de" <minforth@arcor.de> writes:
>Anton Ertl schrieb am Samstag, 11. M=C3=A4rz 2023 um 12:23:03 UTC+1:
>> In Gforth BUFFER just calls BLOCK, and that reads.
>
>Shouldn't it be the other way round? Somewhat in the line of
>
>: BLOCK \ ( ub -- adr ) 7.6.1.0800 provide block in assigned buffer
> dup buffer dup (update-flag-set?)
> IF nip ELSE tuck swap (read-block-from-file) (reset-update-flag) THEN ;

Yes, now I think that the idea is that block calls buffer. The
current implementation of BUFFER in Gforth is actually the same as the
very first implementation of buffer I wrote in 1994:

(Bernd Paysan 1998-12-13) : buffer ( u -- a-addr ) \ block
(Neal Crook 1999-04-16)[documentation, not shown here]
(Anton Ertl 1994-08-10) \ reading in the block is unnecessary, but simpler
(Anton Ertl 1994-08-10) block ;

I can only guess at why I did it this way at the time: Apparently
despite having used blocks from 1983 to the late 1980s, I did not
understand them well enough at the time to know exactly what the point
of BUFFER is, and that despite the reading taking a noticable amount
of time (I used blocks on a C64 with floppy disks); I guess it was not
that often that I wanted to just write a block from scratch.

And Bernd Paysan kept this BUFFER implementation in his multi-buffer
revision, intended for better performance. He had worked extensively
with blocks, too, and blocked.fb in Gforth is from him.

Makes me wonder if the non-reading BUFFER is just a too-complex
interface, or if I just used the wrong source material to learn it
(Ronald Zech's book was my primary source for learning Forth).

- 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 2022: https://euro.theforth.net

Re: gForth Block File Question

<2023Mar12.095533@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22784&group=comp.lang.forth#22784

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Sun, 12 Mar 2023 08:55:33 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 21
Message-ID: <2023Mar12.095533@mips.complang.tuwien.ac.at>
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com> <3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com> <tugqku$26lh7$1@dont-email.me> <tugqu9$26lh7$2@dont-email.me> <tuhdph$2cpfj$1@dont-email.me> <tuhh4p$2dn7r$1@dont-email.me> <2023Mar11.105604@mips.complang.tuwien.ac.at> <tuhmfi$2embi$1@dont-email.me> <2023Mar11.121730@mips.complang.tuwien.ac.at> <tuj3dd$2nmmb$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="06ffb0499ff2a83bd1dde10380255465";
logging-data="3159472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7HQZ7feP/elthiHYAC5Xx"
Cancel-Lock: sha1:gWop2Ft9H1VL9fiRRzIetHUwNF8=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sun, 12 Mar 2023 08:55 UTC

dxforth <dxforth@gmail.com> writes:
>> In Gforth BUFFER just calls BLOCK, and that reads.
>
>So that leaves multi-tasking as the only reason for ANS' requirement an
>interim buffer be used to copy a block. The simplified code posted would
>work on Gforth and majority of systems in use today?

If you mean

|: copy-block ( from to -- )
| swap block swap buffer 1024 move update ;

from <tuhh4p$2dn7r$1@dont-email.me>, that would fail with Gforth for
certain values of from and to.

- 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 2022: https://euro.theforth.net

Re: gForth Block File Question

<tuk6mp$30rhk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22785&group=comp.lang.forth#22785

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Sun, 12 Mar 2023 20:40:39 +1100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <tuk6mp$30rhk$1@dont-email.me>
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com>
<3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com>
<tugqku$26lh7$1@dont-email.me> <tugqu9$26lh7$2@dont-email.me>
<tuhdph$2cpfj$1@dont-email.me> <tuhh4p$2dn7r$1@dont-email.me>
<2023Mar11.105604@mips.complang.tuwien.ac.at> <tuhmfi$2embi$1@dont-email.me>
<2023Mar11.121730@mips.complang.tuwien.ac.at> <tuj3dd$2nmmb$1@dont-email.me>
<2023Mar12.095533@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 12 Mar 2023 09:40:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8f24770e6b6081de93b7e9753e7c0bd0";
logging-data="3173940"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RyKh3+8Nz5QeN8V8LKIJN"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:3z2b8HVT+iI0s8iGPUm9bRGaMN4=
Content-Language: en-GB
In-Reply-To: <2023Mar12.095533@mips.complang.tuwien.ac.at>
 by: dxforth - Sun, 12 Mar 2023 09:40 UTC

On 12/03/2023 7:55 pm, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
>>> In Gforth BUFFER just calls BLOCK, and that reads.
>>
>> So that leaves multi-tasking as the only reason for ANS' requirement an
>> interim buffer be used to copy a block. The simplified code posted would
>> work on Gforth and majority of systems in use today?
>
> If you mean
>
> |: copy-block ( from to -- )
> | swap block swap buffer 1024 move update ;
>
> from <tuhh4p$2dn7r$1@dont-email.me>, that would fail with Gforth for
> certain values of from and to.

Why - what's special about that code whereby certain values would fail?

Re: gForth Block File Question

<nnd$588b3f0c$58abc3cc@4c7c2eaa6710afba>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22786&group=comp.lang.forth#22786

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
References: <tugqu9$26lh7$2@dont-email.me> <be3888a8-c017-4c4c-a6f7-1ddde7327000n@googlegroups.com> <81cccdfa-dccc-42cf-9a73-63606d20055bn@googlegroups.com> <167859284307.22763.12722674216596088048@media.vsta.org>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$588b3f0c$58abc3cc@4c7c2eaa6710afba>
Organization: KPN B.V.
Date: Sun, 12 Mar 2023 11:12:54 +0100
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!news.uzoreto.com!feeder.usenetexpress.com!tr2.eu1.usenetexpress.com!feeder1.feed.usenet.farm!feed.usenet.farm!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 33
Injection-Date: Sun, 12 Mar 2023 11:12:54 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: none - Sun, 12 Mar 2023 10:12 UTC

In article <167859284307.22763.12722674216596088048@media.vsta.org>,
Andy Valencia <vandys@vsta.org> wrote:
>S Jack <sdwjack69@gmail.com> writes:
>> I like block files and wouldn't care for a Forth that doesn't support
>> them. The way they worked originally, as in FigForth, I find neat. I
>> also like the simple coding of the Fig editor.
>
>I should mention my block editor with vim-ish key bindings:
>
>https://vsta.org/cgi-bin/fview.py?path=/src/vi.txt

My editor with wordstar key bindings may be interesting.
mina version of ciforth works in DOSBOX and have full screen
editing mode, see the chapter of editing commands.
It accesses the video memory directly. It is a decendant
of my Osborne (CP/M) editor. (63 K + 1k video memory ).
I've seen no other editors that can copy a multi line definition
easily from one screen to the next. (It piles up lines
at the bottom of the screen, the pulls it in editing the
target screen.)

>
>Andy Valencia
>Home page: https://www.vsta.org/andy/
>To contact me: https://www.vsta.org/contact/andy.html

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 spinning. - the Wise from Antrim -

Re: gForth Block File Question

<nnd$3af5dc90$6bf19e14@76c5bf889bafbc8b>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22788&group=comp.lang.forth#22788

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com> <2023Mar11.121730@mips.complang.tuwien.ac.at> <d694f0e2-e64e-4b12-a1f3-12d2ba73efb4n@googlegroups.com> <2023Mar12.092557@mips.complang.tuwien.ac.at>
Subject: Re: gForth Block File Question
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$3af5dc90$6bf19e14@76c5bf889bafbc8b>
Organization: KPN B.V.
Date: Sun, 12 Mar 2023 11:47:17 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!sewer!alphared!news.uzoreto.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 46
Injection-Date: Sun, 12 Mar 2023 11:47:17 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2823
 by: none - Sun, 12 Mar 2023 10:47 UTC

In article <2023Mar12.092557@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
<SNIP>
>
>Makes me wonder if the non-reading BUFFER is just a too-complex
>interface, or if I just used the wrong source material to learn it
>(Ronald Zech's book was my primary source for learning Forth).

It comes from the old times hardware capabilities.
This was the time only IBM had 8" floppies, not available and
certainly not affordable.
Allocating a buffer for block 1000 with no previous content saves the
time spooling the tape to nearly the end. Arie Kattenberg had a block
system working on the digital Philips micro cassette recorder, that
was accessable by block number, relatively fast, but what matters
more, you had not position a tape recorder by hand.
This strategy saves you a ton of waiting time.
Imagine you working on a project with 8 blocks. You can
work mostly in cache. Then you take a coffee break and
type FLUSH. I still posses that hardware.

In ciforth I have not bothered to change the original fig-forth
source, w.r.t allocation, that works fine.
For the WANT system I needed locking the block in memory,
and later I discovered that the buffers came in handy for
implementing a classical INCLUDE that works line-by-line.
In general I lock blocks, files and in this case buffers in
memory for interpreting the content.

I changed UPDATE to write with no delay. Delaying write does
not make sense for blocks allocated in files.
Editing blocks is rare. Maybe a user wants changing a
line in a preference block, or an address that is
different in Raspberry pi from 1 to 2.
That is much simpler in vi in overtype mode, just
take care not to change the line length.

>- anton

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 spinning. - the Wise from Antrim -

Re: gForth Block File Question

<2023Mar12.172400@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22796&group=comp.lang.forth#22796

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Sun, 12 Mar 2023 16:24:00 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 34
Message-ID: <2023Mar12.172400@mips.complang.tuwien.ac.at>
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com> <3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com> <tugqku$26lh7$1@dont-email.me> <tugqu9$26lh7$2@dont-email.me> <tuhdph$2cpfj$1@dont-email.me> <tuhh4p$2dn7r$1@dont-email.me> <2023Mar11.105604@mips.complang.tuwien.ac.at> <tuhmfi$2embi$1@dont-email.me> <2023Mar11.121730@mips.complang.tuwien.ac.at> <tuj3dd$2nmmb$1@dont-email.me> <2023Mar12.095533@mips.complang.tuwien.ac.at> <tuk6mp$30rhk$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="06ffb0499ff2a83bd1dde10380255465";
logging-data="3303334"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PDo4f7BDlKfOrJJ1BcuvF"
Cancel-Lock: sha1:sB150RUcwx7BHZNyqo/l1TLvbEI=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sun, 12 Mar 2023 16:24 UTC

dxforth <dxforth@gmail.com> writes:
>On 12/03/2023 7:55 pm, Anton Ertl wrote:
>> dxforth <dxforth@gmail.com> writes:
>>>> In Gforth BUFFER just calls BLOCK, and that reads.
>>>
>>> So that leaves multi-tasking as the only reason for ANS' requirement an
>>> interim buffer be used to copy a block. The simplified code posted would
>>> work on Gforth and majority of systems in use today?
>>
>> If you mean
>>
>> |: copy-block ( from to -- )
>> | swap block swap buffer 1024 move update ;
>>
>> from <tuhh4p$2dn7r$1@dont-email.me>, that would fail with Gforth for
>> certain values of from and to.
>
>Why - what's special about that code whereby certain values would fail?

Remember:

4 block hex. $5601034AB198 ok
68 block hex. $5601034AB198 ok

So if you use 4 68 COPY-BLOCK, $5601034AB198 will contain block 68 and
MOVE will see the same from and to addresses, so it will not do
anything. And the end result will be that block 68 will be unchanged.

- 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 2022: https://euro.theforth.net

Re: gForth Block File Question

<d528c29f-5717-4cbf-a6e0-86d70f1d0ab7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22800&group=comp.lang.forth#22800

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4e47:0:b0:574:287b:8cad with SMTP id eb7-20020ad44e47000000b00574287b8cadmr2487305qvb.3.1678659845884;
Sun, 12 Mar 2023 15:24:05 -0700 (PDT)
X-Received: by 2002:ac8:4049:0:b0:3b7:fda5:e05 with SMTP id
j9-20020ac84049000000b003b7fda50e05mr9411192qtl.9.1678659845622; Sun, 12 Mar
2023 15:24:05 -0700 (PDT)
Path: i2pn2.org!i2pn.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: Sun, 12 Mar 2023 15:24:05 -0700 (PDT)
In-Reply-To: <2023Mar12.172400@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=50.46.219.106; posting-account=VRZdRQoAAAByg2veNn4xonsritzF12hS
NNTP-Posting-Host: 50.46.219.106
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com>
<3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com> <tugqku$26lh7$1@dont-email.me>
<tugqu9$26lh7$2@dont-email.me> <tuhdph$2cpfj$1@dont-email.me>
<tuhh4p$2dn7r$1@dont-email.me> <2023Mar11.105604@mips.complang.tuwien.ac.at>
<tuhmfi$2embi$1@dont-email.me> <2023Mar11.121730@mips.complang.tuwien.ac.at>
<tuj3dd$2nmmb$1@dont-email.me> <2023Mar12.095533@mips.complang.tuwien.ac.at>
<tuk6mp$30rhk$1@dont-email.me> <2023Mar12.172400@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d528c29f-5717-4cbf-a6e0-86d70f1d0ab7n@googlegroups.com>
Subject: Re: gForth Block File Question
From: vkichl...@gmail.com (Van Kichline)
Injection-Date: Sun, 12 Mar 2023 22:24:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Van Kichline - Sun, 12 Mar 2023 22:24 UTC

On Sunday, March 12, 2023 at 9:28:10 AM UTC-7, Anton Ertl wrote:
....
> >Why - what's special about that code whereby certain values would fail?
> Remember:
> 4 block hex. $5601034AB198 ok
> 68 block hex. $5601034AB198 ok
....

True, in gForth I find any two blocks or buffers with a separation divisible by 32 yield the same address. (32 being the number of buffers allocated.)
That makes utility copying quite risky without the interim buffer.
I did not anticipate that. Thanks!

Re: gForth Block File Question

<tulqeb$3b4gn$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22802&group=comp.lang.forth#22802

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: gForth Block File Question
Date: Mon, 13 Mar 2023 11:23:40 +1100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <tulqeb$3b4gn$1@dont-email.me>
References: <b25c1d0f-2dcd-4de9-86f2-5a5aa99705bcn@googlegroups.com>
<3f82488e-2326-44e2-85d7-d01b7028dbf4n@googlegroups.com>
<tugqku$26lh7$1@dont-email.me> <tugqu9$26lh7$2@dont-email.me>
<tuhdph$2cpfj$1@dont-email.me> <tuhh4p$2dn7r$1@dont-email.me>
<2023Mar11.105604@mips.complang.tuwien.ac.at> <tuhmfi$2embi$1@dont-email.me>
<2023Mar11.121730@mips.complang.tuwien.ac.at> <tuj3dd$2nmmb$1@dont-email.me>
<2023Mar12.095533@mips.complang.tuwien.ac.at> <tuk6mp$30rhk$1@dont-email.me>
<2023Mar12.172400@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 13 Mar 2023 00:23:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ffd66dc662ecdd4e87b38434d2fd0895";
logging-data="3510807"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CwnItkArKnxuI0UnAfMys"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Cancel-Lock: sha1:cFTPinlfzEpAJGeTF/aWdRXaFm4=
Content-Language: en-GB
In-Reply-To: <2023Mar12.172400@mips.complang.tuwien.ac.at>
 by: dxforth - Mon, 13 Mar 2023 00:23 UTC

On 13/03/2023 3:24 am, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
>> On 12/03/2023 7:55 pm, Anton Ertl wrote:
>>> dxforth <dxforth@gmail.com> writes:
>>>>> In Gforth BUFFER just calls BLOCK, and that reads.
>>>>
>>>> So that leaves multi-tasking as the only reason for ANS' requirement an
>>>> interim buffer be used to copy a block. The simplified code posted would
>>>> work on Gforth and majority of systems in use today?
>>>
>>> If you mean
>>>
>>> |: copy-block ( from to -- )
>>> | swap block swap buffer 1024 move update ;
>>>
>>> from <tuhh4p$2dn7r$1@dont-email.me>, that would fail with Gforth for
>>> certain values of from and to.
>>
>> Why - what's special about that code whereby certain values would fail?
>
> Remember:
>
> 4 block hex. $5601034AB198 ok
> 68 block hex. $5601034AB198 ok
>
> So if you use 4 68 COPY-BLOCK, $5601034AB198 will contain block 68 and
> MOVE will see the same from and to addresses, so it will not do
> anything. And the end result will be that block 68 will be unchanged.

The problem surely is that you implemented BUFFER with BLOCK (arguably
contrary to ANS) and the latter reads. Even this wouldn't have been a
problem had you implemented a working LRU buffer selection scheme. It's
these two departures from convention in combination that causes Gforth
to fail - not copy-block.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor