12 ms·
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
by kbenson 9y ago
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 Javascript, which people are generally very accepting of, even if they don't plan to use it.
I understand the goals of these are often different, and the benefits are also often different, and they have a different set of use cases, but the reception seems markedly different (at least in tone).
I'm not necessarily trying to imply that means anything, it's just something that struck me while noting we now have Git implemented in JS.
- dfabulich 9y agoIMO, 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 to Rust, even if it's just for fun or for the author to learn more Rust, C/C++ advocates see it as an attack on their language, and bite back.
- deleted 9y ago[deleted]
- test6554 9y ago...hey everyone, I made a C/C++ developer blood pressure checker in Rust.
- diegoperini 9y agoYour entire program should be wrapped by unsafe{}.
- jordigh 9y agoThe only attack I feel is calling C/C++ a language. It's two languages and we don't like each other very much. People who spend a lot of time trying to write good C++ avoid much of C's bread and butter like malloc and free, and the general hatred of C++ from C developers is well-documented. I happen to prefer C++ to C and D to both.
- guessmyname 9y agoI have never treated "C/C++" as the name of a single language. I always read it as "C and/or C++".
- mortdeus 9y agoYou can consider them the same in the sense that they are the guys with the biggest cocks on the block.
- jordigh 9y agoThey 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.
- noobermin 9y agoGoing to be honest, whenever I see or hear someone put them in the same category, it usually colors my impression of said person as essentially never really learning C++.
- deleted 9y ago[deleted]
- novembermike 9y agoEh, I'd call them culturally close. I always read it as "the most common systems programming languages", since that's how the phrasing is usually used.
- zeth___ 9y agoJavascript runs everywhere where there is a browser. Rust runs everywhere where there is a c compiler, which is funnily enough the sample places that C/C++ run.
- bluejekyll 9y agoAnd with wasm, Rust/C/C++ all can run in the browser too...
- zeth___ 9y agoNot quite yet. But getting there.
- bluejekyll 9y agopretty much there: https://www.hellorust.com/setup/wasm-target/ https://www.hellorust.com/setup/wasm-target/
- fineline 9y agoJS in the browser has direct integration to the DOM, networking, various local data persistence APIs, and other IO and sensors (webcam, accelerometer...) etc. Rust can be compiled to run in a sandbox, which can then be integrated via a remote call interface with the JS layer, and thus be indirectly (via JS) connected to the above APIs, but there are currently concerns around the performance of this approach. Rust cannot independently manage a web page which hosts it, without JS. There is some way to go before browsers support practical, accessible and performant front-end web apps in Rust.
- erikpukinskis 9y agoWhen people say “The Browser” they mean “that thing which is on literally every computer where you instantly load that one kind of software”. People think the web is a technology, or that JavaScript is a language. They’re not. It’s not. The web is an idea: it’s the idea that every computer in the world already has the runtime on it that can run your next app. Whatever that is—whatever that runtime is—that’s “The Browser”. WASM is not that. Maybe in 10 years.
- sidlls 9y agoI think you're eliding a lot of context here. Specifically the context of overzealous Rust fans. There's a strong, though not universal or even majority sentiment that "writing anything in C or C++ is basically the same as committing assault, murder, professional malpractice or other similar hyperbolic claim" that some Rust advocates engage in. There's a whole meme about the "Rust Evangelism Strikeforce" on n-gate.com for a reason, and that reason is the community on HN has become a caricature of itself. By the way, this is from a person who made a point to introduce Rust to the team, when even just a year or so ago I'd have preferred C++.
- theprotocol 9y ago>eliding Incidentally, I learned this word from Rust docs (lifetime elision). I'd never seen it in any other context.
- tubs 9y agoTo provide some supporting evidence for this, a choice comment made a couple of days ago: > Rust has many benefits and I find it hard to imagine how anyone manages to get any performance-sensitive work done in the cryptocurrency industry with anything else.
- sidlls 9y agoI've seen every single thing I mentioned ("murder, assault, malpractice") applied to C++ programming in comments in Rust threads.
- deleted 9y ago[deleted]
- MikkoFinell 9y agoPeople are actually claiming that Rust is more readable than C?
- Ericson2314 9y agoForrest vs trees..... Sigh
- littlestymaar 9y agoIt 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 existing project, understanding the control flows and feeling confident to make changes, then Rust wins easily because the type system gives you all the information you need straight in front of you. The first time I had a look at Servo[1], I was able to change what I wanted (which were quite a lot of thing: a few dozens of lines in something like 5 or 6 different files) in a few hours. And when I compiled it it worked fine. Good luck doing the same with a C project you just discovered. And I wasn't even a professional Rust programmer at that time. [1] the experimental browser engine form Mozilla
- MikkoFinell 9y agoWhich information in particular is missing from the C type system in your opinion?
- weberc2 9y agoFor better or worse, Rust has a lot more built into its type system, including semantics for type safe generics and safe memory management. This makes it harder to write a correct Rust program, but also it makes it harder to write an _incorrect_ Rust program.
- littlestymaar 9y ago
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- jcelerier 9y ago> 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 Javascript, which people are generally very accepting of, even if they don't plan to use it. I'll be fair, while I think that both are useless, the second is so far there that I don't even take it seriously - more like a bad joke.
- finchisko 9y agoUnderstand your frustration. But on positive hand, javascript opens new opportunities like using git in the browser (even though meaningful use case is yet to be shown, but there is chance it will be found). On other hand rust implementation brings "just better security" (using sarcasm here for brevity). Yes, it probably could be ported to js (wasm) too, but until somebody does that...
- JustSomeNobody 9y ago> ... but there is chance it will be found... Doesn't this completely ignore YAGNI?
- andai 9y agoIt does, but so does almost all of mathematics :)
- steveklabnik 9y agoIt's often true that you're not gonna need fun, but that's not really the relevant metric. That is, not every bit of software is created for business purposes, or with good software engineering principles, or anything else. Sometimes, you do things just because you can. Some might even call this "the hacker spirit".
- krapp 9y agoWe do what we must because we can.
- greggyb 9y ago> (even though meaningful use case is yet to be shown, but there is chance it will be found) A thought is a browser-based IDE, with a cloud filestore (OneDrive, Dropbox, Google One/Drive (my new preferred stylization of their product)) for repo and dev environment. Think of it like a browser-ified version of what you might do with a server and SSH. We've got a couple JS-based editors/IDEs. We've got many cloud storage options. Now you can put git directly in browser, too. Heck, you could make a SPA and save the whole source as a file on your cloud storage - just open that up in any browser and access other files in that account (or others). Don't even carry a USB around, and still have your custom dev environment on any PC.
- niftich 9y agoLanguages don't live in isolation. They are products of their time and their fates are tied to their ecosystems. JS is a popular porting target because the browser is a widely-deployed environment, but also because platforms like Node and Electron are in widespread use, and therefore targeting JS enables targeting some frontends and some backends with the same code. This project even takes special care in supporting the differences between execution environments. Ports to languages that compete in the same solution space are more prone to drawing criticism because, almost by definition, ports are designed to be feature-comparable, yet cross-language rewrites benefit both from the thorough examination that naturally must take place during a rewrite, and the different features offered by the target language. Most arguments about cross-language rewrites are proxy arguments about whether the bulk of the benefit comes from starting over, or mainly from a tool that offers different -- say, more intuitive, or less error-prone -- ways of capturing what the programmer means; intermingled with a fair bit of language favoritism.
- a-dub 9y agoIt's open source. If you don't like it, don't use it. Rewriting git in Javascript seems pretty useless to me, but who knows, maybe it was a fun challenge for the author.
- a-dub 9y agoOn second thought, it looks like it's meant to be a plug-in for an IDE that's implemented in JavaScript. I suppose that makes sense, kinda...
- deleted 9y ago[deleted]
- invaliduser 9y agoIt can also enable tutorials and interactive teaching material for git served in web pages.
- TAForObvReasons 9y agoWithout being too reductive, a JS implementation of anything represents new possibilities (running in the web browser or other environments), whereas a rust port doesn't expand the surface area. To give a comparison, critiques of rust ports are similar to the critiques of porting everything to node.js a few years ago -- most of the benefit comes from rewriting and applying lessons learned from the existing implementations.
- goatlover 9y agoBut Rust programs can run anywhere JS can now with web assembly, while the reverse isn't true. JS can only run where there is VM for it.
- erikpukinskis 9y agoAre you referring to embedded applications? An app tends to either be embedded or not. Obviously if you’re embedded you’re not going to use a JavaScript implementation of git. You’re just not going to run Rust on IE8. And you’re not going to run JavaScript on your digital thermometer. Either way, there’s no confusion about which language runtime, Rust or JavaScript, has a bigger installed base on those respective devices.
- mankash666 9y agoThe response to js ports are usually favorable as: 1. They're (generally) portable across browsers and backend (nodejs) 2. There exists a much larger JS community than Rust. Given the js community's familiarity with website/webapp design, likelihood of a js port ending up in a real product quickly is high.
- deleted 9y ago[deleted]
- taeric 9y agoTwo questions/thoughts. First is if this is just confirmation bias on your point. Second is if this is not so much that there is a smaller group that are pushing back, but a larger group that is excited. (That make sense?)
- pducks32 9y agoI 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).
- alistproducer2 9y agoI 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.
- Rapzid 9y agoIt's an odd dichotomy. However my biggest take away from it is this; if you are thinking about wanting to implement something on your platform of choice but think "Ehh, it's already done over there so nobody will be interested in it" reconsider! There will almost certainly be people in that ecosystem that will appreciate the effort :) I for one am happy about some of this. I've used the javascript ssh2 library(with a nice async/await wrapper you can find if you look for it) heavily for automation from nodejs. It could have been implemented on libssh2 for my needs, but a goal was for browser support soo.. Who am I to argue :D Perhaps web assembly will make it possible to compile something like libssh2 and consume from JS, but that's a long ways off I bet(being viable to adopt, not get working).
- maxxxxx 9y agoLet'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.
- verletx64 9y agoArsene Wenger put it quite well recently: "Once you are not a danger any more, people love you."
- colordrops 9y agoMaybe it should be, "Once you are not in danger any more, you love people."
- j1vms 9y agoIn Soviet Russia, "Once people not in you anymore, danger love you."
- resource0x 9y agoor this: "once you don't look as if you are in danger all the time, people love you"
- trfa 9y agohttps://transitiontech.ca/random/RIIR https://transitiontech.ca/random/RIIR https://github.com/ansuz/RIIR https://github.com/ansuz/RIIR https://github.com/ansuz/RIIR/issues https://github.com/ansuz/RIIR/issues :-))
- mortdeus 9y agowe have wasm now. why is anybody writing anything in javascript ever nowadays? some form of religious self chastisement?
- krapp 9y agowasm isn't quite ready yet. It requires a javascript layer for interacting with the DOM, which is slower than plain javascript, and it doesn't support features like garbage collection which would make it a good target for some languages. Also, javascript is plaintext and doesn't require a compile step, even though for some reason (cough Node) javascript development usually does, which makes it much more convenient for its original intended use case (a scripting language for the web) than wasm.
- TeMPOraL 9y agoDoesn't compiling a non-JS language into WASM require compiling a fat language runtime as well? That would put the output in couple-dozen-megabytes category.
- dragonwriter 9y ago> Doesn't compiling a non-JS language into WASM require compiling a fat language runtime as well? Not necessarily. For a language with a large runtime that is either irreducibly large (perhaps because you need to support unrestricted eval) or for which you don't wish to spend the effort to allow your build toolchain to bundle only as much as your program actually uses, sure.
- MrL567 9y agoSome of us don't want to use a C/C++ inspired language for web development when there is a simpler solution offered.
- always_good 9y agoIt'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.
- noobermin 9y agoI think what you're (and I'm) observing is this: Many people know js People don't understand C++ People sort of know C Very few people know rust Given that background, this is what I think is happening. A large group of programmers know and work with js, and so, whenever these projects crop up, the mode of comments is somewhere in the positive part of phase space, just by statistics. I personally think it's weird, but I don't drag on people for fun projects, and I usually hold my tongue here since you guys love your web things. Since fewer people actually grok C++ and even fewer rust, when rust rewrites come out, it's a smaller, more systems/low level oriented set of folks with specialized knowledge, and therefore, they have more to say and shit to sling, and the typical comment is negative.
- invaliduser 9y agoIs this the same dynamic that one can observe between java and scala developers? Anyway I can see how converting a "native" program to a web environment can add a lot of value, as you can embed it in a webpage and execute it locally, saving some server load.
- downer55 9y agoNo, because the JVM is (almost) always in the picture. There's a difference between interpreted execution and execution proper. With languages that compile to an executable binary that is platform specific, for targeted CPU architecture and chipset, dependency hell promises a degree of shelf life and planned obsolescence. This injects an aura of fear into each and every event in whatever arms race we hear about. When will the next time be one too many? When will an industry skill set cease to possess currency? With a runtime in the picture, there's always a shim for portage, to alleviate the fear. Other languages are frequently regarded as "bare metal," not only as a matter of implementation, but at a matter of psychology and mind set. Things are different these days with much broader virtualization practices being widespread, but there's always the pedantic nature of technical people raising an eyebrow and asking "why on earth" for some things, but not others.
- geocar 9y agoThis 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. - You can buy cpus anywhere in the world by putting an ad out there that runs JavaScript and pipes the results back to you. - You can build and deliver robust software that "runs" on such a wide variety of terminals including desktop workstations, servers, "phones", televisions, wristwatches, entertainment tablets, refrigerators, space satellites, and so on. - Anybody can learn it. It is so much more inviting and accessible than anything that came before it that people feel very few real barriers to entry. - It's fast "enough". I work in HPC - massive teraabyte-ram workstations building applications where we need to respond with bids in microseconds, disk seeks are counted for writes, and so on, so whilst there are still some things close to my heart that JavaScript isn't fast enough for, it's fast enough for everything else. Managers love this stuff. Seeing our favourite applications running on JavaScript paints clearer a world where we can do fantastic new things. People love seeing "X in JavaScript" because they are seeing "X for the future" and the future is cool! Porting a version control system to rust doesn't: At best, we find additional protection from a specific class of bug. Maybe it's exciting to people who are already excited about rust, but anyone that thinks these things are even remotely the same need to get their head examined.
- Laaas 9y agoI don't get your point at all? Rust works on the web too.
- amelius 9y agoBy the way, I suppose git can already run in JS, if compiled to WASM.
- specialist 9y agoGenerally accepting? I've lived thru null terminated strings, ASN.1, NULL values in SQL, C++, XML, CORBA/COM+, WSDL/SOAP, XSD, event buses, EJBs, ORMs, etc. (I'm forgetting a few dozen, I'm sure.) You wouldn't believe the grief we XML skeptics got, back in the day. Being right and $2.50 will get you a bad cup of coffee. Pointing out the emperor's nude hardly seems worth it. JavaScript is another obvious, terrible, avoidable, costly mistake. Only proving that even pigs fly, given enough thrust. This too shall pass. Just find a way to suffer thru it. -- When the Bozo Bit finally (inevitably) gets flipped, the former zealots never do a mea culpa. It's okay to be wrong. We learn thru our failures. But intellectual honesty is kinda important. For example, Ryan Dahl (creator of nodejs) now mostly recommends Go. I can't overstate how impressed I am with his candor, efforts. (He kinda reminds me of Bill Joy.) Alas, generally, people don't remember when they've changed their mind(s). Which is why, how propaganda works. This cognitive quirk is the one thing that truly scares, depresses me.
- gkya 9y agoI 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.
- steveklabnik 9y agoDo you have real examples of that? I hear people say this happens more than it happens; I’ve only seen it maybe twice ever.
- gkya 9y agoI 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 https://github.com/search?p=2&q=rewrite+rust&type=Issues)
- kbenson 9y agoWell, from just the repo language panel in the left, it looks like the vast majority of those are issues including those words on rust codebases.
- steveklabnik 9y agoOut 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 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 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 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 https://github.com/tkaden4/karat/issues/2 is someone on their own repo. https://github.com/jezen/is-thirteen/issues/582 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 https://github.com/dadrian/whereiszakir/issues/4 is someone on their own project. https://github.com/adangert/telegram-events-bot/issues/1 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 https://github.com/spencereir/pharbot/issues/1 is being meme-y so probably not serious, still annoying. https://github.com/ansuz/RIIR/issues/35 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 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.