HNHacker News
TopNewBestAskShowJobs

Cyph0n

9,737 karma · joined July 2, 2011

Software engineer @ Google.

All views are my own, etc.

* Homepage: https://assil.me

* Github: https://github.com/aksiksi

* Twitter: https://twitter.com/aksiksi

[ my public key: https://keybase.io/aksiksi; my proof: https://keybase.io/aksiksi/sigs/PhsFUqf4TTQdHrQvnrRhLU4bgilyPjSZjo5DQFHM9QU ]

submissionscomments
Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
1) Uh.. not terrorism? Hate crime perhaps, but that should be decided by a jury, not unilaterally determined by the gov.

2) So arms manufacturers participating in a war (at best!) are now equivalent to.. gay establishments? I suggest thinking through your examples before sharing them :)

Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Even if I hadn’t, I surely would have by now given the amount of “gotchas” in this thread using this crime as some kind of smoking gun justification for proscription.

But it is good to know that criminal assault is now equivalent to terrorism.

Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Spray painting a bunch of airplanes is terrorism. Got it.

Oh, and don’t come crying when the same authoritarian laws put in place for Palestine Action are used to label your cause as terrorism to quash dissent.

Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Next time, if you really want to have a serious discussion, cut the snark and try not to hide behind a throwaway. This is not Reddit.
Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Alright, your good faith arguments have convinced me! To summarize:

On one side, two sovereign nations setting press restrictions in areas they control. Standard stuff.

On the other side, a genocidal state blockading a tiny strip of land for 20 years waging a campaign that has killed & maimed so many children that we have lost count unilaterally enforcing a total international media blackout. Also standard stuff.

Silly me, how could I even argue about this? It’s just so damn obvious! Sometimes, arguing with random anons on HN pays off :)

Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
No, they’re not the same, and (2) is very relevant.

Let me reiterate: Ukraine is a sovereign nation with a sovereign military that has the ability to enforce restrictions within its own territory.

To bring your bad analogy more in line with reality on the ground, imagine if Ukraine was still part of/occupied by the USSR/Russia, and Russia enforced press restrictions across all of Ukrainian territory during a Ukrainian insurgency. However, in this theoretical USSR, Ukrainians did not get Soviet citizenship, and were under a total blockade.

> The only major difference is that Ukraine is >1000x larger, and has safe areas far from any fighting where such press restrictions aren't needed.

But Israel never allowed press into the strip, even during “ceasefire” periods - like right now! This implies that Israel is not somehow paternalistically concerned for press safety; it simply wants a media blackout.

So no, this “major difference” is irrelevant when comparing restrictions between the two conflicts.

Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Bad analogy, for two reasons:

1. Ukraine’s media restrictions are virtually non-existent when compared to those enforced by the Israelis in Gaza, including the intentional bombing of media offices. Keep in mind that Hamas has repeatedly called upon Israel to allow foreign press and NGOs to visit and see what’s happening on the ground.

2. The Ukraine war is a conventional war between sovereign nations with standing militaries with equivalent capabilities (air force, anti-air defenses, armored vehicles, bomb shelters, etc). The Gaza genocide is an onslaught by a sovereign nation with a well equipped military against a militant group in a dense urban area. Leveling entire city blocks when fighting against an opponent that has no air force or anti-air capabilities is not only unimpressive, but also breaks the principle of proportionality.

Cyph0n··on Embassy: Modern embedded framework, using Rust and async
Wow, this dude is good! Thanks for sharing.
Cyph0n··on Replit founder Amjad Masad isn’t afraid of Silicon Valley
Or even international media outside of proctored propaganda trips. They obviously have learned their lesson since the 1982 invasion.
Cyph0n··on C Is Best (2025)
Yep, the “split” between core and std is brilliant. It enables so many usecases: one example I ran into recently is compiling Rust (core) to eBPF.
Cyph0n··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
I am unfamiliar with the details of distro packaging. Do they commonly use the attribution to route CVEs?

Regardless, the maintenance burden remains.

Cyph0n··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
Not sure I follow. Suppose you tore out a portion of libxml2 for use in your HTTP server. A CVE is filed against libxml2 that is related to the subset you tore out. Obviously, your server doesn't link against libxml2. How exactly would distro maintainers know to include your package in their list?
Cyph0n··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
Advocates of the C approach often gloss over the increased maintenance burden, especially when it comes to security issues. In essence, you’re signing up to maintain a limited fork & watch for CVEs separately from upstream.

So it's ultimately a trade off rather than a strictly superior solution.

Also, nothing in Rust prevents you from doing the same thing. In fact, I would argue that Cargo makes this process easier.

Cyph0n··on No strcpy either
Indeed I have haha - my bad :)

Easier to lose context with longer comment chains...

