From my cursory glance, the real magic (InvisiCaps) appears to be a unique take on fat pointers to track types, access rights, etc. Pretty clever, and the website is a great technical read.
ndesaulniers 2 hours ago [-]
Dig the posters in the background; I just saw Burning Ambition in theaters last week. Up the irons, Earth dog! Ghost opened for Iron Maiden a few years ago; I saw them all together in Oakland.
skissane 41 minutes ago [-]
> Where my_thread is a pointer to the current Fil-C thread, which Fil-C passes around as the first argument in all calls.
Does this just mean you reserve a register for the current thread? In which case you could explain it as a reserved register (like FS used for TLS). Describing it as "passes around as the first argument in all calls" makes it sound inefficient–but whether it actually is depends on how you implement it.
aniviacat 4 hours ago [-]
> Fil-C is a personal passion project by Filip Pizlo.
Do I understand correctly that this project is based on the work of just one person, Filip Pizlo? If so, that's amazing.
pizlonator 4 hours ago [-]
Mostly. A handful of people have made some very nice contributions though
rurban 3 hours ago [-]
So you just need safe unicode identifiers I guess, fixing the longstanding unicode C11 spec bug, which made identifiers unidentifiable. Restricting to ASCII would be safest. In my rcc compiler I use my libu8ident
ummonk 5 hours ago [-]
Interesting project in general. I wonder whether it could be adapted to behave reasonably without relying on threading. E.g. run the GC only when *alloc is called.
StilesCrisis 3 hours ago [-]
EDIT: misread the post! Never mind
turkeyboi 3 hours ago [-]
You even read the comment you’re responding to? They’re saying no threads.
StilesCrisis 2 hours ago [-]
You're right. I can't delete anymore unfortunately
tines 3 hours ago [-]
Pretty interesting, but what’s the reason of being for Fil-C?
connicpu 19 minutes ago [-]
Can't speak to how everyone else is using it but at my job we run all of our unit tests under Fil-C as part of CI, in addition to the UBASAN, TSAN, and Valgrind pipelines we already had for them.
carry_bit 49 minutes ago [-]
There's a whole lot of C and C++ software out there, and Fil-C makes it memory safe, frequently with minimal work.
nick__m 51 minutes ago [-]
Memory safety for existing C and C++ codebase.
jancsika 2 hours ago [-]
So for interpreted languages with types that are written in C, how is the engine supposed to tell C it already checked all the arg types manually in the interpreter? In other words: it's safe to go ahead and dereference this function and invoke it with these args.
Seems like C technically requires function declarations for every possible signature. That quickly explodes into hundreds or thousands of function declarations in the header and switch statement.
Edit: clarification
pizlonator 50 minutes ago [-]
I’ve thought about how to let folks prove to Fil-C that Fil-C’s checks are obviated by some higher level checks.
It’s a super hard problem! I don’t have a good answer, but I also can’t prove that it’s impossible
From my cursory glance, the real magic (InvisiCaps) appears to be a unique take on fat pointers to track types, access rights, etc. Pretty clever, and the website is a great technical read.
Does this just mean you reserve a register for the current thread? In which case you could explain it as a reserved register (like FS used for TLS). Describing it as "passes around as the first argument in all calls" makes it sound inefficient–but whether it actually is depends on how you implement it.
Do I understand correctly that this project is based on the work of just one person, Filip Pizlo? If so, that's amazing.
Seems like C technically requires function declarations for every possible signature. That quickly explodes into hundreds or thousands of function declarations in the header and switch statement.
Edit: clarification
It’s a super hard problem! I don’t have a good answer, but I also can’t prove that it’s impossible