老工具当道:一个头脑简单的 Clojure 程序员的 REPL 使用习惯
Keeping it Old-Tool: REPL habits of a grug-brained Clojure programmer

原始链接: https://www.evalapply.org/posts/demo-clojure-workflow-scicloj/index.html

Aditya Athalye 提出了一种“直觉式”(grug-brained)的 Clojure 开发方法,与现代工具和大型语言模型形成对比。他优先使用标准 Clojure 库和命令行工具(deps/cli),而不是第三方解决方案,更注重对核心语言和运行时的深入理解。他的工作流程围绕动态 REPL 驱动的开发风格展开,经常使用 org-mode 和 org-babel 作为笔记本电脑来协调代码。他专注于培养实时运行时操作和使用 `clojure.reflect`、`clojure.pprint`、`clojure.repl`、`clojure.datafy` 和 `clojure.inspector` 等工具检查实时对象的肌肉记忆。他展示了如何在运行时添加依赖项并在 REPL 中直接动态重构代码。Athalye 通过一个简单的 Jetty 服务器的现场编码演示来说明这种方法,演示了使用标准 Clojure 工具进行检查、捕获值和动态修改。他更喜欢本地工作并直接操作字节,崇尚简洁而不是复杂。

Hacker News 最新 | 过去 | 评论 | 提问 | 展示 | 工作 | 提交 登录 坚持使用旧工具:一个头脑简单的 Clojure 程序员的 REPL 习惯 (evalapply.org) 6 分 adityaathalye 16 分钟前 | 隐藏 | 过去 | 收藏 | 讨论 加入我们 6 月 16-17 日在旧金山举办的 AI 初创公司学校! 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系我们 搜索:
相关文章
  • (评论) 2024-09-07
  • (评论) 2024-08-28
  • Clojure 1.12.0 现已推出 2024-09-07
  • (评论) 2024-05-23
  • 调试器即REPL,即调试器 2025-03-28

  • 原文

    Keeping it Old-Tool: REPL habits of a grug-brained Clojure programmer

    Is demo of Grug Clojure code vibe. He no catch onto cloud LLM magics for some reason. Still prefer program with only brain-muscles. Prefer use Grug language standard library and standard dev tools. Prefer make and use all byte on local disk. Maybe luddite, maybe obsolete. Grug no mind. Fine with how he code. Besides, Grug like muscles. Hope maybe you see tip, trick, tactic to steal. Take what can use, no take what no can use.



    Presented at the SciCloj visual-tools meeting no. 32 (more at clojureverse).

    Mine is a complete contrast to the one by m'friend, colleague, Clojure nerd, and all-round mensch, Kapil Reddy.

    • First, Kapil (begins at ~15m 50s): How he LLMs / MCPs with ClojureScript and Clojure.
    • Next, I (begins at ~46m 50s): Keeping it Old-Tool: REPL habits of a grug-brained Clojurist.

    nb. Somewhat biased toward JVM Clojure, which I use.

    • Build a core muscle memory of manipulating the live Clojure runtime that does not depend on any editor or third-party tool.
    • Lean on the Clojure standard library as much as possible, especially for namespaces, clojure.pprint, clojure.repl, clojure.reflect, clojure.datafy.
    • Prefer using the out-of-the-box deps and cli and build tools, even though they pose a more effortful learning curve than, say, Leiningen.
    • Compose a notebook on top of your workflow, like Clerk or Clay or Gorilla REPL, or Calva's Clojure Notebooks feature. Or my all-time ultimate favourite, org-mode with org-babel.
    • Port and use this dynamic workflow to other (not-Clojure) contexts, e.g. orchestrating multiple LLMs using structured prompting techniques. For more about that see what m'colleague Kapil is doing (same video), and listen to the discussion. That's above my pay grade.

    … which is just a plain old org-mode file that you will see being used to deliver the live-coded demo, which I've rendered into this blog post.

    whoami

    • walking paradox of mechanical sympathy
      • rapidly becoming obsolete
    • severely allergic to dependencies
    • half a slot of working memory
      • have to write to think
      • unable to LLM, smol brain no handle big context
    • "Writing for nerds" (on a hammock) >> "Vibe coding for nerds"

    whereami

    Polyglot notebook FTW (sales pitch for org-mode :)