
Show HN: A chat client built on git - jonstaab
https://github.com/staab/git-chat
======
shimon
Sure this is a joke, but it's not crazy to think about a distributed commit
log as the basis for distributed messaging. That's why I'm starting GitQ, a
ZeroMQ-like distributed messaging framework that offers full auditability,
customizable conflict resolution, and lazy reconciliation. Use it for your
next microservices architecture!

~~~
MaulingMonkey
I'm already using git commit logs as a micro-blog! ...internal to myself.

I had all this tooling already to e.g. scrape all the git repositories in my
projects directory, and aggregate them into an activity feed for reviewing my
own productivity. A dedicated repository to git commit --allow-empty -m "..."
in, for non-code work, seemed like a natural and logical enough step.

~~~
p4bl0
Heh, you could use my fugitive project [1] and adapt the templates to build a
static html + rss (micro)blog from your commit log :).

[1] [https://shebang.ws/fugitive-readme.html](https://shebang.ws/fugitive-
readme.html)

~~~
mattbettinson
Nice documentation.

------
Terribledactyl
I'm having fun thinking about git semantics in terms of a conversation. "I
didn't like how that conversation went, oh just make a new branch or rebase
master"

~~~
stepanhruda
I said something stupid yesterday, better force push over that

~~~
edem
This train of thougt was too messed up...but we have interactive rebase!

------
niftich
I've been toying with the idea of a git-backed MIME email, where each thread
is a repo, each message is a commit, and send/receive semantics map to
push/pull operations.

I don't work on it because I don't want to reinvent email -- a trap many have
tried -- but I do want explore ways of doing content-addressed distributed
messaging, and a DCVS gives you those for free.

~~~
masukomi
that wouldn't be reinventing email. it'd be reinventing an email client, which
is a great idea. HOWEVER a repo per thread seems ... not good. I'd go with a
branch per thread. Maybe encode the subject in a way that git is happy with as
a branch name but can be decoded to the original text or looked up from.

~~~
niftich
It's a bit about the protocol, a bit about the client, I think.

In worldspace, every message's direct descendants form a DAG, i.e. classic
threading, so messages only know about their ancestors or successors.

The "inbox" contains many independent, unrelated threads. From a client's
perspective, I can see wanting to treat the inbox as a repo containing many
files, each file being a thread.

From a protocol perspective, the total contents and state of the parties'
inboxes is not relevant (nor particularly wise to share); but you would want
to push your changeset to a thread (i.e. a new message) to your recipient. A
git changeset can affect many files, which is not consistent with the
semantics I'd want to convey.

~~~
Gibbon1
Sometimes I'll reply to two related posts in one email. Might be that gits
ability to merge threads would be a bonus vs the usual idea of representing
threads as trees.

------
hakanito
You should remove node_modules from the repo. I see you have it in your
.gitignore, so just delete the folder and make a new commit.

------
TimWolla
I don't think it's smart to commit login credentials to that GitHub account,
even if it's a throw away: [https://github.com/staab/git-
chat/blob/61c401e719febaf3e05f4...](https://github.com/staab/git-
chat/blob/61c401e719febaf3e05f495fba2a841a8e46d1c7/main.js#L15)

Consider using a OAuth token.

~~~
jonstaab
I'm sure someone's going to eventually hijack the account. I'm not too worried
about it. 0Auth would've been a good idea though.

~~~
TimWolla
I just went ahead: [https://github.com/staab/git-
chat/pull/1](https://github.com/staab/git-chat/pull/1)

~~~
jonstaab
Thanks! OS is the bomb

~~~
TimWolla
I forgot about the security feature by GitHub: oauth_authorization.destroy –
Personal access token (API) deleted automatically (found in a public
repository)

------
philbot1008
This just made me really happy.

------
civilian
On OSX, I'm getting timestamps sent to me, but not the messages contained.

Also I think you need to slap a `npm install` in there--- I know you have
node_modules in the repo but I think they don't really like being cloned.

Also, what repo is this writing to?

~~~
jonstaab
Ah good call. I'll add the install bit in there.

The repo is here:

[https://github.com/git-chat-client/git-chat-messages](https://github.com/git-
chat-client/git-chat-messages)

Also, I don't have OSX, so I'm not sure how to test that. Probably something
with your git configuration or maybe my naive parsing of the logs?

~~~
civilian
Hmm. I changed this line [https://github.com/staab/git-
chat/blob/a78fac3e078001ea8e564...](https://github.com/staab/git-
chat/blob/a78fac3e078001ea8e564c908369d85c6eb39609/main.js#L131) to

    
    
        var match = line.match("Subject: (.+)")
    

and it worked for me. I wonder if there's a more consistent way to grab the
subject line from git logs.

~~~
jonstaab
That's super interesting; I didn't know git was so inconsistent across
platforms. Valuable knowledge. I'll add that in.

------
nixpulvis
GIT IS THE DATABASE...

------
edem
The aesthetics of the site is refreshingly simple.

------
amelius
Does it poll? Or does it use push notifications?

~~~
jonstaab
It polls. If too many people join we'll end up DDoSing github again

~~~
amelius
Doesn't that happen regardless?

