Live data from Hacker News

Shit – An implementation of Git using POSIX shell

git.sr.ht

141–150 of 235 posts

Re: Shit – An implementation of Git using POSIX shell

#141
post #52

Earlier quoted context omitted.

> instead of the inside out Now the name makes even more sense. I first read it as sh/git, but reading it as something that starts inside and slowly works its way out is now my preferred explanation of the name.

The name also plays well with the porcelain & plumbing metaphores of git.

metaphors. Not being pedantic, it just puzzled me a while to see what was wrong with that word.

Re: Shit – An implementation of Git using POSIX shell

#142

Earlier quoted context omitted.

Sure, but I also use a mouse. I could learn how the optical mouse works. I have some guesses about it too, but never actually learned the details. But I'm a user of it - it works even if I don't understand exactly how and nobody tells me that I learned using the mouse "the wrong way" because of it.

A typical mouse has 2-3 buttons, a wheel, and an X/Y axis. Git is 100x more complex, if not more. Give me a break. I'm sick of people glamorizing the idea that you should have your hand held through each step of every tool you use and never expend any effort on becoming an expert in the tools of your trade. Git is an engineering tool, designed by and for professionals. Imagine this kind of obscene complatency in othe…

Every other field makes damn sure that their tools are usable, comfortable and as safe as they can be. While programmers act like it's your fault if you hurt yourself while using a chainsaw-hammer.

Re: Shit – An implementation of Git using POSIX shell

#144

What's wrong with people nowadays? Couldn't they come with a better name ?

Git is already an insulting term where I come from - I remember one of our children, years ago when they were young, looking at my screen and saying "why are you typing git ??" in a shocked sort of tone.

They're much less concerned about their language now.

I don't mean to overstate the case - it's not a swearword or the sort of thing you'd really censor, just a playground term for a mean person. All the same it's an ugly word and (however irrationally) this is one of the reasons I prefer Mercurial to this day.

Re: Shit – An implementation of Git using POSIX shell

#145

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…

Would you say if the data format was say JSON, YAML or TOML or any more human and bash friendly format it would have been easy to implement with your current experience?

Not to vouch for having Git store things in human format. But I often think about how inefficient JSON API's and YAML storage formats are (in parse time) just to be a benefit of a user debugging it or discovering the API through a browser. But since most people use a JSON prettifier plugin or a tool like Postman anyways, what is the benefit of the line format being character strings? Wouldn't a binary package not be just as easy translatable into human readable JSON formatted output as a compacted JSON string is?

Re: Shit – An implementation of Git using POSIX shell

#146

Earlier quoted context omitted.

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.

I'm not certain that git will be the dominant VCS forever, as I'd used CVS, Perforce, Subversion, Mercurial, in various degrees when they were dominant (or at least relevant). Who knows, maybe Linus will have another epiphany, while Microsoft somehow mismanages GitHub and squanders all the goodwill away. Then, a group of upstarts... That said, wanting to learn git's internals for the sake of knowledge is fine as moti…

Even if it stays at widely used as it is now for just two more years it'd already be worth the hour of effort.

Re: Shit – An implementation of Git using POSIX shell

#147

Earlier quoted context omitted.

A typical mouse has 2-3 buttons, a wheel, and an X/Y axis. Git is 100x more complex, if not more. Give me a break. I'm sick of people glamorizing the idea that you should have your hand held through each step of every tool you use and never expend any effort on becoming an expert in the tools of your trade. Git is an engineering tool, designed by and for professionals. Imagine this kind of obscene complatency in othe…

You understand git. If someone said you need to know how sed works, or grep, or babel, or clang, or bash, or perl, or literally any other tool that you use regularly that you don't know the internals of then you'd quite reaaonably say they were wrong because you're an expert what matters to you and you can do your job without knowing how something else works. Perhaps you should try to respect that other people choose…

If you use any of the tools listed, or any other tool, several times a day then it is reasonable to know the internals at least a bit. If you use grep (or git - the same applies) once a month then it's fine to just memorize some commands.

Re: Shit – An implementation of Git using POSIX shell

#148
post #92

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…

eh, common.sh is a lot more complicated than it could be. example: write_hex() { hex="$1" echo "$hex" | sed -e 's/../&\n/' | while read -r hexbyte; do printf "\\x$hexbyte" done } you can imagine other shenanigans with xargs or something, but I think this strikes the best balance between performance and readability (as far as shell script goes). read_int16 and read_int32 don't work on big-endian systems, or if int is…

Such a long text... to end with arguing non-POSIX solution. But the initial goal of the project was having a POSIX code, and it can indeed be a valid goal. So the whole post is "a lot more complicated than it could be." Tl dr: you wouldn't make POSIX code.

Re: Shit – An implementation of Git using POSIX shell

#149

Earlier quoted context omitted.

The name also plays well with the porcelain & plumbing metaphores of git.

metaphors. Not being pedantic, it just puzzled me a while to see what was wrong with that word.

what do you get when you cross a metaphor and a semaphore? a metaphore

Re: Shit – An implementation of Git using POSIX shell

#150

Earlier quoted context omitted.

I try to avoid proprietary services.

You know, YouTube is pretty easy. I bet someone could implement it in an afternoon and a dozen lines of shell script...

A weekend at most.

WORST—-and I mean WORST—case, could crank out a clone during a hack week.

Post reply on HN