Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: WF32, a Windows 32 bit Forth

510 views
Skip to first unread message

Alex

unread,
Apr 20, 2017, 10:02:58 AM4/20/17
to
I've put my Windows Forth up on github at
https://github.com/alextangent/wf32

Licensed where possible under the 2 clause BSD
https://opensource.org/licenses/BSD-2-Clause

The system started life as a branch of Win32Forth. It is now pretty well
unrecognisable, but it has helped bootstrap WF32 into life.

. it's a complete bottom up rewrite
. it's an STC not an ITC;
. it doesn't do very many Window-ey things and is a console application;
. it has a very extensive and completely rewritten assembler that
supports 32 and 64 bit rather than the original 16 and 32 bit
. it is very documentation lite.
. and so on.

The original Win32Forth system was public domain. Although the basic
features of Win32Forth (for instance, meta compilation) and some of
its capabilities are employed in this code, all of the original
Win32Forth kernel, and much of the supporting code, have been completely
rewritten. Win32Forth was a very fat Forth. WF32 isn't.

Jim Schneider wrote the original assembler and licensed it under the
GPL/LGPL, but none of it is used in WF32.

As such, each file has either a BSD licence (see below) or a note
explaining the provenance; normally, that is was borrowed from the
public domain Win32Forth.

If there are any discrepancies or copyright issues, please contact me
at alex at rivadpm dot com and I will endeavour to correct the
licence, remove, or rewrite out, the disputed code.

Why change the licence from public domain to BSD? Partly because PD
really doesn't have any legal standing in UK law; a new version of a
public domain work will be copyright protected, even though the original
work is not. (It's even debatable that Tom Zimmer could put Win32Forth
into the public domain.) I am not a lawyer, but the 2 clause BSD licence
seems to be most appropriate in this case. It has no meaningful
restrictions beyond recognising copyright.

To install it, download and run REBUILD32.BAT. This builds WF32.EXE from
the kernel GKERNEL32.EXE, then recompiles the kernel code. If you make
any changes to the kernel or the meta compiler in the SRC/KERNEL
directory, then run REBUILD32.BAT again. (Take a backup of the
executables first.) If you make changes to files in SRC or SRC/ASM, run
EXTEND32.BAT instead.

The system implements most of Forth 2012 with the exception of some of
the string extension words like SUBSTITUTE and UNESCAPE; the BLOCK
wordset; and the float wordset.

It passes Gerry Jackson's HAYES tester (which I have included in the
distribution; it was from
https://github.com/gerryjackson/forth2012-test-suite/tree/master and I
claim no more than copying rights on that code. Two of the files have
been edited to support WF32 testing out of the box).

There is a float assembler, but the float support and the disassembler
has not yet been completed. The interface to Windows doesn't use the VFX
contributed code, but my own library and import functionality. The
console support is horrible; the cursor dashes around and it needs
rewritten.

Beyond a benchmark and the ANS tester, there aren't any demo programs. I
have several thousands of lines of more code that I will add as I'm
able, but my interests lie in compiler technology, so don't expect any
Soduku games. It generates some passable code, and has a few
optimisations built in;

. Does constant folding ( 1 1 + is compiled as 2 )
. Does tail call optimisation
. Does inlining on small words

CATCH will catch Windows errors. A common one is recompiling WF32.EXE
and getting

Building image wf32.exe
include src\extend32 fsave wf32 bye
^^^^
Error -311 in (evaluate): wf32 windows call error
The process cannot access the file because it is being used by another
process.

Windows won't let you write to a file that's being executed, so
terminate the other copies first.

To save your program as an executable, FSAVE <name>. This will produce a
full EXE file that you can run.

--
Alex

Alex

unread,
Apr 20, 2017, 10:55:16 AM4/20/17
to
On 4/20/2017 15:02, Alex wrote:
> I've put my Windows Forth up on github at
> https://github.com/alextangent/wf32
>
>...
>

I forgot to say; it uses recognizers.

