<MichaelRaskin>
infinisil: whatever you implement, someone (like me) comes and breaks the assumptions
<infinisil>
Will only look at the rfcs part and link to the NixOS users repo
<infinisil>
I thought it would make sense to only support NixOS/* PRs :)
<MichaelRaskin>
After the fact it is clear
<gchristensen>
MichaelRaskin is excellent at ruining my assumptions
<gchristensen>
a curse and a blessing
<gchristensen>
thank you so much for helping make my software resilient and of higher quality, MichaelRaskin , you are very frustrating sometimes :P
<MichaelRaskin>
Well, there is always an option to ignore my weird fantasies, especially if you prefer to read issues later!
<gchristensen>
=)
<MichaelRaskin>
But yeah, it is said that programming is inherently frustrating because compilers love to tell programmers something is wrong; and I am worse than a compiler…
<infinisil>
And, to show off the last couple features:
<infinisil>
,
<{^_^}>
All commands: -A ask cloudfront foo hi hithere let-where libraries library m notfound pills send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whichchannel x xx
<infinisil>
Through the magic of string similarity
<MichaelRaskin>
,a = aaa
<{^_^}>
a defined
<MichaelRaskin>
,b = ,a
<{^_^}>
b defined
<MichaelRaskin>
,b
<{^_^}>
,a
<gchristensen>
,aa = c
<{^_^}>
aa defined
<gchristensen>
,aaa
<infinisil>
There ain't no command references
<infinisil>
And the similarity thing is limited to >3 char words :P
<gchristensen>
:D
<infinisil>
It currently works by calculating the levenshtein distance, and it's a potential match if the result is <= 3
<MichaelRaskin>
I didn't expect the bot itself to do expansion, but I wondered if it sees its own output as input
<infinisil>
I should really divide that result by the string length though or something like that
<MichaelRaskin>
Wait
<MichaelRaskin>
,qwer = qwerty
<{^_^}>
qwer defined
<MichaelRaskin>
,asdr
<{^_^}>
MichaelRaskin: Did you mean ask?
<{^_^}>
Don't ask if anyone uses software xyz, just ask your specific question. This helps solve your problem quicker, and allows people who haven't used xyz but may still be able to help you to do so.
<MichaelRaskin>
,zxcr
<{^_^}>
MichaelRaskin: Did you mean qwer?
<{^_^}>
qwerty
<infinisil>
Hah
<MichaelRaskin>
,aplm
<{^_^}>
MichaelRaskin: Did you mean ask?
<{^_^}>
Don't ask if anyone uses software xyz, just ask your specific question. This helps solve your problem quicker, and allows people who haven't used xyz but may still be able to help you to do so.
<MichaelRaskin>
,apl
<infinisil>
Damn you
<gchristensen>
LOL
<infinisil>
Immersion ruined
<gchristensen>
infinisil: note that just because MichaelRaskin finds the edge cases doesn't mean you are obligated to fix them
<gchristensen>
it is okay to have algorithmic edge cases that don't perform optimally :D
<MichaelRaskin>
That's true
<infinisil>
That is a pretty big flaw though
<gchristensen>
what?
<gchristensen>
how?
<infinisil>
,xxx = xxx
<{^_^}>
xxx defined
<infinisil>
,yyy = yyy
<{^_^}>
yyy defined
<infinisil>
(testing something)
<infinisil>
,yyx
<MichaelRaskin>
,xxyy
<{^_^}>
MichaelRaskin: Did you mean xxx?
<{^_^}>
xxx
<MichaelRaskin>
,yyxx
<{^_^}>
MichaelRaskin: Did you mean xxx?
<{^_^}>
xxx
<infinisil>
Huh
<infinisil>
,yyx
<infinisil>
Why does that not work :/
<MichaelRaskin>
User input must be >3
<infinisil>
Oh it's below 3 haha
<MichaelRaskin>
But all commands work
<infinisil>
Beaten at my own rules
<MichaelRaskin>
,xe = xxee
<{^_^}>
xe defined
<MichaelRaskin>
, xert
<{^_^}>
MichaelRaskin: Did you mean qwer?
<{^_^}>
qwerty
<MichaelRaskin>
,xepoi
<infinisil>
My idea with this rule of comparison is that you can make 3 "typos" in a long word
<infinisil>
,whatisupmydawghowareyou = foo
<{^_^}>
whatisupmydawghowareyou defined
<infinisil>
,whatisupmydoghowareyou
<{^_^}>
infinisil: Did you mean whatisupmydawghowareyou?
<{^_^}>
foo
<infinisil>
Eh that's fine for the first (it's actually the second) iteration
<MichaelRaskin>
Maybe 20% typos would work less crazy
<infinisil>
Hmm..
<MichaelRaskin>
The problem is that libraries/library has a lot of difference, but it is not really about typos
<infinisil>
True that
<MichaelRaskin>
If you are OK with needing both to be defined, you can maybe try 10% + 1 typo
<infinisil>
,
<{^_^}>
All commands: -A a aa ask b cloudfront foo hi hithere let-where libraries library m notfound pills qwer send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whatisupmydawghowareyou whichchannel x xe xx xxx yyy
<gchristensen>
I was going to report it as a bug :P
<MichaelRaskin>
Can a finite number of bots like that be enough to create a Turing-complete system, I wonder…
<infinisil>
Oh
<MichaelRaskin>
,m ,m
<{^_^}>
,m: Well done!
<infinisil>
I guess it could be abused because the database (it's just a text file lol) is shared for all channels
<MichaelRaskin>
,m: ,m
<gchristensen>
otherwise I can learn the secret and replace all the things with profanities and keep it secret
<MichaelRaskin>
As opposed to connecting with a new nick from a fresh VM and doing the horrible deed in a low-traffic channel?
<gchristensen>
sure
<gchristensen>
harder :)
<infinisil>
The bot only handles #nixos #bottest and #nixos-borg currently
<MichaelRaskin>
Is #bottest logged?
<infinisil>
Online somewhere? probably. Whether my bot logs? Yeah, but only a random bunch of debug messages.
<MichaelRaskin>
I wonder if an unalterable command to load the default definitions of some standard stuff is a good idea… (without wiping whatever unrelated commands have been added)
<MichaelRaskin>
,qwe: = qweqwe
<{^_^}>
qwe: defined
<MichaelRaskin>
,qwe:
<{^_^}>
qweqwe
<infinisil>
I'm thinking about logging all definitions including who set them, and being able to block a user, which will undo all those users declarations. Maybe also block on a definition, so e.g. block the one who defined `pills = f**k you`
<gchristensen>
please do
<infinisil>
Sounds like a good idea
<MichaelRaskin>
Yeah, a good way to learn a lot about Unicode
<infinisil>
How so?
<MichaelRaskin>
Well, sooner or later someone will declare it a challenge to put something visually similar to a blocked word into the definition and be only banned manually
<MichaelRaskin>
And Unicode is… interesting
<infinisil>
Ah, I just mean to block that person, not the definition
<gchristensen>
manually I assume, not by magic, which is where the unicode problems would be
<gchristensen>
but anyway
<gchristensen>
do consider the spam problems, if all else fail I can disable your bot during a problem
<infinisil>
Yeah
<infinisil>
,
<{^_^}>
All commands: -A a aa ask b cloudfront foo hi hithere let-where libraries library m notfound pills qwe: qwer send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whatisupmydawghowareyou whichchannel x xe xx xxx yyy
<infinisil>
I'm currently compiling it with stack2nix (instead of stack directly), so that i can push it to my server via nixops
<infinisil>
This sure does take rather long.. It's been an hour or so
<infinisil>
,delete-all-commands = Deleted all commands
<{^_^}>
delete-all-commands defined
<infinisil>
,delete-all-commands
<{^_^}>
Deleted all commands
<MichaelRaskin>
,
<{^_^}>
All commands: -A a aa ask b cloudfront delete-all-commands foo hi hithere https://nixos.org/ let-where libraries library m notfound pills qwe: qwer send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whatisupmydawghowareyou whichchannel x xe xx xxx yyy
<infinisil>
Immersion ruined
<gchristensen>
haha , oh well
<gchristensen>
, oh well
<infinisil>
,oh = well
<{^_^}>
oh defined
<infinisil>
,oh
<MichaelRaskin>
, = Ouch
<{^_^}>
well
<{^_^}>
defined
<MichaelRaskin>
,
<{^_^}>
Ouch
<gchristensen>
,
<{^_^}>
All commands: -A a aa ask b cloudfront delete-all-commands foo hi hithere https://nixos.org/ let-where libraries library m notfound oh pills qwe: qwer send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whatisupmydawghowareyou whichchannel x xe xx xxx yyy
<MichaelRaskin>
,
<gchristensen>
, = fooo
<MichaelRaskin>
,
<{^_^}>
MichaelRaskin: Did you mean ?
<{^_^}>
Ouch
<gchristensen>
LOL
<infinisil>
,quer =
<{^_^}>
quer undefined
<infinisil>
,yyy =
<{^_^}>
yyy undefined
<MichaelRaskin>
,, = asdf
<{^_^}>
, defined
<MichaelRaskin>
,, =
<{^_^}>
, undefined
<MichaelRaskin>
,, =
<{^_^}>
, undefined
<infinisil>
Heh
<gchristensen>
,, = ))<>((
<MichaelRaskin>
,let-where
<{^_^}>
, defined
<{^_^}>
let args = { a = 42; }; a = 23; in with args; a == 23 (!)
<MichaelRaskin>
,,
<{^_^}>
))<>((
<MichaelRaskin>
,jowijreoiejroifejr wej = 123
<gchristensen>
,,let-whre
<{^_^}>
gchristensen: Did you mean let-where?
<{^_^}>
let args = { a = 42; }; a = 23; in with args; a == 23 (!)
<gchristensen>
,, let-where
<{^_^}>
let-where: ))<>((
<MichaelRaskin>
Also,tofu
<infinisil>
what
<MichaelRaskin>
Experimenting with things that could also be separators
<infinisil>
oh
<infinisil>
,, let-where
<{^_^}>
let-where: ))<>((
<infinisil>
that's confusing
<gchristensen>
wait
<gchristensen>
yeah, what?
<MichaelRaskin>
It's ,,
<MichaelRaskin>
But with a mention
<infinisil>
it tells the user let-where the command ,
<gchristensen>
lOL
<infinisil>
,
<{^_^}>
All commands: , -A a aa ask b cloudfront delete-all-commands foo hi hithere https://nixos.org/ let-where libraries library m notfound oh pills qwe: qwer send-help sendhelp stateVersion stuck thisisaverylongword tofu unfree whatisupmydawghowareyou whichchannel x xe xx xxx
<infinisil>
,,
<{^_^}>
))<>((
<MichaelRaskin>
,, ,a = b
<{^_^}>
,a = b: ))<>((
<infinisil>
,x=3 = x defined
<{^_^}>
x=3 defined
<infinisil>
,y=5 = y defined
<{^_^}>
y=5 defined
<infinisil>
,x+y = 8
<{^_^}>
x+y defined
<infinisil>
,x=3
<{^_^}>
x defined
<infinisil>
,y=5
<{^_^}>
y defined
<infinisil>
,x+y
<{^_^}>
8
<infinisil>
\o/
<gchristensen>
O.o
<infinisil>
It can do arithmetic, you just need to hardcode the results