Live data from Hacker News

Paris Metro lines on a Git graph

github.com

21–30 of 37 posts

Re: Paris Metro lines on a Git graph

#23
post #9

> I had to remove some interconnections, because there were some cycles. Because git doesn't allow cycles? Then as cool as this is (and it's very cool), perhaps this isn't an appropriate tool for this purpose. Or might the natural, human-built cycles be expressable as subrepositories?

> perhaps this isn't an appropriate tool for this purpose Would Mercurial be more appropriate, or do you think DVCS are simply not an ideal way of mapping metro lines?

Mercurial is also an interface to a directed acyclic graph. If the graph is cyclic, Mercurial would also not be an appropriate tool to model it.

Re: Paris Metro lines on a Git graph

#24
Cool stuff! I'm wondering: are there other fun things people have done with Git repositories? Things that come to mind are:

- Family trees, genealogy

- Electrical circuit schematics

- Storylines for books, movies, RPG

- Accounting, ledgers

- Jurisprudence

etc.

Re: Paris Metro lines on a Git graph

#25

Similar idea for DC Metro here: https://github.com/bburky/git-dc-metro

(original poster here) I figured that someone might have already done it, but I didn't find these. It's surprising because I wrote an extremely similar README file!

However it looks like he wrote the solution manually, whereas I couldn't as it's way too complicated with Paris' metro system. I wrote a small algorithm (using Python) to create the graph. I'll probably publish it, after I clean the code a little.

Re: Paris Metro lines on a Git graph

#26

Cool stuff! I'm wondering: are there other fun things people have done with Git repositories? Things that come to mind are: - Family trees, genealogy - Electrical circuit schematics - Storylines for books, movies, RPG - Accounting, ledgers - Jurisprudence etc.

The gitcoin challenge in the stripe CTF was pretty cool!

Re: Paris Metro lines on a Git graph

#28
post #9

> I had to remove some interconnections, because there were some cycles. Because git doesn't allow cycles? Then as cool as this is (and it's very cool), perhaps this isn't an appropriate tool for this purpose. Or might the natural, human-built cycles be expressable as subrepositories?

I think the git file structure technically supports cycles, you just need to break sha-1 to do it. I don't think the tooling is made for it either.

.git/info/grafts allows creating cycles without having to break sha-1.

Re: Paris Metro lines on a Git graph

#29

Similar idea for DC Metro here: https://github.com/bburky/git-dc-metro

Yep, that's mine.

Actually, it was you Christian, who was describing the git graphs as train tracks and prompted me to do this.

vbarbaresi, you should include the script or whatever method you used to generate the metro. I noticed you also used --allow-empty.

Re: Paris Metro lines on a Git graph

#30
post #29

Similar idea for DC Metro here: https://github.com/bburky/git-dc-metro

Yep, that's mine. Actually, it was you Christian, who was describing the git graphs as train tracks and prompted me to do this. vbarbaresi, you should include the script or whatever method you used to generate the metro. I noticed you also used --allow-empty.

I will, it's a recursive Python script actually. I think the algorithm is suboptimal and a bit messy, I'll share as soon as I rewrite it.
Post reply on HN