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

Pforth help

187 views
Skip to first unread message

Sidney Reilley

unread,
Jan 9, 2022, 4:33:52 PM1/9/22
to


--
--
Duke
** Text only please. Bottom post is best for me **

Rick C

unread,
Jan 9, 2022, 6:22:56 PM1/9/22
to
Ok, here's the bottom post, text only. I hope this helps.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Sidney Reilley

unread,
Jan 9, 2022, 8:43:26 PM1/9/22
to

Sidney Reilley

unread,
Jan 9, 2022, 8:56:52 PM1/9/22
to
On Sun, 9 Jan 2022 21:33:50 -0000 (UTC)
Sidney Reilley <sidney.r...@gmail.com> wrote:

Got rid of slrn! Now using sylpheed!
Sorry about the BS.

I was saying that I'm revisiting Forth using Pforth and Brodie's
"Starting Forth". I'm of course working through his examples.
Pforth doesn't seem to support the words SPACE and SPACES.
Should I be loading another dictionary to get those words? TIA ..

dxforth

unread,
Jan 9, 2022, 10:27:46 PM1/9/22
to
On 10/01/2022 12:56, Sidney Reilley wrote:
> On Sun, 9 Jan 2022 21:33:50 -0000 (UTC)
> Sidney Reilley <sidney.r...@gmail.com> wrote:
>
> Got rid of slrn! Now using sylpheed!
> Sorry about the BS.
>
> I was saying that I'm revisiting Forth using Pforth and Brodie's
> "Starting Forth". I'm of course working through his examples.
> Pforth doesn't seem to support the words SPACE and SPACES.
> Should I be loading another dictionary to get those words? TIA ..

That would be Phil Burk's pforth?

I've never compiled this system but SPACE and SPACES are included
in the file 'system.fth'. I see mention of

pforth -i system.fth

which claims to rebuild the system so you might try that.

Sidney Reilley

unread,
Jan 10, 2022, 12:11:36 AM1/10/22
to
On Mon, 10 Jan 2022 14:27:43 +1100
dxforth <dxf...@gmail.com> wrote:

> On 10/01/2022 12:56, Sidney Reilley wrote:
> > On Sun, 9 Jan 2022 21:33:50 -0000 (UTC)
> > Sidney Reilley <sidney.r...@gmail.com> wrote:
> >
> > Got rid of slrn! Now using sylpheed!
> > Sorry about the BS.
> >
> > I was saying that I'm revisiting Forth using Pforth and Brodie's
> > "Starting Forth". I'm of course working through his examples.
> > Pforth doesn't seem to support the words SPACE and SPACES.
> > Should I be loading another dictionary to get those words?
> > TIA ..
>
> That would be Phil Burk's pforth?

yes.

> I've never compiled this system but SPACE and SPACES are included
> in the file 'system.fth'. I see mention of
>
> pforth -i system.fth
>
> which claims to rebuild the system so you might try that.

I'll give it a shot! Thx. If all else fails, I've got gforth
installed as well. Probably should stick with it.

Sidney Reilley

unread,
Jan 10, 2022, 12:15:40 AM1/10/22
to
On Mon, 10 Jan 2022 14:27:43 +1100
dxforth <dxf...@gmail.com> wrote:

No Joy!

[quote]
pforth -i system.fth

PForth V21
Including: system.fth
pfIncludeFile could not open system.fth
{/quote]

Maybe I need to scoop it from his site? I'll give it a shot.

dxforth

unread,
Jan 10, 2022, 2:46:51 AM1/10/22
to
I managed to compile a base pforth executable under Windows. system.fth
is located in the 'fth' directory so I moved the exec there and ran:

pforth -i system.fth

which generates pforth.dic. After that pforth boots with SPACE SPACES etc.
loaded.

Sidney Reilley

unread,
Jan 10, 2022, 9:26:24 AM1/10/22
to
On Mon, 10 Jan 2022 18:46:47 +1100
dxforth <dxf...@gmail.com> wrote:

[snip]

> > No Joy!
> >
> > [quote]
> > pforth -i system.fth
> >
> > PForth V21
> > Including: system.fth
> > pfIncludeFile could not open system.fth
> > {/quote]
> >
> > Maybe I need to scoop it from his site? I'll give it a shot.
>
> I managed to compile a base pforth executable under Windows.
> system.fth is located in the 'fth' directory so I moved the exec
> there and ran:

I'm on a Linux box! All I have (or can find) is "pforth.dic". How
do you go about compiling "a base pforth"? You new from source?

dxforth

unread,
Jan 10, 2022, 9:54:49 AM1/10/22
to
I used the TCC Win compiler and the pforth sources here:

