Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,271 karma · joined Nov 23, 2012 (14y ago) · 6,737 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 1y ago · link · parent

Postgres is pretty good about using index data from multiple single column indices... if you don't order results! Otherwise the planner will get in the way and do nonsense.

A bunch of people spend years studying computer science and trees etc, and then when we actually need to care about that stuff the databases absolutely do not want us to declare the plan. Very annoying.

Think about how people would be guided to do the right thing on indices if they had to say "go along this index to get my data" in a "planned mode" when dealing with bad performance? So many data layout and index issues would become immediately obvious. You wouldn't magically get as many benefits from DB updates, granted.

comment 1y ago · link · parent

> None of the plans to achieve China's level of internal control over communication can work without banning all user-administrated devices from the web

Not that I want that future, but it's not like China has banned all user-administrated devices from the web. Seems odd to say this is necessary when, axiomatically, China has China's level of internal control over communication.

There's a part of me that really wishes that we could have policies around things like age verification that implictly understand the existence of workarounds and accept them. If we're going to have these policies, anyways.

comment 1y ago · link · parent

my usage of pip freeze has been of the "make sure to know what CI used when it build the image" (used to be "make sure the installation on the server uses the same packages that we used in CI" pre-docker-image world).

Glad that we have better tooling nowadays!

comment 1y ago · link · parent

Really still kicking myself for not majoring in robotics in school. I wanted to program, so I studied computer engineering but hadn't really absorbed that much in classes. But I will likely never have access to all the robotics stuff my school had, nor the guided learnings.

Never too late to try stuff out of course, but very little beats structured higher ed education in relatively small classes (think there was only about 24 people in the robotics major?)_

comment 1y ago · link · parent

I have witnessed a lot of kinda spurious pinning going on. Or like "ok we need to fix the bounds for this transitive dependency for a bit" and then it just sticks around.

Over a decade that's once a month, which is a lot though!

I think sometimes people will hear advice like "pin your deps" and do a `pip freeze | requirements.lock.txt`, without really absorbing that pinning transitive dependencies like this is generally not what you want.

You want a lock file! But you tend to want transitive dependencies that aren't locked down to get upgraded when you upgrade your direct dependencies. But it's a subtlety that can get lost in the noise.

comment 1y ago · link · parent

> For example a common failure mode in my work’s codebase is that some function will take something that is indexable by ints. The type could be anything, it could be List, Tuple, Dict[int, Any], torch.Size, torch.Tensor, nn.Sequential, np.ndarray, or a huge host of custom types! And you better believe that every single admissible type will eventually be fed to this function. Sometimes people will try to keep up, annotating it with a Union of the (growing) list of admissible types, but eventually the list will become silly and the function will earn a # pyre-ignore annotation. This defeats the whole point of the pointless exercise.

You are looking for protocols. A bit futzy to write once but for a heavily trafficked function it's woth it.

If your JIT compiler doesn't work well with protocols... sounds like a JIT problem not a Python typing problem

comment 1y ago · link · parent

It's a bookshop right? Maybe I missed a detail. Granted, you're right that the situation on the ground has texture that I am not aware about, as a person who did not know about this place existing 36 hours ago.

comment 1y ago · link · parent

Same, used to work at a place that used to use ghostscript + chromedriver and went to Weasyprint.

Weasyprint is quite wonderful, fast, and you can file upstream tickets and get good clarity on what's going on.

And you're writing your templates in CSS + HTML, which generally flows well.

At the end of the day the problems are rarely "CSS + HTML vs Latex vs Typst", but more just about making decisions about how you want something to be laid out when you have dynamic input.

"What should happen when I have a huge blob of text here" is often a non-trivial question. "What should I do on a page break here" is a non-trivial question. And they often involve having to, at the high level, make decisions. People whine about CSS, sometimes you just gotta read the spec and figure things out (rather than stop at your intuition for how certain fields work).

Nice thing about CSS + HTML is you can open up your output in a browser and futz about with it very easily.

comment 1y ago · link · parent

> Often, the objectors feel as though it's the responsibility of the other side (usually the leadership) to afford them with some sort of power of their own.

reading this story, it sounds like leadership was also just bad. The toilet story is just odd!

