Live data from Hacker News

Sky – an Elm-inspired language that compiles to Go

github.com

51–60 of 99 posts

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

#51

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…

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…

> Go rules! It really does. But I HATE writing/reading Go.

Same. I love the Go toolkits, the compile story, the speed at which it compiles, its backwards compatibility, the fact that stale Go code 10 years old still compile and run, etc., just don't care much for the language itself.

I wonder if the positive attributes of Go aren't compatible with clever types and other developer-friendly features?

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

#52
post #33
post #12

Earlier quoted context omitted.

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.

You _can_ do trampolines, but that is kind of infectious, or needs to be very explicit with extra code, etc.

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

#53

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…

> people like everything about Go except the language itself.

Thanks for putting so succinctly exactly how I feel about Go!

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

#54

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…

LLVM and JVM have stable interfaces. Go has an intermediate representation but it isn’t stable. Anyone who wanted to depend on it would be on the hook when the implementation changes.

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

#55
post #51

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…

> Go rules! It really does. But I HATE writing/reading Go. Same. I love the Go toolkits, the compile story, the speed at which it compiles, its backwards compatibility, the fact that stale Go code 10 years old still compile and run, etc., just don't care much for the language itself. I wonder if the positive attributes of Go aren't compatible with clever types and other developer-friendly features?

It’s mostly that Go was already pioneering how to build a programming language that had an amazing scheduler, garbage collector, compiler, package manager, formatter, etc. They spent all of their “innovation budget” on the most important—and most neglected—features of any programming language and allowed the language itself to be pretty boring.

Eventually Go’s runtime and tooling will be bog standard and everyone will think of them as boring and then people will start building more exciting languages on top of them. Assuming AI doesn’t blow everything up.

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

#58
post #47

Earlier quoted context omitted.

I feel like there's too much of a fetish for self-hosting. There's this pernicious idea that a language isn't a 'real' language until it's self-hosted, but a self-hosted compiler imposes real costs in terms of portability, build integrity, etc. If I ever write a compiler - God forbid, because language design is exactly the kind of elegance bike-shedding I'll never crawl my way out of - it's going to be a straight-up…

If you wrote the C89 outputting transpiler in your own language it would still be just as portable.

I'd be dependent on pre-existing binaries that are closely wedded to a particular platform (OS, libc etc), and it over time it would become more and more difficult to attest to build integrity / ensure reproducible builds. (Is the ARM build meant to run an x64 emulator as part of some lengthy historic bootstrapping process?)

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

#59
post #16

I will add this to my list of Elm-inspired tools that call to mind Brian Eno's quip about the first Velvet Underground album: "I think everyone who bought one of those 30,000 copies started a band!" With Elm it feels like it's 1% of Elm users creating a language. https://quoteinvestigator.com/2016/03/01/velvet/

You should publish your "Elm-inspired tool" list- I bet it's pretty large. Off the top of my head: iced, react redux, bubble tea (Go lib), Roc lang.

I'm sure there are lots more. I'm still waiting for someone to write an "Elm retrospective" and examine its rise and stagnation

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

#60
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.

I started my career cleaning up systems written by solo devs in the pre internet era. I’ve seen a lot of starts_with_UCase() implementations like that.

I see now I’m going to end my career cleaning up systems written by chronically online vibe coders, making all the same mistakes, with none of the excuses.

Post reply on HN