https://github.com/philburk/pforth

Never used Linux. Perhaps someone here can suggest how to compile
for your platform.

Richard Owlett

unread,
Jan 10, 2022, 9:59:29 AM1/10/22
to
Which Linux?
pforth is available in current Debian repository.


Jan Coombs

unread,
Jan 10, 2022, 10:19:49 AM1/10/22
to
On Tue, 11 Jan 2022 01:54:46 +1100
dxforth <dxf...@gmail.com> wrote:

> I used the TCC Win compiler and the pforth sources here:
>
> https://github.com/philburk/pforth
>
> Never used Linux. Perhaps someone here can suggest how to compile
> for your platform.

You may need to install build tools for your flavour of linux - ask.

view pforth manual at:
http://www.softsynth.com/pforth/pf_ref.php#Compiling-pForth-System

follow link to look at build instructions here:
How to Compile pForth on Unix or Mac
https://github.com/philburk/pforth/wiki/Compiling-on-Unix

then:
mkdir .../github.com/philburke # make place for sources

git clone https://github.com/philburk/pforth.git # pull in source
cd pforth/ # select project folder
ls # take a quick look

cd platforms/unix/ # select unix build folder

make all # run build

ls # take a peek

./pforth # run executable

." >>" 20 spaces ." \ << " >> << ok

Jan Coombs
--

Jan Coombs

unread,
Jan 10, 2022, 10:24:54 AM1/10/22
to
On Mon, 10 Jan 2022 15:19:47 +0000
Jan Coombs <jenfhaom...@murmic.plus.com> wrote:

> then:
> mkdir .../github.com/philburke # make place for sources

cd .../github.com/philburke # select folder for project

> git clone https://github.com/philburk/pforth.git # pull in source


Sorry, pre-post check failed, Jan Coombs

Sidney Reilley

unread,
Jan 10, 2022, 12:55:52 PM1/10/22
to
I know! That's what I'm running on my antiX Linux box.

Sidney Reilley

unread,
Jan 10, 2022, 1:00:44 PM1/10/22
to
On Mon, 10 Jan 2022 15:19:47 +0000
Jan Coombs <jenfhaom...@murmic.plus.com> wrote:

Thanks for the instructions! I use github all the time. I wasn't
too sure what dxforth meant by "recompiling"? Now I know that he
meant re-build the source code and not Forth re-building itself or
some such. Thanks again.

Sidney Reilley

unread,
Jan 10, 2022, 1:05:50 PM1/10/22
to
On Mon, 10 Jan 2022 15:24:53 +0000
Got it done! Thx again - works like a charm now!

Sidney Reilley

unread,
Jan 10, 2022, 1:24:21 PM1/10/22
to
On Mon, 10 Jan 2022 15:24:53 +0000
Jan Coombs <jenfhaom...@murmic.plus.com> wrote:

[snip]

