Readit News logoReadit News
seritools commented on Apple's Browser Engine Ban Persists, Even Under the DMA   open-web-advocacy.org/blo... · Posted by u/yashghelani
xnx · 2 months ago
Do you know of an example? I use a non-Chrome browser on Android and can't remember encountering this.
seritools · 2 months ago
it's the "thin" browsers that are half-embedded in other apps, such as Google News. In the menu you can see "Running in Chrome" and "Open in <yourdefaultbowser>"
seritools commented on Tree Borrows   plf.inf.ethz.ch/research/... · Posted by u/zdw
wavemode · 2 months ago
From the paper:

> The problem with unsafe code is that it can do things like this:

    fn main() {
        let mut x = 42;
        let ptr = &mut x as *mut i32;
        let val = unsafe { write_both(&mut *ptr, &mut *ptr) };
        println!("{val}");
    }
No it can't? Using pointers to coexist multiple mutable references to the same variable is undefined behavior. Unless I'm just misunderstanding the point they're trying to make here.

seritools · 2 months ago
"can do things" in this case doesn't mean "is allowed to do things".

"Unsafe code allows to express the following, which is UB:"

seritools commented on Fast machines, slow machines (2023)   jmmv.dev/2023/06/fast-mac... · Posted by u/amatheus
seritools · 3 months ago
> Notepad had been a native app until very recently, and it still opened pretty much instantaneously. With its rewrite as a UWP app, things went downhill. The before and after are apparent, and yet… the app continues to be as unfeatureful as it had always been. This is extra slowness for no user benefit.

We now have HUGE (/s) advancements in Notepad, like tabs and uh... Copilot

seritools commented on GCC 15.1   gcc.gnu.org/gcc-15/... · Posted by u/jrepinc
VyseofArcadia · 4 months ago
I feel like once a language is standardized (or reaches 1.0), that's it. You're done. No more changes. You wanna make improvements? Try out some new ideas? Fine, do that in a new language.

I can deal with the footguns if they aren't cheekily mutating over the years. I feel like in C++ especially we barely have the time to come to terms with the unintended consequences of the previous language revision before the next one drops a whole new load of them on us.

seritools · 4 months ago
> If the size of the new type is larger than the size of the last-written type, the contents of the excess bytes are unspecified (and may be a trap representation). Before C99 TC3 (DR 283) this behavior was undefined, but commonly implemented this way.

https://en.cppreference.com/w/c/language/union

> When initializing a union, the initializer list must have only one member, which initializes the first member of the union unless a designated initializer is used(since C99).

https://en.cppreference.com/w/c/language/struct_initializati...

→ = {0} initializes the first union variant, and bytes outside of that first variant are unspecified. Seems like GCC 15.1 follows the 26 year old standard correctly. (not sure how much has changed from C89 here)

Deleted Comment

seritools commented on High-Performance PNG Decoding   blend2d.com/blog/png-imag... · Posted by u/PaulHoule
snickerbockers · 5 months ago
That's a neat article, but I'm honestly surprised that inflating zlib compression is a thing people optimize for. I wrote a PNG loader of my own nine years ago[1] because I've found that reinventing wheels is the best way to learn new things. I took the obvious approach of inflaging the data one byte at a time, and i decided that GNU libc is good enough at buffering that I might as well fetch all the data one byte at a time using fgetc for ultimate convenience.

The year was 2016 but my PC at the time was a four year-old AMDFX 8120 "Bulldozer", which was notable for being one of the cheaper options for 8-core CPUs in 2012, but this bandwidth came at the expense of extremely slow throughput because it hailed from an era where AMD couldn't beat Intel's throughput so they'd try to compensate by investing in odd-ball features that only look good on paper and mark the price down a couple hundo so their "high-end" products where effectively competing with Intel's "middle-market".

But I digress, we're not here to talk shit about how bad AMD used to be in 2012.

ANYWAYS, even old "Dozie"[2] could run circles around anything that would have existed anywhere in the world when PNG was first standardized back in '96 so I was not in anyway surprised that my implementation could effortlessly load and display any image i threw at it. I didn't do performance testing or anything, it just didn't seem like there was any point in trying to compete with whatever millisecond-scale gainz libpng presumably had over my library when both of them are capable of loading the picture in less time it takes me to recognize the picture on the screen in front of me.

Anyways, I'm curious if you considered the possibility of abusing the Adam7 interlacing to declare victory early? I guess probably most people don't bother checking that box in GIMP but I'm of the opinion that as long as its possible, there's nothing in the rulebook about deferring work or showing the user a subsampled image.

[1] this somehow coincided with the news media going off nonstop about the "DeflateGate" SuperBowl scandal, but that really was a coincidence. Or maybe it planted some subconscious ideation into my psyche, IDK. But either way this is neither the first time nor the last time I have spent multiple months trying to implement something which i know is ultimately pointless to anyone but me.

[2] remember the CPU architecture was called "Bulldozer"

seritools · 5 months ago
> I didn't do performance testing or anything, it just didn't seem like there was any point in trying to compete with whatever millisecond-scale gainz libpng presumably had over my library when both of them are capable of loading the picture in less time it takes me to recognize the picture on the screen in front of me.

The gains become relevant in bulk processing.

seritools commented on IronRDP: a Rust implementation of Microsoft's RDP protocol   github.com/Devolutions/Ir... · Posted by u/mikece
eitland · 5 months ago
Based on what I see under https://github.com/Devolutions/IronRDP?tab=readme-ov-file#ho...

it seems like the server part is Windows only?

seritools · 5 months ago
It's instructions for the Windows RDP server to enable RemoteFX support so that the Rust client can make use of it.

Maybe I'm missing something, but for the server side it's only crates that help you build your own server, no direct integration with any system, be it Windows or otherwise.

seritools commented on Test if a number is even   ubuntuincident.wordpress.... · Posted by u/Fake4d
jagged-chisel · 7 months ago
Horrifying? It’s mathematically correct.
seritools · 7 months ago
it's a semantics problem, not a maths problem - modulus and remainder are not the same operation. This easily trips up people since `%` is often called "modulo", yet is implemented as remainder operation in many languages

https://stackoverflow.com/questions/13683563/whats-the-diffe...

seritools commented on Fun facts about SQLite   avi.im/blag/2024/sqlite-f... · Posted by u/avinassh
avinassh · 8 months ago
> Recycled, old points in listicle format on a popular topic with questionable accuracy.

Could you please state which are inaccurate? I am happy to correct them.

As for the rest of the comment, well, I don't know what to say. I am a beginner in databases and I am journaling the things I'm learning. Some of my posts might not have depth because I don't know much myself.

seritools · 8 months ago
> I hate that it doesn’t have types. It’s totally YOLO:

SQLite _does_ support strict column types since 3.37: https://www.sqlite.org/stricttables.html

u/seritools

KarmaCake day572May 25, 2020View Original