diff --git a/build.boot b/build.boot index e02dcf6..442befc 100644 --- a/build.boot +++ b/build.boot @@ -13,16 +13,23 @@ '[site.core]) (deftask build [] - (comp (perun/pandoc) - (perun/highlight) + (comp (perun/draft) + (perun/pandoc :cmd-opts ["-f" "markdown" "-t" "html5"]) (sift :to-resource #{#"^img/(.*)"}) - (sift :move {#"^img/(.*)" "public/img/$1"}) (sift :to-resource #{#"^extra/(.*)"}) - (sift :move {#"^extra/(.*)" "public/extra/$1"}) (garden :styles-var 'site.styles/base :output-to "main.css") + (perun/ttr) ;; Time to read + (perun/word-count) (perun/render :renderer 'site.core/page) + (perun/permalink :filterer (fn [p] (not= (:slug p) "index"))) + (perun/collection :renderer 'site.core/page-blog + :filterer (fn [p] (:title p)) ; don't list anything without a title + :sortby :date + :page "blog/index.html" :out-dir "") (perun/sitemap :filename "sitemap.xml") - (sift :move {#"^public/(.*)" "$1"}))) + (sift :move {#"^public/(.*)" "$1"}))) ; perun/render ignores out-dir for some reason + + (deftask dev [] (comp (watch) diff --git a/content/customizing-emacs.md b/content/customizing-emacs.md index f6de212..54ca6cf 100644 --- a/content/customizing-emacs.md +++ b/content/customizing-emacs.md @@ -27,12 +27,12 @@ the date of the lesson. Sure, glancing at the date to the corner of my screen and writing it down takes just a few seconds, but why not write a command to do it for me? Here is what I came up with: -```commonlisp +~~~commonlisp (defun insert-current-date () "Insert the current date in YYYY-MM-DD format." (interactive) (shell-command "date +'%Y-%m-%d'" t)) -``` +~~~ Now that was easy and convenient. And being able to write my first piece of Elisp so easily was really fun, so I decided to tackle diff --git a/content/extra/Crafty Poster.pdf b/content/extra/Crafty Poster.pdf new file mode 100644 index 0000000..7cdc040 Binary files /dev/null and b/content/extra/Crafty Poster.pdf differ diff --git a/content/extra/DepAware Poster.pdf b/content/extra/DepAware Poster.pdf new file mode 100644 index 0000000..0c82379 Binary files /dev/null and b/content/extra/DepAware Poster.pdf differ diff --git a/content/extra/emacs.css b/content/extra/emacs.css new file mode 100644 index 0000000..58a26e2 --- /dev/null +++ b/content/extra/emacs.css @@ -0,0 +1,70 @@ +/* pygments.org "emacs" style */ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #008800; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800 } /* Comment.Preproc */ +.highlight .cpf { color: #008800; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #AA22FF } /* Keyword.Pseudo */ +.highlight .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BB4444 } /* Literal.String */ +.highlight .na { color: #BB4444 } /* Name.Attribute */ +.highlight .nb { color: #AA22FF } /* Name.Builtin */ +.highlight .nc { color: #0000FF } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #00A000 } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #B8860B } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BB4444 } /* Literal.String.Affix */ +.highlight .sb { color: #BB4444 } /* Literal.String.Backtick */ +.highlight .sc { color: #BB4444 } /* Literal.String.Char */ +.highlight .dl { color: #BB4444 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BB4444 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BB4444 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BB4444 } /* Literal.String.Single */ +.highlight .ss { color: #B8860B } /* Literal.String.Symbol */ +.highlight .bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #00A000 } /* Name.Function.Magic */ +.highlight .vc { color: #B8860B } /* Name.Variable.Class */ +.highlight .vg { color: #B8860B } /* Name.Variable.Global */ +.highlight .vi { color: #B8860B } /* Name.Variable.Instance */ +.highlight .vm { color: #B8860B } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/content/index.markdown b/content/index.markdown index 029944b..6f26b4e 100644 --- a/content/index.markdown +++ b/content/index.markdown @@ -16,7 +16,7 @@ performance and scalability impacts.
Kaan Genç, Michael D. Bond, and Guoqing Harry Xu
ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020), Online, June 2020
-[Talk](https://www.youtube.com/watch?v=wdVLlQXV1to) [Paper](https://dl.acm.org/doi/10.1145/3385412.3385991) [Extended Paper](https://arxiv.org/pdf/2004.00262.pdf) [Implementation](https://github.com/PLaSSticity/Crafty) +[Talk](https://www.youtube.com/watch?v=wdVLlQXV1to) [Paper](https://dl.acm.org/doi/10.1145/3385412.3385991) [Extended Paper](https://arxiv.org/pdf/2004.00262.pdf) [Implementation](https://github.com/PLaSSticity/Crafty) [Poster](/extra/Crafty Poster.pdf) @@ -25,7 +25,7 @@ performance and scalability impacts.
Kaan Genç, Jake Roemer, Yufan Xu, and Michael D. Bond
ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2019), Athens, Greece, October 2019
-[Talk](https://www.youtube.com/watch?v=YgZWnc31tVQ) [Paper](https://dl.acm.org/doi/10.1145/3360605) [Extended Paper](https://arxiv.org/pdf/1904.13088.pdf) [Implementation](https://github.com/PLaSSticity/SDP-WDP-implementation) +[Talk](https://www.youtube.com/watch?v=YgZWnc31tVQ) [Paper](https://dl.acm.org/doi/10.1145/3360605) [Extended Paper](https://arxiv.org/pdf/1904.13088.pdf) [Implementation](https://github.com/PLaSSticity/SDP-WDP-implementation) [Poster](/extra/DepAware Poster.pdf) diff --git a/content/pass.md b/content/pass.md index d7aed90..11bfd3f 100644 --- a/content/pass.md +++ b/content/pass.md @@ -9,10 +9,10 @@ For some time, I used LastPass to store my passwords. While LastPass works well, Pass uses GPG keys to encrypt the passwords, and git to keep revisions and backups. It integrates well with the shell, and there is a dmenu script, a Firefox plugin and an Android app. All the passwords are just GPG enrypted files, stored in some folders anyway, so you don't need anything special to work with them. -![passmenu, the dmenu pass script](/static/passmenu.png) +![passmenu, the dmenu pass script](/img/passmenu.png) So first, I needed to migrate my passwords from LastPass to pass. The website lists some scripts for migration, but sadly I missed that when I first looked at the page. So I decided to write a [python script to handle the migration](https://gist.github.com/SeriousBug/e9f33873d10ad944cbe6) myself. It inserts all passwords in `domain/username` format, and if there is any extra data written, it is added after the password as well. Secure notes are placed into their own folder, and any "Generated Password for ..." entries are skipped. If you're migrating from LastPass to pass, feel free to give it a try. If you are taking an export from their website however, do make sure that there is no whitespace before and after the csv. -![Password Store, the pass Android app](/static/password_store.png) +![Password Store, the pass Android app](/img/password_store.png) I certainly recommend trying out pass. It works very well, and it fits in with the unix philosophy. diff --git a/src/site/core.clj b/src/site/core.clj index 72be5a8..04f701e 100644 --- a/src/site/core.clj +++ b/src/site/core.clj @@ -5,26 +5,37 @@ (defn format-time [time] (.format (-> time .toInstant (.atZone (java.time.ZoneId/systemDefault)) .toLocalDate) (java.time.format.DateTimeFormatter/ofPattern "MMM d, yyyy"))) +(defn page-header [& [title]] + [:head + [:meta {:charset "utf-8"}] + [:link {:rel "stylesheet" :href "/main.css"}] + [:link {:rel "stylesheet" :href "/extra/emacs.css"}] + [:title (when title (str title " - ")) "Homepage of Kaan Genç"] + [:link {:href + "https://fonts.googleapis.com/css2?family=Ubuntu+Mono&family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap" + :rel "stylesheet"}]]) + +(defn page-left-column [& [slug]] + [:div.sidebar.column + (when (not= slug "index") [:a.home {:href "/"} "Home"]) + [:img.picture {:alt "A photo of Kaan Genç, after his OOPSLA 2019 talk." :src "/img/profile.jpg"}] + [:div.name "Kaan Genç"] + [:div.title "PhD Student"] + [:div.department "Computer Science & Engineering"] + [:div.affiliation "The Ohio State University"] + [:span [:a.email {:href "mailto:genc.5@osu.edu"} "genc.5@osu.edu"] [:a.gpg {:href "/extra/kaangenc.gpg"} "GPG key"]] + [:a.github {:href "https://github.com/SeriousBug"} "Github"] + [:a.github {:href "https://twitter.com/KaanGencCS"} "Twitter"] + [:a.researchr {:href "https://conf.researchr.org/profile/kaangenc"} "Researchr"] + [:a.cv {:href "/extra/cv.pdf"} "CV"] + [:a.blog {:href "/blog/"} "Blog"]]) + + + (defn page [{global-meta :meta posts :entries post :entry}] (hp/html5 - [:head - [:meta {:charset "utf-8"}] - [:link {:rel "stylesheet" :href "main.css"}]] - [:title "Homepage of Kaan Genç"] - [:link {:href - "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap" - :rel "stylesheet"}] - [:div.sidebar.column - [:img.picture {:alt "A photo of Kaan Genç, after his OOPSLA 2019 talk." :src "/img/profile.jpg"}] - [:div.name "Kaan Genç"] - [:div.title "PhD Student"] - [:div.department "Computer Science & Engineering"] - [:div.affiliation "The Ohio State University"] - [:span [:a.email {:href "mailto:genc.5@osu.edu"} "genc.5@osu.edu"] [:a.gpg {:href "/extra/kaangenc.gpg"} "GPG key"]] - [:a.github {:href "https://github.com/SeriousBug"} "Github"] - [:a.github {:href "https://twitter.com/KaanGencCS"} "Twitter"] - [:a.researchr {:href "https://conf.researchr.org/profile/kaangenc"} "Researchr"] - [:a.cv {:href "/extra/cv.pdf"} "CV"]] + (page-header (:title post)) + (page-left-column (:slug post)) (if (= "index" (:slug post)) ;; Index page [:div.main.column (:content post)] @@ -33,4 +44,15 @@ [:h1.post-title (:title post)] [:div.date "Written at " (-> post :date format-time)] (when (:modified post) [:div.modified "Last edited at " (-> post :modified format-time)]) + [:div.ttr (:word-count post) " words, takes about " (:ttr post) " minutes to read"] (:content post)]))) + + +(defn page-blog [{global-meta :meta posts :entries post :entry}] + (hp/html5 + (page-header "Blog") + (page-left-column) + (into [:div.main.column [:h1 "My thoughts on software & computer science"]] + (map (fn [{:keys [title permalink ttr date] :as post}] + [:a.post-listing {:href permalink} [:span.title title] [:br] [:span.ttr ttr " minute read, "] [:span.date (format-time date)]]) + posts)))) diff --git a/src/site/styles.clj b/src/site/styles.clj index 5d332bd..ad3c36f 100644 --- a/src/site/styles.clj +++ b/src/site/styles.clj @@ -5,8 +5,17 @@ (def textcolor-main "rgba(0, 0, 0, 0.87)") (defstyles base + ; normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css + ; Adapted to Garden and trimmed + [:html {"-webkit-text-size-adjust" "100%"}] + [:body {:margin "0"}] + [:main {:display "block"}] + [:a {:background-color "transparent"}] + [:img {:border-style "none"}] + ; Website styles [:.main - {:max-width "600px"}] + {:max-width "600px" + :line-height "1.4"}] [:h1 {:font-size "1.5em"}] ["h1:not(:first-child)" {:margin-top "2em"}] [:h2 {:font-size "1.3em"}] @@ -14,8 +23,9 @@ ["img, .img" {:border-radius "5px" :max-width "100%"}] [:.sidebar {:max-width "300px"} - [">a,span" {:display "block" :padding "10px 0"}] [:.gpg {:font-size "0.8em" :margin-left "20px"}]] + [".sidebar>a,.sidebar>span" {:display "block" :padding ".5em 0"}] + [:.post-listing {:margin ".5em 0" :display "block"} [:.ttr {:margin-left "20px"}]] [:.column {:flex "auto" :padding "20px"}] @@ -27,19 +37,28 @@ :justify-content "center" :color textcolor-main :background-color "#ffead1" - :font-family "Ubuntu, sans-serif" + :font-family "'Ubuntu', sans-serif" :font-size "16px" :line-height 1.2}] [:a {:text-decoration "none" :color "#ae3100"}] ["a:link"] - ["a:visited" {:color "#681e00"}] + ["a:visited" {:color "#932900"}] ["a:hover"] ["a:active"] + [".date, .modified, .ttr" {:color "rgba(0, 0, 0, 0.67)" :text-align "right"}] + [:.other-stuff {:margin-top "4em"} [:img {:float "left" :max-width "250px" :margin-right "40px"}]] + ["code, pre" {:font-size "0.95em" :font-family "'Ubuntu Mono', monospace"}] + ["pre, :not(pre) > code" {:background-color "rgba(0, 0, 0, 0.15)" :overflow-x "auto" + :border-radius "10px" + :padding "3px" + :margin "-3px 0"}] + + [:a.home {:font-size "1.2em" :margin "0 20px"}] [:.name {:padding "10px 0" :font-size "1.2em"}] [:.publication [:p [:a {:padding "0 10px"}]]]