I haven't dug into the details a ton, but I am excited to see this! Would love to see more research in this direction. > micro-mitten's approach is significantly different from Rust's. Rather than depending on single ownership and a complex lifetime system, micro-mitten uses a series of data-flow analyses to statically approximate heap liveness. To be clear, Rust these days also looks at control-flow. This was what a…
> And the next generation checker is based on datalog... Where can I learn more about this?
Show HN: Micro-mitten – Research language with compile-time memory management
41–50 of 68 posts
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#42Quite interesting. quicksort example: https://github.com/doctorn/micro-mitten/blob/f2e7eb12a5d8f88...
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#43I'm thinking that until they are perfect these kind of languages lure the developer into a one-way street, convenient until you reach a dead-end at which point your only escape (if you are lucky) is a whole bunch of contrived and difficult to maintain typing constructs. Still interesting research though.
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#44I haven't dug into the details a ton, but I am excited to see this! Would love to see more research in this direction. > micro-mitten's approach is significantly different from Rust's. Rather than depending on single ownership and a complex lifetime system, micro-mitten uses a series of data-flow analyses to statically approximate heap liveness. To be clear, Rust these days also looks at control-flow. This was what a…
> And the next generation checker is based on datalog... Where can I learn more about this?
There are some posts on Niko Matsakis' blog, starting with this one: https://smallcultfollowing.com/babysteps/blog/2018/04/27/an-...
More recently a really good talk, with slides here: https://nikomatsakis.github.io/rust-belt-rust-2019/
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#45Re: Show HN: Micro-mitten – Research language with compile-time memory management
#46Earlier quoted context omitted.
I'm saying you could know "it will use at least X memory", but you could never know "it will use at most X memory" unless you seriously cripple the language's capabilities
Maybe there could be a compiler flag. You let any program compile normally, but if you enable the flag, it only allows programs to compile if the maximum memory usage can be computed, and if there are under the limit you specify. That means the language isn't always crippled, but you can get compiler enforcement for certain embedded programs.
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#47I imagine the compile would be magnitudes slower than Rust or C++, and I can't really stomach slow compilers. Yesterday I was hacking on a Qt app and the time taken to rebuild after a slight change to the header is distressing (more than 5 seconds, which can afford a full rebuild on a typical C program). I'm kind of surprised that the quick sort example took only around twice to thrice as long to compile compared to…
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#48I imagine the compile would be magnitudes slower than Rust or C++, and I can't really stomach slow compilers. Yesterday I was hacking on a Qt app and the time taken to rebuild after a slight change to the header is distressing (more than 5 seconds, which can afford a full rebuild on a typical C program). I'm kind of surprised that the quick sort example took only around twice to thrice as long to compile compared to…
No need to image, the thesis mentioned in the README provides compile-time results. From no noticeable overhead to 2x larger compile-times than Rust.
Quite reasonable if you take into account that one is one person's university thesis, and the other is a project with 100s of active developers, 100s of open PRs, etc.
Re: Show HN: Micro-mitten – Research language with compile-time memory management
#49Re: Show HN: Micro-mitten – Research language with compile-time memory management
#50If a language like this were to take off, I could see linter-style errors pop up that are not currently possible. "ERROR: maximum memory usage computed to be XYZ MB, which is higher than the speicified limit of 500MB" Now that would help keep the RAM bloat down!