Developing a go bot embedding ichiban Prolog.
Ichiban Prolog is a #golang implementation of an ISO compatible Prolog. To learn how to embed it, I decided to add Prolog support to Hellabot, a simple irc bot.
Hellabot design requires to program its triggers using a two step process as described in the code below:
type Trigger struct { // Returns true if this trigger applies to the passed in message Condition func(*Bot, *Message) bool // The action to perform if Condition is true // return true if the message was ‘consumed’ Action func(*Bot, *Message) bool }
Read in full here:
This thread was posted by one of our members via one of our news source trackers.