Better HN
topnewbestaskshowjobs
Log inSign up

codeflo

9,664 karma · joined Jun 14, 2010 (16y ago) · 1,504 submissions

Submissions

comment 4y ago · link · parent

Fungibility is a practical concept, not a legal one. Examples like crude oil, or a certain grade of steel, or yes, cash are considered fungible because there’s a market where buyers usually don’t care about the specific item’s history.

But that’s always a simplification that breaks down in edge cases, not a 100% mathematical truth.

For example, I worked on a software project where the goal was to trace a perfectly mixable material through a production chain to analyze the impact of slight contaminations that were found after the fact. The material in question would be considered fungible in most markets, but not for this specific purpose.

comment 4y ago · link · parent

You basically just explained why dollar bills are not perfectly fungible either. Nothing is truly mathematically fungible in the real world.

comment 4y ago · link · parent

In reality, few things are perfectly binary, there’s a spectrum between perfectly fungible and perfectly nonfungible.

And yes, a million dollars of stolen cash is worth strictly less than a million dollars because (leaving ethics aside) it takes a nontrivial amount of time, money and risk to launder it before you can safely spend it.

comment 4y ago · link · parent

Always with those conservative meteoric circles holding back society and thwarting progress!

comment 4y ago · link · parent

Are you writing from theory, or from personal experience with game app stores? Because IMO, this is mostly a solved problem in practice with Steam, Epic Store, Windows Store etc. That’s partly why those platforms are so popular.

comment 4y ago · link · parent

I don’t know. Nothing prevents indies from selling games directly to consumers right now — it’s not like it’s hard to integrate a payment processor to your website and an auto-updater to your software. WebAssembly only replaces the auto-updater part. The actual value that Steam adds is discovery and trust.

comment 4y ago · link · parent

At the risk of sounding cliche, I think the pattern of frequent 1:1s is a technique for managing people instead of leading them.

I've experienced this in both roles, and honestly, engineers, no matter how junior, should be able to get by a few weeks without constant management intervention.

Maybe weekly 1:1 are so common because there's a glut of nontechnical managers who don't know what else to do with their time? That's not the situation Ben Kuhn describes, but I don't know.

comment 4y ago · link · parent

I think that depends a bit on what you intended to do after the await. I’m certain there are uses of an async mutex (several libraries have one) where there’s indeed a broken invariant.

comment 4y ago · link · parent

I don’t think it’s similar at all, that was my point. The .NET runtime itself will never check a CancellationToken for you, but an API you pass it to might, of course (and many standard APIs take one as a parameter). And even then, the result is an exception, which you can catch and keep going.

That’s not at all what happens when the Future is dropped in Rust: Yes, it only happens at .await, but when it does, execution is simply stopped dead, no chance to continue.

comment 4y ago · link · parent

Maybe the use of the word “cancel” can mislead some people, because the term means a much more controlled way of shutdown in other ecosystems. For example, you can’t really stop Tasks in C# unless you explicitly pass around a CancellationToken and check it at strategic points — very similar to the one in Tokio: https://docs.rs/tokio-util/latest/tokio_util/sync/struct.Can...

What dropping futures does in Rust is much more forceful, and possibly meant for a different usecase, or as a lower-level primitive.

comment 4y ago · link · parent

> Sorry. Point taken. I'm way too quick to annoy at the moment

That makes two of us. No offense taken.

comment 4y ago · link · parent

One place I worked had very explicit rules about that that would be drilled into new recruits. Besides --help, running without argument was also required to print the help.

I was told that this rule came about when they "discovered", presumably at nontrivial cost, a disk imaging tool that would default to unconditionally mirroring the first hard disk onto the second.

comment 4y ago · link · parent

Yes, you edited your reply to be a lot less polite after you saw my reply to your reply, and I don’t think I did anything to provoke that. I might’ve responded differently if I had realized you were in attack mode.

Some points I’d like to clarify:

1. Multiple contradictory edits in the answer is weird by Stack Exchange standards regardless of the merits of the discussion, that’s the main thing I observed.

