@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 python
@mort@fosstodon.org avatar

How are you supposed to distribute programs written in these days? You used to be able to package it up and put it on PyPI and tell people to just pip install it, but now that pip doesn't work without a virtualenv, what's the replacement?

I don't view telling people to pass --break-system-packages to be a good solution, I would rather want to avoid telling users to "break system packages"

mort, to linux
@mort@fosstodon.org avatar

The count of the is not looking good these days compared to any other is it. Maybe time to switch to or some other system which doesn't claim to find hundreds of significant vulnerabilities every day

mort, to Kotlin
@mort@fosstodon.org avatar

I really like 's (and others') approach to nullability, where nothing is nullable by default and you mark something as nullable by adding '?' to the type. And the '?.' syntax is nice too. 'foo: Foo? = ...; foo?.doThing()' is nicer than 'foo: Optional<Foo> = ...; foo.map(|it| it.doThing())', and both are miles better than "everything is always implicitly nullable unless annotated with '@NotNull'

mort, to debian
@mort@fosstodon.org avatar

The whole thing is kinda giving me second thoughts wrt. the whole distro and packaging thing in general. My understanding of the implied agreement between me as a dev and a distro's package maintainer is: the maintainer, to the best of their ability, tries to make my software work "as intended". In return, they get to publish it under my software's name.

That's clearly not how Debian views things. And I can't accept distros publishing broken sw w/ my name.

mort, to Kotlin
@mort@fosstodon.org avatar

I can't deal with languages with optional semicolons! I like languages without semicolons, but when they're optional, especially if they feel "C-like", I always end up adding semicolons to some lines even when I try to write in a semicolon-less style. I'm writing some now and I decided to just use semicolons consistently because the alternative is seemingly to use them inconsistently.

Strangely, this isn't an issue I have in . I do have it in however.

mort, to random
@mort@fosstodon.org avatar

Hey y'all if you have an object notation you wanna call NBON, and it stands for Non-Binary Object Notation, is it fun and cute to make this the logo or is it disrespectful

I feel like if I was non-binary I wouldn't hesitate to make this the logo for something but since I'm not, I'm not sure it's right for me to appropriate it? Thoughts?

mort, to linux
@mort@fosstodon.org avatar

On , my game runs perfectly smoothly with just vsync enabled, but I always had issues with stutters on , letting the game loop be speed limited only by vsync resulted in an incredibly choppy experience and I would get weird frame rates like 105 FPS on my 120Hz screen

Turns out that implementing a manual frame rate cap fixes it, I now sleep for (1/fpscap - dt) at the start of the game loop and it's buttery smooth 🤷

Just things

If someone has a better solution I'm listening

mort, to Redis
@mort@fosstodon.org avatar

Huh wow, TIL never had a contributor license agreement.

Does that make this the first high-profile case of a previously-FOSS project relicensing while having a bunch of contributions made by people who didn't consent to the license change? ..How is that going to go down

mort, to vim
@mort@fosstodon.org avatar

Does anyone know how to get or 's C and C++ indenter to indent switch statements sanely? I don't want this sort of alignment at all, and I certainly don't want it to align with a mix of tabs and spaces

#C

mort, to programming
@mort@fosstodon.org avatar

What does NVM mean by: nvm is not compatible with the "PREFIX" environment variable: currently set to "/opt/homebrew"

how can something possibly be incompatible with a generic environment variable, what does it think "PREFIX" even means?

And how does PREFIX ever end up being "/opt/homebrew"

mort, (edited ) to cpp
@mort@fosstodon.org avatar

Hot C++ take: moved-from standard containers should be specified to work "as if newly default-constructed", not "in a valid but unspecified state"

Alternatively, we should embrace the unsafety and say that moved-from containers are in an "invalid state where the only safe operation is calling the destructor"

As it is, we get the (potential/small) overhead of making sure the container is in a valid state but not the convenience benefits of knowing what that state is

mort, to vscode
@mort@fosstodon.org avatar

I will never understand why defaults to not adding a newline at the end of the file

At least in UNIX-like systems, line feeds are line terminators. Many tools expect there to be a newline after the last line. Most text editors include a newline at the end of the file. VSCode's strange default causes lots of projects to end up with files without a final newline, and causes git churn where people add and remove trailing newlines.

mort, to random
@mort@fosstodon.org avatar

USB-C is so cool, I get to spend time debugging why display out sometimes isn't working through this dock instead of doing boring things like getting work done

