You may not do that for it to be a valid quine.thegamefreak0134 wrote:In a computer language it would be easy enough. You simply have the source separate from the compiled file, and you have the program read that file, and then display it onscreen. In VB.NET I would copy that code to a multi-line text box, but in C or C++ you could simply spit it out to the console.
Can it be..
Moderator: MaxCoderz Staff
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
- thegamefreak0134
- Extreme Poster
- Posts: 455
- Joined: Mon 23 Jan, 2006 10:09 pm
- Location: In front of a Computer, coding
- Contact:
Hmm, it is... it adds a nice recursive problem:
To output "Hello world", you'd need:
:Output("Hello world
So to output it's source, you'd need:
:Output("Output("Hello world
Oh, no, wait, now the source has changed, so it has to become:
:Output("Output("Output("Hello world
Aaargh
What if I'd write an assembly program that would spit out the bytes that it consists of? Would be an easy contest in Brainfuck, I'd imagine.
To output "Hello world", you'd need:
:Output("Hello world
So to output it's source, you'd need:
:Output("Output("Hello world
Oh, no, wait, now the source has changed, so it has to become:
:Output("Output("Output("Hello world
Aaargh
What if I'd write an assembly program that would spit out the bytes that it consists of? Would be an easy contest in Brainfuck, I'd imagine.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
- elfprince13
- Sir Posts-A-Lot
- Posts: 234
- Joined: Sun 11 Dec, 2005 2:21 am
- Contact:
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Well, if you allow that, for extra bonus points you could get the program to compile itself too.thegamefreak0134 wrote:Oh. Well nobody ever said that, sorry. Well poo. It doesn't seem very possible then...
Here's a quine in HQ9+:
Code: Select all
Q