Slashdot Mirror


Forth Application Techniques

oxgoad writes "Sun Microsystems, Federal Express, the National Radio Astronomy Observatory -- what do they have in common? All have used, or are currently using, the programming language Forth in critical subsystems of their products or processes. 'What is this language Forth?' you ask. Forth has been called 'One of the best-kept secrets in the computing world.' Read on for a review of the book Forth Application Techniques authored by Elizabeth D. Rather." Forth Application Techniques author Elizabeth D. Rather pages 148 publisher Forth, Inc. rating 5 reviewer oxgoad ISBN 0966215613 summary A concise introduction to the Forth programming language.

Who & What

Elizabeth D. Rather, president of Forth, Inc., would appear to be the second Forth programmer in the universe. This distinction came about in 1971 when she was brought in at the Kitt Peak NRAO to maintain code written in a quirky language developed by Chuck Moore. Running on a DDP-116 and a H316, this code was responsible for controlling the telescope, data acquisition, and graphical display. After a few years, Moore and Rather, along with Edward K. Conklin, formed Forth, Inc. to attempt commercialization of the language.

Forth Application Techniques attempts to provide a comprehensive introduction to the language for the neophyte Forth programmer. I would say that it pretty much succeeds as such, quietly plodding away through each primitive and feature. It is written in workbook style with various sample problems for the reader to complete. You might not be a Forth coder after reading the book cover to cover; however, you will have a working knowledge of the language and should be able to walk through legacy code with a minimum of difficulty.

If I might step aside from my role as unbiased book observer for a moment, I would like to make a few comments about the state of programming languages in general. It seems that quite often we take for granted essential, but practically invisible, tradesmen such as plumbers and garbage collectors. (Fire your janitor and your web designer -- guess which one you will miss first. Guess which one will still be employable 15 years from now.) Yet, without their services, our daily quality of life would certainly fail to meet our expectations.

Likewise, Forth seems to be an invisible language. No flash, no e-commerce, and no glamour. Such is the nature of embedded systems -- even though every Federal Express delivery driver carries a Forth-based device on his belt. This appears to have resulted in a dearth of quality books dealing with Forth. Search your favorite online book retailer and note the dozens of Forth books that are no longer in print.

While Scheme is from the ivory tower and Forth might be said to be from the machine shop, they do have something in common that is a possible deterrent to the popularity of Forth. Like Scheme, you either get Forth -- or you don't. Stack-based languages leave some programmers dazed and confused. And, as with most languages, it is possible to write some truly obfuscated code. Any language that will allow you to define the number 4 as a word that places the number 3 on the stack can be a frightening weapon in the hands of the contrary.

Kudos

Forth Application Techniques can be commended on its consistency. Careful attention has been given to typefaces to distinguish interpreter output from user input. All primitives and defined words are covered in a clear and unambiguous manner. The book is spiral bound in a plastic binding, and this lay-flat binding is great when using it at your computer or while eating lunch.

Quibbles

The same lay-flat spiral binding that is such a boon when working at the computer can be somewhat of a nuisance when when attempting to hand-hold the book -- the book tends to flop about and feels very insubstantial.

While Forth Application Techniques is very complete and accurate, it is also extremely passionless. You might compare it to a biology textbook discussion of sexual reproduction with no mention of romance. There is no discussion or examples of using Forth in ways that will bring enlightenment. To be fair, in the preface it states that the purpose of the book is to support Forth classes taught at Forth, Inc. This is something that is not entirely clear when examining online retailers' display of the book.

Also of note is that there are occasional features specific to Forth Inc.'s SwiftForth product documented in the book. I would not consider this a real issue as all instances are clearly denoted with an icon. With the exception of chapter 9, which is entirely Forth Inc. specific, the readability is not affected in any way.

Crimes

Forth Application Techniques has no index. With its workbook styling, most will not consider this to be a tragedy. All the same, it would be convenient to look up primitives and defined words.

Conclusions

Should you buy this book? That depends on your desired end result. It is adequate for a quick introduction to Forth. If you are intending to write production code I believe Forth Programmer's Handbook (from the same publisher, review forthcoming) would be a better choice. If possible, I would supplement either with a used copy of Leo Brodie's Starting Forth -- an out-of-print classic.

Where I foresee this book to be a great benefit is in ordering a half-dozen copies for your programming team prior to taking on a legacy project or when considering Forth as a new development platform. The members of your team that "get it" can then enlighten the others with this invisible language.

