krut-patel
But how does it determine when it should write to disk? Does every write to a potentially OOM operation get preceeded by a check? Take the case of a HashAggregate. The DB clearly cannot know at compile time how many unique keys will be present in the hashtable; it needs to resize at runtime. So does that mean all the hashtables are still using some form of Bump/Arena allocators backed by the pre-allocated memory?
Maybe I should just read the source code :)
> use a GeneralPurposeAllocator and setting "enable_memory_limit" and "requested_memory_limit"
Interesting! I hadn't looked at GeneralPurposeAllocator too closely, but yes these seem like the right way to do things instead of abusing FixedBufferAllocator as I did.
> If the purpose is to "only use the stack"...
Not really, I just had to decide on some arbitrary upper bound on the mem usage, and the default stack size (8MiB) seemed like a decent choice. In retrospect, this challenge only took shape because my solution to Day1 used a FixedBufferAllocator backed by a buffer on the stack, and I realized how easy Zig made it to track allocs. I didn't fiddle too much with the general structure of the solution after that, and made it a "challenge" to see how far I could take it.
> Another potential challenge is to pre-allocate instead
Ah, that sounds much more difficult. This is also what TigerBeetle is doing [1]. But one thing I didn't understand even from that post, how would one deal with data structures that really depend on the input data, like the hashsets in TFA? Simplest way I can think of is to have an arbitrary upperbound on the allocated memory and then keep checking before every operation on any dynamic structure. That sounds tedious. Is there a better way?
[1]: https://tigerbeetle.com/blog/a-database-without-dynamic-memo...
Let me know if you need a full explanation as to why.
Personally, I still prefer the user style over Github's solution. I find the official black theme has too much contrast (it was probably made for amoled), and the bluish-black variant looks ugly to me. The user style has very good greys, and as a bonus, I've fallen in love with the cross-hatch pattern background it provides.
Just in case you didn't know, since the SolarWinds debacle from last year, Microsoft has completely blocked authorisation for corpnet and other tools on anything other than enrolled devices. And since they only support managed devices on Windows/MacOS, using Linux for day job is a no go. Last I checked, circa Jan, I couldn't use Teams/Office on a web browser in Linux (of course, this might have changed in the meantime).
A slightly better solution I have found helpful is to pull down Yakuake (or krunner) and run `kdeconnect-cli --refresh`. Beats having to open a QT window, only to be closed off immediately.
0 - https://github.com/lucaong/minisearch
1 - https://lucaongaro.eu/blog/2019/01/30/minisearch-client-side...
This was literally the project I worked on this summer, as an application of GANs for "image translation". We basically trained some of the latest GAN models on our dataset of Pepsi and Coke bottles. Thankfully, all the research papers are accompanied by complete tensorflow/pytorch implementations so we only had to do minor modifications to train/test them on our dataset. The results were mixed, it worked pretty well for bottles on white backgrounds, and one network properly learnt the importance of orientation of the logo (horizontally flipped images generated corresponding flipped target logos). The field is pretty nascent, and from the papers I've read, NVIDIA Research seems to be making good progress on this. I believe in two or three years, we can definitely see this tech in production.