Subject:
|
Re: NXT and bluetooth enabled phones
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 17 Jan 2006 07:51:01 GMT
|
Original-From:
|
Juergen Stuber <juergen@jstuber.+stopspammers+net>
|
Viewed:
|
1913 times
|
| |
| |
Hi Peter,
Peter Gammie <peteg42@gmail.com> writes:
> On 16/01/2006, at 11:38 PM, Roger Glassey wrote:
> > In lugnet.robotics, PeterBalch <PeterBalch@compuserve.com> wrote:
> >
> > > I've avoided Java because, for Windows applications, I'm
> > > very happy with
> > > Delphi and, for robots, Java requires a ludicrously huge
> > > virtual machine.
> > Not really. Take a look at Lejos. After the VM has been
> > downloaded to the RCX, you have about 14K memory for the
> > Java byte code. Which is enough for some pretty
> > complicated stuff.
>
> Lejos is not a full JVM -
no, it can't be.
> 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 :-)
In Lejos we figured it would have eaten so much memory that
there wouldn't have been much point in managing the rest.
> and the standard library is mostly absent.
Yes. On the NXT it will be better, but don't expect too much.
> I doubt Sun would certify it as an implementation of the
> Java platform.
No, there would have to be a JSR for a tiny real time Java first.
But Simon Ritter was happy to use it in his demonstrations.
> <scratches head> OO is not the only way to do this. It is
> not clear to me that the overheads of Java (relative to say
> a brickOS / C combination) are worth it on the RCX,
If you can get the job done the overhead is irrelevant.
There are some jobs you can't do in Lejos,
then you probably need BrickOS/C.
> especially as you have to manage memory manually in both
> cases anyway.
In Lejos you can just exhaust memory
(mostly, we have an API for direct access, too),
in C most of the time you access it so directly
that you can easily mess it up.
Just look at all those buffer-overflow security holes.
> What, you think C is non-modular and generally sucks?
Of course you can write nicely modular and big programs in C.
But you need to be a better more disciplined programmer for C
than for Java, as it is much easier to mess things up.
There you also have a reason why Lejos / Java is used
a lot in education.
Cheers
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:
| | Re: NXT and bluetooth enabled phones
|
| (...) Lejos is not a full JVM - it has no garbage collector, e.g., and the standard library is mostly absent. I doubt Sun would certify it as an implementation of the Java platform. (Not to knock their technical achievement - it is quite impressive (...) (19 years ago, 17-Jan-06, to lugnet.robotics)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|