logoalt Hacker News

Ported freetype, fontconfig, harfbuzz, and graphite to Fil-C

43 pointsby jhatemyjobtoday at 7:18 PM15 commentsview on HN

Comments

o11ctoday at 8:15 PM

I was reading the `fontconfig` source recently (to help me understand what, exactly, is the difference between the various `fc-*` tools and their options) and some of the code scared me.

I thought, "for sure this is a use-after-free" ... but it happened to be safe because some function performed an undocumented incref, and the return value of that function was kept alive.

So this is definitely a high priority thing to port!

... I suppose the interesting question is: if some of my dependencies are ported, and some are not, is there any way a normal compiler can call into a Fil-C-compiled library for just a few functions?

show 1 reply
malkiatoday at 9:04 PM

If Fil-C requires complete recompile of ".c" code how does it deal with calls to the OS - Does it rewrap them (like Go?). I'm bit uncertain here...

show 1 reply
rvztoday at 7:54 PM

What is the actual catch with Fil-C? Memory safety for C based projects without a complete rewrite sounds like a very good idea, but there must be some pitfalls in this approach which this would not work in some cases.

In some other memory-safety circles (Rust, Zig, etc) I'm going to expect that this is going to be heavily scrutinized over the claims made by the author of Fil-C.

But great work on this nonetheless.

show 2 replies