VCCC2023: Christmas Challenge
Re: VCCC2023: Christmas Challenge
I've tried a number of different ways and they actually come out similar. I would like to know if I need to try harder.
Re: VCCC2023: Christmas Challenge
I missed out on last year's Star competition because I didnt read the submission instructions properly
https://www.youtube.com/watch?v=Rv_YLNM5ByA
https://www.youtube.com/watch?v=Rv_YLNM5ByA
Re: VCCC2023: Christmas Challenge
From past experience, the smallest code is always surprisingly smaller than one's best code, so there's always a better way. (It's true for everyone except just one person...)
Re: VCCC2023: Christmas Challenge
Had a thought as I was falling asleep last night and saved one more byte, wife was not impressed when I told her
Gonna need a new approach if I'm to get any smaller now.
Gonna need a new approach if I'm to get any smaller now.
Re: VCCC2023: Christmas Challenge
Wow! Just had another one of those eureka moments, again whilst walking, and broadaxed another 20 bytes off my best to date. There'll be nothing left soon!
- flaxcottage
- Posts: 5721
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
Just discovered that if I don't print the stars I can save 15 bytes.
Re: VCCC2023: Christmas Challenge
Does that mean your best so far is 15 ? Impressive.
- BeebMaster
- Posts: 7394
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
I had a few days off it while I concentrated on another self-imposed coding challenge, which was to make an RLE compression encoder and decoder. I think I've ironed that out now, but I need to throw more files at it to make sure it decodes the encoded files back to the exact original in all cases.
I went back to the Christmas challenge last night and lost all track of time, spending 3 hours on it. I managed to put in an optimisation which I knew would be possible. Must have taken me about 300 permutations of code to do it though! Saved quite a bit. I just think there may be one more thing I can do to make it smaller.
I went back to the Christmas challenge last night and lost all track of time, spending 3 hours on it. I managed to put in an optimisation which I knew would be possible. Must have taken me about 300 permutations of code to do it though! Saved quite a bit. I just think there may be one more thing I can do to make it smaller.
Re: VCCC2023: Christmas Challenge
On the same hunch that I had all the other right ingredients I ended up guessing parts of my program by trial and error. [edit: spoiler removed]
Last edited by regregex on Wed Dec 13, 2023 1:37 pm, edited 1 time in total.
- Diminished
- Posts: 1240
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
This is a spoiler.
It's in the first post, in large red letters. No discussion of techniques.
- BeebMaster
- Posts: 7394
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
Mmm I think we should ask the mods to lock this thread till 3.10pm on Christmas Day to prevent any more inadvertent inappropriate revelations. Otherwise I may have to tut again. At myself.
- flaxcottage
- Posts: 5721
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
This is getting to be really compulsive - the struggle to save a byte.
Best not to do it though after several pints of cider as you get stars before your eyes!
Best not to do it though after several pints of cider as you get stars before your eyes!
- flaxcottage
- Posts: 5721
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
Just had a thought whilst staring at stars and this has nothing to do with the VCCC2023 task as such.
Would it be possible to start at any star on the output and trace a line through all the stars in turn without ever going over a line already there and not taking the pencil off the paper? Lines may cross and meet but not be overlaid.
I found one and then I thought I ought to get out more!
Would it be possible to start at any star on the output and trace a line through all the stars in turn without ever going over a line already there and not taking the pencil off the paper? Lines may cross and meet but not be overlaid.
I found one and then I thought I ought to get out more!
Re: VCCC2023: Christmas Challenge
I thought I wasn't going to enter this year, but I found myself at a loose end and had a go. It was surprisingly absorbing, even though I shouldn't be surprised really.
I haven't submitted yet as I may find a way to save a byte. So far I also haven't tried multiple approaches, I just picked something fun, so it's quite possible that as well as cleverer and shorter ways than mine, there are more obvious and shorter ways. Unless I get a severe need to procrastinate on something else, I suspect I'll stick with my current approach and just micro-optimise it.
I haven't submitted yet as I may find a way to save a byte. So far I also haven't tried multiple approaches, I just picked something fun, so it's quite possible that as well as cleverer and shorter ways than mine, there are more obvious and shorter ways. Unless I get a severe need to procrastinate on something else, I suspect I'll stick with my current approach and just micro-optimise it.
Re: VCCC2023: Christmas Challenge
A shape can be drawn in one line if and only if it contains no or two vertices with an odd number of edges. In the latter case, you have to start one one and finish on the other. If every vertex connects an even number of edges, you can start anywhere.flaxcottage wrote: ↑Thu Dec 14, 2023 4:41 pm Would it be possible to start at any star on the output and trace a line through all the stars in turn without ever going over a line already there and not taking the pencil off the paper? Lines may cross and meet but not be overlaid.
- flaxcottage
- Posts: 5721
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
Wow! That sounds technical.
Does this mean that I did it and don't know why? Not knowing why is a daily condition with me.
Does this mean that I did it and don't know why? Not knowing why is a daily condition with me.
Re: VCCC2023: Christmas Challenge
Well I've submitted my entry, I couldn't find any more bytes to save. I considered trying to do it in assembler but given how BASIC tokenizes things I wasn't convinced it would be any smaller. I still might try that just out of interest.
Re: VCCC2023: Christmas Challenge
Just as you think it can't be improved, the penny drops and you throw your hands up in disbelief and say out loud "why am I doing that"!
14 bytes removed.
14 bytes removed.
Elk rev 4 & Plus1
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
BBC B rev 7 & Cumana Disc Drive
BBC micro:bit 1 & 2
RaspberryPi B+ & 3B & Zero
Abit BP6
- flaxcottage
- Posts: 5721
- Joined: Thu Dec 13, 2012 8:46 pm
- Location: Derbyshire
- Contact:
Re: VCCC2023: Christmas Challenge
Snap!
And my 6502 coding is not all that sharp either.
- BeebMaster
- Posts: 7394
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
I am about to send mine in, only because it's the only way to guarantee having done so I will be able to save that byte!
Multiple submissions are allowed by the way I believe.
(Well, rules say one update may be allowed, in fact.)
Multiple submissions are allowed by the way I believe.
(Well, rules say one update may be allowed, in fact.)
- Diminished
- Posts: 1240
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
Well, I have a submission in BASIC, but I doubt it's very good. Most of my effort has been going into an entry for the open ("wild") category instead, but I am running out of time to finish it. :(
- BeebMaster
- Posts: 7394
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
Change your name to F Christmas, I believe anyone with that name gets an unlimited 24th December every year.
Re: VCCC2023: Christmas Challenge
Are you allowed multiple submissions if they use different languages?
- Diminished
- Posts: 1240
- Joined: Fri Dec 08, 2017 9:47 pm
- Contact:
Re: VCCC2023: Christmas Challenge
I submitted separate BASIC and assembler entries last year, so I think so, yes.
Re: VCCC2023: Christmas Challenge
Just thought of a different method as I was pondering doing it in assembler. Data will be smaller but code possibly larger. Will it be smaller overall though? I'll have to code it up (in BASIC) and see. If it is I might try an assembler version.
Re: VCCC2023: Christmas Challenge
Code: Select all
10 OSCLI "L. "+"P"+" 7C00"
No?
Merry Christmas!
Re: VCCC2023: Christmas Challenge
Don't forget to include the data for the screen contents (I don't think it's giving away too much to say at least 739 bytes) in your total .....
Re: VCCC2023: Christmas Challenge
Bah! just managed to save 2 bytes from the BASIC version I've already submitted. May have to delete and re-submit and it's such a simple thing, why didn't I see it before?!
Re: VCCC2023: Christmas Challenge
I was just about to hit upload on my entry, when a flash of inspiration struck me and I found a way to save four, count 'em, 4 whole bytes.
My entry last year was not the smallest because I included some housekeeping code to set the MODE and try to centre the image. This year's version delivers it straight and just prints the pattern, no bells or whistles. I'm playing for life or death here, baby. No more Goody2Shoes, or even Goody0Shoes .....
Anyway, nothing for it now but to wait, I suppose .....
My entry last year was not the smallest because I included some housekeeping code to set the MODE and try to centre the image. This year's version delivers it straight and just prints the pattern, no bells or whistles. I'm playing for life or death here, baby. No more Goody2Shoes, or even Goody0Shoes .....
Anyway, nothing for it now but to wait, I suppose .....
- BeebMaster
- Posts: 7394
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: VCCC2023: Christmas Challenge
Sent mine in earlier today. After having so much fun with the L3 file server this week, I nearly forgot!