Jump to content

User talk:99of9

From Wikifunctions
Latest comment: 3 days ago by 99of9 in topic Kleenean label

Welcome to Wikifunctions, 99of9!

Wikifunctions is an open repository of code functions that anyone can use and contribute to!

Do you need some help getting started? Here are some pages you can familiarize yourself with:

  • Introduction – An introduction to the project.
  • Community portal – The portal for community members.
  • Contents – The main help page for editing and using the site.
  • Glossary – Definitions of frequently used terms.
  • FAQ – Frequently asked questions.
  • Project chat – Discussions about the project.

Please remember to sign your messages on talk pages by typing four tildes (~~~~); this will automatically insert your username and the date.

If you have any questions, don't hesitate to ask on Project chat. Once again, welcome, and I hope you quickly feel comfortable here, and become an active contributor to Wikifunctions.

Best regards!

Justin (koavf)TCM 06:47, 13 September 2023 (UTC)Reply

Split endswith ?

Hi,

First thanks a lot for your help on French plural, Python (Z11550) (especially my stupid mistake of copy-paste). But I'm wondering, why split the endswith() ? (it look better and more effective with a tuple, no?)

Cheers, VIGNERON (talk) 11:55, 21 October 2023 (UTC)Reply

@VIGNERON: It wasn't evaluating, so I tried to fix it. I'm no expert, but it looks like the Python function endswith can only take one string argument (and another to optionally set the end position). I'm glad you're having a go, it will be interesting to see if we can get lots of activity in lots of languages. --99of9 (talk) 11:59, 21 October 2023 (UTC)Reply
@99of9: ah! of course! thanks a lot for your comment, I made an obvious mistake (it wasn't really a tuple, so not one argument, now it's fixed).
I'll try te create more functions for French and Breton in the coming days/weeks.
Cheers, VIGNERON (talk) 12:16, 21 October 2023 (UTC)Reply
OK! Well now I'm learning too! Thanks. --99of9 (talk) 12:20, 21 October 2023 (UTC)Reply

Review

Hi,

As I said before, I created a couple of wikifunctions for Breton. They are listed here: Wikifunctions:Catalogue#Breton_String_operations

Feel free to look at them and tell me what you think (I see you already added labels and description in English, thanks!).

Cheers, VIGNERON (talk) 11:11, 1 November 2023 (UTC)Reply

Hi @VIGNERON: yes, I saw these. I think you're doing well. I'm afraid I don't know the language, so I can't be much help, but I'll try to keep adding English labels. For consistency, I suggest that all morphemes associated with a language should have the language at the start of their label, so "English plural", "Breton plural", "Breton ***". --99of9 (talk) 11:28, 1 November 2023 (UTC)Reply
Ah, good point, thanks. I'll harmonize that for English labels right now. Cheers, VIGNERON (talk) 13:19, 1 November 2023 (UTC)Reply

Hi, I was using this as a presumably simple test case to familiarize myself better with the workflows on this wiki, and I got lost in multiple ways, so thanks for chiming in. I will drop off now but will check back in tomorrow to see what you made out of it. Daniel Mietchen (talk) 00:28, 23 January 2024 (UTC)Reply

@Daniel Mietchen: I've overhauled it a bit. Denny suggested using plain strings as often as possible at first (let me know if you want me to find a link to the discussion). Apart from types, the other main thing that was stopping the python was the whitespace(!). It requires tabbed indents not single spaces. Now that it runs, have a think about what you want the output to be for the test cases I added. I put in my suggestions (which the composition implementation replace -ceae at end with -ceous, composition (Z12834) conforms to), but am happy to switch them if you prefer different outputs. --99of9 (talk) 02:56, 23 January 2024 (UTC)Reply
Oops, I didn't see your comment on capitalisation when it came up [1]. The reason I think it should just preserve whatever the incoming capitalisation is, is so that it still works at the start of a sentence, or in a database, etc. It's also safe enough, because I imagine that the users of this function will format their input to ensure they get what they want as output. --99of9 (talk) 03:05, 23 January 2024 (UTC)Reply
Thanks, this gives me some things to chew on. --Daniel Mietchen (talk) 23:30, 23 January 2024 (UTC)Reply

Comments on Type proposals

Hey, admin(?). You added a Comments section to the Natural number type proposal and it included a subscription widget. The blankish template at Wikifunctions:Type proposals/(unnamed – new) lost that feature and I can’t see how you did it in the first place. Maybe you can fix this for all the proposals (or share your wizardry)? GrounderUK (talk) 08:57, 13 March 2024 (UTC)Reply

I just tested and it appears when you sign a signature! (And disappears when you delete your signature.) So I've left a "support as proposer" in the template to prompt the creator to sign. --99of9 (talk) 00:17, 14 March 2024 (UTC)Reply
Done thank you. And congratulations on your elevation! GrounderUK (talk) 01:58, 14 March 2024 (UTC)Reply

Z14597

Hi 99of9,
Thanks for all the wonderful work.
Regarding Z14597, sorry, my mistake, can the string be deleted? I created it by mistake and I don't expect it to be used.
Thank you, · מקף Hyphen · 03:00, 31 March 2024 (UTC)Reply

Sure. Done. --99of9 (talk) 04:01, 31 March 2024 (UTC)Reply

English labels

Hi, please don’t mangle our language when labelling 😎 “English suffix word” is practically incomprehensible and “English natural number to ordinal” is positively misleading (it is the ordinal that is in English, not the Natural number). As you no doubt have a plan, perhaps you should articulate it at Wikifunctions:Naming conventions or Wikifunctions talk:Best practices#Wikifunctions:Naming conventions. Cheers! GrounderUK (talk) 07:54, 3 April 2024 (UTC)Reply

