the empty spaces dictionary. [[ adapted from https://www.sheepwave.com/what-is-a ]] https://what.is.a.dolly.sh
  • Crystal 50.8%
  • Nix 30.8%
  • CSS 10.4%
  • HTML 8%
Find a file
41666 11bcfd2998
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
fix viewport scale, spacing
2026-03-16 20:52:07 -07:00
.woodpecker ci: rename to nix flake checl 2026-03-11 16:00:58 -07:00
nix remove old deps 2 2026-03-11 19:22:10 -07:00
spec html: use tag display_name instead of slug 2026-03-11 23:02:35 -07:00
src fix viewport scale, spacing 2026-03-16 20:52:07 -07:00
static fix viewport scale, spacing 2026-03-16 20:52:07 -07:00
.air.toml reinit sha1 2026-03-11 14:18:04 -07:00
.editorconfig reinit sha1 2026-03-11 14:18:04 -07:00
.envrc reinit sha1 2026-03-11 14:18:04 -07:00
.gitignore nix: restructure flake 2026-03-11 18:15:19 -07:00
default.nix remove old deps 2 2026-03-11 19:22:10 -07:00
flake.lock nix: module + overlay 2026-03-11 16:40:09 -07:00
flake.nix nix: restructure flake 2026-03-11 18:15:19 -07:00
README.md docs: update extra info 2026-03-11 18:27:09 -07:00
shard.lock remove old deps 2026-03-11 19:18:56 -07:00
shard.yml remove old deps 2026-03-11 19:18:56 -07:00
shards.nix remove old deps 2026-03-11 19:18:56 -07:00

https://what.is.a.dolly.sh

or on dollnet https://what.is.a.doll

a faithful rebuild of sheepwave's "what is a"

supports different ways of querying the API, each by text/html, application/json, or text/plain. contributions/ideas of other insane mime types welcome.

developing

use nix, direnv supported.

# start the hot-reloading dev server
nix run
# -- or --
air

xdg-open http://localhost:3001

# start without air
# nix note: tests must pass.
nix run .#what-is-a
# -- or --
crystal run ./src/what-is-a.cr

# run checks and linters
nix flake check

# apply linters
nix fmt
# -- or --
crystal tool format

# run tests alone
crystal spec

using

send Accept header to get any of these formats:

  • text/plain (default)
  • text/html
  • application/json

future stuff

file extensions as mime

allow .txt, .md, .json, . whatever

mime types

  • text/markdown/.md
  • application/x-pem-file/.pem and application/pkix-cert/.cer
  • application/dns and text/dns/.zone
  • text/css/.css :>
  • application/x-sh/.sh!!!
  • image/svg+xml/.svg
  • text/troff/.7
  • text/csv/.csv
  • text/markdoll/.doll

apis

  • DNS-over-HTTP /dns-query, where combat-doll TXT => 3 TXT records
  • telnet??? especially if we do .sh, we could do something funny with curl: curl https://what.is.a.dolly.sh | sh

deploying

the right way (nixos)

if for some reason this needs to be hosted again... this is a nix flake!

  • add this repo to inputs:

    {
      inputs = {
        #...
        what-is-a.url = "git+https://git.dolly.sh/doll/what-is-a";
      };
    }
    
    
  • add the overlay (optional):

    {
      outputs = {nixpkgs, ...}@inputs: {
        # ...
        forEachSystem (system: let
          pkgs = import nixpkgs {
            inherit system;
            overlays = [
              inputs.what-is-a.overlays.default
            ];
          };
        in {
          #...
        })
        # ...
      }
    }
    
  • add the binary cache (optional, risky):

    {
      inputs = {
        # ...
      };
    
      nixConfig = {
        extra-substituters = [
          "https://subby.blood.pet"
        ];
    
        extra-trusted-public-keys = [
          "subby.blood.pet:1xqRlAxaTPJi/URlleX0ggGECwKzJbX+EVu6xY54wrc="
        ];
      };
    
      outputs = _: {
        # ...
      }
    }
    
  • setup nixos module

    {inputs, pkgs, ...}: {
      imports = [
        inputs.what-is-a.nixosModules.default
      ];
    
      services.what-is-a = {
        enable = true;
        port = 3000;
        # optionally set the package
        package = pkgs.what-is-a;
        # without overlay:
        # package = inputs.what-is-a.packages.${pkgs.stdenv.hostPlatform.system}.what-is-a;
      };
    
      # example nginx config
      services.nginx = {
        enable = true;
        virtualHosts."what.is.a.dolly.sh" = {
          recommendedProxySettings = true;
          location."/" = {
            proxyPass = "http://127.0.0.1:3000";
          };
        };
      };
    }
    

the wrong way (oci/docker/whatever)

todo