News for hackers. Stuff that matters.
Re:GNU poke 1.0 by badsectoracula on Saturday February 27, 2021 @12:30AM (#26282904)
I skimmed through the manual and from what i can tell this seems to be more of a language (with a REPL) with support for handling data streams (they call them I/O Spaces for some reason) than an editor. There does seem to be support for declaring types of variable length and it is one of the first examples:

    type Packet =
      struct
      {
        byte magic;
        uint<16> length;
        byte[length] data;
      }
It also seems to have optional fields using conditions, using the optional extended header in MP3 id3v2 tag as an example:

    struct ID3V2_Tag =
      struct
      {
        ID3V2_Hdr hdr;
        IDV2_Ext_Hdr ext_hdr if hdr.extended_hdr_present;
      }
(this is an alternative to another way it provides by using unions which work similar to C unions but each alternative also has conditions for when it is valid).

So at least from the above i think it should be possible to declare types that work with variable length and prefixes like that.

There are no comments on this comment yet.