I’ve been meaning to post a recent-ish project of mine where I ran OCaml (and much more) on a 1960s UNIVAC 1219B! The demo I chose to run was a sudoku solver. In short, this was done by compiling OCaml to C, C to RISC-V, and then emulating RISC-V on the UNIVAC.
Full UNIVAC toolchain: Writeup, and source. Please see the my comment below for the other links! I’m unable to post more than two links in a post.
I also ran an OCaml program submitted by a friend that computed factors of numbers. At one point we thought the program crashed, but we were delighted when the program resumed ~5 minutes later. Turns out garbage collecting is slow on this machine
Oh, and it works with OxCaml too!
Enjoy! Below are some pictures. (Disregard the earlier output, that was a run of ELIZA )
After a few tweaks, I managed to get c_of_ocaml working to compile firmware for AVR microcontrollers! I went ahead and forked your project, completely refactoring it to support the latest version of the js_of_ocaml compiler.
open Hal
let () =
gpio_mode 13 1;
while true do
led_on 13;
delay_ms 1000;
led_off 13;
delay_ms 1000
done