Show HN: ScrapScript – A tiny functional language for sharable software (opens in a new tab)scrapscript.org
503 pointsHi friends,
I started casually working on scrapscript in 2015. I built a few compilers over the years to test out various ideas/implementations, and I think I'm finally happy with the overall design.
The code is not public yet. Email me at hello@taylor.town if you're interested in joining the core team later this year.
Let me know if you have any questions or feedback :)
Comments (135) 41 threads
Show all comments
Showing thread 11 of 41
This looks really interesting to me.
Applicative: Now when I embed this script, I would like my runtime interpreter to provide implementations of `let!` and `and!`. The script author defines the bind points and the runtime defines the effects.There is a feature I would like that I have never seen in a scripting language, and I wonder if Scrap might support it:
> Monadic bind points and applicative join points in the script language
Hopefully an example can convey what I mean.
Bind:
Is this possible in Scrap?
Juggling lots of monads can be annoying. But to keep scrapscript small like json, this is something I would try to solve with editor tools rather than the language itself.
My hunch is that if you do not put the syntax into the language, then it will be hard for the community to standardize on one preprocessing tool.
OCaml (which I am a fan of!) struggles with fragmentation here.
I suspect that everybody will settle on a reusable `task` type, but each platform can determine its own async scheduling system.
In this case, the platform creates a simple web server from the following type: Because scrapscript stays out of the scheduling game, the platform is free to run this code on as many cores and servers as it wants in parallel.Consider this example:
But I 100% agree that community standardization is incredibly important! I just don't have a solution yet :) I will try my best to get everybody to work together though haha