From 32e0e105f663ace08896f22ab4079521070b0cac Mon Sep 17 00:00:00 2001 From: Amir Saeid Date: Wed, 18 Feb 2026 21:25:00 +0000 Subject: Change the theme and add a new post --- .gitmodules | 3 + content/post/fairstream.md | 86 +++++ hugo.toml | 9 +- hugo.yaml | 4 - layouts/partials/extended_head.html | 14 + package-lock.json | 18 ++ package.json | 5 + public/404.html | 220 ++++++++----- public/apple-touch-icon.png | Bin 0 -> 190 bytes public/bundle.min.js | 3 + public/categories/index.html | 228 ++++++++----- ...5203d36b442c1f66f718ff4e8164fa86cf6c61ad641.css | 1 + ...31afc5466d5f7bc2f0bc9abdd98b69385335d7baee4.css | 1 + ...84af26737007eb5051b157b86fc24487c94f3dc8bbe.css | 1 + ...a92d63e69e849e2200e0002a228d137f236b09ecd75.css | 1 + ...d52a38b19d8950fe78ca29454ea8c2595cf26aad5c0.css | 1 + ...9c6647d0223a38db52e2561dd87966eb5fc7c6bdac6.css | 1 + ...9d0897c5833d9d5bf1ff31f5e60ea3ee42ce2b1268c.css | 1 + ...68f71f519901124fa5cbb4519b2fb0667a21e9aca39.css | 1 + ...504b7925fc1c581992a4bf57f163e5d69cc1db7d836.css | 1 + ...0cd49c05216742d42fc8ecbfbe6b67083412b609bd3.css | 1 + ...e50f005448facf29a53001b57e038828daa466b25c0.css | 1 + ...4c8996fb92427ae41e4649b934ca495991b7852b855.css | 2 + ...1cdbf802312390d30e4b1d8dc9d814a5b5454d0ac11.css | 1 + public/favicon.png | Bin 0 -> 190 bytes public/fonts/FiraCode-Latin.woff2 | Bin 0 -> 35496 bytes public/fonts/FiraCode-LatinExt.woff2 | Bin 0 -> 12696 bytes public/index.html | 352 ++++++++++++++------- public/index.xml | 9 +- public/mathjax/a11y/assistive-mml.js | 1 + public/mathjax/a11y/complexity.js | 1 + public/mathjax/a11y/explorer.js | 1 + public/mathjax/a11y/semantic-enrich.js | 1 + public/mathjax/a11y/sre.js | 1 + public/mathjax/adaptors/liteDOM.js | 1 + public/mathjax/core.js | 1 + public/mathjax/input/asciimath.js | 1 + public/mathjax/input/mml.js | 1 + public/mathjax/input/mml/entities.js | 1 + public/mathjax/input/mml/extensions/mml3.js | 1 + public/mathjax/input/mml/extensions/mml3.sef.json | 1 + public/mathjax/input/tex-base.js | 1 + public/mathjax/input/tex-full.js | 34 ++ public/mathjax/input/tex.js | 1 + public/mathjax/input/tex/extensions/action.js | 1 + .../mathjax/input/tex/extensions/all-packages.js | 34 ++ public/mathjax/input/tex/extensions/ams.js | 1 + public/mathjax/input/tex/extensions/amscd.js | 1 + public/mathjax/input/tex/extensions/autoload.js | 1 + public/mathjax/input/tex/extensions/bbox.js | 1 + public/mathjax/input/tex/extensions/boldsymbol.js | 1 + public/mathjax/input/tex/extensions/braket.js | 1 + public/mathjax/input/tex/extensions/bussproofs.js | 1 + public/mathjax/input/tex/extensions/cancel.js | 1 + public/mathjax/input/tex/extensions/cases.js | 1 + public/mathjax/input/tex/extensions/centernot.js | 1 + public/mathjax/input/tex/extensions/color.js | 1 + public/mathjax/input/tex/extensions/colortbl.js | 1 + public/mathjax/input/tex/extensions/colorv2.js | 1 + .../mathjax/input/tex/extensions/configmacros.js | 1 + public/mathjax/input/tex/extensions/empheq.js | 1 + public/mathjax/input/tex/extensions/enclose.js | 1 + public/mathjax/input/tex/extensions/extpfeil.js | 1 + public/mathjax/input/tex/extensions/gensymb.js | 1 + public/mathjax/input/tex/extensions/html.js | 1 + public/mathjax/input/tex/extensions/mathtools.js | 1 + public/mathjax/input/tex/extensions/mhchem.js | 34 ++ public/mathjax/input/tex/extensions/newcommand.js | 1 + public/mathjax/input/tex/extensions/noerrors.js | 1 + public/mathjax/input/tex/extensions/noundefined.js | 1 + public/mathjax/input/tex/extensions/physics.js | 1 + public/mathjax/input/tex/extensions/require.js | 1 + public/mathjax/input/tex/extensions/setoptions.js | 1 + public/mathjax/input/tex/extensions/tagformat.js | 1 + public/mathjax/input/tex/extensions/textcomp.js | 1 + public/mathjax/input/tex/extensions/textmacros.js | 1 + public/mathjax/input/tex/extensions/unicode.js | 1 + public/mathjax/input/tex/extensions/upgreek.js | 1 + public/mathjax/input/tex/extensions/verb.js | 1 + public/mathjax/latest.js | 1 + public/mathjax/loader.js | 1 + public/mathjax/mml-chtml.js | 1 + public/mathjax/mml-svg.js | 1 + public/mathjax/node-main.js | 1 + public/mathjax/output/chtml.js | 1 + public/mathjax/output/chtml/fonts/tex.js | 1 + .../chtml/fonts/woff-v2/MathJax_AMS-Regular.woff | Bin 0 -> 40808 bytes .../fonts/woff-v2/MathJax_Calligraphic-Bold.woff | Bin 0 -> 9908 bytes .../woff-v2/MathJax_Calligraphic-Regular.woff | Bin 0 -> 9600 bytes .../chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff | Bin 0 -> 22340 bytes .../fonts/woff-v2/MathJax_Fraktur-Regular.woff | Bin 0 -> 21480 bytes .../chtml/fonts/woff-v2/MathJax_Main-Bold.woff | Bin 0 -> 34464 bytes .../chtml/fonts/woff-v2/MathJax_Main-Italic.woff | Bin 0 -> 20832 bytes .../chtml/fonts/woff-v2/MathJax_Main-Regular.woff | Bin 0 -> 34160 bytes .../fonts/woff-v2/MathJax_Math-BoldItalic.woff | Bin 0 -> 19776 bytes .../chtml/fonts/woff-v2/MathJax_Math-Italic.woff | Bin 0 -> 19360 bytes .../chtml/fonts/woff-v2/MathJax_Math-Regular.woff | Bin 0 -> 19288 bytes .../fonts/woff-v2/MathJax_SansSerif-Bold.woff | Bin 0 -> 15944 bytes .../fonts/woff-v2/MathJax_SansSerif-Italic.woff | Bin 0 -> 14628 bytes .../fonts/woff-v2/MathJax_SansSerif-Regular.woff | Bin 0 -> 12660 bytes .../fonts/woff-v2/MathJax_Script-Regular.woff | Bin 0 -> 11852 bytes .../chtml/fonts/woff-v2/MathJax_Size1-Regular.woff | Bin 0 -> 5792 bytes .../chtml/fonts/woff-v2/MathJax_Size2-Regular.woff | Bin 0 -> 5464 bytes .../chtml/fonts/woff-v2/MathJax_Size3-Regular.woff | Bin 0 -> 3244 bytes .../chtml/fonts/woff-v2/MathJax_Size4-Regular.woff | Bin 0 -> 5148 bytes .../fonts/woff-v2/MathJax_Typewriter-Regular.woff | Bin 0 -> 17604 bytes .../chtml/fonts/woff-v2/MathJax_Vector-Bold.woff | Bin 0 -> 1116 bytes .../fonts/woff-v2/MathJax_Vector-Regular.woff | Bin 0 -> 1136 bytes .../output/chtml/fonts/woff-v2/MathJax_Zero.woff | Bin 0 -> 1368 bytes public/mathjax/output/svg.js | 1 + public/mathjax/output/svg/fonts/tex.js | 1 + public/mathjax/sre/mathmaps/base.json | 29 ++ public/mathjax/sre/mathmaps/ca.json | 140 ++++++++ public/mathjax/sre/mathmaps/da.json | 140 ++++++++ public/mathjax/sre/mathmaps/de.json | 146 +++++++++ public/mathjax/sre/mathmaps/en.json | 158 +++++++++ public/mathjax/sre/mathmaps/es.json | 140 ++++++++ public/mathjax/sre/mathmaps/fr.json | 146 +++++++++ public/mathjax/sre/mathmaps/hi.json | 146 +++++++++ public/mathjax/sre/mathmaps/it.json | 146 +++++++++ public/mathjax/sre/mathmaps/nb.json | 146 +++++++++ public/mathjax/sre/mathmaps/nemeth.json | 125 ++++++++ public/mathjax/sre/mathmaps/nn.json | 146 +++++++++ public/mathjax/sre/mathmaps/sv.json | 146 +++++++++ public/mathjax/startup.js | 1 + public/mathjax/tex-chtml-full-speech.js | 34 ++ public/mathjax/tex-chtml-full.js | 34 ++ public/mathjax/tex-chtml.js | 1 + public/mathjax/tex-mml-chtml.js | 1 + public/mathjax/tex-mml-svg.js | 1 + public/mathjax/tex-svg-full.js | 34 ++ public/mathjax/tex-svg.js | 1 + public/mathjax/ui/lazy.js | 1 + public/mathjax/ui/menu.js | 1 + public/mathjax/ui/safe.js | 1 + public/og-image.png | Bin 0 -> 4595 bytes public/page/1/index.html | 9 + public/post/2017-08-16-tapl/index.html | 288 +++++++++++------ .../index.html | 226 +++++++++++++ public/post/2017-08-22-thinkpad-e470/index.html | 300 +++++++++++------- .../2017-08-24-untyped-lambda-calculus/index.html | 233 ++++++++++++++ public/post/2018-09-11-shapeless/index.html | 229 ++++++++++++++ public/post/fairstream/index.html | 263 +++++++++++++++ public/post/index.html | 351 +++++++++++++------- public/post/index.xml | 9 +- .../index.html | 258 +++++++++++++++ public/sitemap.xml | 9 +- public/tags/e470/index.html | 284 +++++++++++------ public/tags/index.html | 320 ++++++++++--------- public/tags/rust/index.html | 282 +++++++++++------ public/tags/scala/index.html | 217 +++++++++++++ public/tags/scala/index.xml | 19 ++ public/tags/scala/page/1/index.html | 9 + public/tags/shapeless/index.html | 217 +++++++++++++ public/tags/shapeless/index.xml | 19 ++ public/tags/shapeless/page/1/index.html | 9 + public/tags/tapl/index.html | 282 +++++++++++------ public/tags/thinkpad/index.html | 284 +++++++++++------ static/mathjax/a11y/assistive-mml.js | 1 + static/mathjax/a11y/complexity.js | 1 + static/mathjax/a11y/explorer.js | 1 + static/mathjax/a11y/semantic-enrich.js | 1 + static/mathjax/a11y/sre.js | 1 + static/mathjax/adaptors/liteDOM.js | 1 + static/mathjax/core.js | 1 + static/mathjax/input/asciimath.js | 1 + static/mathjax/input/mml.js | 1 + static/mathjax/input/mml/entities.js | 1 + static/mathjax/input/mml/extensions/mml3.js | 1 + static/mathjax/input/mml/extensions/mml3.sef.json | 1 + static/mathjax/input/tex-base.js | 1 + static/mathjax/input/tex-full.js | 34 ++ static/mathjax/input/tex.js | 1 + static/mathjax/input/tex/extensions/action.js | 1 + .../mathjax/input/tex/extensions/all-packages.js | 34 ++ static/mathjax/input/tex/extensions/ams.js | 1 + static/mathjax/input/tex/extensions/amscd.js | 1 + static/mathjax/input/tex/extensions/autoload.js | 1 + static/mathjax/input/tex/extensions/bbox.js | 1 + static/mathjax/input/tex/extensions/boldsymbol.js | 1 + static/mathjax/input/tex/extensions/braket.js | 1 + static/mathjax/input/tex/extensions/bussproofs.js | 1 + static/mathjax/input/tex/extensions/cancel.js | 1 + static/mathjax/input/tex/extensions/cases.js | 1 + static/mathjax/input/tex/extensions/centernot.js | 1 + static/mathjax/input/tex/extensions/color.js | 1 + static/mathjax/input/tex/extensions/colortbl.js | 1 + static/mathjax/input/tex/extensions/colorv2.js | 1 + .../mathjax/input/tex/extensions/configmacros.js | 1 + static/mathjax/input/tex/extensions/empheq.js | 1 + static/mathjax/input/tex/extensions/enclose.js | 1 + static/mathjax/input/tex/extensions/extpfeil.js | 1 + static/mathjax/input/tex/extensions/gensymb.js | 1 + static/mathjax/input/tex/extensions/html.js | 1 + static/mathjax/input/tex/extensions/mathtools.js | 1 + static/mathjax/input/tex/extensions/mhchem.js | 34 ++ static/mathjax/input/tex/extensions/newcommand.js | 1 + static/mathjax/input/tex/extensions/noerrors.js | 1 + static/mathjax/input/tex/extensions/noundefined.js | 1 + static/mathjax/input/tex/extensions/physics.js | 1 + static/mathjax/input/tex/extensions/require.js | 1 + static/mathjax/input/tex/extensions/setoptions.js | 1 + static/mathjax/input/tex/extensions/tagformat.js | 1 + static/mathjax/input/tex/extensions/textcomp.js | 1 + static/mathjax/input/tex/extensions/textmacros.js | 1 + static/mathjax/input/tex/extensions/unicode.js | 1 + static/mathjax/input/tex/extensions/upgreek.js | 1 + static/mathjax/input/tex/extensions/verb.js | 1 + static/mathjax/latest.js | 1 + static/mathjax/loader.js | 1 + static/mathjax/mml-chtml.js | 1 + static/mathjax/mml-svg.js | 1 + static/mathjax/node-main.js | 1 + static/mathjax/output/chtml.js | 1 + static/mathjax/output/chtml/fonts/tex.js | 1 + .../chtml/fonts/woff-v2/MathJax_AMS-Regular.woff | Bin 0 -> 40808 bytes .../fonts/woff-v2/MathJax_Calligraphic-Bold.woff | Bin 0 -> 9908 bytes .../woff-v2/MathJax_Calligraphic-Regular.woff | Bin 0 -> 9600 bytes .../chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff | Bin 0 -> 22340 bytes .../fonts/woff-v2/MathJax_Fraktur-Regular.woff | Bin 0 -> 21480 bytes .../chtml/fonts/woff-v2/MathJax_Main-Bold.woff | Bin 0 -> 34464 bytes .../chtml/fonts/woff-v2/MathJax_Main-Italic.woff | Bin 0 -> 20832 bytes .../chtml/fonts/woff-v2/MathJax_Main-Regular.woff | Bin 0 -> 34160 bytes .../fonts/woff-v2/MathJax_Math-BoldItalic.woff | Bin 0 -> 19776 bytes .../chtml/fonts/woff-v2/MathJax_Math-Italic.woff | Bin 0 -> 19360 bytes .../chtml/fonts/woff-v2/MathJax_Math-Regular.woff | Bin 0 -> 19288 bytes .../fonts/woff-v2/MathJax_SansSerif-Bold.woff | Bin 0 -> 15944 bytes .../fonts/woff-v2/MathJax_SansSerif-Italic.woff | Bin 0 -> 14628 bytes .../fonts/woff-v2/MathJax_SansSerif-Regular.woff | Bin 0 -> 12660 bytes .../fonts/woff-v2/MathJax_Script-Regular.woff | Bin 0 -> 11852 bytes .../chtml/fonts/woff-v2/MathJax_Size1-Regular.woff | Bin 0 -> 5792 bytes .../chtml/fonts/woff-v2/MathJax_Size2-Regular.woff | Bin 0 -> 5464 bytes .../chtml/fonts/woff-v2/MathJax_Size3-Regular.woff | Bin 0 -> 3244 bytes .../chtml/fonts/woff-v2/MathJax_Size4-Regular.woff | Bin 0 -> 5148 bytes .../fonts/woff-v2/MathJax_Typewriter-Regular.woff | Bin 0 -> 17604 bytes .../chtml/fonts/woff-v2/MathJax_Vector-Bold.woff | Bin 0 -> 1116 bytes .../fonts/woff-v2/MathJax_Vector-Regular.woff | Bin 0 -> 1136 bytes .../output/chtml/fonts/woff-v2/MathJax_Zero.woff | Bin 0 -> 1368 bytes static/mathjax/output/svg.js | 1 + static/mathjax/output/svg/fonts/tex.js | 1 + static/mathjax/sre/mathmaps/base.json | 29 ++ static/mathjax/sre/mathmaps/ca.json | 140 ++++++++ static/mathjax/sre/mathmaps/da.json | 140 ++++++++ static/mathjax/sre/mathmaps/de.json | 146 +++++++++ static/mathjax/sre/mathmaps/en.json | 158 +++++++++ static/mathjax/sre/mathmaps/es.json | 140 ++++++++ static/mathjax/sre/mathmaps/fr.json | 146 +++++++++ static/mathjax/sre/mathmaps/hi.json | 146 +++++++++ static/mathjax/sre/mathmaps/it.json | 146 +++++++++ static/mathjax/sre/mathmaps/nb.json | 146 +++++++++ static/mathjax/sre/mathmaps/nemeth.json | 125 ++++++++ static/mathjax/sre/mathmaps/nn.json | 146 +++++++++ static/mathjax/sre/mathmaps/sv.json | 146 +++++++++ static/mathjax/startup.js | 1 + static/mathjax/tex-chtml-full-speech.js | 34 ++ static/mathjax/tex-chtml-full.js | 34 ++ static/mathjax/tex-chtml.js | 1 + static/mathjax/tex-mml-chtml.js | 1 + static/mathjax/tex-mml-svg.js | 1 + static/mathjax/tex-svg-full.js | 34 ++ static/mathjax/tex-svg.js | 1 + static/mathjax/ui/lazy.js | 1 + static/mathjax/ui/menu.js | 1 + static/mathjax/ui/safe.js | 1 + themes/terminal | 1 + 265 files changed, 7948 insertions(+), 1179 deletions(-) create mode 100644 content/post/fairstream.md delete mode 100644 hugo.yaml create mode 100644 layouts/partials/extended_head.html create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/apple-touch-icon.png create mode 100644 public/bundle.min.js create mode 100644 public/css/buttons.min.86f6b4c106b6c6eb690ae5203d36b442c1f66f718ff4e8164fa86cf6c61ad641.css create mode 100644 public/css/code.min.d529ea4b2fb8d34328d7d31afc5466d5f7bc2f0bc9abdd98b69385335d7baee4.css create mode 100644 public/css/fonts.min.5bb7ed13e1d00d8ff39ea84af26737007eb5051b157b86fc24487c94f3dc8bbe.css create mode 100644 public/css/footer.min.eb8dfc2c6a7eafa36cd3ba92d63e69e849e2200e0002a228d137f236b09ecd75.css create mode 100644 public/css/gist.min.a751e8b0abe1ba8bc53ced52a38b19d8950fe78ca29454ea8c2595cf26aad5c0.css create mode 100644 public/css/header.min.75c7eb0e2872d95ff48109c6647d0223a38db52e2561dd87966eb5fc7c6bdac6.css create mode 100644 public/css/main.min.36833afd348409fc6c3d09d0897c5833d9d5bf1ff31f5e60ea3ee42ce2b1268c.css create mode 100644 public/css/menu.min.3c17467ebeb3d38663dce68f71f519901124fa5cbb4519b2fb0667a21e9aca39.css create mode 100644 public/css/pagination.min.bbb986dbce00a5ce5aca0504b7925fc1c581992a4bf57f163e5d69cc1db7d836.css create mode 100644 public/css/post.min.e6dddd258e64c83e05cec0cd49c05216742d42fc8ecbfbe6b67083412b609bd3.css create mode 100644 public/css/syntax.min.a0773cce9310cb6d8ed23e50f005448facf29a53001b57e038828daa466b25c0.css create mode 100644 public/css/terminal.min.e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.css create mode 100644 public/css/terms.min.b81791663c3790e738e571cdbf802312390d30e4b1d8dc9d814a5b5454d0ac11.css create mode 100644 public/favicon.png create mode 100644 public/fonts/FiraCode-Latin.woff2 create mode 100644 public/fonts/FiraCode-LatinExt.woff2 create mode 100644 public/mathjax/a11y/assistive-mml.js create mode 100644 public/mathjax/a11y/complexity.js create mode 100644 public/mathjax/a11y/explorer.js create mode 100644 public/mathjax/a11y/semantic-enrich.js create mode 100644 public/mathjax/a11y/sre.js create mode 100644 public/mathjax/adaptors/liteDOM.js create mode 100644 public/mathjax/core.js create mode 100644 public/mathjax/input/asciimath.js create mode 100644 public/mathjax/input/mml.js create mode 100644 public/mathjax/input/mml/entities.js create mode 100644 public/mathjax/input/mml/extensions/mml3.js create mode 100644 public/mathjax/input/mml/extensions/mml3.sef.json create mode 100644 public/mathjax/input/tex-base.js create mode 100644 public/mathjax/input/tex-full.js create mode 100644 public/mathjax/input/tex.js create mode 100644 public/mathjax/input/tex/extensions/action.js create mode 100644 public/mathjax/input/tex/extensions/all-packages.js create mode 100644 public/mathjax/input/tex/extensions/ams.js create mode 100644 public/mathjax/input/tex/extensions/amscd.js create mode 100644 public/mathjax/input/tex/extensions/autoload.js create mode 100644 public/mathjax/input/tex/extensions/bbox.js create mode 100644 public/mathjax/input/tex/extensions/boldsymbol.js create mode 100644 public/mathjax/input/tex/extensions/braket.js create mode 100644 public/mathjax/input/tex/extensions/bussproofs.js create mode 100644 public/mathjax/input/tex/extensions/cancel.js create mode 100644 public/mathjax/input/tex/extensions/cases.js create mode 100644 public/mathjax/input/tex/extensions/centernot.js create mode 100644 public/mathjax/input/tex/extensions/color.js create mode 100644 public/mathjax/input/tex/extensions/colortbl.js create mode 100644 public/mathjax/input/tex/extensions/colorv2.js create mode 100644 public/mathjax/input/tex/extensions/configmacros.js create mode 100644 public/mathjax/input/tex/extensions/empheq.js create mode 100644 public/mathjax/input/tex/extensions/enclose.js create mode 100644 public/mathjax/input/tex/extensions/extpfeil.js create mode 100644 public/mathjax/input/tex/extensions/gensymb.js create mode 100644 public/mathjax/input/tex/extensions/html.js create mode 100644 public/mathjax/input/tex/extensions/mathtools.js create mode 100644 public/mathjax/input/tex/extensions/mhchem.js create mode 100644 public/mathjax/input/tex/extensions/newcommand.js create mode 100644 public/mathjax/input/tex/extensions/noerrors.js create mode 100644 public/mathjax/input/tex/extensions/noundefined.js create mode 100644 public/mathjax/input/tex/extensions/physics.js create mode 100644 public/mathjax/input/tex/extensions/require.js create mode 100644 public/mathjax/input/tex/extensions/setoptions.js create mode 100644 public/mathjax/input/tex/extensions/tagformat.js create mode 100644 public/mathjax/input/tex/extensions/textcomp.js create mode 100644 public/mathjax/input/tex/extensions/textmacros.js create mode 100644 public/mathjax/input/tex/extensions/unicode.js create mode 100644 public/mathjax/input/tex/extensions/upgreek.js create mode 100644 public/mathjax/input/tex/extensions/verb.js create mode 100644 public/mathjax/latest.js create mode 100644 public/mathjax/loader.js create mode 100644 public/mathjax/mml-chtml.js create mode 100644 public/mathjax/mml-svg.js create mode 100644 public/mathjax/node-main.js create mode 100644 public/mathjax/output/chtml.js create mode 100644 public/mathjax/output/chtml/fonts/tex.js create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff create mode 100644 public/mathjax/output/chtml/fonts/woff-v2/MathJax_Zero.woff create mode 100644 public/mathjax/output/svg.js create mode 100644 public/mathjax/output/svg/fonts/tex.js create mode 100644 public/mathjax/sre/mathmaps/base.json create mode 100644 public/mathjax/sre/mathmaps/ca.json create mode 100644 public/mathjax/sre/mathmaps/da.json create mode 100644 public/mathjax/sre/mathmaps/de.json create mode 100644 public/mathjax/sre/mathmaps/en.json create mode 100644 public/mathjax/sre/mathmaps/es.json create mode 100644 public/mathjax/sre/mathmaps/fr.json create mode 100644 public/mathjax/sre/mathmaps/hi.json create mode 100644 public/mathjax/sre/mathmaps/it.json create mode 100644 public/mathjax/sre/mathmaps/nb.json create mode 100644 public/mathjax/sre/mathmaps/nemeth.json create mode 100644 public/mathjax/sre/mathmaps/nn.json create mode 100644 public/mathjax/sre/mathmaps/sv.json create mode 100644 public/mathjax/startup.js create mode 100644 public/mathjax/tex-chtml-full-speech.js create mode 100644 public/mathjax/tex-chtml-full.js create mode 100644 public/mathjax/tex-chtml.js create mode 100644 public/mathjax/tex-mml-chtml.js create mode 100644 public/mathjax/tex-mml-svg.js create mode 100644 public/mathjax/tex-svg-full.js create mode 100644 public/mathjax/tex-svg.js create mode 100644 public/mathjax/ui/lazy.js create mode 100644 public/mathjax/ui/menu.js create mode 100644 public/mathjax/ui/safe.js create mode 100644 public/og-image.png create mode 100644 public/page/1/index.html create mode 100644 public/post/2017-08-17-untyped-arithmetic-expressions/index.html create mode 100644 public/post/2017-08-24-untyped-lambda-calculus/index.html create mode 100644 public/post/2018-09-11-shapeless/index.html create mode 100644 public/post/fairstream/index.html create mode 100644 public/post/simple-fair-and-terminating-backtracking-monad-transformer/index.html create mode 100644 public/tags/scala/index.html create mode 100644 public/tags/scala/index.xml create mode 100644 public/tags/scala/page/1/index.html create mode 100644 public/tags/shapeless/index.html create mode 100644 public/tags/shapeless/index.xml create mode 100644 public/tags/shapeless/page/1/index.html create mode 100644 static/mathjax/a11y/assistive-mml.js create mode 100644 static/mathjax/a11y/complexity.js create mode 100644 static/mathjax/a11y/explorer.js create mode 100644 static/mathjax/a11y/semantic-enrich.js create mode 100644 static/mathjax/a11y/sre.js create mode 100644 static/mathjax/adaptors/liteDOM.js create mode 100644 static/mathjax/core.js create mode 100644 static/mathjax/input/asciimath.js create mode 100644 static/mathjax/input/mml.js create mode 100644 static/mathjax/input/mml/entities.js create mode 100644 static/mathjax/input/mml/extensions/mml3.js create mode 100644 static/mathjax/input/mml/extensions/mml3.sef.json create mode 100644 static/mathjax/input/tex-base.js create mode 100644 static/mathjax/input/tex-full.js create mode 100644 static/mathjax/input/tex.js create mode 100644 static/mathjax/input/tex/extensions/action.js create mode 100644 static/mathjax/input/tex/extensions/all-packages.js create mode 100644 static/mathjax/input/tex/extensions/ams.js create mode 100644 static/mathjax/input/tex/extensions/amscd.js create mode 100644 static/mathjax/input/tex/extensions/autoload.js create mode 100644 static/mathjax/input/tex/extensions/bbox.js create mode 100644 static/mathjax/input/tex/extensions/boldsymbol.js create mode 100644 static/mathjax/input/tex/extensions/braket.js create mode 100644 static/mathjax/input/tex/extensions/bussproofs.js create mode 100644 static/mathjax/input/tex/extensions/cancel.js create mode 100644 static/mathjax/input/tex/extensions/cases.js create mode 100644 static/mathjax/input/tex/extensions/centernot.js create mode 100644 static/mathjax/input/tex/extensions/color.js create mode 100644 static/mathjax/input/tex/extensions/colortbl.js create mode 100644 static/mathjax/input/tex/extensions/colorv2.js create mode 100644 static/mathjax/input/tex/extensions/configmacros.js create mode 100644 static/mathjax/input/tex/extensions/empheq.js create mode 100644 static/mathjax/input/tex/extensions/enclose.js create mode 100644 static/mathjax/input/tex/extensions/extpfeil.js create mode 100644 static/mathjax/input/tex/extensions/gensymb.js create mode 100644 static/mathjax/input/tex/extensions/html.js create mode 100644 static/mathjax/input/tex/extensions/mathtools.js create mode 100644 static/mathjax/input/tex/extensions/mhchem.js create mode 100644 static/mathjax/input/tex/extensions/newcommand.js create mode 100644 static/mathjax/input/tex/extensions/noerrors.js create mode 100644 static/mathjax/input/tex/extensions/noundefined.js create mode 100644 static/mathjax/input/tex/extensions/physics.js create mode 100644 static/mathjax/input/tex/extensions/require.js create mode 100644 static/mathjax/input/tex/extensions/setoptions.js create mode 100644 static/mathjax/input/tex/extensions/tagformat.js create mode 100644 static/mathjax/input/tex/extensions/textcomp.js create mode 100644 static/mathjax/input/tex/extensions/textmacros.js create mode 100644 static/mathjax/input/tex/extensions/unicode.js create mode 100644 static/mathjax/input/tex/extensions/upgreek.js create mode 100644 static/mathjax/input/tex/extensions/verb.js create mode 100644 static/mathjax/latest.js create mode 100644 static/mathjax/loader.js create mode 100644 static/mathjax/mml-chtml.js create mode 100644 static/mathjax/mml-svg.js create mode 100644 static/mathjax/node-main.js create mode 100644 static/mathjax/output/chtml.js create mode 100644 static/mathjax/output/chtml/fonts/tex.js create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff create mode 100644 static/mathjax/output/chtml/fonts/woff-v2/MathJax_Zero.woff create mode 100644 static/mathjax/output/svg.js create mode 100644 static/mathjax/output/svg/fonts/tex.js create mode 100644 static/mathjax/sre/mathmaps/base.json create mode 100644 static/mathjax/sre/mathmaps/ca.json create mode 100644 static/mathjax/sre/mathmaps/da.json create mode 100644 static/mathjax/sre/mathmaps/de.json create mode 100644 static/mathjax/sre/mathmaps/en.json create mode 100644 static/mathjax/sre/mathmaps/es.json create mode 100644 static/mathjax/sre/mathmaps/fr.json create mode 100644 static/mathjax/sre/mathmaps/hi.json create mode 100644 static/mathjax/sre/mathmaps/it.json create mode 100644 static/mathjax/sre/mathmaps/nb.json create mode 100644 static/mathjax/sre/mathmaps/nemeth.json create mode 100644 static/mathjax/sre/mathmaps/nn.json create mode 100644 static/mathjax/sre/mathmaps/sv.json create mode 100644 static/mathjax/startup.js create mode 100644 static/mathjax/tex-chtml-full-speech.js create mode 100644 static/mathjax/tex-chtml-full.js create mode 100644 static/mathjax/tex-chtml.js create mode 100644 static/mathjax/tex-mml-chtml.js create mode 100644 static/mathjax/tex-mml-svg.js create mode 100644 static/mathjax/tex-svg-full.js create mode 100644 static/mathjax/tex-svg.js create mode 100644 static/mathjax/ui/lazy.js create mode 100644 static/mathjax/ui/menu.js create mode 100644 static/mathjax/ui/safe.js create mode 160000 themes/terminal diff --git a/.gitmodules b/.gitmodules index ba8981a..ad2d37c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "themes/ananke"] path = themes/ananke url = https://github.com/theNewDynamic/gohugo-theme-ananke +[submodule "themes/terminal"] + path = themes/terminal + url = https://github.com/panr/hugo-theme-terminal.git diff --git a/content/post/fairstream.md b/content/post/fairstream.md new file mode 100644 index 0000000..d4bba6c --- /dev/null +++ b/content/post/fairstream.md @@ -0,0 +1,86 @@ +--- +title: "Fairstream" +date: 2026-02-17T20:59:41Z +--- + +[Backtracking](https://en.wikipedia.org/wiki/Backtracking) is a versatile approach for solving search problems by building solutions incrementally. If a partial solution cannot be extended, it is discarded and the process returns to a previous step to explore an alternative path. This method is generally more efficient than brute-force searching due to pruning: stopping exploration of a branch as soon as it violates a constraint, which eliminates entire sections of the search space. + +Strictly speaking, fair backtracking is not required for all search problems. A fair strategy guarantees all branches make progress, preventing any single branch from starving the others. The List monad handles non-deterministic computation well, and within a finite search space it produces the same results as a fair stream. When the search space is infinite, or when one branch may produce unbounded results, fairness becomes essential to ensure completeness. + +[`fairstream`](https://github.com/codiff/fairstream) is a Scala implementation of fair backtracking based on the [work](https://okmij.org/ftp/Computation/monads.html#fair-bt-stream) of Oleg Kiselyov. + +## The problem with depth-first search + +Consider Pythagorean triples: tuples $(i, j, k)$ such that $i^2+j^2=k^2$, with $(3, 4, 5)$ as the canonical first example. If we try to generate all such triples using nested infinite generators, a conventional stream composition based on sequential `flatMap` gets stuck exploring an infinite branch that contains no solution and never comes back up to try a larger value, so it may fail to produce any triples at all despite solutions existing. + +The following example demonstrates how [fs2](https://fs2.io/).Stream's depth-first approach can fail to find Pythagorean triples, even though the result set is non-empty: + +```scala +val number: fs2.Stream[IO, Int] = fs2.Stream.iterate(1)(_ + 1) + +val triples = for { + i <- number + j <- number + k <- number + if i * i + j * j == k * k +} yield (i, j, k) + +triples.take(7).compile.toList +``` + +The `for` comprehension desugars into nested `flatMap` calls. Since `number` is infinite, the innermost generator tries $k = 1, 2, 3, \ldots$ forever for $i = 1, j = 1$ before it ever consider $j = 2$. No Pythagorean triple exists for $i = 1, j = 1$, so the stream never produces a result. + +This is not a quirk of ofs2. Any depth-first `flatMap` over infinite collections has this problem, including Scala's standard library `LazyList`. + +## Fair interleaving with `fairstream` + +`fairstream` solves this by replacing sequential concatenation with fair disjuction (`mplus`), which interleaves branches so that every candidate is eventually reached. + +At the time of writing, the library is published as snapshots: + +```scala +resolvers += Resolver.sonatypeCentralSnapshots + +libraryDependencies += "com.codiff" %% "fairstream" % "0.0-9f9db42-SNAPSHOT" +``` + +```scala +import com.codiff.fairstream.Fair +import com.codiff.fairstream.Fair._ + +lazy val number: Fair[Int] = mplus(unit(0), number.map(_ + 1)) + +val triples = for { + i <- number + _ <- guard(i > 0) + j <- number + _ <- guard(j > 0) + k <- number + _ <- guard(k > 0) + _ <- guard(i * i + j * j == k * k) +} yield (i, j, k) + +Fair.runM(None, Some(7), triples) +``` + +## `FairT`: effectful fair backtracking + +`Fair[A]` is a pure computation. But what if your search branches need to perform effects, like reading from a database, calling an API, or logging? That's where `FairT[F[_], A]` comes in. + +`FairT` is a monad transformer that layers fair backtracking on top of any effect `F`. This means you can interleave non-deterministic search with `IO`, `Task`, or any other cats-effect compatible monad. + +## fs2 integration + +If you want to stay in the fs2 ecosystem, `fairstream-fs2` provides a conversion from `Fair` and `FairT` to `fs2.Stream`: + +```scala +libraryDependencies += "com.codiff" %% "fairstream-fs2" % "0.0-9f9db42-SNAPSHOT" +``` + +```scala +import com.codiff.fairstream.fs2.syntax._ + +triples.toFs2.take(7).compile.toList +``` + +This should let you compose fair backtracking with all the stream processing, concurrency, and resource management that fs2 provides. You define your search logic using `Fair` or `FairT`, then convert to `fs2.Stream` at the boundary where you need to integrate with the rest of your application. diff --git a/hugo.toml b/hugo.toml index 1d5d4b5..3343f07 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,2 +1,9 @@ baseURL = 'https://blog.gluegadget.com/' -theme = 'ananke' +theme = 'terminal' + +[markup.highlight] + noClasses = false + +[params] + centerTheme = true + contentTypeName = "post" diff --git a/hugo.yaml b/hugo.yaml deleted file mode 100644 index eddefe1..0000000 --- a/hugo.yaml +++ /dev/null @@ -1,4 +0,0 @@ -baseURL: http://example.org/ -disablePathToLower: true -languageCode: en-us -title: My New Hugo Site diff --git a/layouts/partials/extended_head.html b/layouts/partials/extended_head.html new file mode 100644 index 0000000..60a4547 --- /dev/null +++ b/layouts/partials/extended_head.html @@ -0,0 +1,14 @@ + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..3243829 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "blog.gluegadget.com", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "mathjax": "^3.2.2" + } + }, + "node_modules/mathjax": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz", + "integrity": "sha512-Bt+SSVU8eBG27zChVewOicYs7Xsdt40qm4+UpHyX7k0/O9NliPc+x77k1/FEsPsjKPZGJvtRZM1vO+geW0OhGw==", + "license": "Apache-2.0" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c74898c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "mathjax": "^3.2.2" + } +} diff --git a/public/404.html b/public/404.html index 5d232cc..a97d96a 100644 --- a/public/404.html +++ b/public/404.html @@ -1,99 +1,173 @@ - - - - - - - - - - - - - - + + + 404 Page not found :: + + + + + - - + + - - - + + - + + - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + +
+ +
+
+ - - +
+ +
+ -
-
- -
-
- - -
- -
-

