================================================================================
Hacking on Nixtamal
================================================================================

Working setup
================================================================================

Getting the source
--------------------------------------------------------------------------------

.. rubric:: If you don’t have Darcs installed, you can use from Nixpkgs such as

.. code:: console

	$ nix-shell -p darcs

.. rubric:: After/else

.. code:: console

	$ darcs clone --lazy https://darcs.toastal.in.th/nixtamal/next/ nixtamal
	$ cd nixtamal
	$ darcs setpref boringfile .boring


Development environment setup
--------------------------------------------------------------------------------

.. rubric:: Base Nix shell

.. code:: console

	$ nix-shell

.. rubric:: Or with Direnv

.. code:: console

	$ echo "use nix" >> .envrc
	$ direnv allow

Building with Dune
--------------------------------------------------------------------------------

.. code:: console

	$ dune build

Building with Nix
--------------------------------------------------------------------------------

.. rubric:: Basic

.. code:: console

	$ nix-build

.. rubric:: Everything else

.. code:: console

	$ nix-build release.nix
	$ nix-build release.nix -A nixtamal

Darcs hooks (can skip, & x86 only at this time)
--------------------------------------------------------------------------------

Install ``https://darcs.toastal.in.th/darcs-hooks2/`` in similar manner as this
project.

.. code:: console

   $ darcs-hooks set-up --nix-release
   $ darcs-hooks make-so

.. rubric:: Hooks here can

• Make the ``WeakHash`` a visible file
• Create an Atom feed for tags
• Build before sending & pushing


Sending Patches
================================================================================

Currently this is best done by sending a patchset to
`toastal+nixtamal@posteo.net`_ or :ac:`DM` me a repository to clone @
`https://toast.al/contact/`_. If a good, lightweight, self-hostable Darcs
review platform with a NixOS module pops up, I will use it, but until then, old
school patches + :ac:`DM`\s suffice!

.. _toastal+nixtamal@posteo.net: mailto:toastal+nixtamal@posteo.net
.. _toastal@toastal.in.th: xmpp:toastal@toastal.in.th

TODOs before sending
--------------------------------------------------------------------------------

• Is this patchset ‘big’? If yes, :ac:`DM`\s the maker or chatroom first
• Run the `nix-build release.nix --no-out-link` to run the builds + checks
• Add yourself to the ``meta/hackmates.ncl`` file

:ac:`LLM` usage
--------------------------------------------------------------------------------

:ac:`LLM`\s *are* permitted to be used, but vibecoding is not.

Okay
	• Guide you through the code base
	• Write code that you are able to understand & review
	• Help you articulate a feature request / design :ab:`doc`

Not okay
	• Writing a mass of code/patches you don’t comprehend
	• Not reviewing your code
	• Writing non-code text for message exchange

You own the code your :ac:`LLM` produced as well as the human interaction with
the Nixtamal community channels. If the code is `slop`_ or if a bot is used to
talk to the community, you will be warned & then later banned on further
offense. If you have a cool idea but don’t know how to contribute OCaml code as
you don’t have a good grasp of OCaml or functional programming languages, then
just furnish a *feature request* (even better if with a design :ab:`doc`) & if
the idea is sound, the maker will handle it.

.. _slop: https://en.wikipedia.org/wiki/AI_slop

.. vim: set textwidth=80
