HackerTrans
TopNewTrendsCommentsPastAskShowJobs

pwnna

no profile record

Submissions

Detecting camera on/off events for Linux and controlling lights with eBPF

shuhaowu.com
2 points·by pwnna·vor 4 Monaten·0 comments

Does Wayland fractional scaling work with games in 2025?

shuhaowu.com
3 points·by pwnna·vor 8 Monaten·2 comments

comments

pwnna
·vor 2 Monaten·discuss
Trying to see if I can implement psychoacoustic bass enhancements and other advanced DSP techniques to improve Linux laptop speakers.
pwnna
·vor 3 Monaten·discuss
HW video decoding is now available and by default on in Chrome on at least Ubuntu with my Intel iGPU. I was also surprised when they turned it on under the radar. I saw this the other day debugging a problem and saw others see it too: https://www.reddit.com/r/Ubuntu/comments/1ojydv9/comment/nm8...
pwnna
·vor 4 Monaten·discuss
I actually made this patch a while ago on lineageos but lost the patch. It is a very invasive change where I filtered for the world amber and the French equivalent...
pwnna
·vor 7 Monaten·discuss
Does this impact the western digital and SanDisk brands too? IIRC those brands got folded into Crucial.
pwnna
·vor 8 Monaten·discuss
For single-threaded, cooperative multitasking systems (such as JavaScript and what OP is discussing), async mutexes[1] IMO are a strong anti pattern and red flag in the code. For this kind of code, every time you execute code it's always "atomic" until you call an await and effectively yield to the event loop. Programming this properly simply requires making sure the state variables are consistent before yielding. You can also reconstruct the state at the beginning of your block, knowing that nothing else can interrupt your code. Both of these approaches are documented in the OP.

Throwing an async mutex to fix the lack of atomicity before yielding is basically telling me that "i don't know when I'm calling await in this code so might as well give up". In my experience this is strongly correlated with the original designer not knowing what they are doing, especially in languages like JavaScript. Even if they did understand the problem, this can introduce difficult-to-debug bugs and deadlocks that would otherwise not appear. You also introduce an event queue scheduling delay which can be substantial depending on how often you're locking and unlocking.

IMO this stuff is best avoided and you should just write your cooperative multi-tasking code properly, but this is does require a bit more advanced knowledge (not that advanced, but maybe for the JS community). I wish TypeScript would help people out here but it doesn't. Calling an async function (or even normal functions) does not invalidate type narrowing done on escaped variables probably for usability reasons, but is actually the wrong thing to do.

[1]: https://www.npmjs.com/package/async-mutex
pwnna
·vor 2 Jahren·discuss
There is the kawai novus5 which is a digital piano with the action and soundboard of a real upright piano and enough speakers to sound almost exactly like a real piano. There are also some new roland models I haven't tried. Many dealers lump these into their acoustic piano offering and don't market them differently because they are that good.

See https://m.youtube.com/watch?v=4DaaafyAUqA and https://m.youtube.com/watch?v=oLsPK2ATJcY. He is a pianist and he bought a novus5 to replace his own upright piano...
pwnna
·vor 11 Jahren·discuss
This is really cool! Although the title could be better, initially I thought this is talking about mirrors that can be programmed to adjust its properties (like tilt, curvature), much like those fancy telescope mirrors, although I'm unable to find a link now.