Kay Lack
Kay Lack
  • 58
  • 494 812
Grammars, parsing, and recursive descent
This video has a page on 0DE5 with exercises and resources
www.0de5.net/stimuli/a-reintroduction-to-programming/instructions-to-languages/grammars-parsing-and-recursive-descent
Chapters
00:00 - Intro
02:23 - Grammars
15:26 - Recursive descent
23:12 - Pushdown automata
28:44 - Outro
Переглядів: 13 547

Відео

Regular expressions as finite automata
Переглядів 20 тис.21 день тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/instructions-to-languages/regular-expressions-as-finite-automata Chapters 00:00 - Intro 02:11 - Finite automata 13:57 - Thompson's construction 26:13 - Outro
Best of the comments, worst of the mistakes (so far)
Переглядів 15 тис.Місяць тому
Want to watch this video on the 0DE5 website? Go for it! www.0de5.net/stimuli/a-reintroduction-to-programming/essentials/comments-and-corrections If you'd like to look at TreeLibrarian's assembly implementation, you can find it here: gist.github.com/neoeno/d73ba7686cdbb1d8b76523faf80fbb33 Chapters 00:00 - Intro 03:54 - Comments: Introducing 0DE5 07:41 - Comments: Binary Coding 08:50 - Comments:...
Crafting executables from raw bytes
Переглядів 33 тис.Місяць тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/instructions/crafting-elf-executables Chapters 00:00 - Intro 00:43 - ELF at a high level 05:10 - Translating instructions 08:59 - Laying out the file 14:25 - Virtual memory 18:00 - ELF framework 22:53 - Epilogue
How the stack got stacked
Переглядів 19 тис.2 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/memory/the-development-of-stacks Chapters 00:00 - Turing's stack 04:43 - Hamblin's stack 09:09 - Samelson & Bauer's stack 15:24 - Recursive subroutines 30:45 - Epilogue The big resources I used: * ~1946 - Alan Turing's Proposal for the ACE - www.npl.co.uk/getattachment/about-us/Histor...
Fast and Beautiful Assembly
Переглядів 16 тис.2 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/instructions/assembly-string-processing-with-and-without-simd Chapters 00:00 - Intro 02:42 - wcx64 analysis 20:01 - SIMD 31:50 - Exercises
Assembly follow-up: from ARM64 to x86-64
Переглядів 6 тис.2 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/instructions/from-arm64-assembly-to-x86-64 Chapters 00:00 - Intro 01:54 - Set up 03:48 - Registers 09:16 - Arithmetic 12:06 - Printing 12:53 - Subroutines 13:21 - Loops 14:15 - Conditions 14:26 - The Exercises
Just enough assembly to blow your mind
Переглядів 138 тис.3 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/instructions/assembly-essentials This one was a real brain melter to make. Chapters 00:00 - Intro 03:32 - Model of execution 13:48 - Assembly Patterns 19:01 - Printing 20:58 - Arithmetic 21:54 - Subroutines 24:27 - Loops 25:14 - Conditions 27:02 - The Exercises
Making .BMP images from scratch
Переглядів 13 тис.3 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/memory/binary-formats-through-bitmap-images Link to the really great hex editor I used: imhex.werwolv.net Chapters 00:00 - Intro 02:00 - Endianness 07:50 - The Bitmap Format 11:47 - A Bitmap Encoder 19:34 - The Exercises
Just enough C to have fun
Переглядів 65 тис.3 місяці тому
This video has a page on 0DE5 with exercises and resources www.0de5.net/stimuli/a-reintroduction-to-programming/essentials/just-enough-c-to-have-fun You can find the C project template here: github.com/neoeno/toy-c-project-template Chapters 00:00 - Intro 01:01 - Compilation 07:56 - Syntax 17:58 - Memory 37:53 - Exercises
From the Rosetta Stone to Binary, Hex, Octal, and ASCII
Переглядів 11 тис.3 місяці тому
This video has a page on 0DE5 with exercises and comments www.0de5.net/stimuli/a-reintroduction-to-programming/memory/binary-code Chapters 00:00 - Intro 00:47 - History of Coding 08:29 - Binary Numbers 20:07 - Hex and Octal 24:30 - ASCII Characters 29:08 - Displaying Data 36:33 - Exercises 37:31 - Epilogue Sources: * Rosetta Stone Image: commons.wikimedia.org/wiki/File:Rosetta_Stone.JPG * Heiro...
Introducing 0DE5
Переглядів 109 тис.4 місяці тому
This video has a page on 0DE5 with exercises and comments www.0de5.net/stimuli/a-reintroduction-to-programming/essentials/about-0de5-and-the-core-ideas 00:00 - Introduction to 0DE5 12:35 - A Reintroduction to Programming 14:33 - The Example Program 15:43 - Memory 19:33 - Instructions 23:54 - Syscalls 27:18 - Functions 32:19 - Structure 36:26 - Cognition 37:35 - Outro You can watch Thomas Garrit...
What's up with the job market for UK bootcamp grads?
Переглядів 5 тис.7 місяців тому
This is a very rough video I wanted to put out to share my current thoughts on the job market for those who are looking for work at the moment. I hope it's as useful as it is unedited :) Written version here: klog.substack.com/p/34-whats-up-with-the-job-market-for 00:00 - About me and this video 07:24 - What kind of market are we in? 17:59 - Who's getting hired and who isn't? 34:50 - How can yo...
Advent of Code 2023: Day 25 (Lead)
Переглядів 2 тис.10 місяців тому
In this one I implement a solution that is entirely too complex for me to reason about in my head and then get very annoyed at things not working! Most of the coding stage is that. But it all works out in the end... I'm trying AoC with a few extra rules: 1. I am coding on the clock: * Under 15m is Platinum * 15-30m is Gold (Target) * 30-45m is Silver * 45-60m is Bronze * Beyond is Lead 2. But I...
Advent of Code 2023: Day 24 (Silver/UltraLead)
Переглядів 1,1 тис.10 місяців тому
Oh my gosh this one was an ordeal. I'm trying AoC with a few extra rules: 1. I am coding on the clock: * Under 15m is Platinum * 15-30m is Gold (Target) * 30-45m is Silver * 45-60m is Bronze * Beyond is Lead 2. But I can plan, research, diagram, etc as much as I like before each part. 00:00 - Part One: Planning 14:28 - Part One: Coding (01:08:38 - Silver) 1:00:00 - Part Two: Thinking & Staring ...
Advent of Code 2023: Day 23 (Lead/Lead)
Переглядів 77310 місяців тому
Advent of Code 2023: Day 23 (Lead/Lead)
Advent of Code 2023: Day 22 (Silver/Lead)
Переглядів 99810 місяців тому
Advent of Code 2023: Day 22 (Silver/Lead)
Advent of Code 2023: Day 21 (Gold/Bronze)
Переглядів 1,3 тис.11 місяців тому
Advent of Code 2023: Day 21 (Gold/Bronze)
Advent of Code 2023: Day 20 (Lead/Gold)
Переглядів 2,5 тис.11 місяців тому
Advent of Code 2023: Day 20 (Lead/Gold)
Advent of Code 2023: Day 19 (Silver/Bronze)
Переглядів 69511 місяців тому
Advent of Code 2023: Day 19 (Silver/Bronze)
Advent of Code 2023: Day 18 (Gold/Platinum)
Переглядів 29511 місяців тому
Advent of Code 2023: Day 18 (Gold/Platinum)
Advent of Code 2023: Day 17 (Bronze/Gold)
Переглядів 58211 місяців тому
Advent of Code 2023: Day 17 (Bronze/Gold)
Advent of Code 2023: Day 16 (Silver/Platinum)
Переглядів 73811 місяців тому
Advent of Code 2023: Day 16 (Silver/Platinum)
Advent of Code 2023: Day 15 (Platinum/Gold)
Переглядів 18911 місяців тому
Advent of Code 2023: Day 15 (Platinum/Gold)
Advent of Code 2023: Day 14 (Gold/Lead)
Переглядів 41311 місяців тому
Advent of Code 2023: Day 14 (Gold/Lead)
Advent of Code 2023: Day 12 (Silver/Lead)
Переглядів 23111 місяців тому
Advent of Code 2023: Day 12 (Silver/Lead)
Advent of Code 2023: Day 12 (Lead/Lead)
Переглядів 17811 місяців тому
Advent of Code 2023: Day 12 (Lead/Lead)
Advent of Code 2023: Day 11 (Gold/Platinum)
Переглядів 1,7 тис.11 місяців тому
Advent of Code 2023: Day 11 (Gold/Platinum)
Advent of Code 2023: Day 10 (Gold/Silver)
Переглядів 19311 місяців тому
Advent of Code 2023: Day 10 (Gold/Silver)
Advent of Code 2023 No Screwups Challenge: Day 9 (Platinum/Platinum)
Переглядів 37611 місяців тому
Advent of Code 2023 No Screwups Challenge: Day 9 (Platinum/Platinum)

