Stream: show and tell

Topic: A roc that builds itself


view this post on Zulip Rene Mailaender (Apr 13 2023 at 19:40):

Well it's not a quine but finally we have a roc program that's builds itself. xD
roc-builds-itself.jpg
i just did a little poc of how to spawn another program from a roc app, so i needed a little test case. i don't know why, but for some rease a program building itself gives me some goosebumbs. ^^

view this post on Zulip Ayaz Hafiz (Apr 13 2023 at 19:43):

very cool! the first bootstrapping Roc program!

view this post on Zulip Brendan Hansknecht (Apr 13 2023 at 22:45):

Haha, love it

view this post on Zulip Rene Mailaender (Apr 14 2023 at 21:05):

Well i couldn't resist:
image.png
and yes , it really gets into an infinite loop. so i had to ctrl^c

funny though. when building first and then running the executable, it crashes:
image.png

view this post on Zulip Brendan Hansknecht (Apr 14 2023 at 23:21):

Oh, too fast file io and trying to access a file while it is still being flushed to disk

view this post on Zulip Richard Feldman (Apr 15 2023 at 01:20):

could we give a nicer error for that?

view this post on Zulip Rene Mailaender (Apr 15 2023 at 15:23):

Brendan Hansknecht said:

Oh, too fast file io and trying to access a file while it is still being flushed to disk

makes sense i gues. but why does it not happen when i roc run ... ?

view this post on Zulip Brendan Hansknecht (Apr 15 2023 at 15:25):

That runs from memory and just happens to also flush to disk rather than flushing to disks and then running from disk

view this post on Zulip Rene Mailaender (Apr 15 2023 at 15:25):

makes sense. thx


Last updated: Jul 06 2025 at 12:14 UTC