Whilst browsing some WASM community solutions, I noticed that equivalent solutions were not grouped together. I spent an hour or building a rudimentary representer (see Normalize output by ErikSchierboom · Pull Request #4 · exercism/wasm-representer · GitHub), which core idea is: creating a representation by normalizing the solution’s submitted files via wat-desugar
, which is part of the WebAssembly Binary Toolkit. This means that sugared code is desugared and consistently formatted, which is then used for the representation.
I then enabled the representer via Enable representer by ErikSchierboom · Pull Request #83 · exercism/wasm · GitHub, followed by re-running the representer on existing submissions. Now a lot more solutions are grouped together, which is particularly noticeable on simpler exercises like leap
: Community solutions for Leap in WebAssembly on Exercism. As an example, bushidocodes's solution for Leap in WebAssembly on Exercism and ErikSchierboom's solution for Leap in WebAssembly on Exercism used to be considered different, but no longer!