The thread that keeps on giving
So yes, it’s well past the end date and this ‘entry’ is in a very new language, so highly probably off-topic, but it’s one that amongst other things was initially intended to be something somewhat minimalistic that might have run on systems of “the period” - I’ll leave that for you to decide… However here is my 2nd entry in my own little slightly esoteric language (called Apricot):
~ 2022 Vintage Computing Challenge
~ This version in APRICOT by Gordon Henderson.
~ https://projects.drogon.net/apricot/
~ * * 5, 1, 7, 1
~ ** ** 5, 2, 5, 2
~ *** *** 5, 3, 3, 3
~ **** **** 5, 4, 1, 4
~***************** 0, 17
~ *************** 1, 15
~ ************* 2, 13
~ *********** 3, 11
~ ********* 4, 9
~ ***********
~ *************
~ ***************
~*****************
~ **** ****
~ *** ***
~ ** **
~ * *
"2022"#
~ P is count of stars, Q is count of spaces
1=P 7=Q [ ;A P;X Q;S P;X # P+1=P Q-2=Q +1 ]
0=Q 17=P [ Q;S P;X # P-2=P Q+1=Q -5 ]
3=Q 11=P [ Q;S P;X # P+2=P Q-1=Q +1 ]
4=P 1=Q [ ;A P;X Q;S P;X # P-1=P Q+2=Q -9 ]
_
(S [ " " -1 ])
(X [ "*" -1 ])
(A 4;S)
A-Ha. The editor here has thwarted me - as it uses the back-tick to represent block-quotes but my code here uses back-ticks to represent comments, so anyone actually daft enough to try to run this will need to change the twiddles back into back-ticks …
This is a run:
APRICOT: A PRogrammable Interactive Calculate O Tron.
v1.3. Copyright (c) 2023 by Gordon Henderson.
Up to 8000 numbers of free store available.
Ready
0: :e
Edit Mode. Type ? For Help
> l
Load program
Filename: 2022.cot
> c
"2022"#1=P7=Q[;AP;XQ;SP;X#P+1=PQ-2=Q+1]0=Q17=P[Q;SP;X#P-2=PQ+1=Q-5]3=Q11=P[Q;SP;X#P+2=PQ-1=Q+1]4=P1=Q[;AP;XQ;SP;X#P-1=PQ+2=Q-9]_(S[" "-1])(X["*"-1])(A4;S)
> r
2022
* *
** **
*** ***
**** ****
*****************
***************
*************
***********
*********
***********
*************
***************
*****************
**** ****
*** ***
** **
* *
+++ Program END
>
The internal ‘compiled’ code is about 73 bytes long. It could be optimised but lifes short enough.
And if you really are daft enough to want to know more then
https://projects.drogon.net/apricot/
is where it’s at…
Cheers,
-Gordon