awarm.spacenewsletter | fast | slow

Implementing a map function

Last week I set myself two very vague goals:

1. Add a compiler to fancynote, i.e execute some kind of code in a notes file
2. Write an essay based on prompts I've collected over the last couple weeks

That went predictably well. I left them till this Sunday night, and well, kinda got them somewhat halfway done!

Executing some code

I decide to implement a map function (instead of the standard arithmetic) as hey, it's actually useful for the things I want to do, and that's the whole point of this.

Mapping lets me process a list of things to produce a new list. It's going to be immediately useful for making index pages for browsing notes, but I imagine it will be useful for all sorts of other things as well.

This is the kinda ethos I want to capture in a course for hyperlink.academy (Check out that swank new landing page by the way). Learning to make tools that you actually need. We're running the first Meta course this coming week and I'm hella excited to dive into course development. Oh and we also finally set up a new mailing-list, which you fine folks might want to subscribe to.

Back to mapping

The map functiontechnically works. Well, to be more specific, it works if it's written entirely on one line. otherwise, the whole thing craps out

As I mention in my worklog, the source of this problem is the tension between my two goals right now:

  1. Produce nice readable output
  2. Execute code

The tension lies in how we process files. The former requires that I store a lot of position data, i.e where lines and spaces are. The latter doesn't need any of the data, and it just gets in the way. The naive way of doing this doing the former means just keep the data around as tokens, and the naive way of doing the latter means just throw them out.

So, I have to be a little less naive here! I'm not quite sure what I'm going to do yet, but it's my number one goal for next week.

Writing an essay

I for some reason I can't recall set myself the task of writing an essay. While I didn't quite finish it, I did start up a draft on "What notetaking tools can learn from programming languages". Right now it's a basically just individual points that I plan to assemble into a cohesive whole.

I cover specific concepts, like autocomplete, dependency management, and naming things and scope.

I want to elaborate on all of these further and tie them up into the larger idea that programs can let us navigate the dynamic nature of notes extremely naturally.

Next Week

  1. Figure out how to pretty-print while still maintaining a clean AST
  2. Write my daily journal in fancynote
  3. Revise the essay on what notetaking apps can learn from programming languages and tooling.