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

I have recently started re-implementing parts of the standard library myself just to improve compile times (and I did - massively!), but I purposely kept {fmt} around, because I think it's a great library and I thought it would be as fast to compile as you could possibly make it (it likely still is considering what it can do). Also because the dev put a lot of effort into optimizing compile times [1] and seems to be much smarter than me. So I made benchmark to prove you wrong and show you it's not that easy. But it turns out formatting a couple of numbers and strings is much faster with your basic formatting library [2] [3].

Comparing using `hyperfine --warmup 3 "g++ FILE.cpp"` (and some flags for fmt) I get 72ms vs 198ms. So I changed my mind and might take a crack at replacing {fmt} as well. Cool stuff! Thank you.

[1] https://vitaut.net/posts/2024/faster-cpp-compile-times/

[2] https://godbolt.org/z/3YaovhrjP bench-fmt.cpp

[3] https://godbolt.org/z/qMfM39P3q bench-rikifmt.cpp


rikifmt only supports the default formatting which is somewhat limited and in the current implementation cannot even format std::string or FP numbers without data loss. Once more functionality is added the variadic template approach will quickly become the limiting factor both for build speed and binary size. But for toy examples you can definitely do better.


I find this argument hard to agree with. We are seeing unprecedented levels of buffoonery in many governments of the world and people enthusiastically agreeing with (objectively) idiots. Before anyone that does not know how to understand a statement as we are talking about, they will understand it the wrong way, tell everyone they know, create social media content and form organizations that oppose vaccines. I would say that this is more likely to happen many times over than them actually learning how to understand a statement like OPs properly. So as sad as it is, I think you are wrong.


I can understand that this approach seems like the easy quick solution, but the problem is much deeper than that. It's more about a weaponization of language by those who know what they're doing. Getting into a language fight isn't worthless, but doesn't actually resolve the issue, just escalates it.

What's more important IMHO, is raising the general understanding of how this science works and not falling into the trap of feeling like we have to debate this buffoonery on the same level. We're so worried about being called "elites" or whatever that we fight on their terms instead of just straight up calling it out as stupid and manipulative and giving it no more time than that.


GPUs are very fast, but not quite infinite. If you spend your GPU time on text, you can't spend it on something else. And almost always you would like to spend it on something else. Also the more GPU time you require, the faster the minimum required hardware needs to be. Text is cool and important, but maybe not important enough to lose users or customers.


I always thought that JavaScript cryptomining is a better alternative to ads for monetizing websites (as long as people don't depend on those websites and website owners don't take it too far). I'd much rather give you a second of my CPU instead of space in my brain. Why is this so frowned upon? And in the same way I thought Anubis should just mine crypto instead of wasting power.


I'd imagine it's pretty much impossible to make a crypto system which doesn't introduce unreasonable latency/battery drain on low-end mobile devices which is also sufficiently difficult for scrapers running on bleeding edge hardware.

If you decide that low end devices are a worthy sacrifice then you're creating e-waste. Not to mention the energy burden.


> Why is this so frowned upon?

Maybe because while ad tech these days is no less shady than crypto mining, the concept of ads is something people understand. Most people don't really understand crypto so it gets lumped in with "hackers" and "viruses".

Alternatively, for those who do understand ad tech and crypto, crypto mining still subjectively feels (to me at least) more like you're being stolen from than ads. Same with Anubis, wasting power on PoW "feels" more acceptable to me than mining crypto. One of those quirks of the human psyche I guess.


Running proof of work on user machines without their consent is theft of their computing and energy resources. Any site doing so for any purpose whatsoever is serving malware and should be treated as such.

Advertising is theft of attention which is extremely limited in supply. I'd even say it's mind rape. They forcibly insert their brands and trademarks into our minds without our consent. They deliberately ignore and circumvent any and all attempts to resist. It's all "justified" though, business interests excuse everything.


> Advertising is theft of attention which is extremely limited in supply. I'd even say it's mind rape. They forcibly insert their brands and trademarks into our minds without our consent. They deliberately ignore and circumvent any and all attempts to resist.

(1): Attention from any given person is fundamentally limited. Said attention has an inherent value.

(2): Running *any* website costs money, doubly so for video playback. This is not even mentioning the moderation & copyright mechanisms that a video sharing platform like YouTube has to have in order to keep copyright lawsuits away from YouTube itself.

(3): Products do not spawn in with their presence known to the general population. For the product to be successful, people have to know it exists in the first place.

Advertising is the consequence of wanting attention to be drawn to (3), and willing to pay for said attention on a given platform (1). (2)'s costs, alongside any payouts to videographers that garner attention to their videos, can be paid for with the money in (1), by placing ads around/before the video itself.

You're allowed to not have advertising shown to you, but in exchange, the money to pay for (2) & the people who made the video have to come from somewhere.


> Said attention has an inherent value.

Yes, and it belongs to us. It's not theirs to sell to the highest bidder.

> Running any website costs money, doubly so for video playback.

> Products do not spawn in with their presence known to the general population.

Not our problem. Business needs do not excuse it. Let all those so called innovators find a way to make it without an attention economy. Let them go bankrupt if they can't.


> Yes, and it belongs to us. It's not theirs to sell to the highest bidder.

Your attention belongs to you, until you give it to someone else.

The videographer has the right to sell sponsorships on their videos in exchange the attention they've attracted. It is also their right to do so.

> Not our problem. Business needs do not excuse it. Let all those so called innovators find a way to make it without an attention economy. Let them go bankrupt if they can't.

Your logic has already been tried: It's called Netflix. And it was overtaken by YouTube.

YouTube has been the wellspring for indie videographers because they have a platform that could (a) handle the video hosting for them for free, where (b) they could post their experiments on without an upfront cost & where an audience can be found because the platform's free.

Your idea seeks upfront payment, which increases the risk cost dramatically from 0 to a fixed value. One-shot experiments with 0 funds are killed under your scheme.

To seek their bankruptcy is nothing short of a fetishistic desire for your ideals to trample on others your your own gloating. Go back to the DVD era.


> The videographer has the right to sell sponsorships on their videos in exchange the attention they've attracted.

As is my right to use uBlock Origin and Sponsor Block to automatically block and skip every single one of those segments. Won't be long until we have AI powered ad blocking that can edit ads out of video streams in real time.

We decide what we pay attention to. Making videos is not a license to dupe us into viewing advertising noise. Baiting us with some interesting topic only to switch to commercial nonsense is just rude, and that's the most charitable interpretation I can offer.

> YouTube has been the wellspring for indie videographers

Because of ads and surveillance capitalism. Those are the root causes of everything that is wrong with the web today. Blocking those will reduce their returns on investment, thereby fixing the web.

> One-shot experiments with 0 funds are killed under your scheme.

Nah. Only the money motivated people will leave. People have been creating things just for the joy of it since the dawn of humanity. Those humans with intrinsic motivation are the ones I really care about. Not these insipid profit driven "content creators".


I think some sites that stream content (illegally) do this


> As others have also observed, permissions such as MANAGE_EXTERNAL_STORAGE have been rampantly abused in the past, often in horrific ways.

I understand that great care should be taken when this permission is granted to new apps, but NextCloud is well known and on top of that it is a file management app. If anything, apps like that should have this permission.

If you plan to phase it out completely, then the alternatives have to be good enough, which judging from some of the child comments, they are not. I have never developed for Android (and likely never will, because of stuff like this), so I cannot judge properly.

It's also my understanding that the Google Drive App is just some UI over cloud storage. All the interesting bits like Backup are not handled through it and Google Drive gets preferential treatment for this. Additional permissions are required to emulate such functionality.


Isn't the submission about this being a monopolized market, because options are being removed (NextCloud - a popular option).


I tried to make something like this (not power specifically) for a game jam once: https://pfirsich.itch.io/arbitrary-complexity

I took down the servers though, so you probably can't easily try it. I don't know if I added a way to configure the lobby server. I should have! It's open source though. And there is a video about that thing on my YouTube: https://www.youtube.com/watch?v=6TPgfa7LbiI

The game is bad and nothing of what we planned on doing actually made it into the game. The video is long and boring too. But maybe someone finds this cool and is inspired by this and makes a game like this.

The first 15 minutes of the game were actually about getting the ship moving, first by reading the manuals of half a dozen different ship systems and then following some procedure outlined in those manuals (parts of which were simply incorrect), maybe having to do some things in sync with your other players and stuff like that. I think it would have been cool to add multiple reactors and start them up in sync and stuff. The different ship systems were actually Lua programs that interacted via a message bus. So kind of a unknown computer architecture?


Wow this really looks interesting.


