Skip to content

Specification + Zig Code is not quite enough to reimplement in C #33

@codewitch-honey-crisis

Description

@codewitch-honey-crisis

For the record, I just wrote 4500 lines of C++ code to parse SVGs using a peephole parser and a 64 byte capture window. It parses top down, rendering and tossing as it goes. It uses my graphics library's new vector drawing canvas.

With that said, I think it's fair to say I'm pretty good at reading specs and code if I managed that.

However, try as I might, I cannot produce an implementation in C++ based on your documentation and SDK code.

The Zig is I'm assuming complete and functional. The problem is most of the pertinent stuff is buried in layers of local functions and other things that make the code less clear than it maybe could be,

Ideally, your reference implementation would be in C. That would fulfill a much wider audience than Zig, which is a boutique language.

Now, I'm not sure where to go from here. I was planning on helping you integrate what SVGO does into your own converter app, but I can't do that if I don't understand the TVG binary format. (I'm not bothering with the text format because I don't need it, but understanding the binary format fully will give me a complete picture of TinyVG's capabilities)

Do you know C++? (no STL, it's very Cish code) - if so would you be willing to review some parsing code to tell me where I went wrong reading your specs?

I'm sorry but they're just not clear enough, and neither is the code (at least for a non-zig coder, like most coders)

If I can get it right, I'll give you a C or C++ reference implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions