Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ikskuh
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
ikskuh
5y ago
XML is bad for TinyVG as it is too large in several regards. XML kinda requires DOM parsing, XML is a text format (so inefficient encoding) and XML parsers need to be large so they can be called XML parsers. All of these properties contradi
32.
▲
by
ikskuh
5y ago
I have a full description of the benchmarking process on https://tinyvg.tech/benchmark.htm tl;dr: The input svg is pushed through svgo, so we have a very compact format already
33.
▲
by
ikskuh
5y ago
whoopsies. CI failure on my side, will be fixed in roughly 20 minutes
34.
▲
by
ikskuh
5y ago
Then you should check out the TinyVG text format: (tvg 1 (32 32 1/1 u8888 reduced) ( (1 0 0) ) ( (fill_polygon (flat 0) ( (16 0) (32 32) (0 32) )) ) ) This draws you a tiny triangle. The only problem you'll g
35.
▲
by
ikskuh
5y ago
TinyVG is not meant to ever support animations, but should be used in all places where this is not required. So if you want to use animation for everything, you could design a secondary format that allows animation of TinyVG files hint
36.
▲
by
ikskuh
5y ago
The problem with that is that you still need to implement a full XML parser. Even if you strip out any CSS and ECMAScript, it will still require the complexity of XML with all it's gloryness and escapiness and ambigious defines. And ev
37.
▲
by
ikskuh
5y ago
Yes, the SDK contains tvg-render which can render TVG to TGA. Implementing PNG in that tool would double the size of the SDK source ^^
38.
▲
by
ikskuh
5y ago
Yes, it's because the images in the PDF are always scaled. I cannot get them to pixel-perfect display in the PDF renderings anyways The images are the output from the offline renderer, so they are included as PNGs
39.
▲
by
ikskuh
5y ago
Yes, i've heard it from some people already. Will add this to the benchmark tomorrow. It's late here in germany and running the benchmark takes roughly 30 minutes already. With gzip, i expect it to go up to 45 or 60 minutes, as we
40.
▲
by
ikskuh
5y ago
Author here: This is actually a limitation of chrome! The images are perfectly sharp when displayed as files: https://tinyvg.tech/img/app-icon.png The are just up/downscaled to 3em height so the table looks unifor
41.
▲
by
ikskuh
5y ago
It has something different. Kristall parses HTML with gumbo and will re-emit cleaned HTML code that is then displayed as a rich text document. It doesn't have inline images or anything, but only the text content
42.
▲
by
ikskuh
5y ago
Yes, most of my systems have "zig cc" as a C compiler installed nowadays. Why? It's so much easier to install. Especially on systems like windows, and i get other benefits. One example: "I can send you a project, and you
43.
▲
by
ikskuh
6y ago
Most of them are actually the same and on several microcontrollers you can even just access them as an array of structs, selecting each port at runtime. HALs try to hide these facts which you can only find out about in the hardware document
44.
▲
Assorted Thoughts on Zig and Rust
(scattered-thoughts.net)
343 points
by
ikskuh
6y ago
|
296 comments
45.
▲
by
ikskuh
6y ago
> When this is brought up, people [...] don't seem to acknowledge that this is not a problem with any other language. This was a deliberate design decision by andrew for all zig pre-1.0 to supress discussions about coding style (use
46.
▲
by
ikskuh
6y ago
Note that tagged releases in zig are just "the first state that worked with the new LLVM version". Imho it would be unreasonable to even try keeping backwards compatibility in a language that tries to find the global maximum >
47.
▲
by
ikskuh
6y ago
Zig is also designed around safety and security. It's not as obvious as with Rust, but it's still there. Zig is way easier to verify than rust code (no hidden control flow, no hidden allocations that might fail, ...) which means a
48.
▲
by
ikskuh
6y ago
One experience i can share with Zig and webdev is this: I was writing a emulator (and later: a compiler) in Zig which was originally written for PC. But i got the idea that hosting this stuff on the web page would be cool, so i learned how
49.
▲
by
ikskuh
6y ago
The overall idea is to have a selfhosted compiler for debug and release builds where the release build as ~80% of LLVM performance and use LLVM as an optional dependency to go 100% performance
50.
▲
by
ikskuh
6y ago
Yes, you understood that right. The existing executable file is not written completly anew. And yes, it will be faster. The way Zig does this is by only recompiling and modifying the parts of the executable where the source has changed. Ima
51.
▲
by
ikskuh
6y ago
> I see very few people suffering from such burdens, but a great many suffering from its exact opposite: using a low- or mid-level language to write hundreds of lines where ten lines in a higher-level language would suffice and be more e