From 48d191804e3b902c46c74bf24cd7522a4adab1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matheus=20Bregu=C3=AAz?= Date: Mon, 12 Oct 2026 12:24:59 -0300 Subject: [PATCH] docs: post-move housekeeping for catalog-algorithms (spec 009) Point REPO at BenchCommons/catalog-algorithms so the CI badge and contributor links follow the move, and rewrite the generated README intro: the repo is now a catalog of classic algorithm implementations across languages, with Hello World as the startup-cost baseline. Refs #11 Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 27 ++++++++++++++++++--------- docs/specs/009-post-move/plan.md | 6 ++++++ docs/specs/009-post-move/spec.md | 23 +++++++++++++++++++++++ docs/specs/009-post-move/tasks.md | 7 +++++++ docs/specs/ROADMAP.md | 1 + scripts/hello.py | 27 ++++++++++++++++++--------- 6 files changed, 73 insertions(+), 18 deletions(-) create mode 100644 docs/specs/009-post-move/plan.md create mode 100644 docs/specs/009-post-move/spec.md create mode 100644 docs/specs/009-post-move/tasks.md diff --git a/README.md b/README.md index 8680988..7e83cfa 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,27 @@ -# Hello World 🌍 +# catalog-algorithms -> "Hello World" in every programming language we can get our hands on. +> Classic algorithm implementations across programming languages, measured by the +> [BenchCommons](https://github.com/BenchCommons) toolset. It starts with Hello World in 452 languages. -[![CI](https://github.com/matbrgz/Hello-World/actions/workflows/hello-world.yml/badge.svg)](https://github.com/matbrgz/Hello-World/actions/workflows/hello-world.yml) +[![CI](https://github.com/BenchCommons/catalog-algorithms/actions/workflows/hello-world.yml/badge.svg)](https://github.com/BenchCommons/catalog-algorithms/actions/workflows/hello-world.yml) ![Languages](https://img.shields.io/badge/languages-452-blue) ![Tested in CI](https://img.shields.io/badge/tested%20in%20CI-377%20(83%25)-brightgreen) ![TIOBE coverage](https://img.shields.io/badge/TIOBE%20top%20100-100%25-brightgreen) ![License](https://img.shields.io/badge/license-MIT-green) -Since 1974, when Brian Kernighan used it in *Programming in C: A Tutorial*, printing **Hello World** has been -the first program almost everyone writes in a new language. This repository collects that program in -**452 languages**: every language in the [TIOBE Index](https://www.tiobe.com/tiobe-index/) top 100, -the languages that shaped computing history, the new languages people are talking about, Brazilian languages, -and a long tail of assembly, shell, scientific, hardware, markup and esoteric languages. +This repository is the BenchCommons catalog of **classic algorithm implementations across languages**: +n-body, fannkuch-redux, spectral-norm, binary-trees, mandelbrot, sorting, searching, hashing and others. +Every implementation uses a pinned toolchain and has its output checked against a canonical expected output +before it is measured for time, memory and energy with [perfratio](https://github.com/BenchCommons/perfratio) +through [benchmark-tool](https://github.com/BenchCommons/benchmark-tool). The roadmap is tracked in +[issue #11](https://github.com/BenchCommons/catalog-algorithms/issues/11) and in [`docs/specs/`](docs/specs/ROADMAP.md). + +It starts from **Hello World**, the first program almost everyone writes in a new language since Brian Kernighan +used it in 1974. Hello World does almost no work, so it is the **startup-cost baseline** for each language: +the time and memory a toolchain needs before any algorithm runs. The catalog has it in **452 languages**: +every language in the [TIOBE Index](https://www.tiobe.com/tiobe-index/) top 100, the languages that shaped +computing history, the new languages people are talking about, Brazilian languages, and a long tail of assembly, +shell, scientific, hardware, markup and esoteric languages. **377 of 452 programs (83%) are checked on every push** by GitHub Actions on Linux, macOS and Windows: @@ -654,7 +663,7 @@ Maintained by [@matbrgz](https://github.com/matbrgz). [![matbrgz](https://github.com/matbrgz.png?size=64)](https://github.com/matbrgz) -[![Contributors](https://contrib.rocks/image?repo=matbrgz/Hello-World)](https://github.com/matbrgz/Hello-World/graphs/contributors) +[![Contributors](https://contrib.rocks/image?repo=BenchCommons/catalog-algorithms)](https://github.com/BenchCommons/catalog-algorithms/graphs/contributors) ## License diff --git a/docs/specs/009-post-move/plan.md b/docs/specs/009-post-move/plan.md new file mode 100644 index 0000000..887365f --- /dev/null +++ b/docs/specs/009-post-move/plan.md @@ -0,0 +1,6 @@ +# Plano — 009 + +- `scripts/hello.py`: trocar a constante `REPO`; o selo de CI e o bloco de contribuidores já usam `REPO`. +- `render_readme`: novo título (`# catalog-algorithms`), citação e primeiro parágrafo sobre o catálogo; segundo parágrafo sobre o Hello World como linha de base de inicialização, mantendo a contagem de linguagens e testes calculada dos metadados. +- Regenerar com `python3 scripts/hello.py readme` e validar com `python3 scripts/hello.py check`. +- A seção de contribuidores continua citando @matbrgz como mantenedor (spec 002). diff --git a/docs/specs/009-post-move/spec.md b/docs/specs/009-post-move/spec.md new file mode 100644 index 0000000..8f70f82 --- /dev/null +++ b/docs/specs/009-post-move/spec.md @@ -0,0 +1,23 @@ +# 009 — Arrumação pós-mudança + +Issue: #11. + +## O quê +O repositório saiu de `matbrgz/Hello-World` para `BenchCommons/catalog-algorithms` e passa a ser o catálogo de implementações de algoritmos clássicos em várias linguagens. Atualizar as referências ao endereço antigo e a apresentação do README para o novo propósito, mantendo o README gerado. + +## Requisitos +1. `REPO` em `scripts/hello.py` passa a ser `BenchCommons/catalog-algorithms`; selo de CI, contribuidores e links do README derivam dele. +2. Nenhuma referência a `matbrgz/Hello-World` fora de `languages/` e do histórico de specs concluídas. +3. A introdução do README, gerada por `scripts/hello.py readme`, descreve o catálogo de algoritmos clássicos (medidos com perfratio via benchmark-tool) e apresenta o Hello World como a linha de base de custo de inicialização de cada linguagem. +4. A introdução aponta para a issue #11 e para `docs/specs/ROADMAP.md`. +5. O README continua sem edição manual: toda mudança passa pelo gerador. + +## Critérios de aceite +- `python3 scripts/hello.py check` passa com 0 erros. +- `grep -rn "matbrgz/Hello-World" --exclude-dir=languages --exclude-dir=docs .` não encontra nada. +- O selo de CI do README aponta para `BenchCommons/catalog-algorithms`. + +## Fora de escopo +- Renomear o workflow `hello-world.yml` ou o script `scripts/hello.py` (a nova estrutura vem na spec 011). +- Conjunto de algoritmos e E/S canônica (spec 010). +- O PR #10 (retentativas no CI), já integrado a `master` antes desta spec. diff --git a/docs/specs/009-post-move/tasks.md b/docs/specs/009-post-move/tasks.md new file mode 100644 index 0000000..4079cd4 --- /dev/null +++ b/docs/specs/009-post-move/tasks.md @@ -0,0 +1,7 @@ +# Tarefas — 009 + +- [x] `REPO = "BenchCommons/catalog-algorithms"` em `scripts/hello.py`. +- [x] Introdução do README no gerador: catálogo de algoritmos e Hello World como linha de base de inicialização. +- [x] Regenerar o README e rodar `check` (0 erros). +- [x] Conferir que não restam referências a `matbrgz/Hello-World` fora de `languages/` e `docs/`. +- [x] Spec 009 no `ROADMAP.md`. diff --git a/docs/specs/ROADMAP.md b/docs/specs/ROADMAP.md index 15421b8..5e8189c 100644 --- a/docs/specs/ROADMAP.md +++ b/docs/specs/ROADMAP.md @@ -10,3 +10,4 @@ | [006 — Ampliar a cobertura de testes](006-more-tests/spec.md) | concluída | 004 | | [007 — Cobertura de 80%](007-coverage-80/spec.md) | concluída | 006 | | [008 — CI seletivo nos PRs](008-selective-ci/spec.md) | concluída | 004 | +| [009 — Arrumação pós-mudança](009-post-move/spec.md) | concluída | 003 | diff --git a/scripts/hello.py b/scripts/hello.py index bf07565..93e7212 100644 --- a/scripts/hello.py +++ b/scripts/hello.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Hello World library tooling. +"""catalog-algorithms tooling (Hello World library). Usage: python3 scripts/hello.py readme # regenerate README.md @@ -21,7 +21,7 @@ ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) LANG_DIR = os.path.join(ROOT, "languages") README = os.path.join(ROOT, "README.md") -REPO = "matbrgz/Hello-World" +REPO = "BenchCommons/catalog-algorithms" TIOBE_MONTH = "September 2026" TEST_GROUPS = ("base", "apt", "extra", "docker", "macos", "windows") @@ -103,9 +103,10 @@ def render_readme(langs): brazilian = sorted((l for l in langs if "brazilian" in l.get("tags", [])), key=name_key) parts = [] - parts.append("""# Hello World 🌍 + parts.append("""# catalog-algorithms -> "Hello World" in every programming language we can get our hands on. +> Classic algorithm implementations across programming languages, measured by the +> [BenchCommons](https://github.com/BenchCommons) toolset. It starts with Hello World in {count} languages. [![CI](https://github.com/{repo}/actions/workflows/hello-world.yml/badge.svg)](https://github.com/{repo}/actions/workflows/hello-world.yml) ![Languages](https://img.shields.io/badge/languages-{count}-blue) @@ -113,11 +114,19 @@ def render_readme(langs): ![TIOBE coverage](https://img.shields.io/badge/TIOBE%20top%20100-100%25-brightgreen) ![License](https://img.shields.io/badge/license-MIT-green) -Since 1974, when Brian Kernighan used it in *Programming in C: A Tutorial*, printing **Hello World** has been -the first program almost everyone writes in a new language. This repository collects that program in -**{count} languages**: every language in the [TIOBE Index](https://www.tiobe.com/tiobe-index/) top 100, -the languages that shaped computing history, the new languages people are talking about, Brazilian languages, -and a long tail of assembly, shell, scientific, hardware, markup and esoteric languages. +This repository is the BenchCommons catalog of **classic algorithm implementations across languages**: +n-body, fannkuch-redux, spectral-norm, binary-trees, mandelbrot, sorting, searching, hashing and others. +Every implementation uses a pinned toolchain and has its output checked against a canonical expected output +before it is measured for time, memory and energy with [perfratio](https://github.com/BenchCommons/perfratio) +through [benchmark-tool](https://github.com/BenchCommons/benchmark-tool). The roadmap is tracked in +[issue #11](https://github.com/{repo}/issues/11) and in [`docs/specs/`](docs/specs/ROADMAP.md). + +It starts from **Hello World**, the first program almost everyone writes in a new language since Brian Kernighan +used it in 1974. Hello World does almost no work, so it is the **startup-cost baseline** for each language: +the time and memory a toolchain needs before any algorithm runs. The catalog has it in **{count} languages**: +every language in the [TIOBE Index](https://www.tiobe.com/tiobe-index/) top 100, the languages that shaped +computing history, the new languages people are talking about, Brazilian languages, and a long tail of assembly, +shell, scientific, hardware, markup and esoteric languages. **{tested} of {count} programs ({pct}%) are checked on every push** by GitHub Actions on Linux, macOS and Windows: