Thread: [Bigforth-devel] Turnkey application problems
Brought to you by:
paysan
From: David K. <dvd...@gm...> - 2011-03-27 11:21:10
|
Hi, I'm just trying to turn the brainless chess playing game [1] into a windows turnkey application using bigforth-2.4.0. Stumbled into two problems so far: - Default search path searches bigforth's library directories before '.', so it does not load 'environ.fs' which is part of my project but is shadowed by a file of the same name in the bigforth library directory. I cannot override the search-path using 'setpath', since it is not part of the default search-order, and i didn't find out where it hides :/ Had to hand-fix bigforth.ini for now, but this is somewhat an ugly solution. - The bigger problem is, that '(SAVE' doesn't seem to exist nowadays, and I don't know how to replace it. How do I specify the word to execute at startup? The cleanest solution would be something like 'bootmessage' in Gforth, for initializating Brainless, since afterwards Brainless uses the Forth terminal anyways. Here is the non-working code I'm using: bigforth=c:/Program\ Files/bigforth/bigforth.exe wine "$bigforth" -e 'path' ./brainless.fs \ -e ': GO tui-startup QUIT ; ' \ -e ': (SAVE r> GO (SAVE >r ; ' \ -e 'SAVESYSTEM brainless CR BYE' BTW on Linux, bigforth is still about 30% faster than Gforth-64bit for the Brainless benchmark. Probably Gforth bloats code too much and relies too much on the (too small) BTB. cheers, David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40 [1] http://sourceforge.net/projects/forth-brainless/ |
From: Bernd P. <ber...@gm...> - 2011-03-27 11:36:37
|
Am Sonntag, 27. März 2011, 13:20:57 schrieb David Kuehling: > Hi, > > I'm just trying to turn the brainless chess playing game [1] into a > windows turnkey application using bigforth-2.4.0. Stumbled into two > problems so far: > > - Default search path searches bigforth's library directories before > '.', so it does not load 'environ.fs' which is part of my project but > is shadowed by a file of the same name in the bigforth library > directory. Is this really the case? The default search path starts with ., and when I put an "environ.fs" into the current directory, it loads from there. > I cannot override the search-path using 'setpath', since it is not > part of the default search-order, and i didn't find out where it > hides :/ path is in the default search order, setpath is in DOS. > Had to hand-fix bigforth.ini for now, but this is somewhat > an ugly solution. > > - The bigger problem is, that '(SAVE' doesn't seem to exist nowadays, > and I don't know how to replace it. How do I specify the word to > execute at startup? The cleanest solution would be something like > 'bootmessage' in Gforth, for initializating Brainless, since > afterwards Brainless uses the Forth terminal anyways. The way to go is to use the module system. module brainless include brainless.fs main: go ; module; > BTW on Linux, bigforth is still about 30% faster than Gforth-64bit for > the Brainless benchmark. Probably Gforth bloats code too much and > relies too much on the (too small) BTB. Both. It's rather the other way round: Being only 30% slower than bigForth is a huge achievement of Gforth's approach. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/ |
From: David K. <dvd...@gm...> - 2011-03-27 17:48:34
|
>>>>> "Bernd" == Bernd Paysan <ber...@gm...> writes: > Am Sonntag, 27. März 2011, 13:20:57 schrieb David Kuehling: >> Hi, >> >> I'm just trying to turn the brainless chess playing game [1] into a >> windows turnkey application using bigforth-2.4.0. Stumbled into two >> problems so far: >> >> - Default search path searches bigforth's library directories before >> '.', so it does not load 'environ.fs' which is part of my project but >> is shadowed by a file of the same name in the bigforth library >> directory. > Is this really the case? The default search path starts with ., and > when I put an "environ.fs" into the current directory, it loads from > there. For the linux version you're right. In the windows version, the default setting after installation resulted in Path ";C:\Program Files\bigforth;." > The way to go is to use the module system. [..] Ok, going to give this a try, >> BTW on Linux, bigforth is still about 30% faster than Gforth-64bit >> for the Brainless benchmark. Probably Gforth bloats code too much >> and relies too much on the (too small) BTB. > Both. It's rather the other way round: Being only 30% slower than > bigForth is a huge achievement of Gforth's approach. Well, I think I remember Anton claiming, Gforth were faster in his micro-benchmarks. Just wanted to point out, that Gforth doesn't fare so well under real-world condidtions :) cheers, David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40 |
From: David K. <dvd...@gm...> - 2011-03-30 20:33:04
|
>>>>> "Bernd" == Bernd Paysan <ber...@gm...> writes: > Am Sonntag, 27. März 2011, 13:20:57 schrieb David Kuehling: >> - The bigger problem is, that '(SAVE' doesn't seem to exist nowadays, >> and I don't know how to replace it. How do I specify the word to >> execute at startup? The cleanest solution would be something like >> 'bootmessage' in Gforth, for initializating Brainless, since >> afterwards Brainless uses the Forth terminal anyways. > The way to go is to use the module system. > module brainless include brainless.fs main: go ; module; Ok, I now have a somewhat working .exe version of Brainless. Not completely stable yet (think I still missed a few ! and LITERAL that need to be converted to A!, ALITERAL). Next problem: windows consoles do not have ansi escape sequence support (and bigforth does not support the windows syscalls for console colors?) Hmm, what is the simplest way to draw the chessboard in color then? Does the xbigforth dialog window help here? Or is it easier to open another minos window that shows the chessboard as a matrix of characters, and use the dialog for command entry (moves) only? I noticed that the xbigforth dialog window does not suppor the unicode chess glyphs (♙♘♗♖♕♔, ♟♞♝♜♛♚). How are my chances to make them work? cheers, David -- GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40 |