Tips for golfing in Starry

16

1

What general tips do you have for golfing in Starry? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Starry (e.g. "remove comments" is not an answer).

Please post one tip per answer.

Post Rock Garf Hunter

Posted 2016-10-18T21:23:50.443

Reputation: 55 382

3Related. – Martin Ender – 2016-10-18T21:42:42.420

There's a book on esolangs -- how interesting! – Luis Mendo – 2016-10-18T21:56:00.467

Answers

1

Use dup and add for large numbers

If you need to produce a big but reasonable number which is a multiple of 2 (and in some cases, even not a multiple), you can push half the number and end with  +* (dup and add) instead of pushing the whole number. The threshold for this is 8 and above.

As mentioned, sometimes you can double, then subtract one (threshold 27), and with multiples of higher 2 powers it can be repeated to gain greater numbers.

Try it online!

Uriel

Posted 2016-10-18T21:23:50.443

Reputation: 11 708