Changing Structure
Published Thu Feb 08 2024After writing these posts for nearly a month I’m ready to start making some structural changes to my site. First is going to be updating old posts. I intend to go back to earlier posts and expand upon them in some way. These are currently sorted by created date, but I am going to try sorting by modified date once I update one.
Along with this I plan to add some tags, though I don’t think they will be too impactful at the moment since I do not have that much posted here yet. All I have for today, here is some fennel I am messing with to sort my notes. It doesn’t work yet, I’ll get it tomorrow :)
(fn key_to_list [key]
(var result [])
(var curr "")
(var curr_type :num)
(for [i 1 (length key)]
(var k (string.sub key i i))
(var k_type "")
(if (= (tonumber k) nil)
(set k_type "alpha")
(set k_type "num"))
(if (not (= k_type curr_type))
(table.insert result curr)
(set curr_type k_type)
(set curr k)
(set curr (.. curr k))
))
result
)
(fn an_srt [items]
(each [k v (ipairs items)]
(print (key_to_list v))
)
)
(an_srt [:1z :1a :2 :2a :2b :2a1])