Skip to content

Commit

Permalink
content: draft beam essay
Browse files Browse the repository at this point in the history
  • Loading branch information
mmibbetson committed Dec 17, 2024
1 parent 83b15c7 commit 5890c97
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 90 deletions.
55 changes: 55 additions & 0 deletions content/blog/betting_on_beam.md
Original file line number Diff line number Diff line change
@@ -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.
61 changes: 0 additions & 61 deletions content/blog/combinatory_logic.md

This file was deleted.

9 changes: 9 additions & 0 deletions content/blog/types_tests_docs.md
Original file line number Diff line number Diff line change
@@ -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"]
+++
29 changes: 26 additions & 3 deletions content/software/dn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions content/software/litr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
62 changes: 50 additions & 12 deletions static/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -216,7 +249,7 @@ hr {
flex-direction: row;
width: 100%;
place-items: center;
justify-items: center;
place-content: center;
}

.software-card-title {
Expand All @@ -235,6 +268,7 @@ hr {
justify-self: center;
max-width: 20rem;
margin-left: auto;
padding-left: 1rem;
}

.blog-tag-list {
Expand Down Expand Up @@ -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;
}

Expand All @@ -275,6 +309,10 @@ hr {
margin-bottom: 2rem;
}

.tags-item-container a {
text-decoration: none;
}

.tags-item-header {
display: flex;
flex-direction: row;
Expand Down
8 changes: 4 additions & 4 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<body>
<header>
<div id="header-banner">
<h1 id="site-title"><a href="/" class="decorated-link">λm.m</a></h1>
<h1 id="site-title"><a href="/" class="home-link">λm.m</a></h1>
<nav>
<ul id="nav-list">
<a class="nav-item decorated-link" href="/tags">/tags</a>
<a class="nav-item decorated-link" href="/blog">/blog</a>
<a class="nav-item decorated-link" href="/software">/software</a>
<a class="nav-item nav-link" href="/tags">/tags</a>
<a class="nav-item nav-link" href="/blog">/blog</a>
<a class="nav-item nav-link" href="/software">/software</a>
</ul>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/blog/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% set tags = page.taxonomies.tags | default(value=[]) | sort %} {% for tag
in tags %}
<li class="blog-tag">
<a href="/tags/{{tag}}" class="decorated-link">{{tag}}</a>
<a href="/tags/{{tag}}" class="tag-link">{{tag}}</a>
</li>
{%endfor%}
</ul>
Expand Down
5 changes: 1 addition & 4 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ <h1 id="content-list-title">About</h1>
href="https://github.com/mmibbetson/dn"
target="_blank"
referrerpolicy="noreferrer"
class="decorated-link"
>
<code>dn</code> note-taking tool
</a>
Expand All @@ -23,9 +22,8 @@ <h1 id="content-list-title">About</h1>
href="https://github.com/mmibbetson/litr"
target="_blank"
referrerpolicy="noreferrer"
class="decorated-link"
>
<code>litr</code> literate programming tool </a
<code>litr</code> literate programming tool</a
>. Otherwise, my programming interests lie with creating soft-real-time,
self-healing, scalable, concurrent systems with the BEAM.
</p>
Expand All @@ -41,7 +39,6 @@ <h1 id="content-list-title">About</h1>
href="mailto:[email protected]"
target="_blank"
referrerpolicy="noreferrer"
class="decorated-link"
>
email
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/software/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1 id="content-list-title">{{ section.title }}</h1>
<a href="{{ page.permalink | safe }}">
<div class="software-card">
<h3 class="software-card-title decorated-link">
{{ page.title }}&nbsp;|&nbsp;
{{ page.title }}&nbsp;|
</h3>
<p class="software-card-description">{{page.description | safe}}</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/software/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% set tags = page.taxonomies.tags | default(value=[]) | sort %} {% for tag
in tags %}
<li class="blog-tag">
<a href="/tags/{{tag}}" class="decorated-link">{{tag}}</a>
<a href="/tags/{{tag}}" class="tag-link">{{tag}}</a>
</li>
{%endfor%}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion templates/tags/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="content-list-title">Tags</h1>
<line x1="7" y1="7" x2="7.01" y2="7"></line>
</svg>
<h2 class="tags-item-label">
<a href="{{ term.permalink | safe }}" class="decorated-link"
<a href="{{ term.permalink | safe }}" class="tag-section-link"
>{{ term.name }}</a
>
</h2>
Expand Down

0 comments on commit 5890c97

Please sign in to comment.