Jump to content

Wikifunctions:Project chat

From Wikifunctions
Shortcuts:
WF:CHAT,
WF:PC,
WF:VP

Welcome to the Project chat, a place to discuss any and all aspects of Wikifunctions: the project itself, policy and proposals, individual data items, technical issues, etc.

Other places to find help:

SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 1 day and sections whose most recent comment is older than 30 days.
Archive
Archives

Draft policy for language fallback strategies

Help:Language fallback
I'd appreciate any comments, but I'm particularly seeking approval for this planned mass edit:

YoshiRulz (talk) 15:42, 30 August 2026 (UTC)Reply

I am happy that see that you want to structure the language fallback strategies. I can't oversee the consequences, but I trust you in this plan. HenkvD (talk) 11:46, 30 August 2026 (UTC)Reply
At first read, the policy looks great (even if a person speaking fr-CA will probably be angry with that example, despite being largely true). I also approve the planned mass edit so far, it's good to test that. Thanks for the work! Ornithorynque liminaire (she/they) (talk) 16:20, 30 August 2026 (UTC)Reply
It would also be very great to have a schema and more examples so the policy could be more understandable for newcomers. Ornithorynque liminaire (she/they) (talk) 16:22, 30 August 2026 (UTC)Reply
can you show me I'm new here and I am confused about what is happening here? How do we use this website 🤔 Ssubmarine (talk) 14:45, 22 September 2026 (UTC)Reply
Welcome! The pages WF:FAQ and WF:NOT explain what this site is, and WF:Introduction explains how to use it. I'd be happy to answer any further questions you have, just click Add topic on this page or my talk page. YoshiRulz (talk) 03:49, 23 September 2026 (UTC)Reply
None for the Syntactic tables is a good idea, I think that one will go from experimental right to deprecated anyway. I am not sure yet about the Semantic fragment functions, and would like to see the effect once we have a few more. --Denny (talk) 11:48, 3 September 2026 (UTC)Reply
Can you provide some examples of things that will change? --99of9 (talk) 04:52, 11 September 2026 (UTC)Reply
'None' → 'Limited': display Gregorian calendar date (Z20780) will use the Dutch implementation when Afrikaans is requested, instead of the ISO 8601 fallback.
'None' → 'Insistent': main articles (Z36083) will use the English implementation when German is requested, instead of the fallback that's just an arrow.
Improvements are very much dependent on how the fallback language lists are configured. And the Z14294s themselves—yesterday I went through and replaced hardcoded [ en, en-GB ] with English variants (Z33034), but in a world where I hadn't, the 'Limited' strategy would be helpful in routing the dialects to en. YoshiRulz (talk) 17:13, 11 September 2026 (UTC)Reply
I'm a bit conflicted here (and I've flipped around in the past too, so don't expect consistency sorry!). In the main articles example, I feel like the default is better than displaying English for German. Main articles doesn't really need words. Certainly En-dialects should get English, but as you say, we have other ways of ensuring that. I don't know enough about Afrikaans to comment on that one. --99of9 (talk) 03:58, 17 September 2026 (UTC)Reply

i can create my own function?

i need enable my implementation for my function Z38065 Spider077 (talk) 05:40, 6 September 2026 (UTC)Reply

Please request connections at Wikifunctions:Requests for connection and disconnection.
I do not think this particular implementation should be connected.
  1. The function has no test cases, so its intended purpose is not entirely clear.
  2. The function appears to be a duplicate of string identity (Z11602).
  3. The implementation will return an error because Text is undefined.
  4. In any event, print() returns the value None, so the implementation would end up returning void (Z24).
Please feel free to reply here if you need any help. GrounderUK (talk) 10:24, 6 September 2026 (UTC)Reply
I fixed Spider077 (talk) 14:30, 29 September 2026 (UTC)Reply

Help for optimizing functions

I developed infobox for smartphone, composition (Z41075), but in many cases, Reached rate limit in evaluator (Z571) or Reached time limit in orchestrator (Z574) occurs. I understand that this function is trying to do a lot, but I am trying to find a way to make it lighter. Any advice would be appreciated. 鈴音雨 (talk) 06:47, 8 September 2026 (UTC)Reply

