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

Forth for Raspberry Pi 3

952 views
Skip to first unread message

Frank K

unread,
May 7, 2017, 5:37:23 PM5/7/17
to
I'm looking for a working Forth for Rpi3. I've loaded gforth and it runs but won't compile. I loaded yforth and its just to bare bones. Is there an working Forth for the 3? Appreciate any help. I haven't worked in Forth since the 80's and want to try it again. Got the Pi as a hobby.

Julian Fondren

unread,
May 7, 2017, 6:33:34 PM5/7/17
to
On Sunday, May 7, 2017 at 4:37:23 PM UTC-5, Frank K wrote:
> I'm looking for a working Forth for Rpi3. I've loaded gforth and it runs but won't compile. I loaded yforth and its just to bare bones. Is there an working Forth for the 3? Appreciate any help. I haven't worked in Forth since the 80's and want to try it again. Got the Pi as a hobby.

If you have a Windows desktop you can use the ARM-Linux version of SwiftX:
https://www.forth.com/product/forth-cross-compiler-microcontrollers-microprocessors/
This is a tethered setup where you do your work on the desktop and deploy
the application to the rPI.

You can also get the ARM Linux version of VFX Forth:
http://www.mpeforth.com/software/pc-systems/vfx-forth-for-arm-linux/
This is the same Forth environment you'd get on x86 Linux, but for ARM.

gforth will probably eventually compile if you work at it. You might have
better luck with non-current; last I checked current had some weird
dependencies.

There's also ARM version of ciforth in development somewhere, last I heard
it was stuck at getting SAVE-SYSTEM to work.

I can only vouch for gforth and VFX Forth on ARM. I used gforth for a long
time on OpenBSD on a Sharp Zaurus and it worked perfectly fine. I've used
VFX Forth on several newer ARM devices, like an ARM Chromebook (running it
through crouton, under ChromeOS), the PocketCHIP https://getchip.com/ ,
and an ARM server from https://www.mininodes.com/ .

jo...@planet.nl

unread,
May 8, 2017, 4:29:59 AM5/8/17
to
Hi,

I got Gforth working om my Raspberry Pi Zero W under the Jessie as follows:

Download the latest gforth.tar.xz from:
http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current

tar xf gforth.tar.tar
cd gforth-0.7.9_2017XXXX
sudo apt-get update -y
sudo apt-get install libtool libtool-bin libltdl-dev libffi-dev autoconf m4 emacs -y

./configure
make
sudo make install \y

Ignore all errors.

Jos

Ron Aaron

unread,
May 8, 2017, 4:58:33 AM5/8/17
to


On 05/08/17 00:37, Frank K wrote:
> I'm looking for a working Forth for Rpi3. I've loaded gforth and it runs but won't compile. I loaded yforth and its just to bare bones. Is there an working Forth for the 3? Appreciate any help. I haven't worked in Forth since the 80's and want to try it again. Got the Pi as a hobby.

