Login
You're viewing the ruby.social public feed.

Replies

  • 💬 2🔄 0⭐ 0
  • Nov 22, 2026, 7:55 PM

    @wolf480pl @andrewg Erlang also has its bitstring syntax, but that has limited support for context-sensitive decoding, so one would have to parse up to a branching point the syntax can't address directly, then match on that accordingly with more bitstrings.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Nov 22, 2026, 8:01 PM

    @wolf480pl Lengths are the kind of things that can be directly addressed by referring to previously-matched areas.

    I was thinking more of complex formats where the value might determine whether a number of other fields are present at all.

    The kind of thing that protobuf was made for, in other words.

    TLV requires too much trust in arbitrary external inputs to use it directly for bitstring syntax (one can definitely match on it though).

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0