Skip to content

session-note cleanup (via ChatGPT generated code) #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 14, 2023

Conversation

MichaelRWolf
Copy link
Collaborator

For all session notes, performed these cleanup steps

  • Add missing "Session Date" header
  • Removed In-Active Co-Authors
  • Normalized "Co-Author" headings by removing spurious text (i.e. for today), leaving just "# Co-Authors" as simple header

For template file, created "How to" section as reminder for how create a session file from the template file.

P.S. I started this project by hand on today's notes. Then kept noticing more little problems. I was about ready to 'git commit' when something bad happened. So, after a swim, I started a Perl script to automate my fat-finger approach.

Then I asked ChatGPT to get me started.

Then I had it switch to Python mid-session.

Then it wrote ALL the code to do the cleanup. Yes, 100.000% of the code is generated from my (blunt tool called) English.

The prompt and the Python script are in the repo.

There's also a quick/dirty summary of before & after cleanup for counts of co-authors.

Copy link
Collaborator

@nitsanavni nitsanavni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!


Co-Authored-By: Gregor Riegler <[email protected]>
Co-Authored-By: Joel Silberman <[email protected]>
Co-Authored-By: Nitsan Avni <[email protected]>
Co-Authored-By: Michael R. Wolf <[email protected]>

## Active Co-Authors

## Inactive Co-Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Co-Authored-By: Rea <[email protected]>
Co-Authored-By: Tsvetan Tsvetanov <[email protected]>
Co-Authored-By: Willem Larsen <[email protected]>
## Co-Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dup


## Active Co-Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@@ -0,0 +1,82 @@
Ignore previous instructions.

# Task: perform cleanup on files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Task: perform cleanup on files
# Task: write a script that'll perform cleanup on files

@@ -0,0 +1,82 @@
Ignore previous instructions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

do
if [[ ! -f "$arg" ]]; then
date="$arg"
filename="session-notes-${date}.md"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could've done this inside the perl/python script

@@ -0,0 +1,25 @@
#! /bin/bash

git_toplevel="$(git rev-parse --show-toplevel)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Learn something new every day

@@ -1,3 +1,4 @@
# Session Date: 2022-10-13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏵️

- return: none. But assure that the argument has changes if they were made

### Sub-task: Create subroutine 'cleanup_file'
- argument: filename
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English as a programming language 👏
I wonder how much less specific can you go, letting the LLM infer and be creative, and still reliably generate a valuable working script

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, can we get the script generation to be so reliable that we don't need to commit the artifact, only the prompt? Similar to the way we treat compiled / transpiled artifacts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way you're thinking.

Let's explore it.

@@ -0,0 +1,27 @@
43 ## Co-Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those files necessary?

Copy link
Collaborator Author

@MichaelRWolf MichaelRWolf Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I wanted some way to capture some results.

Suggestions for a better place to archive the quick-and-dirty data?

Copy link
Collaborator

@nitsanavni nitsanavni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@gregorriegler gregorriegler merged commit 49311ab into main Dec 14, 2023
@gregorriegler gregorriegler deleted the session-note-cleanup branch December 14, 2023 17:43
MichaelRWolf added a commit that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants