1
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...
Details:
- 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.
Some stuff I've tried so far that might help people:
continue
is a no-op in Fortran. Socontinue; ...
will just execute...
in Fortran, and just refer to a variablecontinue
in Lisp. (since;
is a line comment in most lisps). I haven't been able to leverage this into anything useful yet though. – CoffeeTableEspresso – 2020-02-26T23:12:15.760@JoKing yea, you're right. – CoffeeTableEspresso – 2020-02-26T23:25:22.883
2
Possible duplicate of Build a polyglot for Hello World
– pppery – 2020-02-27T01:39:49.7103Taking a pre-existing challenge and arbitrarily restricting the set of languages in which answers are valid does not make a new, non-duplicate challenge. – pppery – 2020-02-27T01:40:30.647
@pppery I view this as a separate challenge because of how different the syntax is between the two languages. This was also inspired by a harder problem asking for a polyglot between these two specific language, which seemed impossible considering that I wasn't even able to write hello world polyglot between the two. – CoffeeTableEspresso – 2020-02-27T01:44:51.963
The hello world polyglot is not helpful too me since I am specifically looking at polyglots between Lisp and Fortran. (As @DeathIncarnate's solution shows, however, this is not as interesting as I initially thought, since his solution makes it trivial to write a polyglot for the two.) – CoffeeTableEspresso – 2020-02-27T01:46:14.697
4If you would like a specific language answer to a question you can post a bounty on that question. – Post Rock Garf Hunter – 2020-02-27T02:26:45.000
classic stack exchange – CoffeeTableEspresso – 2020-02-27T02:33:38.820