From 5890c9786c7269d653cb5d8c290857f26924b054 Mon Sep 17 00:00:00 2001 From: Matthew Mark Ibbetson Date: Tue, 17 Dec 2024 22:14:03 +0200 Subject: [PATCH] content: draft beam essay --- content/blog/betting_on_beam.md | 55 +++++++++++++++++++++++++++ content/blog/combinatory_logic.md | 61 ------------------------------ content/blog/types_tests_docs.md | 9 +++++ content/software/dn.md | 29 +++++++++++++-- content/software/litr.md | 2 - static/styles/global.css | 62 +++++++++++++++++++++++++------ templates/base.html | 8 ++-- templates/blog/page.html | 2 +- templates/index.html | 5 +-- templates/software/index.html | 2 +- templates/software/page.html | 2 +- templates/tags/list.html | 2 +- 12 files changed, 149 insertions(+), 90 deletions(-) create mode 100644 content/blog/betting_on_beam.md delete mode 100644 content/blog/combinatory_logic.md create mode 100644 content/blog/types_tests_docs.md diff --git a/content/blog/betting_on_beam.md b/content/blog/betting_on_beam.md new file mode 100644 index 0000000..c76c031 --- /dev/null +++ b/content/blog/betting_on_beam.md @@ -0,0 +1,55 @@ ++++ +title = "Betting on BEAM" +date = 2024-12-17 +description = """ +Bogdan/Björn's Erlang Abstract Machine has been called the "soul of Erlang and Elixir." In this post +I discuss how and why I will be investing my time into working with BEAM technologies for building +information systems that make sense. +""" +[taxonomies] +tags = ["beam", "elixir", "erlang"] ++++ + +- came across erlang first through computerphile learning about fp +- after falling in love with Strange Loop Conference, I watched and rewatched Joe Armstrong's talks +- Sasa Urić's talk teh soul of erlang and elixir +- safety, recoverability, self-healing, scale, soft-real-time +- elixirs growing ecosystem +- erlangs strong hold in the existing infrastructure +- incredible wealth of literature + +### Languages + +These days the common BEAM language of choice seems to tend toward [Elixir](https://elixir-lang.org/), and there are many good reasons for this - powerful metaprogramming capabilities, friendly syntax, expressive pattern matching, and amazing documentation. Its syntax is descended from that of Ruby: + +This here is another paragraph to test some spacing. + +```erl +def elixir_example() do + "like this," |> print() +end +``` + +The original language for the Erlang Abstract Machine is, of course, [Erlang](https://www.erlang.org/), with its Prolog-inspired syntax: + +```ex +erlang_example() -> + print("like this,"). +``` + +If you enjoy homoiconicity and the uniformity of S-expressions like I do, there's [LFE](https://lfe.io/): + +```lfe +(defun (lfe-example) + (print "like this,")) +``` + +For people who can't give up their C-style braces and don't mind working with a very young language, there's also [Gleam](https://gleam.run/) (which sits somewhere between Rust and SML/OCaml/F# syntactically): + +```gleam +fn gleam_example() { + "like this," |> print() +} +``` + +The value proposition of Gleam is that it uses a static type system with Hindley-Milner style type inference to guarantee certain program invariants at compile-time. This is of course a very nice tool to have in some systems and scenarios. It is not to my liking, however, both in terms of its approach to type safety and syntax. diff --git a/content/blog/combinatory_logic.md b/content/blog/combinatory_logic.md deleted file mode 100644 index c01d126..0000000 --- a/content/blog/combinatory_logic.md +++ /dev/null @@ -1,61 +0,0 @@ -+++ -title = "Combinatory Logic" -date = 2024-12-12 -description = """ -Combinators are a central concept in functional programming, and one of the most interesting -rabbit holes one can fall down is that of combinatory logic, and the use of the SK(I) Combinator -Calculus for powerful function manipulation. -""" -[taxonomies] -tags = ["combinators", "fp"] -+++ - -## Combinatory Logic & The SK(I) Combinator Calculus - ---- - -## The Primary Combinators - -These combinators are being defined uncurried as Elixir doesn't use the automatic currying approach. -In many contexts, the power of combinators is best expressed in an ML/Miranda descended language or -and array language like APL, J, or BQN. - -- I -- Identity -- Id -- Idiot -- Ibis - - - -```scm -;; a -> a -(define ibis - (λ (a) (a))) -``` - -- K -- Kestrel -- Constant -- True -- Left - -```scm -;; a -> b -> a -(define kestrel - (curry - (λ (a b) (a)))) -``` - -- S -- Schmeltzen, 'to fuse' -- Starling -- ap -- <\*> - -```scm -;; (a -> b -> c) -> (a -> b) -> a -> c -(define starling - (curry - (λ (a b c) (a c (b c))))) -``` diff --git a/content/blog/types_tests_docs.md b/content/blog/types_tests_docs.md new file mode 100644 index 0000000..1e51dc9 --- /dev/null +++ b/content/blog/types_tests_docs.md @@ -0,0 +1,9 @@ ++++ +title = "Types, Tests, and Documentation" +date = 2024-12-17 +description = """ +static typing overrated, tests underrated, documentation SUPER underrated, comments overhated. +""" +[taxonomies] +tags = ["plt"] ++++ \ No newline at end of file diff --git a/content/software/dn.md b/content/software/dn.md index a9ef1da..254d332 100644 --- a/content/software/dn.md +++ b/content/software/dn.md @@ -5,10 +5,33 @@ A note-taking, file-organisation, and personal knowledge management system utility for cross-platform terminal use. """ date = 2024-11-24 -[taxonomies] -tags = ["rust"] +++ +## Overview + `dn` is a PKMS CLI tool. -<> |> <|> <<>> != == === <-----> -||- +```sh +# Make a new note and open it in neovim. +dn new --title foo --keywords example --extension dj | xargs nvim +``` + +## Insights + +- Rust has great in-source documentation facilities +- Learned a lot about regex +- Came to understand Rust's memory model much better +- Learned about software copyright and open source collaboration +- Dependencies are hard to avoid +- A design philosophy is very important + +## Technology + +- Rust +- Unicode Collation +- Liberal Regex + +## Source Code & Licensing + +- FSFE REUSE compliance +- GPL-3.0-or-later diff --git a/content/software/litr.md b/content/software/litr.md index 771df9b..92d1cfd 100644 --- a/content/software/litr.md +++ b/content/software/litr.md @@ -5,8 +5,6 @@ A literate programming tool for bi-directional editing synchronisation and ease of integration with plain text markup. """ date = 2024-12-10 -[taxonomies] -tags = ["rust"] +++ `litr` is a literate programming CLI tool. diff --git a/static/styles/global.css b/static/styles/global.css index e6c0c39..0a8c042 100644 --- a/static/styles/global.css +++ b/static/styles/global.css @@ -89,12 +89,17 @@ footer { pre { padding: 1rem; overflow: auto; + border-radius: 0.5rem; + border: 0.125rem solid var(--ctp-stx-blue); + margin-top: 2rem; + margin-bottom: 2rem; } /* The line numbers already provide some kind of left/right padding */ pre[data-linenos] { padding: 1rem 0; } + pre table td { padding: 0; } @@ -119,38 +124,62 @@ pre table { code { font-family: var(--font-code); + line-height: 1.33; } a { - color: var(--ctp-overlay-2); + color: var(--ctp-blue); text-decoration-line: none; text-decoration: none; transition: all 0.2s ease; } -.decorated-link { - transition: all 0.2s ease; +a:hover, +a:focus { + color: var(--ctp-sky); + text-decoration: underline; +} + +.decorated-link, +.tag-link, +.home-link, +.nav-link, +.internal-link, +.tag-section-link { + color: var(--ctp-overlay-2); + transition: all 0.15s ease; } a:hover .decorated-link, a:focus .decorated-link { - color: var(--ctp-teal); + color: var(--ctp-sky); text-decoration: none; } .decorated-link:hover, .decorated-link:focus { - color: var(--ctp-red); + color: var(--ctp-sky); text-decoration: none; } -.internal-link { - color: var(--ctp-overlay-2); +.tag-link:hover { + color: var(--ctp-yellow); + text-decoration: none; +} + +.tag-section-link:hover { + color: var(--ctp-flamingo); + text-decoration: none; } -.internal-link:hover, -.internal-link:focus { - color: var(--ctp-peach); +.home-link:hover { + color: var(--ctp-sky); + text-decoration: none; +} + +.nav-link:hover { + color: var(--ctp-sky); + text-decoration: none; } hr { @@ -186,6 +215,10 @@ hr { justify-content: center; } +.content-listing a { + text-decoration: none; +} + .blog-card { width: 100%; border-bottom: 0.125rem solid var(--ctp-surface-2); @@ -216,7 +249,7 @@ hr { flex-direction: row; width: 100%; place-items: center; - justify-items: center; + place-content: center; } .software-card-title { @@ -235,6 +268,7 @@ hr { justify-self: center; max-width: 20rem; margin-left: auto; + padding-left: 1rem; } .blog-tag-list { @@ -265,7 +299,7 @@ hr { .tag-label:hover, .tag-label:focus { border-radius: 0.125rem; - color: var(--ctp-peach); + color: var(--ctp-flamingo); text-decoration: none; } @@ -275,6 +309,10 @@ hr { margin-bottom: 2rem; } +.tags-item-container a { + text-decoration: none; +} + .tags-item-header { display: flex; flex-direction: row; diff --git a/templates/base.html b/templates/base.html index 69c6559..69983c5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -31,12 +31,12 @@
diff --git a/templates/blog/page.html b/templates/blog/page.html index 4211c7a..db0ead3 100644 --- a/templates/blog/page.html +++ b/templates/blog/page.html @@ -5,7 +5,7 @@ {% set tags = page.taxonomies.tags | default(value=[]) | sort %} {% for tag in tags %}
  • - {{tag}} + {{tag}}
  • {%endfor%} diff --git a/templates/index.html b/templates/index.html index 24d55e7..796b7e3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -14,7 +14,6 @@

    About

    href="https://github.com/mmibbetson/dn" target="_blank" referrerpolicy="noreferrer" - class="decorated-link" > dn note-taking tool @@ -23,9 +22,8 @@

    About

    href="https://github.com/mmibbetson/litr" target="_blank" referrerpolicy="noreferrer" - class="decorated-link" > - litr literate programming tool litr literate programming tool. Otherwise, my programming interests lie with creating soft-real-time, self-healing, scalable, concurrent systems with the BEAM.

    @@ -41,7 +39,6 @@

    About

    href="mailto:mmibbetson@gmail.com" target="_blank" referrerpolicy="noreferrer" - class="decorated-link" > email diff --git a/templates/software/index.html b/templates/software/index.html index 64a809f..b5d1452 100644 --- a/templates/software/index.html +++ b/templates/software/index.html @@ -7,7 +7,7 @@

    {{ section.title }}

    {{page.description | safe}}

    diff --git a/templates/software/page.html b/templates/software/page.html index d501e53..f2d3b95 100644 --- a/templates/software/page.html +++ b/templates/software/page.html @@ -5,7 +5,7 @@ {% set tags = page.taxonomies.tags | default(value=[]) | sort %} {% for tag in tags %}
  • - {{tag}} + {{tag}}
  • {%endfor%} diff --git a/templates/tags/list.html b/templates/tags/list.html index 6e15054..584e62d 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -28,7 +28,7 @@

    Tags

    - {{ term.name }}