I think the order I have to do things is: 1) turn off the screen and unplug the dock, 2) plug in the dock, 3) turn on the screen

If I do things in any other order, or the laptop goes to sleep, the screen turns solid grey, and this state persists across laptop restarts and screen power cycling and dock disconnecting + reconnecting etc

mort, to music
@mort@fosstodon.org avatar

It's not much, but I did a little today. I wanted to try out making music with the TR-808 drum machine sound, since I've always used more realistic-sounding drum samples.

mort, to web
@mort@fosstodon.org avatar

Weird that doesn't have an option for just sending arbitrary binary post data... even with --data-binary, curl adds a Content-Type: application/x-www-form-urlencoded header. This tripped me up just now, as this server I'm working against handles URL-encoded requests very differently from non-URL-encoded requests.

You can add -H 'Content-Type:' to remove the header, but it's weird that curl just adds that header even when it has no reason to think the payload is URL-encoded...

mort, to programming
@mort@fosstodon.org avatar

Does anyone know if there's a common notation for fixed-point? Like how we say u32 for 32-bit unsigned int and i64 for 64-bit signed int

If not, I propose that we use the notation u24.8 for unsigned fixed-point with 24 bits before the point and 8 bits after

#c

mort, to Signal
@mort@fosstodon.org avatar

I don't want to give access to my contacts, yet every time it asks me I can say "yes" or "not now" and if I click "not now" it just says "we'll remind you later"

How about you just respect my desire to not share my contacts instead hmm

mort, to cpp
@mort@fosstodon.org avatar

When writing C++, I consistently find myself wanting to use std::string_view, because I want to take a view into a string. Then, as time goes on, I eventually want to pass that string to something which eventually has to interact with a #C (usually ) API. At that point, I need a 0-terminated string. string_view isn't zero terminated, so I revert back to using a const char * instead of a string_view.

Why oh why isn't there a std::c_string_view which contains a zero-terminated string

mort, to Signal
@mort@fosstodon.org avatar

So, doesn't officially work on on , and it has no web client. What are people on doing? I could try compiling it myself, but I really don't feel like maintaining my own package for such a complex node/electron monstrosity...

mort, to random
@mort@fosstodon.org avatar

You haven't felt the pain of RFC 7686 before you've tried to visit a site over ... , which otherwise supports , refuses to resolve the .onion even when going through the TOR SOCKS5 proxy.

Luckily my system's still doesn't implement RFC 7686, so I can use that to manually speak gopher...

mort, to macos
@mort@fosstodon.org avatar

So c-ares just broke on as of one or two days ago, or at least gRPC is no longer able to do DNS lookups and just prints a c-ares error... Did a Homebrew package upgrade break something?

mort, to linux
@mort@fosstodon.org avatar

One of the most frustrating thing about #Asahi #Linux: #GNOME is so incredibly close to working perfectly witch a notch. Literally all you need to do is to increase the size of the top bar size a bit and move the calendar/notifications menu to the right and it's perfect.

But GNOME doesn't have those options, you have to use extensions. And changing the top bar size from an extension is buggy and breaks in weird ways after suspend.

But with the top bar size tweak, maximized windows end up obscured by the top bar after a resume.

mort, to ubuntu
@mort@fosstodon.org avatar

ok I don't know if this is on or but when I open Ubuntu Software and search for Godot, the search results I see are: "Godot Engine" (missing icon), "Godot Engine", "godot-3-1" (missing icon but differently), "Godot Engine C#", "godot-4", "godot4-mono" and godot4.

How are users supposed to know which to pick?

It seems like most of these are snaps. Why are there so many snap versions?

Why is the deb version missing an icon?

Why is the deb still on 3.x?

mort, to apple
@mort@fosstodon.org avatar

did really have to give the iPhone 15 non-pro a USB-C port that's only capable of USB 2 speeds

I mean we're almost in 2024 and they're making USB-C ports which max out at 50MB/s

mort, to github
@mort@fosstodon.org avatar

Since this thing is happening, I'm gonna need a better solution for 2fa.

So far I've used Authy on my phone for work stuff. That's fine. But for personal stuff, I want more control.

What good open-source options exist to deal with TOTP? I'm thinking I'll use Bitwarden to sync TOTP seed secrets or whatever, which means I need apps which let me freely and easily copy those secrets around.

I need these apps for , and .

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