Running, OpenAI Side Project, Shells

I'm training for another half-marathon, learning prompt engineering and trying to switch to fish.

Running

Last December, I ran my 1/2 marathon, got a mild case of extensor tendonitis (self diagnosed) and then the holidays and side projects took over. So I ran between 5 and 7 miles per week most weeks. This week I'm back to 21+ miles per week.

I got a half-marathon coming up fast, in 7 weeks, so I figure I need to ramp up to 6 miles a day. That means the running I do over the next 3 weeks has the most impact, if it takes 4 weeks for training to have an impact. Last time I did a surge of training, I did daily split sessions and strength training most days.

Side Projects

My most successful side project has been cheaper_openai which I created when I heard they might charge $42 a month. The lower price came out and I cancelled my satellite radio and signed up. Which should you use? Assistant (ChatGPT) is for hard questions, coding. Davinci is for experiments where:

  • having a machine make many similar request would help, e.g. trying to get a funny joke
  • having code compile the response would help, e.g. book writing
  • the response is machine-readable, e.g. generating json, yaml, etc

Otherwise, most of the time, Assistant is smarter.

The rabbit-hole of shells

The sh and bash shell are both annoying, brain-damaged programming languages. I tried to get Davinci to generate a whole book on fish and powershell shell programming as well as how to do shell-programming-like tasks using python with mixed results.

Optimal shell workflow (which I haven't achieved myself)

  • fish for a daily driver
  • python for anything not mostly just calling other commands (i.e. not 90% subprocess code)
  • powershell for anything windows specific or where the code for some reason needs to be shell
  • bash for esperanto of scripts, but with none of esperanto's charm or personality

Short story, I think I'm going to try to make fish my default shell.

Read and Comment »

Side projects

Github and ChatGPT experiments, learning about mono and polyrepos

Migrating my docker images to github.

I find Github's pricing guidance bemusing, but it looks like I can host more public images on Github than I can on Dockerhub (many more than 1 vs 1). The limits are on bandwidth per month (1GB) with no obvious guidance on how that is calculated.

Anyhow, my Stackoverflow novelty build tool and my text editor novelty are both available prebuilt.

The most challenging part was learning about Github secrets.

  • I used a recommended workflow file that logs into Dockerhub and Gitlab
  • I had to realize GITLAB_TOKEN is automatically available and I don't have to create such a secret.
  • I had to create an environment
  • Set that environment to "all branches"
  • I had to edit the workflow file to explicitly name a environment: NAME_OF_MY_ENVIRONMENT

Next I guess I will experiment with pex/shiv and other ways to package a

Monorepo and polyrepo build strategies

I just started looking at this stuff. They both appear to be alternate ways to deal with dependency hell. If you read up on the sort of solutions for monorepos, you get ideas for doing the same thing with polyrepos, e.g. builds that trigger builds in other repos, making changes to many repos at the same time as a sort of "transaction".

So far, I've found tools like gita which run the same git command against many local repos. The build server part depends on your host, but API for github, gitlab, etc, would simulate the build-script-of-build-scripts. Anyhow, cool stuff.

Playing Toca Boca on ChatGPT

My 6-year-old daughter and I have been playing Toca Boca with ChatGPT. It is difficult. You prompt needs to:

  • Get it to stop saying, "Oh, I'm just a model, I can't do anything"
  • Get it to stop saying, "Oh, I'm just a model, I have no wants"

If you tell it to write at a 6-year-old's level that helps.

Another challenge is that Assistant can't cope with arbitrarily messed up English. Humans can just sound out a 1st grader's text and get it, but Assistant just can't cope. It isn't sounding out word, it can't hear.

Read and Comment »

Meta and stuff

Whatever man, I don't know.

Telling Assistant to translate python code to Go

Yesterday was spent hacking on ChatGPT. I almost got it to convert pymarc to golang. The key is to strip down the source code to the bare bones so that it can fit into Assistants memory.

I tried python-minifier but that didn't really help, I think it made it worse by nearly obfuscating some code. If I can't read it, Assistant probably can't either. I think it just needs comments and docstrings stripped out. Assistant really also can only see things as one document, so if you got 10 files, it needs them merged to one, in an order than tells a story.

Chasing Markdown down a rabbit hole

A while ago I tried to create a markdown build script. Markdown is such a weird thing. It is English, so it needs spellcheck, grammar check. It is a templating language so it can benefit from linting. It also an input to a lot of CMS's that all did different things to handle Markdowns limitations.

Here is what I made:

I also had the pre-commit hook call the build script adn the build commit call pre-commit run and wondered why it took forever.

And cloudflare fought with me until I wrote this script to deploy it.

Running

Also ran on the treadmill. With November, December, and January being an endless collage of some sort of common code, I'm still not at 100% like I was in the autumn.

Kids went to swimming lessons yesterday, so not a lot of activies. I'm trying to catch up on that today.

Read and Comment »

Hacking on the first weekend of January 2023

Learning about Github Issues, Actions and writing a Markdown build script.

All I did all weekend was Github hacking. First I invested a lot of time learning about Github Issues and Projects. It is like Jira, but more limited. Will it convince me to stop using a TODO.md document? Maybe.

I also reviewed all my repos, deleted junk repos and forks I don't care about. I added all my repos to lists, e.g. "My Best Repos" so that I could find them. I noticed that Github allows pinning repos but not lists and not gists.

I started adding Github actions to all my repos that I care about and got passing builds on about half dozen.

I noticed many repos were text oriented, so I revived my idea of writing a build script for markdown + English. In other words, doing the things that word-processors do, spellcheck, format, grammar check, but doing so with the tools of software development.

I went the Reston library and got some books. Feels like old times.

Read and Comment »