Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #46224
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: File extensions and Gforth on Openhub |
| Date | 2016-03-27 00:53 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <nd7aus$hdb$1@dont-email.me> (permalink) |
| References | <2016Mar26.091504@mips.complang.tuwien.ac.at> |
Am Sat, 26 Mar 2016 08:15:04 +0000 schrieb Anton Ertl: > So we decided that theforth.net uses .4th as default file extension > (essentially for package.4th). Now the question is if we should not > move in that direction as a community in general. I.e., add .4th as > extension to various tools we support, and use .4th as extension in new > projects, or maybe even in new files in old projects. We should probably register the extension as trademark, so that we have some title in our hands to sue the hell out of extension-grabbers like Microsoft ;-). Not that this has any chance of working, SwiftForth/SwiftX vs. Apple's Swift is also not gaining ground. I guess that in two or three years, Apple will sue Forth Inc. to stop using their high-value brand(tm). And win; they seem to have bought the court. As user, I would absolutely hate it when the next release of my Forth system would break all my programs which include some system library, just because the maintainer had changed all the extensions. So, in order to make a change of file extensions possible, we would first need to specify that INCLUDE works even when you don't specify the extension. At the moment, the de facto standard is that Forth systems just perform OPEN- FILE on the name provided by INCLUDE or INCLUDED or REQUIRE and REQUIRED. Some systems like Gforth have a search path, some systems like VFX use the macro expansion of SUBSTITUTE. Neither one is appropriate for a graceful migration of suffixes, though in VFX, you could say include file% 4th%, and you can set it to replace to either one or the other suffix; but the typical situation during migration is that you have both: files with the old, and files with the new suffix. Judging from the past discussions about source file names, I think that any approach that nails it down to one particular way of processing file names will not be accepted. "We have done it this way for 20 years, and you don't want to wade through 1 million lines of code and change it", and I think yes, that's reasonable. I wouldn't want to do that, either. So the thing is to make sure that the 1 millions lines of code can survive untouched even if the system libraries all change their suffix from .fth to .4th (but only those). And I also want to make sure that nobody else needs to implement the code necessary for this stunt in his Forth system which is not burdened with the 1 million lines of code. There are also severe discrepancies *where* the handling happens: In VFX, EXPANDMACROS is called from OPEN-FILE, while in Gforth, INCLUDED calls OPEN-FPATH-FILE, which does the path lookup and when it succeeds to open a file, it returns that file handle plus the path where it found it. So my proposal would be in that direction: Push that actual semantics out of the standard into a library, and just make sure the necessary plugin interface is standardized. That would allow us to say "require some- packet" and the logic behind expanding filenames in require could say "ok, there's no file for that in the search path, but let's look in theforth.net package list, if we find one - and if so, download that, and include it", which would be part of the fget include. You probably don't want to have this on open-file, though... so the plugin mechanism must be able to distinguish between these cases. I've checked three Forth systems which do perform non-trivial operations on file names in include (trivial is e.g. convert it to a C string to pass it to the OS): VFX: Performs macroexpand in open-file (hard-coded) Gforth: Uses open-fpath-file (path search) in included (hard-coded) bigForth: Has a deferred word >path.file in open-file, which does all the trivial but non-portable and non-trivial, but portable things together, i.e. it returns a C-string file name with path. I don't think any of these are a good solution, but bigForth is closest to what I have in mind (probably no surprise ;-). -- Bernd Paysan "If you want it done right, you have to do it yourself" net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ* http://bernd-paysan.de/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-26 08:15 +0000
Re: File extensions and Gforth on Openhub Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-27 00:53 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-27 07:32 +0000
Re: File extensions and Gforth on Openhub Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-27 21:29 +0000
Re: File extensions and Gforth on Openhub stephen@mpeforth.com (Stephen Pelc) - 2016-03-28 13:21 +0000
relative file names and INCLUDED (was: File extensions ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-28 14:25 +0000
Re: relative file names and INCLUDED (was: File extensions ...) stephen@mpeforth.com (Stephen Pelc) - 2016-03-28 15:35 +0000
Re: relative file names and INCLUDED (was: File extensions ...) Bernd Paysan <bernd.paysan@gmx.de> - 2016-03-28 19:58 +0000
Re: relative file names and INCLUDED (was: File extensions ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 07:42 +0000
Re: relative file names and INCLUDED (was: File extensions ...) stephen@mpeforth.com (Stephen Pelc) - 2016-03-29 11:33 +0000
Re: relative file names and INCLUDED (was: File extensions ...) Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-29 15:34 +0000
Re: relative file names and INCLUDED Doug Hoffman <glidedog@gmail.com> - 2016-03-29 12:31 -0400
Re: relative file names and INCLUDED Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-30 14:21 +0000
Re: relative file names and INCLUDED Doug Hoffman <glidedog@gmail.com> - 2016-03-30 10:35 -0400
Re: relative file names and INCLUDED (was: File extensions ...) stephen@mpeforth.com (Stephen Pelc) - 2016-03-29 16:58 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-28 12:29 +0000
Re: File extensions and Gforth on Openhub Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-29 11:47 +0000
Re: File extensions and Gforth on Openhub mhx@iae.nl - 2016-03-27 01:36 -0700
Re: File extensions and Gforth on Openhub Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-27 15:19 +0000
Re: File extensions and Gforth on Openhub Julian Fondren <julian.fondren@gmail.com> - 2016-03-26 19:51 -0700
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-27 08:01 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-27 15:00 +0100
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-27 14:15 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-29 08:13 +0100
Re: File extensions and Gforth on Openhub Paul Rubin <no.email@nospam.invalid> - 2016-03-29 00:15 -0700
Re: File extensions and Gforth on Openhub stephen@mpeforth.com (Stephen Pelc) - 2016-03-29 09:45 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 08:39 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-29 11:09 +0100
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 10:35 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-29 14:23 +0100
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 16:47 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-30 12:14 +0100
Re: File extensions and Gforth on Openhub Bob Butler <bob@work.com> - 2016-03-30 11:11 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-30 14:10 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-30 14:00 +0000
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-30 17:27 +0100
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-30 16:47 +0000
Re: File extensions and Gforth on Openhub Julian Fondren <julian.fondren@gmail.com> - 2016-03-29 09:41 -0700
Re: File extensions and Gforth on Openhub stephen@mpeforth.com (Stephen Pelc) - 2016-03-28 13:34 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-28 14:17 +0000
Re: File extensions and Gforth on Openhub stephen@mpeforth.com (Stephen Pelc) - 2016-03-28 15:24 +0000
Re: File extensions and Gforth on Openhub Paul Rubin <no.email@nospam.invalid> - 2016-03-28 10:51 -0700
Re: File extensions and Gforth on Openhub foxaudioresearch@gmail.com - 2016-03-28 18:35 -0700
Re: File extensions and Gforth on Openhub Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-03-29 08:05 +0100
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 07:12 +0000
Re: File extensions and Gforth on Openhub Paul Rubin <no.email@nospam.invalid> - 2016-03-29 00:42 -0700
Re: File extensions and Gforth on Openhub stephen@mpeforth.com (Stephen Pelc) - 2016-03-29 09:55 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-29 10:23 +0000
Re: File extensions and Gforth on Openhub anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-03-27 14:09 +0000
Re: File extensions and Gforth on Openhub Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-27 15:20 +0000
Re: File extensions and Gforth on Openhub "Steve(spt)" <steven@jupiter-ace.co.uk> - 2016-03-28 06:44 -0700
Re: File extensions and Gforth on Openhub Lars Brinkhoff <lars.spam@nocrew.org> - 2016-03-30 08:49 +0200
csiph-web