> Keen to thwart any further opportunistic toilet-users, Scarlett had a new policy. Staff were to personally escort anyone who asked to use the toilet to ensure they didn’t steal any stock or snoop around the staff area.

Like this just is weird, right?

A lot of these stories (and stories like what happened with DHH and basecamp a couple years back) seem to have an important crux: leadership who might be lacking certain management abilities. These fights end up getting framed as "about politics" but "management making me babysit people who go to the toilet" feels just like more basic of an issue.

To me a more competent manager would just say "toilet's not for customers" and be done with it.

comment 1y ago · link · parent

The toilet story was in April, and it says "less than 6 months after the shop opened"...

kinda a weird headline for a store open less than a year in the end? Or am I misunderstanding something

comment 1y ago · link · parent

I think the idea there is that generally speaking doctors get rebated on some sort of defined cost schedule. They'll get $40 from the insurance company for some basic kind of visit, and that is "fixed"...

I don't live in the US and when I did wasn't paying doctors very often... but my impression was that even if the rebate schedule is fixed they could "just" ask for more/less, and the rebate schedule is defined by the insurance company (so the insurance company can increase their costs through this schedule, leading to ways to make profit elsewhere!)

I could be totally offbase, I've always thought the Obamacare profit percentage cap to be a fake constraint.

comment 1y ago · link · parent

OK, this makes sense to me. Clearly I lacked some imagination on this whole front

comment 1y ago · link · parent

> anyone running e.g. a restaurant is having to essentially guess whether a potential employee is in the UK legally or not, on pain of criminal charges if they get it wrong in one direction and discrimination lawsuits if they get it wrong in the other.

I don't get this. Is there nothing like some sort of number to register any tax withholding or the like? I imagine that tax authorities and immigration authorities don't actually cooperate together (and for good reason!) but my impression for places like the US is that you really do have to provide some sort of number provided by the government for most kinds of employment.

Unless of course you're just not trying to pay payroll taxes I guess?

comment 1y ago · link · parent

Consider that the profit cap is a percentage, so increased costs in fact increase the amount of profits to be scooped up. So health insurers that would like to see more cash are incentivized to have costs increase!

I also think that the profit cap percentage is not something that applies across the board to every single player in the healthcare space.

comment 1y ago · link · parent

The assumption is that more productive AI + humans leads to cost reductions.

But if everyone involved has a profit motive, you end up cutting at those cost reductions. "We'll save you 100 bucks, so give us 50", done at the AI model level, the AI model repackager, the software suite that the hospital is using, the system integrators that manage the software suite installation for the hospital, the reseller of the integrator's services through some consultancy firm, etc etc.

There are so many layers involved, and each layer is so used to trying to take a slice, and we're talking about a good level of individualization in places that aren't fully public a la NHS, that the "vultures" (so to speak) are all there ready to take their cut.

Maybe anathema to say on this site, but de-agglomeration really seems to have killed just trying to make things better for the love of the game.

comment 1y ago · link · parent

I mean I don't think it's easy to conclude much here, because economics research is the act of trying to figure out how to look at two different points in time in some way and try as hard as possible to ignore every other of the billions of inputs when looking at a single input.

Dumb example: foreign company wants to start a branch office in the US, by sending in a bunch of people from its head office to spin it up. The branch office will be in a new building, and the branch office needs a janitor. Visa shenanigans mean the foreign company decides against doing this. Branch office is shut down, one less janitorial job.

Silly but I think it's very easy to concoct these kinds of qualitative stories to infer the theoretical possibility of some quantitative result. Probably why so many of these discussions go in circles!

The easy counter to the above is to say that the foreign company wanted to start a branch office for reasons, and that those reasons remain true with our without H-1B. My impression is that lots of company decision making is of two varieties:

- If you are ginormous: sometimes you are big enough to where you really can't find 500 IT people for your office in some mid-sized market no matter how much money you throw at the problem, so you try to hire from other places. If you aren't able to find 500 people "quickly" the idea stops being interesting

- If you are smaller than ginormous: almost every decision about hiring is actually extremely personal. New offices get opened because you have a handful of people linked to an interesting opportunity, and its through those people that it will happen or not. Denying access to even a couple of them just denies the whole opportunity.

