HHC 2016 RPL Programming Contest
|
09-21-2016, 11:42 AM
Post: #22
|
|||
|
|||
RE: HHC 2016 RPL Programming Contest
(09-21-2016 12:10 AM)DavidM Wrote: I made an attempt to translate this same algorithm to a SysRPL implementation, but the smallest I could achieve was still slightly larger than 3298's at 42.5 bytes:Nosy gave me a handy routine you could use to get your size down to mine. At 13FD8 there is this small secondary; Code: :: ONE POSCHR ; (09-21-2016 12:10 AM)DavidM Wrote: ...and with apologies to 3298What for? I posted code on a public forum without any copyright notice, so it's meant to be read, understood, used, and modified. This wasn't quite the kind of modification I expected (that would have been some more size optimization), but it's perfectly fine. Such a little snippet isn't worth putting a copyright on anyway. You even beat my own UserRPL translation by several commands. About NIP: I think that's a Forth thing. As that's another important language in reverse polish notation, it's kind of expected RPL borrows some Forth concepts. Another example: The Forth equivalent of a FOR...NEXT is DO...LOOP, and in SysRPL they are - surprise! - written as DO...LOOP. Or even more basic, a Forth program is delimited by colon and semicolon. SysRPL just doubles the colon, possibly because on RPL.machines you usually get colons in pairs (for tagged objects). |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)