[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
What do you think about the Rust programming language? Why are
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 96
Thread images: 6
What do you think about the Rust programming language? Why are so many computer scientists excited about it? People are talking about rewriting everything in Rust.
>>
too complex, won't catch on
>>
>>53841603
>What do you think about the Rust programming language?
Looks cool but until I've taken a closer look at it I can't judge it for sure.

>Why are so many computer scientists excited about it?
I'm excited about it because it brings together all of the things that low-level imperative languages have always needed in a way that has never been done well before.

It might be the C-killer due to that. Only time will tell.
>>
I started to learn it one week ago and so far it feel like a C/C++ with enforced good practices regarding memory management, a more coherent synthax, some interesting functional elements and a better dependency management. I use mostly Python and C for everything, I learnt Go and dropped it quickly but I might stick to Rust. The compiler is really punishing you all the time so it's a little bit infuriating but it get better as you understand what you're doing. The community is nice for the time being so it makes up for the lack of documentation. I really hope Rust work out because it seems like the first decent alternative to C/C++, I never checked D tho'.
>>
>>53842416
>I never checked D tho'
Hint: Nothing that forces garbage collection on you will ever be an alternative to C, or C++ for that matter.

D was basically cancer out of the box, just like C++.
>>
>>53842416
>some interesting functional elements
This is what interests me about Rust the most. I'm a Haskell programmer by heart, and writing C is just infuriatingly frustrating because I have to constantly repeat myself, and because implementing e.g. multiple possible return values is sketchy as hell (required manually tagged unions which are just asking for corruption and errors) and not enforced/checked by the compiler.

The more the compiler enforces and punishes you, the harder it is to accidentally make mistakes. This is the strong static typed spirit, which I *really* want to catch on. Especially in C, where you need it.
>>
SJW neo-compsci garbage
back to twitter with you
>>
>>53842282
agreed. haskell or lisp had the same problem
>>
>>53842488
>lisp
>complex
Lisp had a rich and glorious life but like COBOL and FORTRAN it fell out of favor that's all.
Now the only legacy left is emac and SICP.
>>
It's a bit rusty.
>>
File: chat_bureau.jpg (16 KB, 329x500) Image search: [Google]
chat_bureau.jpg
16 KB, 329x500
>tfw try to calling Win32 API with Rust FFI
I don't feel anything
>>
I've been writing various libraries and programs in the past year, started few months before 1.0 so I went through the everything breaks every day phase.

I have to say it's one of the best languages around.

Things I've missed from other languages are:

- Specialization from C++ which is finally coming since the RFC has been accepted. That's important for optimization and other things.
- Type level numbers, dealing with static arrays bigger than 32 bytes is a huge pain in the ass since the traits common to slices are only implemented up to that size.
- Higher Kinder types. It's currently impossible to implement your own reference types that depend on lifetimes.
- A decent macro system, the current macro_rules was good enough pre-1.0 but it's a joke compared to Lisps.
- Panic handlers, they're coming tho, those are important for doing stuff like an actor system.
- Custom allocators, they're coming too, those are important for optimizations.
- Naked functions, they don't seem to want to implement them tho, would be really nice for embedded or OS development.
>>
>>53842488
>haskell
>too complex
It's simple lad
>>
>>53842672
Tried the winapi crate?
>>
>>53842715
not simple enough for a first year programming course at community college. why do you think java is so popular
>>
>>53842488
>>53842715
Haskell is literally easier to compile than C++, and comes with less “features” and syntax and confusing concepts out of the box, too.
>>
>>53842802
>java is so popular
because there are a billion indians

and no, java is an overly verbose mess that does way too much for you and forces you into a paradigm. That lack of freedom makes it more complex. Haskell is really simple
>>
>>53841603
It's unlikely that C will be fully replaced any time in the next decades, however, there are many areas where C is used and a functional, time-tested rust would be a better fit.
>>
File: 1458682953657.jpg (210 KB, 1920x800) Image search: [Google]
1458682953657.jpg
210 KB, 1920x800
It looks ugly as shit
>>
Rust is a false prophet.
JAI is the final revelation!
>>
>>53842709
Oh yeah, and unsafe unions, it's currently boilerplate land if you want to wrap a library that uses C unions.
>>
>>53841603
It's shit and not as safe as they claim.
Modern hipster garbage.
>>
>>53842736
Nope, thanks for the tip'
>>
>>53841603
for one, it's built by Mozilla
the same company that pushed out its founder (and the creator of JS) after it was discovered he donated $1k to the 'wrong' political cause 6 years prior (and mind you, that wrong cause was supported by the majority of voters at that time, we aren't talking KKK or any other extremist shit)

one of the core team members, Klabnik, is an open communist, endorses violence against political opponents, participates in compiling black lists (for firing, unemployability, shutting out people from conferences, etc)

in general, the community/core team has a very strong SJW leanings
which, in general, is unmeritocratic (like, literally, "meritocracy don't real", skills do not matter, good programmers do not exist, we're all mediocrities)

so if you think people should be hired/promoted by programming skill and not by skin color or sex, if you think firing/harassing people for using gendered pronouns in comments is wrong, if you think firing a father of three because he said "forked a repo" is wrong, if you think shitty female programmer is STILL a shitty programmer...

I guess Rust is not for you.


(all references I made in the post are from real events, just can't be arsed to to link each. Ask if you want further details; quite some actually happened in other communities (mostly Python), but in terms of SJWness Python and Rust are very close.
Rust might actually be worse in that regard, Python has just been around for longer - so I guess we might see more of that shit in Rust over time)
>>
The borrow checker is overly restrictive and most of the other truly interesting things in it have analogues in C++, which I only realized after revisiting C++ after looking over Rust.

I credit Rust for making me learn modern C++ and seeing how awesome it got with C++11.
>>
>>53844204
How is it restrictive?

The only annoying stuff so far is it's not lexically scoped and does a couple dumb things with &mut method calls parameters that call & methods on the same value that should work but don't for technical reasons.

And the will be fixed once the MIR work is finished.
>>
>>53844142
I know that the Rust development team has a reputation for far left political beliefs, but Python?
>>
>>53841603
way too complex
>>
>>53844550
dongle fork fiasco came from python convention
>>
>>53841603
>Why are so many computer scientists excited about it?
Nobody, except for a few hipsters from hackernews, is excited about this meme language.
>>
I'm a firmware engineer working with C, and I'd really like to learn one of these fancy new languages. I'm torn between Go and Rust. They both seem to have the goal of replacing C in mind. Which one should I learn and why?
>>
>>53844642
Go has garbage collection, so it may not be adequate for your needs.
>>
>>53844642
both are never going to be used for firmware anytime soon, maybe in 20 years

if you want something to learn, do it for other reasons
>>
>>53844613
Yes, it's such a Reddit-esque sentence. They put a 'science' into everything to sound smart. RUST IS LITERALLY THE LATEST PROGRAMMING LANGUAGE SCIENCE!!!1
>>
>>53844550
van Rossum openly called himself a feminist
google: DongleGate, PronounGate (or quite some other shit that Gaynor started/participated), PyLadies, DjangoGirls
hell, just check Jacob Kaplan-Moss Twitter (and BTW "there's no good programmers, we're all mediocrities" is pretty much word-for-word quote from him)

check out their 2015 board election list of candidates:
https://wiki.python.org/moin/PythonSoftwareFoundation/BoardCandidates2015
feminism this, diversity that
my ass

BUT - strictly when it comes to bossing people around
I recall a discussion on Twitter
they pledged to have 2 (two) female core team members
but couldn't find ANY
even with all this bending over backwards for womyn
>>
>>53844720
women would never succeed with rust, way too hard for them

kinda ironic that they are even trying to push it
>>
>>53844754
yeah, I actually thought about that
between Rust and Go, I'd've expected more SJWness from Go with its openly stated race to the bottom in terms of expected programmers' quality

but it's the other way around

as for irony - well, yeah
communists' carefully crafted plans shatter when they meet reality
who coulda thought? this literally never happened
>>
>>53844814
From experience, I can say that political beliefs and technical competence are only weakly correlated. Klabnik is a case in point.
>>
>>53844814
Go is pure engineering and boring, no women would want it. There is no issues since the core team rules it with an iron fist based on a vision not changed
>>
>>53844885
Yeah, true. There are also no Go changes planned in the foreseeable future, so no chance for any drama. Rust on the other hand is constantly evolving and you just have to wait until a professional victim wants to get something totally stupid into the language and the CIS straight white males are not allowed to argue against it.
>>
>>53844754
>women would never succeed with rust, way too hard for them
hahahahahaha
>>
>>53845239
>no chance for any drama
dude, you severely underestimate SJWs' ability to start shitstorms

some shitlord from core team said on his Twitter that not understanding pointers makes you a shitty programmer - it's a blatant visious attack on women, black bodies, transsexuals and non-gender and -racial-conforming otherkins! Literally rape!

and there you go, a shitstorm a thousand tweets long


(the bit about pointers is, again, a real-world example
some bitch from Python community boasted not understanding how pointers and dereferencing work, and not being able to write a bubble sort
sho nuff, did a talk about diversity and was hired by RedHat
(left after a year because they were not giving this strong independent womyn enough support
(can't make this shit up)))
>>
>>53845239
...though I agree Rust is way more open in this regard

>>53845426
>hahahahahaha
"How to refute your opponents' statements", SJW edition
>>
>>53843886
>tip
Thanks for your anus too :^)
>>
>>53845476
It wasn't supposed to be a refutation, merely laughing at you.

There's no evidence that women have some lower capacity to understand, use or learn certain programming languages. No such evidence that I'm aware of, anyway.

Anecdotal evidence does not count.
>>
>>53845790
>There's no evidence that women
Top programming projects led/contributed to by women?
Out of curiosity, when "Dear Github" letter was published, I went and checked top 30 signatories.

0 women.

Zero.

Not 20%. Not 10%. Not 3%.
Literal zero.

And that's low-effort web shit, not hacking on Linux kernel.

Speaking of which, the other day I picked up the list of kernel contributors by # of contributions.
There was a bunch of Asian/Indian names I couldn't classify gender-wise, but the first distinctly female name was on position 122.
1/122 is 0.8%.

Topcoder ranking?
https://www.topcoder.com/tc?module=AlgoRank
I justchecked top 20 - all male (well, a couple had no avatars).


At this point, it's on you to prove the equivalence of skill. Gap like this cannot be explained by "societal pressure" alone - it doesn't apply in law, in education, in medicine... there IS something.

But you have nothing to back up your claims.
So you'd either keep spewing bullshit or would just run away like a bitch you are.
>>
>>53845790
Ran the fuck away.
As expected.
Bitch.
>>
>>53842843
>Haskell does way too much for you and forces you into a paradigm. That lack of freedom makes it more complex.
Couldn't agree more.
>>
>>53846643
How so? And thanks for agreeing to the java thing then
>>
>>53846684
What do monads and monad transformers have to do with your program? Absolutely nothing, but the language forces you to think about them.

The entire language is like that. The whole purpose of Haskell is putting artificial limitations in the language so they can feel clever about working around them.
>>
>>53844642
>Go

No no no no no.
Go is a nice inbetween

Rust is more your bill, but i think rust will be phased out by something better and more fitting for certain environments

Because of the GC - Go is out of the question (unless you can spare it but eww)

Both Go and Rust have fuckhuge executables.

so unless you're writing everything yourself (which for firmware may be possible) you should probably shy away. from it
>>
>>53844814
>communists' carefully crafted plans shatter when they meet reality
>implying Stalin was ever overthrown
>implying the cyka blyats weren't the majority of the reason the Allies won ww2
>implying Stalin didn't leave soviet russia an economic and military powerhouse
>implying he didn't leave the ruskis completely brainwashed into worshipping him

He never gave two shits about human rights or freedom. By most accounts his plans worked.
>>
>>53847122
>Both Go and Rust have fuckhuge executables.
You can compile Rust with dynamic linking.
>hello world in C - 130KB (mingw gcc)
>hello world in Rust - 48KB (rust with dynamic linking)
>hello world in Rust - 1620KB (rust with static linking)
>>
>>53847623
A hello world that's more than 100 bytes is unacceptable. Even that is too much, but 100 bytes gives a lot of leeway for importing an I/O library and storing pointers to various things.

You can fit an entire OS in 48 KB.
>>
>>53844142
Am I the only one here to doesn't mix politics with my programming?
I like Rust's automatic borrowing/lifetimes semantics, and FP things like enums and lambdas.
C++ provides these but in a very verbose way. I've been utilizing unique_ptr<>s for a while in C++ and I want to move to Rust already. IDGAF about what "SJW" things the CEO of Mozilla did last week, or what Code of Conduct shit they bandwagoned on for PR.
>>
>>53847855
How are enums an "FP thing"?
>>
>>53847913
They're not exclusively FP, but disjoint unions are particularly important in functional programming and type theory. They work really well for pattern matching, are more safe than shitty C unions, and can be implemented efficiently.
>>
Did nim take off yet reddit?
>>
>>53847744
what languages are capable of outputting a 100 bytes hello world binary?
>>
>>53847855

Same here, it's an useful language(just short of libraries and compiler woes), what more do I need?
>>
>>53847982
You know that safe unions were already around before C unions, don't you?

C unions are the way they are because they give you control over memory for systems programming, which Rust enums don't do. Ada has representation clauses but I don't think Rust has anything like that.
>>
>>53844642
Rust or D, both with minimalist runtimes.
>>
>>53848079
I never said that Rust invented them, I'm just saying I like them, and Rust does them well enough for me.
>>
Ada always comes up whenever anyone talks about Rust.
I wanna see one of yall write something useful in Ada, and compare a Rust implementation.
>>
>hey rust looks cool
>2.0 + 1
>error: mismatched types
Really? Not even basic implicit casting?
>>
>>53846023
Saying that there are very few women in open source projects does not imply that women have a lower capacity to understand, use or learn certain programming languages.

Furthermore, I haven't made any claims, other than the fact that I am not aware of any evidence that women have some lower capacity to understand, use or learn certain programming languages.

You've made a claim, and now you're confusing correlation and causation in order to make your point.

There's a big leap from saying "there are few women in open source projects" to "women have a lower capacity to understand, use and learn certain programming languages".
>>
File: female brains.jpg (342 KB, 1334x694) Image search: [Google]
female brains.jpg
342 KB, 1334x694
>>53848231
>>
>>53848342
https://www.reddit.com/r/TumblrInAction/comments/2e5846/tw_red_pill_indisputable_scientific_proof_that/cjwdi7x
>>
>>53848603
>reddit
Nice meme m8, upboated and liked
>>
>>53848231
>very few women in open source projects
Then I mentioned competitions. Then I mentioned projects/companies run by women. You chose to ignore it, much like you ignore the rest of reality.
Feminism has been going on for years, progressives have been bending over backwards to pull more womyn into programming - yet there's no visible result.

You don't have to convince me (or anyone else, for that matter) that gays can do it. Or Asians (as in, Chinese/Japanese/Koreans). Or Indians. Or Eastern Europeans. It'd damn obvious.

But women?

Years have passed, millions of dollars and thousands, if not more, man-years of work have been poured into it - where are the results? Why isn't there any?
Well, okay, there WAS a result - feminists have been responsible for countless harassment campaigns, scandals, shitstorms etc - but not much working code.
Why do all these efforts result in scandals, and not completed projects? Why the most noticeable product of feminism in IT is CoCs, which mostly aim to inject non-productive behaviour-policing parasites in projects? Why the result is this, and not code, not programmers?
Why?
Tell me, fucker, I dare you.


Now, as for reasons.
I don't have the explanation why that's the way it is - and yes, one has to be a neuroscientist to dig to the bottom of it (which I'm not). Linked picture >>53848342 might or might not be bullshit, I don't know and I don't care.

What I DO know - women aren't pulling equal weight when it comes to programming. Period.
Not even 20% of the total, to hell with 50%.

(Now trannies would make an interesting case, but that's another story altogether.)
>>
let a: u8 = 9;
let b: u32 = 10;
let c: u32 = b + a;
...
error: the trait `std::ops::Add<u8>` is not implemented for the type `u32` [E0277]


Rust literally cant add a u8 to a u32
>>
>>53847855
>>53848073

Well you don't _have to_, strictly speaking.

But then there's a chance that some rabid feminist overhears you talking to a friend (not even to her!) about "forking a repo", thinks it's a sexual reference, starts a harassment campaign about you and gets you fired... AND then runs for this language's Board of Directors (100% true story, DongleGate and Adria Richards).

Or the company you work for starts hiring politically correct dead weight, who'd spend her time in gossip, intrigues and scandals - and you, YOU, white male, would end up picking up shit. Oh, and she'd get paid as much as you, cuz MUH equality - while she bullies you (don't forget, feminists hate white men... well, some hate ALL men. Some hate white women too. They all hate someone, though. Some hate everyone, including themselves.) (Again, mostly taken from reality - see scandals with Julie-Ann Horvath @ Github... yes, THAT Github. Or look up Business Insider article about Github hiring "diversiy officers", who're outright racist against whites).

Or some feminazy snooping on your Twitter, seeing any non-PC statement and harassing your employer/project you're active on to get you fired/expelled (first is some comics maker who was fired after SJW complained to her employer - yes, they even devour women who criticize feminism; the second is Opalgate).

Sooooo if you guys are okay with all that shit, you sure ignore it and just use Rust.
The thing is, different communities react differently. Rust and Python are mostly in, Linus told them to fuck off (see Sarah Sharp scandal), D community also sent them packing... up to you to choose, really.
>>
>>53847855
>or what Code of Conduct shit they bandwagoned on for PR.

and, yeah. It's not "for PR" they REALLY think like that - or a lot of them do.
>>
>>53849272
>some comics maker who was fired after SJW complained to her employer

ah, found it - plebcomics
http://knowyourmeme.com/memes/sites/plebcomics
>>
>>53849272
>D community also sent them packing
Where was this, on the D forum?
>>
>>53842709
Naked functions are in nightly.
custom allocators can also be used https://doc.rust-lang.org/book/custom-allocators.html
>>
>>53844204
You still have access to raw pointers. Then you just have to track allocations manually I.E.: C
>>
File: SJWBTFO.jpg (757 KB, 1580x3422) Image search: [Google]
SJWBTFO.jpg
757 KB, 1580x3422
>>53849383
Yeah.
>>
>>53841603
It's made by SJW fascist Chrome UI clone and Chrome add-on clone company Mozilla.

I support only honest, unique software, and no cheap clones. No thanks!
>>
>>53844142
>(and the creator of JS
he deserves eternal damnation then anyway
>>
>>53850186
Well you have a point here.
But that's not why they banished him, that's the problem.
>>
>>53849569
10/10
>>
>>53850283
True.
>>
File: keep pol in pol.jpg (204 KB, 900x900) Image search: [Google]
keep pol in pol.jpg
204 KB, 900x900
>OP is asking why rust?
>ctrl+f
>secur
>0 results
>memory safe
>0 results
>SJW
>1 of 11
wew lads neo /g/ is trash
>>
>>53849569
I just gained a shitload of respect for the D.
>>
>>53842552
Racket is popular in its niche, that is language design and learning, last time I heard.
>>
>>53843153
Wasn't the whole point of Rust not to allow unsafe constructs ?
>>
>>53850475
you'll be saying differently when they remove pointers because they're oppressing women
>>
>>53850475
>ignores Nobel laureates being bullied by illiterate apes
>or major language founders being chased out of their own companies for personal political views
>blames /g/

Now, you see, if people would've brought up Linux kernel, Go, Haskell, D, whatever - that wouldn't've happened, I'm pretty sure.
Why do you think is that?


>>53850562
Yeah. Didn't hear about them much before, so it went 0-100 pretty quickly.
I knew Alexandrescu though, just didn't know what he was up to these days.


>>53850974
Remember this next time a communist promises you anything. Like, land to peasants, factories to workers, safe constructs to programmers, peace to nations, etc.
>>
>>53851004
>remove pointers because they're oppressing women
you think you're kidding
but it's closer to reality than you think
>>53845454
>>
>>53842672
The winapi family of crates is nice.

I've been using `wio::console` to port a command line utility I wrote to Windows.

What's really nice is that the safe API is is mostly just newtypes with methods. So if there's something you can't express in safe-rust you can just drop into an unsafe{} block and cast the newtype to the raw win32 struct.

Just don't make the mistake I did. Windows strings are not necessarily legal UTF-16.

Use `OsStrExt::encode_wide()` on Windows, not `str::utf16_units()` when dealing with strings at the win32 layer.
>>
>>53850475
/g/ is easily triggered, and values their feelings about this kind of shit more than technical facts. They also like to complain about SJWs.

It's beautiful irony, though it's not so great for actually having discussions.
>>
>>53844642
Rust and Go aren't replacements.
Rust is supposed to be the C killer but it doesn't have the critical mass of users for it to catch on.

C isn't going anywhere. It has been around for about 45 years now and is still a staple of CS education everywhere. It's gonna be around for at least another 45.
>>
Rust looks like a good idea, on paper, but in practice it's suicide inducing.
>>
>>53849095
The answer is simple. Women don't wanna look "nerdy". It sounds silly but for an 18 year old girl (or even earlier in most cases) those kinds of things do matter when deciding what career to choose.

You don't see Indian or Chinese women shying away from CS, because in their cultures CS isn't nerdy or geeky, it's just another decent profession.

And really it's because of Western anti-intellectualism. Being intelligent and doing well in school isn't "cool and hip" in America, being a "jock" is the cool thing. The CS/engineering gender ratio gap is merely a symptom of that. You go to East/South Asia (I grew up there) and the students with the highest grades are also the popular, cool kids of the class.

It's only quite recently that the stereotype of software developers being unsocial, shabby, incoherent nerds is changing.
>>
>>53852839
>Rust is supposed to be the C killer
It's supposed to be a C++ killer. Raw C isn't going anywhere.
Thread replies: 96
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.