Merge branch 'master' into iprib

This commit is contained in:
Adam Blažek 2021-06-29 20:27:26 +02:00
commit 6fc26adeb2
39 changed files with 401 additions and 82 deletions

39
bingo/bingo.coffee Normal file
View File

@ -0,0 +1,39 @@
import { createApp } from 'https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.prod.min.js'
Array.prototype.shuffle = ->
for item, i in this
j = i + Math.floor(Math.random() * (this.length - i))
this[i] = this[j]
this[j] = item
Array.prototype.splitChunks = (size) ->
this.slice(i, i + size) for i in [0...this.length] by size
app = createApp
data: ->
input: ''
grid: []
gridSize: 3
bingoGenerated: no
computed:
phrases: ->
@input.split('\n').filter((phrase) => phrase)
enoughPhrases: ->
@phrases.length >= @gridSize * @gridSize
methods:
generate: ->
phrases = @phrases
phrases.shuffle()
phrases = phrases.slice(0, @gridSize * @gridSize)
@grid = ({text, crossed: no} for text from row for row from phrases.splitChunks(@gridSize))
@bingoGenerated = yes
mounted: ->
params = new URLSearchParams(window.location.search)
if params.has 'file'
fetch(params.get('file'))
.then (response) => response.text()
.then (text) => @input = text
if params.has 'size'
@gridSize = Number(params.get('size'))
app.mount document.body

25
bingo/bingo.css Normal file
View File

@ -0,0 +1,25 @@
.bingo-input {
width: 100%;
height: 16rem;
resize: vertical;
}
.bingo-grid-wrapper {
width: 100%;
overflow: auto;
}
.bingo-grid {
table-layout: fixed;
border-collapse: collapse;
text-align: center;
}
.bingo-cell {
border: 2px solid #888;
cursor: pointer;
padding: 0.5rem;
}
.bingo-cell.crossed {
background-color: #008;
}

93
bingo/bingo.js Normal file
View File

@ -0,0 +1,93 @@
// Generated by CoffeeScript 2.5.1
var app;
import {
createApp
} from 'https://cdn.jsdelivr.net/npm/vue@3/dist/vue.esm-browser.prod.min.js';
Array.prototype.shuffle = function() {
var i, item, j, k, len, ref, results;
ref = this;
results = [];
for (i = k = 0, len = ref.length; k < len; i = ++k) {
item = ref[i];
j = i + Math.floor(Math.random() * (this.length - i));
this[i] = this[j];
results.push(this[j] = item);
}
return results;
};
Array.prototype.splitChunks = function(size) {
var i, k, ref, ref1, results;
results = [];
for (i = k = 0, ref = this.length, ref1 = size; ref1 !== 0 && (ref1 > 0 ? k < ref : k > ref); i = k += ref1) {
results.push(this.slice(i, i + size));
}
return results;
};
app = createApp({
data: function() {
return {
input: '',
grid: [],
gridSize: 3,
bingoGenerated: false
};
},
computed: {
phrases: function() {
return this.input.split('\n').filter((phrase) => {
return phrase;
});
},
enoughPhrases: function() {
return this.phrases.length >= this.gridSize * this.gridSize;
}
},
methods: {
generate: function() {
var phrases, row, text;
phrases = this.phrases;
phrases.shuffle();
phrases = phrases.slice(0, this.gridSize * this.gridSize);
this.grid = (function() {
var ref, results;
ref = phrases.splitChunks(this.gridSize);
results = [];
for (row of ref) {
results.push((function() {
var results1;
results1 = [];
for (text of row) {
results1.push({
text,
crossed: false
});
}
return results1;
})());
}
return results;
}).call(this);
return this.bingoGenerated = true;
}
},
mounted: function() {
var params;
params = new URLSearchParams(window.location.search);
if (params.has('file')) {
fetch(params.get('file')).then((response) => {
return response.text();
}).then((text) => {
return this.input = text;
});
}
if (params.has('size')) {
return this.gridSize = Number(params.get('size'));
}
}
});
app.mount(document.body);

20
bingo/bingo.sass Normal file
View File

@ -0,0 +1,20 @@
.bingo-input
width: 100%
height: 16rem
resize: vertical
.bingo-grid-wrapper
width: 100%
overflow: auto
.bingo-grid
table-layout: fixed
border-collapse: collapse
text-align: center
.bingo-cell
border: 2px solid #888
cursor: pointer
padding: .5rem
&.crossed
background-color: #008

1
bingo/index.html Normal file
View File

@ -0,0 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="bingo.css"><script type="module" src="bingo.js"></script><title>Bingo | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Bingo</h1><noscript><div class="error">This page requires JavaScript to function properly. Please enable scripts in your browser.</div></noscript><template v-if="bingoGenerated"><div class="bingo-grid-wrapper"><table class="bingo-grid"><tr v-for="row in grid"><td v-for="cell in row" v-bind:class="{crossed: cell.crossed}" v-on:click="cell.crossed = !cell.crossed" class="bingo-cell">{{cell.text}}</td></tr></table></div><p><button v-on:click="bingoGenerated = false">Change</button></p></template><template v-else><p> <label for="bingo-input">Phrases (one per line):</label></p><p><textarea id="bingo-input" v-model="input" class="bingo-input"></textarea></p><p><label for="bingo-size-input">Size: </label><input id="bingo-size-input" type="number" v-model.number="gridSize" min="2"></p><p><button v-if="enoughPhrases" type="button" v-on:click="generate">Generate</button><div v-if="!enoughPhrases" class="error">You need at least {{gridSize * gridSize}} phrases to generate a bingo of size {{gridSize}}</div></p></template></body></html>

32
bingo/index.jade Normal file
View File

@ -0,0 +1,32 @@
extends ../templates/main.jade
block head
link(rel="stylesheet" href="bingo.css")
script(type="module" src="bingo.js")
block title
| Bingo | xigoi
block content
h1 Bingo
noscript
.error This page requires JavaScript to function properly. Please enable scripts in your browser.
template(v-if="bingoGenerated")
.bingo-grid-wrapper
table.bingo-grid
tr(v-for="row in grid")
td.bingo-cell(v-for="cell in row" v-bind:class="{crossed: cell.crossed}" v-on:click="cell.crossed = !cell.crossed")
| {{cell.text}}
p
button(v-on:click="bingoGenerated = false") Change
template(v-else)
p
label(for="bingo-input") Phrases (one per line):
p
textarea.bingo-input#bingo-input(v-model="input")
p
label(for="bingo-size-input") Size:
input#bingo-size-input(type="number" v-model.number="gridSize" min="2")
p
button(v-if="enoughPhrases" type="button" v-on:click="generate") Generate
.error(v-if="!enoughPhrases") You need at least {{gridSize * gridSize}} phrases to generate a bingo of size {{gridSize}}

49
bingo/woke.txt Normal file
View File

@ -0,0 +1,49 @@
ACAB
AOC
Ableist
All men
Alt-right
Assigned at birth
BIPOC
Bigot
Colonialism
Confederate
Conservative
Cultural appropriation
Disproportionate
Dog whistle
Educate
Erase
Far-right
Fascist
Fatphobic
Folks
Incel
KKK
Labour
Latinx
Marginalize
Mayo
Misogynist
Nazi
Oppress
POC
POS
Pick me
Preferred pronouns
Privilege
Problematic
Queer
Racist
Rape culture
Republican
Supremacist
TERF
Tone deaf
Toxic
Transphobic
Trigger warning
Trump
Violence
Voice
Yt

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Grupy</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Grupy</h1>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Grupy</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Grupy</h1>
<p>Tento článek je pokračováním k <a href="http://mathsessions.klusik.cz/2021/01/02/semigrupy/">článku o semigrupách</a>.</p>
<h2>Definice</h2>
<p>Už jsme si vysvětlili, co jsou to grupoidy, semigrupy a monoidy. Nyní povýšíme ještě o jednu úroveň a definujeme <em>grupu</em>.</p>

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="warning">This website is a work in progress.</p><p>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="warning">This website is a work in progress.</p><p>
Ahoj! Jsem <em class="xigoi">xigoi</em>. Mám rád programování a dalši záležitosti s počítači, matematiku, lingvistiku a chůzi. Ovládám češtinu, angličtinu, <a href="https://tokipona.org/">Toki Ponu</a> a trochu němčiny. Jsem velký nadšenec do open-source — používám <a href="https://www.linux.com/news/what-is-gnu-linux/">GNU/Linux</a>, <a href="https://www.vim.org/">Vim</a>, <a href="https://www.latex-project.org/">\(\text{\LaTeX}\)</a>, <a href="https://f-droid.org/">F-Droid</a>, <a href="https://disroot.org/en">Disroot</a> a další. Na této stránce a její <a href="/">anglickě verzi</a> můžete najít různé věci mnou napsané a jinak vytvořené. Šťastné prohlížení!</p><h2>Fikce</h2><ul class="index"><li><a href="iprib/">Spouštěč interaktivních příběhů</a></li></ul><h2>Matematika</h2><ul class="index"><li><a href="grupy.html">Grupy</a></li><li><a href="permutace-a-symetricke-grupy.html">Permutace a symetrické grupy</a></li><li><a href="latex.html">\(\mathrm\LaTeX\)</a></li><li><a href="vytvareni-dokumentu-v-systemu-latex.html">Vytváťení dokumentů v systému \(\mathrm\LaTeX\)</a></li></ul><h2>Kontaktujte mě</h2><ul class="index"><li>E-mail: <a href="mailto:xigoi@disroot.org">xigoi@disroot.org</a></li><li>Ruqqus: <a href="https://ruqqus.com/@xigoi">@xigoi</a></li><li>Reddit: <a href="https://www.reddit.com/user/xigoi">u/xigoi</a></li><li>Discord: xigoi#1759</li></ul></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="style.css"><script defer src="app.js" type="module"></script><title>Spouštěč interaktivních příběhů | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Spouštěč interaktivních příběhů</h1><noscript>Ke správnému fungování této stránky je potřeba mít v prohlížeči povolené skripty.</noscript><div id="app"><template v-if="!scene"><p>Příběh:<input type="file" accept=".iprib0,.iprib1" v-on:input="loadStoryFromFile($event.target.files[0])"></p><p>Pohlaví:<input name="gender" type="radio" v-model="gender" value="m" id="male-radio"><label for="male-radio">Muž</label><input name="gender" type="radio" v-model="gender" value="f" id="female-radio"><label for="female-radio">Žena</label></p><p>Formalita:<input name="formal" type="radio" v-model="formal" v-bind:value="false" id="informal-radio"><label for="male-radio">Tykat</label><input name="formal" type="radio" v-model="formal" v-bind:value="true" id="formal-radio"><label for="female-radio">Vykat</label></p><p><input type="checkbox" v-model="showHistory" id="show-history-checkbox"><label for="show-history-checkbox">Zobrazovat historii</label></p><p v-if="initialScene"><button v-on:click="startStory">Spustit</button></p></template><template v-else><h2>{{name}}</h2><div v-if="showHistory" class="history"><p v-for="entry in history" class="history-entry">{{entry}}</p></div><p>{{interpolate(scene.description.text)}}</p><p v-for="option in scene.options.filter(optionLegal)" v-on:click="triggerOption(option)" class="option">{{interpolate(option.text)}}</p><p v-on:click="endStory" class="end-option">Ukončit</p></template></div></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="style.css"><script defer src="app.js" type="module"></script><title>Spouštěč interaktivních příběhů | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Spouštěč interaktivních příběhů</h1><noscript>Ke správnému fungování této stránky je potřeba mít v prohlížeči povolené skripty.</noscript><div id="app"><template v-if="!scene"><p>Příběh:<input type="file" accept=".iprib0,.iprib1" v-on:input="loadStoryFromFile($event.target.files[0])"></p><p>Pohlaví:<input name="gender" type="radio" v-model="gender" value="m" id="male-radio"><label for="male-radio">Muž</label><input name="gender" type="radio" v-model="gender" value="f" id="female-radio"><label for="female-radio">Žena</label></p><p>Formalita:<input name="formal" type="radio" v-model="formal" v-bind:value="false" id="informal-radio"><label for="male-radio">Tykat</label><input name="formal" type="radio" v-model="formal" v-bind:value="true" id="formal-radio"><label for="female-radio">Vykat</label></p><p><input type="checkbox" v-model="showHistory" id="show-history-checkbox"><label for="show-history-checkbox">Zobrazovat historii</label></p><p v-if="initialScene"><button v-on:click="startStory">Spustit</button></p></template><template v-else><h2>{{name}}</h2><div v-if="showHistory" class="history"><p v-for="entry in history" class="history-entry">{{entry}}</p></div><p>{{interpolate(scene.description.text)}}</p><p v-for="option in scene.options.filter(optionLegal)" v-on:click="triggerOption(option)" class="option">{{interpolate(option.text)}}</p><p v-on:click="endStory" class="end-option">Ukončit</p></template></div></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>LaTeX</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">\(\mathrm\LaTeX\)</h1>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>LaTeX</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">\(\mathrm\LaTeX\)</h1>
<h2>Historie</h2>
<p>Psaní matematických vzorců na klávesnici nikdy nebylo jednoduché. Do vzniku Unicode většinou chyběly základní symboly jako × nabo √ a na jakékoli zápisy, které vyžadovaly zmenšování písma nebo vertikální umisťování textu, jako například zlomky či exponenty, byly zapotřebí různé podivné triky.</p>
<span id="more-2603" />

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Permutace a symetrické grupy</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Permutace a symetrické grupy</h1>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Permutace a symetrické grupy</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Permutace a symetrické grupy</h1>
<p>V <a href="grupy.html">minulém článku</a> jsme si vysvětlili, co jsou to <em>grupy</em>. Nyní se přesuneme do zdánlivě nesouvisející oblasti, kterou je teorie permutací, a následně si ukážeme, že tvoří jeden z nejzákladnějších druhů grup.</p>
<h2>Základy permutací</h2>
<p>Slovo <em>permutace</em> možná znáte ve významu přeházení pořadí nějakých věcí. A to není daleko od formální definice.</p>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Vytváření dokumentů v systému LaTeX</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Vytváření dokumentů v systému \(\mathrm\LaTeX\)</h1>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Vytváření dokumentů v systému LaTeX</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p><div class="entry-content"><h1 class="entry-title">Vytváření dokumentů v systému \(\mathrm\LaTeX\)</h1>
<p>V <a href="http://mathsessions.klusik.cz/2021/01/03/latex/">minulém článku</a> jsme si vysvětlili, že \(\mathrm\LaTeX\)ový kód se skládá z příkazů a jak tyto příkazy vypadají. Ale jak vlastně začít psát takový \(\mathrm\LaTeX\)ový dokument? V zásadě existují tři možnosti:</p>
<span id="more-2629" />
<ul> <li>Obyčejný textový editor — např. <a href="https://www.vim.org/">Vim</a>, <a href="https://notepad-plus-plus.org/">Notepad++</a> nebo i Windows Poznámkový blok. Pozor, nikoliv editor formátovaného textu jako je Microsoft Word! O formátování se ostatně \(\mathrm\LaTeX\) postará sám. Napsaný kód se poté musí zkompilovat nějakým kompilátorem \(\mathrm\LaTeX\)u, nejpoužívanější je <a href="https://www.tug.org/texlive/">TeXLive</a>.</li> <li>Integrované prostředí, které poskytuje funkcionalitu pro editaci i kompilování zároveň. Příkladem je webová stránka <a href="https://www.overleaf.com/">Overleaf</a>, kde je možné bez jakéhokoli stahování napsat dokument a vytvořit z něj PDF.</li> <li>Nějaký jiný systém, který má podporu \(\mathrm\LaTeX\)ových vzorců. Tyto systémy podporují většinou pouze matematický režim. Patří mezi ně například WordPress, ve kterém je napsán tento článek.</li></ul>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Equality | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Equality</h1><figure class="quote"><blockquote>In <a href="/wiki/Mathematics" title="Mathematics">mathematics</a>, an <dfn>equivalence relation</dfn> is a <a href="/wiki/Binary_relation" title="Binary relation">binary relation</a> that is <a href="/wiki/Reflexive_relation" title="Reflexive relation">reflexive</a>, <a href="/wiki/Symmetric_relation" title="Symmetric relation">symmetric</a> and <a href="/wiki/Transitive_relation" title="Transitive relation">transitive</a>.</blockquote><figcaption><a href="https://en.wikipedia.org/wiki/Equivalence_relation">Wikipedia</a></figcaption></figure><p>Who doesn't want equal rights? Gender equality, racial equality, you name it. However, there seems to be a general disagreement on what “equality” should look like. I'd like to present my viewpoint using the mathematical definition of an <dfn>equivalence relation</dfn>, which is basically a generalized idea of equality.</p><h2>Reflexivity</h2><p><dfn>Reflexivity</dfn> simply means that everything is equal to itself. This is not really relevant when discussing human rights, since the rights of a given group are equal to themselves by nature.</p><h2>Symmetry</h2><p><dfn>Symmetry</dfn> says that if \(x = y\), then \(y = x\). In other words, two equal things are interchangeable. Now this gets more interesting. My interpretation is that if switching the roles of two people/groups wouldn't change their situation regarding what they can do, only then can we say that they have equal rights. Surprisingly, this already seems to be a very controversial opinion. I'll get to concrete examples later.</p><h2>Transitivity</h2><p><dfn>Transitivity</dfn> says that if \(x = y\) and \(y = z\), then also \(x = z\). It's hard to imagine a scenario where this would come relevant in human rights. After all, it involves three variables, but discussions about human rights usually compare the rights of two groups. We'll see if this becomes useful later.</p></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Equality | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Equality</h1><figure class="quote"><blockquote>In <a href="/wiki/Mathematics" title="Mathematics">mathematics</a>, an <dfn>equivalence relation</dfn> is a <a href="/wiki/Binary_relation" title="Binary relation">binary relation</a> that is <a href="/wiki/Reflexive_relation" title="Reflexive relation">reflexive</a>, <a href="/wiki/Symmetric_relation" title="Symmetric relation">symmetric</a> and <a href="/wiki/Transitive_relation" title="Transitive relation">transitive</a>.</blockquote><figcaption><a href="https://en.wikipedia.org/wiki/Equivalence_relation">Wikipedia</a></figcaption></figure><p>Who doesn't want equal rights? Gender equality, racial equality, you name it. However, there seems to be a general disagreement on what “equality” should look like. I'd like to present my viewpoint using the mathematical definition of an <dfn>equivalence relation</dfn>, which is basically a generalized idea of equality.</p><h2>Reflexivity</h2><p><dfn>Reflexivity</dfn> simply means that everything is equal to itself. This is not really relevant when discussing human rights, since the rights of a given group are equal to themselves by nature.</p><h2>Symmetry</h2><p><dfn>Symmetry</dfn> says that if \(x = y\), then \(y = x\). In other words, two equal things are interchangeable. Now this gets more interesting. My interpretation is that if switching the roles of two people/groups wouldn't change their situation regarding what they can do, only then can we say that they have equal rights. Surprisingly, this already seems to be a very controversial opinion. I'll get to concrete examples later.</p><h2>Transitivity</h2><p><dfn>Transitivity</dfn> says that if \(x = y\) and \(y = z\), then also \(x = z\). It's hard to imagine a scenario where this would come relevant in human rights. After all, it involves three variables, but discussions about human rights usually compare the rights of two groups. We'll see if this becomes useful later.</p></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="warning">This website is a work in progress.</p><p>Hi! I am <em class="xigoi">xigoi</em>. I like programming and other computer stuff, mathematics, linguistics and walking. I live in Czechia and can speak Czech, English, <a href="https://tokipona.org/">Toki Pona</a> and some German. I am a big open source enthusiast I use <a href="https://www.linux.com/news/what-is-gnu-linux/">GNU/Linux</a>, <a href="https://www.vim.org/">Vim</a>, <a href="https://www.latex-project.org/">\(\text{\LaTeX}\)</a>, <a href="https://f-droid.org/">F-Droid</a>, <a href="https://disroot.org/en">Disroot</a> and others. I have some strong and possibly controversial <a href="opinions.html">opinions</a> about various aspects of life. On this website, you can find some things written and otherwise created by me. Happy browsing!</p><h2>Math</h2><ul class="index"><li class="wip"><a href="quantum-games.html">Quantum games</a></li></ul><h2>Rants</h2><ul class="index"><li><a href="opinions.html">Opinions</a></li><li class="wip"><a href="equality.html">Equality</a></li><li><a href="language-criticism/">Language Criticism</a></li></ul><h2>Fiction</h2><ul class="index"><li class="wip"><a href="susan-and-male-privilege.html">Susan and Male Privilege</a></li></ul><h2>About me and this site</h2><ul class="index"><li><a href="logo.html">xigoi logo</a></li><li><a href="styles/main.sass">Stylesheet (SASS)</a></li><li><a href="styles/main.css">Stylesheet (CSS)</a></li></ul><h2>Contact me</h2><ul class="index"><li>E-mail: <a href="mailto:xigoi@disroot.org">xigoi@disroot.org</a></li><li>Ruqqus: <a href="https://ruqqus.com/@xigoi">@xigoi</a></li><li>Reddit: <a href="https://www.reddit.com/user/xigoi">u/xigoi</a></li><li>Discord: xigoi#1759</li></ul></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="warning">This website is a work in progress.</p><p>Hi! I am <em class="xigoi">xigoi</em>. I like programming and other computer stuff, mathematics, linguistics and walking. I live in Czechia and can speak Czech, English, <a href="https://tokipona.org/">Toki Pona</a> and some German. I am a big open source enthusiast I use <a href="https://www.linux.com/news/what-is-gnu-linux/">GNU/Linux</a>, <a href="https://www.vim.org/">Vim</a>, <a href="https://www.latex-project.org/"> <span style="margin-right: -0.36em;">L</span><span style="position: relative; font-size: .7em; top: -0.4em;">A</span><span style="margin-right: -0.2em;">T</span><span style="position: relative; top: 0.2em; margin-right: -0.1em;">E</span><span>X</span></a>, <a href="https://f-droid.org/">F-Droid</a>, <a href="https://disroot.org/en">Disroot</a> and others. I have some strong and possibly controversial <a href="opinions.html">opinions</a> about various aspects of life. On this website, you can find some things written and otherwise created by me. Happy browsing!</p><h2>Math</h2><ul class="index"><li class="wip"><a href="quantum-games.html">Quantum games</a></li></ul><h2>Rants</h2><ul class="index"><li><a href="opinions.html">Opinions</a></li><li class="wip"><a href="equality.html">Equality</a></li><li><a href="language-criticism/">Language Criticism</a></li></ul><h2>Fiction</h2><ul class="index"><li class="wip"><a href="susan-and-male-privilege.html">Susan and Male Privilege</a></li></ul><h2>Bingo</h2><ul class="index"><li><a href="bingo/">Bingo</a></li><li><a href="bingo/?file=woke.txt&amp;size=7">Woke Bingo</a></li></ul><h2>About me and this site</h2><ul class="index"><li><a href="logo.html">xigoi logo</a></li><li><a href="styles/main.sass">Stylesheet (SASS)</a></li><li><a href="styles/main.css">Stylesheet (CSS)</a></li></ul><h2>Contact me</h2><ul class="index"><li>E-mail: <a href="mailto:xigoi@disroot.org">xigoi@disroot.org</a></li><li>Ruqqus: <a href="https://ruqqus.com/@xigoi">@xigoi</a></li><li>Reddit: <a href="https://www.reddit.com/user/xigoi">u/xigoi</a></li><li>Discord: xigoi#1759</li></ul></body></html>

