Old Forth oldie, new Forth newbie 
Author Message
 Old Forth oldie, new Forth newbie

Can someone point me to a Forth for a Win32 machine which has a
vocabulary for doing windows handling?  And also point me to any
on-line tutorials to use the Forth on a Win98 machine, and for
handling windows with the Forth.

Back in the early 80's I had a 6502-based micro, and a Forth for it.
I bought and read Starting Forth.

But that was 20 years ago, and I haven't Forthed in the meantime (or
coded much at all in the last 10 years)

I'd like to relearn Forth and write some simple apps on my Win98 PC,
while my webserver app, and my email client and my newsreader all
continue working.

Thank you in anticipation.

Cheers,
   Euan
Gawnsoft: http://www.*-*-*.com/
Symbian/Epoc wiki:   http://www.*-*-*.com/ :1122
Smalltalk links (harvested from comp.lang.smalltalk)   http://www.*-*-*.com/



Sun, 15 Jan 2006 21:18:19 GMT  
 Old Forth oldie, new Forth newbie

Quote:

> Can someone point me to a Forth for a Win32 machine which has a
> vocabulary for doing windows handling?  And also point me to any
> on-line tutorials to use the Forth on a Win98 machine, and for
> handling windows with the Forth.

> Back in the early 80's I had a 6502-based micro, and a Forth for it.
> I bought and read Starting Forth.

> But that was 20 years ago, and I haven't Forthed in the meantime (or
> coded much at all in the last 10 years)

> I'd like to relearn Forth and write some simple apps on my Win98 PC,
> while my webserver app, and my email client and my newsreader all
> continue working.

> Thank you in anticipation.

> Cheers,
>    Euan
> Gawnsoft: http://www.*-*-*.com/
> Symbian/Epoc wiki:   http://www.*-*-*.com/ :1122
> Smalltalk links (harvested from comp.lang.smalltalk)   http://www.*-*-*.com/

Win32Forth.

--
Julian V. Noble
Professor Emeritus of Physics

    ^^^^^^^^^^^^^^^^^^
http://www.*-*-*.com/ .{*filter*}ia.edu/~jvn/

   "Science knows only one commandment: contribute to science."
   -- Bertolt Brecht, "Galileo".



Sun, 15 Jan 2006 23:23:05 GMT  
 Old Forth oldie, new Forth newbie
a Forth on the Microsoft .NET : http://www.dataman.ro/dforth/


Sun, 15 Jan 2006 23:41:36 GMT  
 Old Forth oldie, new Forth newbie
BigForth / Minos ?

-gustavo

Advertencia:La informacion contenida en este mensaje es confidencial y
restringida, por lo tanto esta destinada unicamente para el uso de la
persona arriba indicada, se le notifica que esta prohibida la difusion de
este mensaje. Si ha recibido este mensaje por error, o si hay problemas en
la transmision, favor de comunicarse con el remitente. Gracias.



Sun, 15 Jan 2006 23:48:14 GMT  
 Old Forth oldie, new Forth newbie



Quote:

> > Can someone point me to a Forth for a Win32 machine which has a
> > vocabulary for doing windows handling?  And also point me to any
> > on-line tutorials to use the Forth on a Win98 machine, and for
> > handling windows with the Forth.

> > Back in the early 80's I had a 6502-based micro, and a Forth for it.
> > I bought and read Starting Forth.

> > But that was 20 years ago, and I haven't Forthed in the meantime (or
> > coded much at all in the last 10 years)

> > I'd like to relearn Forth and write some simple apps on my Win98 PC,
> > while my webserver app, and my email client and my newsreader all
> > continue working.

> > Thank you in anticipation.

> > Cheers,
> >    Euan
> > Gawnsoft: http://www.*-*-*.com/
> > Symbian/Epoc wiki:   http://www.*-*-*.com/ :1122
> > Smalltalk links (harvested from comp.lang.smalltalk)

http://www.*-*-*.com/

Quote:

> Win32Forth.

> --
> Julian V. Noble
> Professor Emeritus of Physics

>     ^^^^^^^^^^^^^^^^^^
> http://www.*-*-*.com/ .{*filter*}ia.edu/~jvn/

>    "Science knows only one commandment: contribute to science."
>    -- Bertolt Brecht, "Galileo".

Seconded (thanks Julian). Join us at groups.yahoo.com/group/win32forth; lots
of people to help, plenty of code and very active.

--
Regards
Alex McDonald



Mon, 16 Jan 2006 01:23:17 GMT  
 Old Forth oldie, new Forth newbie

Quote:

> Can someone point me to a Forth for a Win32 machine which has a
> vocabulary for doing windows handling?  And also point me to any
> on-line tutorials to use the Forth on a Win98 machine, and for
> handling windows with the Forth.

Try the free evaluation version of SwiftForth at www.forth.com.
Since SwiftForth is a commercial product designed for professional
programmers, it has outstanding performance and on-line documentation
(pdf files).  It also contains a link to download the big Win32
help system, and links to it from the command line so you can
interactively summon the description for an of the myriad
Windows calls you may need.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310-491-3356
5155 W. Rosecrans Ave. #1018  Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================



Mon, 16 Jan 2006 01:56:00 GMT  
 Old Forth oldie, new Forth newbie

Quote:

> Can someone point me to a Forth for a Win32 machine which has a
> vocabulary for doing windows handling?  And also point me to any
> on-line tutorials to use the Forth on a Win98 machine, and for
> handling windows with the Forth.

> Back in the early 80's I had a 6502-based micro, and a Forth for it.
> I bought and read Starting Forth.

> But that was 20 years ago, and I haven't Forthed in the meantime (or
> coded much at all in the last 10 years)

> I'd like to relearn Forth and write some simple apps on my Win98 PC,
> while my webserver app, and my email client and my newsreader all
> continue working.

> Thank you in anticipation.

> Cheers,
>    Euan
> Gawnsoft: http://www.gawnsoft.co.sr
> Symbian/Epoc wiki:  http://html.dnsalias.net:1122
> Smalltalk links (harvested from comp.lang.smalltalk)  http://html.dnsalias.net/gawnsoft/smalltalk

Don't overlook http://www.forth.com/Content/Products/SwForth/SFtrial.htm

Jerry
--
Engineering is the art of making what you want from things you can get.



Mon, 16 Jan 2006 02:30:14 GMT  
 Old Forth oldie, new Forth newbie
On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

Quote:

>Can someone point me to a Forth for a Win32 machine which has a
>vocabulary for doing windows handling?  And also point me to any
>on-line tutorials to use the Forth on a Win98 machine, and for
>handling windows with the Forth.

See VFX Forth for Windows on our web site, which includes
a free evaluation version.
  www.mpeltd.demon.co.uk

Quote:
>Symbian/Epoc wiki:  http://html.dnsalias.net:1122

We also have a splendid Forth for ARMs.

Stephen

--

MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads



Mon, 16 Jan 2006 00:00:58 GMT  
 Old Forth oldie, new Forth newbie
On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

less):

Quote:
>Can someone point me to a Forth for a Win32 machine which has a
>vocabulary for doing windows handling?  And also point me to any
>on-line tutorials to use the Forth on a Win98 machine, and for
>handling windows with the Forth.

>Back in the early 80's I had a 6502-based micro, and a Forth for it.
>I bought and read Starting Forth.

>But that was 20 years ago, and I haven't Forthed in the meantime (or
>coded much at all in the last 10 years)

>I'd like to relearn Forth and write some simple apps on my Win98 PC,
>while my webserver app, and my email client and my newsreader all
>continue working.

Thanks for all your responses.

I'm working my way through your suggestions in order, and I'm
discovering now that there's a chasm of learning between an early-80's
fig-ish Forth and Start Forth, and understanding even the
'straightforward' example code.

I expect I'll end up settled on the Forth with most documentation
available, or else go and learn C instead!

Cheers,
   Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki:  http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk)  http://html.dnsalias.net/gawnsoft/smalltalk



Tue, 17 Jan 2006 12:29:09 GMT  
 Old Forth oldie, new Forth newbie
Quote:

> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

> less):

> >Can someone point me to a Forth for a Win32 machine which has a
> >vocabulary for doing windows handling?  And also point me to any
> >on-line tutorials to use the Forth on a Win98 machine, and for
> >handling windows with the Forth.

> >Back in the early 80's I had a 6502-based micro, and a Forth for it.
> >I bought and read Starting Forth.

