News for hackers. Stuff that matters.
Re:#include <rules> by coldtea on Sunday February 04, 2024 @08:34AM (#39250070)
>We’re stuck with C++, at least for another console generation.

That was 14 years ago. C++ is not going anywhere, whether 1, 2, or 10 "console generations" ahead.

Re:#include <rules> by 38 on Sunday February 04, 2024 @08:52AM (#39250188)
yeah, it is. the percentage of new C++ projects has plummeted, compared to modern options such as Rust or Go.

developers are sick and tired of the awful tooling and decades old issues with C++, that will likely never be fixed. I for one will never touch a C++ code base again if I can avoid it.

Re:#include <rules> by MenhirMike on Sunday February 04, 2024 @09:25AM (#39250413)
But what about the percentage of new C++ *game* projects? I don't see any AAA or even commercial Indie games written in Go, and with Rust, it looks like there's always someone making a new toy game _engine_ but no actual games.

Unity is pretty much the only other game in town that isn't C++, with the occasional outlier (e.g., CrossCode is written in HTML5/JS). And of course, Engines like GameMaker that are themselves written in C++ but whose users don't write in C++. (Well, that's Unity as well)

Re:#include <rules> by jsheard on Sunday February 04, 2024 @09:29AM (#39250446)
> Unity is pretty much the only other game in town that isn't C++

Even Unity compiles .NET IL down to C++, and then compiles that with a regular compiler to target platforms which don't have a .NET runtime or don't allow JIT compilation. That's more of an implementation detail but it shows how engrained C++ is that the path of least resistance was to use C++ as a compilation target. I think much of the private engine internals are also still straight C++.

Re:#include <rules> by doctorpangloss on Sunday February 04, 2024 @04:05PM (#39254478)
Unity is a victim of Apple in this regard. If Apple said it has to be Swift code, it would be called il2swift.

The insistence of AoT compilation has, as of yet, not made iOS any better of a platform for games, and only worse. If you really sincerely cared about games, you would at least advocate that Unity be allowed to do whatever the fuck it wants on Apple platforms, such as either JIT and AoT compilation.

The people who fussed over the real but meaningless details like the 10-20% performance gains are ultimately just co-opted by Apple execs extracting rents. Hacker News doesn’t have a good way to deal with this co-opting, people will downvote comments like these as irrelevant to a piece about headers. You guys are not getting it: C++ being shitty and having high inertia is in console maker’s and Apple’s interests, and the amount of energy wasted in maintaining it is entirely the fault of the platform owners, not developers.

Re:#include <rules> by coldtea on Monday February 05, 2024 @02:53AM (#39258418)
You know that AAA game developers live and breath C++, and many outright love it, right?

And that Unity is used for convenience, as opposed to performance or code quality, right?

And that Unity C# is (or at least was) quite looked down upon by AAA game devs, not to mention even by .NET standards it was tied to an older C# version for ages (I believe Mono was involved too)?

Re:#include <rules> by LoganDark on Sunday February 04, 2024 @11:34AM (#39251670)
> with Rust, it looks like there's always someone making a new toy game _engine_ but no actual games.

I know it may be somewhat underwhelming, but Tiny Glade[0] is being made in Rust. It is still basically a tech demo, but it has a real-time GI renderer and stuff.

[0]: https://store.steampowered.com/app/2198150/Tiny_Glade/

Re:#include <rules> by pushedx on Sunday February 04, 2024 @09:45AM (#39250546)
Jai is a good effort at an alternative
Re:#include <rules> by tsimionescu on Sunday February 04, 2024 @10:03AM (#39250690)
It seemed like it 10 years or so ago when he first announced it, but it seems more like vapourware by the year, unfortunately.
Re:#include <rules> by king_geedorah on Sunday February 04, 2024 @03:46PM (#39254271)
I check into his twitch stream every now and again and I’d disagree. His next game is clearly his proving ground for the language and it is looking pretty far along these days. I expect his sokoban game and the language will be released pretty close to one another. I can’t/won’t make any actual guesses as to when that will be though.
Re:#include <rules> by actinium226 on Sunday February 04, 2024 @05:11PM (#39255053)
This is like deja vu! I've definitely seen this conversation before:

-Jai is promising!

-Jai has been in development for years and there's no examples, no compiler, no github, no website, let alone package management and all the associated documentation

-Yea but he's still working on it!

If he does manage to release it and live up to the hype that'll be great, but until then I will respectfully be in the "I'll believe it when I see it" camp :)

Re:#include <rules> by mort96 on Sunday February 04, 2024 @06:43PM (#39255706)
I mean both developing a complete language + compiler toolchain + standard library and developing a game are projects which often take many many years. Rust was started in 2006 and didn't receive a 1.0 release until a decade later in 2015. Go was a bit quicker, starting out in 2007 and releasing a 1.0 in 2012, but I don't think anyone outside of Google really used it until years later.

It really does seem like the people who complain about how long it's taking either have no context for how long this stuff takes. You can knock out a toy language in a month, sure, but growing an actually production ready serious systems language, with a solid compiler which produces optimized code across platforms, and a complete standard library and solid core abstractions, and a good module system, and incremental parallel compilation which scales to millions of LoC, and with innovative language features which aren't in comparable mainstream languages... that takes time.

Re:#include <rules> by lmm on Sunday February 04, 2024 @07:34PM (#39256044)
> Rust was started in 2006 and didn't receive a 1.0 release until a decade later in 2015.

It wasn't widely announced until IIRC 2008, and it was public and in popular use by 2011 or so (long before 1.0 - just as e.g. Zig is definitely pre-1.0, but also very clearly a real language that people are using).

How many years are you planning to wait for Jai? Serious question - if it's still not publicly available in e.g. 2034, are you still going to be saying that's just how long these things take?

Re:#include <rules> by mort96 on Sunday February 04, 2024 @08:05PM (#39256184)
Well I'm not waiting for Jai, I'm happily using C++. If Jai eventually comes out and turns out to be a cool language and the tooling becomes available under sane licenses I might pick it up, or I might not. I'm in no rush either way.

If it's still not available in 2034, I guess you can fairly say it's taking a while. But then again, so what; if it comes out in 2036 it comes out in 2036.

Re:#include <rules> by coldtea on Monday February 05, 2024 @02:54AM (#39258432)
>But then again, so what; if it comes out in 2036 it comes out in 2036.

There's this whole 'passing of time', and "we'll all eventually die", thing though, right?

If it comes out in 2036, it's totally irrelevant for a working dev in 2024 to be concerned with it. So that he'll get to use it in a decade? At this point it's already a promise-ware, and it's like it has community adoption to be promising.

Re:#include <rules> by mort96 on Monday February 05, 2024 @03:52AM (#39258820)
Until at least a roadmap is released, Jai is totally irrelevant for a working developer. Even if it's released next month, you can't plan for that.
Re:#include <rules> by gloryjulio on Sunday February 04, 2024 @09:47PM (#39256724)
My opinion is that it's just too big of project for him to handle alone. So it will be in this status forever as other languages catches up. It's just humanly impossible to finish AND be better than other choices AND be done without help
Re:#include <rules> by mort96 on Monday February 05, 2024 @03:55AM (#39258845)
Good news! It doesn't seem to be a project handled by him alone. I don't pay much attention to Blow or his company, but the few times I've watched videos where he does go over progress of the language, he often talks about compiler work other people in the company are doing, and even about hiring people specifically to work only on some part of the compiler.
Re:#include <rules> by gloryjulio on Monday February 05, 2024 @01:18PM (#39264629)
I hope he can succeed. Language diversity is generally good, but it does look like an uphill battle
Re:#include <rules> by tsimionescu on Monday February 05, 2024 @05:16AM (#39259421)
Happy to hear that he's still making progress on it! I have huge respect for his work as a game designer at least, so I'm rooting for Jai to succeed as well. I just lost track and hope after such a long time without it in a more public spotlight.
Re:#include <rules> by lmm on Sunday February 04, 2024 @07:39PM (#39256071)
> But what about the percentage of new C++ game projects? I don't see any AAA or even commercial Indie games written in Go, and with Rust, it looks like there's always someone making a new toy game _engine_ but no actual games.

You wouldn't necessarily know, unless they talked about it. Some of the biggest games of the last decade were written in Java or C#, but without necessarily making a big deal about it.

> And of course, Engines like GameMaker that are themselves written in C++ but whose users don't write in C++. (Well, that's Unity as well)

You forget that 30 years ago this was virtually unheard of, at least for "real" games. Writing a new game used to mean writing a new game engine. Now it mostly means writing something for an existing engine.

I'm sure game development toolchains will have C++ somewhere in their bowels for decades to come. But for day-to-day game development work it will continue to slide into irrelevancy.

Re:#include <rules> by coldtea on Sunday February 04, 2024 @09:27AM (#39250424)
>yeah, it is. the percentage of new C++ projects has plummeted

Citation needed. C++ domains don't go to Go, and have only marginal adoption of Rust.

Re:#include <rules> by josephg on Sunday February 04, 2024 @11:17AM (#39251493)
Yeah I agree.

I suspect rust will gain in popularity in systems software - like databases and browsers. But if we're counting in "console generations" - well, I personally doubt rust will ever really take off amongst game developers. Rust's borrow checker has a reputation for making it hard to write entity-component systems. And ECS are core to modern game dev.

Re:#include <rules> by coderedart on Sunday February 04, 2024 @12:13PM (#39252102)
> Rust's borrow checker has a reputation for making it hard to write entity-component systems. And ECS are core to modern game dev.

Isn't it the opposite? That rust's borrow checker makes it hard for non-ECS paradigms due to ownership and XOR mutability rules. While ECS is best for rust, as it "owns" things and schedules the mutating functions without any conflicting race conditions.

