Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My gaming PC that I built in January 2006 that IIRC I used to simultaneously run Battlefield 2, Trillian, Xfire, Thunderbird, and Winamp with a 1680x1050 monitor had 1 GB of total system RAM.


That's because programmers in 2006 didn't understand programming. They didn't understand how to make their software better.

Real programming means writing your own javascript glue, pulling in hundreds of supply-chain-compromised js libraries that you never inspect or profile, and running the whole thing in a browser engine, while making sure to store all state in the cloud.

The modern breed of programmers who don't understand programming have switched from C and C++ to Rust and Go, so they're on the right track of using more resources to improve the developer and user experience, but they haven't gone nearly far enough. They still do dumb things like write efficient code, and profile and put effort into reducing binary and resident size. They should trust in javascript and the browser and the internet, like all good programmers do.

Zig programmers have completely lost the plot. They're of the type that tries to write "hello, world" manually rather than pulling in a third party library so they can efficiently call helloWorld(). Writing single-binary apps that fit on a floppy? Who even cares? What even is a floppy? How do they call themselves programmers without css and advertising telemetry?


2026 programmers also look down on 2024 programmers, these guys didn't understand you can get an intern to vibe code the hole thing in a week and run it in kernel mode on half of the machines in the world the following week (after another mandatory reboot).


2006 programmers - smooth brained - they don't understand now you can just have an 'agent' code for you using piles of JS and massive dependencies. if the app breaks then the agent can fix it for you.


Dang... I use zig at work to write single binary apps and I know what a floppy is. I feel personally attacked.


username checks out


rust programs are a lot of times faster and orders of magnitude safer than C and C++ counterparts... where is your data to support your assertion that rust programs use more resources than C and C++ programs?


Some programmers import a sarcasm library while others could write their own.


>rust programs are a lot of times faster [...] than C and C++ counterparts

Troll post? Or has fanboyism really gone this far?


It's often basically true though - the guarantees that rust can make wrt to lifetimes and memory allocation clearly enable programs to allocate less and be more aggressive with what they do allocate (all while being a fairly high-level language - I don't know if most rust programmers actually know what memory safety is at this point)

I'm really not a huge fan of rust as a language but it is clearly delivering results in that e.g. I find myself actively hoping that people rewrite web tooling in rust and so on. C++ is a mess that should be allowed to die.


> it is clearly delivering results

Yeah, there are some results in Firefox and some results in Mesa and some results in the linux kernel, but that's about all.


Rust is much less likely to have heap leaks.


Truly poor quality bait here.


Some of us still know how to write software like that. And enjoy doing it.

I made a little conference schedule app a few weeks ago for a conference I was at. I used my own rust UI toolkit, which calls in to cocoa to make use of native UI components. The resulting binary is about 500kb and it uses a couple megs of ram while running. It looks and feels like a totally native iOS app. As far as the OS is concerned, it is.

Even 500kb feels too big for what it is. I’m rewriting the core at the moment, and I think it’ll be more efficient as a result. But I’m still pretty happy with it.


AI writes code like that, but people get pretty upset hearing it.

The program that I use to manage my small business, basically a GUI wrapper on an sql DB is a total delight to use, because everything happens instantly. Even opening it is instantaneous.

Modern software is such a bloated mess that you kind of get used to a 20 second start-up and a .25-1 second delay on every action. Then you use something that isn't bloated junk and it feels like actual magic.


>> AI writes code like that, but people get pretty upset hearing it.

To this day I never saw an AI write anything less than a 3Mb binary. Do you have specific examples in mind, and if so, can you share them?


Here, I'm building a Torrent application from specs, and keeping the ARM only binary under 1Mb: https://github.com/josusanmartin/rustorrent

It's fully vibecoded, and quite functional, although I'm still working out some bugs.


AI currently writes median-good code which is by definition better than the worst developers' code.

In order to push beyond that (e.g. architecture, size, performance), the human has to bring the constraints. There's only so much AI can/should default assume from "write code for me" (which I expect a lot of bad / non-HN developers are doing).

It is exciting that there's an opportunity for global improvement though! After the general model improvement pace slows, expect there will be a lot of room for code gen AI optimization, and if "write code for me" can be made to generate more efficient code... suddenly all AI-generated code (read: most code) will improve.

Shit code is out in the wild because the company decided to optimize for programmer labor cost instead of code efficiency. If instead apples:apples because AI code gen is being used both ways, everyone wins.

Feels like what I imagine were the early days of optimizing compilers, when I'm sure there were a large number of really bad assembly programmers out there.


AI doesn't get tired. I can tell it to profile the application and find quick wins and it usually does a decent enough job.


I am sure that's true if AI writes it, but what if YOU use AI to type it?


What happens if you keep asking AI to rewrite it to use less and less resources?


It’s actually pretty good at this if you have some very specific constraints and objective.


