要不我们继续写代码? 伪代码项目

6作者: EmptyDrum5 个月前
六个月前,一些人[https://news.ycombinator.com/item?id=44940089] 认为LLM在将伪代码翻译成实际代码方面表现出色。我同意这个观点。此外,编写伪代码也让我感到一种类似的心流状态。甚至可能更甚,因为没有编译器/解释器会因为语法问题而烦扰我。 现在,我构建了这个:<p>https://github.com/HalfEmptyDrum/Pseudo-Code-Flow<p>它基本上是一个Claude Code技能。你可以在一个.pseudo文本文件上使用/translate命令来调用它。它显然会将伪代码翻译成你指定的语言。这本来就很好,但我还加入了一个微妙但有用的功能:<p>*这可能是最有用的功能,并且从根本上改变了我的编码方式*:<p>LLM会建议对你的代码进行更改(设计、架构、功能等),但大致上会使用你的伪代码风格。<p>我认为伪代码是最接近于代码/算法在我脑海中呈现方式的语义主体。当Claude用我的语言而不是Python/C++/…(需要大量样板代码才能使其工作)来回答时,它更容易与我产生共鸣。<p>请告诉我你的想法!
查看原文
6 months ago a few people [https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=44940089] agreed that LLMs are very good at translating Pseudo-code to real code. I agree. Also, writing pseudo code somewhat makes me feel a similar state of flow. Maybe even more, because no compiler&#x2F;interpreter annoys me about syntax issues. Now, I built this:<p>https:&#x2F;&#x2F;github.com&#x2F;HalfEmptyDrum&#x2F;Pseudo-Code-Flow<p>It is basically a Claude Code skill. You can call it on a .pseudo text file with &#x2F;translate. It will obviously translate the pseudo code into your specified language. This would be nice and all, but I included another subtle but useful feature:<p>*This is probably the most useful feature and fundamentally changed my coding*:<p>The LLM will suggest changes (design, architecture, functionality, ...) to your code, but will roughly use your pseudo code style.<p>I think of pseudo code as the semantic body that is closest to how the code&#x2F;algorithm is represented in my head. When Claude then answers in my language instead of Python&#x2F;C++&#x2F;... (which has lots of boilerplate to make it work), it resonates much easier with me.<p>Let me know what you think!