and on my first try I think I created a much better solution.

The problem:

Veronica Wainwright couldn’t remember the upper limit for a signed single-length number, and she had no book to refer to, only a Forth terminal. So she wrote a definition called N-MAX, using a BEGIN… UNTIL loop.
1
0
0
The solution the book provides is:

: N-MAX ( -- n ) 0 BEGIN 1+ DUP 0< UNTIL 1- ;

All I can say is, on a 64-bit platform, which I'm on, this approach seems like a good way to set your cpu on fire lol.
1
0
1
The Solution I came up with (which I bet many, many readers before me came up with this same better solution, or maybe even one better?), is this:

: N-MAX 1 BEGIN 2* dup 0 < UNTIL 1 - . ;

That is, keep shifting bits left until overflow then subtract 1.
1
0
1