Do you have any tips for writing in SOGL, a golfing language created by dzaima?

Your tips should be at least somewhat specific to SOGL.

Please post one tip per answer.

  • \$\begingroup\$ @Soyoucanreplytomeincomments, tips questions are actually on topic here (see all the others under the tag). \$\endgroup\$ Commented Apr 23, 2017 at 22:00

2 Answers 2


Use the compression creator

Here is a new, buggy but mostly working online JavaScript compression creator. There, in each line enter a part of the string on each line which closest matches one of:

  1. custom dictionary string - this will find the different characters used in the part, store them and store a number in the base of the amount of characters. This is effective for strings like niooaaoasoioaiaaaoiineeaei where there aren't a lot of different characters. It also works well for just a single character repeated. This has a limit of 98+(different characters used), and the compressor (currently) doesn't auto-split those.
  2. boxstrings - strings with only the characters /\|_- and \n. Practically the same as custom dictionary strings, but more efficient. Note that this is chooses whether to use / and \ with the same bit, so then custom strings will be used. This has a limit the same as custom dictionary strings.
  3. english - this has two word dictionaries, one of length 256 and another of ±65500. This only contains lowercase words and automatically adds spaces between words. To get something like spaceface do two parts of space and face. Each english part has a max of 4 words. If a 4-word part is followed by more english, it adds a space between. Trough the compressor will automatically split the input for you.
    Note: the dictionary contains only lowercase versions of strings (except I, I've, and a couple others), so you must correctly case if after usage (using the characters - uppercase 1st letter, - sentence-case, ū - every words 1st letter).
  4. ascii - Plain ascii - each part is 1-18 long (trough 1 and 2 are done differently) and auto-splits for you. Approx. 87% compression ratio.

Other stuff:

  • It's always useful to try different combinations and see which is smaller. At the end, it gives you the original and ending byte count and compression ratio. This might be automated sometime in the future. For example, -_-_\_/_- is shorter than -_-_\_/_- and as different parts

An example input would be

row your boat

, which outputs "π¾⌡īk#S)G⁶⁷λ7&[¶⁶āΡn‘, after which I can put uppercase 1st letter and remove the starting quote and get π¾⌡īk#S)G⁶⁷λ7&[¶⁶āΡn‘⁽ for Row, row, row your boat,\n"

  • 2
    \$\begingroup\$ I recognise niooaaoasoioaiaaaoiineeaei was that my magic string from The Alphabet song? \$\endgroup\$ Commented Apr 23, 2017 at 22:10
  • \$\begingroup\$ Yep :D (message requires 15 characters) \$\endgroup\$
    – dzaima
    Commented Apr 23, 2017 at 22:11
  • \$\begingroup\$ Can you put this on OpenProcessing ty \$\endgroup\$
    – ASCII-only
    Commented Aug 24, 2017 at 21:10
  • \$\begingroup\$ @ASCII-only there you go. Not on OpenProcessing because it'd have taken me more time to get it there (and even more to update it) and ugly but It took me 4 hours to get it to work with processing.js so I'm happy \$\endgroup\$
    – dzaima
    Commented Aug 25, 2017 at 7:54

Remove unnecessary quotes and brackets

You can remove quotes if the string they're encasing is either at the beggining of the program, or right after another string. For example, "hello”"world” can be shortened to hello”world”. This works for all types of quotes, mixed or not.

Similarly this works with brackets. No need to write } after {, ?, nor any of []F∫‽⌠. You can also ommit a starting { if there exists and ending }


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.