@nilscmr How are you planning to overcome the hurdle of needing a new, dedicated programming language to maximise utilisation of your hardware? Even if it’s Rust-like, you’re leaving its ecosystem behind
@seanbax@LParreaux @tigregalis @elricmann Not quite sure what your question means, but the borrow checking works differently. You borrow-check function calls, not reference construction. Your program is correct if the arguments don't mutably alias, and if the environments of different closure types don't mutably alias.
@seanbax@LParreaux @tigregalis @elricmann Yes, if you don't know the concrete environment that the reference captures then you need to pass its type around as a type parameter. This is basically equivalent to lifetime parameters in Rust, except it's "just" a type parameter. My model eliminates the concept of "lifetimes".
@seanbax@LParreaux @tigregalis @elricmann Yeah, I've learned the hard way how difficult it is to do any better! I've ended up with a design that is like closures on steroids. A "reference" is a value that "captures" data from an external environment. The environment forms part of the reference's type.
@seanbax@LParreaux @tigregalis @elricmann It's a hard problem but I rarely ever see people even *suggesting* that it's possible to relax Rust's borrowing rules. I think I'm close to having a working design. If I remember I'll send you a draft when I've written it up.
@seanbax@LParreaux @tigregalis @elricmann Thanks for the links! I don't think it's as simple as `shared T&`, but I believe there might be a practical way to model shared mutability and pointer invalidation. I've been working (casually) on a borrowing system for Mojo over the last ~9 months that aims to achieve that.
@seanbax@LParreaux @tigregalis @elricmann For your definition of `func`, if your language has a way to (optionally) declare that `s` may point into the vector's buffer, and a way for the compiler to understand that `push_back` may reallocate the buffer, then your language can ensure memory safety.
@clattner_llvm@lemire Has autovectorization been replaced with autofusion (with the same "what if it doesn't optimize" concern), or is loop fusion/kernel fusion done manually?
@Avamander@pcwalton Donald Knuth's famous quote seems highly relevant to this discussion:
"Beware of bugs in the above code; I have only proved it correct, not tried it."
@pcwalton I suspect you can come up with a working system by doing iterative design, i.e. making something and then trying to break it. You don't necessarily need to prove a system's soundness prior to implementing it.
@pcwalton "Any AOT compiled language is going to be." What if Rust compiled 100x faster? The problem isn't AOT, it's slow compilers, right? Even Python is partially AOT-compiled.
@jonathoda@dubroy Said another way: creating software is currently easy for 0 people on Earth. It would be wise to make it easy for >0 people before attempting to make it easy for everyone.
@jonathoda@dubroy My hypothesis has always been that we need to make it easy for “experts” to create software first. I wouldn’t expect anyone to be able to invent a *broadly-accessible* (and highly general) programming interface when we haven’t even invented an adequate professional interface yet.