Recent submissions

Comment · 1 year ago
Any plans to make it possible to run shellcheck on the embedded scripts?
Comment · 1 year ago
Comment · 1 year ago
Comment · 1 year ago
Highly recommend the Dr. Stone anime if you're interested in a story with the premise of starting civilization from scratch but armed with the sum total of modern human knowledge about science and engineering.
Comment · 1 year ago
I also wrote my solution in Rust. I was pleased that my approach gave me an opportunity to write a linked list and get the chance to apply some rarely used learning[0].

My solution doesn't use SIMD, but is actually takes about the same amount of time as the the solution in the article, given the same number of cores, though an glaring weakness of my approach is that it can only scale up to 7 cores as written.

Rough outline of how mine works:

- Set current best GCD to 1.

- Search through all valid board configurations.

- Bail out from the search early if the current partially generated board couldn't have a GCD greater than the current maximum found, e.g. if we've only generated two rows of the board, and the GCD of those two rows are already less than the max.

- Update the current best GCD as you find higher ones.

- Share the current best GCD value across multiple threads. That way the longer the program runs, the earlier and earlier the searches will start bailing out.

- Don't always read from the shared variable to avoid contention. Instead, each thread has its own copy of the last value it read which we compare with first before copying and caching the shared value.

- Another interesting property of this approach is that it can be used to validate the correct solution even faster than it takes to find it. Instead of initially setting the max GCD to 1, set it to `solution - 1`. That way branches in our search will bail even sooner from the beginning. This leads to the program running about 20% more quickly.

Source: https://gist.github.com/lazytype/35b45f3ea81b5c1c5555546fe6f...

[0] https://rust-unofficial.github.io/too-many-lists/

Comment · 2 years ago
Out of Dropbox's long history of acquisitions, very few of the products from said acquisitions have survived. Did this factor into your decision to join Dropbox and if so how did you weigh that risk?
Comment · 3 years ago
Comment · 3 years ago
I don't know if its aim is necessarily to model anything you can do in JS. At the moment, TypeScript has zero understanding of prototypal inheritance and there hasn't been any visible progress in that direction.
Comment · 3 years ago
Comment · 4 years ago
How about making Github-Current actually have a good code review UX?
Comment · 4 years ago
Thanks. I think by default, "do what you want" also includes the ability to redistribute the source code with a different license, so would probably need a clause to cover that at least.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton