Skip to content

Commit

Permalink
v3.9.0
Browse files Browse the repository at this point in the history
This release fixes all known instances of memory corruption and
subsequent crashes that seemingly snuck their way in with some of the
changes in the previous `v3.8.0` release.

Along with an update to dialect v2.0.0, `IRCEvent.aux` is now a static
array of strings, and `IRCEvent.counts` a static array of
`Nullable!long`s. `IRCEvent.count` and `IRCEvent.altcount` were
summarily removed. All current plugins have been updated accordingly,
largely by merely string-replacing `.aux` with `.aux[0]`, and `.count`
with `.counts[0].get`. One exception is command event handlers, who can
now access the command word in `.aux[$-1]`.

Messaging functions were refactored to take a `Property` bitfield flag
parameter, replacing up to four other `std.typecons.Flag` parameters.
They are also no longer templates.

When determining whether or not an event handler of a given plugin
should be called upon some incoming event type, the program used to
iterate through the handler's array of annotated accepted event types
and compare the elements one by one with the incoming event type, by use
of `std.algorithm.iteration.canFind`. If there was a match, the event
handler would be called. This meant that there would be a lot of
comparisons in the pathological case with many event handlers accepting
many event types. In fact, one of the biggest hotspots revealed by
profiling is (was) `std.algorithm.canFind`.

    if (eventHandlerUDA.acceptedEventTypes.canFind(event.type)) { /*...*/ }

Since the arrays of accepted types are known at compile-time, we now
generate a `bool[]` array per plugin that we simply index with the value
of the event type, since it's functionally an integer.

    if (eventHandlerUDA.acceptedEventTypeMap[event.type]) { /*...*/ }

The array iteration becomes a single array index operation.

* Plugins now need to import `kameloso.plugins` for mixin `ModuleRegistration`
* `bash.org` is back up, so the plugin stays
* The `TwitchPlugin.useAPIFeatures` setting was removed; API features
  are now permanently enabled and will more aggressively retry on failures
* Now (seems to) compile with `-dip1000`, but isn't configured in
  `dub.sdl` to do so yet
* Polls now support vote choices with spaces in them
* Various fixes and improvements
  • Loading branch information
zorael committed Feb 22, 2023
1 parent cfa0608 commit d9d6af3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kameloso [![Linux/macOS/Windows](https://img.shields.io/github/actions/workflow/status/zorael/kameloso/d.yml?branch=master)](https://github.com/zorael/kameloso/actions?query=workflow%3AD) [![Linux](https://img.shields.io/circleci/project/github/zorael/kameloso/master.svg?logo=circleci&style=flat&maxAge=3600)](https://circleci.com/gh/zorael/kameloso) [![Windows](https://img.shields.io/appveyor/ci/zorael/kameloso/master.svg?logo=appveyor&style=flat&maxAge=3600)](https://ci.appveyor.com/project/zorael/kameloso) [![Commits since last release](https://img.shields.io/github/commits-since/zorael/kameloso/v3.8.0.svg?logo=github&style=flat&maxAge=3600)](https://github.com/zorael/kameloso/compare/v3.8.0...master)
# kameloso [![Linux/macOS/Windows](https://img.shields.io/github/actions/workflow/status/zorael/kameloso/d.yml?branch=master)](https://github.com/zorael/kameloso/actions?query=workflow%3AD) [![Linux](https://img.shields.io/circleci/project/github/zorael/kameloso/master.svg?logo=circleci&style=flat&maxAge=3600)](https://circleci.com/gh/zorael/kameloso) [![Windows](https://img.shields.io/appveyor/ci/zorael/kameloso/master.svg?logo=appveyor&style=flat&maxAge=3600)](https://ci.appveyor.com/project/zorael/kameloso) [![Commits since last release](https://img.shields.io/github/commits-since/zorael/kameloso/v3.9.0.svg?logo=github&style=flat&maxAge=3600)](https://github.com/zorael/kameloso/compare/v3.9.0...master)

**kameloso** is an IRC bot with [Twitch support](#twitch).

Expand Down
2 changes: 1 addition & 1 deletion source/kameloso/semver.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module kameloso.semver;
enum KamelosoSemVer
{
majorVersion = 3, /// SemVer major version of the program.
minorVersion = 8, /// SemVer minor version of the program.
minorVersion = 9, /// SemVer minor version of the program.
patchVersion = 0, /// SemVer patch version of the program.
}

Expand Down

0 comments on commit d9d6af3

Please sign in to comment.