HNHacker News
TopNewBestAskShowJobs

dgroshev

1,778 karma · joined September 30, 2014

submissionscomments
dgroshev··on Rustgo: Calling Rust from Go with near-zero overhead (2017)
Yes, thank you, my bad. Fixed.
dgroshev··on Rustgo: Calling Rust from Go with near-zero overhead (2017)
I'm not sure what you mean by "don't compose well".

You can call sync code from an async function perfectly well. Going the other way around is either very simple in a throwaway code (just use pollster or tokio's block_on), or requires appropriate care (because async means IO and calling a function doing IO means your function now does IO too).

I believe what most people are struggling with is having to think about doing IO instead of just doing IO wherever. But that's a feature, not a bug, and an overarching theme in Rust: you need to think what you're doing and how everything will work together. Yes you can't just put an async call somewhere down the stack without changing the signatures, but that's a good thing.

dgroshev··on Third-party cookies have got to go
Legally they can't even with a typical banner, since consent has to be specific and informed. There can be no informed consent when the banner presents 100+ data processors. The problem is that it's not enforced in any way.
dgroshev··on Third-party cookies have got to go
I agree that we need to change the way of thinking about this, but I disagree with your particular proposal.

The change we need is to realise that this is not a technical problem and it can't be solved by technical means.

On the one hand, some of the largest US corporations are interested in subverting people's privacy. Some of those corporations directly control our computers and software running on them. They also spend billions to keep ahead of any non-megacorp competition (there's a business reason why Google keeps extending Chrome at breakneck speed).

On the other, the underlying problem is a kind of a prisoner dilemma. Spying-driven advertising is ultimately zero (or negative) sum for society [1], but any "defecting" company will be punished by relative sales underperformance. It's a coordination problem and it requires disincentives for defectors, which is not something we can engineer our way out of.

The solution has to be well enforced privacy protecting laws. Think GDPR, but with actual teeth and antitrust action, not letting companies get away with malicious compliance like sham "consent" forms directly violating GDPR [2].

Unfortunately, even on this forum there is very little understanding of the necessity of regulation, and I doubt things will change much. It pays very well to destroy privacy and open web (remember AMP?), and there is very little financial gain in going the other way. In fact, it's professionally harmful, since enablers are more likely to gain and hold power over those who object.

My only hope is relative outsiders in the EU legislature.

[1]: We haven't seen an explosion of productivity attributable to FAANG, so ultimately customers have the same pool of disposable money that businesses are competing for. The businesses haven't shrunk their marketing budgets either, so if you step back and look at the before/after state of the system as a whole, nothing changed except the big shift of ad money from old platforms (including print media) towards FAANG.

[2]: GDPR requires consent to be informed and specific. Ask yourself, do you really understand what precisely your data will be used for when you look at a typical "cookie banner"? Have you ever received a notification asking you if you consent to your data being used in a new way, which is absolutely necessary under GDPR if a data controller (i.e., a business collecting your data) decides to onboard a new marketing SaaS? Have you ever heard of a substantial fine for a company collecting consent in a way that is not specific enough?