2. Whether Euclid uses contradiction or not is not really open to interpretation: the word “absurd” appears right in the proof. If people want to split hairs about whether that contradiction is in the lemma or the main proof, I guess fine.

3. There are of course multiple subschools of constructivism that accept and don’t accept different things. Not all of them ignore computational complexity. For example, some ultrafinitists reject the unique prime factorization theorem on the basis that you can’t really execute the factorization algorithm even for relatively modest numbers. To be clear, that’s not exactly my view, but I would for example agree that something like “just find the prime factors” sweeps a bit of relevant subtlety under the rug: you can only do that conceptually, not actually.

comment 4y ago · link · parent

Trying to be maximally precise, the prime G isn’t really constructed, but it must exist because ABC+1 must have a prime factorization by the fundamental theorem of arithmetic. And the contraction is that G can’t be any of {A, B, C}.

Edit: The above added a nit-picky side-point to your original response, which was a lot shorter. Afterwards, you edited your reply to be a lot more exhaustive and a lot less... friendly? I don't think that's the best way to use HN's edit window. But see my grandchild comment below for my response to all the points you edited in afterwards.

comment 4y ago · link · parent

I wonder what’s going on with the passive aggressive edit war in this answer: https://mathoverflow.net/a/23521

It’s about whether Euclid’s proof that there’s no finite set of primes is a proof by contradiction or not. The fact that this is disputed at all shows a certain unwillingness to use original sources — maybe each of them only looked at a different textbook’s restatement of the proof. Because no matter whether a proof of the theorem can be stated without contradiction, it took me all of 30 seconds to find a translation of the original proof to show that Euclid did in fact use one:

> I say that G is not the same with any of the numbers A, B, and C.

> If possible, let it be so. Now A, B, and C measure DE, therefore G also measures DE. But it also measures EF. Therefore G, being a number, measures the remainder, the unit DF, which is absurd.

(http://aleph0.clarku.edu/~djoyce/java/elements/bookIX/propIX...)

comment 4y ago · link · parent

Let’s say the buffer is nearly full, and the egress rate matches the ingress rate almost exactly. Wouldn’t that mean that the bottom of the stack (the oldest package) never gets transmitted, while the top of the stack is churned constantly? If such a situation persists, the oldest packages might not get transmitted for hours, which means they’d be lost for all practical purposes, while still taking up valuable buffer space.

However, and this probably is in the same direction as your idea, the author agrees that when deciding what to drop, dropping the oldest packages is better. I’ll quote item 9 in full because I found this a bit surprising (the sentence in parentheses is especially interesting):

> 9. Tail drop is worst drop. There are several variants of AQM (active queue management) with different tradeoffs, but almost all are better than dropping the newest packet when a queue is full. Even the opposite ("head drop") is better in many cases. (Later TCP ACKs encompass all the information from previous ACKs, so if you have to drop one, it might as well be the oldest one.) CoDel is a more refined AQM. Most AQMs are the same speed or only slightly slower than tail drop.

comment 4y ago · link · parent

You’d probably have to limit it to ASCII text, and even then use fixed-width fonts just to be sure — at least one iOS vulnerability was related to word-wrapping of Zalgo-style Unicode in lock screen notifications.

comment 4y ago · link · parent

No, the critics’ claim is that there are no ethical smart engineers in crypto. Quite an important distinction.

comment 4y ago · link · parent

It’s true that these limitations are known to the in-crowd, and also to everyone with some CS knowledge that bothered to understand a bit about the technical details.

But pro-crypto articles/posts/tweets usually fail to mention any of that, or hand-wave it away with an incorrect reference to Moore’s law. “World computer” is a specific phrase I’ve seen many times referencing Ethereum, and I personally find comparisons with the Raspberry Pi a very effective way to contextualize that.

As a consequence of all the selective information going around, some people are drawn into crypto that don’t really understand the limits of the technology’s capabilities. It’s important for the protection of those people to explain, in detail but in plain English, the gap between hype and reality.

comment 4y ago · link · parent

> I am not from Poland. Some colleagues were. They did careful calculations and went home.

So what? Poland isn't a third world country by any stretch of the imagination. There's no law of nature that living in Warsaw must be worse than living in Munich.

comment 4y ago · link · parent

I also think “GNU+Linux” is a terrible name and a worse marketing move, but you might misunderstand what it’s about. There’s no “GNU license”, and nobody ever proposed calling the system “GPL+Linux”. GNU sees itself as a project to replace the entirety Unix (hence the name, GNU’s Not Unix). A kernel is one part of the full OS, so if you combine the Linux kernel with the rest of GNU’s OS, according to this logic you get GNU+Linux. (Or maybe it should be GNU-Hurd+Linux, or GNU=~s/Hurd/Linux/... it's terrible.)

comment 4y ago · link · parent

I find the tone of entitlement a bit hard to take. Yes, cities like Munich have a huge structural problem with housing and rent. Solutions are unfortunately hard. But it’s a problem for locals just as much as it is for immigrants.

And of course Poland is a nice place to live as well, why do you make that sound like it’s a bad thing? It almost sounds as if you’re regretting some personal decisions, and are now blaming the country you moved to for not living up to unrealistic expectations.

comment 4y ago · link · parent

I have a similar take on stuff pushed onto the dev team. I think it’s often not the unplannedness of this work that’s at the root of the problem but its low value.

Pushing back against actually important unplanned work would be harmful — and usually nobody does that, which shows that it’s not actually about planning.

The point is, at least in my experience, many orgs have lots of other teams running around with ideas for things the dev team might do for them. Many of those are just not very important in the grand scheme of things. A lot less important, for example, than keeping the codebase healthy. But it’s usually not politically convenient to say that explicitly.

It’s much easier to “shut them up” by citing schedule pressure. Of course, this tactic backfires hard whenever there’s even a hint of downtime.

comment 4y ago · link · parent

Presumably no more than a dozen HN readers will understand that comparison, but now that I know he is involved, I wonder if Blocks are basically meant to be a reincarnation of ActiveX controls for the modern web.

comment 4y ago · link · parent

I was surprised to find out by Googling that by “Joel”, you actually mean Joel Spolsky: https://www.joelonsoftware.com/2022/01/27/making-the-web-bet...

I think that link is worth reading because it offers a more concise write-up of the project’s motivation.

comment 4y ago · link · parent

First of all, are you sure there isn't a way to improve the ergonomics of one without harming the other?

Second of all, to the extent that there is a tradeoff, this is essentially a solved problem in every other kind of daemon (from web servers to databases). Make the simple case secure and simple, while making the complicated case (which will require a lot of custom configuration and reading the documentation anyway, not matter what you do) as straightforward as possible.

comment 4y ago · link · parent

With all respect, we're discussing an article about the difficulty of balancing performance and security in modern compilers in the context of implementing cryptographic primitives. You might use those primitives from JavaScript (Node.js links OpenSSL, for example), not typically implement them in JavaScript.

comment 4y ago · link · parent

I don’t agree that exploit mitigation is where the bulk of the complexity in the compiler comes from. And if anything, with all the UB inference going on, modern compilers might be more likely to compile exploitable bugs into your code than old ones were. Several well-known examples of this happening exist.

(To explain: A decade ago, if there was a code path where you dereference null, you would get a clean crash. Not pretty, and potentially a denial of service, but usually not further exploitable. Nowadays, the compiler will infer that this path is not taken, eliminate the if, potentially eliminate other checks as well because they are then reasoned to be redundant, and then randomly execute something. This is practically more dangerous in a lot more situations than Spectre ever was.)

comment 4y ago · link · parent

You really do need to look at the whole chain. Of course, if Wasm had constant-time annotations as suggested by the article author, you’d expect wasm-opt to respect those.

Then there are steps below that layer to consider as well. Maybe not so relevant when targeting Wasm, but x86 code is increasingly executed inside emulators on ARM chips. Do those respect the constant-timeness?

And what about processor microcode and fused instructions, can a future CPU include an optimization that will un-constant-time your code? (In other words: I really don’t know, are there constant-time guarantees made by the ISA?)

1
303132
51