summaryrefslogtreecommitdiff
path: root/Omni/Ide
AgeCommit message (Collapse)Author
2025-09-05Strip comment lines and diff in commit-msg hookBen Sima
Without this, my custom git commit template will get mangled into the commit message with the call to fmt. I guess git strips all of this stuff *after* it runs the commit-msg hook. Oy vey. diff --git a/Omni/Ide/hooks/commit-msg b/Omni/Ide/hooks/commit-msg index c15b4a1..bfbb06f 100755 --- a/Omni/Ide/hooks/commit-msg +++ b/Omni/Ide/hooks/commit-msg @@ -1,6 +1,7 @@ #!/usr/bin/env bash temp=$(mktemp) -fmt -w 72 -u "$1" > "$temp" +# strip comment lines and everything after >8 cut line +sed '/^#/d; /^# -\+ >8 -\+/,$d' "$1" | fmt -w 72 -u > "$temp" mv "$temp" "$1" if ! gitlint --ignore-stdin --staged --msg-filename "$1" run-hook; then backup="$CODEROOT"/.git/COMMIT_EDITMSG.backup
2025-09-05Fix fmt spacingBen Sima
The -s and -u flags tell fmt to fill the paragraph by merging lines. Without this, fmt might just add line breaks, and this is no good.
2025-09-04Disable dbus connection attempt during deploymentBen Sima
When I deploy, I get an error like this: Error: Failed to open dbus connection Caused by: Failed to connect to socket /run/user/1000/bus: Connection refused According to Claude, this is because dbus is trying to do stuff while I'm running the `systemd-run` command, but that loses my user context so dbus errors out, and I can disable dbus by setting this variable to nothing. I guess we'll see if it works!
2025-09-04Wrap all commit messages with fmtBen Sima
Sometimes aider will write commit messages without wrapping them at 80 chars, and then the commit fails the gitlint hook, and aider can't finish the commit. To fix this I can just auto-wrap before we check it.
2025-08-28Fix boolean in ai linterBen Sima
If there are no lints to fix, this should just exit without starting aider.
2025-08-28Add typecheck.sh with Python supportBen Sima
This runs a repl and calls mypy to typecheck the given target. Not only is this *much* faster than using bild to typecheck stuff, but it also produces less noise in the logs, so I can have aider call this and the output won't overwhelm the llm.
2025-07-26Add ailint scriptBen Sima
This just fixes my lint errors for me which is awesome. Very useful.
2025-06-14Add ailint scriptBen Sima
This just fixes my lint errors for me which is awesome. Very useful.
2025-01-21Switch inside a systemd-run on pushBen Sima
This guards against network failures that may put the system in an unusable state. It's included in nixos-rebuild, so I should include it here in some form too. https://github.com/NixOS/nixpkgs/pull/258571
2025-01-21Update grub entries on pushBen Sima
Supposedly, running the nix-env command before switch-to-configuration will result in the grub entry being updated appropriately, and this is how nixos-rebuild does it. https://discourse.nixos.org/t/how-to-update-grub-entries-with-nixos-config-built-with-nix-build/1826/2
2025-01-06Remove Python main idiom and add coding conventions to README.mdBen Sima
I realized I don't need this stupid `__main__` convention anymore because my build system always calls Python programs like `python -m main`, so I just need to have a function named `main()`. I also started adding some general coding conventions to the README and fixed a typo.
2024-12-21Add shebangs and x bit to executablesBen Sima
With run.sh, we can build and run the file in one go. This means we can also use it as an interpreter in a shebang line and properly use the Unix executable bit. This is pretty cool and gives a few advantages: running any executable file is just `exec file.hs` or even `./file.hs`, finding all executables is `fd -t x`, you don't need to specify or know an `out` name to run something, execution of a program is standardized. There is a hack to get this to work. In C and Common Lisp, `#!` is illegal syntax, so I had to use shell syntax to invoke run.sh, call it on the current file, and then exit the shell script. Meanwhile, run.sh takes the file and evals the whole thing, building and running it. As long as either `//` or `;` is a comment character in the target language, then this works. Maybe a better thing to do would be to pre-process the file and remove the `#!` before passing it to the C compiler, like [ryanmjacobs/c][1] and [tcc][2]? However this won't work in Lisp because then I can't just load the file directly into the repl, so maybe the comment hack needs to stay. [1]: https://github.com/ryanmjacobs/c/tree/master [2]: https://repo.or.cz/tinycc.git/blob/HEAD:/tccrun.c
2024-12-21Re-namespace some stuff to OmniBen Sima
I was getting confused about what is a product and what is internal infrastructure; I think it is good to keep those things separate. So I moved a bunch of stuff to an Omni namespace, actually most stuff went there. Only things that are explicitly external products are still in the Biz namespace.