• Big lettering

    From Antoni Gual Via@21:1/5 to All on Sun Oct 1 02:53:42 2023
    Hello, I'm Antoni from Barcelona, just a newbie.
    Thinking how to enhance gforth's console output, i stumbled on the ASCII big lettering generator figlet, it's online here so you can reate your own texts and choose and copy/paste the lettering that fits to your program.
    https://www.askapache.com/online-tools/figlet-ascii/
    So I copied and pasted one output of figlet in my code and made a word to handle it. It does'nt clip the text if it goes out of screen.
    \ --------------------------------

    create powered 8 ,
    S" ______ _ _ ______ _ _ " 2,
    S" | ___ \ | | | | ___| | | | | " 2,
    S" | |_/ /____ _____ _ __ ___ __| | |__ _ _| |_ ___ _ __| |_| |__ " 2,
    S" | __/ _ \ \ /\ / / _ \ '__/ _ \/ _` | '_ \| | | | _/ _ \| '__| __| '_ \ " 2,
    S" | | | (_) \ V V / __/ | | __/ (_| | |_) | |_| | || (_) | | | |_| | | |" 2,
    S" \_| \___/ \_/\_/ \___|_| \___|\__,_|_.__/ \__, \_| \___/|_| \__|_| |_|" 2,
    S" __/ | " 2,
    S" |___/ " 2,


    : .logo ( x y txt -- )
    dup @ 0 do -rot 2dup i + at-xy rot dup cell + i cells 2* + 2@ type loop 2drop drop ;

    page
    4 4 powered .logo
    5 15 powered .logo
    \ ----------------------------
    hope you like it
    Antonio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to Antoni Gual Via on Mon Oct 2 11:17:41 2023
    On 1/10/2023 8:53 pm, Antoni Gual Via wrote:
    Hello, I'm Antoni from Barcelona, just a newbie.
    Thinking how to enhance gforth's console output, i stumbled on the ASCII big lettering generator figlet, it's online here so you can reate your own texts and choose and copy/paste the lettering that fits to your program.
    https://www.askapache.com/online-tools/figlet-ascii/
    So I copied and pasted one output of figlet in my code and made a word to handle it. It does'nt clip the text if it goes out of screen.

    It's also gforth-specific. A nice exercise would be to make it portable :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From goblinrieur@gmail.com@21:1/5 to All on Mon Oct 2 03:22:11 2023
    Le lundi 2 octobre 2023 à 02:17:44 UTC+2, dxf a écrit :
    On 1/10/2023 8:53 pm, Antoni Gual Via wrote:
    Hello, I'm Antoni from Barcelona, just a newbie.
    Thinking how to enhance gforth's console output, i stumbled on the ASCII big lettering generator figlet, it's online here so you can reate your own texts and choose and copy/paste the lettering that fits to your program.
    https://www.askapache.com/online-tools/figlet-ascii/
    So I copied and pasted one output of figlet in my code and made a word to handle it. It does'nt clip the text if it goes out of screen.
    It's also gforth-specific. A nice exercise would be to make it portable :)

    having also figlet an gforth you can call figlet system side
    s" figlet TITLE > /dev/shm/title.txt" system ok
    s" /dev/shm/title.txt" cr slurp-file type cr
    _____ ___ _____ _ _____
    |_ _|_ _|_ _| | | ____|
    | | | | | | | | | _|
    | | | | | | | |___| |___
    |_| |___| |_| |_____|_____|


    ok
    BUT this method is also both gforth & system dependant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to gobli...@gmail.com on Mon Oct 2 08:21:12 2023
    On Monday, October 2, 2023 at 12:22:14 PM UTC+2, gobli...@gmail.com wrote: [..]
    BUT this method is also both gforth & system dependant

    Amusing. Why is it gForth dependent (leave off /shmem/ to remove OS-dependency)?
    ___ ___ ___ ___ ___
    ___ /\ \ /\ \ /\ \ /\ \ /\__\
    /\ \ /::\ \ /::\ \ /::\ \ \:\ \ /:/ /
    \:\ \ /:/\:\ \ /:/\:\ \ /:/\:\ \ \:\ \ /:/__/
    /::\__\ /::\~\:\ \ /:/ \:\ \ /::\~\:\ \ /::\ \ /::\ \ ___
    __/:/\/__/ /:/\:\ \:\__\ /:/__/ \:\__\ /:/\:\ \:\__\ /:/\:\__\ /:/\:\ /\__\
    /\/:/ / \/__\:\ \/__/ \:\ \ /:/ / \/_|::\/:/ / /:/ \/__/ \/__\:\/:/ /
    \::/__/ \:\__\ \:\ /:/ / |:|::/ / /:/ / \::/ /
    \:\__\ \/__/ \:\/:/ / |:|\/__/ \/__/ /:/ /
    \/__/ \::/ / |:| | /:/ /
    \/__/ \|__| \/__/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to Marcel Hendrix on Tue Oct 3 10:13:33 2023
    On 3/10/2023 2:21 am, Marcel Hendrix wrote:
    On Monday, October 2, 2023 at 12:22:14 PM UTC+2, gobli...@gmail.com wrote: [..]
    BUT this method is also both gforth & system dependant

    Amusing. Why is it gForth dependent (leave off /shmem/ to remove OS-dependency)?

    Multiple persistent S" strings outside a definition.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antoni Gual Via@21:1/5 to All on Tue Oct 3 04:07:12 2023
    El dia dimarts, 3 d’octubre de 2023 a les 1:13:35 UTC+2, dxf va escriure:

    Multiple persistent S" strings outside a definition.
    This is the third time I try to answer. I could open the thread but my answers are blocked, I don't know why...

    @dxforth
    Thanks for your advice. I have found a thread at reddit that gives alternative solutions. I'll try them this week end.
    Antonio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to All on Tue Oct 3 10:14:17 2023
    On Tuesday, October 3, 2023 at 1:07:15 PM UTC+2, Antoni Gual Via wrote:
    I got a library that does banners: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/banners.4th
    You may not like the font, but it is what it is.

    If a font has a fixed with, you may select the letters by making some very large string and clip 'em. I used
    that technique with digits here (sorry: no Forth)..

    https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/apps/basic/clock.bas

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Daily Info@21:1/5 to Hans Bezemer on Wed Oct 4 22:18:44 2023
    On Tuesday, October 3, 2023 at 10:44:19 PM UTC+5:30, Hans Bezemer wrote:
    On Tuesday, October 3, 2023 at 1:07:15 PM UTC+2, Antoni Gual Via wrote:
    I got a library that does banners: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/banners.4th
    You may not like the font, but it is what it is.

    If a font has a fixed with, you may select the letters by making some very large string and clip 'em. I used
    that technique with digits here (sorry: no Forth)..

    https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/apps/basic/clock.bas

    Hans Bezemer
    https://www.quickbookintegration.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antoni Gual Via@21:1/5 to All on Wed Oct 4 23:47:34 2023
    Hello Hans
    I tried to run the banner library but it had some words specific to 4th, I will have to install it.
    No problem with Basic, I have been using VBA and VBS for the last 20 years. In fact some of the VBS entries in Rosetta Code are mine.
    I'm wrong or uBasic is programmed in Forth?
    Antoni

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doug Hoffman@21:1/5 to Hans Bezemer on Thu Oct 5 05:26:47 2023
    On Tuesday, October 3, 2023 at 1:14:19 PM UTC-4, Hans Bezemer wrote:
    I got a library that does banners: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/banners.4th
    You may not like the font, but it is what it is.

    I expect many Forths have graphics libraries that allow using any size font (and any font) one desires.
    The text is easily directed to either the screen or the printer.
    Of course this is not, and never will be, standardized.

    In MFonVFX:

    new.window TestW
    50 50 400 1700 TestW w.bounds \ gives a 16 inch wide by 3.5 inch tall window

    : drawTestW
    200 _TextSize
    c" Helvetica" get.font.number TextFont
    outline textface
    50 250 moveto
    s" poweredByForth" DrawText ; \ 15.25 inches wide by 2.25 inches high text

    TestW on.update drawTestW
    TestW add.window

    -Doug

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Antoni Gual Via on Thu Oct 5 09:19:54 2023
    On Thursday, October 5, 2023 at 8:47:37 AM UTC+2, Antoni Gual Via wrote:
    Hello Hans
    I tried to run the banner library but it had some words specific to 4th, I will have to install it.
    No, you don't. I nicked the original from F-PC (much easier to adapt). So here it is. It does the same.
    It's tested on Gforth and runs just fine.

    ---8<---
    \ BANNER.SEQ Compliments of F83X mod to sequential by Tom Zimmer

    CREATE CHAR-MATRIX \ build the character generator
    HEX ( ) 00 C, 00 C, 00 C, 00 C, 00 C, 00 C, 00 C, 00 C,
    ( !) 20 C, 20 C, 20 C, 20 C, 20 C, 00 C, 20 C, 00 C,
    ( ") 50 C, 50 C, 50 C, 00 C, 00 C, 00 C, 00 C, 00 C,
    ( #) 50 C, 50 C, F8 C, 50 C, F8 C, 50 C, 50 C, 00 C,
    ( $) 20 C, 78 C, A0 C, 70 C, 28 C, F0 C, 20 C, 00 C,
    ( %) C0 C, C8 C, 10 C, 20 C, 40 C, 98 C, 18 C, 00 C,
    ( &) 40 C, A0 C, A0 C, 40 C, A8 C, 90 C, 68 C, 00 C,
    ( ') 30 C, 30 C, 10 C, 20 C, 00 C, 00 C, 00 C, 00 C,
    ( () 20 C, 40 C, 80 C, 80 C, 80 C, 40 C, 20 C, 00 C,
    ( ) 20 C, 10 C, 08 C, 08 C, 08 C, 10 C, 20 C, 00 C,
    ( *) 20 C, a8 C, 70 C, 20 C, 70 C, a8 C, 20 C, 00 C,
    ( +) 00 C, 20 C, 20 C, 70 C, 20 C, 20 C, 00 C, 00 C,
    ( ,) 00 C, 00 C, 00 C, 30 C, 30 C, 10 C, 20 C, 00 C,
    ( -) 00 C, 00 C, 00 C, 70 C, 00 C, 00 C, 00 C, 00 C,
    ( .) 00 C, 00 C, 00 C, 00 C, 00 C, 30 C, 30 C, 00 C,
    ( /) 00 C, 08 C, 10 C, 20 C, 40 C, 80 C, 00 C, 00 C,
    ( 0) 70 C, 88 C, 98 C, A8 C, C8 C, 88 C, 70 C, 00 C,
    ( 1) 20 C, 60 C, 20 C, 20 C, 20 C, 20 C, 70 C, 00 C,
    ( 2) 70 C, 88 C, 08 C, 30 C, 40 C, 80 C, F8 C, 00 C,
    ( 3) F8 C, 10 C, 20 C, 30 C, 08 C, 88 C, 70 C, 00 C,
    ( 4) 10 C, 30 C, 50 C, 90 C, F8 C, 10 C, 10 C, 00 C,
    ( 5) F8 C, 80 C, F0 C, 08 C, 08 C, 88 C, 70 C, 00 C,
    ( 6) 38 C, 40 C, 80 C, F0 C, 88 C, 88 C, 70 C, 00 C,
    ( 7) F8 C, 08 C, 10 C, 20 C, 40 C, 40 C, 40 C, 00 C,
    ( 8) 70 C, 88 C, 88 C, 70 C, 88 C, 88 C, 70 C, 00 C,
    ( 9) 70 C, 88 C, 88 C, 78 C, 08 C, 10 C, E0 C, 00 C,
    ( :) 00 C, 60 C, 60 C, 00 C, 60 C, 60 C, 00 C, 00 C,
    ( ;) 00 C, 60 C, 60 C, 00 C, 60 C, 60 C, 40 C, 00 C,
    ( <) 10 C, 20 C, 40 C, 80 C, 40 C, 20 C, 10 C, 00 C,
    ( =) 00 C, 00 C, F8 C, 00 C, F8 C, 00 C, 00 C, 00 C,
    ( >) 40 C, 20 C, 10 C, 08 C, 10 C, 20 C, 40 C, 00 C,
    ( ?) 70 C, 88 C, 10 C, 20 C, 20 C, 00 C, 20 C, 00 C,
    ( @) 70 C, 88 C, A8 C, B8 C, B0 C, 80 C, 78 C, 00 C,
    ( A) 20 C, 70 C, 88 C, 88 C, F8 C, 88 C, 88 C, 00 C,
    ( B) F0 C, 88 C, 88 C, F0 C, 88 C, 88 C, F0 C, 00 C,
    ( C) 70 C, 88 C, 80 C, 80 C, 80 C, 88 C, 70 C, 00 C,
    ( D) F0 C, 48 C, 48 C, 48 C, 48 C, 48 C, F0 C, 00 C,
    ( E) F8 C, 80 C, 80 C, F0 C, 80 C, 80 C, F8 C, 00 C,
    ( F) F8 C, 80 C, 80 C, F0 C, 80 C, 80 C, 80 C, 00 C,
    ( G) 78 C, 80 C, 80 C, 80 C, 98 C, 88 C, 78 C, 00 C,
    ( H) 88 C, 88 C, 88 C, F8 C, 88 C, 88 C, 88 C, 00 C,
    ( I) 70 C, 20 C, 20 C, 20 C, 20 C, 20 C, 70 C, 00 C,
    ( J) 08 C, 08 C, 08 C, 08 C, 08 C, 88 C, 78 C, 00 C,
    ( K) 88 C, 90 C, A0 C, C0 C, A0 C, 90 C, 88 C, 00 C,
    ( L) 80 C, 80 C, 80 C, 80 C, 80 C, 80 C, F8 C, 00 C,
    ( M) 88 C, D8 C, A8 C, A8 C, 88 C, 88 C, 88 C, 00 C,
    ( N) 88 C, 88 C, C8 C, A8 C, 98 C, 88 C, 88 C, 00 C,
    ( O) 70 C, 88 C, 88 C, 88 C, 88 C, 88 C, 70 C, 00 C,
    ( P) F0 C, 88 C, 88 C, F0 C, 80 C, 80 C, 80 C, 00 C,
    ( Q) 70 C, 88 C, 88 C, 88 C, A8 C, 90 C, 68 C, 00 C,
    ( R) F0 C, 88 C, 88 C, F0 C, A0 C, 90 C, 88 C, 00 C,
    ( S) 70 C, 88 C, 80 C, 70 C, 08 C, 88 C, 70 C, 00 C,
    ( T) F8 C, 20 C, 20 C, 20 C, 20 C, 20 C, 20 C, 00 C,
    ( U) 88 C, 88 C, 88 C, 88 C, 88 C, 88 C, 70 C, 00 C,
    ( V) 88 C, 88 C, 88 C, 88 C, 88 C, 50 C, 20 C, 00 C,
    ( W) 88 C, 88 C, 88 C, A8 C, A8 C, D8 C, 88 C, 00 C,
    ( X) 88 C, 88 C, 50 C, 20 C, 50 C, 88 C, 88 C, 00 C,
    ( Y) 88 C, 88 C, 50 C, 20 C, 20 C, 20 C, 20 C, 00 C,
    ( Z) F8 C, 08 C, 10 C, 20 C, 40 C, 80 C, F8 C, 00 C,
    ( [) 78 C, 40 C, 40 C, 40 C, 40 C, 40 C, 78 C, 00 C,
    ( \) 00 C, 80 C, 40 C, 20 C, 10 C, 08 C, 00 C, 00 C,
    ( ]) F0 C, 10 C, 10 C, 10 C, 10 C, 10 C, F0 C, 00 C,
    ( ^) 00 C, 00 C, 20 C, 50 C, 88 C, 00 C, 00 C, 00 C,
    ( _) 00 C, 00 C, 00 C, 00 C, 00 C, 00 C, 00 C, F8 C,

    DECIMAL

    CREATE BITS ( --- a1 )
    128 C, 64 C, 32 C, 16 C, 8 C, 4 C, 2 C, 1 C,

    : BIT ( N1 --- F1 )
    BITS + C@ AND 0= 1+ ;



    : LC>UC ( c -- )
    DUP 96 128 WITHIN 32 AND - ;

    : BANNER ( a n -- )
    BOUNDS 8 0
    DO CR 2DUP
    ?DO I C@ 127 AND LC>UC 32 -
    8 * CHAR-MATRIX + J + C@
    7 0
    DO DUP I BIT
    IF [CHAR] #
    ELSE BL
    THEN EMIT
    LOOP DROP
    LOOP
    LOOP 2DROP ;

    : DEMO ( --- ) \ print demonstration message
    CR
    " WELCOME" BANNER
    " TO F-PC" BANNER
    CR
    " BANNER" BANNER
    " PROGRAM" BANNER
    " FROM F83X" BANNER ;
    DEMO

    ---8<---

    No problem with Basic, I have been using VBA and VBS for the last 20 years. In fact some of the VBS entries in Rosetta Code are mine.
    I'm wrong or uBasic is programmed in Forth?
    Yeah, it's written in 4tH. I started out with a (somewhat flawed) C framework, ironed out the bugs, made a few additions (like <, =, > and # work like operators,
    do a computed GOTO) and then added an array, a stack, an extended FOR..NEXT, functions, user defined functions, local variables, strings, files and error handling.

    In the meanwhile I've incorporated so many 4tH stuff it's practically impossible to
    backport the whole shebang back to its C roots.

    The fun part for me was that I never tried to emulate the traditional constructs. E.g.
    DO.. LOOP is essentially FOR..NEXT with a few extensions. There are no dedicated
    string variables. If you assign a string to a variable, it simply stores its address with
    an additional flag. Parameters to functions are passed using the user stack. DIM a(10)
    doesn't create a new array, it just partitions the (single) existing array. And so on.

    It makes for a very quirky language, but it's quite capable. It is, of course, limited by
    its restrictions. E.g. the Damm algorithm can be expressed surprisingly compact:
    https://www.rosettacode.org/wiki/Damm_algorithm#uBasic/4tH

    The source code is here: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/ubasic.4th

    Don't try to port it - unless you got tons of time and patience - it heavily depends
    on 4tH and it's libs.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doug Hoffman@21:1/5 to Hans Bezemer on Thu Oct 5 11:47:22 2023
    On Thursday, October 5, 2023 at 12:19:56 PM UTC-4, Hans Bezemer wrote:

    CR
    " WELCOME" BANNER
    " TO F-PC" BANNER
    CR
    " BANNER" BANNER
    " PROGRAM" BANNER
    " FROM F83X" BANNER ;

    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]
    and then it will compile and run on Gforth 0.7.3

    The unsophisticated output reminds me of when
    I was a first year student at the university (1972) and
    someone had written a Fortran program to print a
    "picture" of a centerfold. The picture was less than
    satisfactory but perhaps made for an interesting
    programming exercise for someone. :-)

    -Doug

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Doug Hoffman on Thu Oct 5 13:56:10 2023
    On Thursday, October 5, 2023 at 8:47:24 PM UTC+2, Doug Hoffman wrote:
    On Thursday, October 5, 2023 at 12:19:56 PM UTC-4, Hans Bezemer wrote:

    CR
    " WELCOME" BANNER
    " TO F-PC" BANNER
    CR
    " BANNER" BANNER
    " PROGRAM" BANNER
    " FROM F83X" BANNER ;
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]
    and then it will compile and run on Gforth 0.7.3
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726. Second conversion - thought I
    caught them all, but forgot that one. Thx, Doug!

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to Hans Bezemer on Fri Oct 6 12:35:26 2023
    On 6/10/2023 7:56 am, Hans Bezemer wrote:
    On Thursday, October 5, 2023 at 8:47:24 PM UTC+2, Doug Hoffman wrote:
    On Thursday, October 5, 2023 at 12:19:56 PM UTC-4, Hans Bezemer wrote:

    CR
    " WELCOME" BANNER
    " TO F-PC" BANNER
    CR
    " BANNER" BANNER
    " PROGRAM" BANNER
    " FROM F83X" BANNER ;
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]
    and then it will compile and run on Gforth 0.7.3
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726. Second conversion - thought I
    caught them all, but forgot that one. Thx, Doug!

    Not just pre-ANS forths that present conversion problems. Differences
    between "standard systems" has become pathological - and growing.
    Forth has what it likes to call 'a minimal standard' - which is akin
    to 'having your cake and eating it too'.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxf on Fri Oct 6 03:42:52 2023
    On Friday, October 6, 2023 at 3:35:29 AM UTC+2, dxf wrote:
    Not just pre-ANS forths that present conversion problems. Differences between "standard systems" has become pathological - and growing.
    Forth has what it likes to call 'a minimal standard' - which is akin
    to 'having your cake and eating it too'.

    Guilty as charged! Now this is one I ported WAY back - when 4tH was still lacking certain features (like C,), so nowadays I'd stay much closer to the original.

    But still - as a library I don't want any ANS Forth concessions - I want it to be
    pure 4tH. The user doesn't want or need any conversion layers because of
    source purity that will merely cost him speed and bloat.

    Sometimes I will add these layers to converted application programs for
    either compliance reasons - or because I just want to get the job done as quickly and securely as possible.

    I rarely have these considerations when writing new 4tH application programs. With libraries - sometimes. I just want a working program, most often because
    I need it (e.g. for work). Maintainability is then a much more prevalent issue than
    portability.

    So, although these choices for non-portable code are conscious and deliberate, I (and others) are still creating non-portable code.

    We also have to be aware that there are areas that lack standardization - and unjustly so. Take strings (we still can't store or retrieve them in an abstract way)
    or command line arguments. Take well-established COMUS words. That certainly doesn't help. For object orientation it's too late - that train has passed the station
    for a long time.

    Controversies don't help either. Take DO..LOOP or LOCALs. Personal preferences don't help either. I still find programs posted on c.l.f with words outside ANS, 20xx
    or COMUS - which you only find in one or two Forth compilers.

    There are lots of reasons why Forth standards fail. In some sense, it's like the
    BASICs in the 1980s. Yes, there was some common ground, but it was near impossible to make a non-trivial C64 BASIC program run on a ZX Spectrum. Gee, even porting ZX81 BASIC to ZX Spectrum BASIC required a LOT of expertise (I
    did it several times, but sometimes needed some additional assembly).

    So it's not new - and not restricted to Forth. It's just annoying at times.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Hans Bezemer on Fri Oct 6 11:24:56 2023
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot= >e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.

    Note that in recent Gforth snapshots S" WELCOME" is equivalent to
    "WELCOME", not " WELCOME".

    - 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: https://forth-standard.org/
    EuroForth 2023: https://euro.theforth.net/2023

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Fri Oct 6 13:36:56 2023
    In article <2023Oct6.132456@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot= >>e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.

    Note that in recent Gforth snapshots S" WELCOME" is equivalent to
    "WELCOME", not " WELCOME".

    I urge everybody to add normal-looking strings like "WELCOME" with
    unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.


    - anton

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat spinning. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to none albert on Fri Oct 6 07:16:26 2023
    none albert schrieb am Freitag, 6. Oktober 2023 um 13:37:00 UTC+2:
    In article <2023Oct...@mips.complang.tuwien.ac.at>,
    Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:
    Hans Bezemer <the.bee...@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
    e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.

    Note that in recent Gforth snapshots S" WELCOME" is equivalent to >"WELCOME", not " WELCOME".
    I urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.

    Using since decades:
    "STRING" with embeddable ' apostrophes, or equivalent
    'STRING' with embeddable " quotes
    (but single 'c' means char c as expected)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Anton Ertl on Fri Oct 6 11:16:51 2023
    On Friday, October 6, 2023 at 1:26:47 PM UTC+2, Anton Ertl wrote:
    Hans Bezemer <the.bee...@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
    e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.
    Note that in recent Gforth snapshots S" WELCOME" is equivalent to
    "WELCOME", not " WELCOME".

    - 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: https://forth-standard.org/
    EuroForth 2023: https://euro.theforth.net/2023
    I was looking out for errors, not (huge) superfluous spaces - so I missed that one.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to Hans Bezemer on Sat Oct 7 13:20:58 2023
    On 6/10/2023 9:42 pm, Hans Bezemer wrote:

    There are lots of reasons why Forth standards fail. In some sense, it's like the
    BASICs in the 1980s. Yes, there was some common ground, but it was near impossible to make a non-trivial C64 BASIC program run on a ZX Spectrum. Gee, even porting ZX81 BASIC to ZX Spectrum BASIC required a LOT of expertise (I did it several times, but sometimes needed some additional assembly).

    So it's not new - and not restricted to Forth. It's just annoying at times.

    I don't recall much talk of a 'Standard BASIC'. Back then folks purchased machines
    based on features - not portability. As BASIC was built-in there was an expectation
    those machine features would be supported. Commodore BASIC 2 provided on the C64
    was an enormous disappointment to users who were expecting something more comprehensive.
    Similar disappointment has run through the Forth standards. Folks felt they got less
    than what they were expecting. To add insult to injury the wording was such that it
    allowed for difference - sometimes substantial.

    If language standards came with a user-satisfaction rating, I suspect Forth's wouldn't
    do so well. In contrast I do sense support for individual forth systems - the 4tH's,
    8th's and so on. Moore said he couldn't vote on matters of truth and beauty. If one
    is looking for a standard, that's not a bad one!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to minforth@arcor.de on Sat Oct 7 12:36:47 2023
    In article <f3b587e2-982f-4726-8f22-adb22ad12a46n@googlegroups.com>,
    minforth <minforth@arcor.de> wrote:
    none albert schrieb am Freitag, 6. Oktober 2023 um 13:37:00 UTC+2:
    In article <2023Oct...@mips.complang.tuwien.ac.at>,
    Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:
    Hans Bezemer <the.bee...@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
    e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.

    Note that in recent Gforth snapshots S" WELCOME" is equivalent to
    "WELCOME", not " WELCOME".
    I urge everybody to add normal-looking strings like "WELCOME" with
    unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.

    Using since decades:
    "STRING" with embeddable ' apostrophes, or equivalent
    'STRING' with embeddable " quotes
    (but single 'c' means char c as expected)

    I adopted the convention of algol 68. The convention with then
    single, then double is silly. You still don't be able to have
    single and double quotes in the same string.
    The Forth 2012 is reasonable, but it goes for escapes.
    Almost all languages do that but then the escape conventions
    are different.
    The best way is to have a single simple string denotation like mine
    and then
    "ksjdl lk whatever ,. ,. ." $>forth2012
    "ksjdl lk whatever ,. ,. ." $>perl
    "ksjdl lk whatever ,. ,. ." $>c
    "ksjdl lk whatever ,. ,. ." $>clojure
    "ksjdl lk whatever ,. ,. ." $>chinese

    I like this better, because I can leave out conversions hat
    I don't need, probably all of them.

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat spinning. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to none albert on Sat Oct 7 04:27:53 2023
    none albert schrieb am Samstag, 7. Oktober 2023 um 12:36:51 UTC+2:
    In article <f3b587e2-982f-4726...@googlegroups.com>,
    minforth <minf...@arcor.de> wrote:
    Using since decades:
    "STRING" with embeddable ' apostrophes, or equivalent
    'STRING' with embeddable " quotes
    (but single 'c' means char c as expected)

    I adopted the convention of algol 68. The convention with then
    single, then double is silly. You still don't be able to have
    single and double quotes in the same string.

    Call it silly, but it is as simple as can be, without parsing for escape characters
    and string conversion while eliminating the escape backslash.

    But then I never had to work with strings that contained both ' and ".
    Lucky me. ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to minforth@arcor.de on Sat Oct 7 15:07:26 2023
    In article <2f9687ed-7cf8-4057-9922-9bd613e58062n@googlegroups.com>,
    minforth <minforth@arcor.de> wrote:
    none albert schrieb am Samstag, 7. Oktober 2023 um 12:36:51 UTC+2:
    In article <f3b587e2-982f-4726...@googlegroups.com>,
    minforth <minf...@arcor.de> wrote:
    Using since decades:
    "STRING" with embeddable ' apostrophes, or equivalent
    'STRING' with embeddable " quotes
    (but single 'c' means char c as expected)

    I adopted the convention of algol 68. The convention with then
    single, then double is silly. You still don't be able to have
    single and double quotes in the same string.

    Call it silly, but it is as simple as can be, without parsing for escape characters
    and string conversion while eliminating the escape backslash.

    Doubling convention is likewise simple. Parse until ". The following char should be a blank, give an error message. In the case it is a " ,
    parse until " and append.

    I don't like the triple function of ' (xt , char denotation, string denotation).
    In my own programs I use &A instead of 'A' .


    But then I never had to work with strings that contained both ' and ".
    Lucky me. ;-)

    You must admit, that you have never thought of it. That is the situation
    that makes debugging hard.

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat spinning. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to none albert on Sat Oct 7 06:46:52 2023
    On Saturday, October 7, 2023 at 3:07:30 PM UTC+2, none albert wrote:
    Call it silly, but it is as simple as can be, without parsing for escape characters
    and string conversion while eliminating the escape backslash.
    Doubling convention is likewise simple. Parse until ". The following char should be a blank, give an error message. In the case it is a " ,
    parse until " and append.
    I used that trick in my parsing library: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/parsing.4th
    If it's not followed by a blank, parse again. I use this lib quite extensively for work.
    It has served me well for many years.

    I cannot do this trick within 4tH, since the tokenizer is (in that regard)
    very simple. It can parse for a given delimiter, but that's it.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Hans Bezemer on Sat Oct 7 06:57:14 2023
    On Saturday, October 7, 2023 at 3:54:59 PM UTC+2, Hans Bezemer wrote:
    I just reported the original Tom Zimmer source and ..
    "Reported".. Meaning I did the port AGAIN. I didn't rat out the poor guy to some authority.
    Just to make that clear.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Hans Bezemer on Sat Oct 7 06:54:56 2023
    On Thursday, October 5, 2023 at 6:19:56 PM UTC+2, Hans Bezemer wrote:
    On Thursday, October 5, 2023 at 8:47:37 AM UTC+2, Antoni Gual Via wrote:
    Hello Hans
    I tried to run the banner library but it had some words specific to 4th, I will have to install it.
    No, you don't. I nicked the original from F-PC (much easier to adapt). So here it is. It does the same.
    It's tested on Gforth and runs just fine.

    I just reported the original Tom Zimmer source and this time it was much easier. I just had to cater
    for BIT (a well formed flag in 4tH is 1, not -1, but why Tom Zimmer chose that construct, I dunno.
    The routine doesn't need a 1 or 0, any set of bits will do) and convert the CREATE to OFFSET. A
    defined OFFSET does its own indexing, so adding it to the address is not required:

    : OFFSET CREATE DOES> SWAP CHARS + C@ ;

    And after that, it ran flawlessly. Since I converted this lib (must have been in the early noughties) a
    lot of features have been added to 4tH, so now conversion was much, much easier.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to All on Sat Oct 7 07:37:13 2023
    On Saturday, October 7, 2023 at 4:21:02 AM UTC+2, dxf wrote:
    Not porting? Well, yeah - not this guy. I bought quite some mags in that time and sometimes
    I found a "type in" program listing for another machine that I really wanted. I ported a whole
    slew of ZX81 programs - and even a TI/99 4a program if I remember correctly. Complete with
    the "READY - PRESS ANY KEY TO BEGIN" splash screen on startup. ;-)

    Commodore BASIC 2 provided on the C64
    was an enormous disappointment to users who were expecting something more comprehensive.
    Yeah, if I remember correctly, all sound and graphics were only available by endless
    series of POKES.

    Similar disappointment has run through the Forth standards. Folks felt they got less
    than what they were expecting. To add insult to injury the wording was such that it
    allowed for difference - sometimes substantial.
    The main failure IMHO was it wasn't a language standard. It was a SYSTEM STANDARD.
    Obviously, people couldn't imagine you could do Forth in other ways than using the
    Forth architecture. There are C interpreters, for example.

    There are words so focused on flat memory and a data dictionary that I cannot implement
    them. Then it also prescribes how a string must be laid out in memory - although C pulls
    that trick as well, agreed. So how do you expect me to comply? Even if I desperately
    wanted to?

    But it's an original point of view: "an unpopular standard". Never regarded it that way,
    but I should have - because it explains a lot. Would our world have been different if some
    standard *would* have been better thought out, cater more for all the rebels - and hence
    had become more popular?

    If language standards came with a user-satisfaction rating, I suspect Forth's wouldn't
    do so well.
    I'd give Forth-79 a 7 out of 10, Forth-83 off the scale - minus infinity and ANS-Forth a 6.
    The main benefits of ANS are IMHO word sets and the abstraction of numeric datatypes (CELLS, CHARS, FLOATS). Ignoring COMUS words and leaving essential stuff
    like retrieving and storing strings completely open was a huge error. And some wordsets
    are just plain horrors (like LOCAL and FILE).

    In contrast I do sense support for individual forth systems - the 4tH's, 8th's and so on. Moore said he couldn't vote on matters of truth and beauty. If one
    is looking for a standard, that's not a bad one!
    Well, 4tH has *some* compatibility with ANS Forth. But that's because I like to port
    stuff. Let's say it's "reluctantly compatible". ;-)

    8th is quite another beast. I like the concept, its elegance and its "workhorse" qualities
    a lot. You can see it was designed to get some serious work done quickly and reliably.
    I'm not at all surprised it has a dedicated following.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to albert on Sun Oct 8 14:07:25 2023
    On 6/10/2023 10:36 pm, albert wrote:
    In article <2023Oct6.132456@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    On Thursday, October 5, 2023 at 8:47:24=E2=80=AFPM UTC+2, Doug Hoffman wrot=
    e:
    Replace, e.,g., [ " WELCOME" ] with [ s" WELCOME" ]=20
    and then it will compile and run on Gforth 0.7.3=20
    Oops, sorry - forgot that one!

    I ran it on Gforth 0.7.9_20230726.

    Note that in recent Gforth snapshots S" WELCOME" is equivalent to
    "WELCOME", not " WELCOME".

    I urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.

    And still it would be hard to justify. Forth has managed without
    these things for so long they'd now have the appearance of a novelty.
    It's what I feel when I see 200x quoted characters.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to the.beez.speaks@gmail.com on Sun Oct 8 10:57:11 2023
    In article <e111f0c6-ff4c-48ec-9955-d7c221a41624n@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>
    If language standards came with a user-satisfaction rating, I suspect Forth's wouldn't
    do so well.
    I'd give Forth-79 a 7 out of 10, Forth-83 off the scale - minus infinity and ANS-Forth a 6.
    The main benefits of ANS are IMHO word sets and the abstraction of numeric >datatypes (CELLS, CHARS, FLOATS). Ignoring COMUS words and leaving essential stuff
    like retrieving and storing strings completely open was a huge error. And some wordsets
    are just plain horrors (like LOCAL and FILE).

    The LOCAL wordset with its reliance on control variables and a cooky
    deviation from normal Forth syntax, there I agree.
    However the FILE wordset? How can one do serious work in a programming
    language to have at least a rudimentary file access?
    Unix success is in no small part thanks to the OPEN READ/WRITE CLOSE
    model and named files. You must at least replace them.

    I deviate from ANSI inasfar not using suggested implementation routes: WORD,FIND,COUNT for strings, (LOCAL) GET-ORDER SET-ORDER CS-ROLL
    IN are not present in the ciforth kernel.
    The kernel of ciforth is much more elegant and concise, and those
    other words can be added as needed, but there is hardly any
    need to deviate from the standard. If I did there was a technical
    reason for it, not simple an aversion.
    An example are the obligatory throw codes. QUIT is the
    read-interpret-ok loop. It is quite arbitrary to add a throw code
    for that, and it boggles the mind what a reasonable catch would
    be. The THROW codes usable to write portable code among Linux
    and MS-W ? Good luck with that.
    So I decided to use error/throw codes from the OS for OS-things
    and differentiate between ciforth-errors that ANSI does not allow
    me to differentiate. Linux and MS-W have different error codes
    and I don't mess with it.

    Bezemer

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat spinning. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxf on Sun Oct 8 10:07:45 2023
    On Sunday, October 8, 2023 at 5:07:29 AM UTC+2, dxf wrote:
    I urge everybody to add normal-looking strings like "WELCOME" with unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.
    And still it would be hard to justify. Forth has managed without
    these things for so long they'd now have the appearance of a novelty.
    It's what I feel when I see 200x quoted characters.
    Neither do I. 4tH stores such strings in R/O memory - and only when
    they are called, are they copied to a circular buffer - as if "I've been here all the time, now use me like you want". https://sourceforge.net/p/forth-4th/wiki/Temporary%20strings/

    It rarely causes any problems. As a matter of fact, I tend to forget that's
    how it works - so it's quite transparent I suppose.

    In a way you can say they're stored permanently, though. S\" are only
    available in the preprocessor - expanded at runtime. It's overhead, so
    I tend not to use them.

    There are other ways to compose a string with embedded special
    characters - and 4tH also features S| Welcome| as an alternative.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxf@21:1/5 to Hans Bezemer on Mon Oct 9 15:39:19 2023
    On 9/10/2023 4:07 am, Hans Bezemer wrote:
    On Sunday, October 8, 2023 at 5:07:29 AM UTC+2, dxf wrote:
    I urge everybody to add normal-looking strings like "WELCOME" with
    unrestricted life span to their Forths. We have a million fold
    progress in storage space since Forth began.
    And still it would be hard to justify. Forth has managed without
    these things for so long they'd now have the appearance of a novelty.
    It's what I feel when I see 200x quoted characters.
    Neither do I. 4tH stores such strings in R/O memory - and only when
    they are called, are they copied to a circular buffer - as if "I've been here all the time, now use me like you want". https://sourceforge.net/p/forth-4th/wiki/Temporary%20strings/

    It rarely causes any problems. As a matter of fact, I tend to forget that's how it works - so it's quite transparent I suppose.

    In a way you can say they're stored permanently, though. S\" are only available in the preprocessor - expanded at runtime. It's overhead, so
    I tend not to use them.

    Perhaps it's the type of apps I write but I haven't had much need
    of persistent temporary strings. Should I need two there's PAD
    and even the HOLD buffer. I don't do much interactive work.

    There are other ways to compose a string with embedded special
    characters - and 4tH also features S| Welcome| as an alternative.

    Escape stuff in strings I couldn't avoid so I just built that into
    ." S" etc. I know it's not ANS compatible. Got an email from a
    user who seemed more interested in the fact I provided something.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)