-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
210 lines (173 loc) · 19.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2023-09-05 Tue 02:06 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>‎</title>
<meta name="author" content="Jeet Ray" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="https://combinatronics.io/sylvorg/bundle/main/src/styles/primary/syvl.css" />
<link rel="icon" href="https://combinatronics.io/sylvorg/bundle/main/src/icons/favicons/shiny-zigzagoon-galar.ico" sizes="any" />
<link rel="icon" href="https://combinatronics.io/sylvorg/bundle/main/src/icons/favicons/shiny-zigzagoon-galar.svg" />
<link rel="manifest" href="https://combinatronics.io/sylvorg/bundle/main/manifest.json" />
<link rel="stylesheet" type="text/css" href="https://combinatronics.io/sylvorg/bundle/main/src/styles/highlight/paraiso-dark.min.css" />
<script src="https://combinatronics.io/sylvorg/bundle/main/src/scripts/highlight/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<div class="header">
<h1>We Are Syvlorg.</h1>
<a href="">About Me</a>
<a href="">About This Website</a>
<a href="">About Syvlorg</a>
<a href="https://resume.syvl.org">Résumé</a>
<a href="https://index.syvl.org">Index</a>
</div>
</head>
<body>
<div id="content" class="content">
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org0f6a515">prime.el</a></li>
</ul>
</div>
</div>
<div id="outline-container-org0f6a515" class="outline-2">
<h2 id="org0f6a515">prime.el</h2>
<div class="outline-text-2" id="text-org0f6a515">
<div class="org-src-container">
<pre><code class="language-lisp match-braces rainbow-braces"><span style="font-weight: bold; font-style: italic;">;;; </span><span style="font-weight: bold; font-style: italic;">prime.el --- a simple package -*- lexical-binding: t; -*-</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Copyright (C) 2021 Jeet Ray</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Author: Jeet Ray <a href="mailto:aiern%40protonmail.com"><[email protected]></a></span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Keywords: lisp</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Version: 0.0.1</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">This program is free software; you can redistribute it and/or modify</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">it under the terms of the GNU General Public License as published by</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">the Free Software Foundation, either version 3 of the License, or</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">(at your option) any later version.</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">This program is distributed in the hope that it will be useful,</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">GNU General Public License for more details.</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">You should have received a copy of the GNU General Public License</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">along with this program. If not, see <a href="http://www.gnu.org/licenses/"><http://www.gnu.org/licenses/></a>.</span>
<span style="font-weight: bold; font-style: italic;">;;; </span><span style="font-weight: bold; font-style: italic;">Commentary:</span>
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Put a description of the package here</span>
<span style="font-weight: bold; font-style: italic;">;;; </span><span style="font-weight: bold; font-style: italic;">Code:</span>
(<span style="font-weight: bold;">require</span> '<span style="font-weight: bold; text-decoration: underline;">alloy</span>)
(<span style="font-weight: bold;">require</span> '<span style="font-weight: bold; text-decoration: underline;">deino</span>)
(<span style="font-weight: bold;">require</span> '<span style="font-weight: bold; text-decoration: underline;">s</span>)
(<span style="font-weight: bold;">defvar</span> <span style="font-weight: bold; font-style: italic;">primus-key</span> <span style="font-style: italic;">","</span>)
(eval `(defdeino primus (<span style="font-weight: bold;">:color</span> blue) <span style="font-style: italic;">"j"</span> (<span style="font-style: italic;">"`"</span> nil <span style="font-style: italic;">"cancel"</span>)))
(eval `(alloy-def <span style="font-weight: bold;">:keymaps</span> demon-run (alloy-chord ,(s-repeat 2 primus-key)) 'primus/body))
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">prime--replace-spaces</span> (str) (s-replace <span style="font-style: italic;">" "</span> <span style="font-style: italic;">"/"</span> str))
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">prime--construct-name</span> (str) (prime--replace-spaces (concat <span style="font-style: italic;">"prime/"</span> str)))
(<span style="font-weight: bold;">defmacro</span> <span style="font-weight: bold;">prime*</span> (parent first-call key func <span style="font-weight: bold; text-decoration: underline;">&optional</span> name* <span style="font-weight: bold; text-decoration: underline;">&rest</span> args)
(<span style="font-weight: bold;">let*</span> ((ds (deino--create-dataset
(<span style="font-weight: bold;">if</span> (stringp name*) name* (<span style="font-weight: bold;">if</span> (symbolp func) (symbol-name func) nil))
key
parent
func
#'prime--construct-name+))
(next-key (s-join <span style="font-style: italic;">" "</span> (cdr (d--g ds <span style="font-weight: bold;">:keys</span>))))
(next-deino-body (<span style="font-weight: bold;">if</span> (d--g ds <span style="font-weight: bold;">:two-key</span>) func (meq/inconcat (d--g ds <span style="font-weight: bold;">:next-name</span>) <span style="font-style: italic;">"/body"</span>)))
(next-deino-settings (<span style="font-weight: bold;">when</span> (d--g ds <span style="font-weight: bold;">:two-key</span>) args)))
(<span style="font-weight: bold;">when</span> first-call
(<span style="font-weight: bold;">unless</span> (d--g ds <span style="font-weight: bold;">:current-body-plus</span>)
(eval `(defdeino ,(intern (d--g ds <span style="font-weight: bold;">:current-name</span>)) (<span style="font-weight: bold;">:color</span> blue) nil (<span style="font-style: italic;">"`"</span> nil <span style="font-style: italic;">"cancel"</span>))))
(eval `(defdeino+ primus nil (,(d--g ds <span style="font-weight: bold;">:carkeys</span>)
,(d--g ds <span style="font-weight: bold;">:current-body</span>)
,(d--g ds <span style="font-weight: bold;">:current-name</span>)))))
(<span style="font-weight: bold;">unless</span> (d--g ds <span style="font-weight: bold;">:one-key</span>)
(eval `(prime* ,(d--g ds <span style="font-weight: bold;">:current-parent</span>) nil ,next-key ,func ,name* ,@next-deino-settings))
`(,(meq/inconcat <span style="font-style: italic;">"defdeino"</span> (<span style="font-weight: bold;">if</span> (d--g ds <span style="font-weight: bold;">:current-body-plus</span>) <span style="font-style: italic;">"+"</span> <span style="font-style: italic;">""</span>))
,(intern (d--g ds <span style="font-weight: bold;">:current-name</span>))
,@(<span style="font-weight: bold;">if</span> (d--g ds <span style="font-weight: bold;">:current-body-plus</span>)
(list nil)
`((<span style="font-weight: bold;">:color</span> blue) nil
(<span style="font-style: italic;">"`"</span> nil <span style="font-style: italic;">"cancel"</span>)
(<span style="font-style: italic;">"DEL"</span> ,(<span style="font-weight: bold;">if</span> first-call #'primus/body (meq/inconcat (prime--construct-name parent) <span style="font-style: italic;">"/body"</span>)) <span style="font-style: italic;">"back"</span>)))
(,(d--g ds <span style="font-weight: bold;">:spare-keys</span>) ,next-deino-body ,(d--g ds <span style="font-weight: bold;">:next-name</span>) ,@next-deino-settings)))))
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">prime--construct-name+</span> (keys <span style="font-weight: bold; text-decoration: underline;">&optional</span> delimiter) (deino--construct-name+ keys #'prime--construct-name delimiter))
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###</span><span style="font-weight: bold; font-style: italic;">autoload</span>
(<span style="font-weight: bold;">defmacro</span> <span style="font-weight: bold;">prime</span> (key func <span style="font-weight: bold; text-decoration: underline;">&optional</span> name <span style="font-weight: bold; text-decoration: underline;">&rest</span> args) `(prime* nil t ,key ,func ,name ,@args))
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###</span><span style="font-weight: bold; font-style: italic;">autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">prime+</span> (<span style="font-weight: bold; text-decoration: underline;">&rest</span> args) (eval `(defdeino+ primus ,@args)))
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###</span><span style="font-weight: bold; font-style: italic;">autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">primer</span> (key <span style="font-weight: bold; text-decoration: underline;">&rest</span> args)
(add-hook
'window-setup-hook
#'(<span style="font-weight: bold;">lambda</span> nil (eval `(defdeino+ primus nil (,key ,(meq/inconcat (prime--construct-name+ key) <span style="font-style: italic;">"/body"</span>) ,@args))))))
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###</span><span style="font-weight: bold; font-style: italic;">autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">primer+</span> (key <span style="font-weight: bold; text-decoration: underline;">&optional</span> delimiter <span style="font-weight: bold; text-decoration: underline;">&rest</span> args) (deino--nested-rename key #'prime--construct-name+ args))
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###</span><span style="font-weight: bold; font-style: italic;">autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">primed</span> (key description <span style="font-weight: bold; text-decoration: underline;">&optional</span> delimiter) (deino--nested-describe key #'prime--construct-name+ description delimiter))
(<span style="font-weight: bold;">with-eval-after-load</span> 'use-package
<span style="font-weight: bold; font-style: italic;">;; </span><span style="font-weight: bold; font-style: italic;">Primarily adapted from https://gitlab.com/to1ne/use-package-hydra/-/blob/master/use-package-hydra.el</span>
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defalias</span> '<span style="font-weight: bold;">use-package-normalize/:prime</span> 'use-package-normalize-forms)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">use-package-handler/:prime</span> (name keyword args rest state)
<span style="font-style: italic;">"Generate prime with NAME for `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">:prime</span><span style="font-style: italic;">' KEYWORD.</span>
<span style="font-style: italic;"> ARGS, REST, and STATE are prepared by `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">use-package-normalize/:prime</span><span style="font-style: italic;">'."</span>
(use-package-concat
(mapcar #'(<span style="font-weight: bold;">lambda</span> (def) `(prime ,@def)) args)
(use-package-process-keywords name rest state)))
(add-to-list 'use-package-keywords <span style="font-weight: bold;">:prime</span> t)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defalias</span> '<span style="font-weight: bold;">use-package-normalize/:prime+</span> 'use-package-normalize-forms)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">use-package-handler/:prime+</span> (name keyword args rest state)
<span style="font-style: italic;">"Generate prime+ with NAME for `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">:prime+</span><span style="font-style: italic;">' KEYWORD.</span>
<span style="font-style: italic;"> ARGS, REST, and STATE are prepared by `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">use-package-normalize/:prime+</span><span style="font-style: italic;">'."</span>
(use-package-concat
(mapcar #'(<span style="font-weight: bold;">lambda</span> (def) `(prime+ ,@def)) args)
(use-package-process-keywords name rest state)))
(add-to-list 'use-package-keywords <span style="font-weight: bold;">:prime+</span> t)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defalias</span> '<span style="font-weight: bold;">use-package-normalize/:primer</span> 'use-package-normalize-forms)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">use-package-handler/:primer</span> (name keyword args rest state)
<span style="font-style: italic;">"Generate primer with NAME for `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">:primer</span><span style="font-style: italic;">' KEYWORD.</span>
<span style="font-style: italic;"> ARGS, REST, and STATE are prepared by `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">use-package-normalize/:primer</span><span style="font-style: italic;">'."</span>
(use-package-concat
(mapcar #'(<span style="font-weight: bold;">lambda</span> (def) `(primer ,@def)) args)
(use-package-process-keywords name rest state)))
(add-to-list 'use-package-keywords <span style="font-weight: bold;">:primer</span> t)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defalias</span> '<span style="font-weight: bold;">use-package-normalize/:primed</span> 'use-package-normalize-forms)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">use-package-handler/:primed</span> (name keyword args rest state)
<span style="font-style: italic;">"Generate primed with NAME for `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">:primed</span><span style="font-style: italic;">' KEYWORD.</span>
<span style="font-style: italic;"> ARGS, REST, and STATE are prepared by `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">use-package-normalize/:primed</span><span style="font-style: italic;">'."</span>
(use-package-concat
(mapcar #'(<span style="font-weight: bold;">lambda</span> (def) `(primed ,@def)) args)
(use-package-process-keywords name rest state)))
(add-to-list 'use-package-keywords <span style="font-weight: bold;">:primed</span> t)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defalias</span> '<span style="font-weight: bold;">use-package-normalize/:primer+</span> 'use-package-normalize-forms)
<span style="font-weight: bold; font-style: italic;">;;;</span><span style="font-weight: bold; font-style: italic;">###autoload</span>
(<span style="font-weight: bold;">defun</span> <span style="font-weight: bold;">use-package-handler/:primer+</span> (name keyword args rest state)
<span style="font-style: italic;">"Generate primer+ with NAME for `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">:primer+</span><span style="font-style: italic;">' KEYWORD.</span>
<span style="font-style: italic;"> ARGS, REST, and STATE are prepared by `</span><span style="font-weight: bold; font-style: italic; text-decoration: underline;">use-package-normalize/:primer+</span><span style="font-style: italic;">'."</span>
(use-package-concat
(mapcar #'(<span style="font-weight: bold;">lambda</span> (def) `(primer+ ,@def)) args)
(use-package-process-keywords name rest state)))
(add-to-list 'use-package-keywords <span style="font-weight: bold;">:primer+</span> t))
(<span style="font-weight: bold;">provide</span> '<span style="font-weight: bold; text-decoration: underline;">prime</span>)
<span style="font-weight: bold; font-style: italic;">;;; </span><span style="font-weight: bold; font-style: italic;">prime.el ends here</span>
</code></pre>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Jeet Ray</p>
<p class="date">Created: 2023-09-05 Tue 02:06</p>
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>