Interview with Sr. C Dev | Prime Reacts
Vložit
- čas přidán 3. 06. 2023
- Recorded live on twitch, GET IN
/ theprimeagen
Original: • Interview with Senior ...
Author: / @programmersarealsohum...
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact - Věda a technologie
Senior JS dev one next, it’s absolute gold. ‘My job is to keep our code running while other packages are changing theirs’
The proper way to write C++ is to write C in .cpp files using minimal C++ features. Then writing C++ becomes a lot more enjoyable.
@@zzzip3896 which is why you use GCC and g++ so that the void* behavior stays as consistent as possible between C and C++. Or, extern "C" whatever parts that are written in pure C if you want pure C behavior instead of whatever weird thing C++ decided was better to do than what existed before.
looks fun xd
"c with methods"
Exactly
Such a naive take. There is reason why arguably the biggest software stacks (kernels and browsers) are all in on simple C or modern cpp with little to no inbetween.
I once considered what you would need to do to create a CPU that directly executed JavaScript. The world was saved when I got distracted by something shiny.
You are too dangerous to be left alive
Nah bro the FBI needs to get you right now
Why would you spend >1 second thinking about Javascript? Isn't that a language people code in for money and only money?
Not as performant as C
Not as simple as python
Anti-goldilocks ass language
Since I design silicon circuits in CPUs, I tend to use C to interact with it because the data objects map to the physical reality of the silicon. But since I resisted to urge to move to C++, I managed to also avoid growing a ridiculous moustache.
As a C dev, I was missing the unwavering confidence of guaranteed employment for the next 200 years. And all the hubris that comes with that.
I love my job, which is of course C++ in name only ;)
And that's absolutely correct, because the '++' is bloat.
As a fellow C dev I would like to express my unwavering confidence that I will be employed as a C dev for the next 200 years.
c++ is great for job security. even better when combined with hlsl
++ is the bloat that saves your ass when it comes to ds and algo lmao
if C++ is so great, why isn't there C+=1
Love these guys, great sense of humor
Vektor is a great band.
Whenever you see a C++ dev claiming they don't like C++, you can be sure they're stuck with C++98.
The thing missing from the video was the thousand-yard stare as you get lost in a mind palace of template expansion
Alright, let's see what the documentation says about that...
"A template parameter pack is a template parameter that accepts zero or more template arguments (non-types, types, or templates). A function parameter pack is a function parameter that accepts zero or more function arguments.
A template with at least one parameter pack is called a variadic template."
Naruhodon't.
I think the most painful errors are when you get an error with a weird ass template you never thought you used with an obscure name coming from the unknown depths of std, an when you finally succeed to understand what is going on and successfully compile, you get a segfault
Do the JS one. It's hilarious
The JS one is easily my favorite
agreed; fire pfp btw
He should do the last Perl programmer one too :DD "I remember... back in... back in nineteen"
I love that you have the same mustache 🤣🤣 Love this guys videos though, and your reaction actually adds value, cheers!
I'm so happy you're watching more of his content, it's great
You know it’s not real software when you can write your networking stack in JS and get away with it lmao
One of my biggest problems with c/c++ is the lack of a package manager. That and when the program hits you with "segmentation fault" and literally nothing else
Usually you'll get a core dump. If the problem is reproducible a debugger helps a ton.
sed 's/.*/cout
@@mananasi_ananas yup, running a debugger and peeking at the stacktrace will pretty much immediately tell you what went wrong. segfaults are way scarier for people that avoid debuggers (I've met some...)
a debugger and vcpkg will make your life that much easier 😅
Package manager has nothing to do with C language. It is platform related.
I agree, I only had a C++ job for a year and a half but also felt like maybe this guy was not quite so experienced with C++ as he is with the other technologies he parodies. But it was also just a feeling so was surprised you had a similar thought!
One of my favorite things is watching him get upset at seeing his own suggested videos at the end. I forget it's coming, and every time I can't help but lol.
A friend of mine is mainly a C developer, but he wrote a virtual machine in javascript once, so that he could write assembly in javascript.
I know this is an old comment and I am not even good at JS, but... Could you share a link? That sounds terrifying, amazing and hillarious at the same time
@@plaintext7288 No, it's like 15 years ago and he never released it to the public.
What I want is C+, basically just C with namespaces as it is the most ridiculous thing not to have.
And maybe just pure classes (no inheritance), I can see the advantages over structs.
Thank God, I've been trying to send this guys videos to you
Whats missing is something something godbolt, and comparing assembly outputs between different function return patterns.
Over the past several months, I've moved away from C++ and have been learning D. It has been such an enjoyable experience. I'd forgotten that programming can be fun. I feel like the primary reason people dismiss it is because of GC, but you can do manual memory management if you want to as well. It's such a beautiful language.
Modules, UFCS, templates, reflection, user defined attributes, built in unit testing, array slicing like Python, a package manager, excellent interoperability with both C and C++, and it goes on. AND it has an @safe attribute that you can use if you're into memory safety stuff. It's just so much fun and lets you do what you want. I'm quite sad that it isn't super popular.
Why would you use D over C++ or Rust?
@@irvingceron1016 Really the short answer is that I enjoy it. I don't really have the experience to compare it to Rust. But for C++, it is such a night and day difference. D is every bit as powerful as C++, and it isn't an absolute chore to work with. It feels like the best parts of C++, Python, and Java all combined into a really robust language.
Modules are awesome and aren't over-explicit syntactically like C++ modules are. If you can even use C++ modules because the ecosystem for that still sucks. You can use strings in templates no problem in D. You can in modern C++ as well, but you have to make your own fixed string class to do it. You've got built in unit tests if that's something you care about. UFCS is extremely cool and not something you can do in C++. D also has reflection which is something C++ could desperately use.
Ultimately what I'm getting at is that it's just such a joy to program in. It doesn't get in your way. It's like the absolute freedom of C++, but in a way that doesn't make you miserable. I've been in the D Discord for a while now, and the people there are super helpful. So much of the time when I ask about something, it's just like "wait, you can do that?" With C++, I never really feel that kind of excitement.
All I can say, is that I really hope more people give it a serious try. It's so much fun. The tooling could be better for sure. But at least the VSCode plugin for it is decent.
@@Spirrwell This is why there are literally hundreds of programming languages, and why most people probably won't learn any particular niche language. (Ever see brainf*ck or JSf*ck? I feel like some languages are more of an exercise of how ridiculous a language can be and still be usable.
@@Sauvenil I really don't get your point. D is nothing like the languages you mentioned. It's not a ridiculous language. It is incredibly well built, and it isn't absolutely miserable to work with. The primary reason it could be considered niche is because it doesn't have a giant corporation or committee backing it.
It just is a great language. Like seriously, if you're a long time C++ programmer, give D a try for a few days. It's just plain fun.
@@Spirrwell Sorry, I was being obtuse. The point is, everyone likes the languages they like for some reason, and some people want to make their own for X reason. Not saying it's particularly good or bad; just saying programming languages are like opinions, ha. I enjoy Javascript and how much I can do with it within a browser. It's fun what such a "simple" language can do now. Not trying to discount your experience with D; trying to say there are hundreds of languages and it's because people have fun with programming.
I like C++ way more than C
Virtual C++ constructors are fictional
Diamond pattern is saner than virtual inheritance
The video missed out on template compiler error hell
His VIM and Emacs videos are fucking amazing. I don't even know what VIM or Emac is. But now I am an expert.
Tom has written a kernel in JDSL, because Tom is a genius.
Joke: "C, did you get the reference?"
Everyone with mustache these days. Love it
CZcams wouldn't recommend your own videos if it was written in C.
Ps: calm down folks... its just sarcASM.
LOL. I'm totally the guy that says "I love C, C++ not so much"
Template defined constructor base classes is where the next dimension is, what you use it for, well it's for that dimension only hehe: class B : A, no not just some shit inside the class, the entire class is now a rubix cube
I cant believe it took you so long to find this guys videos
The c++ standard library is pretty awesome.
The best ones from him is the Javascript Senior developer, and the PHP :D
Do the ffmpeg one! :D
I hate linker errors. Expecially in combination with custom(/random) templates because the compiler was not in the mood to create methods or optimized them away.
JSOS
Its pronounced.
J-SAUCE
what does it mean that someone is trying to write kernel in javascript? As I understand it syntax is decoupled from semantics, so you can have javascript's syntax but how to interpret that syntax can vary; So do we mean syntax and semantics of the language or just syntax and then he also have to write a new compiler for it?
This is the second time recently I've heard "virtual constructor" and every time I'm like "what the fuck is that". This time I just had to look it up to make sure I'm not going insane
4:05 - I did not know I suffered from PTSD
FYI there's no such thing as a virtual constructor in c++ lol.
I was trying to think of what that would do 😂
I love the way all his videos have really bad screen tearing in the video, I'm sure it's intentional. And the really choppy jump cuts too.
Linker errors are definitely the worst!
"Whoops, looks like I have a problem. Okay, so where is... It's pointing to the .exe..."
you should collabs with this guy Prime
I love that pompose "Low level".
Imo its kinda fun how different people consider languages being high or low level.
I've heard many times people describing C as 'low level language', while considering GLSL (which is significantly lower level than C) to be a high-level language.
I've also seen Verilog being considered as low-level (no surprise here - there are not many languages except for VHDL which are closer to the hardware than it), assembly as medium-level, and C as high level.
Anyway it's all too relative ;/
I don't know why you would consider GLSL to be lower level than C, GLSL was pretty much modeled after C.
You have to consider that GLSL is meant to run on SIMD hardware and thus has limited input and output and also no function pointer or memory management, because it would be inefficient. But it has builtin vector- , matrix-types and operations, samplers and varyings, which C does not.
I wouldn't say that it's lower level, but it's a purpose built language and considering the target difference is about the same level of abstraction, but I would argue that SIMD is harder to program than SISD or MIMD.
But generally speaking a "high level programming language" is a language which can't simply be transferred into binary code.
So C and GLSL are "high level programming languages". Where as assembly languages would be considered "low level programming languages", because all the operations in an assembly language have corresponding CPU instructions.
Where as C has register management, variables, functions, structs, strings, arrays, for, while and more, which are abstractions on top of the CPU instructions.
I think you can see it quite often that people say C is a "lower level language", trying to show that while C is technically a "high level language", it's low level compared to all the other languages.
Verilog is literally used to describe hardware. It's a hardware description language. Very different concept to software but easy to mix up. sure, it's capable of some basic scripting and SystemVerilog has an entire verification subset, but these features of the language are intended for that for the purposes of debugging simulation. When people say its "low level," they're doing so in comparison to relatively more modern HDLs that work as DSLs within modern programming languages like Python, Go, Scala, and Rust. These languages target verilog as an output netlist. The appeal of these languages is that they allow for useful software code management paradigms like packaging your code into importable libraries or using OOP and functional programming. These extra degrees of freedom by definition make said HDLs "higher order" than verilog.
C++ seems like a high level language when you are used to C.
They have the same moustache it is so hilarious hahahahahaha
the amount of jokes that went over this dudes head is hilarious
He is willing a javascript soft core from Xilinx into existence
"Did you get it? Do you need pointers?" 😂😂😂
1:25 Diamond pattern: Why ? 😭😭😭
the "knock knock - race condition" gets me every single time lmao
So ummm...
I'm a C++ developer and the company I work at literally makes an application that lets other people write applications.
So yeah...
"Websites? We're talking about _real_ software?"
Based
When I get linker errors I just give up, and then maybe try again the next day, or some other day.
All is CPP? Maybe all the user code you write sure
I want to create brainfuck++, which is brainfuck, but with classes
C is not cross platform it is the platform.
he looks just like u with that big moustache
Am I the only one who laughed at that knock knock joke? especially followed with "did you get the reference, do you need pointers?" :P Very funny with his deadpan humor
6:37 - Prime you can click "don't recommend channel" on a drop down menu of each video.
Wait, does the JavaScript kernel interpret itself? Or is there a kernel underneath?
It's transpiled to a minified javascript that the machine can understand. 🤣
when prime starts the video saying this might be the one because he works with lots of c++ devs ignoring the shocking similarity in hair and moustache styling...
the algorithm that is suggesting you your video has to be the cousing of amazon's "you bought a toilet seat last week, do you want to buy a toilet seat today?"
2:40 I probably did some work with virtual constructors many years ago, so I can understand how it works, and I understood it, but don't ask me today what it is or how it works.
Pls do a video reacting to their "Interview with an Emacs Enthusiast" Prime! 😅
Didn't expect any of them to know FPGAs lol
Will Doom run on a Lowe's commercial?
Doom will run on an granny smith apple.
@ThePrimeTime I love linker errors for all the wrong reasons. As someone who knows C/C++ a lot, it just makes sure I'll never run out of work
2:05 after all, somebody made a rollercoaster in Excel
smh not using x86 assembly, c is so inefficient
ARM or RISC get the rest of that shit out of here
He looks here like Val Kilmer in Saint.
2023-05-25... ok dude... we need some xqc editors...
Going make a file system for the web is JavaScript
JSOS kernel is written in C++ though..
Saw a vid recently where someone has Doom running on a pregnancy test 😂
Ask you youtube uploader/editor to normalize the audio please. Its too low (and turning the volume up on my speakers al the way isn't a good idea).
Someone wrote a risk emulator in scratch that runs linux
Sometimes I adore C++ as a language, sometimes I wish I never learnt C++ at all.
2:00
Someone before 2010: I bet no one will run JS on the backend
Some dude called Ryan Dahl, making a decision he will regret: Hold my beer
I'm just comparing the moustaches and they are the exact same.
ThePrimeTime: In Javascript. Me: :0 haha. Nice video
Ok, but you gotta admit that he's right for the first statement lol
So the name is not the primagen anymore ? :(((((
If it's not a template constexpr, it's not real C++
I happily use C for everything apart from specific things. I use C++ std::cin, std::vector, and std::string, but apart from that I write C in .cpp files. :)
vector is great, big fan of who ever created it
@@and_I_am_Life_the_fixer_of_all Problem is that on embedded systems you really can't use the STL much because of flash restrictions and even big companies (who aren't working on embedded systems per se) often rewrite the STL themselves to improve performance. Don't get me wrong, the STL is absolutely amazing for learning cpp, but unfortunately it has few use cases in the real world.
@@MrPatrickbuitinteresting, I'm surprised no one solved that yet..
@@and_I_am_Life_the_fixer_of_all It’s getting solved over time. Microcontrollers are coming with increasingly more flash at a lower cost, which allows you to use more and more features.
They're missing the entitlement and complaints about being stuck on cpp 11
You guys need to do a vid together
Kernel emulation in js already done by a french guy who created tinycc
The segfaults will sue Netflx for being replaced by JS
Just realized that the Sr. C Dev is dressed up like Primeagen
missing the hoodie
Watching this while taking a break due to a linker error. :(
I think the C# one from him is the best
Let's not build a kernel with JS, ok?
Do the Network in Fortran 😂
Imagine getting yourself as a recommendation on your CZcams lol
I am not sure why the hatred towards C and C++. Almost all OS -- Windows, Linux -- are written in C. And I do not see them crashing every hour. Seg fault is due to bad programming practices.
Sr. C dev -> Sr JS dev -> Sr. C++ dev
segmentation fault
I like how this implies that being a C++ dev is a property of being a JS dev
Yeah what's the arrow operator even doing
i'm going to write a c++ interpreter in javascript >_
I felt the linker error take 😂😅
Everyone has felt it
Do prime reacts to microservices or did he do that already I forget