Have you actually lost weight like that? I think exercise is a huge trap for weight loss. Cardio exercise makes you healthy, but it will also make you hungry. Especially if you are not used to it. Overweight people are usually already overeating. They can't deal with hunger and cravings well. If you make them do cardio, they will likely eat back whatever they burned and most likely much more. And even if they don't, they were already overeating, so chances are high you are not in a caloric deficit still. I have lost a lot of weight (30kg) three times now (gained some of it back every time unfortunately) and I think there is much truth to "You don’t lose weight at the gym, you lose weight in the kitchen.".


This is a great comment, and I agree with it. Everything that I hear from experts on weight loss: Cardio exercise is not a major component. Most people are clueless about how few calories that cardio exercise burns. A 5km run burns about 300 calories. People would be shocked to see how little food is it, compared to the amount of effort to run 5km!

Since you said you went through three weight loss cycles (bravo, it is hard to do!), is exercise an important part of the effort? Example: Did you ever try cardio vs weight training? It seems like weight training is the more likely of the two to change body composition (more muscle, same or less fat). And higher muscle weight almost always leads to higher resting calorie burn rate.

Last thing that almost no one is talking about in this discussion: Once you start doing exercise, something changes in your brain. I cannot precisely explain it, but a huge number of men experience a drop is depressing thoughts after starting regular exercise. My guess: Exercise helps to de-stress which has all kinds of other positive impacts in your life.


Funnily enough, once you get decent enough I have a hard time eating after doing cardio. I need to force myself to eat something that isn't just a gatorade because my body is too busy recovering to spare any blood for my gut.


> Cardio exercise makes you healthy, but it will also make you hungry.

That's what I've noticed, too.

But I've also noticed that it makes me crave different foods than when I sit on my ass all day. So, on average, I tend to actually eat less, because I don't have random cravings in between meals.

I doubt that people who are overweight and sedentary only eat "healthy" meals, only too much.


I mean, the ranges of a European mentioning that they are overweight compared to the US are of course very different. What is overweight here counts as normal over there.

I am currently at around ~120kg and my "goal weight" was around that area. I still have a tummy that I am not satisfied with, but my legs are mostly muscles due to me cycling a lot. I sold my car on purpose to force me to cycle in bad weather.

Currently I am also trying out a more hardcore exercise program because I never gained a lot of muscles in the past, even when I was doing MMA training 6 times a week.

I'm probably stating the obvious here: muscles weigh more than fat, meaning you'll always gain weight before you can lose weight. I mentioned the 2-3 months time span because that's (for me) when it switched, and my body suddenly had it easier to get into calories burning mode.

Suffice it to say: I don't eat nor drink any sweets, not even in my muesli. No artificial sweeteners either. I replaced sweets with fruits in my muesli, for example. And I just drink water, because soft drinks are the human brain's enemy.

The decision to not eat nor drink anything sweet is important, I think, because it helps me go into calories burning mode much faster with much less calories.


    > Currently I am also trying out a more hardcore exercise program because I never gained a lot of muscles in the past, even when I was doing MMA training 6 times a week.
To me, exercise is roughly divided between cardio and weight training. Cardio hardly builds any serious muscle mass (except probably your heart), but obviously weight training will. Can you tell us more about your new/current "more hardcore exercise program"? What is the mix of cardio vs weight training?


"The Revised Plan" should have been "talk to my girlfriend about how I felt when she spoilt the book I was reading" and that's it.

I could not fathom living with someone I would have to butt heads with like that, even as a joke. It sounds exhausting.


There was a time where Nintendo clearly made consoles and games for children. I think the price of the console and the game (80€ by now) is just too high for most children. When I was a child I was always a console generation behind and bought games off the flea market or borrowed them from video rental stores. With physical copies going away or being discouraged heavily by higher prices, I feel like Nintendo is not even competing in financially accessible gaming anymore and it's sad to see. And since they are so expensive now, you might as well buy a Steam Deck. The only reason to buy Nintendo now really is just Zelda and Mario Kart. Also how many years ago was it that publishers released announcements about 60€ games not being sustainable anymore? Three maybe? The physical copy of Mario Kart World will be 90€! They got by without an increase for almost 10 years and now they increase it by 50% in just three years. I hate that we live in a time, where allowing someone to raise a price by 10€ will just lead to them doing it as many times as they can as quickly as they can.


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

Search: