Why I Use C | Prime Reacts

  Рет қаралды 159,129

ThePrimeTime

ThePrimeTime

Күн бұрын

Recorded live on twitch, GET IN
Reviewed Video
• Why I Like Programming...
By: / @franciscofox
My Stream
/ theprimeagen
Best Way To Support Me
Become a backend engineer. Its my favorite site
boot.dev/?prom...
This is also the best way to support me is to support yourself becoming a better backend engineer.
MY MAIN YT CHANNEL: Has well edited engineering videos
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-K...
Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
turso.tech/dee...

Пікірлер: 589
@demolazer
@demolazer 3 ай бұрын
Turned 3 mins video into 13 mins, is this guy the best react streamer or what
@StingSting844
@StingSting844 3 ай бұрын
Yes he is 🎉
@Thenderick
@Thenderick 3 ай бұрын
Six seconds in, pauses video
@ryoukaip
@ryoukaip 3 ай бұрын
so true lol
@ShrirajHegde
@ShrirajHegde 3 ай бұрын
4x developer
@briza_md
@briza_md 3 ай бұрын
The Asmongold of programming
@hansdampf2284
@hansdampf2284 3 ай бұрын
4:13 this. C _feels_ like it’s a direct translation of the assembly into a little bit more friendly and universal language. But in reality we got caching, pipelineing, branching probability dependent pipeline prefetching, hyper threading etc etc on top of that we have compiler optimizations In reality much much more is happening under the hood, that is abstracted away into a black box so the cpu acts like we think it should.
@StevenOBrien
@StevenOBrien 2 күн бұрын
"caching, pipelineing, branching probability dependent pipeline prefetching,.. compiler optimizations" - I'm not really sure why people bring these things up. If you write C, all of these are deterministic systems that are directly affected by how you structure your code. Caching is dependent on how you structure your memory, branch prediction is dependent on how you structure your code (and can be hinted), pipelining is just being aware of what assembly your code in translating into to ensure you're doing things in the most effective order, prefetching depends on how you structure your code and can be hinted. The ability of the compiler to optimize your code is again, entirely dependent on how well you structure it to play well with the optimizer. None of these things are magic black boxes, they are predictable systems that you learn with experience how to write code that plays well with them. By the way, if we had more explicit control over those things, believe me we WOULD use that control, but sadly we don't have it. If instructions are available as intrinsics, we absolutely use them, but with the way things currently are, it's more control by tricking the CPU into doing what we want at this point.
@hansdampf2284
@hansdampf2284 2 күн бұрын
@@StevenOBrien none of these things a in fact black magic boxes. Of course things are documented and the mechanisms and rules by which they function are deterministic, documented and known. Yet I know no one who has all those rules and functionality in their head when programming. If anything they assume the assembly that could come out of the compiler if it weren’t for all those optimizations and such. The rules for optimizations, pipelining etc. work in the way that you don’t have to think about them and the resulting code acts in a way like the assumed assembly without optimizations does. (In most cases. And as long as you stay away from UD) That is the black magic box. In reality it isn’t black but it is treated like a black box. And you can in fact have more control over compiler optimizations: switch them off and optimize yourself. People don’t do that anymore because the compiler is usually better in optimizing than they are. Instead they let the compiler optimize as much as possible and just trust it doesn’t change their codes runtime behavior.
@captainfordo1
@captainfordo1 3 ай бұрын
The reason I use C (and Odin, because it’s philosophy is the same) is because it doesn’t get in my way when I code. That’s it. It is so much easier to reason about my code when I don’t have 50 different features to think about, all polluting my mental model.
@ITSecNEO
@ITSecNEO 3 ай бұрын
Sure 😂 So we not mention the brain damage everyone gets when compiling their c code. Everyone who worked on bigger projects in c can relate to that
@dan_pal
@dan_pal 3 ай бұрын
Then you must have an even bigger mental model to manage your make files lmao
@SaHaRaSquad
@SaHaRaSquad 3 ай бұрын
In some higher-level languages you aren't forced to use the highest abstractions possible if you have full control over your project. That's why I like using Rust in personal projects, usually with enums for polymorphism which avoids 99% of weird annotations. But I'd probably hate it in a team because I know how addicted most are to using the fanciest abstraction features and adding complexity via third-party dependencies.
@foo0815
@foo0815 3 ай бұрын
That's the reason I love programming in Common Lisp. You can start fairly abstract, but go down to machine level when you need to.
@taylorallred6208
@taylorallred6208 3 ай бұрын
After trying out many languages (including Rust and Zig) I’ve also found that I strangely really enjoy C. There’s much less to keep in your head and with some good technique and knowledge of what you’re doing it’s very gratifying.
@jose6183
@jose6183 3 ай бұрын
Exactly
@kjetilhvalstrand1009
@kjetilhvalstrand1009 3 ай бұрын
I agree, but its nice to have few drops of vector lists, and other stuff, the g++ finds normally more potential bugs, when casting. I’m bit too old school for all the C++ classes, most of my code is C. Templates is good way keep my code more DRY, can do the same with macros, but it seems easier to write templates.
@Knirin
@Knirin Ай бұрын
@@kjetilhvalstrand1009I heard one person say one man’s boilerplate is another’s simplicity.
@kjetilhvalstrand1009
@kjetilhvalstrand1009 Ай бұрын
@@Knirin I wherry pragmatic about that, I don’t want C/C++ to turn into Basic, if code contains boundary checks for every array access, it’s not C/C++ code, best practice be check things before use and only once. and for that to work, you can’t compromise your clean up code. (so I will say some boilerplate is good code)
@Knirin
@Knirin Ай бұрын
@@kjetilhvalstrand1009 I was more thinking about how a lot of these arguments don’t count macros to handle the lack of generics or templates in C as boilerplate but consider type parameters for generics to be boilerplate. The number of reimplemented data structures also tend to be ignored as well. Always boundary check your code and sanitize inputs. C is very good at turning logic errors and bad inputs into memory problems or worse.
@BeethovenHD
@BeethovenHD 3 ай бұрын
People always pushing stuff further and further. In almost everything. Examples are the economic growth, your piano skills or your rizz skills - idk. Sometimes there is no need. Have a nice day.
@_morio
@_morio 3 ай бұрын
I’m a former frontend engineer and currently learning C, so this really resonates with me. As he mentioned, I can’t resist my inner drive to be a mastery, however inefficient it does feel like.
@25w-g6c
@25w-g6c 3 ай бұрын
why did prime flashbang us at the end for no reason
@EdwinMartin
@EdwinMartin 3 ай бұрын
Twice!
@jerichaux9219
@jerichaux9219 3 ай бұрын
FBI OPEN UP
@coolbugfacts1234
@coolbugfacts1234 3 ай бұрын
light mode is superior to dark mode, that's the truth people aren't ready to hear. Linus Torvalds, Dennis Ritchie, Brian Kernighan, Bram Moolenar, all light mode users. On the other hand, Rasmus Ledorf, creator of one of the worst languages in existence, dark mode user.
@EvanEdwards
@EvanEdwards 3 ай бұрын
I don't often have an opportunity to write C, but when I do, I enjoy it. And often it is still the best tool for the job.
@JohnDoe-np7do
@JohnDoe-np7do 3 ай бұрын
What you said ab the level of abstraction hidden from you even when using C is so right. And that part about having more control being a pain sometimes is true depending on the scope of a project, the amount of heap/dynamic allocs my current project makes always makes me think "yo this sh*t is dangerous" altough thanks to arenas and defer pretty much solve it for me but still its risky. Im by no means a beginner but damn i still dont know a lot, im 700 lines into a compiler/language ive chosen to write (in zig btw) when i have the time & i realize just how much ive taken for granted. Im not even at the code gen part, was considering native asm but i think llvm ir or qbe would be a more sane option. the tokenizer i wrote is great, its 500 lines & works flawlessly & is fast. the parser however is another story, its works but is a mess & needs to be revised plus im using a map to resolve vars at runtime, pretty sure there are better ways to do this. At this point, the language already has the ability to resolve identifiers into values, booleans, floats & ints of numerous bases (namely 2, 8, 10 & 16, coz were programmers, these are the only ones that truly matter, in any case they all evaluate to base 10 at run time) the parser also has the ability to evaluate binary arith operations/expressions with numerous operands even when an operand is actually a nested expression, altough there is no precedence and is left-associative for now. However if im being honest with myself, the implementation of the parser is so dumb & the amount of branches the program takes is probably enough to grow an actual physical tree 😂 There are many functions/methods which use both recursion and loops at the same time + ive added so many constraints into the syntax of the language such as prefixing ids with $ or @ to ease the process. @ is supposed to reference global symbols either "imported" from zig std or c std or simply provided out of the box. Got the idea from llvm ir & zig too. theres still so much left to do such as adding that feature and by the time im done itll probably be well over 1000+ loc & hopefully ill come out more knowledgeable once its completed but more importantly, be able to accomplish my goals for this project. I dont think there is a necessarily a "best" language, in fact im at a point where i enjoy as many languages as possible, i used to be like this guy but for me it was c++ but i appreciate the more modern languages available nowadays. After all, its nice to have a change of language once every while coz 4 the most part the basics stay the same & it should always be a joy to program, skill issues suck but there really is no easy way to get good if you dont have inherent talent for this.
@GukoHuba
@GukoHuba 2 ай бұрын
your video editing skills are incredible, what a treat to watch!
@Xe054
@Xe054 3 ай бұрын
G.K. Chesterton mentioned!
@beest_
@beest_ 3 ай бұрын
Hey Prime, what are your thoughts on SVG and HTMX . Use a SVG editor to design the page and all its elements, and have HTMX be the event handler
@KingJellyfishII
@KingJellyfishII 3 ай бұрын
I do believe the feeling of "stacking black boxes on to black boxes on to black boxes" is partially a skill issue. I often feel that way when I begin to use a new tool or language or framework, until I have properly understood (even at a high level) the mechanisms by which the tools I am using work. Once I take the time to understand that, the black boxes feel less like black boxes and more like just yet another tool that I understand and can use and reason about. Except for javascript, that is, js is the ultimate black box.
@dickheadrecs
@dickheadrecs 3 ай бұрын
javascript is easy to reason about. node and mountains of dependencies, not so much.
@your-mom-irl
@your-mom-irl 3 ай бұрын
Understanding how something works (ie its interfaces) doesn't make it any less of a black box
@user-rf6ub4gm6l
@user-rf6ub4gm6l 3 ай бұрын
depends on the person and what they feel a blackbox is
@TurtleKwitty
@TurtleKwitty 3 ай бұрын
I think part of it is a blackbox versus an eldritch horror reaching out from the shadows; what i mean is if its a blackbox with well defined boundaries that you call into then you can get good at using it and it becomes clear over time what it does and how it works/interacts with your code but when its an eldritch horror that implicitly appears at a distance and teleports itself inside your code thats a whole other can of worms *cough* spring boot injectors randomly failing with 0 indication because a random injector somewhere in the million lines of code changed with 0 indication that it would affect anything else *cough*
@MrHaggyy
@MrHaggyy 3 ай бұрын
It's also a management tool. If you have a lot of people and need your software fast it's easier to divide the task in smaller ones and let them build a selection of black boxes. So your architects can assemble the project out of those.
@deanruskov9025
@deanruskov9025 3 ай бұрын
I am a first year electrical engineering student and i had a 1 semester cource on C. It was some of the most fun that ive had learning and it sparked a desire to continue studying programming. There's something so special about starting from a blank file and bit by bit implementing a complex program that languages like java have yet to show me, but then again I'm comparing apples to oranges
@gnagyusa
@gnagyusa 3 ай бұрын
I went from machine code to assembly, then C way back and never got into the newer toy programming languages. I want to focus on solving the actual engineering problems instead. I always thought that wasting so much time on the latest shiny programming languages was like focusing on the telescope instead of the stars and galaxies you were supposed to observe.
@XERAEN
@XERAEN 3 ай бұрын
G. K. Chesterton reference dropped, subscribe button slammed.
@daniellindforsbernholm3682
@daniellindforsbernholm3682 Ай бұрын
3:50 The black boxes below C are hardware dependent. If we keep the arguments to what we could consider hardware independent languages (general purpose language) maybe it makes more sense?
@Trezker
@Trezker 3 ай бұрын
If you badger a kid to eat something though they may try it and just to spite you decide to not like it for years, decades, maybe their whole life. So I think the best approach is to just have foods available, ask neutrally "do you want X". Never ever push the food, just have it available. Eventually they'll get curious and try it just because other people eat it.
@allliver123
@allliver123 3 ай бұрын
rust has an insanely nice package manager that bundles everything up nicely AND includes all dependencies, but adds heaps of abstraction c has no package manager, and you need to do slightly more complex builds on top of installing libraries just to get a binary, but it lets you have lots of control both are a double edged sword, there is no one programming language that can do everything flawlessly because there is no perfect language, and either way you are going to make sacrifices
@dipi71
@dipi71 3 ай бұрын
I'm of 2 extremes: Ruby for complex object-basedness (not mererly OO); and clean C for compact UNIX-like CLI tools, as well as the occasional Ruby-hot-spot speedup. GDB, the GNU debugger (and the Godbolt website) brings it all together for me: it lets me single-step through the produced assembly code. Beautiful.
@freesoftwareextremist8119
@freesoftwareextremist8119 3 ай бұрын
Understandable. These days I just write everything in Lisp, using C when needed, like interfacing with the system or libraries.
@hellowill
@hellowill 3 ай бұрын
Interesting, I prefer going the other way. I.e. starting with Math and REDUCING the abstractions, i.e. functional programming. That said, it depends what project you're building and who you're building with. This video really only applies to hobby projects where you have control over those things.
@potato9832
@potato9832 3 ай бұрын
Just wish C had some new features: namespaces, better built-in memory tools, auto pointers, type aware macros, automated #include guarding, pre and post handlers bound to procedures, etc.
@niggacockball7995
@niggacockball7995 3 ай бұрын
And functions inside structs (void pointers dont count)
@0xO2
@0xO2 3 ай бұрын
Yes, CPUs are complex blackboxes. Programs segfaults without just memory barriers in particular place in assembler code...
@0x0404
@0x0404 3 ай бұрын
I prefer C. But I do want more. I want classes and inline closures. Swift gives me those but makes you jump through too many hoops to use pointers. C++ gives me those but the closure syntax is a mess. JavaScript gives me those but the prototype syntax is tedious to simulate classes but it probably has the most transparent closures.
@jared8411
@jared8411 3 ай бұрын
I cracked and went to C (definitely not c++), because it allows me to learn, but also I realize there are a lot of gotchas with it. So, it makes a great learning and exploratory language, but it seems like a terrible option for actually building stuff. A great discovery and prototyping or proof of concept tool, but building I think the abstracting those gotchas away, after you are aware of them is what you want. The concern and critique of the video, is that, yes, if building something yourself, it is probably more enjoyable and satisfying. When other people are potentially going to change your stuff, you work on a team, that all introduces a lot more variables and levels of complexity that I think make C not the best tool for that type of scenario. Not that a team can't build in C, but it would probably require a whole different model of collaboration than the tools made with that in mind like it sounds more modern tools are like Zig and Rust (Neither of which I am familiar with, especially not Zig yet, but I like pointers, so who knows)
@chonwhite
@chonwhite 3 ай бұрын
With great power, comes great trouble.
@ArturdeSousaRocha
@ArturdeSousaRocha 3 ай бұрын
With great power comes a great core dump.
@kahnfatman
@kahnfatman 3 ай бұрын
I hope my May won’t die when I’m endowed with such power.
@ParabolicLabs
@ParabolicLabs 3 ай бұрын
I absolutely love C and ASM. Something like Zig and Rust is cool and all, but no one talks about formal verification, which nullifies both of their existences for me. Compcert and the verified software toolchain (VST) is absolutely goated and nothing you bluehair devs say can change my mind. Coq is probably one of, if not the best language I've ever learned.
@TheSulross
@TheSulross 3 ай бұрын
yeah - I noticed they all have blue hair too. They are the ones that go around disrespecting the foundational pillars of civilization - and for sure C lang is one of those
@pierreollivier1
@pierreollivier1 3 ай бұрын
C didn't ship a formal verification toolchain, therefore it's unfair to dismiss new languages because they still don't have one. When they will get enough traction, there might be some tooling that does that. Also the whole reason why C had this in the first place, is because of how fragile the language semantic is. So I love C too, but the sooner I can get rid of it the better in my book, because C has that tendency to suck out the fun of programming.
@VFPn96kQT
@VFPn96kQT 3 ай бұрын
You should try ADA. SPARK is part of the language spec.
@ParabolicLabs
@ParabolicLabs 3 ай бұрын
​@@pierreollivier1 No language group to my knowledge has shipped a formal verification toolchain themselves, so your point about unfairly dismissing other languages based on that is largely moot, since none of them have it, it becomes a user's preference. We need to advocate for formal verification to safe language groups. The fact VST and CompCert exists and safe languages like Go, Rust, or Zig hasn't built, attempted, or even talked about formal verification, shows a real lack of scope on their part about truly safe programming and safe programs. None of the safe language groups are talking about or even reference formal verification, you have to dig for small outgrowth groups, which are extraordinarily esoteric. That's the problem. Formal verification is about as esoteric as it gets. Without safe languages publicizing formal verification, it's likely always going to be esoteric. Safe language groups should be the ones pushing for formal verification because it only strengthens their argument for the need of safe languages. They are the ones that have the user base to plead with to develop such tools because they already have sold them safety. They are also the ones that need to show the other side of the safety coin, since safety is their whole argument. These groups are in a prime position to lead the charge in making formal verification more mainstream. Relying only on formal verification or only on the language is never going to be fruitful. Useful, sure, progressive, absolutely, but the real magic bullet here is a safe language and a formal verification toolchain. Until we have both nothing is safe. It's all about the mitigation and the acceptance of dangers, for now.
@leeroyjenkins0
@leeroyjenkins0 3 ай бұрын
Full formal verification is out of scope for a general purpose language because it puts too many constraints on the user. Things like borrow checking aim to "prove" some properties hold for software by adding chained constraints without having to bring the whole machinery needed to "prove" more things about the program. Writing provable code requires a lot of effort both to write code that can mathematically be proven at all, and because even with that you need to hand-hold the software to allow it to prove things anyway. Meanwhile most software doesn't need formal proof that it works, unit tests serve as empirical proof that key values are handled properly and we trust people to write code in a way that unit tests can effectively cover real use cases. Most people using programming languages are doing engineering, not maths. There's a tradeoff to be made between cost, efficiency and "correctness" and "correctness" is rarely the top priority. And languages are written for people who use them (usually by people who use them) so of course most languages don't focus on probability. It still has its place and research on the matter is cool. Just wouldn't say it's a big deal that there isn't a focus on it. Let's talk about this in 50 years when formal proofs in most software is actually something reasonable to do.
@rocapbg9518
@rocapbg9518 3 ай бұрын
"Assembly is smaller" spoken truly like someone who hasn't written a line of x86 assembly in their life.
@lundril
@lundril 3 ай бұрын
The compiler magic is currently the real problem. You write down something like `a[i] = 5;` and the compiler figures out this shouldn't have an effect and removes the "store" assembly instruction. Now someone throws in `volatile`... yeah; but nowadays convincing the compiler to do what you wrote down can really be absolutely horrible. I think the reason behind this obsession with optimization is, that compiler developers just assume (unfortunately correctly) that the people writing code in C nowadays on average have no clue about what this might translate to in assembler or if it's efficient code. Result: The compiler will NOT translate your code into straight assembler, instead it will try to transform the code first into something which hopefully should do the same (with lots of assumptions about the environment) and then translates this resulting code into assembler. That's quite a nightmare because these assumptions under which these transformations are done are not obvious at all.
@leonlysak4927
@leonlysak4927 3 ай бұрын
Dont worry buddy. After Zig you'll migrate to nim before calling it home ;)
@user-hk3ej4hk7m
@user-hk3ej4hk7m 3 ай бұрын
I'm still amazed at it being able to compile down to C and run on an esp32
@danielvaughn4551
@danielvaughn4551 3 ай бұрын
the bit about white paper was a solid joke
@jerichaux9219
@jerichaux9219 3 ай бұрын
Haven’t gotten there yet; were we talking about the 8 people using Haskell again?
@jerichaux9219
@jerichaux9219 3 ай бұрын
Just got there. BOOM, called it!
@This_Account
@This_Account 3 ай бұрын
Any programming language is better than web server config files. Even debugging isn't the same because the feedback is invisible until you check.
@ymi_yugy3133
@ymi_yugy3133 3 ай бұрын
C is pretty simple, but there is so much I hate about it, because it makes me think about stuff, that can be solved by tooling without giving up anything I consider remotely valuable. Here a non exhaustive list - Declaration order in files matters - no generic containers without macros (hashmap, vector, etc.) - hardware dependent integer sizes by default - standard library varies greatly between platforms - separate header files - fallthrough in switch statements - includes, macros and the preprocessor in general. - polymorphism only via void* - no references (i.e. never null pointers) - no namespacing of any kind - enums polluting global namespace
@tomzimny7408
@tomzimny7408 3 ай бұрын
I love mechanical watches. It's awesome to see an old German man putting tiny, fragile pieces together to make something we take for granite (pun).
@Bp1033
@Bp1033 3 ай бұрын
I got good at C and it made me pretty good at every other language I found out. Because I played "the farmer was replaced" and accidentally learned python in like an hour.
@tibo1671
@tibo1671 3 ай бұрын
It's the same reason why some companies prefer paying expensive cloud bills rather than paying people to take care of the infrastructure : it takes time, and time is expensive
@woolfel
@woolfel 3 ай бұрын
I don't like or wear watches, but I appreciate the level of art and craft.
@LionKimbro
@LionKimbro 3 ай бұрын
I would argue that Assembly Language is much “bigger” than C, on modern CISC systems. There are zillions of obscure instructions and myriad different CPU states and configurations, and C can really simplify that to a more standard arrangement of data and functionality.
@robinmaibals1193
@robinmaibals1193 3 ай бұрын
He's so afraid of exposure that he's treating this like he's living in a nuclear fallout zone.
@movntn
@movntn 3 ай бұрын
GK Chesterton mentioned
@AllanSavolainen
@AllanSavolainen 3 ай бұрын
Hmm, I don't think the C standard defines at all what the output of compilation should be. It might compile into Python and still be valid C. Or into Brainfuck. Or to bytecode or WASM.
@hindsightcapital
@hindsightcapital 3 ай бұрын
Haskell mentioned lol
@usercommon1
@usercommon1 3 ай бұрын
Prime's body is a machine which turns 3 min video into 13 min video
@Dazza_Doo
@Dazza_Doo 3 ай бұрын
*Real Talk* How do you use Zig with Embedded/Microcontrollers ?
@omojjegomosc8211
@omojjegomosc8211 3 ай бұрын
5:15 - VIM?
@bearwolffish
@bearwolffish 3 ай бұрын
That only costs time early on, and the time saved after that initial investment is applied to everything you work on. That is true for stripping away abstractions and frameworks if you are gonna reuse that low level knowledge often, but if only used for a specific project, in a specific case it's not really comparable.
@jabuci
@jabuci 3 ай бұрын
I'm being pulled in by D.
@gowthamk7416
@gowthamk7416 3 ай бұрын
I agree here I tried Java script and Java never liked it and never had a interest to work on it then I started learning Rust I really started to like Rust now zig and go I feel they make me feel like I wanna do something atleast write one line of code everyday Same I didn’t get with JS and Java
@RonyBatistaInoa
@RonyBatistaInoa 3 ай бұрын
Mechanical watches are the graphql of timekeeping
@mensaswede4028
@mensaswede4028 3 ай бұрын
I’m frankly sick of all the new languages. It’s not that the new languages are bad- I agree some of the newest languages are better. But a world where development is split into 30+ languages is a worse world than one where everything is written in 5 languages. Every important line of code that gets written will need to be eventually maintained by someone else later on. If we all need to know 30 languages, it becomes much harder to be an expert in them, and code maintainability suffers. C is great because you can get a compiler to it on virtually every platform in the world, it’s fast, small and therefore the syntax is easy to learn. Is it the perfect language? Hell no, but it’s good enough for its intended purpose.
@drygordspellweaver8761
@drygordspellweaver8761 2 ай бұрын
that '?' syntax is a total PITA. Try using Kotlin where a similar concept is employed.
@nevokrien95
@nevokrien95 3 ай бұрын
Assembly is not simpler there r usually 4 ways to achive every basic task... In c usually there r 1 or 2. This is thr key innovation of c its actually more constrained than Assembly
@evandrofilipe1526
@evandrofilipe1526 3 ай бұрын
I think that abstracting may or may not save you time, but what it does do like 90% of the time is reduce complexity
@Singlton
@Singlton 3 ай бұрын
as a begginer in programming world I chose rust after python because I want to start with the best system programming language ever , and I have zero knowledge with c/c++ , therefore why I go to learn old technologies while rust is the updated and enhanced version of them ? , start with the best!
@songxu7837
@songxu7837 3 ай бұрын
I like draw with a single pencil , but if I want to earn the money I use photoshop instead
@mathiasbttger980
@mathiasbttger980 3 ай бұрын
I think a grand goal comprised of smaller goals is the golden medium
@isodoubIet
@isodoubIet 3 ай бұрын
The problem with C is that it's just a straight up terrible language, and its terrible choices are still with us due to its influence and legacy. Nullable pointers, zero-terminated strings, no type safety etc all are objectively bad features that are _not_ forced upon us by the underlying machine model. They're just bad choices that C made early on because its designers (understandably) didn't know any better. L take, nobody should be using C for new projects.
@wolfgangrohringer820
@wolfgangrohringer820 3 ай бұрын
This, exactly.
@slmjkdbtl
@slmjkdbtl 3 ай бұрын
I think C is also one of the most readable language, a huge C project is easier to read than a small JS project
@373323
@373323 3 ай бұрын
yes, this is an awesome take, a profound vid , all the clutter, here is your clarion tune , listen to it.
@frosky9497
@frosky9497 3 ай бұрын
I feel like prime would really like C#
@madson-web
@madson-web 3 ай бұрын
I think that the deal today is about frameworks over frameworks. At some point you are not doing any logic. Just pointing a black box to another blackblock and waiting for the magic to happen. Which is fine, it saves time. But maybe not optimized to your specific task. In that case, if you learned directly using those frameworks , you simply don't know what to do next and ended up doing anything that works. Don't forget that the hardware and energy are still limited in a way or another
@NihongoWakannai
@NihongoWakannai 3 ай бұрын
Honestly I disagree that having a really long term vision will help you in the short term. The best way to plan for the long term is to spend many many years building a strong foundation when you could have instead focused on practical skills for getting a job sooner. It's the difference between a vertical slice vs building bottom up, vertical slicing your skills in life will get you a job sooner but building from the bottom up will set you up for long term goals. long term thinking does not inevitably lead to short term gains unfortunately.
@theroninpianist4443
@theroninpianist4443 3 ай бұрын
C is still king on embedded development.
@josegabrielgruber
@josegabrielgruber 3 ай бұрын
Prime is afraid of wasting time, but, tell me Prime, how much time do you waste fixing errors that are beyond your control? Arch you invest your time once, you don't waste it
@yapdog
@yapdog 3 ай бұрын
I've been coding in C for over 3 decades. And over those years I've weathered the storm of new language fervor, languages intended to get around some problem with C. However, when you take a closer look at the offerings, it's usually a collection of features intended to prevent bad code....... only to discover that it's impossible to prevent bad code. *_Just. Code. Better._*
@bitwize
@bitwize 3 ай бұрын
Even experienced C programmers hit UAF, BO, and UB landmines with astonishing frequency. These problems Just Go Away with Rust. Time to suck it up and pull on the programming socks.
@jerichaux9219
@jerichaux9219 3 ай бұрын
@@bitwizeI don’t wear clothes when I code.
@yapdog
@yapdog 3 ай бұрын
@@bitwize I don't have UAF problems in my code. I have my own C API which prevents such problems. As far as "undefined behaviors", you'll have to be more specific since that's a generic term. Further, to what does BO refer to, body odor? 🤨
@bitwize
@bitwize 3 ай бұрын
@@yapdog BO = buffer overflows. I don't have to be specific about UB because just about every instance of UB is a landmine. Signed integer overflow is UB, but unsigned integer overflow is not. You literally cannot add two signed ints without first checking whether the second addend is greater than INT_MAX minus the first addend, if you want to avoid UB (and thus, nasal demons). There are all sorts of little gotchas that you have to be aware of, that don't make sense unless you're a C language lawyer whose familiarity with C's quirks and foibles has overridden common sense. And no, just because you claim to be careful doesn't mean you won't be caught unawares. And it doesn't solve the aggregate problem wherein expert C programmers introduce CVEs on the regular _despite_ ostensibly being careful. C delenda est. Rust for the win, uwu ^_^
@niggacockball7995
@niggacockball7995 3 ай бұрын
@@bitwize sorry i dont have gender dysrhopiha or whatever it is called
@WHYUNODYLAN
@WHYUNODYLAN 3 ай бұрын
"C is simple bro" void (*signal(int, void (*fp)(int)))(int) 🤣
@catcatcatcatcatcatcatcatcatca
@catcatcatcatcatcatcatcatcatca 3 ай бұрын
I have to disagree hard on the argument that modern CPUs make C a ”black box” like other languages. This is a ridiculous statement. You CAN understand C on very atomical level. The depth you need to dive in is at least visible. This is /not at all/ the case with the wast majority of languages. a: C makes compile targets something you can grasp. If you choose to look there will be a clear connection between your code and the symbolic assembly. This is hardly the case for most languages, as as soon as you peak behind the curtain you will find datarepresentations and subroutines that were not at all apparent when writing the code. And with many languages, peeking behind this curtain hardly makes any sense at all, as your code will run in very very different environments by default. You didn’t have to choose a build target, but as a tradeoff you can only inspect one out of all the forms your code might take. And so, you must accept the languages abstractions as-is. b: You can interract with the OS in the most direct way there is with C. While in a more high level language the best you can call is interracting with C/C++ someone else wrote, that in turn interacts with the OS. This again is a hard limit on how far in to the sea of black boxes you can shine light to. You are forced to move from your own code to someone elses code at least one whole level sooner. c: But for C, even the OS is optional. High performance, obique and complex architectures like ARM or x86 are also optional. If the goal of your project is as indepth understanding as possible, you can do it with a microcontroller instead. C, as a language, forces none of this complexity into your project. If you truly, absolutely want to banish all of the darkness from your project, use open source hardware and open source ISA. You can still write the same C. Here you can trace your memory allocation to the very capasitors making up your data. Of course C is still a high level language. In practice you are often happily include code without reading even the header-file. However, you are free to peel the layers back as deep as you want. If you want a high level language compared to assembly, C can do it for you. And if you want a high level language over a wast sea of proprietary binaries, C can do that as well. And because of that, in practice you can usually determine the level you are comforable with. That is the source of the feeling of simplicity and transparency: freedom of choice. You carry the torch and shine the light where you want. TL;DR: If you never run into the limits of a more convinient to write language, like Python, you have the exact same freedom of choice. As long as the abstractions are helpful, they help with finding answers we seek. But eventually we all find something disturbing lurking in the darkness, something we feel very uncomforable not knowing. At that point, when the languages options run out, you are left with only two choices: Write it with something closer to C. Or close your eyes and pretend you didn’t see it. trace your steps back and try some other abstraction. There is ”something” wrong with that one.
3 ай бұрын
PSA: light mode flashes after the video
@Amy-601
@Amy-601 3 ай бұрын
Multi Core! Boom 💥! - Amy
@Holobrine
@Holobrine 3 ай бұрын
Arch? Nah, try NixOS. Manually configuring stuff on every installation is obsolete. The accessible config files of NixOS give you just as much control as Arch, but still save you time as your config is installed automatically. And people have curated NixOS configs so you don’t have to start from scratch.
@evandrofilipe1526
@evandrofilipe1526 3 ай бұрын
Guix?
@MikAlexander
@MikAlexander 3 ай бұрын
Once you understand C, it's not much different then BASIC in the way you think of it.
@Evansgr123
@Evansgr123 3 ай бұрын
Someday Apple will add AI to an analog watch and then I may switch back
@random_bit
@random_bit 3 ай бұрын
I know where Rust allocates but it's because of my experience doing C. So I get what you mean when you say Rust devs don't know about explicit allocations.
@justanothercomment416
@justanothercomment416 3 ай бұрын
A pointer which always exists - a reference.
@potato9832
@potato9832 3 ай бұрын
Completely false. Pointer values reside in the address space which exposes them to pointer arithmetic. Can't do that with references. Also. Does ptr += 1 always exist? How about &array[100]? Can't guarantee existence when pointer arithmetic is a thing.
@justanothercomment416
@justanothercomment416 3 ай бұрын
@@potato9832 A reference is never null.
@potato9832
@potato9832 3 ай бұрын
@@justanothercomment416 I didn't say a reference could be null. Don't shove words down my throat I never said. I said your assertion that a pointer that's never null is equal to a reference is total bullshorts. (i.e. dumb.)
@justanothercomment416
@justanothercomment416 3 ай бұрын
@@potato9832 Why are you projecting? Both of my statements are factually accurate. Nothing of your discourse is. Perhaps step back and review.
@potato9832
@potato9832 3 ай бұрын
@@justanothercomment416 Stop lying. Just stop.
@Sqwert-g6h
@Sqwert-g6h 3 ай бұрын
Why do V tubers always ductape nitrile gloves to their wrists whenever they need to actually record themselves?
@Brodzik-kz8nt
@Brodzik-kz8nt 3 ай бұрын
because showing skin is haram
@MagnusNemo-xc5nx
@MagnusNemo-xc5nx 3 ай бұрын
Odin
@leomontes7343
@leomontes7343 3 ай бұрын
what's a function? ;)
@heavymetalmixer91
@heavymetalmixer91 3 ай бұрын
C++ is waiting for you.
@romangeneral23
@romangeneral23 3 ай бұрын
If you have infinite time and no deadlines then sure use C.
@sh4d20w
@sh4d20w 3 ай бұрын
it’s a mazoterica harmony
@aymaneeljahrani2280
@aymaneeljahrani2280 3 ай бұрын
Dude never code. Only reacts 😂 Influencer developers, that’s hilarious !
@MindBlowerWTF
@MindBlowerWTF 3 ай бұрын
I like C++ and Im kinda afraid to say this
@christianremboldt1557
@christianremboldt1557 3 ай бұрын
I don't like Zig because I have never tried it
@vwheukfvf
@vwheukfvf 3 ай бұрын
Why hear?
@carstenrasmussen1159
@carstenrasmussen1159 3 ай бұрын
That's why I like betterC. C without macross
@madmanali93
@madmanali93 3 ай бұрын
We just need zig++ soon
@sarnikowskirafal
@sarnikowskirafal 3 ай бұрын
I love C actually, but two things are just too much for me, 1. Buildkit, 2. stdlib global states.
@cazz
@cazz 3 ай бұрын
Prime might be a web dev, but we all know hes moving towards C/C++
@zyriab5797
@zyriab5797 3 ай бұрын
It's "C and/or C++". Stop mixing these languages, it confuses newcomers.
@mrfli24
@mrfli24 3 ай бұрын
⁠@@zyriab5797really ??? 😂
@Cyclically
@Cyclically 3 ай бұрын
didn't expect to see you here
@aliceylan1211
@aliceylan1211 3 ай бұрын
@@zyriab5797 it doesnt confuse anybody what are you talking about those two are literally the same language but one having some additional stuff
@carriagereturned3974
@carriagereturned3974 3 ай бұрын
C++ never been promoted here. C++ is over complicated.
@andythedishwasher1117
@andythedishwasher1117 3 ай бұрын
Wait, did Prime just subtly endorse the practice of quiche eating? Revoke this man's x86 Assembly license immediately!
@PhilipAlexanderHassialis
@PhilipAlexanderHassialis 3 ай бұрын
"Real programmers don't eat quiche"
@Kane0123
@Kane0123 3 ай бұрын
His kids clearly rejected his quiche eating ways. So he got that right at least
@sigmawolf228
@sigmawolf228 3 ай бұрын
wait, did you just shif in your pants?can you like unshif?
@indyztech
@indyztech 3 ай бұрын
All we are saying is give quiche a chance.
@GrahamAtDesk
@GrahamAtDesk 12 күн бұрын
I f'ing love quiche. Nom nom
@SimGunther
@SimGunther 3 ай бұрын
Because it's the offical lingua franca of programming
@eloniusz
@eloniusz 3 ай бұрын
I think you've meant "ligma".
@Vinoyl
@Vinoyl 3 ай бұрын
@@eloniusz what's a ligma
@TheSulross
@TheSulross 3 ай бұрын
there was a time that if an applicant didn't have some years of commercial C programming on their resume that they shouldn't even bother applying. It was as expected in the industry as much as we expect everyone to know the alphabet and be able to read. Those were the days of real programmers, of course.
@eloniusz
@eloniusz 3 ай бұрын
@@Vinoyl Ligma balls
@ShinneyDev
@ShinneyDev 3 ай бұрын
@@Vinoyl💀💀
@DagothDaddy
@DagothDaddy 3 ай бұрын
My reason for C is much simpler. I need to justify my alcoholism.
@clandeszipp4564
@clandeszipp4564 2 ай бұрын
😂 I can relate.
@FinaISpartan
@FinaISpartan 3 ай бұрын
C is still the closest thing to cross-platform assembly. I also love the simplicity of the language, and it shows with how small and fast its compilers are. I only wish it had better tooling, as something like cargo really speeds up development.
@TheSulross
@TheSulross 3 ай бұрын
any tech stack that achieves esoteric priesthood status and I'm all in my copy of K&R poses prominently in my shrine to the ATT Bell Labs pantheon
@arimill1045
@arimill1045 3 ай бұрын
just add zig build tools and you're modern. Its the best
@vitalyl1327
@vitalyl1327 3 ай бұрын
Sadly, even C cannot be called a cross-platform assembly. It's too far detached from the actual ABI details, for example.
@uis246
@uis246 3 ай бұрын
​@@vitalyl1327except inline assembly
@bitwize
@bitwize 3 ай бұрын
I'd say LLVM and WASM are closer to cross-platform assembly than C. C is a high-level language with an abstract machine model as part of the spec.
@mateusvmv
@mateusvmv 3 ай бұрын
Wait until you start implementing high level concepts within the C preprocessor Because no language feels closer at home than your own personal (it's readable to you) macro spaghetti
@mxruben81
@mxruben81 3 ай бұрын
I once forked a lua library where the previous owner generated all the tests with a custom C program. It was such a confusing macro mess that I ended up just rewriting them. Probably a skill issue but idc it was still insane.
@samuelmoncarey7183
@samuelmoncarey7183 3 ай бұрын
The best skill to have as a programmer is understanding code someone else wrote
@lmoelleb
@lmoelleb 3 ай бұрын
Not to mention the code you wrote yourself a few weeks back. :)
@MindBlowerWTF
@MindBlowerWTF 3 ай бұрын
@@lmoelleb weeks? Bro, I come back two days later and im lost
@lmoelleb
@lmoelleb 3 ай бұрын
@@MindBlowerWTF well, I did not want to push it too far.... But to be honest, sometimes the lunch break is enough. :)
@GhidBase
@GhidBase 3 ай бұрын
​@@lmoelleb lunch break is more accurate lol
@halladba101
@halladba101 3 ай бұрын
I think writing a code that optimizes someone's time going through it is considerable (kzbin.info/www/bejne/m5m3epuHpc9sr9U)
@AvalancheGameArt
@AvalancheGameArt 3 ай бұрын
Try embedded development, the only abstraction you have is the startup code that calls your main function. Also working with memory you understand how the computer works. interrupts are another thing that allows you to demistify what happens at the processor level. also you need to study the specific controller's architecture.
@grimvian
@grimvian 3 ай бұрын
After 40 years in IT as a reseller and now retired, I wanted to warm up my old hobby - programming. After two years of C++, I realized, that I'm not compatible with C++ and ended with C and it's great. When memory management and logic goes hand in hand, I just love it.
@AlistairGale
@AlistairGale 3 ай бұрын
Because B isn’t commercially available?
@the_mastermage
@the_mastermage 3 ай бұрын
How about D?
@Master120
@Master120 3 ай бұрын
​@@the_mastermage i guess D already exists e-e
@IamPyu-v
@IamPyu-v 3 ай бұрын
and cuz B is interpreted
@JohnDoe-np7do
@JohnDoe-np7do 3 ай бұрын
Every now and then i rmb D is a language 😂 dont get why its basically unknown despite being easy & decent
@colemanroberts1102
@colemanroberts1102 3 ай бұрын
​@@JohnDoe-np7do I feel D doesn't have a natural niche or compelling features. D's sweet spot is between c++ and java. "C++ with GC" or "native code java". But C++ has accrued features like reference counting, and java has jit compilers now.
@Bobbias
@Bobbias 3 ай бұрын
"all you need is a bunch of nand gates" Better yet, all you need is a bunch of transistors.
@XDarkGreyX
@XDarkGreyX 3 ай бұрын
Just need a lot Indians who know math
@ark_knight
@ark_knight 3 ай бұрын
Even better - Abacus - Chinese.
@janek9971
@janek9971 3 ай бұрын
all you need is electrons and holes
@hindsightcapital
@hindsightcapital 3 ай бұрын
Better yet, all you need is some sand
@bearwolffish
@bearwolffish 3 ай бұрын
10:28 Do love those filters and ranges. Haven't written a boomer loop in anything but simple examples made readable for people unfamiliar with algorithms, in a long time.
@AGentooUser
@AGentooUser 3 ай бұрын
1:45 In youtube you can press '
@zyriab5797
@zyriab5797 3 ай бұрын
Thank you, wise Gentooman
@jgfjfgjfhjf
@jgfjfgjfhjf 3 ай бұрын
ty
@sutirk
@sutirk 3 ай бұрын
We got vim motions on KZbin before we got GTA 6
@stefangibacaivastani
@stefangibacaivastani 3 ай бұрын
@@sutirk tragic
@jerichaux9219
@jerichaux9219 3 ай бұрын
Marry me.
PHP Doesn't Suck Anymore? | Prime Reacts
25:42
ThePrimeTime
Рет қаралды 330 М.
Dear Functional Bros | Prime Reacts
26:03
ThePrimeTime
Рет қаралды 224 М.
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 20 МЛН
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 9 МЛН
zig will change programming forever
9:34
Low Level
Рет қаралды 306 М.
Scrum IS AWESOME
27:01
ThePrimeTime
Рет қаралды 129 М.
Do NOT contribute to open source | Prime Reacts
36:40
ThePrimeTime
Рет қаралды 280 М.
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 81 М.
C Skill Issues -  White House Is Wrong And Here's Why
47:52
ThePrimeTime
Рет қаралды 281 М.
Programming War Crimes | Prime Reacts
10:36
ThePrimeTime
Рет қаралды 372 М.
Prime Reacts: From C to C++ to Rust to Haskell
40:54
ThePrimeTime
Рет қаралды 315 М.
I took the #1 Tech Exam and it was BRUTAL
18:28
Linus Tech Tips
Рет қаралды 1,2 МЛН
C Is Not A Language Anymore
34:29
ThePrimeTime
Рет қаралды 228 М.
I Am Done With Graph QL After 6 Years
31:41
ThePrimeTime
Рет қаралды 141 М.