I made a few changes, of which I think making all the fetch calls identical would have the most impact. YoshiRulz (talk) 17:55, 8 September 2026 (UTC)Reply

Incorrect number formatting with uselang on Main Page

{{formatnum:{{NUMBEROFFUNCTIONS}}}} on Wikifunctions:Main_Page (or to be precise, on Template:Main page) evaluates using PAGELANGUAGE (en) by default, not USERLANGUAGE. Setting Polish as the interface language and/or appending ?uselang=pl leaves English digit grouping (5,634, not Polish grouping: 5634). Is there a way to fix this? Because right now in Polish, technically speaking, it says there are "5.634 functions" (five and six hundred thirty-four thousandths), since a comma is used as a decimal separator in Polish. Wcalenieja (talk) 19:45, 9 September 2026 (UTC)Reply

This problem has been repeatedly raised on the talk page and ignored every time. YoshiRulz (talk) 21:32, 9 September 2026 (UTC)Reply
Oh, yeah, you're right :/ Wcalenieja (talk) 22:32, 9 September 2026 (UTC)Reply
Will admin rights help with this? Or where should the change be? I take it we can't use an embedded call: 5634?--99of9 (talk) 00:44, 10 September 2026 (UTC)Reply
Yep, admin rights are needed to edit Template:Main page, since it's edit-protected. Hardcoding a static string defeats the purpose of using {{NUMBEROFFUNCTIONS}}, which automatically updates as new functions are added. AFAIK users should be navigated to language subpages (e.g., Wikifunctions:Main_Page/pl). On subpages, PAGELANGUAGE is explicitly pl, so standard {{formatnum:...}} works correctly. But to be honest I'm not that technical, so I may be wrong. Wcalenieja (talk) 10:45, 10 September 2026 (UTC)Reply
I guess I didn't mean hardcoding, I was more asking about using our own functional formatting by calling display natural number (Z14280) with an embedded function call. It might look more like 6251 --99of9 (talk) 10:53, 10 September 2026 (UTC)Reply
That makes sense. Apologies, I misread your comment as suggesting a hardcoded string rather than a function call. But we should use {{#function:Z14280|{{NUMBEROFFUNCTIONS}}|{{int:lang}}}} instead of hardcoding pl :) Wcalenieja (talk) 11:03, 10 September 2026 (UTC)Reply
Indeed. I think it is now working. This does risk the first visitor in each language seeing "function is being called"... So let's see if we get lots of complaints.--99of9 (talk) 11:20, 10 September 2026 (UTC)Reply

Wikifunctions & Abstract Wikipedia Newsletter #264: Your code can now call back to the Wikidata fetch functions

There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!

In this issue, we introduce the possibility of calling Wikidata fetch functions, we present a new Type, we celebrate more than 200 new functions this week, and we take a look at the latest software developments.

Want to catch up with the previous updates? Check our archive!

Enjoy the reading! -- User:Sannita (WMF) (talk) 13:13, 11 September 2026 (UTC)Reply

Maybe with "call back to the Wikidata fetch functions" it would be possible to craate an implmentation for infobox rows taxonomy (Z38960) as described in its discussion page. Who can help? HenkvD (talk) 12:43, 14 September 2026 (UTC)Reply

module:citation and templates

template:cite encyclopedia requires it Arlo Barnes (talk) 02:28, 13 September 2026 (UTC)Reply

WF:AN to request imports from another wiki. YoshiRulz (talk) 02:59, 13 September 2026 (UTC)Reply
Thanks, moved to WF:administrators' noticeboard#importing module:citation and associated templates. Arlo Barnes (talk) 19:55, 13 September 2026 (UTC)Reply

Calculadora de Obras de Artista por Periodo

Hola, necesito una función que calcule a partir de dadas

  • Una fecha de inicio (dd/mm/aaaa)
  • Una fecha de final (dd/mm/aaaa)
  • Un artista o grupo de artistas

La cantidad de obras hechas en ese periodo de tiempo por ese artista o grupo de artistas. Jackie SMG (talk) 05:40, 13 September 2026 (UTC)Reply

Something like (Q41264, 1650-01-01, 1659-12-31) → 7? That's not currently possible, because it needs to jump from the artist's Item to the works' Items (backlinks), which SPARQL can do but Wikifunctions cannot.
Something that is currently possible would be to take a list of works as arguments and filter them by date: example. YoshiRulz (talk) 19:06, 13 September 2026 (UTC)Reply
Más o menos algo así quiero, que se haga mediante Wikidata. Aunque igualmente, ustedes son los que saben programar, por algo estoy aquí solicitando. Muchas gracias de igual forma.
Esto es para un proyecto que tengo llamado m:Wikimuseum ~ Art, entonces necesito funciones para ese proyecto para no tener que calcular todo a mano. Les voy a dar actualizaciones si algo pasa.
Atte: Jackie SMG (talk) 19:14, 13 September 2026 (UTC)Reply
Hola, soy yo de nuevo. Quiero darle las gracias a la comunidad de Wikifuntions por responder a mis dudas y les quiero avisar que, por motivo de m:Wikimuseum ~ Art, les voy a estar pidiendo funciones de forma continua para poder desarrollar este nuevo proyecto, el cual planea convertirse en un proyecto hermano. Muchas gracias por su atención.
Atte: Jackie SMG (talk) 19:51, 15 September 2026 (UTC)Reply

The next Natural Language Generation Special Interest Group meeting is tomorrow!

Hi all! A quick message to inform you that Denny will lead a quick first introduction to syntactic phrase functions in the next Natural Language Generation Special Interest Group meeting, that will be held tomorrow, September 15, at 16:00 UTC (link to the meeting).

See you at the meeting! In case you can't join, the meeting will be recorded and made available on Commons. -- User:Sannita (WMF) (talk) 13:27, 14 September 2026 (UTC)Reply

c:File:Abstract Wikipedia NLG SIG Meeting 2026-09.webm re: (experimental) Syntactic phrase function (Z39358) YoshiRulz (talk) 09:34, 17 September 2026 (UTC)Reply

Categories, classifiers, tags and the Function catalogue

Functions are manually classified within the Function-catalogue sub-pages. Objects in the main namespace, including functions, may also be organized into traditional Wikimedia categories by categorizing their Talk pages. In addition, objects may also be grouped together using their labels or aliases; for example, equality functions are likely to have "==" as an alias. There may be other mechanisms that I have overlooked.

These approaches share the drawback that they are essentially monolingual and, in practice, mainly restricted to English. I suggest that we should replace the English strings used for such purposes with Multilingual text (Z12) objects and link to these wherever feasible. In the future, it may be possible to link directly from any Persistent object (Z2) to such a “tag” object, but I think we would need to create a Feature request on Phabricator for this. In the meantime, maybe we should explore using embedded function calls to provide headings within the Function catalogue? GrounderUK (talk) 10:26, 16 September 2026 (UTC)Reply

Great ideas. I support all. --99of9 (talk) 10:33, 16 September 2026 (UTC)Reply
ICYMI: {{Function documentation}}
I don't understand where you intend to add Z12s, since the things you mentioned already use it. Cross-lingual/symbolic aliases are still not working.
Using our own heading functions is a good idea, but the Items need to exist. Extension:Translate is probably the better choice on a lot of pages. YoshiRulz (talk) 20:05, 16 September 2026 (UTC)Reply
The Z12s themselves would be standalone objects, just like a category is a standalone page. Objects could link to them directly, by reference (subject to a change to the Z2 type definition to add a new key for a list of references). Alternatively, a standalone typed pair could link the Z12 object to the list of objects it categorizes, which would be easier for functions to operate over. GrounderUK (talk) 20:53, 16 September 2026 (UTC)Reply
I still don't follow. Do you mean that the links to the persistent Z12 will serve as categorisation, with Special:WhatLinksHere for listing membership? YoshiRulz (talk) 21:50, 16 September 2026 (UTC)Reply
Basically… yes. But I imagine we’d have some more specific searches too. And an embedded function over a Separate association object might even populate an entire Catalogue section. GrounderUK (talk) 22:30, 16 September 2026 (UTC)Reply

Wikifunctions & Abstract Wikipedia Newsletter #265: More engaging error messages

There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!

In this issue, we explain how we reworked error messaging, we talk about our recent and upcoming meetings, and we take a look at the latest software developments.

Want to catch up with the previous updates? Check our archive!

Enjoy the reading! -- User:Sannita (WMF) (talk) 12:59, 18 September 2026 (UTC)Reply

Tracked in Phabricator:
Task T439423
The "message template" is used on WF too (as you show in the first screenshot there), but because it's used as the subtitle for the Errors collapsible section, clicking on hyperlinks collapses the section instead.
edit: Made a visualisation. Although it now occurs to me that it's cached for a month, so maybe not that useful compared to a shared call URL which has the error. YoshiRulz (talk) 05:40, 19 September 2026 (UTC)Reply
We also changed how we track rate limiting for actions including running Functions. These can happen a lot via API calls when using the front-end.
Whatever you did, it now takes several minutes to see test results while writing an Implementation, or to get the preview of an embedded function call. I would have thought those are the work units you'd want to prioritise.
If you want to reduce the amount of work that gets queued, you could change the indiscriminate execution of the whole test matrix when any Impl/Test is dis/connected, and allow selective queuing of tests from the Implementation editor. YoshiRulz (talk) 08:51, 19 September 2026 (UTC)Reply

Technical limitations or something on my side?

Hi there,

I'm experimenting with different ways to improve NLG in French (many things to do). I experiment some limitations, I don't if they come from the software or something I did:

  1. I tried to create a typed list in Unlabelled (Z42597), similarly to classes often indicate French masculine def. (Z38002), but impossible to add this type (I'm blocked with an empty content box). The Edit Raw JSON script also fails on publication.
  2. I tried to find if an item is a subclass of another in Is item a human settlement? (Z41641) and Is item a human settlement? Comp (Z41649), but I only get the error "WASM interpreter aborted (unreachable executed)".

Is it me? Or some current limitations? Are there workarounds? Any help appreciated! Cheers. Ornithorynque liminaire (she/they) (talk) 14:38, 19 September 2026 (UTC)Reply

1. Z42957 is a String (Z6). It is possible to create a typed list of Wikidata item reference (Z6091), if that’s what you have in mind.
2. Yes, that’s a tricky one. I don’t have time right now, but I should be able to look at it in a few hours or tomorrow morning. GrounderUK (talk) 18:24, 19 September 2026 (UTC)Reply
Thank you! For some reason I couldn't create a typed list earlier, but it looks fixed now (I was able to create classes always indicate no article in French (Z42639)). The interface could still be a bit clearer... Unlabelled (Z42597) can be deleted, btw. Ornithorynque liminaire (she/they) (talk) 19:39, 19 September 2026 (UTC)Reply
Good. I agree, the interface for type specification is a little peculiar for “generic” types.
I’ve had a little look at your second problem and I don’t have a quick fix. Theoretically, I think you want to apply the subclass test to each of the classes of which the item is an instance, having failed to establish that the item is an instance of the superclass. This function call seems to work, but I would be worried about timing out, generally. It would perhaps be better to create a list of classes that are, ultimately, types of human settlement and only use the more expensive traversal for items that are not instances of any of those classes. I don’t see any such list currently, but the idea is expressed in French Wikidata item is settlement-like, comp (Z41921), so @Jsamwrites might be interested in collaborating. GrounderUK (talk) 20:38, 19 September 2026 (UTC)Reply
As I mentioned here, your solution is ideally correct, but because of technical limitations, I created a faster version for general French usages. John Samuel 21:11, 19 September 2026 (UTC)Reply
Thanks @GrounderUK! Any help or Phabricator page (or some dashboard) where we could understand what's likely to timeout? I would love to reduce the burden on the servers but I have no clue on what's causing it. Ornithorynque liminaire (she/they) (talk) 11:41, 20 September 2026 (UTC)Reply
I’m not aware of a suitable page, but I think it would be a good idea to have one. Perhaps we should add it to Special:MyLanguage/Wikifunctions:How to create implementations, which is linked to from every implementation? We should probably also have a general Phabricator task for logging errors that are hard to understand and/or impossible to translate. This might fit under phab:T432195, unless @LMorgantini-WMF has a better suggestion.
For now, I would only suggest that we:
GrounderUK (talk) 13:19, 20 September 2026 (UTC)Reply
  • If a function does not need to pull labels or statements from an Item/Property/Lexeme, it should not fetch it.
    • When a label or statement is needed, from that point on you should only pass around the fetched Item/etc. and not its reference. Unfortunately the naming conventions and catalogue aren't very helpful for finding the right label functions at the moment.
  • Replace compress list (Z22820) with specialised filter functions where possible to avoid having to repeat a long expression.
  • When implementing by composition, try to do it without recursion, at least until a non-recursive or code implementation gets connected. Recursive compositions are slower and more annoying to debug. (Code implementations can use recursion with much less overhead, but are limited in other ways ofc.)
  • Embedded function calls often fail, even when the same arguments work fine when used on the function's view page. Must be a separate cache.
YoshiRulz (talk) 22:24, 20 September 2026 (UTC)Reply

Wikifunctions & Abstract Wikipedia Newsletter #266: Memoization arriving

There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!

In this issue, we talk about storing a function call's result in a cache for easier recalling, we analyse how quickly one particular fact propagates through different Wikipedia language editions, and we take a look at the latest software developments.

Want to catch up with the previous updates? Check our archive!

Enjoy the reading! -- User:Sannita (WMF) (talk) 09:54, 28 September 2026 (UTC)Reply

This memoization is at the global level, but are subexpressions repeated within a composition also memoized / is that planned? Because I've been writing compositions assuming that they would. YoshiRulz (talk) 09:59, 28 September 2026 (UTC)Reply
Memoization is working on subexpressions. It should capture repeated subcalls within a composition and even across different calls to the orchestrator, so your assumption is safe.
HOWEVER, be aware that we're only memoizing a very short list of functions so far ([ 'Z860', 'Z885', 'Z101', 'Z10047', 'Z189' ]). We plan to expand this list in future. Very open to suggestions about which functions we should consider; we've based these decisions on benchmarks but would also benefit from advice from composition implementers! CMassaro (WMF) (talk) 17:10, 29 September 2026 (UTC)Reply
I think it’s worth distinguishing between extrinsic caching of function call results and intrinsic memoization of objects during a function call evaluation. To my mind, “subexpressions repeated within a composition” would fall into the latter category (function call or not), and I believe the Orchestrator generally realizes a repeated subexpression (identical object) only once during a single function call’s evaluation. GrounderUK (talk) 00:08, 30 September 2026 (UTC)Reply
Good to hear. As for what to do next, I wouldn't trust my intuition over actually measuring. Maybe display functions? YoshiRulz (talk) 06:18, 30 September 2026 (UTC)Reply
I think the community should avoid recommending functions specifically for memoization. We can highlight functions of particular concern, leaving it to the team to consider whether memoization, new builtins or something else would be the preferred solution. Top of my list is select a function based on language (Z14310), which is a critical dependency for almost all Abstract Wikipedia calls as well as our reading and display functions. This should be considered alongside T390226: Consider using list inputs to create variadic apply, filter, map, etc. functions, since the selected function is always applied.
We should also consider:
I believe that none of the above functions can currently be evaluated without ultimately requiring traversal into code. The groupings reflect my belief that improving any member of the set can improve all members. GrounderUK (talk) 14:08, 1 October 2026 (UTC)Reply

Wikifunctions & Abstract Wikipedia Newsletter #267: Refreshing results

There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!

In this issue, we talk about two new capabilities addressing the issues of caching and freshness of function call results, we introduce our groundwork to support the first pilot communities for Abstract Wikipedia, we discuss news in Types, and we take a look at the latest software developments.

Want to catch up with the previous updates? Check our archive!

Enjoy the reading! -- User:Sannita (WMF) (talk) 09:31, 2 October 2026 (UTC)Reply