Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential golfing oppurtunity #9

Closed
ConorOBrien-Foxx opened this issue Aug 6, 2018 · 1 comment
Closed

Potential golfing oppurtunity #9

ConorOBrien-Foxx opened this issue Aug 6, 2018 · 1 comment

Comments

@ConorOBrien-Foxx
Copy link

This could be an unrealistic way to shave bytes, but I thought I'd mention it just in case.

In this answer, I noticed an odd pattern:

&*XRXzXM

The final 3 functions were all modified by X. Could it be useful to have something like "enable implicit modifier"? I'll use <M>_ to denote this, seeing as X_, Y_, and Z_ are unused. This answer could become:

&*X_RzM

...saving 1 byte. It is very situational, but maybe common enough to warrant this shorthand. I want to do a bit of a corpus analysis to see if this would do anything useful, similar to lynn's for Jelly

@lmendo
Copy link
Owner

lmendo commented Aug 12, 2018

Thanks for the idea! However, as you say it seems to be very situational. Using @Suever's analytics script, I've done a quick check of all 1640 MATL answers so far. There are:

  • one answer with three or more X functions in a row, besides the one you mention, which is not detected by the script, probably because the code is in a second part of the answer;
  • none with Y;
  • two with Z.

So it seems to be relatively rare. Besides, in two of those four cases the functions are not at the end of the code, so a closing modifier would be required, increasing the byte count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants