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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: AI that reads and explains complex code naturally, like a human

7 点作者 codeenlightener超过 3 年前

2 条评论

diskzero超过 3 年前
This is really interesting. When I first looked at some of the examples, I initially dismissed it, but then I realized there was some additional work being done in addition to some of the more obvious interpretations..<p>I ran some of my own code snippets and the results were pretty impressive. I was having a lot of fun before I got rate limited. Bummer!<p>I am still not sure of the exact business case. It this for non-technical people to get a plain language explanation of the code? For junior developers? I would like to try larger chunks of code to see how the system performs.
评论 #28448526 未加载
codeenlightener超过 3 年前
Hi HN! I created this to help decipher complex game engine logic. Instead of a literal translation, what it does is get at the core ideas in the code.<p>Programmers spend 30-90% of their time reading code. With Denigma, I hope to help programmers read unfamiliar code faster.<p>By accident, my alpha tester group was mainly kernel and embedded developers. Surprisingly, it works well and fairly accurately on most code in obscure domains like kernel and embedded.<p>When possible, it helps show what concepts are in the code. The AI model following was written to explain part of a kernel&#x27;s boot process:<p><pre><code> - longmode - Indicates whether or not we are running in 64 bit mode - lv5 - Indicates whether or not we are running with L1V5 support enabled (if you&#x27;re unsure what this means google &quot;Intel VT-x&quot; and &quot;L1D cache&quot;) - pagemap - The address of our page table entry array (this is where all of our virtual addresses go) - x2apic - Indicates whether or not we are using an Intel X2APIC controller </code></pre> It likes to explain business logic.<p>Here is part of an explanation of a C++ function, called &quot;AttackSystem::update.&quot; The full code is next to &quot;Focus on what&#x27;s important.&quot; on the landing page, which uses two nested closures– quite complex.<p><pre><code> - Each attacker has an associated position and attack object which contains information about how much damage they have done to the victim so far (base_damages) as well as their cooldown timer (cooldown). - When an attacker&#x27;s cooldown timer reaches zero they can no longer attack for another 8 frames. - If there are any victims then each one will be updated with their current health minus the amount of damage done by the attacker up until now (current). - This process repeats itself until either there are no more victims or there is only one left - when this happens then we know that our last victim was our enemy who attacked us! </code></pre> Of course, AI isn&#x27;t a silver bullet. It needs sufficient context cues– such as variable names. The variable names don&#x27;t need to be perfect, however– it can work with and infer the meaning of vague, single-word names in legacy code.<p>I&#x27;m sure that if it can explain the code from the STIVALE2 boot protocol, it can explain simpler code!<p>There&#x27;s also a second landing page for product managers: <a href="https:&#x2F;&#x2F;denigma.app&#x2F;for-product-manager" rel="nofollow">https:&#x2F;&#x2F;denigma.app&#x2F;for-product-manager</a><p>Denigma isn&#x27;t perfect. On code that occurs rarely in its dataset, its accuracy becomes questionable. Sometimes it takes 2-3 tries to get a good explanation. And it only understands some parts of the Linux kernel- and can&#x27;t explain Verilog HDL at all. Over time with feedback, the model will get bigger and better.
评论 #28454461 未加载