Muukid
Muukid
  • 1
  • 136 171
Creating a window - Software from Scratch
Chapters:
0:00 - Intro
2:26 - The C Programming Language
11:01 - muCOSA and Win32
16:24 - Setting muCOSA up (the technical part)
26:32 - THE WINDOW
37:34 - Basic window attributes
45:00 - Window input
1:02:58 - Wrapping things up
Переглядів: 136 573

Відео

КОМЕНТАРІ

  • @DanelonNicolas
    @DanelonNicolas 2 дні тому

    impressive work. nice edition. just want to said 34:11 that "mucosa" is a mucous membrane.

  • @morko8491
    @morko8491 2 дні тому

    i really like the color palette in the code snippets, what's the theme's name?

  • @jumpingphantom
    @jumpingphantom 2 дні тому

    now implement system calls 🔫

  • @jasherton
    @jasherton 3 дні тому

    You should be able to use ClientToScreen to get the position in monitor/screen space. Nice video 👍

  • @CloroxBleachDude
    @CloroxBleachDude 3 дні тому

    15:15 WSL (Windows Subsystem for Linux) is a great way to run Linux on Windows. You can remote connect to it through VSCode and probably even other IDEs. So that way you can record your screen and code for Linux at the same time!

  • @MaxiveLegend
    @MaxiveLegend 3 дні тому

    Why didn't you just use wsl for the linux side of things?

  • @JohnAlexiou
    @JohnAlexiou 3 дні тому

    When your wrapper code needs wrapper code of its own, you have achieved greatness.

  • @QuinnCsVideos
    @QuinnCsVideos 4 дні тому

    ENOUGH. muCosa? Like mucus? Dude you need to check your acronym game.

  • @marekkupiec9903
    @marekkupiec9903 4 дні тому

    I love that you said "don't worry if you don't know what that means" in the one place in this overal esoteric video where I actually experienced that thing irl.

  • @australiangamer7956
    @australiangamer7956 5 днів тому

    This dude over here preparing to be sent back in time

  • @smushy64
    @smushy64 5 днів тому

    you did not need to do the whole global window context finding stuff. SetWindowLongPtr and GetWindowLongPtr with the argument GWLP_USERDATA let you associate a pointer to whatever you want with the window handle

  • @morrismaynard6408
    @morrismaynard6408 5 днів тому

    Muukid starts by recommending overloading functions etc. with macros (#define) which is certainly not recommended practice now and leads to code that is very difficult to maintain and debug. If you want to be able to do this kind of overloading, it's probably better to start with C++ rather than C. The next chapter craps all over the Win32 API. I am serious, you will not find it more logical and better documented OS API in this universe. Yes, it has many functions, and yes, sometimes there are several ways to do the same thing with only subtle differences between them. But this is the sign that you are dealing with a mature and rich system rather than one that's been cobbled together ad hoc by people who barely knew what they were doing. You also have many recent options for writing on top of this API if it's too hard for you. The rest of the video, as far as I can tell, consists of Muukid recreating a bunch of stuff that's already in the Windows API. Proof that he did not give any serious consideration or study to it. Overall, it is a very poor video that exposes the relative inexperience of the author.

  • @JustaGuy-cool
    @JustaGuy-cool 5 днів тому

    Good video

  • @4rumani
    @4rumani 6 днів тому

    11:32 talk tuah

  • @quadren4
    @quadren4 7 днів тому

    Fun fact, in spanish the word "cosa" means "thing/object." Not sure if anyone has mentioned that yet, just thought it was kind of funny.

  • @RicyStuff
    @RicyStuff 7 днів тому

    Fun!

  • @NezertorcheaT
    @NezertorcheaT 8 днів тому

    4:40 u literally created a tool called "мудак", which translates as "asshole"

  • @adreto2978
    @adreto2978 8 днів тому

    Whats wrong with memset dude?

  • @user-le2zv6go3v
    @user-le2zv6go3v 8 днів тому

    you must be aware of type theory and maybe even homotopy type theory? I'm kind of confused how magically dependent types, and specifically this "global context" appeared .. very cool

  • @nickpelov
    @nickpelov 9 днів тому

    49:05 Hey, doesn't a window have a user pointer that you can assign to your window management object? Last param of CreateWindowEx is LPVOID lpParam . You get that pointer in WindowProc lParam. You don't need a map. You can have an object or structure that you can attach to a window

  • @michas10121
    @michas10121 9 днів тому

    49:50 instead of LUT you could try using "container_of" macro from linux kernel. Thats a clever macro for pointer manipulation that results in getting the parent struct.

  • @Nikoline_The_Great
    @Nikoline_The_Great 9 днів тому

    Great stuff. But beware implementing your own spinlock. You used a volatile variable and that does not mean that CPU caches are written through. Additionally you also need to use atomic compare and exchange operations to make sure that two threads can't read that the lock is unlocked and grabbing it at the same time. But other than that this is a very fun project.

  • @lautarolavecchia5995
    @lautarolavecchia5995 10 днів тому

    How are you testing all this?

  • @user-ys6ro4wi3f
    @user-ys6ro4wi3f 10 днів тому

    the keymap is exactly the same as in sdl

  • @pieterpretorius9743
    @pieterpretorius9743 10 днів тому

    Exactly what I wanted for months

  • @LesslyPoint
    @LesslyPoint 10 днів тому

    Wait, do you make the music too??

  • @alexdefoc6919
    @alexdefoc6919 11 днів тому

    19:34 doesnt that sound like opengl? :))))

  • @alexdefoc6919
    @alexdefoc6919 11 днів тому

    Fun fact. I wished in the past few months to achive this. but left it later. THx for showing your path.

  • @DissonantSynth
    @DissonantSynth 12 днів тому

    Commenting for the algorithm

  • @ShiroKage009
    @ShiroKage009 12 днів тому

    You kept describing C as close to machine language. I'm no programmer, but what differentiates it from Assembly?

  • @KrytenB
    @KrytenB 14 днів тому

    excellent. excited to see where you take it. looking forward to watching you cope with posix.1 and wayland/x11 next year :)

  • @JohnDoe-np7do
    @JohnDoe-np7do 16 днів тому

    Love how GetClipboardData(some*) returns a handle but CloseClipboard(void) 😂 like u said win32 api sucks 😂

  • @JohnDoe-np7do
    @JohnDoe-np7do 16 днів тому

    7:10 good alignment 😍👍

  • @saeedhaidar1375
    @saeedhaidar1375 16 днів тому

    Please continue man 😭

  • @Bat-Georgi
    @Bat-Georgi 17 днів тому

    31:50 ey yo, I got a question. I'm a bit new to C programing so forgive the ignorance....but how is this Window class supposed to be used and/or implemented in this C program? Last I checked, C doesn't support Classes or any OOP patterns. That's what C++ is for. Does the official doc assume you're just using C++ by default or can we make something like a class in C using structs? And even if we do that in C, will we also have to create our own Inheritance and Polymorphism and all the rest of the OO stuff just to get this "Window" class working?

  • @PAFBEAST
    @PAFBEAST 17 днів тому

    altho i have made windows programs using python using gui libraries, but i really want to sometime spend time on learning and trying low level coding from scratch to actually understand stuff

  • @HexZen-r4h
    @HexZen-r4h 17 днів тому

    Holy shit!!! 🔥🔥🔥

  • @MassDivide
    @MassDivide 17 днів тому

    Couple of notes, first off, SAUCE?! where's the github!? I want to play with muCOSA on the linux side of things. Second off, love the video. Keep it going! Lastly, I had a video idea. Pick a laptop model, a specific model and lets build a from scratch GUI/OS for THAT specific hardware. I think that would be awesome. I love ben eater videos too, I wish he made content more often, fill my need for low level programming.

  • @poutineausyropderable7108
    @poutineausyropderable7108 18 днів тому

    Using void inner seems like an extra dereference, bad caching. Maybe an union would have been better idk. (And a type enum?) Though you are a much better C dev then me. I know fuckall about macros.

  • @Daniel-cl6hj
    @Daniel-cl6hj 18 днів тому

    holy crap 1:31 had me dying

  • @theairaccumulator7144
    @theairaccumulator7144 19 днів тому

    Bruh, I expected interfacing with X in assembly not just the win32 api. This stuff is super easy. I've done that exact setup dozens of times and never tried to pass it off as an achievement.

  • @yassinsoftware
    @yassinsoftware 19 днів тому

    My only problem with this video is that part 2 isn't out yet....

  • @alexanderskusnov5119
    @alexanderskusnov5119 19 днів тому

    It's not a real window. (Delphi is better).

  • @maybetomorrow-e6r
    @maybetomorrow-e6r 19 днів тому

    This tutorial is A++ in addressing C, C+?, C++? and technology in general. Not my strength, but your outstanding communication and organized, creative teaching method awoke my interest and made it seem possible that I too could learn something new and expand my world to more than just opening e-mails, texting and scrolling. Your passion fuels my interest. Need to learn more and awaiting the next chapters. Continuing one chapter at a time is a great help.

  • @bhanusharma2363
    @bhanusharma2363 19 днів тому

    Is it one of those legendary UA-cam algorithm encounters where we come across some highly valuable stuff.

  • @Eddies_Bra-att-ha-grejer
    @Eddies_Bra-att-ha-grejer 20 днів тому

    First time I see a video in 5:4 aspect ratio. Really neat.

  • @dmitrishostakovich3156
    @dmitrishostakovich3156 21 день тому

    I'm stealing your pfp

  • @rnged
    @rnged 22 дні тому

    At this point you can just code your own os 😂😂😂😂

  • @casimir40ksolomon74
    @casimir40ksolomon74 23 дні тому

    1st. Insanely good video to watch before bed. 2nd. You missed the opportunity for a "These bitches love COSA" joke 3rd. Amazing algorithm pull, have subscribed, will be looking forward to the next video

  • @grifferthrydwy
    @grifferthrydwy 23 дні тому

    banger video, keeping me entertained by mostly a black screen and a voice is not an easy task, let alone doing so for over an hour