Skip to content

Commit

Permalink
Use <details> in ai-thoughts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Dec 12, 2024
1 parent 5a0d381 commit e1b9bcd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions doc/ai-thoughts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<details><summary>Initial code (doesn't compile)</summary>
```python
import "stdlib/io.jou"
Expand Down Expand Up @@ -62,7 +65,9 @@ def main() -> int:
return 0
```
After quite a lot of back and forth, it produced the following code:
</details>
<details><summary>Fixed code</summary>
```python
import "stdlib/io.jou"
Expand Down Expand Up @@ -114,6 +119,8 @@ def main() -> int:
return 0
```
</details>
After this, I said to the LLM:
> The code compiles and runs!!!!
Expand Down

0 comments on commit e1b9bcd

Please sign in to comment.