We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

User:Blashyrkh/Golf/Code

From Esolang
Jump to navigation Jump to search

14

The last resort is the X(/....X)\ -> (X/....)\ rule, it may allow to save few bytes when the code appears to be not golfable any further. Also, if your program ends with \, the symbol may be removed without hesitation: the language doesn't require for every / to have its matching \.

Looping counter

33 bytes

1:1--::-41::-:1--::-(>(/:o>)\>:<)

32 bytes

1:1--::-41::-:1--::-((>/:o)\>:<)

A+B

101 bytes

::1:(/::-i:::-:1:1---(/:-4:4>-<->:::>-<--::::>>-<--:::>-<--::-<--::-<--i:::-:1:1---)\uu>u)\<--O1:1--o

88 bytes

::1:(/::(-i:::-:1:1---/:-4:4>-<->:::>-<--::::>>-<--:::>-<--::-<--::-<-)\uu>u)\<--O1:1--o

A-B

88 bytes

Made from A+B program, just a single byte changed:

::1:(/::(-i:::-:1:1---/:-4:4>-<->:::>-<--::::>>-<--:::>-<--::-<--::-<-)\uu>u)\---O1:1--o

FizzBuzz

392 bytes

Haven't been golfing for some time, hence this terrible result:

1:::-:1--::-4
(
  ::-:::1>>>>
  /<-<<1<:-:<<<\::-1-
  >/>>::->>>>->\::-1-
  <<
  />>>:O<<<\
  </::-41:::>-11<--::-1-:o:::::-44->-<--::-:1-1-:o::-:1-1:>-<-::-1-:oo>>>::-1::-4--<<<\
  </::-44::-:11:::>-<----:o:::>-:>14-<<--::-1-:o::-:4::-:1----:oo>>>::-:1-::-4--<<<\
  </::-41:::>-11<--::-1-:o::::::-44->-<--::-:1-1-:o::-:1-1:>-<-::-1-::oo>::-4-o<::::-4-::-1-ooo<<::-:4::-1---<::-:4-::-1-->>>\
  uuuu
  ::-1::-<-->
  ::-:1:1--o
)

223 bytes

Much better. Probably, different layout could save few more bytes:

4:4::-:11:::>-<----:::-<--<:::-:4-1-:::-:1:1>-<--:::-:4-::-1--
::-1:::-:1--::-4
(
  ::-1::>>>
  /<<:->>\
  >
  /<<:->>\
  <<
  /<<:-<:o<<:o<<::oo<<::-:4--::-1-<<\u<
  /<:-<<:o<<:o<::oo<<<::-:4-::-1--<\u<
  />>>:O<<<\u
  ::-1->::-1->::-:1--<<
  ::-:1:1--o
)

Primes

121 bytes

::1:::-:1--(<(/</::>-<\>/(/<<)\<:->:\-/<<\)\</<:::->>:O::-44::-11-::-1-o>\<::-:1--<(/:<::-:1--:>-/:-<\>/<<:->\-<<)\<:-1<)

120 bytes

::1:::-:1--(<(/</::>-<\>/(/<<)\<:->:\-/<<\)\</<:::->>:O::-44::-11-::-1-o>\<::-:1--(</:<::-:1--:>-/:-<\>/<<:->\-<)\<:-1<)

Quine

1713 bytes

::4>:14>:14>:4>:4>:1>:4>:11>:411>:14>:1>:1>:111>:41>:141>:4>:4>:1>:14>:14>:4>:4>:1>:4>:11>:14>:1>:1>:4>:111>:41>:4>:114>:44>:4>:4>:1>:4>:414>:144>:411>:41>:141>:4>:4>:4>:1>:11>:1>:141>:4>:1>:4>:144>:41>:141>:4>:4>:1>:4>:14>:14>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:14>:1>:141>:4>:1>:4>:144>:41>:141>:14>:4>:4>:1>:4>:11>:14>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:11>:11>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:11>:114>:44>:144>:41>:4>:4>:4>:1>:11>:14>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:14>:114>:44>:144>:41>:4>:4>:4>:1>:14>:11>:1>:141>:4>:1>:4>:144>:41>:141>:4>:4>:1>:11>:4>:11>:4>:41>:1>:44>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:14>:14>:1>:141>:4>:1>:4>:144>:41>:141>:4>:4>:1>:4>:11>:4>:4>:14>:41>:41>:1>:44>:1>:44>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:11>:11>:11>:1>:141>:4>:1>:4>:144>:41>:141>:111>:44>:144>:41>:4>:4>:4>:1>:11>:11>:14>:1>:141>:4>:1>:4>:144>:41>:141>:4>:4>:1>:4>:14>:1>:4>:11>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:11>:14>:11>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:14>:14>:4>:4>:1>:11>:4>:4>:1>:14>:1>:1>:111>:44>:144>:41>:4>:4>:4>:1>:11>:14>:14>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:14>:4>:4>:1>:4>:14>:14>:1>:4>:41>:1>:44>:1>:111>:44>:144>:41>:4>:4>:4>:1>:14>:11>:11>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:14>:11>:4>:4>:1>:11>:1>:111>:44>:144>:41>:4>:4>:4>:1>:14>:11>:14>:1>:141>:4>:1>:4>:144>:41>:141>:4>:1>:14>:11>:111>:44>:144>:414>:44::-:1(4--o>/::-44::-:14--:o>:O<::-:)\(>/:::-1-/:-:\>/::-:44--o<\>:::-4-/:-:\>/4::-:14--o<\>:::-11-/:-:\>/:-1O<\>:::-14-/:-:\>/:-4O<\>:::-41-/:-:\>/::-1:1:>-<--o<\>:::-44-/:-:\>/::-:1::4>>-<-<--o<\>:::-111-/:-:\>/o<\>:::-114-/:-:\>/::-:4-:1--o<\>:::-141-/:-:\>/:-44::-1::-4--o<\>:::-144-/:-:\>/:-4::-:44-:>-<-o<\>:::-411-/:-:\>/:-41::-1-o<\>:::-414-/:-:\>/:-41o<\)

BLC

Looping counter

148 bits

It uses right-fold list for internal operations, which is transformed into Church list. The output is an infinite binary string: 10110111011110...

0001010100010110100000010111000001001011100000110100000000001011110110010101011111011110000001011100000100101111110110101101000000001011011101100010

140 bits

Instead of ignoring the input, this version infinitely postpones it.

01010001011010000001011100000100101110000011010000000000101111011001010101111101111000000101110000010010111111011010110100000000101101110110

97 bits

Right-fold lists are not good for this problem. In this version Church numeral specifies number of 1's:

0001000101101000100000010110000001011000001011000010110000011001011110111000000111001011111011010

Kolakoski sequence

281 bits

Naive implementation:

00000101100000110000101100000100100010101101000010110000010000010000011000000001110000000010110111001010111111101111110010101011110001000000111001110100100011010000001010101100000000000100000110000101101111111011000010110011100000110010111101110011100000101100101111100000100000110

