diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-11-14 12:15:17 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-11-14 12:15:17 +0700 |
commit | f0f838c13f4a552dca7b5dbaca066a382c1145f8 (patch) | |
tree | e9c5ceb32aea9035c535e9dcb336066b19d6a6cd /blog/threa.md | |
parent | 6add857c033e6f836257f2b6bc659ec23b1cf74a (diff) | |
download | site-f0f838c13f4a552dca7b5dbaca066a382c1145f8.tar.gz |
Update Franklin
Diffstat (limited to 'blog/threa.md')
-rw-r--r-- | blog/threa.md | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/blog/threa.md b/blog/threa.md index 11fc051..cbcc621 100644 --- a/blog/threa.md +++ b/blog/threa.md @@ -8,8 +8,8 @@ date = Date(2021, 7, 3) !!! note "A word of protest:" - This was intended to be presented in [The Raku Conference][], - however the organizers insisted on using [Zoom][] and [Skype][], + This was intended to be presented in [The Raku Conference], + however the organizers insisted on using [Zoom] and [Skype], which are privacy invasive platforms running on proprietary software and shadily managed. @@ -30,16 +30,16 @@ For the first point, I have to be able to choose from the history by pressing a few keystrokes. Having to touch the mouse during writing sessions is unacceptable. The menu dropping down from the systray is also undesirable because I have a multi-monitor setup. This narrows down -to only one plausible option: [Diodon][], which I having been using on Debian +to only one plausible option: [Diodon], which I having been using on Debian for at least two years. However, as I was migrating to NixOS earlier last month, [I was unable to package it for Nix][126190]. -Naturally, I went looking for [alternatives][], most of which I had -tried before and did not satisfy my requirements. [clipmenu][] got +Naturally, I went looking for [alternatives], most of which I had +tried before and did not satisfy my requirements. [clipmenu] got my attention however: it was made to work with dmenu(-compliant launchers), -which I had a rather nice experience with in [Sxmo][] on my [PinePhone][]. -However, I use [awesome][] on my workstation and its widget toolkit covers -my launcher and menu need perfectly. I don't need [dmenu][] and do not +which I had a rather nice experience with in [Sxmo] on my [PinePhone]. +However, I use [awesome] on my workstation and its widget toolkit covers +my launcher and menu need perfectly. I don't need [dmenu] and do not wish to spend time configuring and theming it. Plus, the architecture of dmenu scripts and awesome widgets vastly differs: while awesome executes the input programs, dmenu is called from the scripts. @@ -56,7 +56,7 @@ fluent in.[^1] Its idea is brilliant however: > it writes them out to the cache directory > and an index using a hash as the filename. -I later translated [clipnotify][] to [Zig][][^2] and called it [clipbuzz][].[^3] +I later translated [clipnotify] to [Zig][^2] and called it [clipbuzz].[^3] From clipbuzz's usage, ```sh @@ -89,8 +89,8 @@ K U ``` -Wait, is that a sign? We must use [Raku][] to implement `$project` then… -Speaking of `$project`, I planned to use it with awesome and [vicious][] +Wait, is that a sign? We must use [Raku] to implement `$project` then… +Speaking of `$project`, I planned to use it with awesome and [vicious] so let's call it something brutal, like a *cutting board*, which is *thớt* in Vietnamese, an Internet slang for *thread*. Cool, now we have the daemon name, and conventionally the client shall be *threac*, @@ -112,7 +112,7 @@ while run 'clipbuzz' { } ``` -Out of all languages I know, this is by far the simplest way to [run][] +Out of all languages I know, this is by far the simplest way to [run] an external program. Most would require one to import something or do something with the call's return value, and don't even get me start on POSIX *fork* and *exec* model. @@ -125,7 +125,7 @@ my $selection = qx/xclip -out/; ``` Remember when I said Raku can seamlessly interact with external programs? -[qx][] is how you capture their standard output, it is really that simple. +[qx] is how you capture their standard output, it is really that simple. But wait, which selection is that? No worries, `xclip` supports both primary and clipboard: @@ -198,8 +198,8 @@ but opening parenthesis *after* the function name always confuses me, especially when nested. As you might have guessed, `given` is another statement modifier -setting the [topic variable][] that is particularly useful -in [pointfree programming][], where regular expressions (e.g. `/^\w\w+$/`) +setting the [topic variable] that is particularly useful +in [pointfree programming], where regular expressions (e.g. `/^\w\w+$/`) are matched against directly and methods are called without specifying the object. Raku is also a weakly-typed language: `.comb.unique` (a list of unique characters) is coerced into an integer when compared to one @@ -339,8 +339,8 @@ awful.menu{items = items, theme = {width = 911}}:show() ## Conclusion -Through writing the clipboard manager [threa][], which is released -under [GNU GPLv3+][] on [SourceHut][], we have discovered a few features +Through writing the clipboard manager [threa], which is released +under [GNU GPLv3+] on [SourceHut], we have discovered a few features of Raku that make it a great *scripting* language: * Out-of-box CLI support: |