99% or what?
1,123 karma · joined February 12, 2020
99% or what?
There will be places, no doubt, that you cannot do it, but if you can easily cover 80% of the code, that is way better than nothing and then you can work on redesigning the 20% (perhaps even rewriting it in another language since it has to be changed, for instance to Rust). Same argument as Rust uses for unsafe blocks.
There have been specialized annotations for things like mutexes for a while in several projects which help static analyzers prove things too, so it is not new.
I am not sure about D3D9, but 10 and 11 and 12 are not COM.
Btw, wasn’t Chrome and others switching soon to LLD?
Ada and D are also in the process of adding memory safety to the base language too.
The actual question is why nobody cared that much until now to put it in mainstream languages. The answer is, as you know, browsers.
Swift, Zig, Rust, Go, etc. are popular because there has been a resurgence of new languages in recent years and a lot of new, young developers are helping develop libraries for them.
It is simply not as fashionable to program in old languages so some new developers don’t.
What do you mean? Ada is used routinely in some industries.
It isn’t. It looks like COM, but it isn’t.
See my sibling comment. Using Rust implies many more changes than just moving code to an incompatible-but-close version of C and C++ that adds lifetime annotations and unsafe blocks. Compare it with the Python 2/3 split vs. rewriting all your Python 2 code to, say, Ruby.
Then there is the OOB issues too, like using another build system, a single compiler based on LLVM, etc.
Because it is another language.
If the researchers behind the borrow checker had implemented it on a safe variation of C/C++, then it would have been much easier to push for it in many companies. Something like the Python 2/3 split is better than another completely different language.
Don’t get me wrong, Rust brings improvement in other areas too, which is fine, but when we are talking about many-million-LOCs, you don’t care that much.
I am still waiting for someone to bring lifetime annotations to C and C++. Those I could use right away. Rust, not so much.
It is as simple as that. When serious, important projects depend on a standard library is because they want those guarantees. Having some members of Rust work on some crates does not give anyone those guarantees.
Which is why all those crates must be in std, or declare that the standard library is a set of crates (including core, std and others).
Read again what I wrote. Even the model itself is optimized. The fact that it is written in Python or in any DSL is irrelevant.
> I used to think that too before I spent years doing functional programming.
I have done functional programming in many languages, ranging from lambda calculus itself to OCaml to Haskell, including inside and outside academia. It does not change anything I have said.
Perhaps you spent way too many years in high-level languages that you have started believing magical properties about their compilers.
> prided myself on being able to implement things like highly-optimized numerical code with templates.
Optimizing numerical code has little to do with code monomorphization.
It does sound like you were abusing C++ thinking you were "optimizing" code without actually having a clue.
Like in the previous point, it seemed you attributed magical properties to C++ compilers back then, and now you do the same with high-level ones.
> It actually took a few years before my code in Lisp, Scheme, JavaScript, and Python stopped being structured like C++.
How do you even manage write code in Lisp etc. "like C++"? What does that even mean?
> You putting "Python" and "Java" in the same sentence shows this isn't a process you've gone through yet. Java has roughly the same limitations as C and C++.
Pure nonsense. Java is nowhere close to C or C++.
> Here's a challenge for you.
I would use Mathematica or Julia for that. Not Scheme, not C++. Particularly since you already declared the last 30% of performance is irrelevant.
You are again mixing up domins. You are picking a high-level domain and then complaining a low-level tool does not fit nicely. That has nothing to do with the discussion and we could apply that flawed logic to back any statement we want.
> If I'm writing a generic database-backed web app
If you are writing a system where performance does not matter, then performance does not matter.
> a machine learning system or a video game. Most of those, when written in C, are finished once they work, or at the very most have some very basic, minimal profiling / optimization.
Wait, what? ML engine backends and high-level descriptions, and video games are some of the most heavily tuned and optimized systems in existence.
> At this stage, the automated systems do better than most programmers do, at least without incredible time investments.
General-purpose JIT languages are so far from being an actual high-level declarative model of computation that the JIT compiler cannot perform any kind of magic of the kind you are describing.
Even actual declarative, optimizable models such as SQL or Prolog require careful thinking and tuning all the time to make the optimizer do what you want.
> 2) I'll be able to do algorithmic optimizations much more quickly in a high-level programming language than in C.
C is not the only low-level AOT language. C is intentionally a tiny language with a tiny standard library.
Take a look at C++, D, Rust, Zig and others. In those, changing a data structure or algorithm is as easy as in your usual JIT one like C#, Java, Python, etc.
> 3) My low-level code gets to be faster once I get into a very high level of hand-optimization and analysis.
You seem to be implying that a low-level language disallows you from properly designing your application. Nonsense.
> I can design memory management better than the automated stuff, but my get-the-stuff-working level of memory management is no longer better than the automated stuff
You seem to believe low-level programming looks like C kernel code of the kind of a college assignment.
False. The average non-technical person is installing unsigned software from Steam and other cross-platform game stores.
In fact, the vast majority of all PC/Mac users play games downloaded from Steam and similar stores, not from the Microsoft/Apple stores.
> the average person isn't using Linux at all so it's not worth considering in this conversation.
The average gamer isn’t using Mac at all either (4% vs. 1% according to Steam), so I guess it is "not worth considering in this conversation" either.
Which leaves us with Windows. So porting to the browser is irrelevant since all games are played in a single platform, according to your own logic.
In fact, in most cases, when you hear the TC claim it is about an exotic system :)
But regardless of this particular game, it is not a valid complaint. It is like complaining your phone or your toaster cannot run a given game because it was never designed for them.
Encoding the inputs/outputs for a given TC system may be a pain, but that is irrelevant to expressiveness power.
That makes no sense. Before Steam there were many gaming online communities, all games were native and were marvels of technology for the time, etc.
> There is no reason a platform like Stadia can't work in the future as these things get better.
Stadia does not run games on web tech. Quite the opposite. They are native Linux Vulkan binaries.
> you're already doing that
There is a big difference between downloading a game once vs every time.
If you mention offline web storage, that is exactly the same solution as Steam and others do. A good example of the web reinventing the wheel.
> consume your entire PS4 drive with a single game
Not the case with a PC with terabytes of space.
> you're just sitting there not using your PS4
Not the case with Steam/PC. > We are starting to see more cross platform support for games between PS4, XBO, and PC. But older games won't ever support cross platform between Windows, OSX, and Nix.
That has nothing to do with technology. It is a matter of licensing, finances and support.
The overwhelming majority of games use engines which target all platforms, from PC to mobile to console.
> A browser port could easily change that.
No, because it has nothing to do with technical issues.
> Why is this an issue in your opinion?
I have never claimed it is an issue.
> Isn't ideal to adapt old concepts to new implementations?
A new implementation does not imply a better implementation.
Whether people use it to find relationships is a different question. I did not use it for that, but some of my friends did... (or tried...)
The 10% of men having most women matches does not mean all of those men in the 10% have it equally easy. Hence it is easier for an average 10%er to pick without putting work instead of fishing for slightly better women... Pareto?
> Is the novelty of a constant huge supply of new partners really that important vs. having a slightly smaller rotation of people in "your league"?
Yes, at least for many men. I recall having read a study or article at some point that claimed that sexual attractiveness is higher the first handful of encounters with a given partner.
> Why does HN love to rag on web technologies so much?
HN is quite pro-web and there are dozens of startups based on the web.
Nevertheless, my counter is: why does "the web" try to recreate existing technologies and operating systems?
That doesn’t work well for games with lots of modern assets.
> Native 1.6 doesn't even run on my computer at all.
That is strange, it works on the latest Windows.
> I think browser ports are the only hope that old games have at coming back.
Why? Steam, GoG, DOSBox, Proton, DXVK, emulators, VMs, etc. all give you access to almost every game that has been produced, today.
Many of those have thriving online communities, too.