« first day (711 days earlier)      last day (1923 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:
at same length of course.
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.
@Adám disqualified why? 2 chars then :)
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...

@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.
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.
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
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.
@Adám hm... no
try running it with -script
@ngn "no" as in "I agree" or as in "you're wrong"?
@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.
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".
@Adám the "classic" example you gave is very clever
it can be shortened a little by replacing 22⍴ with ,⍨
3:57 PM
@ngn Nice. That answers my CMC exactly.
@Adám or even 1⌽,⍨9⍴'''1⌽,⍨9⍴'''
@ngn Wow.
um... I see nice stuff here...
That's amazing
6 hours later…
9:53 PM
@ngn Post to:
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…
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 (1923 days later) »