Subscribe to messages with pattern matching
Lasse Ebert

Perhaps you can simplify the problem and avoid runtime evaluation of ASTs. Instead of publishing a “pattern AST” to the Hub, you can probably call a macro in the subscriber which:

  • Triggers Hub.subscribe
  • Triggers receive, matching against the pattern you want.

In other words, you would send messages to all subscribers and they would decide whether they want it or not.

Here’s some example code:

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.