Deutsch   English   Français   Italiano  
<2024Sep3.085018@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!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: Using include-file
Date: Tue, 03 Sep 2024 06:50:18 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 31
Message-ID: <2024Sep3.085018@mips.complang.tuwien.ac.at>
References: <vb565d$2vcqf$1@dont-email.me>
Injection-Date: Tue, 03 Sep 2024 09:02:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="cff7433bb77f5e29e6ba8c068a91ef3f";
	logging-data="3422596"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/tKzZoQ3wquW9gsscd78r1"
Cancel-Lock: sha1:ML2onypIhUH0aH7Ur2xsPgeQ1PU=
X-newsreader: xrn 10.11
Bytes: 2415

Ruvim <ruvim.pinka@gmail.com> writes:
>Do you know practical cases of using "include-file" in programs?

One way I am thinking about is to implement INCLUDED etc.  Systems
deal differently with relative filenames for INCLUDED, with less
differences for OPEN-FILE.  So if I want to implement a certain
handling of relative filenames for INCLUDED in order to get rid of
system differences, one way to do it is to do it for OPEN-FILE and
then perform INCLUDE-FILE.

>Using other system-specific means, this word can probably be used to 
>organize inter-process communication: when a file descriptor (e.g. a 
>pipe) is passed from one process to another and used as the input 
>source.  But why do you need to load Forth code this way?

Heinz Schnitter implemented Open Network Forth, a distributed system,
where the parts communicated by sending Forth source code to each
other.  One could implement that by having network connections
(telnet-style or ssh-style) between the parts, and the receiver could
INCLUDE-FILE the file-id that represents his end of the connection.
However, Open Network Forth was written around 1984, long before
INCLUDE-FILE was standardized.  Bernd Paysan uses ideas from it in his
work, inclluding sending Forth commands between tasks, but AFAIK does
not use INCLUDE-FILE for that.

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