HNHacker News
TopNewBestAskShowJobs

brtv

21 karma · joined June 6, 2020

submissionscomments
brtv··on Are We ... Yet?
For C++ there's also: https://arewemodulesyet.org/
brtv··on I made a quieter air purifier
I think this done to create a slight overpressure which helps keep the dust out.
brtv··on Firefox is the best mobile browser
I've been using Firefox on desktop for decades and really want to like it on mobile, but I just can't get used to the behavior of new tabs . After just a bit of browsing, it opens 10+ new tabs and there's no way to configure this differently. It's such a shame.
brtv··on I wrote my PhD Thesis in Typst
Interesting! Did you use a tool to do the conversion automatically? How did it pick up on custom packages and styling?
brtv··on An update on Mozilla's terms of use for Firefox
> It also includes a nonexclusive, royalty-free, worldwide license for the purpose of doing as you request with the content you input in Firefox.

Do I understand it correctly that they can now use everything I read or type in the browser as they please, including for AI training?

Considering that I do most of my work in webbased enail, issue tracker and other internal tools, this sounds like a direct violation of my NDA.

brtv··on Ask HN: what are examples of successful "open-source alternatives"?
Nextcloud and Bitwarden come to mind.
brtv··on Ask HN: How to Learn Design Patterns?
IMHO the best book on design patterns is: https://gameprogrammingpatterns.com/ Examples are in C++ but easy enough to understand even if you're not familiar with C++.
brtv··on The missing C++ smart pointer
You always know the actual dynamic type at construction time, how would you otherwise construct it?

> For example shared-ptr to base can correctly invoke the correct derived type

Invoke what exactly? Im sorry I don't understand what you're trying to say here.

I guess you can force all derivied types to implement a clone() function, such that box<T> can do the deep copy, but Id consider that a fairly big inconvenience for such a simple pointer type.

brtv··on The missing C++ smart pointer
With polymorphism, you typically want base classes that provide a general interface, that many classes can derive. In places where you use this pointer-to-base, you don't need/want any knowledge of the derived type. It is an unneeded depedancy, which would only increase compile time, or worse, cause circular dependancies.

I'm not a big fan of RTTI, and not even sure if it would work here. But once you start keeping track of all derived types, you might as well use an std:: variant. It's more cache friendly too, so more performant in many cases.

brtv··on The missing C++ smart pointer
> std::box<T> addresses these issues by offering deep copying and automatic garbage collection

This is pretty much impossible when holding a pointer of base class. However, this is a primary reason for having pointers in the first place (polymorphism, and having abstract base classes).

In all other cases, you're probably better off with either the raw value, std::variant or std::reference_wrapper.

brtv··on Ask HN: How do you synchronise your notes?
I quite like NextCloud. It's a general purpose file hosting software, so you can dump anything in there. On Desktop I use VS code to write markdown, and on mobile I can edit and preview md files on the fly with the Nextcloud app. And then there's also the dedicated Nextcloud Notes app.

I'm using a Hetzner StorageShare, but you can also host it yourself, it's open source.

brtv··on Why SQLite is so great for the edge
Interesting! I'm currently working on a system that writes time series data to raw binary files, but we're considering switching to a different file format for the same reasons. Have you considered any other formats, such as hdf5?
brtv··on Negative Mass
Also the last one: "Negative mass is attracted to positive mass". How? With gravity 2 positive masses attract to each other. I don't know what happens if 1 mass is negative , but to me it's not obvious that they still attract.

And I don't see how this relates to the previous examples. In my mind, impact and friction has nothing to do with gravity.

brtv··on I.reddit.com Has Been Deprecated
I feel the same way. For me, the worst part about new mobile is the overlay that appears on every page reload to force me to use their mobile app. And it's noticably slower to load.
brtv··on I.reddit.com Has Been Deprecated
You could try the browser extension "Old reddit redirect".
brtv··on Ask HN: How do you manage your important personal documents and other data?
Transip Stack cloud storage, 6 euro/month for 1 tb of storage. Not as polished app and experience as Dropbox, but gets the job done for a descent price. They support both webdav and sftp, i use the latter for editing my markdown notes on my phone. https://www.transip.nl/stack/

Im thinking of giving nextcloud a try to see how it compares.

Oh and Bitwarden. It's great that I can share passwords with my partner that way.

brtv··on Correctly implementing a spinlock in Modern C++
I quite liked the book "C++ Concurrency in Action: Practical Multithreading". It has been a few years since I've read it, but it gave me a better understanding of both C++ and concurrency in general.