Introducing 2D Geometry Library
20:52
Dithering with Floyd-Steinberg in C++
26:53
Run-Time Error /RESET
1:40
2 жыл бұрын
olc::CodeJam2021 - Theme
3:38
2 жыл бұрын
olc::CodeJam2021 - Announcement
2:26
How I Practice Programming: Five Dice
34:48
IMPORTANT! CHANNEL UPDATE
4:58
3 жыл бұрын
olc::CodeZone - Mission Logs
21:24
3 жыл бұрын
Back To Basics: C++ Containers
31:41
3 жыл бұрын
Compiling PGE For Web Browsers!
23:14
Community Showcase 2020
40:39
3 жыл бұрын
A Little Update Video
2:00
3 жыл бұрын
Пікірлер
@ablonix
@ablonix 6 минут бұрын
Maybe I misunderstood the code but at 10:00 if '+' has higher precedence than '-' then wouldn't 1 - 2 + 3 be evaluated as 1 - (2 + 3)? That would be unusual, IME. Plus and minus normally have the same precedence and would be evaluated left-to-right.
@Susandwyer
@Susandwyer 38 минут бұрын
Interesting video, nice comb over, thanks.
@Musa03571
@Musa03571 Сағат бұрын
Hi dear brother, your videos are very informative. I have a question for you. Can I develop my own desktop application using the method you showed? For example, I want to make a simple application that calculates the acceleration of an object under the influence of the applied force (for example). This app needs to be downloadable for everyone. Is the path you showed suitable for this? If not, can you guide me? Thank you for this tutorial
@javidx9
@javidx9 15 минут бұрын
This is a great way to start desktop programming. Your application sounds simple, so maybe a simpler approach is better, for example something that runs in the browser, that way anyone can run it with no fuss?
@Musa03571
@Musa03571 Минут бұрын
@@javidx9 Thank you for your answer. I will explain this application as an example. My main goal is to develop a more advanced application. For example, an application that will track the real-time landing process of a vertical landing rocket. How so? For example, imagine a rocket with a mass of 70 kg. When you drop it from a height of 10 meters, it will fall to the ground freely. Yes, that's right. So, what do I want to do here? I want to develop an application that calculates the force required to bring that object down to the ground at a speed of 1.5 m/s, where that force will act and how many seconds it should take. Of course, there are too many details to explain here, basically the aim is to create a flight concept. Well, can't all of these be calculated with formulas? Yes, it can be calculated, but it requires a lot of processing. My goal here is to calculate the change due to mass. (I don't know if such an application exists, I did some research and couldn't find it)
@kinershah464
@kinershah464 2 сағат бұрын
You code on Windows, what do you think? Is Windows better to code on than Linux?
@javidx9
@javidx9 2 сағат бұрын
For me, yes.
@kinershah464
@kinershah464 2 сағат бұрын
@@javidx9 thanks for the response. I feel Windows provides good dev env.
@Zooiest
@Zooiest 3 сағат бұрын
I think goto has a place in the language, or at least until the spec maintainers add labeled control flow statements. for (/* blabla */) { for (/* blabla */) { if (/* blabla */) { // Exit out of both loops goto break_outer; } } } break_outer:; Edit: I should've watched just a few more seconds to see that this use case was already covered in the video
@petermather3049
@petermather3049 4 сағат бұрын
Great video - thanks. I hope you will extend this further. I'm interested in the treatment of functions e.g. sqrt() - probably easy, but what about functions with more than one argument e.g. atan2(x,y) ?
@mynameisfoxxy6110
@mynameisfoxxy6110 7 сағат бұрын
Say that 10 times fast 23:52 (reversh polish notashion expreshion)
@nikkehtine
@nikkehtine 9 сағат бұрын
I've been looking into this for a while now, thanks so much for this video
@davep7176
@davep7176 11 сағат бұрын
I love your channel and glad to see you again haven't seen in a while.... one thing though when I was in school (a long time ago now lol) I was taught the multiplication would only be done first if it was in a bracket. So 1+2*4-3 is actually the same as 3*4-3. I guess I was taught wrong and so for 30-40 years I would have just been giving the wrong answer if I was ever asked. The weird part is that hasn't really hurt me when making computer programs. I suppose this is why when I write code, I use the brackets a lot more than necessary.
@chap666ish
@chap666ish 11 сағат бұрын
That's a great demonstration of how to get to Reverse Polish Notation. I remember learning that in, I guess, 1977. A few of my classmates had the Sinclair Scientific pocket calculator only understood RPN so that's how you had to enter your calculations! en.wikipedia.org/wiki/Sinclair_Scientific
@PaulSpades
@PaulSpades 12 сағат бұрын
Unpopular opinion: Any new language should completely ignore arithmetic precedence in expressions. I'm surely not the only experienced programmer that parenthesizes all expressions in source code. Operator precedence is a hazard, with too many quirks and different order tables in different languages, some of them are different than mathematical rules. RegEx has fewer and more straightforward rules, and we consider that an unreadable menace. Either go with polish or reverse polish with no exceptions, forth or lisp. It's the only logical and reliable solution for communicating expressions.
@iv3995
@iv3995 12 сағат бұрын
Would interpreting every subtraction as “+0-“ work, so you don’t have to keep track of the previous character? Im interested to know if this would be faster, since code would only run when i sees a ‘-‘ instead of every character
@user-kb2qz3gj6k
@user-kb2qz3gj6k 13 сағат бұрын
Thank you teacher
@MatthewBishop64
@MatthewBishop64 14 сағат бұрын
Sick dude. I implemented a "Countdown solver", you know, like TV show. It could solve the numbers game in Countdown. Implemented as an expression tree. I didn't use this shunting algorithm, but it would have worked great.
@v-for-victory
@v-for-victory 16 сағат бұрын
Wow. So great, thanks!
@whiskeyoo
@whiskeyoo 16 сағат бұрын
I love your videos, but there is one thing getting me stuck from time to time - naming conventions. Could you please describe why do they differ so much? Once you create a variable using camelCase (e.g. stkHolding), then you create some other variable using snake_case (new_op), and also the operator struct is called sOperator (afaik structs are usually called with UpperCamelCase). Also, is there any reason of shortening variable/constant names? imo "stkHolding" is not as user-friendly as "stackHolding", especially if you watch the video in parts :)
@johnboyboy919
@johnboyboy919 17 сағат бұрын
So thats the “computing” thing CPUs are so good at
@anthonydistel
@anthonydistel 17 сағат бұрын
We learn it as "Please Excuse My Dear Aunt Sally" or PEMDAS.
@Sfaxx
@Sfaxx 18 сағат бұрын
I'd love to see an algorithm for covering expression into Polish Notation (instead of RPN) as well :) Thanks for such an informative video! 😊
@sbarracudax
@sbarracudax Күн бұрын
We were taught BEDMAS back in the 1980's/90's where I grew up in Canada. I'm pretty sure they teach PEDMAS now.
@hamesparde9888
@hamesparde9888 Күн бұрын
They taught BODMAS at the school I went to (which is in Victoria Australian.)
@kplays_6000
@kplays_6000 Күн бұрын
rather than setting the params to 1 and implementing a special case in the solver, can we just up the precedence and push a '0'? And rather than tracking whether the number of passes is 0, can we not just initialise previous symbol to "Unknown"? We also need to be careful if we're differentiating + and - in precedence - if you do so, 1 - 2 + 3 would first do 2 + 3, then 1 - 5, which is incorrect - I hope we fix this next episode by either giving them equal precedence or checking if we're making an addition before a subtraction
@williamsquires3070
@williamsquires3070 Күн бұрын
(@1:59) don’t forget exponentiation! 😌
@sanderbos4243
@sanderbos4243 Күн бұрын
Great video! I used Recursive Descent rather than the Shunting Yard Algorithm to parse my programming language, as Recursive Descent was a bit simpler for me to implement in C and wrap my head around, since it just uses the function call stack :)
@Sam-hu3xt
@Sam-hu3xt Күн бұрын
I love how eloquent you are explaining alien stuff like this.
@Olosann
@Olosann Күн бұрын
The best ever use case for kitchen table. Thanks!!!
@devpoodle
@devpoodle Күн бұрын
Great vid! I never really knew where to start when it came to evaluating expressions.
@tsol9097
@tsol9097 Күн бұрын
We called this postfix notation when I was learning compiler design - there's also a prefix way to do it. I believe we used an operator stack and a literal stack, but essentially the same process.
@rulojuka
@rulojuka 2 күн бұрын
Nice video as always! Thanks!! 33:24 This is why I hate auto (and every other programming language feature of this sort): the compiler knows the type, the editor knows the type, heck, even the writer knows the type most of the time. The only one who doesn't know the type is the reader. All because the writer wanted to save something very small (like pressing ctrl . or similar in the IDE or using 10 characters worth of display real-estate). I really don't see the point..
@rulojuka
@rulojuka Күн бұрын
Sorry for not being complete: I think you specifically did it to aid in the explanation, avoiding complexity until it was necessary, as a great teacher would do! I was talking about auto's use in production code, not here!
@emjizone
@emjizone 2 күн бұрын
It would be much more fun to start solving what can be solved before you finish writing the stack, thus preventing it from growing larger than necessary. It also saves you the trouble of double-checking whether a symbol is an operator or not.
@emjizone
@emjizone 2 күн бұрын
13:00 Do you really want to check the whole operator stack every time you add an operator instead of keeping track of the minimum required precedence?! Good grief...
@javidx9
@javidx9 Күн бұрын
I dont, its a stack, it works backwards from the top and aborts early as soon as state is valid.
@Nodsaibot
@Nodsaibot 2 күн бұрын
he has gone mad! lol
@TheMyHalo
@TheMyHalo 2 күн бұрын
Can you already tell what kind of programming language? Ive written a stack machine myself once, would love to see a video about register machines like LUA uses
@christophfriedrich5092
@christophfriedrich5092 2 күн бұрын
I am wondering: for the unary operators you used the pass counter variable. Why not change the type of the initial value of the last symbol variable to unknown? That way your code would have been worked from the beginning without the pass counter variable.
@terminallumbago5582
@terminallumbago5582 2 күн бұрын
When I was an intern, many years ago now, I had to write a basic scientific calculator. This is what I used. Was fun. I wrote it in Java. Brings back memories. 😂
@persona-qs5sj
@persona-qs5sj 2 күн бұрын
👍👍👍
@nimcompoo
@nimcompoo 2 күн бұрын
We also learned BODMAS in India! Its quite funny because bodmas in bengali means 'brat' 😂
@luckybearthing1796
@luckybearthing1796 2 күн бұрын
Ironic I finish a course in Uni about this and you post the video after i am done lol
@RoryBecker
@RoryBecker 2 күн бұрын
Absolutely facinating. As per usual @javidx9, I love the combination of your cool-as-a-cucumber delivery and exceptionally clear explanations. Your videos always distract from other side-projects I might be involved in, but it's always such a pleasure, I couldn't possibly complain :)
@brockormond4131
@brockormond4131 2 күн бұрын
When I learned to do this, I don't think I was told what it was called. Our assignment was to make a roman numerical calculator so we had an addition layer to tokenize roman numerials and calculate their value. It was fun, the teacher didn't require 'correct' roman numeral notation (i.e. VIIII counted as 9 rather than IX for 9), but I made it work both ways.
@CrankViewer
@CrankViewer 2 күн бұрын
Great Vid. Thank you.
@ilhanilhanDev
@ilhanilhanDev 2 күн бұрын
Yeah
@music4life467
@music4life467 2 күн бұрын
too many features added in c++
@music4life467
@music4life467 2 күн бұрын
one of great of c++ because of the template where vector and list are standard lib in c++
@kodosunofficial
@kodosunofficial 2 күн бұрын
Finally, Javid makes video about compiler.
@ryanlarge6296
@ryanlarge6296 2 күн бұрын
This was a fantastic educational video! Thank you for your time with this one. Very excited to see what comes next in the series!
@user-br6ku7jj6n
@user-br6ku7jj6n 2 күн бұрын
thank you so much, I've long been wondering how parsing mathematical expression works
@Paulie68000
@Paulie68000 2 күн бұрын
I learned RPN when tinkering with the Jupiter Ace with its inbuilt FORTH programming language back in the eighties! A doomed computer if ever there was one!
@psodq
@psodq 2 күн бұрын
During the first 8 minutes I was thinking: You know he is a programmer when he does not need a computer to program! Thumbs up!
@MoritzWallis
@MoritzWallis 2 күн бұрын
Love your videos! Going to implement this right now myself.