Spent the night trying to figure out how to round a number in 1th with @strstr. We figured it out after a couple of hours.
clr 256 512 / dup dup 1 mod sub swp dup vid swp pop swp vid mod 2 mul swp div dup 1 mod sub add .
@lanodan of course, wanna try adding them? https://git.sr.ht/~rabbits/firth/tree/master/1th.c#L217
@neauoire coooooool
@s_ol I was thinking the same thing
@milofultz @strstr never thought of it that way before, but it's a really good description 👌
@neauoire I am still amazed that it actually works
@strstr I was just about to try wit negative numbers.
@neauoire YOU FOOL
@neauoire does it work? i think the algo should work straight out.
@strstr I just learn that when you invert a fraction, what you get is called a reciprocal.
A fraction * reciprocal = 1
@neauoire oh yeah! dividing by a fraction is multiplying but its reciprocal
@neauoire and thus, since any non-zero number divided by itself always gives 1, a fraction * reciprocal = 1
@neauoire Ew! 😂 😂
Did you have a chance to look at https://mastodon.social/@akkartik/105115240660835365 yet?
@neauoire Yeah. Partly testing the foundations, partly trying to show that it can be used for interesting research in spite of not having graphics. Plus it's an idea I've gotten interested in. https://mastodon.social/@akkartik/104896128141863951 describes the motivations and influences a bit. Basic idea is to see how far I can go without any stack-manipulation commands like `dup` and `swap`, since they feel like accidental complexity.
@neauoire Definitely just a prototype.
I tried to show the instructions for running it at the start of the video, but yeah not super clear. Here they are (requiring Linux..):
```
$ git clone https://github.com/akkartik/mu
$ cd mu
$ ./translate_mu apps/tile/*.mu
$ ./a.elf screen
```
@neauoire Sorry! Try this fork: https://git.sr.ht/~akkartik/mu-normie. 28MB.
@neauoire Awesome. I just added some more guidance to the bottom of https://github.com/akkartik/mu/blob/main/apps/tile/README.md
@neauoire I see you ran into a known bug there with the negative number :) I'm still unsure what the best way is to represent and manage errors.
`git clone --depth 1` might be useful to you in general.
@akkartik btw, if you ever want to get off mastodon.social, let me know. I think you'd be a good fit for Merveilles.
@neauoire I'd be honored to join Merveilles! Been finding lots of interesting people to follow through you.
@strstr yeah! Variables are a single letter tho, didn't want to implement a true dictionary, it's just 256 values addressable by key.
@neauoire d and n still sound good.
i was wondering, do you say "vidided by" or "vidived by"?
@strstr I think of divided as "divi_ded", so I guess "vidi_ded"
@neauoire right. also the "by" made no sense in my example what am i thinking. aaah the semantics of vidision.
Added logic to the 1th interpreter.
https://git.sr.ht/~rabbits/firth