> >But that was 20 years ago, and I haven't Forthed in the meantime (or
> >coded much at all in the last 10 years)

> >I'd like to relearn Forth and write some simple apps on my Win98 PC,
> >while my webserver app, and my email client and my newsreader all
> >continue working.

> Thanks for all your responses.

> I'm working my way through your suggestions in order, and I'm
> discovering now that there's a chasm of learning between an early-80's
> fig-ish Forth and Start Forth, and understanding even the
> 'straightforward' example code.

> I expect I'll end up settled on the Forth with most documentation
> available, or else go and learn C instead!

             ^^^^^^^^^^^^^^^^^^^^^^

        No, no! That way lies madness. I had to learn C so I could post
        C code examples for my column in CiSE, and it has driven me
        up the wall. Had it not been for the kindness of strangers
        I would have had an awful time of it.

--
Julian V. Noble
Professor Emeritus of Physics

    ^^^^^^^^
http://www.*-*-*.com/ .{*filter*}ia.edu/~jvn/

   "Science knows only one commandment: contribute to science."
   -- Bertolt Brecht, "Galileo".



Wed, 18 Jan 2006 02:41:09 GMT  
 Old Forth oldie, new Forth newbie
On Fri, 01 Aug 2003 14:41:09 -0400, "Julian V. Noble"

Quote:

>> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

>> less):

>> >Can someone point me to a Forth for a Win32 machine which has a
>> >vocabulary for doing windows handling?  And also point me to any
>> >on-line tutorials to use the Forth on a Win98 machine, and for
>> >handling windows with the Forth.

>> >Back in the early 80's I had a 6502-based micro, and a Forth for it.
>> >I bought and read Starting Forth.

>> >But that was 20 years ago, and I haven't Forthed in the meantime (or
>> >coded much at all in the last 10 years)

>> >I'd like to relearn Forth and write some simple apps on my Win98 PC,
>> >while my webserver app, and my email client and my newsreader all
>> >continue working.

>> Thanks for all your responses.

>> I'm working my way through your suggestions in order, and I'm
>> discovering now that there's a chasm of learning between an early-80's
>> fig-ish Forth and Start Forth, and understanding even the
>> 'straightforward' example code.

>> I expect I'll end up settled on the Forth with most documentation
>> available, or else go and learn C instead!
>         ^^^^^^^^^^^^^^^^^^^^^^

>    No, no! That way lies madness. I had to learn C so I could post
>    C code examples for my column in CiSE, and it has driven me
>    up the wall. Had it not been for the kindness of strangers
>    I would have had an awful time of it.

Madness may lie that way, but that way also lies a lot more
documentation and effective tutorials on the web...

It's unfortunate, but true.

If I already knew what I need to know to move from 80's fig-gish Forth
and a copy of 'Starting Forth' to be able to understand even the
'hello.f' program provided as the beginner example with Win32Forth I
would write the tutorial myself.  Unfortunately I'm in a bit of a
Catch-22.  One which I know does not exist with C.

Cheers,
   Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki:  http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk)  http://html.dnsalias.net/gawnsoft/smalltalk



Wed, 18 Jan 2006 03:51:37 GMT  
 Old Forth oldie, new Forth newbie


Quote:
> On Fri, 01 Aug 2003 14:41:09 -0400, "Julian V. Noble"


> >> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

> >> less):

> >> >Can someone point me to a Forth for a Win32 machine which has a
> >> >vocabulary for doing windows handling?  And also point me to any
> >> >on-line tutorials to use the Forth on a Win98 machine, and for
> >> >handling windows with the Forth.

> >> >Back in the early 80's I had a 6502-based micro, and a Forth for it.
> >> >I bought and read Starting Forth.

> >> >But that was 20 years ago, and I haven't Forthed in the meantime (or
> >> >coded much at all in the last 10 years)

> >> >I'd like to relearn Forth and write some simple apps on my Win98 PC,
> >> >while my webserver app, and my email client and my newsreader all
> >> >continue working.

> >> Thanks for all your responses.

> >> I'm working my way through your suggestions in order, and I'm
> >> discovering now that there's a chasm of learning between an early-80's
> >> fig-ish Forth and Start Forth, and understanding even the
> >> 'straightforward' example code.

