free web hosting | free website | Web Hosting | Free Website Submission | shopping cart | php hosting
affordable web hosting | Pets | web page hosting | web hosting | website hosting | web hosting service | web hosting | best web hosting
 


Excerpt from Fun_29 (Intermediate Win32Forth programming)



 
 

Note: This works with the shareware DlgEdit program, not the Microsoft version.



Excerpt from Fun_30 (Intermediate Win32Forth programming)

This is what we get after fleshing out the Events.  If you are using Version 6.0 of Win32Forth (available here), this Egg Timer runs from a batchfile (or a PIF with a custom icon) on your desktop.  May not work on Win2K.. not sure how to fix this yet.

Fun 30


The above shows the Eggtimer.bat file on the desktop, the batch file itself opened with notepad and what the eggtimer itself looks like at the end of Unit 30.  It defaults to play "The Microsoft Sound.wav" but in Forth you can change this to anything you like as soon as you know how.  

This series is about finding out how.  :-)



Excerpt from Fun_33 (Intermediate Win32Forth programming)

=================================
This is an extremely nifty trick 
that requires more stacks in your
Forth.  We've got 'em!  ANSI does
not.  ...Yet!  :-)               
=================================


Fun_33.png

Computing Factorials In A Basic Dialect Within Forth


Let's experiment with Forth's ability to mimic other languages again.  And
we'll use Basic as the template again because it is a) very popular and b) it
has about as limited a wordset as you can get and still be a functional
language.  I'm tempted to use the Timex/Synclair dialect but for right now
let's start with features common to pretty much all Basics.

[End of excerpt]

Heh...  :-)  Forth has an assembler.  We are wondering if it should have a Basic compiler or a C compiler (or both) in addition!  Reason?  Simplify ripping code so that Forth becomes a REAL "contender" again.  There's nothing to prevent this but lack of standard utilities (standard libs) and, to an extent, a lack of imagination.  But any lack is about to dissipate!  Stay tuned!!  This is only the Intermediate section of the Fun Series.
 


There's a new rant below this one.  Pls read.

To All:  The tools used to generate these syntax are non-ANSI Win32Forth extensions.  Portability is not our problem.  It is the problem of those who don't want the tools.

Aside from having a core of standard words based on a good VM (see note about the 4 stacks) from which to derive all other functions, we should untie ourselves from the rules that govern commonality between platforms and begin getting the most out of our own.  The way to get the best of both worlds would be to adopt a standard library that allows adoption of non-standard libraries.  In any case, this lack of libraries is what has been holding Forth back -- ironically -- because is the MOST EXTENSIBLE, MOST REUSABLE language in the inhabited universe.  And it is to an extent it's strengths that are currently holding it back.
 

The New Rant:

You Are HERE .  

This is the beginning of Forth's future.  If you don't like my libraries at least rip off the librarian and start making your own.  And if they are integrated well after you have used them for a while, make your own bid at a "standard" library that will lauch us miles ahead of other programming languages.  You could do this within, what would you say it's been... a couple of months?  

Months?  

Let me explain:  Since I started this series, we now have a DLG converter and an EZ Gui builder that can be set up in a matter of MINUTES, if not seconds, depending on how fancy you want to make it.  We have words that allow compiling text copied and pasted directly from the API docs (written in C).  The API docs open to whatever word you are looking up or you can just browse it.  (See HELP/API in MoreHelp.F)

We are now working on converting/compiling Basic source code!  (We already had the QBasic strings but now we also have a preliminary example of algebraic notation for MATH functions as well.  And it's super-easy to create new functions that are guaranteed to work.

... a couple of months.  

The efficiency of development here is not because I'm a great programmer.  It's because I use the librarian, thus eliminating having to hand-write code that's already been tested -- that gets even more thoroughly tested every time it is used -- and that loads all of it's own dependencies automatically.  (...from a directory that is out of sight and out of mind until you want to look for something in it.)

Here is what I load (no duplicates!) when I type two words:

LibLoad Fun\EZGUI

> D:\PROG\WIN32FOR\Lib\fun\EZGUI.F
*> D:\PROG\WIN32FOR\Lib\Objects\CREATEWINDOWEXPLIST.F
**> D:\PROG\WIN32FOR\Lib\Objects\VIRTUALOBJECT.F
***> D:\PROG\WIN32FOR\Lib\Fun\ABORTID.F
****> D:\PROG\WIN32FOR\Lib\Fun\ISNAMEDCFA.F
***> D:\PROG\WIN32FOR\Lib\Fun\NEWTO.F
**> D:\PROG\WIN32FOR\Lib\Objects\GUITOOLS.F
***> D:\PROG\WIN32FOR\Lib\Fun\WINTOOLS.F
*> D:\PROG\WIN32FOR\Lib\Objects\WINCONTROL.F
**> D:\PROG\WIN32FOR\Lib\Objects\FORM.F
**> D:\PROG\WIN32FOR\Lib\Fun\DEFSTYLES.F
***> D:\PROG\WIN32FOR\Lib\Fun\ADDVAR.F
****> D:\PROG\WIN32FOR\Lib\Fun\PARENS.F
*****> D:\PROG\WIN32FOR\Lib\Fun\LIFOS.F
******> D:\PROG\WIN32FOR\Lib\Fun\UBETWEEN.F
******> D:\PROG\WIN32FOR\Lib\Fun\DEFERS.F
******> D:\PROG\WIN32FOR\Lib\Fun\TOLAST-LINK.F
******> D:\PROG\WIN32FOR\Lib\Fun\QENOUGH.F
*****> D:\PROG\WIN32FOR\Lib\Fun\STACKWARNING.F
****> D:\PROG\WIN32FOR\Lib\QBForth\QBSTRINGS.F
*****> D:\PROG\WIN32FOR\Lib\fun\ZSTRINGS2.F
******> D:\PROG\WIN32FOR\Lib\FUN\ZSTRINGS1.F
*****> D:\PROG\WIN32FOR\Lib\fun\NEWSTRINGS.F
*****> D:\PROG\WIN32FOR\Lib\QBForth\QBPARAMCHECK.F
***> D:\PROG\WIN32FOR\Lib\Fun\WINCALL.F
****> D:\PROG\WIN32FOR\Lib\Fun\PLIST.F
*****> D:\PROG\WIN32FOR\Lib\Fun\FLIPSTACK.F
******> D:\PROG\WIN32FOR\Lib\Fun\XCHGL.F
****> D:\PROG\WIN32FOR\Lib\Fun\DEFAULTCSTACK.F
**> D:\PROG\WIN32FOR\Lib\Objects\WNDCLASS.F
**> D:\PROG\WIN32FOR\Lib\Fun\NEXTID.F
**> D:\PROG\WIN32FOR\Lib\Fun\WINERROR.F
**> D:\PROG\WIN32FOR\Lib\Objects\EVENTS.F
***> D:\PROG\WIN32FOR\Lib\Fun\FWDLINKS.F
****> D:\PROG\WIN32FOR\Lib\Fun\FINDPREVIOUSLINK.F
***> D:\PROG\WIN32FOR\Lib\Objects\CALLBACKPLIST.F

I don't keep track of these files and how they interconnect.  The librarian (LibLoad.F) does it all.

End of lecture.  :-)

See Unit 32 to find out how to switch contexts to hyper-link (and unlink) your own libraries for your browser.  Earlier units tell how to customize the librarian's search path.