I see what you mean. The idea/"plan" is that with the expected proliferation of language-related functions, that the language they apply to should be ultra-prominent (i.e. first word IMO, so that searches with the language only give you a comprehensive list). Once categories are up and working, this may not matter so much. In the meantime, would colons be sufficient to achieve both goals? "English: suffix word" and "English: natural number to ordinal"? --99of9 (talk) 00:48, 4 April 2024 (UTC)Reply
Yeah, I guessed 😎 It’s hard to prove the negative, but I believe that searches already return a comprehensive list if just the language is specified. My personal preference is for function names (in particular) to have a label that is as close as possible to an idiomatic phrase in the language in which it is expressed. If the natural language prefix is decided upon, I would favour “English: suffix English word” and “English: Natural number to English ordinal”. If we move further away from idiomatic names, I might prefer “English String ordinal from Natural number” and “English String from word and suffix”. This puts the function’s return type in the more prominent position that it deserves (and, yes, I would prefer a Monolingual string return type). The implication there, though, is that the function that turns 23rd to 23 should be called “Natural number from numeric ordinal with English suffix” (unlucky guess: Natural number from ordinal with English suffix (Z14542)😏). That said, “Natural number sum of two Natural numbers” does lack a degree of panache 🤷‍♂️ GrounderUK (talk) 21:14, 4 April 2024 (UTC)Reply
Ok, I've restored them at least for now. --99of9 (talk) 01:59, 5 April 2024 (UTC)Reply
Feel free to march boldly on. Your contributions are much appreciated (99% of the time) 🙏 GrounderUK (talk) 03:39, 5 April 2024 (UTC)Reply

Spambot block

Can I ask why Special:Redirect/logid/63908 was only 2 hours? I was going to block them indefinitely until I saw your prior block and figured there was probably a reason. I also reported them to m:SRG for a global lock. --DannyS712 (talk) 19:41, 9 April 2024 (UTC)Reply

Since I caught them in the act, I was just trying to interrupt the next post, so they would move along. I expect they will not come back no matter how long the block. But I have no concern if you want to make it indefinite. I'm not particularly experienced with blocking. --99of9 (talk) 01:01, 10 April 2024 (UTC)Reply
My rule of thumb is that spam-only accounts get indefinitely blocked, but with talk page access enabled in case it turns out that they were not intending to spam or something like that (had that happen to me once I think - blocked someone who just didn't understand that it wasn't allowed and wanted to contribute positively). Anyway, the account is now globally locked so it doesn't really matter --DannyS712 (talk) 03:46, 10 April 2024 (UTC)Reply

Can you have a look

Hi 99of9 hope you fine, I'm just working on a function called "area of a circle" that uses rational numbers. I was having problems doing arithmetic with this type of number and, since there's no documentation I can refer to, I was trying it here and there until I got to this final formula that uses pi as input. Can you take a look and give me some suggestions? Or do it if you want. Regards --Mohanad (talk) 22:19, 31 January 2025 (UTC)Reply

Hi Mohanad. Is there a reason you want to use rational numbers as input and output? It seems a bit strange to me, because pi is an irrational number. So, at least for the output, I would suggest using float64. But anyway, I'll take a look now at what you have tried already. 99of9 (talk) 22:32, 31 January 2025 (UTC)Reply
I also wouldn't have a function input for pi. Since it is a constant, it doesn't make much sense for the user of the function to feed in their own personal value. 99of9 (talk) 22:42, 31 January 2025 (UTC)Reply
I know, I tried to use it directly many times (22*num) & (7*dem) but didn't work for me -Mohanad (talk) 22:46, 31 January 2025 (UTC)Reply
Ah, I see. That might be because 22 and 7 are not Bigint types. You would need 22n and 7n. But I think we should go for something more accurate than 22/7 anyway. 99of9 (talk) 22:49, 31 January 2025 (UTC)Reply
I've changed it a bit so that everything now passes. But it sounds like you're happy if I remove the pi parameter? 99of9 (talk) 22:55, 31 January 2025 (UTC)Reply
To be honest, I didn't use float64. Will it work fine with js if the input type has changed? or Or need special work around too, if 22n & 7n work arithmetically fine, then there will be no need for pi input. --Mohanad (talk) 23:01, 31 January 2025 (UTC)Reply
I've made area of circle, JS with hardcoded pi approx (Z22039) which doesn't use the pi parameter, and uses 22n/7n as it's approximation for pi. But even if we stick with rational numbers, we could use a much better approximation. 99of9 (talk) 23:12, 31 January 2025 (UTC)Reply
Changing either input or output types will mean that we need to rewrite the implementations. Since we have almost completed this rational version, I suggest making a new function with float64 types instead. But yes, let's remove the pi parameter on this one too. 99of9 (talk) 23:16, 31 January 2025 (UTC)Reply
Thx for help, if there is any documentation for advanced js implementation it will be helpful, thx again --Mohanad (talk) 23:23, 31 January 2025 (UTC)Reply
The wf:Community portal is a better place to put things like this to open more participation and to not ping randomly. Feeglgeef (talk) 22:34, 31 January 2025 (UTC)Reply

Kleenean label

Hi 99of9, is it wrong? --Mohanad (talk) 10:06, 5 February 2025 (UTC)Reply

Oh, sorry, I think we might have both tried to edit at the same time. I was just trying to edit the English labels. Feel free to undo my edit, or redo yours. 99of9 (talk) 10:09, 5 February 2025 (UTC)Reply