> >> I expect I'll end up settled on the Forth with most documentation
> >> available, or else go and learn C instead!
> >      ^^^^^^^^^^^^^^^^^^^^^^

> > No, no! That way lies madness. I had to learn C so I could post
> > C code examples for my column in CiSE, and it has driven me
> > up the wall. Had it not been for the kindness of strangers
> > I would have had an awful time of it.

> Madness may lie that way, but that way also lies a lot more
> documentation and effective tutorials on the web...

> It's unfortunate, but true.

> If I already knew what I need to know to move from 80's fig-gish Forth
> and a copy of 'Starting Forth' to be able to understand even the
> 'hello.f' program provided as the beginner example with Win32Forth I
> would write the tutorial myself.  Unfortunately I'm in a bit of a
> Catch-22.  One which I know does not exist with C.

Then ask for help! Which I'll assume you're doing right now. (HELLO.F may
not be the best place to start, but let's see if we can't at least decompose
it into its functional pieces. I'm assuming you have _some_ understanding of
how Windows hangs together. If not, this is not a good place to start; much
easier is WINHELLO.F which uses W32F's class/object support to simplify
coding for Windows.) My comments in (( commentary )).

 Any questions, just ask again.

--------------------------

\ hello.f
\ Andrew McKewan

\ Demo for simple "Hello World" windows app.
\ See also WINHELLO.F for a similar example using objects.

ONLY FORTH ALSO DEFINITIONS

(( Fairly standard invocation to search only the Forth dictionary, and to
define all words in it as well ))

defined cleanup nip [if] cleanup [then]

(( Conditional code. Runs the word CLEANUP if it's defined. It's not in
Win32Forth, so this doesn't do anything first time through. But if the code
is loaded again, there will be -- see the bottom ))

ANEW PROGRAM

(( Another fairly standard invocation. Ignore for now; not essential ))

: AppName    Z" HelloApp"    rel>abs ;
: Title      Z" Hello World" rel>abs ;

(( Two strings suitable for Windows, which uses null terminated. Win32Forth
needs rel>abs for addresses that are passed to Windows, as W32F is a
relative address system -- all the internal addresses are based from some
constant offset. For Windows, they need to be based from 0 -- hence the
incantation rel>abs. ))

\ Here we get to draw in the window. The counter will increment every
\ time PAINT is called.
: .HELLO  { hdc counter -- }
        counter 0 <#  S"  times" "HOLD  #S  S" Repainted " "HOLD  #>
        swap rel>abs 20 20 hdc call TextOut drop ;

(( Based on two parameters on the stack -- the hDC, or the handle to the
Windows Device Context, and a counter, we create a printable string that
says "Repainted nnnn times" ( <# has odd syntax as it's "back to front")
then calls the Windows function TextOut. This writes the string using the
hDC -- the window canvas. ))

\ the counter is stored in the window extra memory

: COUNTER!  ( n hwnd -- )  0 swap Call SetWindowLong DROP ;

(( Two bits of internal jiggery pokery. Windows handles have a word
associated with the window that's drawn on the screen. This just sets and
gets it; it's a way of maintaining the counter along with the window. ))

create ps 64 allot ( paintstruct )

\ update counter every time we repaint window
: PAINT  { hWnd \ hDC -- }
        ps rel>abs hWnd Call BeginPaint to hDC


        ps rel>abs hWnd Call EndPaint DROP ;

(( Paints the window. Standard Windows stuff. Note that the parameters to
Windows calls in W32F are reversed; the parameters are < last next to last
... second first > followed by the call. Again note rel>abs for pointers.
The syntax is a bit clunky, but translating from C doc to this becomes
second nature after a while. SwiftForth IIRC provides a more natural call
syntax and doesn't need rel>abs. ))

\ Define the window procedure
: (HELLO-WNDPROC)  { hWnd msg wParam lParam -- result }

        msg CASE

        WM_CREATE OF
                1 hWnd COUNTER!
                0 200 1 hWnd Call SetTimer drop
                ENDOF

        WM_PAINT OF
                hWnd PAINT
                ENDOF

        WM_TIMER OF
                1 0 hWnd Call InvalidateRect drop
                ENDOF

        WM_DESTROY OF
                1 hWnd Call KillTimer drop
\                TURNKEY IF  0 Call PostQuitMessage  THEN
                ENDOF

        ( DEFAULT )
                lParam wParam msg hWnd Call DefWindowProc  EXIT

        ENDCASE 0 ;

(( The windows callback message handler. Again, fairly standard stuff
translated from the C code. ))

4 callback hello-wndproc (hello-wndproc)

(( A callback. See the windows class below; Windows will call the callback
every time there's a message for this window. The callback is
(hello-wndproc), hello-wndproc is a "label" for Windows calls. 4 parameters,
matches the callback code ))

\ Create a WNDCLASS structure and register the class.
: REGISTER-CLASS  ( -- F )
        HERE
                CS_HREDRAW CS_VREDRAW or ,  ( class style )
                HELLO-WNDPROC rel>abs ,
                0 , ( class extra )
                4 , ( window extra )  ( for counter )
                AppInst ,
                IDI_APPLICATION NULL Call LoadIcon ,
                IDC_ARROW NULL       Call LoadCursor ,
                WHITE_BRUSH          Call GetStockObject ,
                NULL , ( hMenu )
                AppName ,
        DUP rel>abs Call RegisterClass
        SWAP DP ! ;

(( Fairly standard call to RegisterClass (note the callback). Because we
don't need to save the data structure for this call, there's a little cheat
here -- DP is set back to its original value after the call. (DP is the HERE
pointer). This could be omitted for clarity. ))

\ Create the window
: CREATE-HELLO-WINDOW  ( -- f )
        0                       \ creation parameters
        AppInst                 \ instance handle
        0                       \ menu
        ConHndl                 \ parent window
        200 300 100 100         \ window position ( h w y x )
        WS_OVERLAPPEDWINDOW     \ window style
        Title                   \ window title
        AppName                 \ class name
        0                       \ exended style
        Call CreateWindowEx ;

(( Does as it says on the tin. Creates the window based on the class ))

0 VALUE hWnd
: DEMO  ( -- )
        REGISTER-CLASS 0= IF CR ." register class failed " THEN
        CREATE-HELLO-WINDOW TO hWnd
        hWnd 0= ABORT" create window failed"
        1 hWnd Call ShowWindow DROP
        hWnd Call UpdateWindow DROP ;

(( Again, standard Windows stuff. Register windows class/create from
class/show and update ))

: CLEANUP  ( -- )
        hWnd Call DestroyWindow DROP
        AppInst AppName Call UnregisterClass DROP ;

(( Cleanup invoked on second load; destroys window and its class and
everything ))

CR .( Type 'DEMO' to run program )

---------------------------------

--
Regards
Alex McDonald



Wed, 18 Jan 2006 04:54:45 GMT  
 Old Forth oldie, new Forth newbie

Quote:

> On Fri, 01 Aug 2003 14:41:09 -0400, "Julian V. Noble"


> >> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

> >> less):

> >> >Can someone point me to a Forth for a Win32 machine which has a
> >> >vocabulary for doing windows handling?  And also point me to any
> >> >on-line tutorials to use the Forth on a Win98 machine, and for
> >> >handling windows with the Forth.

> >> >Back in the early 80's I had a 6502-based micro, and a Forth for it.
> >> >I bought and read Starting Forth.

> >> >But that was 20 years ago, and I haven't Forthed in the meantime (or
> >> >coded much at all in the last 10 years)

> >> >I'd like to relearn Forth and write some simple apps on my Win98 PC,
> >> >while my webserver app, and my email client and my newsreader all
> >> >continue working.

> >> Thanks for all your responses.

> >> I'm working my way through your suggestions in order, and I'm
> >> discovering now that there's a chasm of learning between an early-80's
> >> fig-ish Forth and Start Forth, and understanding even the
> >> 'straightforward' example code.

> >> I expect I'll end up settled on the Forth with most documentation
> >> available, or else go and learn C instead!
> >            ^^^^^^^^^^^^^^^^^^^^^^

> >       No, no! That way lies madness. I had to learn C so I could post
> >       C code examples for my column in CiSE, and it has driven me
> >       up the wall. Had it not been for the kindness of strangers
> >       I would have had an awful time of it.

> Madness may lie that way, but that way also lies a lot more
> documentation and effective tutorials on the web...

> It's unfortunate, but true.

> If I already knew what I need to know to move from 80's fig-gish Forth
> and a copy of 'Starting Forth' to be able to understand even the
> 'hello.f' program provided as the beginner example with Win32Forth I
> would write the tutorial myself.  Unfortunately I'm in a bit of a
> Catch-22.  One which I know does not exist with C.

> Cheers,
>    Euan
> Gawnsoft: http://www.*-*-*.com/
> Symbian/Epoc wiki:   http://www.*-*-*.com/ :1122
> Smalltalk links (harvested from comp.lang.smalltalk)   http://www.*-*-*.com/

Let me steer you to

        http://www.*-*-*.com/ .{*filter*}ia.edu/classes/551.jvn.fall01/

and especially to the HTML primer

        http://www.*-*-*.com/ .{*filter*}ia.edu/classes/551.jvn.fall01/primer.htm

also links to other primers, etc.

--
Julian V. Noble
Professor Emeritus of Physics

    ^^^^^^^^
http://www.*-*-*.com/ .{*filter*}ia.edu/~jvn/

   "Science knows only one commandment: contribute to science."
   -- Bertolt Brecht, "Galileo".



Wed, 18 Jan 2006 05:02:59 GMT  
 Old Forth oldie, new Forth newbie
On Fri, 1 Aug 2003 20:54:45 +0000 (UTC), "Alex McDonald"

Quote:


>> On Fri, 01 Aug 2003 14:41:09 -0400, "Julian V. Noble"


>> >> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

>> >> less):

>> If I already knew what I need to know to move from 80's fig-gish Forth
>> and a copy of 'Starting Forth' to be able to understand even the
>> 'hello.f' program provided as the beginner example with Win32Forth I
>> would write the tutorial myself.  Unfortunately I'm in a bit of a
>> Catch-22.  One which I know does not exist with C.

>Then ask for help! Which I'll assume you're doing right now.

Not yet - I'm still at the prior stage - going through the various
Forths suggested and comparing the levels of documentation with each
to see how large my knowledge gap is with each one.  

My plan had been to then join the mailing list you had suggested in an
earlier post Alex (and thank you for that) and start asking specific
questions, if I was sticking with Win32Forth.

Quote:
>(HELLO.F may not be the best place to start,

I find this comment quite intriguing, as taking the name of Hello.F at
face value, I expected it to be an archetypical 'Hello World'
programme.  The fact it's second in the list of example programmes on
Win32Forth's 'Don't Panic' startup.txt file tends to reinforce the
fact that it's the suggested place to start. (The first programme
listed is a file dump application, so that seemed like it would be
more involved).

Quote:
> but let's see if we can't at least decompose
>it into its functional pieces. I'm assuming you have _some_ understanding of
>how Windows hangs together. If not, this is not a good place to start; much
>easier is WINHELLO.F which uses W32F's class/object support to simplify
>coding for Windows.)

Ah - I inferred the exact opposite from startup.txt.  That winhello.f
would require me to get my head round Win32Forth's object support /in
addition/ to how to print 'Hello World'.

Quote:
> My comments in (( commentary )).
> Any questions, just ask again.

Thank you again for your help now, and your offer of future help.

Adding your comments from below to the version of hello.f supplied in
the Win32Forth distro would be an excellent step forward for
Win32Forth imo

In fact, if the results would be made use of, I'd be happy to go
through Win32Forth and painstakingly document my stumbling blocks &
the like.

After all, the more straightforward we make it for non-Forthers to
become capable users of Forth, the easier it becomes to expand the
community of Forthers.

Quote:
> commented code follows
> ...

Cheers,
   Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki:  http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk)  http://html.dnsalias.net/gawnsoft/smalltalk


