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