Rust a meme?

so I'm the sort of dude who spends most of his time on data analysis. i prefer to do stuff with numpy and make plots with altair/vegaLite. sometimes I write webapps using django, flask, or simple python CGI. i know html and css pretty well, and I can get by in javascript if I can use jQuery. i do some coding in java for some web-based "control systems", and if i need to write something to crunch numbers or do something really fast, i'll hack out a C++ or C program to do it. i have some chops at bash/shell scripting that i developed when i needed to do long annoying command-line tasks. and the kind of writing i do requires it to be typeset in TeX to get all the equations pretty. that's a good cross section of what i know as far as programming goes

i hear people clamoring about Rust, but nobody i work with has ever used it. is it worth learning, or should i stick with my old-fashioned shit? i don't want to learn something new if it's never really going to explode, but supposedly Rust has what it takes. does it?

Attached: 1200px-Rust_programming_language_black_logo.svg.png (1200x1200, 56K)

Other urls found in this thread:

play.rust-lang.org/?gist=a35ffcde768e7544efa1e4b7170d9c14&version=stable&mode=debug&edition=2015
play.rust-lang.org/?gist=283adf1bfa0bd2227574ad162dd32542&version=stable&mode=debug&edition=2015
doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Interrupted
rustjobs.rs/
blogs.dropbox.com/tech/2018/06/building-better-compression-together-with-divans/
github.com/dropbox?utf8=&q=&type=&language=rust
github.com/facebookexperimental/mononoke
play.rust-lang.org/?gist=aacce9006ff1afd22e8ac89aa7d07d6b&version=stable&mode=debug&edition=2015
github.com/rust-lang/rfcs/pull/2418)
benchmarksgame-team.pages.debian.net/benchmarksgame/
twitter.com/NSFWRedditImage

Hello world in Rust: play.rust-lang.org/?gist=a35ffcde768e7544efa1e4b7170d9c14&version=stable&mode=debug&edition=2015
Stay away fom Rust desu.

Ignore him. Real hello program in Rust:
play.rust-lang.org/?gist=283adf1bfa0bd2227574ad162dd32542&version=stable&mode=debug&edition=2015

why would you flush in loop?

It's a troll post.

Rust nightly is fine, rust stable is dead. Never for production ever.

doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Interrupted
Also

Rust is pretty solid, but it's not really for data analysis/math uses yet. I'd recommend sticking to Python and C++ if you need it until more Rust libraries come out.

>>Also
Incomplete post?

almost no one uses rust in the industry, therefore no one learns rust.
the fanbase and evangelicals repel any serious or experienced developers from adopting rust.
it's effectively a language that doesn't need to exist, we have C++ already. if you need "safety" just use the jvm.
the language attracts greenhorns and repels the experienced, this is deadly for the ecosystem.
so yes, it's a meme.

its not the SJWs that turn people off of rust, it's the nightly users. SJWs can be ignored but if 100% of usability comes from using an unstable codedbase you are fuuuuucked.

We're hiring Rust developers, send an email to [email protected] with your resume or github if interested.

everyone has SJW, never brought that up.
The language is a half baked abortion, they somehow managed to take all the shitty parts of other languages (npm -> cargo, templates -> excessively verbose compound types )
>rustjobs.rs/
>There are no open rust jobs anywhere in the world.

nice b8 my dude

That website is unmaintained, the company I work for is in that list but the ad is not listed because the website is unmaintained.

There's also a list of open positions in This Week in Rust but companies need to send a messages on Twitter every week for it to be in it, and nobody does.

not interested I have my dream job already, on lunch break from it right now.

Some parts of the language are fine but some of the compiler/AST design is basically impossible to meet their C/cepples replacement goals.

Absolutely nobody uses Rust in the real world, except Mozilla, Google, Microsoft, Chucklefish, Maidsafe, and a few other startups nobody has ever heard of. There's no way you can get a job from Rust, it's a waste of time.

no

You forgot Dropbox, Facebook and a few others

The language everybody wants to use but nobody actually needs.

Also forgot Cloudflare which Jow Forums uses. The request to view this page went through a Cloudflare service that's now written in Rust.

If any of that were true we'd be hearing about it

You are retarded.
blogs.dropbox.com/tech/2018/06/building-better-compression-together-with-divans/
github.com/dropbox?utf8=&q=&type=&language=rust
github.com/facebookexperimental/mononoke

This take is fucking nuclear

wtf was the point of your intro paragraph

C++ is an abomination and should be taken out back and shot.

I was literally at dropbox's rust talk at the rust meetup. They rewrote the core of their service in rust and shit saves them so much money its pretty cash

t. C hacker

I actually use C++ at work.

unironically this

And replaced with C

how tho, was it some characteristic of rust, or another one of those "we were doing something fucking retarded and any change would have been a 100x improvement" talks

>
That's ironically impressive!

>data analysis
Rust definitely is a meme for that.

I'd suggest you take a look at Clojure if you want to upgrade your convoluted codebase into something more general purpose.

- There are equivalents of Numpy and Pandas in Clojure.
- Mature (but unmaintained) data analysis/science libraries.
- There are Java APIs to all of the mainstream big data platforms.
- vega has already been ported.
- ClojureScript is pretty well established as a web language.
- Java natively interops which gives you everything Java has to offer as well.
- Quite mature at this stage.

The only issue is the small community, but if you are considering Rust you probably could cope with that.

> There are equivalents of Numpy and Pandas in Clojure.

There's nothing even close to numpy or pandas in Clojure and most of the data science libraries are unmaintained garbage that nobody has ever used seriously.

The rest of your comment is just laughable. The only thing Clojure has going for it is that you can call into Java libraries. It's a dead language and dynamic typing is for retards.

>numpy
core.matrix
>pandas
Incanter
>no one has used seriously
Plenty of academics have, there are also presentations from companies who are using it in production, but you are the expert here.

Not to mention there are wrappers around things like SMILE and Apache Jet.

>It's a dead language and dynamic typing is for retards.
You really must be invested in another language to have this kind of irrational hatred for Clojure.

> core.matrix
> incanter
> thinking these unmaintained undergrad projects even cover a small fraction of the functionality of numpy and pandas

Fuck off idiot.

>i have no idea what i'm talking about but i have a strong opinion anyway
Ok?

If you think Python is awesome, use it. I don't care. The point of this isn't to convince fanboys like you, it's to present an alternative viewpoint for the OP and whoever else is interested in this here.

Besides Rust, what are some languages with an interesting or unusually type system that isn't H-M + one somewhat new thing? I can think of Crystal (union types) and TypeScript (union and intersection types).

Pony has some kind of wacky capability type system
But if you really want "interesting", learn something with dependent types

This isn't a safe hello world
This is

This reads just like a troll post but in case serious...

Just learn an FP lang like Haskell.

slightly cleaned version, semantically the same
play.rust-lang.org/?gist=aacce9006ff1afd22e8ac89aa7d07d6b&version=stable&mode=debug&edition=2015

why though?

Grayden Hoare the inventor of Rust works for Apple now on Swift

acquiring raw stdout lock and writing repeatedly without releasing it is a key to big I/O throughput, take a look at some `yes` optimizations

Well if you write throwaway code that nobody else uses then maybe you don't need type safety

No I meant why did you bastardize my beautiful hello world code?

because I fell for the "idiomatic" meme

>learn something with dependent types
How practical is Idris today? Not sure I like the idea of no limits on complication time.

are proof assistants and formal verification even useful for something else than proving correctness of state machines in network protocols implementations?

What a weirdly specific question. Do you believe that network protocol state machines are the only type of program where it's useful to have a strong guarantee of correctness?

It is a toy. And ugly one. You could play with it if you want to, but learning Haskell will provide better benefits.

>disparages one toy
>recommends another
Thanks famme

A language based around memory-safety is bad, it is its flagship feature.
I want a general language, not some safe shit that bothers me with shite like not using CamelCase or some stupid shit.
I want to do something and care about 4kb leaked later.
There are only two things, that are better than in C:
>match()
>good docs

