summaryrefslogtreecommitdiff
path: root/content/posts/2018
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/2018')
-rw-r--r--content/posts/2018/2018-02-05-why-perl6.md39
-rw-r--r--content/posts/2018/2018-03-20-perl6-introduction-to-application-programming.md58
-rw-r--r--content/posts/2018/2018-05-07-sparrowdo-getting-started.md18
-rw-r--r--content/posts/2018/2018-08-15-the-perl-conference-in-glasgow.md60
-rw-r--r--content/posts/2018/2018-09-04-setting-up-pgp-with-a-yubikey.md13
-rw-r--r--content/posts/2018/2018-09-13-hackerrank-solutions-python3-and-perl6-part-1.md48
6 files changed, 119 insertions, 117 deletions
diff --git a/content/posts/2018/2018-02-05-why-perl6.md b/content/posts/2018/2018-02-05-why-perl6.md
index 4be3965..8938b49 100644
--- a/content/posts/2018/2018-02-05-why-perl6.md
+++ b/content/posts/2018/2018-02-05-why-perl6.md
@@ -18,7 +18,7 @@ make me like Perl 6, and why I try to use it wherever possible.
Whet creating an application, you usually want to be able to specify some
arguments at runtime. Most times this happens using command line arguments or
options. Perl 6 allows you to specify these in the
-[https://docs.perl6.org/language/functions#index-entry-MAIN](`MAIN`) subroutine
+[`MAIN`](https://docs.perl6.org/language/functions#index-entry-MAIN) subroutine
signature.
For instance, if I want the application to accept two string arguments, I can
@@ -49,7 +49,7 @@ sub MAIN (
By default, if there's a `MAIN` available in your Perl 6 program, but the
arguments or options supplied by the user are incorrect, it will display the
right way to invoke the command, called the
-[https://docs.perl6.org/language/functions#index-entry-USAGE](`USAGE`).
+[`USAGE`](https://docs.perl6.org/language/functions#index-entry-USAGE).
Ofcourse, this message can be changed if you wish, but the default is quite good
for most use-cases.
@@ -58,7 +58,7 @@ option is intended for. Just for a liitle bit of additional user friendliness.
Fear not, for this is also already covered by the defaults. In Perl, there was
POD to document your code. In Perl 6, we have
-[https://docs.perl6.org/language/glossary#index-entry-POD](POD) as well. And
+[POD](https://docs.perl6.org/language/glossary#index-entry-POD) as well. And
these comments can be inspected at runtime to provide the user some
information. And that's exactly what the default `USAGE` also does. So if you
want to add some helpful comments to the arguments or the program itself,
@@ -100,13 +100,13 @@ my $a = $r² ÷ π;
Now, if you're thinking "that looks neat, but how am I ever going to write
these?", do not worry. Most operating systems and many editors have tools to let
you input these. For instance, using `vim` with
-[https://github.com/vim-perl/vim-perl6](`vim-perl6`), you can just write "pi"
+[`vim-perl6`](https://github.com/vim-perl/vim-perl6), you can just write "pi"
and hit space (or type any non-alphabetical character).
But not everyone is using an OS or an editor that makes it easy. And for those
-people, Perl 6 simply supports using
-[https://docs.perl6.org/language/unicode_ascii](ascii based operators). The
-previous block could also be written as follows:
+people, Perl 6 simply supports using [ASCII based
+operators](https://docs.perl6.org/language/unicode_ascii). The previous block
+could also be written as follows:
```raku
my $a = $r ^ 2 / pi;
@@ -121,7 +121,7 @@ easily don't have to wait for this future, Perl 6 already supports it.
Multi-core processors are virtually everywhere these days. Yet many programming
languages still don't support multithreaded application development natively,
if at all. In Perl 6, running something in a different thread is as easy as
-wrapping it in a [https://docs.perl6.org/routine/start](`start`) block:
+wrapping it in a [`start`](https://docs.perl6.org/routine/start) block:
```raku
start {
@@ -129,13 +129,13 @@ start {
}
```
-`start` returns a [https://docs.perl6.org/type/Promise](`Promise`), which you can
+`start` returns a [`Promise`](https://docs.perl6.org/type/Promise), which you can
store in a scalar variable just like any other object. You can check on whether
the `Promise` has completed already and check whether it died, for instance.
Other aspects which can often be spread over multiple threads are loops or
maps. For instance, consider the following
-[https://docs.perl6.org/routine/map](map) function:
+[`map`](https://docs.perl6.org/routine/map) function:
```raku
@cats.map: {
@@ -146,7 +146,7 @@ maps. For instance, consider the following
This will pat each cat in turn, in the order they appear in the list. But you
can speed up the patting process by patting multiple cats at the same time. And
to get there, all you need to do is add a
-[https://docs.perl6.org/routine/race](`race`):
+[`race`](https://docs.perl6.org/routine/race):
```raku
@cats.race.map: {
@@ -157,7 +157,7 @@ to get there, all you need to do is add a
This will attempt to pat the cats over multiple threads, speeding up the
process to pat all the cats. If the result of the pattings needs to be in the
same order as the patting order, you use
-[https://docs.perl6.org/routine/hyper](`hyper`) instead of `race`:
+[`hyper`](https://docs.perl6.org/routine/hyper) instead of `race`:
```raku
@cats.hyper.map: {
@@ -171,7 +171,7 @@ Object oriented programming seems to be getting out of fashion with the new
generation of developers. But it's still in wide use, being taught at most
universities, and is often easy to explain to new developers as well.
-And Perl 6 has [https://docs.perl6.org/language/classtut#index-entry-OOP](OO)
+And Perl 6 has [OO](https://docs.perl6.org/language/classtut#index-entry-OOP)
support built into its core:
```raku
@@ -188,7 +188,7 @@ class Foo
```
You can also have
-[https://docs.perl6.org/language/glossary#index-entry-Multi-Dispatch](multi-dispatch)
+[multi-dispatch](https://docs.perl6.org/language/glossary#index-entry-Multi-Dispatch)
methods on your classes, which are methods with the same names, but accepting
different arguments or argument types. For instance:
@@ -210,8 +210,8 @@ class Foo
```
Which method is being used will be decided by the type of argument is being
-passed in, in this case either a [https://docs.perl6.org/type/Str](`Str`) or an
-[https://docs.perl6.org/type/Int](`Int`).
+passed in, in this case either a [`Str`](https://docs.perl6.org/type/Str) or an
+[`Int`](https://docs.perl6.org/type/Int).
## Functional programming
@@ -221,10 +221,9 @@ well. You've seen the `map` example already while patting cats earlier, for
instance.
But there's much more on the functional playing field, such as the
-[https://docs.perl6.org/routine/==%3E](`==>`) operator, known as the
-[https://docs.perl6.org/language/operators#infix_==%3E](feed operator). It
-simply passed the output of a statement as the last argument to the next
-statement:
+[`==>`](https://docs.perl6.org/routine/==%3E) operator, known as the [`feed
+operator`](https://docs.perl6.org/language/operators#infix_==%3E). It simply
+passed the output of a statement as the last argument to the next statement:
```raku
@grumpy-cats
diff --git a/content/posts/2018/2018-03-20-perl6-introduction-to-application-programming.md b/content/posts/2018/2018-03-20-perl6-introduction-to-application-programming.md
index 21c4298..c1d2df7 100644
--- a/content/posts/2018/2018-03-20-perl6-introduction-to-application-programming.md
+++ b/content/posts/2018/2018-03-20-perl6-introduction-to-application-programming.md
@@ -13,10 +13,10 @@ tags:
# Perl 6 - Introduction to application programming
In this tutorial, I'll be guiding you through creating a simple application in
-Perl 6. If you don't have Perl 6 installed yet, get the
-[http://rakudo.org/how-to-get-rakudo/](Rakudo Star) distribution for your OS.
-Alternatively, you can use the [https://hub.docker.com/_/rakudo-star/](Docker
-image).
+Perl 6. If you don't have Perl 6 installed yet, get the [Rakudo
+Star](http://rakudo.org/how-to-get-rakudo/) distribution for your OS.
+Alternatively, you can use the [Docker
+image](https://hub.docker.com/_/rakudo-star/).
The application itself will be a simple dice-roller. You give it a number of
dice to roll, and the number of sides the die has. We'll start off by creating
@@ -69,9 +69,9 @@ This is the name given to the module. This will be used for the directory name,
which by default in `assixt` will be `perl6-` prepended to a lower-case version
of the module name. If you ever wish to make a module that is to be shared in
the Perl 6 ecosystem, this should be unique across the entire ecosystem. If
-you're interested in some guidelines, the
-[https://pause.perl.org/pause/query?ACTION=pause_namingmodules](PAUSE
-guidelines) seem to apply pretty well to Perl 6 as well.
+you're interested in some guidelines, the [PAUSE
+guidelines](https://pause.perl.org/pause/query?ACTION=pause_namingmodules) seem
+to apply pretty well to Perl 6 as well.
For this application, we'll use `Local::App::Dicer`, but you can use whatever
name you'd prefer here.
@@ -106,7 +106,7 @@ This indicates the license under which your module is distributed. This
defaults to `GPL-3.0`, which I strongly recommend to use. The de-facto
default seems to be `Artistic-2.0`, which is also used for Perl 6 itself.
-This identifier is based on the [https://spdx.org/licenses/](SPDX license list).
+This identifier is based on the [SPDZ license list](https://spdx.org/licenses/).
Anything not mentioned in this list is not acceptable. #TODO Clarify why
## Writing your first test
@@ -170,28 +170,28 @@ subtest "Illegal rolls", {
{{< admonition title="note" >}}
Perl 6 allows mathematical characters to make your code more concise, as with
-the ≤ in the above block. If you use http://www.vim.org/[vim], you can make use
-of the https://github.com/vim-perl/vim-perl6[vim-perl6] plugin, which has an
+the ≤ in the above block. If you use [vim](http://www.vim.org/), you can make use
+of the [vim-perl6](https://github.com/vim-perl/vim-perl6) plugin, which has an
option to change the longer, ascii-based ops (in this case `\<=`) into the
shorter unicode based ops (in this case `≤`). This specific feature requires
`let g:perl6_unicode_abbrevs = 1` in your `vimrc` to be enabled with
`vim-perl6`.
If that's not an option, you can use a
-https://en.wikipedia.org/wiki/Compose_key[compose key]. If that is not viable
+[compose key](https://en.wikipedia.org/wiki/Compose_key). If that is not viable
either, you can also stick to using the ascii-based ops. Perl 6 supports both
of them.
{{< / admonition >}}
This will run 53 tests, split up in two
-[https://docs.perl6.org/language/testing#Grouping_tests](subtests). Subtests are
-used to logically group your tests. In this case, the calls that are correct
-are in one subtest, the calls that should be rejected are in another.
+[subtests](https://docs.perl6.org/language/testing#Grouping_tests). Subtests are
+used to logically group your tests. In this case, the calls that are correct are
+in one subtest, the calls that should be rejected are in another.
The `plan` keywords indicate how many tests should be run. This will help spot
errors in case your expectations were not matched. For more information on
-testing, check out [https://docs.perl6.org/language/testing](the Perl 6 docs on
-testing).
+testing, check out [the Perl 6 docs on
+testing](https://docs.perl6.org/language/testing).
We're making use of two test routines, `ok` and `throws-like`. `ok` is a
simple test: if the given statement is truthy, the test succeeds. The other
@@ -243,7 +243,7 @@ use v6.c;
unit module Local::App::Dicer;
```
-The first line is a [https://en.wikipedia.org/wiki/Shebang_(Unix)](shebang). It
+The first line is a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)). It
informs the shell what to do when you try to run the file as an executable
program. In this case, it will run `false`, which immediately exits with a
non-success code. This file needs to be run as a Perl 6 module file, and
@@ -424,10 +424,10 @@ $ perl6 -Ilib bin/dicer 2 20
### The usage output
Now, we still have the trouble of illegal number input not clearly telling
-what's wrong. We can do a neat trick with
-[https://docs.perl6.org/language/functions#index-entry-USAGE](the USAGE sub) to
-achieve this. Perl 6 allows a subroutine with the name `USAGE` to be defined,
-overriding the default behaviour.
+what's wrong. We can do a neat trick with [the `USAGE`
+sub](https://docs.perl6.org/language/functions#index-entry-USAGE) to achieve
+this. Perl 6 allows a subroutine with the name `USAGE` to be defined, overriding
+the default behaviour.
Using this, we can generate a friendlier message informing the user what they
need to supply more clearly. The `USAGE` sub would look like this:
@@ -448,8 +448,8 @@ You now have a working console application in Perl 6!
## a simple GUI
But that's not all. Perl 6 has a module to create GUIs with the
-[https://www.gtk.org/](GTK library) as well. For this, we'll use the
-[https://github.com/perl6/gtk-simple](`GTK::Simple`) module.
+[GTK library](https://www.gtk.org/) as well. For this, we'll use the
+[`GTK::Simple`](https://github.com/perl6/gtk-simple) module.
You can add this module as a dependency to the `Local::App::Dicer` repository
with `assixt` as well, using the `depend` command. By default, this will also
@@ -463,11 +463,11 @@ $ assixt depend GTK::Simple
Next, we could create another executable file and call it `dicer-gtk`. However,
I can also use this moment to introduce
-[https://docs.perl6.org/language/glossary#index-entry-multi-method](multi
-methods). These are subs with the same name, but differing signatures. If a
-call to such a sub could potentially match multiple signatures, the most
-specific one will be used. We will add another `MAIN` sub, which will be called
-when `bin/dicer` is called with the `--gtk` parameter.
+[multi-methods](https://docs.perl6.org/language/glossary#index-entry-multi-method).
+These are subs with the same name, but differing signatures. If a call to such a
+sub could potentially match multiple signatures, the most specific one will be
+used. We will add another `MAIN` sub, which will be called when `bin/dicer` is
+called with the `--gtk` parameter.
We should also update the `USAGE` sub accordingly, of course. And while we're
at it, let's also include the `GTK::Simple` and `GTK::Simple::App` modules. The
@@ -526,7 +526,7 @@ in Perl 6. Any method can be given a non-positional, named parameter. This is
done by appending a `:` in front of the variable name in the sub signature.
This has already been used in our code, in `multi sub MAIN(Bool :$gtk where
$gtk == True)`. This has a couple of benefits, which are explained in the
-[https://docs.perl6.org/type/Signature#index-entry-positional_argument_%28Signature%29_named_argument_%28Signature%29](Perl 6 docs on signatures).
+[Perl 6 docs on signatures](https://docs.perl6.org/type/Signature#index-entry-positional_argument_%28Signature%29_named_argument_%28Signature%29).
### Creating the elements
diff --git a/content/posts/2018/2018-05-07-sparrowdo-getting-started.md b/content/posts/2018/2018-05-07-sparrowdo-getting-started.md
index aec4fdf..947f839 100644
--- a/content/posts/2018/2018-05-07-sparrowdo-getting-started.md
+++ b/content/posts/2018/2018-05-07-sparrowdo-getting-started.md
@@ -11,24 +11,24 @@ tags:
# Sparrowdo - Getting started
-[https://github.com/melezhik/sparrowdo](Sparrowdo) is a Perl 6 project to
+[Sparrowdo](https://github.com/melezhik/sparrowdo) is a Perl 6 project to
facilitate automatic configuration of systems. There's a
-[https://sparrowhub.org/](repository of useful modules) to make specific cases
+[repository of useful modules](https://sparrowhub.org/) to make specific cases
easier to work with, but the
-[https://github.com/melezhik/sparrowdo/blob/master/core-dsl.md](Core DSL) can
+[Core DLS](https://github.com/melezhik/sparrowdo/blob/master/core-dsl.md) can
already take care of many tasks. In this tutorial, I'll guide you through
setting up Sparrowdo, bootstrapping it onto your local system, writing a task
and running it.
## Install Sparrowdo
-Sparrowdo is a [http://perl6.org/](Perl 6) project, so you'll need to have Perl
+Sparrowdo is a [Perl 6]http://perl6.org/) project, so you'll need to have Perl
6 installed. We'll also use the Perl 6 package manager
-[https://github.com/ugexe/zef/](zef) to install Sparrowdo itself. Luckily for
+[zef](https://github.com/ugexe/zef/) to install Sparrowdo itself. Luckily for
us, there's a stable distribution of Perl 6 with everything we need added to it,
-called [https://rakudo.org/files](Rakudo Star). And to make it easier for
+called [Rakudo Star](https://rakudo.org/files). And to make it easier for
GNU+Linux users, I wrote a tool to fetch the latest Rakudo Star release, compile
-it and install it, called [https://github.com/Tyil/lonestar](LoneStar). Since
+it and install it, called [LoneStar](https://github.com/Tyil/lonestar). Since
this tutorial will aim at GNU+Linux users, I'll use that to install Perl 6.
### Installing Perl 6 with LoneStar
@@ -131,7 +131,7 @@ create a temporary directory and change the working directory to there.
{{< / admonition >}}
I'll be using `~/.local/sparrowdo/local-dns` to work in, as I'll be setting up a
-local dns cache with [http://www.thekelleys.org.uk/dnsmasq/doc.html](dnsmasq)
+local dns cache with [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)
for the sample code.
### Writing a `sparrowfile`
@@ -179,7 +179,7 @@ nameserver 37.235.1.174
nameserver 37.235.1.177
```
-These nameservers are part of the [https://freedns.zone/en/](FreeDNS) project.
+These nameservers are part of the [FreeDNS](https://freedns.zone/en/) project.
You can of course use whatever other DNS provider you want to use as your
upstream servers. Now, for `dnsmasq` to be used, you will also need to set your
machine's DNS resolvers to point to the `dnsmasq` service. This is defined in
diff --git a/content/posts/2018/2018-08-15-the-perl-conference-in-glasgow.md b/content/posts/2018/2018-08-15-the-perl-conference-in-glasgow.md
index 060ed2a..304a287 100644
--- a/content/posts/2018/2018-08-15-the-perl-conference-in-glasgow.md
+++ b/content/posts/2018/2018-08-15-the-perl-conference-in-glasgow.md
@@ -16,10 +16,9 @@ detailed in this blog post.
{{< admonition title="note" >}}
The first talk I cover is not so much about Perl, but more about politics, as
the talk was mostly about the speaker's ideology. If this does not interest you,
-I'd suggest you skip the [#discourse-without-drama](Discourse Without Drama)
-section, and head straight to the
-[#european-perl-mongers-organiser-s-forum-2018](European Perl Mongers
-Organiser's Forum 2018).
+I'd suggest you skip the [Discourse Without Drama](#discourse-without-drama)
+section, and head straight to the [European Perl Mongers Organiser's Forum
+2018](#european-perl-mongers-organiser-s-forum-2018).
{{< / admonition >}}
## Discourse Without Drama
@@ -42,7 +41,7 @@ One of the things that stood out to me is that the speaker tells us not to use
logical fallacies to condemn her ideology. This on itself I can easily agree
with. However, this should go both ways: we should also not use logical
fallacies to promote her ideology. Most notably, she pointed out the
-[https://en.wikipedia.org/wiki/Argumentum_ad_populum](_argumentum ad populum_).
+[_argumentum ad populum_](https://en.wikipedia.org/wiki/Argumentum_ad_populum).
This basically means that just because a lot of people do or say something,
doesn't make it right. And this applies to the idea that we need to push the
diversity ideology in the Perl community as well. Try to bring facts and
@@ -73,14 +72,14 @@ environment in which people will be afraid to give genuine, valid feedback.
She seemed very much in favour of an overly broad code of conduct as well, of
which I am also a strong opponent. There are various articles online, such as
-[https://shiromarieke.github.io/coc.html](this one), which show that just
+[this one](https://shiromarieke.github.io/coc.html), which show that just
slapping a generic, vague code of conduct to a community isn't going to solve
-the issue of trolls or harmful behaviour. There's
-[http://quillette.com/2017/07/18/neurodiversity-case-free-speech/](another great
-article) that I was pointed towards that highlight how this attempt to censor
-people for the sake of not offending anyone can effectively halt creativity and
-the exchange of ideas. There was also an interesting quote written on one of
-the walls of the venue:
+the issue of trolls or harmful behaviour. There's [another great
+article](http://quillette.com/2017/07/18/neurodiversity-case-free-speech/) that
+I was pointed towards that highlight how this attempt to censor people for the
+sake of not offending anyone can effectively halt creativity and the exchange of
+ideas. There was also an interesting quote written on one of the walls of the
+venue:
{{< quote attribution="Oscar Romero" >}}
Aspire not to have more, but to be more...
@@ -90,8 +89,9 @@ Don't try to add meaningless documents such as a code of conduct, which more
often than not hurts a community instead of improving it. Try to be a better
person that tries to solve actual issues without harming the community at large.
Be the adult in the conversation that can take an insult, and still be kind.
-[https://rakudo.party/post/On-Troll-Hugging-Hole-Digging-and-Improving-Open-Source-Communities#hug2:feedthehandthatbitesyou](Remember
-to hug the trolls), and eventually they will hug you back.
+[Remember to hug the
+trolls](https://rakudo.party/post/On-Troll-Hugging-Hole-Digging-and-Improving-Open-Source-Communities#hug2:feedthehandthatbitesyou),
+and eventually they will hug you back.
## European Perl Mongers Organiser's Forum 2018
@@ -139,7 +139,7 @@ similar to CPAN testers for Perl 5 quite easy for Perl 6.
## Perl 6 in Real Life $Work
The speaker shows the perfect use case for
-[https://docs.perl6.org/language/grammars](Perl 6 grammars), advanced yet
+[Perl 6 grammars](https://docs.perl6.org/language/grammars), advanced yet
readable parsing of text and performing actions with the results. It's an
interesting talk, showcasing some nifty grammar constructs. The best part of
this is that it actually runs in production, where it parses over 700 files,
@@ -197,11 +197,7 @@ can work out your contribution and see if you can get it merged into the main
project.
The speaker also lists a couple of ways to get started with contributing to
-modules. One thing I missed in particular was the Squashathons
-footnote:[A Squashathon is like a hackathon, except everyone in the world is
-invited, and you can help out over the Internet, staying in your own home. Of
-course, you can still meet up with other developers and make it a social
-gathering in the real world as well!] for Perl 6.
+modules. One thing I missed in particular was the Squashathons[^1] for Perl 6.
These generally offer a good entry point to help out with the language's
development and the ecosystem's maintainance.
@@ -250,7 +246,7 @@ language.
## Writing a Perl 6 Module
Perl 6 has this very neat feature called
-[https://docs.perl6.org/language/typesystem#index-entry-subset-subset](subsets).
+[subsets](https://docs.perl6.org/language/typesystem#index-entry-subset-subset).
These can be used to make your own types with very little effort, which can
help tremendously to keep your code clean and concise. There are two arguments
I have in favour of subsets that the speaker did not touch upon.
@@ -261,9 +257,9 @@ signature, and the check fails, you'll get an error that there was no signature
that matched `where { ... }`.
Secondly, if you want to use abstract methods, you can't really use a `where`.
-[https://stackoverflow.com/questions/51570655/how-to-use-abstract-multi-methods-containing-a-where](I've
-asked a question about this on Stack Overflow), which has the details as to why
-this doesn't work the way you might expect.
+[I'ev asked a question about this on Stack
+Overflow](https://stackoverflow.com/questions/51570655/how-to-use-abstract-multi-methods-containing-a-where),
+which has the details as to why this doesn't work the way you might expect.
Next, there's some cool things about operators in Perl 6. There are many of
these available by default, and it's _very_ easy to add new ones yourself as
@@ -288,11 +284,12 @@ This can be written instead as:
method norm ('row-sum')
```
-This is shorter and clearer, and you'll get better feedback from the compiler
-as well. I [https://github.com/pierre-vigier/Perl6-Math-Matrix/pull/49](submitted
-a pull request on the GitHub repository) in an attempt to improve this, which
-got merged! The speaker was not aware it could be done in this manner, so I'm
-proud I got to teach him something right after he did his presentation.
+This is shorter and clearer, and you'll get better feedback from the compiler as
+well. I [submitted a pull request on the GitHub
+repository](https://github.com/pierre-vigier/Perl6-Math-Matrix/pull/49) in an
+attempt to improve this, which got merged! The speaker was not aware it could be
+done in this manner, so I'm proud I got to teach him something right after he
+did his presentation.
## Winding down
@@ -302,3 +299,8 @@ people who've helped me out over the past year as well.
A big thank you to all the people who made this conference possible, and I hope
to see you all again in Riga!
+
+[^1]: A Squashathon is like a hackathon, except everyone in the world is
+invited, and you can help out over the Internet, staying in your own home. Of
+course, you can still meet up with other developers and make it a social
+gathering in the real world as well!
diff --git a/content/posts/2018/2018-09-04-setting-up-pgp-with-a-yubikey.md b/content/posts/2018/2018-09-04-setting-up-pgp-with-a-yubikey.md
index 278a4d3..e965a37 100644
--- a/content/posts/2018/2018-09-04-setting-up-pgp-with-a-yubikey.md
+++ b/content/posts/2018/2018-09-04-setting-up-pgp-with-a-yubikey.md
@@ -374,12 +374,13 @@ You can verify whether the keys are available on the Yubikey now using `gpg
### Sharing your public key
-You can share your public keys in many ways. Mine is hosted link:/pubkey.txt[on
-my own site], for instance. There are also https://sks-keyservers.net/[public
-keyservers] on which you can upload your keys. `gpg` has the `--send-keys` and
-`--recv-keys` switches to interact with these public keyservers. For ease of
-use, I would recommend uploading them to a public keyserver, so that other
-people can easily import it. For instance, my key can be imported using `gpg`:
+You can share your public keys in many ways. Mine is hosted [on my own
+site](/pubkey.txt), for instance. There are also [public
+keyservers](https://sks-keyservers.net/) on which you can upload your keys.
+`gpg` has the `--send-keys` and `--recv-keys` switches to interact with these
+public keyservers. For ease of use, I would recommend uploading them to a public
+keyserver, so that other people can easily import it. For instance, my key can
+be imported using `gpg`:
```txt
gpg --recv-keys 0x7A6AC285E2D98827
diff --git a/content/posts/2018/2018-09-13-hackerrank-solutions-python3-and-perl6-part-1.md b/content/posts/2018/2018-09-13-hackerrank-solutions-python3-and-perl6-part-1.md
index c3f2aee..3ca0497 100644
--- a/content/posts/2018/2018-09-13-hackerrank-solutions-python3-and-perl6-part-1.md
+++ b/content/posts/2018/2018-09-13-hackerrank-solutions-python3-and-perl6-part-1.md
@@ -14,7 +14,7 @@ tags:
I recently started at a new company, for which I will have to write Python 3
code. To make sure I still know how to do basic stuff in Python, I started to
-work on some [https://www.hackerrank.com/](Hackerrank challenges). In this post,
+work on some [Hackerrank challenges](https://www.hackerrank.com/). In this post,
I will show solutions to some challenges to show the differences. I hope that I
can show that Perl doesn't have to be the "write only" language that many
people make it out to be.
@@ -29,12 +29,12 @@ solutions!
## Challenges
-The challenges covered in this post are the
-[https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=warmup](warmup
-challenges) you are recommended to solve when you make a new account. The code
-around the function I'm expected to solve won't be included, as this should be
-irrelevant (for now). Additionally, I may rename the sub to conform to
-[https://en.wikipedia.org/wiki/Letter_case#Special_case_styles](kebab-case), as
+The challenges covered in this post are the [warmup
+challenges](https://www.hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=warmup)
+you are recommended to solve when you make a new account. The code around the
+function I'm expected to solve won't be included, as this should be irrelevant
+(for now). Additionally, I may rename the sub to conform to
+[kebab-case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles), as
this is more readable (in my opinion), and allowed in Perl 6.
### Solve Me First
@@ -56,7 +56,7 @@ sub solve-me-first ($a, $b) {
```
For those not familiar with Perl 6, the `$` in front of the variable names is
-called a [https://docs.perl6.org/language/glossary#index-entry-Sigil](Sigil),
+called a [Sigil](https://docs.perl6.org/language/glossary#index-entry-Sigil),
and it signals that the variable contains only a single value.
You may have noticed that there's also no `return` in the Perl 6 variant of
@@ -91,10 +91,10 @@ sub simple-array-sum (@ar) {
Here you can see a different sigil for `@ar`. The `@` sigil denotes a list of
scalars in Perl 6. In most other languages this would simply be an array.
-This code can be written even shorter, however. Perl 6 has
-[https://docs.perl6.org/language/operators#index-entry-%5B%2B%5D_%28reduction_metaoperators%29](reduction
-meta-operators). This allows you to put an operator between brackets, like
-`[+]`, to apply a certain operator as a reduce function.
+This code can be written even shorter, however. Perl 6 has [reduction
+meta-operators](https://docs.perl6.org/language/operators#index-entry-%5B%2B%5D_%28reduction_metaoperators%29).
+This allows you to put an operator between brackets, like `[+]`, to apply a
+certain operator as a reduce function.
```raku
sub simple-array-sum (@ar) {
@@ -234,11 +234,11 @@ In Perl 6, this is not needed if it's the last statement in a block (any code
surrounded by a `{` and `}`.
The `given/when` construct is similar to a `switch/case` found in other
-languages (but not Python, sadly), but uses the
-[https://docs.perl6.org/language/operators#index-entry-smartmatch_operator](smartmatch
-operator) implicitly to check if the statements given to `when` are `True`. The
-`*` is the [https://docs.perl6.org/type/Whatever](Whatever operator), which in
-this case will get the value of `$i`.
+languages (but not Python, sadly), but uses the [Smartmatch
+operator](https://docs.perl6.org/language/operators#index-entry-smartmatch_operator)
+implicitly to check if the statements given to `when` are `True`. The `*` is the
+[Whatever operator](https://docs.perl6.org/type/Whatever), which in this case
+will get the value of `$i`.
Lastly, he `$_` in the `map` function is similar to inside a `for` loop,
it's the current element. Since the code given to `map` is inside a block,
@@ -408,7 +408,7 @@ of the logic it's using to get the result. The biggest difference is that in
Perl 6, strings can't be accessed as lists, so I use the `substr` method to
extract the parts that I want. The first one starts at `*-2`, which means 2
places before the end. The others get a
-[https://docs.perl6.org/type/Range](`Range`) as argument, and will get the
+[`Range`](https://docs.perl6.org/type/Range) as argument, and will get the
characters that exist in that range.
```raku
@@ -425,11 +425,11 @@ sub time-conversion ($s) {
```
The `.Int` method converts the `Str` object into an `Int` object, so we can
-perform calculations on it. The `eq` operator checks specifically for
-[https://docs.perl6.org/routine/eq](_string equality_). Since Perl 6 is a
-[https://en.wikipedia.org/wiki/Gradual_typing](gradually typed programming
-language), there's a dedicated operator to ensure that you're checking string
-equality correctly.
+perform calculations on it. The `eq` operator checks specifically for [_string
+equality_](https://docs.perl6.org/routine/eq). Since Perl 6 is a [gradually
+typed programming language](https://en.wikipedia.org/wiki/Gradual_typing),
+there's a dedicated operator to ensure that you're checking string equality
+correctly.
## Wrap-up
@@ -442,4 +442,4 @@ This is also the first post in which I have tried this format to show off two
languages side-by-side, and to highlight differences in how you can accomplish
certain (relatively simple) tasks with them. If you have suggestions to improve
this format, do not hesitate to contact me. I am always open for feedback,
-preferably via email. You can find my contact details on the [/](homepage).
+preferably via email. You can find my contact details on the [homepage](/).