@mort@fosstodon.org avatar

mort

@mort@fosstodon.org

Programmer, mostly writing C++, C and Go.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

mort, to github
@mort@fosstodon.org avatar

What do you do when you've made a merge request, someone else has approved it, but you find an issue and need to push a change? Pushing new commits to the branch doesn't un-approve the MR. What conventions do people have for the contributor to say "I want this code reviewed" and for the reviewer to say "I have reviewed the change and maintain my approval"?

In fact, why don't MRs get automatically un-approved when changes are pushed?

mort, to random
@mort@fosstodon.org avatar

There NEEDS to be a better tool for finding out which commit removed a line than just bisecting the repo, right?

Something like a forward git blame, "which future commit changed this line"

mort, to random
@mort@fosstodon.org avatar

what's up with wireless speakers/headphones/earbuds manufacturers all artificially shortening their products' battery life by making their low battery warnings so annoying that you can't use the product while the battery is low

mort, to vscode
@mort@fosstodon.org avatar

Why does make it so easy to end up with files with the last line terminator missing..? Not only is it annoying (messy git diffs etc), it's actually a pretty big footgun combined with some C preprocessor rules.

mort,
@mort@fosstodon.org avatar

@artfulsodger It lets me fix VSCode for my own use, but it doesn't fix the broader problem that VSCode by default creates broken files, which is what I'm actually wondering about.

mort,
@mort@fosstodon.org avatar

@artfulsodger Feel free. I'm not doing Microsoft's bidding, and I stay away from VSCode when I can.

mort,
@mort@fosstodon.org avatar

@AAMfP Which doesn't work very well because a bunch of important first-party extensions have licenses which preclude them from being used with VSCodium.

bagder, to random
@bagder@mastodon.social avatar

"curl: ‐‐connect‐timeout is weirdly broken"

Using funny unicode letters instead of ascii can give you weird-looking results.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1043309

mort,
@mort@fosstodon.org avatar

@liw @bagder @cjwatson Honestly, I don't think replacing an ASCII dash with a Unicode hyphen is ever correct. It doesn't look better (certainly not when rendered in a terminal, as man pages usually are), and it causes no end of issues.

If you absolutely want a Unicode hyphen, make that an escape sequence, or let the user put a Unicode hyphen in the source text.

eniko, to random
@eniko@peoplemaking.games avatar

this is a public service announcement. when i say i "fled" the US, do not come into my mentions and tell me i was not in sufficiently immediate danger to use that word. i'm not here to play "you were not sufficiently oppressed" games with people

mort,
@mort@fosstodon.org avatar

@eniko IMO, you're fleeing somewhere if you leave because you consider it too dangerous to stay. That applies whether the place is dangerous because it's a war zone, or because of some natural disaster, or because fascists have gained substantial power and are coming for your right to life and/or happiness.

Some people underestimate how things are in the US. Others want to minimize it because they support it. F that noise. Fleeing an increasingly fascist regime who's after you is valid.

mort, to python
@mort@fosstodon.org avatar

people: what's up with the backwards incompatible changes Python is making between minor releases? Why does code which used to do from collections import Mapping now have to do from collections.abc import Mapping as of 3.10? Why did Python decide to break all old code which uses collections.Mapping?

For a language with the worst version transition in programming language history behind it, you'd think they'd be wary of backwards compatibility breaks...

mort,
@mort@fosstodon.org avatar

@veronica I'll make sure to relay that message to the people who wrote the software I depend on which Python 3.10 broke.

It's not very actionable though.

mort,
@mort@fosstodon.org avatar

@veronica That's fair.

And I think part of the issue is: I view python kinda like perl5. If Python 2.7 was the last release and we only ever got security/perf fixes I'd be happy; I don't care about the language, I just need to use it. Breaking collections.* makes no sense in that context.

But for others, Python is a vibrant, living, evolving language. Tidying up the stdlib, moving ABCs to their own package, etc. makes sense in that context.

Serving both purposes at the same time must be hard.

mort, to random
@mort@fosstodon.org avatar

Working with named shared memory object:

From the time that you create a shm object with shm_open+O_CREAT, until the time that you unlink that shm object, a crash has the ability to leak kernel resources. That's scary.

To keep that period of time to a minimum, and be as safe as possible, make sure to shm_unlink immediately once all processes which need it have shm_opened the object. Once you've unlinked it, the kernel will at least free the object if your processes crash or get SIGKILLed.

mort, to llvm
@mort@fosstodon.org avatar

It seems literally impossible to get to not align stuff.

Don't believe me? Take this piece of code and find a clang-format config which doesn't align stuff:

auto getWhateverStmt = db_.stmt(
"SELECT * FROM mytable "
"WHERE k = 2 "
"ORDER BY createdAt").bind();

Feel free to play with it in https://zed0.co.uk/clang-format-configurator/. I literally can not find a way to make it not produce something absolutely ridiculous where the SQL is pushed all the way to the right.

#c

mort,
@mort@fosstodon.org avatar

@gracicot I really really want to write my own formatter. One which takes inspiration from gofmt or rustfmt. One that's opinionated and not very configurable, where every single construct is supposed to be formatted in a way that's at least acceptable to most programmers.

I should start by writing my own C++ parser. I mean, I've written parsers before. How hard could C++ be..?

mort,
@mort@fosstodon.org avatar

@gracicot Probably 😅 Though I would be happy using any opinionated formatter as long as there's nothing it gets completely horribly wrong. There are things I would want to change about both rustfmt and gofmt, but they're sane enough that I use them.

"Completely horribly wrong" things are mainly: aligning stuff with tabs, aligning stuff in such a way that arguments end up laughably far to the right, indenting certain things with spaces if the rest uses tabs. Clang-format gets all these wrong.

landley, to random
@landley@mstdn.jp avatar

Moral of the story: W3C is a completely dysfunctional standards body suborned by money performing regulatory capture, and their attempts to gatekeep should be ignored.

https://octodon.social/@cwebber/110668011757667052

mort,
@mort@fosstodon.org avatar

@landley I found out just today that they introduced breaking changes into SVG 2. No, it's not a new file extension, still .svg. No, it's not a new XML namespace, still the SVG 1 one. No, it's not using an <svg2> element, it's still <svg>.

They just suddenly invalidated billions and billions of previously perfectly valid SVGs by removing 'xlink:href'. For no fucking reason.

More info: https://css-tricks.com/on-xlinkhref-being-deprecated-in-svg/

I had no respect for the W3C after the DRM fiasco, but man I didn't expect this.

whitequark, (edited ) to random
@whitequark@mastodon.social avatar

sudden throwback to a biology (or, possibly, chemistry) lecture in high school during which the teacher (yes, during, school hours) mentioned that it's possible for girls to get drunk more efficiently by using a tampon soaked in ethanol

until now it didn't register to me as a completely unhinged thing to say to your pupils

mort,
@mort@fosstodon.org avatar

@whitequark fwiw it's a terrible idea, if you drink too much you puke or get pumped, if you absorb too much directly into your blood stream (through lungs or mucus membranes or whatever else) you just die

dansup, (edited ) to random
@dansup@mastodon.social avatar

Fedidb.org and fediverse.info will be shut down in a month

Edit: They will remain online and will not be shut down!

mort,
@mort@fosstodon.org avatar

@jwildeboer @rysiek @dansup As someone who has been in a similar situation (though at a much smaller scale)... it's really scary to just let someone else take over. What if the new person turns out to be untrustworthy? How can you vet someone and be certain that they won't abuse the goodwill you have built?

At the very least, finding someone else and vetting them and everything is very time consuming.

mort, to random
@mort@fosstodon.org avatar

Why am I not allowed to transfer chat history to my laptop?

What happens if I lose my phone? Does all chat history get lost forever?

Why is it up to Signal, not me, whether I want to copy chat history over to my laptop? "For security reasons, chat history isn't transferred to new linked devices"; shouldn't I get to choose that? Why does Signal make this choice for me?

mort,
@mort@fosstodon.org avatar

@kytta Okay, so Signal can't work properly in the case where you lose your phone, I guess that's reasonable if your only goal is security with no focus at all on usability and you consider even letting the user back up their key too dangerous.

But why can't a device to device transfer of chat history work? What part of the protocol could possibly make that impossible?

mort, to linux
@mort@fosstodon.org avatar

Why are cursors in so unimaginably broken? Why is it even possible for the normal pointer cursor to look different and be different sizes between apps? And why is that an everyday occurrence? Why didn't seem to improve the situation at all? Why is everything broken?

XOrgFoundation, to random
@XOrgFoundation@floss.social avatar

Per the bylaws, does the board need to vote on renaming to be more accurate? Namely,

"The 'Freedesktop.org, Mesa, Wayland, and Linux in a Trench Coat Shilling as X.Org' Foundation

mort,
@mort@fosstodon.org avatar

@XOrgFoundation What if the X in X.Org can be redefined to be a wildcard representing Freedesktop projects, Wayland, Mesa and associated projects?

Maybe change the official spelling to 𝒳.Org, using the Mathematical Script Capital X unicode character, to differentiate the name from the X windowing system? X is one of the many projects under 𝒳.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • InstantRegret
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • Durango
  • everett
  • tacticalgear
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • lostlight
  • All magazines