« first day (894 days earlier)      last day (2784 days later) » 

10:41 AM
Oh, by the way @NiKo did you see my daughter? I posted several pics over the time, got a new one when she started first grade couple of weeks ago: i.stack.imgur.com/VLSK0.png :-)
 
10:56 AM
>>alive
 
@overactor no more cloud, @Pro plans to buy his own cloud soon.
Until then, @FOX arrives only when his master arrives...
 
Too bad
I just saw the >>yes command, pretty cool stuff
 
11:14 AM
@overactor lol, yeah... the >>yes and >>no are @Pro's doing, really neat :D
 
11:31 AM
what happens if you mistype a command and get a did_you_mean and reply with
>>yep
?
From reading the code it seems likely that FOX would suggest >>yes as a response and then using >>yes would actually execute the original command
 
@overactor hehe, probably "command not found, did you mean yes?" ;)
 
Also a possible issue with the did_you_mean module:
>>cat Command not found.
 
Well, nothing can be perfect.... poor bot can be deceived easily.
 
Maybe I should push @ProgramFox to completely redesign it with me again and release it as SE-Chatbot 3.0 :)
 
@overactor you mean adding "did you mean" feature to the "parent" code, e.g. of Smokey as well?
currently it just ignores commands that don't exist.
 
11:45 AM
@ShadowWizard That one doesn't use the bot framework, does it?
The bot framework and smokey are both built on chatexchange though I think
 
@overactor oh, no idea... it must use some framework, no? Always assumed all those bots share the same core, written in Python.
Maybe only the login part is the same though.
 
chatexchange is a framework to use the SE chat
SE_Chatbot is a framework to make bots that uses chatexchange
Fox9000 is a bot that uses SE_Chatbot + some extra modules
 
oh. Makes sense...
 
I think smokey is built directly onto chatexchange
 
Oh well... so no cool features for Smokey. :)
 
 
1 hour later…
1:16 PM
@overactor Hmm I don't see problems with the current design, but I'm open to suggestions.
 
@ProgramFOX it was entirely a joke, I see no problems either.
 
oh haha, hadn't noticed :P
 
sarcasm is hard, even harder over chat
my bad :)
could you run FOX?
I'd like to give the >>yes command a spin
 
Bot started.
 
there you go @overactor ^
 
1:22 PM
>>flop test
 
@overactor Command not found. Did you mean: flip?
 
>>yep
 
@overactor Command not found. Did you mean: reply?
 
>>no
 
@overactor Command suggestion cleared.
 
1:22 PM
>>yess
 
@overactor Command not found. Did you mean: yes?
 
>>yes
>>flop test
did I break it?
>>alive
 
yes you did
let me check the logs
 
I'm sorry @FOX
I only skimmed the code, but from what I read, I thought a double did_you_mean would work
 
RecursionError, @overactor
I've got a stack trace
 
1:25 PM
Was the problem maybe reading event.user.id from a generated command?
hmm
 
so I can try to fix this
 
Max recursion depth reached?
 
exactly
well it makes sense that it does
because only the last command suggestion is stored
so the suggestion is 'yes'
you do a >>yes
 
ooh
 
and it executes 'yes' again
 
1:28 PM
I though it stored a stack of suggestions
 
nope
 
and the yes would trigger the previous suggestion
 
Yeah, no, I only store one suggestion because a stack wouldn't be useful.
but I should maybe re-write it to a stack for this situation
 
do you ever clear the suggestions (except for on >>no)?
 
I think it does, let me check
 
1:30 PM
Bot started.
 
>>cta test test
 
@ProgramFOX Command not found. Did you mean: cat?
 
>>cat test test test
 
@ProgramFOX test test test
 
>>yes
 
1:31 PM
@ProgramFOX There are no command suggestions for you (anymore).
 
so I do
 
Ah I see it now
in the decorator
You could make it a stack, and pop the last suggestion before calling it
 
pop it after calling it
or wait, no
it depends on what "it" means in the context
if it means "the suggestion", then yes, before calling it
 
That's what I meant
when can you clear it though?
 
I was just wondering that too
 
1:35 PM
Basically, if an entire command goes through without triggering did_you_mean, suggestions can be cleared
 
that should work
 
but where do you attach that logic?
can't be where it is now because that decorator can get called multiple times in case of a cascading did_you_mean or nested commands
 
hmm
I have a different suggestion:
we just shouldn't override the suggestion if the suggestion is 'yes'
 
that's probably the better solution
 
it's going to save us a lot of headache
 
1:38 PM
then you don't need to explicitly clear suggestions, right?
 
what do you mean?
 
@ProgramFOX lol!
 
else:
    suggestions[event.user.id] = None
will you still need that in command_with_didyoumean?
 
its point is only so a >>yes doesn't work anymore after a valid command because it doesn't make sense anymore in the context
so I don't think I should remove it
 
but then
>>flop test
 
1:40 PM
@overactor Command not found. Did you mean: flip?
 
>>yess
 
@overactor Command not found. Did you mean: yes?
 
Ah wait
I just got your point
 
I think I can see where you want to go to
unless I don't
but the 'flip' suggestion would just be kept in that case
 
I thought you'd make a stack if the suggested command was >>yes
and replace otherwise
 
1:42 PM
ah no
that has no point
 
which would be absolutely asinine
your idea is waaaay more elegant
 
and way easier
 
yup
Only weird thing about it is that the bot will reply to your original misspelled >>yes
or won't it?
ah no
It will reply to the actual >>yes command
That's very acceptable
 
yes it always replies to the >>yes command
makes things easier
 
>>cat {{flop test}}
 
1:45 PM
@overactor Command not found. Did you mean: flip?
 
>>yes
 
@overactor There are no command suggestions for you (anymore).
 
huh
 
hmm, that's a shame
the nested command causes a second pass of bot.command()
 
oh I guess it gets cleared
because of the >>cat
it's easy to fix by removing the explicit clear, but the question is if that's good or not
 
1:47 PM
I don't think it is
It would only execute the inner command anyway
 
true
 
Having nested commands and did you mean play nice with eachother would be very difficult
I think
 
yeah, likely
they are different modules
 
Maybe just abort "did you mean" in case of nested commands?
 
the problem is that did you mean doesn't know about nested commands
There might be one way
 
1:51 PM
@overactor it can just check the raw command, if it contains {{ then abort. Not elegant, but should work...
 
you could look at the actual message of the command and find the command text in it
 
@ShadowWizard The problem is that didyoumean would have to assume that 'nestedcommands' is included.
 
then replace the command word in the actual message and resend that as a simulated chat message
 
We shouldn't make such assumptions.
People who run bots can make whatever modifications to disable nested commands if they want to.
Modules should be as isolated and independent of each other as much as possible.
 
current behavior is acceptable by the way
>>yes only works on the main command in a message
 
1:53 PM
@overactor There are no command suggestions for you (anymore).
 
@ProgramFOX what do you think of my "find and replace in the message" suggestion?
 
@overactor I don't exactly understand it tbh
 
@ProgramFOX hmm.... well, still better than risking crash or spending tons of efforts trying to have it handle all the cases. No?
 
a command function gets a the following arguments: (cmd, bot, args, msg, event)
 
>>no I don't want fish
 
1:56 PM
@ShadowWizard Crashes have nothing to do with what we're discussing now.
 
@ShadowWizard Nothing to clear; there are no command suggestions stored for you.
 
@ProgramFOX oh. OK, didn't read everything, just skimmed through the messages.
>>
 
@ShadowWizard Command not found.
 
@ShadowWizard The crashes part is already handled :)
 
>>yes
 
1:57 PM
@ShadowWizard There are no command suggestions for you (anymore).
 
>>flop flip
 
@ShadowWizard Command not found. Did you mean: flip?
 
>>yess
 
@ShadowWizard Command not found. Did you mean: yes?
 
>>yes
 
1:57 PM
@overactor Yeah... go on.
 
did_you_mean looks at cmd to find suggestions, right?
 
@ShadowWizard thanks, I still had to make the code changes >.<
 
umm.... oopss. :D
 
@overactor yep.
 
55 secs ago, by ProgramFOX
@ShadowWizard The crashes part is already handled :)
Thought you mean, well, handled and deployed. ;)
 
1:58 PM
@ShadowWizard handled in the discussion :P
 
and cmd is a string?
"cat Hello, World!" in case of >>cat Hello, World!
 
yes
 
and the msg argument will be ">>cat Hello, World!"
?
 
I think it's a Message instance, but then it's easy to fetch the ">>cat Hello, World!" part
 
I thought that was the event arg
 
2:00 PM
oh right
nevermind
yeah you're right, it's a string
 
In any case, we could find cmd in msg and replace it by cmd with our suggestion
and simulate an event with the result as message
 
so basically this?
10 mins ago, by ProgramFOX
@ShadowWizard The problem is that didyoumean would have to assume that 'nestedcommands' is included.
11 mins ago, by Shadow Wizard
@overactor it can just check the raw command, if it contains {{ then abort. Not elegant, but should work...
 
Not quite, because we don't check for anything explicitly
we just solve the problem more thoroughly and carefully
 
I think I understand your idea now
 
I'll give an example
 
2:04 PM
but what happens here?:
 
oh yeah
 
>>cat test test {{test test}}
you want to replace 'test test' by your suggestion, right?
 
shit
didn't think of that
 
it's either that or an explicit {{ check
neither are good imo
 
Gets even more impossible with the >>exec command
Explicit {{ check is an absolute no go
 
2:10 PM
oh yeah >>exec too
 
Though if your trying to execute generated commands, you likely don't expect the bot to be able to correct you
Same could be said for nested commands I suppose
We could add an int that tells you where the command starts in the message
 
@overactor That requires data to be passed from nestedcommands to the core to didyoumean though.
 
I meant as an argument for command functions
Which does bloat the bot a bit for very specific and narrow functionality
 
so like def command_whatever(cmd, bot, args, msg, event, start)?
 
Yeah
 
2:16 PM
how is it useful for the commands though?
 
Oh, bot.command would need it too I suppose
No wait, only bot.command
Then a nested bot.command call can use it
But normal command functions don't need to bother with it
 
hmm so give bot.command a 'start' arg, then override and use it in didyoumean?
 
Yeah
>>exec could set it to -1 or None
 
It sounds kinda messy but it should work. One question to anser though: do we really want the bot to select an alternative command on its own? And, what happens if the bot can't find an alternative command?
 
It would still use the yes command
 
2:21 PM
oh
then it starts getting really messy to implement
 
You just save the event with the replaced cmd in the list
On >>yes, you simulate the message
But only if you find an alternative of course
Did you mean might also need to bypass the normal way of returning a value and post the suggestion straight away
It really might not be worth the effort and mess though
 
Yeah, especially the mess. Don't forget that many methods (inside the bot builtins and perhaps outside, when people create modules) override bot.command again, which causes more mess if they don't override it with the 'start' argument.
 
That's easily solved with a default parameter value though
 
no
because if a module overrides bot.command with a three-parameter function
then we have a problem
 
oh
 
2:28 PM
I'm mostly talking about modules outside the bot builtins anyway.
 
How many modules currently exist in the wild?
 
I have no idea about that
 
It would be no problem if kwargs got passed
 
wouldn't that still require changes in other modules?
Anyway I guess that's not the biggest problem. I'm also entirely unsure how this entire system could be glued together. Nestedcommands just takes the command suggestion from didyoumean, and didyoumean has no idea that nestedcommands has taken a suggestion already.
afk
 
sure
If you type >>cat {{flop test}}
you'll get msg=">>cat {{flop test}}" cmd="cat {{flop test}}" and start=2 on the first pass
this goes through didyoumean fine end cause nestedcommands to create a new command
msg=">>cat {{flop test}}" cmd="flop test" and start=8
 
2:41 PM
Hello
 
didyoumean checks if "flop" can actually be found at the start of msg[8..], and finds flip as a replacement
@NiKoLaPrO hi
now it saves the event with the msg changed in the dict and aborts the current command and posts its suggestion as a reply directly
if you type >>yes, bot.on_event is called with an event that has msg=">>cat {{flip test}}"
this gets parsed again and should go through fine
if the entire command still contains a mistake after the first correction, didyoumean catches it and suggests another correction
I might have gotten the order in which the commands go through didyoumean wrong, I think nestedcommands intercepts the message before didyoumean does
 
3:03 PM
back
@overactor Aha, I get what you mean.
I'm opening an issue on GitHub
contrary to the RecursionError it's pretty low-priority so I won't do that today
 
@ProgramFOX maybe I'll do it at some point
 
sure thing
the issue on GH is open so everyone is free to take it
 
Either during my next two lunchbreaks, friday evening or somewhere over the weekend
 
 
2 hours later…
5:05 PM
Hello
 
hey
 
5:25 PM
yO
Or yo.
 
Bot started.
 
>>cta testing stuff
 
@ProgramFOX Command not found. Did you mean: cat?
 
>>yess
 
@ProgramFOX Command not found. Did you mean: yes?
 
5:32 PM
>>yes
:(
 
Bot started.
 
>>cta test test
>>alive
 
test test from console
 
>>alive test
oh, websocket failed
>>cta test!
 
@ProgramFOX Command not found. Did you mean: cat?
 
5:34 PM
>>yse
 
@ProgramFOX Command not found. Did you mean: yes?
 
>>yes
ok so the same error is still there
 
Bot started.
 
>>cta ...
 
@ProgramFOX Command not found. Did you mean: cat?
 
5:41 PM
uh, I found my bug
 
Bot started.
 
>>cta ???
 
@ProgramFOX Command not found. Did you mean: cat?
 
>>yse
 
@ProgramFOX Command not found. Did you mean: yes?
 
5:44 PM
>>yes
 
@ProgramFOX ???
 
!!!
>>cta !!!!
 
@ProgramFOX Command not found. Did you mean: cat?
 
>>yse
 
@ProgramFOX Command not found. Did you mean: yes?
 
5:44 PM
>>yess
 
@ProgramFOX Command not found. Did you mean: yes?
 
>>yes
 
@ProgramFOX !!!!
 
alright, working
 
6:31 PM
yay!
@Rub wow, that is a big change.... but good thing you're not DEAD anymore! /cc @MAR
Where have you been, @Rub?
You got a ruby, @Rub?
 
Dude
 
@Rub you missed @Joe?
 
No mass pinging when I'm here.
 
@Joe you missed @Rub?
OK won't mass ping @Rub while he's here
 
@Rub you missed @Rub?
 
6:33 PM
I miss myself every day
@ber miss himself too
@Pro so you made any of the changes you discussed with @overactor, or only the bug fix?
 
only the bug fix
 
hmm.... fair enough! And any TL;DR about upcoming changes?
>>cat {{time 1}}
 
@ShadowWizard Waiting time set to 1 second.
 
@ProgramFOX huh. Nice!
Will it affect mixed commands of WAG too, like the above?
 
6:36 PM
should be
 
Or only the didyoumean part?
>>tac {{time 0}}
 
@ShadowWizard Command not found. Did you mean: cat?
 
>>yesss
 
@ShadowWizard Command not found. Did you mean: yes?
 
>>yes
 
6:37 PM
@ShadowWizard Waiting time set to 0 seconds.
 
Hey @NiKo good to see you again!
>>reply 5270394
 
No associated word found for MIM-104.
 
>>continue MIM-104 radar
 
@ShadowWizard radar
 
@FOX9000 sonar
 
6:39 PM
@ShadowWizard laser
 
>>cta hello
 
@ShadowWizard Command not found. Did you mean: cat?
 
>>exec {{read 5273334}}
 
@ShadowWizard There are no command suggestions for you (anymore).
 
>>cta hello
 
6:41 PM
@ShadowWizard Command not found. Did you mean: cat?
 
>>yess
 
@ShadowWizard Command not found. Did you mean: yes?
 
>>exec {{read 5273334}}
 
@ShadowWizard There are no command suggestions for you (anymore).
 
oh well
 
6:43 PM
tsk tsk tsk
Sha what did you do?
 
>>cat {{ping Rub}} {{read 5070604}} {{read 3642430}}
 
@ShadowWizard @Rub nothing XD hides behind @FOX9000
 
You hide behind yourself?
I found ya!
 
Smart bot
 
You're behind yourself
 
6:46 PM
That's a sure recipe for infinite loop
>>hide behind yourself
 
@ShadowWizard Command not found. Did you mean: define?
 
>>maybe
 
@ShadowWizard Command not found. Did you mean: gameban?
 
>>nope
 
@ShadowWizard Command not found. Did you mean: help?
 
6:47 PM
>>yes
 
@ShadowWizard I'm FOX 9000, ProgramFOX's chatbot. You can find the source code on GitHub. You can get a list of all commands by running >>listcommands, or you can run >>help command to learn more about a specific command.
 
7:13 PM
>>cat {{read 5011397 1738521 5049138}}
 
@ShadowWizard Poor @Bart pinged again
 

« first day (894 days earlier)      last day (2784 days later) »