Live data from Hacker News

A pure JavaScript implementation of Git for Node and browsers

github.com

161–170 of 203 posts

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

#161
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…

we have wasm now. why is anybody writing anything in javascript ever nowadays? some form of religious self chastisement?

It's funny how everyone damns web technology for changing too fast.

But now that wasm is slightly available, the same people wonder why it's not self-evident that everyone should've jumped ship immediately to such fledgling tech that isn't even a drop-in replacement for Javascript.

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

#162

Code in the project looks really well done. It just needs semicolons ;) I don't get the whole no semicolon movement, especially when you probably have to work with C/C++/C#/Java at some point and it means retraining your brain. Also semicolons help visually distinguish commands from control. 2 spaces I can definitely get behind!

You're dramatizing the mental overhead needed to not write semicolons. Every serious project uses a linter that can add or remove them based on some flag.

I don't use semicolons. It's an unnecessary character. Life moves on.

I'd say Rust has worst of both worlds, if you want to compare it to something, where having or not having a semicolon can mean two different things (return the value or return void). That's an example of actual mental overhead that semicolons can create that still bites me after more than a year of Rust. And it's not something that tooling can necessarily fix for you unlike Javascript ASI.

Using semicolons in Javascript just to keep my brain trained for semicolons in other languages is probably the worst reason to use them I've heard yet. And every time someone finds out I don't use semicolons in IRC, they seem angry about it. So I wonder how much I avoid semicolons just for the sport of it, now.

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

#163
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 dislike JS and the current culture around it because of technical insophistication, but I should concede that JS people are better at this: they make the replica and do not bother you, whereas the Rust community is evangelical, they open issues on repos saying "stop using your shitty lang and rewrite this in Rust." The two are very different attitudes.

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

#164
post #78
post #59

Earlier quoted context omitted.

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.

You don't rewrite in wasm, you compile to it.

well, technically there is a textual format for webassembly... :P

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

#165

Earlier quoted context omitted.

People are actually claiming that Rust is more readable than C?

It depends what you call “readable” I guess, if you think it as : “I can have a glance at this code and feel comfortable”, then obviously C is more readable than Rust, because Rust has a quite a few specific syntaxes that will feel alien to anyone not accustomed. But I'm not sure this metric is relevant. And on the other hand, if you call “readable” the ability of someone knowing the language to get on board of an ex…

> then Rust wins easily because the type system gives you all the information you need straight in front of you

The trait system can actually make following execution a bit harder (just like runtime polymorphism in C++), because you have to find the allocation to know the concrete type of what you're looking at. C is much clearer from this point of view (but more limited for the same reasons).

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

#166
post #163
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 dislike JS and the current culture around it because of technical insophistication, but I should concede that JS people are better at this: they make the replica and do not bother you, whereas the Rust community is evangelical, they open issues on repos saying "stop using your shitty lang and rewrite this in Rust." The two are very different attitudes.

Do you have real examples of that? I hear people say this happens more than it happens; I’ve only seen it maybe twice ever.

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

#167

JavaScript: Because that's what we know.

Possibly; but as someone who maintains a NodeJS native addon in C++, I frequently _dread_ new releases of NodeJS that invariably break my bindings. A shim library called "NaN" has done so much to help with this; I would have given up sooner. Having libraries implemented purely in the language from which the library is implemented solves many many headaches, irregardless of JavaScript or not.

> Having libraries implemented purely in the language from which the library is implemented

Err, meant to say:

Having libraries implemented purely in the language from which they are used ...

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

#168
post #163

Earlier quoted context omitted.

I dislike JS and the current culture around it because of technical insophistication, but I should concede that JS people are better at this: they make the replica and do not bother you, whereas the Rust community is evangelical, they open issues on repos saying "stop using your shitty lang and rewrite this in Rust." The two are very different attitudes.

Do you have real examples of that? I hear people say this happens more than it happens; I’ve only seen it maybe twice ever.

I havent made any bookmarks about that but I recall such things appearing here time to time, in threads and as posts.

(Edit: there are nearly 4.5k issues with their title containing rewrite rust on github: https://github.com/search?p=2&q=rewrite+rust&type=Issues)

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

#169

Earlier quoted context omitted.

You're aware that most operating systems have a C API, right? Give me a place C doesn't run where js does.

In a browser. Yes, there's wasm, but it has a lot of limitations that don't apply to JavaScript. fineline had a good comment about it upthread: https://news.ycombinator.com/item?id=17088315

https://github.com/kripken/emscripten

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

#170
I spun up a quick dashboard of this project at Chart.ly [1].

A couple interesting points. Will Hilton is the main guy driving the bus on this project. And... Sunday and Monday are his most productive days.

Keep up the good work!

[1] https://chart.ly/github-dashboard/isomorphic-git/isomorphic-...

Post reply on HN