ELI5: What are the ramifications of the new Chez Scheme back-end?

I am all-in on Purescript despite an absolute bear of a time learning the quirks of this ecosystem. Recently, I saw that we have a new experimental back end that leverages Chez Scheme. I had no idea about Chez Scheme but this news put it on my radar and I researched it and instantly loved what I saw.

In updating my Purescript devenv this week, I decided to try using the experimental back end to compile a hello world but was hit with some warnings. In starting an issue on github, I realized I was testing purescm in an inintended way and of course I would get issues…so I just cancelled it. This leads me here where I thought it might be nice to externalize the myriad questions (and hopes perhaps) I have about it.

Please forgive me if any of these are foolish questions.:

What are the ramifications for the Chez Scheme back-end in the Purescript ecosystem? Will it simply replace Haskell as our the back end for Purescript’s compiler? That’s fine (and it honestly seems like an exceptionally wise decision) but perhaps I have mistakenly expected us to also be able to leverage Chez Scheme as an alternative to node perhaps?..

but then again, this starts to make me wonder if I don’t know anything at all (I am a C++/Haskell kind of person and web dev can be counter-intuitive to me at the moment) and someone could kindly educate me.

My thought was, if I could have a Haskell-like language that can work nearly bare metal on Cisco hardware, leveraging hardware parallelism, that is a game-changer. but maybe I am missing something and my confusion could help others to learn about PS.

3 Likes

One of the goals of the purescm backend is to be able to write the Purescript compiler itself using it, but it’s a long term goal so we haven’t really talked about it much yet because it’s still early days for purescm.

Other than PS-in-PS Chez allows native threads as you mention, and it has a great C FFI which brings many possibilities. On the other hand the Scheme and Chez ecosystems don’t provide that many libraries so things like async-io and web servers and things like that are potentially more work.

I don’t think you are missing anything. Sorry there isn’t much documentation yet - we’re sort of still trying to experiment and implement the basic stuff like strings and other data structures. I wouldn’t use it yet for anything serious - for example it doesn’t support incremental compilation yet, so you’d be compiling your whole program every time there is a code change.

Contributions are very welcome!

4 Likes

Thanks so much. Hopefully as this evolves, it will bring more people to this ecosystem. Purescript, IMO, currently stands alone as the language that has almost everything I want while also being able to be run just about anywhere that I’d want to run software.

5 Likes