I lost faith in the Rust project. I've been writing Rust (toy) programs and following the project for over a year. I feel like the project came to a standstill.
Sure, the community has made some improvements over the past year. Important libraries hit 1.x during the lib blitz. The second edition of the Rust Book is released. But there are still major problems to solve.
Non Lexical Lifetimes (NLL) is still not finished. Why is that a problem? Well, the current borrow checker refuses a lot of valid code. NLL should fix that. To make things worse, the community is brainstorming on even a newer borrow checker even though NLL is still not finished.
The flagship crate (= library), tokio, is still version 0.1. Only a fool would use 0.1 crates in production code.
The failure crate is abandoned by the maintainer. This should've been THE replacement for the error module in std.
The compiler is slow. Really, really slow. They're fixing it by adding incremental compilation. Cool, but not useful when you're using Rust right now.
I know this is cheap, but it still trips people up: string handling. What sort of string? String, &str, &' static str or &'a str? I understand the reasoning for all these different flavors of strings, but it's still inconvenient.
The trait system would really shine with HKTs. If there were any HKTs...

Don't get me wrong. Rust is a good language, but not great. Aside from the Rust zealots, the community is quite helpful.

>the community is brainstorming on even a newer borrow checker even though NLL is still not finished
Is "community" referring to actual competent compiler/lang team people (Niko etc), or randos who just want it to be easier to compile their shitty code? Because if it's the latter, the people responsible for getting shit done aren't likely to touch it until NLL is totally finished, if ever.

>tokio
"Flagship"? What? Tokio is that async I/O thing, right? (I unironically don't know because I've never in my life used it.) All the old async io designs are basically deprecated since libstd is getting async/await some time this year (github.com/rust-lang/rfcs/pull/2418)

>They're fixing it by adding incremental compilation. Cool, but not useful when you're using Rust right now.
??
Incremental compilation is already in and stabilized. I don't think it's on by default yet, but if you're having compilation time problems, just set the flag.

>HKTs
HKTs are a meme. What do you even want them for?

It's shit, don't bother. I've followed its development since the beginning and watched it become the heaping pile of dogshit it is today.

NLL, async/await and incremental compilation are not in stable and enabled by default. The "we're working on it" is a poor excuse for those who want to use Rust right now. "Oh, you want to use feature X? It'll be there. Some day.".

You're probably better off learning Julia.

Rust is worth learning for learning about using ownership to structure programs and for fun, but that's it. It might become a big language in the future, but not necessarily for your needs. For just learning things you'dd be better off learning something like Haskell. Learning Rust after having learned Haskell and sepples takes at most a week.

Yes.
fscq

This is some of the shittiest Rust code I've ever seen.

I want HKT for abstracting over Arc and Rc in the public API of a graph data structure.

Can't you just define an enum Marc with the same API as Rc/Arc that just matches on itself for each method?

Let me clarify: I want to build that abstraction without unnecessary runtime cost.

>if you need "safety" just use the jvm.
nice joke
>npm -> cargo
nice joke
>I feel like the project came to a standstill.
on the contrary, it should be more usable and accessible now than it has ever been
>Non Lexical Lifetimes (NLL) is still not finished.
it's in the 2018 roadmap just like incremental compilation was in the 2017 map, they're not abandoning it
>The compiler is slow. Really, really slow.
it's slow because it has a lot more to do, I know that isn't a satisfying answer but safety comes with tradeoffs and at least the guarantees rust offers are fairly decent, also consider that a common retort on Jow Forums to rust being safe is 'c++ can be safe if you use modern c++' - modern c++ is also a lot slower to compile than what most c++ programmers would be used to
and it should go without saying but there has been a lot of focus on improving compiling speeds in rust, they delivered on incremental compilation and have committed to further improving compiling times
>The trait system would really shine with HKTs. If there were any HKTs...
ATCs will be coming soon which will get you most of the way to HKTs
>The "we're working on it" is a poor excuse for those who want to use Rust right now. "Oh, you want to use feature X? It'll be there. Some day.".
both async and nll are slated to be released with the rust 2018 edition which is just shy of being 4 months away if schedules are kept, and barring that nll is in a feature complete state in nightly which you can use right now
I'm not suggesting that you should use nightly in production and if you have schedules and deadlines to keep you shouldn't be using such a young language in the first place but to suggest that these features aren't going to materialise is just patently false, there's more than enough blog posts and weekly news updates to stay informed about how far this stuff is coming along that there's no excuse to be misleading about it

