Introducing Wikifunctions: first Wikimedia project to launch in a decade creates new forms of knowledge – Wikimedia Foundation (wikimediafoundation.org)
from lysdexic@programming.dev to programming@programming.dev on 06 Dec 2023 19:51
https://programming.dev/post/6895383

#programming

threaded - newest

NAXLAB@lemmy.world on 06 Dec 2023 19:57 next collapse

Is commenting for engagement boost a thing?

This is incredible and I never could have imagined it. This will democratize the power of programming

can@sh.itjust.works on 06 Dec 2023 20:10 next collapse

Comments impact some of the lemmy sorting algorithms such as active.

Active uses the post votes, and latest comment time (limited to two days).

mac@programming.dev on 06 Dec 2023 20:30 collapse

Yeah active is currently the default sort in programming.dev until scaled sort comes out so commenting helps the most out of everything here

can@sh.itjust.works on 07 Dec 2023 00:47 collapse

Default sort is a profile setting too though so many may have overridden that.

WetBeardHairs@lemmy.ml on 06 Dec 2023 20:31 next collapse

Neat. I don’t like that the implementations have to name the function by some cryptic identifier, though. Real words matter in source code.

Who can tell me what this function is?

def Z10096(Z10096K1):
    return Z10096K1 == Z10096K1[::-1]

How about this?

def isPalimdrone(myString):
    return myString == myString[::-1]
S410@kbin.social on 06 Dec 2023 21:36 next collapse

"Our goal is knowledge, so we're going to obfuscate everything to fuck and make things unreadable"

Cannacheques@slrpnk.net on 07 Dec 2023 11:23 collapse

No. Details and scope limitations please

monotremata@kbin.social on 06 Dec 2023 22:16 next collapse

It looks to me like they did it this way so that it could have natural-language names in many languages. So, the function Z10096 is called "is palindrome" in English, but if you're coding in Japanese you can call it "回文の判定". I don't think the idea is for people to refer primarily to the alphanumeric soup version; I think that's just the unique identifier for the database.

It does look like it's leading to some issues, though. E.g., someone added a test for the "is palindrome" function which uses a somewhat common example: "Straw? No, too stupid. I put soot on warts." Now, a human would probably say that this is a palindrome, because it's got the same letters forwards and backwards, but most of the implementations disagree, because they consider the spaces, capitalization, and punctuation to be part of the string; that is, they test whether the input string and its reverse are equal. So someone (possibly the same person) has added a second python implementation which ignores spaces, capitalization, and punctuation, and mentions that in its name on the page.

Fundamentally this function is solving a different problem than the others (as demonstrated by the differing results on the relevant test), so should it get its own number and page? should there be a "palindrome disambiguation" page? This seems like something the site will have to figure out how to handle.

WetBeardHairs@lemmy.ml on 07 Dec 2023 00:42 collapse

I think you’re absolutely correct about them choosing those awful identifiers so the functions are not language specific. It just hurts to read and thoroughly makes it harder to understand because my brain doesn’t tokenize “Z10096” and “Z10096K1”.

lemmyvore@feddit.nl on 07 Dec 2023 01:01 collapse

Tbf it wasn’t so much the names that tripped me as the weird Python operator. I would’ve never guessed that’s a string reversal if you hadn’t told me (I don’t know much Python beyond recognizing the syntax). If I had to guess I would’ve said it’s an array pop.

WetBeardHairs@lemmy.ml on 07 Dec 2023 01:30 collapse

When I originally typed it, I made a function for string reversal and called that. But I didn’t include it since I didn’t want to define that too.

Honestly… this wiki has a seriously difficult path ahead of it. I mean - it’d be fantastic if it did simplify things like that to let you write simple, elegant, and easy to read functions while linking to other functions.

But it’d also have to lint those and make sure that contributors don’t implement recursive dependencies.

peter@feddit.uk on 07 Dec 2023 01:31 next collapse

I thought they were struggling for money?

randomaccount43543@lemmy.world on 07 Dec 2023 10:10 next collapse

They are not struggling for money. In fact they have so much money they don’t know what to do with it.

www.makeuseof.com/…/wikipedia-millions-bank-beg/

Kissaki@feddit.de on 07 Dec 2023 11:37 collapse

The work is being supported by grants from Google.org, The Rockefeller Foundation, and the Wikimedia Endowment.

Either way they did get some additional funding for this project.

fzz@programming.dev on 07 Dec 2023 11:28 next collapse

It’s to teach AI more properly?

Jummit@lemmy.one on 07 Dec 2023 14:22 collapse

I hope it’s going to be used instead of machine learning. Seems much more correct, secure and efficient to me.

dukk@programming.dev on 08 Dec 2023 20:20 collapse

This is fucking cool. I can imagine the many times this could’ve helped me quite a bit, and honestly even if I didn’t find the function I needed I could still probably hack out a decent implementation in whatever language and actually contribute towards this. In 5-10 years, this could be really useful.