Sharpee and Creating IF

Sharpee and Creating IF
Designed using Canva

I've written about this before, but thought I'd swing back around to it because it's becoming clear Sharpee will be much more than I planned.

I have been trying, like so many other programmers, to build a new or different platform since the 90's. This has always revolved around how Inform and the Z-Machine work since that was my primary experience.

In 2011, Textfyre released two commercial games using a new implementation of Glulx, but using a different I/O library. Glulx's default is glk. Text introduced FyreVM, which was based on Channel IO (which was just a list of key/value pairs). This system would emit output to these channels and then a client could create its own layout. We developed a Silverlight client, a web client, but also allowed the code to gracefully compile to glk. I built some Windows implementations and a client/server implementation called Zifmia. These were good lessons for how a functioning IF platform works.

Textfyre eventually shut its doors and I was more or less burned out on IF for many years. I was also recently divorced, crushed by the 2008 financial disaster, and raising five kids. There wasn't a lot on my mind except work and kids.

I chased a different startup during this time called Wizely, which had I just put out (the UX was complete and the code was mostly done), the data today would be worth millions to an AI company. But a Q&A context app seemed overwhelmed by Machine Learning at that time.

I had always wanted to build my own platform because I was frustrated with Inform and other tools. I could never get comfortable with Inform 7's nomenclature. Even the cook book didn't help. I would continually struggle to implement even simple things in I7. It seemed very foreign as a programming tool. I was also looking at the foundations of IF platforms and seeing that there might be other ways.

All of the major IF platforms rely on a virtual machine, which in today's world has no meaning. WebAssembly is mature, NodeJS is mature. Even C# is cross-platform. There's just no need to constrain IF to a virtual machine anymore. The other fundamental problem is that IF uses PRINT statements and concatenates output as a turn is executed. I don't think anyone has quantified how much effort and time this takes; to manage spacing, punctuation, and other types of concatenation scenarios.

I started hand-writing code several years ago in C#, since that's my go-to platform. I had thought to implement a bi-directional graph data store and got pretty far down that rat hole, before ChatGPT arrived. Then I got a little further down the road with ChatGPT, but at that time, no LLM had enough training data and there were no reasoning engines to act as a true coding partner.

I would start, stop, get angry, then stop. At that point I switched gears because I saw that the remainder of my technical career would require deep knowledge of GenAI and how it integrates into Fortune 1000 technical spaces. (I work in the business world). I pivoted from wanting to build an IF platform, to explicitly requiring that GenAI do most of the work. I would develop guardrails and "ways of working" that took the raw power of GenAI and corralled it into a usable system. For two years I was adamant that this was simply not possible with the existing models and tools. I stated this loudly on LinkedIn and for the most part my predictions have held.

Side Note: No, there will be no AGI or Skynet to take over the planet. It's really as simple as a vector database has end points. Those end points aren't aware of each other until a human points out a connection. There is no technology that would enable those end points to randomly find each other and discern new end points. There is no technology that mimics the synaptic nerves of a human brain. Asimov posited the Positronic Brain in his Robot novels, but that tech doesn't exist and no one knows how to make one.

Then things changed for GenAI. First of all, I switched to Anthropic Claude because they were ahead of OpenAI and also seemed more interested in developer support and tooling than other GenAI makers. I know this will get a laugh, but I also see Anthropic as the least evil out of all of the GenAI companies. Anthropic has never trained a model on images or video. Yes, they have trained on copyrighted text, but I'm mostly focused on programming, and would never use an LLM to write my stories for me (eww).

The copyright thing is going to figure itself out eventually. Is it fair use? Based on our current definition, it's subjective. I think money and power are going to decide where the fair use line is and it's likely to fall on the GenAI side. It might be extremely difficult to prove "material harm" where text is concerned. Images and video have very easy to prove material harm claims and I do want to see OpenAI and others pay for training on artist's works.

Anyway, Claude gradually improved and I was able to make strides in my IF platform project. I eventually realized Claude was a mid-level C# programmer and asked it to rank the top ten programming platforms in ABC categories where A was its strongest. C# landed in the B category. Python and Typescript were in the A category. I started doing experiments, converting my C# ideas into Typescript ideas. It became very clear that Claude was significantly better at Typescript. So I switched Sharpee from C# to Typescript (though now the name makes no sense).

