- Fix case duplicates (guide→Guide, project→Project, etc.) - Consolidate single-post tags into broader categories - Add technology tags (Python, AWS, Salt, Docker, Kubernetes) to 93 posts - Add lib/tag_stats.py tool for checking tag usage - Update CLAUDE.md with tag guidelines
90 lines
No EOL
2.8 KiB
ReStructuredText
90 lines
No EOL
2.8 KiB
ReStructuredText
webwords reaches 42 languages: the ultimate programming kata
|
|
############################################################
|
|
|
|
:author: Russell Ballestrini
|
|
:slug: webwords-reaches-42-languages-the-ultimate-programming-kata
|
|
:date: 2025-10-09 12:00
|
|
:tags: Code, DevOps, Programming, Python, Docker
|
|
:status: published
|
|
|
|
**The companion** `webwords git repo <https://github.com/russellballestrini/webwords>`_ **lives here.**
|
|
|
|
**Webwords now supports 42 programming languages.** TimeHexOn assisted with this milestone over 2 days using a code agent tool.
|
|
|
|
42 languages. Same as the answer to life, the universe, and everything. Coincidence? Probably. But each implementation solves the exact same problem in completely different ways.
|
|
|
|
the spec
|
|
========
|
|
|
|
Every implementation does exactly the same thing:
|
|
|
|
1. Accept two query parameters: ``keyword`` and ``target``
|
|
2. Fetch the content from the target URI
|
|
3. Search for the keyword in that content
|
|
4. Return ``true`` or ``false`` as plain text
|
|
|
|
testing webwords
|
|
=================
|
|
|
|
To test any implementation, try searching for ``potato`` on `Remarkbox <https://www.remarkbox.com>`_:
|
|
|
|
.. code-block:: bash
|
|
|
|
curl "http://localhost:31337/?keyword=potato&target=https://www.remarkbox.com"
|
|
|
|
Returns ``true`` because potato exists on Remarkbox.
|
|
|
|
.. image:: /uploads/2025/10/potato.jpg
|
|
:alt: potato
|
|
:align: center
|
|
:width: 480px
|
|
|
|
the implementations
|
|
===================
|
|
|
|
**Native HTTP Server Implementations (33 languages)**
|
|
|
|
**Wrapper-Based Implementations (9 languages)**
|
|
|
|
docker deployment
|
|
=================
|
|
|
|
Every implementation ships with a Dockerfile:
|
|
|
|
.. code-block:: bash
|
|
|
|
cd language-directory
|
|
docker build -t webwords-language .
|
|
docker run -d -p 31337:31337 webwords-language
|
|
|
|
the makefile system
|
|
===================
|
|
|
|
The project includes a comprehensive Makefile that manages all 42 implementations:
|
|
|
|
.. code-block:: bash
|
|
|
|
make build-all # Build all 42 Docker images
|
|
make test-all # Test all implementations concurrently
|
|
make benchmark LANG=python # Benchmark a specific language
|
|
make help # Show all available commands
|
|
|
|
Each language has individual targets:
|
|
|
|
.. code-block:: bash
|
|
|
|
make build-python # Build Python implementation
|
|
make serve-python # Run Python container on port 31337
|
|
make functional-test-python # Test with potato/lemon cases
|
|
make clean-python # Stop and remove container
|
|
|
|
The testing process validates that each implementation correctly returns ``true`` when searching for ``potato`` on ``remarkbox.com`` and ``false`` when searching for ``lemon``.
|
|
|
|
what's next
|
|
===========
|
|
|
|
Is the project complete at 42 languages? What happens next?
|
|
|
|
If you run ``make build-all`` & fill up your filesystem, check out `unpotato webwords: cleaning up btrfs docker volumes </unpotato-webwords-btrfs-cleanup-docker-volumes>`_.
|
|
|
|
.. contents:: |