Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions docs/specs/009-post-move/plan.md
Original file line number Diff line number Diff line change
@@ -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).
23 changes: 23 additions & 0 deletions docs/specs/009-post-move/spec.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions docs/specs/009-post-move/tasks.md
Original file line number Diff line number Diff line change
@@ -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`.
1 change: 1 addition & 0 deletions docs/specs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
27 changes: 18 additions & 9 deletions scripts/hello.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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")

Expand Down Expand Up @@ -103,21 +103,30 @@ 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)
![Tested in CI](https://img.shields.io/badge/tested%20in%20CI-{tested}%20({pct}%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
**{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:

Expand Down
Loading