The most popular engine in rust right now is bevy, which embraces ECS for everything (including UI).

Re:#include <rules> by richrichie on Sunday February 04, 2024 @11:27AM (#39251607)
Rust is just C++ with lipstick. Same pig.

With Go, i believe people will eventually mean revert to C, appreciating the value of simplicity.

Re:#include <rules> by synergy20 on Sunday February 04, 2024 @08:57AM (#39250218)
source?
Re:#include <rules> by IshKebab on Sunday February 04, 2024 @09:05AM (#39250274)
This is the best measure I've found:

https://madnight.github.io/githut/#/pushes/2023/4

Unfortunately it doesn't have new projects, but it does seem like C++ peaked a couple of years ago and is starting to trend down. "Plummeting" is clearly an exaggeration though.

Re:#include <rules> by loeg on Sunday February 04, 2024 @10:17AM (#39250816)
I'm surprised to see Javascript in decline since 2017. Most of that can be explained by substitution to Typescript but it's still down a couple percent with that factored in.
Re:#include <rules> by cherryteastain on Sunday February 04, 2024 @09:27AM (#39250426)
Based on the graphs here, Go and Python are also stagnant/slightly declining. Rust seems to be stagnant too since 2022.
Re:#include <rules> by marcosdumay on Sunday February 04, 2024 @10:08AM (#39250740)
The best I can make from the graph is that those declines are a scaling adjustment for a recent meteoric Java growth.

(WTF is there a meteoric Java growth is yet to be explained.)

Re:#include <rules> by lmm on Sunday February 04, 2024 @07:41PM (#39256088)
Recent releases of Java have dragged the language kicking and screaming into the late '70s, and so people are starting to appreciate how much the JVM ecosystem gets right (instrumentation, dependency management, IDEs etc.).

Either that or the institutional memory of Java EE has faded, and Spring Boot is here to traumatise a new generation of developers with the magic of write-only COME FROM code.

Re:#include <rules> by marcosdumay on Monday February 05, 2024 @08:37AM (#39261065)
To keep it in perspective, we are talking about a single month, and it wasn't enough to go back to the share it had half a decade ago.

Those things you cited do no cause single-month rapid growth. What causes it is publicity, or some large ecosystem adopting it by fiat.

Re:#include <rules> by coldtea on Sunday February 04, 2024 @09:28AM (#39250432)
So the grandparent is not even close.

In most metrics there it's steadily rising even, though the metrics are cross-correlated with "GitHub adoption".

Re:#include <rules> by cgdub on Sunday February 04, 2024 @09:53AM (#39250614)
If you sort by Issues, C++ is #3 and trending up.
Re:#include <rules> by IshKebab on Sunday February 04, 2024 @03:10PM (#39253879)
Sounds about right! :D
Re:#include <rules> by kimixa on Sunday February 04, 2024 @04:00PM (#39254418)
That just seems to show proportions on github - it may be with the growth in the total sector size the absolute number is still increasing.

But yeah a 0.234% yoy-decrease isn't "plummeting". If so, then things like typescript or python are even steeper in their, and java being the next big thing showing massive growth compared. And rust itself is decreasing according to those stats, so I guess it's declining too.

Re:#include <rules> by zaphirplane on Monday February 05, 2024 @06:03AM (#39259787)
Are the statistics based on intuition or actual statistics.

Let’s not count the GitHub repo that is just a readme.