Wed, 18 Jan 2006 05:31:18 GMT  
 Old Forth oldie, new Forth newbie


Quote:
> On Fri, 1 Aug 2003 20:54:45 +0000 (UTC), "Alex McDonald"



> >> On Fri, 01 Aug 2003 14:41:09 -0400, "Julian V. Noble"


> >> >> On Wed, 30 Jul 2003 14:18:19 +0100, Gawnsoft

> >> >> less):

> >> If I already knew what I need to know to move from 80's fig-gish Forth
> >> and a copy of 'Starting Forth' to be able to understand even the
> >> 'hello.f' program provided as the beginner example with Win32Forth I
> >> would write the tutorial myself.  Unfortunately I'm in a bit of a
> >> Catch-22.  One which I know does not exist with C.

> >Then ask for help! Which I'll assume you're doing right now.

> Not yet - I'm still at the prior stage - going through the various
> Forths suggested and comparing the levels of documentation with each
> to see how large my knowledge gap is with each one.

> My plan had been to then join the mailing list you had suggested in an
> earlier post Alex (and thank you for that) and start asking specific
> questions, if I was sticking with Win32Forth.

> >(HELLO.F may not be the best place to start,

> I find this comment quite intriguing, as taking the name of Hello.F at
> face value, I expected it to be an archetypical 'Hello World'
> programme.  The fact it's second in the list of example programmes on
> Win32Forth's 'Don't Panic' startup.txt file tends to reinforce the
> fact that it's the suggested place to start. (The first programme
> listed is a file dump application, so that seemed like it would be
> more involved).

