HN user

CrendKing

563 karma
Posts0
Comments127
View on HN
No posts found.

1) If it really was a bomb and went off, the pilot wouldn't be there to explain to the press anyway.

2) How likely would a bomb's name really be "BOMB" vs anything else? If the latter is any higher, wouldn't it be reasonable to always turn around whenever the any other name shows up? In that case, all Bluetooth devices should be strictly banned in the cabin. But TSA is not doing that (not yet).

Yesterday I found an app that I need to keep my bluetooth headphone from entering sleep mode. It is Sound Keeper: https://veg.by/en/projects/soundkeeper/. And it uses exactly the same approach talked in this article. For example, normally its filename is SoundKeeper64.exe. But if you rename it to SoundKeeper64AllOpenOnly.exe, it switches behavior to operate on "All" devices with the "OpenOnly" mode.

I believe most of the time this phrase is said to an inexperienced artisan who has no idea how the current system works, what's the shortcoming of it, and how to improve upon it. Think of an undergraduate student who tries to solve the Goldbach conjecture. Usually what ended up is either he fails to reinvent the wheel, or reinvent the exact same wheel, which has no value. The phrase certainly does not apply to professionals.

Why can't Cargo have a system like PyPI where library author uploads compiled binary (even with their specific flags) for each rust version/platform combination, and if said binary is missing for certain combination, fallback to local compile? Imagine `cargo publish` handle the compile+upload task, and crates.io be changed to also host binaries.

Maybe I'm dumb, but I can't see how the code in the "Errors and map" section can compile. "transform_list" returns a Result<>, yet "result" is just a Vec. I thought you always need to wrap it with Ok()? Is that a new nightly feature?

But Edition can exist only because Rust intrinsically has the concept of package, which naturally defines the boundary. C++ has nothing. How do you denote a.cpp be of cpp_2017 edition which b.cpp be cpp_2026? Some per-file comment line at top of each file?

C++ is a mess in that it has too much historic baggage while trying to adapt to a fiercely changing landscape. Like the article says, it has to make drastic changes to keep up, but such changes will probably kill 80% of its target audiences. I think putting C++ in maintenance mode and keep it as a "legacy" language is the way to go. It is time to either switch to Rust, or pick one of its successor languages and put effort into it.

I don't understand the strategy from the election spammer here. They clearly want the recipient to vote/donate. But if someone spends time to type "STOP" instead of ignoring, he has clearly read the message and not interested in the solicitation. Then why spam this particular number? The more flood the more he hates you, the less he's gonna to anything positive to you. It is a extremely low quality "live number" for the campaign, and waste of money.

I've been using AI to solve isolated problems, mainly as a replacement of search engine specifically for programming. I'm still not convinced of these "write whole block of code for me" type of use case. Here's my arguments against the videos from the article.

1. Snake case to camelCase. Even without AI we can already complete these tasks easily. VSCode itself has command of "Transform to Camel Case" for selection. It is nice the AI can figure out which text to transform based on context, but not too impressive. I could select one ":, use "Select All Occurrences", press left, then ctrl+shift+left to select all the keys.

2. Generate boilerplate from documentation. Boilerplate are tedious, but not really time-consuming. How many of you spend 90% of time writing boilerplate instead of the core logic of the project? If a language/framework (Java used to be, not sure about now) requires me to spend that much time on boilerplate, that's a language to be ditched/fixed.

3. Turn problem description into a block of concurrency code. Unlike the boilerplate, these code are more complicated. If I already know the area, I don't need AI's help to begin with. If I don't know, how can I trust the generated code to be correct? It could miss a corner case that my question didn't specify, which I don't yet know existing myself. In the end, I still need to spend time learning Python concurrency, then I'll be writing the same code myself in no time.

In summary, my experience about AI is that if the question is easy (e.g. easy to find exactly same question in StackOverflow), their answer is highly accurate. But if it is a unique question, their accuracy drops quickly. But it is the latter case where we spend most of the time on.

1. The richest 1% vote whoever makes them even richer, at the expense of all the other 99% poorer than them. 2. The other 99% people no longer play the "democracy" game with the rich, form their own government without the "voting power corresponds to how much tax paid". 3. The rich people country loses its foundation, thus can no longer sustain. The rich join the poor people country.

Dark Mode Sucks 2 years ago

Last time I calibrated my monitor for sRGB, the first step DisplayCAL ask me to do is to aim for 120 nits brightness. Sure a screen is capable of outputting 500 nits, doesn't mean you have to use its full capacity. Unless you guys are writing code or reading book under HDR mode all the time?

Dark Mode Sucks 2 years ago

I completely disagree. I personally find dark mode harmful to my eyes. Try this: open a page full of white text on black background. Stare at it for 10 seconds. Now close your eyes. You can clearly see the afterimages of those bright text lingering for quite a while. Now try this with black on white page. No afterimage at all.

Like the author says, if the screen is too bright for you, lower the brightness, or use night light mode. You can change your environment. You can't change how your eyes/brain function.

Dark Mode Sucks 2 years ago

I find it much less painful on the eyes to read in dark mode at night

I don't understand this. Do people not use lamp or light source in their house? Are people living like cavemen? Otherwise, how is it that much difference between day and night+lamp?

If it is sleep time, there is already blue light filter most OS supports nowadays. No need to ask each app to support a separate color scheme.

How is this syntax highlighting? If you put "<div>" in quotes as string, it's still green instead of white. Proper syntax highlighting must account for both languages and content in context, which can't be done with just a bunch of simple static rules.

Can someone explain how does an existing media player understand the new mdat format without modification? I assume if they find a completed moov at end of the file, it would recognize the file as a unfragmented mp4. It should then try to find a list of recognized codecs directly inside the mdat (like in the first picture), but instead they will find another moov, a bunch of moofs and sub-mdats, all of which are clearly not proper for a unfragmented mp4. Why doesn't the player report this as a "unrecognizable, badly formatted" mp4 file?

If a website uses targeted ads and track users, they won't use the PPA feature Mozilla introduces here. So the setting won't affect user. On the other hand, if a website is not evil and willing to sacrifice revenue for better user privacy, and use non-targeted ads, PPA gives them tool to do so. In contrast, the current adblocking methods are blunt forces. They don't distinguish the nature of specific ads.

This gives me impression like what happens to the nuclear weapon proliferation. At beginning, it is an arms race, between US and USSR, between users and advertisers. Either side thinks they can't survive without vanquishing the other. Eventually they realize it is stupid to continue, and reach a point to both step back.

I think Mozilla is at the point where they realize it is no longer beneficial to continue the race against advertisers. It is time to collaborate. This way both users, advertisers, and maybe Mozilla themselves can all benefit from stepping back one foot.

I personally support this move. Morally speaking, content creators I consume deserve income from my visit, as long as my privacy is preserved. Seems a good compromise if it works.

According to my test, xxhash-rust does have significant edge over TwoX-Hash. However, it is still slower than GxHash.

  gxhash
    | 4 > 8300.74
    | 8 > 16684.68
    | 16 > 33121.69
    | 32 > 38146.97
    | 64 > 57805.72
    | 128 > 49712.76
    | 256 > 69277.29
    | 512 > 88315.11
    | 1024 > 97135.29
    | 2048 > 98200.60
    | 4096 > 104709.01
    | 8192 > 108988.86
    | 16384 > 110630.70
    | 32768 > 111406.96

  xxhash (twox_hash)
    | 4 > 1291.20
    | 8 > 2579.19
    | 16 > 6029.70
    | 32 > 10281.18
    | 64 > 15950.47
    | 128 > 22031.84
    | 256 > 17929.12
    | 512 > 20728.87
    | 1024 > 21683.24
    | 2048 > 21679.94
    | 4096 > 21732.89
    | 8192 > 21748.57
    | 16384 > 21534.84
    | 32768 > 21703.27

  xxhash (xxhash-rust)
    | 4 > 1968.26
    | 8 > 3946.71
    | 16 > 8030.94
    | 32 > 13099.80
    | 64 > 19073.49
    | 128 > 23469.46
    | 256 > 22909.73
    | 512 > 33117.15
    | 1024 > 42467.53
    | 2048 > 54638.44
    | 4096 > 63193.78
    | 8192 > 68677.38
    | 16384 > 71658.92
    | 32768 > 71421.18

Yet last I tried on Google having a login/password is mandatory

I just tried and all I need to provide is the email ID and passkey. You need to use the "Try another way" option.

If implemented correctly user shouldn't even need to provide the user ID at all.

You would think it's that easy to make the table heading sticky with just one `position: sticky;`, until you decide to do anything with the table content.

I have a table with sticky head. Then I decide to add a memory feature, where if user scrolls the table body, and leaves the page, I'd save the index of the first visible row, and restore the scroll position when user comes back. I noticed that every time the restored position is always about one row too downward. For instance, when I want to restore to row 5, it restores to row 6 plus a few pixels. Turns out, once I turned the thead semi-transparent, I can see row 5 was indeed at the top of the table, but the thead just overlaps on top and making it look like row 6 is the first visible row.

I told myself, no problem, I just modify the scroll position to be aware of the thead's height. It worked fine at first, but from time to from it'd still be off a few pixels. Turns out, because the table is huge, I'm doing lazy loading upon the scroll event. And because I'm using the default automatic table layout (instead of the fixed layout), sometimes certain head cell becomes too narrow and word wraps, thus increases the whole head's height. The final solution is to create a ResizeObserver[1] on the thead element and dynamically adjust the scroll position if its height changes.

[1] https://developer.mozilla.org/en-US/docs/Web/API/ResizeObser...

Sudo for Windows 2 years ago

I disagree. Although this "Sudo for Windows" is not a one-to-one port from Linux, it does the same function which is to elevate a unprivileged command. Imagine if they announce "Introducing Dosu for Windows", you won't know what the hell that is without reading at least the first paragraph.

I think that list is limited to languages whose name comes from real life entities, and optionally with an interesting story behind. Names like "SQL" or "C" are more like pure knowledge rather nice good gossip.

Are you saying if you use physical SIM from AT&T on those iPads, the problem would suddenly go away? I thought regardless which kind of SIM you use, when a device joins the carrier's network, they have to identify itself with EID (or something equivalent). If AT&T has a block on that ID, why would the kind of SIM matter?

If there is a specific law forbidding carriers to put any kind of block on a device using only physical SIM, but not if eSIM, I'll be interested to know that law. And if that's the case, wouldn't it be obvious that because eSIM is a relatively new thing, the law is just lagging behind, not that eSIM inherently a bad thing?

I have no idea what "wash sale" is. I only heard that term when I was reading the help page in TurboTax, which I'm effectively forced to use.

Seriously, I doubt there is more than 100k people in US that have this "wash sale" any year. I'm so tired of every time someone suggests automatic tax filling, there is always one guy bring up some tax term that 99.99% people never heard of. Sure, if auto tax filling doesn't solve your wash sale calculation, feel free to go back to TurboTax. Let the other 99% people who have one job and no other complicated tax situation skip this yearly nonsense.

How about a middle ground, where if I set up MFA on my account, I automatically disable the access from "distant relative" who haven't setup MFA, even if I want to share my data with them. Because fundamentally this incident is not serious if such transitive access was not employed in the first place.

And since this is a specific access pattern for 23andme, I agree we shouldn't involve government here.

2nd City Zoning 3 years ago

Wait, so commercial zones are supposed to be only in strips and around street, and industrial zones are not actually far away from residential? Guess I always played SC2000 wrong back in the days.