Cyph0n··on Jeffgeerling.com has been migrated to Hugo
Just wrap it in a Nix flake and define a devshell. The entire config won’t exceed more than ~10 lines of Nix.

Once setup, all you need to do is:

    $ nix develop —-command hugo regenerate
    $ # version is pinned by flake.lock
The beauty of this approach is that it extends to almost any CLI tool you can think of :)
Cyph0n··on 2025 Letter
Why should one feel uncomfortable?
Cyph0n··on 2025 Letter
You essentially have two stratums of society:

(1) the middle class (and above) who have money to spend on services

(2) the migrant working class, the bulk of whom send every last extra penny back home as remittances to support family

The second class of people are not considered as a market for the majority of services in the UAE. In the case of food, when they do eat out, they frequent traditional, low cost/quality establishments.

As for why a Big Mac costs that much, labor definitely doesn’t have much to do with it. My impression is that prices continued to get pushed up as long as sales didn’t take a hit, which means it’s mostly pure profit.

Keep in mind that the median salary isn’t that high. Without looking it up, I would guess it’s approx $25k USD/year, but I haven’t lived there in a while.

Cyph0n··on Only 5 Sears stores remain in the U.S.
Wait, were those tools all Sears branded? Hopefully they were private label and not actually manufactured by Sears!
Cyph0n··on 2025 Letter
The example I like to use to demonstrate how broken labor vs. service costs are in the UAE is to compare the price of a Big Mac meal to the price of a standard manual car wash (closer to detailing tbh).

In the UAE, a Big Mac meal costs approximately 35 AED ($10). On the other hand, a manual car wash - approx. 1-2 hours of labor - can cost you around 20 AED.

In other words, you could get almost two manual car washes for the price of a Big Mac.

Cyph0n··on No strcpy either
Then you misunderstand what unsafe means in Rust. Every single Rust binary needs to eventually call unsafe code at some layer of the callstack.

Is creating a TCP socket using stdlib functions unsafe? How about writing to a file? Or acquiring a mutex?

I would suggest doing some more reading before chiming in here :)

Cyph0n··on No strcpy either
No, that’s the unchecked version. Two people are telling you that this method exists and is safe, so I am not sure why you’re still doubting this lol.
Cyph0n··on Go away Python
Where does uv download the Python interpreter to?
Cyph0n··on No strcpy either
It is safe btw. The difference is that it returns two mutable references vs. one shared ref and one mutable ref. But as they noted, a mutable ref can always be “downgraded” into a shared ref.
Cyph0n··on Odin: Moving Towards a New "core:OS"
Eh, it’s not uncommon to need this distinction. The Go convention is to return (res *MyStruct, ok bool).

An Option type is a cleaner representation.

Cyph0n··on No strcpy either
Gotcha. There is a split_at_mut method that splits a mutable slice reference into two. That doesn’t address the problem you had, but I think that’s best you can do with safe Rust.
Cyph0n··on No strcpy either
Do you mean borrows for different fields of a struct? If so, that’s handled today - it’s sometimes called “splitting borrows”: https://doc.rust-lang.org/nomicon/borrow-splitting.html
Cyph0n··on Go away Python
This comes with the added benefit that your environment is reverted as soon as you exit the Nix shell.
Cyph0n··on No strcpy either
The problem isn't undefined behavior per se; I was using it as an example for strncpy. Rust is a no - in fact, the goal of (safe) Rust is to eliminate undefined behavior. Zig on the other hand I don't know about.

In general, I see two issues at play here:

1. C relies heavily on unsized pointers (vs. fat pointers), which is why strncpy_s had to "break" strncpy in order to improve bounds checks.

2. strncpy memory aliasing restrictions are not encoded in the API and can only be conveyed through docs. This is a footgun.

For (1), Rust APIs of this type operate on sized slices, or in the case of strings, string slices. Zig defines strings as sized byte slices.

For (2), Rust enforces this invariant via the borrow checker by disallowing (at compile-time) a shared slice reference that points to an overlapping mutable slice reference. In other words, an API like this is simply not possible to define in (safe) Rust, which means you (as the user) do not need to pore over the docs for each stdlib function you use looking for memory-related footguns.

Cyph0n··on No strcpy either
strncpy doesn’t handle overlapping buffers (undefined behavior). Better to use strncpy_s (if you can) as it is safer overall. See: https://en.cppreference.com/w/c/string/byte/strncpy.html.

As an aside, this is part of the reason why there are so many C successor languages: you can end up with undefined behavior if you don’t always carefully read the docs.

Cyph0n··on Lotusbail npm package found to be harvesting WhatsApp messages and contacts
I think the solution is a build system that requires version pinning - options include Nix, Bazel, and Buck.
← PreviousPage 9 of 34Next →