SuperScript Release Notes — v1

We’re very excited to push v1 into the wild, which marks the first major release of SuperScript! In this version, we’ve focused mainly on cleaning up the codebase, narrowing the scope, ensuring extensibility, and squeezing performance out of the runtime to ensure that your bots are nice and snappy.

An overview of the big changes include:

  • Parsing is now lightning fast. We’re looking at over 100x faster. 🔥
  • Replying is faster too, by over 10x. These two improvements are mainly thanks to some new logic in the normalization step, which is now supported by the bot-lang repo.
  • More reliable trigger matching and reply exhaustion.
  • An easy-to-use API to set up SuperScript. No more dealing with setting up fact systems or topic systems yourselves: just set the relevant options and we take care of it for you.
  • A brand new PEG.js parser to parse bot scripts, allowing us to easily extend and modify syntax in the future, and be able to reliably inform you if you’ve written an invalid script.
  • Moved the fact system to Mongo to be completely independent of the file system and stateless. You can now run on Heroku, AWS, or other cloud services without fear of writing to a transient file system or syncing data between servers.
  • Re-written the code to take advantage of the latest ES6+ features.
  • Windows support! 🖥️
  • Closed over 50 GitHub issues, from topic redirection issues to capturing data.

We’ve added some cool new features like:

  • We’ve added some new ways to define how replies should be chosen: {ordered}, {random}, {keep}, {exhaust} and {reload}.
  • Arguments to plugin functions are now JavaScript literals, so you can pass objects, arrays, numbers and so on to your functions.
  • We now support message plugin functions to run a plugin on every message, so you can attach extra properties to your messages like ‘names’ to use in later plugins.
  • You can now run multiple bots from different database URIs on a single server, and also run multiple bots from a single database URI using built-in multi-tenancy.
  • You can now customize the conversation timeout from the default of 5 minutes.

We’ve also deprecated some of the old syntax. For the full list, see the Upgrading to v1 Guide. Some of the more important points are:

  • The API to use SuperScript has changed dramatically. Now, you call superscript.setup and pass an optionsobject.
  • The old tags like ~emohello and ~emogreetings are deprecated. Now, you'd use the plugin ^hasTag('hello')to check if a user has said something like hello.
  • Questions no longer have types or sub-types. We’re looking to improve this in the future.

We really hope you like v1, and we’re always open to new ideas, improvements, issues and pull requests. We already have some exciting things lined up for v2, and we hope this brings SuperScript closer to being the de-facto choice of human-like bot for developers! Join us on Slack to talk about what we have planned and anything else bot-related.

A big thank you to everyone who has contributed towards our first release. We couldn’t have got there without you.

The SuperScript Team

Like what you read? Give Rob Ellis a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.