RankLanguagePopularity ContextClaude's ExpertiseNotes
1PythonWeb development, data science, AI/ML, automationExtensive knowledge of syntax, libraries, frameworks, and best practices
2JavaScriptWeb development, Node.js, full-stack applicationsDeep understanding of ES6+, frameworks (React, Vue, Angular), and Node.js ecosystem
3JavaEnterprise applications, Android developmentStrong grasp of OOP, Spring framework, and enterprise patterns
4TypeScriptType-safe JavaScript developmentExcellent knowledge of type systems, interfaces, and modern TS features
5C#Microsoft ecosystem, game development (Unity)Very good understanding of .NET, LINQ, and modern C# features
6C++Systems programming, game engines, performance-critical applicationsGood knowledge of STL, memory management, and modern C++ standards
7GoCloud infrastructure, microservicesSolid understanding of concurrency patterns and standard library
8RustSystems programming, memory safetyGood fundamentals, ownership system, and safety concepts
9SwiftiOS/macOS developmentDecent knowledge of syntax and iOS development patterns
10PHPWeb development, content management systemsVery good understanding of modern PHP, frameworks like Laravel

Then Anthropic released their Desktop app with MCP file system capabilities. This was a practical leap forward, though context windows were still too small for a complex architecture.

Claude Desktop

Another Side Note: LLMs provide context windows, which is based on the number of tokens they can juggle when determining a response. It's not just the model, but also what Anthropic allows you to use based on your subscription. At $20/month, even with Opus 4.1, you're fairly limited in what you can prompt. At $100/month it improves quite a bit. At $200/month it dramatically improves.

I first upgraded to $100/month and then $200/month. At this point I reversed nearly every opinion and observation I have had about using GenAI for writing complex software. You still have to write unit and integration tests. You still need to plan and have checklists. You need architecture or structural tests to make sure the LLM isn't going off the rails (which it WILL do). You need log files for builds and test runs. You need work summaries between sessions. A lot of LLM management goes on if you expect to get results.

I also switched to Claude Code, which is a command line interface that also can connect to your file system (in a controlled manner).

So with the MAX subscription, file access, and Opus 4.1, and my guardrails, I have found a way to coerce Claude into being a senior developer with some occasional bad habits that need to be managed. This is no small thing.

Had you asked me at anytime before April of this year, I would have said my research into building complex software with GenAI was a fantasy.

Now I think it's about 80% there and new tooling and guidelines are appearing that will close that 20% gap. Maybe not all the way, but even human developers have flaws and have to be managed.

Now Sharpee. As I said, I was trying to do a hobby thing. Build an IF platform that implemented some of my ideas about modern software architecture. Then I was trying to use GenAI to do a hobby thing. I was highly skeptical I would ever succeed. Yes, it's not done yet and there are still some hurdles. But it's pretty close. I've had Cloak of Darkness running a few times, with parsing issues. As it should be, those parsing errors led to implementation flaws (not designed flaws) and I've been working through those for about a week.

I think Sharpee will be a very powerful tool. It will let parser-based IF authors to work significantly faster than ever before. It will integrate with other tools. It will be extensible. I only realized this recently because Claude told me so. (this is a joke, I designed Sharpee to be what it is and I believe in it).

I submitted a story for IFComp. If I can get Sharpee working in the next week, I think I can get the code for my story done fairly quickly (using Claude). The story itself has been written for years, so implementing the text and puzzles is trivial. If not, I will still get a story published before the end of the year. The likely output will be WebAssembly, which can run anywhere from one file.

I'm aware there is a portion of the IF community that is adamantly against any use of GenAI. I'm in agreement on most of the reasons (power requirements, unapproved use of copyrighted material, and Sam Altman). But I'm also a pragmatic technologist. The genie is out of the bottle and it has transformed the world. It's not going back in the bottle no matter who wins what lawsuit.

And if I can tell my IF stories by leveraging a machine to do the coding, I'm on board. My stories are still my stories. They are still coming from my imagination and my dreams. No LLM will have written a single word of my IF stories. In my mind, Claude is just a well-trained code generator.

Subscribe to My So Called Interactive Fiction Life

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe