Recent submissions

Comment · 6 months ago
From a quick look it seems like it's "as fast as a linter" because it is a linter. The homepage says "Not just generic AST patterns", but I couldn't find any rule that did anything besides AST matching. I don't see anything in the code that would enable any kind of control or data flow analysis.
Comment · 8 months ago
> My takeaway is that his test email bounced

What test email? I see no mention of a test email in the blog post. The mail that bounced was the one with the verification link from Viva.

Comment · 2 years ago
> but we shouldn't forget that this kind of failure can only happen starting from an ambiguous grammar specification

I don't think that's true. The following CFG is unambiguous:

  S ::= A S | A
  A ::= 'a' | 'a' 'b'
Yet if we translate this 1-to-1 to a PEG (without changing the order of the alternatives), it's not going to match any input with 'b's in it, so it doesn't match the same language.
Comment · 2 years ago
Note that they're actually citing "Mitchell, Webb et al." in the paper.
Comment · 2 years ago
> A lot of these games with fancy anti cheat protection the cheat tools basically just tell the server "spawn me a vehicle right here" and the server just does it.

Citation needed. I'd be quite surprised if it were common for servers of professional games to trust the client in that sense (i.e. allowing it to decide game logic like what gets spawned where).

As far as I'm aware the most common types of multiplayer cheats are

* wall hacks, which you could probably prevent by not sending the client any information about objects that the player can't see, but that would require the server to calculate the line of sight for every player/object, * and aim bots, which I don't think you could prevent at all on the server side since they don't rely on the bot having access to any information that the player isn't supposed to have. They just rely on the bot being better at aiming. I suppose if you did all rendering server side and only sent the rendered graphics to the client (i.e. streaming), that would make it harder for the bot because it'd now have to do image recognition to find the target, but that just makes it harder, not impossible. Plus, game streaming wasn't well received for a reason and anyway, I don't think that's what you had in mind when you talked about "not trusting the client".

Comment · 3 years ago
And perhaps more relevantly, the regex from the article also works fine in RE2.
Comment · 3 years ago
> re2 uses a DFA-based system instead that just doesn't support the kinds of regexes that catastrophically backtrack

There are certain fearures that are harder or impossible to implement with RE2's approach, but it's not true that it doesn't support the kind of regex that would catastrophically backtrack using a backtracking engine.

`(.*a)*b` would be a (silly) example of a regex that can catastrophically backtrack using backtracking engines and re2 supports it just fine without backtracking.

Comment · 3 years ago
Yes and buying music on Amazon (which is what the comment I originally responded to was about), you get system number 2, i.e. a DRM-free MP3 download.

Buying movies on Amazon is a different matter entirely, but the comment and my reply were specifically about music.

Comment · 3 years ago
Which current systems?

For games on Steam and movies basically anywhere, the current system is that after I buy the game/movie, I can watch/play it for as long as I have access to the account. If I lose the account or the service shuts down, I'm fucked. That sucks.

For games on GOG or MP3s basically anywhere, the current system is that I buy it and then I can play the game/music forever as long as I don't lose the downloaded files. If I do lose the files, I can still redownload them as long as the service is still operating and I still have access to the account.

The second system seems fine to me.

Comment · 3 years ago
> > music I've purchased

> They really ought to stop using "buy"/"purchase" metaphorically to mean something more like "one time fee for an indefinite lease that ends upon account termination."

That doesn't really apply to buying music though, does it? If Amazon banned my account, that wouldn't prevent me from listening to the MP3s I've bought from them. It would only prevent me from re-downloading them from their servers if I somehow lost all of my local copies.

But if I buy a CD from a physical store, they also don't give a me another copy for free if I lose it (even without account termination entering into it), so I'm not really any worse off with the digital download.

Comment · 4 years ago
I wouldn't say the source language is not meaningful. If you wrote an ahead-of-time JavaScript-to-WebAssembly compiler and benchmarked the WASM generated by that, it would probably be a lot slower than the WASM generated by the Rust compiler, no?
Comment · 4 years ago
An important difference between your add method and binary search is that the signature of your add method already implies the contract that the sum of the two integers must fit into an int because there simply is no correct value of the specified return type that could be returned otherwise.

There's nothing about the signature of an ordinary binary search method that would imply that it only works for arrays that have less than MAX_INT/2 elements.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton