Caterpillar

Daily Thought - 2024-11-12

< back to list

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.

<< previous thoughtnext thought >>