Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Know Thy User.


devel / comp.lang.forth / Re: F79 reading from files

SubjectAuthor
* F79 reading from filesluser droog
+- Re: F79 reading from filesNN
+- Re: F79 reading from filesdxforth
+* Re: F79 reading from filesAnton Ertl
|`- Re: F79 reading from filesluser droog
`* Re: F79 reading from filesAndy Valencia
 +- Re: F79 reading from filesminf...@arcor.de
 `* Re: F79 reading from filesAnton Ertl
  +- Re: F79 reading from filesluser droog
  +* Re: F79 reading from filesS Jack
  |+- Re: F79 reading from filesS Jack
  |`- Re: F79 reading from filesdxforth
  `* Re: F79 reading from filesAndy Valencia
   `- Re: F79 reading from filesNils M Holm

1
F79 reading from files

<84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:2a3:: with SMTP id m3mr11720045qvv.55.1627407581399;
Tue, 27 Jul 2021 10:39:41 -0700 (PDT)
X-Received: by 2002:a05:620a:1595:: with SMTP id d21mr23528835qkk.15.1627407581229;
Tue, 27 Jul 2021 10:39:41 -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: Tue, 27 Jul 2021 10:39:41 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=24.207.183.245; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.207.183.245
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
Subject: F79 reading from files
From: luser.dr...@gmail.com (luser droog)
Injection-Date: Tue, 27 Jul 2021 17:39:41 +0000
Content-Type: text/plain; charset="UTF-8"
 by: luser droog - Tue, 27 Jul 2021 17:39 UTC

Where in the interpreter is the decision made whether to read from
the keyboard using KEY vs initiating a file read and pointing to a buffer?

I have these words at the top level of the outer interpreter:

WORD(accept, accept, enter, readline, interpret)
CODE(resetsp, resetsp, MOVI(SP,0xf000))
CODE(resetrsp, resetrsp, MOVI(BP,0x0100))
CODE(bye, bye, HALT)
WORD(quit, quit, enter, resetsp, accept, ok, branch, -4)
WORD(abort, abort, enter, resetrsp, lbracket, quit)
HEADLESS(cold, cold, MOVI(SI,abort+2))

I'm guessing either READLINE itself needs to figure out where to look
for input, or ACCEPT needs to fetch some parameters to pass over
to READLINE. Any guidance or ideas on this front?

Re: F79 reading from files

<06450d6d-ba10-4223-9cd3-dfeb50733040n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2446:: with SMTP id h6mr24148052qkn.497.1627427897912;
Tue, 27 Jul 2021 16:18:17 -0700 (PDT)
X-Received: by 2002:ac8:4996:: with SMTP id f22mr21661377qtq.12.1627427897646;
Tue, 27 Jul 2021 16:18:17 -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: Tue, 27 Jul 2021 16:18:17 -0700 (PDT)
In-Reply-To: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23c5:6f04:d001:2506:70bb:c356:512b;
posting-account=9A5f7goAAAD_QfJPZnlK3Xq_UhzYjdP-
NNTP-Posting-Host: 2a00:23c5:6f04:d001:2506:70bb:c356:512b
References: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <06450d6d-ba10-4223-9cd3-dfeb50733040n@googlegroups.com>
Subject: Re: F79 reading from files
From: november...@gmail.com (NN)
Injection-Date: Tue, 27 Jul 2021 23:18:17 +0000
Content-Type: text/plain; charset="UTF-8"
 by: NN - Tue, 27 Jul 2021 23:18 UTC

On Tuesday, 27 July 2021 at 18:39:42 UTC+1, luser droog wrote:
> Where in the interpreter is the decision made whether to read from
> the keyboard using KEY vs initiating a file read and pointing to a buffer?
>
> I have these words at the top level of the outer interpreter:
>
> WORD(accept, accept, enter, readline, interpret)
> CODE(resetsp, resetsp, MOVI(SP,0xf000))
> CODE(resetrsp, resetrsp, MOVI(BP,0x0100))
> CODE(bye, bye, HALT)
> WORD(quit, quit, enter, resetsp, accept, ok, branch, -4)
> WORD(abort, abort, enter, resetrsp, lbracket, quit)
> HEADLESS(cold, cold, MOVI(SI,abort+2))
>
> I'm guessing either READLINE itself needs to figure out where to look
> for input, or ACCEPT needs to fetch some parameters to pass over
> to READLINE. Any guidance or ideas on this front?

https://forth-standard.org/standard/core/QUIT

uses refill

https://forth-standard.org/standard/core/REFILL

attempts to fill the buffer from the source.

https://forth-standard.org/standard/core/SOURCE-ID

was defined in the core extension words points to either a string or user input device ( generally keyboard )...

https://forth-standard.org/standard/file/SOURCE-ID

....but in the file access word set it also points to a file-id

Re: F79 reading from files

<sdqf7s$11b7$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Wed, 28 Jul 2021 12:26:03 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sdqf7s$11b7$1@gioia.aioe.org>
References: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="34151"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Wed, 28 Jul 2021 02:26 UTC

On 28/07/2021 03:39, luser droog wrote:
> Where in the interpreter is the decision made whether to read from
> the keyboard using KEY vs initiating a file read and pointing to a buffer?
>
> I have these words at the top level of the outer interpreter:
>
> WORD(accept, accept, enter, readline, interpret)
> CODE(resetsp, resetsp, MOVI(SP,0xf000))
> CODE(resetrsp, resetrsp, MOVI(BP,0x0100))
> CODE(bye, bye, HALT)
> WORD(quit, quit, enter, resetsp, accept, ok, branch, -4)
> WORD(abort, abort, enter, resetrsp, lbracket, quit)
> HEADLESS(cold, cold, MOVI(SI,abort+2))
>
> I'm guessing either READLINE itself needs to figure out where to look
> for input, or ACCEPT needs to fetch some parameters to pass over
> to READLINE. Any guidance or ideas on this front?
>

Forth-79 had no concept of 'files'. Input came from console (BLK=0)
or blocks (BLK<>0).

ANS introduced SOURCE-ID which extends BLK=0. When BLK is 0, input
is from console, files or EVALUATE as determined by SOURCE-ID.
Thus REFILL in QUIT must first examine BLK; if zero then it examines
SOURCE-ID.

Re: F79 reading from files

<2021Jul28.071351@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Wed, 28 Jul 2021 05:13:51 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 35
Message-ID: <2021Jul28.071351@mips.complang.tuwien.ac.at>
References: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="8b18bbfdfdd9080e119a794836100169";
logging-data="14706"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NblxB3tkXJc9K730aHw6u"
Cancel-Lock: sha1:4zGpO9JiyIShAgra2fyt5QEcqaE=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 28 Jul 2021 05:13 UTC

luser droog <luser.droog@gmail.com> writes:
>Where in the interpreter is the decision made whether to read from
>the keyboard using KEY vs initiating a file read and pointing to a buffer?
>
>I have these words at the top level of the outer interpreter:
>
>WORD(accept, accept, enter, readline, interpret)
>CODE(resetsp, resetsp, MOVI(SP,0xf000))
>CODE(resetrsp, resetrsp, MOVI(BP,0x0100))
>CODE(bye, bye, HALT)
>WORD(quit, quit, enter, resetsp, accept, ok, branch, -4)
>WORD(abort, abort, enter, resetrsp, lbracket, quit)
>HEADLESS(cold, cold, MOVI(SI,abort+2))
>
>I'm guessing either READLINE itself needs to figure out where to look
>for input, or ACCEPT needs to fetch some parameters to pass over
>to READLINE. Any guidance or ideas on this front?

As others mention, in the standard you have REFILL that decides
internally based on what the input source is.

Classically, you don't have REFILL. The various words (QUIT for
terminal input, LOAD for blocks, and later INCLUDE for files, and
EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
INTERPRET.

In the standard ACCEPT is a word for reading from the terminal that
does not interpret.

- 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: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: F79 reading from files

