Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Anything QL Software or Programming Related.
Post Reply
User avatar
badaman
Trump Card
Posts: 170
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Post by badaman »

This year I participated in VC3, a Christmas challenge contest, preferably for vintage computers.

https://logiker.com/Vintage-Computing-C ... lenge-2024

Was interesting: making the most smaller program. My version was presented in standard QL SuperBASIC.

The result:
sb_box_bas.png
sb_box_bas.png (6.34 KiB) Viewed 884 times

With QL I have obtained a file of 87 bytes, although an 88 bytes file was submitted in case it was not accepted without a line number:

Code: Select all

PRINT,"\O/":FOR i=0TO 18:IF i MOD 9:PRINT"!"," !","  !":ELSEPRINT"+--------+--------+"
My 95 bytes version was reduced with Javu61's idea of ​​using MOD to display a PRINT or another. The previous version was:

Code: Select all

1PRINT,"\O/":FOR i=1TO 18:PRINT"!"," !","  !"
2FOR i=1,10,19:AT i,0:PRINT"+--------+--------+"
The code has some tricks, for example the line number can be placed or not, and it can be attached to the first instruction, since SuperBASIC will load it and take care of reading it correctly.

The comma (,) acts as a tabulator together with the PRINT, thus including 8 spaces.

In the FOR, the 0 in the case above, and the 1 in the case below, can be attached to the TO that indicates the range of values.

The FOR supports values ​​separated by commas as well as ranges, as in FOR i=1,10,19.

The PRINT can be attached to the quotation marks. A curious case is the ELSEPRINT, which SuperBASIC reads and separates without problem (this does not work with the Minerva ROM)

And yes, both the IF and the FOR can be placed on the same line without closing, that is, they do not need END IF or END FOR, in the case of the IF it does not even need THEN.

You have already seen the result, and now you know a little more about the power of pure SuperBASIC.

Both programs can be loaded with LOAD. The one without a line number will be executed immediately. The second one requires RUN. Both can also be loaded and executed directly with LRUN.

Download:
badaman_SinclairQL_SuperBASIC_88b_vc3-2024.zip
(2.74 KiB) Downloaded 56 times


User avatar
pjw
QL Wafer Drive
Posts: 1629
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Post by pjw »

I think you nailed it, badaman, at least I havent been able to beat it. Anyone else?


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
User avatar
bwinkel67
QL Wafer Drive
Posts: 1552
Joined: Thu Oct 03, 2019 2:09 am

Re: Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Post by bwinkel67 »

Kind of a random contest. I watched the video on the site and some entries are like 100+ characters, but because they tokenize things like PRINT (i.e. ala ZX81) they can claim it's much shorter (there was one that claimed 66). Or, some use substitute single or double characters for print (i.e. P.).


User avatar
badaman
Trump Card
Posts: 170
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Post by badaman »

pjw wrote: Sun Dec 29, 2024 12:58 am I think you nailed it, badaman, at least I havent been able to beat it. Anyone else?
Thank you. At least two more people have submitted their proposal. Both are Spanish QL users. ;)


User avatar
badaman
Trump Card
Posts: 170
Joined: Sun Jan 12, 2020 12:18 pm
Location: Spain
Contact:

Re: Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized

Post by badaman »

bwinkel67 wrote: Sun Dec 29, 2024 1:26 am Kind of a random contest. I watched the video on the site and some entries are like 100+ characters, but because they tokenize things like PRINT (i.e. ala ZX81) they can claim it's much shorter (there was one that claimed 66). Or, some use substitute single or double characters for print (i.e. P.).
It's an atypical and heterogeneous contest, as you've explained. But the truth is, it's fun. The prizes aren't the goal, or at least I wasn't interested in them. It's the excuse to have a good time thinking about how to program something so small but so fun.


Post Reply