Hacker News new | ask | show | jobs
by tptacek 2541 days ago
Github also recently open-sourced their Haskell-based Semantic, which annotates and cross-references a whole bunch of languages (all the languages any of our clients use), and is built on tree-sitter, so there's, like, several levels of prior art available here.
2 comments

Another issue with Semantic that makes me less thrilled about using it here: say it doesn't support programming langauge $x, and you don't know or want to use Haskell, but you do know and want to use language $x. To add it to GitHub, you have to learn Haskell, which is no small mountain to climb. To add it to SourceHut, you can just leverage $x's existing tools.

But, plugging Semantic into SourceHut should be totally possible with some mild massaging of the output JSON.

Semantic is in Haskell, but since it doesn't use GHC, it cannot handle Haskell well (can't e.g. resolve type classes).

If I wanted good code reviewing with Haskell, I figure it would be best to translate HIE files (https://www.haskell.org/ghc/blog/20190626-HIEFiles.html) to LSIF (https://github.com/mpickering/hie-lsif), which is supported in VSCode. Because of the limitations of only parsing, GitHub alone will not be as powerful. If I then just make an LSIF to SourceHut converter, SourceHut will have better annotations than GitHub...