:: krowemoh

Wednesday | 08 JAN 2025
Posts Links Other About Now

previous
next

Testing ChatGPT - 01

2025-01-03
ai, llm

I've recently bought 1 month of ChatGPT to help me develop a BASIC like language. I have read Crafting Interpreters and have a base to work off but I want to speed up the language development as the goal isn't the language so much as to do something with that language.

I also want to do it in rust which is a language that I'm not strong enough but have some familiarity with.

I think this would be a good test to see how good AI can be as a tutorial engine. I'm not convinced that this is going to pan out fully but hopefully I come away having learning something. The question is will I have learned about language development or about AI aided learning remains to be seen.

I'm treating chatgpt like a tutorial engine. I'm breaking things into pieces that I think make sense and then have chatgpt decide if its a good path forward. If it is then I first talk about the solution and some ideas for it before actually have it generate code.

I also don't take the code wholesale and use it, rather I try to understand the code and then rewrite it my own way. This usually means that the multiple files of chatgpt end up in one file. I also remove various things like error checking as I just want to see the logic for now.

The issue I can already see coming is that some of these libraries are still developing and so there will be some differences between what chatgpt knows and what I need to actually do. This requires me to double check the references every now and then. I also keep various tutorials open and cross check some things with what chatgpt gives me.

For example, for parsing using pest chatgpt gave me code that was highly nested. It didn't look quite right. I looked at various pest examples and found that they too are nested. Not quite to the same level but enough that I don't think chatgpt was wrong.

For now I have a basic parser and interpreter working that can handle a series of PRINT statements. The next step is to add assignments and expressions which I think will be more complex.

It's going to be interesting to see what comes of this.