Why I Like Programming in C.

Ойын-сауық

It's hard to explain why you like something, isn't it? I still don't feel like I have.
...
Rust will *never* be as based as Haskell.
[Timestamps]
00:00 Start
00:27 I wanted to play the "Link Opening Chest" SFX here. Please imagine it.
00:58 This is the instruction set I came up with for my bespoke CPU.
01:20 My solution in C
02:05 Couldn't figure out what would be a good example for this. cgltf, maybe?
02:15 Disclaimer: Not An Artist.
[Links]
Ken Sherrif's Blog for CPU Images: www.righto.com/2020/05/extract...
Project Euler Problems: projecteuler.net/archives
cgltf: github.com/jkuhlmann/cgltf/tr...
Some list of c++ features: github.com/AnthonyCalandra/mo...
I like the idea of Haskell: wiki.haskell.org/Zygohistomor...
I recorded and tried adding a few sound effects. Hopefully they weren't too much.

Пікірлер: 72

  • @sturdyfool103
    @sturdyfool103Ай бұрын

    I like working in C++ or Rust because they give me the option, which I sometimes choose not to - to take those basic blocks and turn them into the higher level tools that exponentially snowball my journey

  • @Leonhart_93

    @Leonhart_93

    2 күн бұрын

    C++ gives you the option to write in any way, you can even write plain C in it. Rust doesn't at all, Rust is not about giving you the "option" to do anything. The whole point is to do it exactly like the compiler wants you to do it. No thanks.

  • @teenspirit1
    @teenspirit1Ай бұрын

    I don't love C or anything, but I'm just so happy GCC (and later CLang) exists. We would be up to our necks in corporate BS if those compilers didn't exist or they sucked.

  • @hansdampf2284

    @hansdampf2284

    12 күн бұрын

    Just look at the windows world and their msvc and you know how the rest of the world would be like

  • @efka3039

    @efka3039

    10 күн бұрын

    mingw though!

  • @twenty-fifth420

    @twenty-fifth420

    9 күн бұрын

    @@hansdampf2284Installing Visual Studio was enough for me to realize that Microsoft sucks actually with development tooling. No wonder WSL exists.

  • @Anriuko

    @Anriuko

    4 күн бұрын

    @@hansdampf2284 What would it be like?

  • @zen_nabu
    @zen_nabu6 күн бұрын

    I'm new to C and it was hard to get past the basics but I've found new motivation in the idea that we can truly build anything if we're clever and creative. So cool.

  • @Dev_with_Sel
    @Dev_with_SelАй бұрын

    Great video! Programming in C makes me feel like I'm inside the computer. I'm planning to learn Assembly next to go even deeper

  • @FranciscoFox

    @FranciscoFox

    Ай бұрын

    Nice! It's hard to describe how smooth that transition is--from the computer's internal operation to C. If you want to jump to the bottom you could try designing your own CPU. NAND2Tetris is a great resource for that (from what I remember of it). It's a big jump but *does* grant a lot of...perspective.

  • @Dev_with_Sel

    @Dev_with_Sel

    Ай бұрын

    ​@@FranciscoFox Wow, thanks! I'll take a look.

  • @jewishbanana7055

    @jewishbanana7055

    Ай бұрын

    Binary is harder than you think, learn how to use microcontrollers first to get a gist of it.

  • @Anriuko

    @Anriuko

    4 күн бұрын

    Good for you, and good luck developing the resilience against people telling you that you're doing this programming thing wrong. Check out Peter Cordes on Stack Overflow. If you're going to learn Assembly you'll likely bump into him sooner or later - the guy is a goldmine.

  • @Dev_with_Sel

    @Dev_with_Sel

    3 күн бұрын

    @@Anriuko ahahaha great advice. I was already working on an Assembly project, learning more stuff every day. I'll take a look at Peter Cordes too. Thx

  • @nobodyspecial1553
    @nobodyspecial155315 сағат бұрын

    I like my language as simple as possible. C is perfect for me. And memory errors are not an issue for me with sanitizers. Add a shadow stack to really top it off. When I write C, I know exactly how my code will translate to machine code. In every other language, except maybe Zig, it seems more like I'm making requests than commands.

  • @mr.shredder5430
    @mr.shredder5430Ай бұрын

    great video prrsentation

  • @NormTurtle
    @NormTurtleАй бұрын

    1:45 can u please tell how u mare that animation? Is that blender? Can u share ur video creation workflow

  • @science_trip
    @science_trip7 күн бұрын

    just this ❤

  • @alexdefoc6919
    @alexdefoc6919Ай бұрын

    This is why i left using game engines, i get satisfaction creating.

  • @thedrunknmunky6571
    @thedrunknmunky6571Ай бұрын

    I do enjoy programming in Haskell and Python too.

  • @iogilarb
    @iogilarb8 күн бұрын

    why i love C? idk, i just love it

  • @leonardomangano6861
    @leonardomangano686111 күн бұрын

    I feel the same

  • @timwmillard
    @timwmillard10 күн бұрын

    So true. Love this video. I feel the exact same way with C.

  • @hansdampf2284
    @hansdampf228412 күн бұрын

    I program rust at work and unlike it, but you’re right, there is something that feels great when programming in C. I feel like a genius programming with it and if I find a very elegant way to do something I feel like I invented this. (Although being realistic probably everything I will ever code has been invented before by someone else)

  • @danilafoxpro2603
    @danilafoxpro2603Ай бұрын

    I gravitate towards C as well, for some reason. I don't know why exactly. Part of it might be the simplicity of it, that goes through and through. Language semantics are simple, and they simply map to assembly and machine code. In turn, it's simpler to hack things in if you see a way to take a particular shortcut if 'you know what you are doing'. Other languages sometimes seem to fight me on this, where they have a certain rigidity about how things are done. Of course there are still annoyances. Like struggling to remember how to specify types (pointers to functions that return pointers..), having to look-up operator precedence, stock malloc not necessarily being the best choice for getting memory, header files... Some of those are potentially me still figuring things out, and some annoyances I might have not discovered yet.

  • @afjelidfjssaf

    @afjelidfjssaf

    14 күн бұрын

    yes C is "simple" aka needing unreadable unmaintainable unsafe 200 LOC for something that could be done in another language in 50 simple lines of code. That's why I just use Nim. Can do anything low and high level at C speed with Python syntax and optional garbage collection

  • @danilafoxpro2603

    @danilafoxpro2603

    14 күн бұрын

    @@afjelidfjssaf Well, I personally would look more in a direction of Zig than Nim. But thanks for the suggestion. I am not sure how 'unreadable, unmaintainable and unsafe' my C code is. I certainly do make small mistakes from time to time that can result in pretty interesting memory accesses (which can cause crashes). But things run pretty robust after I fix those. On the other hand I can use unions to overlay multiple structs into one, and thusly pack them continuously in memory (instead of pretty much having to scatter them on the heap). I like to play with memory layout of things and with how allocations are done. Part of that process is also designing data structures and functions in such a way where it's hard to make mistakes. I suppose our dichotomy can be summarized as "it can be pretty good if you are careful / I don't want a language where I need to be careful". If you would be curious to see some pretty good programs written in C, I would suggest Eskil Steenberg (KZread channel). (To mirror your mention of Nim.)

  • @afjelidfjssaf

    @afjelidfjssaf

    13 күн бұрын

    @@danilafoxpro2603 i agree with most of what you said but I feel like its pretty hard to consistently write more robust, safe and performant code than some other languages compiler creating safe optimized C code

  • @danilafoxpro2603

    @danilafoxpro2603

    13 күн бұрын

    @@afjelidfjssaf Mayhaps. Might depend on the person as well. Some people might just not be interested in C, and be pretty content with the language of their choice, be it compiled or interpreted. Whatever works for whoever, I suppose. So far C seems to work for me. Maybe at some point an epiphany will hit me and I'd exclaim "oh what I fool I was for using C all these years!" But that hasn't happened yet. :D

  • @Logan9312

    @Logan9312

    11 күн бұрын

    Try Go if you haven’t because to me, I really like C and go feels like writing a better C

  • @yotu9670
    @yotu96709 күн бұрын

    Thanks. Are you going to do a tutors about hot to use pointers skillfully as well?? And if you want to get more subscribers (don’t know if you want :D) you should ask people in the end to subscribe. Seems to work for all the big channels.

  • @hansdampf2284
    @hansdampf228412 күн бұрын

    Speaking of which, do you know anything books on C for the advanced programmer? I am programming C at work, but this is mostly very basic embedded stuff. The sheer amount of requirements is what makes it hard but the programming is not.

  • @Anriuko

    @Anriuko

    4 күн бұрын

    C Interfaces and Implementations: Techniques for Creating Reusable Software Understanding and Using C Pointers: Core Techniques for Memory Management Expert C Programming: Deep C Secrets C Programming: A Modern Approach Algorithms in C (Sedgewick) Numerical Recipes in C: The Art of Scientific Computing The Standard C Library (Plauger) The Art of Computer Programming (not C per se, but at this point you don't care)

  • @nikkiinit
    @nikkiinit12 күн бұрын

    I love C and C++ over Python, Java, and JavaScript…🎉

  • @nevokrien95
    @nevokrien95Ай бұрын

    I also like c but the ub parts of it are very sucky. Zig/go seems super nice for the same simplicity reasons

  • @sherkhanthelegend7169
    @sherkhanthelegend716919 күн бұрын

    I too love c

  • @ldskmain
    @ldskmainАй бұрын

    I loved it! One more subscribe for you my friend.

  • @ariseyhun2085
    @ariseyhun2085Ай бұрын

    I would however prefer that my mechanical watch doesn't randomly break and need to be rewound again in order to reset it, because the watchmaker thought he was skilled enough to build it without proper tools, but in fact after mass producing the watch later realised that everyones watch had a defect because of one small issue. C is great, but the number of bugs and security vulnerabilities in distributed software present due to a memory issue is way too high.

  • @tiranito2834

    @tiranito2834

    Ай бұрын

    "C is great but the big number of hobbists with skill issue is bad" Ah yes, the floor is made of floor. I'm going to go up going upward and I'm going to go down going downward. Also, the sky is blue.

  • @ariseyhun2085

    @ariseyhun2085

    Ай бұрын

    @@tiranito2834 ok

  • @tiranito2834

    @tiranito2834

    Ай бұрын

    @@ariseyhun2085 indeed

  • @mariocamspam72

    @mariocamspam72

    Ай бұрын

    ​@@tiranito2834ok

  • @someoneunknown6894

    @someoneunknown6894

    Ай бұрын

    There are many analyzers though, linters and other tooling which prevents these issues. And while yes, rust will always be "safer" than C, it doesn't mean that C isn't safe enough.

  • @someoneunknown6894
    @someoneunknown6894Ай бұрын

    Great video! I wonder what you think about Zig, which still stays at a similar abstraction later to C, and yet adds some improvements (for example defer, which I miss so much in C)

  • @andrewdunbar828
    @andrewdunbar828Ай бұрын

    I'm interested in C and I'm interested in new languages. They have different sets of shortcomings and annoyances.

  • @hawkbirdtree3660
    @hawkbirdtree3660Ай бұрын

    J.S. Bach was a big fan of C. Coincidence? I think not!

  • @rx808
    @rx808Ай бұрын

    naklad it

  • @thedrunknmunky6571
    @thedrunknmunky6571Ай бұрын

    C is one of those things that will take a lifetime to really learn, it's just how it is. I believe that Zig will be replacing C eventually, but its not there yet (stability-wise, community support, documentation, etc). Not Rust or C++.

  • @not_herobrine3752

    @not_herobrine3752

    Ай бұрын

    c may surprise even experts from time to time, but it doesnt take a lifetime to get competent at it

  • @mwanikimwaniki6801

    @mwanikimwaniki6801

    12 күн бұрын

    ​@@not_herobrine3752ikr. It's such a tiny language. You could learn everything about C in no time.

  • @MagnusNemo-xc5nx
    @MagnusNemo-xc5nxАй бұрын

    you need to try Odin

  • @cycomkid
    @cycomkid7 күн бұрын

    And it gives oppertunity to create memory errors😂😂

  • @nobodyspecial1553

    @nobodyspecial1553

    15 сағат бұрын

    Use a sanitizer.

  • @mariobroselli3642
    @mariobroselli3642Ай бұрын

    What about PHP? 😮

  • @webnplay

    @webnplay

    Ай бұрын

    PHP is a dynamic language built on top of a c-compiler (PHP-C)….its a black box on top of a black box and not very good either

  • @mariobroselli3642

    @mariobroselli3642

    Ай бұрын

    @@webnplay and what IS very good in your opinion? Stuff Like zig Go or Rust or Haskell Clojure or Elixir?

  • @anoniemoss3566

    @anoniemoss3566

    7 күн бұрын

    PHP is an awesome language and a great tool for server side scripting. Its not meant to do the same things as C. You would never build parts of an OS in PHP. And the only time you really want to think of using C for returning web content is in the case of an embedded device.

  • @userrrr32
    @userrrr3224 күн бұрын

    Ive started programing with python as it was very easy and powerul. but then after that I wanted to learn a lower level langauge like rust or C++. ive tried rust. and c++. but they are just too much for me. the C++ and rust syntax was too complicated. you could type the same thing in a million different ways and code was just genraly hard too read. but then I ended up on C. C was perfect. C is actualy suprsingly easy compared to rsut and C++. I like it because it dosent have all the extra bs like rust and C++ but still abstracted enought that im not writing 1s and 0s. also the rust documentation is absloute shit. its like if they expect you to know it before you know it. but atleast C++ documentation is a bit better. but C has the best documentation ive ever seen. mayve if rust gets more better documentation ill use it. but C is the best in my opinion. its abstract enough where you arent programing in assembly. but its dosent abstract too much where there is too much bs and annoying syntax

  • @poleve5409

    @poleve5409

    6 күн бұрын

    rust's documentation is pretty great wdym? It even has a section for general programming concepts, which is something you don't see often

  • @NormTurtle
    @NormTurtleАй бұрын

    I love how people admire C . But problem is that im in a data science program and they are forcing to use python . Hence have to left C .

  • @loganhodgsn
    @loganhodgsnАй бұрын

    Black boxes=skill issue

  • @ewerybody
    @ewerybodyАй бұрын

    Oh Hai! Interesting video. I'm curious getting into C. Too much Python work to do tho :/ What I like about the video: 1:42 the black boxes analogy👍 2:43 this transition to the blank page!👌 What I disliked: 0:22 this anime style character?! What the?! why? Oh this is in all your vids :/ 1:04 eeeeww D: black single use gloves! I hate it already when peeps do this in cooking videos. But a programming video? .. please! 2:16 oh you DUCT TAPED them to your wrists? OK nevermind

  • @AdventuresOfPepero
    @AdventuresOfPepero6 күн бұрын

    i have the same feeling. after trying new languages, still come back to c. it's kind of my home :)

  • @MrAlanCristhian
    @MrAlanCristhianАй бұрын

    Because you are not manipulable by hype.

  • @Qohist
    @QohistАй бұрын

    just program in binary simple!

  • @Garfield_Minecraft
    @Garfield_MinecraftАй бұрын

    boomer

Келесі