How expressive is fuse? How long are equivalent programs written in fuse/rust/scala/haskell?
Can you show me a bug that the fuse compiler catches but some or all of the competition doesn't?
21–30 of 49 posts
How expressive is fuse? How long are equivalent programs written in fuse/rust/scala/haskell?
Can you show me a bug that the fuse compiler catches but some or all of the competition doesn't?
Love to see a real-world example of GRIN! trait Functor[A]: fun map[B](self, f: A -> B) -> Self[B]; This looks a little wacky to me. I see that you can write HKTs in their η-long form and refer to them unapplied (`Functor`). But I don't understand how I would use this syntax to attach something to the trait that _doesn't_ depend on `A`. For (a silly) example, trait SizedFunctor[A]: Functor[A]: type Size; fun size(sel…
`Self` isn't the applied type (`List[A]`), rather it's the type constructor of kind `* -> *` constrained by `Functor`. In the map example it gets desugared into: fun map[Self: Functor, A, B](self: Self[A], f: A -> B) -> Self[B]; Since `Self` is the unapplied constructor, `Self[B]` just means `Functor[B]` e.g. `List[B]` not `List[A][B]`. The example you've shown with `SizedFunctor` is not currently supported, as suppo…
trait ConvertTo[T]:
fun convert(self) -> T;
Seems to create a single trait ConvertTo, for a generic type with a [T] argument, rather than allowing one to define separate implementations for ConvertTo[i32], ConvertTo[String], etc.Superficially, I find the syntax very untuitive to read. Most languages opt to use for typevariables. Is there a specific reason you chose to deviate from that and use []?
They can't even represent Fuse's Functor example, i.e.
f: A -> B, x: F[A]
so maybe they don't get any points for syntax.Off topic: what is the most convenient statically typed language that don't require compilation/transpilation? To run instead of bash or Python, but types are mandatory (not just hints like python). I know jShell has been here like 10 years, but I'm not sure it's convenient to quickly write to a file, query a url, etc. .ksh for Kotlin? Typescript (through Deno)? Lua?
From what I understand, GRIN does some parts of supercompilation [1] during optimization process. Supercompilation can prove equivalence of functional programs [2] modulo termination. So you can have something interesting and useful in almost no time. ;)
[1] https://themonadreader.wordpress.com/wp-content/uploads/2014/04/super-final.pdf
[2] https://www.researchgate.net/publication/225252220_Proving_the_Equivalence_of_Higher-Order_Terms_by_Means_of_Supercompilation
It appears that Fuse does not have user-defined operators. Am I right? If so, it is a major obstacle in creating embedded languages.Off topic: what is the most convenient statically typed language that don't require compilation/transpilation? To run instead of bash or Python, but types are mandatory (not just hints like python). I know jShell has been here like 10 years, but I'm not sure it's convenient to quickly write to a file, query a url, etc. .ksh for Kotlin? Typescript (through Deno)? Lua?
Lua isn't statically typed, and while there is Teal – a statically typed variant of Lua – it requires separate build step.
Off topic: what is the most convenient statically typed language that don't require compilation/transpilation? To run instead of bash or Python, but types are mandatory (not just hints like python). I know jShell has been here like 10 years, but I'm not sure it's convenient to quickly write to a file, query a url, etc. .ksh for Kotlin? Typescript (through Deno)? Lua?