Can it be..

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

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.
You may not do that for it to be a valid quine.
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

Oh. Well nobody ever said that, sorry. Well poo. It doesn't seem very possible then...
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
KevinJB
Calc Wizard
Posts: 501
Joined: Sat 28 May, 2005 5:34 am
Location: Chesapeake, Virginia
Contact:

Post by KevinJB »

Obviously it is :-P But it's one of those things that's difficult to wrap your brain around at first.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
KevinJB | RevSoft
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

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 :P

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
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

Wow. Brainfuck doing something...EASILY?!
Too good to be true...I doubt it!
I think, therefore iMac
Image
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

/me thinks this would be much easier in an interpreted language like python.....
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

thegamefreak0134 wrote:Oh. Well nobody ever said that, sorry. Well poo. It doesn't seem very possible then...
Well, if you allow that, for extra bonus points you could get the program to compile itself too. :)

Here's a quine in HQ9+:

Code: Select all

Q
Post Reply