Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   "Java, Sun SPOT and the FIRST Robotics Competition" (http://www.chiefdelphi.com/forums/showthread.php?t=76849)

bobwrit 22-04-2009 21:51

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by virtuald (Post 852742)
You're right, obviously linux and vxWorks have different design goals. Probably would be a bit better if you were running in the kernel like we do on the cRio or if it were a realtime patched kernel, but hard to say -- I've no experience with realtime Linux.

In any case, I value the flexibility quite a bit more than I value the realtimeness. Cmon, a robot controlled by a shell script... would be pretty amusing.

A)Programming a robot with a shell script is on the same level as programming it with a perl script, in my mind.:eek: :eek: :eek:
B) We were half hoping that someone, somewhere would port lolcode to vxWorks...

virtuald 22-04-2009 22:05

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by bobwrit (Post 853960)
A)Programming a robot with a shell script is on the same level as programming it with a perl script, in my mind.:eek: :eek: :eek:

Hmm. If you could tolerate a small bit of latency, using my embedded webserver for the bot you could program it using javascript.

bobwrit 22-04-2009 22:12

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by virtuald (Post 853970)
Hmm. If you could tolerate a small bit of latency, using my embedded webserver for the bot you could program it using javascript.

In all honesty, I prefer to program in JavaScript than Perl... Also, if I wasn't programming a bot for competition, I wouldn't care about a small to medium latency.

davidalln 23-04-2009 08:53

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
I'm still holding out for Ruby on the cRIO. Although our codin' mentor respectfully disagrees (sorry, Ian :D)

EricVanWyk 23-04-2009 09:21

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by davidalln (Post 854129)
I'm still holding out for Ruby on the cRIO. Although our codin' mentor respectfully disagrees (sorry, Ian :D)

For those of us completely ignorant to the ways of Ruby: Why?

I'm interested in a "Ruby is good at A, B and C but it is bad at X, Y and Z", not in starting a flame war.

gblake 23-04-2009 13:40

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by EricVanWyk (Post 854142)
I'm interested in a "Ruby is good at A, B and C but it is bad at X, Y and Z", not in starting a flame war.

Ruby is good at starting flame wars. ;)

gwytheyrn 23-04-2009 13:53

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
It's also good for making certain teams' website people cringe.
(If you want an amusing read about ruby, go for who's poignant guide to ruby. It has pictures ^^)


(I has a var?)

davidalln 23-04-2009 16:54

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by EricVanWyk (Post 854142)
For those of us completely ignorant to the ways of Ruby: Why?

I'm interested in a "Ruby is good at A, B and C but it is bad at X, Y and Z", not in starting a flame war.

I was kidding :)

Ruby is equivalent to Python in terms that it is great at small programs, algorithms, and the such (and I like Rails), but I would never use it for a full application, let alone a robot.

Foster 23-04-2009 19:37

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Ruby is like Cobol, just with a different syntax. It's yet another programming language. The difference is in the libraries that you can use without writing them.

In a robot context there isn't a big advantage between Basic, C, Cobol, C, C++, Fortran, Java, Javascript, Perl or Ruby. You are doing basic math / geometry calcs, basic data in (joysticks) and data out (motors).

The problem you face in a Ruby (Java, Perl, etc) world is to get the programmers to use existing library code and to not reinvent the world.

Shinigami2057 23-04-2009 20:47

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
With a vxWorks JVM implementation, you could run Armed Bear Common Lisp on the compactRIO, which would be incredible. I'd love to port WPILib or something similar to Common Lisp.

bobwrit 23-04-2009 22:07

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by Foster (Post 854367)
Ruby is like Cobol, just with a different syntax. It's yet another programming language. The difference is in the libraries that you can use without writing them.

In a robot context there isn't a big advantage between Basic, C, Cobol, C, C++, Fortran, Java, Javascript, Perl or Ruby. You are doing basic math / geometry calcs, basic data in (joysticks) and data out (motors).

The problem you face in a Ruby (Java, Perl, etc) world is to get the programmers to use existing library code and to not reinvent the world.


It's not only geometry/basic math calculations, But I agree with the fact that for most robot's that's fine.

pogenwurst 24-04-2009 07:30

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Remember that there will be a Java VM on the cRIO (the Squawk VM), so in theory any language that compiles down to JVM bytecode should run on the cRIO. Think JRuby (Ruby), Jython (Python), Scala, Clojure, Groovy, etc.

That said, Squawk implements Java ME, not Java SE, which could cause some problems, as some of those language implementations may be geared towards Java SE.

virtuald 24-04-2009 08:50

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Quote:

Originally Posted by pogenwurst (Post 854502)
Remember that there will be a Java VM on the cRIO (the Squawk VM), so in theory any language that compiles down to JVM bytecode should run on the cRIO. Think JRuby (Ruby), Jython (Python), Scala, Clojure, Groovy, etc.

Remember that there is a C/C++ compiler in the development environment, so in theory any language that has a compiler/interpreter written in C/C++ should run on the cRio. Think... well, just about everything.

Quote:

That said, Squawk implements Java ME, not Java SE, which could cause some problems, as some of those language implementations may be geared towards Java SE.
That said, vxWorks only implements POSIX and the standard libraries in a semi-standard way, and Wind River doesn't come with autotools or binutils, which could cause some problems, as some of those implementations may be dependent on that.

:D

Ice Berg 25-04-2009 00:26

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Can someone who knows more about this me give a few reasons why Java would be better or worse than c++. I know that it is simpler to learn, and that many students know it from taking AP compsci (myself included), but because I don't know c++ I don't really know what negative effects switching to Java would have. Each programmer will have his or her preference, but I want to know what the major benefits and drawbacks will be using Java in place of c++.

Greg McKaskle 25-04-2009 07:58

Re: "Java, Sun SPOT and the FIRST Robotics Competition"
 
Java is a safe language, with references, but not pointers. Java does garbage collection so that you don't leak memory in the same way. Java has a simpler and more consistent syntax. Java, being a teaching language, presumably has material aimed at teaching to HS students.

On the down side, Java will run quite a bit slower. The garbage collection causes hiccups where the OS is doing something besides running your code. C++ probably has more robotics usage, so more code to borrow from.

While doing the comparisons, LV is a safe language with no pointers. LV does garbage collection upon completion, but not during execution. LV has the simplest syntax of the bunch. I expect that LV is faster than Java and slower than C++. Oh, and there is that graphics and dataflow thing.

This is my input from a thousand foot perspective. I can't say much more until it is in my hands and we can do side-by-side-by-side comparisons. Perhaps if you learn all three you can update my comparison.

Greg McKaskle


All times are GMT -5. The time now is 07:16.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi