Live data from Hacker News

A pure JavaScript implementation of Git for Node and browsers

github.com

51–60 of 203 posts

Re: A pure JavaScript implementation of Git for Node and browsers

#52

With the craziness of Js build tools and build configurations, I love seeing how different project stuff use it. I like how they use both webpack and rollup and even name the rollup export as “for-future”. I write a lot of isomorphic libraries for work and it’s not as easy as one might think it is.

Definitely. This GIT example reminds me of what some people are doing with the Web Crypto API (see PKIjs). Things I would never have considered a little as a few years ago.

Re: A pure JavaScript implementation of Git for Node and browsers

#54
post #10

I think it's interesting how there's two phenomena that seem to be related to me that get posted here and seem to get treated with different responses. One the one hand, we have software originally written in C/C++ being rewritten in Rust (not often, sometimes just conceptualized), and there's often a real push back by some people about how it's a waste and not useful. On the other, we have software rewritten in Java…

IMO, this is because there's a general attitude about porting to Rust that porting to Rust, by itself, makes a material improvement in the quality of the software (e.g. reliability, performance, readability), and that these improvements that can't be achieved in C/C++. Entrenched C developers then rise to the debate to defend their language. This debate has happened often enough that any time someone ports something…

...hey everyone, I made a C/C++ developer blood pressure checker in Rust.

Re: A pure JavaScript implementation of Git for Node and browsers

#55
post #10

I think it's interesting how there's two phenomena that seem to be related to me that get posted here and seem to get treated with different responses. One the one hand, we have software originally written in C/C++ being rewritten in Rust (not often, sometimes just conceptualized), and there's often a real push back by some people about how it's a waste and not useful. On the other, we have software rewritten in Java…

I enjoy reading libraries like this because git is seemingly ubiquitous. It’s used more than any project I will ever make. And although I know C and C++, it’s source is kinda hard to approach. Js on the other hand is not for me so I can get a better sense about how it is that git works. I want to see how these fundamental tools are written so I enjoy these ports (even if they’re not perfect).

I really have to second this. I am an avid source reader and when the project is in JS, dart, php, python and to some extent go it's really easy to quickly grok what is happening. C++, Java, Rust - not so much. Some of it has to with the syntax itself but often it has to do with how much indirection and decomposition is standard practice in the language. If I have to jump around to 5 files to see what a single function is doing, it's hard to grasp the bigger picture.

Re: A pure JavaScript implementation of Git for Node and browsers

#57

Soon, there will be a rewrite of the Linux kernel in Javascript. Finally, a way to run Linux in your browser!

https://bellard.org/jslinux/vm.html?url=https://bellard.org/...

That's a fun place to type "rm -rf /" ;-)

Re: A pure JavaScript implementation of Git for Node and browsers

#58

Earlier quoted context omitted.

I can't begin to describe how sad I am that we didn't end up using mercurial everywhere.

It's really strange to me that nowadays source control seems to be, largely, a monoculture. Back in the day I either used, or knew plenty of people using any of CVS, Subversion, Sourcesafe, Sourcegear Vault, Perforce, AccuRev, ClearCase, along with a few others. Whilst distributed version control is a huge leap forward over many of those older systems, it's odd that nowadays it seems to be git or, well, nothing. I'm…

In Mercurial (circa 2016) Tags and branches were stored inside the repo itself, which meant you had to switch to the master branch to create a new branch or create a tag. If you created a tag in a branch the tag was visible only when you were in that branch. It caused numerous headaches trying to figure out why a tag didn't get pushed upstream.

Git correctly treats this as metadata and stores it outside of the source repo itself.

Re: A pure JavaScript implementation of Git for Node and browsers

#59
post #10

I think it's interesting how there's two phenomena that seem to be related to me that get posted here and seem to get treated with different responses. One the one hand, we have software originally written in C/C++ being rewritten in Rust (not often, sometimes just conceptualized), and there's often a real push back by some people about how it's a waste and not useful. On the other, we have software rewritten in Java…

Let's hope that the current "let's rewrite xxxyyyy in JavaScript" will soon be "let's rewrite it in webassembly". This makes much more sense to me.
Post reply on HN