[11:37:58] Can a function implement be composed of other functions AND codes [11:41:47] Part of an implementation is a function call, other parts are codes [14:38:07] If you want to compose a function with parts that are in code, you can always wrap those parts in a function and then use that in the composition [19:14:34] speaking of composition, I messed up something but I don't know what https://www.wikifunctions.org/view/fr/Z11601 (I wanted to say "if starts with a 'k', 't', 'p', 'g', 'd', 'b', 'm', then true, else false ; see the python implementation) [19:15:58] @vrandecic I tried to do like on Z11287 but with no avail :/ [19:16:40] Taking a look [19:16:58] (no hurry, just posting to avoid forgetting) (re @vrandecic: Taking a look) [19:18:06] Do you prefer me to fix it or tell you how to fix it? [19:19:08] just fix it for now, I'll add a deeper look later (after the WikidataCon preferably, I'm not so good at multitasking) (re @vrandecic: Do you prefer me to fix it or tell you how to fix it?) [19:37:18] Rewritten. I also left a comment on the composition page because it's really missing lists right now for a function like this. [19:42:35] thanks!! [19:42:36] and yes, list was an other part of my question (re @vrandecic: Rewritten. I also left a comment on the composition page because it's really missing lists right now for a function like this.) [21:19:53] if I want an “identity” function for strings, I’ll have to create it, right? [21:19:56] Z10215 exists but is for booleans [21:20:02] and IIUC we don’t have generics yet [21:22:08] That's correct [21:22:13] ok, thanks [21:22:42] I'm thinking it would be also useful to create "string if" and "boolean if" etc [21:22:47] (planning to use this as a simple test function for hacking on https://github.com/lucaswerkmeister/tool-lexeme-forms/issues/140 – though I guess any string function would work) [21:23:05] Generics may take a moment [21:36:02] alright, created Z11602 [21:52:58] is there a reason I’m missing why the wikilambda_function_call_zobject response is wrapped in a query member? : https://tools-static.wmflabs.org/bridgebot/78b6054d/file_53719.jpg [21:53:02] or should I file a phab task? [21:53:40] (without wanting to accuse anyone of anything – it feels like a bit of the API output code might have been copied from `action=query` without removing this bit ^^) [22:03:14] hm, I’m trying to make a function call from Python, and despite being logged in (according to `action=query` + `meta=userinfo`), I get “Error of type Z559”… are function calls limited by referrer or something? [22:03:44] (in the API sandbox the same function call seems to work) [22:06:25] no wait, it can’t be that, the curl screenshot just above shows even an anonymous request working… guess I’ll debug my python then [22:07:27] Are you working against the beta or proper? [22:07:31] proper [22:07:40] ok, if I swap out `authenticated_session()` for `anonymous_session()` then it works 🤨 [22:08:31] I had trouble getting it work from the browser, cors wasn't letting me. I am not sure about the settings for REST calls from server. [22:11:33] oh wait! [22:11:41] I bet my oauth consumer doesn’t have whatever grant or right is relevant [22:11:53] and that’s why, when authenticated with that consumer, I’m not allowed to make requests [22:12:01] If that's even set up yet [22:12:04] (whereas in the browser I’m not using oauth) [22:12:40] yeah I don’t see anything on Special:ListGrants yet [22:12:48] I’ll make anonymous requests for now then [22:13:01] Sorry, this needs improvement [23:59:38] filed T349966, but as long as anonymous requests can evaluate function calls it’s not particularly urgent for me (re @lucaswerkmeister: yeah I don’t see anything on Special:ListGrants yet)