[HN Gopher] Show HN: Experimental Semantic Code Explorer
___________________________________________________________________
Show HN: Experimental Semantic Code Explorer
Author : paulshen
Score : 31 points
Date : 2021-01-06 21:18 UTC (1 hours ago)
(HTM) web link (artifacts.bypaulshen.com)
(TXT) w3m dump (artifacts.bypaulshen.com)
| Ristovski wrote:
| Is only React supported? Or is the architecture generalized
| enough where support for other languages can be implemented
| further on?
| paulshen wrote:
| It's generic enough for JavaScript/TypeScript codebases. Under
| the hood, it's using TypeScript's language server which
| conveniently runs in the browser. Other languages would require
| running the respective language service elsewhere or caching
| the results (ala LSIF https://lsif.dev/)
| lrossi wrote:
| I think maybe Facebook should stop asking for complicated
| algorithms questions in their interviews, and instead ask to
| debug code like this with 7 indentation levels per function and
| behavior affected by a dozen flags.
|
| The tool is nice, but it would have been better if the code was
| more readable in the first place, such that any editor would have
| sufficed.
|
| To be fair, I have seen much worse. At least there's plenty of
| comments, and the naming is ok.
| Kiro wrote:
| Awesome! This should be made into a VSC extension.
| paulshen wrote:
| I've been thinking about how we can make devtools smarter and
| more fun to use. We write code with text but programs contain a
| lot of structure that we can take advantage of! If you're on
| mobile, you can find a video here
| https://twitter.com/_paulshen/status/1346583010691321856
|
| This demo is an iteration of my code browser exploration where
| jump to definition always opens in a column to the right. I use
| TypeScript's language server to get the program's semantics which
| allows features such as showing only the item (eg function) that
| you're jumping to.
|
| Here is another iteration with a canvas where you can drag panes
| around. https://artifacts.bypaulshen.com/code-
| explorer/01/?snapshot=... I have more ideas/iterations coming. My
| goal is to productionize this for real use :)
| n0w wrote:
| This is pretty cool.
|
| One thing I noticed is that Cmd-Clicking a variable only shows
| where it was defined. I think it would be pretty useful if you
| could also see the places it was changed.
___________________________________________________________________
(page generated 2021-01-06 23:00 UTC)