>long asspained post in defense of a meme language
if you spent that autism making programming great again instead of arguing with Jow Forums maybe rust would have a fighting chance.

>so I'm the sort of dude who
Odd...
I don't remember subscribing to fagblog

What drives Jow Forums's intense hatred of Rust? Just standard reactionism, or are they scared of their penises shrinking if people can code performant programs without having to use inscrutable languages mired in decades of bad design?

>performant
You're a fool if you fall for the lie that Rust is fast.

>What drives Jow Forums's intense hatred of Rust?
Shitposting. The association with Mozilla is enough to bring out the Jow Forumstards who want to bang their gong about how the SJW's are taking over.

>without having to use inscrutable languages mired in decades of bad design?
They don't care about language design, they just want something to be upset about.

>You're a fool if you fall for the lie that Rust is fast.
Do you have any evidence to back that up?
I know toy-program benchmarks aren't worth much, but benchmarkgame puts Rust at a close third place behind C++.
benchmarksgame-team.pages.debian.net/benchmarksgame/

Attached: fast-programs-different-programming-languages.png (1024x576, 43K)

Virtually no one using C++ is moving to Rust. It's completely unheard of in publications related to embedded systems, safety-critical systems, etc.
People prefer to use ISO standardized languages with decades of tools, best practices and libraries rather that meme languages that change every day, developed by Ruby faggots.

All those "companies using Rust" (or Haskell, or any meme language for that matter) are because one guy, one time, wrote something in that language. Call me when MS rewrites some important stuff from C++ to Rust.

The only new language that seems to have some sort of adoption is Go, because it actually brings something new to the table. Rust brings one thing to C++ (memory safety) but completely different syntax and semantics, and even slower compiler that breaks all the time, no standardization, libraries in alpha version on github, etc. It's a bit like selling you a car that has better brakes, but cannot sit more than 2 people, has no trunk and only comes in bright green. Fixing one aspect of a language and breaking ten other things is not improvement, it's completely retarded.

Plus, memory safety is not as bad a problem as it used to be, and Rust does not really fix it anyway since you still have to use unsafe blocks every now and then.
So they literally bring nothing to the table. If people wanted a better C++ they would use D. Or Go, which actually has a garbage collector and not the weird memory management semantics of Rust.

this

There are no unsafe blocks in it, idiot. It's perfectly safe.

so many brainlets in this thread holy shit. you guys call yourselves C++ developers?

Attached: 6u1lw.gif (260x146, 1.13M)

>compiler that breaks all the time,
What are you doing to have rustc break on you?

>no standardization
In what way?

>Plus, memory safety is not as bad a problem as it used to be
It's still a really bad problem. Ignoring it won't make it go away.

>and Rust does not really fix it anyway since you still have to use unsafe blocks every now and then.
Most Rust programs (ie: not C library bindings) require very few to no unsafe blocks. And limiting potentially unsafe behaviour to a handful of easily checkable locations is a massive improvement over having your whole program unsafe.

>If people wanted a better C++ they would use D. Or Go, which actually has a garbage collector
What?
Using runtime garbage collection is serious problem for a language that's trying to replace C++. It's arguably one of the bigger reasons people didn't adopt D.

>Most Rust programs (ie: not C library bindings) require very few to no unsafe blocks.
You have to use thousands of them to write even the simplest useful programs. A usual C codebase is 70% pointer manipulation, usually for linked lists

>You have to use thousands of them to write even the simplest useful programs.
What? No. Do you have an example that's not just a C binding or a trainwreck?

>A usual C codebase is 70% pointer manipulation, usually for linked lists
Rust isn't C. Almost everything C uses pointer manipulation for can be done in safe code in Rust.

