An APL Solution to Logiker’s Vintage Computing Christmas Challenge 2022
Let’s use Waterloo microAPL on the SuperPET.
Solution set up:
Solution expression is evaluated:
To verify this solution save sp900lang.d80 from http://www.zimmers.net/anonftp/pub/cbm/pet/SuperPET/ into the Vice folder, then load xpet as follows:
To load APL type apl at the Waterloo languages prompt:
Code walkthrough, step by step:
Easier in an APL that supports drop with axis, but in Waterloo microAPL drop with axis is not implemented.
What about the IBM 5110 APL? No drop with axis:
Can you golf it shorter? In APL there are often many approaches, can you find a one-liner?
Many thanks to Logiker for organizing the challenge!
UPDATE: The results are in! An APL one-liner on the IBM 5110 entered by Peter De Wachter was for awhile the leading contender at 30 bytes, but ultimately the shortest VC3 2022 entry was by Dr Beep in 27 bytes of ZX81 Z80 assembler.
See Logiker’s examination of Peter De Wachter’s one-line APL solution in the results video here:
https://youtu.be/xVKEaRogw-s?t=2399
Does it work on the SuperPET?
What about a version done in C? I entered this Arthur Whitney style program as well, for the fun of doing it as a nested palindrome.