From e1b9bcdeab02e2f4c88383dde49a3f540bf9edba Mon Sep 17 00:00:00 2001 From: Akuli Date: Thu, 12 Dec 2024 03:27:05 +0200 Subject: [PATCH] Use
in ai-thoughts.md --- doc/ai-thoughts.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/ai-thoughts.md b/doc/ai-thoughts.md index a3464e56..eeaba48c 100644 --- a/doc/ai-thoughts.md +++ b/doc/ai-thoughts.md @@ -17,8 +17,11 @@ Here's my first message to the LLM: > > Using Jou, write a function that swaps the content of two chunks of memory. Call it `memswap()` and add a comment explaining what it does. -The LLM gave me the following code, which contains several errors. +The LLM gave me the following code, which contains several syntax errors. This is what most LLMs do when you ask them to generate Jou code. +After quite a lot of back and forth, all errors were fixed and the code worked. + +
Initial code (doesn't compile) ```python import "stdlib/io.jou" @@ -62,7 +65,9 @@ def main() -> int: return 0 ``` -After quite a lot of back and forth, it produced the following code: +
+ +
Fixed code ```python import "stdlib/io.jou" @@ -114,6 +119,8 @@ def main() -> int: return 0 ``` +
+ After this, I said to the LLM: > The code compiles and runs!!!!