aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/blog/miscellanious/010-rust-is-awesome.md45
-rwxr-xr-xcontent/pages/whoami.md (renamed from content/pages/home.md)0
-rw-r--r--crumbs/static/css/cr_gay_override.css16
-rw-r--r--crumbs/static/css/cr_title.css38
-rw-r--r--crumbs/static/css/crumbs.css33
-rwxr-xr-xcrumbs/static/css/nest.css4
-rwxr-xr-xcrumbs/templates/base.html107
-rwxr-xr-xcrumbs/templates/home.html77
-rw-r--r--crumbs/templates/super_gay.html17
9 files changed, 229 insertions, 108 deletions
diff --git a/content/blog/miscellanious/010-rust-is-awesome.md b/content/blog/miscellanious/010-rust-is-awesome.md
new file mode 100644
index 0000000..8520397
--- /dev/null
+++ b/content/blog/miscellanious/010-rust-is-awesome.md
@@ -0,0 +1,45 @@
+Title: Failure. Or: why Rust is probably the best programming language ever created
+Category: Blog
+Tags: Dev Diary, rust, programming, Reflections
+Date: 2017-12-20
+
+
+**This post is two stories**. One is about accepting and recognising personal failure, reflecting and growing from it; the other is about an incredibly and seemingly endlessly powerful programming language, called *Rust*. Let's begin...
+
+In the summer of 2014 I started a project which was kinda insane. I knew it was insane, yet I embarked on that journey. I wanted to write a password manager, because the ones available on Linux (which I had just switched to) didn't satisfy me. I chose Ruby as a language because I didn't know many others and was, in many ways, still a programmer novice.
+
+The details of this development aren't too important. I had written something rather cool and functional within maybe 6-8 months of development. It wasn't very fast, the code base was a bit of a mess and I was having issues with packaging. But, at the core, I really liked what I had made, which had shifted from just being a password manager to being basically a universal, platform-independant secrets manager, close to a keychain. In my mind applications could write sensitive information into a "vault" which was managed by this project, without having to worry too much about access rights, authentication or anything else.
+
+**That's the beginning of both stories.**
+
+Over the next few years this project would take me over and, ultimately, drive me insane. I had gotten it into my mind that the cryptography should have been handled by something more low-level, something more "advanced". I talked to people, I looked at languages and in the end, thinking I had more experience now, chose C++ to re-write the project in. This was the beginning of the end. It took me months to get the basics done, getting caught up on nitty gritty details. I ended up switching to C, back to C++, then back to C again, not being satisfied with the way that one or the other language handled things. And the scope was out of control. I didn't want to make a cute little secrets manager anymore. I wanted to make a database. It had transactions, sharding, multi-user access, backups, countless optimisations, run modes and even it's own SQL-like qeury language. I went completely insane and lost all grasp of what it was I wanted to create. With time, re-writing the same parts of the code again and again, creating new libraries to handle even smaller tasks that had been completely trivial in Ruby, I stopped.
+
+What this project had turned into wasn't maintainable anymore. It didn't even really make any sense. It had no use-case outside of "being cool" and that wasn't really enough to motivate me anymore to work on it. I was also caught up with other work, getting involved with the Google Summer of Code 2016, then slowly fading work on the project into the background. This wasn't a concious decision though. In my mind, I was just putting it on hold, learning from all of my failures and then trying myself again at another re-write. I didn't know that *not* trying again would be the act of learning from it.
+
+As hackers, we're often compelled to take on the world. Everything seems plausible, sometimes trivial. We understand technology in a way that most people don't and in that, we gain confidence in our abilities past the point of reality. We want to make things, break things, modify things. And we forget our own limitations, time and scope. We end up starting so many things that we never finish. Or we get obsessed with something that doesn't make any sense.
+
+It took me over 2 years to understand that I can't let my impulse to adventure drive the way I work. I love open source and I love working on things that are just *free* and out in the open. I want to help build an ecosystem of tools and applications that help people, without any cost or baggage of being for a closed down system. But learning, that there were things that I can't do, that maybe the way that I viewed work, problems and how to tackle them was *fallable*, that took some more time to understand. In the end, everything I did on this project was a collosal waste of time. It's still on my github, more as a reminder to myself of how failure works.
+
+It has nothing to do with not knowing how to solve a problem. It has nothing to do with failing to understand code or a language or a toolkit... It has *everything* to do with not knowing how to limit a project, and *when to stop*...
+
+*This is the end of story one.*
+
+It's been nearly a year since I worked on this project (or the 5th iteration of a re-write anyways), in the meantime I've worked on many small things, trying to keep in mind what I want to do, what is plausible and also useful. And in the meantime I've come into contact with a magical programming language: *Rust*!
+
+I had started programming in Rust before, during a very stressful time in 2016. And I never managed to get into it much. This year was different though. The toolchain had matured and maybe I had also matured as a developer. And maybe I was in a better state of mind to learn new concepts. Whatever it was, I'm glad it happened.
+
+Rust is a systems programming language by Mozilla. It's a compiled and safe language which prevents segfaults and allows for *fearless concurrency* (as they put it), without sacrificing speed. In fact, it runs [almost as fast as regular old C code]().
+
+Now though, that's only half the reason why Rust is amazing, and I will show in a moment how the first part of this story is in any way relevant.
+
+After creating a few smaller projects in Rust, I started thinking again about password managers. The landscape looks a little different now than it did in 2014, yet I'm still not 100% satisfied. Everything ends up being an add-on to keepass which, in my opinion, doesn't have a very good database layout or file format. And end-user applications are usually very complicated or badly designed. I know I have high standards when it comes to UI/UX design so please don't consider this slander about these projects. I just didn't want to use them and had been sticking to my Windows application running in a WINE for the last few years.
+
+Now I knew Rust. Because the amazing thing about Rust is only partially the language. The other half is the entire toolkit that comes with it. From a built-in version manager to a kickass package manager, an ecosystem of `crates` that can be easily included, following the UNIX philosophy of enabling you to do small things, in good ways, yet somehow always fitting together.
+
+I remembered what I had thought about before. Limitation of scope, accepting limitation of time and limits also in my own abilities. And I started writing a project very close to what it had once been in Ruby. And within a week or so, I was close to the feature set of the version I had finished, before beginning my descent into madness. It took me a week of collecting external crates, writing a few hundred lines of code myself, playing around with different crypto backends and there I was, in the process of building something cool again.
+
+Rust makes it incredibly simple to do rapid prototyping. Yes, the language is very strict sometimes. Yet it has this feeling of "throwing shit against the wall" and seeing what sticks. With the added benefit that there are compile-time checks that make sure that there are no serious issues with your program. You can still write bad code, it just seriously limits the damage you can do. And that makes it incredibly fun to write with.
+
+What's my point with all of this. Well, first that I love Rust :P But secondly that sometimes our failure isn't just our own shortcomings but the failure of selecting the right tools for the job. And maybe, this is something we should foster a lot more in our community. Rust is an amazing language for many things but it also has it's limits. There are many people in the hacker culture who stick to their technologies because they feel familiar, dragging others into their little bubbles because they want to expand their influence, never considering if what they're advocating is sensible or scalable.
+
+And in the end, shouldn't we all strife to learn new things, broaden our horizons and, last but not least, chose the right tool, for the right job.
diff --git a/content/pages/home.md b/content/pages/whoami.md
index 7fbb47a..7fbb47a 100755
--- a/content/pages/home.md
+++ b/content/pages/whoami.md
diff --git a/crumbs/static/css/cr_gay_override.css b/crumbs/static/css/cr_gay_override.css
new file mode 100644
index 0000000..b28cb50
--- /dev/null
+++ b/crumbs/static/css/cr_gay_override.css
@@ -0,0 +1,16 @@
+/* This is the block container */
+.gay {
+ width: 0 auto;
+ height: 12px;
+ margin: 0 auto;
+ display: flex;
+ padding-bottom: 25px;
+}
+
+/* This is a block */
+.colour {
+ display: flex;
+ flex-direction: column;
+ height: 12px;
+ width: 75px;
+}
diff --git a/crumbs/static/css/cr_title.css b/crumbs/static/css/cr_title.css
index 742a535..3eb3466 100644
--- a/crumbs/static/css/cr_title.css
+++ b/crumbs/static/css/cr_title.css
@@ -4,13 +4,18 @@ This file contains all definitions are are EXCLUSIVE for the title
*/
+div.navigation {
+ padding-top: 12px;
+ padding-bottom: 75px;
+ padding-right: 32px;
+ height: 75px;
+ line-height: 75px;
+ }
+
+
.title {
padding-top: 20px;
padding-bottom: 50px;
-}
-
-.title h1 {
- font-family: 'Inconsolata', monospace;
font-size: 58px;
}
@@ -30,17 +35,16 @@ This file contains all definitions are are EXCLUSIVE for the title
#t-color-ylw { color: #fdcb71; }
#t-color-grn { color: #99cb9b; }
-
/* This is the block container */
-.colours {
+.gay {
width: 0 auto;
height: 50px;
margin: 0 auto;
display: flex;
padding-bottom: 150px;
}
-
- /* This is a block */
+
+/* This is a block */
.colour {
display: flex;
flex-direction: column;
@@ -48,24 +52,6 @@ This file contains all definitions are are EXCLUSIVE for the title
width: 75px;
}
-/* Colour defitions */
-.colour1 { background-color: #3c3c3c; }
-.colour2 { background-color: #525252; }
-.colour3 { background-color: #74736a; }
-.colour4 { background-color: #9f9e93; }
-.colour5 { background-color: #d2cfc7; }
-.colour6 { background-color: #e7e5df; }
-.colour7 { background-color: #f1f0ec; }
-.colour8 { background-color: #ef787b; }
-.colour9 { background-color: #f6915f; }
-.colour10 { background-color: #fdcb71; }
-.colour11 { background-color: #99cb9b; }
-.colour12 { background-color: #6ccaca; }
-.colour13 { background-color: #6997c8; }
-.colour14 { background-color: #ca98c9; }
-.colour15 { background-color: #ce7b59; }
-
-
.span {
display: inline-block;
}
diff --git a/crumbs/static/css/crumbs.css b/crumbs/static/css/crumbs.css
index 3ec495a..7f276c6 100644
--- a/crumbs/static/css/crumbs.css
+++ b/crumbs/static/css/crumbs.css
@@ -21,13 +21,16 @@ p {
font-weight: 300;
}
+h1, h2, h3, h4 {
+ font-family: 'Inconsolata', monospace;
+}
div.navigation {
padding-top: 12px;
- padding-bottom: 75px;
+ padding-bottom: 25px;
padding-right: 32px;
- height: 75px;
- line-height: 75px;
+ height: 50px;
+ line-height: 50px;
}
div.navigation a {
@@ -42,6 +45,26 @@ div.navigation a {
/* transition: all 0.2s ease-out; */
}
-div.navigation a:hover {
+/*
+
+ ✨ COLOUR DEFINITIONS ✨
+
+ These colours are re-used in many parts of the website
+
+*/
-} \ No newline at end of file
+.colour1 { background-color: #3c3c3c; }
+.colour2 { background-color: #525252; }
+.colour3 { background-color: #74736a; }
+.colour4 { background-color: #9f9e93; }
+.colour5 { background-color: #d2cfc7; }
+.colour6 { background-color: #e7e5df; }
+.colour7 { background-color: #f1f0ec; }
+.colour8 { background-color: #ef787b; } /* Red */
+.colour9 { background-color: #f6915f; } /* Orange */
+.colour10 { background-color: #fdcb71; } /* Yellow */
+.colour11 { background-color: #99cb9b; } /* Green */
+.colour12 { background-color: #6ccaca; } /* Cyan */
+.colour13 { background-color: #6997c8; } /* Blue */
+.colour14 { background-color: #ca98c9; } /* Purple */
+.colour15 { background-color: #ce7b59; } /* Brown */
diff --git a/crumbs/static/css/nest.css b/crumbs/static/css/nest.css
index f822494..596bb02 100755
--- a/crumbs/static/css/nest.css
+++ b/crumbs/static/css/nest.css
@@ -113,7 +113,7 @@ code { padding: 3px 3px; }
padding-bottom:20px;
padding-left:20px;
padding-right:0px;
- background: #BBBBBB <!--#333-->;
+ background: #BBBBBB;
font-size:14px;
font-weight:400;
font-family:Consolas,monaco,monospace;
@@ -199,7 +199,7 @@ h5 {
float:right;
}
.header-nav .nav a {
- font-weight:300;
+ font-weight:300;
font-size: 18px;
color:#fff;
text-decoration:none;
diff --git a/crumbs/templates/base.html b/crumbs/templates/base.html
index 17866d2..bccf49d 100755
--- a/crumbs/templates/base.html
+++ b/crumbs/templates/base.html
@@ -1,41 +1,90 @@
<!DOCTYPE html>
-<!-- TEMPLATE: BASE -->
-
<html lang="{{ DEFAULT_LANG }}">
<head>
- {% block head %}
+ <meta charset="utf-8">
+ <!-- <title>{% block title %}{{ SITENAME }}{% endblock title %}</title> -->
+
+ <!-- Load Montserrat, Inconsolata and font-awesome -->
+ <link href="https://fonts.googleapis.com/css?family=Montserrat:200,300,400,500;subset=cyrillic,latin-ext" rel="stylesheet">
+ <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+
+ <!-- Load bootstrap, then my own CSS -->
+ <link href="{{ SITEURL }}/theme/css/bootstrap.min.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/css/crumbs.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/css/cr_gay_override.css" rel="stylesheet">
+
+ </head>
+ <body>
+ <div class="container">
+
+ <!-- HEADER FOR EVERY PAGE -->
+ <div>
+ <div class="navigation">
+ <div class="nav pull-right">
+
+ <!-- Loop through all pages -->
+ {% for title, link in MENUITEMS %}
+ <!-- Do magic with http/https -->
+ {% if 'http://' in link or 'https://' in link %}
+ <a class="naughty" href="{{ link }}">{{ title }} </a>
+ {% else %}
+ <a class="naughty" href="{{ SITEURL }}{{ link }}">{{ title }} </a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ </div>
+
+ <br/>
+
+ <!-- We draw a flattened version of the colour bar navigation -->
+ {% include "super_gay.html" %}
+ </div>
+ <!-- END HEADER FOR EVERY PAGE -->
+
+
+ </div>
+
+ </body>
+</html>
+
- <meta charset="utf-8">
+<!-- <!DOCTYPE html> -->
+<!-- TEMPLATE: BASE -->
+
+<!-- <html lang="{{ DEFAULT_LANG }}"> -->
+ <!-- <head> -->
+ <!-- {% block head %} -->
+
+ <!-- <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{% block description %}{% endblock description %}">
<meta name="keywords" content="{% block keywords %}{% endblock keywords %}">
- <link rel="icon" href="{{ SITEURL }}/favicon.ico">
-
- <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
+ <link rel="icon" href="{{ SITEURL }}/favicon.ico"> -->
<!-- Stylesheets -->
- <link href="https://fonts.googleapis.com/css?family=Inconsolata|Quicksand:300,400|Roboto:300,400&amp;subset=cyrillic,cyrillic-ext" rel="stylesheet">
+ <!-- <link href="https://fonts.googleapis.com/css?family=Inconsolata|Quicksand:300,400|Roboto:300,400&amp;subset=cyrillic,cyrillic-ext" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="{{ SITEURL }}/theme/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ SITEURL }}/theme/css/fonts.css" rel="stylesheet">
<link href="{{ SITEURL }}/theme/css/nest.css" rel="stylesheet">
- <link href="{{ SITEURL }}/theme/css/pygment.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/css/pygment.css" rel="stylesheet"> -->
<!-- <link href="{{ SITEURL }}/theme/css/home.css" rel="stylesheet"> -->
<!-- /Stylesheets -->
- {% endblock head %}
+ <!-- {% endblock head %}
</head>
- <body>
+ <body> -->
<!-- Header -->
- {% block headerstyle %}
- {% endblock headerstyle %}
+ <!-- {% block headerstyle %}
+ {% endblock headerstyle %} -->
<!-- Static navbar -->
- <div class="container">
+ <!-- <div class="container">
<div class="header-nav">
<div class="header-logo">
<a class="pull-left" href="{{ SITEURL }}/"><img class="mr20" width=192px height=64px src="{{ SITEURL }}{{NEST_HEADER_LOGO or "/images/logo3.png" }}" alt="logo"></a>
@@ -56,26 +105,26 @@
{% endif %}
</div>
</div>
- </div>
+ </div> -->
<!-- /Static navbar -->
<!-- Header -->
- {% block header %}
- {% endblock header %}
+ <!-- {% block header %}
+ {% endblock header %} -->
<!-- /Header -->
- </div>
+ <!-- </div> -->
<!-- /Header -->
<!-- Content -->
- <div class="container">
- <div class="row">
+ <!-- <div class="container">
+ <div class="row"> -->
<!-- This is our content container in all it's glory -->
- {% block content %}
- {% endblock %}
+ <!-- {% block content %}
+ {% endblock %} -->
<!-- Append the navigation box -->
<!-- <div class="col-lg-3 content archive">
@@ -98,11 +147,11 @@
<img src="{{ SITEURL }}/theme/img/cat.png">
</div> -->
- </div>
+ <!-- </div> -->
<!-- /Content -->
<!-- Footer -->
- <div class="footer gradient-2">
+ <!-- <div class="footer gradient-2">
<div class="container footer-container">
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
@@ -141,9 +190,11 @@
</div>
</div>
</div>
- </div>
+ </div> -->
<!-- /Footer -->
- </body>
+ <!-- </body> -->
- <script src="{{ SITEURL }}/theme/js/random_colour.js"></script>
-</html>
+
+
+ <!-- <script src="{{ SITEURL }}/theme/js/random_colour.js"></script> -->
+<!-- </html> -->
diff --git a/crumbs/templates/home.html b/crumbs/templates/home.html
index 3199d9c..50991e6 100755
--- a/crumbs/templates/home.html
+++ b/crumbs/templates/home.html
@@ -26,56 +26,38 @@
<!-- Outer bootstrap container -->
<div class="container">
- <!-- Add dynamic header -->
- <div class="navigation">
- <div class="nav pull-right">
-
- <!-- Loop through all pages -->
- {% for title, link in MENUITEMS %}
-
- <!-- Do magic with http/https -->
- {% if 'http://' in link or 'https://' in link %}
- <a class="naughty" href="{{ link }}">{{ title }} </a>
- {% else %}
- <a class="naughty" href="{{ SITEURL }}{{ link }}">{{ title }} </a>
- {% endif %}
-
- {% endfor %}
+ <!-- Add dynamic header -->
+ <div class="navigation">
+ <div class="nav pull-right">
+
+ <!-- Loop through all pages -->
+ {% for title, link in MENUITEMS %}
+ <!-- Do magic with http/https -->
+ {% if 'http://' in link or 'https://' in link %}
+ <a class="naughty" href="{{ link }}">{{ title }} </a>
+ {% else %}
+ <a class="naughty" href="{{ SITEURL }}{{ link }}">{{ title }} </a>
+ {% endif %}
+ {% endfor %}
+ </div>
+ </div>
+ <!-- /Static navbar -->
+
+ <hr/>
+
+ <!-- The page title -->
+ <div class="title" title="Inconsolata is my favourite monospace font, after all...">
+ <h1>
+ <span id="t-color-red"><b># ~ </b></span>
+ <span id="t-color-org">Fun</span>
+ <span id="t-color-ylw">Memory</span>
+ <span id="t-color-grn">Violations</span>
+ <span class="cursor" id="cursor">▁</span>
+ </h1>
</div>
- </div>
- <!-- /Static navbar -->
-
- <hr/>
-
- <!-- The page title -->
- <div class="title" title="Inconsolata is my favourite monospace font">
- <h1>
- <span id="t-color-red"><b># ~ </b></span>
- <span id="t-color-org">Fun</span>
- <span id="t-color-ylw">Memory</span>
- <span id="t-color-grn">Violations</span>
- <span class="cursor" id="cursor">▁</span>
- </h1>
- </div>
<!-- Cool colour bar, yo -->
- <div class="colours">
- <div class="colour colour1"></div>
- <div class="colour colour2"></div>
- <div class="colour colour3"></div>
- <div class="colour colour4"></div>
- <div class="colour colour5"></div>
- <div class="colour colour6"></div>
- <div class="colour colour7"></div>
- <div class="colour colour8"></div>
- <div class="colour colour9"></div>
- <div class="colour colour10"></div>
- <div class="colour colour11"></div>
- <div class="colour colour12"></div>
- <div class="colour colour13"></div>
- <div class="colour colour14"></div>
- <div class="colour colour15"></div>
- </div>
+ {% include "super_gay.html" %}
<p>
<b>Hi – </b>Welcome to my dusty internet hangout place.
@@ -92,6 +74,7 @@
</div>
<p>To get in touch with me, you can also send an e-mail to <a href="mailto:kookie@spacekookie.de" id="email"><b>kookie@spacekookie.de</b></a></p>
+ <!-- <p>(My RFC2549 complient Prime MTU is currently out of comission)</p> -->
</div>
diff --git a/crumbs/templates/super_gay.html b/crumbs/templates/super_gay.html
new file mode 100644
index 0000000..6089ec4
--- /dev/null
+++ b/crumbs/templates/super_gay.html
@@ -0,0 +1,17 @@
+<div class="gay">
+ <div class="colour colour1"></div>
+ <div class="colour colour2"></div>
+ <div class="colour colour3"></div>
+ <div class="colour colour4"></div>
+ <div class="colour colour5"></div>
+ <div class="colour colour6"></div>
+ <div class="colour colour7"></div>
+ <div class="colour colour8"></div>
+ <div class="colour colour9"></div>
+ <div class="colour colour10"></div>
+ <div class="colour colour11"></div>
+ <div class="colour colour12"></div>
+ <div class="colour colour13"></div>
+ <div class="colour colour14"></div>
+ <div class="colour colour15"></div>
+</div>