Regarding my previous post, about Forth and a GUI with GUIgen, for VFX Forth... The part that's a real bummer is that you can't just approach programming modern Forth GUIs without knowing how to program the GUI toolkit in C/C++, be it using win32api or GTK.
Not that you have to, but the documentation the Forth vendors have written expect you to have previous experience with the C programming side of it.
This is one of those things that sort of put people off Forth. You want to program in Forth, but you still have to mess with C, even though you might actually hate it, but that's only because so much stuff out there just assumes you know C, that there's no way around it.
This hampers Forth in its potential to be the first programming language one learns. The entry point is actually as a second programming language. In this regard, if you look at the embedded crowd, you'll actually see that Forth is still around.
Anyways, the gist of this post is to get you up to speed with getting acquainted with the win32api. I realize this is a topic that's fallen out of fashion, but you don't care about that, do you? What you want is to get the job done, i.e., write a Forth application with a GUI.
I think these two tutorials are pretty good. The first one is more conceptual, and the second one is very detailed, with all the minutia you need.
Reliable Software's win32api tutorial
FunctionX win32api programming
PS: I just shecked SwitfForth's install, and learned that they have a pretty good manual, not as thorough as MPE's, for Windows GUI programming, but you need to install their implementation first, then look in the \doc directory.
domingo, 19 de janeiro de 2014
sábado, 18 de janeiro de 2014
A modern FORTH compiler with GUIs
This is really is a stupid post, but as I was checking out the examples in MPE Forth, I got the GUI running. It was really easy to do, all it took was changing the line for the SetMacro path, like so (it may be different for your system):
c" C:\MPE\VfxEval\Examples\Win32\GUIgen" SetMacro GUIlib
Here's the evidence:
The thing in the red square is the GUI produced, all pretty with columns and all (hey - maybe you can write a spreadsheet in Forth!) You can also see the big, thorough manual for GUIgen, and a Forth interpreter running. Although this is Windows-specific, MPE Forth also supports GTK, but the documentation isn't as complete as for GUIgen. Swift Forth also supports GUIs, and so does iForth, but I found their documentation lacking (Swift Forth, in particular, has been around for so long that they ought to have done a better job with the documentation, while iForth is a one man enterprise). I thought MPE Forth had better documentation (could be improved, though) than, say, Swift Forth. Given the fact that learning Forth is kind of a steep climb, documentation is a key factor for me. I suppose you would like to be able to use a GUI too, perhaps, as opposed to a command line application. Besides, MPE Forth is fast (actually, the correct name is VFX Forth).
So here you go, a GUI for a modern Forth. Not only are modern Forth compilers very fast and aggressive, but these modern Forth systems are way cheaper than their C/C++ counterparts (some Smalltalk systems are very cost-effective too - I just don't get it why more independent developers aren't using more of these tools - what have you got to loose?).
What can I say? I just think Forth is cool. I really got turned on to Forth when I saw a guy who had done his own CAD system in Forth! How's that for awesomeness? I had already come in contact with Forth but, as he put it, with Forth you go from very low level (e.g., assembly primitives and then a Forth layer very close to the metal) to very abstract, very high level.
See ya next time!
PS: Oh! I should mention other Forths with GUIs: Win32Forth, VisualForth (based on Win32Forth) and Gforth (this one is a GPL implementation with the dual-license loophole - I don't see the point, given the GPL constraint, the non-clear contract, and the lack of good documentation).
MPE Forth
c" C:\MPE\VfxEval\Examples\Win32\GUIgen" SetMacro GUIlib
Here's the evidence:
The thing in the red square is the GUI produced, all pretty with columns and all (hey - maybe you can write a spreadsheet in Forth!) You can also see the big, thorough manual for GUIgen, and a Forth interpreter running. Although this is Windows-specific, MPE Forth also supports GTK, but the documentation isn't as complete as for GUIgen. Swift Forth also supports GUIs, and so does iForth, but I found their documentation lacking (Swift Forth, in particular, has been around for so long that they ought to have done a better job with the documentation, while iForth is a one man enterprise). I thought MPE Forth had better documentation (could be improved, though) than, say, Swift Forth. Given the fact that learning Forth is kind of a steep climb, documentation is a key factor for me. I suppose you would like to be able to use a GUI too, perhaps, as opposed to a command line application. Besides, MPE Forth is fast (actually, the correct name is VFX Forth).
So here you go, a GUI for a modern Forth. Not only are modern Forth compilers very fast and aggressive, but these modern Forth systems are way cheaper than their C/C++ counterparts (some Smalltalk systems are very cost-effective too - I just don't get it why more independent developers aren't using more of these tools - what have you got to loose?).
What can I say? I just think Forth is cool. I really got turned on to Forth when I saw a guy who had done his own CAD system in Forth! How's that for awesomeness? I had already come in contact with Forth but, as he put it, with Forth you go from very low level (e.g., assembly primitives and then a Forth layer very close to the metal) to very abstract, very high level.
See ya next time!
PS: Oh! I should mention other Forths with GUIs: Win32Forth, VisualForth (based on Win32Forth) and Gforth (this one is a GPL implementation with the dual-license loophole - I don't see the point, given the GPL constraint, the non-clear contract, and the lack of good documentation).
MPE Forth
Assinar:
Postagens (Atom)