"a quoted and \"escaped\"string" recognizer
a tick (for example 'dup) recognizer
a ]] stuff to postpone [[ recognizer

--
Alex

Rudy Velthuis

unread,
Apr 20, 2017, 1:17:33 PM4/20/17
to
Pardon this newbie for asking: what is a recognizer (in this context)?

--
Rudy Velthuis http://www.rvelthuis.de

"A husband is what is left of the lover after the nerve has been
extracted."
-- Helen Rowland (1876-1950)

Albert van der Horst

unread,
Apr 20, 2017, 1:21:37 PM4/20/17
to
In article <odaesj$quo$1...@dont-email.me>, Alex <al...@rivadpm.com> wrote:
>I've put my Windows Forth up on github at
>https://github.com/alextangent/wf32
>
>Licensed where possible under the 2 clause BSD
>https://opensource.org/licenses/BSD-2-Clause
>
>The system started life as a branch of Win32Forth. It is now pretty well
>unrecognisable, but it has helped bootstrap WF32 into life.
>
>. it's a complete bottom up rewrite
>. it's an STC not an ITC;
>. it doesn't do very many Window-ey things and is a console application;
>. it has a very extensive and completely rewritten assembler that
>supports 32 and 64 bit rather than the original 16 and 32 bit
>. it is very documentation lite.
>. and so on.

Was it a lot of effort to accomodate a 64 bit assembler?

(The ciforth fp is written in assembler, for 32 bit.
I discovered that I needed only 48 C, in front of NEXT,
and take care of conversion to integer, to make it
work on 64 bits. At that point I stopped.)

>--
>Alex

Groetjes Albert
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Alex

unread,
Apr 20, 2017, 2:19:12 PM4/20/17
to
On 4/20/2017 18:22, Albert van der Horst wrote:
>
> Was it a lot of effort to accomodate a 64 bit assembler?

No, because I started there with 64 bits and worked my way back to 32
bits. It was a definite design goal not to support 16 bits; I had
considered using the Win32Forth assembler as a starting point, but it
has too much 16 bit stuff and is horribly complex (and sometimes
generates bad code).

The core of the assembler is around 800 lines, and a lot of them are
comments. I think it's approx 500 lines or so. There's a chunk of it
designed to be used from automated code generators, rather than the full
blown syntax supported by CODE words.

The rest is all the opcodes and encodings. Having a relatively
sophisticated core makes it easier to add opcodes; adding float support
is around 200 lines of code. VEX is working out at just over 1 line per
opcode.

--
Alex

Alex

unread,
Apr 20, 2017, 2:23:20 PM4/20/17
to
On 4/20/2017 18:17, Rudy Velthuis wrote:
> Alex wrote:
>
>> On 4/20/2017 15:02, Alex wrote:
>>> I've put my Windows Forth up on github at
>>> https://github.com/alextangent/wf32
>>>
>>> ...
>>>
>>
>> I forgot to say; it uses recognizers.
>>
>> "a quoted and \"escaped\"string" recognizer
>> a tick (for example 'dup) recognizer
>> a ]] stuff to postpone [[ recognizer
>
> Pardon this newbie for asking: what is a recognizer (in this context)?
>

Recognizers are an experiment in having an extensible parser built into
the Forth interpreter. The original idea is by Matthias Trute. Here's
his paper on the subject
http://amforth.sourceforge.net/pr/Recognizer-rfc-D.html. I am a big fan
of this, as it fixes a significant number of problems with the
traditional methods used.

--
Alex

HAA

unread,
Apr 20, 2017, 11:45:07 PM4/20/17
to
Alex wrote:
> ...
> Why change the licence from public domain to BSD? Partly because PD
> really doesn't have any legal standing in UK law; a new version of a
> public domain work will be copyright protected, even though the original
> work is not.

That's the whole idea. You can rework a 'public domain' work then do with
it as you please including, as you did, place a copyright on it. The original
work however remains 'public domain'. Having copyrighted the new work,
you must now defend it against others who would seek to violate the terms
you imposed and that's where the law comes in (if you can afford it).
The hassle and expense may make sense if commercial interests were
at stake but for the average hobbyist with nothing to gain, it's easier to
declare your work 'public domain' understanding that it will remain so.



Rudy Velthuis

unread,
Apr 21, 2017, 5:40:12 AM4/21/17
to
Ah, thanks!

--
Rudy Velthuis http://www.rvelthuis.de

"They have computers, and they may have other weapons of mass
destruction." -- Janet Reno, Us Attorney General, 02-27-98

jo...@planet.nl

unread,
Apr 21, 2017, 5:58:13 AM4/21/17
to
Hi,
When I getting into Forth it was easy to learn.
Each word could be explained within 8 lines using a half side of an A4 page (portrait).
Quite clear and understandable.
It seems recognizers are beyond that capability.
Jos

Rudy Velthuis

unread,
Apr 21, 2017, 7:44:59 AM4/21/17
to
jo...@planet.nl wrote:

> Hi,
> When I getting into Forth it was easy to learn.
> Each word could be explained within 8 lines using a half side of an
> A4 page (portrait). Quite clear and understandable.
> It seems recognizers are beyond that capability.

I find recognizers actually quite easy to understand. I already
implemented something similar for my number conversion (e.g. the
prefixes like # $ % and 'a', but also 0x as alternative). Recognizers
are just a little better formalized.

--
Rudy Velthuis http://www.rvelthuis.de

"The most important job is not to be Governor, or First Lady in
my case." -- George W. Bush

Alex

unread,
Apr 21, 2017, 8:49:53 AM4/21/17
to
On 4/21/2017 10:58, jo...@planet.nl wrote:
> Hi,
> When I getting into Forth it was easy to learn.
> Each word could be explained within 8 lines using a half side of an A4 page (portrait).
> Quite clear and understandable.
> It seems recognizers are beyond that capability.
> Jos
>

They're easier to write than (perhaps) to explain. Much of the
explanation is because the approach is novel, requires the interpreter
to change, and has some desirable side effects in terms of parsing.

Here's a recognizer for a hex number prefixed by 0x that have the form
0x0 up to 0xffffffff.

First we need to specify a set of rules for processing the number in
each state; here it's called DT:0X. Then we need a recognizer, called
rec:0x here. If it succeeds, then return n DT:0X else return DT:NULL.
Lastly, add our recognizer to the stack of recognizers.

: plit postpone literal ;

' noop \ interpret: do nothing
' plit \ compile as a literal
:noname plit postpone plit ; \ postpone a literal
dt-token: dt:0x ( n -- )

: rec:0x ( addr u -- n dt:number | dt:null )
dup 2 >= if
over 2 s" 0x" compare 0= if
base @ >r hex
2 /string 0 0 2swap >number \ n n addr len
r> base !
nip + dup 0= if
drop dt:0x exit
then
then
then 2drop dt:null ;

' rec:0x get-recognizers 1+ set-recognizers

And we're done. You can try it out in WF32.

--
Alex

jo...@planet.nl

unread,
Apr 21, 2017, 12:03:26 PM4/21/17
to
Hi Alex,

Thanks for the explanation.
Despite more than 8 lines. :-)

Jos

On 21 april 2017 14:49:53 UTC+2 Alex wrote:

Rod Pemberton

unread,
Apr 21, 2017, 10:44:53 PM4/21/17
to
On Fri, 21 Apr 2017 13:44:16 +1000
"HAA" <som...@microsoft.com> wrote:

> Alex wrote:

> > Why change the licence from public domain to BSD? Partly because PD
> > really doesn't have any legal standing in UK law; a new version of a
> > public domain work will be copyright protected, even though the
> > original work is not.
>
> That's the whole idea. You can rework a 'public domain' work then do
> with it as you please including, as you did, place a copyright on
> it.

Placing a copyright on a public domain work is not legal in the U.S. as
copyright law cannot be applied to a work once in the public domain.
Placing another copyright on a copyrighted work for the modifications
to that work is not legal in the U.S. either. The reason for both
of these is because trivial changes to an existing work are NOT
copyrightable under U.S. law, at all, e.g., patches, corrections,
modifications, etc. Under U.S. law, trivial modifications to a work
fall under the original copyright or lack thereof, i.e., public domain.
This means that changes to GNU copyleft code fall under GNU copyleft,
and changes to public domain works fall under the public domain. If he
made substantial changes, then he can copyright those changes, if
they've been extracted from the original public domain work. Also, the
only time a copyright can be applied to a derivation of another
copyrighted work is when there are substantial changes which are
sufficient enough to qualify the derivation as a completely new work in
the eyes of the law. If his modifications are less than the majority
of the derivative work, then he can't copyright the resulting
derivation.


Rod Pemberton
--
All it takes for humanity to conquer the world's toughest problems
is to hope, to believe, to share, and to do, in cooperation.

Rod Pemberton

unread,
Apr 21, 2017, 10:49:19 PM4/21/17
to
P.S. There is no way to make U.S. public domain works legally
compliant with legal jurisdictions, e.g., Germany, which do not
recognize the concept of public domain (no copyright, or expired
copyright).

rickman

unread,
Apr 22, 2017, 12:57:21 AM4/22/17
to
Maybe I don't understand. Are you saying in Germany copyrights don't
expire?

--

Rick C

Alex

unread,
Apr 22, 2017, 7:48:29 AM4/22/17
to
On 4/22/2017 03:45, Rod Pemberton wrote:
> On Fri, 21 Apr 2017 13:44:16 +1000
> "HAA" <som...@microsoft.com> wrote:
>
>> Alex wrote:
>
>>> Why change the licence from public domain to BSD? Partly because PD
>>> really doesn't have any legal standing in UK law; a new version of a
>>> public domain work will be copyright protected, even though the
>>> original work is not.
>>
>> That's the whole idea. You can rework a 'public domain' work then do
>> with it as you please including, as you did, place a copyright on
>> it.
>
> Placing a copyright on a public domain work is not legal in the U.S. as
> copyright law cannot be applied to a work once in the public domain.

I'm not in the US. I am also not a lawyer (and I suspect you're not one).


> Placing another copyright on a copyrighted work for the modifications
> to that work is not legal in the U.S. either. The reason for both
> of these is because trivial changes to an existing work are NOT
> copyrightable under U.S. law, at all, e.g., patches, corrections,
> modifications, etc. Under U.S. law, trivial modifications to a work
> fall under the original copyright or lack thereof, i.e., public domain.

The changes are so substantial that I defy anyone to find common ground
between, for example, the Win32Forth kernel and the WF32 kernel, beyond
the unavoidable commonality of words named DUP SWAP etc.

> This means that changes to GNU copyleft code fall under GNU copyleft,
> and changes to public domain works fall under the public domain. If he
> made substantial changes, then he can copyright those changes, if
> they've been extracted from the original public domain work. Also, the
> only time a copyright can be applied to a derivation of another
> copyrighted work is when there are substantial changes which are
> sufficient enough to qualify the derivation as a completely new work in
> the eyes of the law. If his modifications are less than the majority
> of the derivative work, then he can't copyright the resulting
> derivation.
>
Yes, that is the case.

But again, I am in the UK, so (in the main) the Berne convention
applies, where works eventually fall into the public domain after a
period of time. I can't see any way where you can place a work in the
public domain immediately. Copyright is automatic.

>
> Rod Pemberton
>


--
Alex

Rod Pemberton

unread,
Apr 22, 2017, 11:31:52 PM4/22/17
to
My understanding is that the E.U. doesn't have the concept of Public
Domain. E.g., I was told that when an E.U. government creates
software with taxpayer money, it is not Public Domain as for the U.S.
(belonging to the people of the U.S.), but is copyrighted by their
government (belongs to the State). The State may license the
copyright as they see fit. I.e., once a copyright "expires" in the
E.U., the copyright ownership simply transfers from the holder to the
State. Ownership doesn't transfer into the Public Domain as in
the U.S. Another person in the E.U. told me they couldn't work on a
Public Domain project because there was no legal way for them to forfeit
copyright (no copyright) under E.U. laws, as E.U. laws and treaties
automatically copyright their works for the life of the author and some
years.

(Of course, you could Google or Wikipedia to confirm or correct.)

Anton Ertl

unread,
Apr 24, 2017, 10:22:21 AM4/24/17
to
Alex <al...@rivadpm.com> writes:
>I've put my Windows Forth up on github at
>https://github.com/alextangent/wf32

I managed to get the thing to work on Ubuntu 16.04 as follows:

#as root
dpkg --add-architecture i386
sudo apt-get update
apt-get install wine
# as normal user:
#instead of running rebuild32.bat
wine gkernel32 include src/extend32 fsave wf32 bye
wine wf32 include src/kernel/gmeta32 .olly bye
wine gkernel32 include src/extend32 fsave wf32 bye

And now I can start wf32 as interactive session with

wineconsole wf32
#needs a terminal reset after it is finished,
# despite having it's own console window.

or use it in batch mode as follows:

wine wf32 2 2 + cr . cr bye

(wineconsole is not good for batch mode, because the output is garbled
by the strange terminal settings, while wine is not good for
interactive mode because it does funny things when wf32 tries to echo
the input.

The overhead of starting wine (or that of wf32) is considerable, not
so great for measuring performance:

[b8:~/wf32:15997] perf stat -e cycles,instructions wine wf32 cr bye
STC Experimental 32bit: 0.06.08 Build: 5

Performance counter stats for 'wine wf32 cr bye':

1802840712 cycles
1768741017 instructions # 0.98 insns per cycle

0.871465953 seconds time elapsed

>It generates some passable code, and has a few
>optimisations built in;
>
>. Does constant folding ( 1 1 + is compiled as 2 )
>. Does tail call optimisation
>. Does inlining on small words

I had the impression that you were working on a more ambitious
analytical compiler. Was my impression wrong?

- 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 2016: http://www.euroforth.org/ef16/

Alex

unread,
Apr 24, 2017, 11:41:05 AM4/24/17
to
On 4/24/2017 14:59, Anton Ertl wrote:
> Alex <al...@rivadpm.com> writes:
>> I've put my Windows Forth up on github at
>> https://github.com/alextangent/wf32
>
> I managed to get the thing to work on Ubuntu 16.04 as follows:

Thanks, that's helpful.


>
>> It generates some passable code, and has a few
>> optimisations built in;
>>
>> . Does constant folding ( 1 1 + is compiled as 2 )
>> . Does tail call optimisation
>> . Does inlining on small words
>
> I had the impression that you were working on a more ambitious
> analytical compiler. Was my impression wrong?

No; that's the bare bones. I have several thousand lines of code in
various states of completion. It's slow work, and writing some of the
algorithms in Forth is non trivial.

--
Alex

Anton Ertl

unread,
Apr 24, 2017, 12:55:45 PM4/24/17
to
That's what he is saying, but he is wrong.

rickman

unread,
Apr 24, 2017, 1:05:28 PM4/24/17
to
On 4/24/2017 12:54 PM, Anton Ertl wrote:
> rickman <gnu...@gmail.com> writes:
>> On 4/21/2017 10:50 PM, Rod Pemberton wrote:
>>> P.S. There is no way to make U.S. public domain works legally
>>> compliant with legal jurisdictions, e.g., Germany, which do not
>>> recognize the concept of public domain (no copyright, or expired
>>> copyright).
>>
>> Maybe I don't understand. Are you saying in Germany copyrights don't
>> expire?
>
> That's what he is saying, but he is wrong.

He did follow up. He says the original copyright expires, but it
doesn't go into public domain, it becomes property of the state. That
does seem a bit strange.

--

Rick C

NN

unread,
Apr 24, 2017, 5:07:59 PM4/24/17
to
Hi Alex

I have an example file :

anew -xxxx-

100 constant aa
200 constant bb
300 constant cc
100 constant daa
200 constant dbb
300 constant dcc

.( ---Loaded--- )

saved as test.fs

THE OUTPUT :

include test ---Loaded--- ok
ok
aa ok[1]
bb ok[2]
.s [2] 100 200 ok[2]
-xxxx-
^^^^^^
Error -9 in (console): -xxxx- invalid memory address
aa ok[1]
bb ok[2]
.s [2] 100 200 ok[2]
include test
test.fs
^^^^^^^
Warning -4100 in (evaluate): test.fs is redefined
200 constant bb
^^
Error -9 in test.fs at line 4 : bb invalid memory address
aa ok[1]
bb
^^
Error -9 in (console): bb invalid memory address


Came about because I was trying to reload files after make small corrections.
I changed anew to marker but didnt help.
Am I doing something silly ; how can I forget words ?

NN

Alex

unread,
Apr 24, 2017, 5:48:10 PM4/24/17
to
It looks like it's bust. I'll take a look.

--
Alex

Anton Ertl

unread,
Apr 25, 2017, 3:27:54 AM4/25/17
to
rickman <gnu...@gmail.com> writes:
>He says the original copyright expires, but it
>doesn't go into public domain, it becomes property of the state.

Also wrong.

Alex

unread,
Apr 29, 2017, 2:13:23 PM4/29/17
to
On 4/24/2017 16:41, Alex wrote:
> On 4/24/2017 14:59, Anton Ertl wrote:
>> Alex <al...@rivadpm.com> writes:
>>> I've put my Windows Forth up on github at
>>> https://github.com/alextangent/wf32
>>
>> I managed to get the thing to work on Ubuntu 16.04 as follows:
>
> Thanks, that's helpful.

An update. For Ubuntu 16.10 and 17.04, Wine needs to be installed from
PPAs to avoid some of the problems Anton noticed with Wine and to get
the latest stable versions (the Wine repository is no longer on
Launchpad, which means the PPA is not being being updated) and to get
appropriate .desktop files for automatically associating .EXE files with
Wine.

sudo dpkg --add-architecture i386

sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/'

wget https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add
Release.key

sudo apt update && sudo apt install winehq-stable

Wine may complain about Gecko; accept the message that does the download
automatically. The command "wine wf32" still has problems due to the
console echo. "winconsole wf32" works fine, and does not lock up the
originating terminal any more. Double clicking on wf32.exe is the easiet
way of firing WF32 up.
--
Alex

Alex

unread,
Apr 29, 2017, 2:49:23 PM4/29/17
to
On 4/24/2017 22:48, Alex wrote:
> On 4/24/2017 22:07, NN wrote:
>> Hi Alex
>>
>> I have an example file :
[snipped]

>>
>>
>> Came about because I was trying to reload files after make small
>> corrections.
>> I changed anew to marker but didnt help.
>> Am I doing something silly ; how can I forget words ?
>>
>> NN
>>
>
> It looks like it's bust. I'll take a look.
>

It's bust. The vocabulary structure changed, and I didn't update
forget.fs word VTRIM. I'm going to leave it for the moment since I have
other more interesting code to address first.

Thanks for the error report.

--
Alex

Albert van der Horst

unread,
Apr 30, 2017, 6:18:37 AM4/30/17
to
In article <odaesj$quo$1...@dont-email.me>, Alex <al...@rivadpm.com> wrote:
>I've put my Windows Forth up on github at
>https://github.com/alextangent/wf32
>
>Licensed where possible under the 2 clause BSD
>https://opensource.org/licenses/BSD-2-Clause
>
>The system started life as a branch of Win32Forth. It is now pretty well
>unrecognisable, but it has helped bootstrap WF32 into life.
>
>. it's a complete bottom up rewrite
>. it's an STC not an ITC;
>. it doesn't do very many Window-ey things and is a console application;
>. it has a very extensive and completely rewritten assembler that
>supports 32 and 64 bit rather than the original 16 and 32 bit
>. it is very documentation lite.
>. and so on.

I can confirm that it runs under Debian/Wheezy + wine.
I'm a bit disappointed that WORDS doesn't work and there is no
glossary. So I've no idea of the content.

I tried to include some random file ( dotwords.fs).
This gives:
Loading dot words... dotwords.fs

INCLUDE dotwords.fs
internal
^^^^^^^^
Error -13 in dotwords.fs at line 40 : internal is undefined
<SNIP>

>--
>Alex

Alex

unread,
Apr 30, 2017, 7:00:25 AM4/30/17
to
Did you install it?

If you have Wine running, you should be able to mark REBUILD32.BAT as a
Wine program. Run that and it will build WF32.EXE, which requires no
extra includes and has WORDS already.

Alternatively, run GKERNEL32.EXE and INCLUDE src/extend32; that gets a
complete system. You can FSAVE name.exe to get a turnkey.

--
Alex

Albert van der Horst

unread,
Apr 30, 2017, 8:37:36 AM4/30/17
to
I see. You don't have a release. There are no archives to download.
On has to become a developer and run git.

Unfortunately I don't know how to do that.
>
>--
>Alex

Groetjes Albert

Alex

unread,
Apr 30, 2017, 9:03:25 AM4/30/17
to
Here is the release: https://github.com/alextangent/wf32/releases

README.MD says:

A 32 bit Forth for Windows; conforms with minor omissions to the Forth
2012 standard documented at http://forth-standard.org/

To install WF32, run rebuild32.bat. This creates the full system wf32.exe.

Some useful utility words (and more doc will follow):

WORDS Shows all the words in the system

EDIT name Edit a word. For this, you will need an editor. The system as
built uses CONTEXT, which can be obtained from here:
http://www.contexteditor.org/index.php If you want to use your own
editor, then change the word (editor) in file src/editor.fs to point to
your favourite editor.

SEE name Shows a description and disassembly of the word.



> On has to become a developer and run git.

No, that's not required. I appreciate your efforts to run it on debian,
but that's not its natural home. Windows is best, since it's a Windows
based system.

>
> Unfortunately I don't know how to do that.

I documented the install in the announcement post.
https://groups.google.com/forum/#!original/comp.lang.forth/IVvfxVDnUDo/HtIzixDhBQAJ

>>
>> --
>> Alex
>
> Groetjes Albert
>


--
Alex

Albert van der Horst

unread,
Apr 30, 2017, 1:50:39 PM4/30/17
to
In article <oe4n4q$sm3$1...@dont-email.me>, Alex <al...@rivadpm.com> wrote:
<SNIP>
>> On has to become a developer and run git.
>
>No, that's not required. I appreciate your efforts to run it on debian,
>but that's not its natural home. Windows is best, since it's a Windows
>based system.
>
>>
>> Unfortunately I don't know how to do that.
>
>I documented the install in the announcement post.
>https://groups.google.com/forum/#!original/comp.lang.forth/IVvfxVDnUDo/HtIzixDhBQAJ

That is what I used. My unfamiliarity with github was the culprit.
If I want to take the blame that is. There are over 50 clickable items on
the wf32 screen. One of them is "1 release" and that is the one you need.

WORDS and SEE work well under wine.

If I click on wf32.exe in a browser.
There is a strange fenomenon after starting up in a console with
wine wf32.exe, (this is not the case with "wine gfkernel32".)
The input is reflected after each character three times : like so
(I typed "SEE test")

SSSSSESESESESEESEESEESEE SEE SEE tSEE tSEE teSEE teSEE tesSEE tesSEE testSEE testSEE test
^^^^
Error -13 in (console): test is undefined

This makes it a bit hard to try things out.
The benchmarks runs: I get 1G8 Dhrystones in the console seemingly.
This is caused by missing spaces.

In a graphical window it says about 5 M Dhrystones, must more reasonable.

This seems altogether a monumental amount of work, (which will require
an equally monumental effort to document fully.)

Albert van der Horst

unread,
Apr 30, 2017, 2:03:03 PM4/30/17
to
In article <oe587n$j53$1...@cherry.spenarnc.xs4all.nl>,
Albert van der Horst <alb...@cherry.spenarnc.xs4all.nl> wrote:
>In article <oe4n4q$sm3$1...@dont-email.me>, Alex <al...@rivadpm.com> wrote:
><SNIP>
>>> On has to become a developer and run git.
>>
>>No, that's not required. I appreciate your efforts to run it on debian,
>>but that's not its natural home. Windows is best, since it's a Windows
>>based system.
>>
>>>
>>> Unfortunately I don't know how to do that.
>>
>>I documented the install in the announcement post.
>>https://groups.google.com/forum/#!original/comp.lang.forth/IVvfxVDnUDo/HtIzixDhBQAJ
>
>That is what I used. My unfamiliarity with github was the culprit.
>If I want to take the blame that is. There are over 50 clickable items on
>the wf32 screen. One of them is "1 release" and that is the one you need.
>
>WORDS and SEE work well under wine.
>
>If I click on wf32.exe in a browser.

This line is incomplete:
If I click on wf32.exe in a browser, wine starts up wf32.exe and
everyhting looks normal.

Alex

unread,
Apr 30, 2017, 3:06:04 PM4/30/17
to
On 4/30/2017 19:03, Albert van der Horst wrote:
> In article <oe587n$j53$1...@cherry.spenarnc.xs4all.nl>,
> Albert van der Horst <alb...@cherry.spenarnc.xs4all.nl> wrote:

>
> This line is incomplete:
> If I click on wf32.exe in a browser, wine starts up wf32.exe and
> everyhting looks normal.
>
>> There is a strange fenomenon after starting up in a console with
>> wine wf32.exe, (this is not the case with "wine gfkernel32".)
>> The input is reflected after each character three times : like so
>> (I typed "SEE test")
>>
>> SSSSSESESESESEESEESEESEE SEE SEE tSEE tSEE teSEE teSEE tesSEE tesSEE testSEE testSEE test
>> ^^^^
>> Error -13 in (console): test is undefined

Try from a terminal wineconsole wf32.

>>
>> This makes it a bit hard to try things out.
>> The benchmarks runs: I get 1G8 Dhrystones in the console seemingly.
>> This is caused by missing spaces.
>>
>> In a graphical window it says about 5 M Dhrystones, must more reasonable.
>>
>> This seems altogether a monumental amount of work, (which will require
>> an equally monumental effort to document fully.)
>>

Yes. I will be borrowing a lot of the gforth documentation.


--
Alex

Alex

unread,
Apr 30, 2017, 5:33:33 PM4/30/17
to
Well, that was easy as it turned out. In FORGET.FS replace VTRIM with

: vtrim ( nfa voc-thread -- ) \ trim VOC-THREAD back to nfa
dup voc#threads 0
do 2dup i cells+ voc.#0 full-trim
loop 2drop ;

--
Alex

lsng....@gmail.com

unread,
Apr 4, 2018, 5:32:49 AM4/4/18
to
I found your old post while Googling "ubuntu wine win32forth".

Just wondering, have you tested OpenGL graphics with with WINE win32forth?

Thank you very much.

Reference: https://groups.google.com/d/msg/comp.lang.forth/E_NrQ1ZPZrY/gKcnpMT3BgAJ

gnuarm.del...@gmail.com

unread,
Apr 4, 2018, 1:18:21 PM4/4/18
to
Are you replying in the correct thread? You didn't quote any of the message you are replying to and Google Groups doesn't show the hierarchy so I can't tell what you are responding to. The thread you reference is an entirely different thread than the one you posted to from what I can see.

Did you fat finger this? I'm glad you did actually, this is an interesting thread.

Rick C.

Liang Ng

unread,
Apr 4, 2018, 5:26:21 PM4/4/18
to
I was replying to Anton Ertl's (24/4/2017) post:

https://groups.google.com/d/msg/comp.lang.forth/IVvfxVDnUDo/iIjz0XEcBwAJ

I guess I am too used to Reddit -- I cannot remember the last time I actually used a "newsreader". I am using Google Groups. ;-)

-- born in 1970s, Linux user since 1990s.

0 new messages