HNHacker News
TopNewBestAskShowJobs

guitarbill

4,311 karma · joined January 6, 2016

submissionscomments
guitarbill··on Safety benefits of roundabouts
> But really, for busy roundabouts, pedestrian overpasses are the only sane choice. Ugly as hell to look at, but easily more comfortable than underpasses.

They're usually not accessible, or very expensive to do so.

Also, why should the infrastructure be vehicle-focussed like you describe? There's no reason other than people are so used to it.

guitarbill··on Cloudflare mitigated yet another Okta compromise
What kind of argument is this? Sometimes, there are serious bugs in widely used products. So therefore shit vendors should get a pass when their 10 year old Apache instance gets owned? Because "security is hard, mkay"? No! It depends on the compromise.

(If Okta was zero-dayed, IMO we'd have heard about it. Great way to shift blame.)

guitarbill··on Bill to ban hidden fees in California signed into law
Even if by law the post-tax price is shown, is there any law preventing showing the pre-tax price also? Surely not.

Seems to me giving people a shock at the checkout is a particularly evil way of making taxes explicit. It isn't like the taxes aren't broken down on EU receipts for those who care; in fact it's quite explicit.

guitarbill··on Bill to ban hidden fees in California signed into law
Only the state sales tax is 0%, local sales tax doesn't have to be. So YMMV, which is kinda the whole point - that it shouldn't.
guitarbill··on Bill to ban hidden fees in California signed into law
Disagree. Bait and switch is one symptom of the issue that the price is not what you'll pay. Which to be clear is awful.

And that matters if you have to be careful about spending. Also, "everyone knows about them", really? If it's so easy to "know" the local tax rate for various things, why isn't it easy to label them?

See the rest of the world, where even young kids can go shopping. If you give them 5 <amount of currency>, and the item they want is less than 5, or they want five of something that is 1, they can buy it.

guitarbill··on Calling Rust from Python
Agreed. It's also instructive to look at how C extensions are written for the CPython.

I wouldn't necessarily expect a demo; but not mentioning it at all seems like it could lead readers down a path where they choose the "most performant" option presented (FFI + ctypes). The post has a "To go further:" link section where even a quick link to PyO3 would go a long way. So I thought I'd mention the downsides and an alternative on HN.

guitarbill··on Calling Rust from Python
Honestly though, I would likely still choose to implement the logic in Rust as a crate/library in a workspace, the (C)Python extensions as a PyO3 dylib/separate crate, and a C FFI dylib as yet another crate.

The benefit is that you only need to ship the CPython extension, you can build it with cargo, and everything's in one place. I've maintained bindings for Python and C# to native libraries, and it's usually a pain for various reasons.

The C API might be able to be used anywhere, but that doesn't mean it's ergonomic, easy to use, or safe.

guitarbill··on Calling Rust from Python
Edit: Yes it does, as ynik rightly points out, and documented here https://pyo3.rs/v0.19.2/types#gil-lifetimes-mutability-and-p... or here https://docs.rs/pyo3/0.19.2/pyo3/marker/struct.Python.html#o...
guitarbill··on Calling Rust from Python
"just" undersells it a bit, mainly around type conversions.

Also, there is no ctypes involved, as the result is a CPython extension that just loads on the Python side.

guitarbill··on Calling Rust from Python
I would not recommend FFI + ctypes. Maintaining the bindings is tedious and error-prone. Also, Rust FFI/unsafe can be tricky even for experienced Rust devs.

Instead PyO3 [1] lets you "write a native Python module in Rust", and it works great. A much better choice IMO.

[1] https://github.com/PyO3/pyo3

guitarbill··on The urgent need for memory safety in software products
What's wrong with Python, Java, C#, etc? Conversely, while better at avoiding footguns than C, Zig doesn't provide quite the same memory safety - although to be fair, better is still worth it.
guitarbill··on Call to shut down Bristol schools’ use of app to ‘monitor’ pupils and families
> and in reality the police mostly can't be bothered to try and access the recordings

obviously this is the case if you are a normal citizen. imagine how fast they'd access the recordings if a police officer was hurt, or to identify protesters, etc

guitarbill··on Counting Ghosts: A case for abandoning web analytics
OMG WTF. When parent says "a bit", do a tiny amount of scrolling, or open it in a new tab. That behaviour is downright malicious.
guitarbill··on Formatting text in C++: Old and new ways
It seems so trite, especially in 2023, but please don't use sprintf. It isn't safe in general. (Even snprintf is tricky.)
guitarbill··on Openmoji
Apple's, Noto, and OpenMoji are far more legible to me than Teams. I'll take being able to quickly recognize the emojis over consistency any day.
guitarbill··on Australian MPs to lobby US to drop Julian Assange prosecution
Seems sensible... except who gets to decide what's a secret and for how long? And by "defend your actions in a court", you likely mean a court of the country who's secret you leaked? Or no?

So would you for example agree to be extradited to Russia for saying there's a war with Ukraine? Or to China for mentioning the Uyghur genocide? It's a secret after all.

Also, just being able to threaten journalists with court in general would have a chilling effect - especially in a place like the US where it costs so much money.

By the way, the first and sealed indictment of Assange was not for leaking secrets. Make of that what you will.

guitarbill··on European Airline Adds Child Free Zones for $49
If it's such a jam for tall people just to get their "legs in the area of the seat", how are they managing to put their feet - not legs - against the back of the seat in front? Curled up basically lying on their back?

No, it isn't tall people, as I already said.

guitarbill··on European Airline Adds Child Free Zones for $49
I meant feet, not tall people. Some people kinda curl up and brace/wedge themselves on the seat in front. It's... something.
guitarbill··on The case for Nushell
Maybe I'm not using my shell to the fullest, but 95% of commands are pretty simple, and not complicated queries. `ls` might have a bajillion flags, but `-lah` go a long way. Because fish's autocomplete, I don't have to remember tar flags. That's the killer feature for me.

Along those lines, a quick way to drive adoption could be a huge "how do i do x" or recipes page to Ctrl+F through. If I have to search the internet for how to do x in nushell/fish/etc, I might as well stick to arcane bash - at least you know someone has had the same problem before.

Make it easy for me to get stuff done by showing me how to get stuff done, and I'll grok the shell bit by bit.

I did see https://www.nushell.sh/cookbook/ , but it isn't really a searchable reference. There's some setup stuff, other short pages with basic tutorials (?), a link to a repo with example scripts, and for one-liners you are instructed to join a discord. None of these are easily searchable.

guitarbill··on European Airline Adds Child Free Zones for $49
Honestly, some "adults" are just as bad nowadays. Jamming their legs up against the seat in front. Vigorously smashing the - admittedly sluggish - touch screens. Talking loudly for an entire 5h overnight flight. And worse...
guitarbill··on Plans develop for high-speed rail in the PNW
So it should be easier to find unpopulated, cheap land to build lines on between population centers, yeah?
guitarbill··on S.F. says incidents by Cruise, Waymo driverless taxis are ‘skyrocketing.’
Until everybody insists like you on driving. Because of the increased traffic, it now takes longer. Not to mention trying to find parking. And with the extra traffic, it's dangerous to bike now. Oh well.
guitarbill··on Ask HN: Why does Apple refuse to add window snapping to macOS?
Why not? I dislike the Windows snapping behaviour for halves. Most macOS casual users won't need it. These apps work great and allow a lot of customisability that an OS-level snap might not provide. I'm but sure having it built in would be all upshots.
guitarbill··on Ask HN: Why does Apple refuse to add window snapping to macOS?
Also Rectangle, which I moved to from Divvy: https://github.com/rxhanson/Rectangle
guitarbill··on Memory safety without borrow checking, reference counting, or garbage collection
> But I would argue there's no practical difference between "crash due to segfault" and "panic due to index overflow"

Nope. If you're lucky, you get a segfault.

> imagine you're making a game

Actually, I would love to be making games. The benefits Rust provides aren't huge benefits in Game Dev, we get it. In fact, isn't this whole thing just a rehash of Jonathan Blow's ECS critique? But most of us aren't making games.

Imagine instead you're a not making a game, and you see CVE after CVE because of memory safety. Customer data gets stolen, things like SSNs. People's lives are impacted. I suppose a game crash is annoying, but way less annoying than someone's/my personal info being leaked.

Sure, we could go on as usual, blame "human error" and say everybody needs to do better. Or, we could accept better over perfect, and try to mitigate common errors that seem to happen often. You can still use `unsafe`. I guess by this argument, seat belts are useless, too, because they don't stop traffic fatalities completely. And so are all aviation safety improvements.

We're still here having the "Rust offers no/marginal benefits (to game dev and other niches)". Ok.

guitarbill··on Men who helped run Megaupload sentenced to prison in New Zealand
It certainly doesn't excuse it, but it's hardly surprising. I'm not sure how principled I could be if I'd been through the same ordeal. But hey, two wrongs don't make a right.
guitarbill··on Men who helped run Megaupload sentenced to prison in New Zealand
Kim Dotcom is not a fan of the West? Who could've expected that...
guitarbill··on U.S. TSA expands controversial facial recognition program
You can see this at US airports already. Facial recognition is (sometimes? on international flights?) used, but you can opt out. If you do opt out, nothing bad happens. It's not even more inconvenient, the gate agent checks your picture ID instead of the facial recognition box. Still, almost nobody does.
guitarbill··on I went down the rabbit hole of buying GitHub Stars, so you won't have to
> Edit: Emergency alerts are solicited by owning a phone in a country that mandates that cell carriers send those messages.

That's so pedantic, I'm inclined to disagree - if it's even correct. Not everything that's unsolicited is spam. An unsolicited thank you note isn't spam.

More components of spam are traditionally a large, indiscriminate number of receivers, and low quality messaging. Irrelevancy does partially capture both of these.

guitarbill··on Datadog’s $5M Outage
> I’ll use Central European Summer Time (CEST) for time stamps, as the majority of Datadog’s engineering team is in this timezone. I’m also indicating US Eastern time (EST) for reference.

I can convert from UTC to my timezone (TZ) in my head, since logs are usually UTC. I know other engineers can do this, too. What I cannot do is convert from a random TZ to my TZ without looking it up. Clearly, the author knew this, which is why EST was added for an American audience.

Note the Datadog post-mortem is UTC [0], but the status page isn't [1]; even the EU one is ET [2].

So why are time stamps not being in UTC a thing?

Reasons I can think of:

* Status pages and post-mortems are not for engineers, but for management?

* Certain US-based companies use ET (i.e. EST or EDT) or PT (i.e. PST or PDT), and everybody else has cargo-culted it.

[0] https://www.datadoghq.com/blog/2023-03-08-multiregion-infras...

[1] https://status.datadoghq.com/history

[2] https://status.datadoghq.eu/history

← PreviousPage 3 of 34Next →