I have to say it's pretty good!They interview a lot of prominent C++ figures like Bjarne, Herb, Stepanov and Alexandrescu. But they also interview others like Kernighan and Hejlsberg (creator of C#).First they go through the origin story. Then they talk about the decline when Java got popular. And then how C++11 came to be. To finish they recount current events.Rust wasn't mentioned a single time lmaoooooI really enjoyed the documentary. What do you think, Anon?
Forgot to post the link https://www.youtube.com/watch?v=lI7tMxzSJ7w
>>108984343Ok anon. Been there, done that switched to C# AOT for all my private stuff including my game engine.C++ is just stupid clusterfuck with terribly retarded stl (but still a nice syntax)
>>108984363You moved from C++ to C#. A garbage collected language. For a game engine?
>>108984343i'm glad it's universal now; the realization that C++ is history, but>Most Consequentiallol
>>108984343>Rust wasn't mentioned a single timeobviously
>>108984418C++ is history, and C++ is the future.>>108984363The STL filters out low IQ devs (this is a good thing)
>>108984428why would it be mentioned?
>>108984626The main reason C++ has been and continues to be successful is that Bjarne has always had a pragmatic approach. Instead of doing things because of theoretical reasons, he has always wanted the language to be used and has listened to his users. The world around has changed multiple times and C++ has evolved alongside. It's clear that the recent push for more safety in C++ is largely because of Rust.
>>108984343
>>108984428Thoughts on these links about memory unsafety in Rust?https://materialize.com/blog/rust-concurrency-bug-unbounded-channels/https://oxide.computer/blog/iddqd-unsafe>The rules of Rust are very hard to reason about! I consider them to be significantly harder than C, for example, particularly due to the rules around mutable aliasing[2]. So judicious use of unsafe Rust usually involves encapsulating it behind a safe abstraction.
I'm just half through the documentary and it's funny that all the people there use macOS, CERN, the DOOM guy etc. etc.
>>108984611>The STL filters out low IQ devs (this is a good thing)Now I know you're not a pro. Don't waste our time and move on with your misery, become muslim as it fits your limits.
why is romero there?
>>108984343>dude consteval constexpr raii sfinae erase-remove rule-of-3-5-0 explicit noexcept pimpl protected virtual broooooo
>>108984343I liked their other documentaries. Going to be watching this while debugging PHP written by a 60 iq retard at work to make me not want to blow my head off
>>108984363>but still a nice syntaxWere you sexually mutilated at birth?
>>108984761>Instead of doing things because of theoretical reasonsSepples is the epitome of theoretical perfection brainrot. Just see RAII, which incorrectly assumes that resource acquisition and release must be symmetrical. Or using insane builder idioms over simple keyword arguments. The list goes on and on.
>>108985383You're right, but RAII and the rest of the patterns aren't forced by the language design. They're recommended best practices for those who don't know better. C++ is super liberal in this regard. You have to go for something like Lisp to find a high-level language that is more liberal. Most languages will explicitly prevent you from doing the right thing and they say it's for your own best "we're just preventing you from shooting yourself in the foot"!
>>108985024>https://oxide.computer/blog/iddqd-unsafethank you for introducing me to this crate. looks useful.the thing that immediately jumped at me is how IterMut could possibly be correct at all if the same T holds all data INCLUDING the key (or rather the data the key is derived from, since the key is calculated via a trait method on T)?the answer is in the wrapper used, which panics if the key is changed.https://docs.rs/iddqd/latest/iddqd/id_ord_map/struct.RefMut.htmlthis level of autism is not adequate for me. i would prefer a procedural macro approach that would take the key directly from a field, with IterMut using a wrapper around T fields (not T directly), returning an &-reference for the key, and &mut-references for all other fields. this would mirror the guarantees offered by std maps.such wrappers are used in zero copy serialisers, so this wouldn't be a first.
>>108985349rule of cool
primeagan was in it
>>108984343Ok I'll watch it. I'm married to C now but C++ is my ex who I still somewhat respect. I'm 12 mins in and apparently he first built "C with classes" entirely with C macros, then later his next compiler just compiled to C as a frontend instead of machine code.I'm not gonna lie, this fact alone makes me believe this Bjarne guy really is not that smart. It's extremely easy to do something like this, should take 1 week at most to write this kind of compiler. It was the wild west back then + no internet so I guess I'll forgive him tho.It's insane how C was born in the same place as C++ and changed computing forever while C++ is still arguably just a worse version of C after almost 5 decades. Seriously C++ just keeps adding whatever features are popular at the moment, ad infinitum. For this reason I don't see C++ dying anytime soon, for example atm they're focused on adding more memory safety guarantees bullshit in the upcoming versions.
>>108986211>I'm married to C now but C++ is my ex who I still somewhat respect.nice and relatable post, take my upvote
>>108984343>>108984777OH NONONONONONONO
>>108984343Fuck Bjarne-
>>108986211He is shameless opportunist. A clean slate PL would had been much better.
When i am coding with my LLM i pretend i am friends with Bjarne.pic unrelated
Lmao they added some literally who into the documentary just because they needed at least one nigger in the video. Token nigger.
>>108984611Wrong. The std is low IQ trap. Every major codebase has their own stdlib because the language specified one is garbage for retards.
>>108986400isn't sol2 made by an African guy? they should have him that lib is amazing
>>108984428it was once, in passing , it was also seen on a graph at one point.no homo
>>108986400unrelated, but recently, I decided to look up who was bash's original developer
>>108984343>>108984428>Rust wasn't mentioned a single timeThey literally mention and talk about that topic in depth towards the end.They even show the NSA bullshit blog post thingy.
>>108986421Didn't know he was African, just black because I watched him give a talk. I used that library once but idk I lost respect for him when he posted something about Rust and also he's too hyperfixated on irrelevant, useless language details.Btw that library is overengineered and you should just use the plain C API for Lua and build stuff on top of that. Getting C++ classes to work perfectly in any Lua binding lib is a huge can of worms you don't want to open because the language itself is so fucked up beyond repair and overly complicated.I'll still take that guy over this random token nigger who just works at Microsoft tho.
>>108986490Deep down, I always knew bash was made by the browns. Same way I could tell powershell was made by white men.
>>108986611>Getting C++ classes to work perfectly in any Lua binding lib is a huge can of wormsLua sucks yes, but I managed to write clean bindings using concepts. Using reflection it would be even easier.
>>108986826>concepts. Using reflectionexplain these to me like i am five
>>108986611its takes 2 seconds using sol, that is the entire pointwhat an odd post
>>108987165>conceptsYou no longer have to be a lvl 5 Wizard to write specialized template code. Instead of jerking around with SFINAE you define concepts and tag specializations with requires.>reflectionYou can "reflect" on the code during compile time. If you've ever worked on Lisp you know exactly what this is. For example, if you want to expose a Lua API, you can just query all the functions of a class (or even just a subset), and then export them to the Lua context. No need to manually keep an interface up to date as it's automatically generated from the primary source, i.e. the code.
>>108986547did they point out how bjarne's "profiles" are vapordesign?did they explain why he has been sabotaging any serious effort into introducing safety?did they laugh at his childish actions and reactions whenever rust, or any other safe(r) system language (Ada, Pascal, ...), but especially rust, is mentioned?https://www.circle-lang.org/draft-profiles.html
>>108984343Will they ever do a self-criticism and admit their PL is a mess?
>>108987276Don't care. But this article in particular is just some bitter idiot complaining that his campaigning for some features failed. Per his own website, he spent 8 years writing some compiler. So of course he's malding.And the committee is surprisingly right, requiring viral annotations everywhere is a terrible idea on so many levels.
>>108984343It was a boring and self indulgent documentary.
>>108985927>>108987276Thank you for admitting and acknowledging that Rust is nowhere near being a memory safe programming language according to any sane, honest and reasonable definition of a programming language being memory safe.
>>108987845>requiring viral annotations everywhere is a terrible idea on so many levelsYeah, implying the committee niggers are above this, having fucked up C++11 typeof(return auto prototype) and C++14/17 exceptions enough.-> declspec({entire function code}) noexcept({entire function code}) - or else deal with exponentially growth in the stack unrolling lookup tables and failing pointless typetrait tests in your path.
disagree with> different implementations from different authors would destroy the (language) projectthe reverse, hardcoding unnecessary components, reducing dynamism is the way to kill public interest and lock up choices that are wrong. javascript was popular when every week there was a framework, now nobody writes javascript because there is (you know what).despite their thinking is opposite, as i understand, every feature is opt-in, right? such as adoption of threading model ("like in Java"), doesnt differenciate c++ and is not a proper way.> you can add but you can never take awayyou can just create a new standard from scratch with this opt-in model. guess the removal is only hard when it is tightly integrated into implementation of a compiler or runtime
>>108986421sol2 is garbage written like c with classes
>>108987845great points.now point to the workable design of bjarne's "profiles" (not going to ask for an implementation, especially since bjarne is a nocoder lol).
>>108985383The problem with RAII in C++ isn't that it's symmetrical. You can easily make it asymmetrical for that 1% of cases where it matters.The problem with RAII in C++ is that C++ doesn't support destructive moves making RAII not zero cost and inveriant breaking. This is not an implementation problem, this is language design problem.
>>108984343buy an ad
Yes c plus plus, really cool...
C++ was a bloated mistake
>>108988940This standardization and million implementations thing is a relic of the past. Back in the early C and C++ days, CPU architectures were more diverse, there was no internet and you'd get a compiler with your hardware or OS or buy one separately.Nowadays there are only like 3 mainstream ones that keep up with the latest versions in a timely manner. The niche compilers like for embedded etc will never and don't even attempt to keep up because it's pointless.It's super inefficient compared to one official implementation that supports all the major platforms, with some sort of formal spec to allow for niche alternative implementations here and there. Too much wasted effort and more incentive to keep shitty features and old code working from the compiler makers.My main concern is the amount of languages that depend on LLVM nowadays. Writing a high-quality compiler fully from scratch should be made easier so not everything has to depend on one toolchain.
>>108984343Horror movie discussion goes on >>>/tv/
>>108987496Nope. There are only two kinds of languages, those that everyone complains about and those nobody uses.
>>108990634Young people simply don't have enough experience to understand why Sepples is shit.
>>108989724Having move semantics at all bolted on later was a symptom of a fundamental design flaw, where copying happens very often. Ironically, C++, if you follow its semantics to the letter, is a very inefficient language: it has to rely on RVO and other compiler voodoo in order to become efficient. Move semantics were yet another crutch to sidestep the language's own semantics.Nondestructive moves became the norm precisely because destructive moves don't blend well with the fundamentally "symmetric" nature of RAII.
>>108991823>Nondestructive moves became the norm precisely because destructive moves don't blend well with the fundamentally "symmetric" nature of RAII.This is wrong. Languages like Rust support destructive moves and their RAII is just as symmetric as in C++. This was never an issue because this is the entire point of RAII in the first place and you can always just drop/wrap raw pointers when needed.(In my 15 years of using C++ and Rust I never had to do this so idk what are you even talking about)The problem with nondestructive moves is not symmetry, it's the fact that you need to express moved out state within the class itself which weakens invariants (eg owning pointer can't be non-null so you need null checks everywhere) and prevents some compiler optimizations. There is an interesting talk "there is no zero cost abstractions" if you want more details about this C++ flaw.
>>108991880>In my 15 years of using C++ and Rust I never had to do this so idk what are you even talking aboutLiterally never once implemented an allocator or an object pool? Weird.
>>108991077have to rise modularity, module is a detachable unit by definition. if its not detachable - it is not a module. too many systems operate with "module" word without a regard to the proper meaning.you may be opt-in opt-out on paper, but solidified in practice. those on/off switches could be only a tiny cover of the bloat. so i dont like the phrase "you can never take away" it means a monolith and statisism - is where a threading model lives.
The worst programming language of all time
>>108991788that's why all criticism against JS is bullshit, right?
>>108991077>Writing a high-quality compiler fully from scratch should be made easierThat sounds contradictory, as a "fully from scratch" project wouldn't be able to utilize any tools or libraries created to make the development of high-quality compilers easier.
>>108991897Here you go. Custom allocator, working perfectly fine with RAII and destructive moves.https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=eba1cd4ab306df1af7fbd8a5af15079b
>>108992567I lack the programming socks required to read this.
>>108994488>doesn't understand RAII>doesn't understand destructive moves>can't read basic codeLegitimately why do you feel the need to opine? What the fuck is wrong with /g/?
>>108991788I don’t understand the point of that statement. Are you suggesting we shouldn’t criticize a programming language just because it's popular? The more popular a language is, the more flaws are exposed. And that’s exactly why criticism is essential for progress in every area of life. Imagine if the French people had used this argument during the French Revolution:>the monarchy is popular, furthermore, the monarchy is good.Addressing criticism was never the spirit of UNIX and AT&T in general, just read the preface of UNIX Haters Handbook and you'll figure it.
>>108994726are you new? it's bjarne's og COPE.
>>108992567If you were to iterate over the arena, would u need to impl <’a>Iter, since we don’t want to own the data, just iterate and debugprint it?Thinking from C here, something like print_stats(&arena);
>>108992039No, the point is to make information more accessible. With all the slop out there nowadays and this being such a niche topic and documentation being basically gigantic verbose PDFs or obscure information from the 90s or 00s, it really sucks.Last and only time I tried to make a compiler from scratch for a new programming language I just gave up after realizing just one (1) single ISA, x86, requires reading like a 900 pages PDF. And I couldn't find high quality, up-to-date information on how ELF works and how to implement it in practice.And all of that is not even 50% of what goes into writing a compiler. I recall not finding recent information about good architectures for all the layers of abstract representations. Because it's not as simple as parsing shit into some tree-like structure and then generating machine code. No, that'd be too simple. You first need like 2 or 3 layers more, then generate some IR, then machine code into object files and finally some linking process to create a final executable. And every step involves doing optimizations of course.The entire fucking world now depends on GCC and LLVM. We are fucked. Nobody writes new compilers anymore. There is so much stuff you can only find written in old books if you're lucky.
>>108995334before LLVM/clang came along, the serious world (so not wintards and their crap that didn't even support C99) depended on GCC only, except for the very brief period where a very tiny percentage fell for the Intel compiler being faster meme.the BSDs all maintained forks of pre-GPLv3 GCC versions.no one used, or tried to use anything else.outside of literal toys and the more useful bootstrapping genre, no one really wrote new compilers, EVER.
>>108995393>Intel compiler being fasterproducing faster binaries is what i meant to write
>>108984343>They interview a lot of prominent C++ figures like Bjarne, Herb, Stepanov and Alexandrescu. But they also interview others like Kernighan and Hejlsberg (creator of C#).I see they interview people who should be in jail for the regression they caused in the software community.
>>108984400>I'm a dork and i don't >>108985804>You have to go for something like Lisp to find a high-level language that is more liberal.know shit about garbage collection and game enginesYes, but on the other hand, Lisp will not segfault, even if you don't follow best practices.
>>108995393 (Me)>the BSDs all maintained forks of pre-GPLv3 GCC versions.and just to be clear, they did this for the toolchain responsible for building the base system. latest GCC versions were always available as ports, and used to build ports.so they used GCC, and GCC.
>>108991788>Nope. There are only two kinds of languages, those that everyone complains about and those nobody uses.that's the bullshit answer Bjarne invented to justify his piece of shit design
>>108995432>bullshitno it's not. it's the epitome of coherent logic, which is why we should all code in JS.
>>108984343This is the only C++ video anyone ever need to watch:https://www.youtube.com/watch?v=7fGB-hjc2Gc
>>108994918The [u8; SIZE] in area field already implements Iter. However iterating over it while there are allocations alive is undefined behavior. I did it here for the debug prints just to demonstrate, but in general allocator should not expose its underlying area anywhere nor really touch that memory at all.
>>108995334>TLDR, filtered by x86-64 assemblyNGMI unc.
>>108995424Lisp is great and everyone should work through SICP. It will make you a better programmer, even if you work with other languages.
Safe Rust prevents application code from directly expressing broad classes of memory unsound behavior. Unsafe abstractions still require expert auditing and generic concurrent abstractions can be at least as difficult to reason about as low level C.
>>108997886Before Clang matured, opensource Unix-like C++ development was heavily dominated by GCC while Windows development largely depended on MSVC. Clang broke that near duopoly and provided the BSD ecosystem with a modern permissively licensed alternative.
>>108997908All the static analysis tools and language server processors allowed by the layered approach from LLVM is great, but the release binaries produced by clang are nowhere near gcc. Far less optimized code.
>>108998285>the release binaries produced by clang are nowhere near gccClang and GCC have different optimization strengths, but “nowhere near GCC” is not a defensible general claim without a workload, architecture, compiler versions, flags, and measurement protocol.The technical nuance is that GCC does have mature optimization machinery that can matter materially for particular workloads: interprocedural constant propagation, loop interchange, loop distribution, unroll and jam, vectorization, profile driven branch handling, and LTO are all documented optimization paths. But Clang also supports whole program optimization through ThinLTO which LLVM documents as enabling cross module analysis while remaining scalable and incremental. GCC often generates faster code for particular workloads, but “far less optimized” across the board is benchmark folklore. Show the target, flags, and numbers.
>>108998312LLVM’s own test infrastructure explicitly treats runtime, compilation time and code size as separate metrics and supports comparisons using whole applications, microbenchmarks, SPEC suites and PGO runs. Its benchmarking guide also stresses repeated measurements and noise control because compiler performance claims are easy to distort accidentally.
>>108998312The strength of LLVM/Clang is that they've created abstraction that make it simple to not only compile code, but also build static analyzers etc. It's a great project! But the flip side is that there's abstraction which means it's harder to create holistic optimization and some performance is always left on the table.
>>108995464this video is insane
>>108995464This video feels like an AI wrote it.As someone who hates C++, I think it does really bad job at explaining why C++ is bad.
>>108995334>Nobody writes new compilers anymoreyou dont justify it. as Terry Davidson said - another Linux clone would be naive and retarded. so have to differenciate. when there be a decent code generation in TCC - ill switch (now it produces very big files and there are no options related to it)>>108998713>static analyzers etc. It's a great project!a bloatware (those static-o-matic analyzers, asan, ubsan, etc injection runtimes)! hehe. so, depends on person. LLVM is good because it produces decent freestanding code and links without MS bs, supports modern features like VLAs, type detection, etc
>>108985804>C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg. – Bjarne Stroustrup
>>108998312>whole program optimization through ThinLTO which LLVM documents asheres an error the last version produces:lld-link: error: undefined symbol: _fltusedthat is because it injects some MSVCRT bloatware that expects this symbol - which i defined (to avoid dependency) withint _fltused=1;but optimization removes it and build fails. so it doesnt suit freeman builds
>>108995840No, you're clueless and never tried to do anything like this. You're a brainlet if you think both are the same thing. If you combine all intel x86 manuals they are, I'm not making this up, 5342 pages long and they're not particularly easy to read.By comparison, even a fucking toddler can understand and write assembly because it's the most simple language there is. All the real complexity is handled by the assembler.
>>108994554typical trannie outburst. C++ mogs all over rust.
>>108984761The only reason why C++ still exists at all is because of C. Were it not c compatible it would be a foot note in history.