aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.xml32
1 files changed, 16 insertions, 16 deletions
diff --git a/docs/index.xml b/docs/index.xml
index 9c2704b..edf43f5 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -12,7 +12,7 @@
12 <language>en-us</language> 12 <language>en-us</language>
13 <copyright>Creative Commons BY-NC-SA 4.0</copyright> 13 <copyright>Creative Commons BY-NC-SA 4.0</copyright>
14 <item> 14 <item>
15<title>turing_complete_type_systems</title> 15<title>Turing Complete Type Systems</title>
16<description><p>Rust’s type system is Turing complete:</p> 16<description><p>Rust’s type system is Turing complete:</p>
17<ul> 17<ul>
18<li><a href="https://github.com/doctorn/trait-eval/">FizzBuzz with Rust Traits</a></li> 18<li><a href="https://github.com/doctorn/trait-eval/">FizzBuzz with Rust Traits</a></li>
@@ -27,7 +27,7 @@
27<guid>https://peppe.rs/posts/turing_complete_type_systems/</guid> 27<guid>https://peppe.rs/posts/turing_complete_type_systems/</guid>
28</item> 28</item>
29<item> 29<item>
30<title>auto-currying_rust_functions</title> 30<title>Auto-currying Rust Functions</title>
31<description><p>This post contains a gentle introduction to procedural macros in Rust and a guide to writing a procedural macro to curry Rust functions. The source code for the entire library can be found <a href="https://github.com/nerdypepper/cutlass">here</a>. It is also available on <a href="https://crates.io/crates/cutlass">crates.io</a>.</p> 31<description><p>This post contains a gentle introduction to procedural macros in Rust and a guide to writing a procedural macro to curry Rust functions. The source code for the entire library can be found <a href="https://github.com/nerdypepper/cutlass">here</a>. It is also available on <a href="https://crates.io/crates/cutlass">crates.io</a>.</p>
32<p>The following links might prove to be useful before getting started:</p> 32<p>The following links might prove to be useful before getting started:</p>
33<ul> 33<ul>
@@ -521,7 +521,7 @@ test tests::works ... ok</code></pre>
521<guid>https://peppe.rs/posts/auto-currying_rust_functions/</guid> 521<guid>https://peppe.rs/posts/auto-currying_rust_functions/</guid>
522</item> 522</item>
523<item> 523<item>
524<title>pixel_art_in_GIMP</title> 524<title>Pixel Art In GIMP</title>
525<description><p>I’ve always been an admirer of pixel art, because of it’s simplicity and it’s resemblance to bitmap font design. Recently, I decided to take the dive and make some art of my own.</p> 525<description><p>I’ve always been an admirer of pixel art, because of it’s simplicity and it’s resemblance to bitmap font design. Recently, I decided to take the dive and make some art of my own.</p>
526<p>I used GIMP because I am fairly familiar with it. Aseprite seems to be the editor of choice for animated pixel art though.</p> 526<p>I used GIMP because I am fairly familiar with it. Aseprite seems to be the editor of choice for animated pixel art though.</p>
527<h3 id="setting-up-the-canvas">Setting up the canvas</h3> 527<h3 id="setting-up-the-canvas">Setting up the canvas</h3>
@@ -576,7 +576,7 @@ test tests::works ... ok</code></pre>
576<guid>https://peppe.rs/posts/pixel_art_in_GIMP/</guid> 576<guid>https://peppe.rs/posts/pixel_art_in_GIMP/</guid>
577</item> 577</item>
578<item> 578<item>
579<title>rapid_refactoring_with_vim</title> 579<title>Rapid Refactoring With Vim</title>
580<description><p>Last weekend, I was tasked with refactoring the 96 unit tests on <a href="https://github.com/ruma/ruma-events/pull/70">ruma-events</a> to use strictly typed json objects using <code>serde_json::json!</code> instead of raw strings. It was rather painless thanks to vim :)</p> 580<description><p>Last weekend, I was tasked with refactoring the 96 unit tests on <a href="https://github.com/ruma/ruma-events/pull/70">ruma-events</a> to use strictly typed json objects using <code>serde_json::json!</code> instead of raw strings. It was rather painless thanks to vim :)</p>
581<p>Here’s a small sample of what had to be done (note the lines prefixed with the arrow):</p> 581<p>Here’s a small sample of what had to be done (note the lines prefixed with the arrow):</p>
582<div class="sourceCode" id="cb1"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a>→ <span class="kw">use</span> <span class="pp">serde_json::</span><span class="op">{</span>from_str<span class="op">};</span></span> 582<div class="sourceCode" id="cb1"><pre class="sourceCode rust"><code class="sourceCode rust"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a>→ <span class="kw">use</span> <span class="pp">serde_json::</span><span class="op">{</span>from_str<span class="op">};</span></span>
@@ -671,7 +671,7 @@ BUFFER: json!( ... );</code></pre>
671<guid>https://peppe.rs/posts/rapid_refactoring_with_vim/</guid> 671<guid>https://peppe.rs/posts/rapid_refactoring_with_vim/</guid>
672</item> 672</item>
673<item> 673<item>
674<title>font_size_fallacies</title> 674<title>Font Size Fallacies</title>
675<description><p>I am not an expert with fonts, but I do have some experience <a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, and common sense. This post aims to debunk some misconceptions about font sizes!</p> 675<description><p>I am not an expert with fonts, but I do have some experience <a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>, and common sense. This post aims to debunk some misconceptions about font sizes!</p>
676<p>11 px on your display is <em>probably not</em> 11 px on my display. Let’s do some quick math. I have two displays, 1366x768 @ 21" and another with 1920x1080 @ 13", call them <code>A</code> and <code>B</code> for now.</p> 676<p>11 px on your display is <em>probably not</em> 11 px on my display. Let’s do some quick math. I have two displays, 1366x768 @ 21" and another with 1920x1080 @ 13", call them <code>A</code> and <code>B</code> for now.</p>
677<p>Display <code>A</code> has 1,049,088 pixels. A pixel is a square, of side say, <code>s</code> cm. The total area covered by my 21" display is about 1,066 cm^2 (41x26). Thus,</p> 677<p>Display <code>A</code> has 1,049,088 pixels. A pixel is a square, of side say, <code>s</code> cm. The total area covered by my 21" display is about 1,066 cm^2 (41x26). Thus,</p>
@@ -707,7 +707,7 @@ Dimensions: 1920x1080 @ 13&quot; (29.5x16.5 sq. cm)
707<guid>https://peppe.rs/posts/font_size_fallacies/</guid> 707<guid>https://peppe.rs/posts/font_size_fallacies/</guid>
708</item> 708</item>
709<item> 709<item>
710<title>termux_tandem</title> 710<title>Termux Tandem</title>
711<description><p>I learnt about <code>termux</code> from a friend on IRC recently. It looked super gimmicky to me at first, but it eventually proved to be useful. Here’s what I use it for:</p> 711<description><p>I learnt about <code>termux</code> from a friend on IRC recently. It looked super gimmicky to me at first, but it eventually proved to be useful. Here’s what I use it for:</p>
712<h3 id="rsync">rsync</h3> 712<h3 id="rsync">rsync</h3>
713<p>Ever since I degoogled my android device, syncing files between my phone and my PC has always been a pain. I’m looking at you MTP. But, with <code>termux</code> and <code>sshd</code> all set up, it’s as simple as:</p> 713<p>Ever since I degoogled my android device, syncing files between my phone and my PC has always been a pain. I’m looking at you MTP. But, with <code>termux</code> and <code>sshd</code> all set up, it’s as simple as:</p>
@@ -731,7 +731,7 @@ mtZabXG.jpg p8d5c584f2841.jpg vjUxGjq.jpg</code></pre>
731<guid>https://peppe.rs/posts/termux_tandem/</guid> 731<guid>https://peppe.rs/posts/termux_tandem/</guid>
732</item> 732</item>
733<item> 733<item>
734<title>call_to_ARMs</title> 734<title>Call To ARMs</title>
735<description><p>My 4th semester involves ARM programming. And proprietary tooling (Keil C). But we don’t do that here.</p> 735<description><p>My 4th semester involves ARM programming. And proprietary tooling (Keil C). But we don’t do that here.</p>
736<h3 id="building">Building</h3> 736<h3 id="building">Building</h3>
737<p>Assembling and linking ARM binaries on non-ARM architecture devices is fairly trivial. I went along with the GNU cross bare metal toolchain binutils, which provides <code>arm-as</code> and <code>arm-ld</code> (among a bunch of other utils that I don’t care about for now).</p> 737<p>Assembling and linking ARM binaries on non-ARM architecture devices is fairly trivial. I went along with the GNU cross bare metal toolchain binutils, which provides <code>arm-as</code> and <code>arm-ld</code> (among a bunch of other utils that I don’t care about for now).</p>
@@ -768,7 +768,7 @@ Reading symbols from main... # yay!</code></pre>
768<guid>https://peppe.rs/posts/call_to_ARMs/</guid> 768<guid>https://peppe.rs/posts/call_to_ARMs/</guid>
769</item> 769</item>
770<item> 770<item>
771<title>color_conundrum</title> 771<title>Color Conundrum</title>
772<description><p>This piece aims to highlight (pun intended) some of the reasons behind my <a href="https://u.peppe.rs/bF.png">color free</a> editor setup.</p> 772<description><p>This piece aims to highlight (pun intended) some of the reasons behind my <a href="https://u.peppe.rs/bF.png">color free</a> editor setup.</p>
773<p>Imagine highlighting an entire book because <em>all</em> of it is important. That is exactly what (most) syntax highlighting does. It is difficult for the human eye to filter out noise in rainbow barf. Use color to draw attention, not diverge it.</p> 773<p>Imagine highlighting an entire book because <em>all</em> of it is important. That is exactly what (most) syntax highlighting does. It is difficult for the human eye to filter out noise in rainbow barf. Use color to draw attention, not diverge it.</p>
774<p>At the same time, a book devoid of color is <em>boring!</em> What is the takeaway from this 10 line paragraph? What are the technical terms used?</p> 774<p>At the same time, a book devoid of color is <em>boring!</em> What is the takeaway from this 10 line paragraph? What are the technical terms used?</p>
@@ -782,7 +782,7 @@ Reading symbols from main... # yay!</code></pre>
782<guid>https://peppe.rs/posts/color_conundrum/</guid> 782<guid>https://peppe.rs/posts/color_conundrum/</guid>
783</item> 783</item>
784<item> 784<item>
785<title>static_sites_with_bash</title> 785<title>Static Sites With Bash</title>
786<description><p>After going through a bunch of static site generators (<a href="https://blog.getpelican.com/">pelican</a>, <a href="https://gohugo.io">hugo</a>, <a href="https://github.com/icyphox/vite">vite</a>), I decided to roll my own. If you are more of the ‘show me the code’ kinda guy, <a href="https://github.com/nerdypepper/site">here</a> you go.</p> 786<description><p>After going through a bunch of static site generators (<a href="https://blog.getpelican.com/">pelican</a>, <a href="https://gohugo.io">hugo</a>, <a href="https://github.com/icyphox/vite">vite</a>), I decided to roll my own. If you are more of the ‘show me the code’ kinda guy, <a href="https://github.com/nerdypepper/site">here</a> you go.</p>
787<h3 id="text-formatting">Text formatting</h3> 787<h3 id="text-formatting">Text formatting</h3>
788<p>I chose to write in markdown, and convert to html with <a href="https://kristaps.bsd.lv/lowdown/">lowdown</a>.</p> 788<p>I chose to write in markdown, and convert to html with <a href="https://kristaps.bsd.lv/lowdown/">lowdown</a>.</p>
@@ -815,7 +815,7 @@ Reading symbols from main... # yay!</code></pre>
815<guid>https://peppe.rs/posts/static_sites_with_bash/</guid> 815<guid>https://peppe.rs/posts/static_sites_with_bash/</guid>
816</item> 816</item>
817<item> 817<item>
818<title>my_setup</title> 818<title>My Setup</title>
819<description><p>Decided to do one of these because everyone does one of these.</p> 819<description><p>Decided to do one of these because everyone does one of these.</p>
820<p><img src="https://u.peppe.rs/Hb.png" /></p> 820<p><img src="https://u.peppe.rs/Hb.png" /></p>
821<p>My entire setup is managed with GNU <code>stow</code>, making it easier to replicate on fresh installations. You can find my configuration files on <a href="https://github.com/nerdypepper">GitHub</a>.</p> 821<p>My entire setup is managed with GNU <code>stow</code>, making it easier to replicate on fresh installations. You can find my configuration files on <a href="https://github.com/nerdypepper">GitHub</a>.</p>
@@ -827,7 +827,7 @@ Reading symbols from main... # yay!</code></pre>
827<guid>https://peppe.rs/posts/my_setup/</guid> 827<guid>https://peppe.rs/posts/my_setup/</guid>
828</item> 828</item>
829<item> 829<item>
830<title>WPA_woes</title> 830<title>WPA Woes</title>
831<description><p>I finally got around to installing Void GNU/Linux on my main computer. Rolling release, non-systemd, need I say more?</p> 831<description><p>I finally got around to installing Void GNU/Linux on my main computer. Rolling release, non-systemd, need I say more?</p>
832<p>As with all GNU/Linux distributions, wireless networks had me in a fix. If you can see this post, it means I’ve managed to get online. It turns out, <code>wpa_supplicant</code> was detecting the wrong interface by default (does it ever select the right one?). Let us fix that:</p> 832<p>As with all GNU/Linux distributions, wireless networks had me in a fix. If you can see this post, it means I’ve managed to get online. It turns out, <code>wpa_supplicant</code> was detecting the wrong interface by default (does it ever select the right one?). Let us fix that:</p>
833<pre><code>$ sudo rm -r /var/service/wpa_supplicant 833<pre><code>$ sudo rm -r /var/service/wpa_supplicant
@@ -857,7 +857,7 @@ $ sudo sv restart dhcpcd</code></pre></description>
857<guid>https://peppe.rs/posts/WPA_woes/</guid> 857<guid>https://peppe.rs/posts/WPA_woes/</guid>
858</item> 858</item>
859<item> 859<item>
860<title>bye_bye_BDFs</title> 860<title>Bye Bye BDFs</title>
861<description><p>Glyph Bitmap Distribution Format is no more, as the creators of <a href="https://pango.org">Pango</a>, one of the most widely used text rendering libraries, <a href="https://blogs.gnome.org/mclasen/2019/05/25/pango-future-directions/">announced</a> their plans for Pango 1.44.</p> 861<description><p>Glyph Bitmap Distribution Format is no more, as the creators of <a href="https://pango.org">Pango</a>, one of the most widely used text rendering libraries, <a href="https://blogs.gnome.org/mclasen/2019/05/25/pango-future-directions/">announced</a> their plans for Pango 1.44.</p>
862<p>Until recently, Pango used FreeType to draw fonts. They will be moving over to <a href="https://harfbuzz.org">Harfbuzz</a>, an evolution of FreeType.</p> 862<p>Until recently, Pango used FreeType to draw fonts. They will be moving over to <a href="https://harfbuzz.org">Harfbuzz</a>, an evolution of FreeType.</p>
863<p><em>Why?</em></p> 863<p><em>Why?</em></p>
@@ -869,7 +869,7 @@ $ sudo sv restart dhcpcd</code></pre></description>
869<guid>https://peppe.rs/posts/bye_bye_BDFs/</guid> 869<guid>https://peppe.rs/posts/bye_bye_BDFs/</guid>
870</item> 870</item>
871<item> 871<item>
872<title>onivim_sucks</title> 872<title>Onivim Sucks</title>
873<description><p><a href="https://v2.onivim.io">Onivim</a> is a ‘modern modal editor’, combining fancy interface and language features with vim-style modal editing. What’s wrong you ask?</p> 873<description><p><a href="https://v2.onivim.io">Onivim</a> is a ‘modern modal editor’, combining fancy interface and language features with vim-style modal editing. What’s wrong you ask?</p>
874<p>Apart from <a href="https://github.com/onivim/oni2/issues/550">buggy syntax highlighting</a>, <a href="https://github.com/onivim/oni2/issues/519">broken scrolling</a> and <a href="https://github.com/onivim/oni2/issues?q=is%3Aissue+label%3A%22daily+editor+blocker%22+is%3Aopen">others</a>, Onivim is <strong>proprietary</strong> software. It is licensed under a commercial <a href="https://github.com/onivim/oni1/blob/master/Outrun-Labs-EULA-v1.1.md">end user agreement license</a>, which prohibits redistribution in both object code and source code formats.</p> 874<p>Apart from <a href="https://github.com/onivim/oni2/issues/550">buggy syntax highlighting</a>, <a href="https://github.com/onivim/oni2/issues/519">broken scrolling</a> and <a href="https://github.com/onivim/oni2/issues?q=is%3Aissue+label%3A%22daily+editor+blocker%22+is%3Aopen">others</a>, Onivim is <strong>proprietary</strong> software. It is licensed under a commercial <a href="https://github.com/onivim/oni1/blob/master/Outrun-Labs-EULA-v1.1.md">end user agreement license</a>, which prohibits redistribution in both object code and source code formats.</p>
875<p>Onivim’s core editor logic (bits that belong to vim), have been separated from the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is licensed under MIT, which means, this ‘extension’ of vim is perfectly in adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim’s license text</a>! Outrun Labs are exploiting this loophole (distributing vim as a library) to commercialize Onivim.</p> 875<p>Onivim’s core editor logic (bits that belong to vim), have been separated from the interface, into <a href="https://github.com/onivim/libvim">libvim</a>. libvim is licensed under MIT, which means, this ‘extension’ of vim is perfectly in adherence to <a href="http://vimdoc.sourceforge.net/htmldoc/uganda.html#license">vim’s license text</a>! Outrun Labs are exploiting this loophole (distributing vim as a library) to commercialize Onivim.</p>
@@ -880,7 +880,7 @@ $ sudo sv restart dhcpcd</code></pre></description>
880<guid>https://peppe.rs/posts/onivim_sucks/</guid> 880<guid>https://peppe.rs/posts/onivim_sucks/</guid>
881</item> 881</item>
882<item> 882<item>
883<title>bash_harder_with_vim</title> 883<title>Bash Harder With Vim</title>
884<description><p>Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat additions you could make to your <code>vimrc</code> for a better shell programming experience.</p> 884<description><p>Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat additions you could make to your <code>vimrc</code> for a better shell programming experience.</p>
885<h3 id="man-pages-inside-vim">Man pages inside vim</h3> 885<h3 id="man-pages-inside-vim">Man pages inside vim</h3>
886<p>Source this script to get started:</p> 886<p>Source this script to get started:</p>
@@ -920,7 +920,7 @@ Press ENTER or type command to continue</code></pre></description>
920<guid>https://peppe.rs/posts/bash_harder_with_vim/</guid> 920<guid>https://peppe.rs/posts/bash_harder_with_vim/</guid>
921</item> 921</item>
922<item> 922<item>
923<title>hold_position!</title> 923<title>Hold Position!</title>
924<description><p>Often times, when I run a vim command that makes “big” changes to a file (a macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> 924<description><p>Often times, when I run a vim command that makes “big” changes to a file (a macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p>
925<p><em>Save position with <code>winsaveview()</code>!</em></p> 925<p><em>Save position with <code>winsaveview()</code>!</em></p>
926<p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information about the view of the current window. This includes the cursor line number, cursor coloumn, the top most line in the window and a couple of other values, none of which concern us.</p> 926<p>The <code>winsaveview()</code> command returns a <code>Dictionary</code> that contains information about the view of the current window. This includes the cursor line number, cursor coloumn, the top most line in the window and a couple of other values, none of which concern us.</p>
@@ -934,7 +934,7 @@ winrestview(view) &quot; restore our original view!</code></pre>
934<guid>https://peppe.rs/posts/hold_position!/</guid> 934<guid>https://peppe.rs/posts/hold_position!/</guid>
935</item> 935</item>
936<item> 936<item>
937<title>get_better_at_yanking_and_putting_in_vim</title> 937<title>Get Better At Yanking And Putting In Vim</title>
938<description><p>a couple of nifty tricks to help you copy-paste better:</p> 938<description><p>a couple of nifty tricks to help you copy-paste better:</p>
939<ol type="1"> 939<ol type="1">
940<li><p>reselecting previously selected text (i use this to fix botched selections):</p> 940<li><p>reselecting previously selected text (i use this to fix botched selections):</p>