Re:Difftastic: A diff that understands syntax
by arianvanp on Tuesday March 29, 2022 @04:51PM
(#30848195)
Some of the GHC performance bugs that we ran into during the research have been fixed as far as I know! Though I'd have to double-check
Re:Difftastic: A diff that understands syntax
by vcmiraldo on Wednesday March 30, 2022 @02:43PM
(#30859172)
Indeed, we also designed a brand new generics library to work around that. Performance was really not an issue! :)
Re:Difftastic: A diff that understands syntax
by vcmiraldo on Wednesday March 30, 2022 @02:57PM
(#30859379)
Copy just copies once. The need for duplicate is clear if you're trying to diff something like `t = [a]` and `u = [a, a]`. You could copy `a`, but you'd have to decide whether to copy it on the first or second position; the second one would be classified an "insertion" by any ins/del/cpy-algorithm. If you instead opt to NOT make that choice, you can say: pick the source `a` and duplicate it instead
The practical problem, though, is that the Haskell compiler is limited/buggy, so you couldn't implement this for C, and you settled on a small language like Lua. If you _do_ extend this to other languages (perhaps port your implementation from Haskell to something else?), please post it on HN and elsewhere!