paf31 / dovetail

A PureScript interpreter in Haskell
http://functorial.com/dovetail
BSD 3-Clause "New" or "Revised" License
118 stars 3 forks source link

How exciting! #24

Closed chrisdone closed 2 years ago

chrisdone commented 2 years ago

Oddly I’ve wanted something like this for a while.

So thanks for sharing this, it opens up a lot of possibilities.

chrisdone commented 2 years ago

It’s also a huge burden to distribute a Haskell interpreter. But PureScript is tiny by comparison. So it can really shine for scripting language use case. Aside from that, its core language is far smaller and far more stable, making it great for user facing scripting. Haskell changes every 5 minutes.

paf31 commented 2 years ago

Thanks Chris! Those are definitely a lot of the same sort of motivations that I had.

Seems like there are enough rough edges with production Haskell (no debugger, hot reloading, compile times, complicated deployment cycles, etc.) but I feel like there's so often a split between really "core" code, and the glue code (which can make up 80% or more of the total code size), and I'm personally willing to sacrifice some type safety and raw performance to get back some of those missing things for the glue code part of my code.

chrisdone commented 2 years ago

I hear that! I'll watch this repo and share any experiments.

chrisdone commented 2 years ago

Thinking aloud, in case any thoughts overlap with anyone else.

I might even revive Hell (https://github.com/chrisdone/hell) as a “pinned” PureScript plus process launching functions using this. 🤔 (I consider PureScript and GHC to be dialects of “Haskell”, why not Hell) Forget all the quoted shell nonsense.

Bash is a mess but stable, Python is better but unstable, Dhall is nice but too limited.

PS plus a few handy functions could be really nice. The kind of tool where if I run the same script in 3 or 5 years it’ll still work exactly the same just like bash, with append-only language/prelude policy, all given functions namespaced under Hell.foo, and breaking changes requiring a new binary name like hell2, hell3, etc. I’d have to extend the import syntax to support HTTPS URLs with SHA256 hashes, but aside from that there wouldn’t really be any changes needed.