summaryrefslogtreecommitdiff
path: root/Omni/Bild
AgeCommit message (Collapse)Author
18 hoursAdd dark mode to cgitHEADliveBen Sima
I got this from the upstream branch jd/zx2c4-deployment, which does have the below commit implementing dark mode. I first cherry-picked the commit to master but it wouldn't build. Then I realized that the last cut release was v1.2.3 from 5 years ago, and that's what nixpkgs has pinned, so I cherry-picked it onto v1.2.3 and it went cleanly and built okay. So that's what I landed on. Maybe it would be better to use a patch instead of pushing my own fork like this, but whatever this works just fine. I can always switch to the patch method later. https://git.zx2c4.com/cgit/commit/?h=jd/zx2c4-deployment&id=8ed1bef90f631989c0cadc326a163b874a64e02d
18 hoursUpdate ollama, llm-ollama, openai-python, llmBen Sima
I couldn't use llm-ollama because it required some package upgrades, so I started going down that rabbit hole and ended up 1) realizing that these packages are way out of date now, and 2) fiddling with overrides to get everything to work. I finally figured it out, the `postPatch` in ollama-python was throwing me off for like half a day. Anyway, one thing to note is that these are changing fast and I need to either move onto nixpkgs unstable for python stuff, or maintain my own builds of all of these. Not sure which is more appropriate right now. Oh and I had to fixup some logging stuff in Biz/Storybook.py because ruff started complaining about something, which is weird because I don't think the version changed? But it was easy enough to change.
2025-01-21Incorporate nvidia-patchBen Sima
OBS wouldn't allow me to stream because there was something wrong with `nvenc`, which I guess is the nvidia encoding library? Anyway searching around I found this nvidia-patch overlay and it fixed it right away, so that's cool.
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.
2025-01-03Get xmpp uploads working againBen Sima
The problem was that the ssl cert wasn't renewing. I added the domains to the nginx config, and cleaned up some other stuff. During debug I also udpated nixos-mailserver and nixos stable because I thought it would fix something; it didn't but I might as well use the updated versions of stuff since it seems to still work fine.
2025-01-02Switch to alejandra for nix formattingBen Sima
I mostly wanted a formatter that would format `inherit` blocks vertically, because otherwise they are super hard to read when diffing or even just editing. Both alejandra and the new nixos/nixfmt format verically like this, but alejandra has slightly better format (I guess) and for some reason nixfmt did not respect my `GLOBIGNORE` setting when doing `nixfmt **/*.nix` so it was trying to format stuff in `_/nix`, and failed. So anyway I went with alejandra. - https://github.com/kamadorueda/alejandra - https://discourse.nixos.org/t/enforcing-nix-formatting-in-nixpkgs/49506
2024-12-31Upgrade nixos 24.05 -> 24.11, ghc 9.4.8 -> 9.6.6Ben Sima
It's good to update, I think nixos 24.05 was deprecated anyway. The iPython dontCheck is because there was a test timeout; I don't even know why iPython is being pulled in but whatever.
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-21Manage Storybook ImagesBen Sima
This adds the Images endpoint and related functions for loading and saving images to the filesystem. In the view layer, it also loads the images asynchronously using HTMX, so the images get lazy-loaded only when they are done generating.
2024-12-21Convert Biz/Storybook.py to LudicBen Sima
This is basically a full rewrite. I ripped out Flask and rearchitected the whole thing to use fully RESTful resources and endpoints using Ludic. The UI was completely redone to use Ludic's components. I added tests for everything that I reasonably could. This is almost ready for an alpha launch. Before shipping it I still need to: 1. generate images using image n-1 applied to `openai.images.create_variation()` 2. write a nix service, get it on a VM somewhere, I'll probably provision a new VM for this 3. replace the `db` thing with a real sqlite database I only need the first one done to show it to Lia and see if she likes it, that should be completed in a day or two. Then the nix service and deployment won't take long at all. Setting up a sqlite database will be annoying, but that I can't see that actually taking more than 2 days. So max 5 days out from launching this to friends and family.
2024-12-21Package ludicBen Sima
This required upgrading to python 3.12 because of some f-string format thing that ludic uses. It's kind of annoying but the upgrade was easy enough, so I just did it.
2024-12-21Update nixos-24_05Ben Sima
It's good to do this often.
2024-12-21Implement storybook prototypeBen Sima
This paritally used gptme to create a storybook generator. The problem I ran into is that gptme doesn't do any architecting or considerations for maintainable code, or even readable code, so it just wrote a long script. I couldn't test it. Also, it didn't actually generate a 10-page story, it generated 10 separate stories. So, I ended up writing it myself and using gptme to fixup TODOs that I wrote along the way.
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.