Readit News logoReadit News
pdpi commented on Blurry rendering of games on Mac   colincornaby.me/2025/08/y... · Posted by u/bangonkeyboard
crazygringo · 10 days ago
Don't think of notches as something stupid that takes away from screen area.

Think of them as something that allows the overall screen area to increase, as bevels shrink.

And then when the corners of the screen are so close to the corner of the laptop, and the corner of the laptop is rounded, it looks weird if the corner of the screen isn't rounded. Like a square peg in a round hole.

Fortunately, it's all context-dependent. So when you watch a video that is inherently rectangular on a Mac, that takes precedence. It's only shown below the notch, and the rounded corners on the bottom disappear.

So it's kind of the best of all worlds. Bigger screen with round corners for actual work (the notch is not particularly objectionable in the menu bar), slightly smaller screen with rectangular corners for video (and games too I assume?).

pdpi · 10 days ago
> Fortunately, it's all context-dependent. So when you watch a video that is inherently rectangular on a Mac, that takes precedence. It's only shown below the notch, and the rounded corners on the bottom disappear.

Also, it's worth noting that notches are a hardware-specific. I haven't tried any of the MBAs with notches, but the MBPs have good-enough black levels that the notch just kind of vanishes into the black background when using full-screen apps.

pdpi commented on Blurry rendering of games on Mac   colincornaby.me/2025/08/y... · Posted by u/bangonkeyboard
ziml77 · 10 days ago
Not mentioned about WoW in here is that they considered the notch enough to also have an option to have the UI avoid the notch. It calls a function in C_UI to get the safe region, and then resizes UIParent to fit within that region while still rendering the game up to the true top of the display.
pdpi · 10 days ago
WoW has always been exceptionally good at treating macOS like a first-class citizen. It's a shame Blizzard has stopped supporting macOS for their newer games.
pdpi commented on Why tail-recursive functions are loops   kmicinski.com/functional-... · Posted by u/speckx
phh · 13 days ago
> > Tail recursion IME is a bigger foot gun

> This is true for some languages, but not all.

Useless anecdote that tail-recursive can be a foot gun even in Scala.

I did a (screening) job interview at Datadog, they asked for "give the spare change back on that amount of money" exercise (simple variant), "in whichever language you want". I did my implementation in tail-recursive Scala (with the annotation). I ended up trying to explain that tail-recursivity doesn't explode in memory for the rest of the call (and failed)

pdpi · 13 days ago
> I ended up trying to explain that tail-recursivity doesn't explode in memory for the rest of the call (and failed)

I count that as a successful interview – They sent an interviewer who doesn't understand how tail recursion enables tail call elimination, and is either unwilling or unable to listen when is is explained to them. Sounds like the company would be a bad fit for somebody whose go-to approach is to implement the solution that way.

pdpi commented on Why tail-recursive functions are loops   kmicinski.com/functional-... · Posted by u/speckx
javcasas · 13 days ago
Recursion deals with recursive data structures, and iteration deals with "plain old" data structures.

When you use one to process the other, you get into trouble. For example, you need to manage a stack to do iteration on your binary tree. Or you need to construct slices to recurse on your arrays.

It's all about ergonomics.

pdpi · 13 days ago
> For example, you need to manage a stack to do iteration on your binary tree

Recursion around trees can get you into trouble with the stack. Consider:

    def traverse(node):
      do_work(node.payload)
      traverse(node.left)
      traverse(node.right)
The second recursive call to traverse is in tail position and is a candidate for elimination, but the first one isn't and will _always_ eat stack space. This is fine if you know what you're doing, but can bite you in the arse if you're expecting TCO to save you.

pdpi commented on Why tail-recursive functions are loops   kmicinski.com/functional-... · Posted by u/speckx
hinkley · 13 days ago
Practically the day after I learned about tail recursion in CS class, I learned that almost all recursive calls can be translated to iteration, that in many cases the iterative version is easier to scan, is as fast if not faster, and that they can usually handle much much larger inputs than recursion due to avoiding stack overflow.

Tail recursion is meant to fix the latter. But what we mean to happen and what actually happens ain't ever exactly similar.

Tail recursion IME is a bigger foot gun than relying on someone to add a new conditional branch at the end of a block in an iterative algorithm without fucking it up in the process. And iteration responds generally better to Extract Function. And while I can think of counter cases easily enough, in the large iteration is less work and less vigilance. And you cannot scale a project up without the vigilance requirement amortizing basically to 0 per line of code.

pdpi · 13 days ago
> Tail recursion IME is a bigger foot gun

This is true for some languages, but not all.

E.g. scala has @tailrec annotations, which make it a compile error for the annotated function to not be tail recursive. Clojure doesn't have tail call elimination, but has the `recur` special form for explicit recursion that is guaranteed to not consume any stack space.Rust has reserved the `become` keyword that will eventually guarantee tail call elimination (So pretty similar to Clojure's recur, but I think Rust's version will allow mutual recursion)

