Jeremy_Mc
10-11-2012, 11:35
Hello!
I'm hoping to get involved with FIRST again this year as a mentor after taking a few years off, but I figured in the mean time, I'd hack something out to help out everyone. :)
I just released Fresno (http://github.com/jm/fresno), a framework that does two things:
Generates project folders for Mirah-driven FRC projects and...
(eventually) offer a number of convenience classes for making writing FRC code easier
The framework is meant to make it possible to use Mirah (http://mirah.org) (a language that compiles down to Java or JVM bytecode with no runtime overhead at all) to write your controller code rather than Java or C++. Why would you want to do that you might ask? Well, here's a trivial example:
// Java
public class Excellent {
public void robotics() {
java.lang.System.out.println("ROBOTS.");
}
}
# Mirah
class Excellent
def robotics
puts "ROBOTS."
end
end
As you can see, it's a little cleaner and friendlier (partially thanks to the not-really-demoed-here type inferencing that makes is so you don't have to put type declarations all over the place where a good compiler should be able to figure it out), and adds a few new features like closures:
arr = [1,2,3,4]
arr.each do |elem|
puts elem
end
...and more (including some really nice metaprogramming features that make it easy to abstract a lot of complex logic away and some dynamic type handling).
So, if you're interested, head over to my GitHub repo page for the project (http://github.com/jm/fresno) and fork it/clone it/install it. It's still very early in its development, so the install process could be a little arduous and there are very likely looming bugs. I plan to make the install a little smoother soon, but if you're a brave early adopter, then please head over and check it out. I'm also working on a Mirah tutorial since the documentation for it is severely lacking. If you're wanting to try it out now, poke around on GitHub at the various Mirah projects for some examples.
One thing that would be a huge help: I actually don't have a cRIO board in my possession (yet? Anyone want to lend/sell me one for testing this stuff? :)), so while the code appears to build and such, I don't know if it *actually* works on the board. So if any of you get a chance to check it out and try it on a real board, let me know if it works like I think it should. :) If it breaks (or anything else), file an Issue on the GitHub repo so I can get to work on fixing it.
I'm hoping to get involved with FIRST again this year as a mentor after taking a few years off, but I figured in the mean time, I'd hack something out to help out everyone. :)
I just released Fresno (http://github.com/jm/fresno), a framework that does two things:
Generates project folders for Mirah-driven FRC projects and...
(eventually) offer a number of convenience classes for making writing FRC code easier
The framework is meant to make it possible to use Mirah (http://mirah.org) (a language that compiles down to Java or JVM bytecode with no runtime overhead at all) to write your controller code rather than Java or C++. Why would you want to do that you might ask? Well, here's a trivial example:
// Java
public class Excellent {
public void robotics() {
java.lang.System.out.println("ROBOTS.");
}
}
# Mirah
class Excellent
def robotics
puts "ROBOTS."
end
end
As you can see, it's a little cleaner and friendlier (partially thanks to the not-really-demoed-here type inferencing that makes is so you don't have to put type declarations all over the place where a good compiler should be able to figure it out), and adds a few new features like closures:
arr = [1,2,3,4]
arr.each do |elem|
puts elem
end
...and more (including some really nice metaprogramming features that make it easy to abstract a lot of complex logic away and some dynamic type handling).
So, if you're interested, head over to my GitHub repo page for the project (http://github.com/jm/fresno) and fork it/clone it/install it. It's still very early in its development, so the install process could be a little arduous and there are very likely looming bugs. I plan to make the install a little smoother soon, but if you're a brave early adopter, then please head over and check it out. I'm also working on a Mirah tutorial since the documentation for it is severely lacking. If you're wanting to try it out now, poke around on GitHub at the various Mirah projects for some examples.
One thing that would be a huge help: I actually don't have a cRIO board in my possession (yet? Anyone want to lend/sell me one for testing this stuff? :)), so while the code appears to build and such, I don't know if it *actually* works on the board. So if any of you get a chance to check it out and try it on a real board, let me know if it works like I think it should. :) If it breaks (or anything else), file an Issue on the GitHub repo so I can get to work on fixing it.