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

It's interesting reading this, wondering how much C++26 static reflection could improve the ergonomics of a system like this. Like, if you tag the class with a specific attribute, can you have have it generate the Trace() function automatically? Can you have it automatically wrap the other GC classes using the Member<> template? I think implementing the Trace() function might be doable (you'd do it in the GarbageCollected<> base class that uses CRTP, right?), but maybe not wrapping the types, I'm not sure if reflection allows you to modify types of fields in that way.

Automatic trace definetly yes, however since they also removed GC support from the standard it's quite useless (exact object tracing is useless if you cannot accurately scan the stack).

Also co-routines with it's under the hood management of coroutine stack probably would've complicated GC support even more...


C++11 GC was useless from the start, I don't get how it ended up being voted in.

At the time the two main customers of having a C++ GC would be Unreal C++ and C++/CLI, the design that landed on the standard serves neither of them, thus no one adopted it.


Peeked a bit more at the C++ 11 stuff, it seems very Boehm specific and yes quite uesless (I doubt the C++/CLI people ever considered the stuff in the standard).

Having written a bunch of more or less complete GC based runtimes, the boundary between C++ code and runtime code is often painful mostly due to GC tracking and reading the article I can only concur with what they're doing with Oilpan for V8/Chrome.

Having had a way in C++ to interrogate the current stack and then trace objects (via C++26 reflections) would've sufficed and probably alleviated the need for a separate GC.


Yes indeed, and that is why it got removed from the standard eventually, however the question remains how was this even voted in.

Which is why I became kind of vocal regarding existing practice, or at least preview for community feedback, as there are already several examples of stuff landing into the standard that were not properly baked to start with.


The standard provided no GC support. What was there was completely useless.

It seemed very Boehm specific and yes quite uesless.

Wrote a bit more in the sibling comment to pjmpl.


Lovely little alias, but I much prefer fracjson[0] pretty printing to jq, so I might go with that instead!

[0]: https://github.com/j-brooke/FracturedJson


Yes, it works exactly like this, this is a demo on godbolt [0]. rdi stores the pointer in both cases, makeS1() uses RVO, makeS2() takes it explicitly and constructs with placement new.

I will say before testing this i didn't realize the RVO calling convention was to return the pointer you pass in, but apparently so. If makeS2() returned void, it's just a tail call to the constructor, but makeS1() has to spill rbx and use it to save the pointer.

[0]: https://godbolt.org/z/ovd1n99P8


No, all you're showing in that example is that a pointer is passed as part of the ABI. You're not showing that RVO relates to that in any way whatsoever. If you write the same function in a manner that (N)RVO can't kick in, does the pointer no longer get passed?

The reason this should sound dubious is that you're suggesting the caller needs to know the callee's body in order to know how to call it, but it should be possible for the two to be compiled entirely independently, and in fact mutual recursions should be fine too. After all, the callee knows where the return value has to land either way, and the caller similarly knows where to expect it, regardless of when/how the object is constructed or destroyed.


Fair enough, I don't know the C++ ABI to this extent.


> The simple way to fork a sqlite db is just to copy it

SQLite recommends against doing that [1] while a transaction is active, because the copy might have some pre/post data in it which could potentially cause corruption. Presumably this isn't an issue with copy-on-write filesystems assuming they copy atomically, but I probably still wouldn't do it, instead use the backup API or VACUUM INTO (if nothing else, because VACUUM INTO will also obviously VACUUM the copy).

If you're not attached/writing to it, then of course it's fine.

[1]: https://www.sqlite.org/howtocorrupt.html#_backup_or_restore_...


if you don't trust something to survive an atomic filesystem snapshot, why would you trust it to survive sudden power loss?


That's what I'm saying, if you have a CoW filesystem, backing up with atomic snapshots is almost certainly fine, SQLite's advice against copying probably doesn't apply to that. But just typing `cp` in a terminal is probably not a good idea if a transaction is active (even if you're on a CoW filesystem, `cp` in experience usually isn't atomic without some flags).


