Browse Source

posts: fix edgecase | editor: cleanup

main
J. Sims 7 months ago
parent
commit
20fc57f35f
  1. 4
      editor.hy
  2. 40
      templates/posts/2021-05-04.html

4
editor.hy

@ -81,8 +81,8 @@ This application will serve as a platform to edit and deploy posts.
(setv new-file (.replace new-file (get template "infix3") replace-text))
(setv file-arr (.split new-file replace-text))
(return {"title" (get file-arr 0)
"summary" (.rstrip (get file-arr 2) "\n")
"content" (get file-arr 3)}))
"summary" (get file-arr 2)
"content" (get file-arr 3)}))
;; thunk
;; save current contents of editor to disk

40
templates/posts/2021-05-04.html

@ -11,26 +11,26 @@
{% endblock summary %}
{% block content %}
<p>
Recently, I've been listening to a lot of <a href="https://fossandcrafts.org/">
FOSS and Crafts</a>, a podcast about free software and broader free culture as well
as a variety of other nerdy topics hosted by Morgan Lemmer-Webber, an art historian
studying Roman textiles, and her spouse Chris, who you may know from their work on
the <a href="https://wikipedia.org/wiki/ActivityPub">ActivityPub</a> standard and the
<a href="https://spritelyproject.org">Spritely</a> project. This latter (or, rather, a
talk on it where Chris mentioned using <a href="https://racket-lang.org">Racket</a>)
inspired me to try to pick up Racket, and
I decided to start by working my way through <a href="https://htdp.org">How to Design
Programs</a> second edition (2htdp). Long story short, the
<a href="https://wikipedia.org/wiki/Lisp_(programming_language)">Lisp</a>-y language
used for teaching in that book led
me to really fall in love with Lisps (even though, disclaimer! I'm still very much new
to them). While working my way from Wikipedia article to Wikipedia article on the
various Lisp families and implementations, I came across
<a href="https://docs.hylang.org">Hy</a>, a "Lisp" (we'll get to that)
which runs on the <a href="https://python.org">Python</a> interpreter.
Seeing that it could use Python modules just like normal, and given my newfound interest
in Lisps, I decided to rewrite my website in it. And, being the FOSS-y advocate I am, I
figured I should write about the experience. So here's that write-up!
Recently, I've been listening to a lot of <a href="https://fossandcrafts.org/">
FOSS and Crafts</a>, a podcast about free software and broader free culture as well
as a variety of other nerdy topics hosted by Morgan Lemmer-Webber, an art historian
studying Roman textiles, and her spouse Chris, who you may know from their work on
the <a href="https://wikipedia.org/wiki/ActivityPub">ActivityPub</a> standard and the
<a href="https://spritelyproject.org">Spritely</a> project. This latter (or, rather, a
talk on it where Chris mentioned using <a href="https://racket-lang.org">Racket</a>)
inspired me to try to pick up Racket, and
I decided to start by working my way through <a href="https://htdp.org">How to Design
Programs</a> second edition (2htdp). Long story short, the
<a href="https://wikipedia.org/wiki/Lisp_(programming_language)">Lisp</a>-y language
used for teaching in that book led
me to really fall in love with Lisps (even though, disclaimer! I'm still very much new
to them). While working my way from Wikipedia article to Wikipedia article on the
various Lisp families and implementations, I came across
<a href="https://docs.hylang.org">Hy</a>, a "Lisp" (we'll get to that)
which runs on the <a href="https://python.org">Python</a> interpreter.
Seeing that it could use Python modules just like normal, and given my newfound interest
in Lisps, I decided to rewrite my website in it. And, being the FOSS-y advocate I am, I
figured I should write about the experience. So here's that write-up!
</p>
<p>
Firstly, let's discuss Hy a bit because I think it's pretty kick-ass. Basically, the