« first day (1601 days earlier)      last day (2202 days later) » 

11:02 PM
Anyone want to point me where the !!/report calls actually are parsed into the respective bits that're passed into the report() command call?
it's changed since I fussed with chat message parsing ;)
 
!!/report is a monadic ("1 argument") command. so it's passed "<url 1> <url 2> ..." and splits that separately
 
@quartata ahhhh, I think I see it there, I'm going to spin TCOM and call a bogus report command that'll break right after the report function is called to make sure that's what is seen, at least so I can make sure it's what I think it is. And to see what a " in there ends up as :P
so there'll be a single post that will never make it to smokey (yay HARDCRASH TIME!)
 
> An interesting thing to note about how the arity works is that normally the functions are assumed to be separated by spaces. If the maximum arity is greater than 1, it will split them by spaces (1 2 3 -> [1, 2, 3]) and take those as the arguments. If the maximum arity is 1 or less, however, it will take everything after the command to be one big argument (!!/cmd 1 2 3 -> cmd("1 2 3")). Most varity (as many arguments as you like) commands such as !!/report are actually 1-arity commands that then parse the URLs themselves.
 
so then with respect to !!/report, then, it passes everything as "1 2 3 4 5 6 7 8 9 10..." as a straight string?
 
mmhmm
 
11:06 PM
just want to make sure before I start fussing with things :p
cool, then I can just replace 'urls' with 'args' and then populate 'reports' like my proposed implementations would do. Assuming, of course, these changes are a desired command.
 
that's as opposed to something like this:
@command(int, int)
def add(x, y):
    return str(x + y)
 
right.
 
since that's dyadic at minimum it splits it and puts in x, y separately
 
OK, that makes sense, and reduces the 'tuples' approach to just parsing URLs and then finally a singular reason out, and when passing the reason in, "reason" is taken into account in constructing why_reason.
yay for less complexity :P
 
11:08 PM
eww that's evil. Yeah, I'll just parse inside the report function :p
 
well that's what it's doing behind the scenes is what I meant
 
still loading up TCOM to get a local test. I wonder if it doesn't like my computer's runtime, but if it'll like a 'clean' environment...
yep
 
you're the max_arity == 1 case
so it passes in args directly
 
indeed. I'm still wanting to see what the actual things are in a report. TCOM won't even send it to MS, it hardfails right before, because I am EVIL that way. (yay for local trees!)
 
yeah I don't actually know what the URLs look like tbh
I think they have the https:// in front of them
 
11:12 PM
yay for pythonic forcekill?
 
...actually
I don't think they have the protocol
 
@quartata true, but the URLs are split out during the function call
 
since I think the href is gone, it's just the link text
 
i'm more curious if it's a pure string or not.
 
oh yeah it is
 
11:12 PM
and how it sees quotes
because that's the second part of it
if it's pure " chars then yay, if not then I have to mess with stuff in the logic I already wrote
stupid python3 taking too much time to install pip
once I get this thing set up I'll spin TCOM up and bogusreport. Then failover Solar Flare again
!!/location
 
@ThomasWard teward/Solar Flare
 
so yay for "BREAK IT!" and then restoring the good versions :P
 
Anything exciting happen?
 
hence the "dev on prod" tag
 
Thomas is breaking stuff
 
11:14 PM
@GrantGarrison no but we're going to have a MS Failover Test Case shortly to see whether MS explodes :P
laughs evilly as darkness descends
 
That sounds well... evil
 
... i forgot how many recursive dependencies we have for Smokey... o.O
@quartata stupid question, but I thought we had tldas a end-user level requirement, not a system-wide tld requirement, hence the user_requirements.txt file
why's tld in the main reqs too?
 
...it shouldn't be?
 
it is
last line of requirements.txt in master and deploy
as well as the only user_requirements.txt req.
 
11:17 PM
right but
 
you're right it should not be there
 
@ArtOfCode ^ why? We had all agreed that tld is a user-level requirement hence the user_requirements.txt item.
 
it causes weird permissions problems
 
if you have a reason i'll be glad to hear it
otherwise when I make a branch to implement custom reports, I'll include the fix in there
and then laugh even more evilly
 
@quartata !!/blame
!!/blame
 
11:19 PM
@GrantGarrison It's Makyen's fault.
@GrantGarrison It's Byte Commander's fault.
 
!!/standby teward/Solar Flare
 
teward/Solar Flare is switching to standby (@quartata)
Restart: API quota is 19999.
 
that's because TCOM is up :P
!!/location
 
@ThomasWard The Call of Midnight
 
Smokey is broken!
!!/blame
 
11:20 PM
@GrantGarrison It's McNets's fault.
 
...?
 
@GrantGarrison no, it was restarting.
 
@ThomasWard I hit an error while trying to run that command; run !!/errorlogs for details.
 
yes I know you did
I forced you to >:D
and you are dead now.
 
press f to pay respects
 
11:21 PM
Solar Flare will be coming up shortly.
OK so it looks like it passed as a direct string.
now to test this again with a couple args. BECAUSE I AM WEIRD THAT WAY >:D
 
teward/Solar Flare received failover signal. (@quartata)
 
!!/unnotify-all
 
@quartata I will no longer ping you if I report a post anywhere.
 
thank
 
Restart: API quota is 9221.
 
11:22 PM
fun fact: this is how the message showed xD
 
@ThomasWard It is broken. It shouldn't have selected McNets. Instead, it should have said someone who spoke more recently.
 
@GrantGarrison want to know a secret?
TCOM is a fresh instance, that might just be because it had no 'who spoke' data
MSG: '<chatexchange.messages.Message object at 0x7f5fac0b5b00>'
URLS: 'https://askubuntu.com/questions/956457/how-do-i-set-up-an-ubuntu-server-to-be-th‌​e-router-for-two-private-networks-on-my'
 
@ThomasWard we don't do that anymore
 
@ThomasWard That's counter intuitive.
 
@quartata then we discovered a bug :)
 
11:22 PM
I pick a random user in the room, regardless of activity
 
TCOM is coming back up though I need a multiurl test.
 
Restart: API quota is 19988.
 
!!/standby teward
 
(TCOM doesn't have my name in it lol)
 
11:23 PM
nice trick
 
!!/location
 
@ThomasWard The Call of Midnight
 
also technically if it committed any evil you'd have plausible deniability
 
@ThomasWard I hit an error while trying to run that command; run !!/errorlogs for details.
teward/Lunar Eclipse received failover signal. (@quartata)
 
11:24 PM
makes you think
!!/unnotify-all
 
@quartata I will no longer ping you if I report a post anywhere.
 
lol Lunar came up xD
 
@command(whole_msg=True)
def blame(msg):
    unlucky_victim = msg._client.get_user(random.choice(msg.room.get_current_user_ids()))

    return "It's [{}](chat.{}/users/{})'s fault.".format(unlucky_victim.name,
                                                                 msg._client.host,
                                                                 unlucky_victim.id)
 
Restart: API quota is 19999.
 
salts and burns TCOM because 'yay'
!!/location
 
11:25 PM
@ThomasWard teward/Lunar Eclipse
 
before it used to keep track of users chatting which I assumed predated get_current_user_ids
(probably did)
 
probably.
 
teward/Solar Flare received failover signal.
 
waits for Solar to failover again
 
so this is slightly different behavior in that regard since Smokey had to see them talk before
 
11:25 PM
!!/standby teward/Lunar Eclipse
 
teward/Lunar Eclipse is switching to standby
Restart: API quota is 9208.
 
eesh maybe I should've let Lunar take over for a while o.O
 
but I wasn't going to bother keeping it either way since it would require storing per-room data and I try to cut down on that because it makes for some very ugly code
 
when does quota reset again?
 
@ThomasWard soon
 
11:26 PM
URLS: 'https://askubuntu.com/questions/956457/how-do-i-set-up-an-ubuntu-server-to-be-th‌​e-router-for-two-private-networks-on-my askubuntu.com/questions/34978/…‌​t-exist-suggest-installation "The Darkness Comes"'
yay, so it does only take a string.
my logic should work as-is, then, and it came in as a pure quotation mark too :D
 
you know what you could do
 
@Undo disregard any exploded Hair On Fire notes
 
have it take [(<url>, <reason>), ...] and use ast.literal_eval
 
was messing with the dev instance TCOM for the massive
@quartata true, I could, but we'd have to change the arity parameters then. And we still have to parse out quotes
 
nah man
I mean that it would literally be like
!!/report [("https://codegolf.stackexchange.com/questions/155018/the-programming-language-‌​quiz-mark-ii-cops/155556#155556", "bad answer")]
sd poof
 
11:28 PM
laughs
 
@ThomasWard 31 minutes 18 seconds
 
I mean
it's not exactly good UX
but it would be easy and that's what counts right
 
@quartata true, that's an option, but TBH it's easier to accept url url url "Reason goes here" and split/parse in report(...) in the Python
 
sure, just have to handle the spaces in the reason names
 
@quartata if you review the logic I wrote, it does it in two phases
splits out the reason from the URLs list
then processes the URLs string into individual URLs, and loops over the URLs to issue the MS report calls
 
11:30 PM
but what if there are quotes in the reason name :P
that seems like something tripleee would do tbh
 
@quartata then it would fail to process either way, because it's not the accepted format that was proposed.
and we should then go find tripleee and hit them with a big stick
so before I go and write this logic into its own branch for consideration, we probably need to come up with an acceptable format for how we pass in a reason or not - the logic I wrote was based on the proposed new formats provided in the pull req
oops?
we could use url url url | reason for all I care, it just needs to be a uniform, decided-upon format that we can easily .split on.
so short of me hand-writing a customized 'split' mechanism to handle stupid cases where there's quotes that need to be included in the reason (why would someone use " quotes anyways...), we need to just decide on the final format to use for the command with the optional reason.
regardless there'd be a test to determine if the split args passed in with the specific string is greater than two, and if it is return a failure code, or attempt to concatenate splitargs[1:] with the 'split' character as the 'reason' variable. Which would work even if there's only one object in the 'set' that we're using in the .join call.
 
@Catija Cannot find data for this post in the API. It may have already been deleted.
 
11:56 PM
hrm
@quartata want to take a look at the failing test(s) in my code commit and see what I'm missing?
maybe it doesn't like the new syntax... or wait maybe I botched it
oops my bad i fixed it
forgot urls is now a list, so we can't split it. We can however take the list of URLs and make a set of URLs to rule out dupes :D
 
yeah there you go
 
@Andy I have a question for you: how do we handle manual reports already?
@Andy the answer is we have a static string passed in for 'Manually reported by 'reporter' in 'room name'.'
 
we actually have some pretty decent unit tests for !!/report
feel free to add to them
 
@quartata check GH
i.e. "Wait...are we having these reasons as official MS reasons or just using
them to give to Smokey to provide context when it reposts the link
elsewhere?" which is what Andy just posted to GH as an email reply
 
that goes in the why
 
11:59 PM
@quartata right, but the question is whether that's relayed back in the chat message to rooms
and I don't believe it is
 
oh, yeah no it's not
 

« first day (1601 days earlier)      last day (2202 days later) »