Nice to see a pretty advanced language at frontpage of HN!
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. ;)
It appears that Fuse does not have user-defined operators. Am I right? If so, it is a major obstacle in creating embedded languages.
codebje
It's nice to see a GRIN backend in the wild!
It looks like a tidy little functional language - a small, easily grasped syntax surface and generally clear semantics. That you've got it to the point that it can compile and run proper programs is a great achievement for a solo dev project!
The string type in the standard library isn't Unicode-aware, might be worth just noting that. Unicode support can be a big undertaking, but considering whether you'll add it later or not might affect your library design now.
I don't really understand why you have an IO monad. The language isn't pure - `.exec()` means any function can perform IO actions no matter its type signature - so what's IO really for?
Do `impl` additions export? What happens when two libraries add the same function name with different signatures (or just bodies!) to a type's `impl` ?
Is currying automatic? It doesn't seem to be, but, eg, the `sum(x: i32, y: i32)` function theoretically could be called as `sum(5)` to create a closure, but this isn't a documented feature if so.
The website's font is using ligatures, not unicode operator symbols - I'd personally find it much clearer to use a non-ligature font to show what's really there, but that's immaterial to the language.
show comments
dehrmann
A nit, but fusefs is a well-known thing, so you'll face some naming confusion.
Twey
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(self) -> Size;
How do I know that `List[A]::Size` is the same type as `List[B]::Size`?
Relatedly, I want to read `Self` in there as ‘the thing that implements `Functor[A]`’ (e.g. List[A]`), but that makes `Self[B]`, instantiated, mean `List[A][B]`, which I think should be a kind error.
show comments
deepsun
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?
show comments
norir
I would suggest adding objective metrics. How fast is this compiler? How long is the longest fuse program? How long does it take to compile? How fast at runtime is the fuse implementation of several benchmark programs compared to semantically equivalent programs written in other languages?
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?
helix278
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 []?
show comments
nee_oo_ru
Congrats on the release! Really cool to see a working GRIN backend. I'm definitely bookmarking this to give it a spin as soon as I get some spare time.
toplinesoftsys
Great project - clean and simple syntax, pure functional language, uses GRIN framework.
strong-self
found tree-sitter-fuse in the org, updated yesterday. is editor support next, like an lsp over the scala typechecker?
show comments
qsera
I wish you took Haskell's syntax as such. Why did you mix rust and possibly other stuff with it?
show comments
faangguyindia
i loved haskell but cross platform haskell deployment is still pain
Nice to see a pretty advanced language at frontpage of HN!
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. ;)
It appears that Fuse does not have user-defined operators. Am I right? If so, it is a major obstacle in creating embedded languages.It's nice to see a GRIN backend in the wild!
It looks like a tidy little functional language - a small, easily grasped syntax surface and generally clear semantics. That you've got it to the point that it can compile and run proper programs is a great achievement for a solo dev project!
The string type in the standard library isn't Unicode-aware, might be worth just noting that. Unicode support can be a big undertaking, but considering whether you'll add it later or not might affect your library design now.
I don't really understand why you have an IO monad. The language isn't pure - `.exec()` means any function can perform IO actions no matter its type signature - so what's IO really for?
Do `impl` additions export? What happens when two libraries add the same function name with different signatures (or just bodies!) to a type's `impl` ?
Is currying automatic? It doesn't seem to be, but, eg, the `sum(x: i32, y: i32)` function theoretically could be called as `sum(5)` to create a closure, but this isn't a documented feature if so.
The website's font is using ligatures, not unicode operator symbols - I'd personally find it much clearer to use a non-ligature font to show what's really there, but that's immaterial to the language.
A nit, but fusefs is a well-known thing, so you'll face some naming confusion.
Love to see a real-world example of GRIN!
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, How do I know that `List[A]::Size` is the same type as `List[B]::Size`?Relatedly, I want to read `Self` in there as ‘the thing that implements `Functor[A]`’ (e.g. List[A]`), but that makes `Self[B]`, instantiated, mean `List[A][B]`, which I think should be a kind error.
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?
I would suggest adding objective metrics. How fast is this compiler? How long is the longest fuse program? How long does it take to compile? How fast at runtime is the fuse implementation of several benchmark programs compared to semantically equivalent programs written in other languages?
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?
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 []?
Congrats on the release! Really cool to see a working GRIN backend. I'm definitely bookmarking this to give it a spin as soon as I get some spare time.
Great project - clean and simple syntax, pure functional language, uses GRIN framework.
found tree-sitter-fuse in the org, updated yesterday. is editor support next, like an lsp over the scala typechecker?
I wish you took Haskell's syntax as such. Why did you mix rust and possibly other stuff with it?
i loved haskell but cross platform haskell deployment is still pain