TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Experimental Semantic Code Explorer

117 点作者 paulshen超过 4 年前

6 条评论

paulshen超过 4 年前
I&#x27;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&#x27;re on mobile, you can find a video here <a href="https:&#x2F;&#x2F;twitter.com&#x2F;_paulshen&#x2F;status&#x2F;1346583010691321856" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;_paulshen&#x2F;status&#x2F;1346583010691321856</a><p>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&#x27;s language server to get the program&#x27;s semantics which allows features such as showing only the item (eg function) that you&#x27;re jumping to.<p>Here is another iteration with a canvas where you can drag panes around. <a href="https:&#x2F;&#x2F;artifacts.bypaulshen.com&#x2F;code-explorer&#x2F;01&#x2F;?snapshot=9feb3d1a-b41e-44e6-adff-9b522414dc0b" rel="nofollow">https:&#x2F;&#x2F;artifacts.bypaulshen.com&#x2F;code-explorer&#x2F;01&#x2F;?snapshot=...</a> I have more ideas&#x2F;iterations coming. My goal is to productionize this for real use :)
评论 #25664537 未加载
评论 #25663533 未加载
评论 #25665945 未加载
评论 #25667000 未加载
评论 #25666719 未加载
phailhaus超过 4 年前
Miller columns! I have fallen in love with this UI paradigm after using them for graph-based tools. Some thoughts:<p>1. Once you open multiple panes from the same column, and go out to 2+ levels deep, it quickly becomes unclear which panes followed from which. There is an underlying tree structure that you are hiding from the user. Explicitly surfacing this tree somehow could greatly increase the usability of the tool. At the moment, opening two reference panes from the same parent column immediately becomes difficult to manage. Some ideas: clicking on a reference pane should highlight the code pane that it is associated with, something similar for code panes might also be appropriate. Highlighting up- and down-stream dependencies would make it much clearer what panes I&#x27;m about to delete by deleting a given pane (the user can drag a pane to a different column in order to &quot;disconnect&quot; it and keep it around).<p>2. If I delete a pane from a column, its descendants stay open, making it even more confusing why I had them open in the first place.<p>3. The header breadcrumbs are brilliant.<p>4. You have two types of panes: reference panes and code panes. I&#x27;m not sure that&#x27;s a good idea, since a reference pane is tightly tied to the code pane it came from. It may make more sense to show references in code pane itself, and then let me follow references from there into the next column.<p>5. I&#x27;m on a Mac with a trackpad, which makes horizontal scrolling very very easy. This is not true for all your users. It might make sense to add thin left&#x2F;right buttons so that I can quickly move a column at a time. At the very least: if I open a new column, the window should scroll to make it visible if it is about to be cut off. Since users screens will most likely be able to handle at least two columns, this shouldn&#x27;t be too jarring (as long as you use a smooth scroll! quick but clear, 100-200ms)
评论 #25665695 未加载
评论 #25664926 未加载
lrossi超过 4 年前
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.<p>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.<p>To be fair, I have seen much worse. At least there’s plenty of comments, and the naming is ok.
nicoty超过 4 年前
There&#x27;s a text editor being developed that edits code based on nodes of its AST representation - <a href="https:&#x2F;&#x2F;github.com&#x2F;kneasle&#x2F;sapling" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kneasle&#x2F;sapling</a>
Ristovski超过 4 年前
Is only React supported? Or is the architecture generalized enough where support for other languages can be implemented further on?
评论 #25663292 未加载
Kiro超过 4 年前
Awesome! This should be made into a VSC extension.