so i found the first thing that is stupid about Rust: there doesn't seem to be a concept of "local code"
i already dislike how mod namespaces are super isolated and you need to bring your 'use's into the innermost scope, so possibly several times per file, but oh well.
but, when I want a bunch of binaries in a project, each must specify "extern crate myproject" and "use myproject::foo" instead of just "use foo", well, that's simply dumb for no good reason.
or is there a way out?
from my leftist Twitter, paraphrased: "startup bro culture 'reinventing' everything is no accident, the endgame is privatizing every govt service ever"
I mean, sure, yes, that's very true.
but also important to note that governments very often suck big time at doing these services. that's why the startup bros thrive in the first place.
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
comic sans frontières
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
"discover a world which ♥" https://octodon.social/media/TUl-LFSr1ZdTkcktcuI
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.
https://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.
@starbreaker for things like that I use Markdown, which is also better than HTML.
But when trying to do apps... HTML is horribly unsuitable for apps. And framework developers don't seem to care. How.
@starbreaker very true!
There's also pypugjs, but last time I tried it it was rather buggy. And it doesn't integrate well - it's a converter, not a renderer.
Hence my sadness.
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?
@suetanvil @Drops I'll do you one better: instead of Windows 95, just run it in Wine. Then watch them tear their hair out in frustration as basic things like Notepad work fine, but anything more involved inexplicably crashes, returns weird permission errors, the registry keys look all wrong, etc.
Bonus points for "yeah, i'm super glad you finally called, it has been like this for a couple weeks now"
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
@generica Your FB experience is very different from mine O_o
I consider groups to be among the worse known ways to communicate, their main advantage being the FB integration. What do you think is good about them?
(also it helped me immensely to realize that most of my timeline is stuff i actively don't care about. but yeah, i feel the skinner box. what if the next post is interesting?)
@starbreaker @Mainebot yeah, should've used "legal name" for the searchable field.
Anyway, no, that's not actually *the* issue. The issue is that your coworker's boyfriend whom you've met IRL can't find you on Mastodon, because there's a million instances and very little guarantee that this particular "Matthew" is actually the right "Matthew". Whereas on FB he can.
It's not just the names. It's all the creepiness that goes with it.
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.