HNHacker News
TopNewBestAskShowJobs

ladberg

3,485 karma · joined August 10, 2017

Contact me at hackernews@leoadberg.com
submissionscomments
ladberg··on Spending 3 months investigating a 7-year old bug and fixing it in 1 line of code
It wasn't `x % 16` it was `x % y` where x and y are 16-bit integers. A compiler would also have taken care of it if it were just a literal.
ladberg··on WebKit fix: Quirk news.ycombinator to skip TextAutoSizing
> This would be like charging the customer more when they use an American Express card to buy your product, just because AMEX charges merchants more.

I 100% believe this should be the case. It's unfair to merchants to take away an arbitrary percentage of their profits depending on which card you want to use.

ladberg··on New MacBook Setup
I have a similar thing here, mostly just for System Preferences stuff and other Apple app settings: https://gist.github.com/leoadberg/f889f49b4c33d967d7f5c9101a...

Would recommend stealing parts of it! I feel like the default state of macOS can be pretty unusable at times.

ladberg··on Tesla Cybertruck deliveries halted for 7 days
https://en.wikipedia.org/wiki/Muntzing
ladberg··on Hunterbrook Media Launch
No, there's a difference between that (using nonpublic information) and what Hunterbrook is doing (using public information).
ladberg··on After five years I discovered why my network goes down (2020)
I've experienced a similar situation where a USB-C hub would bring down everything connected to the switch, but only when it was disconnected from the laptop. No clue how this stuff makes it out of the factory...
ladberg··on Bending pause times to your will with Generational ZGC
Some articles explaining huge pages for anyone curious (and hopefully people will trust that a high frequency trading firm has enough money on the line to get this right):

https://www.hudsonrivertrading.com/hrtbeat/low-latency-optim...

https://www.hudsonrivertrading.com/hrtbeat/low-latency-optim...

ladberg··on Byte-Sized Swift: Building Tiny Games for the Playdate
Feeling pretty craft-y recently, huh?
ladberg··on Nerdy internals of an Apple text editor
A quick glance at https://github.com/textmate/textmate says they don't but someone correct me if I'm wrong
ladberg··on You've just inherited a legacy C++ codebase, now what?
This is fixed by the suggestion right before it:

> * Reproducible builds. The sanity you save will be your own. Pro-tip: wrap your build environment with docker (or your favorite packager) so that your tooling and dependencies become both explicit and reproducable. The sanity you save will be your own.

Upgrading compiler versions shouldn't be done out-of-band with your normal PR process.

ladberg··on Sora: Creating video from text
Yeah that one has more surreal elements every time you watch it: the people at the table are giants compared to everyone else, someone is headless, the kid's hand warps around like crazy.
ladberg··on Apple announces changes to iOS, Safari, and the App Store in the European Union
Nope:

> will pay €0.50 for each first annual install per year over a 1 million threshold

EDIT: I misread, I thought they were arguing that the 50c was per month, not the total number at the end of the calculation.

ladberg··on Heat exchanger masks for cold weather cycling (2019)
You're quite literally describing a James Bond gadget: https://www.youtube.com/watch?app=desktop&v=-IpqOHZMuDI

But yeah I do think it's plausible, albeit on a smaller scale than Bond's.

ladberg··on Proposed Oklahoma skyscraper gets redesign to become USA's new tallest building
> a street and a building across said street

I guess different cities have different distributions of building heights, but living in NYC I feel like this is accurate living on any floor <10 and inaccurate on any floor >=10 (roughly). Even in the densest neighborhoods the fraction of tall skyscrapers is pretty low so if you're 10 stories up you'll usually be able to see pretty far even though you're still surrounded by much taller buildings.

ladberg··on Proposed Oklahoma skyscraper gets redesign to become USA's new tallest building
Then I'll be the first person to tell you that I'd love to live on the 90th floor of a building...

I don't have a family yet and am going to live in an apartment regardless, so why not have one with a great view?

ladberg··on Using the ZBar barcode scanning suite in the browser with WebAssembly
I'm not sure what they use to do it, but I'm amazed by the "Lose It!" app's barcode scanning feature. It'll scan correctly in the first fraction of a second that a barcode is visible on-screen with bad lighting, motion blur, weird/reflective colors, and crinkling.
ladberg··on PID Controllers in Unity3D (2021)
FWIW everywhere I've lived has an on/off thermostat, maybe it's regional
ladberg··on Show HN: I built a 4000 watt solar array on top of my Tesla (AMA)
Assuming a taxi is driving most of the time, there just isn't enough possible energy to extract from the sun in that small of an area to sustain the workload.
ladberg··on Show HN: GodotOS – Fake operating system interface made in the Godot engine
To give an example comparing a text field in a native OR webview-based macOS app with a hypothetical Godot-based one, the Godot version would need to reimplement (or likely just omit):

