Why I Like Programming in C.

2024 ж. 14 Мам.
10 983 Рет қаралды

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.

Пікірлер
  • 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

    @sturdyfool103@sturdyfool103Ай бұрын
    • 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.

      @Leonhart_93@Leonhart_932 күн бұрын
  • 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.

    @teenspirit1@teenspirit1Ай бұрын
    • Just look at the windows world and their msvc and you know how the rest of the world would be like

      @hansdampf2284@hansdampf228411 күн бұрын
    • mingw though!

      @efka3039@efka30399 күн бұрын
    • @@hansdampf2284Installing Visual Studio was enough for me to realize that Microsoft sucks actually with development tooling. No wonder WSL exists.

      @twenty-fifth420@twenty-fifth4209 күн бұрын
    • @@hansdampf2284 What would it be like?

      @Anriuko@Anriuko3 күн бұрын
  • 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.

    @zen_nabu@zen_nabu5 күн бұрын
  • 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

    @Dev_with_Sel@Dev_with_SelАй бұрын
    • 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.

      @FranciscoFox@FranciscoFoxАй бұрын
    • ​@@FranciscoFox Wow, thanks! I'll take a look.

      @Dev_with_Sel@Dev_with_SelАй бұрын
    • Binary is harder than you think, learn how to use microcontrollers first to get a gist of it.

      @jewishbanana7055@jewishbanana7055Ай бұрын
    • 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.

      @Anriuko@Anriuko3 күн бұрын
    • @@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

      @Dev_with_Sel@Dev_with_Sel3 күн бұрын
  • 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.

    @nobodyspecial1553@nobodyspecial15539 сағат бұрын
  • great video prrsentation

    @mr.shredder5430@mr.shredder5430Ай бұрын
  • 1:45 can u please tell how u mare that animation? Is that blender? Can u share ur video creation workflow

    @NormTurtle@NormTurtleАй бұрын
  • just this ❤

    @science_trip@science_trip6 күн бұрын
  • This is why i left using game engines, i get satisfaction creating.

    @alexdefoc6919@alexdefoc6919Ай бұрын
  • I do enjoy programming in Haskell and Python too.

    @thedrunknmunky6571@thedrunknmunky6571Ай бұрын
  • why i love C? idk, i just love it

    @iogilarb@iogilarb8 күн бұрын
  • I feel the same

    @leonardomangano6861@leonardomangano686110 күн бұрын
  • So true. Love this video. I feel the exact same way with C.

    @timwmillard@timwmillard9 күн бұрын
  • 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.

    @danilafoxpro2603@danilafoxpro2603Ай бұрын
    • 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

      @afjelidfjssaf@afjelidfjssaf14 күн бұрын
    • @@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 (KZhead channel). (To mirror your mention of Nim.)

      @danilafoxpro2603@danilafoxpro260314 күн бұрын
    • @@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

      @afjelidfjssaf@afjelidfjssaf13 күн бұрын
    • @@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

      @danilafoxpro2603@danilafoxpro260312 күн бұрын
    • Try Go if you haven’t because to me, I really like C and go feels like writing a better C

      @Logan9312@Logan931211 күн бұрын
  • 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)

    @hansdampf2284@hansdampf228411 күн бұрын
  • 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.

    @yotu9670@yotu96708 күн бұрын
  • I love C and C++ over Python, Java, and JavaScript…🎉

    @nikkiinit@nikkiinit11 күн бұрын
  • 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.

    @hansdampf2284@hansdampf228411 күн бұрын
    • 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)

      @Anriuko@Anriuko3 күн бұрын
  • I also like c but the ub parts of it are very sucky. Zig/go seems super nice for the same simplicity reasons

    @nevokrien95@nevokrien95Ай бұрын
  • I too love c

    @sherkhanthelegend7169@sherkhanthelegend716919 күн бұрын
  • I loved it! One more subscribe for you my friend.

    @ldskmain@ldskmainАй бұрын
  • 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.

    @ariseyhun2085@ariseyhun2085Ай бұрын
    • "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.

      @tiranito2834@tiranito2834Ай бұрын
    • @@tiranito2834 ok

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

      @tiranito2834@tiranito2834Ай бұрын
    • ​@@tiranito2834ok

      @mariocamspam72@mariocamspam72Ай бұрын
    • 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)

    @someoneunknown6894@someoneunknown6894Ай бұрын
  • I'm interested in C and I'm interested in new languages. They have different sets of shortcomings and annoyances.

    @andrewdunbar828@andrewdunbar828Ай бұрын
  • J.S. Bach was a big fan of C. Coincidence? I think not!

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

    @rx808@rx808Ай бұрын
  • 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++.

    @thedrunknmunky6571@thedrunknmunky6571Ай бұрын
    • c may surprise even experts from time to time, but it doesnt take a lifetime to get competent at it

      @not_herobrine3752@not_herobrine3752Ай бұрын
    • ​@@not_herobrine3752ikr. It's such a tiny language. You could learn everything about C in no time.

      @mwanikimwaniki6801@mwanikimwaniki680111 күн бұрын
  • you need to try Odin

    @MagnusNemo-xc5nx@MagnusNemo-xc5nxАй бұрын
  • And it gives oppertunity to create memory errors😂😂

    @cycomkid@cycomkid7 күн бұрын
    • Use a sanitizer.

      @nobodyspecial1553@nobodyspecial15539 сағат бұрын
  • What about PHP? 😮

    @mariobroselli3642@mariobroselli3642Ай бұрын
    • 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

      @webnplay@webnplayАй бұрын
    • @@webnplay and what IS very good in your opinion? Stuff Like zig Go or Rust or Haskell Clojure or Elixir?

      @mariobroselli3642@mariobroselli3642Ай бұрын
    • 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.

      @anoniemoss3566@anoniemoss35666 күн бұрын
  • 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

    @userrrr32@userrrr3224 күн бұрын
    • rust's documentation is pretty great wdym? It even has a section for general programming concepts, which is something you don't see often

      @poleve5409@poleve54096 күн бұрын
  • 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 .

    @NormTurtle@NormTurtleАй бұрын
  • Black boxes=skill issue

    @loganhodgsn@loganhodgsnАй бұрын
  • 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

    @ewerybody@ewerybodyАй бұрын
  • i have the same feeling. after trying new languages, still come back to c. it's kind of my home :)

    @AdventuresOfPepero@AdventuresOfPepero6 күн бұрын
  • Because you are not manipulable by hype.

    @MrAlanCristhian@MrAlanCristhianАй бұрын
  • just program in binary simple!

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

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