Writing an XML parser to regain some sanity

Поділитися
Вставка
  • Опубліковано 10 жов 2024

КОМЕНТАРІ • 6

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

    12:17 There’s an awesome post on this called “Handles are the better pointers”. Goes more into depth about using arrays and indexes over pointers.

  • @blarghblargh
    @blarghblargh 2 дні тому +6

    Since XML were obsessed with standardizing everything, they had names for the parser types. "Sax parser" vs "Dom parser".
    Agreed that iterators seem like a nicer interface than callbacks.

    • @PennyEvolus
      @PennyEvolus 2 дні тому +3

      dang i wish they made it sub parser and dom parser for the bit

  • @sphaerophoria
    @sphaerophoria  День тому +2

    I figured it was worth it to just pull the plug and finish up the XML stuff. Wasn't worth another stream (other than the happy hour vod from today). I think i'm quite happy with how it turned out
    github.com/sphaerophoria/sphwayland-client/blob/3fafa0979321665275dc66b7613445dc3ae63ffb/src/XmlParser.zig
    There's a lot of interesting stuff in here. Circular buffer reader with a bunch of iteration helpers for non-contiguous slices, vectored reads, 0 allocations, stack array lists, poggies!

  • @whoman0385
    @whoman0385 2 дні тому +15

    I prefer to use /usr/bin/rm because xml is the worst thing ever created and it gives me nightmares

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

    Ehh, using old W3 specification is okay because is og, but personally would have used ActionScript specification, more general, simple.