Page 2 of 2

Posted: Wed Jan 04, 2012 12:16 am
by AMindForeverVoyaging
rmplpmpl wrote:gosh, did this, but I won't tell you my #s of instructions... for King Mouse I will have to strip it down significantly...
You are certainly not alone, my HVM solutions take up many instructions too. Sucks when you need to get below a certain threshold. :(

Posted: Thu Feb 02, 2012 8:00 am
by MatRush
horst wrote:01+0^<0<:1:01-:5?0^<0>0^45*1-:3?1c0<p

I thought 37 instructions weren't that bad until I saw that mouse challenge :shock:
Your code must be:

Code: Select all

01+0^<0<:1:01-:5?0^<0>0^45*1-:2?1c0<p
I think it's a typo~[/code]

longer better faster stronger

Posted: Fri Jun 08, 2012 10:43 pm
by lamedog
If you can make it short make it efficient too, this is my long code:

* It doesn't use (abuse) the call stack
* It doesn't write on memory nor damaging the input data
* It uses at most 5 elements of the stack

Code: Select all

0<00^54*:2?3gdp!0^<0^3^:1:2?4g1v2vd1+058*-g

Posted: Mon Dec 05, 2016 5:04 pm
by adark
While I enjoyed writing this, it will definitely be a challenge to do the more brutal short ones.

Here's my code:

Code: Select all

0<10>0^0<<0^82*?:1-3?0<<0<1+0>5cdp
It abuses the call stack to return to the loop counter, doesn't freeze on 0 or negative inputs, and uses at most 5 slots on the stack, when swapping out the largest num.

Posted: Thu Mar 29, 2018 10:40 pm
by reesylou
I am spoiled, in that I usually work with high level languages. I have recently been trying to get my head around using lower level languages and was pretty happy with my solution until I saw some of the ones here (and comments about call stack and efficiency)

Code: Select all

45*9c06-g1-0^0:55*?0^0^1-<1v<:1+1?$0^<1^1->$<p
I'm going to improve this, now I realize I can use the goto jump instead of a subroutine call. Funnily enough, I would have thought the subroutine call would have been "better practice".