News for hackers. Stuff that matters.
Re:A Ruby program that generates itself through a 128-langua... by lifthrasiir on Thursday October 06, 2022 @11:09AM (#33109200)
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.

There are no comments on this comment yet.