HackerTrans
TopNewTrendsCommentsPastAskShowJobs

glittershark

no profile record

Submissions

A new C++ back end for ocamlc

github.com
237 points·by glittershark·4 mesi fa·20 comments

Hyperoperations in C++

khz.ac
3 points·by glittershark·7 mesi fa·0 comments

The Ribbon Microphone

khz.ac
207 points·by glittershark·anno scorso·65 comments

How much does Rust's bounds checking cost?

blog.readyset.io
204 points·by glittershark·4 anni fa·186 comments

comments

glittershark
·anno scorso·discuss
it looks like there's a recording linked at the end of the post
glittershark
·2 anni fa·discuss
there are plenty of people with commit bits (me included) who don't reside in Russia, and would (I hope) be pretty alert to the Russian state coercing tazjin (the only committer currently residing in Russia) into introducing some form of backdoor.
glittershark
·4 anni fa·discuss
The benchmarking harness that the post uses is based on criterion
glittershark
·4 anni fa·discuss
a 10% drop in performance with bounds checks removed, mind you - so if anything the bounds checks are improving performance.
glittershark
·4 anni fa·discuss
there's a cheeky link to idris's vector type in the second paragraph: https://www.idris-lang.org/docs/idris2/current/base_docs/doc... which accomplishes just that
glittershark
·4 anni fa·discuss
We've thought about that, actually! We have an experimental mode where multiple copies of the same query can be created (actually just multiple copies of the leaf node in the dataflow graph, so intermediate state is reused) with different subsets of keys materialized - the idea is then that these separate readers would be run on different regions, so eg the reader in the EU region gets keys for EU users, and the reader in the NA region gets keys for NA users.
glittershark
·4 anni fa·discuss
the remaining 10% of the 90%-off free lunch is pretty much just eventual consistency - it can occasionally be the case that you write something to the DB, and an immediate subsequent write doesn't see it. That said, there are escape-hatches there (we'll proxy queries that happen inside of a transaction to the upstream mysql/postgresql database, and there's an experimental implementation of opt-in Read-Your-Writes consistency), and I'd wager that the vast majority of "traditional" web applications can tolerate slightly stale reads.

Our official docs also have an aptly-titled: "what's the catch?" section: https://docs.readyset.io/concepts/overview#whats-the-catch
glittershark
·5 anni fa·discuss
yeah, I picked Box mostly as a pedagogical instance of the identity functor that already exists in the stdlib - in the real world you'd definitely want `struct Identity<F>(F)` instead.
glittershark
·5 anni fa·discuss
that seems like something that would only really work with a type system that's as structural as TS (vs rust, which is very nominal)
glittershark
·5 anni fa·discuss
yes! once you use it you start wanting it everywhere, which is a big part of why I wish I could do it in Rust
glittershark
·5 anni fa·discuss
I think it probably falls more into the category of removing a restriction rather than a new feature, but I'm still waiting on HKTs - not for traits (as a former die-hard haskeller, I have been gradually converted to the side of "rust doesn't need a Monad trait") but for data types. There's a design pattern in haskell called "Higher-Kinded-Data"[0] where you parametrize a datatype on a type-constructor, and use that to generically define either partial or total versions of that data type- something like (in rust syntax):

    struct Person<F> {
        pub name: F<String>,
        pub age: F<u32>,
    }
where you can then have `Person<Option>` be a person that may or may not have all fields filled, and `Person<Box>` be a person with all fields definitely filled. This is something I find myself reaching for surprisingly frequently when writing rust, and I feel like it's a missed benefit of implementing higher-kinded types.

[0]: https://reasonablypolymorphic.com/blog/higher-kinded-data/

All that said, I'm really excited to have const generics land! Props to all the amazing work by withoutboats and the entire rust team.
glittershark
·5 anni fa·discuss
Pretty sure this paper describes what they're doing now: https://research.fb.com/publications/flighttracker-consisten...