DIY Programming Language #1: The Shunting Yard Algorithm

44,098
0
Published 2024-05-03

All Comments (21)
  • @javidx9
    So are you BODMAS, or PEDMAS, or something else?
  • i've been writing code for almost 30 years and im still learning new things. thank you so much
  • @psodq
    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!
  • @user-ov5nd1fb7s
    Dude, I started following your stuff when I was a junior dev. Almost 10 years have passed, nice to see you still make great content.
  • @Barnardrab
    In school, we were taught "Please Excuse My Dear Aunt Sally" as the acronym for the order of operations. Also, another word for value is operand. For instance, in 4 + 5, the "+" is the operator and "4" and "5" are the operands.
  • @kplays_6000
    Just as a callout to people who learn alternatives such as PEMDAS and BIDMAS - the order of multiplication and division doesn't matter - they have the same precedence and are just done from left to right together. The same with addition and subtraction. You can swap M/D and A/S if you feel more comfortable that way, but these are within the scope of this video the only pairs that are interchangeable as of right now!
  • Just got into the Pixel Game Engine and happy to see you still making content! Thanks for everything you do for the community, you are appreciated!
  • @antonpieper
    Custom programming languages are an interesting topic that plagued my mind for years! Great to see you covering this
  • @SimGunther
    My mind was blown when I combined Recursive Descent statement parsing and Pratt expression parsing constructed with compile time curried functions. Great analysis of this expression parsing algorithm!
  • @landmanland
    I never knew that it was called the shunting yard algorithm. I still remember that creating a calculator was one of the first programs I had to write while studying 35 years ago.
  • @catapillie
    programming language development on this channel, I'm all for it!!
  • @Z80Fan
    25:50 The answer is 2 but not for the reason given: multiplication and division have the same priority so they are evaluated left-to-right, so: 1x(2+4)/3 = 1x6/3 = 6/3 = 2. The same for addition and subtraction.
  • @devpoodle
    Great vid! I never really knew where to start when it came to evaluating expressions.
  • @itsjustboarsley
    Great work mate. If I had existed 10 years ago I would have had an easier time writing my compiler in college. I’m glad creators like yourself are out there.
  • @Sam-hu3xt
    I love how eloquent you are explaining alien stuff like this.
  • @ryanlarge6296
    This was a fantastic educational video! Thank you for your time with this one. Very excited to see what comes next in the series!
  • @GRAHAMAUS
    Familiar algorithm, well explained -- good job! One thing you might have added is why it's called the "shunting yard algorithm", because it can be explained by analogy to shunting railway wagons in a yard in such a way as to build a train in the necessary order. In that analogy, only one stack is generally used (though another is needed for evaluating the solution, though in fact it can be the same stack with a bit of cunning).
  • The master has returned. Always good to see amazing content with value from you and the community. Keep it up javid, and congratulations on X10 growing health:)
  • Always, Aaalways I come back to Javid channel I learn something new! Thank you so much for all!
  • @CediCore
    I love your lovely placed remarks, like the "system("pause")" one ❤