I think it's reasonable for a DB like SQLite to delegate that to the filesystem. There is an overhead for doing it on the DB level, and since SQLite is just a file on the filesystem which, presumably, is serving many other files as well, why would you trust anything else on the filesystem if you don't trust SQLite? Like, your PHP script (or nginx server executable, or whatever) that is calling SQLite, that's not going to be check-summed either. Either you trust your filesystem or you don't, and if you don't, checksum and error correct on the filesystem level.

Though fair enough, it could offer it as an opt-in thing.


Because SQLite is a program, that will refuse to start or crash, and which you can trivially replace, if corrupted.

Whereas your sqlite data are your data, and if they're corrupted they can be lost forever or propagate the issue to backups.


Hopefully it crashes if corrupt... But it could instead jump straight to some code designed to clean up files and delete your database


It's a little beside the point of the post, but I just want to fly a flag for Nebula: I subscribed solely to get early versions of Jet Lag: The Game, but I'm finding myself watching it more and more! It has many of the channels I would go to YouTube for, but I've also discovered several really good ones that I had never heard of. And it has a similar feel to Kagi, in the sense of "freeing" yourself from the algorithm. It happens so often on YouTube that I see a video recommended but think to myself "if I click this, am I going to get recommendations for terrible stuff for the next month? What does this tell Google about me?". Same thing with all the big streaming services.

With Nebula, no such worry. The homepage and app isn't creepily algorithmically designed to optimize my engagement with the platform, it's just a bunch of high-quality videos and channels that I can watch with no fuss. It's remarkable how nice that feels in 2026. Really highly recommended.


The problem is that ad-blocking makes youtube the best value proposition for users. You get almost all the content of nebula, plus tons more, for free, no ads.

Don't get me wrong, Nebula is great (although yt actually has a better profit share believe it or not), but the internet needs to look in the mirror before services like it can actually compete with yt.


This surprised me, so I looked it up. Basically YouTube pays ~55% and Nebula pays 50%.

This is complicated by Nebula's "creator owned" situation. Which is complicated [0]. It's something like:

  - Nebula's assets live in Watch Nebula LLC

  - Watch Nebula LLC is owned by 83% Standard Broadcast and 16% Curiosity Stream (CURI)

  - Standard Broadcast "is owned by 44 total people, all of whom are creators"
So it's fair to say there are creators with significant equity stakes in Nebula. It's NOT fair to assume that the 50% of revenue left after share is distributed evenly among all creators on the platform via an equity mechanism.

Of course then there's Floatplane, which is entirely owned by LMG. At least a couple years ago they targeted "a 70/30 split" but arrive there via "a fixed cost menu for features [...] based on bandwidth/maintenance costs' [1]

I'm glad YT is still sharing a meaningful amount of money with creators.

[0] https://medium.com/@cameron-paul/who-actually-owns-nebula-95...

[1] https://linustechtips.com/topic/1335443-floatplane-creator-s...


Of cause, I assume it's difficult to compare 50% of paid subscriptions to 55% of ad revenue. I have heard that YouTubers earn per view from premium subscribers than from ad supported views.


I suspect that 50% at no risk of demonetization is quite a bit more than 55% with it for quite a significant chunk of those content creators.


> I'm glad YT is still sharing a meaningful amount of money with creators.

They're doing their best to stop sharing anything with all but the largest creators, since they keep increasing the monetisation requirements.


percentages are meaningless in the ad space and I think topic specific CPM would be a more meaningful comparison. Even on youtube itself things like kids toy videos can make 4x or more per 1M views when compared to a Political show or something technical.


On Nebula even the built in ads for Squarespace are gone too. Sure you could use sponsorblock, but for me I'm happy to support Nebula as their creator netowrk are people I want to support directly with my dollars.


The problem is, google is an advertising company now the "ad-blocking makes all content free" is a temporary argument at best. At any rate, I like Nebula's curated content better than the ai-slop/clickbait slop Youtube provides.

Only pet peeve I have is... jeffiot is in Nebula, Tom Scott is in Nebula, Lindsey Ellis is in Nebula... where is f4mi????????


