2022w16 Project Updates
2022-04-22Got a bunch of little things done.
Job Search
I’ve done a terrible job at searching for jobs. Part of that is because I have a full time job and I have a hard time getting myself to do anything.
The other part, which I just realized this week, is that I’m not excited to find a “programming job.” I’ve never clearly thought about what I want from a job. What make me excited to get up in the morning and work on something?
I’m planning on writing some blog posts exploring that.
Time Managment
This week I’d planned on doing 3 pomodoros every day, but I wasn’t able to keep to that. On Tuesday and Wednesday I had appointments that to attend and didn’t get everything done.
Tuesday I was expecting. Wednesday I hoped to get 3 pomodoros in, but I didn’t have the will to work afterwards.
Exercise
I’ve decided to switch up my workout schedule. Instead of working out for 30 minutes each morning, I want to:
- do 5-10 reps of crunches, pushups, etc. each morning
- do a 30 minute workout Saturday morning and Wednesday afternoon each week
With my bike commute and generally active job ATM, I think I’ll get enough active minutes in.
Sleep
I swapped my bedtime suspend script at 18:45 for a shutdown script at 19:45. This has been more effective so far, but I might patch some holes in the scripts logic if I start to abuse it.
I think I prefer the more relaxed time limit with the stricter control.
Memory
- Kept up Anki habit
- Mnosis just realeased, gonna give it try
- Started reading “You Can Have An Amazing Memory” by Dominic O’Brien
blog.leroycepearson.dev
I added my character sheet to the blog this week.
Markup
Blog markup! I’m still having fun with this.
Pretty Printed HTML
One of the arbitrary decisions I made was to make the HTML output look pretty. If I was writing my blog post in HTML instead of this markup language, how would I format it? To get an idea of what this means, here is some text markup:
* Finally got a markup implementation I'm happy with
** I suffer from NIH syndrome; send help
** Made my own markup based on asciidoc
* Only dependency is Zig; `zig build install --prefix /website_files/here/`
* Tokenizer based on Data Oriented Design/Zig stage 2
* Future plans:
** Integrate markup rendering into `zig build`, remove separate binaries
** New markup/asciidoc features as required for my writing
*** Ex: inline emphasis/bold/code markings (not implemented as of writing, prob implemented before publishing)
** Live reloading
*** Maybe separate script, e.g. `entr` and a way to list files to watch
And this is the resulting HTML:
<ul>
<li>Finally got a markup implementation I'm happy with
<ul>
<li>I suffer from NIH syndrome; send help
<li>Made my own markup based on asciidoc
</ul>
<li>Only dependency is Zig; <code>zig build install --prefix /website_files/here/</code>
<li>Tokenizer based on Data Oriented Design/Zig stage 2
<li>Future plans:
<ul>
<li>Integrate markup rendering into <code>zig build</code>, remove separate binaries
<li>New markup/asciidoc features as required for my writing
<ul>
<li>Ex: inline emphasis/bold/code markings (not implemented as of writing, prob implemented before publishing)
</ul>
<li>Live reloading
<ul>
<li>Maybe separate script, e.g. <code>entr</code> and a way to list files to watch
</ul>
</ul>
</ul>
Test Filtering
I’ve been building a habit of writing tests before implementing features, so I decided to go ahead and implment test filtering in the blogs build.zig
. It was pretty easy to do, just adding this one line to the build.zig
was enough:
test_tokenizer.setFilter(b.option([]const u8, "test-filter", "which tests to run"));
However, there were some… complications. Doing zig build test -Dtest-filter="hello world"
would result in now tests being run, even if there was a test named “hello world”. Eventually, I realized that my shell was passing in "hello world"
as the option, instead of hello world
.
Asciidoc Tables
I added support for Asciidoc style tables! Now I can make tables like so:
|===
|col a|col b
|row 1a|row 1b
|row 2a|row 2b
|===
col a | col b |
---|---|
row 1a | row 1b |
row 2a | row 2b |
Listing Block Attributes
Support for block attributes was also implemented. Right now [source]
is the only thing supported, and everything else will be ignored. In the future I want to support syntax highlighting when you set [source,lang]
.
Block attributes look like this:
[source,asciidoc]
// A block here!
Switch to Cursor?
I’ve got a bunch of stuff I want to reimplement in the markup parsing code, one of those things being how I handle the posistion. Right now postion is attached to the parser with functions mutating it as they see fit. I want to move to a more functional API where the current position is passed in, and then the ending position is returned.