[00:19:03] brion: conterfactual editing would be a nice feature [00:19:21] (counterfactual, even) [00:20:03] :D [00:27:51] // Make paths absolute, relative to the JSON file [00:27:51] return array_map( function ( $file ) use ( $dir ) { [00:27:51] return "$dir/$file"; [00:27:51] }, $info ); [00:28:43] it is faster to use a loop, the function call overhead will be the dominant use of time here [00:29:16] just mentioning in IRC because it was not introduced in the change I'm merging [00:30:44] TimStarling: ok, I can fix that in a follow-up [00:31:02] I think there might be a few other places I've used array_map like that [00:31:32] it's OK if the loop body will take a long time, but for a single string operation on a large array, it's questionable [00:33:58] * brion read that as "loop buddy" [00:34:28] he keeps your loop increments safe by hanging out across every iteration :) [00:40:21] legoktm: could be a phpcs thing? :P [00:40:28] T182645 [00:40:29] T182645: Avoid using array_map in ExtensionRegistry and ExtensionProcessor for simple operations - https://phabricator.wikimedia.org/T182645 [00:40:46] Reedy: inlinable array_maps? possibly [00:41:03] at least that specific example where it's just doing stuff with strings... [00:42:33] I wonder if its possible to statically measure/guess the performance of functions [00:43:39] one way to do it is using mutable iteration [00:43:54] foreach ( $info as &$path ) { [00:43:59] $path = "$dir/$path"; [00:43:59] } [00:45:09] it's probably optimal for performance since there's no hashtable lookup [02:16:32] Remind me why it is that by default IP blocks also prevent logged-in actions? I get that IP blocks should prevent all actions on that IP (especially creating an account). But logging in with an existing account and editing seems fine. Specifically, I'm on a VPN because of connectivity issues but appararently cannot edit becuase said VPN is globally blocked as an open proxy. [02:17:03] I'm aware of the block-exempt feature, but I'm wondering if there is a more general thing we can do here, or whether maybe I'm forgetting why it is this way.. [02:18:15] to a first approximation, I think it's safe to say that "nobody" is going to edit over a blocked proxy because of this. The cryptographic usefuless of our block messages and finding your way to some human-operated request board to get a special status is a desparate last resort that no casual user is going to succeed through. [05:19:32] Krinkle: otherwise you could stash up on throwaway accounts and avoid block forever [05:20:35] also, the default is to block account creation but not logged-in actions [16:54:35] CindyCicaleseWMF: FYI, I just replied to your email related to the meeting you have in 5 minutes. [16:55:26] Thank you, anomie! [19:39:23] anomie: re: GlobalBlocking issue, I think the part that I'm missing is why does the blocker need to be a user that exists now? Is there code that depends/expects it? [19:42:26] legoktm: The actor table change will depend on it in the future, because trying to insert rows with actor_name='Example', actor_user=12345 and actor_name='Example', actor_user=0 will result in a unique key violation. If you see the code review on https://gerrit.wikimedia.org/r/#/c/380669/2/includes/user/User.php@4395, trying to turn an existing actor_user=0 row to actor_user=12345 on registration of the name was declined in favor of just [19:42:26] preventing such rows in the first place. [19:44:17] Hence the interwiki username thing, for imports and global blocks. I missed that GlobalBlocking inserts by name, I guess because the "gb_by" field name looks too much like "ipb_by" that is an ID rather than a name. [19:47:48] i wish phpunit was multithreaded [19:49:09] brion: https://github.com/sebastianbergmann/phpunit/issues/879#issuecomment-15816926 :/ [19:49:25] yup [19:49:41] could rig something up i guess around phpunit [19:50:37] in the meantime... "tests are running!" version of https://xkcd.com/303/ ;) [19:51:28] ... Looks like his approach is a wrapper that does "phpunit $file" for every test file, then presumably merges the results somehow. [19:52:10] brion: I wonder how well https://github.com/verkkokauppacom/parallel-phpunit works. [19:52:52] 5 years out of date says it probably needs some work ;) [19:58:35] anomie: ok, I'm leaning to the "Prefix user names (either all or just those that don't exist locally) with some configured prefix, using the recently created "interwiki username" style like "meta>Example"." suggestion [19:59:03] use CentralIdLookup to verify the user on meta is the same as the local wiki, and treat it as a local user, else fallback to an interwiki username [19:59:21] legoktm: Works for me. [20:27:39] Could someone have a look at https://gerrit.wikimedia.org/r/#/c/388342/ please? That's a first-time patch contributor without any real review (comments just were "recheck" to make at least CI run) for more than a month. [20:42:01] anomie: https://gerrit.wikimedia.org/r/397909 how does that look? I haven't tested it yet, I need to set up GlobalBlocking still [20:42:06] eddiegp: merged [20:54:41] anomie: tested and I think it works properly...I added non-existent users/wikis to the database and no fatals [20:56:00] legoktm: Ok, let's go for it. [20:58:13] legoktm: Thanks :) [20:58:47] :D x2 [21:00:02] no_justification: https://gerrit.wikimedia.org/r/#/q/Ia3c85fced974a4edabc172bd3ef6a7a255ffa462 for the GlobalBlocking issue