- This is not the page you were looking for -

-
- -
-
-
- - © - -
-
+
+ + + - + + + + + + + + + + + + +
+ + diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000..0ac2c27 Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/bundle.min.js b/public/bundle.min.js new file mode 100644 index 0000000..e7d4b17 --- /dev/null +++ b/public/bundle.min.js @@ -0,0 +1,3 @@ +(()=>{var t=document.querySelector(".container"),e=document.querySelectorAll(".menu");document.body.addEventListener("click",()=>{e.forEach(e=>{e.classList.contains("open")&&e.classList.remove("open")})}),window.addEventListener("resize",()=>{e.forEach(e=>{e.classList.remove("open")})}),e.forEach(n=>{const o=n.querySelector(".menu__trigger"),s=n.querySelector(".menu__dropdown");o.addEventListener("click",o=>{o.stopPropagation(),n.classList.contains("open")?n.classList.remove("open"):(e.forEach(e=>e.classList.remove("open")),n.classList.add("open")),s.getBoundingClientRect().right>t.getBoundingClientRect().right&&(s.style.left="auto",s.style.right=0)}),s.addEventListener("click",e=>e.stopPropagation())})})(),(()=>{var e=document.querySelectorAll(".chroma code[data-lang]");for(const n of e){const s=n.parentElement,o=n.innerText.split(` +`).filter(Boolean).join(` +`),t=document.createElement("div"),i=n.dataset.lang;if(t.classList.add("code-title"),t.innerText=i,navigator.clipboard!==0[0]){const e=document.createElement("button");e.classList.add("copy-button"),e.innerText="Copy",e.addEventListener("click",()=>{e.innerText="Copied",setTimeout(()=>{e.innerText="Copy"},1e3),navigator.clipboard.writeText(o)}),t.append(e)}s.closest(".highlight").prepend(t)}})() \ No newline at end of file diff --git a/public/categories/index.html b/public/categories/index.html index eaf390f..e2d4c57 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -1,115 +1,175 @@ - - - - - - - - - - - - - - + + + Categories :: + + + + + - - + + - - - + + - + + - - - - - - + + - - - + + - - - - - - + + - - - + + - - - - - - + + -
-
- + -
-

- Categories -

- -
-
+ + + + + -
+
+ +
+

Categories

+ +
    -
    - -
    -
    -
    -
    +
-
-