Live data from Hacker News

A pure JavaScript implementation of Git for Node and browsers

github.com

181–190 of 203 posts

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

#181
post #129

Earlier quoted context omitted.

This should be expected. Rust isn't a new machine: It's the same old dumb machine, with some extra manoeuvres that make things "safe" (except when you say "unsafe"). It's not even remotely interesting to anyone who isn't troubled frequently enough by those things that need more safety. JavaScript on the other hand, is a new machine: It's the most widely distributed networked machine we have, and it's amazing for that…

None of the things you mention are exclusive or innovated by JavaScript by any means, actually everything you say exists since computer networks exist; are you maybe mistaking internet with web? JavaScript only excels in one aspect: the size of its community which is mostly, but not exclusively, formed by poorly qualified web page prototypers.

> None of the things you mention are exclusive or innovated by JavaScript

JavaScript is distributed across billions of devices. Nothing else comes close.

If you read my comment as an endorsement of JavaScript instead of an explanation why people care more about its expanding universe than someone dinking around in Rust, then you're making two mistakes.

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

#182

Earlier quoted context omitted.

Which information in particular is missing from the C type system in your opinion?

The two major important improvements Rust type system brings are : - the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) - is some data-structure thread-safe. (the Send and Sync traits) With those, you can take any Rust code and play with it without having to ask existential questions. Your code wil…

> the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker)

Having to bear the cognitive burden of making the lifetime explicit in all of the code is a steep price to pay for the benefit of securing the small subset of the code that is actually complex enough to potentially cause a problem. I wouldn't mind having such a feature be optional though, so that you'd enable it for the most precarious parts, something like a safe{} block rather than unsafe{}.

> will this function mutate the value I give it. (&mut pointers)

We already have const. Yes I agree it's better to enable by default.

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

#183
post #168

Earlier quoted context omitted.

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 )

Out of those 4.5k issues, 1000 are closed. 2600 of them are on Rust repositories. Clicking on the first other one, "shell", the very first result is on the Rust RFCs repo. Let's look at the first page overall:

https://github.com/TOTBWF/SteamCurses/issues/16 is someone who is making an issue on their own project because they are interested in a Rust re-write.

https://github.com/acrisci/i3-style/pull/38 is someone who has a PR open on their own project to re-write in Rust.

https://github.com/mintsuki/storm/issues/2 is someone being obnoxious, sure. Not serious, but you could also say it's annoying.

https://github.com/tkaden4/karat/issues/2 is someone on their own repo.

https://github.com/jezen/is-thirteen/issues/582 is already on a joke project, so it's also a joke.

https://github.com/dadrian/whereiszakir/issues/4 is someone on their own project.

https://github.com/adangert/telegram-events-bot/issues/1 does seem like an actual random person making a real suggestion.

https://github.com/spencereir/pharbot/issues/1 is being meme-y so probably not serious, still annoying.

https://github.com/ansuz/RIIR/issues/35 is on a repo specifically to track this phenomenon. It has 35 issues open. Many of which aren't actually examples of people saying this.

https://github.com/jezen/is-thirteen/issues/497 is a second issue on the joke project above.

------------------------------

So, yes. Out of 900 possible issues, in the top 10, one may be a serious request, and two are shitposting, which may be annoying as well, admittedly, but is just as likely to come from people complaining about this as from "The rust community" broadly.

At that level, it's effectively noise.

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

#184

Earlier quoted context omitted.

The two major important improvements Rust type system brings are : - the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) - is some data-structure thread-safe. (the Send and Sync traits) With those, you can take any Rust code and play with it without having to ask existential questions. Your code wil…

> the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) Having to bear the cognitive burden of making the lifetime explicit in all of the code is a steep price to pay for the benefit of securing the small subset of the code that is actually complex enough to potentially cause a problem. I wouldn't min…

Does rust have something like shared pointers? In c++ that's usually a quite easy way to bail out of the cognitive burden of understanding complex lifetimes.

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

#185
post #184

Earlier quoted context omitted.

> the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) Having to bear the cognitive burden of making the lifetime explicit in all of the code is a steep price to pay for the benefit of securing the small subset of the code that is actually complex enough to potentially cause a problem. I wouldn't min…

Does rust have something like shared pointers? In c++ that's usually a quite easy way to bail out of the cognitive burden of understanding complex lifetimes.

We have two! Rc is non-atomic, and therefore not threadsafe. Arc is atomic, and therefore threadsafe. The compiler can let you know if you are using Rc inappropriately, so you get some extra speed if you are single threaded.

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

#186

Earlier quoted context omitted.

I have never treated "C/C++" as the name of a single language. I always read it as "C and/or C++".

They are so often spoken of in the same breath in ways that other languages are not, that I think a lot of people do forget that they are not the same thing nor even that culturally close.

I would assume a lot of recruiter-types or folks just getting their feet wet into programming would assume C++ is just a newer or more powerful "Edition" / "Version" of C.

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

#187

Earlier quoted context omitted.

The two major important improvements Rust type system brings are : - the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) - is some data-structure thread-safe. (the Send and Sync traits) With those, you can take any Rust code and play with it without having to ask existential questions. Your code wil…

> the ownership of your object (who is in charge of free-ing it) and the lifetime of the pointers that targets this object. (the whole ownership system & the borrow-checker) Having to bear the cognitive burden of making the lifetime explicit in all of the code is a steep price to pay for the benefit of securing the small subset of the code that is actually complex enough to potentially cause a problem. I wouldn't min…

> Having to bear the cognitive burden of making the lifetime explicit in all of the code is a steep price to pay for the benefit of securing the small subset of the code that is actually complex enough to potentially cause a problem. I wouldn't mind having such a feature be optional though, so that you'd enable it for the most precarious parts, something like a safe{} block rather than unsafe{}.

It's obviously a learning curve burden but now that I use the language on a daily basis, it doesn't really slows me down. The thing is you don't often need to annotate the lifetimes by hand since the compiler elides the most common case. In practice, the time you need to do the annotation is often what you call «actually complex enough to potentially cause a problem».

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

#189
post #179
post #130

Earlier quoted context omitted.

I don't get your point at all? Rust works on the web too.

Rust works on the web by converting it to JavaScript.

which converts it to binary. You really haven't made a point in the thread. You think JS is special and you like it. Don't pretend that means something.

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

#190
post #181

Earlier quoted context omitted.

None of the things you mention are exclusive or innovated by JavaScript by any means, actually everything you say exists since computer networks exist; are you maybe mistaking internet with web? JavaScript only excels in one aspect: the size of its community which is mostly, but not exclusively, formed by poorly qualified web page prototypers.

> None of the things you mention are exclusive or innovated by JavaScript JavaScript is distributed across billions of devices. Nothing else comes close. If you read my comment as an endorsement of JavaScript instead of an explanation why people care more about its expanding universe than someone dinking around in Rust, then you're making two mistakes.

Still do not get how you leverage these billions of devices as workers for a distributed workload; it is by all metrics suboptimal or mediocre compared with any other programming platform to distribute workloads. As customer end-point we would be speaking in a different context.

Please do not label other’s different of interpretation as interpretation mistakes: I believe your opinion is factually wrong.

Post reply on HN