Simple challenge: The code must be both valid Lisp and valid Fortran, and must print out "hello world" in both.

Note: I've sunk about 5 hours into this at this point, I'm not even sure it's possible at this point...


  • Must be in a single source file.
  • Any version of Fortran and any Lisp are allowed (specify which).
  • Smallest source code (by bytes) satisfying this wins.
  • \$\begingroup\$ Some stuff I've tried so far that might help people: continue is a no-op in Fortran. So continue; ... will just execute ... in Fortran, and just refer to a variable continue in Lisp. (since ; is a line comment in most lisps). I haven't been able to leverage this into anything useful yet though. \$\endgroup\$ Feb 26, 2020 at 23:12
  • \$\begingroup\$ @JoKing yea, you're right. \$\endgroup\$ Feb 26, 2020 at 23:25
  • 2
    \$\begingroup\$ Possible duplicate of Build a polyglot for Hello World \$\endgroup\$ Feb 27, 2020 at 1:39
  • 3
    \$\begingroup\$ Taking a pre-existing challenge and arbitrarily restricting the set of languages in which answers are valid does not make a new, non-duplicate challenge. \$\endgroup\$ Feb 27, 2020 at 1:40
  • 4
    \$\begingroup\$ If you would like a specific language answer to a question you can post a bounty on that question. \$\endgroup\$
    – Wheat Wizard
    Feb 27, 2020 at 2:26

1 Answer 1


Fortran (GFortran) -ffixed-form, 183 53+12=65 bytes

	;print*,"Hello world!"
*(print "Hello world!")

Try it online!

Common Lisp, 53 bytes

Try it online!

  • \$\begingroup\$ Damn, that's clever. \$\endgroup\$ Feb 26, 2020 at 23:29
  • \$\begingroup\$ I believe single semi-colons work as well, as well as just end instead of end program \$\endgroup\$
    – Jo King
    Feb 26, 2020 at 23:29
  • \$\begingroup\$ @JoKing Yeah, forgot I'd used full end program because I wanted to see if it would ignore post-end stuff \$\endgroup\$ Feb 26, 2020 at 23:35
  • \$\begingroup\$ You can drop the space after the comma as well I think \$\endgroup\$ Feb 26, 2020 at 23:38
  • \$\begingroup\$ @CoffeeTableEspresso How's that for you? F77 style saving the day. \$\endgroup\$ Feb 26, 2020 at 23:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.