Rust 1.12 released two days ago. Are you using Rust yet? Why?

Rust 1.12 released two days ago. Are you using Rust yet? Why?

blog.rust-lang.org/2016/09/29/Rust-1.12.html

Other urls found in this thread:

en.wikipedia.org/wiki/TI_MSP430
youtube.com/watch?v=ftQfpAeyxPo
doc.rust-lang.org/beta/std/collections/struct.HashMap.html
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=gnat&lang2=rust
enyo.de/fw/notes/ada-type-safety.html
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=rust
enyo.de/fw/notes/unsafe-rust-type-safety.html
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go
inf.ethz.ch/personal/wirth/Articles/Modula-Oberon-June.pdf
blog.burntsushi.net/ripgrep/
twitter.com/SFWRedditImages

Shitty SJW communist leftist liberal feminist anti-racist (code for anti-white) language. I will stick with C, whose community is entirely composed of glorious conservative senior programmers and it is so difficult to use only geniuses (which, as everyone knows, are all right-wing, because it's the thinking man's ideology) such as myself can get into it, so it will remain foreverially un-pozzed and un-kiked. You could say I was born at the wrong era of computers lol.

the C memes on this board are seriously out of control

Wow, that's really funny. You totally nailed Holla Forums with that one, user. I think you forgot to throw in a few zany fedora negbeard attachments, though.

...

You're on the wrong side of programming language history shitlord. Just because low iq races cannot manage memory doesn't mean you should continue programming in hate script like a crypto facist.

We're off to a great start.

Forget start, the thread should have ended right there. Nothing else needs to be said.

tbh rust is by far the best programming language that has ever seen non-0 amounts of users. Yes the main development group is SJW as fuck and yes this HAS already had an effect on rust development (some whale forced the devs to dox themselves and more when she said her feewings were hurts because her pull request to add transinclusivity in the tos was accepted and then reverted on account of not having been discussed with the group in charge of the tos).

However, the only rust library I've seen use a tos beside rust itself was diesel, and I have not seen evidence of SJW garbage with any other group which uses rust, so it's just far-removed enough that I don't think it's an issue for the users (especially since rust is far enough along that it should be viable to simply fork and perhaps merely use it as is if issues arise).

Unfortunately, the only people on the whole of Holla Forums are irrational post-stormfront-invasion Holla Forumstards so they don't care about facts such as these.

Stopped reading there, Pajeet.

Lifted from the other Rust thread.

You have this response because you talk from the perspective of a passive consumer, and not a contributor who must access the community they will be dealing with. That's fine, there is a place in the world for non-entities such as yourself, but you make a fool of yourself when you step outside your lane.

You're the sort of spineless fool who would critique a movie starring a nigger as George Washington by saying, "I don't like it because it's a bad movie, not because of a POC! An out of place POC in a movie doesn't stop me enjoying the movie. Complaining about the POC is reactionary".
Suppose for a moment that you weren't a beta-leftist and could actually code. Wouldn't it annoy you if your contributions were rejected for superficial reasons based on pronouns and the remote possibility that some special snowflake could be offended by a function name?
When you have calls for LESS WHITE MALES on the governance team, that becomes a technical concern to contributors, and those who will actually have to interface with the community.

CIDF arrived on the scene!

Honestly don't see the point/use for this language

Just kind of seems like a less mature C++ that also makes going low-level a pain in the ass

Could be wrong but I rather doubt it

At least try to find pasta that is somewhat tangentially to the post you respond to, CIDF shill.

There's one problem with your implication, that all the retards rambling about 'duh SJAYDUBYAHS' nowadays are actually programmers.

We already had our response to the bullshit, through C+= and Toleranux. Holla Forums is a shell of its former self and the loudest voices are just retards from Holla Forums who haven't ever actually developed anything.

Additionally, let's take a stab at your argument:
Wouldn't it annoy you if technologies were dismissed based on superficial reasons such as a minority of annoying, mentally ill landwhales who believe that they're 'genderfluid'? Wouldn't it annoy you if threads discussing technologies were shit up based on this minority?

...

Dumbfuck.

Why does it matter if it is good at low level? Not like you would ever write anything low level anyways so why do you care?

If it were the case of a SJW merely participating in the community, akin to FreeBSD girl, you'd have a point.

What you're missing is that these mentally unstable people are the core developers.

