To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 4786
4785  |  4787
Subject: 
Re: Something else is needed, I think...
Newsgroups: 
lugnet.robotics
Date: 
Mon, 3 May 1999 21:11:39 GMT
Viewed: 
1251 times
  
Ralph Hempel wrote:

If we are going to the trouble of new bytecode, then we need a new compiler. If
we design a new compiler, then what language will it be? Yes, we could use C as
the base and compile to pcode which is essentially what NQC does if I'm not
mistaken. That is, NQC takes a known programming paradigm (C) and transforms
it to a sequence of bytecodes compatible with another known paradigm (the RCX)

C may be the best choice for a base language to start with simply because its well
known.  Quite frankly, if the bytecode is written reasonably well, different compilers
for different base languages should be very feasible - compilers based on languages like
Pascal, or even Basic.

The difficulty is that we will be doing a LOT of work, and someone has to
write the new compiler (Dave) AND the firmware (Kekoa? since you volunteered)

I, for one, am not afraid of doing a little (or even a LOT) of work for something that I
genuinely enjoy... and I'm one of the lazier people that I know!  :)

I hate to drone on  about pbFORTH, but I went to quite a bit of work to get
it working as well as it is. It needs some cleaning up, sure, but the more
requests I get the more likely I'll do it...

In my opinion, the most important thing that pbFORTH needs right now is some good
documentation on how to A) get it into the RCX, and B) how to use it once its there.

The thing that I like about NQC and RCXcc is that they are both self-contained solutions
to programming on the RCX, they are reasonably compact, they are easy to learn, and easy
to use. LegOS fails in at least one of these respects in that it requires that one
happen to have an H8 cross-compiler (granted, one is freely available, but it's still
technically external).  LegOS packages which include such a cross compiler may gain the
the term self-contained, but at a considerable loss in compactness (a fully functional
H8 cross-compiling system takes up a fair wack of hard drive space).

pbFORTH IS a bytecode compiler. You throw source code at it through the IR port
and the RCX "interprets" it into efficient bytecode that is later executed. You
can interact directly via the keyboard, query variables, dump memory, etc. Once
the pbFORTH firmware is loaded, you can test and refine code as needed. You can
use ANY pc that will run NQC - Win95/98, Linux, Mac. The execution speed is
closer to raw C than NQC interpreted bytecodes.

This brings up a point... why make the RCX interpret the source code into efficient
bytecode?  Instead, why not compile the code on your own machine to bytecode and
download the bytecode directly?  Certainly that would be a more compact and efficient
solution on the RCX end of things, and would provide for the potential to enhance the
user interface of the compiler end of things with, say, a gui front end, a source code
editor with syntax highlighting, etc.

pbForth may be a really cool solution for people who can hook up the IR port to a dumb
terminal, but I don't see it being a terribly user-friendly and self-contained
programming solution for the RCX at the present time, which is why I originally
commented that I believe something else is needed.

Mark



Message has 2 Replies:
  RE: Something else is needed, I think...
 
(...) Do NOT underestimate the amount of work we are talking about. I took a working version of hFORTH for the PC and ported a few machine specific definitions and rewrote the IO drivers and debugged and tested using GNU tools, and I have 80 hours (...) (26 years ago, 3-May-99, to lugnet.robotics)
  RE: Something else is needed, I think...
 
Maybe we could write a program that compiles c source code into forth :) just joking Joel Shafer joel@connect.net -- Did you check the web site first?: (URL) (26 years ago, 3-May-99, to lugnet.robotics)

Message is in Reply To:
  RE: Something else is needed, I think...
 
(...) If we are going to the trouble of new bytecode, then we need a new compiler. If we design a new compiler, then what language will it be? Yes, we could use C as the base and compile to pcode which is essentially what NQC does if I'm not (...) (26 years ago, 3-May-99, to lugnet.robotics)

67 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
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
5 hours ago
Custom Search

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