Debugging Odin code

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 13

  • @dirtymint
    @dirtymint 8 месяцев назад +4

    Did you know "tui enable" has a shortcut, its Ctrl+x, Ctrl+a. Also, Ctrl+l (lower case L) redraws gdb if it gets messed up.
    Anyway, Thank you for taking the time to make these videos - they're amazingly helpful!

    • @mccGoNZooo
      @mccGoNZooo  8 месяцев назад +1

      The `tui enable` shortcut I had no idea about, actually. Thanks! :)
      Thank you for appreciating the videos; I enjoyed making them and having them be out there for people to get into Odin. :)

  • @chromakeydreamcoat3320
    @chromakeydreamcoat3320 Год назад +6

    These videos are pure gold for someone like me without much experience in systems programming. I'm trying to get into odin because it seems like a very well designed language, but if you're used to just press "debug" in your editor or ide it's not obvious how to debug oding programs. Also I've found navigating the libraries tricky as there are few examples.

    • @mccGoNZooo
      @mccGoNZooo  Год назад +3

      Odin's most obvious downside at the moment is that it simply doesn't have a lot of manpower behind it, which means that there are much fewer people to make all of the things that a lot of people take for granted. The good design and simple flow of code is the thing that still makes it possible to pick up and a lot of time the best way to understand the standard library is to:
      - Look at the interface and consider what it means for allocation, are you expected to pass a pointer to something yourself or does it allocate something itself? (as we saw with `json.unmarshal`, etc.)
      - Read the actual code that's going to be executed; most of it won't have an enormous stack depth
      - Step through the code in a debugger
      Hope you stick with it, Odin is a delightful language and a great one for building good foundations in! :)

  • @bersK00
    @bersK00 11 месяцев назад +1

    I gotta say hearing the test announcements in the background is pretty funny. And as equally as incomprehensible to me whether I hear them first hand or through the background of someone's video.
    Loving the odin videos so far!

    • @mccGoNZooo
      @mccGoNZooo  11 месяцев назад

      Really happy to hear that you like the videos! :)
      Yeah, the test announcements are usually completely incomprehensible to me as well. :D

  • @barfbot
    @barfbot Год назад +2

    thanks for covering some really lacking spots in odin at the moment

    • @mccGoNZooo
      @mccGoNZooo  Год назад

      Currently I'm not exactly targeting only those things but I'm happy I'm hitting the mark. The idea overall is to have a playlist where you can learn the majority of the things you'd need for lower level programming. I think debugging is a great tool to have so obviously it falls into that.

  • @kcvinu
    @kcvinu Год назад +2

    Ctrl and + keys for making things bigger in vs code. But that will make entire things bigger, If you want to just make the code bigger, press Ctrl and comma. Then type font. Choose font size.

  • @thetarnav
    @thetarnav Год назад +2

    Were you able to find a solution to the error in the video? It seems that there is no way to handle an allocation error when dealing with a map.

    • @thetarnav
      @thetarnav Год назад +2

      nvm I've found the PR (#2838) and the map_insert trick
      would link it here but comments with links are getting shadow deleted

    • @mccGoNZooo
      @mccGoNZooo  Год назад +1

      I'll put the PR in the video description; thanks for reminding me.