All you need to do to go low level is to add "unsafe" around your block. The thing is, you don't even begin to have a reason to want to go unsafe if you're not writing a kernel or microcontroller software.
The point of the language is safety at no cost. You are within 10% of the size of the equivalent compiled C executable, you are within 10% of the speed of that same executable, and unlike C++, you have no runtime to worry about. Unlike C, you are guaranteed to have precisely 0 potential buffer overflow exploits, 0 silent out-of-range operations, 0 stack smashing possibilities, 0 use-after-free, 0 double-free, etc. and you pay nothing at runtime for it (your runtime is still deterministic).
As a bonus, you get tons of goodies like real functional programming and ML constructs, real lisp (actually dylan) macros, compiler extensions (a kind of super-macro feature), and a debugger that can tell you which package you forgot to use when requesting a symbol, which case your switch statement isn't covering, and which variable you declared as mutable when it doesn't need to be.

Note also that the memory safety features of rust means almost all mitigations that are typically applied systemwide at the OS level would no longer be needed (significantly speeding up everything), not to mention the obvious ridiculous and free boost to software security.

That's pretty much what it is: an inferior, extra-nagging version of C++ that constantly shits false-positive errors. It calls itself a "safe" systems language, but you'll need to use "unsafe" things all over the place if you want to do anything serious.

If you want to be "safe", just use C++ with RAII and smart pointers where necessary.

It's free software under a cuck license, so all you have to do is fork at any point in time if it bothers you. That's why, while the concern is legitimate, it is also pointless.

Expert fizzbuzz programmer, ladies and gentlemen!

No thanks, currently checking Ada.

Also:

That Ada thread piqued my interest too.

Sorry if I triggered you by not liking your safe space language, friend.

REEEEEEEEEEEEEEEE DELETE THIS

But it does.
It just doesn't have guaranteed tail call optimization.
They're waiting on an RFC, the last one failed to gain consensus.

It's kinda verbose, but I guess it make sense for large systems to be maintained for a long time, "write once, read forever".

I'm really enjoying the type system (types, types everywhere...) and the concurrence stuff,

I want all non-C """""programmers""""" to leave

well done Holla Forums

It's just a fucking name, and in the Ada forums I don't find any of the current insanity.

Ada is pretty much rust if rust was shit.

The ironic thing Holla Forums doesn't understand is that *all* languages, frameworks, technologies and fields of software development are riddled with SJW/diversity shit. Programming is easy enough to bullshit your way around into some useless do-nothing position and formal companies are subject to hiring laws anyway.

If you want to get away from SJWs, technology is the last place you should be. It's more or less ground zero.

No, it should be the first place you should be. Start your own company if you hate them so much.

I have already been spoiled by Erlang's concurrency stuff but still interested to go through it all, even if I never write any Ada code myself.

It's very verbose, but then I have Racket when I want something short and slick.

Ada doesn't make the same guarantees Rust does with memory.

Which is one of the reasons it's a shit version of rust as opposed to a good version of rust.

Erlang and Elixir make me never want to bother with shitty mutexes in imperative languages ever again.

Ada status:
☐ not btfo
☑ btfo

Care to explain?

Emojii users should be perma-banned from chans.

Tell me, what kind of emotions do checkboxes convey?

I identify sexually as a checkbox and you are infringing on my safe space right now. Please stop.

Are you going to call the internet police?

If it isn't good at low level and doesn't aim at being so, then it shouldn't advertise itself as a "systems programming language".

How is it not good at low-level, though?

It's not C

And C is also bad at low level because it's not assembly.

But rust has inline assembly, so clearly it's better than assembly?

No, because its instructions don't map 1:1 to assembly. You would know this if you were a C pr0 like myself.

lol

He means you can instruct the Rust compiler to emit raw assembly codes.

Stop trolling for a bit will ya?

No, rust supports inline assembly, just like C and C++ do.

no
trailing semicolons in blocks change the return value

That is what I mean.

Actually they do more than that, they change the TYPE of the return value. Which makes those error easily catched at compile time.

Try again.

No
because there is nothing I need or want to program

No
Rust support on MSP is poor to nonexistant

What?

Pajeet probably thinks microsoft phone is "hip" and "happening".

en.wikipedia.org/wiki/TI_MSP430

why are you even on tech?

Microsoft Paint. What else would you try to use Rust on?

Rust won't ever work on devices with 16 bit processors.

youtube.com/watch?v=ftQfpAeyxPo

No, because it's unnecessarily complex for my needs. Go is very close in performance despite being GCed and much simpler, plus it has a much richer ecosystem.

But sure, if you're really in that position where you need manual memory management and memory safety is key, Rust is your best option.

The secret is that they've found the perfect use for the SJW's. None of them ever touch code, they just touch documentation. They document all of the shit that a programmer would never want to for them, because it makes them feel useful. If tech wasn't filled with retards who sperg out when they see the word 'they' instead of 'him', they'd realize that having hundreds of people to document your code for you so that you don't have to is great.

It's a good idea, but you're under the assumption they understand what they're documenting.

The rust docs are quite good. So someone must be doing something right. Hell, there are links to technical documents explaining why they made certain decisions in some of them: doc.rust-lang.org/beta/std/collections/struct.HashMap.html

What if we made a fork of rust like C+=

No. C++17 is fucking gold and does absolutely everything I need and faster.

benchmarksgame.alioth.debian.org/u64q/compare.php?lang=gnat&lang2=rust

Does it scale yet? I'm not interested in 2 hour recompile times for smallish (100k LoC) projects after changing 1 character.

No. And it's unlikely I ever will.
Today's random selection from the list of legit reasons not to use Rust is:
Because it has six string types.

How funny.

enyo.de/fw/notes/ada-type-safety.html

Also
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=rust
So what's the point of using Rust again?

enyo.de/fw/notes/unsafe-rust-type-safety.html


There is no point, Rust is a forced meme.

Wow who'd have thought

There is none. Ada is better and doesn't have any trouble with large projects.

Huh, would you look at that? It's like Rust's safety guarantees are a complete joke when it actually matters.

Nope, I'm sticking with Python and C++ which are working just fine for my career and personal projects at the moment.

Jumping to the newest fad language just for the sake of it seems pretty retarded.


How are SJWs even a contender for anything? Or have they cucked white males into creating the language for them?


Fucking disgusting. I'd rather do manual labor than be around people like that.

benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=go
so what is the point of using go again?

As also said, this is not news to anyone who can read Ada. I suspect the SPARK subset bans it if you really care (hint: most people don't).

Slightly interesting is that Wirth removed variants when going from Modula-2 to Oberon to close exactly this hole in the type system (see S5.1 of inf.ethz.ch/personal/wirth/Articles/Modula-Oberon-June.pdf ).

ayylmao indeed


The *Ada 95 spec* bans it. An implementation allowing it is a bug.

That's it, I'm learning Ada. I don't care how verbose it is.

Except for the binary tree test (which uses way too many Go routines) Go and Rust a pretty much equally fast. However, if look at the RAM usage you'll see that Rust uses a shit load more.

I mean seriously, scroll down a bit and tell me that a few milliseconds are worth that much more RAM usage.

yes

blog.burntsushi.net/ripgrep/

I'd love an Ada comparison. Too bad you'd never live long enough to implement complex regex in it (the core libs one doesn't have support for unicode or look ahead).

You always have this trade off.
A good compromise between memory usage and speed is better that just focusing on speed.

The memory usage storing the results will always be less than that of the initial searched file. It also dumps straight to stdout and doesn't use any extra memory of it can. It's not unique to ripgrep, all of the programs have to store the results somehow.

Why doesn't he compare the memory usage in his benchmarks?
Maybe it's because it would make his program look bad.

Probably because it was outside the scope of what he was working on, it was about using Rust's unified strings as well at byte folding and SIMD to make an extremely fast string search.

Since its triggering Holla Forums though, I'll use valgrind to check the memory usage of grep and ripgrep when I get home.

Well, Ada has FFI, so you could just link to an implementation in Rust

Just glancing at that, he seems more concerned with shilling ripgrep than with analyzing the methods each program uses and why some are faster and slower than others. Doesn't seem to have all that much to do with Rust, but will read it more thoroughly later.


More languages (okay, mainly high level strongly typed ones) should have FFIs direct to Ada rather than going through C bullshit.

He actually does quite a good job of looking into why specific implementations are faster or slower, even going so far as to point out specific pieces of code later in the post.

Doesn't seem to work in Rust 1.12. Maybe it works this way due to an aliasing bug.

Of course, you can still break the type system by explicitly casting between pointer types.

How would that be any different in practice, apart from not using C types to define it?

Well one thing is for sure. ripgrep finished in about 2 minutes under valgrind. And I started grep 20 minutes ago. I'll get the comparison to you guys eventually.

For those who want to know. ripgrep used 2MB of memory to search the kernel for '[A-Z]+_SUSPEND'

No idea what grep has taken yet. Still waiting.

I gave up on grep, and switched to git grep. Which is much faster (mostly because this is also on a new git branch, so there are no build files laying around.)

git grep: 16.67 MB
--------------------------------------------------------------------------------Command: git --no-pager grep -E -n -w [A-Z]+_SUSPENDMassif arguments: (none)ms_print arguments: massif.out.17463-------------------------------------------------------------------------------- MB16.67^ ## | # | :# | :# : | :# :@ | :# :@ | :# :@:: | :# :@: : | @ :# :@: : | @ :# :@: : : :: : | ::::::@:::::::::::# :@: ::::::::::::::@:::: ::::::::::::::@:::::::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ | : : : @::: ::: : :# :@: ::: ::: :: :: @:::: ::::: ::: ::::@: :: ::::::@ 0 +----------------------------------------------------------------------->Gi 0 29.89Number of snapshots: 58 Detailed snapshots: [5, 14 (peak), 16, 28, 45, 57]

ripgrep: 2.3MB
--------------------------------------------------------------------------------Command: rg -n -w [A-Z]+_SUSPENDMassif arguments: (none)ms_print arguments: massif.out.17540-------------------------------------------------------------------------------- MB2.303^ # | @ # | @ @ @# | @ : ::: ::@ ::::::@:::::@# :::::::::::@::::: | @::::::::: @:@:::::::: @:::::::@:::::@#::::::@:::::@::::: | :@ @ @::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: | :@@:@::@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: | ::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: | @:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: |@:@:::@ :@ :@:@::::::::: :@:@: :::::: @ ::::::@:::::@#::::::@:::::@::::: 0 +----------------------------------------------------------------------->Gi 0 40.13Number of snapshots: 92 Detailed snapshots: [1, 3, 8, 10, 13, 15, 26, 28, 39, 49, 59, 61, 62 (peak), 72, 82]

tl;dr: C fags BTFO, Rust's version uses 13% of the memory, and is faster.

GNU grep is faster on my machine.

...

Make sure it's compiled with SIMD enabled. It wont by default because LLVM by default considers x86 to not support it fully.

Better typing, less mucking around with anything to do with C, possibly some slightly better optimisation. That's about it I suppose.

Okay, I was hoping for specifics, not the kind of vague bullshit I could get from a Trump rally. You didn't give me any, though, so here, I'll just pull some out of my ass:

- Character types are intended strictly for encoding text, and have the same signedness on all platforms. There are separate integer types for various bit widths.
- All array parameters are passed as fat pointers, the contents of which are platform- or implementation-defined, and compilers that support this FFI must expose them as an opaque black box.
- Tagged unions are supported, with a clearly defined mapping from variant size to tag size, and variant declaration order to tag enumeration value.

I mean, those are three things I could get behind, just off the top of my head. You can't overspecify, though. You gotta take into account that you've got data (bits) and code (functions) and if you go past that and specify more stuff about the type system of any language that wants to talk to yours, then you end up in a situation where someone has to reimplement your whole compiler and that's an FFI nobody will ever use.

Also I have no idea if Ada works the way I described. Does it really use fat pointers? Does it define the internals of tagged unions? I don't know. In fact I have no fucking clue.

Rust is the coding equivalent of human rights: a stupid solution to an non-existing problem that no nes but a few snowflakes cares about

WELCOME TO THE PARTY - YOU'RE 30 YEARS LATE

fuck off retard.

Are there actually any materials that compare Rust to C/C++ that aren't hour-long videos of presentations by some beta nu-males recorded on some random convention in bumfuck nowhere?

All I wanted was "C with strong pointer/bounds checking". Then I could mix and match with C code to have the slow path be run slower and safer. Instead they shit this mess out which can't even handle compiling large projects. I think it might be the first ever toy language for systems programming. They wasted years building a skyscraper on a sand dune.

This. The task isn't really incredible: just fix C's stdlib and some problems; maybe add classes just for the sake of namespaces (no inheritance, no nothing; just something better than structs with func pointers that you can't cast without annoying warnings.

It's only popular because there's a PR campaign pushing it like Sun pushed Java, if you really want to save the industry from being destroyed, start a campaign to denounce Rust and remind everyone why it's a horrible design and won't work in real life

I don't have to. Systems guys are conservative and a language that doesn't fit their workflow won't even be considered. It'll probably be used less than erlang.