@rovarma@mastodon.gamedev.place
@rovarma@mastodon.gamedev.place avatar

rovarma

@rovarma@mastodon.gamedev.place

Building Superluminal (https://www.superluminal.eu / https://mastodon.gamedev.place/@superluminal), a user-friendly CPU sampling profiler for C/C++, Rust & .NET on Windows & consoles. Ex-Guerrilla Games (H:ZD). Mostly toots about tech.

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

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Overall, I quite like Mastodon, but what drives me absolutely, completely, totally, bonkers is how it handles, or rather doesn't handle, post history.

Example: a few weeks ago I posted a question about optimized binary search implementations. The resulting thread contained a lot of really good info from various people. I saved it, thinking I'd go back through it later when I had space for it in my brain.

Now, when I visit that post, there's almost nothing left: https://mastodon.gamedev.place/@rovarma/111246663566919985

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

The filesystem APIs on Linux remind me of Vulkan in a way. There's all these little low-level bits and bobs that can be used to build anything, but there's not a convenience function in sight, so everybody ends up implementing the exact same things in slightly different ways.

Sometimes a guy just wants to move a file to a different location, ya know?

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @dotstdy @molecularmusing oh man, please don’t get me started on the stringly typed nature of everything Linux.

this toot brought to you by /proc/ shudders

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @dotstdy @molecularmusing The concept of it is really cool. The text part of it not so much. A binary version of it would fix a lot of things.

My mind kinda broke when I was writing code to parse /proc/maps; a space-delimited format containing file paths in one of the columns. Do…do you all just not support spaces in paths at all?🤯

rovarma,
@rovarma@mastodon.gamedev.place avatar

@Doomed_Daniel @pervognsen hah, yes, copyfile was the function I implemented right before starting on my movefile adventure. At least copyfile is pretty simple to implement.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen It doesn't work across mount points, so you end up needing to write fallback logic to deal with that case anyway, which basically involves implementing rename() in user space to correctly deal with things like moving directories, ensuring attributes are moved correctly, etc (but of course without any of the atomicity guarantees). Which is entirely coincidentally what I'm doing right now, and I'm sure lots of other people have done before me :-)

rovarma,
@rovarma@mastodon.gamedev.place avatar

@molecularmusing It's not too bad to be honest. It's just that coming from the Windows world where you have functions like MoveFileW that just do the Right Thing, it feels a bit silly to have to implement all this stuff yourself.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @molecularmusing Yep, but in Win32 at least that huge chunk of code was written for me and is maintained as part of the OS, so I can at least mostly rely on it being correct. And not everybody has to implement it themselves while missing various by different edge cases.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @molecularmusing Superluminal is nowadays not 'just' a UI app anymore, with the addition of the command-line interface. We need it to work in headless environments (e.g. capturing on server machines), so a dependency on UI-specific frameworks like that won't work in this particular instance.

aras, to blender
@aras@mastodon.gamedev.place avatar

Someone, uhh, accidentally convinced me to look at video sequencer.

I know absolutely nothing about video, sequencers, timelines, composition or these parts of Blender codebase. Which is to say, perfect! :)

Just landed for Blender 4.1, make drawing UI of complex timelines 4x faster https://projects.blender.org/blender/blender/pulls/115311

But also, I started to look into related parts, and oof, now I want to speed up like 300 other parts. Which one to start with first?

rovarma,
@rovarma@mastodon.gamedev.place avatar

@aras I mean, gotta be WPA right? :)

rovarma,
@rovarma@mastodon.gamedev.place avatar

@aras I’m a simple man; I see optimizations, I press like :-)

Good stuff!

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

I've been researching optimized binary search implementations for environments where every cycle matters, particularly w.r.t. cache efficiency/branch prediction.

Stumbled on these excellent articles by @pkhuong from a long time ago:

https://pvk.ca/Blog/2012/07/30/binary-search-is-a-pathological-case-for-caches/

https://pvk.ca/Blog/2012/07/03/binary-search-star-eliminates-star-branch-mispredictions/

Any more resources I should know about? Context is binary search through a large-ish (512K-2M elements) fixed-size array with assumed pow2 no. elements and 16b per element. Other algorithm suggestions also welcome!

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Today I non-ironically used a linked list for a data structure. AMA.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen To be clear: I completely agree :-) The post was mostly a tongue in cheek joke precisely because people seem to get irrationally angry when you use them. Like anything in programming, it’s just a tool that either fits the problem, or doesn’t.

That being said, the few times we’ve tried to use linked lists in Superluminal, it’s been mostly a huge perf regression, despite the potentially great algorithmic fit, due to the pointer chasing. But this time it actually seems to be a win :-)

pervognsen, to random
@pervognsen@mastodon.social avatar

Somehow I doubt it. Headline: "Microsoft is finally getting its native Windows UI platform act together with WinUI 3 and WPF."

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen as someone who has been through all of this, my feelings can be perfectly summed up with this gif

Texas Journey GIF

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

normal people: cache line size

C++: std::hardware_destructive_interference_size

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Them: it's important to us that the user is never blocked, so we've made everything async to ensure the main thread is never blocked and the UI remains responsive and fully interactive.

The program, fully interactive:

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

OTOH, again as a dyed-in-the-wool Windows dev, this signal handling stuff on Linux sure is a hot mess huh?

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Have been spending the past few weeks in memory profiling/optimization land and boy is this giving me flashbacks to when we decided to start Superluminal.

The tooling for this is so bad, for all the same reasons CPU perf tooling was (is?) bad back then. My hands are itching to do something about this…

badlogic, to random
@badlogic@mastodon.gamedev.place avatar

Anyone know of a billing service that supports:

  1. Subscriptions
  2. Has a web SDK
  3. Handles (EU) VAT for me, cause god fucking dam it, I can't be arsed.
rovarma,
@rovarma@mastodon.gamedev.place avatar

@badlogic ah, already replied on the Other platform, but seeing your replies here, I think the best fit for what you’re looking for is a “merchant of record” solution like Paddle (https://www.paddle.com/).

They sell the product/subscription on your behalf, making them responsible for all things tax.

Significantly more expensive than using Stripe or Adyen, but then you don’t have to deal with tax crap, so probably a net win :P

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Expectation: a commandline version, how hard can it be?

Reality: a commandline version is an entirely new product with completely different UI/UX considerations and is also an API you can never (ever) change once it’s out there, so better get it right the first time!

This was quite the project, glad it’s finally out there. I think we got it right :-)

https://mastodon.gamedev.place/@superluminal/112088634064786258

rovarma,
@rovarma@mastodon.gamedev.place avatar

@aras @superluminal checking number of users :blobsweat:

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

A sure-fire tell that the author of an article doesn't really understand the material they're talking about is when they handwave away the complicated topics with sentences like "This article is already too long" or "To keep it simple".

In the article I'm currently reading:

"For the sake of simplicity, the following example will not use any synchronization technique."

For "simplicity," or because you weren't quite sure how to achieve thread-safety for this particular problem yourself? ;-)

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Checking out the build scrips of an open-source project

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

I already got some feedback on this, but where would you, a Linux user, expect application-specific config/data files to be located on Linux? Preferably something that works across distros. I found the XDG Base Directory specification (XDG_CONFIG_HOME, etc), but I am unsure how widely used it is.

Looking for a new home for:

  • Settings (XDG_CONFIG_HOME?)
  • Capture files (persistent, non-hidden dir, XDG_DATA_HOME?)
  • Symbol cache files (persistent dir, can be hidden, XDG_DATA_HOME?)
  • 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