Live data from Hacker News

Show HN: Fuse – statically typed functional programming language

fuselang.org

21–30 of 49 posts

Re: Show HN: Fuse – statically typed functional programming language

#21
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?

Re: Show HN: Fuse – statically typed functional programming language

#22
post #7

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…

How do you define a trait that is itself generic? Like:

    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.

Re: Show HN: Fuse – statically typed functional programming language

#23

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 []?

I'm not sure most languages get a vote here.

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.

Re: Show HN: Fuse – statically typed functional programming language

#24
post #20

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?

Haskell: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/runghc.ht...

Re: Show HN: Fuse – statically typed functional programming language

#25
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. ;)

  [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.

Re: Show HN: Fuse – statically typed functional programming language

#26
post #20

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?

OCaml has both compilator and interpreter.

Lua isn't statically typed, and while there is Teal – a statically typed variant of Lua – it requires separate build step.

Re: Show HN: Fuse – statically typed functional programming language

#30
post #20

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?

F# is good because it can easily fetch and import third party dependencies in a script.
Post reply on HN