eebcb1368136de4a2f261c64365346995222b7e4
[~bandali/bndl.org] / haunt.scm
1 (use-modules (haunt asset)
2 (haunt builder blog)
3 (haunt builder atom)
4 (haunt builder assets)
5 (haunt builder rss)
6 (haunt html)
7 (haunt page)
8 (haunt post)
9 (haunt reader commonmark)
10 (haunt site)
11 (haunt utils)
12 (ice-9 match)
13 (srfi srfi-19))
14
15 (define my-scheme 'https)
16 (define my-domain "bandali.eu.org")
17 (define my-url
18 (string-append (symbol->string my-scheme) "://" my-domain))
19
20 (define my-date-format "~B ~e, ~Y")
21 (define license-page-title "Licensing Information")
22
23 (define (stylesheet name)
24 `(link (@ (rel "stylesheet")
25 (href ,(string-append "/" name ".css")))))
26
27 (define* (aa content #:optional (uri content) . title)
28 `(a (@ (href ,uri) (title ,(apply string-append title))) ,content))
29
30 (define* (base-layout site body #:key title)
31 `((doctype "html")
32 (html
33 (head
34 (meta (@ (charset "utf-8")))
35 (title ,(if title (string-append title " — " (site-title site))
36 "Amin Bandali’s Personal Site"))
37 ,(stylesheet "reset")
38 ,(stylesheet "style"))
39 (body
40 (main ,body)
41 (footer
42 (p "Copyright © 2016–2019 Amin Bandali. See "
43 ,(if (and (string? title)
44 (string=? title license-page-title))
45 "the above" (aa "license.html" "/license.html"))
46 " for license conditions. Please copy and share."))))))
47
48
49 (register-metadata-parser! 'updated string->date*)
50
51 (define (my-post-template post)
52 `((header
53 (h1 ,(post-ref post 'title))
54 (address "By " ,(aa (post-ref post 'author) "/")
55 " <" ,(post-ref post 'email) ">")
56 (p (@ (class "date"))
57 "Published "
58 ,(date->string (post-date post) my-date-format))
59 ,(if (post-ref post 'updated)
60 `(p (@ (class "updated"))
61 "Updated "
62 ,(date->string (post-ref post 'updated)
63 my-date-format)) ""))
64 ,(post-sxml post)
65 (p (@ (class "muted inbox"))
66 "Have a question or comment? Start a discussion in my "
67 ,(aa "public inbox" "https://lists.sr.ht/~bandali/public-inbox")
68 " by sending an email to "
69 ,(aa "~bandali/public-inbox@lists.sr.ht"
70 "mailto:~bandali/public-inbox@lists.sr.ht")
71 (small
72 " [" ,(aa "mailing list etiquette"
73 "https://man.sr.ht/lists.sr.ht/etiquette.md") "]")
74 ".")))
75
76 (define (my-collection-template site title posts prefix)
77 (define (post-uri post)
78 (string-append (or prefix "") "/"
79 (site-post-slug site post) ".html"))
80
81 `((h2 ,title)
82 (table
83 (@ (class "post-list"))
84 (tbody
85 ,@(map (lambda (post)
86 `(tr
87 (td ,(aa (post-ref post 'title) (post-uri post)))
88 (td (@ (style "font-size: 0.875em;"))
89 ,(date->string (post-date post) my-date-format))))
90 posts)))))
91
92 (define bandali-theme
93 (theme #:name "bandali"
94 #:layout
95 (lambda (site title body)
96 (base-layout site body
97 #:title title))
98 #:post-template my-post-template
99 #:collection-template my-collection-template))
100
101 (define (static-page title file-name body)
102 (lambda (site posts)
103 (make-page file-name
104 (with-layout bandali-theme site title body)
105 sxml->html)))
106
107 (define (index-material site posts)
108 `((h1 (@ (style "font-size: 0;"))
109 "Amin Bandali")
110 (p (@ (style "margin-top: 0;"))
111 "Hi, I’m "
112 ,(aa "Amin Bandali" "images/bandali-with-rms.jpg"
113 "photo of bandali with rms wearing a "
114 "“pay cash don’t be tracked” pin")
115 ". I’m a graduate student at "
116 ,(aa "WatForm" "https://watform.uwaterloo.ca")
117 " at University of Waterloo, supervised by "
118 ,(aa "Dr. Nancy Day" "https://cs.uwaterloo.ca/~nday/")
119 ". The main goal of my research is improving "
120 (strong "software and systems reliability")
121 " through application of " (em "formal methods") ".")
122 (p "My research at WatForm focuses on formal logic, model "
123 "checking, and verification. I’m also interested in "
124 "programming languages, theorem provers, and their "
125 "type systems. You may wish to view my academic "
126 ,(aa "curriculum vitae" "bandali-cv.html") ".")
127 (p (@ (class "notice"))
128 (strong "SE 212 students: ")
129 "see " ,(aa "here" "se212-f19/") " for slides and other "
130 "material from the tutorials.")
131 (p "On the side, I dabble in "
132 ,(aa "Lean" "https://leanprover.github.io") " and enjoy "
133 ,(aa "hacking" "https://stallman.org/articles/on-hacking.html")
134 " on "
135 ,(aa "Elisp"
136 "https://www.gnu.org/software/emacs/manual/elisp.html")
137 ". I’m a " ,(aa "Free Software"
138 "https://www.gnu.org/philosophy/free-sw.html")
139 " activist, a GNU "
140 ,(aa "maintainer" "https://www.gnu.org/people/#bandali")
141 " and "
142 ,(aa "webmaster"
143 "https://www.gnu.org/people/webmeisters.html#bandali")
144 ", and an " ,(aa "associate member"
145 "https://www.fsf.org/associate/")
146 " of the " ,(aa "FSF" "https:///www.fsf.org"
147 "Free Software Foundation")
148 ". I co-host the " ,(aa "Emacs.el" "https://emacsel.com")
149 " podcast with " ,(aa "Daniel Gopar" "https://www.pygopar.com")
150 ", and organize " ,(aa "EmacsConf" "https://emacsconf.org")
151 " with help from many wonderful people. I am also a member of"
152 " the Systems Committee for the "
153 ,(aa "CSC" "https://csclub.uwaterloo.ca"
154 "Computer Science Club of the University of Waterloo")
155 ".")
156 (p "See my " ,(aa "contact" "contact.html") " page for how to "
157 "best reach me.")
158 (h2 (@ (id "papers")) "Papers")
159 (dl
160 (dt "A Comparison of the Declarative Modelling Languages B, DASH,
161 and TLA" (sup "+")
162 (small
163 " [ " ,(aa "pdf" "papers/modre2018-declarative.pdf") " | "
164 ,(aa "bib" "papers/modre2018-declarative.bib") " ]"))
165 (dd "Ali Abbassi, "
166 ,(aa "Amin Bandali" my-url) ", "
167 ,(aa "Nancy A. Day" "https://cs.uwaterloo.ca/~nday/") ", "
168 "Jose Serna"
169 (br)
170 (em "2018 IEEE 8th International Model-Driven Requirements"
171 " Engineering Workshop (MoDRE)")
172 (br)
173 "Copyright © 2018 IEEE. All Rights Reserved. Sadly."))
174 (h2 (@ (id "talks")) "Talks")
175 (dl
176 (dt
177 "The Magic of Specifications and Type Systems"
178 (small
179 " [ "
180 ,(aa "slides" "talks/cucsc-2017-slides.pdf"
181 "presented at the Canadian Undergraduate Computer Science"
182 " Conference 2017,\n"
183 "University of Toronto, Canada, June 15–17, 2017")
184 " | "
185 ,(aa "poster" "talks/eecs4080-poster.pdf"
186 "presented at the Lassonde Undergraduate Summer Student"
187 " Research Conference,\n"
188 "York University, Toronto, Canada, August 15, 2017")
189 " ]"))
190 (dd ,(aa "Amin Bandali" my-url) ", "
191 ,(aa "Simon Hudon" "https://github.com/cipher1024") ", "
192 ,(aa "Jonathan S. Ostroff"
193 "http://www.cse.yorku.ca/~jonathan/")))
194 (h2 (@ (id "projects")) "Projects")
195 (p "Below are a number of free software projects I have worked "
196 "on:")
197 (dl
198 (dt ,(aa "george-mode" "https://git.sr.ht/~bandali/george-mode"))
199 (dd "Emacs major mode for editing George files")
200 (dt ,(aa "alloy-catalyst"
201 "https://git.uwaterloo.ca/bandali/alloy-catalyst"))
202 (dd "Framework for performance analysis of Alloy models")
203 (dt ,(aa "unitb-web" "https://github.com/unitb/unitb-web"))
204 (dd "Web interface for Unit-B")
205 (dt ,(aa "tex2png-hs" "https://github.com/unitb/tex2png-hs"))
206 (dd "Library and CLI for converting TeX and LaTeX to PNG "
207 "images"))
208 (h2 (@ (id "notes")) "Notes")
209 (p "Here are notes about a variety of topics and issues I care "
210 "about. They’re also available via " ,(aa "Atom" "feed.atom")
211 " and " ,(aa "RSS" "feed.rss") " feeds.")
212 (table
213 (@ (class "post-list"))
214 (tbody
215 ,@(map
216 (lambda (post)
217 (define (post-uri post)
218 (string-append "/"
219 (site-post-slug site post) ".html"))
220 `(tr
221 (td ,(aa (post-ref post 'title) (post-uri post)))
222 (td (small
223 ,(date->string (post-date post) my-date-format)))))
224 (take-up-to 10 (posts/reverse-chronological posts)))))))
225
226 (define (index-page site posts)
227 (make-page
228 "index.html"
229 (base-layout site (index-material site posts))
230 sxml->html))
231
232 (define license-page
233 (static-page
234 license-page-title
235 "license.html"
236 `((h1 "License information for "
237 ,(aa my-domain my-url))
238 (p "I strongly believe in "
239 ,(aa "free culture"
240 "https://questioncopyright.org/what_is_free_culture")
241 " and that all creative works everywhere should be "
242 ,(aa "free" "https://freedomdefined.org/Definition") ".")
243 (p "Unless otherwise noted material on this site is licensed "
244 "under the GNU General Public License as published by the "
245 "Free Software Foundation, either version 3 of the License, "
246 "or (at your option) any later version. A copy of the "
247 "license is included at " ,(aa "gpl-3.0.html") ".")
248 (p "Some resources on free software and licenses:")
249 (ul
250 (li ,(aa "What is free software?"
251 "https://www.gnu.org/philosophy/free-sw.html"))
252 (li ,(aa "Various Licenses and Comments about Them"
253 "https://www.gnu.org/licenses/license-list.html"))
254 (li ,(aa "Proprietary Software Is Often Malware"
255 "https://www.gnu.org/proprietary/proprietary.html"))))))
256
257 (define contact-page
258 (static-page
259 "Contact Information"
260 "contact.html"
261 `((h1 "Contact information")
262 (p "Email is by far my preferred method of communication. I may"
263 " be contacted at any of the following addresses (choose the"
264 " most closely related):")
265 (ul
266 (li "bandali@gnu.org")
267 (li "bandali@uwaterloo.ca")
268 (li "bandali@csclub.uwaterloo.ca"))
269 (p "If you want to send me GPG-encrypted mail, you can use my "
270 ,(aa "public key" "bandali-pubkey.txt") " with the"
271 " fingerprint "
272 (code "BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103")
273 ".")
274 (table
275 (tbody
276 (tr
277 (td "IRC")
278 (td "bandali on " ,(aa "freenode" "https://freenode.net") ", "
279 ,(aa "moznet" "https://wiki.mozilla.org/IRC") ", and "
280 ,(aa "oftc" "https://www.oftc.net")))
281 (tr
282 (td "XMPP")
283 (td ,(aa "bandali@member.fsf.org"
284 "xmpp:bandali@member.fsf.org")))
285 (tr
286 (td "Matrix")
287 (td ,(aa "@bandali:matrix.org"
288 "https://matrix.to/#/@bandali:matrix.org")))
289 (tr
290 (td "Fediverse")
291 (td ,(aa "@bandali@pleroma.site"
292 "https://pleroma.site/bandali")))))
293 (h2 "Elsewhere")
294 (p "You may also find me at a few other places online. Stricken"
295 " through accounts are those I don’t use anymore, unless"
296 " absolutely necessary.")
297 (ul
298 (li ,(aa "bandali" "https://libreplanet.org/wiki/User:Bandali")
299 " on LibrePlanet")
300 (li ,(aa "bandali" "https://emacsconf.org/bandali")
301 " on EmacsConf")
302 (li ,(aa "bandali" "https://savannah.gnu.org/users/bandali")
303 " on Savannah")
304 (li ,(aa "bandali" "https://git.sr.ht/~bandali")
305 " on Sourcehut")
306 (li ,(aa "bandali" "https://lobste.rs/u/bandali")
307 " on Lobsters")
308 (li ,(aa "bandali" "https://hackage.haskell.org/user/bandali")
309 " on Hackage")
310 (li ,(aa "bandali" "https://gitlab.com/bandali")
311 " on GitLab")
312 (li ,(aa "bandali"
313 "https://news.ycombinator.com/user?id=bandali")
314 " on HN")
315 (li ,(aa "bandali" "https://www.reddit.com/u/bandali")
316 " on reddit")
317 (li (del ,(aa "bandali0" "https://github.com/bandali0")
318 " on GitHub"))
319 (li (del ,(aa "bandali0" "https://twitter.com/bandali0")
320 " on Twitter"))))))
321
322 (define cv-page
323 (static-page
324 "Curriculum vitae"
325 "bandali-cv.html"
326 `((h1 "Curriculum vitae (" ,(aa "PDF" "bandali-cv.pdf") ")")
327 (table
328 (tbody
329 (tr
330 (td "Site")
331 (td ,(aa my-domain my-url)))
332 (tr
333 (td "Email")
334 (td "bandali@uwaterloo.ca"))
335 (tr
336 (td "Phone")
337 (td "available upon request via email"))))
338 (h2 "Education")
339 (h3 "Master of Mathematics (Computer Science) | 2018–present")
340 (p "University of Waterloo, Canada")
341 (p "Supervised by Dr. Nancy Day | GPA: 3.7/4.0 | "
342 "Expected completion: April 2020")
343 (p "Research focusing on formal logic, model checking, and "
344 "verification.")
345 (h3 "B.Sc. Honours Computer Science | 2013–2017")
346 (p "York University, Toronto, Canada")
347 (p "GPA: 7.84/9.0")
348 (p "Relevant courses: System Specification & Refinement, "
349 "Software Requirements Eng., Software Design, "
350 "Operating Systems, Computational Complexity, "
351 "Design & Analysis of Algorithms.")
352 (p "Finished first year (2013-14) at " (em "Carleton University")
353 " with a GPA of 11.0/12.0, then transferred to "
354 (em "York University") " in Fall 2014.")
355 (h2 "Publications")
356 (p "Listed on my " ,(aa "homepage" "/#papers"))
357 (h2 "Work & Research Experience")
358 (h3 "Cheriton School of Computer Science, University of Waterloo"
359 " | 2018–present")
360 (p "Instructional Apprentice, Teaching Assistant, "
361 "Research Assistant")
362 (ul
363 (li (abbr (@ (title "Logic and Computation")) "SE 212") ": "
364 (abbr (@ (title "Instructional Apprentice")) "IA") " in "
365 "Fall 2019, "
366 (abbr (@ (title "Teaching Assistant")) "TA") " in "
367 "Fall 2018")
368 (li (abbr (@ (title ,(string-append
369 "Software Requirements Specification and "
370 "Analysis"))) "SE 463")
371 ": TA in Summer 2019 and 2018")
372 (li (abbr (@ (title ,(string-append
373 "Elementary Algorithm Design and "
374 "Data Abstraction"))) "CS 136")
375 ": TA in Winter 2018"))
376 (h3 (abbr (@ (title
377 ,(string-append
378 "Electrical Engineering & Computer Science")))
379 "EECS")
380 " Department, York University | Fall 2017")
381 (p "Teaching Assistant")
382 (p (abbr (@ (title "Net-Centric Introduction to Computing"))
383 "EECS 1012")
384 ": TA in Fall 2017"))))
385
386 (define se212-f19-page
387 (static-page
388 "SE 212 Material"
389 "se212-f19/index.html"
390 `((h1 "Material from SE 212 tutorials")
391 (p "This page contains slides and other material from "
392 ,(aa "SE 212 tutorials"
393 "https://www.student.cs.uwaterloo.ca/~se212/times.html")
394 " held by me in Fall 2019. "
395 (del "If you have any questions, concerns, or suggestions "
396 "about the presented material, please email me at "
397 "bandali@uwaterloo.ca or come see me during my "
398 ,(aa "Friday office hours"
399 "https://www.student.cs.uwaterloo.ca/~se212/personnel.html")
400 "."))
401 (ul
402 (li "Tutorial 1:"
403 (ul
404 (li ,(aa "TUT 101 slides" "se212-t01-101.pdf"))
405 (li ,(aa "TUT 102 slides" "se212-t01-102.pdf"))
406 (li ,(aa "Org beamer sources" "se212-t01.org"))))
407 (li "Tutorial 2:"
408 (ul
409 (li ,(aa "Homework 2 q04d solution"
410 "se212-h02q04d-soln.grg"))))
411 (li "Tutorial 3: —")
412 (li "Tutorial 4: —")
413 (li "Tutorial 5:"
414 (ul
415 (li ,(aa "Slides" "se212-t05.pdf"))
416 (li ,(aa "Org beamer sources" "se212-t05.org"))))
417 (li "Tutorial 6: —")
418 (li "Tutorial 7: worked through questions 1–5 of Homework 7")
419 (li "Tutorial 8: —")
420 (li "Tutorial 9: —")
421 (li "Tutorial 10: worked through questions 1–10 of "
422 "Homework 10")))))
423
424 (site #:title "Amin Bandali"
425 ;; TODO: uncomment after new haunt release
426 ;; #:scheme my-scheme
427 #:domain my-domain
428 #:default-metadata
429 '((author . "Amin Bandali")
430 (email . "bandali@gnu.org")
431 (domain . my-domain))
432 #:readers (list commonmark-reader)
433 #:builders (list (blog #:theme bandali-theme
434 #:collections
435 `(("Notes" "notes.html"
436 ,posts/reverse-chronological)))
437 index-page
438 (atom-feed
439 #:file-name "feed.atom")
440 (atom-feeds-by-tag
441 #:prefix "tags")
442 (rss-feed
443 #:file-name "feed.rss")
444 contact-page
445 cv-page
446 license-page
447 se212-f19-page
448 (static-directory "static" "")))