I’ve added a snippet feature to the Borogove online IF editor. It lets people share small parser IF projects with links or with the code and an interpreter embedded to a web page.
Here on the forums it can be used for example when asking about a coding problem to demonstrate the issue, or when answering to include a demo of how the solution works. You can also publish code that doesn’t compile. If you include a snippet with a question, it’s easy for anyone to quickly check what it does, edit it and post the edited version.
Here’s an example of an embedded Inform 6 project (more examples at the bottom of the post):
The available languages are Inform 6 and 7, Hugo, Dialog and Vorple for I6/I7. The standard libraries are included by default and Inform 7 projects can use any extensions in the Public Library.
There’s a limit of 12,000 characters and you can’t edit or delete a snippet after publishing it. If you need to make changes you can edit the code and then publish it again as a new snippet.
Here’s how to use it:
- Go to snippets.borogove.app
- Choose a system
- Write the code
- Click on “share” in the top menu
- Copy-paste the HTML code that it shows to embed the snippet in a post. Clicking on “Direct address” gives a normal link without embedding.
In the embedded view the Play button compiles and runs the code in an interpreter, Edit opens a full editor in a new tab, and Copy copies the code to the clipboard.
This is in preparation for a full publishing feature later that would let you publish complete games with a full set of publishing options.