Show HN: Pong Wars in Standard ML
github.comGreat stuff. I'm gonna study this code and your blog post because I was thinking about using Raylib with MLton. Way to go on keeping the SML dream alive!
Raylib is definitely a pretty fun and simple library. I used it with OCaml (which has bindings to it already) before.
One thing I like about the Functional Core, Imperative Shell architecture is that, if you gather input into an immutable record before sending it to your update function, then your handling of input becomes independent of the windowing/control library you use.
That would make it easier to switch to SDL or GLFW if you later want to since you only need to rewrite a minimal amount of code which converts the windowing library's inputs to your own record type. (Although it's not easy to abstract over drawing operations that way.)
If you'd like any help, I'm happy for you to shoot me an email (my email is in the repository's LICENSE file). Although there's still a lot I could learn more about too.
Cheers - I may email once I get into it. The (disclaimer'd) MacOS build actually segfaults on startup but I'll probably be able to work out what's happening there :)
Talking of Raylib, from the fooling around I've done so far, it's actually a very awkward library to use with MLton. Because many of its functions take C structs by-value and that isn't something the FFI supports, a lot of shim C code needs to be written/generated.