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 / 25387
25386  |  25388
Subject: 
Re: Why Java for Robots (was NXT and bluetooth enabled phones)
Newsgroups: 
lugnet.robotics
Date: 
Thu, 19 Jan 2006 20:52:57 GMT
Original-From: 
PeterBalch <PETERBALCH@COMPUSERVE.COMspamless>
Viewed: 
1427 times
  
Bruce

Ah ha!! There you hit it! "Hobby roboteers live back in the 1980s".

Our smallest system (JStamp+) has 512 KByte RAM and
2048 KByte flash.

Ermm. How much does a NXT have?

No doubt you think that everyone should buy one of your systems but far
more NXTs will be sold. Lookng at the posts on other robotics newsgroups, I
reckon that over 90% of home-made robots do not have more than a few K of
memory. Maybe they're all wrong and you're right.

Java requires a ludicrously huge virtual machine.
What do you consider "ludicrously huge"?

How about 512 K Byte RAM and 2048 K Byte flash ?

If you'd said 512 Byte RAM and 2048 Byte flash, I'd have been impressed.


I come to a different conclusion, here's some of my
opinion on the matter:
http://www.practicalembeddedjava.com/WhyJava.html

In J2ME/CLDC on our
aJile-based systems you can turn off GC if you want, and statically • allocate
all data.

"tagging memory" associated with each sensor and actuator.
http://www.systronix.com/appearances.html - just scroll down to the
JavaOne 2005 area.

Thanks. I'll read at those carefully

Java is a decade or two newer than C++ and a few decades newer than C. • It's
not perfect or magical, but it does incorporate more "state of the art"
thinking and technology than languages which are much older.

Can you name some of the new thinking? To me it looks like Delphi circa
1995. Maybe there's some spiffy new part of the language that I've
overlooked.

Easier than just a library of subroutines? I haven't
found it so.
You seem to confuse "GUI" design with "Object Oriented Design". Graphical • User
Interfaces are but a small subset of OO design.

I am well aware of the difference.

OO design beats subroutines when you must have polymorphism and inheritance
(as is the case in GUIs which is why I chose them as an example).

But I'm unable to see any advantage elsewhere.

I've tried both development paradigms and I can find no outstanding
advantage to OO design in those domains where polymorphism and inheritance
are irrelevant.

I believe that polymorphism and inheritance are irrelevant in small robots.
Sure, you can use OO design if you want but it confers no advantage.

This is not at all the experience of my students or colleagues.

Can you give an example of the sort of project that would fit on a NXT ?

Lets compare Java-plus-objects with old-time Fortran-plus-subroutines.
Java treats the stack as dynamic.
This is simply not true in all small Java implementations.

Really? Can you point to a Java implementation that doesn't use a dynamic
stack?

The Java stack is used for local variables; this is no
different from C, is it?

True. That's why I said old-time Fortran. FortranIV did not use a stack.
All local variables were statically allocated. Recursion was illegal. (I'm
told that more modern Fortran compilers do use a stack.)

There are still people who lament the passing of DOS and the Commodore • 64.

Many long for "the good old days"

I much prefer modern computers. However, a NXT is more similar to a
Commodore 64 than to my desktop PC.

When C came into the embedded space, the assembly code naysayers (and • those
who didn't want to learn something new) were violently opposed to it, on
general principles.

Let me repeat. I am not against modern languages or modern computers. I am
not against Java.

I just don't believe that it's suitable for the vast majority of hobby
robots. Can you show me a Java to PIC compiler (with no external memory)? I
can show you plenty of C to PIC compilers.

Peter



Message has 2 Replies:
  Re: Why Java for Robots (was NXT and bluetooth enabled phones)
 
(...) Why do you say that? I thought we were discussing Java on robotics. You said Java for small robots was not practical. I presented our system as but one implementation which works. (...) That's the total *available* memory. The JVM is in (...) (18 years ago, 19-Jan-06, to lugnet.robotics)
  Re: Why Java for Robots (university vs hobbyists)
 
(...) Maybe we are at cross purposes here. You may be right, that for many hobbyists, Java is too advanced and complex, and since their needs are simpler, C is more than enough. Ease of use and low cost is probably more important than computing (...) (18 years ago, 19-Jan-06, to lugnet.robotics)

3 Messages in This Thread:


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

Custom Search

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