summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-08-22Add a commit-msg hook lint and various other cleanupsBen Sima
Turns out that gitlint by default enforces the exact commit-msg format that I like to use. I'm enabling this because even I write poor commit messages sometimes, and looking back on my commits from even a few days ago is sometimes not very helpful. I also made some minor comment and nix changes that I noticed while reviewing my work from the last few days.
2023-08-21Don't run ci on notes refsBen Sima
2023-08-21Only run pre-push if there hasn't been a successful runBen Sima
2023-08-21Refactor the build system for readabilityBen Sima
Lots of changes here but the code is much improved. The nix code is clearer and structured better. The Haskell code improved in response to the nix changes. I needed to use a qualified path instead of the abspath because the BIZ_ROOT changes based on whether bild runs in nix or runs in the user environment. Rather than passing every argument into Builder.nix, now I just pass the json from bild and deconstruct it in nix. This is obviously a much better design and it only came to be after sleeping on it the other night.
2023-08-17Delete BesselBen Sima
Bild does not link libraries, and idk if it ever will, so just delete this for now.
2023-08-17Reload dev environment after git checkoutBen Sima
2023-08-17Add --no-cabal flag to ormoluBen Sima
2023-08-17Nixify C buildBen Sima
This is working with libsodium as an example. Its unfortunate that we need the extra ':arg -lsodium' but how else can I get the name of the library for linking? Is that something in the nix attr metadata? Anyway, an optimization for another day.
2023-08-17Nixify rust buildBen Sima
Not getting deps yet but thats okay, I basically need to do a bunch of annoying nix work to get rustPackages into a thing like pythonPackages.
2023-08-16Fix variable substitution and indenting in ci scriptBen Sima
2023-08-16Condense note message in pre-push hookBen Sima
2023-08-16Fix active authors email in testBen Sima
2023-08-16Don't br after Log.info in lint outputBen Sima
2023-08-16Delete unused fileBen Sima
2023-08-16Get python targets buildingBen Sima
I added 'black' to Biz/Lint.hs, but not the others because they rely on dependencies being in the PYTHONPATH to work, so they are only relevant in nix builds and repls. I also made some other tweaks to the python checkPhase and linted all the files. Everything should be building and linting correctly now.
2023-08-16Log and return output to callerBen Sima
The main change here is 'puts' now returns a value, this enables me to collect the value from the conduit source while also doing stuff with it, like printing or logging it as I want. Previously I was running conduit over the source, *and then* kicking off the concurrent processes to wait for the process and collect the output. This would (I think) drain the source before it got to the 'puts' conduit run, and so I wouldn't be able to get the output streamed in real time. It took a lot of refactoring and exploratory programming to get to this relatively-small diff, but now puts works correctly. At least I think it does... it seems to work more reliably from ghci than from the shell. Maybe the shell or TERM is causing nix-store to do some buffering? Maybe I need to use the threaded runtime in GHC? Not sure, but I will look out for this issue and try to identify and fix. Update: yep it was the threaded runtime. I enabled that and now it works in the shell. I squashed that commit into this one.
2023-08-16Turn pre-push into a record-keeping ciBen Sima
This is necessary because otherwise I have no record of when I had a successful build.
2023-08-16Run lintBen Sima
Idk why these missed the linter. Probably packages updated in the nixpkgs version bump.
2023-08-16Lint concurrentlyBen Sima
Roughly a 2x speedup.
2023-08-16Add llama-cpp and exllamaBen Sima
2023-08-16Update nixpkgs to 23.05Ben Sima
2023-08-10Allow underscores in namespacesBen Sima
2023-08-07Get ava.py running with nixified buildsBen Sima
I had to redo some of my python overrides and crib the bitsandbytes.nix from upstream. Ava is failing because: ValueError: Tokenizer class LlamaTokenizer does not exist or is not currently imported. I think this means I need to update my nixpkgs pin, so I'm gonna snapshot my work in git, do the update, and that might obviate the local bitsandbytes.nix anyway.
2023-08-07Working nixified python buildBen Sima
This represents quite a few evenings of hacking. It doesn't build all of my Python code, because my Python code is not up to snuff, but it builds the examples and pulls in third party dependencies. Some design points: - I'm using buildPythonApplication in Builder.nix because it was getting way too annoying to wrap the Python script and set PYTHONPATH myself. Easier and more robust to just use the upstream nix builder - Because of this, I had to generate a setup.py. Maybe switch to pyproject.toml in the future, whatever. - Also because of this, Target.wrapper is becoming redundant. I'll just remove it when I get Guile built in nix. - Biz/Bild.nix is getting messy and could use a refactor. - In Builder.nix, I worked around the empty directories bug by just finding and deleting empty directories after unpacking. If its stupid but works it ain't stupid! - I had to touch __init__.py files in all directories before building. Annoying! - `repl` just works, which is awesome - To ensure good Python code, I moved lints and added type checking to the build. So I can't build anything unless it passes those checks. This seems restrictive, but if I want to run some non-passing code, I can still use `repl`, so it's actually not inhibitory.
2023-08-07Add hostname to LocalBen Sima
2023-08-07Set BIZ_ROOT in nix builderBen Sima
2023-08-07Remove unneeded nix-instantiate argumentsBen Sima
2023-08-07Documentation improvementsBen Sima
2023-08-03Add packageSet argumentBen Sima
2023-08-03Move buildPhase to a nix-instantiate argumentBen Sima
2023-08-02Better log messageBen Sima
2023-08-02Some notes on Biz.LogBen Sima
2023-08-02Fix nix syntax to include pkgsBen Sima
2023-08-02Factor out nix builder into Haskell.nixBen Sima
This also fixed a bug where every dependency would get pulled into the Haskell target while searching for transitive dependencies.
2023-07-31Implement nix builds for HaskellBen Sima
This is prototype quality. For some reason I think it breaks when doing `build **/*.hs`, which isn't good. But also it's working, and the code feels good. Next I'd like to get Python builds working, as hopefully that will force me to improve the existing code to support a second language.
2023-07-31Capture and return stdout from procBen Sima
2023-07-31Add srcs to TargetBen Sima
Only fully implemented for Haskell at the moment but that is okay.
2023-07-31Prototype nix expression generationBen Sima
There are some limitations to this implementation: 1. Using `runCommand` means this will re-run any time anything changes in the repo. The solution is to use the existing import detection to make a list of source files, and put that into a `stdenv.mkDerivation`, which I'll do next. 2. The `NeatInterpolation` usage is ugly. The templated nix code should be extracted into its own file, such as `Biz/Bild/Builder.nix`. 3. I'm not actually calling it yet. The ideal thing would be to call `nix-instantiate`, get the output drv path, and then call `nix-store --realise` on that. To do that I need to refactor my `proc` function to return stdout to the calling function, and I should probably just make helper functions like `nixInstatiate :: Target -> IO DrvPath` and `nixStoreRealise :: DrvPath -> NixStorePath`, or something like that.
2023-07-28Fix tags generation in git hookBen Sima
2023-07-28Add NIX_CFLAGS_COMPILE and some depsBen Sima
2023-07-12Fix sabten portBen Sima
2023-05-03Add C indent linterBen Sima
2023-05-03Wipbase implemented by GPT-4Ben Sima
2023-04-28Add patched autogen for guile 3Ben Sima
2023-04-28Parse more meta in scheme codeBen Sima
2023-04-28Default to Guile 3.0 everywhereBen Sima
Without this, Guile libraries like SDL2 will use Guile 2.0 instead.
2023-04-28Reorganize to Biz/Cloud/CommsBen Sima
2023-04-28Setup meshhub for funBen Sima
2023-04-07Add bitcoin rpc portBen Sima
2023-01-09Reorganize some Auth/App stuffBen Sima