purescm / purescm

Scheme backend for PureScript (a small strongly, statically typed programming language with expressive types, inspired by Haskell).
Apache License 2.0
65 stars 3 forks source link

Self-hosting #258

Open anttih opened 4 weeks ago

anttih commented 4 weeks ago

This is a tracking issue for running purescm on purescm. Self-hosting purescm is useful because it's a nice use case for purescm and provides a better user experience. We don't have to shell out to scheme anymore and can leverage native threads for compilation among other things.

The steps to accomplish this are:

f-f commented 4 weeks ago

I had a shot at implementing IO in the last months. It's all sync so it blocks all the time, and that is not desirable, which transforms it into a thread-coordination problem, and I don't like where that is going.

Currently sitting on it pondering options, I think our best shots are either using Swish (which gives us erlang-style async, and includes nice things like an http server), or directly binding to libuv

anttih commented 4 weeks ago

I had a shot at implementing IO in the last months. It's all sync so it blocks all the time, and that is not desirable, which transforms it into a thread-coordination problem, and I don't like where that is going.

Do you think we need to tackle async IO before self-hosting? I don't see it blocking this.

f-f commented 3 weeks ago

Do you think we need to tackle async IO before self-hosting? I don't see it blocking this.

Yeah I hope it's not a big block. Just noting that the builtin IO facilities are underwhelming and I didn't get them to work reliably yet, hence why I started looking for something easier to integrate.