For example, RPN for stack is like the following: Like doing math vertical when in school 100 (first number entered... Bottom of Stack) 10 (Second Number entered (Higher up in stack or on top in this case)) - ___________ ( Do the mathematical operation: Subtract ) Hope the format remains.
Will be interesting when doing something particularly fancy like complex compound math sequences and also with loops. I think we can do it with enough getting our minds around the syntax. The most extreme would be understanding how the binaries work on the instruction by instruction level and wrapping our minds around that and write it in a HEX EDITOR (old days, we called that ML Monitors).
Lovely video, but this from ChatGPT: Alan Turing did not invent the stack. The concept of a stack in computer science predates Turing's work. The stack is a fundamental data structure used in computer science and programming, and its origins can be traced back to the early development of electronic computers. The concept of a stack was introduced as part of the von Neumann architecture, which is the foundation for most modern computer systems. This architecture, proposed by John von Neumann in the mid-1940s, included the idea of a "last in, first out" (LIFO) storage mechanism, which is the fundamental characteristic of a stack. So, while Alan Turing made many significant contributions to computer science and mathematics, he was not the inventor of the stack. The concept of the stack emerged as a natural component of the early computer architectures.
the implementation of the turing machine is single-stack pushdown automaton which is fundamentally a stack. so it does pre-date von neumann architecture, sure the concept of a stack as we know it today was formalized in von neumanns work but remember the two worked together in princeton prior to this. i stick with my claim in terms of computing turing invented the stack, even if it wasn't formalized as that
Not Alan Turing invented the stack, but F.L. Bauer and Samelson invented it independently in the 1920s. -> en.m.wikipedia.org/wiki/Stack_(abstract_data_type)
Excellent intro! Starting with an understanding the foundation is great - no libraries, no dependencies, minimal tools. Please cover more topics 👏
thank you :)
dude your videos are solid gold, please continue to make more!
Thaaaanks that’s really kind of you to say, I have a few more webassembly ones in the pipeline. Glad it was useful
hi, nice videos. I'm more like into circuits in general (like working with verilog), but I find this web assembly very interesting
Excelent video, deserves more views!
thanks. glad you liked
Another fine video.
Glad you enjoyed it
Very helpful, thanks!
Btw pretty cool short notation for params is (func $multiply (param i32 i32) (result i32) (i32.mult (local.get 0) (local.get 1)))
it's a good point.. i shyed away from doing short notation for simplicity but then forgot to mention it altogether, lol. great comment
Why video like this have 39 views, thanks you gave me great thoughts 👍.
Thanks :) I hope it will get more views too, glad it was thought provoking
At 9.48 you could just write return stack.pop() * stack.pop(), since push followed by pop is the identity function
we know that, he jsut try to replicate to stack machine as close as possible.
For example, RPN for stack is like the following: Like doing math vertical when in school
100 (first number entered... Bottom of Stack)
10 (Second Number entered (Higher up in stack or on top in this case))
- ___________ ( Do the mathematical operation: Subtract )
Hope the format remains.
Will be interesting when doing something particularly fancy like complex compound math sequences and also with loops. I think we can do it with enough getting our minds around the syntax. The most extreme would be understanding how the binaries work on the instruction by instruction level and wrapping our minds around that and write it in a HEX EDITOR (old days, we called that ML Monitors).
note that you don’t need the `-o` flag when calling `wat2wasm`, and it will simply use the filename
very nice 👍👍👍
Thank you very much, glad you liked 😀
Why didn’t I learn 1st grade math from you sir!
i'm hoping that was a complement, lol
@@chrishayuk yes sir, definitely a compliment!
Lovely video, but this from ChatGPT: Alan Turing did not invent the stack. The concept of a stack in computer science predates Turing's work. The stack is a fundamental data structure used in computer science and programming, and its origins can be traced back to the early development of electronic computers.
The concept of a stack was introduced as part of the von Neumann architecture, which is the foundation for most modern computer systems. This architecture, proposed by John von Neumann in the mid-1940s, included the idea of a "last in, first out" (LIFO) storage mechanism, which is the fundamental characteristic of a stack.
So, while Alan Turing made many significant contributions to computer science and mathematics, he was not the inventor of the stack. The concept of the stack emerged as a natural component of the early computer architectures.
the implementation of the turing machine is single-stack pushdown automaton which is fundamentally a stack. so it does pre-date von neumann architecture, sure the concept of a stack as we know it today was formalized in von neumanns work but remember the two worked together in princeton prior to this. i stick with my claim in terms of computing turing invented the stack, even if it wasn't formalized as that
@@chrishayuk I, and Chat GPT, stand corrected! Never mind. Great video. Thank you! This stuff is moving fast for an old man like me! :)
en.wikipedia.org/wiki/Stack_(abstract_data_type)#:~:text=Klaus%20Samelson%20and%20Friedrich%20L,invention%20of%20the%20stack%20principle.
@@lynndemarest1902 no worries, tough to keep track of these things, glad you enjoy and find the vids useful
Not Alan Turing invented the stack, but F.L. Bauer and Samelson invented it independently in the 1920s. -> en.m.wikipedia.org/wiki/Stack_(abstract_data_type)