Skip to content

Instantly share code, notes, and snippets.

@woodie
Created January 20, 2011 18:28
Show Gist options
  • Save woodie/788331 to your computer and use it in GitHub Desktop.
Save woodie/788331 to your computer and use it in GitHub Desktop.
Hello Mirah
$ mirah test.mirah
Hello 1
Hello 2
Hello 3
Hello 4
Hello 5
$ mirahc --java test.mirah
// Generated from test.mirah
public class Test extends java.lang.Object {
public static void main(java.lang.String[] argv) {
int __xform_tmp_1 = 0;
int __xform_tmp_2 = 0;
int i = 0;
__xform_tmp_1 = 1;
__xform_tmp_2 = 5;
label1:
while ((__xform_tmp_1 <= __xform_tmp_2)) {
i = __xform_tmp_1;
label2:
{
java.io.PrintStream temp$3 = java.lang.System.out;
temp$3.println("Hello " + i);
}
__xform_tmp_1 = (__xform_tmp_1 + 1);
}
}
}
1.upto(5) { |i| puts "Hello #{i}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment