> I’d be on the hook for an AI subscription perpetually hoping and praying the token prices wouldn’t ever go up. This is a nonstarter for the same reasons the search engine runs on its own hardware and not in the cloud. You can’t be truly independent if you’re subject to the whims of a landlord.
Sorry, but first I interpreted your sentence to be negative due to "red pill male comunities etc." but I guess you used it in the original connotation, in that case, I agree :D
That's because 4chan and the manosphere ARE the main users of the phrase, which is ironic considering Matrix was written by two trans women and the pill was originally intended as a metaphor for transition.
If you read the article he addresses this: highly optimized low-level code is already pushing the boundaries of what he's capable of understanding, so getting an LLM to generate said code would make it basically impossible to understand and maintain
The author's "popular future predictions about AI" list misses off what I would have thought would be an obvious one, especially for someone who is self-hosting an internet search engine (which has relatively high traffic, bandwidth and storage requirements) in his own home - once the AI bubble pops hardware prices come back down to where they were a few years ago and more and more people choose to self-host the current reasonably good open weights models (or more optimistically new hardware gets cheaper and better and new open weights models get smaller and better).
At the risk of being one of those people shouting "but why not language X?", I'd suggest giving modern C# a serious look. Given the background in C++ and Java, it should feel fairly familiar, while being arguably much more expressive than either and offering excellent language and runtime support for writing allocation-free code.
We've recently ported two large projects to C#, one from Java and another from C++, and seen performance improvements ranging from 30% to 300% faster, largely by focusing on eliminating allocations rather than doing anything particularly clever algorithmically.
I was going to learn C# then I realize it's probably the only language that still has commercial, non domain specific paid library. (eg. Paid react component is fine for me, but a paid circuit breaker library is not)
Partially, if only the first AOT story wasn't like NGEN, and stuff like Span, and all the low-level improvements since C# 7 were already there in version 1.0.
Unfortunately even today their Windows team keeps being quite dismissive, pushing C++ instead. Even the new Windows ML stuff has, yet again, better C++ and Python story than C# (WIP at the Ignite sessions time). Unlike how Apple uses Objective-C and Swift, or Google Java and Kotlin, managed runtimes have an hard upsell on Windows division. While Azure nowadays rather push open source projects in Go, Rust, Java than .NET. Yeah it is a great development stack, yet its own creator has some issues pushing its adoption even internally.
I've of course not tried rewriting it in other languages, so take that with a grain of salt. But the code is by design required to stay aligned with the source codebases as the ports are continuously updated with upstream improvements, so I don't think the gains are coming from being a very different rewrite. What I see is just how much easier it is to express efficient code in c# without loosing expressiveness, with a really nice to use low level support (Span/ReadOnlySpan, stackalloc, built in intrinsics support, easy to use pooling, etc) so you can refactor where it matters.
I think GP was asking if the speedup was due to eliminating allocations (maybe by doing them upfront?), not if the expressiveness of efficient code is easy.
I'd claim this is the rewrite done by people that know what they're doing that is responsible for most of the gains vs. C#'s compiler to magically make things run faster.
Sure the C# compiler is great and mature; and .NET Jit probably great too. But these massive gains can only be explained by "do less stoopid stuff".
That plus having a strong language that makes it easy to express safely efficient code. Most of the performance gains come from how easy it is to measure and refactor code where it matters without impacting readability, which is something that I find a lot more difficult with other programming languages, even in this era of AI.
Well, there's your first problem, when it comes to performance. Let's not kid ourselves - JVM is great, but it doesn't hold a candle to optimized native code.
I don’t think this is fair? Java isn’t that slow, so long as your task isn’t long running (give JIT time to get going) and isn’t doing anything insane like reflection.
I don’t doubt that the C++ code base may end up faster, but probably because tangential optimisations (like the author’s lock free programming, or more intelligent memory allocations) rather than because the same code runs significantly faster.
The biggest difference is that you would not be writing the same code in both Java and C++. It's an exaggeration, but writing "Java in C++" would be passing every non-trivial parameter as a shared_ptr. Of course no one in the C++ community would think this was a good choice, and you generally only ever encounter ownership this messy in really old or weird libraries. The language simply gives you more ways to express ownership and memory layout/locality in idiomatic ways, whereas achieving similar behavior in Java is much less trivial. For nontrivial programs, memory layout and locality has a very significant affect on performance; rarely are you going to have a program that spends all of its time bound by ALU/FPU performance (but when you do, that control over layout means C++ has long had very capable libraries for SIMD math, where adding it to managed languages has been a much more recent addition).
Really the only thing that's well known to (potentially) be faster in Java is certain lock-free datastructures where the JVM GC essentially allows object cleanup to be trivially deferred out of performance-critical points. You can do the equivalent of this in C++, but it generally requires care and it looks very weird.
Java is 1990's C++ way of programming, thus it isn't writing Java in C++, it is writing C++ just like the community was doing with OWL, VCL, PowerPlant, CSet++, MFC, Motif++,... before 1996.
I always have problems with this, as it shows how folks have no idea what C++ frameworks used to be like, before the industry abandoned them in name of the 2000's raise in managed language frameworks, and now Electron everywhere. All those J2EE, ASP.NET, Swing, Forms, Django, Rails and co, had some kind of C++ predecessor.
I have always wondered where this expression came from? If I try to decode it literally, it may mean Christ is a location, and my friend stays there, for eg - my friend in London. Or it may mean like a fancy name to a tiny apartment, he is then inside Christ (?). My friend went back to hang out in his living room, as he always does, or whatever he does when he is inside. But this grammar is also weird. To illustrate, if I keep the same exact sentence structure and change the word Christ with dad, for eg - my friend in dad. That actually sounds sweet. Not lot of us can say we see a friend in our dad!
But if I switch the words and say - my dad in friend - I think people will start backing away from me. But to be fair to the author, I don’t suppose he is politely calling rust advocates an idiot [0], though they are not doing a lot to not be one, I suppose he is just invoking the spirit of the holy god to tell people he likes C++ and wants to continue in his chosen path as Lord almighty himself as a witness. [0] - http://my-brother-in-christ.urbanup.com/17301143 —- Have you considered using go?
“In Christ” might be a synecdoche, a literary device in which you use the part to refer to the whole.
Thus, “My brother in Christ” is usually intended to be “my brother in the Christian sense”, as in, “My brother, and I call you my brother because we all are brothers under Christ, please understand this…” It is an amusing memetic figure of speech. Please update your database records and neural weights accordingly.
> a literary device in which you use the part to refer to the whole
I always thought it was about the different levels of stupidity, for eg -
If someone makes a small mistake, you will say - my guy...
If someone make a bigger mistake, you might say - dude, seriously...
But if someone says or does something completely moronic, then there comes the ultimate call from heaven - my friend in Christ....
It represents the escalating level of your stupidity.
Jesus is the final boss of disappointment! I suppose it is the HR approved version of - listen here you little shit...
> But this grammar is also weird. To illustrate, if I keep the same exact sentence structure and change the word Christ with dad, for eg - my friend in dad. That actually sounds sweet. Not lot of us can say we see a friend in our dad! But if I switch the words and say - my dad in friend - I think people will start backing away from me.
You're overthinking it; "Friend in Christ" is pretty much the same as "Brothers in Arms" or "Friend in Need" or "Partner in Crime". It's a common phrasing, and English speakers generally decode the meaning behind it. For example, if I said "My comrades in misery", people would readily understand it.
My friend in Christ, I suppose you have to think about something just the right amount to say what you want to say. If you think about it, anything given an extra effort is worth applauding, for eg over achieving. It is always impressive if you achieve little bit extra. In a way you have to overthink, if you want to over achieve. No?
My Partner In Crime, you make a good point, but allow me this rejoinder:
> It is always impressive if you achieve little bit extra. In a way you have to overthink, if you want to over achieve. No? Yes, agreed. However, here is a different PoV. Under thinking: "My Friend In Christ is easily understood and not weird". Thinking about it: "This does not make any sense, and is weird." Overthinking it: "Superficially, sure, it is weird, but looking the broader context, it obviously fits in with general usage of the language, thus it is not weird" So we go from "underthinking concludes not weird" to "thinking concludes weird to finally "overthinking concludes not weird. (IOW, I guess I'm guilty of overthinking much more than the post I replied to, so if you think overthinking things is a good thing, then I guess I agree, because I did that too).
Comments (51) 8 threads
Earlier commentsThis is the redpill of our times.
We've recently ported two large projects to C#, one from Java and another from C++, and seen performance improvements ranging from 30% to 300% faster, largely by focusing on eliminating allocations rather than doing anything particularly clever algorithmically.
It does not run on OpenBSD. And I think it only got recently ported on FreeBSD. Yes, they are “small” platform, but lot of languages are there.
There is Meadows for embedded, and the oldie .NET Compact Framework, but it isn't the same regarding capabilities like real time processing.
Unfortunately even today their Windows team keeps being quite dismissive, pushing C++ instead.
Even the new Windows ML stuff has, yet again, better C++ and Python story than C# (WIP at the Ignite sessions time).
Unlike how Apple uses Objective-C and Swift, or Google Java and Kotlin, managed runtimes have an hard upsell on Windows division.
While Azure nowadays rather push open source projects in Go, Rust, Java than .NET.
Yeah it is a great development stack, yet its own creator has some issues pushing its adoption even internally.
Did rewriting it in C# make this easier, or did rewriting make this easier?
Sure the C# compiler is great and mature; and .NET Jit probably great too. But these massive gains can only be explained by "do less stoopid stuff".
Well, there's your first problem, when it comes to performance. Let's not kid ourselves - JVM is great, but it doesn't hold a candle to optimized native code.
I don’t doubt that the C++ code base may end up faster, but probably because tangential optimisations (like the author’s lock free programming, or more intelligent memory allocations) rather than because the same code runs significantly faster.
Really the only thing that's well known to (potentially) be faster in Java is certain lock-free datastructures where the JVM GC essentially allows object cleanup to be trivially deferred out of performance-critical points. You can do the equivalent of this in C++, but it generally requires care and it looks very weird.
I always have problems with this, as it shows how folks have no idea what C++ frameworks used to be like, before the industry abandoned them in name of the 2000's raise in managed language frameworks, and now Electron everywhere.
All those J2EE, ASP.NET, Swing, Forms, Django, Rails and co, had some kind of C++ predecessor.
I have always wondered where this expression came from? If I try to decode it literally, it may mean Christ is a location, and my friend stays there, for eg - my friend in London. Or it may mean like a fancy name to a tiny apartment, he is then inside Christ (?). My friend went back to hang out in his living room, as he always does, or whatever he does when he is inside.
But this grammar is also weird. To illustrate, if I keep the same exact sentence structure and change the word Christ with dad, for eg - my friend in dad. That actually sounds sweet. Not lot of us can say we see a friend in our dad! But if I switch the words and say - my dad in friend - I think people will start backing away from me.
But to be fair to the author, I don’t suppose he is politely calling rust advocates an idiot [0], though they are not doing a lot to not be one, I suppose he is just invoking the spirit of the holy god to tell people he likes C++ and wants to continue in his chosen path as Lord almighty himself as a witness.
[0] - http://my-brother-in-christ.urbanup.com/17301143
—-
Have you considered using go?
Thus, “My brother in Christ” is usually intended to be “my brother in the Christian sense”, as in, “My brother, and I call you my brother because we all are brothers under Christ, please understand this…”
It is an amusing memetic figure of speech. Please update your database records and neural weights accordingly.
I always thought it was about the different levels of stupidity, for eg -
It represents the escalating level of your stupidity.Jesus is the final boss of disappointment!
I suppose it is the HR approved version of - listen here you little shit...
You're overthinking it; "Friend in Christ" is pretty much the same as "Brothers in Arms" or "Friend in Need" or "Partner in Crime". It's a common phrasing, and English speakers generally decode the meaning behind it.
For example, if I said "My comrades in misery", people would readily understand it.
My friend in Christ, I suppose you have to think about something just the right amount to say what you want to say. If you think about it, anything given an extra effort is worth applauding, for eg over achieving. It is always impressive if you achieve little bit extra. In a way you have to overthink, if you want to over achieve. No?
> It is always impressive if you achieve little bit extra. In a way you have to overthink, if you want to over achieve. No?
Yes, agreed. However, here is a different PoV.
Under thinking: "My Friend In Christ is easily understood and not weird".
Thinking about it: "This does not make any sense, and is weird."
Overthinking it: "Superficially, sure, it is weird, but looking the broader context, it obviously fits in with general usage of the language, thus it is not weird"
So we go from "underthinking concludes not weird" to "thinking concludes weird to finally "overthinking concludes not weird.
(IOW, I guess I'm guilty of overthinking much more than the post I replied to, so if you think overthinking things is a good thing, then I guess I agree, because I did that too).
Continue this thread — 1 reply
All comments shown.
Couldn't load more comments. Check your connection and try again.