5 ms·
Haha, yeah I didn't realize there would be a monkey patch route to FFI in Elm. Can't control the runtime. Is there a good read up on this technique?
by lolc 2mo ago
Haha, yeah I didn't realize there would be a monkey patch route to FFI in Elm. Can't control the runtime. Is there a good read up on this technique?
- 1-more 2mo agoSlightly important point: it's still safe FFI! Everything that crosses the JS/Elm boundary has to be encoded/decoded from serialized JS Objects. So it's hacky BUT it's not actually unsafe, which is kind of funny. I have an example where I use it to effect locale-aware sort. This repo is a benchmark test of that: https://github.com/perkee/elm-js-sort-ffi-speed-test/tree/main https://github.com/perkee/elm-js-sort-ffi-speed-test/tree/ma...
- lolc 2mo agoGreat hack, thanks! And yea I was missing some native string api when I abandoned Elm at 0.19.