Hacker Newsnew | past | comments | ask | show | jobs | submit | brtv's commentslogin

For C++ there's also: https://arewemodulesyet.org/


> Estimated completion: 10 March 2195

lol sounds about right.


I think this done to create a slight overpressure which helps keep the dust out.


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.


Interesting! Did you use a tool to do the conversion automatically? How did it pick up on custom packages and styling?


well it was a mix of word and markdown files being converted before; converting the word files was somewhat annoying but iirc i exported them and converted those. i wrote all the custom styling we used; pretty straightforward


> 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.


"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?

Have you requested that?


Presumably they mean that if you want to post a comment to hacker news you give them the right to do what you want them to do.

I'm presuming there's no catchy legal gotcha around the "doing as you request" clause.


That's nice and all, but most people are worried about the other "rights" this would grant them and their partners. (What they can vs what they say they will)


Nextcloud and Bitwarden come to mind.


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++.


> 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.


It is actually super easy, barely an inconvenience, as long as you know the actual dynamic type at construction time.

For example shared-ptr to base can correctly invoke the correct derived type destructor even if the destructor is not virtual.

Edit: accidentally a word.


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.


No need for T to have a clone function. You can use standard type erasure techniques. Consider how std:: function or std::any is implemented.


std::variant is a nasty thing. I always try hard to find a way around it, and there is almost always a better way around it.


What's so nasty about it?

I find it a delight


Works with RTTI?


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.


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.


I used to use QOwnNotes (iirc) with NC on my desktop - and CloudNote (again, iirc) on my phone

But they would constantly complain about not being able to sync because a file was open :|

Now I just use NC to do the sync behind the scenes with Obsidian (or emacs, or any other editor of choice)


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?


The one potential requirement I'll caution you on is resilience against write failures, in case you're collecting time-series data and can't afford to lose a "session" or spend time messing with recovery options. HDF5 is not made for that. Binary and SQLite are better in that respect. SQLite wins on usability against binary and HDF5.

https://cyrille.rossant.net/moving-away-hdf5/


I'm not familiar with HDF5 but agree on resiliency. We are a collegiate racing team and our car's power rails aren't stable and redundant at all times, so power loss failure is something I've kept in mind from day one on my telemetry project. SQLite is generally equipped to handle power losses and write thread crashes:

> An SQLite database is highly resistant to corruption. If an application crash, or an operating-system crash, or even a power failure occurs in the middle of a transaction...

Quite often after a run the entire car is turned off and, on next power up, the databases are left as .db and .db-journal files. The code has no problem processing or even continuing on logging with DBs in this state.


HDF5 is more for storing and exchanging numerical simulation data. It doesn't have to be resilient to write failures because worst-case scenario you rerun the simulation or try again to copy the data into the file.

SQLite writes are "atomic" transactions. After writing new data, it goes back to the index and registers that new data has been written using a single instruction. That's why interrupting it in the middle of a write doesn't result in partial data or a corrupted index.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: