Difference between revisions of "Talk:Other JVM Languages"
(→Robocode in Other Languages: current status for each languages) |
(→Robocode in Other Languages: Added a response) |
||
Line 17: | Line 17: | ||
Note that peoply has tried to use Python for Robocode before too, but experience problem. And those robot cannot run in Competition until it make official. --[[User:Nat|<span style="color:#099;">Nat</span>]] [[User talk:Nat|<span style="color:#0a5;">Pavasant</span>]] 10:35, 25 January 2010 (UTC) | Note that peoply has tried to use Python for Robocode before too, but experience problem. And those robot cannot run in Competition until it make official. --[[User:Nat|<span style="color:#099;">Nat</span>]] [[User talk:Nat|<span style="color:#0a5;">Pavasant</span>]] 10:35, 25 January 2010 (UTC) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | # I think the information is useful even if people can't enter their robots into any official leagues. Robocode gives a nice practical way to learn a new language, and this page can help people get up and running quickly. The alternative would be having people find this stuff out themselves (the clojure stuff was especially unpleasant). | ||
+ | # Scala robots run fine. I have coded a basic guess factor targeting bot (similar to the algorithm used in the [[GuessFactor Targeting Tutorial]]) in Scala which is putting my pattern matchers to shame. I have not yet encountered a feature blocked by Robocode, though I don't use structural types because they require reflection and are thus slow. | ||
+ | |||
+ | There was a time when Scala robots required specific changes to Robocode, back in the days when Robocode would only let you load classes from the CLASSPATH if they were in the java.* or robocode.* packages. That is no longer true now that Robocode seems to let you load any class you want from the CLASSPATH. —[[User:Duyn|Duyn]] 13:53, 25 January 2010 (UTC) |
Revision as of 14:53, 25 January 2010
Non-.class languages
"Support for languages which don't have a compiler will require changes to Robocode which nobody has yet volunteered to implement." I don't think this is entirely correct. Pavel has been hard at work adding support for .NET to Robocode, which I believe would add support for some other languages. Someone who knows more about it should add a note about that, though. --Voidious 16:22, 24 January 2010 (UTC)
I haven't been following his work on that front, but if his work is concentrated on loading .NET assemblies, then the comment is still valid. For non-compiled languages, you would still need some custom code for each language to load the interpreter and parse each source file to find classes which extend Robot.--Duyn 02:35, 25 January 2010 (UTC)
- No, basic ฆcala has already been implemented, as I write below. Sorry =) --Nat Pavasant 10:35, 25 January 2010 (UTC)
Robocode in Other Languages
I don't believe this page is good idea. From what I heard, many features of Scala require feature that is blocked by Robocode's Sandbox. Pavel has implemented a basic Scala Robot already (see /plugins folder in Robocode's source), but some feature of Scala require Reflection, which is blocked by Robocode's Sandbox. So he is in need of Scala wizard who can help him done this. He said that if he done this himself, it may take months, but a scala wizard could have done this in just a couple of hours. I don't know abotu Clojure, but we already have plan for Ruby (via JRuby), Python (via Jython), PHP, and Javascript (Rhino Engine).
- .NET Robocode is almost completed. I was just reqested by Pavel to do QA on it. It should be beta release soon. For those who is interested in, Pavel has created jni4net library that connect .NET CLR and JVM through JNI. Earlier he code it just for Robocode, but he and Fnl decided to separated the project for other to use it too.
- Javascript via Rhino Engine has already been basically implemented too, but the fact the Jacascript is not really powerful, it hasn't been mentioned much.
- I've requested PHP for Robocode too. Take a time search, PHP-Java bridge seems to do well.
- Python and Ruby can be implemented via Jython and JRuby, but nothing has done yet.
Note that peoply has tried to use Python for Robocode before too, but experience problem. And those robot cannot run in Competition until it make official. --Nat Pavasant 10:35, 25 January 2010 (UTC)
- I think the information is useful even if people can't enter their robots into any official leagues. Robocode gives a nice practical way to learn a new language, and this page can help people get up and running quickly. The alternative would be having people find this stuff out themselves (the clojure stuff was especially unpleasant).
- Scala robots run fine. I have coded a basic guess factor targeting bot (similar to the algorithm used in the GuessFactor Targeting Tutorial) in Scala which is putting my pattern matchers to shame. I have not yet encountered a feature blocked by Robocode, though I don't use structural types because they require reflection and are thus slow.
There was a time when Scala robots required specific changes to Robocode, back in the days when Robocode would only let you load classes from the CLASSPATH if they were in the java.* or robocode.* packages. That is no longer true now that Robocode seems to let you load any class you want from the CLASSPATH. —Duyn 13:53, 25 January 2010 (UTC)