[16:07:31] hoo: Related to statement tracking, I've added a regression test for pairs. I'll post the link below :) [16:07:44] Nice :) [16:07:47] https://github.com/hall1467/mediawiki-extensions-Wikibase/blob/master/client/tests/phpunit/includes/DataAccess/Scribunto/LuaWikibaseLibraryTests.lua [16:07:55] :D [16:09:17] hall1467: That test should be in LuaWikibaseEntityLibraryTests [16:09:42] also you should do more with the return values of pairs() [16:09:58] just counting is IMO not enough [16:11:20] Okay, I can move it to the other file. Any ideas as to what else to check? [16:13:23] You could check the actual pairs spit out [16:20:51] Okay, I'll do that, thanks. Additionally, there's a corner case I wanted to get your thoughts on: Should Lua module creators be able to create new indexes in a given entity table? As of now, I've implemented the tracking function assuming they can. However, using the "__newindex" metamethod, we could instead print an error message. [16:21:50] hall1467: Well, both is fine for me [16:22:12] we do full clones of the table anyway, so that people get a "clean" copy [16:24:11] Okay, we could also log those new indexes in a different way too. E.g. with a flag [16:36:32] hall1467: Do you think that's even worth it? I doubt it [16:45:22] hoo: I'm not sure. I would need to look at Lua modules and see if new indexes are ever created. I feel like it would be a quite rare case. [16:47:08] Yeah, probably never happens [16:47:30] if it reassures you, feel free to make it error out in these cases [16:47:44] technically a breaking change, but probably wont affect anyone [16:48:49] I agree. Thanks for the advice on that :) [16:49:39] hoo: Did the rendering of dates recently change? I'm getting stuff like "20. century", I thought we had "20th century" in the past [16:50:11] multichill: It shouldn't… but could be that someone changed the translation messages [16:50:14] what language? English? [16:50:18] yes [16:50:26] See https://www.wikidata.org/wiki/Q28659360 [16:50:36] Oh, and also 2. millennium [16:50:42] Very confusing [16:51:20] 8e96acaf (Marius Hoch 2014-06-03 23:55:19 +0200 82) "wikibase-time-precision-century": "$1. century", [16:52:27] I don't see anything that changed here [16:58:24] multichill: https://web.archive.org/web/20140911213604/http://www.wikidata.org/wiki/Q7017 https://web.archive.org/web/20160201131246/https://www.wikidata.org/wiki/Q7017 [16:58:37] See "point in time" there [19:03:26] <}ls{> is there any kind of url to a list of all P: and Q: defs? [19:04:01] }ls{: do you want to list all propositions and items ? [19:05:33] <}ls{> i want to read about these as i got no idea how wikidata really works. The completion at query.wikidata.org is not very helpful. So i think a list of these things would help me understandig better. [19:06:50] <}ls{> I'm quite new to RDF thingies. Having done a succesful query interactive at query.wikidata.org i was not able to get the resulting list with curl. [19:07:23] <}ls{> I got a huge amount of rdf entities with lots of empty whatevers. [19:07:50] <}ls{> And finding specific information with query.wikidata.org is hard too. [19:09:13] }ls{: you can use the autocompletion on https://www.wikidata.org/wiki/ ,and look at example items there [19:09:20] <}ls{> So i got two problems: How do i find appropriate Ps and Qs to information wanted and how to transfer this query with curl or urllib. [19:09:50] <}ls{> wait a second.... [19:11:25] <}ls{> https://query.wikidata.org/#SELECT%20%3FccLabel%20%20%3Fcc2Label%20%3Fcc3Label%20WHERE%20%7B%0A%20%20%3Fcc%20wdt%3AP31%20wd%3AQ6256.%0A%20%20%3Fcc%20wdt%3AP297%20%3Fcc2.%20%0A%20%20%3Fcc%20wdt%3AP298%20%3Fcc3.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D [19:12:01] <}ls{> If you want to have a look at this query, how do i add the topleveldomain codes for each entry? [19:12:42] <}ls{> And how does the query statement looks like if i want information of this list as json? [19:12:52] sure [19:12:57] <}ls{> This is a concrete example that might help me. [19:13:13] take one of the items in your results, for instance https://www.wikidata.org/wiki/Q794 [19:13:31] (to get that link, it helps to include "?cc" and not just "?ccLabel" in your SELECT statement) [19:14:09] scroll down to the place where the domain is indicated. The property links to https://www.wikidata.org/wiki/Property:P78, so P78 is the property you want. [19:14:34] you can also search right on query.wikidata.org [19:14:35] you can now add the statement "? [19:14:50] type wdt: , then start typing a property name or similar [19:14:53] then hit Ctrl+Space [19:15:01] and it will suggest properties [19:15:12] also works for items after wd: [19:15:47] yeah [19:16:09] <}ls{> that's what i try unsuccessful. But the hint to pick one thing of the list to get the needed P is helpful. Thanks for this. [19:16:43] anyway I came here to ask another question: where do I find the default graph of language fallbacks? [19:16:56] <}ls{> And finally, this says that i have to modify my select inserting some kind of "subquery"? [19:17:18] yeah, "?cc wdt:P78 ?tld" [19:17:25] just like the other statements [19:17:42] (and you want to add ?tld in your SELECT too) [19:17:43] pintoch: you mean [[File:MediaWiki fallback chains.svg]]? [19:17:44] 10[1] 04https://www.wikidata.org/wiki/File:MediaWiki_fallback_chains.svg [19:18:29] <}ls{> cool bots. [19:18:59] WikidataFacts: exactly, thanks a lot! actually, I need a machine-readable version, but that's what I had in mind [19:28:20] Whoa, that is an interesting graph [20:05:03] pintoch, also that image is almost 2 years old. -- From the docs, it looks like each of the fallbacks are stored in separate files, making it harder to get a complete list... https://www.mediawiki.org/wiki/Manual:Language#Fallback_languages - Possibly Nemo_bis can confirm if there's an uptodate centralized and/or machine-readable version somewhere? (Context: See the question 45 mins ago) [20:11:43] quiddity: yeah, I started writing a shell script to extract that from these PHP files, but it's a bit painful [20:12:35] there's this PHP script too: https://translatewiki.net/docs/Translate/html/fallbacks-graph_8php_source.html [20:12:47] but it seems harder to run [20:12:49] pintoch, you might try asking in #mediawiki-i18n and ping nikerabbit, but it's evening for him so there might not be a reply until later. [20:12:58] (he generated that image version) [20:14:11] thanks, I'll do that [20:39:13] Software-Items with most number of versions in Wikidata: http://tinyurl.com/jnjppsc [20:39:51] Q1778544 has 200 Versions – a long time to scroll… [20:40:06] * hoo rages [20:40:15] We use two instance of the entity meta data prefetcher [20:40:24] which makes stuff crappy slow [20:44:33] https://www.wikidata.org/w/index.php?title=Q18578786&curid=20111475&diff=442879828&oldid=349266327 <- any opinions on this? [20:45:35] 4 what? [20:47:55] My thought, was discussing this with Jheald at https://www.wikidata.org/wiki/User_talk:Jheald#Quantity_on_ART_UK_links . We need some more opinions [21:41:57] Good evening. I'm trying to fix a problem on the German Wikipedia, with an article which is incorrectly IW linked to a different subject. [21:42:14] I have explained it to the #wikipedia-de channel, they said I need to speak to you. [21:43:23] see http://de.wikipedia.org/wiki/Army_&_Air_Force_Exchange_Service - it's incorrectly linked to the Italian Article [[:it:Post Exchange]] [21:43:24] 10[2] 04https://www.wikidata.org/wiki/:it:Post_Exchange [21:44:24] SunilTheMongoose: that sitelink’s not on Wikidata – looks like someone put it on the dewiki article [21:44:36] AAFES only deals with USAF and US Army Installations. PX is the US Naval equivalent. [21:44:39] you should be able to just remove it from there (last line in the source code) [21:46:13] And it's gone. Thanks for that, itu in #wikipedia-de told me to ask here :) [21:46:23] I'm glad it's fixed anyway [21:46:31] yeah, sitelinks are usually on wikidata, but this one wasn’t :) [21:46:44] Site links used to be local didn't they? [21:46:51] yeah [21:47:17] German speakers: do these articles describe the same topic? [21:47:21] https://de.wikipedia.org/wiki/Cah%C3%ADz [21:47:25] https://de.wikipedia.org/wiki/Qafiz [21:48:05] abian: I don’t think so, one is a unit of volume and the other a unit of weihgt [21:48:07] *weight [21:48:19] Okay, thanks :) [21:48:28] yw :) [21:59:22] * Alphos sighs [21:59:42] abian: i let a notice on both disks, just be patient and look there [22:00:10] why don't wikipedians accept that wikidata pages must only have links to the corresponding entities ? :-( [22:00:46] DanielK_WMDE: https://gerrit.wikimedia.org/r/336264 [22:01:05] I found that after ages of digging on why dumping is so slow nowadays [22:03:10] I guess it was probably a mistake. [22:03:32] AAFES and PX do the same thing, but for different organizations. They're not the same organization though. [22:16:59] hoo: were the problems with progressing page moves and deletions? https://www.wikidata.org/wiki/Q23882972 [22:19:52] sjoerddebruin: Not known to me, but could be [22:19:56] my bot is broken :S [22:20:05] fuck [22:23:15] Nothing in the logs [22:23:27] Oh wait [22:23:38] "moved page Arjen Butter to Draft:Arjen Butter without leaving a redirect " [22:23:43] We don't handle these [22:23:55] We could unlink in that case, but we don't dare [22:23:58] my bot dares [22:25:02] I should fix it at some point *sigh* [22:30:42] oh [22:50:34] can anyone think of a way to optimize this query? https://hastebin.com/raw/lugovuvego [23:25:26] harej: I had a really stupid idea that apparently works amazingly well :D [23:25:35] (website currently stuck on timeout for original version, I’ll get back to you in a sec) [23:25:44] harej: http://tinyurl.com/gmxfdmv [23:26:10] that's... quite an undercount [23:26:13] oh? [23:26:16] dammit [23:26:29] the last number i was able to get was 26,330 [23:26:41] okay, then the trick is not fast but simply wrong [23:34:16] WikidataFacts: for what it's worth, getting rid of that top bit with the URLs results in the same value, so I don't think it's doing its job ;] [23:34:32] yeah, that’s just matching no value, and apparently BlazeGraph can determine that quickly :D [23:34:44] iow it’s obvious to BlazeGraph that my idea was stupid :D [23:34:58] I don’t have any better ideas though, unfortunately [23:35:46] harej: Is this running just slightly over 30s? [23:36:04] I guess? It worked before [23:36:17] If you want, I can run it bypassing the timeouts [23:36:31] Fancy. Try that and let me know how it goes. [23:40:11] meh, I'm missing the prefixes [23:40:20] wait, I think my idea isn’t quite dead [23:40:28] I get a count of 24235 for just the reference URLs [23:40:32] (without the two other UNION branches) [23:40:36] harej: does that sound plausible? [23:40:50] (22 s though, close to the limit) [23:41:37] WikidataFacts: that does plausible, but what is it with the other two things? (if you do join them together via union, make sure it selects distinct statements -- some statements may have more than 1 of the 3) [23:41:52] hm, with those, I got the exact same count [23:41:58] ah, nevermind, hang on [23:43:44] harej: http://tinyurl.com/ht3fkjg, count 26342, 22846 ms [23:44:06] thank you! [23:44:21] this first gets ALL reference URLs in a named subquery and then searches them with <=, <, which is presumably fast beceause the subquery result is sorted and then binary searched [23:44:34] meh, got the wrong server wdqs1001 is empty [23:45:02] this will probably run into the timeout again at some point as people add more statements/references… [23:45:05] 26342 [23:45:12] 37sec, 410ms [23:45:16] so just slightly over the time [23:45:18] on wdqs1002 [23:45:25] (the original query) [23:45:30] same count, good [23:46:54] WikidataFacts: I'm just happy that statements are being added that cite NIOSH because it's not me adding them, meaning our stuff is getting traction on Wikidata :D [23:47:11] yay \o/ [23:47:46] "• Wikidata has 26,342 statements attributed to NIOSH publications, including the Pocket Guide to Chemical Hazards and the Power Tools Database. A “statement” is Wikidata’s basic unit of information. This represents a month-over-month increase of 12." [23:50:03] Now, the vast majority of those are from me. But I haven't added anything recently! [23:50:08] harej: do you mind if I tweet that query (citing you as original author, of course)? I think it’s great [23:50:18] Go for it! Tag the @NIOSH Twitter [23:50:22] will do [23:55:36] James_F: always a delight to see you editing Wikipedia