|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Ported: Javascript for 2010
After a solid night of hacking, I've managed to port Mozilla's Rhino Javascript Engine(http://www.mozilla.org/rhino/) over from a half baked J2ME implementation(http://sourceforge.net/projects/rhinoj2mecldc/) to the 2010 FRC Java system--squawk VM etc.
I'll post the code shortly, but some notable features Running the rhino js engine allows you direct access to Java libraries and classes as well as Javascript code. Javascript is fully interpreted in rhino(if someone wants to work on a JIT compiled V8 implementation, let me know ), but any Java calls will have equal performance to a normal java setup because they go straight to the JVM. My implementation of rhino utilizes a socket on the cRIO, allowing users an interactive console with the cRIO as code is executed. What does this mean for FRC? Well to put this in perspective-- Using this system, you can write as much of your code as you please in javascript(the benefits and conveniences of which are many) and still utilize the robot control libraries that are part of the new WPILibJ. Using this system you can have an interactive console to your robot, and have code interpreted on the fly--that's right, no deploy, no compile. [If you are nuts, you can replace your driverstation joysticks with a keyboard and a pair of competent coders, and drive your robot with code ]You can easily toy with code as it runs on the robot. You can teach and learn javascript with your team members, which is in many ways friendlier than Java while maintaining an un-weird syntax. And much more... |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [BB]Award Changes for 2010 | yodameister | General Forum | 15 | 06-01-2010 00:22 |
| New technology for 2010? | Flyin' Axe | Technical Discussion | 8 | 05-04-2009 15:39 |
| JavaScript Code for automatic Resize??/ | Compnerd | Website Design/Showcase | 6 | 01-03-2007 12:41 |
| Help: Looking for javascript countdown script | Compnerd | Website Design/Showcase | 3 | 24-02-2007 23:44 |