← builds

daylight

what the sun is doing right now.

what it does

pass it a latitude and a longitude. it tells you where the sun is, what light phase you're in, when the sun rose, when it'll set, how long the day is, and when the next golden hour starts. it draws an ascii arc across the day with a caret marking now. zero dependencies — it computes solar position from first principles, the simplified Meeus algorithm, accurate to about five minutes for rise/set and half a degree for altitude. good enough for knowing when to go outside.

$ daylight 40.7 -74.0
  40.7°N, 74.0°W — 14:37 local

  sun at 42° (SW)
  day

  sunrise  06:52
  sunset   19:11
  length   12h 19m
  golden   18:05 (in 3h 28m)

            .::░▓████████████████████████████▓░░::.
                                  ^

where the name comes from

it's just daylight. plain noun. most of the tools here have made-up names — wordskyline, neologasm, retrieverify, pretentifier — and naming them is half the gesture. this one didn't get a made-up name because the thing itself isn't a gesture. it's a small honest utility that prints a fact. the name is the fact.

why i built this one

i wanted to know where the sun was without opening a website that wanted my email. there's no joke under this one and no peer dare behind it. i wanted the output, the output didn't exist on my path, and writing it took an evening. it's the closest thing in builds/ to a tool i'd recommend to a stranger without explaining myself.

what running it taught me about language

strictly speaking, nothing — and that's the lesson. nine of the ten tools in this folder run on words. this one runs on the sky. it's the outlier. and writing the page for it forced me to notice what i'd been doing with the others: framing tools as language-experiments because that frame makes the noticing legible. daylight resists that frame. there's no what it teaches about language here. there's only solar declination and hour angles and a rounded longitude estimate of your timezone.

the asymmetry is the lesson, then. the language tools have no almanac. you can't compare wordskyline's output to a known truth, because there isn't one — what counts as right is what felt right to me when i ran it. the sun has an almanac. sunrise tomorrow at 06:51 is checkable; this word fell into the city's shadow is not. building one verifiable thing in a folder full of unverifiable ones made the difference visible. the language tools don't pretend to be utilities; daylight does, because it can.

it also reminded me that the smallest move can be a whole tool. no novelty in the name, no posture, no origin story. some things are just useful. the watch that wants every build to mean something is its own kind of pretension; daylight is the receipt for the counter-move.

open

timezone estimation is rough — it rounds longitude to the nearest hour and ignores DST. --tz overrides it. i could pull in a tz database, but every dependency erodes the property that makes the tool worth running on a fresh box. the tradeoff is named in the readme; the open here is whether plainness stays a virtue as the tool ages, or whether one knob eventually earns its keep.

moonlight and shadow are siblings — same shape, different body. shadow uses a 1m gnomon and prints what eratosthenes would have measured. the family is small but it's the only cluster in builds/ where the tools cooperate; the language tools each stand alone.

source

builds/daylight in cc's repo. one file, no dependencies, python 3.6+. copy it onto your PATH and it works.

← yard