We shouldn't forget that Google tried to push the whole remote browser stack attestation thing (WEI). That is where they want to go. We shouldn't follow them there.


I have both, and I find my YouTube home page way more diverse than Nebula. Nebula is an invite-only clique and they invite people who look like them. YouTube, for me, has a lot more British creators, a lot more people of colour, a lot more women creators, a bigger diversity of topics and subjects, a lot more deep technical stuff. Nebula is a lot of American guys discussing movies and politics, with only the very recent addition of Token Brit Tom Scott.

I'm yet another person who only got Nebula for week-early access to Jet Lag, and I think if that particular show ever went away or took an extended break, Nebula would be struggling. I find myself watching something on YouTube most evenings, I rarely find myself on Nebula when Jet Lag isn't on.


Wasn't Abigail PhilosophyTube, a British woman, one of the Nebula founders? I guess perhaps it has changed since the early days.I remember them kicking off JT Second Thought.


I'm not saying it doesn't have any, just that it doesn't have as many. My YouTube is just so much more diverse in every way, I'm never going to get my favourite UK canal boat creators on Nebula for instance. Nebula is a narrow thing for a narrow audience that likes one specific type of online video.

My Nebula runs out at the end of the year and I'm not renewing, I'm not that fussed about seeing Jet Lag a week late, and none of the other stuff is really for me. I'll divvy up my £60 a year Nebula sub to a few creators I like.


Seconding this. I've been subscribed to Nebula for a couple years, as I watch a lot of video essayists on Youtube and like half of them are on Nebula. In addition to ad-free viewing, you also get:

* No in-video sponsor segments

* Exclusive videos (including some creators and series that upload primarily to Nebula)

* Early access to some videos

* Uncensored videos, as Nebula does not have the automatic content or copyright enforcement systems that Youtube has

* A decent TV app (at least on Roku), so I can watch ad-free on the TV without paying for Youtube premium

All for a much cheaper price then Youtube Premium ($60 annually vs $160, with frequent promo offers). If you already watch a lot of Youtube channels that are on Nebula, I'd highly recommend it.


Wish these guys did localised pricing. YT Premium costs around ~$12 annually in India. Nebula costs the same $60


> It happens so often on YouTube that I see a video recommended but think to myself "if I click this, am I going to get recommendations for terrible stuff for the next month?

You can remove videos from your watch history. Or you can open the link in a private/incognito window. Google may still be able to connect it but I don't think it will impact your recommendations that way.


I suggest just turning off watch history/suggestions.

I only use YouTube when I want to watch something specific. If I find something I want to return to, I like it or bookmark it or add it to a playlist.

I feel like the only thing I'm missing is a home page which doesn't tell me I have watch history disabled.


Yes, of course you can, but this sense of always having to curate your watch history and hide from the algorithm is just not there for Nebula. I guess it's different from person to person, but it's remarkable how freeing it feels to me to use a service where that isn't a concern. I'm watching what I want to watch, not what the algorithm is manipulating me to click on.

Maybe it will enshittify like most everything else, but it hasn't so far, and for now I'm a very happy customer.


To me it doesnt feel limiting. I curate it to get good recommendations. I also switch between accounts. One for trash binges, and one for everyday stuff, one for serious technical content etc.

I use "do not recommend this channel" a lot, and click "not interested" a lot. Open the YouTube front page, remove stuff you would prefer not to have there, refresh, repeat, the algo will adapt.

Same hygiene on social media. Add muted phrases, mute people, click "not interested". It improves the experience a lot.


You can also just turn off your watch history completely and use the subscriptions page as your starting point. I did that for a while, but turned it back on when I realized that the algorithm was actually quite good at surfacing content that I learned a lot from -- most of it was stuff that I would never search for on my own (or even know to search for).


Unfortunately for me it went the other way. I was an early Nebula subscriber but in my experience the content got super stale and I found myself struggling to find anything interesting to watch after a few months. After a few years of using it maybe once a quarter, I pulled the plug. I hope it's temporary and I am an avid Kagi user so I am 100% willing to pay for add free content. I wish Nebula had a pay-per-view option so I could pay for the content I use.


