[factoid] Ambiguity with $arg setting/replying

Bug #567547 reported by Siggi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Confirmed
Wishlist
Unassigned

Bug Description

22:46 <&Siggi> tibid: banana $arg is <reply>$who: Yay banana $1
22:46 < tibid> Siggi: One learns a new thing every day
22:46 <&Siggi> tibid: banana $arg is also <reply>$who: Boo banana $1
22:46 < tibid> Siggi: Yay banana $arg is also <reply>Siggi: Boo banana $1

The third line should set a new response, instead the bot responds using the already defined response.

Revision history for this message
Stefano Rivera (stefanor) wrote :

I can't see an easy solution to this.

Changed in ibid:
importance: Undecided → Wishlist
milestone: none → 0.2.0
status: New → Confirmed
Revision history for this message
Max Rabkin (max-rabkin) wrote :

It seems to me the solution is to make factoid-setting have higher priority (i.e. lower PRIORITY) than factoid-getting, but that may have unintended consequences.

Revision history for this message
Stefano Rivera (stefanor) wrote : Re: [Bug 567547] Re: [factoid] Ambiguity with $arg setting/replying

> but that may have unintended consequences.

It does. We've oscillated on that a few times. (But before the days when
we filed bugs before picking our noses)

In general, I think it makes more sense for factoid setting to happen
after getting. We don't want to set factoids when people ask quesitons
that the bot can't answer.

Revision history for this message
Max Rabkin (max-rabkin) wrote :

One way out is to allow (require?) an explicit command for factoid setting:

set factoid foo is arg

Requiring this has the nice side-effect of eliminating accidental factoids, but is a big change.

Revision history for this message
Max Rabkin (max-rabkin) wrote :

Or we can give higher priority to =verbs=.

Revision history for this message
Das Auge (0815jo) wrote :

Or we say, arguments can not begin with "$".

That would result in:

test $arg is foo $1.
ibid: I'll remember that
test is also bar
ibid: test is test is foo is also bar
test $arg is also bar
ibid: I'll remember that
test /bar/
ibid: test is bar

Revision history for this message
Das Auge (0815jo) wrote :

Sorry, I sent the comment before finishing my explanation:

I think the vantages of this solution are:
- You can set more than one factoids with argument
- No unwanted setting of factoids
- No rule you have to learn
- Intuitive

Disadvantage: The following example does not work anymore:
pay $arg is <action> Pays to $who the amount of$1.
ibid: I'll remember that
pay $10.-
Possible resolution: do not check for $, but for $arg. So the rules for factoids with argument would be:
1. If the argument begins with $arg, its a setting
2. If not, its a getting.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.