6a6f113315b6e294660ebb5d645983942f60b98d
[~bandali/bndl.org] / haunt.scm
1 (use-modules (haunt asset)
2 (haunt builder blog)
3 (haunt builder atom)
4 (haunt builder assets)
5 (haunt html)
6 (haunt page)
7 (haunt post)
8 (haunt reader commonmark)
9 (haunt site)
10 (haunt utils)
11 (ice-9 match)
12 (srfi srfi-19))
13
14 (define (stylesheet name)
15 `(link (@ (rel "stylesheet")
16 (href ,(string-append "/" name ".css")))))
17
18 (define* (base-layout site body #:key title)
19 `((doctype "html")
20 (html
21 (head
22 (meta (@ (charset "utf-8")))
23 (title ,(if title (string-append title " — " (site-title site))
24 "Amin Bandali’s Personal Site"))
25 ,(stylesheet "reset")
26 ,(stylesheet "style"))
27 (body
28 (main ,body)
29 (footer
30 (p
31 "Copyright 2016–2019 Amin Bandali. See "
32 (a (@ (href "license.html")) "license.html")
33 " for license conditions. Please copy and share."))))))
34
35 (define (bandali-post-template post)
36 `((header
37 (h1 ,(post-ref post 'title))
38 (address "By "
39 (a (@ (href "/"))
40 ,(post-ref post 'author))
41 " <" ,(post-ref post 'email) ">")
42 (p (@ (class "date"))
43 ,(date->string (post-date post) "~B ~d, ~Y")))
44 ,(post-sxml post)))
45
46 (define (bandali-collection-template site title posts prefix)
47 (define (post-uri post)
48 (string-append (or prefix "") "/"
49 (site-post-slug site post) ".html"))
50
51 `((h3 ,title)
52 (ul
53 ,@(map (lambda (post)
54 `(li
55 (a (@ (href ,(post-uri post)))
56 ,(post-ref post 'title))
57 " — " ,(date->string (post-date post) "~B ~d, ~Y")))
58 posts))))
59
60 (define bandali-theme
61 (theme #:name "bandali"
62 #:layout
63 (lambda (site title body)
64 (base-layout site body
65 #:title title))
66 #:post-template bandali-post-template
67 #:collection-template bandali-collection-template))
68
69 (define (index-material site posts)
70 `(div
71 (h1 (@ (style "font-size: 0;"))
72 "Amin Bandali")
73 (p (@ (style "margin-top: 0;"))
74 "Hi, I’m "
75 (a (@ (href "images/bandali-with-rms.jpg")
76 (title ,(string-append
77 "photo of bandali with rms wearing a "
78 "“pay cash don’t be tracked” pin")))
79 "Amin Bandali")
80 ". I’m a graduate student at "
81 (a (@ (href "https://watform.uwaterloo.ca"))
82 "WatForm")
83 " at University of Waterloo, supervised by "
84 (a (@ (href "https://cs.uwaterloo.ca/~nday/"))
85 "Dr. Nancy Day")
86 ". The main goal of my research is improving "
87 (strong "software and systems reliability")
88 " through application of " (em "formal methods") ".")
89 (p "My research at WatForm focuses on formal logic, model "
90 "checking, and verification. I’m also interested in "
91 "programming languages, theorem provers, and their "
92 "type systems. You may wish to view my academic "
93 (a (@ (href "bandali-cv.html")) "curriculum vitae") ".")
94 (p (@ (class "notice"))
95 (strong "SE 212 students: ")
96 "see " (a (@ (href "se212-f19/")) "here") " for slides and "
97 "other material from the tutorials.")
98 (p "On the side, I dabble in "
99 (a (@ (href "https://leanprover.github.io")) "Lean")
100 " and enjoy "
101 (a (@ (href "https://stallman.org/articles/on-hacking.html"))
102 "hacking")
103 " on "
104 (a (@ (href "https://www.gnu.org/software/emacs/manual/elisp.html"))
105 "Elisp")
106 ". I’m a "
107 (a (@ (href "https://www.gnu.org/philosophy/free-sw.html"))
108 "Free Software")
109 " activist and FSF "
110 (a (@ (href "https://www.fsf.org/associate/")) "supporter")
111 ", and a GNU "
112 (a (@ (href "https://www.gnu.org/people/#bandali"))
113 "maintainer")
114 " and "
115 (a (@ (href "https://www.gnu.org/people/webmeisters.html#bandali"))
116 "webmaster")
117 ". I co-host the "
118 (a (@ (href "https://emacsel.com")) "Emacs.el")
119 " podcast with "
120 (a (@ (href "https://www.pygopar.com"))
121 "Daniel Gopar") ", and organize "
122 (a (@ (href "https://emacsconf.org")) "EmacsConf") " with help"
123 " from many wonderful people. I am also a member of the"
124 " Systems Committee for the "
125 (a (@ (href "https://csclub.uwaterloo.ca")
126 (title ,(string-append
127 "Computer Science Club of the "
128 "University of Waterloo"))) "CSC")
129 ".")
130 (p "See my " (a (@ (href "contact.html")) "contact") " page for "
131 "how to best reach me.")
132 (h2 (@ (id "papers")) "Papers")
133 (dl
134 (dt "A Comparison of the Declarative Modelling Languages B, DASH,
135 and TLA" (sup "+")
136 (span (@ (class "plinks"))
137 " [ "
138 (a (@ (href "papers/modre2018-declarative.pdf"))
139 "pdf")
140 " | "
141 (a (@ (href "papers/modre2018-declarative.bib"))
142 "bib")
143 " ]"))
144 (dd "Ali Abbassi, "
145 (a (@ (href "https://bandali.eu.org")) "Amin Bandali") ", "
146 (a (@ (href "https://cs.uwaterloo.ca/~nday/"))
147 "Nancy A. Day")
148 ", and Jose Serna"
149 (br)
150 (em "2018 IEEE 8th International Model-Driven Requirements"
151 " Engineering Workshop (MoDRE)")
152 (br)
153 "Copyright © 2018 IEEE. All Rights Reserved. Sadly."))
154 (h2 (@ (id "talks")) "Talks")
155 (dl
156 (dt
157 "The Magic of Specifications and Type Systems"
158 (span (@ (class "plinks"))
159 " [ "
160 (a (@ (href "talks/cucsc-2017-slides.pdf")
161 (title ,(string-append
162 "presented at the Canadian Undergraduate"
163 " Computer Science Conference 2017,\n"
164 "University of Toronto, Canada,"
165 "June 15–17, 2017")))
166 "slides")
167 " | "
168 (a (@ (href "talks/eecs4080-poster.pdf")
169 (title ,(string-append
170 "presented at the Lassonde Undergraduate"
171 " Summer Student Research Conference,\n"
172 "York University, Toronto, Canada,"
173 "August 15, 2017")))
174 "poster")
175 " ]"))
176 (dd (a (@ (href "https://bandali.eu.org")) "Amin Bandali") ", "
177 (a (@ (href "https://github.com/cipher1024"))
178 "Simon Hudon")
179 ", "
180 (a (@ (href "http://www.cse.yorku.ca/~jonathan/"))
181 "Jonathan S. Ostroff")))
182 (h2 (@ (id "projects")) "Projects")
183 (p "Below are a number of free software projects I have worked "
184 "on:")
185 (dl
186 (dt (a (@ (href "https://git.sr.ht/~bandali/george-mode"))
187 "george-mode"))
188 (dd "Emacs major mode for editing George files")
189 (dt (a (@ (href "https://git.uwaterloo.ca/bandali/alloy-catalyst"))
190 "alloy-catalyst"))
191 (dd "Framework for performance analysis of Alloy models")
192 (dt (a (@ (href "https://github.com/unitb/unitb-web"))
193 "unitb-web"))
194 (dd "Web interface for Unit-B")
195 (dt (a (@ (href "https://github.com/unitb/tex2png-hs"))
196 "tex2png-hs"))
197 (dd "Library and CLI for converting TeX and LaTeX to PNG "
198 "images"))
199 (h2 (@ (id "notes")) "Notes")
200 (table
201 (@ (class "post-list"))
202 (tbody
203 ,@(map
204 (lambda (post)
205 (define (post-uri post)
206 (string-append "/"
207 (site-post-slug site post) ".html"))
208 `(tr
209 (td (a (@ (href ,(post-uri post)))
210 ,(post-ref post 'title)))
211 (td (@ (style "font-size: 0.875em;"))
212 ,(date->string (post-date post) "~B ~d, ~Y"))))
213 (take-up-to 10 (posts/reverse-chronological posts)))))))
214
215 (define (index-page site posts)
216 (make-page
217 "index.html"
218 (base-layout site (index-material site posts))
219 sxml->html))
220
221 (define my-domain "bandali.eu.org")
222
223 (site #:title "Amin Bandali"
224 #:domain my-domain
225 #:default-metadata
226 '((author . "Amin Bandali")
227 (email . "bandali@gnu.org")
228 (domain . my-domain))
229 #:readers (list commonmark-reader)
230 #:builders (list (blog #:theme bandali-theme
231 #:collections
232 `(("Notes" "notes.html"
233 ,posts/reverse-chronological)))
234 index-page
235 (atom-feed)
236 (atom-feeds-by-tag)
237 (static-directory "static" "")))