5
\$\begingroup\$

This question already has an answer here:

Minipy is an extension to Python 3 that changes the names of many functions, adds other useful functions, and automatically imports modules.

Because it is Python (Just with assignment statements prepended to every program), it naturally satisfies our conditions for a programming language. Every Python program is a valid Minipy program.

Consider a 116-byte golfed Python quicksort:

def q(s):
 l=len(s)
 if l<2:return s
 p=s[math.randint(0,l-1)];return q(x for x in s if x<p)+q(x for x in s if x>=p)

Using the same algorithm, Minipy beats it with 76 bytes:

def q(k):
 if l(k)<2:return k
 p=rt(k);return q(ff("y>p",k))+q(ff("y<=p",k))

While Minipy programs are not as small as a golfing language, it does make Python more competitive in many situations.

Is Minipy fair?
Should Minipy be considered its own language and distinguished from Python?

\$\endgroup\$

marked as duplicate by FlipTack, acrolith, mbomb007, nimi, Blue Nov 26 '16 at 13:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

13
\$\begingroup\$

Yes, it is fair and different from Python

I'm answering my own question to share my opinion.

Python programs can be very trivially golfed into Minipy, so Python golfers could simply translate their submission. Even if a normal Python submission does not beat most golfing languages, it may still contain insights and new approaches that could be used. Minipy allows Python to be more competitive while still retaining the underlying language itself.

Languages are not just defined by their syntax and executional model – they are defined by their builtins. Prepending code to every program does make a new language. For example, you can transform Underload programs into Emmental programs by prepending Emmental code. A different set of builtins can make a difference regardless of the syntax (Might Ruby be more competitive with Mathematica builtins, for example), and golfing languages usually have a large amount of built-in operations, which can often be just as important as the language structure. Because of these reasons, I think adding or modifying Python's builtins is completely fair and results in a completely different language.

\$\endgroup\$
  • 3
    \$\begingroup\$ Yes, this is absolutely legitimate (I believe golflua and goruby are essentially the same), but be aware that it won't necessarily be popular. IMHO short built-ins are the least interesting way to create a competitive golfing language. The reason that Jelly, Pyth, CJam, 05AB1E and others are so short are more in their language semantics and syntax than their specific collection of built-ins (and are also where the interesting part of their language design lies). \$\endgroup\$ – Martin Ender Nov 24 '16 at 8:25
  • \$\begingroup\$ My vision for this would be "People who want short programs but can't be bothered to learn a golfing language." \$\endgroup\$ – Esolanging Fruit Nov 24 '16 at 8:27
  • 4
    \$\begingroup\$ Yes, all it really does is alter the byte count without changing what the program does. This isn't to say it isn't allowed, but my upvotes go to the more cleverly golfed one that I can understand, rather than just the one with the lowest byte count. So I'd rather see Python itself, because I'm not going to bother learning to read Minipy. \$\endgroup\$ – Geobits Nov 24 '16 at 9:18
  • \$\begingroup\$ @Geobits That is true, but unfortunately, there are people on this site who look at byte count and nothing else. A cleverly golfed solution on Python could be converted to Minipy to appeal more to these people. \$\endgroup\$ – Esolanging Fruit Nov 24 '16 at 19:13
  • \$\begingroup\$ Given that Pyth started as a minification of Python, you might be better off choosing a new untapped language as a base. \$\endgroup\$ – xnor Nov 24 '16 at 21:45

Not the answer you're looking for? Browse other questions tagged .