I find I get great results from explicitly asking an LLM to write tests which profile memory and cpu usage. Then ask it to optimise to improve those metrics.


And a way for it to get actual measurable results / feedback loop, which is apparently quite tricky even for humans to get.


just be aware of the exact prompt:

"memory usage is important": creates a 1TB binary

"take multiple steps": uses so much power, extreme global warming, it will just print "hot"

"think outside of the box": it will enslave you so you will not care about weather



Fans went crazy when loading the browser demo


It does a pretty good job being put into a loop of "try to optimize for X" then "test and audit your code" then repeat.


tbh, it probably works. I'm vibe-coding a thing and just told it to figure out why it runs so slow: put in some optimizations. It ran some tests and stopped loading an entire-something at opening because there's no value to doing that.


> AI writes code like that, but people get pretty upset hearing it.

Yeah, people get upset when you spew out total bullshit.

I work as a performance specialist and "AI writes code like that" is utter nonsense. AI writes the same terrible performing code that was the mediocre developer standard on Stackexchange and other codebases it ate.

You still need a lot of vigilance and time to make well performing software and most software engineers just don't give a damn if we don't outright block their PRs/feature launches before passing performance tests.


LLM coding assistants have a bias towards writing standalone implementations instead of pulling in libraries to do a job, which does tend to sidestep probably the most common cause of bloated software: pulling in too many layers of abstraction. Most software can be pretty damn fast (at least as far as users are going to notice) without needing too much of a focus on optimization, but just by not accidentally screwing it up.


Just writing your own bloat is not the way to go though, especially when it makes the codebase quickly balloon...


performance specialist, really?


Yes.


AI does this when it's not warranted, and even happily writes two functions with the same purpose.


Forty functions with the same purpose are still better than importing react.


What do you mean my hook to dynamically build <span contenteditable="true" style="border: 1px dashed #ccc; padding: 4px 8px; border-radius: 4px;">input your username here</span> with inline CSS is worse than using <input>? All I need to do next is to listen to form submit to build a new formdata object to POST to the server. Easy!


Is your UI kit open source? I do think calling into the native OS toolkits is the way to go, when they exist.

I'm curious if you use winit for windowing, or something lower level that's just mac specific.


I ported the leptos rust web framework to run on native platforms. Currently it works on ios, macos and linux (GTK). Eventually want to also add support for windows and TUI as well. It uses taffy for layout - which gives you the same flexbox and grid layout engines that web browsers use. Components are all fully native for the platform, via their corresponding binding crates (objc, gtk4, etc).

UI library is here: https://github.com/josephg/leptos-native

And here's the schedule viewer app I made with it. It runs silky smooth on device: https://github.com/josephg/dweb-sched

The whole project is currently experimental & vibe coded. It's missing a lot of components, and it has bugs. I'm currently rewriting it by hand to do it properly.


SwiftUI’s diffing is such a mess that I wouldn’t be surprised if fine-grained reactivity of a toolkit binding UIKit like this worked better. Do you have decent support for long lists via UITableView yet? Edit: it seems so!


Yeah! I added it for my ios scheduling app.

I tried to learn SwiftUI a few years ago. XCode was horribly slow, and it would hang and crash all the time, even when working on small example projects. I'm excited by the thought that I can use any rust IDE to write UI code. Rust's compiler, toolchain and IDEs seem way more reliable.

The view! builder macro at the moment is designed to look like JSX, since it was ported directly from leptos. But I'm considering dropping the jsx and using a fluent API. Something like this:

    let count = RwSignal::new(0u32);

    let view = vstack().padding(16.0).gap(12.0)
        .child(label().text(move || format!("Count: {}", count.get())))
        .child(
            hstack().gap(8.0)
                .child(button()
                    .on_click(move |_| count.update(|c| *c = 0))
                    .text("Clear"))
                .child(button()
                    .on_click(move |_| count.update(|c| *c -= 1))
                    .text("-1"))
                .child(button()
                    .on_click(move |_| count.update(|c| *c += 1))
                    .text("+1"))
        );
Code is a bit less readable like this, but autocomplete and cmd+click all works out of the box in your IDE.


Yeah, hence why for one kind of like the way RAM prices are going, maybe it forces the industry to re-learn best practices and "bio-programming" instead of "fast-food programming".


2 years ago I stated that we should stop worrying about software consuming a lot of ram.

I had just built my pc with 128gb of ddr5 ram spending less than an average android phone (I think like $300).

I would like to retract that statement. Thanks.


  I stated that we should stop worrying about [X] consuming [finite resource].
Why would you ever say something like this? When was that ever true?


It's true when [finite resource] is indistinguishable from [infinite resource], meaning it's abundant, cheap, and can be used recklessly with no impact.


Aside from air, ocean water, sunlight, and a few types of rocks, I don't know if that's ever the case. Pretty much as soon as something is declared "free", people will consume so much more than you could have ever imagined.


