Тёмный
Mike Shah
Mike Shah
Mike Shah
Подписаться
Teaching computer Science, primarily Modern C++, C, DLang, games, and computer graphics programming
I'm a teaching professor and Senior 3D Graphics Engineer who has worked in industry at various games and graphics companies.

Access Full Courses: courses.mshah.io
Free Community Forum: courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz
Комментарии
@gregorypeck6791
@gregorypeck6791 11 часов назад
very very good explaination ! 👍
@vncstudio
@vncstudio 20 часов назад
Nim also has a REPL which is launched by typing: nim secret . Type quit() to exit.
@oddvarlookus7583
@oddvarlookus7583 21 час назад
Studying SDL lately and your work is wonderful! Thanks so much for your efforts
@green.holden
@green.holden День назад
please cover multithreaded programming in D. it's important
@bernhardkneer5393
@bernhardkneer5393 2 дня назад
Hi Mike, I like your Videos and was looking for something about perfect forwarding. Do you have such a video already? I‘ve understood this is used to avoid unnecessary copy constructor calls when Objects are being initialized and it also works for rvalues but I would like to understand the idea behind this a little better. Thanks and keep on going Bernhard
@kuijaye
@kuijaye 2 дня назад
For a moment i thought i could run x86 linux on arm64 apple. Well that's not "virtually" possible. Why does ubuntu say that opengl version is 4.5? Apple only supports up to 4.1.
@__hannibaalbarca__
@__hannibaalbarca__ 2 дня назад
Virtualization i heard about in 2000; but never try to use it until i switch my journey from mathematic to computing
@fsouza
@fsouza 2 дня назад
I'd recommend UTM! :)
@MikeShah
@MikeShah 2 дня назад
@@fsouza I'll have to give it a try to see how it's improved over the years. In 2021 it couldn't properly run Ubuntu -- but perhaps it's improved or I will figure out the configuration properly 🙂
@bsdooby
@bsdooby 2 дня назад
UTM is a bit more stable, and supports pass-thru (e.g., ARM Linux for improved performance ) as well as X86 emulation.
@bsdooby
@bsdooby 2 дня назад
However, there are still issues; I use UTM on my M1 for demoing Windows PowerShell for my students. Switching screens (for an USB-C attached beamer) induces flickering…
@bobweiram6321
@bobweiram6321 2 дня назад
UTM had some serious limitations when I last ran it a few years ago.
@bsdooby
@bsdooby 2 дня назад
@@bobweiram6321 give it a try; should “work better ™️” now
@twenty-fifth420
@twenty-fifth420 2 дня назад
Virtual Machines are like the ‘spiderman pointing’ at eachother meme, just virtual processes pointing at other virtual processes 😂. Always nice to use to test pilot a distribution.
@MikeShah
@MikeShah 2 дня назад
Hehe -- indeed! It can be nice to have something that just works, and I also understand the problem things like Docker solve. The problem however is when the expectation is that delivering an entire docker file (or operating system!) becomes a better solution than the binary or source of the application -- that's usually a sign the build system or dependencies have gotten out of hand :)
@jafeta.7553
@jafeta.7553 2 дня назад
Great video!
@MikeShah
@MikeShah 2 дня назад
Cheers!
@yarinazoulay6775
@yarinazoulay6775 2 дня назад
Thank you so much for all the effort that you put to make these videos. It is very appreciated !
@__hannibaalbarca__
@__hannibaalbarca__ 2 дня назад
Hello, Mike, i m really appreciate that , i m using double visit; with double variant , variant_ptr_solid -> variante_ptr_behavior and it work very well.
@MikeShah
@MikeShah 2 дня назад
Cheers!
@chicpak3329
@chicpak3329 3 дня назад
Can you mention any benefits of vim that emacs doesn't?
@MikeShah
@MikeShah 3 дня назад
Vim (or at least Vi) is part of the POSIX standard so it'll be available pretty much everywhere. In reality, emacs is probably everywhere too though. That's about it -- choose whichever you like, I've just found VIM was easier for me to learn and use and use (I had to use emacs in college, so that's the last time I was immersed in Emacs 10+ years ago).
@hristovalev2923
@hristovalev2923 3 дня назад
This is literally the ONLY correct AND full explanation of the diamond problem on RU-vid
@MikeShah
@MikeShah 3 дня назад
@@hristovalev2923 cheers! It's probably somewhere in the C++ Programming language book or other texts otherwise. I learned about it from a cppcon talk several years ago 🙂
@riddlewrong
@riddlewrong 3 дня назад
Thanks for this. I'm in a Data Structures & Algorithms course and the topic of friend functions was introduced, but it wasn't clear why we'd want to use them. In my mind, I thought it just seemed like a way to create a backdoor to your protected member data, which seems.... risky at best. I wondered if this is something I'd actually ever want to use (we certainly don't seem to have any applications for it in the class) so this video was really helpful!
@MikeShah
@MikeShah 3 дня назад
Cheers! Yeah, in practice the only time I've really used it is for print functions (or overloading operator>> for output). There are also friend classes which follow the same idea.
@tanmayfalke7221
@tanmayfalke7221 3 дня назад
excellent explanation sir ..
@MikeShah
@MikeShah 3 дня назад
Cheers!
@digitalMathMechanic
@digitalMathMechanic 3 дня назад
I guess we need to use glEnable(GL_CULL_FACE) in PreDraw to see why the winding order matters. In this case, if the vertex order is clockwise, we wouldn't see the triangle; therefore, it has to be counter-clockwise to be visible. (I think Mike's video is flipped horizontally, or he is left-handed. I'm guessing that's why he is using his left hand to show the right-handed coordinate system (8:16).)
@digitalMathMechanic
@digitalMathMechanic 3 дня назад
I used glEnable(GL_CULL_FACE) in PreDraw and changed my original triangle(not quad) to below, and pff... it disappeared. const std::vector<GLfloat> vertexPosition{ -0.8f, -0.8f, 0.0f, 0.0f, 0.8f, 0.0f, 0.8f, -0.8f, 0.0f }; //John Cena triangle const std::vector<GLfloat> vertexPosition{ -0.8f, -0.8f, 0.0f, 0.8f, -0.8f, 0.0f, 0.0f, 0.8f, 0.0f }; //original triangle
@MindHaunter
@MindHaunter 3 дня назад
For anyone on Windows, in powershell you can use "Measure-Command {.\prog.exe}" instead of "time ./prog". Also, I noticed running the program over and over on average makes it run faster. Could be due to branch prediction (I am learning like everyone else, don't take my word), but I let Mike or someone actually knowing what they're talking about comment on that.
@MindHaunter
@MindHaunter 3 дня назад
I noticed in my program address of x compared to y is offset by 4 (the other way around compared to yours). I am on a Windows machine if that matters (as if it fills up from bottoms up; a novice here, sorry if my lingo doesn't make a lot of sense). In any case, your point is still valid, it was just an interesting observation for me.
@MikeShah
@MikeShah 3 дня назад
Hmm, interesting. Same result if you run on godbolt? godbolt.org/. I'm on an x86 machine as well, wondering if you are on ARM (e.g. Apple SIlicon)
@MindHaunter
@MindHaunter 3 дня назад
@@MikeShah I am on Intel's Alder Lake x86. On godbolt: WfbbeMebz
@MindHaunter
@MindHaunter 3 дня назад
@@MikeShah I am on x86. I do get the same result using GB.
@MikeShah
@MikeShah 3 дня назад
@@MindHaunter Interesting, wondering why they were backwards
@MehmedUlusay
@MehmedUlusay 3 дня назад
Thanks, but 14:44 it’s wrong that span is read-only view. We can modify the underlying array with span.
@MikeShah
@MikeShah 3 дня назад
True, can indeed modify the underlying data.
@Sergei_developer
@Sergei_developer 4 дня назад
Hi, Mike! How's it going? I bumped into your series just by chance a couple of days ago and I can say that you're definitely the most knowledgeable person at low-level programming I have ever seen. Just wanted to say thank you for all the impeccable work you have been doing for people from all over the world, who are willing to teach themselves systems programming. Keep it up and take care. Greetings from Russia.
@MikeShah
@MikeShah 3 дня назад
Cheers -- thank you for your kind words!
@matteusgutemberg5603
@matteusgutemberg5603 4 дня назад
Hello Mike, for the record, I'm brazilian and I'm really enjoying your lessons! As for this one, a point raised me a doubt bc when you assigned a value outside the range previously set up to 'Ids' array, you received a 'segmentation fault' message, but in my case I didn't receive anything and it compiled well and even was able to execute. Do you know the reason of this behavior?
@MikeShah
@MikeShah 3 дня назад
If you don't go far enough out of the stack, you may indeed not get a segfault :)
@matteusgutemberg5603
@matteusgutemberg5603 3 дня назад
@@MikeShah thanks for the answer Mike!!
@Garfield_Minecraft
@Garfield_Minecraft 4 дня назад
the voice is projecting to only my left ear lol I'm wearing an ear budd
@MikeShah
@MikeShah 3 дня назад
This is fixed later on :)
@husenpatel9381
@husenpatel9381 4 дня назад
PLEASE MAKE MORE VIDEOS FOR THIS SERIES
@MikeShah
@MikeShah 4 дня назад
Thank you for the kind words! I hope to in time
@stevphiericardo2790
@stevphiericardo2790 4 дня назад
Present_vsync is replaced in sdl3, its entirely different how vsync handled now
@MikeShah
@MikeShah 3 дня назад
Indeed, SDL3 still changing. Waiting for official announcement of first release -- hopefully soon!
@holi_dirty_book
@holi_dirty_book 5 дней назад
I did not see popularity for actor model why ?? But It seems better to me.
@MikeShah
@MikeShah 5 дней назад
@@holi_dirty_book Indeed for certain programs (e.g. telecom, chat, any networking), it's the right model
@kodosunofficial_3
@kodosunofficial_3 5 дней назад
Maybe you want to make videos about pharo/smalltalk too !!!!
@MikeShah
@MikeShah 5 дней назад
Will add those to the wishlist :)
@Sergei_developer
@Sergei_developer 5 дней назад
Great content, excellent teacher. Thank you for the lessons. I sincerely appreciate your work.
@MikeShah
@MikeShah 5 дней назад
Cheers, you are most welcome!
@vb9950
@vb9950 5 дней назад
It's very good series, just wondering why didn't you go through semaphores but only mutexes.
@MikeShah
@MikeShah 4 дня назад
Cheers! Just need more time to plan and record :)
@vb9950
@vb9950 4 дня назад
@@MikeShah wow, never expected you to reply to all the comments. Are semaphores necessary, are there any real-time use cases for it?
@MikeShah
@MikeShah 3 дня назад
@@vb9950 Semaphores are one of the lowest level synchronization primitives. They can be used as barriers, used like mutexes, etc., so many use cases for them.
@meryplays8952
@meryplays8952 5 дней назад
I do not unerstand why this bool x = 0; is legal. bool x = cast(bool) 0 ; should be more sensible.
@MikeShah
@MikeShah 4 дня назад
Both work, but bool x=0; is perhaps a bit cleaner.
@josiascabrera8404
@josiascabrera8404 5 дней назад
Hello everyone! Can you help me please, I am wondering what is the best approach to create your database in c++, is it through binary files? I would like to know the best way if am planning to extend my project in the future. Thanks for your support!
@WyMustIGo
@WyMustIGo 6 дней назад
You are wrong about pitch! It is not the width * number of components (w * 3 in your example). Pitch is the width in bytes of the row, including any PADDING put in it for alignment. For example, a 1 pixel RGB image is not 3 bytes per row, it is probably DWORD aligned and has 1 byte of padding. So the pitch in that case is 4 bytes. Also, back in the day (decades ago, even with VESA in DOS), pitch was also used due to banking and alignment requirements on the video card. When accessing VRAM you had to use pitch to calculate the next row because in some cases it could be hundreds of bytes skipped that did not contain pixels at all, but the BANK's memory window required alignment for the starting address.
@MikeShah
@MikeShah 5 дней назад
@@WyMustIGo correct, thanks for the note!
@WyMustIGo
@WyMustIGo 5 дней назад
@@MikeShah It is embedded in my head since the early days of programming. I have bad memories of VESA, Watcom C with the 32 bit extender and bi-modal interrupts. hehe But it was not as bad as the early 80s with the 8bit computers. My favorite machine was, without a doubt, the Amiga! PS: We used the bimodal IRQ to handle bank switching the video card from assembler, our high level code treated the screen as a linear buffer even though it was broken up by lets say 4 banks. When the high level code wrote outside of a bank, it triggered our IRQ and we would bank in the card. That is exactly what Intel RSX and the Microsoft WinG extensions did. Heck, I think DirectX works that way too.
@MikeShah
@MikeShah 5 дней назад
@@WyMustIGo Too cool! Always fun learning about software history and how we got to where we got. You might enjoy my interview with Wouter and his language Amiga-E then :) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-hDT79xdqf3k.html
@WyMustIGo
@WyMustIGo 5 дней назад
@@MikeShah Thanks, I will check it out. The Amiga was great, back then I worked for Impulse (we made 3D ray tracer named Turbo Silver, and then Imagine 3D, also made some hardware). Sold some shareware too back in the late 80s. After the Amiga died, I went to the PC and eventually worked at Adobe on Photoshop. I miss those days...
@WyMustIGo
@WyMustIGo 6 дней назад
Your audio is dropping out, must be on Linux?
@MikeShah
@MikeShah 5 дней назад
Timestamp (I hear some around 5:30)? This was earlier days in my recording -- perhaps I had a drop off on my mic that was too much.
@andk6893
@andk6893 6 дней назад
But why std::vector doesn't use the move constructor when it reallocates the memory?
@MikeShah
@MikeShah 5 дней назад
Do you have a timestamp? Can use std::move(vect) to convert to an rvalue if you wat the value moved.
@andk6893
@andk6893 5 дней назад
@@MikeShah 17:01 I meant why is it doing (copies) while reallocating memory but then i understood my confuse. We "move" ownership not the data, so when the vector allocates new memory to hold more space it needs to COPY the data from old memory. Sorry, it was stupid question. Thank you for your response and for your lessons!
@MikeShah
@MikeShah 4 дня назад
@@andk6893 Cheers, no worries! You are most welcome!
@guilherme5094
@guilherme5094 6 дней назад
👍!
@ChaohuLightSunway
@ChaohuLightSunway 7 дней назад
don't we need to make check after make -j?
@MikeShah
@MikeShah 6 дней назад
Running the testsuite is not a bad idea :)
@BartonBleazard-t9c
@BartonBleazard-t9c 7 дней назад
Heller Ports
@Hoowwwww
@Hoowwwww 7 дней назад
fn TYPE name, is ugly, i'd have prefered fn name TYPE these people don't understand how important it is to make your language GREPPABLE cool language, but the syntax is a no for me
@runninggames771
@runninggames771 5 дней назад
i dont see how this has any affect on you being able to GREP shit. people get way too nit picky about shit that doesn't matter that much.
@nbasked
@nbasked 7 дней назад
Enjoyable guide!
@MikeShah
@MikeShah 7 дней назад
Cheers!
@meryplays8952
@meryplays8952 7 дней назад
R is a dangerous language. In a future post can you provide a review of Scilab and Nelson (never used it) or Euler Math Toolbox?
@shubh-kr
@shubh-kr 7 дней назад
I used GLfloat since the first video on vertex specification.
@MikeShah
@MikeShah 6 дней назад
Yeah, it should work since both end up being 4 bytes -- but this is the right way to proceed forward :)
@pebbleschan6085
@pebbleschan6085 7 дней назад
Hi Mike, Thanks for the vid. How do you make SDL2 to emulate a real time bit bashed speaker bit?
@stevphiericardo2790
@stevphiericardo2790 8 дней назад
SDL Vulkan 2d api is ready now, and Vulk is the default renderer to use too now. You should make a tutorial about 2d vulkan, which I can't find anywhere else still
@MikeShah
@MikeShah 6 дней назад
Will consider that! SDL has some 3D GPU API also that just had a pull request -- exciting things ahead with SDL3!
@guilherme5094
@guilherme5094 8 дней назад
👍Thanks again!
@grazianofalcone3093
@grazianofalcone3093 8 дней назад
Boring, I struggled to watch the video, it was rambling and lacked useful explanations, if it depended on this video I wouldn't use FreeBASIC even if they pointed a gun at my head. Forgive my heavy and harsh words, unfortunately you are tiring, you don't make anyone understand anything, I come from VisualBASIC 6 and FreeBASIC was a great turning point for developing applications in a Linux environment, with your video you discourage anyone from even getting close. I was really disappointed especially for the work behind it.
@MikeShah
@MikeShah 8 дней назад
@@grazianofalcone3093 sorry to hear that. This series is about looking at languages for the first time -- indeed it can be humbling for myself to see how much knowledge every language and its ecosystem require. 👍
@grazianofalcone3093
@grazianofalcone3093 7 дней назад
@@MikeShah I appreciate your comment to justify yourself and I understand your reasons, being a programmer with knowledge in various languages ​​such as C, C++, PHP, JAVA, JS, VisualBASIC (6, .net) and FreeBASIC, I found your video discouraging for those who would like to start from scratch. Speaking of FreeBASIC it should be said that it is one of the languages ​​without a mandatory structure (like Java and C++ and C) that allows the possibility of developing entire applications and revising them without difficulty, being completely compatible with GNU C you can use libraries like GTK and develop graphical interface applications for desktops, it also has two development environments, one visual and the second text editor, being a compiler it does not depend on a specific editor and the software is compiled to work autonomously, despite being a simple language to learn unlike Python it does not need an environment, furthermore the compiler itself is written in FreeBASIC so a programmer can implement improvements and compile them using the same FreeBASIC, like C and C++, being integrated with GCC extensions the same applications have performances close to those written in C and C++ There is a lot to say about FreeBASIC, to say, furthermore the latest implementations allow the creation and use of objects like C++ and JAVA
@grazianofalcone3093
@grazianofalcone3093 7 дней назад
@@MikeShah Don't worry, mine was just a criticism, I thank you for taking it into consideration and I hope it will be useful to you to improve.
@MikeShah
@MikeShah 7 дней назад
@@grazianofalcone3093 cheers!
@parul9455
@parul9455 8 дней назад
After adding printf, why memory allocated is 1056 bytes, earlier it was 32 bytes
@MikeShah
@MikeShah 5 дней назад
timestamp? I suspect printf allocates, or at least on first use could allocate memory.
@Garfield_Minecraft
@Garfield_Minecraft 8 дней назад
I can't create the renderer, this is the error message Couldn't find matching render driver
@_supervolcano
@_supervolcano 8 дней назад
Having the third highest link on the search results for your language be, "RIP Pony" is brutal. Apparently the post was about Wallarroo switching away from Pony to Rust.
@MikeShah
@MikeShah 5 дней назад
Indeed, probably not fair to the language. I really enjoyed it, and it's quite a clean language!
@MartinME3
@MartinME3 8 дней назад
A try/exception clause block video would be nice! Great great video series!!!
@MikeShah
@MikeShah 8 дней назад
Cheers! Indeed, that's on the todo list!