top | item 33106636 (no title) mmohtasim | 3 years ago Is there any 2 or 3 language version of this? Like ruby to python to java to ruby? discuss order hn newest lifthrasiir|3 years 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.
lifthrasiir|3 years 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.
lifthrasiir|3 years ago