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

Why do these GForth programs fail with gforth-fast?

16 views
Skip to first unread message

Isaac Gouy

unread,
Jul 9, 2008, 2:02:29 PM7/9/08
to
Working GForth programs

http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gforth&lang2=gforth

fail with gforth-fast, here's an example:

/usr/bin/gforth-fast $GFORTH_FLAGS ../fannkuch.gforth %A

in file included from *the terminal*:0
../fannkuch.gforth:7: Undefined word
0. argc @ 1- arg >number 2drop drop constant NUM
^^
Backtrace:
$B5D510AC throw
$B5D5CB08 no.extensions TEST FAILED - Child processed exited with
error code (1)

Message has been deleted

Anton Ertl

unread,
Jul 9, 2008, 3:48:08 PM7/9/08
to
Isaac Gouy <igo...@yahoo.com> writes:
>Working GForth programs
>
>http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=gforth&lang2=gforth
>
>fail with gforth-fast, here's an example:
>
>
>
>/usr/bin/gforth-fast $GFORTH_FLAGS ../fannkuch.gforth %A

How have you defined GFORTH_FLAGS?

>in file included from *the terminal*:0
>../fannkuch.gforth:7: Undefined word
>0. argc @ 1- arg >number 2drop drop constant NUM
>^^
>Backtrace:
>$B5D510AC throw
>$B5D5CB08 no.extensions TEST FAILED - Child processed exited with
>error code (1)

With empty GFORTH_FLAGS, I cannot reproduce this:

time /usr/bin/gforth-fast /tmp/fannkuch.gforth 11
1234567891011
2134567891011
...
2435167891011
Pfannkuchen(11) = 51

real 0m26.657s
user 0m26.602s
sys 0m0.060s

That's with the (slow) Debian Etch build of gforth-fast.

- 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 2008: http://www.euroforth.org/ef08.html

Isaac Gouy

unread,
Jul 9, 2008, 4:40:11 PM7/9/08
to
> How have you defined GFORTH_FLAGS?

I thought of that possibility too, and checked ;-)


$ /usr/bin/gforth-fast fannkuch.gforth 3

in file included from *the terminal*:0

fannkuch.gforth:7: Undefined word
0. argc @ 1- arg >number 2drop drop constant NUM
^^
Backtrace:

$B5E3C0AC throw
$B5E47B08 no.extensions


$ /usr/bin/gforth fannkuch.gforth 3
123
213
231
321
312
132
Pfannkuchen(3) = 2


$ /usr/bin/gforth -v
gforth 0.6.2

gentoo dev-lang/gforth-0.6.2-r1

Anton Ertl

unread,
Jul 10, 2008, 6:00:06 AM7/10/08
to

Looks like gforth-fast is broken there, although that's a curious way
for it to show up (broken double-cell division?).

0 new messages