Project Updates - 2022w15
2022-04-15This week has gone pretty well in terms of building habits.
Last week I started two new habits; reviewing anki and using the pomodoro technique at least once per day.
Starting Monday I had planned to increase the number of pomodoros to twice a day. On Monday, I faltered and only did one pomodoro. Tuesday to today (Friday), I completed 2+ pomodoros every day.
Starting next monday I plan to do 3 per day. I don’t plan to increase it after that, unless I suddenly receive an extra hour out of nowhere.
I’m not sure if I’ll keep doing it indefinitely. Having more flexibility seems nice, but I also want to make sure I’m consistently making progress on my projects.
blog.leroycepearson.dev
I’m continuing work on the AsciiDoc inspired markup language. Right now it’s a [pulldown style API] that generates events for the developer to iterate over. At the moment I’m focused on generating HTML from those events; supporting anything else is for later.
Collapsing the Event type
One of the changes I’m happy with is collapsing the Event into a flat union(enum). We go from an Event
that looks like this:
const Event = union(enum) {
start: Tag,
end: Tag,
text: []const u8,
const Tag = enum {
title,
link,
};
};
To an Event
that looks like this:
const Event = union(enum) {
text: []const u8,
heading_start: usize,
heading_close: usize,
link_start: []const u8,
link_close: []const u8,
url: []const u8,
};
This change was motivated for a few reasons:
- I had no way to pass a link’s URL in the original
Event.Tag
- pulldown-cmark solved this by using a
union
forTag
- pulldown-cmark solved this by using a
- Typing out the tests was a bit annoying, with a lot of superfluous characters.
The new Event
is smaller and easier to work with.
Future plans
- Actually publish these posts
- Find a place to host it
- Set up DNS stuff
- Set up automatic deployment
- Figure out what exactly I want to write about