Daily Thought - 2024-11-12
Hey, I'm Hanno! These are my daily thoughts on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!
This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
Caterpillar programs are embedded into a host, which provides platform-specific capabilities. These capabilities take the form of functions. The compiler can recognize that an identifier refers to a host-provided function, and compiles that into an instruction (the runtime is, as of now, a bytecode interpreter) that triggers a special "host" effect.
This effect returns control to the host, which can then inspect the runtime's stack to figure out which function is being called, and what its arguments are. It occurs to me that this basically works like a classic system call interface. Like what a regular userspace program would use to talk to the operating system kernel.
I'm saying classic system call interface, because there have been newer developments in this field. On Linux, we have io_uring now, which enables submitting system calls in bulk, without copying, and in an asynchronous manner. I wonder if this approach is applicable to Caterpillar's host interface.
Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email whenever I post a new one.