Table of Contents

  • Preface: About This Book
  1. Introduction
  2. Simple Forth Primitives
  3. Structured Programming In Forth
  4. Data Storage
  5. Strings And Characters
  6. Number Conversion
  7. Vectored Execution
  8. Advanced Concepts
  9. Multitasking
  10. Style Recommendations
Disclosure

I received a review copy of this book from the publisher. Thus, my loyalties and opinions may be completely skewed. Caveat Lector.

Forth Application Techniques is available from Forth, Inc. and from some online merchants like Amazon. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

14 of 255 comments (clear)

  1. Early post by Anonymous Coward · · Score: -1, Offtopic

    Hehe. Hi.

    1. Re:Early post by zardie · · Score: -1, Offtopic

      Nothing like seeing a new slashdot story with no comments. Was I seeing things? Was the lack of sleep finally getting to me?

      However, my eyes decieved me once again :( I only got second post.

    2. Re:Early post by zapfie · · Score: 0, Offtopic

      Try fourth post.

      --
      slashdot!=valid HTML
  2. Go forth and click this link! by Zen+Mastuh · · Score: -1, Offtopic
    --
    "What is the sound of one belly slapping?"
  3. HEE HEE HEE HAW HAW HAW by Anonymous Coward · · Score: -1, Offtopic

    \ aaaaa nn nn aaaaa ll /
    -------\ aa aa nnn nn aa aa ll /-------
    .fuck > aaaaaaa nnnnnn aaaaaaa ll < you.
    -------/ aa aa nn nnn aa aa ll \-------
    / aa aa nn nn aa aa llllll \

    vv vv iiii eeeeee tttttt nn nn aaaaa mm mm
    .vv vv ii ee tt nnn nn aa aa mmmmmmmm
    vv vv ii eeeee tt nnnnnn aaaaaaa mm mm mm
    vvv ii ee tt nn nnn aa aa mm mm
    v iiii eeeeee tt nn nn aa aa mm mm

    fintheheadeatabagofshitandsh otyourselfintheheadeatabagofs

    yy yy uu uu 00000 ggggg aaaaa yy yy / /
    .yy yy uu uu 0 0 0 ==== gg aa aa yy yy / /
    yyy uu uu 0 0 0 gg ggg aaaaaaa yyy / /
    yy uu uu 0 0 0 ==== gg gg aa aa yy / /
    .yy uuuuu 00000 ggggg aa aa yy . .

    .

  4. Plz hlp by Zen+Mastuh · · Score: -1, Offtopic

    What is /.'s new IP? My DNS sux. Can't post on brak. k tks bye.

    --
    "What is the sound of one belly slapping?"
  5. But is it better than Fifth? by Anonymous Coward · · Score: -1, Offtopic

    I think not!

  6. MY COCK IS ENGORGED AND BLOODY by Anonymous Coward · · Score: -1, Offtopic

    \ aaaaa nn nn aaaaa ll /
    -------\ aa aa nnn nn aa aa ll /-------
    .fuck > aaaaaaa nnnnnn aaaaaaa ll < you.
    -------/ aa aa nn nnn aa aa ll \-------
    / aa aa nn nn aa aa llllll \

    vv vv iiii eeeeee tttttt nn nn aaaaa mm mm
    .vv vv ii ee tt nnn nn aa aa mmmmmmmm
    vv vv ii eeeee tt nnnnnn aaaaaaa mm mm mm
    vvv ii ee tt nn nnn aa aa mm mm
    v iiii eeeeee tt nn nn aa aa mm mm

    fintheheadeatabagofshitandsh otyourselfintheheadeatabagofs

    yy yy uu uu 00000 ggggg aaaaa yy yy / /
    .yy yy uu uu 0 0 0 ==== gg aa aa yy yy / /
    yyy uu uu 0 0 0 gg ggg aaaaaaa yyy / /
    yy uu uu 0 0 0 ==== gg gg aa aa yy / /
    .yy uuuuu 00000 ggggg aa aa yy . .

    ..!

  7. EAT THE SHIT OUT OF MY POOP by Anonymous Coward · · Score: -1, Offtopic

    \ aaaaa nn nn aaaaa ll /
    -------\ aa aa nnn nn aa aa ll /-------
    .fuck > aaaaaaa nnnnnn aaaaaaa ll < you.
    -------/ aa aa nn nnn aa aa ll \-------
    / aa aa nn nn aa aa llllll \

    vv vv iiii eeeeee tttttt nn nn aaaaa mm mm
    .vv vv ii ee tt nnn nn aa aa mmmmmmmm
    vv vv ii eeeee tt nnnnnn aaaaaaa mm mm mm
    vvv ii ee tt nn nnn aa aa mm mm
    v iiii eeeeee tt nn nn aa aa mm mm

    fintheheadeatabagofshitandsh otyourselfintheheadeatabagofs

    yy yy uu uu 00000 ggggg aaaaa yy yy / /
    .yy yy uu uu 0 0 0 ==== gg aa aa yy yy / /
    yyy uu uu 0 0 0 gg ggg aaaaaaa yyy / /
    yy uu uu 0 0 0 ==== gg gg aa aa yy / /
    .yy uuuuu 00000 ggggg aa aa yy . .

    .. ..

  8. CUMSNIFTER by Anonymous Coward · · Score: -1, Offtopic

    \ aaaaa nn nn aaaaa ll /
    -------\ aa aa nnn nn aa aa ll /-------
    .fuck > aaaaaaa nnnnnn aaaaaaa ll < you.
    -------/ aa aa nn nnn aa aa ll \-------
    / aa aa nn nn aa aa llllll \

    vv vv iiii eeeeee tttttt nn nn aaaaa mm mm
    .vv vv ii ee tt nnn nn aa aa mmmmmmmm
    vv vv ii eeeee tt nnnnnn aaaaaaa mm mm mm
    vvv ii ee tt nn nnn aa aa mm mm
    v iiii eeeeee tt nn nn aa aa mm mm

    fintheheadeatabagofshitandsh otyourselfintheheadeatabagofs

    yy yy uu uu 00000 ggggg aaaaa yy yy / /
    .yy yy uu uu 0 0 0 ==== gg aa aa yy yy / /
    yyy uu uu 0 0 0 gg ggg aaaaaaa yyy / /
    yy uu uu 0 0 0 ==== gg gg aa aa yy / /
    .yy uuuuu 00000 ggggg aa aa yy . .

    . .. .

  9. best-kept secret by jsse · · Score: -1, Offtopic

    Nope, the best-kept secret in computing world is that Microsoft is in fact Bill's nickname which was given by his former girlfriend after their first date.

  10. SUBWAY EAT FRESH by Anonymous Coward · · Score: -1, Offtopic

    I havew a problem. I am a Teen Baby and have been in hiding for quite some
    time. the problem with your website is that it does not cover enough about
    teen babies. If I were to tell my parents finayy, after almost 4 years of
    hiding,how should i do it? my parents have raised five girls before me, are
    60(mother) and 62(father), and i am afraid of hurting them Please I need
    help!!! I am desperate. please help!

    Usually the kid either feels the need to acquire diapers such as the first

    letter or has been hiding them for some time and are just miserable about having this secret lifestyle such as the second letter indicates.

    So while my ultimate dream of the parent finding me first, the route to parental understanding has clearly gone through the teenbaby in my experience so this is why I am making the adjustment to fit the need. Early on some mistakes were made in how I advised kids to deliver their message. For one thing I was naive to believe that just being 100 percent honest about your feelings would work out well. I was of that opinion because my feelings remained trapped and my teenbaby life was a nightmare. A few other mistakes were made as far as fine tuning this process, but overall the average kid doesn't have to deliver the perfect message to be rewarded by a positive reaction for sharing their problems to those that love them the most. I am yet to hear of a parent that went crazy on a kid that talked about this for the first time with them. That does not mean that the kid will get babied or diapers bought for them, though that does occur in nearly half the situations that get reported back to me. Long term success is something that is improving, since I have identified some seemingly minor yet very important mistakes in previous confessions that I will cover.

    One question I hear often is will my parent accept this? What we need to do here is determine whether understanding is even a possibility. I have learned to be careful about this part. I can tell you what to look for, but ultimately no one knows the parent better than the kid that lives with them. Warning signs that indicate that confiding this in a parent might not be a good idea are 1- EXTREMELY JUDGEMENTAL OF OTHERS---Do they talk negatively about co- workers or other family members outside your immediate family who have problems. If they just pick on one type of behavior such as drinking, but are OK with someone being gay for example then it may be OK to tell them. They may have been a victim of alcoholism and would naturally have that view. If they are widespread in being critical of everyone for everything then my advice would be to try and keep it a secret.2--ULTRA RELIGIOUS---For some reason that parent will lead you to believe this was the missing 11th commandment handed down from Moses. Of course someone who is religious and committed to understanding their child's needs will be the perfect parent to confide in. 3-PAST TRACK RECORD--If a parent has had a "My way or the highway" approach with you on other issues or "I Speak and you obey" then they have not earned the right to know what is going on with you. The typical parent is not like any of those listed above so in all other cases I advise to just come clean and be 100 percent honest.

    1. Re:SUBWAY EAT FRESH by Anonymous Coward · · Score: -1, Offtopic
      the missing 11th commandment handed down from Moses

      Actually the 7th Commandment (or 6th if you're Catholic) deals with this subject: Thou shalt not commit adultery.

      All sex outside the marriage is adultery by definition.

  11. Read this immediately by Anonymous Coward · · Score: -1, Offtopic
    This story rocks! Lots and lots of troll posts. Many mod-points being wasted. Keep it up, whoever those ACs are!

    Now for some Hamster info:

    • Syrian Hamsters, first domesticated in 1930, are native to the deserts of Syria.The hamster saga truly began when Dr. I Aharoni captured a mother hamster and her litter in Aleppo, Syria - the first Golden Hamsters found alive in nearly a century. Three survived and form the basis of all hamster stock in captivity today. A member of the rodent family, the "Golden" Hamster (Mesocricetus Auratus) is about 7 inches long when fully grown. Dwarf hamsters are native to the wilds of Mongolia. Belonging to the rodent family, the Campbell's Russian Dwarf Hamster (Phodopus sungoris campbelli) is about 8 centimeters long when fully grown. Other hamster species sometimes offered as pets include Chinese dwarf hamsters and Robrovski's dwarf hamster. Before buying a hamster, ask yourself if you really want it. If the hamster is to be a child's pet, is the child mature and responsible enough to care for and handle the hamster? A child younger than 6 cannot usually even handle a hamster properly, let alone care for it, without help from a parent. Does your lifestyle allow for a hamster? If you are frequently on vacation or work long hours, will you be able to care for it? If you have other pets, you will need to spend additional money to protect the hamster from them (see Housing). And finally, have you considered the financial outlay involved in owning a hamster? The initial cost of a hamster is little, but the cage and supplies will cost $30 or more (avg. about $50), plus about $40 a year for food, bedding, and other supplies. Also consider that the hamster may fall ill, especially as it becomes older. Can you afford the $30 to $50 cost of having necessary procedures preformed on the hamster by a veterinarian? If these questions don't pose a problem to you, then you're ready to purchase your hamster. When purchasing a hamster, try to buy from an established local breeder. While some pet shops may offer home-grown stock, most pet shop animals have been shipped long distance in poor conditions and sometimes are sick. Look in newspaper classifieds and ask at pet supply stores to find a local breeder. Also be wary of those who have had an accidental litter and are offering them free; some of these have been neglected and overcrowded and will make very poor pets. A breeder should have a clean, well-kept location and the hamsters should appear healthy. Ask about recent disease outbreaks and ask if you could see the hamstery itself (where the animals are kept). Respect that many breeders will not allow you into their hamsteries, as you may be unknowingly bringing disease with you. If you must buy from a pet shop, visit several times before making a selection and observe how all animals in the shop - not just the hamsters - are treated. Shop around and compare stores before settling on a hamster. Try to buy from a store whose hamsters have been separated by sex at four to five weeks of age. After this age, most females in the cage will be pregnant, so a male is your best bet in this case. Most pet shops and hamsteries charge about $5 to $7 for a hamster, although teddies and dwarfs may be more expensive. If you plan to breed, definitely consider purchasing show quality stock from a reputable breeder. Rare colors may cost $12 to $50, and up to $100 for extremely rare colors in some areas. Look for a hamster five to twelve weeks old. However, if you have small children (under eight years old) in your household, consider an older pet, at least five to eight months old. These hamsters can be purchased from local breeders, as most hamsteries adopt out retiring animals. An older hamster will already be tame, not jumpy like a baby. Look for a hamster with bright, clear eyes, a thick, vigorous body, and glossy fur. A dull coat, huddled posture, or apathetic behavior is a sure sign that something is wrong. If one hamster in a shop or hamstery seems sick, buy elsewhere; likely all the hamsters at that location will soon be sick.Return to Contents