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 / 25303
25302  |  25304
Subject: 
Re: Why Java for Robots
Newsgroups: 
lugnet.robotics
Date: 
Tue, 17 Jan 2006 21:48:44 GMT
Original-From: 
Juergen Stuber <juergen@SPAMLESSjstuber.net>
Viewed: 
1406 times
  
Hi Peter,

PeterBalch <PeterBalch@compuserve.com> writes:
Juergen Stuber wrote:
it has no garbage collector, e.g.,
That is the top item on my list to add to Lejos,
and on NXT it is possible :-)

Why? Full Java requires it but you're not trying to make a full Java
implementation.

there are plenty of other languages, many in research,
that sit on top of a Java VM, and the interesting ones need
garbage collection (I've been explicitly asked this for Curry :-) ).

Also, other kinds of VMs are popular with Lisp and Smalltalk
and the like.

Why can't all your data be statically allocated by the
compiler (not allocated at run-time)?

Because that limits the programming style very much.
For example, I want to pass around messages.

Sure, you'd have to tweak the language a little but so
what? You're never aiming to run the code cross-platform.

Not yet, but maybe we should start now?

No, there would have to be a JSR for a tiny real time Java first.

Let's hope it comes Real Soon.

Actually there is something called real-time Java.
Last time I looked I found it too complex for the RCX,
but for the NXT it might be feasible, though I'm not sure I like it.

But you need to be a better more disciplined programmer for C
than for Java, as it is much easier to mess things up.

Examples please. Java is better than C but how much better?

Anyone who does pointer arithmetic should be shot.

It depends what you are doing.
I'd rather say if you don't absolutely need to, don't.
If you do, be very careful not to shoot yourself in your foot.

Bounds checking should be done at compile-time.

That's not so easy, in general it is not possible.

What is a robot sitting on Mars to do if it gets an "out of memory" or
"illegal pointer value" or "array bounds exceeded" error?

Log the error and reboot.

If it happens too often boot into an emergency system and
wait for humans to clean up the mess
(similar things have happened, though it was the file system overflowing).


Jürgen

--
Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91  23D9 BED6 9A7A AF9E 68B4



Message is in Reply To:
  Why Java for Robots (was NXT and bluetooth enabled phones)
 
(...) Why? Full Java requires it but you're not trying to make a full Java implementation. Why can't all your data be statically allocated by the compiler (not allocated at run-time)? Sure, you'd have to tweak the language a little but so what? (...) (18 years ago, 17-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