Circular list with Common Lisp

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น •

  • @simonsaville9962
    @simonsaville9962 2 หลายเดือนก่อน

    You're a mind-reader! I was just thinking earlier about using a circular list, and their dangers.
    Thank you, for the explainer.

    • @GlueTubber
      @GlueTubber 2 หลายเดือนก่อน

      lol, both of you are! I just implemented a couple of functions with circular lists over the weekend!

    • @the-lisper
      @the-lisper  2 หลายเดือนก่อน

      Happy to help! Circular lists are definitely interesting. Glad the timing worked out! Thanks for watching!

    • @thinkingpostm
      @thinkingpostm 2 หลายเดือนก่อน

      @@the-lisperThank you for your top-tier content, a true gift in this long lisp journey. I'm having a bit of trouble implementing lack-middleware-csrf with my djula templates. Could you please make a tutorial with an example of the same?

    • @the-lisper
      @the-lisper  2 หลายเดือนก่อน

      @@thinkingpostm Never actually used it, I can put it in the backlog!

  • @GlueTubber
    @GlueTubber 2 หลายเดือนก่อน

    updated finding: if you set *print-circle* t, and define a long list with repeating elements, you will see that the elements that repeat are not stored as individual elements, but are stored as pointers pointing to the original list item that it duplicated... I guess this changes when you update the element? Anyway, when you print the list in the repl, you will see items that are list as #1YourItem, #2AnotherItem, etc. When the printout gets to the repeating elements, instead of printing them it will show (for example) #1# (if the item is a repeat of the first list item). This really threw me when I stumbled over it. But if you take (nth somenumber yourlist) and somenumber is a repeat item, you will see the correct list item. just an FYI. cheers!

    • @the-lisper
      @the-lisper  2 หลายเดือนก่อน

      Yes! In the video we have shown how to use the reader macro #1# to create a recursive data structure (putting it in the tail), but it can actually be useful every time you want to see if two references are the same!

  • @freecodecamp
    @freecodecamp หลายเดือนก่อน

    Your Lisp series is great! I wonder if you would be interested in sharing a Lisp course with our channel? We could repackage content you already made. beau at channelname.

    • @the-lisper
      @the-lisper  หลายเดือนก่อน

      Yes, it would be interesting!