4 ms·
As if this was available 25 years ago. IMHO the real issue is embedded pngs in _fonts_, but YMMV. Feel free to start rewriting libpng and freetype in rust. See
by bsdubernerd 6y ago
As if this was available 25 years ago. IMHO the real issue is embedded pngs in _fonts_, but YMMV.
Feel free to start rewriting libpng and freetype in rust. See you in 25 years?
- jeffbee 6y agoIt's incorrect to believe that C was the right choice even in 1996. At that time it was already obviously the wrong choice.
- extropy 6y agoIt was the only choice that met the performance constraints at the time. And the common sense at the time did not put too much focus on memory safety.
- pjmlp 6y agoI was meeting the performance constraints of doing software in MS-DOS with Turbo Pascal.
- stonogo 6y agoI wasn't; back then there were a LOT of things, especially in graphics and linear algebra, that required dropping to embedded ASM to accomplish in a performant way. I think Turbo- and Object Pascal were great languages, but let's not pretend they were anywhere near the speed of C.
- jeffbee 6y agoThe point of my remark here is we aren't talking about rendering text along a path or whatever. We're talking about opening a file and parsing a binary format, which is in most use cases not at all performance-sensitive.
- pjmlp 6y agoC machine code quality was just as slow as anything else on 16 bit computers, lets not pretend otherwise. Modula-2 and Pascal compilers had the necessary switches to make the languages just as unsafe as C, and anything related to ultimate performance out of 8086 and 68000 required Assembly anyway.
- jeffbee 6y agoFreeType was initially written in Pascal.
- echlebek 6y agoWhat would you have written freetype in?
- pjmlp 6y agoModula-2, Object Pascal.
- pjmlp 6y agoSystem programming languages with bounds checking enabled go back to 1961. We are stuck with C due to the synergy effects of having a free beer OS with source code available.
- Dylan16807 6y ago> IMHO the real issue is embedded pngs in _fonts_, but YMMV. Png is a pretty simple format that everyone already implements. Would you rather use something ad-hoc?
- jimrandomh 6y agoLooks like this work is already well under way, maybe even already done: https://docs.rs/png/0.16.7/png/ https://docs.rs/png/0.16.7/png/ and https://docs.rs/ttf-parser/0.8.2/ttf_parser/ https://docs.rs/ttf-parser/0.8.2/ttf_parser/ .