Recent submissions

Comment · 8 months ago
Probably Compiling Pattern Matching to Good Decision Trees (by Luc Maranget) is the scheme used by OCaml (http://moscova.inria.fr/%7Emaranget/papers/ml05e-maranget.pd...).

It explains how to minimize the decisions trees you obtain from a match statement, so you gain a ton of efficiency over a naive implementation, especially for large, multi-column matches.

Comment · 1 year ago
Here's some specs: https://www.asus.com/displays-desktops/monitors/proart/proar...

8K, 32inch, 275ppi, 60Hz 2 Thunderbolt 4, 1 DisplayPort 2.1

Comment · 3 years ago
Not really sure how this is supposed to be low risk -- I think they're omitting the actual interesting parts of the strategy (that are essential to actually making money).

If you want to be the first or close to the first in the queue on a price level, you're there before it becomes big. So then your "risk-free" closing strategy doesn't work, because if you get traded against, you will have to close out your trade at a loss, since the price level is gone (because it wasn't big yet).

But if you wait until the level becomes big, you will no longer be at the front of the queue, so the strategy doesn't work.

Comment · 3 years ago
Comment · 3 years ago
Comment · 4 years ago
I'm really surprised how much a single search query is costing them in terms of compute/infrastructure (1.25 US cents). That buys you more than a minute of compute time on the top vps on hetzner. What's happening behind the scenes during a query?

Getting the compute costs down will probably be a major obstacle to growth, since they'll have to keep prices high (19 USD/month) to pay for their infrastructure.

Comment · 5 years ago
The issue is that the requester is asking for 329000 pages, and courts apparently previously ruled that a rate of 500 pages/month is reasonable for freedom of information requests.

And looks like more narrow requests for documents would be completed faster: "If Plaintiff decides to request fewer records, then FDA will be able to complete its processing at an earlier date."

Comment · 5 years ago
You stop to refuel in the middle of the trip, rather than making it nonstop.
Comment · 6 years ago
What will you use multicore support for?
Comment · 11 years ago
It's not really surprising that invalid code doesn't go along with compiler optimizations.

The correct way to deal with this here is probably either _NOT_ using nullptr, and instead using a special null object (similar to the end iterator); or using pointers instead of references (because you really want pointer behaviour).

Their fix is insane, and not something I'd want in production code. Unless you carefully vet your code and compiler version, you should never rely on undefined behaviour.

(There are some cases in the c standard that technically undefined but all compiler vendors have essentially agreed to handle in the same way; so those are fine. IIRC unions are a common example.)

Comment · 11 years ago
Comment · 11 years ago
Ocaml can do this

  let do_something (thing : Thing.t) (logging : [`With_logging | `No_logging])  =
  ...
Even better, it can even infer the type based on you using it (for example matching on it):

  let do_something thing logging =
    let logging_as_bool = 
      match logging with
      | `With_logging -> true
      | `No_logging -> false
    in
    ....
Comment · 11 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton