News for hackers. Stuff that matters.

CrendKing

Re:Yet another way to invoke functions without parentheses on Friday October 16, 2026 @07:31AM (#50117115)
Not gonna work on Firefox, since according to the doc, Error.prepareStackTrace is an optional API and only implemented by V8.
So many companies send emails with multiple different address. For example, Citibank could send from [email protected] or [email protected]. Bank of America can be [email protected] or [email protected]. If the "Citibank inbox" just takes the first address that Citi happens to use and auto rejects all future others, user will lose critical emails without even knowing. There is no way either user or the app could guarantee an entity will ever only use one address for legitimate reason.
I don't know the details on how Flock is internally designed, but I suppose AI is at least involved in the image recognition and correlation, at least to this scale. I also don't know exactly why Flock misidentifies Issacs' car in this case, because I don't find it in the article or the interview, but I assume it is due to a mislabeling of the plate number or the car damage imagery, which is related to AI. Correct me if I'm wrong.
I'm not saying the police has no fault. Using AI assist without secondary verification is never good idea, at least not in 2026. But you can't argue Flock the technology itself, and especially Flock the company, are totally innocent, just like you can't say the "guns are just tools like hammer, it only depends on who uses them", and the gun industry.
But Flock gives police overconfidence to commit actions instead of having due diligence. It is like the best student in your classroom tells you 2 + 2 = 5, and you naturally feel compelled to believe him, even there is clear evidence against the claim.

This is also comparable to self-driving car: Waymo's system has achieve the level of "less error than human on average" long time ago, but they are still only doing slow expansion. Why? Because when AI is involved, human naturally expect them to be almost 100% correct, not just barely better than human, otherwise why bother use AI (and all the troubles to legalize for AI) in the first place? So in this case, I guess the police just blindly trust the AI being 99.99% correct.

Re:Recovering Corrupt Zip Files on Saturday August 29, 2026 @06:19PM (#49493797)
I just tested. 7-Zip is already doing exactly what the author's recovery tool does: if I delete the metadata at the end of the file, it still can open and extract files, while complaining about the harmless "Unexepcet end of data". Further, even if I delete the actual content of the last file, it still can show the directory structure, it just can't extract data of the last file.
But how to you quantify the effect of the exposure? How do you know a particular sale is converted through some impressions you put on Facebook six months ago, and not from a highway billboard one week earlier? If you can't accurate quantify the effect of each ad campaign with their conversion rate, you have no reason to put more funds into this particular Facebook campaign. So naturally it falls on Facebook to prove to you that their ad socket is actually generating conversion, by not showing the ads to people who is least likely to click through ads when shown.
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).

Re:Forget Flags and Scripts: Just Rename the File on Wednesday March 18, 2026 @04:03AM (#47422921)
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.
Re:Why doesn't Rust care more about compiler performance? on Thursday June 12, 2025 @06:28PM (#44263897)
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.
Re:The humble for loop in Rust on Thursday December 12, 2024 @05:31PM (#42404109)
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?
Re:The Two Factions of C++ on Sunday November 24, 2024 @07:36PM (#42231993)
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.

Re:I Replied 'Stop' to a Political Text Message. I Got 100 More on Thursday October 31, 2024 @08:41PM (#42012983)
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.
Re:How I write code using Cursor: A review on Tuesday October 29, 2024 @02:44AM (#41980089)
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.
I don't know why didn't PEP 420 make one file at root of the package that describe the structure of all the sub-directories, rather than going the controversial, lazy route to remove __init__.py. That way you get both the explicitness and avoid the litering of empty marking files.
Re:QtCS2024 Compile once. Run everywhere on Friday September 06, 2024 @08:21PM (#41470670)
The page 8 ("Building") of the slides has the badger picture to the right. His right hand has some weird "nails". Another example of AI-generated image.
Re:Dark Mode Sucks on Thursday September 05, 2024 @06:36PM (#41460975)
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?
Re:Dark Mode Sucks on Thursday September 05, 2024 @06:17PM (#41460843)
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.

Re:Dark Mode Sucks on Thursday September 05, 2024 @06:13PM (#41460822)
> 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.

"Blame" 2FA for your own mistakes just sends bad message. How do people who are capable of setting up 2FA (therefore not tech-illiterate) still don't use password manager? Imagine storing either the 2FA secret or the backup code in it.
Re:Font with Built-In Syntax Highlighting on Wednesday August 14, 2024 @11:04PM (#41252805)
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.
Re:Writing an MP4 Muxer for Fun and Profit on Thursday July 18, 2024 @08:44PM (#41001106)
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
> What if you tried to hit a baseball pitched at 90 percent the speed of light?

https://www.youtube.com/watch?v=3EI08o-IGYk

Re:Passkeys – Under the Hood on Sunday March 17, 2024 @10:42AM (#39734783)
> 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.

Re:Please Make Your Table Headings Sticky on Saturday February 24, 2024 @03:18AM (#39490045)
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...

Older »