MIC-03-2 My Bike outline automatically converted to markdown for Obsidian

I\'m pleased that I reached a programming milestone. Now whenever I save my main Bike outline (overall.bike), my CLI for interacting with Bike (and Bike outlines) is fired off (specifically, bike.py pandoc). I use Hammerspoon to look for changes in the enclosing directory for overall.bike and then I have some logic to check for telltale changes in overall.bike. I was stuck for a while: It turns out that the tricky part is detecting reliably whether there is data on stdin. My solution is good enough for now, but I will probably revisit it.

MIC-03-1 Writing and programming all day: so close

I've been writing all day, with a fluency that I've not had in a long while. What I've written isn't ready for sharing with the public, however. I've also made some good progress in getting my script to run but I'm stuck on an issue that might take 10 more minutes to solve -- or hours. I'm surprised that I'm serenely accepting however long it ends up taking. What choice do I have?

MIC-02-5 Small progress during a busy end of week

I set the stage for command groups in bike.py with [my latest change to bike.py](added sel2pb command to bike.py · rdhyee/python-learning@a161fe9).

It seems that Keyboard Maestro doesn't allow for watching for changes in files that already exist. Maybe, more likely, I've just not been able to figure out how. I have some progress using hammerspoon though. Here's a relevant part of my init.lua:


function list_true_flags(flags)
  local true_flags = " "
  for key, value in pairs(flags) do
    if value then
      true_flags = true_flags .. key .. " | "
    end
  end
  return true_flags
end

function fileModifiedCallback(paths, flagTables)
  for i, file in ipairs(paths) do
    if file == "/Volumes/ryvault1/MacHD/Users/raymondyee/obsidian/MainRY/bike/overall.bike" then
      local flags = flagTables[i]
      print(i, file)
      print_true_flags(flags)

      local timestamp = os.date("%Y-%m-%d %H:%M:%S")
      -- local message = timestamp .. " overall.bike changed\n"

      local logFile = io.open("/tmp/hschange.log", "a")
      logFile:write(timestamp .. list_true_flags(flags) .. "\n")
      logFile:close()
    end
  end
end

watcher = hs.pathwatcher.new("/Volumes/ryvault1/MacHD/Users/raymondyee/obsidian/MainRY/bike", fileModifiedCallback)
watcher:start()

MIC-02-3 Sick day

I woke up with a sore throat this morning: oh oh. I'm glad that I took my Sweetie's advice to take an afternoon nap. I'm feeling slightly better but should continue to rest today. I did make some tiny progress by using click to add parameters to python-learning/bike/bike.py at 62005c488359f587f1863457c5eba24bd0863688 · rdhyee/python-learning. I can now use Keyboard Maestro to launch bike.py and change the base heading level through a prompt. I hope to be programming with energy tomorrow. 🙂

MIC 02-2 Refining bike.py with more options and a better understanding of Pandoc

bike.py (python-learning/bike/bike.py at f1bf45be1e886bf66c3dad97d3b0694a847528b3 · rdhyee/python-learning) is my working script for converting the currently selected rows in Bike (and their enclosed rows) to Obsidian flavored markdown, copying that markdown to the clipboard, and also writing it to a ScratchPad note in my Obsidian vault.

I am working on more fully integrating bike.py into my workflow before polishing the script to make it more useful to others and easier to maintain.

On my programming to-do list today and tomorrow are:

  • relearn Click and try out Typer so that I can add arguments and options to bike.py to change bike.py from a single purpose script to a script that will ultimately handle all aspects of automating the Bike program.
  • grok the containment hierarchy of the Pandoc AST -- what elements are allowed where in the tree hierarchy, specifically, whether I can wrap list items into anything other than a list-like container. I will study Document structure - Pandoc (Python Library) and use the Python pandoc library to help me grok the Pandoc metamodel.

MIC 02-1 A few thoughts about writing

Because I'm forcing myself to write in public during MyInfoCamp, I've been reflecting on how I write. I’m currently seeking a productive mix of "linear" and "nonlinear" writing. By linear writing, I mean, putting one word after another, and finishing one sentence before moving to writing my next sentence. (for some people, that means writing, plain and simple). By contrast, "nonlinear writing" is how I usually write: spitting out a collection of words and phrases as they come to mind, letting myself flit among ideas. I like to write in an outliner (such as Bike) because the outliner makes arranging the phrases into a hierarchy much easier than Microsoft Word. I have many notes scattered through my computer with lots of unrefined ideas, the side effects of my nonlinear writing process.

During the last week, I decided to shift more of my energy to writing linearly. I love the refreshing change, which seems to help me to deal with one of my perennial problems: too much "work in progress" (WIP). As the Kanban project methodology teaches, it's crucial to limit WIP; otherwise, it becomes very difficult to finish anything, because your efforts become diffuse, scattered over too many thoughts and incomplete sentences.

I wonder what writing "experts" (those who teach others how to write) would say about my distinction between linear and nonlinear writing. I find it hard to believe that I am happening upon some novel insight (even if it is novel for me.)

A key issue to dig into: when is it best to translate words into phrases into sentences? I now think that I could benefit from doing the translation earlier in my writing process.

One thing is clear: it's a mistake for me to give into the temptation of delegating to a LLM the task for translating words and phrases into coherent sentences of a first draft. That translation process is the heart of what makes writing the fraternal twin of thinking.

MIC-01-5 Working with pandoc format+extensions strings

Today, I dug into pandoc formats. I learned that there are two subfamilies of markdown formats. There are extensions that are associated with any given format. Some are enabled by default and some are turned off by default. I wrote code to compute the \"canonical\" and \"expanded\" versions of those pandoc format strings: rdhyee_utils/rdhyee_utils/pandoc at master · rdhyee/rdhyee_utils

MIC-01-4 Pandoc, tell me about yourself

I want to develop a mutually supportive habit of programming and writing together.  I feel torn right now because writing and coding feel like competitors for my focus and time.  I know that writing and programming are not enemies -- that I know -- but it will take patience and practice to harmonize (dare I say, synergize) them.

Over the past several months, I've made progress on programming MyInfoNet that pleases me. For better or worse, I've not spent much effort in communicating with others about the work I've been doing. While I jot copious notes to myself, I haven't forced myself to turn those notes into coherent prose.

Today, I've been focused on understanding how to use pandoc to handle Obsidian Flavored Markdown. Markdown is a popular lightweight markup language that has many "variants", "flavors", or "dialects".  I started experimenting with asking pandoc itself to tell me about the formats it supports and extensions that are supported for a given format (specifically markdown).

MIC-01-3 Filling the space with BLACK HOLES

Over the years, I've tried many times to blog daily but have failed almost every time. I
During these 12 weeks of MyInfoCamp, I’ve committed to writing on my blog each weekday. I’m determined to succeed this time, even if I all I do is to report in for the day and write “sorry folks, I don’t have much to say today.” I have some decent material in the hopper, including an exposition on outliners vs word processors, why I’m focused on clipboards, and why I love lightweight markup languages, even if they might be too geeky for many computer users. None of these writings is sufficiently “cooked” to serve up.

Instead, I will reach into my storehouse and paste another part of my Recurse Center application. One of the questions on the application was “What is the most fascinating thing you've learned in the past month?” I had a lot of fun crafting my response.

I'd like to share a smaller and a grander thing. I learned that the visually stunning artichoke flower that I bought at a farmer's market was actually not edible -- so my plotting about how to jam it into my instant pot was extraneous imaginative planning.

The grander item, on the other hand, was big news, featured in the New York Times, This week, I spent several hours trying to grok the confirmation of long wavelength / low-frequency gravitational waves through the use of data on how the time of arrival of light from pulsars undulates over long periods of time. But after hours of reading news articles, listening to podcasts, watching YouTube videos, and interacting with LLM chatbots, I couldn't find a better articulation of the fascination and excitement that I (and many others) feel than Katie Mack on Twitter:

Hugely exciting! We’re using RADIATION JETS from DEAD STARS to detect RIPPLES IN SPACE from the COLLISIONS OF SUPERMASSIVE BLACK HOLES ACROSS THE ENTIRE COSMOS. Honestly that’s just frickin’ awesome.

I've had my own multi-decade fascination with black holes. When I first read as a kid that something could be so massive that even light cannot escape its gravitational pull, my little brain was set alight. I thought that supermassive black holes were a recent discovery because I only learned about these "charismatic cosmofauna" but Wikipedia tells me that researchers have been pondering them for decades. Unsurprisingly, as I attempt to unravel the origins of my fascination with black holes, I sense that the connections permeate my entire brain. Consequently, I must curtail my introspection and focus on penning the requested sentences.