Skip to content
This repository has been archived by the owner on Sep 10, 2020. It is now read-only.

fix: Upgrade to cobalt#346 #3

Open
wants to merge 5 commits into
base: source
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .cobalt.yml

This file was deleted.

5 changes: 3 additions & 2 deletions 404.liquid
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extends: redirect.liquid
redirect_to: /
layout: redirect.liquid
data:
redirect_to: /
---
38 changes: 38 additions & 0 deletions _cobalt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
source: "./"
destination: build
include_drafts: false
default:
excerpt_separator: "\n\n"
is_draft: false
pages:
default: {}
posts:
title: ~
description: ~
dir: blog
drafts_dir: _drafts
order: Desc
rss: rss.xml
jsonfeed: ~
default: {}
site:
title: Matthias Endler
description: Personal Blog
base_url: "https://matthias-endler.de"
data: ~
template_extensions:
- md
- liquid
ignore:
- ".git/*"
- "build/*"
- "img/raw/*"
- README.md
- Makefile
- todo.txt
- LICENSE.txt
syntax_highlight:
theme: "base16-ocean.light"
assets:
sass:
style: Nested
20 changes: 13 additions & 7 deletions _drafts/2017-a-pragmatic-haskell.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
extends: default.liquid

title: A Productive Haskell
date: 26 Aug 2017 00:00:00 +0000
humandate: 26th of August 2017
path: 2017/productive-haskell
permalink: "/2017/productive-haskell"
title: A Productive Haskell
published_date: "2017-08-26 00:00:00 +0000"
layout: default.liquid
data:
social_img: ~
comments: ~
translations: ~
css: ~
humandate: 26th of August 2017
subtitle: ""
---
Back in University I worked on a project, which bridged the gap between Java and Haskell.
It was a tool for teaching students the basics of computational geometry.
That might sound frightening in the beginning, but it really was not.
Expand Down Expand Up @@ -103,4 +109,4 @@ It follows a pragmatic approach.

Rust is a big language and it gets bigger every day.
It takes a long time to master. Depending on your background, it might be years.
Compare that to Go, where you can be productive after a few days.
Compare that to Go, where you can be productive after a few days.
8 changes: 8 additions & 0 deletions _drafts/2017-cat.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
translations: ~
comments: ~
social_img: ~
css: ~
subtitle: ""
humandate: ~
---
Zero-Copy Unix cat Command for Linux and macOS using splice and copyfile

In a previous post, I analyzed the performance of one of the most simple Unix commands: `yes`.
Expand Down
8 changes: 8 additions & 0 deletions _drafts/2017-programmer-folklore.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
css: ~
social_img: ~
subtitle: ""
humandate: ~
translations: ~
comments: ~
---
All too often we use terminology without knowing the origin.
I find it fascinating to read about the etymology of computer terms. Here are some of my
highlights.
Expand Down
10 changes: 9 additions & 1 deletion _drafts/2017-rust-hackathon.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
comments: ~
humandate: ~
css: ~
social_img: ~
translations: ~
subtitle: ""
---
# A Hackathon with Rust

At trivago's recent Hackathon I wanted to try something completely new.
Expand Down Expand Up @@ -121,4 +129,4 @@ Especially during protoyping this can be a pain.

Using the MongoDB driver was an interesting experience. Before I only used it with dynamically typed languages.
Sometimes it felt like I had to work around the type system to store data as pure JSON.
I know that this could be done more elegantly with serde, or maybe by using the json!() macro that was provided, but given the tight timeframe, I tried to "hack" it.
I know that this could be done more elegantly with serde, or maybe by using the json!() macro that was provided, but given the tight timeframe, I tried to "hack" it.
8 changes: 8 additions & 0 deletions _drafts/2017-rust-vs-technical-debt.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
translations: ~
comments: ~
subtitle: ""
humandate: ~
css: ~
social_img: ~
---
The tunnels below New York are 600 inch in diamater.
That's because the ..
That's because the ..
Expand Down
20 changes: 12 additions & 8 deletions _drafts/2017-taohpa-ripgrep.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
extends: default.liquid

title: The Architecture of High-Performance Applications - ripgrep
date: 10 Oct 2017 00:00:00 +0000
humandate: 10th of October 2017
path: 2017/what-makes-rust-fast
permalink: "/2017/what-makes-rust-fast"
title: "The Architecture of High-Performance Applications - ripgrep"
published_date: "2017-10-10 00:00:00 +0000"
layout: default.liquid
data:
comments: ~
humandate: 10th of October 2017
social_img: ~
translations: ~
subtitle: ""
css: ~
---

tl;dr: Rust is a safe systems-programming language. But besides its guaranteed safety, it also rivals C/C++ in speed for some datasets.
Let me show you the tricks that Rust make Rust fast, which are possible but very hard to pull off in other languages.
I will talk about agressive compile-time optimizations, zero-cost abstractions, fearless concurrency, and more.
Concrete examples come from tools like ripgrep, serde, tokio and diesel.
Concrete examples come from tools like ripgrep, serde, tokio and diesel.
19 changes: 11 additions & 8 deletions _drafts/2017-unsafe-code-is-unsafe.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
extends: default.liquid

title: Unsafe Code is Unsafe
date: 31 Aug 2017 00:00:00 +0000
humandate: 31st of August 2017
path: 2017/unsafe-code-is-unsafe
social_img: 2017_unsafe_code.png
permalink: "/2017/unsafe-code-is-unsafe"
title: Unsafe Code is Unsafe
published_date: "2017-08-31 00:00:00 +0000"
layout: default.liquid
data:
css: ~
subtitle: ""
comments: ~
translations: ~
humandate: 31st of August 2017
social_img: 2017_unsafe_code.png
---

bla bla
10 changes: 9 additions & 1 deletion _drafts/2017-why-the-hate.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
humandate: ~
translations: ~
subtitle: ""
social_img: ~
css: ~
comments: ~
---
# Why the hate?

You're not a worse programmer for using PHP.
Expand All @@ -19,4 +27,4 @@ As long as you feel productive and happy, don't listen to nay-sayers.
> Of view
> Tangled up in blue

- Bob Dylan
- Bob Dylan
8 changes: 8 additions & 0 deletions _drafts/flat_map-is-scary.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
translations: ~
humandate: ~
social_img: ~
css: ~
subtitle: ""
comments: ~
---
```rust
fn main() {
let meta = vec!["bla=blub,x=y", "foo=bar"];
Expand Down
10 changes: 9 additions & 1 deletion _drafts/perf.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data:
comments: ~
humandate: ~
css: ~
translations: ~
subtitle: ""
social_img: ~
---
Add image for chunk scatter
http://blog.cowchimp.com/chunk-scatter-http-chunked-response-analysis-tool/

Expand All @@ -9,4 +17,4 @@ https://developers.google.com/speed/pagespeed/insights/

WorldPing

Cloudflare settings
Cloudflare settings
File renamed without changes.
19 changes: 10 additions & 9 deletions _layouts/footer.liquid → _includes/footer.liquid
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<footer>
<ul class="links">
{% if title != "" %}
{% if page.collection == "posts" %}
<li class="post-navigation">
{% if previous.path != "/" %}
<a href="/{{ previous.path }}"><code>&larr; {{ previous.title }}</code></a>
{% if page.previous %}
<a href="/{{ page.previous.permalink }}"><code>&larr; Previous post</code></a>
{%- endif %}
{% if next.path != "/" %}
<a href="/{{ next.path }}"><code>{{ next.title }} &rarr;</code></a>
<a href="/"><code>&#8962; Home</code></a>
{% if page.next %}
<a href="/{{ page.next.permalink }}"><code>Next post &rarr;</code></a>
{%- endif %}
</li>
{%- endif %}
Expand All @@ -16,9 +17,9 @@
What follows is an ultra clunky way to iterate over a list of social media links.
This would be much easier with an array slice function.
{%- endcomment %}
{%- if comments %}
{%- if page.data.comments %}
<li>💬 Comments available on
{%- for comment in comments %}
{% for comment in page.data.comments %}
{%- if forloop.length == forloop.index %}
{%- if forloop.length > 1 %}
and
Expand All @@ -34,9 +35,9 @@
{%- endfor %}
</li>
{%- endif %}
{%- if translations %}
{%- if page.data.translations %}
<li>📖 Translated into
{%- for translation in translations %}
{% for translation in page.data.translations %}
{%- if forloop.length == forloop.index %}
{%- if forloop.length > 1 %}
and
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 9 additions & 8 deletions _layouts/social.liquid → _includes/social.liquid
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@

{% comment %} Support for social platforms (Facebook's OpenGraph, Twitter's Cards,...) {% endcomment %}

{%- if title == "" %}
{% if page.title == "" %}
{%- comment %} Assume that we are on a static page {% endcomment %}
{%- assign social_title = "Matthias Endler" %}
{%- assign social_description = "Personal website of Matthias Endler. A Software Engineer interested in low-level programming and Backend Development. PHP, Python, Go, Rust." %}
{%- else %}
{%- comment %} Assume that we are on an article page {% endcomment %}
{%- capture social_title %}{{ title }}{% endcapture %}
{%- if excerpt %}
{%- capture social_description %}{{ excerpt | truncate: 50 | strip_html | escape | strip | strip_newlines }}{% endcapture %}
{%- capture social_title %}{{ page.title }}{% endcapture %}
{% if page.excerpt %}
{%- capture social_description %}{{ page.excerpt | truncate: 50 | strip_html | escape | strip | strip_newlines }}{% endcapture %}
{%- else %}
{%- capture social_description %}{{ content | truncate: 50 | strip_html | escape | strip | strip_newlines }}{% endcapture %}
{%- capture social_description %}{{ page.content | truncate: 50 | strip_html | escape | strip | strip_newlines }}{% endcapture %}
{%- endif %}
{%- endif %}

{%- comment %}
Ugly workaround: Somehow `unless` does not work,
and if fb_image is not set, it's neither nil nor ""
{%- endcomment %}
{%- if social_img %}
{% if page.data.social_img %}
{%- assign social_img = page.data.social_img %}
{%- else %}
{%- assign social_img = "default.png" %}
{%- endif %}

<meta property="og:title" content="{{ social_title }}" />
<meta property="og:type" content="website" />
<meta property="og:description" content="{{ social_description }}" />
<meta property="og:url" content="https://matthias-endler.de/{{ path }}" />
<meta property="og:url" content="https://matthias-endler.de/{{ page.permalink }}" />
<meta property="og:image" content="https://matthias-endler.de/img/social/{{ social_img }}" />

<meta name="twitter:title" content="{{ social_title }}">
<meta name="twitter:description" content="{{ social_description }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@matthiasendler">
<meta name="twitter:creator" content="@matthiasendler">
<meta name="twitter:image" content="https://matthias-endler.de/img/social/{{ social_img }}">
<meta name="twitter:image" content="https://matthias-endler.de/img/social/{{ social_img }}">
Loading