matejcik is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

matejcik @matejcik@octodon.social

ughhhhhh the apt ecosystem is awful and makes everything more complex.

am i going to switch distributions because of it?
uhh maybe?

like day and a half later, but I did it!
Very little fighting Rust itself, too. Some amount of fighting my preconceived notions of what type signatures are appropriate. Perhaps I should have looked at some base64 codecs others have written first.

...it also turns out to be important in a low-memory environment (with micropython), because it makes it more difficult to unimport a module. sys.modules is not the only place that holds a reference

Today I Learned
in Python, `import a.b` will place a `b` attribute on `a` ... in effect inserting a global variable into `a/__init__.py`

that's moderately surprising

matejcik boosted

today is the day i'm going to write a Base64 encoder in Rust

it's for cryptopals.com

now base64 is fun and games, i want to watch myself implement AES from scratch though

Learning about formats used in Bitcoin.
Hoo boy it's an unholy mess. There is a separate format for literally everything. New completely custom format for SegWit addresses "to prevent confusion". Segwit transaction looks exactly like a non-segwit one, except some fields mean something completely different.
Seriously. Formats galore.

and yes, i'll write a thing about it and maybe even publish on npm and vue templates or something

i present to you: a sane way to build apps with webpack, vuejs and pug.
github.com/matejcik/drd2-denik

There's still a couple rough edges, but at least you don't need to combine pugjs with moustache syntax to get interpolation.

opinion time
Pug is the only good way of writing HTML known to humanity.

Raw HTML is tedious and its only advantage is the ability <b>to insert tags in the middle</b>, which turns out to be a minor usecase.
Most HTML templating engines use HTML syntax, which is not better than HTML. Hyperscript-type things are idiotic.

This frustrates me because there's so little Pug support out there.
What do you folks do?

mypy. oh, mypy.
Type hinting for function arguments and return types is awesome.
Type hinting for member variables - not so much. There should be inference, but the inference is weak. Basically doesn't even try for straightforward cases, with the excuse that it wouldn't work for more complex cases? So I need to annotate all my members and get caught up when mixins enter the mix?
ughhhh

So could we maybe replicate the thing with realnames somehow? Sure we could! Put in a searchable "real name" field, federated social circle tracker, get people's contact lists and securely and privately match them, display friend suggestions, etc. etc.

*Would* we do that?
Hahahahahahaha no. No way in hell. Not in a million years, not ever. Because we don't *want* these features.
I'm not sure _anyone_ wants them, actually. But they are what makes the whole thing work.

I mean. Can we implement a thing that looks like FB and has all the right features? Sure! Everyone currently on Mastodon will love it and flock to it.
And everyone else, that is most of the real-life people out there, will stay on FB. And we'll stay too because otherwise we won't see their photos and won't get invited to their events. Because everyone else is there, and because you don't know That Guy From Work's handle so you can't actually send him the invite on not!FB.

thoughts about Facebook and @Mainebot 's article medium.com/tootsuite/replacing

I don't think Facebook is like the others. And the reason, stupidly and maddeningly, are Real Names.
Before FB, if my aunt wanted to message your uncle, she'd have to get his handle (number, e-mail...) somehow.
Now she types in a name and gets the right person, just like that.
Facebook solves discoverability, at least for existing IRL social networks. I'm not sure a distributed thing can do that.

matejcik boosted

My new headcanon on The Matrix Show more

I liked LastPass, but maybe I shouldn't have looked at their source code.

So I opened the LastPass extension and looked for the clipboard code. Far as I can tell, the problem is that Firefox disallows clipboard modification from the background.

So instead of pulling the string to the foreground and copying from there, the extension instead disallows copying.

Because of course it does.
I mean. Of course.

health, gross Show more