learn2 fails due to missing columns
learn2 fails to insert the data, as it's missing the RE, mood and chance columns.
Also, I'm not sure where those columns are actually used. I can't see anywhere.
Actually, the only problem is the RE column, as it's the only NOT NULL of those 3. I've fixed this in the DB by setting RE's default to 0. It has no effect though in the script, so I believe references to it should be removed.
Yeah, should have a default value for that column, and either start making use of it or just remove it all together.
What was RE's intended use?
For that matter, what were the intended uses of mood and chance?
Back in the day, this was the thinking:
RE - a flag that indicates that the trigger for the factoid wasn't a string, but is a regular expression, and should be handled differently. Never really found a good way to make that scale, so never implemented that. Mood - the ability to mark factoids as 'happier' 'sadder', etc - then allow bucket to have a general mood that would affect which factoids are more likely to come up. Chance - allow weighing different factoids more than others, instead of all being equally likely. This one is probably the easiest to implement, but still was never done.
RE sounds like a really useful flag, actually. I get people asking me to add new commands like "!hug foo" and "!poke bar", and if factoids could use REs (maybe even including captures) that would be possible without writing plugins (for either Bucket or willie; I use both—and yes, it gets confusing). I suspect that if RE is ever implemented, enabling that flag for a factoid would be restricted to ops.
Chance sounds like the next-most-useful to me, but I have yet to come up with a real-world use case for it based on actual usage.
Mood could be interesting, but that'd be a complex system to figure out what Bucket's mood should be at any given time. (More complex than I can imagine right now, at least.)
I realize now that I essentially necroposted on a 4+-year-old thread, so if this discussion is best moved to a new issue I'm happy to do that.
I'd suggest opening new issues for the ones you want to implement. I think this particular issue is obsolete?
On Thu Feb 05 2015 at 12:15:05 PM dgw [email protected] wrote:
RE sounds like a really useful flag, actually. I get people asking me to add new commands like "!hug foo" and "!poke bar", and if factoids could use REs (maybe even including captures) that would be possible without writing plugins (for either Bucket or willie; I use both—and yes, it gets confusing). I suspect that if RE is ever implemented, enabling that flag for a factoid would be restricted to ops.
Chance sounds like the next-most-useful to me, but I have yet to come up with a real-world use case for it based on actual usage.
Mood could be interesting, but that'd be a complex system to figure out what Bucket's mood should be at any given time. (More complex than I can imagine right now, at least.)
I realize now that I essentially necroposted on a 4+-year-old thread, so if this discussion is best moved to a new issue I'm happy to do that.
— Reply to this email directly or view it on GitHub https://github.com/zigdon/xkcd-Bucket/issues/4#issuecomment-73118262.