Hacker News new | ask | show | jobs
by lifthrasiir 1352 days ago
Here it is:

    a='print("""class q{public static void main(String[]a){System.out.println("a=#;a[35.chr]=39.chr+a.gsub(34.chr,92.chr*3+34.chr)+39.chr;puts a");}}""")';a[35.chr]=39.chr+a.gsub(34.chr,92.chr*3+34.chr)+39.chr;puts a
Run with `ruby q.rb | python - > q.java && javac q.java && java q`. Pretty sure that you can shorten this, I didn't take much time to do that.