View File

@ -1,8 +1,5 @@
extends templates/main.jade
block head
include templates/katex.jade
block content
p.warning This website is a work in progress.
p
@ -15,7 +12,12 @@ block content
| ,
a(href="https://www.vim.org/") Vim
| ,
a(href="https://www.latex-project.org/") \(\text{\LaTeX}\)
a(href="https://www.latex-project.org/")
span(style="margin-right: -0.36em;") L
span(style="position: relative; font-size: .7em; top: -0.4em;") A
span(style="margin-right: -0.2em;") T
span(style="position: relative; top: 0.2em; margin-right: -0.1em;") E
span X
| ,
a(href="https://f-droid.org/") F-Droid
| ,
@ -39,6 +41,12 @@ block content
ul.index
li.wip
a(href="susan-and-male-privilege.html") Susan and Male Privilege
h2 Bingo
ul.index
li
a(href="bingo/") Bingo
li
a(href="bingo/?file=woke.txt&size=7") Woke Bingo
h2 About me and this site
ul.index
li

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>Braces &amp; Semicolons | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Braces Criticism</h1><p>There are, in general, three common ways to delimit code blocks: braces, end-keywords and indentation. When we write pseudocode on paper, we tend to almost always use indentation — it provides an easy visual cue and takes the least effort to write. So why do so many programmers insist on using braces for this purpose, which make code much harder to visually parse? Here are some commonly given reasons with my responses:</p><ul class="qa"><li>Pasting code from the internet messes up the indentation and it's tedious to fix it.</li><li>Are you coding in Windows Notepad?</li><li>A changed indent can cause the code to behave differently.</li><li>When this happens, you'll clearly see it. On the other hand, a misplaced brace might go unnoticed and the indentation will give you a false sense of the code being correct.</li><li>I have auto-indent, so the indentation will always match the braces.</li><li>That's cool. You'll still get slowed down by having to visually process them.</li><li>I don't think invisible characters should change the meaning of code.</li><li>Firstly, indentation is followed by visible characters, which makes you able to clearly see it. Secondly, by this argument, you could also argue that <code>publicstaticvoidmain</code> should be equivalent to <code>public static void main</code> — we're just ignoring “invisible” characters, no?</li><li>Mixing spaces and tabs is going to create a mess.</li><li>See the answer to the first question.</li></ul><h1>Semicolons Criticism</h1><p>A very popular feature in programming languages, especially those derived from <a href="c.html">C</a>, is requiring a semicolon after every statement. Why is this necessary if you're already separating statements by newlines? It just adds one more character you need to type; and more importantly, a lot more characters that you have to visually process, but that don't contribute in any way to the logic of the code (the term for this is <dfn>syntactic noise</dfn>). There's a lot of languages that do completely fine without them: Python, Ruby, Lua, Nim, Go, Haskell, etc. And JavaScript shows that even in a language that uses semicolons, they can be inferred pretty well. Also note that Lua doesn't actually care about newlines, its syntax is made in a way that a statement always ends unambiguously.</p></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>Braces &amp; Semicolons | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Braces Criticism</h1><p>There are, in general, three common ways to delimit code blocks: braces, end-keywords and indentation. When we write pseudocode on paper, we tend to almost always use indentation — it provides an easy visual cue and takes the least effort to write. So why do so many programmers insist on using braces for this purpose, which make code much harder to visually parse? Here are some commonly given reasons with my responses:</p><ul class="qa"><li>Pasting code from the internet messes up the indentation and it's tedious to fix it.</li><li>Are you coding in Windows Notepad?</li><li>A changed indent can cause the code to behave differently.</li><li>When this happens, you'll clearly see it. On the other hand, a misplaced brace might go unnoticed and the indentation will give you a false sense of the code being correct.</li><li>I have auto-indent, so the indentation will always match the braces.</li><li>That's cool. You'll still get slowed down by having to visually process them.</li><li>I don't think invisible characters should change the meaning of code.</li><li>Firstly, indentation is followed by visible characters, which makes you able to clearly see it. Secondly, by this argument, you could also argue that <code>publicstaticvoidmain</code> should be equivalent to <code>public static void main</code> — we're just ignoring “invisible” characters, no?</li><li>Mixing spaces and tabs is going to create a mess.</li><li>See the answer to the first question.</li></ul><h1>Semicolons Criticism</h1><p>A very popular feature in programming languages, especially those derived from <a href="c.html">C</a>, is requiring a semicolon after every statement. Why is this necessary if you're already separating statements by newlines? It just adds one more character you need to type; and more importantly, a lot more characters that you have to visually process, but that don't contribute in any way to the logic of the code (the term for this is <dfn>syntactic noise</dfn>). There's a lot of languages that do completely fine without them: Python, Ruby, Lua, Nim, Go, Haskell, etc. And JavaScript shows that even in a language that uses semicolons, they can be inferred pretty well. Also note that Lua doesn't actually care about newlines, its syntax is made in a way that a statement always ends unambiguously.</p></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>C | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>C Language Criticism</h1><p class="disclaimer">I know that C was designed a long time ago when there wasn't much knowledge about language design. I'm not trying to berate its original creators, I just think it's time to move on to more modern systems programming languages like Nim, Rust or Zig. That's why this criticism is from a modern perspective.</p><p class="notice">I found <a href="https://eev.ee/blog/2016/12/01/lets-stop-copying-c/">this article</a> which explains many things much better than I, so please check it out. My article contains a few duplicates and some additional points.</p><h2>Preprocessor</h2><p>What's a better way of doing imports and macros than embedding another language with completely different syntax, which does naive text substitution, into your language? In order to avoid dangers which are not present in any sane import/macro systems, you have to do ugly hacks such as:</p><ul><li><p>Include guards</p><pre><code>#ifndef YOU_NEED_TO_MANUALLY_MAKE_SURE_THAT_YOUR_FILE_ISNT_INCLUDED_MULTIPLE_TIMES
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>C | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>C Language Criticism</h1><p class="disclaimer">I know that C was designed a long time ago when there wasn't much knowledge about language design. I'm not trying to berate its original creators, I just think it's time to move on to more modern systems programming languages like Nim, Rust or Zig. That's why this criticism is from a modern perspective.</p><p class="notice">I found <a href="https://eev.ee/blog/2016/12/01/lets-stop-copying-c/">this article</a> which explains many things much better than I, so please check it out. My article contains a few duplicates and some additional points.</p><h2>Preprocessor</h2><p>What's a better way of doing imports and macros than embedding another language with completely different syntax, which does naive text substitution, into your language? In order to avoid dangers which are not present in any sane import/macro systems, you have to do ugly hacks such as:</p><ul><li><p>Include guards</p><pre><code>#ifndef YOU_NEED_TO_MANUALLY_MAKE_SURE_THAT_YOUR_FILE_ISNT_INCLUDED_MULTIPLE_TIMES
#define YOU_NEED_TO_MANUALLY_MAKE_SURE_THAT_YOUR_FILE_ISNT_INCLUDED_MULTIPLE_TIMES
// your code here
#endif</code></pre></li><li><p>The <code>do { ... } while (0)</code> thing to make sure that a macro can be used as a normal function</p></li><li><p>Wrapping everything in parentheses to make a macro work like a normal function</p><pre><code>#define MAX(a, b) ((a) > (b) ? (a) : (b))</code></pre><p>If any parentheses are left out, it results in counter-intuitive behavior. Actually, even with them it doesn't work like a normal function: the arguments will be evaluated as many times as they're in the macro body!</p></li></ul><h2>Braces &amp; Semicolons</h2><p>See <a href="braces-semicolons.html">Braces &amp; Semicolons</a></p><h2>Syntax inconsistencies &amp; warts</h2><p>Since many other languages (Java, C#, JavaScript, ...) have mindlessly copied most syntax from C, these mistakes have a profound effect on a whole family of languages.</p><ul><li>All control structures that take a statement (if, while, for, switch) have the form of <code>KEYWORD (SOMETHING) STATEMENT</code>. Except for the do-while loop, which for some reason has the form <code>KEYWORD STATEMENT KEYWORD (SOMETHING);</code>. Totally different and including an extra semicolon.<ul class="qa"><li>But it visually indicates that the condition is first checked after the statement!</li><li>Then why is a for loop written as <code>for (INIT; CONDITION; STEP) STATEMENT</code> rather than <code>for (INIT; CONDITION) STATEMENT (STEP);</code>? By the same logic, we should visually indicate that the step (usually increment) is first executed after the statement.</li></ul></li><li>The choice to require an if/while condition to be wrapped in parentheses, rather than requiring the body to be wrapped in braces (as in Rust). Not only does this introduce syntactic noise, but it leads to subtle bugs if you mess up indentation:<pre><code>if (launch_button_pressed)
check(missile); /* this was added in after we decided to make our missile system safer */
launch(missile);</code></pre></li><li>The for loop is just another way to write a while loop, instead of something actually useful like Python's <code>for item in items:</code>.</li><li>The syntax for labels (including switch cases) is completely different from everything else. For consistency, it could be something like <code>label (NAME) STATEMENT</code> and <code>case (VALUE) STATEMENT</code>.</li></ul><h2>Tooling</h2><ul><li>By default, the compilers don't have most warnings enabled. And it's very difficult to actually enable all warnings. <code>-Wall</code> enables only some warnings. What the fuck?</li><li>The defau;t name for the compiled executable is <code>a.out</code>, instead of being based on the source filename. So you need to do things like <code>gcc my_awesome_program.c -o my_awesome_program</code>.</li><li>You need to specify the libraries you're using in the compilation command, instead of just putting them in the source file.</li></ul></body></html>
launch(missile);</code></pre></li><li>The for loop is just another way to write a while loop, instead of something actually useful like Python's <code>for item in items:</code>.</li><li>The syntax for labels (including switch cases) is completely different from everything else. For consistency, it could be something like <code>label (NAME) STATEMENT</code> and <code>case (VALUE) STATEMENT</code>.</li></ul><h2>Tooling</h2><ul><li>By default, the compilers don't have most warnings enabled. And it's very difficult to actually enable all warnings. <code>-Wall</code> enables only some warnings. What the fuck?</li><li>The default name for the compiled executable is <code>a.out</code>, instead of being based on the source filename. So you need to do things like <code>gcc my_awesome_program.c -o my_awesome_program</code>.</li><li>You need to specify the libraries you're using in the compilation command, instead of just putting them in the source file.</li></ul></body></html>

View File

@ -67,7 +67,7 @@ block content
li By default, the compilers don't have most warnings enabled. And it's very difficult to actually enable all warnings.
code -Wall
| enables only some warnings. What the fuck?
li The defau;t name for the compiled executable is
li The default name for the compiled executable is
code a.out
| , instead of being based on the source filename. So you need to do things like
code gcc my_awesome_program.c -o my_awesome_program

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>C++ | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>C++ Language Criticism</h1><p>Everything that applies to <a href="c.html">C</a> also applies to C++. This article contains only things that don't apply to C.</p><p>The <a href="http://yosefk.com/c++fqa/index.html">C++ FQA</a> has a lot of great points, so go read it too.</p><h2>Overall philosophy</h2><p>I believe that a programming language should be designed to make simple things simple and complex things as simple as possible. C++ is designed to make simple things complex and complex things even more complex. For example, a program to read space-separated numbers from STDIN, sort them and again output them space-separated:</p><div class="comparison"><div class="compared"><h6>Python 3</h6><pre><code>nums = [int(inp) for inp in input().split()]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>C++ | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>C++ Language Criticism</h1><p>Everything that applies to <a href="c.html">C</a> also applies to C++. This article contains only things that don't apply to C.</p><p>The <a href="http://yosefk.com/c++fqa/index.html">C++ FQA</a> has a lot of great points, so go read it too.</p><h2>Overall philosophy</h2><p>I believe that a programming language should be designed to make simple things simple and complex things as simple as possible. C++ is designed to make simple things complex and complex things even more complex. For example, a program to read space-separated numbers from STDIN, sort them and again output them space-separated:</p><div class="comparison"><div class="compared"><h6>Python 3</h6><pre><code>nums = [int(inp) for inp in input().split()]
print(*sorted(nums))</code></pre><a href="https://tio.run/##K6gsycjPM/7/P680t1jBViE6M69EIzOvQFMhLb9IAcgAYhBVWqKhqVdckJMJpGO5CopAyrSK84tKUlM0QFo1Nf//NzY0UTA0VbBUMDJTMFUwNgUA">Try it online!</a></div><div class="compared"><h6>Nim</h6><pre><code>import std/[strutils, sequtils, algorithm]
let nums = stdin.readLine.splitWhitespace.mapIt(it.parseInt)
@ -27,7 +27,7 @@ int main() {
std::cout &lt;&lt; num;
}
std::cout &lt;&lt; std::endl;
}</code></pre><a href="https://tio.run/##ZY/NTsMwEITveYqRONSRAlIpQSINfRXkOE66wrEj24ED6rMH2/kBxM2e@WZ2V4zjfS/EPN@RFmpqJWoyzlvJh0v2o31I4Y39rXDVG0v@GrCMtMfASbMcXxngfFtVS6IO1gV6Gtx5M0I56R6kxyh9XklJsOT00ivScvkI0kWEChxwyJdipKYHOYyKC/nWcPHO1k5DLMB5Hjtv@yhjPUuRRvZxvWIt0C1b0MYYhY6s83iFt5OMYmcsWLwpwKhSZJtPHVjCNwF7uuPKpXhYADK8d2K5x0wedR2vWaHsnxcm/dl/09MnLK3O2W2eT8cnHEu84PEZJU7lNw">Try it online!</a></div></div><h2>Features</h2><ul><li>Despite being a very large language, C++ doesn't have basic features like sum types or pattern matching.</li><li>Many features duplicate other features, adding their own advantages and drawbacks (and more unnecessary syntactic rules to learn). Examples: initializer lists, <code>typedef</code>/<code>using</code>, <code>#define</code>/<code>constexpr</code>, <code>char[]</code>/<code>std::string</code>, <code>int[]</code>/<code>std::array&lt;int&gt;</code>, <code>printf</code>/<code>cout</code>, <code>struct</code>/<code>class</code></li></ul><h2>Syntax</h2><p>C++ took the horrible syntax of C and somehow managed to make it even worse.</p><ul><li>The <a href="https://en.wikipedia.org/wiki/Most_vexing_parse">most vexing parse</a> (and similar rules). I can't fathom what could possibly cause someone to think this is a good idea.</li><li><a href="https://blog.reverberate.org/2013/08/parsing-c-is-literally-undecidable.html">Parsing C++ is literally undecidable.</a></li><li>Using less-than and greater-than signs as brackets, which hinders auto-pairing and complicates parsing while also looking ugly.</li><li>The semicolon after a <code>struct</code>/<code>class</code> definition. Just why?</li><li>Keywords that have multiple meanings depending on where you use them: <code>static</code>, <code>using</code>, <code>typename</code>.</li><li>The keyword <code>const</code> is used to declare immutable variables (not constants, for which there is <code>constexpr</code>) and it can be placed in various positions inside a type, which completely changes its meaning.</li><li>Who decided that <code>::</code> is a good path separator?</li></ul><h2>Standard library</h2><ul><li>Despite being quite extensive, the standard library doesn't have basic things like<ul><li>basic functions for working with strings (split, join)</li><li>functional abstractions (map, filter, fold, …) [C++20 partially solves this with “range adaptors” (what a weird name), but the usage is unbearably cumbersome]</li><li>optional/result types</li></ul></li><li>Using the term “vector” for a resizable array, even though the word has a completely different meaning in mathematics.</li><li>There is no convenient way to pass a whole array/vector/list to a function, you have to do something like <code>std::sort(arr.begin(), arr.end())</code>.</li><li>Weird function names: from C crypticisms (<code>stoi</code>, <code>fscanf</code>) to unusual words (<code>emplace_back</code>).</li></ul><h2>Tooling</h2><ul><li>Error messages.<ul><li>If you try to search a “vector” (array) of a wrong type…<p>Credit goes to <a href="https://codegolf.stackexchange.com/a/10470/98955">this StackExchange answer</a>.</p><pre><code>#include &lt;vector&gt;
}</code></pre><a href="https://tio.run/##ZY/NTsMwEITveYqRONSRAlIpQSINfRXkOE66wrEj24ED6rMH2/kBxM2e@WZ2V4zjfS/EPN@RFmpqJWoyzlvJh0v2o31I4Y39rXDVG0v@GrCMtMfASbMcXxngfFtVS6IO1gV6Gtx5M0I56R6kxyh9XklJsOT00ivScvkI0kWEChxwyJdipKYHOYyKC/nWcPHO1k5DLMB5Hjtv@yhjPUuRRvZxvWIt0C1b0MYYhY6s83iFt5OMYmcsWLwpwKhSZJtPHVjCNwF7uuPKpXhYADK8d2K5x0wedR2vWaHsnxcm/dl/09MnLK3O2W2eT8cnHEu84PEZJU7lNw">Try it online!</a></div></div><h2>Features</h2><ul><li>Despite being a very large language, C++ doesn't have basic features like sum types or pattern matching.</li><li>Many features duplicate other features, adding their own advantages and drawbacks (and more unnecessary syntactic rules to learn). Examples: initializer lists, <code>typedef</code>/<code>using</code>, <code>#define</code>/<code>constexpr</code>, <code>char[]</code>/<code>std::string</code>, <code>int[]</code>/<code>std::array&lt;int&gt;</code>, <code>printf</code>/<code>cout</code>, <code>struct</code>/<code>class</code></li></ul><h2>Syntax</h2><p>C++ took the horrible syntax of C and somehow managed to make it even worse.</p><ul><li>The <a href="https://en.wikipedia.org/wiki/Most_vexing_parse">most vexing parse</a> (and similar rules). I can't fathom what could possibly cause someone to think this is a good idea.</li><li><a href="https://blog.reverberate.org/2013/08/parsing-c-is-literally-undecidable.html">Parsing C++ is literally undecidable.</a></li><li>Using less-than and greater-than signs as brackets, which hinders auto-pairing and complicates parsing while also looking ugly.</li><li>The semicolon after a <code>struct</code>/<code>class</code> definition. Just why?</li><li>Keywords that have multiple meanings depending on where you use them: <code>static</code>, <code>using</code>, <code>typename</code>.</li><li>The keyword <code>const</code> is used to declare immutable variables (not constants, for which there is <code>constexpr</code>) and it can be placed in various positions inside a type, which completely changes its meaning.</li><li>Who decided that <code>::</code> is a good path separator?</li></ul><h2>Standard library</h2><ul><li>Despite being quite extensive, the standard library doesn't have basic things like<ul><li>basic functions for working with strings (split, join)</li><li>functional abstractions (map, filter, fold, …) [C++20 partially solves this with “range adaptors” (what a weird name), but the usage is unbearably cumbersome]</li><li>optional/result types</li></ul></li><li>Using the term “vector” for a resizable array, even though the word has a completely different meaning in mathematics.</li><li>There is no convenient way to pass a whole array/vector/list to a function, you have to do something like <code>std::sort(arr.begin(), arr.end())</code>.</li><li>Weird function names: from C crypticisms (<code>stoi</code>, <code>fscanf</code>) to unusual words (<code>emplace_back</code>).</li><li>Idiomatically, it's required to write <code>std::</code> between everything from the standard library, which makes the code repetitive and unreadable. Who would have guessed that <code>sort</code> is a standard library function if it wasn't for the prefix?</li></ul><h2>Tooling</h2><ul><li>Error messages.<ul><li>If you try to search a “vector” (array) of a wrong type…<p>Credit goes to <a href="https://codegolf.stackexchange.com/a/10470/98955">this StackExchange answer</a>.</p><pre><code>#include &lt;vector&gt;
#include &lt;algorithm&gt;
int main() {

View File

@ -143,6 +143,11 @@ block content
| ) to unusual words (
code emplace_back
| ).
li Idiomatically, it's required to write
code std::
| between everything from the standard library, which makes the code repetitive and unreadable. Who would have guessed that
code sort
| is a standard library function if it wasn't for the prefix?
h2 Tooling
ul
li Error messages.

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Language Criticism</h1><p>Here I'm going to criticize all kinds of languages: spoken languages, programming languages, markup languages, etc. Prepare your pitchforks.</p><h2>Programming language constructs</h2><ul class="index"><li><a href="braces-semicolons.html">Braces &amp; Semicolons</a></li></ul><h2>Programming languages</h2><ul class="index"><li><a href="c.html">C</a></li><li><a href="cpp.html">C++</a></li><li><a href="python.html">Python</a></li></ul></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Language Criticism</h1><p>Here I'm going to criticize all kinds of languages: spoken languages, programming languages, markup languages, etc. Prepare your pitchforks.</p><h2>Programming language constructs</h2><ul class="index"><li><a href="braces-semicolons.html">Braces &amp; Semicolons</a></li></ul><h2>Programming languages</h2><ul class="index"><li><a href="c.html">C</a></li><li><a href="cpp.html">C++</a></li><li><a href="python.html">Python</a></li></ul></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>Python | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Python Language Criticism</h1><p>I like Python. It's a very easy to use language with clean syntax and a rich library system. However, there are several things I don't exactly like about it, which I'm going to cover here.</p><h2>General Characteristics</h2><ul><li>Python is dynamically typed. That used to be a great thing, but now that most statically typed languages have type inference, dynamic typing has pretty much only drawbacks. Yes, there are type annotations and MyPy, but you can't always rely on them, especially if using a library that doesn't have annotations.</li></ul><h2>Language Features</h2><ul><li>There are no enums, instead strings are used for their purpose, which is slow and error-prone.</li><li>Why are decorators limited to functions and classes? They would be useful for other things.</li></ul><h2>Syntax</h2><ul><li>Anonymous functions require a long keyword (which would sometimes be useful as a variable name) and they're restricted to a single expression. Note that, contrary to popular belief, this limitation is not a consequence of indentation-based syntax: CoffeeScript and Nim, which are both indentation-based, manage to have multiple-statement anonymous functions just fine.</li><li>The syntax for conditional expressions has the condition in the middle, which looks jumbled up.</li><li>In comprehensions, <code>for</code> loops are written in reverse order than normal (first inner, then outer).</li><li>The distinction between statements and expressions is quite unnecessary. See Ruby as an example of a language which is similar to Python, but takes the “everything is an expression” approach.</li><li>The set of operators is limited, with no way to define new ones.</li><li>“Dunder” methods are incredibly ugly. Even C++ has better syntax for constructors and operator overloading.</li><li>There's no syntax for documentation comments, but instead… string literals???</li><li>It uses up valuable characters for bitwise operators, which are very rarely needed in high-level programming. Especially <code>^</code> would be useful for exponentiation. Bitwise operators could very well be functions tucked away in a standard library module.</li></ul><h2>Built-ins & Standard library</h2><ul><li>The language is really inconsistent about what is a function and what is a method. For example, <code>lst.sort()</code>, but <code>sorted(lst)</code>. And some of these functions actually just call a method with the same name, but surrounded in double underscores! What's the point of that? Why not just directly make it a method?</li><li>The <code>unittest</code> module uses <code>camelCase</code> identifiers, even though the language convention is <code>snake_case</code>. How does something like this even happen? Did nobody catch this in the review? If they even have a review process?<p><a href="https://stackoverflow.com/questions/17014763/why-are-unittest2-methods-camelcase-if-names-with-underscores-are-preferred">According to StackOverflow</a>, it's based on some old Smalltalk library. I get that copying a good library from another language is often a good idea, but did it have to be so verbatim that it won't even adapt to the language's most basic conventions?</p></li></ul><h2>Tooling</h2><ul><li>Installation management is <a href="https://xkcd.com/1987/">an absolute chaos</a>.</li></ul></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>Python | Language Criticism | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Python Language Criticism</h1><p>I like Python. It's a very easy to use language with clean syntax and a rich library system. However, there are several things I don't exactly like about it, which I'm going to cover here.</p><h2>General Characteristics</h2><ul><li>Python is dynamically typed. That used to be a great thing, but now that most statically typed languages have type inference, dynamic typing has pretty much only drawbacks. Yes, there are type annotations and MyPy, but you can't always rely on them, especially if using a library that doesn't have annotations.</li></ul><h2>Language Features</h2><ul><li>There are no enums, instead strings are used for their purpose, which is slow and error-prone.</li><li>Why are decorators limited to functions and classes? They would be useful for other things.</li></ul><h2>Syntax</h2><ul><li>Anonymous functions require a long keyword (which would sometimes be useful as a variable name) and they're restricted to a single expression. Note that, contrary to popular belief, this limitation is not a consequence of indentation-based syntax: CoffeeScript and Nim, which are both indentation-based, manage to have multiple-statement anonymous functions just fine.</li><li>The syntax for conditional expressions has the condition in the middle, which looks jumbled up.</li><li>In comprehensions, <code>for</code> loops are written in reverse order than normal (first inner, then outer).</li><li>The distinction between statements and expressions is quite unnecessary. See Ruby as an example of a language which is similar to Python, but takes the “everything is an expression” approach.</li><li>The set of operators is limited, with no way to define new ones.</li><li>“Dunder” methods are incredibly ugly. Even C++ has better syntax for constructors and operator overloading.</li><li>There's no syntax for documentation comments, but instead… string literals???</li><li>It uses up valuable characters for bitwise operators, which are very rarely needed in high-level programming. Especially <code>^</code> would be useful for exponentiation. Bitwise operators could very well be functions tucked away in a standard library module.</li></ul><h2>Built-ins & Standard library</h2><ul><li>The language is really inconsistent about what is a function and what is a method. For example, <code>lst.sort()</code>, but <code>sorted(lst)</code>. And some of these functions actually just call a method with the same name, but surrounded in double underscores! What's the point of that? Why not just directly make it a method?</li><li>The <code>unittest</code> module uses <code>camelCase</code> identifiers, even though the language convention is <code>snake_case</code>. How does something like this even happen? Did nobody catch this in the review? If they even have a review process?<p><a href="https://stackoverflow.com/questions/17014763/why-are-unittest2-methods-camelcase-if-names-with-underscores-are-preferred">According to StackOverflow</a>, it's based on some old Smalltalk library. I get that copying a good library from another language is often a good idea, but did it have to be so verbatim that it won't even adapt to the language's most basic conventions?</p></li></ul><h2>Tooling</h2><ul><li>Installation management is <a href="https://xkcd.com/1987/">an absolute chaos</a>.</li></ul></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>xigoi logo | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>The xigoi logo</h1><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%;"><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><p>The shape is meant to be an “x” overlapping with an “i”, drawn with a single stroke — except for the dot, which is singled out. I realized later that it looks like a thinking person, which is a nice coincidence.</p><p>This version of the logo is made in SVG and designed so that the cyan part consists entirely of straight line segments and circular arcs, whose endpoints all lie on a square lattice. The dot lies in the center of the most complete circular arc and is distinguished by both size and color. It was a nice exercise in geometry.</p><p>The colors don't really mean anything, I just like them.</p></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>xigoi logo | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>The xigoi logo</h1><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%;"><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><p>The shape is meant to be an “x” overlapping with an “i”, drawn with a single stroke — except for the dot, which is singled out. I realized later that it looks like a thinking person, which is a nice coincidence.</p><p>This version of the logo is made in SVG and designed so that the cyan part consists entirely of straight line segments and circular arcs, whose endpoints all lie on a square lattice. The dot lies in the center of the most complete circular arc and is distinguished by both size and color. It was a nice exercise in geometry.</p><p>The colors don't really mean anything, I just like them.</p></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>Not Found | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>404 Not Found</h1><p>Sorry, this page doesn't exist on my website. Sometimes I move things around, so it's possible that it's somewhere else now. Would you like to go to the <a href="/">main page</a> and try to find it?</p></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>Not Found | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>404 Not Found</h1><p>Sorry, this page doesn't exist on my website. Sometimes I move things around, so it's possible that it's somewhere else now. Would you like to go to the <a href="/">main page</a> and try to find it?</p></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>Opinions | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Opinions</h1><p>Here are some of my opinions that could be considered controversial. Fell free to argue about them with me.</p><h2>Casual</h2><ul><li>Pineapple pizza is the best pizza.</li><li>Teeth should be brushed after breakfast, not before.</li></ul><h2>Mathematics</h2><ul><li>0 is a Natural number.</li><li>The Axiom of Choice is intuitively false.</li></ul><h2>Programming</h2><ul><li>C is a badly designed programming language with ugly syntax.</li><li>Semicolons and braces are syntactic noise and should not be necessary in modern languages.</li><li>Indexing from 0 is <a href="https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html">objectively better</a> than indexing from 1 even if we disregard how it internally works.</li></ul></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>Opinions | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Opinions</h1><p>Here are some of my opinions that could be considered controversial. Fell free to argue about them with me.</p><h2>Casual</h2><ul><li>Pineapple pizza is the best pizza.</li><li>Teeth should be brushed after breakfast, not before.</li></ul><h2>Mathematics</h2><ul><li>0 is a Natural number.</li><li>The Axiom of Choice is intuitively false.</li></ul><h2>Programming</h2><ul><li>C is a badly designed programming language with ugly syntax.</li><li>Semicolons and braces are syntactic noise and should not be necessary in modern languages.</li><li>Indexing from 0 is <a href="https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html">objectively better</a> than indexing from 1 even if we disregard how it internally works.</li></ul></body></html>

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Quantum Games | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Quantum games</h1><h2>Quantum tic-tac-toe</h2><p>Some time ago, I discovered the game of <a href="https://en.wikipedia.org/wiki/Quantum_tic-tac-toe">quantum tic-tac-toe</a> on Quora. It's played like regular tic-tac-toe, but instead of writing one mark, each player writes two small marks labeled with a unique number, which represent a mark in superposition. There may be multiple small marks in one space and whenever they create a cycle, the player who did not create the cycle can choose the way they will be collapsed — that is, write one regular mark for each pair of small marks in the cycle. If this destroys any other small marks, their counterpart will also turn into a regular mark, and this can chain. The rulas for winning are as usual — three regular marks in a row. It may even happen that both players win at once.</p><h2>Quantum chess</h2><p>When I played quantum tic-tac-toe with my friend, the idea really intrigued us and we wondered how the same concept could apply to a more complex game. And what better game to use for this purpose than chess? So we quickly decided on the rules, took out a chessboard and started playing. Unfortunately, we didn't finish the game, but here is a rough idea of the rules:</p><ul><li>In their turn, a player can choose between doing a quantum move and a collapse.</li><li>A <dfn>quantum move</dfn> consists of choosing two moves that could be played in regular chess and writing them down. This will create two possible positions. When there are already multiple positions, the player can make any two moves that are valid in <em>some</em> positions and they will be applied to all positions where they're legal.</li><li>With a <dfn>quantum collapse</dfn>, the player can choose a quantum move and discard one of the possible moves, which will also remove all possible positions resulting from this move and makes the other move the reality. If it turns out that some other move is now impossible, it will also be discarded, and this can chain.</li><li>A player wins when the opponent's king is captured in <em>all</em> possible positions. Note that the usual rules of check and checkmate would not get on well with quantum chess where a piece may or may not be somewhere, so all rules associated with check and checkmate (such and the king being unable to move through an endangered position when castling) are done away with.</li></ul><h2>Generalized quantum games</h2><p>We soon realized that these rules are not very precise and result in a lot of ambiguity. Therefore, we decided to formalize them. However, since the quantum part is pretty much separate from the rules of normal chess, why not define it in a way that can be used for all games? (Or at least for all deterministic turn-based games.) Therefore, we came up with the concept of game quantumification.</p><p>First, we need a formal idea of a game. I haven't really studied much game theory, so excuse me for using non-standard definitions and symbols.</p><ul><li>A <dfn>game</dfn> consists of a set of states \(S\) and moves \(M\) and is played by a sequence of players \(P\).</li><li>There is always a current state \(s_c \in S\) and a current player \(p_c \in P\).</li><li>A <dfn>move</dfn> \(m \in M\) is a partial function \(S \to S\).</li><li>There is a set of <dfn>available moves</dfn> \(M_a(s_c,p_c) \subseteq M\) that depends on the current state and player. The set may be empty.</li><li>The current player is allowed to choose one move \(m \in M_a\). The current state is then changed to \(m(s_c)\) and the current played is changed based on rules that depend on the game — usually to the cyclically next player in the sequence \(P\).</li><li>Some states are <dfn>final</dfn>. When the game reaches a final state, certain players win and certain players lose, depending on the game.</li></ul></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>Quantum Games | xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><h1>Quantum games</h1><h2>Quantum tic-tac-toe</h2><p>Some time ago, I discovered the game of <a href="https://en.wikipedia.org/wiki/Quantum_tic-tac-toe">quantum tic-tac-toe</a> on Quora. It's played like regular tic-tac-toe, but instead of writing one mark, each player writes two small marks labeled with a unique number, which represent a mark in superposition. There may be multiple small marks in one space and whenever they create a cycle, the player who did not create the cycle can choose the way they will be collapsed — that is, write one regular mark for each pair of small marks in the cycle. If this destroys any other small marks, their counterpart will also turn into a regular mark, and this can chain. The rulas for winning are as usual — three regular marks in a row. It may even happen that both players win at once.</p><h2>Quantum chess</h2><p>When I played quantum tic-tac-toe with my friend, the idea really intrigued us and we wondered how the same concept could apply to a more complex game. And what better game to use for this purpose than chess? So we quickly decided on the rules, took out a chessboard and started playing. Unfortunately, we didn't finish the game, but here is a rough idea of the rules:</p><ul><li>In their turn, a player can choose between doing a quantum move and a collapse.</li><li>A <dfn>quantum move</dfn> consists of choosing two moves that could be played in regular chess and writing them down. This will create two possible positions. When there are already multiple positions, the player can make any two moves that are valid in <em>some</em> positions and they will be applied to all positions where they're legal.</li><li>With a <dfn>quantum collapse</dfn>, the player can choose a quantum move and discard one of the possible moves, which will also remove all possible positions resulting from this move and makes the other move the reality. If it turns out that some other move is now impossible, it will also be discarded, and this can chain.</li><li>A player wins when the opponent's king is captured in <em>all</em> possible positions. Note that the usual rules of check and checkmate would not get on well with quantum chess where a piece may or may not be somewhere, so all rules associated with check and checkmate (such and the king being unable to move through an endangered position when castling) are done away with.</li></ul><h2>Generalized quantum games</h2><p>We soon realized that these rules are not very precise and result in a lot of ambiguity. Therefore, we decided to formalize them. However, since the quantum part is pretty much separate from the rules of normal chess, why not define it in a way that can be used for all games? (Or at least for all deterministic turn-based games.) Therefore, we came up with the concept of game quantumification.</p><p>First, we need a formal idea of a game. I haven't really studied much game theory, so excuse me for using non-standard definitions and symbols.</p><ul><li>A <dfn>game</dfn> consists of a set of states \(S\) and moves \(M\) and is played by a sequence of players \(P\).</li><li>There is always a current state \(s_c \in S\) and a current player \(p_c \in P\).</li><li>A <dfn>move</dfn> \(m \in M\) is a partial function \(S \to S\).</li><li>There is a set of <dfn>available moves</dfn> \(M_a(s_c,p_c) \subseteq M\) that depends on the current state and player. The set may be empty.</li><li>The current player is allowed to choose one move \(m \in M_a\). The current state is then changed to \(m(s_c)\) and the current played is changed based on rules that depend on the game — usually to the cyclically next player in the sequence \(P\).</li><li>Some states are <dfn>final</dfn>. When the game reaches a final state, certain players win and certain players lose, depending on the game.</li></ul></body></html>

View File

@ -0,0 +1,6 @@
prefetch = document.createElement 'link'
prefetch.rel = 'prefetch prerender'
document.head.appendChild prefetch
for link from document.querySelectorAll 'a:not([href^="http://"]):not([href^="https://"]):not([href^="mailto:"])'
link.addEventListener 'mouseover', (event) =>
prefetch.href = event.target.href

18
scripts/hover-prefetch.js Normal file
View File

@ -0,0 +1,18 @@
// Generated by CoffeeScript 2.5.1
(function() {
var link, prefetch, ref;
prefetch = document.createElement('link');
prefetch.rel = 'prefetch prerender';
document.head.appendChild(prefetch);
ref = document.querySelectorAll('a:not([href^="http://"]):not([href^="https://"]):not([href^="mailto:"])');
for (link of ref) {
link.addEventListener('mouseover', (event) => {
return prefetch.href = event.target.href;
});
}
}).call(this);

Binary file not shown.

Binary file not shown.

View File

@ -7,34 +7,22 @@
margin-right: 2mm;
}
a[href^="mailto:"]::after, a[href^="https://en.wikipedia.org/"]::after, a[href^="http://"]::after, a[href^="https://"]::after {
font-family: IcoFont;
}
@font-face {
font-family: Merriweather;
src: url(/styles/fonts/Merriweather-Regular.woff);
font-display: swap;
}
@font-face {
font-family: IcoFont;
src: url(/styles/fonts/icofont.woff2), url(/styles/fonts/icofont.woff);
}
a {
color: #0e0;
text-decoration: none;
}
a[href^="http://"]::after, a[href^="https://"]::after {
content: "";
content: " ➚";
}
a[href^="https://en.wikipedia.org/"]::after {
content: "";
content: " Ⓦ";
}
a[href^="mailto:"]::after {
content: " ";
content: " ✉";
font-weight: 900;
}
body {
@ -43,12 +31,22 @@ body {
overflow-x: auto;
background-color: #000;
color: #fff;
font-family: Merriweather, "Times New Roman", serif;
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
font-size: 12pt;
text-align: justify;
line-height: 1.4;
}
button {
background-color: #222;
color: #fff;
border: none;
padding: 0.5rem;
font-weight: 600;
font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Noto, "Segoe UI", Arial, Helvetica, "Helvetica Neue", sans-serif;
cursor: pointer;
}
figure {
display: flex;
flex-direction: column;
@ -61,6 +59,7 @@ figure figcaption {
h1, h2, h3, h4, h5, h6 {
color: #f80;
font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Noto, "Segoe UI", Arial, Helvetica, "Helvetica Neue", sans-serif;
}
header {
@ -73,6 +72,12 @@ header {
font-size: 36pt;
}
input[type=text], input[type=number] {
background-color: #111;
color: #fff;
border: none;
}
pre {
overflow-x: auto;
padding: 2mm;
@ -82,6 +87,12 @@ pre, code {
background-color: #002;
}
textarea {
background-color: #111;
color: #fff;
border: none;
}
.comparison {
display: flex;
flex-direction: row;
@ -102,14 +113,18 @@ pre, code {
background-color: #700;
}
.disclaimer::before {
content: "";
content: "⚠";
}
.error {
color: #f00;
}
.notice {
background-color: #007;
}
.notice::before {
content: "";
content: "🛈";
}
.qa li:nth-child(odd) {
@ -128,7 +143,7 @@ pre, code {
background-color: #440;
}
.warning::before {
content: "";
content: "";
}
.wip {
@ -145,8 +160,3 @@ pre, code {
font-style: normal;
color: #f80;
}
#xigoi-logo {
width: 2cm;
height: 2cm;
}

View File

@ -1,40 +1,28 @@
$serif: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif
$sans-serif: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Noto, "Segoe UI", Arial, Helvetica, "Helvetica Neue", sans-serif
%box
padding: 2mm
&::before
font-family: IcoFont
margin-right: 2mm
%external-link
&::after
font-family: IcoFont
@font-face
font-family: Merriweather
src: url(/styles/fonts/Merriweather-Regular.woff)
font-display: swap
@font-face
font-family: IcoFont
src: url(/styles/fonts/icofont.woff2), url(/styles/fonts/icofont.woff)
a
color: #0e0
text-decoration: none
a[href^="http://"], a[href^="https://"]
@extend %external-link
&::after
content: " \ef1f"
content: " ➚"
a[href^="https://en.wikipedia.org/"]
@extend %external-link
&::after
content: " \e958"
content: " Ⓦ"
a[href^="mailto:"]
@extend %external-link
&::after
content: " \ef12"
content: " ✉"
font-weight: 900
body
width: min(800px, calc(100% - 8px))
@ -42,11 +30,20 @@ body
overflow-x: auto
background-color: #000
color: #fff
font-family: Merriweather, "Times New Roman", serif
font-family: $serif
font-size: 12pt
text-align: justify
line-height: 1.4
button
background-color: #222
color: #fff
border: none
padding: 0.5rem
font-weight: 600
font-family: $sans-serif
cursor: pointer
figure
display: flex
flex-direction: column
@ -57,6 +54,7 @@ figure
h1, h2, h3, h4, h5, h6
color: #f80
font-family: $sans-serif
header
display: flex
@ -67,6 +65,11 @@ header
margin-bottom: 1cm
font-size: 36pt
input[type="text"], input[type="number"]
background-color: #111
color: #fff
border: none
pre
overflow-x: auto
padding: 2mm
@ -74,6 +77,11 @@ pre
pre, code
background-color: #002
textarea
background-color: #111
color: #fff
border: none
.comparison
display: flex
flex-direction: row
@ -90,13 +98,16 @@ pre, code
.disclaimer
@extend %box
&::before
content: "\f025"
content: ""
background-color: #700
.error
color: #f00
.notice
@extend %box
&::before
content: "\ef4e"
content: "🛈"
background-color: #007
.qa
@ -113,7 +124,7 @@ pre, code
.warning
@extend %box
&::before
content: "\f026"
content: ""
background-color: #440
.wip
@ -126,7 +137,3 @@ pre, code
.xigoi
font-style: normal
color: #f80
#xigoi-logo
width: 2cm
height: 2cm

File diff suppressed because one or more lines are too long

View File

@ -6,8 +6,8 @@ block title
block content
h1 Susan and Male Privilege
p.disclaimer This story is completely fictional. Take whatever you want from it.
p “Men are so privileged.” Susan closed the browser tab with Huffington Post because the newest article criticizing the construction of a shelter for male domestic violence victims made her shake with rage. She put her phone into her pocket and continued walking through the marketplace. “I wish I could experience being a man. I would show them how to use the privilege correctly!” she muttered to herself.
p “Then I have something exactly for you,” an old man sitting inside an aged wooden stall said slowly in a slightly unsettling voice. Susan turned to him with a disgusted expression and shouted: “Look at this <em>white male</em> with an opinion! Stop mansplaining!” The man, completely untouched by her hostility, slowly handed over an item from his stall. “This is the Monkey's Paw. It can grant you any wish you want.” Susan rolled her eyes. As a Sagittarius, she didn't believe in such superstitions. “I'm not giving any money to a man. You're already rich because of the wage gap, so you should be giving money to me.” “I don't need money,” said the man. “I'll happily let you use it for free. But be careful what you wish for, wishes always come with unexpected consequences.”
p “Men are so privileged.” Susan closed the browser tab with Huffington Post because the newest feminist article criticizing the construction of a unisex shelter for domestic violence victims made her shake with rage. She put her phone into her pocket and continued walking through the marketplace. “I with I could experience being a man. I would show them how to use the privilege correctly!” she muttered to herself.
p “Then I have something exactly for you,” an old man sitting inside an aged wooden stall said slowly in a slightly unsettling voice. Susan turned to him with a disgusted expression and shouted: “Look at this <em>white male</em> with an opinion! Stop mansplaining!” The man, completely untouched by her hostility, slowly handed over an item from his stall. “This is the Monkey's Paw. It can grant you any with you want.” Susan rolled her eyes. As a Sagittarius, she didn't believe in such superstitions. “I'm not giving any money to a man. You're already rich because of the wage gap, so you should be giving money to me.” “I don't need money,” said the man. “I'll happily let you use it for free. But be careful what you wish for, wishes always come with unexpected consequences.”
p Susan thought — what unexpected consequences could come with being a man? They have literally everything handed to them on a silver platter. “Fine, I'll try it. Monkey's Paw, I would like to become a man. And make it so that people forget that I used to be a woman.” The paw suddenly curled one of its fingers. Susan started feeling weird. Her waist got narrower. Her chest got wider, but the breasts disappeared and left only the nipples behind. She felt various parts of her body getting covered in hair. And her genitalia completely changed shape. She became… Sean.
p “Wow, it wor… AAAAAH!” he screamed as he realized that his voice had become rougher. “It's okay, I'll get used to this.” He threw another disgusted look at the stallkeeper — who was still a white male after all — and began walking home, excited to try out his newly acquired privilege. He decided that he's going to go through the shady neighborhood, where some random men would call him beautiful when he was a woman. Finally he doesn't have to worry about that!
p “Hey, mate.” Sean was approached by a dirty and stinky guy in a black hoodie. “I ain't ate nothing today, would you spare some money for me?” Normally Sean wouldn't give him anything to avoid supporting his male privilege, but since now he was a man too, there was no power imbalance and he might as well do it. He took out his wallet and before he could think about how much money he's going to give, the beggar snatched the wallet out of his hands and ran away.
@ -18,3 +18,8 @@ block content
p “Phew, that was close. I need to get some money so this doesn't happen again.” He worked at BuzzFeed, so feeling inspired by the incident, he decided to write an article about how cisgender people are trash. He had already copy-pasted seven images from Twitter when he got a call from his boss. “Due to a new company policy to promote gender diversity and abolish the wage gap, we're not allowed to have any male employees. You're fired!” Before Sean could say anything, the boss hung up.
p Sean thought about going to his partner and talking about it, but he realized he still doesn't have one. Well, what's a better time to go and find a girlfriend than now? He opened a dating app and started filling out his new profile. He decided that it would be a good idea to base his description on what kind of boyfriend he always wanted as a woman. “I'm a honest and caring feminist guy with a lot of interests. I love writing, music and adventures. I'm looking for a strong woman who can stand up for herself and treats me as inferior.” Perfect.
p After swiping for two hours and not getting a single match, he figured that the app had probably been hacked and decided to try a more traditional form of dating. There was a nice bar close to his home, so he promptly headed there.
p When Sean woke up, he found himself in a stinky room with thick iron bars on one side and gray walls on the remaining sides. “Oh, you're awake,” the prison ward muttered. “How in hell did I get here?” Sean asked. “Sexual assault,” the warden replied with an annoyed voice, lighting a cigarette. Sean started to vaguely recall the situation: after he had been rudely dismissed by several dozen women, he had finally found one that seemed interested in him, and after a bit of conversation, he pat her on the shoulder in a friendly way and she started yelling… Sean had to sit down and stop thinking because the cigarette smoke was making him nauseous.
p After a few hours of utter boredom, he saw the door open and another warden walked in. “The lady has admitted that she had greatly exaggerated the situation. You're released. However, you're going to be permanently put on a sex offender list. Good luck finding a job now,” she reported and started maniacally laughing. After she had enough, she unlocked the cell.
p Sean slowly walked home, not having any money for public transport. It was raining. He was beginning to think his male privilege was not working quite the way he imagined. But he really didn't want to give up. “What if I apply for a programming job?” he pondered. “Programming is a heavily male-dominated job full of misogynists and neckbeards, so they'll gladly accept me and won't care about some sex offender list.” He shuddered at the thought of working with so many incels, but this was the best plan he could come up with, so he decided to stick with it.
p He looked at a board of programming job offers. Several of them offered free tutoring for beginners, but unfortunately, they were all availeble only for women. “It's fine,” he thoought, “they're going to accept me just for being male.” He proceeded to book an interview.
p In the meantime, he got the idea that he could get some quick money on OnlyFans. He had great experience with it.

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a></body></html>

View File

@ -6,6 +6,7 @@ html(lang="en")
link(rel="icon" href="/images/xigoi-thicc.svg")
link(rel="stylesheet" href="/styles/main.css")
script(async src="/scripts/counter.js")
script(async src="/scripts/hover-prefetch.js")
block head
title
block title
@ -13,7 +14,7 @@ html(lang="en")
body
a(href="/" aria-label="Go to main page")
header
svg(id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg")
svg(id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg")
title xigoi logo
path(d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1")
circle(cx="5" cy="5" r="1" fill="#f80")

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" href="/images/xigoi-thicc.svg"><link rel="stylesheet" href="/styles/main.css"><script async src="/scripts/counter.js"></script><script async src="/scripts/hover-prefetch.js"></script><link rel="stylesheet" href="/styles/mathsessions.css"><link rel="stylesheet" href="/styles/katex.min.css"><script defer src="/scripts/katex.min.js" onload="renderMathInElement(document.body)"></script><title>xigoi</title></head><body><a href="/" aria-label="Go to main page"><header><svg id="xigoi-logo" width="2cm" height="2cm" viewBox="-7 -2 24 24" xmlns="http://www.w3.org/2000/svg"><title>xigoi logo</title><path d="M 0 20 L 9 8 A 5 5 0 1 0 1 8 L 4 12 A 5 5 0 0 0 8 14 A 2 2 0 0 1 10 16 A 4 4 0 0 1 2 16 A 5 5 0 0 1 3 13 A 10 10 0 0 0 5 7" stroke="#0ff" stroke-width="1"></path><circle cx="5" cy="5" r="1" fill="#f80"></circle></svg><div class="xigoi">xigoi</div></header></a><p class="notice">Tento článek je zkopírován ze stránky <a href="http://mathsessions.klusik.cz/">Matematická setkání</a>.</p></body></html>