Live data from Hacker News

Sky – an Elm-inspired language that compiles to Go

github.com

31–40 of 99 posts

Re: Sky – an Elm-inspired language that compiles to Go

#31
Nice to see another language with Haskell / Miranda type syntax, but the vibe-coded implementation sure shows: e.g. src/Compiler/Infer.sky isUpperStart:

    isUpperStart : String -> Bool
    isUpperStart name =
        case String.slice 0 1 name of
            
            "A" ->
                True
            
            "B" ->
                True
            
            "C" ->
                True
        ... for 23 more cases.
And the corresponding go code in the bootstrap compiler is even worse.

Re: Sky – an Elm-inspired language that compiles to Go

#32
post #20

Earlier quoted context omitted.

What was the other one? I'm working on a language that transpiles to Zig with a custom Go-like runtime (and no garbage collector, Rust-style Affine movement instead). Sky seems quite cool, as it's additive to Go in interesting ways. I originally considered keeping the GC and just transpiling to Go so I didn't need to write a Runtime. Go rules! It really does. But I HATE writing/reading Go. So I'm glad more people are…

https://lisette.run/

Awesome, this is very close to what I originally considered.

Re: Sky – an Elm-inspired language that compiles to Go

#33
post #12
post #11

Great work :). Go doesn't have TCO. That means functional languages (no for loops) could blow up the stack. How did you solve that?

You can just compile any tail recursive function to a function with a loop and no recursion.

That does not address the use case where I find tail recursion most tempting. That would be mutually recursive functions.

If the function can be written as an idiomatic loop I probably would do so in the first place.

Re: Sky – an Elm-inspired language that compiles to Go

#34
post #31

Nice to see another language with Haskell / Miranda type syntax, but the vibe-coded implementation sure shows: e.g. src/Compiler/Infer.sky isUpperStart: isUpperStart : String -> Bool isUpperStart name = case String.slice 0 1 name of "A" -> True "B" -> True "C" -> True ... for 23 more cases. And the corresponding go code in the bootstrap compiler is even worse.

Haskell/Miranda use `::` instead of `:` for type signatures unlike Elm & basically the rest of the family which prioritize types being less keypresses than list cons.

Re: Sky – an Elm-inspired language that compiles to Go

#35

First - awesome job. Congrats. Self hosting is an accomplishment! But I'm curious to get your thoughts on the process in hindsight. I understand why it's valuable: to cast a wide net in catching bugs and give a good signal that your language is generally "ready". I'm working on a similar language, but worried about going down the self-hosting path, as I think it'd slow me down rather than speed me up. How did it work…

What's the actual accomplishment here? It seems like the language came into existence a month ago and was written mostly by Claude. If self hosting is a matter of asking Claude to do it and it takes a couple weeks, is it really an accomplishment at all?

Re: Sky – an Elm-inspired language that compiles to Go

#36
post #9
post #4

Functional languages have some good and some bad features and there's no reason to copy them all. For example, you don't need to have a Hindley-Milner type system (bidirectional is better) or currying just because it's a functional language.

We need more pragmatic languages. E.g. Erlang and Elixir are functional, but eschew all the things FP purists advocate for (complex type systems, purity, currying by default etc.)

If you like Erlang, Elixir, and Elm/Haskell, then Gleam + Lustre (which is TEA) is a pretty great fit.

Re: Sky – an Elm-inspired language that compiles to Go

#37

First - awesome job. Congrats. Self hosting is an accomplishment! But I'm curious to get your thoughts on the process in hindsight. I understand why it's valuable: to cast a wide net in catching bugs and give a good signal that your language is generally "ready". I'm working on a similar language, but worried about going down the self-hosting path, as I think it'd slow me down rather than speed me up. How did it work…

What's the actual accomplishment here? It seems like the language came into existence a month ago and was written mostly by Claude. If self hosting is a matter of asking Claude to do it and it takes a couple weeks, is it really an accomplishment at all?

Yes, somebody has to actually do it, and they did.

Re: Sky – an Elm-inspired language that compiles to Go

#38

First - awesome job. Congrats. Self hosting is an accomplishment! But I'm curious to get your thoughts on the process in hindsight. I understand why it's valuable: to cast a wide net in catching bugs and give a good signal that your language is generally "ready". I'm working on a similar language, but worried about going down the self-hosting path, as I think it'd slow me down rather than speed me up. How did it work…

What's the actual accomplishment here? It seems like the language came into existence a month ago and was written mostly by Claude. If self hosting is a matter of asking Claude to do it and it takes a couple weeks, is it really an accomplishment at all?

Anything + Go's runtime is a reasonable language.

Go's runtime is one of the greatest pieces of software ever built.

Assuming this works - which self-hosting guarantees a minimum level of "working" - this is useful!

I didn't want to rely on the unpredictability of a garbage collector, so I chose to build my own runtime, but it's not going to be as good as Go any time soon.

Re: Sky – an Elm-inspired language that compiles to Go

#39
post #34
post #31

Nice to see another language with Haskell / Miranda type syntax, but the vibe-coded implementation sure shows: e.g. src/Compiler/Infer.sky isUpperStart: isUpperStart : String -> Bool isUpperStart name = case String.slice 0 1 name of "A" -> True "B" -> True "C" -> True ... for 23 more cases. And the corresponding go code in the bootstrap compiler is even worse.

Haskell/Miranda use `::` instead of `:` for type signatures unlike Elm & basically the rest of the family which prioritize types being less keypresses than list cons.

Sorry, I meant "Haskell / Miranda style syntax" -- e.g. curried functions, concise syntax with little boilerplate, etc. The word type is too overloaded ;-)

Re: Sky – an Elm-inspired language that compiles to Go

#40

That's two new languages compiling to Go making HN frontpage in as many days. It seems people like everything about Go except the language itself. Me? I like everything about Go including the language, these transpiled languages are interesting though. But I keep wondering if they could integrate at a lower-level than the source code. Like how JVM languages integrate at the bytecode level, or LLVM languages at the LL…

[deleted]
Post reply on HN