The only way I got it to work is by telling it where the default
dictionary was. In your instructions, you simply executed `pforth'.

pforth -d ~/bin/pforth.dic

However, it works well so far.

Paul Rubin

unread,
Jan 10, 2022, 3:41:32 PM1/10/22
to
Sidney Reilley <sidney.r...@gmail.com> writes:
> I'm on a Linux box! All I have (or can find) is "pforth.dic". How
> do you go about compiling "a base pforth"? You new from source?

Why don't you use gforth instead of pforth? Gforth is very full
featured and there is probably an installable package for your Linux
distro. E.g. if you are using Debian, say "apt-get install gforth".

dxforth

unread,
Jan 10, 2022, 7:50:29 PM1/10/22
to
On 11/01/2022 05:05, Sidney Reilley wrote:
> On Mon, 10 Jan 2022 15:24:53 +0000
> Jan Coombs <jenfhaom...@murmic.plus.com> wrote:
>
>> On Mon, 10 Jan 2022 15:19:47 +0000
>> Jan Coombs <jenfhaom...@murmic.plus.com> wrote:
>>
>> > then:
>> > mkdir .../github.com/philburke # make place for sources
>>
>> cd .../github.com/philburke # select folder for project
>>
>> > git clone https://github.com/philburk/pforth.git # pull in
>> > source
>>
>>
>> Sorry, pre-post check failed, Jan Coombs
>>
>
> Got it done! Thx again - works like a charm now!

Great. OTOH I was unable to build the f/p version

#define PF_SUPPORT_FP

The compiler spewed out errors. Knowing little-to-nothing about C
I didn't pursue it further.

tom d

unread,
Jan 10, 2022, 11:21:33 PM1/10/22
to
My version has space defined and its:
: space bl emit ;

and you can define spaces as:

: spaces 0 do space loop ;

This is just a basic definition. You could add checks for an empty stack.

dxforth

unread,
Jan 11, 2022, 12:07:09 AM1/11/22
to
Strictly speaking that should be:

: spaces ( +n -- ) 0 max 0 ?do space loop ;

The inbuilt '0 MAX' is a historical artefact. Programmers computing
padding spaces didn't have to worry about 'negative' values.

Jan Coombs

unread,
Jan 11, 2022, 8:27:09 AM1/11/22
to
On Tue, 11 Jan 2022 11:50:23 +1100
dxforth <dxf...@gmail.com> wrote:

[snip]
> Great. OTOH I was unable to build the f/p version

The default unix build here seems to include f/p (Debian, Intel, 64b):
1234.5678e1 f. 12345.68 ok

> #define PF_SUPPORT_FP

The unix makefile here contains:
XCPPFLAGS = -DPF_SUPPORT_FP -D_DEFAULT_SOURCE -D_GNU_SOURCE
and other instances of "fp".
Where is the
#define PF_SUPPORT_FP
in yours?

Jan Coombs
--

dxforth

unread,
Jan 11, 2022, 10:05:34 AM1/11/22
to
There was no makefile for Win other than a project file for VisualStudio.
Not knowing how to make one, I just created a file of includes. That
worked until I declared PF_SUPPORT_FP ...

#define PF_SUPPORT_FP

#include "pforth\csrc\pf_all.h"
#include "pforth\csrc\pf_cglue.h"
#include "pforth\csrc\pf_clib.h"
#include "pforth\csrc\pf_core.h"
#include "pforth\csrc\pf_float.h"
#include "pforth\csrc\pf_guts.h"
#include "pforth\csrc\pf_host.h"
#include "pforth\csrc\pf_inc1.h"
#include "pforth\csrc\pf_io.h"
#include "pforth\csrc\pf_mem.h"
#include "pforth\csrc\pf_save.h"
#include "pforth\csrc\pf_text.h"
#include "pforth\csrc\pf_types.h"
#include "pforth\csrc\pf_win32.h"
#include "pforth\csrc\pf_words.h"
#include "pforth\csrc\pfcompfp.h"
#include "pforth\csrc\pfcompil.h"
#include "pforth\csrc\pfdicdat_arm.h"
#include "pforth\csrc\pfinnrfp.h"
#include "pforth\csrc\pforth.h"

#include "pforth\csrc\pfcompil.c"
#include "pforth\csrc\pfcustom.c"
#include "pforth\csrc\pf_cglue.c"
#include "pforth\csrc\pf_clib.c"
#include "pforth\csrc\pf_core.c"
#include "pforth\csrc\pf_inner.c"
#include "pforth\csrc\pf_io.c"
#include "pforth\csrc\pf_io_none.c"
#include "pforth\csrc\pf_main.c"
#include "pforth\csrc\pf_mem.c"
#include "pforth\csrc\pf_save.c"
#include "pforth\csrc\pf_text.c"
#include "pforth\csrc\pf_words.c"
#include "pforth\csrc\stdio\pf_fileio_stdio.c"
#include "pforth\csrc\win32_console\pf_io_win32_console.c"

Zbig

unread,
Jan 13, 2022, 8:59:21 AM1/13/22
to
> The only way I got it to work is by telling it where the default
> dictionary was. In your instructions, you simply executed `pforth'.
>
> pforth -d ~/bin/pforth.dic

Here on Slackware64 it works with no problems whatsoever. Of course SPACE / SPACES do exist in its dictionary:

#v+
PForth V27-LE/64, built Feb 19 2018 01:56:44
pForth loading dictionary from file /usr/share/pforth/v28/pforth.dic
File format version is 9
Name space size = 120000
Code space size = 300000
Entry Point = 0
Cell Size = 8
Little Endian Dictionary

space ok
Stack<10>
4 spaces ok
Stack<10>
12 spaces ok
Stack<10>
#v-

Zbig

unread,
Jan 13, 2022, 9:06:13 AM1/13/22
to
Multiple spaces in my reply have been "compressed" by news server. They are correctly displayed "locally" ofc.

Ruvim

unread,
Jan 13, 2022, 11:50:24 AM1/13/22
to
On 2022-01-13 17:06, Zbig wrote:
> Multiple spaces in my reply have been "compressed" by news server. They are correctly displayed "locally" ofc.

Multiple spaces in your reply were delivered unchanged by NNTP servers.
They are replaced by a single space in the Google Groups web-interface only.

See also:

https://news.novabbs.com/programming/article-flat.php?id=16242&group=comp.lang.forth#16289

--
Ruvim
0 new messages