Take the 2-minute tour ×
Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.

This question already has an answer here:

Write a program in language A which outputs a program in language B where:

  1. Language A != Language B
  2. The output is itself a solution to this question.

This is a popularity contest. If you want to define your own BNFs/grammars for this, feel free, but try not to make it too boring by doing so.

EDIT: The more languages it ends up generating code in, the better (in my opinion).

EDIT2: Try to use languages that are not similar (I.e. generate the code in a different family of languages). (E.g. C to Scheme)

share|improve this question
 
I would make this code-bowling, but I don't want it to be too difficult for people. –  Millie Smith Mar 10 at 17:13
 
Code-bowling is not a good idea. Many solutions here would just print out larger versions on each iteration, so the arguably longest version is infinitely long. –  Quincunx Mar 10 at 17:20
1  
Might want to restrict what languages. Otherwise, languages that are very similar (almost identical, such as the two Befunges) could cheat, and for some reason, such answers tend to get a lot of upvotes. –  Quincunx Mar 10 at 17:21
1  
This is a slightly relaxed version of Golf a mutual quine and its variant Write a third order quine. –  Peter Taylor Mar 10 at 17:26
 
The relaxation is that it does not need to be a "quine", that is, it can expand indefinitely. I think this is different enough to not mark it as a duplicate, but only if this is changed to make it so that it needs to be expandable (ie, never will come back to the same program, only a bigger one for each language). –  Quincunx Mar 10 at 17:32
show 3 more comments

marked as duplicate by Peter Taylor, Howard, Kendall Frey, Jan Dvorak, ProgramFOX Mar 10 at 18:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

php --> asp --> html --> xhtml .......

 Hello

Infinite languages

share|improve this answer
 
This is just boring: meta.codegolf.stackexchange.com/a/1063/9498 –  Quincunx Mar 10 at 18:44
 
@Quincunx I don't think the post you linked is about this. For example it would be boring if somebody just added the code into a variable and printed it. But in Html this is considered a code. –  user689 Mar 10 at 18:50
 
I know it is valid code, but it is still just hardcoding the output, and it is even easier and requires less thought. –  Quincunx Mar 10 at 18:59
 
Sorry for that I will never do it again. –  user689 Mar 10 at 19:01
add comment

HQ9+, HQ9++ (and more)

Q

I'm starting to like this family of languages.

share|improve this answer
5  
No longer funny. –  Howard Mar 10 at 17:35
 
@Howard Sorry, I don't see how that's relevant. HQ9+ was certainly not invented by me, and wasn't invented for this task. –  Kendall Frey Mar 10 at 17:48
 
The question clearly said: lang A != lang B –  user689 Mar 10 at 17:54
2  
@user689 HQ9+ != HQ9++ –  Kendall Frey Mar 10 at 17:57
add comment

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