Hacker News new | past | comments | ask | show | jobs | submit | u2zv1wx's comments login

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.


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!


I can't believe my good fortune to have a wonderful reader like you, by the way.


Thank you for your kind feedback. I'll try to come up with a concise way to mention it in the introduction.


Possibly, but not sure. Currently my life is in a peculiar state (?) so I think firstly I need to stabilize it somehow.


This is the most interesting language introduction I've seen in years. Work like this gives life meaning. You have a larger purpose for stabilizing your life; our hopes are with you.


If everyone had to wait until their life settled down before publishing science would be behind by a hundred years.


Thank you for your interest. I think this is not a possible-or-impossible problem, but a what-to-choose problem. Both Haskell and OCaml happen to choose GC today, but they could have chosen an alternative memory management system. Memory management of a lambda-calculus based language can be realized in a few ways, and my project can be thought of as a one that suggests an alternative way.

Having said that though, I don't think the approach in Neut can be directly applied to Haskell or OCaml. This is because mutable variables won't make sense in this memory management system since every use of a variable (theoretically) creates a distinct object.

I hope this answers your question..


Thank you for kind words! Yes, I think 3500 commits are enough to make things that might need further explanation too obvious to the author. A feedback from someone like you is really helpful. Please feel free to open an issue (or send me an email if you'd like).

I know Zig language (I've seen it before in an article that compares the binary sizes of hello world of various languages IIRC), though I don't know it in detail. Sounds interesting, I'll take a look at it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: