Still relevant, but for how much longer?
November 27, 2024
It's becoming a bit of a recurring joke (and legitimate existential crisis) at dinner with tech-friends that AI is getting so good, so fast, that what started as "yeah this is a cute toy that is sometimes not completely wrong" is now honestly doing large portions of our work for us.
A few days ago Valve released a new feature for Counter Strike that really piqued my interest. With a few console commands you can create "map guides". They get saved as a KeyValues3 file that you can distribute for others to use. Of course this got me thinking that it could be interesting to make a site to host these files, and possibly do some minor editing/tweaking of them in-browser.
My initial assumption was that there would be an existing KeyValues3 parser available in JS/TS but it seems like there isn't. Or at least not one that's even partially alive. Never having written a parser before I figured it'd be a good chance for me to try out the full power of Cursor. I've been using it for a few weeks and been really impressed by the autocomplete, but haven't given the "composer" a real go.
With an initial prompt 1:
We're going to create a TypeScript library and accompanying tests for parsing Valve Software's @KeyValues3 1 data format. The library should take in a string of KeyValues3 text and return a parsed TypeScript object for example.
const data = Parse<Example>(inputString);
Here are some example code bases in other languages, @kv3-node @kv3parser @key_vallues3 (Elixir)
There are some example files that we can use to create tests from located in the @fixtures directory.
It generated a remarkable amount of code that mostly parsed a file. It's at this point where things start to get a little complicated to know what sort of skill set is required to "draw the rest of the fucking owl". With a few nudges and minor manual code changes I got the project to a really good state, in very little time. But I can't get a handle on if that's because I've been writing code a long time so I was able to do the hand holding, or would someone with say a few weeks of understanding the required lingo be able to do it?
If the "zero" state of a project is now not an empty text file but a bunch of sort of working stuff. What skills are required to get to v12? What now defines a ~good~ software developer?
-
Values prefixed with
@
are links, either to docs, github code or local files. ↩︎ ↩︎ -
My version of the library is here: n1c/keyvalues3. Next steps uncertain. ↩︎