See the online interpreter and the docs.
Misc
- Most operators that take in a block can implicitly end (terminate) it.
{...}m
{...m
- And if these terminating operators aren't passed a block, then they take in everything after it, as the block.
{...m
m...
- Splitting an input string like "1 45 34" and mapping them to integers.
j{e}m
j{em
eLr # Only works if there is nothing else on either stack
# (L consumes everything on both stacks)
Packing
Packed Stax can be used to save characters on any solution that uses the first 95 printable ASCII characters (32-126), by converting it to base 256. You can use the string literals packer in the online interpreter's tools section (F9) to convert any string to this 95 character constraint efficiently. The Packed Stax packer is also found in the tools section under Source.
Solutions that have the same number of bytes do not necessarily have the same number of characters when packed. This is due to the conversion from base 95 to base 256 falling on either side of a character (byte) boundary, because the ASCII values of your "most significant" characters are higher/lower than the other solution. The "most significant" characters are the last characters (with the last character being the most significant). You can use that information to "leak" an upper/lower bound for the last character of a solution, if you know the bytes of the original solution and the characters of the packed solution. This table shows the last character boundaries for the first 30 bytes.
| bytes |
chars |
crossing boundary |
| 2 |
1/2 |
! |
| 3 |
2/3 |
# |
| 4 |
3/4 |
) |
| 5 |
4/5 |
: |
| 6 |
5/6 |
g |
| 8 |
6/7 |
" |
| 9 |
7/8 |
% |
| 10 |
8/9 |
. |
| 11 |
9/10 |
G |
| 13 |
10/11 |
! |
| 14 |
11/12 |
# |
| 15 |
12/13 |
( |
| 16 |
13/14 |
5 |
| 17 |
14/15 |
Z |
| 19 |
15/16 |
! |
| 20 |
16/17 |
$ |
| 21 |
17/18 |
, |
| 22 |
18/19 |
@ |
| 23 |
19/20 |
x |
| 25 |
20/21 |
" |
| 26 |
21/22 |
& |
| 27 |
22/23 |
2 |
| 28 |
23/24 |
P |
| 30 |
24/25 |
! |