"This function calculates the minimum of a list of numbers, and subtracts every number in the list by that minimum. This function currently iterates over the list twice; once to calculate the minimum, and once to do the subtraction. At a first glance, it looks like there is no way to merge these two loops, because you need to calculate the minimum of all the numbers before you can subtract from any of them. As it tur…
Vine: A programming language based on Interaction Nets
31–40 of 51 posts
Re: Vine: A programming language based on Interaction Nets
#321. Since it is based on Interaction Net, is it parallelized well?
2. Will there be a borrow checker like Rust does?
Re: Vine: A programming language based on Interaction Nets
#33It starts off looking like a slightly modified Rust until about half way through where it gets real weird. It’s burying the lede… why not open with what interaction nets are and why you’re building them into a programming language? Made my head hurt a bit, it’s odd that it doesn’t really attempt to contextualise if the weirdness is for its own sake or some greater practical purpose. Always fun to find a novel way to…
And, I'm still not sure how that wacky stuff gets compiled down. It looks like syntax sugar as a language.
Re: Vine: A programming language based on Interaction Nets
#34Author here, happy to answer any questions.
Would one be able to model `~x` with, say, Rust channels?
Re: Vine: A programming language based on Interaction Nets
#35 let y = None;
y is Some(value) => value > 0 // true
y is Some(value) => value == 0 // trueRe: Vine: A programming language based on Interaction Nets
#36Is it maybe possible to express the plot of "Tenet" using the inverse operator?
Re: Vine: A programming language based on Interaction Nets
#37Earlier quoted context omitted.
What are the differences with HVM?
There are many. One major difference is that HVM/Bend focus entirely on functional programming, whereas Vine supports both imperative and functional patterns, in a cohesive manner.
I'm interested in a wider comparison, and understanding why you didn't go with HVM, especially as the low-level runtime.
Re: Vine: A programming language based on Interaction Nets
#38Author here, happy to answer any questions.
I would love a better explanation for `~~x = x`. I first understood `~x` as an equivalent of an unresolved future. Would one be able to model `~x` with, say, Rust channels?
In that context, then, the inverse operator switches which side of the wire you're talking about. If you have a parameter of type `N32`, you're on the 'consumer side'. But if you have a parameter of type `~N32`, that can be viewed as being the 'producer side' of an `N32` channel. Since `~` just swaps the sides, `~~T` is the same as `T`.
Re: Vine: A programming language based on Interaction Nets
#39Earlier quoted context omitted.
There are many. One major difference is that HVM/Bend focus entirely on functional programming, whereas Vine supports both imperative and functional patterns, in a cohesive manner.
But that's just about how things look in the higher level language, right? Implementation wise, it's still interaction nets, so...? I'm interested in a wider comparison, and understanding why you didn't go with HVM, especially as the low-level runtime.
IVM is architecturally similar to HVM-64 (which I was the lead developer of). The most major difference is how they handle IO. IVM uses its extrinsic system, where all side effects are mediated through an IO handle, which provides a number of useful properties, and is greatly simpler to implement / use. Interactions with side effects are small and low-cost, and can happen in parallel with the rest of the program.
HVM-64 had built-in net definitions that had side-effects when expanded, which was very messy to use in practice. HVM2 has a monadic IO interface, which requires stopping the whole program on every single IO call. (And also requires writing things monadically.)
Using extrinsics for IO handles in IVM creates a very nice API for IO in Vine; side-effect-ful functions simply take a mutable reference to the IO handle. It's also very easy to support multiple 'threads' of parallel IO effects – simply duplicate the IO handles.
Re: Vine: A programming language based on Interaction Nets
#40In 1s compliment we can have negative and positive 0.
0 is not a “natural” number in the traditional sense.
It’s an interestingly opinionated language.