DE version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
83% Positive
Analyzed from 731 words in the discussion.
Trending Topics
#fil#rust#https#function#com#current#project#around#interpreted#great

Discussion (32 Comments)Read Original on HackerNews
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.
Do I understand correctly that this project is based on the work of just one person, Filip Pizlo? If so, that's amazing.
https://zef-lang.dev/implementation
https://news.ycombinator.com/item?id=47843194
It has list of more than 20 optimizations for interpreters, with measured speedups. I'm pretty sure I was looking for something like this 3-5 years ago, but it didn't exist
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
C's type checker never sees the interpreted language's functions.
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.
There’s a speedup to be had by either reserving a GPR or using one of the segment registers
Lots of obvious stuff like this hasn’t been done yet! If you want to have the satisfaction of landing speedups then Fil-C is a fun thing you could contribute to :-)
https://groups.google.com/g/comp.arch/c/IT2dhS4q2M8?pli=1
It would require more than zero work. Basically you’d need to unify yolo libc’s internal definition of pthread with libpizlo’s filc_thread
Can’t link Fil-C code to regular C code
And rust uses regular C ABI
You could make it work, if you teach Rust and Fil-C about each other. Nobody has done that (to my knowledge)
https://drive.google.com/file/d/1yVlKs_GPspxTq95MXLPgj5QuggT...
https://drive.google.com/file/d/14HG52S0TrrBbqwzisTupebCD1Im...
It would be a big change. Probably not backwards compatible with today’s rust.