• Re: GUI applications in Forth

    From anthk@21:1/5 to albert@spenarnc.xs4all.nl on Mon Apr 21 08:03:58 2025
    On 2024-11-14, albert@spenarnc.xs4all.nl <albert@spenarnc.xs4all.nl> wrote:
    In article <nnd$3c0c3351$6aedb124@c86788d02a0bb1ba>, <albert@spenarnc.xs4all.nl> wrote:
    In article <9ac1809f3eb79231c22e45fb7e4dcc68@www.novabbs.com>,
    minforth <minforth@gmx.net> wrote:
    External GTK GUI builder tool with embedded Forth
    to handle callback functions: >>>https://www.forth.org/svfig/kk/01-2018-Harbold.pdf

    There is also Minos ... (never used it)

    This is another tool. Also your remarks hangs in the air.
    This is usenet. An answer is useless unless the question is
    known.

    An anecdote. In the 80's there was a Dutch initiative basicode to
    distribute application on cassette tape. We made a Forth cassette tape
    and we couldn't find applications to fill it, only tools.
    To make it at least moderately interesting, Kees Moerman ported
    a basic game that required not too much graphics, four in a row.

    The sparsity of Forth applications is note worthy. Everybody
    is building tools, or argue whether (bye) is worth standardizing,
    adding "recognizers" to Forth's.

    The words of prof Ting comes to mind, th 4 characters that end
    "foot step in an empty valley".

    Groetjes Albert

    Now you can Sokoban with the original.txt levels (or
    the ones from cgames at Unix/POSIX), a Tetris clone
    and a Mastermind just fine.

    As for the UI, Tk (from TCL) procedural widget building seems
    ideal for Forth.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to anthk on Mon Apr 21 10:45:53 2025
    On Mon, 21 Apr 2025 8:03:58 +0000, anthk wrote:
    [..]
    As for the UI, Tk (from TCL) procedural widget building seems
    ideal for Forth.

    I thought the same 20 years ago. At that time (?) it was difficult
    to serve the messageloop of Tcl/Tk (even more difficult than the
    Windows messagepump). The second problem was that I didn't want
    to learn Tcl/Tk to let the GUI do something useful that was
    *not* an example already.

    Now iForth has CALLBACKs and the OSs have better multi-thread
    support, the former problem may have been solved, the latter
    one probably not.

    I have to say that GUIs are really overrated, at least for
    what I want to do. However, they do have functionality that
    can be handy (like printing anything in whatever format,
    graphically manipulating schematics and such).

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to mhx on Mon Apr 21 13:16:08 2025
    In article <a748c425baca6b75483ac310bfa3dc41@www.novabbs.com>,
    mhx <mhx@iae.nl> wrote:
    On Mon, 21 Apr 2025 8:03:58 +0000, anthk wrote:
    [..]
    As for the UI, Tk (from TCL) procedural widget building seems
    ideal for Forth.

    I thought the same 20 years ago. At that time (?) it was difficult
    to serve the messageloop of Tcl/Tk (even more difficult than the
    Windows messagepump). The second problem was that I didn't want
    to learn Tcl/Tk to let the GUI do something useful that was
    *not* an example already.

    Now iForth has CALLBACKs and the OSs have better multi-thread
    support, the former problem may have been solved, the latter
    one probably not.

    I have to say that GUIs are really overrated, at least for
    what I want to do. However, they do have functionality that
    can be handy (like printing anything in whatever format,
    graphically manipulating schematics and such).

    As far as static graphics is concerned I print opcode sheets
    with postscript. It is useful, that I can print opcodes in a
    a convenient order (much like AT-XY), and have multiple opcode
    in the same position. That generates the postdscipt code in a
    separate file, however. A pipe/socket solution is more useful.

    -marcel

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to anthk on Wed Apr 23 17:22:47 2025
    On Mon, 21 Apr 2025 08:03:58 -0000 (UTC)
    anthk <anthk@openbsd.home> wrote:

    On 2024-11-14, albert@spenarnc.xs4all.nl <albert@spenarnc.xs4all.nl> wrote:
    In article <nnd$3c0c3351$6aedb124@c86788d02a0bb1ba>, <albert@spenarnc.xs4all.nl> wrote:
    In article <9ac1809f3eb79231c22e45fb7e4dcc68@www.novabbs.com>,
    minforth <minforth@gmx.net> wrote:
    External GTK GUI builder tool with embedded Forth
    to handle callback functions: >>>https://www.forth.org/svfig/kk/01-2018-Harbold.pdf

    There is also Minos ... (never used it)

    This is another tool. Also your remarks hangs in the air.
    This is usenet. An answer is useless unless the question is
    known.

    An anecdote. In the 80's there was a Dutch initiative basicode to distribute application on cassette tape. We made a Forth cassette tape
    and we couldn't find applications to fill it, only tools.
    To make it at least moderately interesting, Kees Moerman ported
    a basic game that required not too much graphics, four in a row.

    The sparsity of Forth applications is note worthy. Everybody
    is building tools, or argue whether (bye) is worth standardizing,
    adding "recognizers" to Forth's.

    The words of prof Ting comes to mind, th 4 characters that end
    "foot step in an empty valley".

    Groetjes Albert

    Now you can Sokoban with the original.txt levels (or
    the ones from cgames at Unix/POSIX), a Tetris clone
    and a Mastermind just fine.


    I've seen executables (so not including the sokoban levels) of all 3 of
    these in 256 bytes of 8086 code. and 4inarow. Not really
    demonstrating a lot^w any graphics, beyond text mode.




    As for the UI, Tk (from TCL) procedural widget building seems
    ideal for Forth.


    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to LIT on Fri Apr 25 07:55:29 2025
    Yep. 8th on RPI and Linux lets you use KMSDRM on regular "console mode"
    systems so long as the appropriate libraries are loaded.

    On 23/04/2025 16:26, LIT wrote:
    Since the new computers don't have real text mode presently,
    and because Linux kernels have KMS by default - nowadays
    you can do graphics... yes, in console, no X Window needed: http://raspberrycompote.blogspot.com/2012/12/low-level-graphics-on- raspberry-pi-part_9509.html
    (no, not just on Raspberry Pi; try that on your desktop)
    And note, that ncurses offer semi-graphics capabilities.
    Depending on your needs it may be quite enough.

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to LIT on Fri Apr 25 06:43:46 2025
    On Wed, 23 Apr 2025 13:26:01 +0000, LIT wrote:

    Since the new computers don't have real text mode presently,
    and because Linux kernels have KMS by default - nowadays
    you can do graphics... yes, in console, no X Window needed: http://raspberrycompote.blogspot.com/2012/12/low-level-graphics-on-raspberry-pi-part_9509.html
    (no, not just on Raspberry Pi; try that on your desktop)
    And note, that ncurses offer semi-graphics capabilities.
    Depending on your needs it may be quite enough.

    That raspberry you quote talks about very low-level graphics hardware
    details, still far removed from drawing, e.g., a simple line or point
    with a single command. Apparently one needs to use a manager built on
    top of KMS/DRM.

    I found https://events.static.linuxfound.org/sites/events/files/slides/brezillon-drm-kms.pdf,
    but that does not promise an easy route either.

    Do you have an ncurses link for what you think is good for graphics?

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to LIT on Fri Apr 25 13:47:50 2025
    In article <ea62b2789a2845b22dd738880168e197@www.novabbs.com>,
    LIT <zbigniew2011@gmail.com> wrote:
    Since the new computers don't have real text mode presently,
    and because Linux kernels have KMS by default - nowadays
    you can do graphics... yes, in console, no X Window needed: >http://raspberrycompote.blogspot.com/2012/12/low-level-graphics-on-raspberry-pi-part_9509.html
    (no, not just on Raspberry Pi; try that on your desktop)
    And note, that ncurses offer semi-graphics capabilities.
    Depending on your needs it may be quite enough.

    Extremely useful! I tried it on a unbuntu system.
    Linux cherry 5.4.0-190-generic #210-Ubuntu SMP Fri Jul 5 17:03:38 UTC 2024
    x86_64 x86_64 x86_64 GNU/Linux

    Once I switch to a real terminal (ALT function key 2..6)
    I could make the screen half black half grey.

    If I imagine an interface with e.g. ci assembler disassembler, you could put
    an information deluge in screen.
    Making an interface to bitblt characters on screen, with background colors, sounds easier to interface with "drivers".
    FORE-COLOR BACK-COLOR AT-XY goes a long way.
    It could be easier to write than an interface to ncurses, which is a mere
    2 screen interface.

    The second part is capturing function keys, not too hard either.


    --

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to LIT on Sat Apr 26 15:16:22 2025
    On Sat, 26 Apr 2025 14:09:23 +0000, LIT wrote:

    Do you have an ncurses link for what you think is good for graphics?

    Also from what I see someone on YT created
    a whole series on ncurses-based semigraphics: https://www.youtube.com/watch?v=UJVfh8K-0wY
    ("Ncurses 3D render engine", channel "KayOS Code")

    Not what I hoped it would be, but it gave me a useful idea.
    Thanks!

    -marcel

    PS: See also: https://unix.stackexchange.com/questions/257064/display-images-in-console-curses

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