3 ms·
I get that this is yet another Domain Specific Language/Virtual Machin. Quite complex in order to optimize on the input size. As long as it doesn't become Turin
by mikewarot 5y ago
I get that this is yet another Domain Specific Language/Virtual Machin. Quite complex in order to optimize on the input size. As long as it doesn't become Turing complete, I'm quite happy to play along.
What I don't understand is what "relative cubeTo" does. The "documentation" doesn't help, it just points at source code, and explains nothing
https://pkg.go.dev/golang.org/x/exp/shiny/iconvg#Encoder.RelCubeTo https://pkg.go.dev/golang.org/x/exp/shiny/iconvg#Encoder.Rel...
I missed a decade of software development, so maybe it's just me. It seems that nobody actually documents things anymore, but rather expects you to read the source code and guess.
- TazeTSchnitzel 5y agohttps://github.com/google/iconvg/blob/main/spec/iconvg-spec.md https://github.com/google/iconvg/blob/main/spec/iconvg-spec.... also doesn't explain what relative cubeTo does, though from the context (2D vector graphics), “relative” must mean the co-ordinates are relative to the position of the cursor (as opposed to “absolute” which is relative to some fixed origin), and “cube” probably refers to cubic interpolation.
- mikewarot 5y agoCubic Interpolation - someone saved a few too many characters with that name. So, that function uses opcode "c", which is documented here in SVG https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands https://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierComm... Now it makes sense... but that took help from the internet and a lot of time to figure out. Is it just me, or has actual documentation been abandoned in the last 20 years? [Edit] I accept it's not a commercial production, but if you want to drive adoption of a proposed new thing, proper documentation would greatly help.
- TazeTSchnitzel 5y agoThere is plenty of poorly-documented code from 20 years ago. Bear in mind that IconVG is not a commercial product.
- grishka 5y agoIt most probably corresponds to the SVG command that does the same thing. Iirc that command drops some parameters and the parser is supposed to derive them from the previous point.