Path: csiph.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.compilers Subject: LLVM-based compiler for toy Lisp in 8 hours with AI generation. Date: Tue, 18 Mar 2025 16:46:08 -0000 Organization: Compilers Central Sender: johnl%iecc.com Approved: comp.compilers@iecc.com Message-ID: <25-03-003@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="99394"; mail-complaints-to="abuse@iecc.com" Keywords: Lisp Posted-Date: 18 Mar 2025 22:59:57 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3638 This GitHub user "jensb1" claims he created this in 8 hours with AI, not having written a single line of code himself: https://github.com/jensb1/lisp_llvm This is jensb1's HackerNews post about it: https://news.ycombinator.com/item?id=43390521 JB> Hi, always wanted to create a toy lisp compiler in LLVM for some reason, JB> but never had the time to get it working. JB> Took a new stab at it with Claude 3.7. Got a working version up in less JB> than 8hrs in total with passing tests! Never wrote a single line of JB> code. I would estimate the number of cursor iterations to about 500. JB> JB> Process was: 1. Ask Claude to create a boiler plate JIT in LLVM (see JB> below shared chat) 2. Asked Claude on the architecture and what classes JB> should be created (did this in cursor): - lexer - parser - AST - Code JB> gen 3. Implemented each part separately, lexer, parser and AST took 1hr, JB> codegen took ~7hrs. JB> JB> It can define variables, functions and do some basic stuff: try: (defn JB> factorial [n] (if (= n 0) 1 (* n (factorial (- n 1))))) (factorial 5) JB> JB> Hope you like it! JB> JB> Here are some chats if you are interested in the first part of the JB> coding (the rest was done in cursor): JB> JB> LLVM - https://claude.ai/share/3c5a1f92-389f-4274-8348-dcceaee8f140 JB> JB> Lexer - https://claude.ai/share/fa32b8bd-0b8e-4faa-bc09-fc3dd9bb5ad3 -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca