Jellyfish is a two-dimensional esoteric programming language inspired by J and written in Python 3. It was inspired by a challenge on PPCG. The name was suggested in PPCG chat as a combination of Jelly, a golfing language inspired by J, and Fish, a two-dimensional esoteric language.

What general tips do you have for golfing in Jellyfish? I'm looking for ideas which can be applied to problems and which are also at least somewhat specific to Jellyfish.

  • 10
    \$\begingroup\$ I don't think we need a tips question for every single language on the planet. Especially if the language is far from finished and has only two users and the question generates tips like "remove unnecessary whitespace" for lack of better ideas, I doubt that this creates content that is actually useful to the community at this point. \$\endgroup\$ Aug 5, 2016 at 5:45
  • 3
    \$\begingroup\$ I suspect tips threads like this are a sneaky way to advertise the language. We have a place for that. \$\endgroup\$
    – xnor
    Aug 5, 2016 at 9:28
  • 3
    \$\begingroup\$ Golfing tips may partly serve as advertising, but they are a different thing \$\endgroup\$
    – Luis Mendo
    Aug 5, 2016 at 11:36

2 Answers 2


Use functions before consumed by operators

When calculating the Catalan number, I used this trick in my Jellyfish answer:


The > function is taking + as argument, while the & takes the same + as functional argument.

As a result, the + that the > gets is unary, while the & makes + binary to be used by C.


Remove unnecessary whitespaces

In my Jellyfish answer to this question, I golfed my program from 41 bytes down to 29 bytes just by finding alternative methods of placing the functions and operators so as to minimize the number of spaces used.

41-byte version:

n         +
+  `1
`/*   r&;>i

29-byte version:

n     +

Use the fact that literals cannot take argument to pack things together. For example, in my 29-byte version, I have a 1 above a * which does not affect the performance of *.

The major goal when I was golfing from 41 bytes to 29 bytes is to minimize the whitespaces used on the second line, meaning to minimize the horizontal span of the remaining lines.

Also, in the 41-byte version, I had two occurrences of 1, and in my 29-byte version I combined them.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.