1. 16
  1.  

  2. 6

    (by the author of the Standard ML implementation, MLKit)

    1. 4

      Couple of observations:

      1. I had to patch the makefile to get it to work; add ‘-e’ to the ‘echo’ command-line that generates version.sml.

      2. Seems to be missing a lot of convenience features; e.g. no ⍨, no using floats as shapes

      3. Based on the compiler output, it looks like it tries to statically infer rank. So this trivial example messes it up:

      $ ./aplt <(echo '⎕←((+/2<?10 10 10 10 10)⍴2)⍴1⋄0')
      [Reading file: /proc/self/fd/11]
      Op_e(reshape): cannot unify [int]1 and <int>'r0 when trying to unify [int]1 and <int>'r0 in first argument to reshape
      

      (Also, I was able to get it to runtime GC error, but for some reason I can’t reproduce that now.)

      1. Looking at tests, d-ops seem to be supported, but strange result from this adverb:
      $ ./aplt <(echo 'A←{⍺⍺+⍵}⋄⎕←- A 5 6 7⋄0')
      [Reading file: /proc/self/fd/11]
      Compile Error: /proc/self/fd/11:1.5.
        Compile Error: /proc/self/fd/11:1.5.
        expects numerical argument arrays
      

      The forced static rank inference is likely to make this implementation unusable for non-trivial code. Prefer a JIT-type approach with guarded rank inference. (Can do the same thing for name classes, incidentally. I tried to trick it thattaways—point ‘4’ above being the fruit of those efforts—but it seems guards or other branching structures are not yet supported.)

      1. 2

        I’d encourage you to report your bug on the repo! From watching MLKit (another of his repos) he always seems to handle bug reports well (example: https://github.com/melsman/mlkit/issues/84).