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.
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.
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.
The bottleneck now seems to be ByteVectors. Iāll be looking into this as it seems relatively easy to add them to the Chez Scheme backend.
Edit: and hereās the pull request
Iād be honored if someone would give this a look and (if necessary) brutally dunk on me if this seems like a frivolous or unneeded change.
Edit: Glad to get a reply so quickly. Iāll instead be building this as a module/add-on to help make this the canonical way that we wire into bytevectors via Purescript FFI.