@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.

drewdevault, to random
@drewdevault@fosstodon.org avatar

I needed a break from Real Work, so I'm speedrunning writing a Unix-ish operating system

Day 3

mort,
@mort@fosstodon.org avatar

@drewdevault Wait you implemented ext4? I assumed that for this kind of project you'd make a baby's first file system style thing like we did in OS class in uni...

mort,
@mort@fosstodon.org avatar

@drewdevault Aha! Reasonable.

eniko, to gamedev
@eniko@peoplemaking.games avatar
mort,
@mort@fosstodon.org avatar

@eniko Yet you post a picture without sound T_T I wanna hear it

By the way, what's the process for music in your games generally? Do you personally make it or do you have music people on the team or contract it? And what software do you use?

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?

bagder, to random
@bagder@mastodon.social avatar

The #curl #git repository is cloned on average once every 6 seconds.

mort,
@mort@fosstodon.org avatar

@bagder Huh I would've expected some inefficient CI system to be cloning it a few times a day on average due to vendoring dependencies via git submodules

eniko, (edited ) to random
@eniko@peoplemaking.games avatar

i sure hope nobody figures out that kitsune tails save files are just a proprietary binary version of json thats fairly human readable and so easy to reverse engineer and hacks them for their own purposes 🥺

mort,
@mort@fosstodon.org avatar

@eniko I wanna read about your binary JSON!

.. my save games are also a binary JSON format, but I narrowly managed to accept the things I don't like about messagepack enough to use that instead of making my own

