News for hackers. Stuff that matters.

dklsf

Re:Compiling Match Statements to Bytecode on Saturday March 07, 2026 @05:03PM (#47291879)
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.

Here's some specs: https://www.asus.com/displays-desktops/monitors/proart/proar...

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

Re:The 0+ HFT Strategy on Saturday May 20, 2023 @10:14PM (#36017392)
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.

It depends what you mean by "untradeable". If the market or regulator decides that the stock cannot be traded at all, you might end up paying a lot of money in fees for years even if you were right.

https://www.reuters.com/article/muddy-waters-asia-short-sell...

In some markets, such as Hong Kong, instead of being delisted, suspected frauds are often halted (the stock cannot be traded). So you might end up paying the borrow fee for years, even though you were right about the company being a fraud.

See https://www.reuters.com/article/muddy-waters-asia-short-sell...

Re:Kagi/Orion status update: First three months on Thursday September 01, 2022 @11:52AM (#32678220)
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.

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."

You stop to refuel in the middle of the trip, rather than making it nonstop.
Re:OCaml for the Skeptical: OCaml in a Nutshell (2006) on Monday August 03, 2020 @07:25AM (#24036373)
What will you use multicore support for?
Re:The Dangers of Super Smart Compilers on Sunday December 20, 2015 @07:53AM (#10766907)
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.)

I'm not sure where you got your numbers for China's debt from. The IMF says that china's debt has decreased (from 26% to 19%), while the US's has stayed the same (~100%):

  General government gross debt [Percent of GDP]
  Country        Year  2012 2013 2014 2015
  China                  26   23   20   19
  United States         102  104  106  107
http://www.imf.org/external/pubs/ft/weo/2014/01/weodata/weor...
Re:Get rid of boolean function parameters on Monday June 15, 2015 @07:32AM (#9718678)
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
    ....
Doesn't look like the information on that site is correct. Or at least, it disagrees with https://www.henleyglobal.com/international-visa-restrictions... The differences are quite striking, the US isn't even in the top 10.
Re:Why Are Carrots Orange? It Is Political (2009) on Sunday March 15, 2015 @07:48PM (#9208775)
How can "some scholars doubt if orange carrots even existed prior to the 16th century", if there are drawings of orange carrots from the year 512?

http://de.wikipedia.org/wiki/Karotte#/media/File:Gemeine_M%C...

http://en.wikipedia.org/wiki/Vienna_Dioscurides

Re:The world's biggest ship – for 53 days on Thursday January 08, 2015 @08:19AM (#8856212)
It's a bit slow and inefficient, and also dangerous to do it at sea. So this is done only if space in the port is at premium.

Which means only Hong Kong still does this: http://en.wikipedia.org/wiki/Mid-stream_operation

The motivation for development was actually producing fertilizer, as it says in the article you linked.