This is like saying writing a great novel in English is easy. After all it only uses 26 characters to capture every word in the language. Just 26 characters.
@@NotEight that’s not a contrary statement to mine. Most programming languages are simple and have an easy to follow syntax. Programming is more about the problem you are trying to solve, not so much the language you write it in. Like you could write a compiler in many languages that are simple to read, but it is a complex problem. Or, a middle schooler can read, but could they comprehend an essay about theoretical physics? They can read the words probably, but the ideas wouldn’t sink in. It’s great that you’re learning more and more, keep going and keep building
I now know enough C to write my own operating system. Just need a 60 second assembly course so I can switch from real to extended mode and create the TLB
Been a lot of years ago, but I wrote a bit of 8086/8088 ASM. In my course on Digital Computer Electronics, we did a few projects, the final project being a stop watch on an 8086 trainer. Outside of the class, I coded most of an ASM program to read a clock chip on a Leading Edge computer, and set the time in MSDOS 3.2. Funny thing though, they made enough changes in 3.3 that it didn't work. So I gave my classmate a copy of the code my instructor and I wrote. I don't know if they ever got it working on 3.3.
I've been there, and my solution was to steal some assembly code from random osdev projects :') You need to do interrupt table and shit, but at least you will get access to the keyboard, so hooray !
Huh.. you can write your OS in C? I mean the usable,not just boot with command line interface There's one of the Projects Mr.Dennis Ritchie himself head on development like Plan9,Inferno OS,Limbo (programming language) which are available in opensource Dennis Rotchie lead it as original intended way of creating C:portability,sharing with peers Until Java stole it with "write once,run anywhere" marketing catchphrase with chip industry growing & no cooperative plan to make ports for common purpose (thus leads to ever spewing "backward compatibility" curse that haunt the whole computer science industry) Some easy examples are Python,Java with their new versions simply outdating their own past versions (and they force it by stopped "support",No community or people be care like that) So back to the original convo,how could you (would you ever before actually?) Write OS without using Assembly & how 😳 Please share more info,you could check my channel too 😊 As sharing is what makes computer science one if the good communities leading the world 😅❤🌏🎉 Wish all be well 😃🌟✨🙌 25.07.2023 06:00/01 pm ist 4rea,25 like,1Ma
Now explain to the newbs that puts() is for strings but if they want to print a variable they have to use printf(). I've been asked about that a few times over the years.
@@seremptos It's not useless because it's faster and also automatically adds newlines. In situations where you're not using any variables, it makes little sense to use printf. Although, every modern compiler I can think of will automatically convert simple printf statements into puts.
Alas, by the standard, main() returns an int value, not void. Ignoring the return value by using the void type is easy, but wrong, like assuming your micro-C will free() dynamic memory from alloc().
this is for the average smart person who has basically 0 experience with the concept of programming, so some context of how programs work and some general programming theory would probably be necessary for comprehension
Assuming you really have been programming with C since it’s creation in the early ‘70s, you have decades of experience with the language so clearly you’re not the target audience for the video. For anyone who hasn’t seen C code (or any code) before, this is a concise and thorough explanation of the very basics that other RU-vid videos would spend 10 minutes describing yet here is done in under a minute. I would like to say though that if you actually have been programming for 50 years that is pretty cool 👌
@@kevinyonan9666 it's because github copilot automatically filled it in, and large language models are inherently unreliable, especially with minimal context 🤦 he literally didn't write it, and you're ironically exposing how out of touch you are with modern AI developer tooling.
FYI Having the wrong logo and having that autocomplete (copilot?) turned on in this example makes this a lot less beginner-friendly. (Because it's confusing and gaslighty)
The letter “C” holds a distinctive place in the English alphabet, often recognized for its versatility and varied pronunciation. Its phonetic range allows it to represent different sounds, including the hard “k” sound as in “cat” or the soft “s” sound as in “cent.” This duality contributes to its widespread use in constructing words across various contexts, making it an essential component of language. In linguistics, “C” also plays a crucial role in understanding phonology and phonetics. It is classified as a consonant, which means it typically requires some obstruction of airflow to produce its sound. However, its flexibility extends beyond this traditional classification, as evidenced by its ability to mimic both consonantal and vowel-like qualities depending on its placement within a word. Beyond its phonetic significance, “C” holds cultural and historical significance. It has been part of numerous ancient scripts, evolving over time to its current form in the Latin alphabet. Throughout history, the letter “C” has been associated with various symbols and concepts, often representing notions like creation, continuity, or change in different cultures and mythologies. Moreover, “C” serves as a cornerstone in modern communication, appearing prominently in various fields such as literature, science, and technology. From composing compelling narratives to formulating complex mathematical equations, its presence is ubiquitous. Whether it’s in crafting elegant prose, deciphering scientific formulas, or navigating digital interfaces, the letter “C” remains an indispensable element of human expression and understanding. And yes this was ai generated
What always got me in multiple languages (until later) was - why “void”, or why “public static void main()” (Java) etc ? I just didn’t understand that void (or int or whatever) was the return type. To many, I was overthinking it while at the hello world stage, but I really think that understanding each part helped me reduce any fear / anxiety I had about individual languages or systems. When a language just does “print” it seems so much more accessible to a newbie than “public static void main”. But I got there… I love your channel, keep up the great work!!
@@erikkonstas The exit code of a Java application is not directly related to the return type of the main method. Instead, the exit code is determined by the status of the application upon termination. By default, if the application exits normally, it returns an exit code of 0. If there are any uncaught exceptions leading to abnormal termination, a non-zero exit code is returned. If you want to explicitly set an exit code, you can use the `System.exit(int statusCode)` method. For example, `System.exit(0)` indicates successful completion, and any non-zero value can indicate various error conditions. So, you don't need to change the main method to `public static int main`. The standard `void` return type is appropriate, and you can manage exit codes through `System.exit(int)` as needed.
I realised just now though you’re probably talking about C. I haven’t worked much with C tbh. And my reply mentioned “multiple languages”. I’m more familiar with Java. Sorry
From absolutely 0 knowledge about programming, I learned to program by looking at 2 short episodes of 10 from of a youtube tutorial about C programming around 10 years ago.
At college, my computer science teacher gave computers the acronym TOM CAT (Total Obedient Moron Can't Actually Think). It's worth remembering, even for that fancy AI stuff people keep going on about, it really is not thinking!
I’m coming at this without having much in way of computer education except from what I’ve picked up over the years. I’d really like to improve to the point where I can do more making my own shit. Unlike most of the comments, my dumb ass found this useful. Thanks.
It looks similar to Lua, I have a feeling I’d be able to navigate it earlier with the similarities it has just different wording and some scripts like module scripts require that same syntax so it isn’t a complete new thing
ISO C99 and later do not support implicit function declarations and main should have a return type of int and specifying it as void may give you warnings or even compiler or linker errors (depending on the compiler)
Just 2 small… well, maybe not mistakes, letʼs call them blemishes: As specified, both CheckTheWater() as well as main() will⁽¹⁾-‘void’ being missing-be recognized as variable argument functions (i.e. functions that can be called with any number of arguments [of any type]). Also ‘void main()’ should, if one wants to be standards-compatible, probably be typed as ‘int main(void)’… so that the application at hand can properly return its exit status code. Other than those small nitpicks: For 60 seconds? Nice video! ⁽¹⁾ At least until C23 is in wide use.
Not sure if it has changed but last I checked, C has 32 reserved keywords. auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while
Considering that I took what was supposed to be a C++ college course years ago, and all we wrote was C, but we interacted with some C++ code that the instructor gave us for one project near the end of the course. I also was active in a news group where the people that wrote C++ were regularly active, so the course was a bit confusing, when reading about how C++ should be coded.