Well, it's archetypal in the sense that it's a _Windows_ "Hello World"
program in Forth. An archetypal Forth "Hello World" is just too short
(around 15 bytes according to some ;)

: .HELLO S" Hello World" TYPE ;
.HELLO

The problem here may be which you need to learn first (in terms of
increasing difficulty as I saw it, coming to Forth new around 12 months
ago);

1. ANS Forth; Julian Noble's pointers are a good introduction. Others may
have their recommendations.
2. The idiosyncracies of the Forth you choose (particularly words outside
the standard like FLOAD, FSAVE in W32F)
3. MOPS/NEON OOP if you go down the W32F route.
4. Windows' stuff that's documented in C and needs "head translated" into
Forth (again, idiosyncratically as each Windows' capable Forth does it
differently, and some do it more transparently than others) and
5. Windows in the first place if that's new to you.

4 and 5 demand a passing knowledge of C, which is all I have; I can't
_write_ anything in C, but I can read the menu. So HELLO.F doesn't help with
1 if you don't have 5.

Nice to see programme spelled correctly.

Quote:

> > but let's see if we can't at least decompose
> >it into its functional pieces. I'm assuming you have _some_ understanding
of
> >how Windows hangs together. If not, this is not a good place to start;
much
> >easier is WINHELLO.F which uses W32F's class/object support to simplify
> >coding for Windows.)

> Ah - I inferred the exact opposite from startup.txt.  That winhello.f
> would require me to get my head round Win32Forth's object support /in
> addition/ to how to print 'Hello World'.

Yes, but it does make it simpler to understand in a sort of object-forthy
way. There are no message loops, no creating classes/windows, just an object
with methods. The Windows complexity is hidden, at the expense of requiring
OOP knowledge. (IMO that's only true for simple windows; more complex stuff
still demands knowledge of what Windows is doing underneath the covers.) It
may not be a good place to start either if ANS Forth is where you lack
knowledge.

Quote:

> > My comments in (( commentary )).

> > Any questions, just ask again.

> Thank you again for your help now, and your offer of future help.

> Adding your comments from below to the version of hello.f supplied in
> the Win32Forth distro would be an excellent step forward for
> Win32Forth imo

Noted, although I am a bad documenter of others' code as I tend to rewrite
their code instead.

Quote:
> In fact, if the results would be made use of, I'd be happy to go
> through Win32Forth and painstakingly document my stumbling blocks &
> the like.

> After all, the more straightforward we make it for non-Forthers to
> become capable users of Forth, the easier it becomes to expand the
> community of Forthers.

The mailing list is definitely the place to get this kind of help, at least
for W32F (http://groups.yahoo.com/group/win32forth) as we've all been
through it at one time or another.

--
Regards
Alex McDonald



Wed, 18 Jan 2006 07:50:43 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Forth For begginners and old forth versions

2. New 'old' forth user

3. Apple II Forth Users New and Old?

4. New Forth book name FORTH: ....

5. Forth on-line resources (New Forth BBs in British Columbia)

6. Getting Forth related files (was: Forth primer/teaching Forth)

7. Forth in Forth vs. Forth in assembly language

8. Forth in Forth vs Forth in assembly

9. Forth in Forth vs. Forth in assembly language

10. The Oldie-Newbie again

11. Oldie-Newbie with a couple questions

12. WTC: your old and unused FORTH mags and books

 

 
Powered by phpBB® Forum Software