8th works on RPI (https://8th-dev.com)

Lars Brinkhoff

unread,
May 8, 2017, 8:27:47 AM5/8/17
to
Frank K wrote:
> I'm looking for a working Forth for Rpi3.

I have my Rpi3 set up to boot into my own Forth. It's a rather simple
ITC Forth, but comes with its own metacompiler and a set of assemblers.

http://github.com/larsbrinkhoff/lbForth

Anton Ertl

unread,
May 8, 2017, 9:47:11 AM5/8/17
to
Frank K <frankk...@gmail.com> writes:
>I'm looking for a working Forth for Rpi3. I've loaded gforth and it runs bu=
>t won't compile.

Gforth should build on the Raspberry Pi. You probably have to satisfy
the dependences. In any case, if you don't report what you did, and
what the result was, we cannot help you.

- 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 2017: http://www.euroforth.org/ef17/

Frank K

unread,
May 8, 2017, 1:39:33 PM5/8/17
to
On Sunday, May 7, 2017 at 5:37:23 PM UTC-4, Frank K wrote:
> I'm looking for a working Forth for Rpi3. I've loaded gforth and it runs but won't compile. I loaded yforth and its just to bare bones. Is there an working Forth for the 3? Appreciate any help. I haven't worked in Forth since the 80's and want to try it again. Got the Pi as a hobby.

I just tried again and now it works - not sure what I did but ... I also hooked up an old 350GB HD and Pi 3 just found it. Can't read or write so reformatting to FAT32. Amazing little machines.
Message has been deleted

jo...@planet.nl

unread,
May 8, 2017, 5:25:39 PM5/8/17
to
> Amazing little machines.
Indeed, and it gets more interesting when you add some hardware with a webserver and get results on your mobile or PC as shown on the following screen captures:
http://home.kpn.nl/~josv/rp1.jpg
http://home.kpn.nl/~josv/rp2.jpg
Jos

Anton Ertl

unread,
May 11, 2017, 10:47:49 AM5/11/17
to
an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>Gforth should build on the Raspberry Pi. You probably have to satisfy
>the dependences.

I have now tried it out (should work on any Raspberry Pi with the
versions I used): On a freshly installed Raspbian Jessie Lite (Version
April 2017), I built and installed gforth from the snapshot tarball
(version 0.7.9_20170427) as follows:

sudo apt-get update
sudo apt-get install texinfo emacs libtool libtool-bin libffi-dev texlive m4
wget https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.tar.xz
tar xfJ gforth.tar.xz
cd gforth-0.7.9_20170427/ #this will change with new snapshots
./configure && make && make doc
sudo make install

If instead you want to build from git, the following is the way to go:

sudo apt-get update
sudo apt-get install texinfo emacs libtool libtool-bin libffi-dev texlive m4
sudo apt-get install git autoconf gforth
git clone git://git.savannah.gnu.org/gforth.git
cd gforth
./BUILD-FROM-SCRATCH
sudo make install

For other Debian-based systems (also on other hardware), you can do
essentially the same, but need to install software that is installed
on Raspbian Jessie Lite by default (e.g., install gcc).

jo...@planet.nl

unread,
May 12, 2017, 5:53:32 AM5/12/17
to
Hi,
Thank you, nice to have a complete installation instruction.
Building Gforth from git seems to need an old Gforth
When I removed an old Gforth I got:
config.status: executing libtool commands
cp: cannot stat 'kernl32l.fi': No such file or directory
cp: cannot stat 'kernl32b.fi': No such file or directory
cp: cannot stat 'kernl64l.fi': No such file or directory
cp: cannot stat 'kernl64b.fi': No such file or directory

Colorization for errors appeared on my screen.
Nice but sometimes, but the text became hard to read for me on a black terminal.
For a better contrast I am now using:
$c00 to err-color $900 to warn-color $d60 to info-color
Jos

On 11 may 2017 16:47:49 UTC+2 Anton Ertl wrote:

Anton Ertl

unread,
May 12, 2017, 7:46:39 AM5/12/17
to
jo...@planet.nl writes:
>Hi,
>Thank you, nice to have a complete installation instruction.
>Building Gforth from git seems to need an old Gforth

Correct. That's why Gforth is mentioned in

>> sudo apt-get install git autoconf gforth

>When I removed an old Gforth I got:
>config.status: executing libtool commands
>cp: cannot stat 'kernl32l.fi': No such file or directory
>cp: cannot stat 'kernl32b.fi': No such file or directory
>cp: cannot stat 'kernl64l.fi': No such file or directory
>cp: cannot stat 'kernl64b.fi': No such file or directory

I am missing context. What did you try to do?

>Colorization for errors appeared on my screen.
>Nice but sometimes, but the text became hard to read for me on a black terminal.
>For a better contrast I am now using:
>$c00 to err-color $900 to warn-color $d60 to info-color

Gforth has a word called BLACK-COLORS for switching to a color scheme
appropriate for dark background. You can put it in ~/.gforthrc0 in
order to have it active on every invocation of Gforth.

Coos Haak

unread,
May 12, 2017, 8:24:30 AM5/12/17
to
Op Fri, 12 May 2017 11:42:06 GMT schreef Anton Ertl:

> Gforth has a word called BLACK-COLORS for switching to a color scheme
> appropriate for dark background. You can put it in ~/.gforthrc0 in
> order to have it active on every invocation of Gforth.
>
> - anton

Ha, this works with Gforth under Linux and Cygwin.
But Gforth 0.7.9-20170427 in Windows 10 ignores
a file .gforthrc0 or gforthrc0 in its root directory.
I tried placing 'black-colors' in siteinit.fs because
this file is mentioned in startup.fs and I assume it
will be read during startup. No chance!
So locate stil shows a terrible dark blue font on black.
Of course, black-colors works, but I can't be bothered
to enter this manually every time I start Gforth.

thanks, Coos

jo...@planet.nl

unread,
May 12, 2017, 9:19:06 AM5/12/17
to
Hi,

> I am missing context. What did you try to do?
I was trying to install Gforth without any old Gforth.

BLACK-COLORS in ~/.gforthrc0 is indeed much better on my Pi.
Many thanks.

Jos


On 12 may 2017 13:46:39 UTC+2 Anton Ertl wrote:

Robert L.

unread,
May 12, 2017, 9:48:48 AM5/12/17
to
On 5/7/2017, Frank K wrote:

> its just to bare bones

I'm trying to translate what you wrote into English.

I think it would be

"it's just too bare bones"

Is that what you meant?

Anton Ertl

unread,
May 12, 2017, 10:14:06 AM5/12/17
to
Coos Haak <htr...@gmail.com> writes:
>Op Fri, 12 May 2017 11:42:06 GMT schreef Anton Ertl:
>
>> Gforth has a word called BLACK-COLORS for switching to a color scheme
>> appropriate for dark background. You can put it in ~/.gforthrc0 in
>> order to have it active on every invocation of Gforth.
>>
>> - anton
>
>Ha, this works with Gforth under Linux and Cygwin.
>But Gforth 0.7.9-20170427 in Windows 10 ignores
>a file .gforthrc0 or gforthrc0 in its root directory.

Gforth currently expands "~" to $HOME, $HOMEDIRVE/$HOMEPATH (DOS/Windows
only), $TEMP, $TMP, and finally the empty string; the first match is used.

Googling around brought up $USERPROFILE and $localappdata as potential
candidates for checking on Windows (but trying so many different ones
makes failures harder to track down, so we would prefer one reliable
method over trying out several).

>I tried placing 'black-colors' in siteinit.fs because
>this file is mentioned in startup.fs and I assume it
>will be read during startup. No chance!

startup.fs (and thus siteinit.fs) is read when building the Gforth
image, i.e., when building or possibly also on installing Gforth.

Coos Haak

unread,
May 12, 2017, 11:44:33 AM5/12/17
to
Op Fri, 12 May 2017 13:54:35 GMT schreef Anton Ertl:

> Coos Haak <htr...@gmail.com> writes:
>>Op Fri, 12 May 2017 11:42:06 GMT schreef Anton Ertl:
>>
>>> Gforth has a word called BLACK-COLORS for switching to a color scheme
>>> appropriate for dark background. You can put it in ~/.gforthrc0 in
>>> order to have it active on every invocation of Gforth.
>>>
>>> - anton
>>
>>Ha, this works with Gforth under Linux and Cygwin.
>>But Gforth 0.7.9-20170427 in Windows 10 ignores
>>a file .gforthrc0 or gforthrc0 in its root directory.
>
> Gforth currently expands "~" to $HOME, $HOMEDIRVE/$HOMEPATH (DOS/Windows
> only), $TEMP, $TMP, and finally the empty string; the first match is used.
>
> Googling around brought up $USERPROFILE and $localappdata as potential
> candidates for checking on Windows (but trying so many different ones
> makes failures harder to track down, so we would prefer one reliable
> method over trying out several).
>
>>I tried placing 'black-colors' in siteinit.fs because
>>this file is mentioned in startup.fs and I assume it
>>will be read during startup. No chance!
>
> startup.fs (and thus siteinit.fs) is read when building the Gforth
> image, i.e., when building or possibly also on installing Gforth.
>
> - anton

echo black-colors>%homedrive%%homepath%\.gforthrc0
does it. In my case the file is c:\users\coos\.gforthrc0
As a matter of fact, .gforth-history is there too,
so the building or installing programs knew that.

groet Coos

Liang Ng

unread,
Apr 14, 2018, 10:54:11 PM4/14/18
to

1) Found this thread while Googling.

Any updates?

2) Anyone successful booted RPi into Forth, with applications running and screenshots?

3) Anyone managed to get OpenGL running on bare RPi Forth?

4) Anyone managed to port the above to Android phones (rooted)?
0 new messages