<162747867229.31794.15633882857023040753@media.vsta.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: van...@vsta.org (Andy Valencia)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Wed, 28 Jul 2021 06:24:32 -0700
Lines: 20
Message-ID: <162747867229.31794.15633882857023040753@media.vsta.org>
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
X-Trace: individual.net UjG9asuRRqjrFgaJGM0w5QQlyZX5irLoFmvC3Wq0AygjGAC7J1
X-Orig-Path: media
Cancel-Lock: sha1:J8El2kJy3nIApZNMGh39FU5nbQY=
User-Agent: rn.py v0.0.1
 by: Andy Valencia - Wed, 28 Jul 2021 13:24 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> ... The various words (QUIT for
> terminal input, LOAD for blocks, and later INCLUDE for files, and
> EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
> INTERPRET.

I think I've mentioned an early bug in ForthOS; I pointed the TIB at
the block in its entirety (4k source screen in ForthOS). Elegant, I
thought, but it breaks when the source uses a word which ends at the
80th column; when viewed as a single 4k block, that word "wraps" to
whatever text follows at the first column of the next line.

So a little extra complexity, walking a line's worth of the buffer
at a time fed into the TIB, as source input walks down the buffer.
I almost convinced myself to just never use the last column, but it
was too far against the principle of least astonishment.

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

Re: F79 reading from files

<3fe3044f-b847-4fff-89f6-9f811679ff76n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:13c6:: with SMTP id p6mr330263qtk.253.1627489808957;
Wed, 28 Jul 2021 09:30:08 -0700 (PDT)
X-Received: by 2002:ac8:7f48:: with SMTP id g8mr342840qtk.79.1627489808784;
Wed, 28 Jul 2021 09:30:08 -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: Wed, 28 Jul 2021 09:30:08 -0700 (PDT)
In-Reply-To: <162747867229.31794.15633882857023040753@media.vsta.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:f7:1f2c:8b93:98c2:b481:9ce3:bbed;
posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 2003:f7:1f2c:8b93:98c2:b481:9ce3:bbed
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
<162747867229.31794.15633882857023040753@media.vsta.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3fe3044f-b847-4fff-89f6-9f811679ff76n@googlegroups.com>
Subject: Re: F79 reading from files
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Wed, 28 Jul 2021 16:30:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: minf...@arcor.de - Wed, 28 Jul 2021 16:30 UTC

Andy Valencia schrieb am Mittwoch, 28. Juli 2021 um 15:27:49 UTC+2:
> an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> > ... The various words (QUIT for
> > terminal input, LOAD for blocks, and later INCLUDE for files, and
> > EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
> > INTERPRET.
> I think I've mentioned an early bug in ForthOS; I pointed the TIB at
> the block in its entirety (4k source screen in ForthOS). Elegant, I
> thought, but it breaks when the source uses a word which ends at the
> 80th column; when viewed as a single 4k block, that word "wraps" to
> whatever text follows at the first column of the next line.
>
> So a little extra complexity, walking a line's worth of the buffer
> at a time fed into the TIB, as source input walks down the buffer.
> I almost convinced myself to just never use the last column, but it
> was too far against the principle of least astonishment.
>

Yes, that was "an old surprise". :-)
Evaluating 1k of one block in one go looks so attractive...

Re: F79 reading from files

<2021Jul28.183307@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Wed, 28 Jul 2021 16:33:07 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 32
Message-ID: <2021Jul28.183307@mips.complang.tuwien.ac.at>
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com> <162747867229.31794.15633882857023040753@media.vsta.org>
Injection-Info: reader02.eternal-september.org; posting-host="8b18bbfdfdd9080e119a794836100169";
logging-data="28270"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wjUybQ7Nli2MFv9Uo1v5z"
Cancel-Lock: sha1:g+yxinXFfxbyq6N9NP/CDWQ/JD8=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 28 Jul 2021 16:33 UTC

Andy Valencia <vandys@vsta.org> writes:
>anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>> ... The various words (QUIT for
>> terminal input, LOAD for blocks, and later INCLUDE for files, and
>> EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
>> INTERPRET.
>
>I think I've mentioned an early bug in ForthOS; I pointed the TIB at
>the block in its entirety (4k source screen in ForthOS). Elegant, I
>thought, but it breaks when the source uses a word which ends at the
>80th column; when viewed as a single 4k block, that word "wraps" to
>whatever text follows at the first column of the next line.

That's the same with standard screens since Forth started, except that
screens are 1K chars and screen-lines are 64 chars; but screen-lines
only play a role for "\" and for LIST; for LOAD the whole screen is a
line.

>So a little extra complexity, walking a line's worth of the buffer
>at a time fed into the TIB, as source input walks down the buffer.
>I almost convinced myself to just never use the last column, but it
>was too far against the principle of least astonishment.

Somehow screens fell out of fashion before standard Forth got this
far.

- 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: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: F79 reading from files

<d1a2a448-042b-4b9a-9770-509c754a65b4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:d8c:: with SMTP id 134mr990401qkn.433.1627496296166;
Wed, 28 Jul 2021 11:18:16 -0700 (PDT)
X-Received: by 2002:ac8:4e44:: with SMTP id e4mr812077qtw.252.1627496295956;
Wed, 28 Jul 2021 11:18:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!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: Wed, 28 Jul 2021 11:18:15 -0700 (PDT)
In-Reply-To: <2021Jul28.183307@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=24.207.183.245; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.207.183.245
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
<162747867229.31794.15633882857023040753@media.vsta.org> <2021Jul28.183307@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d1a2a448-042b-4b9a-9770-509c754a65b4n@googlegroups.com>
Subject: Re: F79 reading from files
From: luser.dr...@gmail.com (luser droog)
Injection-Date: Wed, 28 Jul 2021 18:18:16 +0000
Content-Type: text/plain; charset="UTF-8"
 by: luser droog - Wed, 28 Jul 2021 18:18 UTC

On Wednesday, July 28, 2021 at 11:48:45 AM UTC-5, Anton Ertl wrote:
> Andy Valencia <van...@vsta.org> writes:
> >an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> >> ... The various words (QUIT for
> >> terminal input, LOAD for blocks, and later INCLUDE for files, and
> >> EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
> >> INTERPRET.
> >
> >I think I've mentioned an early bug in ForthOS; I pointed the TIB at
> >the block in its entirety (4k source screen in ForthOS). Elegant, I
> >thought, but it breaks when the source uses a word which ends at the
> >80th column; when viewed as a single 4k block, that word "wraps" to
> >whatever text follows at the first column of the next line.
> That's the same with standard screens since Forth started, except that
> screens are 1K chars and screen-lines are 64 chars; but screen-lines
> only play a role for "\" and for LIST; for LOAD the whole screen is a
> line.
>
> >So a little extra complexity, walking a line's worth of the buffer
> >at a time fed into the TIB, as source input walks down the buffer.
> >I almost convinced myself to just never use the last column, but it
> >was too far against the principle of least astonishment.
> Somehow screens fell out of fashion before standard Forth got this
> far.
> - anton

That does seem to be the case. I've decided to try to implement screens,
however. Both for *historicity*, and coolness factor (for being so bizarre),
and because it offers a simple way for me to embed high level forth
source directly into my program. So I can have some high level "config code"
which is editable in my C source as some space-padded strings that
get copied into memory in the forth_init() code.

It seems like a step in the right direction for the goal of completing F79
features and moving forward to later standards. It also lets me start
writing actual Forth source code, rather than comma-separated lists
of addresses in the arguments to a varargs macro.

Going straight to files would serve this latter goal but not all the others.

Re: F79 reading from files

<2007de68-f818-4501-bb3b-4c9a7c65a1afn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:300c:: with SMTP id ke12mr997166qvb.38.1627496305605;
Wed, 28 Jul 2021 11:18:25 -0700 (PDT)
X-Received: by 2002:a05:620a:31a1:: with SMTP id bi33mr1022752qkb.146.1627496305406;
Wed, 28 Jul 2021 11:18:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.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: Wed, 28 Jul 2021 11:18:25 -0700 (PDT)
In-Reply-To: <2021Jul28.183307@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=207.141.168.2; posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 207.141.168.2
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
<162747867229.31794.15633882857023040753@media.vsta.org> <2021Jul28.183307@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2007de68-f818-4501-bb3b-4c9a7c65a1afn@googlegroups.com>
Subject: Re: F79 reading from files
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Wed, 28 Jul 2021 18:18:25 +0000
Content-Type: text/plain; charset="UTF-8"
 by: S Jack - Wed, 28 Jul 2021 18:18 UTC

On Wednesday, July 28, 2021 at 11:48:45 AM UTC-5, Anton Ertl wrote:
> Somehow screens fell out of fashion before standard Forth got this
> far.

I very much like block files and screens. The way they work is neat.
Can't justify them but I wouldn't have a Forth without them.
With them one has virtual memory for tables and the block access can
easily be modified to point to memory thus having ram disk, maybe a place
for storing working strings.
--
me

Re: F79 reading from files

<717928fc-503d-4827-a600-1d2d5bca787fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:9445:: with SMTP id w66mr1099588qkd.410.1627497493703;
Wed, 28 Jul 2021 11:38:13 -0700 (PDT)
X-Received: by 2002:a37:7c3:: with SMTP id 186mr1080487qkh.109.1627497493569;
Wed, 28 Jul 2021 11:38:13 -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: Wed, 28 Jul 2021 11:38:13 -0700 (PDT)
In-Reply-To: <2007de68-f818-4501-bb3b-4c9a7c65a1afn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=207.141.168.2; posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 207.141.168.2
References: <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
<162747867229.31794.15633882857023040753@media.vsta.org> <2021Jul28.183307@mips.complang.tuwien.ac.at>
<2007de68-f818-4501-bb3b-4c9a7c65a1afn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <717928fc-503d-4827-a600-1d2d5bca787fn@googlegroups.com>
Subject: Re: F79 reading from files
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Wed, 28 Jul 2021 18:38:13 +0000
Content-Type: text/plain; charset="UTF-8"
 by: S Jack - Wed, 28 Jul 2021 18:38 UTC

In my current Forth I haven't bothered to implement INCLUDE and INCLUDED
just implemented FLOAD and a single 4K buffer for file reads. Get by
just fine. The one downside is a file being loaded can't include another
file and then continue with it's load. But it can load a needed file and
put out a message to reload. The second attempt now having the required
code then loads. The file can, however, load any needed code from block
files since they have their own buffers. Not saying this is the way
file reads should work but saying that you can get by this way with very
little pain.
--
me

Re: F79 reading from files

<162751497361.11612.13806193287255468870@media.vsta.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: van...@vsta.org (Andy Valencia)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Wed, 28 Jul 2021 16:29:33 -0700
Lines: 23
Message-ID: <162751497361.11612.13806193287255468870@media.vsta.org>
References: <d1a2a448-042b-4b9a-9770-509c754a65b4n@googlegroups.com> <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com> <162747867229.31794.15633882857023040753@media.vsta.org> <2021Jul28.183307@mips.complang.tuwien.ac.at>
X-Trace: individual.net iVnmL4FFxHE8SVIi8aNSugPHnQz6NtZJfnQpe/w4PzwOXxbXno
X-Orig-Path: media
Cancel-Lock: sha1:QAEv6/meZ1ZdsjJn7D6CW0FDIHk=
User-Agent: rn.py v0.0.1
 by: Andy Valencia - Wed, 28 Jul 2021 23:29 UTC

luser droog <luser.droog@gmail.com> writes:
> ... I've decided to try to implement screens,
> however. Both for *historicity*, and coolness factor (for being so bizarre)
> ...

If your experience is anything like mine, you'll be surprised at how _not_
bizarre working with source screens is. I ended up with a thin layer of
"file system" to organize the blocks:

http://sources.vsta.org/forthos/fs.html

and then an editor which knew how to play with them, including being able to
insert/delete a screen block into an existing source "file":

http://sources.vsta.org/forthos/vi.html

The result is a filesystem which is stupidly durable, and source code which
is perfectly convenient to work with. In its entirety quite approachable to
understand or modify, and living within a very modest memory budget.

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

Re: F79 reading from files

<sdt73v$1ica$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: Thu, 29 Jul 2021 13:25:50 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sdt73v$1ica$1@gioia.aioe.org>
References: <2021Jul28.071351@mips.complang.tuwien.ac.at>
<84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com>
<162747867229.31794.15633882857023040753@media.vsta.org>
<2021Jul28.183307@mips.complang.tuwien.ac.at>
<2007de68-f818-4501-bb3b-4c9a7c65a1afn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="51594"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Thu, 29 Jul 2021 03:25 UTC

On 29/07/2021 04:18, S Jack wrote:
> On Wednesday, July 28, 2021 at 11:48:45 AM UTC-5, Anton Ertl wrote:
>> Somehow screens fell out of fashion before standard Forth got this
>> far.
>
> I very much like block files and screens. The way they work is neat.
> Can't justify them but I wouldn't have a Forth without them.
> With them one has virtual memory for tables and the block access can
> easily be modified to point to memory thus having ram disk, maybe a place
> for storing working strings.

Very comfortable using 'screen files' and editor for forth source. It
became 'unfashionable' at a time when Forth was desperately trying to appeal
to those who were never going to accept Forth, no matter what. Circa 1989
and ANS:

<[Mitch] PRESS16> Sun Microsystems: Leading supplier of technical
workstations, has grown to $1 billion annual sales in 6 years. I've been
there since 1982 (employee #50, now over 7500 employees). Bradley Forthware:
My home company. Supplies Forth for 680x0 machines (Atari ST, Macintosh, Sun,
others) and SPARC machines (Sun, single board).
Past Use of Forth at Sun:
- "Unofficial" bringup standalone diagnostics.
- A small number of Unix-based tools.
Current Forth work at Sun:
- Developing new Forth-based firmware for Suns; will probably become the
standard firmware shipped with Suns sometime in the future.
- Forth is used as an interactive monitor and as a CPU-independent language
for "plug-in" boot drivers (not Unix drivers; they're still written in C)
My (perhaps) controversial beliefs:
- Forth needs to "grow up".
- The "minimalist" Forth philosophy is responsible for Forth's relative lack
of success.
- Screens suck.
- Forth's portability problems are due to disregard of reality.
- C has its advantages
- Forth chips are no big deal.

Re: F79 reading from files

<imf52nFfdvpU2@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: nmh...@ananda.local (Nils M Holm)
Newsgroups: comp.lang.forth
Subject: Re: F79 reading from files
Date: 29 Jul 2021 07:52:55 GMT
Organization: TARFU
Lines: 25
Message-ID: <imf52nFfdvpU2@mid.individual.net>
References: <d1a2a448-042b-4b9a-9770-509c754a65b4n@googlegroups.com> <2021Jul28.071351@mips.complang.tuwien.ac.at> <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com> <162747867229.31794.15633882857023040753@media.vsta.org> <2021Jul28.183307@mips.complang.tuwien.ac.at> <162751497361.11612.13806193287255468870@media.vsta.org>
X-Trace: individual.net qpVw0/TNyyN79oVcEcXQYQvSUrSmxSmwsuX2+VfXTDaIwLL2w1
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:NUmLGN/+0py3RGO/f91B+91AlEM=
User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (FreeBSD/10.1-RELEASE (amd64))
 by: Nils M Holm - Thu, 29 Jul 2021 07:52 UTC

Andy Valencia <vandys@vsta.org> wrote:
> luser droog <luser.droog@gmail.com> writes:
>> ... I've decided to try to implement screens,
>> however. Both for *historicity*, and coolness factor (for being so bizarre)
>> ...
>
> If your experience is anything like mine, you'll be surprised at how _not_
> bizarre working with source screens is. I ended up with a thin layer of
> "file system" to organize the blocks:
>
> http://sources.vsta.org/forthos/fs.html

I did something similar in SOL-86 (http://t3x.org/bits/hypersol.html),
but even simpler. Each block has a header of the form

(L nnnnn mmmmm comment ... )

where nnnnn links to the previous block (or 0) and mmmmm links to the
next block (or 0). ALLOCATE allocates a block from a block bitmap and
RELEASE frees a block. Makes it really easy to insert/delete blocks
in the middle of programs and keeps much of the simplicity of pure
blocks. The editor has commands for handling linked lists of blocks.

--
Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org

Re: F79 reading from files

<76b87e2b-9854-4d84-93c2-55a7c6e504c9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:c1:: with SMTP id p1mr4238102qtw.365.1631417568145;
Sat, 11 Sep 2021 20:32:48 -0700 (PDT)
X-Received: by 2002:a05:620a:2a14:: with SMTP id o20mr4336644qkp.286.1631417567922;
Sat, 11 Sep 2021 20:32:47 -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: Sat, 11 Sep 2021 20:32:47 -0700 (PDT)
In-Reply-To: <2021Jul28.071351@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=24.207.183.245; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 24.207.183.245
References: <84276793-13a9-495f-9933-c423cc6569f3n@googlegroups.com> <2021Jul28.071351@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <76b87e2b-9854-4d84-93c2-55a7c6e504c9n@googlegroups.com>
Subject: Re: F79 reading from files
From: luser.dr...@gmail.com (luser droog)
Injection-Date: Sun, 12 Sep 2021 03:32:48 +0000
Content-Type: text/plain; charset="UTF-8"
 by: luser droog - Sun, 12 Sep 2021 03:32 UTC

On Wednesday, July 28, 2021 at 12:28:53 AM UTC-5, Anton Ertl wrote:
> luser droog <luser...@gmail.com> writes:
> >Where in the interpreter is the decision made whether to read from
> >the keyboard using KEY vs initiating a file read and pointing to a buffer?
> >
> >I have these words at the top level of the outer interpreter:
> >
> >WORD(accept, accept, enter, readline, interpret)
> >CODE(resetsp, resetsp, MOVI(SP,0xf000))
> >CODE(resetrsp, resetrsp, MOVI(BP,0x0100))
> >CODE(bye, bye, HALT)
> >WORD(quit, quit, enter, resetsp, accept, ok, branch, -4)
> >WORD(abort, abort, enter, resetrsp, lbracket, quit)
> >HEADLESS(cold, cold, MOVI(SI,abort+2))
> >
> >I'm guessing either READLINE itself needs to figure out where to look
> >for input, or ACCEPT needs to fetch some parameters to pass over
> >to READLINE. Any guidance or ideas on this front?
> As others mention, in the standard you have REFILL that decides
> internally based on what the input source is.
>
> Classically, you don't have REFILL. The various words (QUIT for
> terminal input, LOAD for blocks, and later INCLUDE for files, and
> EVALUATE) set up TIB and #TIB (SOURCE in the standard), and then call
> INTERPRET.
>
> In the standard ACCEPT is a word for reading from the terminal that
> does not interpret.
>
> - anton

Belated thanks to everyone for the help. I'm somehow finding it hard
to actually get going and dig in and do the work on this. I've been
reading through all my core literature. In the past 3 months I've read
Starting Forth, Norton's Guide to the IBM PC, Advanced MSDOS
Programming by Ray Duncan, Undocumented DOS, Forth by Salman
et al., and Loeliger's Threaded Interpretive Languages. And now I'm
slogging through Thinking Forth and Stephen Morse's The 286
Architecture.

I first tried to make a minimal change that wouldn't break anything
by moving the call to INTERPRET out of ACCEPT and up higher
in QUIT after ACCEPT returns. But that broke the interpreter because
then my hard coded relative branch was off by one. The macros
that helped with branching in the assembly code came in useful here.
I was able to replace the hard coded branch offset with a "soft coded"
one.

Next to tackle actually reading from a screen. Part of the stumbling
block is that there appears to be a partly written *attempt* at
what I need just floating around in my definitions. I have written a
word called WORD2 which looks very close to the code for WORD
from the 8086 fig forth. My actual code for WORD is just whatever
cockamamie gumwad I hacked up to get something kinda working.
So it appears that I not only need to figure out all the things I need
to write that aren't there but how much vestigial proto-code is buried
in there and whether it helps or not. Even to delete it and start with
a cleaner slate I have to tease apart whatever "molecule" it's
connected to.

Accentuating the positive, I made the small change to ACCEPT
so it does not call INTERPRET but just reads in a line. And in so
doing, I also had to make the branching for the loop in QUIT
more robust and easier to read (-ish).

So screens first, then files. Wish me luck.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor