previously we'd create (argument_count + let_count) locals, which doesn't make sense.
so now `let`s use their own counter for their own locals, and we only request as many empty locals as there are `let`s.
> #81 Compiling brush doesn't seem to finish correctly sometimes, which causes loss of data
> Sometimes it seems like the client state can get desynced (server render thread dies due to a panic?) and then the server starts dropping all requests for drawing the brush.
> These panics should never happen of course, but we need better logging first to determine the exact cause.
the arity of unary and binary ops is guaranteed by the fact they're, well, unary and binary ops.
right now there's no way to call them with less or more arguments, so we may as well.
introduce a new, more ergonomic syntax for haku
not all features are implemented just yet. still missing:
- custom tags (non-True/False)
- color literals
- lists
this is quite common in other apps with an infinite canvas - such as Miro
also on laptops middle-clicking is a pain in the ass, though we should add more proper touchpad support for that case
error handling shows you the error and offers the ability to reload;
disconnect handling shows you that the page will reload in a few seconds.
it uses exponential backoff with some random sprinkled into it to prevent overwhelming the server once people's clients decide to reconnect.
you could paste discord convos into it.
discord.
conversations.
and they'd render.
like in Discord.
lmao.
I still do wonder how to do syntax highlighting on it, but I've seen prism-code-editor, which I _think_ hides the textarea's text and overlays a non user-interactable syntax highlighted version on top.
what's cool is that we could theoretically have many such overlays - for things like highlights too
but we'll see how that goes
mainly related to me not knowing how to decode WebP properly (I blame the API design of the webp crate)
turns out it can return RGB images instead of RGBA and so you have to convert it to RGBA first
there were also a couple math bugs with chunk drawing/saving related to some of my refactors of that math
it's probably okay, but it's incredibly easy to read localStorage from the frontend and get a hold of the secret
would be nice (would it?) to have more proper session tokens I guess but we're not doing that right now
I'm not entirely sure if generating the password on the server is legit like this, but it leads to an incredibly frictionless experience and I'd like to keep it. if possible.
I don't really see a difference compared to password managers generating passwords for you and showing them in plaintext
obviously actual passwords are stored within the manager which requires a master password, but like. do we really need that. the secret isn't shown to the user and it's very long.
too bad the browser secure storage API or whatever isn't ready yet