Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

On that competition, you gain access to a system with gcc, vim, emacs and Java. You can't take any file with you and there's no internet access, but you can do whatever you want inside that system. You're presented a set of problems and have some ours to send the results.

I wonder if there's any way I can hack a higher level language into it? Maybe there's something useful hidden within Java default libs, or linux? Or maybe I can take a paper (not illegal) and type a compressed lightweight JS/Scheme/Clojure/Whatever interpretator and running it? Or anything really. Ideas?

share|improve this question

closed as unclear what you're asking by MichaelT, Dan Pichelman, BЈовић, gnat, ChrisF Jul 31 '13 at 9:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

You just brought back memories of the ACM programming competitions I attended at Texas A&M in the early 1970s. (I was a UT Austin student.) We could use FORTRAN or COBOL. They gave us IBM 029 key punches, and they wrote the JCL for us, since some of us came from schools that didn't teach on IBM computers. –  John R. Strohm Apr 26 '13 at 13:57
@John: I've used that JCL. I'd rather write programs in LOLCODE. –  David Thornley Apr 26 '13 at 14:17
Oracle Java comes with Rhino, a Javascript engine you can call from Java. But there are other Java VMs which lack it. You should ask for a clarification which Java implementation they actually have on the competition. –  Philipp Apr 26 '13 at 15:13
There's always machine code, how do you feel about memorizing the ELF format? :) –  Jimmy Hoffa Apr 26 '13 at 15:46

3 Answers 3

You mentionned that you have access to emacs. You can run lisp scripts with emacs --script.

share|improve this answer
Exactly what I was thinking. Although it's elisp, so a specific Lisp dialect, its library is huge. –  Florian Margaine Apr 26 '13 at 13:21

If you have a recent version of Vim (7.3 or later), it may have an embedded Lua interpreter.

Like emacs lisp, Lua is another good "greenspunning" language.

share|improve this answer
+1. I like elisp, but for a programming competition I would take LUA. –  kevin cline Apr 26 '13 at 15:24

Some versions of some Java SDKs include a JavaScript engine. However, that is a non-standard addition to the SDK, not part of the JRE, Java SE, Java EE or any other specification.

In particular, if the code you submit is run using the JRE, not the JDK, then you won't have access to it.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.