Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Revisiting the RPU (Ralsina Programmatic Universe)

A while back I no­ticed I had start­ed many projects us­ing the Crys­tal lan­guage, be­cause it re­al­ly made me want to code more.

Of course those projects are not stan­dalone, many are li­braries or tools used by oth­er pro­ject­s, and some are forks of oth­er peo­ple's tools I made mi­nor changes to ("­fork­s") and some are web­sites, and so on.

Well I semi-au­to­mat­ed the gen­er­a­tion of a chart show­ing how things con­nec­t. First, this is the chart:

RPU Chart

And here is a hacky python script I used to gen­er­ate it via mer­maid (as­sumes you have all your re­pos cloned and will be use­ful for NO­BODY)

from glob import glob

print("graph LR")
sites = [
    "faaso.ralsina.me",
    "nicolino.ralsina.me",
    "nombres.ralsina.me",
    "ralsina.me",
    "tapas.ralsina.me",
]

for site in sites:
    print(f"  {site}>{site}]")

nicolino_sites = [
    "faaso.ralsina.me",
    "nicolino.ralsina.me",
]
faaso_sites = [
    "nombres.ralsina.me",
    "tapas.ralsina.me",
]
caddy_sites = [
    "faaso.ralsina.me",
    "nicolino.ralsina.me",
    "ralsina.me",
]

planned = [
    ("nicolino", "markd"),
    ("nicolino", "cr-wren"),
    ("crycco", "libctags.cr"),
    ("crycco", "crystal-ctags"),
]

hace_repos = [
    "nicolino",
    "tartrazine",
    "crycco",
    "markterm",
    "sixteen",
]

for repo in glob("*/"):
    repo = repo.strip("/")
    if repo == "forks":
        continue
    print(f"  {repo}(({repo}))")

for repo in glob("forks/*/"):
    repo = repo.split("/")[-2]
    print(f"  {repo}([{repo}])")

for s in nicolino_sites:
    print(f"  {s} ---> nicolino")
for s in faaso_sites:
    print(f"  {s} ---> faaso")
for s in caddy_sites:
    print(f"  {s} ---> caddy-static")


def ralsina_deps(shard):
    pass


for shard in glob("**/shard.yml"):
    repo = shard.split("/")[-2]
    for line in open(shard).readlines():
        if "ralsina/" in line or "markd" in line:
            dest = line.split(":")[-1].split("/")[-1]
            if not dest.strip():
                continue
            print(f"  {repo} ---> {dest}")

for a, b in planned:
    print(f"{a} -.-> {b}")


for repo in hace_repos:
    print(f"{repo} ---> hace")

Contents © 2000-2025 Roberto Alsina