HOME | DD

Published: 2012-09-18 21:13:42 +0000 UTC; Views: 1356; Favourites: 2; Downloads: 5
Redirect to original
Description
This is the QR code of a QUINE program I made in Petit Computer, available for DSi/3DS. It's an interesting challenge. The purpose of a QUINE program is to accept no inputs and output the program's source code. It's a bit long and won't fit on the screen if it runs, but I think I did a good job. I'm run it against the community to see if it can be simplified a bit.EDIT: People submitted far better examples of quines here! [link]
Source:
CLS
CLEAR
A$=CHR$(34)
B$=CHR$(13)
DIM C$(20)
C$(0)="CLS"
C$(1)="CLEAR"
C$(2)="A$=CHR$(34)"
C$(3)="B$=CHR$(13)"
C$(4)="DIM C$(18)"
C$(5)="FOR D=0 TO 4"
C$(6)="PRINT C$(D);B$"
C$(7)="NEXT D"
C$(8)="FOR E=0 TO 17"
C$(9)="PRINT C$(18);E;C$(19);A$;C$(E);A$;B$"
C$(10)="NEXT E"
C$(11)="FOR F=5 TO 17"
C$(12)="PRINT C$(F);B$"
C$(13)="NEXT F"
C$(14)="@KLOOP"
C$(15)="VSYNC 1"
C$(16)="IF BTRIG()!=16 THEN @KLOOP"
C$(17)="END"
C$(18)="C$("
C$(19)=")="
FOR D=0 TO 4
PRINT C$(D);B$
NEXT D
FOR E=0 TO 19
PRINT C$(18);E;C$(19);A$;C$(E);A$;B$
NEXT E
FOR F=5 TO 17
PRINT C$(F);B$
NEXT F
@KLOOP
VSYNC 1
IF BTRIG()!=16 THEN @KLOOP
END
Related content
Comments: 10
Rot8erConeX [2013-06-17 00:07:04 +0000 UTC]
Nice. Don't know the language, but I know what QUINE-ing is, thanks to a book titled GΓΆdel, Escher, Bach: and Eternal Golden Braid that my dad showed me a few years ago.
Also, did you know your text capture gif is the only thing that pops up when you search "cemetech"?
π: 0 β©: 1
metagross111 In reply to Rot8erConeX [2013-06-17 20:25:06 +0000 UTC]
Not really.
I think your fixation on cemetech is a little creepy. Kerm mentioned you before.
π: 0 β©: 1
Rot8erConeX In reply to metagross111 [2013-06-17 20:46:13 +0000 UTC]
I do admit, I was kinda annoying on SAX back in February(? Maybe early March?) when I used SAX as a way to allieviate boredom, but now I'm only on when I have a technical problem or need coding help.
π: 0 β©: 0
metagross111 In reply to niorg2606 [2013-01-13 06:41:36 +0000 UTC]
Works fine for me. What does it do when you run it?
π: 0 β©: 2
niorg2606 In reply to metagross111 [2013-01-14 00:44:20 +0000 UTC]
It runs the print command of the whole prg!
π: 0 β©: 0
niorg2606 In reply to metagross111 [2013-01-14 00:43:34 +0000 UTC]
It just runs the print command of the whole program!
π: 0 β©: 1
metagross111 In reply to niorg2606 [2013-01-14 07:21:07 +0000 UTC]
"The purpose of a QUINE program is to accept no inputs and output the program's source code."
From the description.
That is exactly what it's supposed to do. Telling a program to display its own source code is a complicated logical puzzle someone might try when they are learning a new language. Every language has it's own rules and quirks, and generally a different way of solving it.
[link] (computing) for facts and references about quines in computing
π: 0 β©: 1
niorg2606 In reply to metagross111 [2013-07-05 21:50:22 +0000 UTC]
I didn't know what that meant... π£
π: 0 β©: 1
metagross111 In reply to niorg2606 [2013-07-05 22:48:36 +0000 UTC]
You could have looked it up before bashing me about it. You come off looking extremely ignorant about computers, programming, and computational theory.
π: 0 β©: 0