6 ms·
Are my perceptions clouded from being inside the Hacker News echo chamber, or is Rust really picking up steam really fast? It seems to have more libraries and
by outworlder 11y ago
Are my perceptions clouded from being inside the Hacker News echo chamber, or is Rust really picking up steam really fast?
It seems to have more libraries and the ones it has are more advanced than what would be expected from a language this young.
- swah 11y agohttp://arewewebyet.com/ http://arewewebyet.com/ I always look for a SQL driver, and then if it has connection pool support. If a language passes this second test, the language is ready ;)
- killercup 11y agoSo, rust is ready? There are multiple database drivers and there is at least one crate for connection pools (r2d2) that also works with diesel (query builder).
- politician 11y agoDon't forget support for transactions! That's often missing too.
- djsumdog 11y agoI really hate all the "let's port everything to <fancy new language>" whenever a security issue comes out. That being said, the Rust community has done a lot of amazing work. There are people who are not just talking shit, but actually making attempts to port or rewrite some major things in rust. I was thinking about using it for a project recently, but I found the GTK documentation to still be lacking. Documentation is the biggest factor is language survival. I hated Python around 2002/2003, but today the documentation is orders of magnitude betters. I really got into PHP back then thanks to its documentation, not realize how awful a language it was under the cover (although PHP7 seems to be making some huge strides to get it away from whale-guts status: an actual AST, name spaces, things that are slightly more sane). So long as they're more tutorials, stackoverflow questions and library projects for Rust, it will grow. I have pretty high hopes for it being a major language for embedded systems. Who knows, maybe in five years we'll have production read Rust based kernels that can run existing docker containers.
- nickpsecurity 11y ago"I really hate all the "let's port everything to <fancy new language>" whenever a security issue comes out." That's a nice oversimplification, even disinformation. More like ALGOL60-68 was designed with prevention of common issues in mind. It didn't run on PDP-11, so they ported & modded BCPL into C to write UNIX. All kinds of stuff written in that language with tons of flaws that were mostly the same and preventable since ALGOL's. Many calls to use alternatives (eg Wirth's, Ada) that prevented them by default with switches to turn each off only when necessary. One was a clever C variant called Cyclone with pointer and memory management tricks to knock out errors. Inspired by it and some others, Mozilla team created Rust to achieve similar safety/security objectives that existed since 1960's for ALGOL. So, it's not a fad or gimmick. It's recognizing certain things regularly trip up system programmers. The basic techniques to stopping it were deployed and field-proven far back as 1961 in mainframes. Many others since, like those in Rust. The author, rather than your assertion, is simply applying that wisdom to reduce flaws instead of ignoring it. Rust and DOOM were probably chosen because they were more fun for author than rewriting djbdns, OpenSSH or Nginx in Ada2012/SPARK2014 w/ full, prover use. Entirely understandable even if not ideal.
- gpderetta 11y agoAFAIK ALGOL 68 was garbage collected and so where many safe languages of that period, so no, the techniques to prevent memory safety issues without garbage collection (affine and linear types, region systems, move semantics) where only implemented in pratical languages in the last 20 years (ATS, Cyclone, Rust). Rust is possibly the first non-GC'ed safe language that seems to have a chance to reach mainstream adoption. So, while it is true that the success of C primarily derives from it being used to implement UNIX, it is also true that for a long time (and, arguably, still today), GC'ed languages where perceived to be inadequate for system programming.
- nickpsecurity 11y ago"AFAIK ALGOL 68 was garbage collected and so where many safe languages of that period, so no..." Garbage collection is not mentioned in ALGOL68 report at all. There's a link to it on Wikipedia page if you want to check. Not ALGOL60, either. It wasn't in Pascal, Modula-2, or original Ada 1983 rationale either. PL/0 of MULTICS, PL/1 & PL/S of IBM, ESPOL/NEWP of Burroughs, or Mesa at Xerox didn't have it either. All had various enhancements for safety in quite a few forms. So, I have no idea where you're getting that information from. Disinformation, most likely, that was probably given to you by those who didn't study history and strawmaned up reasons safer, non-GC languages couldn't exist. ;) Note: Dynamic memory allocation generally had to be done carefully since there was no GC. Yet, the other safety features of the language helped reduce the number of problems you'd run into. Especially those that discouraged directly working with pointers. Now, let's look at memory safety. C was a language designed specifically for PDP-11 & its model. Burrough's B5000 (1961) was a machine custom-designed for ALGOL and its philosophy. It had stack overflow checking, array/pointer bounds checking, pointer protection, HW checking of argument types during function calls (made possible by OS written in ALGOL w/ strong types), and tags to prevent execution of data. You can bet your ass that ALGOL and a machine designed for it was much more memory safe than C on a PDP-11. Or even C on a mainframe. Doing a pentest on that architecture with today's knowledge gave me very few points of ingress due to all those checks implemented for the safe-by-default language. "it is also true that for a long time (and, arguably, still today), GC'ed languages where perceived to be inadequate for system programming." That would be true. Thing is, that had nothing to do with the safe languages and approaches that didn't use GC's and predated C. Further, Modula-2 showed one could match C-like simplicity/efficiency with better safety with about no effort. Taken further, Hansen developed a safe-by-design langauge (with 5 keywords lol) and OS called Edison on PDP-11. At that point, it was clear that Thompson and Ritchie's preferences were only reason their PDP-11 language was that insecure and hard to analyze. :) "Rust is possibly the first non-GC'ed safe language that seems to have a chance to reach mainstream adoption." This, plus claim about recent advances, I agree with. It has a lot of potential. It's why I promote it and help people posting here with Rust projects. Also tried to help them with their docs.