>Almost everything C uses pointer manipulation for can be done in safe code in Rust.
Yeah, at 10% of the speed. Nice try speed vampire.

>Yeah, at 10% of the speed.
Ensuring memory safety is done at compile time. There's no runtime speed cost.

Are you saying Rust doesn't have bounds checking?

Rust does have bounds checking, but the cost is generally very small. The compiler is pretty good at optimising away unnecessary checks, and (AFAIK) iterators don't need them.

>"sufficiently smart compiler" fallacy

Then you are using rust wrong if you are using thousands of them
Even writing bare metal rust requires just a few for things like unchecked pointers

"is pretty good at optimising" is not the same thing as "sufficiently smart".

Like Ada, but with AIDS

Rust performs bounds checking only in debug builds. In release builds, there are no runtime checks.

>In release builds, there are no runtime checks.
That's not correct. Release builds don't have integer overflow checks, but they still have bounds checks.

This:
fn main() {
let a: u8 = 200;
println!("{}", a + 100);
println!("{}", "Hello World!".as_bytes()[30]);
}

will panic on line 3 in debug profile and on line 4 in release profile.

>a few sentences
>long
did you forget to take your adhd medicine?
>What drives Jow Forums's intense hatred of Rust?
the cancerous sjw politics are probably a pretty good reason not to invest into rust's ecosystem if you're an autistic neet that is insufferable to be around
>Virtually no one using C++ is moving to Rust.
an encumbered language isn't going anywhere? tell me more
>It's completely unheard of in publications related to embedded systems
they're working on it (tm)
>rather that meme languages that change every day
you say that but then go on to unironically recommend d in your next post, hard to take this complaint seriously
>Call me when MS rewrites some important stuff from C++ to Rust.
>it's only important if microsoft adopts it
>The only new language that seems to have some sort of adoption is Go, because it actually brings something new to the table.
go only has traction because it's an easy language to pick up
>and Rust does not really fix it anyway since you still have to use unsafe blocks every now and then.
unsafe blocks means that you know exactly where to look for memory problems because the rest of the code is guaranteed to be safe, this meme argument of 'b-but you still need to behave like c sometimes' isn't as convincing of an argument as you tards seem to think it is
>If people wanted a better C++ they would use D. Or Go
yes if they want a better c++ they'll just use a significantly slower language with huge runtimes and garbage collection
>which actually has a garbage collector
...oh, you're actually retarded

it's funny that you shill for d, an actual dead language, given that rust is d's spiritual successor done right but with none of the bullshit problems that plagued d like licencing concerns, two incompatible standard libraries which split the community, a backwards incompatible language revision similar to python 2>3, and having to compete with java/c# for popularity in the mid-late 2000s

Attached: 1516367107040.png (859x388, 55K)

Basically, it's up to the Rust community to convince us to adopt their language, not up to us to explain why we don't use it. I think they have not realized that yet.

But it's hard to find a convincing case for Rust. It brings memory safety, at the cost of:
1. Having to learn an entirely new language
2. No direct interface with C code
3. Much less maturity, so fewer tools, books, libraries, existing skills, etc. (hard to compete against 20+ years of C++)
4. Non-standardized language (this matters for safety-critical systems)
5. A single implementation, that seems to be changing all the time (and controlled by a suspicious group)

A bit like a cure for male pattern badness that would also give you tuberculosis, AIDS and cancer. It reminds me of Haskell: "we fixed concurrency!" Everything else is pretty much broken, but you can do safe concurrency thanks to pure functional programming. Big fucking deal.

I predict it will have the same success as Haskell. There just isn't a good reason to move from C or C++ to Rust, which is why everyone has told them to fuck off when they kept pestering people to rewrite their stuff in Rust.

Meanwhile, Go works because it's a compelling upgrade from C or C++ to develop Unix daemons or command-line utilities, due to memory safety and, more importantly, garbage collection, a great standard library, etc. while keeping the language simple enough that anyone can learn it, and static binaries as opposed to a big runtime (which wins against Java, for many use cases).

I predict that Go will eventually become a major language to develop userland code for Unix/Linux (including daemons), rivaling C and C++ there.