In human-readable form:

init_buffer   = cons false nil
append_buffer = λ value . M λ self buffer . (
                              isnil buffer
                              (cons value buffer)
                              (cons (car buffer) (self self (cdr buffer)))
                            )

main = λ input . cons true (
                   cons false (
                     (λ f . f f init_buffer true)
                     λ self buffer value . buffer (
                       λ head tail . cons head (
                         self self
                         (head 1 2 (append_buffer value) tail)
                         (value false true)
                       )
                     )
                   )
                 )

203 bits

Recursion-based, without a buffer:

00000101100000110000101100000100100011010000101010001101000000001010101110001000000111001110100000010110000010110011000000101010111000100000011100111010000001011000001101100110011111101111100000110011010

In human-readable form:

expand = M λ self head tail . (
             head 1 2
             (cons false)
             (tail (
               λ head tail .
                 head 1 2
                 (cons true)
                 (tail (self self))
               )
             )
           )

main = λ input . cons true (cons false (M λ self . cons true (self self) expand))

178 bits

Infinite right-fold lists are miracle:

0001000101100000110010110000010010100011010000001010001011000001100101111011101000000001010101111000100000011100111010011111010011100101100000100000110000010100000000101101110110

In human-readable form:

expand = λ l v f . l (λ el cont v . el 1 2 (f v) (cont (v false true))) v

main = λ input . (
         (
           λ f . f true (
             f false (
               M
               (λ self . expand (λ f . f true (self self f)) false)
               f
             )
           )
         )
         cons
       )

176 bits

It's exactly the previous one, but with 2-bits-shorter boolean invertor: λ v a b . v b a instead of λ v . v false true:

00010001011000001100101100000100101000110100000010100010110000011001011110111010000000010101011110001000000111001110100111110100111000000101111010110000010100000000101101110110

174 bits

Like the previous version but with some manually performed inlining (automated inliner failed to find it because the first step actually increased the program size):

000001011000001100001011000001001010001101000000101000101100000110010111101110100000000101010111100010000001110011101001111101001110000001011110101100000100000000101101110110

Truth-machine

70 bits

0001100000000101101110010111100000100100011010000001011011111001110110

In human-readable form:

λ input . input
          (
            λ b _ f . f
                      b
                      (
                        b
                        nil
                        (
                          (λ x . x x)
                          (λ self f . f b[1] (self self))
                        )
                      )
          )
  1. ↑ May be replaced with false (000010), wouldn't change the total length

58 bits

0001100000010001101000000101101111001011111000001001110110
λ input . input
          (
            λ b _ . (λ x . x x)
                    (λ self f . f b (b nil (self self)))
          )

Primes

325 bits

Two times larger than Tromp's program, and slower.

0100000001011000001100001011000001101111001000101011010000010000001110011101000000001000001011011001010111111011111000010101111011111000000101111111101100101110010100011010000000010110000011001010111000000101100000101100101111011101100000101111110100001110011000001000000111001011111101101001011100001011000001100000110000010

254 bits

Few optimizations here and there, inlined as much as possible. Still large and slow.

00010001000110011001010111011000100000100000010110000011011000000000010110010111000010110000011000001100000100101011111011110000001110010111111011010000001011111000011110011000001001011100100011010000101111111000000101100000101100001011000001100111011010

Quine

512 bits

Yes, Tromp's quine is much shorter (132 bits). But his quine prints not just its text but also additional input passed to stdin. This quine, on a contrary, can't be confused by stdin. It always prints itself and nothing else. The program consists of two identical parts, one of which is the code and another is the input. Number of input bits to be consumed by the program is limited by hard-coded constant. This version's constant is 256.

It could be shorter. Actually, it was padded with several copies of 01010000100010 (KII) to align program size to the constant's value. 216 was close enough, but program with this constant was 214 bits long, and I didn't find a way to provide 2 bit padding.

01010000100010010100001000100101000010001001010000100010000100011001100000100100010100010110000000011100000010111111010000101101110111100000101001010001010110000000011000000101111110000101101110111110100000110000010101100100011010010001101000000111001110100101000010001001010000100010010100001000100101000010001000010001100110000010010001010001011000000001110000001011111101000010110111011110000010100101000101011000000001100000010111111000010110111011111010000011000001010110010001101001000110100000011100111010

432 bits

Rewritten the code, now it's 134 bits + size of hard-coded constant. The nearest constant I managed to find is 216 (50 bits long), which required to add 32 bits of padding.

010100001000001001010000100000100001010000010111010010111010000010010101010100011000011100001110011101000000111001110011101000000001100000010111111000000101111111011001011101111010100000110000010100000000101101110110010100001000001001010000100000100001010000010111010010111010000010010101010100011000011100001110011101000000111001110011101000000001100000010111111000000101111111011001011101111010100000110000010100000000101101110110

In human-readable form:

nil    = λ f e . e
append = λ l el f e . l f (f el e)             // append to right-fold list
print  = LENGTH
         (λ cont acc list . cont (append acc (car list)) (cdr list))
         (λ acc list . acc)
         nil
quine  = λ input . (λ l f e . l f (l f e))     // duplicate "(print input)"
                   (print input)
                   (λ el cont f . f el cont)   // convert from right-fold list to Church list
                   nil

BLC8

Hello, world!

Both versions exploit the fact that all tail garbage from source file is prepended to the program's input. So, the string "Hello, world!\n" is stored in the source file as is (.rodata of some sort). The goal is to print only this string and not to print the remaining input.

28 bytes

Fixed-length reverse string printer. String length (14) is hardcoded:

51 99 99 99 99 99 99 98  30 0c 3e 16 de 08 0a 21
64 6c 72 6f 77 20 2c 6f  6c 6c 65 48            

In human-readable form it looks like this (but some function calls are in fact inlined):

hw = 14
     (λ cont acc list . cont (cons (car list) acc) (cdr list))
     (λ acc list . acc)
     nil

25 bytes

The string to be printed is terminated with a code with most significant bit set (not used by 7-bit ASCII subset):

46 81 81 5c 18 5b 97 ef  b0 40 48 65 6c 6c 6f 2c
20 77 6f 72 6c 64 21 0a  80                     

In decoded form:

hw = (λ x . x x)
     (λ self input . input (λ head tail . car head (cons head (self self tail)) nil))

Looping counter

45 bytes

Much worse result than PkmnQ's, but I have no idea (yet) how to represent output codes (0x2A and 0x0A) as 8-bit Church lists of Church booleans more compactly. They alone occupy more space that the rest of the program.

11 68 81 60 59 11 99 05  82 cd 81 60 d9 14 1c ce
6e 05 82 c0 b0 6c 16 16  44 66 66 c0 b0 6c 8a 0e
67 37 02 c1 60 58 36 09  7b 81 cb ed 00         

In human-readable form it looks like this:

bootstrap = λ f . f f 1
main_loop = λ self n . n (cons "*") (cons "\n" (self self (+1 n)))
main      = λ input . bootstrap main_loop

24 bytes

Output codes are stored in .rodata section. Better than previous one but still worse than PkmnQ's:

41 81 81 7f 7b 20 2a f7  16 80 17 81 6f 61 6c ab
f7 c0 e5 fd ae c0 2a 0a

17 bytes

I very much doubt it can be shortened any further:

18 18 14 68 16 05 bf d8  5b e5 ee 07 2f b4 40 2a
0a

In human-readable form:

λ input . input
          (
            λ asterisk t . t
                           (
                             λ nl _ . (λ x . x x)
                                      (λ self n . n
                                                  (λ b f . f asterisk b)
                                                  (λ f . f nl (self self (λ f x . f (n f x))))
                                      )
                                      1
                           )
          )

It's essentially the same as 24-bytes version, but everything that could be inlined is inlined.

Kolakoski sequence

38 bytes

Based on 203-bits BLC program with additional conversion from booleans to characters (which are stored in prepared input section):

18 18 05 be 16 f2 8d 0a  8d 00 ab 88 1c e8 16 0b
30 2a e2 07 3a 05 83 66  7e f8 33 48 d0 02 cb df
fb fc e7 de 31 32                               

29 bytes

Based on 178-bits BLC program:

18 18 11 60 cb 04 a3 40  a2 c1 97 ba 01 57 88 1c
e9 f4 e5 82 0c 14 02 cb  df df 60 31 32         

A+B

180 bytes

The program accepts arbitrary non-negative numbers:

51 98 30 0c a3 40 08 aa  c0 d8 0c a2 33 60 73 9e
7a 06 c0 4b fe 7f bd 9c  bf 7c 0b 95 e1 82 46 66
51 a0 16 cb dc 0e 5f 68  25 19 a0 73 a0 58 2c 19
7f 69 54 66 60 18 7c ac  40 39 7b 42 0e 74 fa 07
3a 0c 16 08 11 54 57 c0  36 17 7d e5 e0 1b 0b bd
f0 02 af 80 5b b2 34 0b  04 ec bc 00 2a ac 03 97
b4 bc 03 97 b5 f0 0a c0  d8 5f 70 39 7d a5 19 98
1b 03 9d 0b e0 72 fd a0  81 7f e9 7d fb 04 10 0a
b0 10 6f 2f d7 82 01 cb  e4 66 6f 28 cd 03 9d 00
e5 ed 44 b0 8c d8 1c e7  9e 82 01 65 51 99 80 55
80 5e 58 07 2f 6b 30 40  bf 0b 2e 02 0d f6 08 20
73 a0 c1 76                                     

Internally the numbers are represented as right-fold lists of decimal digits (Church numerals 0-9) starting from least-significant digit. The program's entry point:

main = 2 (λ c f i . BIGNUM:read i (λ v . c (f v))) K (λ a b . BIGNUM:print (BIGNUM:add a b) nil)

It exploits the intrinsic property of Church numerals of being a loop executor with fixed number of iterations. Particularly, here 2 calls BIGNUM:read twice, accumulating addition arguments in call to the specified functor f = λ a b . BIGNUM:print (BIGNUM:add a b) nil.

BIGNUM:read converts input bytes (represented as lists of boolean) into numeric ASCII codes, accumulates digits of number and stops accumulating when U+000A is encountered:

BIGNUM:read = λ input cont . input
                             (
                               M
                               (λ self n h t .
                                 (λ v .
                                   le v 10
                                   (cont n t)
                                   (t (self self (λ f g . f (-48 v) (n f g))))
                                 )
                                 (ord h)
                               )
                               nil
                             )

When LF is encountered (actually, any ASCII code less than or equal to 10 fits), the continuation cont is called with two parameters: integer entered and rest of the input list. The definition of some auxiliary functions:

le  = λ m n . m T (K true) (n T (K false))
-48 = nth (48 (cons 0) (M (λ self n . cons n (self self (+1 n))) 0))
ord = 8 (λ c s l . l (λ h . c (h I +1 (* 2 s)))) K 0

The core of the program is BIGNUM:add:

BIGNUM:add = (
               (λ f a b . a (K T) (K (f a b)) (b (K T) (K (f b a))))
               (λ a b f e . a
                            (λ x cx Y . Y x cx)
                            (M λ self Y . Y 0 (self self))
                            (
                              b
                              (λ y cy x cx carry . div10 (carry +1 (x +1 y)) (λ q r . f r (cx cy q)))
                              (λ x cx carry . is0 carry e (f carry e))
                            )
                            0
               )
             )

The first lambda exchanges arguments a and b if a is longer than b. It's similar to le function, but uses K T instead of T to skip payload and treat a right-fold list as a Church numeral.

The first argument of the first number (λ x cx Y . Y x cx) is used to delegate the call to the second number. The second argument of the first number (M λ self Y . Y 0 (self self)) is used to pad the first number with infinite number of zeroes. The actual addition is performed by the first argument of the second number. The second argument of the second number is used to extend the result with carry if it's non-zero. div10 functions produces both quotient and remainder:

div10 = λ n f . n (λ c q r . r T (K (c q (+1 r))) (8 T (K (c (+1 q) 0)))) f 0 0

Finally, the BIGNUM:print converts a number into Church list of bytes with trailing LF:

BIGNUM:print = λ n cont . (λ f . n
                                 (λ x c a . c (f (48 +1 x) a))
                                 I
                                 (f 10 cont)
                          )
                          (λ x . cons (chr x))
chr   = 8 (λ c l n . halve n (λ q r . c (cons (is0 r) l) q)) K nil
halve = λ n f . n (λ c q r . c (r +1 q) (r 0)) f 0 0

177 bytes

The following assumptions allowed to shorten the code a little bit:

  • -48 function is never called for argument value less than 48;
  • div10 functions is never called for argument value greater than 19.
51 98 30 0c a3 40 08 aa  c0 d8 0c a2 33 60 73 9e
7a 06 c0 4b fe 7f bd 9c  bf 7c 0b 95 e1 82 46 66
51 a0 16 cb dc 0e 5f 68  25 19 a0 73 a0 5a c1 97
f6 95 46 66 01 87 ca c4  03 97 b4 20 e7 4f a0 73
a0 c1 60 81 15 45 7c 03  61 77 de 5e 01 b0 bb df
00 2a f8 05 bb 23 40 b0  4e cb c0 02 aa c0 39 7b
4b c0 39 7b 5f 00 ac 0d  85 f7 03 97 da 51 99 81
b0 39 d0 be 20 81 7f e9  7d fb 04 10 0a b0 10 6f
2f d7 82 01 cb e4 66 6f  28 cd 03 9d 00 e5 ed 44
b0 8c d8 1c e7 9e 82 01  65 51 99 80 55 80 5e 58
07 2f 6b 30 40 bf 0b 2e  02 0d f6 08 20 73 a0 c1
76

Truth-machine

16 bytes

Same size as of User:PkmnQ but different:

18 11 a0 5b ca a8 8c d8  1c e7 a1 82 f0 60 9d 80

