Marcel Hendrix <
m...@iae.nl> writes:
>On Saturday, June 18, 2022 at 4:54:33 PM UTC+2, Anton Ertl wrote:
>> Marcel Hendrix <
m...@iae.nl> writes:
>> >I can believe it. It is not the business that sees the need for a
>> >commercial Forth, it is some individual inside it. How would such
>> >an individual defend his desire to purchase a license, even if
>> >it is just a few hundred dollars?
>
>It was not my intention to attack the free Forths, as it appears you
>suspect. However, I did describe the situation of a few years ago,
>that I assumed Albert was presumably talking about, and tried
>to point out how that has changed.
I don't think the situation has changed much in the last few years,
certainly wrt. Gforth's capabilities. And evaluation versions for
commercial Forth's have also been available for more than a few years.
>Well, there is that slight problem when I need it to run on Windows,
>isn't there?
Not that I know of.
Most recent snapshot (currently from July 2020):
http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.exe
Gforth 0.7.0:
http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/gforth-0.7.0-20081226.exe
http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/gforth-0.7.0-20090215.exe
Or you can build a Linux binary and run it under WSL.
>> Here are some that I irk me when dealing with iForth, lxf, sf, and
>> vfx.
>>
>> Forth system startup clears the screen (IIRC iForth, lxf, vfx)
>> Ctrl-D at the start of the line does not do BYE (iforth, lxf, vfx)
>
>I definitely don't want that, but users have the source of proced
>and can install that themselves with little effort.
That's not quite the answer that the user of a commercial Forth wants
to read (especially not without any pointer where to look).
>> Long and varying startup time (iForth)
>
>I don't recognize it but vaguely remember you measuring that
>in the past.
The variation looks ok with my changes (IIRC without my changes it
took a lot longer and varied a lot, say, between 0.2s and 0.5s); the
startup time is still long. Here's 100 startups on a Skylake:
[~:130742] perf stat -r100 iforth bye
Performance counter stats for 'iforth bye' (100 runs):
78.60 msec task-clock # 0.934 CPUs utilized ( +- 0.27% )
2 context-switches # 0.031 K/sec ( +- 2.88% )
0 cpu-migrations # 0.000 K/sec ( +-100.00% )
3374 page-faults # 0.043 M/sec ( +- 0.56% )
312778534 cycles # 3.979 GHz ( +- 0.07% )
383340770 instructions # 1.23 insn per cycle ( +- 0.05% )
59045145 branches # 751.216 M/sec ( +- 0.05% )
1066105 branch-misses # 1.81% of all branches ( +- 0.06% )
0.084142 +- 0.000211 seconds time elapsed ( +- 0.25% )
For comparison:
cycles
6740582 gforth-fast 0.7.3 (Debian, no dynamic native code generation)
41409174 gforth-fast development version, with dynamic native code
312778534 iForth
1328939 lxf
11607005 sf
11282568 vfx4.72
But given that there is not much variation in startup cycles, one can
just subtract them from the results.
>The VFX system I sometimes use deliberately prevents quick
>startup and wants me to click away a popup (first prevents
>type-ahead and then wait a few extra seconds for good measure).
>At least I don't do *that* stuff.
Yes, that's horrible. I have the better experience in Linux. VFX5
even has fixed the xterm corruption that resulted from exiting from
VFX4 after an error.
>> I modified iForth and VFX to get rid of the screen-clearing and some
>> of iForth's startup time, but as a result iForth does not understand
>> relative file names.
>
>"as a result" ? Relative file names might be useful and I have looked
>at it in the past but I don't recall why I didn't implement it
Ok, I thought that it was a result of my changes, and therefore did
not report it, because I could not imagine you doing this on purpose.
Doing it the stupid way that VFX and SF do it (relative to the working
directory, which comes out of Unix file handling by default) is not
great, but far better than not being able to deal with relative file
names at all. The right way, of course, for INCLUDE etc. is to be
relative to the directory the currently text-interpreted file is in
(or, on the command line, the working directory).
Having to change to absolute file names ensures that I never will use
iforth for any file that contains an INCLUDE/REQUIRE itself.
IIRC iforth used to be better. I used iforth-2.1 to run appbench
programs, many of which consist of several files. I would have
noticed if that worked only with absolute file names.
>(I do have
>some user tools for it but never use them). In my C compiler
>environment relative files are a pain as I have no idea where a certain
>file lives on disk.
In C 'include <file>' searches the files in a path, so that may be
hard. If I had that problem, I would use locate, and in hard cases
strace to find out which files are included. If you are using gcc,
gcc -E -MD is supposed to produce a dependency file, which should
contain file paths (probably relative to the working directory).