This is just my own view of the world though

comment 1y ago · link · parent

currently CPython's WASI build does not have asyncio support out of the box (at least according to [0]). This is, by my understanding, downstream of asyncio implementations in the standard library being built off of primitives around sockets and the like. And WASI, again by my understanding, does not support sockets.

In a browser environment there are theoretically ways you could piggyback off of the async support in the native ecosystem. But CPython is written to certain systems, so you're talking about CPython patches.

BUT the kind of beautiful thing is you can show up with your own asyncio event loop! So for example Pyodide just ships its own asyncio event loop[1]. This is possible thanks to Python's async infra just being built off of its generator concepts. async/await is, in itself, not something that "demands" I/O, just asyncio is.

[0]: https://docs.python.org/3.13/library/asyncio.html [1]: https://pyodide.org/en/stable/project/release-notes/v0.17.0....

comment 1y ago · link · parent

I think COVID did a number on a lot of the informal groups. These things take _so long_ to build up, and almost all existing ones suffered.

It's only like 5 years later that a lot of informal meetup groups that didn't get destroyed entirely seemed to have crawled back to their former size.

comment 1y ago · link · parent

> Once they have rewritten the code for the steam deck, what would prevent them to compile the game for Debian and other linux distributions ?

You can install Steam on Debian.

I think the value here is that with Steam being the "approved launcher" you offload a lot of "distro weirdness" over to Valve. The value of a standalone build seems fairly low for most game devs.

comment 1y ago · link · parent

are they supposed to be more or less granular?

comment 1y ago · link · parent

> Which is very difficult, and requires a broad coalition in 2 houses of parliament.

In the current moment the same party controls all three branches of government.

There's a more basic reality that the idea I'm mentioning simply wouldn't be popular. I just think that people talk about market forces in these discussions and the lock-in effect is so clearly something that's affecting the market, yet not mentioned nearly enough IMO.

comment 1y ago · link · parent

Or you could stop tying H-1Bs to employers, meaning that there's less incentive to do the work to bring "mid level talent" in at below market rates, because those people would immediately find a job at market rates.

There's a straightforward solution here. Right now H-1Bs are a way for companies to lock in employees by leveraging the visa status.

comment 1y ago · link · parent

I really like KDE but it doesn't look nicer than the latest macOS by most tastes.

I categorize KDE as the DE for people who enjoy using Windows more than macOS. Part of that involves just settings and functionality being more discoverable... which involves just throwing way more spurious stuff on the screen. And that makes it look less clean almost definitionally!

But well. More usable for me when I want to find how to do something I do once every 3 months without having to memorize the keyboard command for it (looking at you, macOS finder dialog when I want to open a hidden folder)

comment 1y ago · link · parent

the name could have included it though right?

comment 1y ago · link · parent

I would recommend trying out GIMP again, it's gotten much nicer.

Still kinda stupid easy to accidentally have non-destructive edit filters making your entire computer fall over because you have these filters that are slow to apply... but the UI works out quite well now

comment 1y ago · link · parent

One of the things that I think make this tricky is that if you have any DOM references you now have visibility into a GCable object.

Part of the web Javascript security model is that you cannot see into garbage collection. So if you have some WASM-y pointer to a DOM element, how do you handle that?

I think with GC in properly people might come at this problem again, but pre-GC WASM this sounds pretty intractable

comment 1y ago · link · parent

My main complaint about React is the sort of lackluster quality of loads of React-adjacent libraries, by people who seem obsessed with "we're doing Yet Another Rewrite and a major version bump".

It's not that hard to maintain API stability folks! Try a bit harder!

comment 1y ago · link · parent

I feel like some of that is just branding efforts. Lots of food companies will put their brand onto the soy sauce/butter/whatever that they are promoting when writing recipes and those get copied.

But while you can talk about reproducibility etc, at the end of the day the amount of variation between various brands of canned pumpkins are less that the amount of variation _you_ should consider when making a recipe to match the tastes of those you are making it for.

We have plenty of foods we make at home where we routinely just look at the base recipe and decide "that is too much/little salt/sugar/etc" and we are happy in the end. Harder for baking tho.

1
181920
225