Tips for golfing in Jellyfish

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.

• 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. Aug 5, 2016 at 5:45
• I suspect tips threads like this are a sneaky way to advertise the language. We have a place for that.
– xnor
Aug 5, 2016 at 9:28
• Golfing tips may partly serve as advertising, but they are a different thing Aug 5, 2016 at 11:36

Use functions before consumed by operators

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

p
%C+
&
>+i


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:

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


29-byte version:

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


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.