I didn't say it was actually infinite, just that it felt infinite. When it feels infinite, people will abuse it, making it feel finite again the hard way


On the flip side, high 5 for getting 128gb of RAM at exactly the right time!


The pricing differential is just absurd now. I expanded the memory on my math clusters about 2 years ago so I would have 4 machines with 1.5TB of DDR4 memory each. Back then a 128GB DDR4 DIMM could be found for $150 used. Now those same DIMMs are $600-$800 used! I think the RAM in my homelab is worth more than all of the other hardware combined.


this post was sponsored by SK Hynix


Fun fact, one of the XFire cofounders won Carmack's Ferrari at a Quake Tourney:

https://en.wikipedia.org/wiki/Dennis_Fong#/media/File:John_C...


I remember within the last decade noting that minesweeper from the windows store took more space than a pretty damn healthy Win98SE install (with minesweeper)...


Gray on gray is pretty resource hungry.

And you need code to handle device orientation, in case the PC Tower is flipped on the side.


Yeah, but minesweeper was like 95% of Windows 98.


I was replaying Xenoblade Chronicles on my Switch 2 and the whole time I was thinking about how this ENORMOUS, open world game originated on the Nintendo Wii, a console with only 88 MB of RAM.


With an OS the PC requeriments for that game under Windwos XP would have been like 256MB/384MB.


And I bet you that I could still fit an XP-era weather app or widget on top of XP and Xenoblade inside that 256/384MB of RAM.


Super Mario Brothers is none of that, but fits in a 40kB ROM and a few kB of RAM.


Atari 2600 titles are between 1 and 4Kb and have 128 bytes of RAM. Still enough for some quality entertainment back in its time.


They're pretty seriously limiting though when you actually look at those games. The GameCube/PS2 is probably the era where hardware was finally good enough to make the game you wanted.


Some of those games are remarkably fun and addictive though. It's difficult to take an arbitrary spec and say that's 'good enough'. For some it's too much, others still want more. Depends on the kind of games you want.


I just set up a web server for a hobby project on a $10 Dell PC that has 2GB of RAM welded to the board. After booting Debian 13 it still has 1.6GB of free RAM.

In fact, that seems a lot. Back in ~1996 I was running one of the EFnet servers on a Compaq with 8MB of RAM.


I still miss Battlefield 2. There is really nothing like it today, not even close. The dynamics with squads and a commander and A+ physics and overall game balance remain unmatched for all FPS games.

Fortnite, PUBG, COD, all are disgraceful in comparison.


Check out BF2Hub. The community isn't big, but you can generally find a server or three with real players in it (just look for players with a ping; 0 ping means a bot).


Miss BF2 too. Sank way so many hours into that game as a kid. Still remember the wonderful loading music. 2142 was great too.

I'll never forgive EA for C&D'ing the community efforts to revive the servers. Fuck EA.


BF2 was great, BF3 was definitely better, not that there was anything at fault of BF2.

I disagree with Fortnite and PUBG, whilst PUBG is a little clunky it did usher in a completely new game style AND importantly introduced much better situational audio which other games didn't have.


BF2 and Battlefield: Vietnam were my top 2 BF games. Loved the radio in BF:V and the ability to airlift stuff. Also, I really enjoyed the commander mode in BF2, that was ahead of its time.


>Completely new gamestyle

It might have popularized it, but PUBG was far from the first 'Battle Royale' game. Hell...I think it goes to those old Minecraft "Hunger Games' servers, but I'm sure it predates even that


I personally would attribute the better audio more towards Arma that PUBG was born from.


I miss the squad gameplay of Battlefield 2 too. It hasn't been replicated since, in my opinion, and subsequent Battlefield titles changed the classes and made the available loadout options too flexible to require specialized play.


There is a game called Squad that has a lot of similarity to BF2 in terms of teamwork and coordination. It's a spiritual successor to the BF2 mod called Project Reality.


Before I built a gaming computer circa 2004 I daily drove my family's old beige box that had a 350Mhz Pentium II with 64MB of RAM and Windows 98. I remember running CDex (because ripping CDs was all the rage), Trillian, and ZDaemon all at the same time without a hiccup. What a time to be alive!


Trillian, good old days. Still remember my icq number


In 2018 when Windows and macOS used 2GB just after boot, I tried Arch Linux and with a neat window manager (dwm) a clean boot was using just 300MB, that means our OS is wasting just too much RAM for nothing. This year with Fedora Atomic 44 + Niri is using 800MB, so I can give a second life to my old device from 2013.


Back then we had constraints. That made us better programmers. We had to think about every database call and network call. No one cares about that now until it compounds to broken software - like Windows.


Think about all the performance you could have gained by instead running Trillian and Winamp on an old Thinkpad next to you with even less ram


An amazing thing I was reminded of just yesterday is that COD4:Modern Warfare ran on the PS3, with 256MB RAM.


take me back


Haiku OS is trying.




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

Search: