Earlier quoted context omitted.
Correct, a key goal is to have no explicit region/lifetime annotations. There have been several papers on region inference after the originals by Tofte & Taplin, all attempting to refine the original analysis by inferring shorter lifetimes. First by analyzing when a region can be safely emptied and re-used, then by abandoning the stack discipline, etc. Unfortunately, none of these are viable in a real program in my o…
Hey, thanks for calling my work "not viable!" (Co-author of "Better Static Memory Management" here) Seriously, this looks promising and I'm very interested to see where it goes.
Ante: A low-level functional language
171–180 of 226 posts
Re: Ante: A low-level functional language
#172Earlier quoted context omitted.
This was basically my motivation when I designed the language I use for my day-to-day tasks where I program. I just wanted a ‘functional’ sort-of language that compiled to C. Even though I’ll never release it, it was a rewarding theoretical and practical exercise. As an aside, I really love how detailed and example-ful Ante’s site is. It looks like a ‘fun’ language and I hope the creator keeps working on it.
May be it is time for "coming out"? (Excuse me for the joke). Really, perhaps your language is The Next One.
Re: Ante: A low-level functional language
#173Earlier quoted context omitted.
low is relative :-D my thought exactly. IMO the only low level language is assembly. Everything else is some form of abstraction. C/C++ and the likes I tend to call lower, since in 2022 it is closer to the hardware, and then sugar languages like python, c#, js, and the likes I call high level.
Even assembly languages are abstractions.
Re: Ante: A low-level functional language
#174Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, lifetime inference, and refinement types are not however. Though I can elaborate on implementation strategies of these for anyone curious. For example, algebraic effects in existing la…
Thanks for sharing! The dot product example gave me pause because map2 seems to be the same as zipWith. Does that exist in Ante? Without context I might have thought map2 was going to act as bimap. Take that for what you think it's worth :) Also I might be having a brain fart -- but isn't the dot product in your example equal to 32?
Re: Ante: A low-level functional language
#175Earlier quoted context omitted.
Ocaml doesn't compile to C. Sometimes having translated C source is major gain. I'm not Ocaml implementation expert, but I suppose Ocaml exception handling and garbage collector could be tricky to aware about when one extend or embed Ocaml. To be honestly, my fellow did Ocaml embedding once. He made able to load natively-compiled plugins written in Ocaml into C based software. And it worked. I didn't dig into details…
`ocaml-ctypes` currently supports "reverse-bindings" (making OCaml functions available from C) out-of-the-box and mostly takes care of the intersection you are talking about, so this already works quite well. The only gain from emiting C code is portability to weird architecture that would be covered by C compilers but not the OCaml one; which is arguably a pretty niche use-case.
Re: Ante: A low-level functional language
#176Earlier quoted context omitted.
We also alternate between various positions in programming languages, so it's not a matter of formal precision.
Not sure what you mean by “alternate between various positions”.
Re: Ante: A low-level functional language
#177Not a huge fan of the whitespace delineated syntax though. I like me some curly braces.
Other than that though, it is super interesting!
Re: Ante: A low-level functional language
#178Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, lifetime inference, and refinement types are not however. Though I can elaborate on implementation strategies of these for anyone curious. For example, algebraic effects in existing la…
I'd really like to find "the low-level functional language" without "the fun stuff". Or at least it should have simple and boring subset that is usable without "the fun stuff". Something like Caml Light - precursor to Ocaml - but with translation to C instead of bytecode, so it will be fast and will have comfortable integration with C libraries.
Re: Ante: A low-level functional language
#179Earlier quoted context omitted.
I'd really like to find "the low-level functional language" without "the fun stuff". Or at least it should have simple and boring subset that is usable without "the fun stuff". Something like Caml Light - precursor to Ocaml - but with translation to C instead of bytecode, so it will be fast and will have comfortable integration with C libraries.
Why compile to C when you can use LLVM?
Re: Ante: A low-level functional language
#180Earlier quoted context omitted.
what makes Ante low level? Just from a cursory look over the website seems pretty high level to me.
My definition of low level is no tracing GC, values are unboxed by default, and users still have control to do low level things (raw pointers, other unsafe operations) when needed, even if it is not the default.
I like the lack of GC! What is the method for always incremental compilation? The benefits are obvious, but isn't it problematic to have two authoritative representations of the same source? It would be fantastic if you get that to work well!