Live data from Hacker News

Shit – An implementation of Git using POSIX shell

git.sr.ht

21–30 of 235 posts

Re: Shit – An implementation of Git using POSIX shell

#21
post #6

Earlier quoted context omitted.

He has a subdomain on his site that he uses for it: https://live.drewdevault.com/

You're not the right person to ask about this, but if Drew is around I would love to hear high-level details about what how this setup works and what the average monthly cost is. I can see that it's open source[0], and I'm very tempted to copy it. I'm already in the midst of migrating all of my video hosting to peertube, but I don't have a solution I'm confident in for livestreaming other than Twitch -- especially be…

I'm definitely not the right person to ask, but:

Archival/storage of video shouldn't be that costly.

With 5400rpm drives (better for archival than more or less any other type of storage media, including faster hard drives), it looks like the going rate is about a United States cent per gigabyte. Two for 7200rpm drives from manufacturers that seem to produce the most reliable drives on the market, consumer-side.

A setup that could survive through a reasonable amount of drive failure, then, seems to be relatively inexpensive, so long as you're not trying to archive your video In The Cloud®.*

*Someone Else's Computer

Re: Shit – An implementation of Git using POSIX shell

#22
Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implement a workable version of git using only shell scripts inside of an afternoon. So I wrapped up what I was working on and set out to prove it.

Five hours later, it had turned into less of a simple explanation of "look how simple these primitives are, we can create them with only a dozen lines of shell scripting!" and more into "oh fuck, I didn't realize that the git index is a binary file format". Then it became a personal challenge to try and make it work anyway, despite POSIX shell scripts clearly being totally unsuitable for manipulating that kind of data.

Anyway, this is awful, don't use it for anything, don't read the code, don't look at it, just don't.

Re: Shit – An implementation of Git using POSIX shell

#25
post #12

are there any other implementations in other languages? (preferably c++). I use libgit2, but the code is a bit difficult to read and hack. I know there is a ruby book implementing from scratch. I want to understand the git internals.

Let's rewrite everything in JavaScript: https://github.com/isomorphic-git/isomorphic-git

What a strange way to spell Rust:

https://news.ycombinator.com/item?id=19540845

(to GP: lots of links related to reimplementing git in there)

Re: Shit – An implementation of Git using POSIX shell

#26

are there any other implementations in other languages? (preferably c++). I use libgit2, but the code is a bit difficult to read and hack. I know there is a ruby book implementing from scratch. I want to understand the git internals.

The WYAG book many have referenced is pretty good. Haven’t gotten through it yet, but I’m looking to do a Go implementation. I also want create my own SCM if I have the brainpower for it to test some new workflow ideas.

Re: Shit – An implementation of Git using POSIX shell

#27

are there any other implementations in other languages? (preferably c++). I use libgit2, but the code is a bit difficult to read and hack. I know there is a ruby book implementing from scratch. I want to understand the git internals.

I know of two, one in pure Ocaml and one pure Go.

https://github.com/mirage/ocaml-git

https://github.com/src-d/go-git

Re: Shit – An implementation of Git using POSIX shell

#28

Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implem…

> I feel like people learn git the wrong way

Why do you think it's the wrong way? I sit somewhere in between and think that some people want to know the details and learning from inside is a good idea. But some other people want to simply be users and for the tool to get out of their way - and that's also good. So if the docs or the UX make either way hard or less effective, that's on the docs or the UX to improve.

Re: Shit – An implementation of Git using POSIX shell

#29

Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implem…

> I feel like people learn git the wrong way Why do you think it's the wrong way? I sit somewhere in between and think that some people want to know the details and learning from inside is a good idea. But some other people want to simply be users and for the tool to get out of their way - and that's also good . So if the docs or the UX make either way hard or less effective, that's on the docs or the UX to improve.

You'll use git a hundred times a day, every day, for the rest of your career. It's easily worth the hour it'll take to learn it properly.

Re: Shit – An implementation of Git using POSIX shell

#30

Hiya HN. I was ranting on Mastodon earlier today because I feel like people learn git the wrong way - from the outside in, instead of the inside out. I reasoned that git internals are pretty simple and easy to understand, and that the supposedly obtuse interface makes a lot more sense when you approach it with an understanding of the fundamentals in hand. I said that the internals were so simple that you could implem…

I view not learning the basic concepts of how git works inside like trying to learn SQL without know what a table is.

You could, but its easier if understand that basic abstractions which are its fundamental building blocks.

Post reply on HN