|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Clojure and Scala
To pass the time until kickoff, I've been writing a few utility apps for robotics using Clojure and SWT. Programs that would calculate seeding points, things like that. A thought hit me while I was working on this project: could you write the code for the robot using either Clojure or Scala? (Two new languages created on the JVM that are getting a lot of popularity.)
Not having a lot of experience with the JVM, I don't know exactly how the packaging process works with Clojure. I know that it can produce an executable jar just like Java can, and I know that there is a build dependency on the clojure libs, but does the executing JVM still require any pre-installed Clojure files? If it didn't, then how hard would it be to tell Netbeans to add the Clojure libraries to the classpath and dependency list, compile the clojure files, and send that jar to the robot? The same goes for Scala, which I've pretty much only heard of, although most of what I've heard are good things. Has anyone experimented with the form of Java on the cRio like this? |
|
#2
|
||||
|
||||
|
Re: Clojure and Scala
I don't know the implementation details for Clojure and Scala, but often languages that are implemented on top of a Java VM use advanced features like reflection***.
The Java system provided for FRC is a "Java Micro Edition" version of Java (Java ME) that doesn't support reflection. *** Reflection is an interesting feature that allows you do things like:
In Java Standard Edition (Java SE) the reflection classes are in the java.lang.reflect package. |
|
#3
|
|||
|
|||
|
Re: Clojure and Scala
As a more definitive no:
1) As Derek noted JME (Java Micro Edition) is memory constrained and does not support all the features of Java. Scripting languages are a known item that doesn't work. 2) As of last year, the cRio wasn't on the latest version of Java. (I believe it was on 1.4). Scripting language integration with Java didn't exist in 1.4 (or 5) in even full versions of Java. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Thanks to 1742 and 1209/Congrats to 2410, 935, and 1987 | vhcook | Thanks and/or Congrats | 4 | 28-03-2010 15:50 |
| Boilermaker Regional - WFFA and Volunteer Award and the Trio! | Chris Fultz | Thanks and/or Congrats | 1 | 21-03-2010 14:05 |
| Congratulations and Thank you to Team 341, 694 and 3204! | AnibaS | Thanks and/or Congrats | 2 | 18-03-2010 07:40 |
| Thank You and Congrats to Teams 20, 2079, 195, and 1124! | Chris is me | Thanks and/or Congrats | 12 | 16-03-2010 09:16 |