News for hackers. Stuff that matters.
Re:Zig cc: A drop-in replacement for GCC/Clang by userbinator on Tuesday March 24, 2020 @09:26PM (#22681089)
~15 years ago my "daily driver" had 256MB of RAM and it was perfectly usable for development (native, none of this new bloated web stuff) as well as lots of multitasking. There was rarely a time when I ran out of RAM or had the CPU at full usage for extended periods.

Now it seems even the most trivial of apps needs more than that just to start running, and on a workstation, less than a year old with 4 cores of i7 and 32GB of RAM, I still experience lots of lag and swapping (fast SSD helps, althougn not much) doing simple things like reading an email.

Re:Zig cc: A drop-in replacement for GCC/Clang by Wowfunhappy on Tuesday March 24, 2020 @10:36PM (#22681502)
I'm on a Mac with 32 GB of Ram.

According to Activity Monitor, right now:

• 4.26 GB are being used by apps

• 19.52 GB are cached files

• 8.22 GB are just sitting idle (!)

Now, I'm not running anything particularly intensive at the moment, and I make a point of avoiding Electron apps. I also rebooted just a few hours ago for an unrelated reason.

But the fact is that I've monitored this before—I very rarely manage to use all my RAM. The OS mostly just uses it to cache files, which I suppose is as good a use as any.

Re:Zig cc: A drop-in replacement for GCC/Clang by userbinator on Tuesday March 24, 2020 @11:57PM (#22681821)
and I make a point of avoiding Electron apps

I do that personally too, but in a work environment that is unfortunately not always possible --- and also responsible for much of the RAM usage too.

Re:Zig cc: A drop-in replacement for GCC/Clang by kitd on Wednesday March 25, 2020 @10:11AM (#22684663)
Slack is the biggest culprit IME. If there was a native client, I'd take it like a shot
Re:Zig cc: A drop-in replacement for GCC/Clang by jcelerier on Wednesday March 25, 2020 @10:36AM (#22684887)
Re:Zig cc: A drop-in replacement for GCC/Clang by umvi on Wednesday March 25, 2020 @12:09AM (#22681865)
> ~15 years ago my "daily driver" had 256MB of RAM and it was perfectly usable for development

What I failed to mention was that the rootfs is also eating into that (ramdisk). In your case I'm guessing your rootfs was on disk.

Re:Zig cc: A drop-in replacement for GCC/Clang by AnIdiotOnTheNet on Wednesday March 25, 2020 @09:23AM (#22684261)
Oh my god, just try running a modern OS on a spinning rust drive. It's ridiculous how slow it is. It's obvious that modern developers assume everything is running on SSD.
Re:Zig cc: A drop-in replacement for GCC/Clang by smabie on Tuesday March 24, 2020 @09:43PM (#22681200)
Are you sure? I've been running Linux for a long time with no page file. From 4gb to 32gb (The amount of RAM I have now) and have literally only ran out of RAM once (and that was because of a bug in a ML program I was developing). I find it very hard to believe that you experience any swapping at all with 32gb, much less "lots".
Re:Zig cc: A drop-in replacement for GCC/Clang by userbinator on Tuesday March 24, 2020 @11:52PM (#22681800)
You've likely not experienced the amazing monstrosity that is Microsoft Teams:

https://answers.microsoft.com/en-us/msoffice/forum/all/teams...

There's a screenshot in there showing it taking 22GB of RAM. I've personally never seen it go that high, but the 10-12GB of RAM that I have seen is absolutely ludicrous for a chat app. Even when it's initially started it takes over 600MB. Combine that with a few VMs that also need a few GB of RAM each, as well as another equally-bloated Electron app or two, and you can quickly get into the swapping zone.

Re:Zig cc: A drop-in replacement for GCC/Clang by smabie on Wednesday March 25, 2020 @12:21AM (#22681921)
How is that possible, 22GB? Fucking electron. You would think, at least, that Microsoft would code a fucking real desktop app.. I hate web browsers.
Re:Zig cc: A drop-in replacement for GCC/Clang by syockit on Wednesday March 25, 2020 @03:56AM (#22682747)
I also experience the same thing with Mattermost (the client also being an Electron app). The memory bloat usually comes from switching back and forth from so many channels, scrolling up to load more chat history, and lots and lots of image attachments (and of course, the emoticons).
Re:Zig cc: A drop-in replacement for GCC/Clang by userbinator on Wednesday March 25, 2020 @09:23AM (#22684259)
scrolling up to load more chat history, and lots and lots of image attachments (and of course, the emoticons).

I remember comfortably browsing webpages with lots of large images and animated GIFs in the early 2000s, with a fraction of the computing power I have today. Something has become seriously inefficient with browser-based apps.

Re:Zig cc: A drop-in replacement for GCC/Clang by kjs3 on Tuesday March 24, 2020 @10:26PM (#22681451)
You said yourself you managed to find a case where you ran out of memory. Why do you find it "very hard to believe", knowing nothing about his use cases, that his job doesn't involve exactly the sort of situations that consume vast amounts of RAM. Why do people insist with such conviction that "it doesn't happen to me, therefore it's inconceivable that it happens to someone else, doing something totally different than what I'm doing, into which I have no insight". Baffling.
Re:Zig cc: A drop-in replacement for GCC/Clang by Wowfunhappy on Tuesday March 24, 2020 @10:40PM (#22681521)
> Why do you find it "very hard to believe", knowing nothing about his use cases, that his job doesn't involve exactly the sort of situations that consume vast amounts of RAM.

Probably the GGP said they experience lag while "doing simple things like reading an email." Now, maybe GGP meant to add "while I'm sequencing genes in the background", but since that was left out I can see how it would be confusing! :)

Re:Zig cc: A drop-in replacement for GCC/Clang by kjs3 on Tuesday March 24, 2020 @10:49PM (#22681559)
That's fair. Good point.