3 ms·
This works well because the higher level languages are all implemented in C Not actually true; there are many high level self-hosted languages, OCaml, Haskell,
by gaius 13y ago
This works well because the higher level languages are all implemented in C
Not actually true; there are many high level self-hosted languages, OCaml, Haskell, Forth, Lisp, etc etc. But all these languages generally prioritize having a good C FFI. It is interesting that e.g. Thrift, Protocol Buffers et al don't seem to have made much of an inroad here.
- userbinator 13y agoOcaml's VM is written in C.
- Dewie 13y agoIsn't Haskell's runtime written in C? Or maybe it used to be but they changed it.
- wting 13y agoThe runtime is in C-- but has the option of using LLVM for code generation.
- rlpb 13y ago> It is interesting that e.g. Thrift, Protocol Buffers et al don't seem to have made much of an inroad here. D-Bus is probably the biggest contender at the moment.
- theseoafs 13y ago> It is interesting that e.g. Thrift, Protocol Buffers et al don't seem to have made much of an inroad here. I'm actually working on a tool called Haris to deal with this very problem. I'm looking to do structured binary data serialization in a way that's efficient, lightweight, and portable (in that it conforms to the C standard). Keep an eye out, I'll probably be posting it on Hacker News within the next few weeks.
- nostrademons 13y agoThrift, protobufs don't really work for in-process communication because the cost of serialization can get pretty high - you can easily blow most of your CPU time just serializing protobufs across language boundaries (been there, done that). I think Cap'n Proto may be an interesting approach - the memory layout is the same in all languages, and Kenton is reportedly working on 0-copy IPC - but it remains to be seen how it will turn out.