<!DOCTYPE HTML>
<html>
<head>
<title>APL-and-J - Advent of code-2020-in-APL</title>
<style media="screen, handheld">
body { display: flex; flex-wrap: wrap; font-family: sans;}
header { flex-basis: 100%; flex-shrink: 0; }
article { flex-basis: 60%; padding-left: 1em; }
footer { flex-basis: 100%; flex-shrink: 0; }
header nav { display: flex; justify-content: space-between; }
nav a, header a { text-decoration: none ; color: inherit; }
header h1 span { margin-left: 1em; font-size: 50%; font-style: italic; }
.mainContent > nav { flex-basis: content; padding-right: 1vw; min-width: 16em; }
nav ul { display: flex; flex-direction: column; list-style-type: none; list-style-position: outside; padding-left: 0; }
nav li ul { padding-left: 0.6em }
footer { display: flex; justify-content: space-between; }
/* cut here to leave vanity behind */
body { margin:0; padding: 0; font-size: 84%; font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; }
a { text-decoration: none; color: }
a:hover { text-decoration: underline; }
.thisPage { color: black; }
/* header and top bar */
header nav { background-color: rgb(100,135,220); color: white; padding: 0.3em; border-bottom: 2px solid black; font-size: 91%; }
header h1 { background-color: #ff6d06; color: black; margin: 0; border-bottom: 2px solid black; font-weight: normal; padding: 0.25ex; font-size: 233%; }
header a:hover { text-decoration: none; }
/* sidebar */
.mainContent > nav { border-right: 1px solid #ddd; padding: 0; }
.mainContent > nav > div { border-bottom: 1px solid #ddd; }
.mainContent > nav > div a { color: rgb(0, 102, 204); display: block; text-transform: capitalize; font-weight: bold; padding: 0.25em 1ex 0.25em 2mm; font-size: 102%}
.mainContent > nav > div a:hover { color: white; background-color: rgb(100,135,220); border-left: black solid 0.2em; text-decoration: none; }
.mainContent > nav > div p { font-weight: bold; margin: 0 0 0.5em 2mm; padding: 1em 0 0 0; }
/* main copy */
article { padding: 0.5ex 0 5vh 1vw; }
article h1, article h2 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; border-bottom: 2px solid rgb(0,102,204); }
article h3, article h4, article h5 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
article h6, article h7, article h8 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
article a { color: rgb(0,102,204); }
article a:hover { color: rgb(100,135,220); }
article pre { font-size: 1.2em; }
/* footer */
footer { color: white; background-color: rgb(100,135,220); }
footer a { color: inherit; }
footer div { padding: 1em; }
/* tables */
table { border: 1px solid rgba(128,128,128,0.5); padding: 0; }
th { color: white; background-color: rgb(100,135,220); }
tr:nth-child(odd) { background-color: rgba(128,128,128,0.1) }
/* modifications */
img {
max-width: 100%;
border: 1px solid black;
}
body {
}
header h1 {
background-color: #c2d2c6;
}
html {
font-size: 1.2em;
}
header nav, footer {
background-color: #442a13;
}
code > pre {
border: 2px solid #442a13;
background-color: #c2d2c6;
width: max-content;
padding: 0 0.5em;
}
.mainContent > nav > div a, article a:hover {
color: #442a13;
}
.mainContent > nav > div a:hover {
color: #442a13;
background-color: #c2d2c6;
}
article h1, article h2 {
color: #c48f3b;
border-bottom: 2px solid #442a13;
}
article a, .thisPage, footer, header nav {
color: #c48f3b;
}
footer {
padding: 0.5em;
flex-shrink: 1;
flex-basis: unset;
}
header {
flex-basis: unset;
}
html {
display: flex;
min-height: 100%;
}
body {
flex-direction: column;
flex: 1;
background-color: #e3dfd7;
}
.mainContent {
display: flex;
flex-grow: 1;
} </style>
<link rel="shortcut icon" href="https://images.pmikkelsen.com/favicon.ico" type="image/vnd.microsoft.icon">
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<header>
<nav>
<div class="left">
<a href="https://pmikkelsen.com">notes</a> |
<a href="https://git.pmikkelsen.com">git</a> |
<a href="https://images.pmikkelsen.com">images</a> |
<a href="https://files.pmikkelsen.com">files</a> |
<a href="https://prolog.pmikkelsen.com">PProlog</a> |
<a href="https://apl.pmikkelsen.com">APL9</a> |
<a href="https://aplwc.org">aplwc</a>
</div>
<div class="right">
<a href="https://git.sr.ht/~pmikkelsen">sourcehut</a> |
<a href="https://9front.org">9front</a> |
<a href="https://openbsd.org">OpenBSD</a> |
<a href="https://dyalog.com">Dyalog</a>
</div>
</nav>
<h1><a href="../../index.html">Peter's website <span id="headerSubTitle">- random notes</span></a></h1>
</header>
<div class=mainContent>
<nav id="side-bar">
<div>
<ul>
<li><a href="../index.html" class="thisPage">»<i> APL and J/</i></a></li>
<li><ul>
<li><a href="index.html" class="thisPage">»<i> Advent of code 2020 in APL/</i></a></li>
<li><ul>
<li><a href="day01.html">› day01</a></li>
<li><a href="day02.html">› day02</a></li>
<li><a href="day03.html">› day03</a></li>
<li><a href="day04.html">› day04</a></li>
<li><a href="day05.html">› day05</a></li>
<li><a href="day06.html">› day06</a></li>
<li><a href="day07.html">› day07</a></li>
<li><a href="day08.html">› day08</a></li>
<li><a href="day09.html">› day09</a></li>
<li><a href="day10.html">› day10</a></li>
<li><a href="day11.html">› day11</a></li>
<li><a href="day12.html">› day12</a></li>
<li><a href="day13.html">› day13</a></li>
<li><a href="day14.html">› day14</a></li>
<li><a href="day15.html">› day15</a></li>
<li><a href="day16.html">› day16</a></li>
<li><a href="day17.html">› day17</a></li>
<li><a href="day18.html">› day18</a></li>
<li><a href="day19.html">› day19</a></li>
<li><a href="day20.html">› day20</a></li>
<li><a href="day21.html">› day21</a></li>
<li><a href="day22.html">› day22</a></li>
<li><a href="day23.html">› day23</a></li>
<li><a href="day24.html">› day24</a></li>
<li><a href="day25.html">› day25</a></li>
</ul></li>
<li><a href="../Date-puzzle-solver.html">› Date puzzle solver</a></li>
<li><a href="../Designing_an_APL_for_9front.html">› Designing an APL for 9front</a></li>
<li><a href="../hello_world_apl_and_j.html">› hello world apl and j</a></li>
</ul></li>
<li><a href="../../OpenBSD/index.html">› OpenBSD/</a></li>
<li><a href="../../contact.html">› contact</a></li>
<li><a href="../../facts/index.html">› facts/</a></li>
<li><a href="../../haskell/index.html">› haskell/</a></li>
<li><a href="../../linux/index.html">› linux/</a></li>
<li><a href="../../mainframe/index.html">› mainframe/</a></li>
<li><a href="../../me/index.html">› me/</a></li>
<li><a href="../../opinions/index.html">› opinions/</a></li>
<li><a href="../../plan9/index.html">› plan9/</a></li>
<li><a href="../../prolog/index.html">› prolog/</a></li>
<li><a href="../../web/index.html">› web/</a></li>
</ul>
</div>
</nav>
<article>
<h1>Advent of code in APL</h1>
<p>In this small blog series, I will work through the <a href="https://adventofcode.com/">advent of code</a> challenges from 2020 and solve each of them in the programming language APL (the <a href="https://www.dyalog.com/">dyalog</a> variant).</p>
<p>As I go along, I will try to explain any new concepts, functions and operators, so it should hopefully be possible for someone who has never written any APL to follow along, and maybe even try it out for themselves ☺.</p>
<p><strong>Note</strong>: At the time of writing this, the calender almost says August 2021, so it is fair to assume that this writeup will not spoil anything for anyone, unless they are, like me, doing the challenges a few months too late.</p>
<p>The code for this series is available <a href="https://git.sr.ht/~pmikkelsen/apl-aoc2020">here</a>, and if you have any comments to the code, please send me an <a href="../../contact.html">email</a>.</p>
<h2>Links to the days</h2>
<ul>
<li>
<a href="day01.html">Day 1: Report Repair</a> - Not yet solved
</li><li>
<a href="day02.html">Day 2: Password Philosophy</a> - Not yet solved
</li><li>
<a href="day03.html">Day 3: Toboggan Trajectory</a> - Not yet solved
</li><li>
<a href="day04.html">Day 4: Passport Processing</a> - Not yet solved
</li><li>
<a href="day05.html">Day 5: Binary Boarding</a> - Not yet solved
</li><li>
<a href="day06.html">Day 6: Custom Customs</a> - Not yet solved
</li><li>
<a href="day07.html">Day 7: Handy Haversacks</a> - Not yet solved
</li><li>
<a href="day08.html">Day 8: Handheld Halting</a> - Not yet solved
</li><li>
<a href="day09.html">Day 9: Encoding Error</a> - Not yet solved
</li><li>
<a href="day10.html">Day 10: Adapter Array</a> - Not yet solved
</li><li>
<a href="day11.html">Day 11: Seating System</a> - Not yet solved
</li><li>
<a href="day12.html">Day 12: Rain Risk</a> - Not yet solved
</li><li>
<a href="day13.html">Day 13: Shuttle Search</a> - Not yet solved
</li><li>
<a href="day14.html">Day 14: Docking Data</a> - Not yet solved
</li><li>
<a href="day15.html">Day 15: Rambunctious Recitation</a> - Not yet solved
</li><li>
<a href="day16.html">Day 16: Ticket Translation</a> - Not yet solved
</li><li>
<a href="day17.html">Day 17: Conway Cubes</a> - Not yet solved
</li><li>
<a href="day18.html">Day 18: Operation Order</a> - Not yet solved
</li><li>
<a href="day19.html">Day 19: Monster Messages</a> - Not yet solved
</li><li>
<a href="day20.html">Day 20: Jurassic Jigsaw</a> - Not yet solved
</li><li>
<a href="day21.html">Day 21: Allergen Assessment</a> - Not yet solved
</li><li>
<a href="day22.html">Day 22: Crab Combat</a> - Not yet solved
</li><li>
<a href="day23.html">Day 23: Crab Cups</a> - Not yet solved
</li><li>
<a href="day24.html">Day 24: Lobby Layout</a> - Not yet solved
</li><li>
<a href="day25.html">Day 25: Combo Breaker</a> - Not yet solved
</li>
</ul>
</article>
</div>
<footer>
<a href="http://werc.cat-v.org">Powered by werc</a> © Peter Mikkelsen 2019-2025
</footer>
</body></html>