diff --git a/_drafts/adding_comments.md b/_drafts/adding_comments.md new file mode 100644 index 0000000..e41be22 --- /dev/null +++ b/_drafts/adding_comments.md @@ -0,0 +1 @@ +https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/ \ No newline at end of file diff --git a/_drafts/test.md b/_drafts/test.md new file mode 100644 index 0000000..ef44748 --- /dev/null +++ b/_drafts/test.md @@ -0,0 +1,20 @@ +--- +title: Test post +excerpt: This is to test stuff out, it should never actually get published! +layout: post +image: +alt: +--- + + + + + + + + + + + + + \ No newline at end of file diff --git a/_posts/2022-07-06-command_line_slides.md b/_posts/2022-07-06-command_line_slides.md index 77d49d7..e43d50f 100644 --- a/_posts/2022-07-06-command_line_slides.md +++ b/_posts/2022-07-06-command_line_slides.md @@ -1,9 +1,9 @@ --- title: Command Line Slides -excerpt: I had to give a quick lecture on using the command line and came up with this to do live demos of using the command line. +excerpt: | + I made a set of interactive slides for a course on the command line, complete with command line playback! + layout: post -image: /assets/images/command_line_slides.png -alt: A screenshot of a slide deck with computer code on it. --- I had to give a quick lecture on using the command line and came up with this to do live demos of using the command line. Embedded below. diff --git a/_posts/2023-07-20-writing_grammars_is_fun.md b/_posts/2023-07-20-writing_grammars_is_fun.md index 96d69ef..0f650de 100644 --- a/_posts/2023-07-20-writing_grammars_is_fun.md +++ b/_posts/2023-07-20-writing_grammars_is_fun.md @@ -1,9 +1,22 @@ --- title: Parsing is fun! -excerpt: I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser. +excerpt: | + I came across something I wanted to quickly parse that was too niche to find a ready made parser for. Join me on a quick whip tour of writing a grammar for a PEG parser. + ```python + import pe + + parser = pe.compile( + r''' + List <- "[" String ("," Spacing String)* "]" + String <- ~[a-zA-Z]+ + Spacing <- [\t\n\f\r ]* + ''', + ) + parser.match("[a, b, c]").groups() + + >>> ('a', 'b', 'c') + ``` layout: post -image: /assets/blog/parsing/snippet.png -alt: A purely illustrative screenshot of a snippet of python code with a little bit of a PEG grammar definition visible. commentid: 110746239432993930 --- diff --git a/_posts/2023-07-25-interactive-code-snippets.md b/_posts/2023-07-25-interactive-code-snippets.md index 374c4a0..cc84052 100644 --- a/_posts/2023-07-25-interactive-code-snippets.md +++ b/_posts/2023-07-25-interactive-code-snippets.md @@ -1,8 +1,8 @@ --- title: A little REPL in every blog post layout: post -image: -alt: +image: /assets/blog/repl.png +alt: A screenshot of a small javascript widget that lets you evaluate python code. It's showing some numpy code and its evaluated output. klipse: True --- diff --git a/assets/blog/repl.png b/assets/blog/repl.png new file mode 100644 index 0000000..0c0149e Binary files /dev/null and b/assets/blog/repl.png differ