To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 287
286  |  288
Subject: 
Re: Thought on pbForth
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Wed, 19 Apr 2000 19:12:30 GMT
Reply-To: 
sjm@judgement.com+SayNoToSpam+
Viewed: 
1450 times
  
I am new to this group so please forgive this
reply to an old thread.

I've been doing embedded realtime software for
over 20 years. A small amount of that has been
using FORTH. The question is what does FORTH add
to robotics software development? To answer
this you have to understand what is different
about FORTH. I will ignore the syntax and gramar
issues and speak about implementation.

1) FORTH is interactive. This means that you can
easily fiddle around. You can run a single
subroutine (word) directly from the command line
changing arguements. You can create a short word
manually. This is a tremendous enabler of
experimentation and exploration.

2) FORTH is incrementally compiled. What this means
is that you can add and change things interactively
like an interpreter with most of the performance
of a compiled language. This means that pbFORTH
is much faster than RXC bytecode and not much slower
than LegOS.

3) FORTH is small. FORTH lives well in a small RAM
footprint.

I think these are excellent featires for a language
that runs in a toy.

When I develop in FORTH my development process is
quite different than in C. I create lots of little
words as tools. I write and test them interactively
and then add them to my standard download. I build
more complex words from simple working ones. I generally
learn a lot in the process because I try things that
I wouldn't write a new C program for. This process
is particularly good when I don't really understand
what I am doing except for a general long term goal.
pbFORTH shares this interactive characteristic with
the standard scripting languages, i.e. Tcl/Python/Perl
etc. but you will never find those languages running
on the RCX. pbFORTH is like a fast scripting language
that runs in a small footprint.

If you are anxious about downloading precompiled byte
code you probably are not writing code directly on the
RCX which means you aren't using pbFORTH's primary
strength. If you insist on the edit/compile/download/run
cycle then this language is probably not for you. I
prefer the diddle/diddle/diddle/edit/compile/download/diddle
model for learning how to match code to my robots physical
properties.

If I have a large, complex and well defined application
I will usually use C/C++. The experimentation factor
is less important in those kinds of projects although
I have prototyped in FORTH and done final implementation
in C.

The point is that the world of LEGO robotics is enriched
by having such a variety of programming environments.
Each has its strengths but pbFORTH seems to rank near
the top in terms of being pretty good at most things
and the best in terms of hands on interactive development.

The major down side of pbFORTH is the learning curve.
FORTH is a strange language if you are used to the more
common proceedural C/Pascal/Basic/FORTRAN/Tcl etc. family.
You need new and different paradigms to program well in
FORTH. If you keep trying to translate C algorithms to
FORTH you will end up hating it.

Fortunately I don't suffer the learning curve problems
as much as some. As an antique (aged) professional I love
learning new ways to program. I love acquiring new
languages. Currently I bounce between LegOS, pbFORTH and
NQC mostly on whim. I'm looking at the Dolphin smalltalk
package and the Brainstorm Logo stuff for entertainment.
Eventually I will have to settle on something my third
grader can cope with (I might write a new simpler language
on top of pbFORTH) but for now I am having fun.

What floors me is how anyone could complain about any of
these. If you don't like it be happy you have choices.
Choose the language that matches your personal needs,
abilities and habits but don't say the others are wrong
because they don't suit you. It may very well be that
the defect is in your understanding.

I hope pbFORTH has a long and glorious life. It didn't
surprise me to find it. FORTH runs everywhere. There is
a reason.



Message has 1 Reply:
  RE: Thought on pbForth
 
(...) Steve, welcome to LugNet and this group specifically. The pbForth group has been a bit sparse lately, but rest assured good things will happen soon. (...) Sounds like you've got lots of expreince with different paradigms, which is one of the (...) (24 years ago, 20-Apr-00, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  Re: Thought on pbForth
 
(...) Neither am I... but the fact is that it's not 20 years ago. My attitude is why use computers as if we are? (btw, I was programming back then... and I must confess that there are a few things I miss about programming in that era [most notably, (...) (25 years ago, 2-Jan-00, to lugnet.robotics.rcx.pbforth)

7 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR