Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aliceryhl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
31.
▲
by
aliceryhl
4y ago
We have this in Denmark. It's pretty great. Two-factor authentication for bank logins, gov websites, and for online card purchases.
32.
▲
by
aliceryhl
4y ago
The article specifically talks about C, which does not have RAII.
33.
▲
by
aliceryhl
4y ago
Our shower has two dials: temperature and pressure. The temperature dial has a specific temperature that it will "snap" to. (When increasing temperature, it will stop there unless you hold in a button. It doesn't snap when de
34.
▲
by
aliceryhl
4y ago
An interesting example is chessable, which is a spaced repetition system for chess. It keeps track of each move in a sequence of moves separately, but every time it asks you to re-learn a specific move, you are asked to play out the whole s
35.
▲
by
aliceryhl
4y ago
In my experience, you can get it to change its mind by troubleshooting the connectivity issues. E.g. if you use dig to get the ip and then ask curl to use that ip instead of a dns lookup, then it works for me.
36.
▲
by
aliceryhl
4y ago
> Rust is like a truck driver who tried to make a race car that doesn't blow up. Lamborghini originally made tractors.
37.
▲
by
aliceryhl
4y ago
Maybe that first value is a bunch of zeroes? Since you mention Rust, here's a neat piece of trivia: `vec![0; N]` compiles down to a `calloc` call. (Well Rust's own version of `calloc`.)
38.
▲
by
aliceryhl
4y ago
I wrote my own program that submits new RSS entries to my todoist account once each night.
39.
▲
by
aliceryhl
4y ago
> If you assign a primitive type's value to another variable, the value is copied - not assigned a reference to the first variable (which is what happens for objects). Assigning an object also just copies the value - i.e. the refere
40.
▲
by
aliceryhl
4y ago
They mean the amount of storage, and they're only counting additional memory allocated by the algorithm, and not the memory containing the input.
41.
▲
by
aliceryhl
4y ago
They are not the same. "Expected" refers to the running time of a single operation when it uses randomness. "Amortized" talks about what happens when you call the same operation multiple times (it has nothing to do with
42.
▲
by
aliceryhl
4y ago
I have two monitors of this model and they work great with both my work and personal laptop, both of which run Linux. You can connect the monitors with a display port cable, then use a single USB-C cable to connect both to the laptop in one
43.
▲
by
aliceryhl
4y ago
In my case I sometimes work from home and sometimes from the office. The laptop is handy since I can bring it with me and use the same computer at both workstations, both of which have external monitors.
44.
▲
by
aliceryhl
4y ago
Google has a blog post that says the same thing: https://cloud.google.com/blog/products/identity-security/goo...
45.
▲
by
aliceryhl
4y ago
Link cut trees. They can be used to query information about paths in a forest, while also allowing you to add and remove edges in the forest. For example, you could use them to store the minimum spanning tree of a graph, while supporting up
46.
▲
by
aliceryhl
4y ago
It's not possible to have multiple 1.x.y versions of the same crate in your project, so you would need a really old library that depends on Tokio 0.2.x for that to happen. This isn't something that normally comes up in practice.
47.
▲
by
aliceryhl
4y ago
Why do we need an explicit construct for this as opposed to e.g. having the compiler replace the tail call with a goto back to the beginning of the function?
48.
▲
by
aliceryhl
4y ago
The difference has to do with ownership, and it has nothing to do with mutability. For both types, you can mutate them given a mutable refence, and you can't given an immutable reference. For an example, an `&mut str` can be modi
49.
▲
by
aliceryhl
4y ago
The notation means that it must be faster than m^t for any t strictly greater than one. Basically, it means that you can have any number of log factors on the running time, so it could be m*log(m)^1000
50.
▲
by
aliceryhl
4y ago
You already have to spend the time to go through the list. Just add up the xor as you iterate through the list.
51.
▲
by
aliceryhl
4y ago
At my university, I had an (optional) course called high performance computing, which was 90% about writing cache efficient programs.
52.
▲
by
aliceryhl
5y ago
Have anyone actually tried to file a lawsuit to get Google's attention in a case like this?
53.
▲
by
aliceryhl
5y ago
See also this similar post: https://www.reddit.com/r/rust/comments/u5edlo/crossbeam_tool...
54.
▲
by
aliceryhl
5y ago
The way those languages implement something that is uncolored is by making everything async. Rust has some other use-cases where that's not acceptable.
55.
▲
by
aliceryhl
5y ago
It is perfectly reasonable that `from_utf8_unchecked` is unsafe because the sequence of operations `from_utf8_unchecked(array).chars().next()` will call [1] and can trigger memory unsafety with the `unwrap_unchecked` call if the array is no
56.
▲
by
aliceryhl
5y ago
The Rust Vec type has an unsafe function called `set_len` that changes the length of the vector without checking whether the new length is in bounds, or whether the memory containing any new values is initialized. The body of the function i
57.
▲
by
aliceryhl
5y ago
It's not flamewar content yet, but it definitely is flamewar bait .
58.
▲
by
aliceryhl
5y ago
You probably have a plugin that translates http links into https.
59.
▲
by
aliceryhl
5y ago
They used the real inputs. The example inputs were used to filter out which candidates to submit for the 10 tries.
60.
▲
by
aliceryhl
5y ago
No, they gave the algorithm 10 tries and tested all of them, and said that it was solved if any one of them worked.
More ›