(on the other hand, I did not manage to accept the things I don't like about the C++ messagepack libraries so I made my own)

mort,
@mort@fosstodon.org avatar

@eniko I like the sound of that a lot I think. Interesting that you encode keys and strings differently, I guess that helps when inspecting the file manually; you can reset your mental parser at every "K<string>".

How do you encode keys/strings? Are they 0 terminated?

I would be tempted to use LEB128 for integers (https://en.wikipedia.org/wiki/LEB128),is that what you're doing or are they fixed width?

I wouldn't be surprised if I write up a proper spec based on these ideas some time in the future & use it

mort,
@mort@fosstodon.org avatar

@eniko I threw together a msgpack -> enikoJSON, but with 'p' for positive LEB128-encoded integer, 'm' for negative LEB128-encoded integer, 0 terminated keys/strings, 'f' for 32-bit float, 'd' for 64-bit float, plus a 'b' for length-prefixed arbitrary binary data and 'N' for null: https://p.mort.coffee/M9S.cc

Files are slightly smaller with msgpack than this format (5927B vs 6264B; 4951B vs 5043B gzipped). But it's sooo much simpler. Hm.

mort,
@mort@fosstodon.org avatar

@eniko I'm curious what you think of this? https://github.com/mortie/nbon

It's not the exact same as your thing (I removed the 'K' before object keys for example) but it's very much inspired by it

mort,
@mort@fosstodon.org avatar

@eniko Yeah, I get that. I guess I could define float -> double conversions and int -> double conversions to be semantics-preserving...

However I like ordered objects :( My parser is streaming and I sometimes need one key of an object before another key, so I just declared objects to be ordered

Reading the IETF spec (https://datatracker.ietf.org/doc/html/rfc8259#page-6), I don't think it's specifically wrong to treat JSON objects as ordered...

eniko, to random
@eniko@peoplemaking.games avatar

psst. little life hack for ya: you can wear a mask even if masks aren't required

mort,
@mort@fosstodon.org avatar

@eniko if I do that how will I get my yearly dose of cumulative brain damage huh

soller, to random
@soller@fosstodon.org avatar

Is it possible to simultaneously have complete support for the enforcement of a code of conduct resulting in the removal of a transphobe from a community

While at the same time reminiscing on how I was threatened with CoC bans for a disagreement on technical issues

And how some of the folks who are commenting on this rightful ban were all too happy with pushing for a wrongful one

I still remember.

mort,
@mort@fosstodon.org avatar

@soller Honestly I think more people need to be comfortable to have an opinion that's based on something as simple as: good things are good, bad things are bad

You don't need to inform your opinion abstractly based on some generalized theory of CoC enforcement, you can say something as simple as: it's good when CoCs are used to remove transphobes, it's bad when CoCs are used for shutting up legitimate technical discussion

drewdevault, to random
@drewdevault@fosstodon.org avatar

The #hyprland community has established a foothold for abhorrent behavior in the greater Linux desktop community, and is a welcoming home for assholes, nazis, transphobes, and bigots of all kinds.

They have shown us that they will not change. Building a fence around their community and removing them from our shared spaces is a project that I unconditionally support.

mort,
@mort@fosstodon.org avatar

@drewdevault Hopefully, this action will trigger more bans and blocks and exclusions of that toxic community. I'm sad to see that Vaxry has not improved in response to earlier push-back. He has certainly been given plenty of chances.

The blog post he published is vile. He displays a total willful ignorance to the idea that his behaviour as an individual will and should be associated with the Hyprland project.

mort, to linux
@mort@fosstodon.org avatar

On #Linux, my game runs perfectly smoothly with just vsync enabled, but I always had issues with stutters on #macOS, 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 #gamedev things

If someone has a better solution I'm listening

drewdevault, to random
@drewdevault@fosstodon.org avatar

Hm, bit of a long shot, but are there any physicists on here? I have a question: as the universe expands, light traveling through space is redshifted, which means it loses energy. Thermodynamics tells us that energy can't just disappear. Where does that energy go?

mort,
@mort@fosstodon.org avatar

@simrob @drewdevault Hm I don't think that's it. I can send out a single photon with a certain energy, and that photon will still be red shifted, meaning it loses energy

mort,
@mort@fosstodon.org avatar

@drewdevault I found this: https://math.ucr.edu/home/baez/physics/Relativity/GR/energy_gr.html

tl;dr whether energy is conserved in general relativity depends on what you mean by "energy" and what you mean by "conserved"

Also "Each photon gets redder and redder. What happens to this energy? [...] Those who harbor no qualms about pseudo-tensors will say that radiant energy becomes gravitational energy. Others will say that the energy is simply lost."

So I guess it comes down to your personal feelings towards pseudo-tensors

drewdevault, to random
@drewdevault@fosstodon.org avatar

It's not very popular, but I wonder if signing release tarballs with the release manager's private key would go some ways towards alleviating xz-esque woes, at the very least making distros aware that an upstream has changed hands and having to do due diligence to fix their builds

mort,
@mort@fosstodon.org avatar

@drewdevault Considering autotools changes aren't backwards compatible, this sounds like hell tbh >_> you'd need many versions of autotools and be able to select between them based on which version range each project's configure.ac/Makefile.am file works with

Alternatively, GNU could just take their bloody role as core infrastructure maintainer seriously and stop breaking stuff all the time, but I don't see that happening any time soon

mort, to Redis
@mort@fosstodon.org avatar

Huh wow, TIL #redis 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 #opensource

niccolove, to random

Rare YouTube W

(And you'll never guess why)

mort,
@mort@fosstodon.org avatar

@niccolove Interesting topic for mr politics discussion and technology discussion should be kept separate

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

@VZ But I want hard tabs, the problems here are 1) the use of spaces and 2) the fact that it tries to align.

And no, this is the default behavior. Here's the result of typing in similar code with 'nvim --clean' followed by ':syntax on', ':set ft=c' and ':set cindent'.

Note that it doesn't indent like this without the inner braces. However, the inner braces are necessary due to the variable declaration, which you can't do in case bodies unless you introduce a block

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"

#nodejs #javascript

eniko, to random
@eniko@peoplemaking.games avatar

heard back from the EU rights lawyers at Your Europe Advice (originally mentioned here: https://peoplemaking.games/@eniko/112045032873283751) and the first line reads:

"You are correct in your assessment."

In short as my research showed the right to residence for an EU national and their family (regardless of nationality) is a fundamental right granted to them by EU treaty and is not granted by the application for residence in a member state. Instead such application is merely an administrative formality that serves of proof of that right

Further, EU nationals (or their immediate family) cannot be expelled unless they pose a genuine, present and sufficiently serious threat to public policy or security. Failing to meet an administrative obligation does not rise to this level

We're safe, the law is on our side, and we have a document from an EU rights lawyer citing precedent from a dozen cases saying so

mort,
@mort@fosstodon.org avatar

@eniko It's so shitty that you've had to go through all this BS to get to this point. I'm guessing the fight against useless bureaucrat and officials isn't over, but this is such an important step and must be a big relief

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

#cpp #programming

mort,
@mort@fosstodon.org avatar

@numeredevs No, I'm not talking about swapping two objects, I'm talking about moving (usually move constructing).

You may feel like use of "std::move" tells the compiler, "I won't use this object any more, do whatever with it", but that's not really what's going on. You're calling the move constructor of the new object, and the standard gives guarantees about that (i.e it leaves the object in a "valid but unspecified state"). I'm saying those guarantees don't make sense, that the standard ...

mort,
@mort@fosstodon.org avatar

@numeredevs ... should either guarantee that the moved-from object is in its default-constructed state, or that it is in an invalid state where the only safe operation is to call its destructor.

It sounds like the latter option ("the only safe thing to do is to to a moved-from object is to call the destructor") matches your mental model of how move semantics should work.

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