Tsoding becoming unintentionally the Grinch of web dev. I love it
@Salantor11 ай бұрын
Unintentionally...?
@fragproof11 ай бұрын
I started a Raylib app to mess around with audio. This is very helpful because my instinct was to start abstracting a UI in the traditional manner. This gives me a much better idea of how to structure the code.
@robert-m6u7d11 ай бұрын
You’re one of the reasons why I still believe in the internet and society.
@w花b10 ай бұрын
Don't do anything crazy the day he stops uploading because at some point he will.
@jesusmgw11 ай бұрын
Casey is even more of programming legend than I thought if he created this.
@arjayonan295311 ай бұрын
You're a really great programmer. I wish I can have the same skill as you.
@mouloudagaoua11 ай бұрын
it takes a lot of time and effort just put the time and you will get better don't put yourself down you can do it !
@ronp610811 ай бұрын
Making a 2x2 single color image is pretty easy in GIMP btw
@ratchet1freak10 ай бұрын
about dear imgui's disambiguation of IDs, you can manually push and pop ids to that stack, you can decide to push a string, a pointer or a integer. So if you are iterating over a list of things you can do a PushID(i); at the start of the for loop body to prep the stack for that id and then PopID() at the end.
@VACatholic11 ай бұрын
I'm at 1:33:00. I'm assuming Jai accepts an identifier not to disambiguate collisions, but for the loop example you have. Identifier would be `i` in your code, as its in a loop.
@rafaelfeldfix11411 ай бұрын
You have convinced me exactly why we need DOM and react
@lolcat6911 ай бұрын
Nah
@Vulto16611 ай бұрын
I would love to have support for some kind of themes in the future. I'd like to make it look like Cava.
@alurma11 ай бұрын
java script developer be like: where callback
@MRECoelho11 ай бұрын
This comment made my day!
@RandomGeometryDashStuff11 ай бұрын
54:26 what about using half of id for non-variable components: full screen button has id (0x100000000) track panel buttons have id (i | 0x200000000) you would get collision only if you somehow load more than 0xffffffff musics
@edhahaz11 ай бұрын
The web has an implementation problem, the ideas are solid.
@Catterjeeo11 ай бұрын
It's all Skill issues all the way down
@djupstaten232811 ай бұрын
I like the approach. I think it's probably a good idea to have a worker thread run in the background dealing with input, so as to not block and cause hitches.
@Toctave11 ай бұрын
Sorry to be blunt, but based on what ? I don't see how input handling could be slow at all, the kernel handles interrupts itself in the background and the OS's API just read whatever the kernel has to say, it's not a slow process.
@zaid470811 ай бұрын
@@Toctavebased on your mom
@TerminalHeatSink11 ай бұрын
Input is handled by raylib on every frame, regardless if there is input or not
@djupstaten232811 ай бұрын
@@Toctave based on the fact that the GPU doesn't actually handle or detect user input, it needs to be interpreted by the cpu which will then forward instructions. This leaves the potential for a briefly 'frozen' ui if the processing isn't instantaneous. With a separate thread you can free up the infamous 'ui thread'. It's a very basic concept.
@djupstaten232811 ай бұрын
@@TerminalHeatSink What exactly do you mean by 'handled' when there is no actual input TO handle?
@priyakdey789111 ай бұрын
Alexey I love your streams and content . I started working in IT with any background in CS, literally nothing. Went through support projects and what not and just survived. It was nothing more than a job for me. In 2019 I took a break and studied real hard to learn development, though I never knew what to learn, I just learnt depths of Java and its frameworks. 2020 I was introduced to twitch and learnt so much from all you streams. 9 years and still learning, your way to thinking and breaking down a problem is really really brilliant and following that approach these stupid leetcode problem are not just interview material to me, it’s fun to solve these and think in depth, implement these techniques in real projects. I wanna say thanks a lot. @Tsoding. ❤
@alang.205411 ай бұрын
Don't want to be rac*st but you sound Indian or Russian for some reason
@Dr-Zed11 ай бұрын
Making JS "developers" uncomfortable be like
@StarContract11 ай бұрын
JavaScript is the Chad's choice. It's OK if you can't handle the speed
@Ujjawal_Gupta11 ай бұрын
@@StarContractSpeed and JS in same sentence? 😌
@mipselqq313311 ай бұрын
@@Ujjawal_Guptajs is not slow
@cyanide008111 ай бұрын
@@mipselqq3133no just every application that's ever been developed using it
@somebodysomeone559411 ай бұрын
@yestechguy-fj9tmjs isn’t bloated, npm is (its really chaotic, with the leftpad and everything package. and for some reason an is-odd package, and an is-is-odd package to check if a function is is-odd, AND the ansi-red package, ansi-orange, ansi-yellow…)
@tomdeu7911 ай бұрын
after about an hour i realized that i missread dom with Doom. So when comes the gaming part xDD. ??
@RandomGeometryDashStuff11 ай бұрын
53:43 what if hash collision?
@ecosta10 ай бұрын
I had the same question. I think it should be fine for small UIs (i.e. Musiializer) but I don't trust this idea for complex UIs.
@RandomGeometryDashStuff11 ай бұрын
18:21 click is not just mouse button release when hovering over, notice how you hovered over `Unwatch` and released mouse button but nothing happened edit: he talks about that 19:16
@RandomGeometryDashStuff11 ай бұрын
19:40 can mouse pressed and released same frame?
@andrewgrasman895111 ай бұрын
In this example we see that the requirement is mouse down then mouse up as you mouse up on another button that isn't clicked 18:30
@andrewgrasman895111 ай бұрын
Ope
@gto43311 ай бұрын
It will be interesting if you continue making your own react like framework, thats great
@SimpleVar11 ай бұрын
You never needed id's or keeping track of active element for the problem you were trying to solve. Just add one bool flag per clickable element: When a mouse-down happens and you have hoverover - set your flag to true. When a mouse-up happens you check if you initiated the click by simply checking that flag (and react to the click..), and immediately after this you unset your flag NO MATTER where the mouse is - this makes releasing outside unsets your flag, and no other element had their flags set because they did not have hoverover when the click was initiated, so no reaction. The hoverover check (aka hit-test) is independent to this idea, so any approach can fit. Some ideas for the future: allow for alpha-test (clickthrough fully transparent pixels) or having clickables within clickables (some global flag to indicate click was handled this frame) Hope you find that useful
@31redorange0811 ай бұрын
In Java Swing/AWT that's called passive/active rendering.
@aetherialKilix11 ай бұрын
like adding components vs. overriding the paint method? is that what you mean?
@ecosta10 ай бұрын
I see what you meant, but immediate mode is different. Swing/AWT still constructs a tree of components.
@cristo_sal11 ай бұрын
45:32 exactly this is an example of the “midwit” meme. Only true geniuses understand that the code should impose its will on you, not the other way around.
@AndarManik11 ай бұрын
I'm curious why you need to maintain component IDs, wouldn't you abstract click down and click up as, unclick -> click and click -> unclick. This way each element only maintains its own state, if a component is unclicked and it was previously clicked then you know it's clicked.
@io192111 ай бұрын
currently learning c . eveyrthing make sense now
@God-i211 ай бұрын
Streamin When?
@0msdev11 ай бұрын
Immediate UI is basically a FP way of doing UI.
@СергейГордиенко-п4д11 ай бұрын
I guess it is the other way around
@СергейМакеев-ж2н11 ай бұрын
No, the FP way is Model-View-Update. You still construct the whole UI at every frame, but as an actual tree, not as a sequence of function calls. And then, after you've done all the rendering, you collect all the events that happened, and decide what to do with them. Not with many little callbacks, but with one centralized "Update" function.
@ecosta10 ай бұрын
There are some similarities, but a FP UI would be different. More like transforming an UI into a form of function that takes the world state as input and outputs the graphical state.
@LALO-cv4ck11 ай бұрын
Mista azusin
@re_detach11 ай бұрын
Very interesting perspective on "humans are the gradient descent" of this "model/black box" of a program that is trained on the code you are outputing (as the optimizer). Gonna chew on that for a while. After all, machine learning and AI is just humans trying to get out of their biological bodies and into technological ones.
@c4ashley11 ай бұрын
I recently wrote a console application. As the UI got more complicated, I realised it was what would be considered "immediate-mode." This is ImTui. Then it kept growing and getting more complicated, and I was having to pass multiple callbacks into ever-growing function signatures... I almost considered introducing some OOP! 😲
@ecosta10 ай бұрын
Very interesting. I would love to see it in action. But I suspect there is something "non-immediate" if you are using callbacks.
@c4ashley10 ай бұрын
@@ecosta I'll put it on the hub at some point. It's basically just a wrapper for a few common tasks I do in FFmpeg.
@RandomGeometryDashStuff11 ай бұрын
01:37:30 git push?
@afterschool25947 ай бұрын
The web technologies is one of the most advanced technologies out there yet the most popular one is only the DOM. I mean bro they have WebAudio and WebGPU and the best part is its on any modern device in the world and it's pretty much standardized. It's so much waste I think that less people acknowledge this part of the web (The browser)
@guilhermemonteiro60411 ай бұрын
Present, teacher!
@rubyciide554211 ай бұрын
But you need a good brain to do that
@OCEAN-fc9wl11 ай бұрын
Hello, im an intermediate in C and I understand it quite well, I want to start watching your videos to learn more but i dont know where to start, can someone help?
@arrannis588211 ай бұрын
You can open almost any playlist. They usually separate videos on different project and quite often built with C. You can start from this project or Olive.c (it is library for visualization)
@Stroopwafe111 ай бұрын
Just... start watching? Ideally from a first episode in a series so it's easier to follow along, but not required because he goes over what he did and what the goal is every episode. There's no requirement to watching...
@gerooq10 ай бұрын
Ngl this just sounds like React, atleast in the way you're describing it in code.
@ecosta10 ай бұрын
If you get only React (no Redux, libs, webpack, etc), use it without Component class (only functions). Then yeah. Very similar concept. But I would say the React way of passing callbacks doesn't align with the original Immutable mode intent.
@gerooq10 ай бұрын
passing callbacks where exactly@@ecosta
@ecosta10 ай бұрын
@@gerooqWhen you instantiate a component and pass attributes like "onclick", "onmouseover", etc
@jasio58311 ай бұрын
where I can find a link to your discord?
@abelrashid518411 ай бұрын
How did you learned to do this ? Can you provide some resources that I can learn from ?
@yds626811 ай бұрын
It's years of experience. You just need to have enough motivation to learn things. Pick up a project you really want to do (like developing a website or a game), then pick any tool you like and start using it. There's a ton of tutorials online for anything. Anyway, that's how I learned programming. I just did stuff and googled for information I needed.
@tialeilaforever11 ай бұрын
If you want to learn C and this programming style, check out handmade hero.
@ecosta10 ай бұрын
@@yds6268 - exactly. Also, if the tool you selected doesn't fit your needs, try to improve it, learn a new tool or implement one yourself. Rinse and repeat.
@jayjayojatinho901211 ай бұрын
Do it in Delphi and be more happier
@Faery6911 ай бұрын
miss me with embarcadero stuff
@qaqkirby978111 ай бұрын
when turn to rust?
@ariabk11 ай бұрын
do i?
@caio75711 ай бұрын
What is a DOM properly, is a widget?
@ecosta10 ай бұрын
Please excuse me if this wasn't your question, but DOM stands for Document Object Model. It is the way web browsers model the "document" (i.e. the web page being displayed). In a nutshell, it is a tree of html components (div, span, etc).
@caio75710 ай бұрын
@@ecosta so is a data structure of the html components
@ecosta10 ай бұрын
@@caio757 In general lines, yes. But what we call DOM is standardised - all browsers support that same data structure
@azteccrov611311 ай бұрын
Some guys just need sub
@BurninVinyl11 ай бұрын
Ok but you still need a library, my slavic comrade. EDIT: even "Python" has a "library" called tkinter inside the language and there is no need to look around to find another one. With C or C++ without Raylib or IamGui or others, you can't do it so easily like the webdev does.
@ecosta10 ай бұрын
It's more about the journey than the end goal. I love his approach of "let me try doing my thing until my thing isn't fun anymore". 😄
@UnrealCatDev11 ай бұрын
hallo! So you german or not?
@Ginko71311 ай бұрын
He is Russian
@khuntasaurus8811 ай бұрын
he is russian
@samuraijosh159511 ай бұрын
He is Russian. They're like Germans but even smarter.
@cutebedbugs64411 ай бұрын
😅 and they dance with bears ?
@martingrof168511 ай бұрын
@@samuraijosh1595I think it's the other way around
@siriusleto375811 ай бұрын
Really, if it's a one-person project and if you're a lonewolf, a lot of things won't make sense. Now try to manage a project with many people without a standardized data hierarchy, it will be pandemonium.