- Copy/paste

- Emacs/readline keybindings (Ctrl-A, Ctrl-E, etc.)

- User's preferred text size and font as selected in System Preferences

- Spellcheck

- Nice features for non-latin text (e.g. built in pinyin keyboard)

- Crisp text rendering

- Dictation support

- Screen reader support

- Autofill

- Automatically updated with OS updates (e.g. HiDPI, all Java UIs had looked almost-native but were now stuck looking pixelated)

- And hundreds more features I'm forgetting...

This is all possible to do in Godot (e.g. the Godot Editor does a lot of these) but with a lot of work required. It's completely built in to any native or web-based text field and doesn't need any additional work.

ladberg··on Show HN: GodotOS – Fake operating system interface made in the Godot engine
This would be sooo much worse from a UI point of view. All nice OS features (good text rendering, uniform text editing interface, accessibility, transparency) would all get chucked out the window.

I also don't think Godot is inherently more performant for any random UI than Electron is. It happens that most Godot apps are performant because they're made by the type of people who want to use videogame engines and thus care about performance. Electron can definitely have great performance when the developers care about performance (VSCode).

I say all this as someone who's worked on game engines before.

ladberg··on Apple Vision Pro available in the U.S. on February 2
FWIW I never use a code editor with the compiler running locally, I always use VSCode Remote. Even before that I just used a bare bones editor like Atom and SSHFS (or similar) to edit and compile stuff remotely.
ladberg··on Apple Vision Pro available in the U.S. on February 2
> Do you know how Apple wants you to run a code editor on Vision Pro? That's right, own a Mac and literally stream the video output to the Vision Pro

Source for this? I could believe not wanting a compiler on Vision Pro for battery reasons, but I don't see a reason why something like Sublime Text or VSCode (w/wo Remote) won't be available.

ladberg··on [dead]
This feels like a magical dream world programming environment and I'd love to have something that even comes close to use in my day job or side projects.

This was posted ~1y ago but reposting because the game featured in the demo (Human Resource Machine) is currently free on the Epic Games Store.

It's a pretty fun game that challenges you to write and optimize some fake assembly, would highly recommend for both programmers and non-programmers!

https://store.epicgames.com/en-US/p/human-resource-machine

ladberg··on Crown shyness
FWIW I found it much easier to get a reservation at Crown Shy last minute compared to most nice restaurants in NYC, starred or not. Didn't even realize it was starred until after (probably a good thing so I don't set expectations too high).
ladberg··on Elizabeth line: Central stations now boasting 4G phone coverage
FWIW every NYC subway station already has service, which I think is the most important thing. Most London Underground stations don't have service, which is super annoying as a tourist ("uh oh I forgot to map my route in advance and now I don't know where to get off or transfer").
ladberg··on Python, C, Assembly – Faster Cosine Similarity
Am I understanding correctly that the Numpy one doesn't actually use Numpy to do the calculation, but just to store the data? If so that's a super disingenuous example. The speed of Numpy comes from being able to stay in C for the entire hot loop.

EDIT: I tested it myself, also using ChatGPT to code it for me.

>>> can you write a cosine distance function using numpy?

    def cosine_distance(vector1, vector2):
        dot_product = np.dot(vector1, vector2)
        norm_vector1 = np.linalg.norm(vector1)
        norm_vector2 = np.linalg.norm(vector2)
        cosine_similarity = dot_product / (norm_vector1 * norm_vector2)
        cosine_distance = 1 - cosine_similarity
        return cosine_distance
The original list one takes 161us on my machine, passing a Numpy array to the original function takes 750us, and using the native Numpy function takes 6.24us.

Using Numpy correctly makes it >100x faster!

ladberg··on Apple to halt Apple Watch Series 9 and Ultra 2 sales in the US this week
It would not go through: you can only buy as many shares at once as other people are currently offering at that specified price, which would be negligible compared to the total amount of shares.
ladberg··on Apple to halt Apple Watch Series 9 and Ultra 2 sales in the US this week
It's pretty nontrivial to buy a majority interest in any public company. It's not like you can just spend 1/2 the current market cap to acquire it, the price will shoot up drastically as soon as the market is aware of someone (especially Apple) trying to do it.
ladberg··on Weak-to-Strong Generalization
Maybe we have different definitions of inputs and outputs, but all of those things seem like outputs to me? Maybe in this scenario the inputs and outputs are really the same set of variables so there isn't a huge distinction.

The reason I linked that article is that all the inputs are outputs of the network, so by definition it's training on just outputs (under my personal definition of outputs).

ladberg··on Unattractive funds managers outperform funds with attractive managers by over 2%
Yeah exactly. And sorry I wasn't trying to disprove the study or anything, just providing the name of one of the effects they're describing.
← PreviousPage 3 of 24Next →