This Code Can Run in 179 Different Programming Languages

179 languages code running

Yeah okay, so I know programmers might have been stereotyped as coffee-chugging nerds who don’t do anything fun in their life, with the only excitement in their life coming from a successfully compiled program, but that’s not really accurate. Sure the feeling of watching your code compile is one that’s almost unmatchable, but that doesn’t mean programmers don’t have fun.

Case in point: A Stack Exchange thread. Yeah, so programmers have discussions, and sometimes they have fun on sites like Stack Exchange, but that’s not the point. The point is, when programmers are bored, and they get up to random stuff that piques their interest, it usually results in some really cool stuff; like this Stack Exchange thread that was all about writing code that worked on multiple languages.

The answers to the thread started with a simple Python line of code saying ‘print(1)’, and moved on to a Vim code that went ‘print(1)#i2’ — that results in a 2 being printed out in Vim, and a 1 being printed out in Python.

The answers go on and on, and programmers have used some extremely creative ways of coming up with new answers that build upon previous ones. Unbelievably, that post now has 179 answers, which means that the last answer in the thread actually runs on 179 different languages! That’s just mind-blowing.

Understanding that entire code is well beyond my extremely limited (not to mention outdated and under informed) skills in programming languages, so I’m just assuming the code is correct. After all, Stack Exchange moderators have allowed the answer to stay on the forums, so it must be correct. The point is, though, that some programmer wrote code that can properly run in 179 different languages.

comment Comments 0
Leave a Reply