dgroshev··on Plausible Analytics: GDPR Compliance w/o Cookie Consent Banner
GDPR is not in any way ambiguous there, take a look for yourself [1]. Keeping an eye on those changes is a part of your responsibilities as a data controller, it's your vendors' responsibility to inform you of any changes, and it's your responsibility to vet vendors for GDPR compliance. Again, if your lawyers didn't explain this to you (and you haven't read the law yourself), I'd be very cautious of those lawyers.

On the other hand they probably realise there's zero chance for substantial review of your GDPR practices by the regulator (much less seeing them in court), so they can recommend sticking a useless plaster (opt-in has to be specific, and how can it be specific if you collect it for unknown future changes) and keep you in the dark about more substantial requirements.

GDPR is a very good and clearly stated law, you can read through it yourself in about half an hour to an hour, a negligible time investment for such an important piece of legislation. The purported ambiguity is a psyop by people who don't want to comply.

[1]: https://gdpr-info.eu/art-28-gdpr/

dgroshev··on Plausible Analytics: GDPR Compliance w/o Cookie Consent Banner
> We don’t control them, we don’t know what kind, if they can be considered personal info or not

If I were you, I'd consider changing my lawyers. This is explicitly forbidden by GDPR (art 28), you have to know what your contracted data processors are doing, and you have to have processes in place to assure data subjects rights (eg remove their data from your contracted third parties on request). Cookie banners have nothing to do with this, and you're in breach of GDPR cookie banner or not. If your lawyers didn't stop you from breaching art 28 but recommended slapping a cookie banner "to be extra careful", that's a major red flag.

dgroshev··on Plausible Analytics: GDPR Compliance w/o Cookie Consent Banner
I'm a bit confused. You're claiming what I'm saying is false, but you're just referring to someone advising something as a precaution? Do you have a primary source for a legislation mandating cookie banners? (Also, is there a cookie banner on apple.com?)

There is no "disproportionate punishment" under GDPR in practice, unless you're doing something egregious, and even then (see Facebook). I'm very familiar with the UK regulator, they publish their enforcement actions [1]. I'm not aware of a single case of a cautionary letter, much less "disproportionate punishment", that they sent over a cookie banner on its own. Are you?

Besides, you correctly hinted at the incentive structure. Your lawyer might advise you to slap a cookie banner just because because they have zero incentive not to, they don't care about your users' experience. You might care though. Personally I consulted multiple external DPOs and lawyers, as well as primary sources, before forming my opinion.

[1]: https://ico.org.uk/action-weve-taken/enforcement/

dgroshev··on Plausible Analytics: GDPR Compliance w/o Cookie Consent Banner
That's a bit simplistic. IP addresses are not unequivocally personal data. Let's rewind back a bit, GDPR Art. 4:

> ‘personal data’ means any information relating to an identified or identifiable natural person (‘data subject’); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, genetic, mental, economic, cultural or social identity of that natural person;

IP addresses only allow to identify a natural person when combined with other data, such as ISP data or a profile built over dozens of websites. This is not the same kind of personal data as a name + address, Breyer notwithstanding (note the bit about the ISP in the judgment).

GDPR is not about identifying an abstract entity, it's about identifying a natural person. Doing the former for long enough/with enough data allows the latter, but especially with time-limited in-memory hashes that's a non-existent window of opportunity.

In practice this'd probably need to be resolved in court, and I'm sure not a single SME using Plausible or similar will even get a stern letter, much less fined.

dgroshev··on Plausible Analytics: GDPR Compliance w/o Cookie Consent Banner
Laws don't force the cookie banners, laws force requiring consent for personalised tracking. Banners as we know them are malicious compliance. There's a difference.
dgroshev··on Local First, Forever
Same! I'm not a user (somehow), but I really appreciate the thought and polish that went into Muse. It's an incredible piece of design, in the widest sense of the word.
dgroshev··on Local First, Forever
(this should probably be a post)

CRDTs and local first are ideas that is perpetually in the hype cycle for the last decade or so, starting around the time Riak CRDTs became a thing and continuing all the way to today.

Niki's post is a perfect illustration: CRDTs offer this "magical" experience that seems perfectly good until you try building a product with them. Then it becomes a nightmare of tradeoffs:

- state-based or operation-based? do you trim state? how?

- is it truly a CRDT (no conflicts possible), a structure with explicit conflict detection, or last-writer-wins/arbitrary choice in a trench coat that will always lose data? Case in point: Automerge uses pseudo-random conflict resolution, so Niki's solution will drop data if it's added without a direct causal link between the edits. To learn this, you have to go to "under the hood" section in Automerge docs and read about merge rules very attentively. It might be acceptable for a particular use case, but very few people would even read that far!

- what is the worst case complexity? Case in point: yjs offers an interface that looks very much like JSON, but "arrays" are actually linked lists underneath, which makes it easy to accidentally become quadratic.

- how do you surface conflicts and/or lost data to the user in the interface? What are the user expectations?

- how do you add/remove replication nodes? What if they're offline at the time of removal? What if they come online after getting removed?

- what's user experience like for nodes with spotty connection and relatively constrained resources, like mobile phones? Do they have to sync everything after coming online before being able to commit changes?

- what's the authoritative node for side effects like email or push notifications?

- how do you handle data migrations as software gets updated? What about two nodes having wildly different software versions?

- how should search work on constrained devices, unless every device has the full copy of the entire state?

Those tradeoffs infect the entire system, top to bottom, from basic data structures (a CRDT "array" can be many different things with different behaviour) to storage to auth to networking to UI. Because of that, they can't be abstracted away — or more precisely, they can be pretend-abstracted for marketing purposes, until the reality of the problem becomes apparent in production.

From Muse [1] to Linear [2], everyone eventually hits the problems above and has to either abandon features (no need to have an authoritative email log if there are no email notifications), subset data and gradually move from local first to very elaborate caching, or introduce federation of some sort that gravitates towards centralisation anyway (very few people want to run their own persistent nodes).

I think this complexity, essential for local-first in practice, is important to contextualise both Niki's post and the original talk (which mostly brushed over it).

[1]: https://museapp.com/podcast/78-local-first-one-year-later/

[2]: https://www.youtube.com/watch?v=Wo2m3jaJixU

dgroshev··on I like the RP2040
If I get your question right, you still need some host software (like a rust compiler)! It's not exactly micropython experience.

The bare minimum would be one of the examples [1] compiled with a Rust compiler and then transformed into a .uf2 file with elf2uf2 [2]. You can then just drag and drop the .uf2 file into the "mass storage device" presented by the bootloader. To get the bootloader to mount, you press a button on a Raspberry Pico (or short two outputs if you're using bare RP2040) while plugging it in.

You'll probably want a debug probe [3] driven by probe-rs [4] at some point, it's just much more convenient to flash and debug with it.

[1]: https://github.com/embassy-rs/embassy/tree/main/examples/rp/...

[2]: https://github.com/JoNil/elf2uf2-rs

[3]: https://www.raspberrypi.com/documentation/microcontrollers/d...

[4]: https://probe.rs/

dgroshev··on I like the RP2040
I'm not sure how things are in the C land, but if you write Rust take a look at this book [1], Embassy has a very good support for the RP2040.

Probe-rs [2] works perfectly well with GDB and the CLion debugger.

[1]: https://embassy.dev/book/

[2]: https://probe.rs/

dgroshev··on I like the RP2040
You can have several bootloader stages, and in fact that's how the RP2040 works [1]!

Stage 1 bootloader is the one in ROM and it normally just reads stage 2 from the flash chip. Stage 2 then initialises the flash properly, and you can have further stages like [2] to implement the trial-rollback procedure.

Stage 1 is a safety net, even if the trial-rollback procedure goes terribly wrong the device can still be unbricked over USB.

[1]: https://blog.usedbytes.com/2021/12/pico-serial-bootloader/

[2]: https://embassy.dev/book/#_bootloader

dgroshev··on I like the RP2040
I completely agree that it's inconvenient as a developer tool, a debug probe is much, much nicer.

I just think that despite all testing and care bugs are still possible, and the ROM bootloader is a backup that's always there. Plop a tiny switch on the PCB, and even if I screw up an OTA update customers will still be able to flash with no special tools (if the device has a USB port, that is).

I also use it as a recovery state for panics, makes the device impossible to brick by a panic loop.

dgroshev··on I like the RP2040
Personally I wouldn't put it into a toothbrush (the benefit of right sizing is too high when you produce tens of millions of those), but for lower volumes I'd go for it.

Fwiw I'm working on my own consumer product/dev tool and I'm very happy with the RP2040.

dgroshev··on I like the RP2040
I ended up cutting a section on Rust support from the post, but if you're open to Rust (iirc you were sceptical at some point?), async Rust is really pleasant to use in embedded. Dario Nieuwenhuis, one of the main people behind Embassy, gave a great overview talk at RustNL: https://www.youtube.com/watch?v=H7NtzyP9q8E
dgroshev··on I like the RP2040
Ooops, you're right! Fixed & attributed.
dgroshev··on Kino: Pro Video Camera
This was a very interesting read, thank you.
dgroshev··on Formlabs Form 4 Teardown
One often under-appreciated aspect is that they have a tiny set of SKUs, which means opensource contributions/docs/articles/hype are all concentrated on those few SKUs. It's especially true for RP2040, their competitors have massive lineups that help to right-size the MCU, but this also means that any given SKU has less opensource support.
dgroshev··on Google is overhauling search results with AI overviews and Gemini organization
I think people haven't fully clocked yet how foundational this shift is for the wider internet.

For decades now, we had a social contract: Google scrapes our websites and surfaces some of our content, we make it easier for them, Google gets people on our websites, and in exchange Google gets content (links) to stuff with ads (plus they get some tracking on top).

This created an ecosystem where people are incentivised to create better websites. You create good content, Google surfaces it, you get eyeballs, and it's a decent deal overall.

Sure, this dynamic is contingent on Google fighting SEO spam, which they seemingly stopped doing lately, but still there was hope that it's temporary. There was hope that if search gets bad enough they'll start bleeding users to competitors and get their stuff together.

Now Google throws the contract out of the window. Whatever you write or record or snap or shoot, they ingest everything (because we have no choice) and feed it into their Moloch, and out goes unattributed, unverifiable, ad-ridden slop. There is no compensation, no recompense.

Google is midjourneying the entire internet.

dgroshev··on GPT-4o
I don't think that'd work without a dedicated startup behind it.

The first (and imo the main) hurdle is not reproduction, but just learning to hear the correct sounds. If you don't speak Hindi and are a native English speaker, this [1] is a good example. You can only work on nailing those consonants when they become as distinct to your ear as cUp and cAp are in English.

We can get by by falling back to context (it's unlikely someone would ask for a "shit of paper"!), but it's impossible to confidently reproduce the sounds unless they are already completely distinct in our heads/ears.

That's because we think we hear things as they are, but it's an illusion. Cup/cap distinction is as subtle to an Eastern European as Hindi consonants or Mandarin tones are to English speakers, because the set of meaningful sounds distinctions differs between languages. Relearning the phonetic system requires dedicated work (minimal pairs is one option) and learning enough phonetics to have the vocabulary to discuss sounds as they are. It's not enough to just give feedback.

[1]: https://www.youtube.com/watch?v=-I7iUUp-cX8

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
Yep.

HMS Dreadnought: Length: 160m / Beam: 25m / Displacement: 18410t

Acorn-class destroyer (contemporary with Dreadnought): Length: 75m / Beam: 8m / Displacement: 780t

Burke Flight III: Length: 155m / Beam: 20m / Displacement: 9900t

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
ATGMs or drones don't "reduce the value of tank" because there is nothing better than tanks for when you need mobile protected firepower. If you think being vulnerable in a tank sucks, try storming through a field on foot.

Tanks' value doesn't come from their invulnerability. They weren't invulnerable since WW1, if ever. Their value comes from being better than alternatives.

As for Javelins, Javelins don't need operators that have to sit still and blind, guiding their slow drones to targets. Javelins don't need dedicated operator teams, US army more or less hands them to infantry platoons as needed. Javelins don't need "infantry cover", their operators are infantry. Javelins are fire and forget, so you can shoot and immediately leave, unlike drone teams. Javelins don't require extensive training and fine skill.

The only thing Javelins don't do is first person videos. See my original point about drawing wrong conclusions from footage we get to see.

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
We had man-portable ATGMs for decades, they didn't "lower the value of a tank".

Less than 10% is not good when you consider how much does it cost in practice. Drone teams are often 2 pilots + technician + explosives technician (an incredibly risky job btw, those bastardised RPG warheads are live and sensitive) + infantry cover. At least double that if you want to strike beyond line of sight and need a retransmitter drone. Those teams can only move at night and on foot because they are actively hunted by the other side. They can only have one or two drones simultaneously in the air at best, and the drones need to get to their targets first without giving away the launch point. All of that for less than 10% success rate is not "incredibly effective".

Now compare to fire-and-forget Javelins that are way more lethal and are just something added to a normal infantry platoon.

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
Basic FPV drones are rapidly getting countered/obsolete. The moment people start doing something smarter/custom the drones stop being cheap.

It's an unavoidable dilemma: commodity stuff is cheap, but easily countered; stuff that isn't easy to counter isn't commodity and isn't cheap. You probably heard "yes but you can JUST add a jamming-resistant radio, and a thermal camera, and autonomous recognition/coordination, and larger payload, and…", but that's just motte-and-bailey.

Plus the drones still need the payload. If they are used against armour, they need shaped charges, which aren't free. In practice they often get random RPG-7 HEAT warheads from Soviet stockpiles, but we can't compare that with newly manufactured western 155mm HE.

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
They are only a thing for navies that can't afford anything better. We just call our battleships "destroyers" now, Burke Flight III and Type 45 are almost exactly the size of HMS Dreadnought and half the displacement (we don't do armour anymore).

The top end of course got much bigger, CVNs displace almost twice as much as Yamato.

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
Both sides suffer from shell and ATGM shortage and inability to suppress/destroy air defences, which drives suboptimal adaptations. An FPV drone assembled in a garage from aliexpress components and a tesla battery [1] with a submunition extracted from a cluster shell [2] is more effective than a single old howitzer with 10 shells per 2km of frontline [3], but it's a pretty low bar.

The 10% estimate is not mine, it's from a legitimate expert who regularly goes to the frontline in Ukraine.

[1]: An amusing anecdote from that podcast: Tesla battery packs are a big source of batteries for FPV drones. The packs can be sourced for next to nothing from totaled Teslas, and individual cells are very reliable.

[2]: https://www.twz.com/ukrainians-are-cutting-open-u-s-cluster-...

[3]: https://foreignpolicy.com/2024/04/17/ukraine-frontline-ammo-...

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
We had pretty smart weapon systems for a while now! P-700 Granit and Brimstone missiles were doing cooperative engagement and target selection for decades. BONUS rounds fit target recognition into small pucks. If we squint just a bit, many naval mines, especially something like CAPTOR, are "vehicles that can identify and change targets fully autonomously".

AI is not the limiting factor as much as sensors, energy, datalinks, logistics, and costs are. Yes we can miniaturise TERCOM now, but then where would the vehicle get maps from (battlefields change!), how would it see the terrain (at night? on a foggy, rainy day? deliberately dazzled/blinded with a cheap laser?), how far can it travel, how much payload can it take, where does it launch from, and how does it get to the launch point? Working through those questions and anticipating cycles of adaptation, I think it's easy to end up with a $1m JASSM-ER or a $3k 155mm shell (neither of which Ukrainians have in sufficient numbers).

For example, if you know there's an enemy platoon in that forest, why would you fly a swarm of autonomous tree-avoiding hunter drones there if you can drop some 155mm instead? The enemy can't blind a 155mm shell, EW wouldn't work, shells don't care about fog or darkness, payload-to-weight ratio is ~100%, and they're cheap. Of course if you don't have shells you have to be creative, but that doesn't mean the creative solutions are better.

On the other hand, according to the episode I linked, humble unarmed non-AI DJI Mavics have a very persistent and systemic impact. They provide 24/7 eyes in the sky over the entire front line, which makes tactical surprise impossible. This is very much not "AI swarming slaughterbots" many seem to imagine and invisible to folks on the sidelines like us, but that's why I'd be cautious of making inferences from the media we get to see.

dgroshev··on Air Force picks Anduril, General Atomics to develop unmanned fighter jets
Can you please elaborate which part of the comment you are refuting?
← PreviousPage 10 of 15Next →