HNHacker News
TopNewBestAskShowJobs

jmgao

1,289 karma · joined February 6, 2012

[ my public key: https://keybase.io/jmgao; my proof: https://keybase.io/jmgao/sigs/n5UFQGDv-Rd7VAJM_qdjyATNxOs-n8Z3rIZBV8RFGQU ]
submissionscomments
jmgao··on Thousands of Mazdas in the Seattle area are stuck on a single FM radio station
No, it's a format string vulnerability.
jmgao··on Shenanigans on Microsoft Feedback Hub
> That one employee he noticed seemed to have concluded his comment with a rather sarcastic thanks directed toward someone who might be one of the responsible?

Presumably, that's "Thanks, <my username>@" as a signature, since the name matches.

jmgao··on We used C++20 to eliminate a class of runtime bugs
This is a worthless statement. Do you examine all of your generated machine code to ensure that it generates correct code? Any compiler that you cannot trust to inline 3 for strlen("foo") is not one you should trust to compile anything, let alone modern C++.
jmgao··on We used C++20 to eliminate a class of runtime bugs
A strlen of a compile-time constant, which will certainly get turned into a constant by the compiler. It does not get the length of the input string.
jmgao··on We used C++20 to eliminate a class of runtime bugs
That code is older than C++11, let alone C++17. Also, your proposal isn't as efficient, since it calls strlen on construction of string_view (not that cost of parsing command line arguments is going to be measurable).
jmgao··on Why Are Topre Keyboards So Expensive?
> Or for that matter, Wooting and anything they liked as much or better?

I got my Wooting 2 HE yesterday, and it feels great, but I think I still prefer the Cherry MX low profile speed switches that I bought by accident (I thought I was buying a replacement for a keyboard with full profile MX speed switches, but I was happily surprised to learn that I preferred the low profile switches). Adjusting the activation height to 1.0mm gets me most of the way there, though.

jmgao··on Debugging a weird 'file not found' error
Yep, that's the downside of syscalls only giving you a finite set of errors they can return, instead of being able to say "couldn't find DT_INTERP '/lib/ld.so.1'"
jmgao··on Doubling the PinePhone storage speed with a soldering iron
I think you're off by a lot, the black square at the top left is probably a QFN-24 (i.e. ~0.5mm pin pitch), which would mean it's actually an 0402.
jmgao··on Java Virtual Threads Preview
The "some limitations" there was mostly that original green threads implementation in Java lived on a single OS thread, so you could only use one core. Presumably that's changing this time around?
jmgao··on Sorry Safari Team
There are opt-in programs that mandate it (security clearances, etc.), but Americans aren't generally required to register their fingerprints.
jmgao··on COP26: Germany fails to sign up to 2040 combustion engine phaseout
> There's nothing wrong with internal combustion per se.

The majority of energy in the combusted fuel goes right out the tailpipe: vehicle engines are generally only about 25-30% efficient. Combined cycle power plants that capture energy from the exhaust of the initial combustion cycle get over 60%, but it's ridiculously impractical to put one in a car.

jmgao··on Remote work will break the US monopoly on global talent
Why not? The vast majority of people who ate dinner at Google immediately went home afterwards. My daily routine was to show up at 11, check email, eat lunch, work until 6:30ish, eat dinner, and then go home.
jmgao··on The Common Desktop Environment (CDE) in 2021
Well, for starters, anti-aliased text?
jmgao··on I don’t know how to count that low
I was over in Android, where "borgmon" and "readability" were mythical concepts, and it was still hilarious.
jmgao··on ‘The Billion Dollar Code’: Developers Who Sued Over Google Earth Algorithm
Looking at the federal court decision [1], it looks like the patent was predated by an implementation that was demonstrated at SIGGRAPH, and apparently the creator of that gave the source code to the plaintiffs?!

"Lau further testified that, at the SIGGRAPH '95 conference, he performed live demonstrations of SRI TerraVision to at least 500 people, and in fact “gave [ ] the source code to TerraVision” to Art+Com employees who were in attendance and “walk[ed] them through the source code.”"

1: https://caselaw.findlaw.com/us-federal-circuit/1878050.html

jmgao··on The Framework is the most exciting laptop I've used
The receptacle housing generally prevents you from bending the connector tongue, and even if you manage to do it somehow, AFAIK it's almost never FR4 in the receptacle (although USB-C receptacles printed directly on 0.8mm PCBs work great!). It'll generally be some sort of injection molded thermoplastic that's fairly flexible, so even if you manage to bend it, it'll spring back.

As for pins vs pads, you can make pads almost arbitrarily more durable by increasing the gold plating thickness, whereas it's really hard to make pins not bend.

jmgao··on How many real numbers exist? New proof moves closer to an answer
> I was taught there is countably and uncountably infinite. Integers are countably infinite because the number of integers between any two numbers if finite. Real numbers are uncountably infinite because there are infinite numbers between any two real numbers.

This is unsound: a set is countable if there's a mapping that assigns an integer to each element of that set. There are an infinite number of rational numbers between any pair of rational numbers, but you can pretty easily construct a mapping between integers and rationals. Imagine representing a rational x/y as a point on the plane, and draw a square spiral around the origin. Every rational number lays on that spiral, and there's a unique "shortest arc-length of the spiral from the origin" for each rational.

jmgao··on Dropbox Engineering Career Framework
If anyone at Dropbox is reading this, https://dropbox.github.io/dbx-career-framework/ and https://dropbox.github.io/dbx-career-framework/overview.html have the same content, but the page title is different. (My guess is that all of the pages should be labeled as Dropbox Engineering Career Framework?)
jmgao··on No sane compiler would optimize atomics (2015)
> I build things for a living and I like it when the code I specify is the code that's generated.

Okay, then specify -O0 and enjoy your dumpster fire performance.

jmgao··on Apple and Intel first to use TSMC 3nm
> You can use the `-march` flag for your compiler to target specific architectures, for instance -march=tigerlake or -march=znver3

Note that -march will use instructions that might be unavailable on other CPUs of the target. -mtune (which is implied by -march) is the flag that sets the cost tables used by instruction selection, cache line sizes, etc.

jmgao··on Counter-Strike Global Offsets: reliable remote code execution
Because that's what they signed up for?
jmgao··on Enigma: GPT-2 trained on 10K Nature Papers: Can you spot the difference?
> Hard mode is good enough that I'd like to see some sort of distance metric to the nearest real story, to be sure the model isn't accidentally copying truth.

Yeah, I ran into at least one example which basically regurgitated a real paper. The "fake" article was:

    Efficient organic light-emitting diodes from delayed fluorescence

    A class of metal-free organic electroluminescent molecules is designed in which both singlet and triplet excitons contribute to light emission, leading to an intrinsic fluorescence efficiency greater than 90 per cent and an external electroluminescence efficiency comparable to that achieved in high-efficiency phosphorescence-based organic light-emitting diodes.
and the real one at https://www.nature.com/articles/nature11687 has:

    Highly efficient organic light-emitting diodes from delayed fluorescence

    Here we report a class of metal-free organic electroluminescent molecules in which the energy gap between the singlet and triplet excited states is minimized by design4, thereby promoting highly efficient spin up-conversion from non-radiative triplet states to radiative singlet states while maintaining high radiative decay rates, of more than 106 decays per second. In other words, these molecules harness both singlet and triplet excitons for light emission through fluorescence decay channels, leading to an intrinsic fluorescence efficiency in excess of 90 per cent and a very high external electroluminescence efficiency, of more than 19 per cent, which is comparable to that achieved in high-efficiency phosphorescence-based OLEDs
jmgao··on Reverse Engineering an Unknown Microcontroller
> Why didn't the makers of this price label just use a little 10 cent off the shelf microcontroller? I doubt price tags are made in sufficient volume to ever get the engineering costs of a custom microcontroller low enough to go below 10 cents...

Are you sure about that? As a hypothetical example, imagine that Walmart is switching all of their stores over to eInk price tags. I found some numbers from 2005 for number of stores and SKUs per store at https://corporate.walmart.com/newsroom/2005/01/06/our-retail...: multiplying out the number of stores with the average number of items carried gives you 500 million price tags.

jmgao··on Linux and Glibc API Changes
You could hypothetically have a situation where libc has an arbitrarily large internal FILE* buffer (instead of reading a block, looking for a newline, and copying everything over immediately), and then copies in reverse, corrupting data after the guard page before it hits the guard page.

If there are other threads accessing data that happens to be placed after the guard page, bad things could happen, but this seems rather unlikely to be a real problem.

jmgao··on FreeCAD 0.19
> KiCad copied this feature, and I was frustrated by the "inconsistent behavior" of the selection tool for years until someone finally explained it to me.

I wonder how many people (myself included) learned of this behavior from this post...

jmgao··on Californians aren’t leaving the state en masse but are leaving San Francisco
No, this one: https://en.wikipedia.org/wiki/1978_California_Proposition_13

Basically, home value for property taxes gets assessed once, when you buy the property, and it can only go up by inflation after that.

jmgao··on How fighting games use delay-based and rollback netcode (2019)
Not rolling back can be used to cheat too, by artifically delaying traffic while you're getting comboed to throw people's timing off.
jmgao··on How fighting games use delay-based and rollback netcode (2019)
There's generally not all that much point to rollback-style netcode in first person shooters, because you can just run asynchronously and do client-side prediction. If the prediction was wrong, it doesn't matter that much: you might have missed a shot and they're not quite where you expected they were. In fighting games, that's completely infeasible, because each player's actions are completely determined by the previous ones: either I hit you, and I'm going to continue into a combo that's very timing specific, comparatively, or you blocked the hit, and I'm doing something completely different.
jmgao··on From Idea to Printed Circuit Board in One Week
The pricing is extremely non-competitive: $4/sq inch for a single copy. For my last PCB order (230mm x 145mm), JLCPCB was $67.18 for 10 boards, ordered on 2021-02-18 and delivered on 2021-02-23.

Patchr is quoting this for 7 day production time for a single board:

    Price Estimate: $206.80

    * Not including tax

    * Not including shipping
jmgao··on Timezone Bullshit
> both The USA and Canada have been toying with the idea of dropping daylight savings time

Individual states are toying with the idea as well [1], which presents a problem if one of the tzdata locations decides to change its rules. You're screwed no matter what you choose to do. :-(

1: https://www.syracuse.com/state/2020/11/state-senator-introdu...

← PreviousPage 3 of 9Next →