IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Kata Two - Jim Weirich
I posted a couple of links on [link|http://lambda.weblogs.com/|LtU] that point to some stuff on your website - didn't figure you'd mind a couple nosey visitors. What I wanted to ask is if you have plans for one more KataTwo lesson to wrap things up?

Or have you gotten so frustrated with Ruby, that you've returned to your Forth roots. :-)
New Yeah baby!
Since I can't find a small enough Smalltalk, I decided to implement FORTH on my TI92+ and hope for a Smalltalk implemented in that :) I'm certain someone's done it.
-drl
New Forth primitives
Forth can be built from a set of primitives - probably what about a dozen. Then you just build your vocabulary from there. Lisp also can be built from a small number of primitives, but getting to a useful state of affairs requires a much larger library.

Don't know if it's useful, but there was a link posted on [link|http://lambda.weblogs.com/discuss/msgReader$8536?mode=topic&y=2003&m=9&d=1|bare metal Smalltalk]. Presentation was a bit flashy for my tastes, so I never got past the first few pages.
New Re: Forth primitives
Todd posted a link on PocketST, but it was 3 yrs out of date so I assume abandoned.

Also one on OOVM but I could not find anything to download.

This sounds intriguing, an IP stack on my calculator :) There is a primitive serial port so browsing is a possibility :)

Any ideas about implementing messages on something like FORTH? JW's pages had a interesting tiny implementation of OOP in FORTH.
-drl
New Three years out of date?
[link|http://www.pocketsmalltalk.com/|http://www.pocketsmalltalk.com/]

Latest news: "Feb 12 , 02 - New Pocket Smalltalk Site Complete"

The last post in the discussion group was yesterday... :-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Curious
I gotta start paying attention...thks
-drl
New Re: Kata Two - Jim Weirich
[...] What I wanted to ask is if you have plans for one more KataTwo lesson to wrap things up?

I still have one more writeup on Kata 2. I'm horribly behind, Dave has posted Kata 16 already.

The last writeup will try to use functional techniques to solve the problem. One version is dead boring (and very similar to the previously posted recursive version). The second version has some interesting features. I just need time to sit down and get some words on paper (or rather on disk).

Or have you gotten so frustrated with Ruby, that you've returned to your Forth roots. :-)

Favorite Forth definition:
    : ? @ . ;
You just can't write nice, clear code like that in Ruby!

Hmmmm ... I should run my line noise function over some Forth code to see what it gives.
--
-- Jim Weirich jweirich@one.net [link|http://onestepback.org|http://onestepback.org]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Okay, I'll bite
WTF does that do? (Says the man with no Forth experience at all.)
===

Implicitly condoning stupidity since 2001.
New Re: Okay, I'll bite
:)

Forth uses white space for delimiters. All other printable characters can be the name of a word (e.g. function or subroutine) in Forth.

Forth words generally take their arguments from an implicit data stack and return the results to that same stack. For example ...
   1 2 + .
pushed a 1 onto the stack, then pushes a 2 onto the stack. It then executes the + word which adds the top two stack entries (and removes them), then pushes the result back on. The . word will print the top number in the stack.

To define a new word, use a colon, the new word name, a list of words and a semi-colon to terminate the definition... so
   : add1-and-print   1 + . ;   ( n -- )
will add a 1 to whatever is on the stack and print the result. The net change in the stack is that it is one element shorter and the stack comment in parenthesis expresses that. A stack comment is a before and after snapshot of the top of the stack.

Variables in Forth are implemented as addresses. "variable x" will create a word named "x" that leaves its address on the stack. Use
   @    ( addr -- n )    To fetch a value\n   !    ( n addr -- )    To store a value
Ok, here's our function written out long hand ...
   : ?     ( addr -- )   \\ Define a word named ?\n     @     \\ Fetch the value stored at the given address\n     .     \\ Print the value at the top of the stack\n     ;     \\ Terminate the definition\n\n   \\ Now we can write ...\n\n   variable x     10 x !     \\ Create a variable x and store a 10 there\n   x ?                       \\ Print the value of x
That's it. : ? @ . ; defines a function that prints the value of a variable.
--
-- Jim Weirich jweirich@one.net [link|http://onestepback.org|http://onestepback.org]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Damn.. I could do that!
..for rather small values of do.

As an only-ever dabbler, I have waded through a number of Manuals. Long ago. FORTH I never got to play with, but have been aware of its afficionados since the PDP-8, Modcomp days (or near that). Natch I was unable to participate in evaluation, via ignorance.

(It also helps that your lucid explanation -alas- is not the style of the frequent manual 'writer', I think. Damn few examples within the terse-besotted scribe.)

{sigh} that I can comprehend a certain amount of the 'conflicts' expressed in these columns ie and importantly.. as Expressed in these columns: has led me to believe that - either the denizens of zIWE are atypical or, most of the outside Language Warz derive more from highly-personal pique/preference than from solid comprehension of the bloody tools: by the adversaries.


Just a comment from the unanointed-in-the blood.
..almost enough for me to imagine reading A FORTH book (!) just to see what 'Clarity' might mean in context ;-) Thanks for the sample!


Ashton
Octal seemed like such a Good Thing..
I could remember 8, but 16 --
New Forth Book Recommendations
There are a couple Forth books that really break the mold when it comes to technical manuals. I would recommend "Starting Forth" by Leo Brodie as a good introduction to the languages. Leo's style is casual and fun to read. The cutesy pictures are a bit over the top, but it works.

I also liked "Thinking Forth" by the same author. TF throws a splash of cold water on the traditional engineering approach to software development. It is a bit anti-structured, a bit anti-OO, but in a way that turns your way of thinking around. Its hard to describe. The absolute best part of the book are the captioned illustrations. Priceless.

Both books are out of print, but used copies are available on the net.
--
-- Jim Weirich jweirich@one.net [link|http://onestepback.org|http://onestepback.org]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Re: Forth Book Recommendations
Yep - and his whole point was on effective development, not just language mechanics.

There's a book by Salman, Tisserand and Toulout, very thin but deep.
-drl
New Thanks - your opinion is obv shared:
These comments at Amazon, while looking for prices (I use their links for used from small booksellers, wherever I can).
More than a FORTH text, March 28, 2003
\tReviewer: A reader from Longmont, CO United States
Thinking FORTH is as much about philosophy of problem solving and programming style as FORTH. Concepts presented in this '84 publication were light years ahead of their time. OOPs concepts, including data encapsulation, modularity and overloading are explained in simple understandable terms (although with different terminology). Emphisis is on eligance, flexibility and reusability, written in Leo Brodie's unique style. (NO YOU CAN'T HAVE MINE!) --This text refers to an out of print or unavailable edition of this title.
I'll keep eye peeled for a dog-eared version; price reflects the Worth apparently now assigned to both of these (how odd when Econ theory occasionally works..;-) besides, I Love er prescience.. "'light-years ahead' in '84"


Ashton
     Kata Two - Jim Weirich - (ChrisR) - (12)
         Yeah baby! - (deSitter) - (4)
             Forth primitives - (ChrisR) - (3)
                 Re: Forth primitives - (deSitter) - (2)
                     Three years out of date? - (admin) - (1)
                         Curious - (deSitter)
         Re: Kata Two - Jim Weirich - (JimWeirich) - (6)
             Okay, I'll bite - (drewk) - (5)
                 Re: Okay, I'll bite - (JimWeirich) - (4)
                     Damn.. I could do that! - (Ashton) - (3)
                         Forth Book Recommendations - (JimWeirich) - (2)
                             Re: Forth Book Recommendations - (deSitter)
                             Thanks - your opinion is obv shared: - (Ashton)

Here, have another hor'd'ouevre.
67 ms