Jump to content

User:קיפודנחש/chess

From Wikipedia

this is a little experiment, to display chess boards from the corresponding FEN string, using LUA.

the LUA script is Module:Chess-from-fen, and the template is Template:Chess-fen.

Again, the purpose is "proof of concept", plus some performance measurements. if the "NewPP" comment under "view source" is to be believed, the LUA script takes about 240 ms to complete all the boards in this page (160 boards).

Compared with he:Template:שחמט, or en:Template:Chess diagram which provides similar functionality: with both those templates, it's not even possible to save a page with 80 boards server quits with timeout error. 40 boards makes saving the page excriciatingly slow, and even just opening it is very long. this page does not open immediately, but it feels faster.


a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h
h g f e d c b a
1
1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
h g f e d c b a

1.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

e4

1...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

c5

2.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf3

2...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

e6

3.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

d4

3...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

cxd4

4.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd4

4...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

a6

5.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be2

5...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf6

6.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc3

6...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

d6

7.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

O‑O

7...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be7

8.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

a4

8...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc6 {‏ סתם כמה הערות לבדיקה}

9.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be3

9...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

O‑O

10.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

f4

10...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qc7

11.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kh1

11...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Re8

12.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bf3

12...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd7

13.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nb3

13...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

b6

14.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g4

14...
a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bc8

15.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g5

15...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nd7

16.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bg2

16...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bb7

17.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf3

17...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bf8

18.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rh3

18...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g6

19.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qe1

19...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bg7

20.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qh4

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf8

21.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qf2

21...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nd7

22.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf1

22...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nb4

23.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd4

23...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bxd4

24.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd4

24...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc6

25.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

f5

25...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nce5

26.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qh4

26...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

h5

27.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nde2

27...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

exf5

28.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf4

28...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kg7

29.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Ncd5

29...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bxd5

30.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd5

30...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qxc2

31.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

exf5

31...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rac8

32.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf4

32...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rh8

33.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

fxg6

33...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

fxg6

34.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Ne6+

34...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kg8

35.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd5

35...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qd2

36.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qe4

36...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rc1

37.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf3

37...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kh7

38.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf7+

38...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxf7

39.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qxg6+ 1‑0


a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h
a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h
h g f e d c b a
1
1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
h g f e d c b a

1.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

e4

1...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

c5

2.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf3

2...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

e6

3.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

d4

3...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

cxd4

4.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd4

4...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

a6

5.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be2

5...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf6

6.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc3

6...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

d6

7.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

O‑O

7...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be7

8.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

a4

8...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc6 {‏ סתם כמה הערות לבדיקה}

9.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Be3

9...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

O‑O

10.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

f4

10...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qc7

11.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kh1

11...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Re8

12.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bf3

12...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd7

13.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nb3

13...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

b6

14.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g4

14...
a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bc8

15.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g5

15...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nd7

16.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bg2

16...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bb7

17.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf3

17...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bf8

18.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rh3

18...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

g6

19.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qe1

19...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bg7

20.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qh4

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf8

21.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qf2

21...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nd7

22.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf1

22...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nb4

23.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd4

23...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bxd4

24.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd4

24...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nc6

25.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

f5

25...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nce5

26.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qh4

26...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

h5

27.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nde2

27...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

exf5

28.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf4

28...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kg7

29.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Ncd5

29...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bxd5

30.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxd5

30...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qxc2

31.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

exf5

31...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rac8

32.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nf4

32...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rh8

33.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

fxg6

33...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

fxg6

34.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Ne6+

34...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kg8

35.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Bd5

35...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qd2

36.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qe4

36...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rc1

37.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf3

37...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Kh7

38.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Rf7+

38...

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Nxf7

39.

a b c d e f g h
8
8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
a b c d e f g h

Qxg6+ 1‑0