Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: nikitouzz on July 06, 2014, 05:41:35 pm

Title: Axe Little contest !
Post by: nikitouzz on July 06, 2014, 05:41:35 pm
You can try to participe at this litle contest ! ;) http://tiplanet.org/forum/viewtopic.php?f=12&t=14945


enjoy ! :)


ps : if someone can translate my topic here in english... that's will be very cool ! :)



Title: Re: Axe Little contest !
Post by: willrandship on July 06, 2014, 05:48:31 pm
Here's my shot at a translation of the post.

Quote from: TI Planet Post
Hello everyone, I have an Axe programming challenge! You must program a checkerboard (box of 8x8 size) infinity scrolling program using the arrow keys! It will leave the program with a [clear]. The program must be the smallest size possible! Watch out! The asm command is prohibited!

(https://i.imgur.com/qxFzRXo.gif)

My program, without optimization, is 418 bytes with the header! Send me the programs by PM. You do not have a time limit. Specify in the comments that you are attending and, if you wish, your current score, but do not give your code! I will update this post with scores! Good luck!

I'm not sure of one thing: Are we talking about source bytes or compiled bytes? The two are different.
Title: Re: Axe Little contest !
Post by: nikitouzz on July 06, 2014, 05:59:16 pm
I have 369 357 !
Title: Re: Axe Little contest !
Post by: Hayleia on July 07, 2014, 01:33:09 am
I'm not sure of one thing: Are we talking about source bytes or compiled bytes? The two are different.
I'd say "compiled" because there is no point comparing the sources (if you write Data(0001)Data(0001) it obviously takes more space than just [0101] for the same result) and because he said "with the header"... But which header ? Noshell ? Ion ? More ? And which name to the program ? Because it is also obvious that a program named AA is bigger than a program named A.
Title: Re: Axe Little contest !
Post by: willrandship on July 07, 2014, 01:56:36 am
That's what I was thinking as well. One challenge is that noshell means including any libs that mos or DCS would just call, but using mos or DCS have header implications of their own as well.
Title: Re: Axe Little contest !
Post by: Hayleia on July 07, 2014, 02:41:09 am
I think that the most interesting is to compile as Noshell, because the size of the header is constant (not saying Ion header=DCS header but that the difference in size between two programs with the same header is the same whatever header they share) while the size of routines isn't.

So I compiled my program in Noshell and called it AA, it is 356 bytes :P
(http://tiplanet.org/forum/download/file.php?id=1503)

edit Got it down to 352.
(http://tiplanet.org/forum/download/file.php?id=1504)

edit I now have 348 but I am too lazy to make a screenshot :P
Title: Re: Axe Little contest !
Post by: TheMachine02 on July 07, 2014, 07:21:22 am
I am at 344 bytes with my try, without having it really optimized  :P
I named the program TE and compiled in noshell.
No screen, cause it is always the same >< (and I am lazy)


EDIT : I am at 287 bytes if I made no mistake ><

EDIT2 : got it down to a 278 bytes crazy fast program. I hope there is no hidden bug like last time  ;D
Title: Re: Axe Little contest !
Post by: nikitouzz on July 07, 2014, 11:08:35 am
I have 341 now :p but very very slooowwww !!!!
Title: Re: Axe Little contest !
Post by: Streetwalrus on July 07, 2014, 11:25:33 am
I am at 344 bytes with my try, without having it really optimized  :P
I named the program TE and compiled in noshell.
No screen, cause it is always the same >< (and I am lazy)


EDIT : I am at 287 bytes if I made no mistake ><

EDIT2 : got it down to a 278 bytes crazy fast program. I hope there is no hidden bug like last time  ;D
Wow that sounds like an anorexic program on steroids. :P
Title: Re: Axe Little contest !
Post by: nikitouzz on July 07, 2014, 12:43:36 pm
303 now ! :) i need optimiz
Title: Re: Axe Little contest !
Post by: Runer112 on July 07, 2014, 02:28:41 pm
Watch out guys, I found this topic. :P
Title: Re: Axe Little contest !
Post by: Sorunome on July 07, 2014, 02:29:26 pm
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Title: Re: Axe Little contest !
Post by: Streetwalrus on July 07, 2014, 02:32:40 pm
Watch out guys, I found this topic. :P
Nuuuuuuu ! D:
Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Well, that's not the ASM() command so it's legit I guess.
/me runs
Title: Re: Axe Little contest !
Post by: Hayleia on July 07, 2014, 02:38:15 pm
Watch out guys, I found this topic. :P
Lol, I was wondering how long you would let us brag about our programs before appearing :P

Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Yeah, but how do you jump to the right memory address ?
Title: Re: Axe Little contest !
Post by: Streetwalrus on July 07, 2014, 02:39:18 pm
By using (address)() ? Or Goto address. :P
Title: Re: Axe Little contest !
Post by: Sorunome on July 07, 2014, 02:40:59 pm
Watch out guys, I found this topic. :P
Lol, I was wondering how long you would let us brag about our programs before appearing :P

Wait, what if, instead of the ASM() command we put the data as hex and jump to that memory address :P
Yeah, but how do you jump to the right memory address ?
jup, goto address or soemthing, or something like DATA(\x18,PTR) (JR)
Title: Re: Axe Little contest !
Post by: Hayleia on July 07, 2014, 02:42:16 pm
Well jr doesn't exist in Axe. And Goto doesn't allow relative jumps (or I missed something all this time O.O). So you can't do your trick without using Asm(), which defeats its purpose :P
Title: Re: Axe Little contest !
Post by: Sorunome on July 07, 2014, 02:43:20 pm
But DATA() puts the bytes just like that in memory, right? and 18 followed by the pointer is jr pointer. Ok, actually you'd need to do like jr 1, because relativness
Title: Re: Axe Little contest !
Post by: Streetwalrus on July 07, 2014, 02:48:48 pm
Data puts the data after the ret so it won't work. However, go ahead and read the labels and subroutines section in the docs. :P
Title: Re: Axe Little contest !
Post by: Runer112 on July 07, 2014, 03:07:24 pm
You can indeed jump to/call arbitrary addresses in native Axe. But I'd propose that doing anything that results in running custom assembly code is against the sprit of the competition and shouldn't be allowed.
Title: Re: Axe Little contest !
Post by: ClrDraw on July 07, 2014, 03:08:54 pm
I got 408 :(
Title: Re: Axe Little contest !
Post by: Hayleia on July 07, 2014, 03:11:44 pm
You can indeed jump to/call arbitrary addresses in native Axe. But I'd propose that doing anything that results in running custom assembly code is against the sprit of the competition and shouldn't be allowed.
Yeah, we figured out we could make
[the hex code we want to execute]→°Cheat
Goto (°Cheat)

But it's true that this is not the goal of the contest :P
Title: Re: Axe Little contest !
Post by: TheMachine02 on July 08, 2014, 03:36:11 am
So I optimized the whole thing further and I am at 262 bytes. It is like so fast that to test the correctness of the display I have to pause it  O.O

However, I don't think I go any further this time, I mean the Dispgraph command is almsot 30% of is weight ><
Title: Re: Axe Little contest !
Post by: nikitouzz on July 08, 2014, 05:33:33 am
292 tsss  :banghead: :banghead:
Title: Re: Axe Little contest !
Post by: Hayleia on July 08, 2014, 06:01:53 am
Still better than my poor 305 296...
edit I have 282 with some cheating :P
No Asm involved, but some unclean code :P
Title: Re: Axe Little contest !
Post by: TheMachine02 on July 08, 2014, 08:42:42 am
Soooooo... I finally found other morar optimization.
I am at the ridiculous size of 253 bytes and without unclean code  :P

Screen :

(http://i.imgur.com/LOwddtB.gif)

I have no doubt that Runer will beat this though ><

EDIT : I am now at 248 bytes :p
Title: Re: Axe Little contest !
Post by: Hayleia on July 10, 2014, 05:10:41 am
Aargh ! I have 271 265 ! :P
But yeah, superfast too, as is yours :P forget about that, Wabbitemu was set as 400% :trollface:
Title: Re: Axe Little contest !
Post by: TheMachine02 on July 10, 2014, 06:28:04 am
Actually, I think that the speed and the size come from the algorithm I use, cause I am no very good for size optimizing  :P
I tried more optimization yesterday, but none of them work, so yeah, I think I am stuck at 248 bytes...