In human-readable form:

λ input . input
          (
            λ b _ . (λ x . x x)
                    (λ self f . f b (7 cdr b true nil (self self)))
          )

Essentially it's the same as 58-bit BLC Truth-machine but it has to extract the least significant bit of the input character (car (7 cdr b) or, more compact, 7 cdr b true). Constant 7 is brute-forced: 000100011001101100000011100111001111010.

FizzBuzz

153 bytes

14 15 46 80 15 70 65 60  cb f8 21 19 9b 03 9d 2f
e0 73 9c e8 1c e7 3a 56  0c bf 82 07 39 ce 85 7c
03 85 95 46 66 01 56 01  79 60 1c bd ac c1 02 fc
2c b8 08 37 d8 20 81 ce  83 04 8c cd f2 8c d0 39
d0 0e 5e d6 29 5f c2 33  36 07 3a 25 5f 78 15 f8
05 55 80 72 f6 b8 05 60  6c 2f b8 1c be d2 8c cc
0d 81 ce 85 f1 04 0b fd  3e c1 04 2a c0 41 b2 f5
89 c1 30 40 b8 a6 07 3a  60 73 9c e8 05 5c 03 02
fc 2d df 41 a5 e1 82 f0  8d 0b 81 60 b0 b0 67 60
7a 7a 75 42 7a 7a 69 46  0a                     

ROT13

234 bytes

Naive implementation with lots of constants hard-coded:

16 46 80 05 95 46 66 01  56 01 79 60 1c bd ac c1
02 fc 2c b8 08 37 d8 20  81 ce 83 04 aa a8 cc c0
30 f9 58 80 72 f6 84 1c  e9 f4 0e 74 18 2f 0c 12
8c a8 c3 9c e8 1c ea 15  11 9b 03 ce 73 a0 16 cf
03 97 da 15 11 9b 03 ce  73 a0 16 cf 03 97 da 14
66 66 66 15 11 9b 03 ce  73 a0 16 cf 03 97 da 15
11 9b 03 ce 73 a0 16 cf  03 97 da 15 46 66 81 ce
80 5b 3c 0e 5f 68 09 55  45 a6 01 cb da 07 39 d2
33 40 e7 40 39 7b 42 33  60 79 ce 74 03 97 b4 23
36 07 9c e7 4a 2d 30 0e  5e d0 39 ce 91 9a 07 3a
55 16 98 07 2f 68 1c e7  48 cd 03 9d 00 e5 ed 08
cd 81 e7 39 d0 0b 67 81  cb ed 28 b4 c0 39 7b 40
e7 3a 11 9b 03 9c f3 d0  39 51 87 39 d0 39 d6 91
95 18 73 9d 03 9d 42 33  60 79 ce 74 03 97 b4 02
d9 e0 72 fb 41 06 5e 7e  f8 82                  

Here I've learnt to translate input characters (which are represented as lists of booleans in BLC8) into ASCII codes and back (BLC8 analogs of the Python's ord and chr functions):

halve = λ n f . n (λ c q r . c (r +1 q) (r 0)) f 0 0
ord   = 8 (λ c s l . l (λ h . c (h I +1 (* 2 s)))) K 0
chr   = 8 (λ c l n . halve n (λ q r . c (cons (is0 r) l) q)) K nil

Next step is A+B (to improve my skills in long integer arithmetics). Strategic goal is e and pi - there's no chance to make them work using ordinary Church numerals as a backend, I need long arithmetics for them.

99 bytes

This version doesn't use hard-coded constants to define the ROT13 transformation table. Instead, the input consists of two parts. The first part (appended to the program itself) defines the transformation table, and the rest of the input (the actual input, stdin) is the text being transformed (which is free to contain any characters):

15 64 68 00 59 54 66 60  18 7c ac 40 39 7b 42 0e
74 fa 07 3a 0c 17 97 9f  be c1 28 d0 00 ab c0 41
97 23 40 02 ca a3 33 00  ab 00 bc b0 0e 5e d6 60
81 7e 16 5c 04 1b ec 10  40 e7 41 82 57 c3 05 ff
06 5e 7e fb 04 e0 59 7f  bf 95 f8 05 b3 c0 e5 f6
8f ed c1 04 85 7b 0d 61  0d 6e 06 5b 0d 41 0d 4e
41 00 00

Primes

122 bytes

14 56 82 07 3a 01 15 60  54 68 05 5c 04 1a 57 b9
5c 30 48 b4 10 28 8c d8  1c e7 9e 81 6e cb b0 39
7b 41 85 95 e1 82 54 68  01 6e 57 de 5c 1b 9c 10
48 d0 a3 30 2c 03 97 b5  81 ce 74 2c 04 ec 1b 61
61 19 b0 39 cf 3d 60 b2  be f0 aa e0 05 ec bb d0
4a 34 02 c1 95 c0 b0 59  7b b0 5d e1 cc 10 39 7d
a5 c2 c1 82 0c 8d 00 2c  af 0c 17 c1 9c fb c0 30
31 32 33 34 35 36 37 38  39 20                  

Quine

54 bytes

It was made from my shortest BLC Quine, length constant is 27:

14 17 4b a0 95 54 20 94  20 94 20 91 a0 73 9d 00
c0 bf 02 fe cb bd 41 82  80 5b b0 14 17 4b a0 95
54 20 94 20 94 20 91 a0  73 9d 00 c0 bf 02 fe cb
bd 41 82 80 5b b0

50 bytes

The same code, length constant is 25:

14 17 4b a0 95 54 20 90  73 a0 73 9c e7 40 30 2f
c0 bf b2 ef 50 60 a0 16  ec 14 17 4b a0 95 54 20
90 73 a0 73 9c e7 40 30  2f c0 bf b2 ef 50 60 a0
16 ec

e

187 bytes (FAILED)

Unfortunately, it's very slow and is able to print just few digits (2.7182818) before crash due to stack overflow. I consider e and pi generators successful if they print at least 10 times more digits than the program size. So, this version has failed:

15 55 1a 00 05 05 5f 80  83 4a be 02 0d 28 2a b8
1b 01 96 06 c0 4a ac 0d  80 cb 81 b0 13 ed dc af
f0 c1 28 d0 2f f0 2d d9  76 07 2f 68 20 ca fe 18
25 1a 05 fc 0b 76 5d 81  cb da 08 30 82 dd 95 57
fb f8 44 66 c0 e7 3c f4  ae 7e 15 81 67 04 0e 57
c1 68 58 20 83 7f 42 23  36 07 39 e7 a5 73 e1 58
16 70 40 e5 7c 16 85 82  08 37 eb dd 95 57 f7 e5
f9 60 c0 39 7b 5e f9 79  60 c0 39 7b 5b 98 22 08
22 45 81 ce 94 68 17 89  7a 5e 25 d9 19 b0 0e 5e
d0 39 d0 0b 76 01 65 78  60 bc 18 59 51 19 b0 39
cf 3d 0c 17 c1 9e 46 80  16 57 86 0b fe 0c e7 de
30 31 32 33 34 35 36 37  38 39 2e

Brainfuck

Looping counter

54 bytes

Worse than PkmnQ's but it's the best I could (so far):

++++++++++[>+>++++<<-]>>++>>+[[[<]<.>>[>]+<-<]<<.>>>+]

Kolakoski sequence

176 bytes

Implementation with logarithm memory consumption and o(n) time complexity can be found here: User:Blashyrkh/Kolakoski-brainfuck

84 bytes

Naive but short (it moves data array to the left after each step to restore the memory layout):

+++++++[->+++++++<]>.+..->>++[[[>]+[<]<.>>-]>[[>]++[<]<<+.->>>-]>[[-<<+>>]>]<<<[<]>]

80 bytes

Like the previous one but moves ASCII constants to the right after each step:

+++++++[->+++++++<]>.+..->>++[[[>]+[<]<.>>-]>[[>]++[<]<<+.->>>-]<<<[->>+<<]>>>>]

74 bytes

Like the previous one but more dense memory layout:

+++++++[->+++++++<]>.+..->++[[[>]+[<]>.>-]>[[>]++[<]<+.->>-]<<[->>+<<]>>>]

Quine

415 bytes

I wrote this one in 2012:

->++>+++>+>+>+++>>>>>>>>>>>>>>>>>>>>>>+>+>++>+++>+++>+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+>++>>>+++>>>>+++>>>+++>+>>>>>>>++>+++>+++>+>>+++>+++>+>+++>+>+++>+>++>+++>>>+>+>+>+>++>+++>+>+>>+++>>>>>+++>+>>>>>>>>>++>+++>+++>+>>+++>>>+++>+>+++>+>++>+++>+>+>++>+++>+>+>>+++>>>+++>+>>>++>+++>+++>+>>+++>>>+++>+>+++>+>++>>>+++>++>>>+++>>+[-[->>+[>]+>+[<]<]>>+[>]++++>++[<]<<+]>>>[>]+++>+[+[-<++++++++++++++++>]<++++++++++.<]

Hot

Looping counter

154 bytes

S(S(KS)(SK))K(S(S(KK))(K(SS(SKK)(S(K(S(S(KS)(S(SSS(K(S(KS)K)))(K(S(S(KS)K)(SKK))))))))(S(K(S(K(S(S(KS)(S(KS)K))))))(S(S(SSK(K(S(S(KS)K)))))(SKK)))(SKK))))

Kolakoski sequence

476 bytes

S(S(KS)(SK))K(S(KK)(S(S(SS(SKK)(S(SS(SS(K(S(S(S(KS)))(KK))))(K(S(KS)K)))(S(S(SKK)(S(KS))(S(K(S(KS)K))))(K(S(KK)(S(K(S(SKK)))(S(S(KK))(SKK))))))))(K(SK)))(K(S(S(SKK)(KK))(K(SS(SKK)(S(S(S(K(S(K(S(S(SKK)(K(SK)))))K)))(SKK)))(K(SS(SKK)(S(K(S(S(KS)(S(KK)(S(S(S(SKK)(K(S(S(KS)K)(SKK))))(SK))(K(S(K(S(S(SKK)(KK))))K))))))))(S(KK)(S(K(S(SKK)))(S(KK)(S(K(S(S(KS)(S(KK)(S(S(S(SKK)(K(S(S(KS)K)(SKK))))(SK))(K(S(K(S(S(SKK)(K(SK)))))K)))))))(S(KK)(S(K(S(SKK)))(S(S(KK))(SKK))))))))))))))))

297 bytes

Based on 178-bits BLC program:

S(S(KS)(SK))K(S(KK)(S(K(S(S(SKK)(K(SK)))(S(S(SKK)(KK))(SS(SKK)(S(S(K(S(KS)(S(S(KS)K)(K(S(K(S(K(S(K(SSS(K(S(S(KS)K)))(K(K(S(S(SKK)(K(SK)))(KK))))))S))))(S(K(S(S(KS)(S(KK)(S(S(SKK)(K(S(S(KS)K)(SKK))))(SK))))))K))))))(S(S(K(S(S(SKK)(K(SK))))))(SKK))))(K(KK))))))(S(S(KS)(SS(S(S(S(KS))))(KK)))(SKK))))

Truth-machine

78 bytes

S(S(KS)(SK))K(S(K(S(S(S(KS)(SSK))(K(S(K(SS(S(S(KS)K))(K(S(SKK)(SKK))))))))))K)

Immutable Brainfuck

Hello, world!

125 bytes

0010100011000010100100111001101110100111111110111111011110000010100110101111101110011011100110111101001110001001[0>.>>>>>>>>]

Looping counter

62 bytes

10100001010100000000[>>>>[>>>.>>>>][<<<<<<<]>>1010100<<<<<<1>]

Truth-machine

34 bytes

,>.>>>>>>>[1]>[<<<<<<<<.>>>>>>>1>]

Lazy K

Hello, world!

467 bytes

`k```s``s``s`s``s``s``s``s``s``s``s```````````ss`ss``ssk`s``s`kski``s```s`sis`k``s`ksk`k``s`k`s``s`ks``s`k`sik``s`kkki`k```s`s``ssi`s``s`kski````si`ss```ssk`s``s`kski````s`s``ssi``ssk`s``s`kski``````ssk``s`si```sss`ks`sski```s``s```ssi``sss`sks``s`ksk```s`s``ssks``s`ksk`````s`sss```ssk`s``s`kski`s``s`ksk`k```ss``s`s`sis`k``s``s`kski`k````sis```s`ssk```ssk`s``s`kski```s`s``ssks``s`kski```s``s`k``sss`sis``s`ksk````ss`ss`s`k```ssk`s``s`ksks````s`si`ss`ss`k`s``s`kski

465 bytes

```s``s``s`s``s``s``s``s``s``s``s```````````ss`ss``ssk`s``s`kski``s```s`sis`k``s`ksk`k``s`k`s``s`ks``s`k`sik``s`kkkk`k```s`s``ssi`s``s`kski````si`ss```ssk`s``s`kski````s`s``ssi``ssk`s``s`kski````si`s``ssk```sik`s``s`kski```s``s```ssi``sss`sks``s`ksk```s`s``ssks``s`ksk`````s`sss```ssk`s``s`kski`s``s`ksk`k```ss``s`s`sis`k``s``s`kski`k````sis```s`ssk```ssk`s``s`kski```s`s``ssks``s`kski```s``s`k``sss`sis``s`ksk````ss`ss`s`k```ssk`s``s`ksks````s`si`ss`ss`k`s``s`kski

Looping counter

133 bytes

`k`````ssi`s`k`s``si`k``s`k`s``si`k````s`s``ss`ski`s``s`kskik``s`k`s`k``s`k`s``si`k````si`ss```ssk`s``s`kskik``s`s```ssk`k`s``s`kskii

Kolakoski sequence

309 bytes

Based on 203-bits BLC program, with booleans replaced with numbers 1 and 2. Before output 48 is added to the value:

`k``````ssi`s`k`s``s`ks``s`k``s```sik```ss`ss`kk``s`ks``s`k`sik```s``s``s``ss`s`s``s`ssik`ski`s``s`ksk``s`kk``s`k`si``s`s`kkii``s``si`k``s``s`kski`k````ssi``s`s``s`kss`s`k````ssi`s`k`s``s`ks``s`s`kk`k``s`k`s``si`k``s``s`kskik``s`kk``s`k`si``s`kk``s`k`s``s`ks``s`s`kk`k``s`k`s```sskik``s`kk``s`k`si``s`s`kki`sk

In human-readable form:

expand = M λ self head tail . (
             head
             (cons 2)
             (tail (
               λ head tail .
                 head
                 (cons 1)
                 (tail (self self))
               )
             )
           )

main = λ input . (
         (cons 1 (cons 2 (M λ self . cons 1 (self self) expand)))
         (M λ self head tail . cons (48 +1 head) (tail (self self)))
       )

263 bytes

Based on 178-bits BLC program:

`k```s```sski```s``s`ks`si```ssi``s`k`s``s`k```si`s`k`s`k````sss`k`s``s`ksk`k`k``s``s``si`k``s`k`sik`k`k``s``s`kski`k``si`k`sk``s`k`s`ks``s`k`s``s`kskk``s`s`k`s```sskii`s`kk`k``s``s`kski``s``s`ks``s`kk``s`ks``s`k`si``s`kk```s``s``s``ss`s`s``s`ssik`ski`s``s`ksk`kk

Truth-machine

161 bytes

``si`k``s`kk``s``s`k`````s``ss`s`s``sisk`s``s`kski``s`k`sik```si`s`k`s``s`ks``s`k`sik``s`s`k`s`kki``s``si`k``s`k`sik``s`kk``s`k`s``ss`k`k`k```s`s``ssi`s``s`kskik

Primes

975 bytes

`k``````ssi`s``s`ks``s`k`s`k``s`ks``s`k`s``s`ks``s`k`s``s``si`k``s``s`ks``s`kk````ssi`s`k`s``s`ks``s``si`k`k`sk`kk``s``s`ks``s`k`s`k``s`ksk``s``s`ks``s`s`kki`k``s``s``si`k``si`k`sk`k`````ssi`s`k`s``s`k````si`ss```ssk`s``s`kski``s``s`ks``s`kk``s`ks``s`k`sik`kk``s``s`ks``s`s`kki`k`s``s`ksk`sk`kk`k``s`k``s``s`ks``s`kk``s`ks``s`k`sik`kk``s`k```s``s``s``ss`s`s``s`ssik`ski`s``s`ksk``s``s``si`k``si`k`sk`k``````ssi`s`k`s````sik``s`ks```ss`ss`kk``s`ks``s`k`sik``s`k`s`k``ss`k``si`k`sk``s```si``ss`sk`s`k``s`ksk`k``s`k`s``si`kkk`sk````ssi`s`k`````ss`ss``ss`sk``s`ksk``s`k`s``si`k`s``s`kskk``s`s`k``s`k`s``si`k`k`skki`kk`k``s`k`s``si`k```ss``s`s`sis`k``s``s`kskik`k`skk``s```sss`ks`k``s`kk`s``s`ksk``s```si``si``ss`sk`s`k``s`ksk`k``s`k`s`k`s`k````sss`k`s``s`ksk`k`k``si`k`sk``s`k`s``s`ks``s`k`s``s``si`k``s`k`s``s`ks`s`k``s`ksk``s`kk``s`k`sik`k`sk``s`kk````ssi`s`k`s`k``s`k`s``si`kkk``s`k``ss`k`k`sk``s`s`k`s``si`k``s`k`s``si`k`skki``s`kkk`k``s``s`ss`k``s``ss`ks`kk`kk`sk``s``s`kski

Quine

2523 bytes

``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````k``k``k``k```skk```s`s``skks`k`````s`s``s`s`s``skk``skks``s`ksk``skk``skkkkkk``s``s`ks``s`kk``s`ksk`k``s`k``s`k`s``s`ks``s`k`s``skk```ss`s```ssk``ss``s`s``sssk`kk`s`kkk``s`kk``s`k``s`k````ss``skk`s`k`s``s``s``s``skk`k`k`k`k`sk`kk`k`k`````sss`k``s`ss``s`sskkk``s`k``s`k`s``s`ks``s`k`s``skk```ss`s`s`k``s`k``````s``skks`s``s``ss``skk`k`s``s`ksk``skk``skk`s``s`ksk``s``s``ss`k``ss`k`k``s``s``skk`k````s`sss```ssk`s``s`ksk``skk`k``s``s``skk`k````ss````ssss`ss`k`s``s`ksk``skk`k`k`````ssss``ss`sk``s`ksk`k``s``skk`k`sk`kk`kk`s`kk``s``s`ks``s`s`kk``skk`k``s``skk`k`sk``s``s``skk`k`k`sk``s```ssk``skk``s``s``skk`k``s``s``skkk`k```ss``ss`sk``s`ksk`k`sk````ss``skk````sss`k``s`ks``s`kks``s``s``skk`k`k`k`k`sk`kk``s``s`ks````s``skkk``s`ks`s`k``s`ksk``s``s`ks``s`s`kk``skk`k``s``skk`k`sk`k``s`s`s`k`s`s`k``s``s`ks``s`kk``s`ks``s`k`s``skkk`kk`kk`skiiiiikiikiikiikiiiskkiiisisiiskksikiiiiisisiisisisiiskkiiskksiisikskiiskkiiskkkkkkiisiisiksiisikkiisikskikiisikiisikisiisiksiisikisiiskkiiissisiiisskiissiisisiissskikkisikkkiisikkiisikiisikiiiissiiskkisikisiisiisiisiiskkikikikikiskikkikikiiiiisssikiisissiisisskkkiisikiisikisiisiksiisikisiiskkiiissisisikiisikiiiiiisiiskksisiisiissiiskkikisiisikskiiskkiiskkisiisikskiisiisiissikiissikikiisiisiiskkikiiiisisssiiisskisiisikskiiskkikiisiisiiskkikiiiissiiiissssissikisiisikskiiskkikikiiiiissssiissiskiisikskikiisiiskkikiskikkikkisikkiisiisiksiisisikkiiskkikiisiiskkikiskiisiisiiskkikikiskiisiiisskiiskkiisiisiiskkikiisiisiiskkkikiiissiissiskiisikskikiskiiiissiiskkiiiisssikiisiksiisikksiisiisiiskkikikikikiskikkiisiisiksiiiisiiskkkiisiksisikiisikskiisiisiksiisisikkiiskkikiisiiskkikiskikiisisisikisisikiisiisiksiisikkiisiksiisikisiiskkkikkikkisk

Certain fragments of this code were bruteforced:

  • Church numerals 3, 9, 11, 256 for SK basis
  • Church numerals 19, 96, 841 for SKI basis, then converted to SK (may be sub-optimal in SK, the search is going on)
  • Function which converts I/K/S to 0/1/2

The central part of the quine ("engine") is expressed in SK basis only (without using i). The data section is exactly the same as the engine but ` is replaced with i combinator. The engine consumes data elements one by one and builds a list, then the list is transformed to represent all 3 sections of the quine, converted to text form and returned (i.e. printed). Data section is not terminated with some special terminator code. Instead, its length is hardcoded into engine and is equal to 841 in this particular quine. So, the total size of this Quine is 841*3=2523 (841 ` signs, then the 841-bytes long engine, then the data array of 841 elements).

It can (and it will) be reduced further if/when I find SK representation for some other numeric constants.

1875 bytes

Right fold lists are miracle!

``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````k``k``k``k``k``k``k``k```skk````ss`ss````ssk``ss`sks``s`kskkkkkkkkk``s``s`ks``s`kk``s`ksk`k``s``s`ks``s`kk``s``s`ks``s`kk``s`k```sss`ks`s`kk`k``s`k`s``skkk`k``s```ssk``ss``s`s``sssk`kk``s`kk``s``s``s``s`ks``s`k`s`k``s`ksk``s``s`ksk`k``s`s`kk`k`sk``s``s`k```sss`ks`s`kk``s``s`ksk`k``s``s`ksk`k``s``s``skkk`k```ss``ss`sk``s`ksk`k``s``s`ks``s`kk``s`ks``s`k`s``skk``s`k```ss`s`s`k``````s``skks`s``s``ss``skk`k`s``s`ksk``skk``skk`s``s`ksk`kk``s``ss`k``ss`k`k``s``s``skk`k````s`sss```ssk`s``s`ksk``skk`k``s``s``skk`k````ss````ssss`ss`k`s``s`ksk``skk`k`k`````ssss``ss`sk``s`ksk`k``s``skk`k`sk`kk`k`k`````sss`k``s`ss``s`sskkk`skiiiiikiikiikiikiikiikiikiikiiiskkiiiississiiiisskiissisksiisikskkkkkkkkkiisiisiksiisikkiisikskikiisiisiksiisikkiisiisiksiisikkiisikiiisssiksisikkikiisikisiiskkkikiisiiisskiissiisisiissskikkiisikkiisiisiisiisiksiisikisikiisikskiisiisikskikiisisikkikiskiisiisikiiisssiksisikkiisiisikskikiisiisikskikiisiisiiskkkikiiissiissiskiisikskikiisiisiksiisikkiisiksiisikisiiskkiisikiiissisisikiiiiiisiiskksisiisiissiiskkikisiisikskiiskkiiskkisiisikskikkiisiissikiissikikiisiisiiskkikiiiisisssiiisskisiisikskiiskkikiisiisiiskkikiiiissiiiissssissikisiisikskiiskkikikiiiiissssiissiskiisikskikiisiiskkikiskikkikikiiiiisssikiisissiisisskkkisk

1755 bytes

Found short enough representation for constant 585, inlined some functions' arguments.

```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````skk``s`k````s```ss`ss``ssss``s`ksk`sk``````sss``ssss``s`ksk``skk``s``s`ks``s`kk``s`ksk`k``s``s`ks``s`kk``s`k```sss`ks`s`kk`k``s`k`s``skk``s`kk``s```ssk``ss``s`s``sssk`kk``s`kk``s``s``s`ks``s``s`ksk`k``s`s`kk`k`sk``ss``s``s`ks``s``s`ksk`k``s``s`ksk`k``s``s``skkk`k```ss``ss`sk``s`ksk`k`k`k`````sss`k``s`ss``s`sskkk`k``s``s`ks``s`kk``s`ks``s`k`s``skk``s`k```ss`s`s`k``````s``skks`s``s``ss``skk`k`s``s`ksk``skk``skk`s``s`ksk`kk``s``ss`k``ss`k`k``s``s``skk`k````s`sss```ssk`s``s`ksk``skk`k``s``s``skk`k````ss````ssss`ss`k`s``s`ksk``skk`k`k`````ssss``ss`sk``s`ksk`k``s``skk`k`sk`kk`skiiiiiiskkiisikiiiisiiississiissssiisikskiskiiiiiisssiissssiisikskiiskkiisiisiksiisikkiisikskikiisiisiksiisikkiisikiiisssiksisikkikiisikisiiskkiisikkiisiiisskiissiisisiissskikkiisikkiisiisiisiksiisiisikskikiisisikkikiskiissiisiisiksiisiisikskikiisiisikskikiisiisiiskkkikiiissiissiskiisikskikikikiiiiisssikiisissiisisskkkikiisiisiksiisikkiisiksiisikisiiskkiisikiiissisisikiiiiiisiiskksisiisiissiiskkikisiisikskiiskkiiskkisiisikskikkiisiissikiissikikiisiisiiskkikiiiisisssiiisskisiisikskiiskkikiisiisiiskkikiiiissiiiissssissikisiisikskiiskkikikiiiiissssiissiskiisikskikiisiiskkikiskikkisk

Quaternions

Hello, world!

170 bytes

1=+++=+=1+*.1=++++=+=*=1+.1=++=++=++=+++..=i`1=++++=+=1+*=1+.=i`1=++++=+=1+=+++.1=+++=+++=+.=i`1=+++=+++=1+=++++++.i``^.1=++=++=+=1+=+=++.k`j`^.1=++++=+=*.i``1+.1=++++=+.

Looping counter

79 bytes

Couldn't beat User:Cleverxia's record, but it's my first Quaternions program anyway:

1=++=+=1+*=i`1=+=++++=i`1={{1-=--=i`1+=i`^.i``^}1=i`^{1-=--=i```1+=i`^}i``^.i`}

58 bytes

It uses a trick which I call "instant copy":

1=++=+=1+*=i`1=+=++++=i`{1+=i*`=j*={k+=i`^.i```^}i``^.i`^}

55 bytes

1=++=+=1+*=i`1=+=++++={i`1+=i*`=j*={k+=i`^.i```^}i``^.}

Kolakoski sequence

325 bytes

It's terribly slow, generation of each digit takes exponential time:

1=+++=+++=++=1+=.i`1=++++=*=+=..i``1={^{1-=--=(j`1=i`1-=--=k`1=)k```1+=k`1-=--=}j`1-=(k`^.i``1+=k`)^-=k`^.j```^{1-=--=(k`1-=--=j`1=i`1=)k`1+=k```1-=--=}i```1-=(j`^.k`1=j```^{1-=--=k`1+=i`^+=j```^}1=k`^{1-=--=k```1+=k`^}i`^{1-=--=k`1+=k```^}i```)^-=1=j`^.i`^{1-=--=k`^+=i`1+=j```^}k`^{1-=--=j```1+=j`^}i`^{1-=--=j```1+=j`^}k`}

Truth-machine

21 bytes

1=+++=+++=++=,.-{+.1}

The Church

Kolakoski sequence

179 bytes

Based on 309-bytes Lazy K program:

*10(*1*)(^11*^1(^12*^1(^(+1^+^)(^(+2^)^)*(^**1(^11))*^1(^(+1^+^)(^(+2^)^)*21^**1(**^1^*^1(^**1(^11))**1***)*^****1(^1(^**1(^12)))))))1(^(+1^+^)(^(+2^)^)*^****1(+1(6*8)*(^****1^)))

161 bytes

Based on 263-bytes Lazy K program.

*10(*1*)((^+^12+^11)*^1(^(+1^+^)(^(+2^)^)*^**1(^+^11)*(21**^1(*1(**^1(*1^))**1(21**^1(+1(^1^*^1(*10(*1*)2)*^2(*10(*1*)1)*^))***^1*))**1^)*^12))1(+1(6*8)*^****1^)

Truth-machine

113 bytes

^1((^+^1^+((^+1)*^11***^1(***10))1((^+1)*^11*(21^**1(^**1(+1^)**)))*72^)*^1(^***^2((***10)1224)*(***10))*(***10))

Котята-арбузята

Looping counter

37 bytes

This program doesn't use data queue at all, only the signal queues:

}0[
  '0
]
}1[
  '1
]
'0'1
+
<0[
  :42
  ^0
]
<1[
  :10
  ^0
  ^1
]

Kolakoski sequence

139 bytes

}1['1'8]
}2['2'9]
}4[
  !1
  }8['5]
  }9['7]
  '3
]
}5[
  !2
  }8['4]
  }9['6]
  '3
]
}6[
  !1'4
]
}7[
  !2'5
]
'1'2'2
!1
'4
+
<1[:49]
<2[:50]
<3[^%]
<4[^4]
<5[^5]
<6[^6]
<7[^7]
<8[^8]
<9[^9]

Quine

3756 bytes

}0[!33!5!49!5!39!5!48!5!93!5!125!5!53!5!91!5!33!5!50!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!39!5!48!5!93!5!125!5!51!5!51!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!49!5!33!5!50!5!33!5!53!5!49!5!39!5!48!5!93!5!125!5!51!5!53!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!49!5!33!5!50!5!33!5!53!5!51!5!39!5!48!5!93!5!125!5!51!5!55!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!49!5!33!5!50!5!33!5!53!5!53!5!39!5!48!5!93!5!125!5!51!5!57!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!49!5!33!5!50!5!33!5!53!5!55!5!39!5!48!5!93!5!125!5!52!5!51!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!50!5!33!5!50!5!33!5!53!5!49!5!39!5!48!5!93!5!125!5!52!5!52!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!50!5!33!5!50!5!33!5!53!5!50!5!39!5!48!5!93!5!125!5!52!5!54!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!50!5!33!5!50!5!33!5!53!5!52!5!39!5!48!5!93!5!125!5!52!5!56!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!50!5!33!5!50!5!33!5!53!5!54!5!39!5!48!5!93!5!125!5!52!5!57!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!50!5!33!5!50!5!33!5!53!5!55!5!39!5!48!5!93!5!125!5!53!5!48!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!52!5!56!5!39!5!48!5!93!5!125!5!53!5!49!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!52!5!57!5!39!5!48!5!93!5!125!5!53!5!50!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!48!5!39!5!48!5!93!5!125!5!53!5!51!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!49!5!39!5!48!5!93!5!125!5!53!5!52!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!50!5!39!5!48!5!93!5!125!5!53!5!53!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!51!5!39!5!48!5!93!5!125!5!53!5!54!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!52!5!39!5!48!5!93!5!125!5!53!5!55!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!53!5!39!5!48!5!93!5!125!5!53!5!56!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!51!5!33!5!50!5!33!5!53!5!54!5!39!5!48!5!93!5!125!5!54!5!48!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!52!5!33!5!50!5!33!5!52!5!56!5!39!5!48!5!93!5!125!5!54!5!51!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!52!5!33!5!50!5!33!5!53!5!49!5!39!5!48!5!93!5!125!5!57!5!49!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!55!5!33!5!50!5!33!5!52!5!57!5!39!5!48!5!93!5!125!5!57!5!51!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!55!5!33!5!50!5!33!5!53!5!49!5!39!5!48!5!93!5!125!5!57!5!52!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!53!5!55!5!33!5!50!5!33!5!53!5!50!5!39!5!48!5!93!5!125!5!49!5!50!5!53!5!91!5!33!5!51!5!51!5!33!5!50!5!33!5!52!5!57!5!33!5!50!5!33!5!53!5!48!5!33!5!50!5!33!5!53!5!51!5!39!5!48!5!93!5!125!5!49!5!91!5!39!5!49!5!93!5!125!5!50!5!91!5!33!5!49!5!125!5!49!5!91!5!125!5!53!5!91!5!33!5!50!5!125!5!53!5!91!5!39!5!49!5!93!5!125!5!50!5!91!5!39!5!52!5!46!5!93!5!39!5!49!5!93!5!125!5!49!5!91!5!39!5!48!5!93!5!39!5!51!5!93!5!125!5!50!5!91!5!39!5!50!5!93!5!39!5!50!5!93!5!43!5!60!5!48!5!91!5!94!5!37!5!93!5!60!5!49!5!91!5!94!5!63!5!93!5!60!5!50!5!91!5!58!5!35!5!94!5!37!5!93!5!60!5!51!5!91!5!60!5!48!5!91!5!94!5!63!5!93!5!60!5!49!5!91!5!58!5!35!5!94!5!37!5!93!5!94!5!48!5!93!5!60!5!52!5!91!5!44!5!93!5!58!5!49!5!50!5!53!5!58!5!52!5!56!5!58!5!57!5!49!5!94!5!48!5!1'0]}5[!2!33!2!53!2'0]}33[!33!2!51!2!51'0]}35[!33!2!51!2!53'0]}37[!33!2!51!2!55'0]}39[!33!2!51!2!57'0]}43[!33!2!52!2!51'0]}44[!33!2!52!2!52'0]}46[!33!2!52!2!54'0]}48[!33!2!52!2!56'0]}49[!33!2!52!2!57'0]}50[!33!2!53!2!48'0]}51[!33!2!53!2!49'0]}52[!33!2!53!2!50'0]}53[!33!2!53!2!51'0]}54[!33!2!53!2!52'0]}55[!33!2!53!2!53'0]}56[!33!2!53!2!54'0]}57[!33!2!53!2!55'0]}58[!33!2!53!2!56'0]}60[!33!2!54!2!48'0]}63[!33!2!54!2!51'0]}91[!33!2!57!2!49'0]}93[!33!2!57!2!51'0]}94[!33!2!57!2!52'0]}125[!33!2!49!2!50!2!53'0]}1['1]}2[!1}1[}5[!2}5['1]}2['4.]'1]}1['0]'3]}2['2]'2]+<0[^%]<1[^?]<2[:#^%]<3[<0[^?]<1[:#^%]^0]<4[,]:125:48:91^0