Post History
Sclipting, (UTF-16) 44 34 32 bytes 貶要❶갠剩❷隔❸增갰乘嗎終并長貶 Because comparing with 1 is expensive (requires copying and decrementing), we instead use a modified version of the Collatz sequence - namely...
Answer
#3: Post edited
# [Sclipting], (UTF-16) ~~44~~ [34 bytes][Byte count]- ```
貶要⓶增⓶❶갠剩是隔不增갰乘終終丟- ```
- Because comparing with 1 is expensive (requires copying and decrementing), we instead use a modified version of the Collatz sequence - namely, we use the sequence where every number is one lower. This allows us to compare with 0 instead.
- ```text
- Input of n
- 貶 Decrement n
- 要 While n (is non-zero)
⓶增⓶ Increment the counter❶갠剩 Take mod 2是 If truthy (odd)隔 Integer divide by 2不 Else增갰乘 Add 1 and multiply by 3終 End if- 終 End while
丟 Drop n, leaving only the counter- ```
- [Sclipting]: https://esolangs.org/wiki/Sclipting
[Byte count]: https://ethproductions.github.io/bytes/?e=utf-16&t=%E8%B2%B6%E8%A6%81%E2%93%B6%E5%A2%9E%E2%93%B6%E2%9D%B6%EA%B0%A0%E5%89%A9%E6%98%AF%E9%9A%94%E4%B8%8D%E5%A2%9E%EA%B0%B0%E4%B9%98%E7%B5%82%E7%B5%82%E4%B8%9F
- # [Sclipting], (UTF-16) ~~44~~ ~~34~~ [32 bytes][Byte count]
- ```
- 貶要❶갠剩❷隔❸增갰乘嗎終并長貶
- ```
- Because comparing with 1 is expensive (requires copying and decrementing), we instead use a modified version of the Collatz sequence - namely, we use the sequence where every number is one lower. This allows us to compare with 0 instead.
- ```text
- Input of n
- 貶 Decrement n
- 要 While n (is non-zero)
- ❶갠剩 Take n mod 2
- ❷隔 Compute n integer divided by 2 (1)
- ❸增갰乘 Compute n plus 1 and multiplied by 3 (2)
- 嗎 Condition on n mod 2; if odd, take (1) else take (2)
- 終 End while
- 并長貶 Join stack into a list, take the length and decrement by one
- ```
- [Sclipting]: https://esolangs.org/wiki/Sclipting
- [Byte count]: https://ethproductions.github.io/bytes/?e=utf-16&t=%E8%B2%B6%E8%A6%81%E2%9D%B6%EA%B0%A0%E5%89%A9%E2%9D%B7%E9%9A%94%E2%9D%B8%E5%A2%9E%EA%B0%B0%E4%B9%98%E5%97%8E%E7%B5%82%E5%B9%B6%E9%95%B7%E8%B2%B6
#2: Post edited
# [Sclipting], [(UTF-16) 44 bytes][Byte count]- ```
가⓶❶貶套⓶增⓶❶갠剩是갰乘增不半終❶貶終丟- ```
- [Sclipting]: https://esolangs.org/wiki/Sclipting
[Byte count]: https://ethproductions.github.io/bytes/?e=utf-16&t=%EA%B0%80%E2%93%B6%E2%9D%B6%E8%B2%B6%E5%A5%97%E2%93%B6%E5%A2%9E%E2%93%B6%E2%9D%B6%EA%B0%A0%E5%89%A9%E6%98%AF%EA%B0%B0%E4%B9%98%E5%A2%9E%E4%B8%8D%E5%8D%8A%E7%B5%82%E2%9D%B6%E8%B2%B6%E7%B5%82%E4%B8%9F
- # [Sclipting], (UTF-16) ~~44~~ [34 bytes][Byte count]
- ```
- 貶要⓶增⓶❶갠剩是隔不增갰乘終終丟
- ```
- Because comparing with 1 is expensive (requires copying and decrementing), we instead use a modified version of the Collatz sequence - namely, we use the sequence where every number is one lower. This allows us to compare with 0 instead.
- ```text
- Input of n
- 貶 Decrement n
- 要 While n (is non-zero)
- ⓶增⓶ Increment the counter
- ❶갠剩 Take mod 2
- 是 If truthy (odd)
- 隔 Integer divide by 2
- 不 Else
- 增갰乘 Add 1 and multiply by 3
- 終 End if
- 終 End while
- 丟 Drop n, leaving only the counter
- ```
- [Sclipting]: https://esolangs.org/wiki/Sclipting
- [Byte count]: https://ethproductions.github.io/bytes/?e=utf-16&t=%E8%B2%B6%E8%A6%81%E2%93%B6%E5%A2%9E%E2%93%B6%E2%9D%B6%EA%B0%A0%E5%89%A9%E6%98%AF%E9%9A%94%E4%B8%8D%E5%A2%9E%EA%B0%B0%E4%B9%98%E7%B5%82%E7%B5%82%E4%B8%9F
#1: Initial revision
# [Sclipting], [(UTF-16) 44 bytes][Byte count] ``` 가⓶❶貶套⓶增⓶❶갠剩是갰乘增不半終❶貶終丟 ``` [Sclipting]: https://esolangs.org/wiki/Sclipting [Byte count]: https://ethproductions.github.io/bytes/?e=utf-16&t=%EA%B0%80%E2%93%B6%E2%9D%B6%E8%B2%B6%E5%A5%97%E2%93%B6%E5%A2%9E%E2%93%B6%E2%9D%B6%EA%B0%A0%E5%89%A9%E6%98%AF%EA%B0%B0%E4%B9%98%E5%A2%9E%E4%B8%8D%E5%8D%8A%E7%B5%82%E2%9D%B6%E8%B2%B6%E7%B5%82%E4%B8%9F