POSIX sh — variables, functions, conditions, and loops
Vee Satayamas (veer66) & Big Pickle · 2026-08-11
| Distro | Pre-installed Thai font |
|---|---|
| Antix 23.2 | yes |
| CachyOS 2025-05-03 | yes |
| Debian 12.10 | yes |
| Deepin 25a | yes |
| Fedora 42 KDE Plasma Edition | yes |
| Fedora Silverblue 42.1.1 | yes |
| Kali 2025.1.c | yes (it is not sharp.) |
| MX Linux 23.6 XFCE | yes (it is not sharp.) |
| id: rocks.veer66.Titi | |
| runtime: org.freedesktop.Platform | |
| runtime-version: '23.08' | |
| sdk: org.freedesktop.Sdk | |
| command: toto | |
| modules: | |
| - name: toto | |
| buildsystem: simple | |
| build-commands: | |
| - install -Dm755 toto.sh /app/bin/toto |
| Task | CPython 3.10 | Go 1.6 | Rustc 1.83.0 | GCC-13 C |
|---|---|---|---|---|
| Find object references | Runtime | Runtime | Compiler | Programmer |
| Identify garbage | Runtime | Runtime | Compiler | Programmer |
| Instruction selection | Interpreter | Compiler | Compiler | Compiler |
| Control heap or stack usage | Automatic | Automatic | Programmer | Programmer |
| Meta programming | Runtime | Runtime | Compiler | Compiler |
| def tokenize_en(text) | |
| # modified https://github.com/luismsgomes/mosestokenizer/blob/master/src/mosestokenizer/tokenizer-v1.1.perl | |
| text = " #{text.chomp} " | |
| text.gsub!(/\s+/, ' ') | |
| text.gsub!(/[\000-\037]/, '') | |
| text.gsub!(/([^\p{Alnum}\s\.\'\`\,\-])/, ' \1 ') | |
| text.gsub!(/\.([\.]+)/, 'DOTMULTI\1') | |
| while text =~ /DOTMULTI\./ | |
| text.gsub!(/DOTMULTI\.([^\.])/, 'DOTDOTMULTI \1') | |
| text.gsub!(/DOTMULTI\./, 'DOTDOTMULTI') |
| <?xml version='1.0'?> | |
| <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
| <fontconfig> | |
| <match> | |
| <test name="lang" compare="contains"> | |
| <string>th</string> | |
| </test> | |
| <edit mode="prepend" name="family"> | |
| <string>Noto Sans Thai</string> | |
| </edit> |
| year(math, 60). | |
| year(ai, 62). | |
| year(english, 65). | |
| str_rev(S, T) :- string_codes(S, SCODES), reverse(SCODES, TCODES), string_codes(T, TCODES). | |
| can_register(STUDENT_ID, SUBJECT) :- str_rev(STUDENT_ID, REV_STUDENT_ID), | |
| sub_string(REV_STUDENT_ID, 0, 2, _, REV_YEAR_STR), | |
| str_rev(REV_YEAR_STR, YEAR_STR), | |
| number_string(YEAR, YEAR_STR), |
| year(math, 60). | |
| year(ai, 62). | |
| year(english, 65). | |
| can_register(STUDENT_ID, SUBJECT) :- sub_string(STUDENT_ID, 0, 2, _, YEAR_STR), | |
| number_string(YEAR, YEAR_STR), | |
| year(SUBJECT, REQ_YEAR), | |
| YEAR =< REQ_YEAR. |
| male(tom). | |
| male(bob). | |
| male(jim). | |
| female(liz). | |
| female(pat). | |
| female(ann). | |
| female(pam). | |
| parent(pam,bob). | |
| parent(tom,bob). | |
| parent(tom,liz). |
| #!/bin/bash | |
| rm -rf fast_align | |
| git clone https://github.com/clab/fast_align.git | |
| pushd fast_align | |
| cmake . | |
| make -j $(nproc) | |
| popd |