« first day (711 days earlier)      last day (1933 days later) » 

2:22 PM
CMC: I wonder if all the stuff added in Dyalog APL can produce a quine shorter than the classic 1⌽22⍴11⍴'''1⌽22⍴11⍴'''
 
You might consider:
2 5⍴⍞
2 5⍴⍞
to be a quine
 
@H.PWiz Interesting. Never seen that before. Also:
2⌿⍉⍪⍞
2⌿⍉⍪⍞
at same length of course.
 
ngn
3:06 PM
@Adám aren't there many ≤1 character quines in apl
 
@ngn Sure, all digits, and all primitive functions and monadic operators, but those are usually disqualified. Certainly, the single-digit ones are not new.
 
ngn
@Adám disqualified why? 2 chars then :)
 
22
Q: What counts as a proper quine?

AJMansfieldThe basic definition of a quine is a program that, when run, produces its own source code as output. There are a number of techniques and a number of way to implement those techniques across a number of different languages. However, not all quine programs are equal. Clearly, any quine in HQ9+ or...

 
ngn
@Adám "no executable tokens" - is this the restriction you have in mind?
 
> It must be possible to identify a section of the program which encodes a different part of the program. ("Different" meaning that the two parts appear in different positions.)

Furthermore, a quine must not access its own source, directly or indirectly.
 
ngn
3:20 PM
the rules are unclear to me. is !0 a quine in k?
 
@ngn (and ,0) may not be, because they just rely on a specific output format for the value generated, rather than actually returning the source code text.
@ngn Even Hofstadter admitted that it is hard to define exactly what constitutes a quine.
 
ngn
every value in k is formatted as the source code that would produce it
 
@ngn imo yes, that's a quine, but it's a boring quine (as opposed to a non-boring one). I think that objectively trying to define that to not be a quine is just stupid
 
@ngn For K, I'd say that q is a proper quine if and only if q~"k" q
And so too in APL, q is a proper quine if and only if q≡⍎q
And so too for J, q is a proper quine if and only if q-:".q
 
It's a shame that ⍎⍣¯1 doesn't work on strings
 
ngn
3:33 PM
in wikipedia it says a quine "takes no input" - i guess that means you can't use
 
@H.PWiz My plan is to make it work on any array which doesn't reference itself.
@ngn Well, but if the program itself puts things on stdin and then reads it from there, then outwards it doesn't take input.
 
ngn
@Adám hm... no
try running it with -script
 
@ngn "no" as in "I agree" or as in "you're wrong"?
 
ngn
@Adám it depends :) my best guess is you're wrong
 
in a DyalogREPL language, which has no way of getting input and puts its code in the Dyalog REPL, it sure would count using , as that's just a very strange built-in to get the next code line as text
 
3:41 PM
Actually, I might also concede that q is an APL quine if q≡⍎q[1;] i.e. executing the name of a no-argument tradfn with the q as ⎕CR.
 
ngn
if i/o is allowed, here's another 2×5 solution:
⎕←⎕←⍞
⎕←⎕←⍞
 
@ngn It is definitely clear which part takes care of printing and which one is the "payload".
 
ngn
@Adám the "classic" example you gave is very clever
it can be shortened a little by replacing 22⍴ with ,⍨
1⌽,⍨10⍴'''1⌽,⍨10⍴'''
 
3:57 PM
@ngn Nice. That answers my CMC exactly.
 
ngn
@Adám or even 1⌽,⍨9⍴'''1⌽,⍨9⍴'''
5
 
@ngn Wow.
 
um... I see nice stuff here...
 
That's amazing
 
 
6 hours later…
9:53 PM
@ngn Post to:
183
Q: Golf you a quine for great good!

Rafe KettlerUsing your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is...

 
 
1 hour later…
ngn
11:21 PM
@Adám nah, i'm too lazy to post :) go ahead if you want to
 

« first day (711 days earlier)      last day (1933 days later) »