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.

填字

From Esolang
Jump to navigation Jump to search
填字
Paradigm(s) String rewriting?
Designed by WFLing aka. 找不到北
Appeared in 2025
Computational class Turing complete
Major implementations Official Site (Online Interpreter), Git Repo
Influenced by Lvory's 填字

填字, more specifically 薨机填字 (for ASCII representation, use its Pinyin Tianzi) is a not-that-esoteric domain-specific templating language created by WFLing aka. 找不到北 in 2025.

It is (at least intended to be) practical for daily use. About tens of people use 填字 every day, though it's for fun rather than to solve practical problems.

While NOT being designed as an esolang, it IS "kind of" esoteric.

You can read its full manual here on its official website (currently available only in Chinese).

KV

(填字's key visual)

Computational class

填字 is Turing complete. It's obvious since it can execute embedded Python code. But without Python, it "is not intended to be" Turing complete, as its design forbids running infinitely and is guaranteed to halt. (Nobody wants to use a template language which may never stop inpreting and throw some result out, right?)

Examples

Hello, world!

Hello, World!

brainfuck interpreter

[[[[[[[[(brainfuck code here)]]]]:2:-2]]>code]][[100>maxlen]][[172>maxstep]][[0>le]][[config<eig>]][[[[[[#+[[<le]] [[#-1 [[#//1 [[#+1 [[#**[[#+-1 [[[[[[<code]]:[[<i]]]]:d]]1]] 2]]]]]]]]]]>le]]**[[<maxlen]]>i]][[config<er>]][[config<cb>]][[[[0>a[[<i]]]]**128>i@-64]][[0>pt]][[0>ls]][[0>rs]][[1>rn]][[[[[[[[[[<code]]:[[<ix]]]]:d]]>cr]][[[[[[<ix]]>lb[[<ls]]]][[[[#+1 [[<ls]]]]>ls]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 91]] 2]]]]]]]][[[[[[#-[[<ls]] 1]]>ls]][[[[<lb[[<ls]]]]>rl[[<ix]]]][[[[<ix]]>lr[[<lb[[<ls]]]]]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 93]] 2]]]]]]]]**[[<le]]>ix]][[0>ix]][[[[[[[[[[[[<code]]:[[<ix]]]]:d]]>cr]][[[[[[#+1 [[<pt]]]]>pt]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 62]] 2]]]]]]]][[[[[[#-[[<pt]] 1]]>pt]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 60]] 2]]]]]]]][[[[[[#%[[#+[[<a[[<pt]]]] 1]] 256]]>a[[<pt]]]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 43]] 2]]]]]]]][[[[[[#%[[#-[[<a[[<pt]]]] 1]] 256]]>a[[<pt]]]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 45]] 2]]]]]]]][[[[[[<a[[<pt]]]]:u]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 46]] 2]]]]]]]][[[[[[[[<lr[[<ix]]]]>ix]]**[[#//1 [[#+1 [[#**[[<a[[<pt]]]] 2]]]]]]]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 91]] 2]]]]]]]][[[[[[[[<rl[[<ix]]]]>ix]]**[[#-1 [[#//1 [[#+1 [[#**[[<a[[<pt]]]] 2]]]]]]]]]]**[[#//1 [[#+1 [[#**[[#-[[<cr]] 93]] 2]]]]]]...]][[[[#+1 [[<ix]]]]>ix]][[[[0>rn]]**[[#//1 [[#+1 [[#**[[#-[[<ix]] [[<le]]]] 2]]]]]]]]**[[<rn]]]]**[[<maxstep]]]]

As 填字 itself does not accept any input, it can't interprete "," from standard brainfuck (just simply can't interprete, rather than use the "!" extension. emmm...). Also, though many brainfuck code can be pasted here directly without any modification, those with consecutive brackets like [[ or ]] must be escaped.

It has infinite cells for memory, but only 128 of them, 64 on left and 63 on right, are initialized with 0. Change the **128 to control how many cells to initialize. The official interpreter limits execution to 172 steps, due to the interpreter's built-in anti-abuse mechanics, but you can remove that in your own fork/copy for more steps.

It takes about 9 seconds to run a standard brainfuck Hello, World! program with this interpreter on i7-13700KF, with all restrictions and overhead like console logging disabled.

Quine (trivial)

Hello, World!

This IS a quine. 填字 treats anything it cannot recognize as plain text and returns them as is.

Quine

[[[[[[[[[[[[91:u]]*8]][[<v]][[[[93:u]]*4]]:2:-2[[[[93:u]]*2]]>v[[[[93:u]]*2]][[<v]]]]]]:2:-2]]>v]][[[[91:u]]*8]][[<v]][[[[93:u]]*4]]:2:-2[[[[93:u]]*2]]>v[[[[93:u]]*2]][[<v]]

This is the most direct implementation, not the shortest one.

Click here to run this on the online interperter.

99 bottles of beer

[[[[[[#-99 [[<i]]]]>n>]] bottles of beer on the wall,
[[<n]] bottles of beer.
Take one down, pass it around,
[[#-[[<n]] 1]] bottles of beer on the wall.

**97>i]]

1 bottle of beer on the wall,
1 bottle of beer.
Take one down, pass it around,
No bottles of beer on the wall.

Like the quine above, this is also the most direct implementation, so the last segment is just simply pasted here rather than using some conditionals.

Well, actually 填字 DOESN'T have if-else constructs yet. You have to use an implementation of Kronecker δ function, then feed its output into a Repeat.

Click here to run this on the online interperter.

FizzBuzz

[[[[[[#//1 [[#+1 [[#%[[<i]] 3]]]]]]>fizz]][[[[#//1 [[#+1 [[#%[[<i]] 5]]]]]]>buzz]][[Fizz**[[<fizz]]]][[Buzz**[[<buzz]]]][[[[<i]]**[[#*[[#-1 [[<fizz]]]] [[#-1 [[<buzz]]]]]]]]
**100>i@1]]

Click here to run this on the online interperter.

Fibonacci

[[0>i]][[1>j]][[[[<j]][[[[#+[[<i]] [[<j]]]]>j]][[[[#-[[<j]] [[<i]]]]>i]] **10]]

Click here to run this on the online interperter.

External resources