Difference between revisions of "User talk:Jdev/Questions"
Skilgannon (talk | contribs) (not really fair) |
(reply) |
||
Line 37: | Line 37: | ||
I think it was generally agreed that using interpreted languages to bypass the codesize utility isn't exactly fair, so although you can put your bot in the rumble to see where it would score, it would be better if you didn't leave it there, because based on the amount of code you have, it probably isn't a nanobot anyways. Look at [[White Whale]] and [[Talk:White Whale]] for more discussion on this =) It's quite cool that there is an included script engine in Java, I didn't even know about it =) --[[User:Skilgannon|Skilgannon]] 17:19, 11 November 2009 (UTC) | I think it was generally agreed that using interpreted languages to bypass the codesize utility isn't exactly fair, so although you can put your bot in the rumble to see where it would score, it would be better if you didn't leave it there, because based on the amount of code you have, it probably isn't a nanobot anyways. Look at [[White Whale]] and [[Talk:White Whale]] for more discussion on this =) It's quite cool that there is an included script engine in Java, I didn't even know about it =) --[[User:Skilgannon|Skilgannon]] 17:19, 11 November 2009 (UTC) | ||
+ | |||
+ | Why i so honest?=) | ||
+ | I glad, that i give something new in java=) there're also interpreters for php python, as i know. And i'm sure that there're also engines for other languages. --[[User:Jdev|Jdev]] 17:28, 11 November 2009 (UTC) |
Revision as of 18:28, 11 November 2009
- RhinoScriptEngine - it's fair play or not?
I find out today, that there're embed script engine may be used, to reduce codesize. Example:
package lxx.test.js; import robocode.AdvancedRobot; import com.sun.script.javascript.RhinoScriptEngine; import javax.script.ScriptException; import javax.script.ScriptContext; import javax.script.SimpleScriptContext; /**sure * User: jdev * Date: 11.11.2009 */ public class JSTest extends AdvancedRobot { public void run() { RhinoScriptEngine rse = new RhinoScriptEngine(); try { ScriptContext ctx = new SimpleScriptContext(); rse.eval("var a = 100;", ctx); Double i = (Double) ctx.getAttribute("a"); ahead(i); } catch (ScriptException e) { e.printStackTrace(); } } }
so i can rewrite most part of my code on js and only call it it nanobot. but i don't sure, that it is fair. What do you think about it? --Jdev 16:37, 11 November 2009 (UTC)
I think it was generally agreed that using interpreted languages to bypass the codesize utility isn't exactly fair, so although you can put your bot in the rumble to see where it would score, it would be better if you didn't leave it there, because based on the amount of code you have, it probably isn't a nanobot anyways. Look at White Whale and Talk:White Whale for more discussion on this =) It's quite cool that there is an included script engine in Java, I didn't even know about it =) --Skilgannon 17:19, 11 November 2009 (UTC)
Why i so honest?=) I glad, that i give something new in java=) there're also interpreters for php python, as i know. And i'm sure that there're also engines for other languages. --Jdev 17:28, 11 November 2009 (UTC)