mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-07 10:08:50 -05:00
Companion commit to c5f90022b (the YAML migration). Pulls in the rest of
the periodic-table work that was sitting in the working tree.
- periodic-table/paper/: LaTeX paper draft (paper.tex, references.bib),
Makefile with hero-figure and SVG->PDF rules (uses rsvg-convert), the
Puppeteer capture_table.js script used to screenshot the table for the
paper, generate_periodic_svg.py which builds the hero SVG from
table.yml (the same source of truth used by the React app), and the
figure sources (SVGs) + derived outputs (PDFs/PNGs) + compiled paper.pdf.
- root .gitignore gains two entries following the existing convention
(cf. the !interviews/paper/fig-*.pdf line just above) so the
periodic-table paper PDF + figure PDFs are not swept up by the blanket
*.pdf LaTeX-artifact rule.
- periodic-table/paper/.gitignore excludes the LaTeX build artifacts
(aux, bbl, blg, log, out, fdb_latexmk, synctex, toc) that make paper
regenerates.
- periodic-table/{iteration,refinement,debate}-log.md: research
provenance from the 100-round LLM iteration loop and the 5-expert
debate simulations that produced v0.2 of the table.
- periodic-table/scripts/archive/: historical iteration scripts
(iterate.sh, debate.sh, debate-continue.sh, run_100_rounds.sh, plus
the Python helpers append_log.py, get_elements.py, patch_informal.py,
patch_website.py, run_claude_loop.py, run_iterations{,_13,_16_20}.py,
update_log.py) moved out of the repo root into an archive subdirectory
with a README documenting their provenance and caveats. These scripts
are preserved for reproducibility and are not part of the active build
pipeline -- the source of truth is now periodic-table/table.yml.
- root package.json + package-lock.json pin puppeteer ^24 for
capture_table.js.
31 lines
2.1 KiB
Python
31 lines
2.1 KiB
Python
import re
|
|
|
|
html_path = 'periodic-table/index.html'
|
|
with open(html_path, 'r') as f:
|
|
content = f.read()
|
|
|
|
# Add the final missing elements from the 100-round debate to the elements array
|
|
# En (Entropy) - Row 1 (Data), Col 14 (M)
|
|
# Ix (Indexing) - Row 4 (Architecture), Col 3 (R)
|
|
# Ro (Routing) - Row 4 (Architecture), Col 13 (K)
|
|
# Vr (Virtualization) - Row 6 (Runtime), Col 2 (R) -- move Checkpointing to Col 3 (replace Ir? let's just make Vr col 8? No, col 2, and we can put it there. Actually, let's just put it at an unused column in the block. Represent is cols 1-3. Col 1 is Cc, Col 2 is Cp, Col 3 is Ir. Let's make Vr col 8 but block R. The grid layout handles this based on col number.)
|
|
# Td (Thermodynamics) - Row 7 (Hardware), Col 14 (M)
|
|
# Rs (Resilience) - Row 8 (Production), Col 14 (K) - shift La to 15? Wait, La is M.
|
|
# Let's just append them to the array safely.
|
|
|
|
new_elements = """
|
|
// Final insertions from the 100-Round Expert Consensus
|
|
[80,'En','Entropy','M',1,14,'1948','The Shannon information-theoretic limit; the absolute bound on data compressibility.',['Vl'],'Row 0 (Data): information limit. Measure.'],
|
|
[81,'Ix','Indexing','R',4,3,'—','The high-dimensional partitioning of vector space (e.g., HNSW) for sub-linear retrieval.',['Tp'],'Row 3 (Architecture): structured retrieval. Represent.'],
|
|
[82,'Ro','Routing','K',4,13,'—','The dynamic, data-dependent dispatch of tensors (e.g., Mixture of Experts).',['Gt'],'Row 3 (Architecture): dynamic flow. Control.'],
|
|
[83,'Vr','Virtualization','R',6,8,'—','The abstraction of physical memory via page tables (e.g., PagedAttention) to solve fragmentation.',['Cc'],'Row 5 (Runtime): memory mapping. Represent.'],
|
|
[84,'Td','Thermodynamics','M',7,14,'—','The ultimate physical limitation (Landauer limit, thermal throttling) capping system scale.',['Ew'],'Row 6 (Hardware): thermal limit. Measure.'],
|
|
[85,'Rs','Resilience','K',8,11,'—','The systemic countermeasures (checkpointing, elastic recovery) for macroscopic hardware decay.',['Oc'],'Row 7 (Production): fault tolerance. Control.']
|
|
];"""
|
|
|
|
content = content.replace("];", new_elements)
|
|
|
|
with open(html_path, 'w') as f:
|
|
f.write(content)
|
|
|