Why I Like Programming in C.

Sdílet
Vložit
  • čas přidán 18. 05. 2024
  • 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.
  • Zábava

Komentáře • 75

  • @teenspirit1
    @teenspirit1 Před měsícem +41

    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 Před 15 dny +3

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

    • @efka3039
      @efka3039 Před 13 dny

      mingw though!

    • @twenty-fifth420
      @twenty-fifth420 Před 12 dny

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

    • @Anriuko
      @Anriuko Před 7 dny

      @@hansdampf2284 What would it be like?

  • @sturdyfool103
    @sturdyfool103 Před měsícem +43

    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 Před 5 dny +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.

    • @monkqp
      @monkqp Před 2 dny

      @@Leonhart_93 Sort of. Afaik the compiler forces you to write memory safe code whether you like it or not, You can use unsafe rust if you don't like this.

  • @zen_nabu
    @zen_nabu Před 9 dny +6

    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 Před měsícem +29

    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  Před měsícem +10

      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 Před měsícem

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

    • @jewishbanana7055
      @jewishbanana7055 Před měsícem

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

    • @Anriuko
      @Anriuko Před 7 dny +1

      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 Před 6 dny

      @@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

  • @NormTurtle
    @NormTurtle Před měsícem +2

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

  • @nikkiinit
    @nikkiinit Před 15 dny +2

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

  • @hansdampf2284
    @hansdampf2284 Před 15 dny +1

    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)

  • @thedrunknmunky6571
    @thedrunknmunky6571 Před měsícem +7

    I do enjoy programming in Haskell and Python too.

  • @mr.shredder5430
    @mr.shredder5430 Před měsícem

    great video prrsentation

  • @science_trip
    @science_trip Před 10 dny

    just this ❤

  • @nobodyspecial1553
    @nobodyspecial1553 Před 3 dny

    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.

  • @danilafoxpro2603
    @danilafoxpro2603 Před měsícem +4

    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 Před 17 dny

      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 Před 17 dny

      @@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 (CZcams channel). (To mirror your mention of Nim.)

    • @afjelidfjssaf
      @afjelidfjssaf Před 16 dny

      @@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 Před 16 dny

      @@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 Před 14 dny

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

  • @sherkhanthelegend7169
    @sherkhanthelegend7169 Před 22 dny +1

    I too love c

  • @hansdampf2284
    @hansdampf2284 Před 15 dny +1

    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 Před 7 dny +1

      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)

  • @timwmillard
    @timwmillard Před 13 dny +2

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

  • @shawnmark235
    @shawnmark235 Před dnem

    Hi what code Editor you are using

  • @nevokrien95
    @nevokrien95 Před měsícem

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

  • @yotu9670
    @yotu9670 Před 12 dny

    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.

  • @ldskmain
    @ldskmain Před měsícem +1

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

  • @someoneunknown6894
    @someoneunknown6894 Před měsícem +1

    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)

  • @leonardomangano6861
    @leonardomangano6861 Před 14 dny

    I feel the same

  • @iogilarb
    @iogilarb Před 11 dny +3

    why i love C? idk, i just love it

  • @alexdefoc6919
    @alexdefoc6919 Před měsícem +5

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

  • @hawkbirdtree3660
    @hawkbirdtree3660 Před měsícem +5

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

  • @andrewdunbar828
    @andrewdunbar828 Před měsícem

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

  • @thedrunknmunky6571
    @thedrunknmunky6571 Před měsícem

    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 Před měsícem +3

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

    • @mwanikimwaniki6801
      @mwanikimwaniki6801 Před 15 dny

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

  • @rx808
    @rx808 Před měsícem

    naklad it

  • @cycomkid
    @cycomkid Před 10 dny

    And it gives oppertunity to create memory errors😂😂

  • @userrrr32
    @userrrr32 Před 27 dny +1

    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 Před 10 dny +1

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

  • @AdventuresOfPepero
    @AdventuresOfPepero Před 9 dny +1

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

  • @mariobroselli3642
    @mariobroselli3642 Před měsícem

    What about PHP? 😮

    • @webnplay
      @webnplay Před měsícem +2

      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 Před měsícem

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

    • @anoniemoss3566
      @anoniemoss3566 Před 10 dny

      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.

  • @NormTurtle
    @NormTurtle Před měsícem

    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 .

  • @_Verac
    @_Verac Před 11 hodinami

    Wtf up with the taped clothe and weird animation?🤨

  • @MagnusNemo-xc5nx
    @MagnusNemo-xc5nx Před měsícem

    you need to try Odin

  • @ariseyhun2085
    @ariseyhun2085 Před měsícem +4

    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 Před měsícem +5

      "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 Před měsícem +1

      @@tiranito2834 ok

    • @tiranito2834
      @tiranito2834 Před měsícem

      @@ariseyhun2085 indeed

    • @mariocamspam72
      @mariocamspam72 Před měsícem

      ​@@tiranito2834ok

    • @someoneunknown6894
      @someoneunknown6894 Před měsícem +2

      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.

  • @ewerybody
    @ewerybody Před měsícem

    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

  • @loganhodgsn
    @loganhodgsn Před měsícem

    Black boxes=skill issue

  • @Qohist
    @Qohist Před měsícem +3

    just program in binary simple!

  • @MrAlanCristhian
    @MrAlanCristhian Před měsícem +1

    Because you are not manipulable by hype.

  • @Garfield_Minecraft
    @Garfield_Minecraft Před měsícem +1

    boomer