bugGNU Octave - Bugs: bug #62839, Missing function "why"...

 
 

bug #62839: Missing function "why" that returns random sentence

Submitter:  None
Submitted:  Sat 30 Jul 2022 03:43:59 AM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 11 Aug 2023 10:21:56 PM UTC, comment #12: 

comment #11:

> @Jordan Aquino: I know it's a low priority function, but if you're working on this, the Octave source tree will be merged in early November to begin the process of releasing Octave 8. If you intend this new function to be released, the next 2-3 weeks are the time to submit this patch and get it reviewed, otherwise it will have to wait a year.


Hey thanks for contacting me! I do not mind waiting, I was a student and working a job so I had little time to handle this. I'm excited to take a look at this now that I have some time.

Jordan Aquino <jordanaquino>
Mon 03 Oct 2022 06:48:48 PM UTC, comment #11: 

@Jordan Aquino: I know it's a low priority function, but if you're working on this, the Octave source tree will be merged in early November to begin the process of releasing Octave 8. If you intend this new function to be released, the next 2-3 weeks are the time to submit this patch and get it reviewed, otherwise it will have to wait a year.

Arun Giridhar <arungiridhar>
Group Member
Wed 24 Aug 2022 09:55:53 PM UTC, comment #10: 

That all sounds fine. We just didn't want it to turn into a direct copy of their why output

Nicholas Jankowski <nrjank>
Group Member
Wed 24 Aug 2022 09:20:40 PM UTC, comment #9: 

comment #8:

> "again, even though matlab is inviting users to open up and modify the function with their own text,  DON'T."
>
> If we are to add a "why" function that is similar in spirit to the Matlab function, I will argue strongly against copying the outputs exactly, or even paraphrasing them.
>
> And, really, it seems silly and unimaginative to me to copy an easter egg like this.  If we want to add easter eggs to Octave, let's show some originality, at least.


I agree its unimaginative. That being said, I thought it could be a fun way to get involved. Do you think the existence of a "why" function negates the possibility of Octave having it's own unique easter eggs?

My reasoning for being interested in this is that I would like to learn how to contribute, I am definitely not married to this idea. Perhaps a better way for me to get involved would be to help write documentation first?

I was going to write a why() function that uses BNF grammar rules to form the randomized responses, and then upload my proposed why.m script to the Octave forums for feedback. I doubt it would violate MATLAB copyright unless they used the same BNF grammar as me and the same exact implementation.

Jordan Aquino <jordanaquino>
Wed 24 Aug 2022 05:41:05 AM UTC, comment #8: 

"again, even though matlab is inviting users to open up and modify the function with their own text,  DON'T."

If we are to add a "why" function that is similar in spirit to the Matlab function, I will argue strongly against copying the outputs exactly, or even paraphrasing them.

And, really, it seems silly and unimaginative to me to copy an easter egg like this.  If we want to add easter eggs to Octave, let's show some originality, at least.

John W. Eaton <jwe>
Group administrator
Sat 20 Aug 2022 12:22:21 AM UTC, comment #7: 

Thank you so much. I was the person who wrote the Anonymous comment interested in contributing. I had not yet made an account. I will read the contributing guides carefully.

comment #4:

> no one is Assigned, so feel free to generate a patch to add a why.m file. see contributor getting started page at https://wiki.octave.org/Contribute

Jordan Aquino <jordanaquino>
Fri 19 Aug 2022 02:18:01 PM UTC, comment #6: 

yes, very good point Markus.  we did add that prominently to the contribute page, but it can't be stressed enough.

turns out there are a handful of these 'easter eggs'. some can be found at:
https://www.mathworks.com/matlabcentral/answers/2001-what-matlab-easter-eggs-do-you-know

regarding `why`, looking at what can be gleaned from the help text:


>> help why
 why    Provides succinct answers to almost any question.
    why, by itself, provides a random answer.
    why(N) provides the N-th answer.
    Please embellish or modify this function to suit your own tastes.


again, even though matlab is inviting users to open up and modify the function with their own text,  DON'T.

It accepts N from 0 to 2^32-1. negative, noninteger, or larger than that produces a rng error.  So N it would seem seeds a random number generator, and isn't really indicative of the number of stored responses, but the same seed produces repeatable output.

I think for something like this, even though it would be trivial, I would be cencerned if Octave's version was just a copied list of the outputs of Matlab's command. It would fall too much in the copyright gray area for my liking.

Nicholas Jankowski <nrjank>
Group Member
Fri 19 Aug 2022 06:04:06 AM UTC, comment #5: 

Since this is an undocumented function and you'll probably need to reverse engineer it differently, a general word of caution: Make sure to not look at the sources of Matlab's `why` function! That would be in violation of their rights.

Markus Mützel <mmuetzel>
Group administrator
Thu 18 Aug 2022 08:07:50 PM UTC, comment #4: 

no one is Assigned, so feel free to generate a patch to add a why.m file. see contributor getting started page at https://wiki.octave.org/Contribute

Nicholas Jankowski <nrjank>
Group Member
Thu 18 Aug 2022 08:01:46 PM UTC, comment #3: 

I would love to help add this feature if its open!

Anonymous
Sat 30 Jul 2022 02:10:18 PM UTC, comment #2: 

Afaict, "why" is an undocumented function in Matlab.
Dropping the priority because of that.

Markus Mützel <mmuetzel>
Group administrator
Sat 30 Jul 2022 01:37:09 PM UTC, comment #1: 

ISTR that Octave had something like that in the past.
But if I'm not mistaken, someone took offense on that and it has since been removed. (However, my memories are a bit hazy when it comes to that. And I don't recall what the name of that function was. So it is hard to find anything on it...)

Markus Mützel <mmuetzel>
Group administrator
Sat 30 Jul 2022 03:43:59 AM UTC, original submission:  

Typing "why" in Matlab tells a joke. Octave cannot tell jokes.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jordanaquino (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-30 mmuetzel Priority3 - Low 1 - Later
    2022-07-30 mmuetzel CategoryNone Octave Function
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupMatlab Compatibility Feature Request
        Release7.1.0 dev
        Operating SystemMicrosoft Windows Any
        SummaryOctave cannot tell jokes Missing function "why" that returns random sentence

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code