For the past day or so I’ve been baffled why this font has lingered on HN’s front page. And I read this comment several times and I kept wondering what is he talking about, it’s just a font. A very good font that I actually think is nice and my friend who is a designer is quite taken by, but still it’s a font.

Today, I finally search for nebula streaming and found the actual site his comment is referring to so here it is: https://nebula.tv/

Side note: it’s a minor nit that HN seems to have a very frequent problem with threads getting hijacked with unrelated comment threads, often the top comment(s). I wish there was a way to split the comments off with a new title that clearly explained that this is not related to the original post.


I guess Nebula is better for video watching, but without recommendations and video comments, it feels dead. I did pay for it for a year and then gave up. Is the problem me?


I log on once a day and can see everything that was uploaded in less than two minutes. No need for recommendations. Considering how cheap it is I'm happy if I only find one or two videos a week worth watching.


I think that's totally fair, it's just different people come to youtube for different things. Nebula is just a different value proposition.


Yes, but no.

Different tools work better for different people, if you want/need yt features that aren't found in the alternative then it is the right choice for you.


I signed up for Nebula, it is a lot more for HD quality, which I though was sneeky.

In the end I never got in the habit of opening Nebula to watch the content.

I pay for Premium YouTube and have noticed when there's an in video ad you can skip through to the end of the ad, YouTube have set that up.

I tend to watch 2 minute of several videos on rotation, I guess I should just put the Apple TV out of reach and I can't keep channel twitching


Yeah I...just never end up opening the Nebula app, which I honestly find harder to use than the Youtube app.


Nebula is very much my cup of tea in theory but the android app is So Bad that I unsubbed. Watching a long video and need to stop? Better luck next time, we're not about to save your spot. Didn't remember the exact name of something? Good luck finding it again. Not at all interested in a certain creator? Too bad! You're going to see them whenever they produce.


Seconded. My only complaint is the bad buffering on the TV versions of the Nebula app. It starts out so low quality and takes forever to snap to 1080p, with no option to override quality, on symmetrical 2.5GBe.


Obviously YMMV, but I haven't had any issues like that, the quality of the videos is the same I get in the YouTube app. They take a few seconds longer to start though.


This is interesting, I didn't know about Nebula. Anything to support less intrusive platforms and stop being followed for months by horrible content because you clicked on the wrong video.


I absolutely love the idea behind Nebula, but to this day there isn't a single creator there that I'm interested in actively following...

A big part of it is just my hobbies being different, but a no small part is that the videos are still the same YouTube videos that are first and foremost built to satisfy the algorithm. And since these are all people who are successful on YouTube, the concentration of such videos is higher than on actual YouTube.


> The homepage and app isn't creepily algorithmically designed to optimize my engagement with the platform

A simple fix for YouTube is bookmarking the subscriptions page and making that your entrypoint: https://www.youtube.com/feed/subscriptions


nebula is nice, and a lot of its founding creators are on my sub list.

however, a lot of creators in it had direct ownership. i wonder how it works for those who joined later on and may not share the same.

one of the creators used to be super-active, however now switched the style of videos (completely fine and up to the creator), but now it has gone to radio silence for a better part of a year.

maybe the current creator economy is so bad that once you can get a gig like nebula, it pays you enough to stop the treadmill of churning out content.


I bought a lifetime subscription originally for Legal Eagle videos (both for the Nebula-exclusive videos and the Nebula-exclusive extras at the end of the videos), but I've also enjoyed Not Just Bikes and Tom Scott's England series.


I would absolutely love to subscribe to Nebula but they don't have an Xbox app which is where I watch almost all my TV/Youtube/streaming. I hope they have the resources to do it at some point.


The obvious alternative is SQLite, and it has many advantages. If you want to do a "zipped list of files", SQLite does that just fine (that's what SQLar is), but it can do so much richer data. Even if you don't want that, it still offers resiliency that "zipped XML" can't match: if your software or computer crashes in the middle of saving your file, it'll almost certainly corrupt it. With SQLite, not an issue: all transactions are atomic, they either happen entirely or not at all.

I don't know what "mature tooling" you're talking about for zipped XML, but I guarantee you it's not going to be better (or more mature) than SQLite and its ecosystem.


mem::forget isn’t the only way you can safely leak a value, you can do it with reference cycles too, right? And there is no way for the compiler to detect that?

Isn’t that why mem::forget is safe, because you can always implement it yourself safely? How do you get around that?


> mem::forget isn’t the only way you can safely leak a value, you can do it with reference cycles too, right? And there is no way for the compiler to detect that?

But there's an easy solution for that: you make the reference-counted smart pointers require their pointee type to be Forget. It will be like how Arc<T> doesn't implement Send unless <T: Sync>.


An alternative way to "forget" a value is to hand it off to another thread that then loops infinitely.

Could of course be plugged by saying `!Forget : !Send`, but wouldn't that preclude legitimate useful scenarios for `!Forget`?


The more accurate definition of `!Forget`, similar to `Pin<&mut !Unpin>`, is not "can be leaked" but "if the underlying storage is reused, the destructor is guaranteed to run". This enables all important (decidable - preventing leaking is undecidable, even in GC languages) use-cases, and sending the value to a thread does not break this contract.


Passing ownership to another thread is not the same as forgetting/leaking.

The point of !Forget is ensuring that once the owner goes out of scope the destructor must be guaranteed to run. An infinite loop is not a problem, cause the new thread will never leave its scope. Ref-cycles are a problem, cause you can create a ref-cycle. Then the program flow leaves the scope which will run the drop on all RC's but not the drop on the inner type.


> An alternative way to "forget" a value is to hand it off to another thread that then loops infinitely.

Might be able to address that by only allowing such a handoff to a thread spawned via some scoped abstraction to ensure that progress can only be made if/when the spawned thread terminates?


By doing the same as with `Sized`: Automatically including the `Forget` bound on generic parameters and letting methods that don't need to be able to forget them opt out. That way existing code continues to compile and existing unsafe code doesn't become unsound.


This was my first question too, I don't see anything addressing e.g. the cyclical arc example from the original 'spawn' conversation.

It seems like you have to auto-propagate !Forget, and then make 'anything that be used to logically implement forget', probably most importantly things like Rc take a Forget bound and do it at an edition boundary? But the link mentions none of that...


I think you're underestimating the speed of modern computers and hard-drives, fzf can search through 100k entries easily without any delay. Try it with `cat /usr/share/dict/words | fzf`, it's extremely responsive (my dictionary is about 235k lines). If you want hard numbers, try piping your shell history through `time grep` and see how long finding an entry takes.

Even if you're on spinning rust, your shell history is probably in cache. You don't really need FST index for this usecase, IMHO.


I use SQLite history to have context aware line suggestion in my shell. So the command that gets ghost displayed (and can be expanded with right arrow) depends on the current working directory, its parents and recency. This is fast enough using SQLite to just dump all commands into it and query on each typed letter.

The DB is at this point 10years old. I use it to evaluate my work habits and patterns. More recently I have started transitioning to a different shell and I used it to move only the functions and aliases I still use, instead of the full collection.


With SQLite one automatically gets reliable persistent storage. Try to emulate that with a text file with history that eliminates duplicates. It is surprisingly hard to archive.


Does this trick work with foreign keys? Like, if you have an ON CASCADE DELETE, does it delete a bunch of rows in other tables when converting the table to strict?


It uses "PRAGMA foreign_keys=0" and "PRAGMA defer_foreign_keys= ON" before running the transformation, then resets those settings afterwards: https://github.com/simonw/sqlite-utils/blob/3f0471701b5f8c7d...

That's the pattern recommended by SQLite here: https://www.sqlite.org/lang_altertable.html#otheralter


Thanks for the nudge, I just added a new test explicitly covering this: https://github.com/simonw/sqlite-utils/commit/d71420065903ff...


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

Search: