mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-30 22:57:59 +00:00
Update notebook as of 2021-10-09
Welp, I rarely take notes nowadays due to more specialized work and stuff. Though, I should have more incentives for writing. In other words, I'm just lazy. ;p More free-thinking morning sessions should be done soon.
This commit is contained in:
parent
ed1c78669e
commit
732ef34ca8
@ -3,12 +3,14 @@
|
||||
:END:
|
||||
#+title: Functional package management
|
||||
#+date: "2020-09-19 08:31:48 +08:00"
|
||||
#+date_modified: "2021-06-05 20:35:30 +08:00"
|
||||
#+date_modified: "2021-09-08 02:42:50 +08:00"
|
||||
#+language: en
|
||||
|
||||
|
||||
Functional package management (FPM) is the next step forward [[https://edolstra.github.io/pubs/nixos-icfp2008-final.pdf][pioneered by Eelco Dolstra]] with [[id:3b3fdcbf-eb40-4c89-81f3-9d937a0be53c][Nix package manager]] as the living implementation. [fn:: Eventually, it became the inspiration for other projects that focuses on reproducibility and security such as [[https://guix.gnu.org/][GNU Guix]] and [[https://silverblue.fedoraproject.org/][Fedora Silverblue]].]
|
||||
|
||||
It was first realized from the thesis "[[id:f2e1e2f3-cc34-4c76-91d4-2706ce7756d2][The Purely Functional Software Deployment Model]]".
|
||||
|
||||
The conceptual overview of it is similar to [[id:7e1e2bcc-6f70-4624-a049-b42f9db5e28b][Functional programming]] with how it views with data and functions (in this case, packages and build processes).
|
||||
It views that packages are a unique result from combining different things: dependencies, build processes, versions, and more.
|
||||
If a dependency has updated its patch version or a build instruction has revised with one line of change, it will result in a "new" package as the output even if the package isn't any different.
|
||||
|
@ -3,5 +3,29 @@
|
||||
:END:
|
||||
#+title: Free software
|
||||
#+date: 2021-07-22 14:25:13 +08:00
|
||||
#+date_modified: 2021-07-22 14:25:17 +08:00
|
||||
#+date_modified: 2021-08-29 01:08:22 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
Per [[roam:Free Software Foundation]]:
|
||||
|
||||
#+begin_quote
|
||||
Free software means that the users have the freedom to run, edit, contribute to, and share the software.
|
||||
#+end_quote
|
||||
|
||||
- a software that is primarily concerned with the liberty of the user regards to the software;
|
||||
thus, a dedicated user can influence the project working in the same realm as the team
|
||||
- one of the major components for [[roam:Free culture]] movement
|
||||
- "free as in free speech, not as in beer" is a popular phrase to describe the idea;
|
||||
thus, also applying that free software doesn't have to be free in price but it should still support the idea of openness with software
|
||||
- despite the moniker, several companies have been making profits from free software
|
||||
+ [[roam:Red Hat]] is one of the biggest for-profit companies from selling support for Linux-based ecosystems
|
||||
+ Sony made the operating systems for PS3, PS4, and PS5 from roam:FreeBSD
|
||||
+ roam:Microsoft has been making free software (e.g., [[roam:Visual Studio Code]], roam:TypeScript)
|
||||
- practically, a lot of the free software applications are created and maintained by volunteers in their spare time
|
||||
- furthermore, a lot of them are user-centric (e.g., roam:GNUnet, [[id:be917383-84c4-4bf5-9ca0-b04bfb778f4f][Guix package manager]]) usually catering to power users and tinkerers with options for advanced configurations
|
||||
- due to their open nature, it often represents how [[id:d73e539c-5bf5-4853-99bb-ac95dd52fbc3][Openness makes diversity]] with the options to create forks of the software
|
||||
- most of them are also interested in compatibility as opposed to creating ecosystem from scratch;
|
||||
it is likely motivated from just pragmatism
|
||||
+ roam:Inkscape offers importing from formats from its competitors such a Adobe Illustrator AI format
|
||||
+ roam:LibreOffice can open several versions of Microsoft Word documents [fn:: To be fair, =DOC= format is an open standard at this point.] and AppleWorks documents
|
||||
|
@ -3,12 +3,13 @@
|
||||
:END:
|
||||
#+title: Restrictions bring out creativity
|
||||
#+date: 2021-08-07 14:14:23 +08:00
|
||||
#+date_modified: 2021-08-07 14:14:28 +08:00
|
||||
#+date_modified: 2021-09-16 11:17:44 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
- with practically limitless resources at your side, you may get into choosing how to implement such things;
|
||||
you can get into thinking too much as [[id:03cd9fad-e187-4939-9347-1a034c6efbe2][Overanalyzing slow you down]]
|
||||
you can get into thinking too much as [[id:03cd9fad-e187-4939-9347-1a034c6efbe2][Overanalyzing slow you down]] if you think about the best solution possible
|
||||
- the path of least resistance usually brings the least creative solutions
|
||||
- furthermore, restrictions forces you to create systems that fit with the requirements;
|
||||
that can also lead to accidental discoveries, finding paths that you haven't thought of before
|
||||
- examples:
|
||||
|
23
notebook/2021-08-28-23-55-24.org
Normal file
23
notebook/2021-08-28-23-55-24.org
Normal file
@ -0,0 +1,23 @@
|
||||
:PROPERTIES:
|
||||
:ID: d73e539c-5bf5-4853-99bb-ac95dd52fbc3
|
||||
:END:
|
||||
#+title: Openness makes diversity
|
||||
#+date: 2021-08-28 23:55:24 +08:00
|
||||
#+date_modified: 2021-08-29 01:02:47 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
- from the nature of openness, there tends to be more options that offer the same thing
|
||||
- at times, it also causes diversity by people who disagrees with the standard or wants to take it in a different direction
|
||||
- it is good especially it lets other projects to stand on their vision;
|
||||
[[id:9a9163d7-502b-4540-b723-e15afba1e917][Tradeoffs lock yourself in a position]]
|
||||
- as one or two progresses, it turns into a cooperative competition
|
||||
- examples
|
||||
+ Linux distros and [[id:c64836f4-19db-4da7-8532-4ebacf6c1ed1][How Linux distributions are technically their own operating system]] with their subtle (or major) differences to others
|
||||
+ [[id:3b3fdcbf-eb40-4c89-81f3-9d937a0be53c][Nix package manager]] pioneered functional package management;
|
||||
then [[id:be917383-84c4-4bf5-9ca0-b04bfb778f4f][Guix package manager]] took it in a different direction with a stronger focus on [[id:fe9e21bc-3b38-4d0f-a785-253248a38ed7][Reproducible builds]] and roam:Bootstrapping
|
||||
+ in terms of desktop landscape in Linux, both GNOME and KDE creates friendly competition to progress desktop standards;
|
||||
this rings true especially both are contributing to the Freedesktop repository to create more standards for the desktop
|
||||
+ bits 128-255 that ASCII leave made a competition for other standards such as OEM by IBM-PC for graphical characters or simply used for non-English alphabets
|
||||
+ the major members of the BSD family (i.e., NetBSD, FreeBSD, and OpenBSD) all have different priorities;
|
||||
NetBSD focuses on compatibility, FreeBSD is on minimal system with the adequate amount of support, and OpenBSD in security
|
26
notebook/2021-09-16-11-18-31.org
Normal file
26
notebook/2021-09-16-11-18-31.org
Normal file
@ -0,0 +1,26 @@
|
||||
:PROPERTIES:
|
||||
:ID: 69ec18ec-ae88-4cb8-bf03-299bc5d8a2a5
|
||||
:END:
|
||||
#+title: Simple tools make better workflows
|
||||
#+date: 2021-09-16 11:18:31 +08:00
|
||||
#+date_modified: 2021-09-16 13:00:06 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
Simpler tools are often limited in scope compared to complex tools.
|
||||
[[id:e44f6bd7-fd73-436a-965a-66e06f8174ab][Restrictions bring out creativity]] by forcing you to create compromises and [[id:9a9163d7-502b-4540-b723-e15afba1e917][Tradeoffs lock yourself in a position]].
|
||||
Even from trending topics, there are people who are already creating extraordinary results with simpler tools.
|
||||
|
||||
- Luhmann, the man who popularized the [[id:4259636e-e0e8-49e4-8210-758ec59728a3][Zettelkasten]] method, by using a physical drawer of notes.
|
||||
With the limited physical space of the paper and the amount of information he often interacts with, he has to create a system that can easily refer to various papers.
|
||||
Compare this to modern workflows such as [[id:24b5e144-dda4-482c-9684-958a00d6c986][Roam Research]], roam:org-roam, and roam:Dendron.
|
||||
|
||||
- Text editors with terminal versus kitchen-sink IDEs.
|
||||
However, with the advent of protocols that enable IDE-like features, the line between them is getting blurry.
|
||||
|
||||
- The core of the [[https://suckless.org/philosophy/][Suckless philosophy]] by removing all of the cruft and removing as much needless features as possible to maintain quality.
|
||||
|
||||
Practically, it all comes to their [[id:88f2256a-3359-4d10-92a3-9273cabce414][Personal information management]] skills.
|
||||
It all depends on their use cases and if the tool is suitable to their workflow.
|
||||
People can make simpler tools integrate with complex setups and complex tools can make their workflow simpler.
|
||||
Furthermore, there are [[id:855fa6b6-bdb4-4d09-b6d4-c9b95e69642c][Problems with simpler tools]] that often comes with preferring this type of tools.
|
25
notebook/2021-09-16-11-45-21.org
Normal file
25
notebook/2021-09-16-11-45-21.org
Normal file
@ -0,0 +1,25 @@
|
||||
:PROPERTIES:
|
||||
:ID: 855fa6b6-bdb4-4d09-b6d4-c9b95e69642c
|
||||
:END:
|
||||
#+title: Problems with simpler tools
|
||||
#+date: 2021-09-16 11:45:21 +08:00
|
||||
#+date_modified: 2021-09-16 13:11:29 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
While [[id:69ec18ec-ae88-4cb8-bf03-299bc5d8a2a5][Simple tools make better workflows]], it can have problems too.
|
||||
|
||||
- The scope of simpler tools often results in doing the same task with multiple tools compared to less simpler tools.
|
||||
This is a sign of the process being too small or atomic.
|
||||
In this case, [[roam:All-in-one tools make good explorations]] to look how other tools does it while adding the necessary parts preventing from being too simple.
|
||||
|
||||
- Consequently, with the plethora of simple tools working together, incidental complexity will arise with the quirks of the tools starting to appear.
|
||||
Complexity is inevitable even in simpler tools.
|
||||
|
||||
- Simple tools can be deceiving.
|
||||
C (the programming language), for example, is very simple but hides undefined behaviors.
|
||||
This often comes from the consequence of focusing being smaller in scope while being used for bigger use cases.
|
||||
This is where complex tools often wins by considering more problems to solve than its simpler counterparts.
|
||||
|
||||
- With the limited scope, simple tools don't often have good out-of-the-box experience compared to complex tools — e.g., lack of tutorials.
|
||||
Though, this depends on the audience and the intended scope — e.g., maybe they [[id:9a11ef31-b2a7-43a9-a7a9-48f191838c6e][Prefer referencing over remembering]], too technical to make it streamlined for general use cases, targeted for expert users.
|
@ -3,7 +3,7 @@
|
||||
:END:
|
||||
#+title: Command line: journalctl
|
||||
#+date: "2021-05-20 23:07:39 +08:00"
|
||||
#+date_modified: "2021-08-07 20:17:29 +08:00"
|
||||
#+date_modified: "2021-09-01 22:39:16 +08:00"
|
||||
#+language: en
|
||||
#+property: header-args :results none
|
||||
|
||||
@ -18,13 +18,15 @@ For more information, see =journalctl.1= manual page.
|
||||
|
||||
* Options
|
||||
|
||||
- =-b, --boot= - show the logs starting from boot time
|
||||
- =-e, --pager-end= - go to the end of the logs
|
||||
- =-f, --follow= - watch the logs
|
||||
- =--user-unit= - show logs from a user unit
|
||||
- =-u, --unit [UNIT]= - show the logs of a system unit
|
||||
- =--vacuum-time [TIMESPAN]= - delete logs older than the specified timespan [fn:: View =systemd.time.5= for more information.]
|
||||
- =-x, --catalog= - prints helpful messages such as the documentation URIs
|
||||
- =-b, --boot [ID][+OFFSET]= shows the logs starting from given boot time (or current boot if empty).
|
||||
- =-e, --pager-end= to go to the end of the logs.
|
||||
- =-f, --follow= watches the logs.
|
||||
- =-k, --dmesg= prints the logs from the kernel.
|
||||
- =--list-boots= prints a list of boots useful for knowing the boot logs from =-b=.
|
||||
- =--user-unit= shows logs from a user unit.
|
||||
- =-u, --unit [UNIT]= shows the logs of a system unit.
|
||||
- =--vacuum-time [TIMESPAN]= deletes logs older than the specified timespan [fn:: View =systemd.time.5= for more information.].
|
||||
- =-x, --catalog= prints helpful messages such as the documentation URIs.
|
||||
|
||||
|
||||
|
||||
@ -54,3 +56,10 @@ journalctl --vacuum-time=1m
|
||||
#+begin_src
|
||||
journalctl -xe
|
||||
#+end_src
|
||||
|
||||
|
||||
** Get the logs of a service unit from 2 boots ago
|
||||
|
||||
#+begin_src
|
||||
journalctl --boot -2 --user-unit borgbackup@personal-drive.service
|
||||
#+end_src
|
||||
|
@ -3,7 +3,7 @@
|
||||
:END:
|
||||
#+title: Command line: pacman
|
||||
#+date: "2021-06-08 15:00:04 +08:00"
|
||||
#+date_modified: "2021-07-19 23:49:40 +08:00"
|
||||
#+date_modified: "2021-10-09 18:12:07 +08:00"
|
||||
#+language: en
|
||||
#+property: header_args :eval no
|
||||
|
||||
@ -28,10 +28,17 @@ pacman -S podman
|
||||
Here's what you can do with the package manager:
|
||||
|
||||
- =-S= are concerned with syncing the local database to the remote databases.
|
||||
- =-y= syncs the local database to the remote database; running with this flag alone is not recommended as the package manager will have problems.
|
||||
- =-u= upgrades the local database; this should be used with =-y= if you intend it for a proper operating system upgrade.
|
||||
- =-Q= is primarily from querying information from your installed packages ranging from listing installed packages to listing all of the files owned by a certain package.
|
||||
- =-l, --list= lists the files associated with the package.
|
||||
- =-i, --info= prints information about the package.
|
||||
- =-F= are mostly query-related operations with the database.
|
||||
- =-R= removes installed packages.
|
||||
- =-n, --nosave= removes the configuration files associated with the package; this doesn't remove files from the home directory, though.
|
||||
- =-s, --recursive= will recursively removes dependencies that are not used anywhere else.
|
||||
|
||||
You can see more of them in the Operations section of the manual page (i.e., =pacman.1=).
|
||||
You can see more of them in the "Operations" section of the manual page (i.e., =pacman.1=).
|
||||
|
||||
|
||||
|
||||
@ -80,3 +87,12 @@ pacman -S --list --quiet \
|
||||
| fzf --multi --prompt "Install package(s) > " \
|
||||
| xargs doas pacman -S --noconfirm
|
||||
#+end_src
|
||||
|
||||
|
||||
** Package removal selection
|
||||
|
||||
Another interactive script with [[id:4eb1f8b1-bc12-4a6c-8fa4-20e4c3542cf2][fzf]].
|
||||
|
||||
#+begin_src bash
|
||||
pacman -Q --native --quiet | fzf --multi --prompt "Remove installed package(s) > " | xargs doas pacman -Rns --noconfirm
|
||||
#+end_src
|
||||
|
@ -3,7 +3,7 @@
|
||||
:END:
|
||||
#+title: GitHub Actions
|
||||
#+date: "2021-06-20 18:58:48 +08:00"
|
||||
#+date_modified: "2021-07-19 00:06:57 +08:00"
|
||||
#+date_modified: "2021-09-24 22:19:21 +08:00"
|
||||
#+language: en
|
||||
|
||||
|
||||
@ -24,6 +24,16 @@
|
||||
|
||||
|
||||
|
||||
* Ecosystem
|
||||
|
||||
- the workflow allows you to create build artifacts;
|
||||
you have fine-grained control such as letting you [[https://github.com/marketplace/actions/upload-a-build-artifact][upload certain files to be artifacts]] and [[https://github.com/marketplace/actions/download-a-build-artifact][downloading them]] after a workflow run;
|
||||
it also enables sharing of data between jobs
|
||||
- it can make automated releases
|
||||
|
||||
|
||||
|
||||
|
||||
* Examples
|
||||
|
||||
With GitHub Actions being a massive ecosystem of integrations as of 2021-07-05, we have to find some examples in the worldwide community repos from there.
|
||||
|
20
notebook/data.format.duckduckgo-bangs.org
Normal file
20
notebook/data.format.duckduckgo-bangs.org
Normal file
@ -0,0 +1,20 @@
|
||||
:PROPERTIES:
|
||||
:ID: 26309bec-d32a-4ab4-9664-5b6a4852df41
|
||||
:END:
|
||||
#+title: Duckduckgo bangs data
|
||||
#+date: 2021-09-10 01:54:21 +08:00
|
||||
#+date_modified: 2021-09-10 14:45:03 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
- DDG keeps their bangs in a file =/bang.v${VERSION}.js= (e.g., =/bang.v260.js=, =/bang.v245.js=)
|
||||
- despite the file extension, it is a JSON file
|
||||
- conveniently versioned though older versions are missing
|
||||
- though, you can the latest version through =/bang.js=
|
||||
- slightly not readable at first glance but by taking multiple examples, we can get a pattern
|
||||
+ =d= is the domain
|
||||
+ =c= is the category
|
||||
+ =u= is the template and the URL that we sorely need
|
||||
+ =t= is the trigger word, aka the thing we need to search (e.g., =!w= will have =t: "w"=)
|
||||
+ =a= is a list of aliases
|
||||
+ =sc= is subcategory
|
@ -3,7 +3,7 @@
|
||||
:END:
|
||||
#+title: Software archives
|
||||
#+date: 2021-07-25 19:20:39 +08:00
|
||||
#+date_modified: 2021-07-27 17:31:16 +08:00
|
||||
#+date_modified: 2021-10-09 17:56:31 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
@ -22,3 +22,5 @@
|
||||
|
||||
- roam:F-Droid has an archive for its compiled apps.
|
||||
From [[https://mastodon.technology/@fdroidorg/106635571616898675][one of their comments]], it is sitting at ~390GB as of 2021-07-25.
|
||||
|
||||
- [[https://fosstorrents.com/][FOSS Torrents]] is a torrent repository of precompiled software projects.
|
||||
|
18
notebook/literature.HowDrawAnything2008.org
Normal file
18
notebook/literature.HowDrawAnything2008.org
Normal file
@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: 0c00ac45-109a-499e-b521-01eaef2b03b4
|
||||
:END:
|
||||
#+title: How To Draw Anything
|
||||
#+date: 2021-09-19 20:54:51 +08:00
|
||||
#+date_modified: 2021-09-19 23:23:12 +08:00
|
||||
#+published: 2008-01-16
|
||||
#+author:
|
||||
#+source: https://www.youtube.com/watch?v=p9TFLQq1Uh4
|
||||
#+language: en
|
||||
|
||||
|
||||
- "to draw" means "to pull";
|
||||
pulling the images into lines, gradually improving the image
|
||||
- even the masters of art struggles conjuring an image first try;
|
||||
this is where sketching comes in handy
|
||||
- sketching is the ability to quickly pull the image
|
||||
- the drawing process consists of creating loose lines, slowly improving the lines, then finalizing the image when you're done
|
@ -3,7 +3,7 @@
|
||||
:END:
|
||||
#+title: Nix flakes
|
||||
#+date: 2021-07-18 22:34:11 +08:00
|
||||
#+date_modified: 2021-07-18 22:34:11 +08:00
|
||||
#+date_modified: 2021-09-14 18:39:43 +08:00
|
||||
#+language: en
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ As of 2021-06-30, the version used for this note is at v2.3 so it needs to be in
|
||||
- similar to [[https://guix.gnu.org/manual/en/html_node/Channels.html][Guix channels]]
|
||||
- a collection of packages and functions while making it easy to configure Nix declaratively
|
||||
- replaces the traditional Nix channels since fully reproducing an environment with Nix requires special care in practice;
|
||||
it isn't fully reproducible in practice such as the inclusion of Nix paths embedded in environment variables and access to arbitrary files;
|
||||
plus, there's no standard way of composing projects with Nix
|
||||
- as of 2021-06-30, this is on the unstable version of the Nix package manager and needs some additional configuration
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user