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