|
quine
Dec 9, 2020 16:47:07 GMT 1
Post by bigbass on Dec 9, 2020 16:47:07 GMT 1
I think we could go smaller still?? A Quine program here, a smaller Quine here, even smaller here, and smaller here www.basic-converter.org/quine4.bac.htmlIs this legal or is it cheating? PRINT SOURCE$
ok its cheating
|
|
|
quine
Dec 9, 2020 17:55:27 GMT 1
Post by Pjot on Dec 9, 2020 17:55:27 GMT 1
|
|
|
quine
Dec 9, 2020 19:10:26 GMT 1
Post by bigbass on Dec 9, 2020 19:10:26 GMT 1
Thanks Peter more cheating (but Its unofficial experimenting ) I see its a built in problem due to quoting in c or bacon with printf or PRINT the only way around this would be a new macro built in to allow wysiwug printing Its very interesting that we can PRINT CONST strings with ? even if its cheating I learned something with this shortened syntax thanks! A$="?$A" ?A$ Joe
|
|
|
quine
Dec 10, 2020 18:24:31 GMT 1
Post by bigbass on Dec 10, 2020 18:24:31 GMT 1
No cheating this time I am using code to fix a design problem the printf and PRINT command have that they can't print an unescaped double quote this macro allows wysiwyg printing (except we have to use \n if you want a new line in there) DEF FN PRINTLINE(...) = fprintf(stdout, "PRINTLINE(%s)\n", #__VA_ARGS__ )
PRINTLINE(A="A")
the terminal displays PRINTLINE(A="A") it is code it has quotes it reproduces its source and some thinking went into it to make it work Joe but a "real world use" would be a built in function like this instead for real wysiwug printing DEF FN PRINTLINE(...) = fprintf(stdout, "%s\n", #__VA_ARGS__ ) PRINTLINE(some text or code here PRINT "hello world" )
|
|