Lurker News

Comments (78) 16 threads

Earlier comments
namelosw#
Wow, this is mind-blowing. Great respect to the author.

May I ask which preliminary knowledge or directions I need to look at, in order to have a decent understanding of the codebase?

aey1 reply#
Super cool! Any idea how big the runtime is? Is it easy to run a libc free version? I honestly feel like the embedded/firmware slice of the stack desperately needs a next gen language.
u2zv1wx1 reply#
What you need are the two functions `malloc` and `free` that have the following signatures:

  declare i8* @malloc(i64)

  declare void @free(i8*)
So if you have implementations of them written in LLVM IR, I think that's enough.

Disclaimer: I'm not very good at low-layer concepts. Correct me if I'm wrong here.

aey#
Is there a big runtime that’s linked to support all the language features? Like what is the fully statically linked size of

int main(void) { return 0; }
If it’s just providing free/malloc symbols, that’s wonderful!

potiuper2 replies#
TLDR dependent lambda calculus using linear type system memory management with LLVM backend. Oddly, the source language a [dependent] lambda-calculus or a [dependent] Cartesian closed category would seem more restrictive than the linear types or closed monoidal category used to implement the compile time memory management system.
bo1024#
This is great, thanks!
throwaway17_17#
As I mentioned in another comment, the particular category he is deriving the semantic in is dictated by the CBPV semantics. I certainly agree that a closed monoidal category is the appropriate ambient category for the standard linear type theory, the structure required to reach the full semantics of CBPV, as designed by Levy, require a narrower framing. Although, it should be noted that there is only a small amount of formalism to work through and the adjunction model of CBPV can be seen as right adjoint to the linear/non-linear systems Benton describes in his 94 paper with Wadler.

Load more comments