Prelude
Colorless green ideas sleep furiously,Furiously sleep ideas green colorless. — Chomsky
关于思想的流通,有一种|风格的描述,或者可以这样表述出来:
从生活中不成形的语料开始收集原料与催化剂,脑海中的思想作为某种工厂式的措施开始对其进行初步处理,也就是筛选并分离作为原型前体的各组分,这就是所谓的 Prelude 阶段。姑且称之为预处理,这个过程包含了许多工具的协作,关于编辑器、文本搜索与批处理、搜索引擎与搜索引擎的再生产,最终的结果是一批预兆着最终产物的思想原料。
接下来是 Editor 的阶段。
Emacs,Vim,Pandoc and find.
- Emacs: EMACS Makes A Computer Slow.
- Vim: Vi IMproved.
- Pandoc: "a universal document converter"
- find: "search for files in a directory hierarchy"
.emacs.d or $XDG_CONFIG_HOME/emacs
Create a new init.el in the ~/.emacs.d directory and start emacs:
emacsbuild and install /igc branch/
master
./configure --prefix=$HOME/.local --with-native-compilation=aot --with-sound=yes --with-pgtkigc
git clone --depth=1 https://github.com/Ravenbrook/mps
cd mps/code && clang -O2 -c mps.c && make -f lii6ll.gmk && make install DESTDIR=/home/iris/.local/lib/mps/
git clone -b feature/igc --depth=1 'https://github.com/emacs-mirror/emacs.git' emacs-igc
CC=clang CXX=clang++ CPP="clang -E" LD=ld.lld ./configure --prefix=$HOME/.local --with-pgtk --with-native-compilation=aot --with-mps=yes --with-modules --with-sound=alsaconfigure
seagle0128/CentaurEmacs => ningxilai/IndigoEmacs
fonts
git clone --depth=1 https://github.com/ryanoasis/nerd-fonts ~/.local/share/fontsC-h v system-configuration-options => "--prefix=/home/iris/.local --with-native-compilation=aot --with-sound=yes --with-pgtk --with-mps=yes"
treesit
Manual installation of libtree-sitter-[languages].so support.
using typst as an example
git clone --depth 1 https://github.com/uben0/tree-sitter-typst
cd tree-sitter-typst/src
cc -fPIC -std=c99 -c parser.c
cc -fPIC -std=c99 -c scanner.c
cc -shared parser.o scanner.o -o libtree-sitter-typst.so
# to emacs
mkdir tree-sitter && cd tree-sitter
mv libtree-sitter-typst ./Programming \deprecated\
Code snippet,about Haskell and Julia:
Haskell
(use-package haskell-mode
:ensure t
:hook
(haskell-mode . interactive-haskell-mode)
(haskell-mode . haskell-indentation-mode))
(use-package lsp-haskell
:ensure t
:after haskell-mode
:hook
(haskell-mode . lsp-mode)
(haskell-literate-mode . lsp-mode))Julia
curl -fsSL https://install.julialang.org | sh
;;julia-snail
(use-package julia-snail
:ensure t
:config (setq julia-snail-executable "~/.juliaup/bin/"))LunarVim
Have
git,make,pip,python,npm,node,cargoandripgrepinstalled on your system.
Optional :lazygit
## Cargo
cargo install --git https://github.com/sharkdp/fd
cargo install ripgrep
## Pacman
sudo pacman -S nodejs tree-sitter-cli
## Install
git clone --depth=1 https://github.com/lunarvim/lunarvim.git ~/.local/share/lunarvim/lvim
cd ~/.local/share/lunarvim/lvim/
sh utils/installer/install.shIf in the Termux environment:
The shebang of lvim : #!/usr/bin/env sh => #!/data/data/com.termux/files/usr/bin/env zsh
Pandoc,md,html and find.
Pandoc转化.md到html后序列化残留的问题,可以使用pandoc -f html URL -t commonmark-raw_html -o name.md的方法解决,对于代码块标记导出后被覆盖的问题,可用find -type f -name "*.md" | xargs sed 's#sourceCode#bash#g' -i替换。
反之,Pandoc转化.html到.md后序列化残留的问题,可以使用pandoc -s name.html -t markdown_strict -o name.md的方法解决。
Snippet of Emacs
Reader \deprecated\
下载一DjVu文档后,使用emacs的nov插件无法查看其内容,查看配置注释发现nov是一个 .epub 查看器,遂安装djvu,但仍无法查看内容,查询ArchWiki后断定是缺少依赖。安装依赖后仍不显示内容但各命令工作正常,推测是由于djvu插件缺省不显示图片所致,(setq djvu-image-mode t) 后正常显示。
sudo pacman -S djvulibre
(use-package djvu :ensure t)
to PDF:
sudo pacman -S libtiff
ddjvu -format=tiff name(1).djvu name(2).tiff && tiff2pdf -j -o name(3).pdf name(2).tiffVerse
关于让上一步的原料制成品进行再加工,或者说包装以及分销,总之要借助许多工具。这里的工具可能包括ssg以及版本控制系统git。这一节的主题或者是如何搭建静态个人博客。
mdbook
cargo install mdbook./book.toml
[book]
authors = ["ningxilai"]
language = "zh_CN"
multilingual = false
src = "src"
title = "Iris's Note Book"
[output.html]
mathjax-support = true
git-repository-url = "https://github.com/ningxilai/ningxilai.github.io"
git-repository-icon = "fa-github"
no-section-label = true
[output.html.playground]
editable = true
line-numbers = true
[output.html.search]
limit-results = 20
use-boolean-and = true
boost-title = 2
boost-hierarchy = 2
boost-paragraph = 1
expand = true
heading-split-level = 2./theme/index.hbs
...
<head>
...
<!-- Addons -->
<link rel="stylesheet" type="text/css" href="https://www.cdnfonts.com/garamond.font" />
<style> body {
font-family: font-family: "Garamond","朱雀仿宋" ;
font-weight: normal;
font-variant-ligatures: historical-ligatures normal;
}
</style>
...
</head>
..../theme/fonts/fonts.css
@font-face {
font-family: '朱雀仿宋';
font-style: "regular";
font-weight: normal;
src: url('{{ resource "fonts/ZhuqueFangsong-Regular.ttf" }}') format('truetype');
}Font Source && CSS copy
Hakyll
hakyll-init -f ./CSS
html,body {
background: white;
scroll-behavior: smooth;
color: black;
font-family: monospace;
font-size: 16px;
line-height: 1.4;
min-height: 100%;
overflow-wrap: break-word;
font-family: "Fira Code","LXGW WenKai",sans-serif
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 45%;
margin: 0;
padding: 0;
text-align: left
}
.post-meta {
text-align: right
}
h1,h2,h3,h4,h5,h6 {
font-weight: normal
}
h2,h3 {
margin-top: 3rem
}
h4,h5 {
margin-top: 1.8rem
}
h6 {
margin-top: 0.8rem
}
hr {
margin: 2rem 0
}
p {
margin: 1rem 0
}
li {
margin: 0.4rem 0
}
*:target {
background: yellow
}
.w {
max-width: 640px;
margin: 0 auto;
padding: 4rem 2rem
}
hr {
text-align: center;
border: 0
}
hr:before {
content: "/////"
}
hr:after {
content: attr(data-content) "/////"
}
table {
width: 40%;
border: 0px
}
table,th,td {
border-collapse: collapse;
padding: 0.4rem
}
code {
color: white;
background: black
}
div.highlighter-rouge code {
display: block;
overflow-x: auto;
white-space: pre-wrap;
padding: 1rem
}
blockquote {
font-style: italic;
border: thin solid black;
padding: 1rem
}
blockquote p {
margin: 0
}
img {
max-width: 100%;
display: block;
margin: 0 auto
}...and HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home</title>
<link rel="stylesheet" href="./css/default.css" />
<link href="https://cdn.bootcdn.net/ajax/libs/firacode/6.2.0/ttf/FiraCode-Bold.ttf" rel="stylesheet">
<link href="https://cdn.bootcdn.net/ajax/libs/lxgw-wenkai-webfont/1.7.0/files/lxgwwenkai-bold-subset-100.woff2" rel="stylesheet">
</head>
<body>
<main role="main">
<h1>Home</h1>
<header>
<div class="logo">
<a href="./">Iris's Blog</a>
</div>
</header>
<body> body </body>
<footer>
Site proudly generated by
<a href="http://jaspervdj.be/hakyll">Hakyll</a>,
Site <code>.css</code> file generated from the <code>.sass</code> files of <a href="https://github.com/riggraz/no-style-please">riggraz/no-style-please</a>.
</footer>
</main>
</body>
</html>SSG and git
SSL_ERROR_SYSCALL
在提交分支时报出了 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 的错误。
根据 正宗咸豆花 at CSDN 的方案,可以使用SSH绕过HTTPS的OpenSSL延迟,在实际使用中,git remote set-url origin git@github.com:username/repo.git,就像这样。
另外的,附上当时的最小实例:
git clone --depth=1 git@github.com:username/repo.git
cd repo
// git remote add origin git@github.com:username/repo.git
// git push origin master
git add .
git commit -m "last commit"
git push origin master ## git push -u origin master(设置上游仓库)remote
对于凭证登陆,选择 cache 则有 git config --global credential.credentialStore cache。(dotnet tool install -g git-credential-manager)
rsync
同步:cp -rp book/* repo or rsync -a ./book/* repo。
! [rejected] master -> master (non-fast-forward) 时,可用git push -f
在本地创建副本:git init && git remote add upstream [URL]。
CNAME file
gh-page需要一CNAME file以重定向,其内容为定向到的域名。
add submodule
like this
git submodule add "https://github.com/manateelazycat/lsp-bridge" site-lisp/lsp-bridge
patch
作为独立命令的patch,使用时可以这样:patch -p[0/1] < [patch file] ## 0/1代表当前目录的工作深度。
Awesome Tools
关于这里的内容,就是标题的字面意思,我把所有没法分类的东西都放在这里了。
Artem
cargo install artem
一个从位图生成
ascii art的rust工具
oneko
cat BUILDING.md => cmake -G 'Unix Makefiles' && make
x11上的屏保小猫
fisher \deprecated\
fisher list | fisher remove and source (/home/iris/.cargo/bin/starship init fish --print-full-init | psub)
用
starship美化fish的prompt,fisher是一个fish script的package manager
CAS/Maxima
tex(sqrt(2)-sqrt(3))$\sqrt 2 - \sqrt 3$
Maxima有一个有趣的功能,它可以输出$\LaTeX$表达式。
MPSolve
Build
$PATH:$HOME/.local
./autogen.sh && ./configure && make prefix=$HOME/.local install编译时发生报错,可能是由于缺省/usr/local//$PREFIX错误所致,make clean并指定编译后路径可以正常运行。
Stellarium
昨日,也就是二月十二日(2/20/2025),因为多云而没有见到本日的星象以及月相。今日又因为元宵节的烟火,固然在强光下看到的烟云的阴影也非常有意思,但毕竟还是没有看清,念及我一直以来的意向索性打算了解一番天文学。(我的观鸟的爱好的源头某种意义上也催生了观星的趋向,当然,如果为了所谓专业性去说观星的爱好恐怕不太现实,Stellarium的模拟星象功能就能满足我了。)
安装和配置 Stellarium 也算是一件麻烦事,将这一过程简略地记录下来。
On Arch Linux
wget https://gh.llkk.cc/https://github.com/Stellarium/stellarium-data/releases/download/weekly-snapshot/Stellarium-25.0-003e0c2-qt6-x86_64.AppImage
chmod +x ./Stellarium-25.0-003e0c2-qt6-x86_64.AppImage
mv ./Stellarium-25.0-003e0c2-qt6-x86_64.AppImage ~/.local/bin/
cd ~/.local/bin/
ln -s ./Stellarium-25.0-003e0c2-qt6-x86_64.AppImage Stellarium.eph
打开的Stellarium会在家目录下创建一个.stellarium,其内有一个config.ini,在[astro]后添加PATH格式如下:
de430_path = "dir/de430.eph"
de431_path = "dir/de431.eph",在GUI窗口中灰色的待选框就可以选中了。
但获得.eph文件仍然相当麻烦,各个来源都需要翻墙。
Awesome Languages
关于一些有趣的编程语言和具有编程能力的排版语言,以及如何配置它们的开发环境。\见上文MyDistro\
$LaTeX$
sudo pacman -S perl-tk ## Option
cd /tmp
wget2 https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/texlive2025-20250308.iso
sudo mkdir /mnt/iso
sudo mount texlive2025-20250308.iso /mnt/iso/
sudo perl ./install-tl --gui ## Advanced => checkmake Create symlinks in standard directory.
## Post install
sudo tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
sudo tlmgr update --all # sudo tlmgr update --self --alltlmgr
使用tlmgr install [package]时,如果给出tlmgr install: package [package] not present in repository.,则应当考虑package为一子包的可能,应安装其父包。
Global TeX Font
sudo cp /usr/local/texlive/[version]/texmf-var/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-[context].conf
sudo fc-cache -fvDebug
latex-git-log =>
-- Can't locate IPC/System/Simple.pm in @INC (you may need to install the IPC::System::Simple module) (@INC entries checked: /usr/lib/perl5/5.40/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.40/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.40/core_perl /usr/share/perl5/core_perl) at /usr/local/texlive/2025/bin/x86_64-linux/latex-git-log line 15.
-- BEGIN failed--compilation aborted at /usr/local/texlive/2025/bin/x86_64-linux/latex-git-log line 15.in terminal:
sudo perl -MCPAN -e shell
## xor cpan shell
# <= o conf urllist unshift https://mirrors.tuna.tsinghua.edu.cn/CPAN/
# <= o conf pushy_https 0
# <= o conf commit
# <= quit
install IPC/System/Simple.pmTypst
至少在2025年早期,typst官方版本中,导出.typ到.html还仍是一项实验性功能:
typst watch --features html
## or
TYPST_FEATURES=htmlInstall
cargo install --git https://github.com/typst/typst.git --locked typst-clion VSC
sudo pacman -S code && ext install myriad-dreamin.tinymistOption
cargo install font-managergithub:e-ricus/font-manager-cli.
Quarto
wget https://github.com/quarto-dev/quarto-cli/releases/download/v[version]/quarto-[version]-linux-[arch].tar.gz
mkdir $QUARTO_PATH
tar -C $QUARTO_PATH/v[version]/ -xvzf quarto-[version]-linux-[arch].tar.gzcat .zshrc =>
export PATH="$QUARTO_PATH/v[version]/bin:$PATH"GNU APL \deprecated\
(require 'apl)
(set-input-method "apl-ascii") ;; https://www.metalevel.at/unicapl/
;;; apl.el --- APL input method for Emacs -*- lexical-binding: t; -*-
;; Author: Markus Triska <triska@metalevel.at>
;; Homepage: https://www.metalevel.at/unicapl/
;; Keywords: languages
;; Public domain code.
;;; Commentary:
;; Copy apl.el to your load-path and add to your .emacs:
;; (require 'apl)
;; Enable the APL input method with
;; M-x set-input-method RET apl-ascii RET
;; Then enter {iota}, {times}, {execute} etc.
;;; Code:
(defconst apl-version "0.9-PRE")
(defvar apl-ascii-codepoint
'(("{#%}" . ?\x2339)
("{#&}" . ?\x233a)
("{#/=}" . ?\x236f)
("{#/\\}" . ?\x234d)
("{#/}" . ?\x2341)
("{#:}" . ?\x2360)
("{#<}" . ?\x2343)
("{#=}" . ?\x2338)
("{#>}" . ?\x2344)
("{#?}" . ?\x2370)
("{#O}" . ?\x233c)
("{#\\/}" . ?\x2354)
("{#\}" . ?\x2342)
("{#^}" . ?\x2353)
("{#o}" . ?\x233b)
("{#v}" . ?\x234c)
("{%}" . ?\xf7)
("{&_}" . ?\x235a)
("{&}" . ?\x22c4)
("{'_}" . ?\x2358)
("{,-}" . ?\x236a)
("{->}" . ?\x2192)
("{-|}" . ?\x22a3)
("{-}" . ?\x2212)
("{/=_}" . ?\x2262)
("{/=}" . ?\x2260)
("{/\\_}" . ?\x2359)
("{/\\|}" . ?\x234b)
("{/\\}" . ?\x2206)
("{/match}" . ?\x2262)
("{0~}" . ?\x236c)
("{;_}" . ?\x236e)
("{<-}" . ?\x2190)
("{<=}" . ?\x2264)
("{=_}" . ?\x2261)
("{>=}" . ?\x2265)
("{>\"}" . ?\x2369)
("{@}" . ?\x235d)
("{I-beam}" . ?\x2336)
("{I}" . ?\x2336)
("{O*}" . ?\x235f)
("{O-}" . ?\x2296)
("{O\"}" . ?\x2365)
("{O\\}" . ?\x2349)
("{O_}" . ?\x235c)
("{O}" . ?\x25cb)
("{T}" . ?\x22a4)
("{\"}" . ?\xa8)
("{\\/~}" . ?\x236b)
("{abs}" . ?\x2223)
("{alpha-underbar}" . ?\x2376)
("{alpha_}" . ?\x2376)
("{alpha}" . ?\x237a)
("{and-overbar}" . ?\x22bc)
("{and}" . ?\x2227)
("{assign}" . ?\x2190)
("{backslash-bar}" . ?\x2340)
("{base}" . ?\x22a5)
("{box}" . ?\x2395)
("{branch}" . ?\x2192)
("{caret}" . ?\x2227)
("{cat-bar}" . ?\x236a)
("{catenate1}" . ?\x236a)
("{catenate}" . ?\x2c)
("{ceiling}" . ?\x2308)
("{circle-backslash}" . ?\x2349)
("{circle-dash}" . ?\x2296)
("{circle-diaeresis}" . ?\x2365)
("{circle-jot}" . ?\x233e)
("{circle-star}" . ?\x235f)
("{circle-stile}" . ?\x233d)
("{circle-underbar}" . ?\x235c)
("{circle_}" . ?\x235c)
("{circle}" . ?\x25cb)
("{comma-bar}" . ?\x236a)
("{comment}" . ?\x235d)
("{compress1}" . ?\x233f)
("{compress}" . ?\x2f)
("{deal}" . ?\x3f)
("{decode}" . ?\x22a5)
("{del-diaeresis}" . ?\x2362)
("{del-stile}" . ?\x2352)
("{del-tilde}" . ?\x236b)
("{delta-stile}" . ?\x234b)
("{delta-underbar}" . ?\x2359)
("{delta_}" . ?\x2359)
("{delta}" . ?\x2206)
("{del}" . ?\x2207)
("{depth}" . ?\x2261)
("{dex}" . ?\x22a3)
("{diaeresis}" . ?\xa8)
("{diamond-underbar}" . ?\x235a)
("{diamond_}" . ?\x235a)
("{diamond}" . ?\x22c4)
("{diaresis-dot}" . ?\x2235)
("{disclose}" . ?\x2283)
("{divide}" . ?\xf7)
("{domino}" . ?\x2339)
("{down-arrow}" . ?\x2193)
("{down-caret}" . ?\x2228)
("{down-shoe}" . ?\x222a)
("{down-tack}" . ?\x22a4)
("{down-vane}" . ?\x2356)
("{downcaret-tilde}" . ?\x2371)
("{downshoe-stile}" . ?\x2366)
("{downtack-diaeresis}" . ?\x2361)
("{downtack-jot}" . ?\x2355)
("{downtack-overbar}" . ?\x2351)
("{downwards-vane}" . ?\x2356)
("{drop}" . ?\x2193)
("{each}" . ?\xa8)
("{enclose}" . ?\x2282)
("{encode}" . ?\x22a4)
("{enlist}" . ?\x2208)
("{epsilon-underbar}" . ?\x2377)
("{epsilon_}" . ?\x2377)
("{epsilon}" . ?\x2208)
("{execute}" . ?\x234e)
("{expand1}" . ?\x2340)
("{expand}" . ?\x5c)
("{exp}" . ?\x22c6)
("{find}" . ?\x2377)
("{first}" . ?\x2191)
("{floor}" . ?\x230a)
("{format}" . ?\x2355)
("{frog}" . ?\x2362)
("{gets}" . ?\x2190)
("{goto}" . ?\x2192)
("{grade-down}" . ?\x2352)
("{grade-up}" . ?\x234b)
("{greater-of}" . ?\x2308)
("{greater-than-diaeresis}" . ?\x2369)
("{greater-than-equal}" . ?\x2265)
("{holler}" . ?\x2365)
("{hoot}" . ?\x2364)
("{index-of}" . ?\x2373)
("{index}" . ?\x2337)
("{index}" . ?\x2373)
("{intersection}" . ?\x2229)
("{intersect}" . ?\x2229)
("{inverted-caret}" . ?\x2228)
("{iota-underbar}" . ?\x2378)
("{iota_}" . ?\x2378)
("{iota}" . ?\x2373)
("{is}" . ?\x2190)
("{jot-diaeresis}" . ?\x2364)
("{jot-underbar}" . ?\x235b)
("{jot_}" . ?\x235b)
("{jot}" . ?\x2218)
("{laminate1}" . ?\x236a)
("{laminate}" . ?\x2c)
("{lamp}" . ?\x235d)
("{left-arrow}" . ?\x2190)
("{left-shoe}" . ?\x2282)
("{left-tack}" . ?\x22a3)
("{left-vane}" . ?\x2345)
("{leftbrace}" . ?\x7b)
("{leftshoe-stile}" . ?\x2367)
("{leftwards-vane}" . ?\x2345)
("{less-than-equal}" . ?\x2264)
("{lesser-of}" . ?\x230a)
("{lev}" . ?\x22a2)
("{ln}" . ?\x235f)
("{log}" . ?\x235f)
("{mat-divide}" . ?\x2339)
("{mat-inverse}" . ?\x2339)
("{match}" . ?\x2261)
("{max}" . ?\x2308)
("{member-of}" . ?\x2208)
("{member}" . ?\x2208)
("{minus}" . ?\x2212)
("{min}" . ?\x230a)
("{nabla}" . ?\x2207)
("{nand}" . ?\x2372)
("{nazg}" . ?\x2218)
("{negative}" . ?\x2212)
("{nor}" . ?\x2371)
("{not-equal}" . ?\x2260)
("{not-match}" . ?\x2262)
("{not}" . ?\x223c)
("{o\"}" . ?\x2364)
("{o_}" . ?\x235b)
("{omega-underbar}" . ?\x2379)
("{omega_}" . ?\x2379)
("{omega}" . ?\x2375)
("{or-overbar}" . ?\x22bd)
("{or}" . ?\x2228)
("{o}" . ?\x2218)
("{partition}" . ?\x2282)
("{paw}" . ?\x2235)
("{pi-times}" . ?\x25cb)
("{pick}" . ?\x2283)
("{pow}" . ?\x22c6)
("{quad->}" . ?\x2348)
("{quad-backslash}" . ?\x2342)
("{quad-circle}" . ?\x233c)
("{quad-colon}" . ?\x2360)
("{quad-delta}" . ?\x234d)
("{quad-del}" . ?\x2354)
("{quad-diamond}" . ?\x233a)
("{quad-divide}" . ?\x2339)
("{quad-down-arrow}" . ?\x2357)
("{quad-downcaret}" . ?\x234c)
("{quad-equal}" . ?\x2338)
("{quad-greater-than}" . ?\x2344)
("{quad-jot}" . ?\x233b)
("{quad-left-arrow}" . ?\x2347)
("{quad-less-than}" . ?\x2343)
("{quad-nabla}" . ?\x2354)
("{quad-not-equal}" . ?\x236f)
("{quad-question}" . ?\x2370)
("{quad-right-arrow}" . ?\x2348)
("{quad-slash}" . ?\x2341)
("{quad-up-arrow}" . ?\x2350)
("{quad-up-caret}" . ?\x2353)
("{quad<-}" . ?\x2347)
("{quad<}" . ?\x2343)
("{quad>}" . ?\x2344)
("{quad}" . ?\x2395)
("{quote-quad}" . ?\x235e)
("{quote-underbar}" . ?\x2358)
("{quote_}" . ?\x2358)
("{rank}" . ?\x2364)
("{ravel}" . ?\x2c)
("{reciprocal}" . ?\xf7)
("{reduce1}" . ?\x233f)
("{reduce}" . ?\x2f)
("{replicate1}" . ?\x233f)
("{replicate}" . ?\x2f)
("{represent}" . ?\x22a4)
("{reshape}" . ?\x2374)
("{residue}" . ?\x2223)
("{reverse}" . ?\x233d)
("{rho}" . ?\x2374)
("{right-arrow}" . ?\x2192)
("{right-shoe}" . ?\x2283)
("{right-tack}" . ?\x22a2)
("{right-vane}" . ?\x2346)
("{rightbrace}" . ?\x7d)
("{rightwards-vane}" . ?\x2346)
("{ring}" . ?\x2218)
("{roll}" . ?\x3f)
("{rotate}" . ?\x2296)
("{rotate}" . ?\x233d)
("{scan1}" . ?\x2340)
("{scan}" . ?\x5c)
("{semicolon-underbar}" . ?\x236e)
("{shape}" . ?\x2374)
("{signum}" . ?\xd7)
("{slash-bar}" . ?\x233f)
("{slashbar}" . ?\x233f)
("{slope-bar}" . ?\x2340)
("{smirk}" . ?\x2368)
("{snout}" . ?\x2361)
("{sourpuss}" . ?\x2363)
("{squad}" . ?\x2337)
("{squish-quad}" . ?\x2337)
("{star-diaeresis}" . ?\x2363)
("{star}" . ?\x22c6)
("{stile-tilde}" . ?\x236d)
("{stile}" . ?\x2223)
("{take}" . ?\x2191)
("{tilde-diaeresis}" . ?\x2368)
("{tilde}" . ?\x223c)
("{times}" . ?\xd7)
("{transpose}" . ?\x2349)
("{type}" . ?\x2208)
("{union}" . ?\x222a)
("{up-arrow}" . ?\x2191)
("{up-caret}" . ?\x2227)
("{up-shoe}" . ?\x2229)
("{up-tack}" . ?\x22a5)
("{up-vane}" . ?\x234f)
("{upcaret-tilde}" . ?\x2372)
("{upshoe-jot}" . ?\x235d)
("{uptack-jot}" . ?\x234e)
("{uptack-underbar}" . ?\x234a)
("{upwards-vane}" . ?\x234f)
("{w}" . ?\x2375)
("{x}" . ?\xd7)
("{zilde}" . ?\x236c)
("{|-}" . ?\x22a2)
("{|~}" . ?\x236d)
("{~\"}" . ?\x2368)
("{~^}" . ?\x2372)
("{~v}" . ?\x2371)
("{~}" . ?\x223c))
"Correspondence between ASCII transliterations and Unicode codepoints.")
(defvar apl-aplus-pairs
'((254 . ?\x22c4) (126 . ?\x223c) (161 . ?\xa8) (224 . ?\x2336)
(162 . ?\xaf) (230 . ?\x236b) (231 . ?\x2352) (164 . ?\x2264)
(232 . ?\x234b) (166 . ?\x2265) (244 . ?\x2349) (225 . ?\x2296)
(168 . ?\x2260) (240 . ?\x235f) (169 . ?\x2228) (185 . ?\x2371)
(94 . ?\x2227) (176 . ?\x2372) (171 . ?\xd7) (223 . ?\xf7)
(247 . ?\x233d) (173 . ?\x2339) (215 . ?\x2375) (197 . ?\x2208)
(229 . ?\x2377) (210 . ?\x2374) (217 . ?\x2191) (213 . ?\x2193)
(201 . ?\x2373) (233 . ?\x2378) (207 . ?\x25cb) (239 . ?\x2365)
(42 . ?\x22c6) (179 . ?\x235f) (251 . ?\x2190) (253 . ?\x2192)
(220 . ?\x2340) (252 . ?\x2359) (193 . ?\x237a) (225 . ?\x2296)
(211 . ?\x2308) (196 . ?\x230a) (189 . ?\x2261) (199 . ?\x2207)
(231 . ?\x2352) (200 . ?\x2206) (202 . ?\x2218) (234 . ?\x2364)
(167 . ?\x233c) (204 . ?\x2395) (236 . ?\x235e) (45 . ?\x2212)
(219 . ?\x22a2) (188 . ?\x2342) (221 . ?\x22a3) (187 . ?\x233c)
(218 . ?\x2282) (216 . ?\x2283) (195 . ?\x2229) (227 . ?\x235d)
(214 . ?\x222a) (194 . ?\x22a5) (226 . ?\x234e) (206 . ?\x22a4)
(238 . ?\x2355) (124 . ?\x2223) (175 . ?\x233f) (205 . ?\x2223))
"Correspondence between custom A+ encoding and Unicode codepoints.")
(defvar apl-aplus-table
(mapcar (lambda (pair)
(cons (decode-char 'ucs (car pair))
(decode-char 'ucs (cdr pair))))
apl-aplus-pairs)
"Translation table mapping A+ characters to Unicode symbols.")
(defun apl-set-font (font)
"Set font for APL characters. FONT is a font as passed to
set-fontset-font and should provide glyphs for all APL characters
that you want to use. An example is GNU unifont. Try
-gnu-unifont-*-r-*--*-*-*-*-*-*-ISO10646-1. Emacs is becoming
increasingly better at handling Unicode and may choose the right
glyphs for all characters out of the box, sometimes drawing from
various fonts. You therefore probably do not not need this
function at all, except maybe for enforcing a uniform font for
all APL characters."
(let ((all-symbols (mapcar (lambda (x)
(decode-char 'ucs (cdr x)))
apl-ascii-codepoint)))
(dolist (s all-symbols)
(set-fontset-font "fontset-default" s font))))
(defvar apl-aplus-keyboard nil)
(defun apl-toggle-aplus-keyboard ()
"Toogle translation of A+ keyboard input to Unicode characters."
(interactive)
(setq apl-aplus-keyboard (not apl-aplus-keyboard))
(dolist (pair apl-aplus-table)
(keyboard-translate (car pair)
(if apl-aplus-keyboard
(cdr pair)
(car pair)))))
(defun apl-aplus-to-unicode (begin end)
"Convert A+ symbols in region to Unicode characters."
(interactive "r")
(translate-region begin end (make-translation-table apl-aplus-table)))
(defun apl-flip (f) (cons (cdr f) (car f)))
(defun apl-unicode-to-aplus (begin end)
"Convert APL Unicode characters in region to A+."
(interactive "r")
(translate-region begin end
(make-translation-table (mapcar #'apl-flip
apl-aplus-table))))
(defun apl-ascii-to-unicode ()
"Translate ASCII transliterations to Unicode APL codepoints in the buffer.
In transient mark mode, if the region is active, operate on the region."
(interactive)
(save-excursion
(save-restriction
(when (and transient-mark-mode mark-active)
(narrow-to-region (region-beginning) (region-end)))
(dolist (pair apl-ascii-codepoint)
(goto-char (point-min))
(while (search-forward (car pair) nil t)
(replace-match (string (decode-char 'ucs (cdr pair))) nil t))))))
(when (require 'quail nil t)
(quail-define-package
"apl-ascii" "APL" "apl" t
"APL ASCII input method. Use {rho}, {iota} etc."
'(("\t" . quail-completion))
t nil nil nil nil nil nil nil nil t)
(dolist (pair apl-ascii-codepoint)
(quail-defrule (car pair) (decode-char 'ucs (cdr pair)))))
(defun apl-version ()
(interactive)
(message "Using version %s of apl.el" apl-version))
(provide 'apl)
;;; apl.el ends hereSPAD && FriCAS \Symbolic Algebra\
sudo pacman -S sbcl
git clone --depth=1 git@github.com:fricas/fricas.git
cd fricas
./configure
make
sudo make installIdris2 && Pack \Symbolic Algebra\
git clone --depth=1 git@github.com:racket/ChezScheme.git
cd ChezScheme
./configure --threads
make
sudo make install
git clone --depth=1 git@github.com:stefan-hoeck/idris2-pack.git
cd idris2-pack
./install.sh
export PATH=$PATH:~/.pack/binAgda \Symbolic Algebra\
cabal update
cabal install Agda
wget -O agda-stdlib.tar.gz https://github.com/agda/agda-stdlib/archive/v2.2.tar.gz
tar -xvf agda-stdlib.tar.gz
cd agda-stdlib-2.2
cabal installLisp
CommonLisp && Roswell
sudo pacman -S rlwrap
git clone -b release https://github.com/roswell/roswell.git
cd roswell
sh bootstrap
./configure --prefix=$HOME/.local
make
make install
echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.zshrc
ros setup
ros lisp=sbcl-bin/system setup
ros install qlotlem
sudo pacman -S sdl2 sdl2_ttf sdl2_image
mkdir $HOME/common-lisp
cd common-lisp
git clone --depth=1 https://github.com/lem-project/lem.git
cd lem
make sdl2Rust
rustup toolchain uninstall stable && rustup toolchain install stableUiua
cargo install --git https://github.com/uiua-lang/uiua uiua -F fullUseful Tools
关于在linux上办公以及创作…诸如此类。
EasyOCR
pip install -U huggingface_hub
pip install easyocr
## export HF_ENDPOINT=https://hf-mirror.com
easyocr -l en -f $PATH --gpu=True --detail=0 --output_format=standardmupdf
git clone --recursive git://git.ghostscript.com/mupdf.git && cd mupdf && make && cp ./build/release/mutool ~/.local/bin/mutool
# install to .local
vi Makefile
profile ?= /usr/local/ => profile ?= /home/iris/.local/ 关于
mupdf库,可以使用pacman也可以如此安装,最终通过emacs的reader工作。
Env
Go
go env -w GO111MODULE=on
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
Python
python -m venv ~/.local/ xor uv venv ~/uv/
# cat .zshrc => export PATH=$PATH:~/.local/bin
pip install -i https://mirrors.ustc.edu.cn/pypi/simple pip -U
pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/simpleuv config ~/.config/uv/uv.toml
[[index]]
url = "https://mirrors.ustc.edu.cn/pypi/simple"
default = trueTS/JS
npm config set prefix '$PATH' => .zshrc:export PATH="$HOME/node_global/bin:$PATH"
ShellTools
cargo install starship
starship config command_timeout <some value>
ImageView
cargo install viu
## viu $PATH/$NAMEfish
cargo install --git https://github.com/fish-shell/fish-shell --lockedfisher
git clone --depth=1 https://github.com/jorgebucaran/fisher.git && cd fisher/functions
source
fisher install ../
fisher install IlanCosman/tide@v6starship
starship init fish | source => config.fish
cat $__fish_config_dir/config.fish =>
alias cat=bat
alias ls=eza
alias grep=rg
alias vi=lvimzsh
pacman -S zsh zsh-completions
zsh-syntax-higtlighting/issue/812
*Do not define functions in the namespace except as specifically permitted in the z-sy-h documentation.**zsh highlight***
.zshrc:PackageManager and p10k/starship
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=10000
setopt SHARE_HISTORY
git clone --depth=1 https://github.com/zdharma-continuum/zinit ~/.local/share/zinit/zinit.git
zsh ~/.local/share/zinit/zinit.git/scripts/install.sh
source ~/.zshrc
zinit ice depth"1" # git clone depth
zinit snippet OMZ::* # use OMZ
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-history-substring-search
zinit light zsh-users/zsh-autosuggestions
zinit light zdharma-continuum/fast-syntax-highlighting
#starship Scheme
starship preset nerd-font-symbols -o ~/.config/starship.toml
eval "$(starship init zsh)"
#OMZ Scheme
zinit light romkatv/powerlevel10k #p10k
plugins=(git
zsh-syntax-highlighting
zsh-autosuggestions
zsh-completions)
ZSH_THEME="powerlevel10k/powerlevel10k"zim
wget2 -nv -O - https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
.zimrc =>
++ zmodule zdharma-continuum/fast-syntax-highlighting
-- zmodule asciiship
++ zmodule romkatv/powerlevel10k.zshrc =>
# Promat
## Copy by https://emacs-china.org/u/blindingdark/summary
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '%b '
NEWLINE=$'\n'
setopt PROMPT_SUBST
PROMPT='%F{blue}%~%f %F{red}${vcs_info_msg_0_}%f${NEWLINE}%(?..%F{red}%?%f )%F{green}❯%f 'Terminal
sudo pacman -S kitty
Kitty
kitty +kitten themes --reload-in=all [theme name] Doom Vibrant
git clone --depth 1 https://github.com/dexpota/kitty-themes ~/.config/kitty/kitty-themes/ && ln -s ~/.config/kitty/kitty-themes/ ~/.config/kitty/themescat ~/.config/kitty/kitty.conf =>
# BEGIN_KITTY_THEME
# Spacemacs
include current-theme.conf
# END_KITTY_THEME
font_family FiraCode Nerd Font
symbol_map U+4E00-U+9FA5 LxgwWenKaideprecated
kitty +kitten themes --dump-theme
## xor
cd ~/.config/kitty
ln -s ./kitty-themes/themes/[name].conf ~/.config/kitty/theme.confcat ~/.config/kitty/kitty.conf =>
# ...
# include ./theme.conf
# ...Fetch
cargo install --git "https://github.com/kamui-fin/rfetch" --features=battery
Config
# cat .config/rfetch/config.toml
modules = ["user_host", "shell", "distro", "packages", "uptime", "memory", "kernel", "ip", "cpu", "disk_usage", "process_num", "arch", "temp", "locale", "device_name", "time", "date", "battery"]
delimiter = "~>"
title_color = "pink"
[user_host]
line = true
line_symbol = "━"
line_color = "magenta"
[colors]
enabled = true
show_bg_colors = false
[ip]
public = truePackageManager
pacman
upgrade-requires-manual-intervention
sudo pacman -Qo /usr/lib/firmware/nvidia/ad103 => /usr/lib/firmware/nvidia/ad103/ is owned by linux-firmware 20250508.788aadc8-2
> error: failed to commit transaction (conflicting files)
> linux-firmware-nvidia: /usr/lib/firmware/nvidia/ad103 exists in
> filesystem
> linux-firmware-nvidia: /usr/lib/firmware/nvidia/ad104 exists in
> filesystem
> linux-firmware-nvidia: /usr/lib/firmware/nvidia/ad106 exists in
> filesystem
> linux-firmware-nvidia: /usr/lib/firmware/nvidia/ad107 exists in
> filesystem
cd lib/firmware/nvidia
sudo mv ad103 ad103.bak
sudo mv ad104 ad104.bak
sudo mv ad106 ad106.bak
sudo mv ad107 ad107.bak
sudo pacman -Syu
sudo rm -r *.bak # nil!or
sudo pacman -Rcn linux-firmware-nvidia && sudo pacman -Syu linux-firmwareaura
## aura check
sudo pacman -S pacman-contrib graphviz
pip install shellcheck-py
## install
cargo install aura
## Deps Graph
aura deps [package-name] --open
# cat ~/.config/mimeapps.list => image/png=emacs.desktopReflector
sudo pacman -S reflector
sudo systemctl [enable/start] reflector.[timer/service]
sudo vim /etc/xdg/reflector/reflector.conf
# -- --country France,Germany
# -- --protocol https
# ...
# ++ --country China
# ++ --protocol https
sudo vim /etc/pacman.conf
# -- #NoExtract =
# ++ NoExtract = trueFonts
Global TeX Font and git clone --depth=1 https://github.com/ryanoasis/nerd-fonts ~/.local/share/fonts/.
LinuxTools
UEFI Shell
by giteeajake
pacman -S edk2-shell && sudo cp /usr/share/edk2-shell/x64/Shell_Full.efi /boot/shellx64.efiOOM
sudo pacman -S earlyoom
sudo systemctl enable --now earlyoomTrash
cargo install cargo install czkawka_[gui/cli]Browser
sudo pacman -S nyxtClipboard
sudo pacman -S wl-clipboardconfig file
=> .config/nyxt/config.lisp
;; emacs keybinds
(define-configuration buffer
((default-modes
(pushnew 'nyxt/mode/emacs:emacs-mode %slot-value%))))FileManager
install
sudo pacman -S yazi ffmpeg 7zip jq poppler fd ripgrep fzf zoxide imagemagick
paru -S resvg
cargo install --locked --git https://github.com/sxyazi/yazi.git yazi-fm yazi-cliiwctl
退出时使用exit会断开连接状态,使用C-d则不会断联。