КОМЕНТАРІ

  • @vividoo
    @vividoo 6 годин тому

    I wish I watched this before my exam today where I was shifty on pushdown automata... great video!

  • @jeresbao6601
    @jeresbao6601 8 годин тому

    Complicado, mané!!

  • @jeresbao6601
    @jeresbao6601 8 годин тому

    Kay você já ouviu falar do famigerado Z80?

  • @syrus3k
    @syrus3k 13 годин тому

    I loved art attack

    • @syrus3k
      @syrus3k 13 годин тому

      Subscribed. You're obviously an excellent teacher

  • @syrus3k
    @syrus3k 13 годин тому

    I could do with some ket man to understand this

  • @BrayanRuiz-m3w
    @BrayanRuiz-m3w 13 годин тому

    hi Kay, hope you are doing well, Im 25 getting into programming, idk if I should go for functional programing in Ocaml or C++, any advise, love ur videos!!

  • @mlab3051
    @mlab3051 15 годин тому

    So the rumore of sanskrit is an artificial language is true, what I person.

  • @mauroandreolini5278
    @mauroandreolini5278 18 годин тому

    Great content! What font are you using throughout the presentation?

  • @pavalep
    @pavalep День тому

    Thanks Kay

  • @amir650
    @amir650 2 дні тому

    The Laugh language I think is wrong. How do you process 'haha' given the rules? 'h' -> Head :: 'h' Tail 'a' -> Tail 'a' Tail Now where to?

    • @neoeno4242
      @neoeno4242 2 дні тому

      Hi! Do you mean the version around 14:06? If so, yes that is a scaled back version just for that example (so won't match 'haha'). If I misunderstand though let me know.

  • @bonafontciel
    @bonafontciel 2 дні тому

    Honestly I work with this things everyday and never consider casting scenarios in little vs big endian

  • @arupsan
    @arupsan 2 дні тому

    I knew someday in your video this topics will come … great to hear from you …

  • @robinforbes9197
    @robinforbes9197 2 дні тому

    I didn't get a degree either! Neither did I go to a bootcamp. I was, I guess lucky, to have a few years of intense boredom and depression at a job I hated, but where I could easily squirrel away at something. I don't think people need to go through what I went through, but I do think that those years where I wasn't doing it for money, there was no pressure except curiosity, made me the engineer that I am. I feel like we have some similarities!

  • @ocdkirby
    @ocdkirby 3 дні тому

    Amazing work! I think Knuth’s research really ought to be touched on more here though. The approach in the recursive descent section is combinatorial parsing (every language has a parser combinator library now, you can write a compiler in basically anything), but Knuth had the idea to do it with lookup tables that tell you when you’ve parsed enough characters for a based on the next character. The new rule for pushdown automata (precedence)? Another lookup table. It’s exponentially harder to scale than parser combinators so it doesn’t hold up today, but it’s an important part of the history!

    • @neoeno4242
      @neoeno4242 2 дні тому

      Thanks for sharing your thoughts on this! There was definitely a lot I didn't cover here and useful to hear which are highlights for you. Will keep this in mind.

  • @adhyansehgal4192
    @adhyansehgal4192 3 дні тому

    This guy has the blood of Newton of some great people

  • @marceloguzman646
    @marceloguzman646 3 дні тому

    I love these videos! My course focused on too much theory and running algorithms by hand like minization of DFA, nfa to dfa, etc., which was a nightmare.

  • @ichaa3tech
    @ichaa3tech 3 дні тому

    I relate to every word you say, you are a cool person, I also didnt do a degree in computing and choose mechanical engineering for the same reason. although its a bit hard to find time to do what you love when you have so much responsibilities

  • @joel.9543
    @joel.9543 3 дні тому

    Nice video! I have some technical questions: What do you use to make animations? What video editor do you use?

  • @Принуждениекмиру-ь2ц

    nasm is bullshit👎🏻👎🏻👎🏻👎🏻👎🏻👎🏻

  • @robertbruce7686
    @robertbruce7686 4 дні тому

    Link to source material?

  • @IGNACIOSOLAR1
    @IGNACIOSOLAR1 4 дні тому

    amazing stuff, glad to see theory applied, wish my teachers on uni would show this side of the course

  • @prawtism
    @prawtism 4 дні тому

    6:41 is there some reason why (Tail ::= 'a' Tail) is only in the right tree?

  • @sentou31
    @sentou31 4 дні тому

    A lot of other people said it already but this video is just so refreshing to see. I am a software engineer without higher education. Coming from an apprentice ship I knew the basics and could navigate the corporate world quite well. But something was missing. I recently joined an electrical engineering program because I felt that I wanted to go deeper not just the software but also the hardware. I feel like I wouldn’t be able to manage such a program if I didn’t have the desire to move past the surface. Not sure where my path takes me but I am really excited. I think your motivation is very infectious and I appreciate this video a lot because it came “at the right time”.

  • @uuuweee
    @uuuweee 4 дні тому

    I tried printing junk data just like at 27:04 on my machine using Clang version 14.0.0-1ubuntu1.1, but the data was not junk. When I used GCC, I got a Segmentation fault. After some research, I found that by setting the -fsanitize=address and -fsanitize-address-use-after-return=always flags, it detects stack use and fails. I wonder why I couldn’t print a junk value on my machine.

  • @LF-cm5wm
    @LF-cm5wm 4 дні тому

    This channel is exactly what I've been looking for. Thank you algorithm god 🙌🏻

  • @insidiousmaximus
    @insidiousmaximus 4 дні тому

    why do I feel like listening to supergrass all of a sudden

  • @Bagrat-III
    @Bagrat-III 4 дні тому

    nice video

  • @ErikBongers
    @ErikBongers 4 дні тому

    Long time ago, I wrote a parser after I heard that compilers first tokenize. That concept clicked as it was easy to understand and implement: just group digits into numbers and letters into strings. I thought I was halfway. With a lot of suffering, I implemented what I now know to be a recursive descent parser. Years later I discovered the academic theory and...I still don't understand it. Or rather, I grew to understand how impractical it is for programmers. Firstly, it's explained to 'produce' text, which is already confusing for programmers as that's not what we want to do. Secondly, the grammar notation is not only very abstract but it's also incomplete. You casually mention multiple times that we are assuming a specific order, in case of multiple choices, even labelling a specific order as "greedy". I think no gramnar checker or parser generator uses standard BNF or even EBNF, so if these notations are so flawed, why are academics still teaching them? At least you mentioned that the top down production is not what we want to do but that this theory was initially developed to understand human languages, but you should start with that info! (But even then, no human "produces" sentences in a top down manner - you start with the concept e.g. "swimming" and then build the sentence around it. "I want to go swimming!" Interestingly, notice how in this case we "produced" from the right, starting with the last and most important word of the sentence.) As I'm writing this, I just realised that all this theory has been created to analyse and classify text hut that it's wrong to assume that it's equally useful to practically produce or transform (compile). I know that compiler theory does give some tools to compile text into code, such as the method of merging (reducing) tokens into non-terminal nodes, but you mentioned that highly demanding compilers for systems programming languages still use the "old fashioned" manually written recursive parsers. I think that's a symptom that language and compiler theory may not be that useful, otherwise it would have resulted in more advanced (in the meaning of more capable) compilers.

    • @ErikBongers
      @ErikBongers 4 дні тому

      I guess what I want to say is : 1. Don't start compiler writing lessons with the graveyard of the theory, just as you wouldn't start a class on general relativity by explaining the 4 essential elements: earth, wind, fire and water. 2. Don't parrot. Be critical of theory and throw away or refine what is wrong. 3. If you want to know how good a car is, don't listen to the CEO but talk to the mechanic. Ask language builders what part if the theory they used...and what bits of theory they came up with as they were working, as this surely is the way that grammar notation was improved in a gazillion ways but never standardized!

    • @neoeno4242
      @neoeno4242 4 дні тому

      Thanks for taking the time to put these thoughts into writing, appreciate it 👍

  • @ozzy-fr7vj
    @ozzy-fr7vj 5 днів тому

    THAT WAS AWESOME !

  • @sadramohh
    @sadramohh 5 днів тому

    3:47: "Lowercase Zero" xD

  • @eldersprig
    @eldersprig 6 днів тому

    can you do PEG grammar?

  • @JavyMora-t9t
    @JavyMora-t9t 6 днів тому

    im still curious about the junk data..when not initializing the array..can someone explain ?

  • @ngideo
    @ngideo 6 днів тому

    i literally lol'd at the example of "the grammar of a laugh". well played.

  • @ck88777
    @ck88777 7 днів тому

    You will never be a real linguist

  • @yxyk-fr
    @yxyk-fr 7 днів тому

    Thanks for all the research ! I published an article on this subject half a year ago and I had the Polish and Turing reference but not the Keller and Dijkstra. Would you like to get in touch to discuss about it ?

  • @yxyk-fr
    @yxyk-fr 7 днів тому

    Damnit ! I had the reference for Turing, but the stack frame was Dijkstra's evil idea !!! Mixing data types was elegant in the 60s but today is a MAJOR headache, in particular for security, creating opportunities to crash or subvert programs !

  • @paulhuang2030
    @paulhuang2030 7 днів тому

    Awesome vbideo, thanks so much. What do you use to make these visualizations? They're beautiful!

    • @neoeno4242
      @neoeno4242 6 днів тому

      Thanks :) These ones are coded with Motion Canvas - motioncanvas.io - takes just a little while to get used to but really nice to work with once you do.

  • @budiardjo6610
    @budiardjo6610 7 днів тому

    yah lanang

  • @ДаниилИмани
    @ДаниилИмани 8 днів тому

    Please, rearrange the ODE5 megalist in chronological order

    • @neoeno4242
      @neoeno4242 6 днів тому

      Have now done - apologies, I thought that was a viewer-setting but I now realise it is mine!

  • @RezaMarz
    @RezaMarz 8 днів тому

    Thanks.

  • @LaboriousCretin
    @LaboriousCretin 8 днів тому

    Nice video. Thank you for sharing. From language communication to social constructs. Religions imprinted from social structures. The check of types. Ask them but knowing they have a imprint structure and things that differ. Bias sets and bias blindness and linking to phrasing/word structure and lexicons/words used.

  • @PowerLlama
    @PowerLlama 8 днів тому

    "those fast counters will know" lol

  • @tambow44
    @tambow44 8 днів тому

    My face lit up. Thanks, Kay!

  • @user-cg8ez7dz9l
    @user-cg8ez7dz9l 8 днів тому

    Your videos are actually excellent! This has made me a big fan

  • @thanksforthefish42
    @thanksforthefish42 8 днів тому

    I've wanted to go through Sipser's computation course on mitocw for a while, already have his book. Maybe this popping up is a sign 😂

  • @yanovoyair5129
    @yanovoyair5129 8 днів тому

    Yo, that’s dope. Greetings from Peru

  • @JarheadCrayonEater
    @JarheadCrayonEater 8 днів тому

    I developed a smart form system a few years ago for my past employer, where users could enter custom formulas in fields that were dependant on other fields and/or other objects within our system. Really typical of a lot of CRM's these days, but we needed to roll-our-own since it was specific to metrology. So, I took a deep-dive into this topic and ended up learning more about ANTLR and g4 syntax than I expected, and now I'm stuck in this rabbit hole forever.

  • @Sub0x-x40
    @Sub0x-x40 8 днів тому

    holy smokes this channel has exploded. kinda knew it would tho

  • @ebn7722
    @ebn7722 9 днів тому

    This has become one of my favorite channels

  • @anon_y_mousse
    @anon_y_mousse 9 днів тому

    I don't know what a modern equivalent would be, but if you want a super simple explanation of recursive descent to just get something working without understanding any of the theory, then Crenshaw's tutorial is the best I've ever found. If it didn't use Pascal and generate 68k assembly it would still be directly usable today, but hardly anyone uses Pascal anymore and fewer still need code generated for a 68k processor and if you're just starting out learning you won't understand how to translate these. If anyone knows of a good modern equivalent that either is written in C or generates C or both, that would probably be what I'd recommend. If not, then I'll have to add that to my project list because someone needs to write one.