Age | Commit message (Collapse) | Author |
|
This implements a prototype Mynion, my chatbot which will eventually
help me write code here. In fact he's already helping me, and works
pretty well over xmpp.
The prompt is currently not checked in because I'm experimenting with it
a lot, and it should probably be a runtime parameter anyways.
In the course of writing this I added some helper libraries to get me
going, configured black (didn't even know that was possible), and added
'outlines' and its dependencies even though I didn't end up using it.
I'll keep outlines around for now, but I'm not sure how useful it really
is because afaict its just pre-defining some stop conditions. But it
took a while to get it working so I'll just keep it in for now.
|
|
Previously I would lint every file individually, in serial. This took
forever. Now I group the files by extension (by first getting the Namespace) and
run each linter on all relevant files at once. This is so much faster its
stupid.
Also I added formatters back into the dev env because my editor needs them to
autoformat.
|
|
Ruff is like a million times faster, and I mostly ignored pylint's suggestions
anyway.
I also took this opportunity to move lint tools into a runtime dependency on
Lint.hs, which meant adding a wrapper to the Haskell builder, which was easy
enough. This paves the way for proper rundeps in bild.
|
|
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.
|
|
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.
|
|
|
|
Without this, Guile libraries like SDL2 will use Guile 2.0 instead.
|
|
|
|
|
|
In order to write Guile code against C, I need to distiguish between libs and
bins, so I did that, then I got the flags that gcc needs from `guile-config` and
put them in the args for any C lib build. I tested this with Bessel.c and
Bessel.scm (not in this patch, because I don't really want that code in my
tree, I'll come up with another way to test it later).
|
|
- added --bash in case you just really want a shell
- added support for C programs
|
|
|
|
|
|
Also added -h help message.
|
|
There's no `guileWith` in nixpkgs, so I think I just need to pass multiple
`--packages` flags. I can't test this yet because I need to implement import
detection in Bild.hs first, but that's less important because Guile ships with a
bunch of SRFIs, which is nice, and anyway there aren't many Guile libraries in
nixpkgs for me to pull from.
|
|
asdf seems to always be necessary for any other packages to work, so I just
include that in the call to nix-shell, and swank is included because it's just
useful to start a repl server.
|
|
Also fixed a bug where the json failed to parse correctly.
|
|
|
|
|
|
|
|
|
|
This is basically building on top of bild's analysis, which is great becuase it
means that bild is becoming a useful tool rather than a monolithic do-everything
job runner. The eventual goal is for the bild analysis to be much more useful,
maybe even provide data to remote repls or language-server or whatever.
|