Zig goes the whole hog, and has `@call(modifier, fn, args)`, where `modifier` can be things like compile_time, always_tail, always_inline, never_tail, never_inline, and a bunch other desirable guarantees you might want.

pdpi commented on Little-known leguminous plant can increase beef production by 60% (2022)   embrapa.br/en/busca-de-no... · Posted by u/littlexsparkee
thaumasiotes · 16 days ago
> Go listen to Gabe Brown, he saves thousands and thousands by not not paying for synthetic fertilizers.

> "Above every surface acre on earth there's approximately 32,000 tons of atmospheric nitrogen, why would any farmer want to write a check for nitrogen?, I just can't figure that one out" -- Gabe Brown

It's not hard to learn. This is a topic of intense interest to many, many people.

The answer is that plants get their nitrogen from the dirt, not from the air. And if nitrogen in the air were prone to react with the dirt, there wouldn't be much nitrogen left in the air.

pdpi · 16 days ago
> And if nitrogen in the air were prone to react with the dirt, there wouldn't be much nitrogen left in the air.

Our atmosphere is almost 80% N₂. If it weren’t for the fact that N₂ is basically inert and doesn’t like reacting with anything at all, life would be borderline impossible.

pdpi commented on We'd be better off with 9-bit bytes   pavpanchekha.com/blog/9bi... · Posted by u/luu
xpe · 18 days ago
> The moment you feel the need to skip letters due to propensity for errors should also be the moment you realise you're doing something wrong, though.

When you think end-to-end for a whole system and do a cost-benefit analysis and find that skipping some letters helps, why wouldn't you do it?

But I'm guessing you have thought of this? Are you making a different argument? Does it survive contact with system-level thinking under a utilitarian calculus?

Designing good codes for people isn't just about reducing transcription errors in the abstract. It can have real-world impacts to businesses and lives.

Safety engineering is often considered boring until it is your tax money on the line or it hits close to home (e.g. the best friend of your sibling dies in a transportation-related accident.) For example, pointing and calling [1] is a simple habit that increases safety with only a small (even insignificant) time loss.

[1] https://en.wikipedia.org/wiki/Pointing_and_calling

pdpi · 17 days ago
You misunderstood me.

I started off by saying that 0-9a-v digits was "a bit extreme", which was a pretty blatant euphemism — I think that's a terrible idea.

Visually ambiguous symbols are a well-known problem, and choosing your alphabet carefully to avoid ambiguity is a tried and true way to make that sort of thing less terrible. My point was, rather, that the moment you suggest changing the alphabet you're using to avoid ambiguity should also be the moment you wonder whether using such a large number base is a good idea to begin with.

In the context of the original discussion around using larger bytes, the fact that we're even having a discussion about skipping ambiguous symbols is an argument against using 10-bit bytes. The ergonomics or actually writing the damned things is just plain poor. Forget skipping o, O, l and I, 5 bit nibbles are just a bad idea no matter what symbols you use, and this is a good enough reason to prefer either 9-bit bytes (three octal digits) or 12-bit bytes (four octal or three hex digits).

pdpi commented on We'd be better off with 9-bit bytes   pavpanchekha.com/blog/9bi... · Posted by u/luu
pratyahava · 18 days ago
Crockford base32 would be great. it is 0–9, A–Z minus I, L, O, U.
pdpi · 18 days ago
The moment you feel the need to skip letters due to propensity for errors should also be the moment you realise you're doing something wrong, though. It's kind of fine if you want a case insensitive encoding scheme, but it's kind of nasty for human-first purposes (e.g. in source code).
pdpi commented on We'd be better off with 9-bit bytes   pavpanchekha.com/blog/9bi... · Posted by u/luu
Keyframe · 18 days ago
Yeah, but hear me out - 10-bit bytes!
pdpi · 18 days ago
One of the nice features of 8 bit bytes is being able to break them into two hex nibbles. 9 bits breaks that, though you could do three octal digits instead I suppose.

10 bit bytes would give us 5-bit nibbles. That would be 0-9a-v digits, which seems a bit extreme.

pdpi commented on uBlock Origin Lite now available for Safari   apps.apple.com/app/ublock... · Posted by u/Jiahang
MortyWaves · 20 days ago
So I tapped the link on my iPhone and was taken to the App Store.

The download button is available. Great! Finally I can block ads in mobile too.

It installs, opening it is a simple message saying I need to enable it in Safari settings. Strange, but ok.

I go to Settings -> Safari -> Extensions -> uBlock Origin Lite.

> “uBO Lite” is not available for this version of Safari.

This feels like a series of failures, why is it available for download on iPhone if it doesn’t work at all? Is iOS Safari really that different to Mac Safari?

pdpi · 20 days ago
I've used Firefox Focus as an ad blocker for Safari on iOS for several years now. I don't actually use it as my browser, I just use Safari as normal, but it integrates with Safari, and seems to work well enough.

u/pdpi

KarmaCake day12646March 3, 2013View Original