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

Did the Rustfags manage to convince everyone to rewrite everything

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 298
Thread images: 23

File: image.png (72KB, 648x454px) Image search: [Google]
image.png
72KB, 648x454px
Did the Rustfags manage to convince everyone to rewrite everything into Rust?

And why is modern C++ not an option?
>>
>>62184160
>Did the Rustfags manage to convince everyone to rewrite everything into Rust?
They're trying to and it looks like it working. For a language that's still so rapidly developing, it's seeing a lot of use and adoption.

>why is modern C++ not an option?
It is an option, it's just a bloated, contorted, compromising option
>>
> Control
> Safety

?
>>
>>62184160
Because as long as you need to manually manage memory people are going to fuck shit up. Pajeets and even experts occasionally
>>
>>62184160
>C/C++ is bloated meme
ruck fust
>>
Rust is not a replacement for FP languages.
>>
Don't listen to this fag.

If you can pass a C++ whiteboard interview you'll have companies trying to shove money down your throat.

Rust is a meme and I don't know anyone making serious money that uses it.
>>
>>62184160
Because it's written by people who ship a browser with an engine written in C++ and got feed up with the shit they had to deal with on a daily basis. So they designed they language to be as powerful as C++ while trying to avoid it's pitfalls.

Seasoned C/C++ programmers (read people who write and ship using C/C++) can appreciate this and therefore can write shit faster than because they're used to do shit at low level, except now most of the big hassles are gone. If they had shipped system drivers, databases engines, and rendering engines (for games or documents), farting an HTML template system is done in a weekend.

>>62184617
The very reason it's succeeding
>>
>C/C++
Opinion discarded. They are very different languages.
>>
>>62184703
fuck off ledditor
>the comment about is just the tip of my dick
>>
fn main()
{
let x: f32 = 0;
}

let's compile it
> expected f32, found integral variable

And this is just the tip of the iceberg.
>>
>>62184704
>The very reason it's succeeding
What?
>>
>>62184704
It was actually developed by one of their programmers as a pet project. Then it spiraled out of control.
>>
>>62184709
C is a subset of C++

>>62184720
>>62184703 (pic related)
you're still a ledditor, so fuck off.
>>
>>62184709
True
>>
While we're shit talking c++ can we admit that java boilerplate isn't as bad as the syntax for c++

> std::unique_ptr<t>

What
>>
>>62184750
C is not a subset of C++
>>
>>62184740
Look I like FP but I really don't know many people who's willing to dive into an FP. You still can write FP in Rust tho.

>>62184744
and how does that affect what I said exactly?
>>
File: 5e2.jpg (106KB, 554x439px) Image search: [Google]
5e2.jpg
106KB, 554x439px
>>62184160
So after seeing /g/ bash rust every now and then, i decided to go tru all the Rust documentation to see what is all the fuss about.

Coming from a JS/Java/C background, so far it looks really good. Can someone post examples why Rust is a piece of shit like /g/ says? And i mean real problems and not stupid shit like >>62184720 that i bet would be fixed by just doing x:f32 = 0.0 or some shit like that.
>>
File: Programming in Rust.png (461KB, 900x1181px) Image search: [Google]
Programming in Rust.png
461KB, 900x1181px
They try to rewrite everything but once a basic rewrite has been done they just drop it and forget it since rust "devs" have the attention span of a dead animal.
>>
>>62184160
Looking at this scale, Rust should be just as good as Java.
>>
>>62184782
>I don't understand set theory
You can write pure C using the standard libraries or mixing it with ones from C++ and compile it with g++ and get an executable to run.
>>
>>62184826
You can write C that isn't valid C++. The creator of C++ himself stated C++ isn't a superset of C, so the opposite must be true too.
>>
>Did the Rustfags manage to convince everyone to rewrite everything into Rust?
No, not really. I haven't seen many serious projects even considering moving to Rust. Rewriting software is a huge amount of work, and many C and C++ programs already just work.

>And why is modern C++ not an option?
It is. The only thing of significance that Rust has over C++ is the borrow checker. In many cases though, C++ is just better purely for the greater library support.
>>
File: 1503597864014.gif (2MB, 525x295px) Image search: [Google]
1503597864014.gif
2MB, 525x295px
>>62184160
why didnt they just revive Ada instead of writing another new language that will die off in a year or so
>>
>>62184847
>You can write C that isn't valid C++.
[[citation needed]]

>The creator of C++ himself stated C++ isn't a superset of C, so the opposite must be true too.
You really don't understand set theory
>>
>>62184877
  void *buf = malloc(10);
>>
>>62184816

You want a real problem in Rust? See this post:

https://warosu.org/g/thread/S62156754#p62156817

TL;DR: the build system sucks.
>>
>>62184905
shit I mean char*
>>
>>62184160
Java less safety Python LMAO, rustfag are mental illness.
>>
>>62184826
Maybe 20 years ago, but both languages have diverged enough that they aren't interchangeable without having to do rewrites
https://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B
>>
>>62184877
http://www.stroustrup.com/bs_faq.html#C-is-subset
>>
>>62184877
char str[2] = "ab"; 
>>
>>62184905

this valid for both C and C++

>>62184927
this INvalid for both C and C++
>no identifier
>>
>>62184946
>>62184956
Granted, do I look foolish now
>>
>>62185005
>void *char
That's not what he said
>>
>>62184877
int true = 0;
>>
>>62185005
>void *char
fucking retard gtfo
>>
>>62184790
>Look I like FP but I really don't know many people who's willing to dive into an FP. You still can write FP in Rust tho.
I never felt productive writing Rust, so I dropped it. Trivial stuff like string handling is a pain in the ass. I couldn't find a good threading library. The language feels like a burden. This is from a Java perspective though...
>>
>>62184160
Wasn't Rust created because Google no longer wants to pay Java royalties and as a result created it's own java replacement which it is pushing through with embrace, extend, extinguish?
>>
>>62185211
No, that's Go.
>>
I'm currently learning Rust. Wanted to check out any of the newer natively compiled languages (D, Go or Rust) and Rust is by far the most interesting of them. All other languages I've seen so far either use a GC or have you alloc/free memory manually, so Rust's approach really is new & interesting (but it comes at the cost of being harder to learn and program in).

D has been around for long but has seen nearly zero market adoption. And Go is for manlets. Literally all Go developers I've had to deal with are incompetent as fuck.

There are still things to critize about Rust, like its breakneck-pace stable release cycle of only 6 weeks.

Also
>Write Hello World program
>Enable release profile for optimizations
>Compiling takes more than 3 seconds
>Out comes a 2.9MB binary file
>>
>>62185211
what? google doesn't pay any java royalties
>>
>>62185142
>I never felt productive writing Rust
I get you. Sometimes it's more about what you feel comfortable with rather than using a given language because someone says so.
>>
>>62184704
>it's written by people who ship a browser with an engine written in C++ and got feed up with the shit they had to deal with on a daily basis.
Maybe they shouldn't have bloated the goddamn thing with useless bullshit like Pocket and made a move to multi-process years ago before they were too late. Or hell, maybe they shouldn't have built their goddamn browser from the corpse of Netscape in the first place.
>>
File: the go book and it's users.png (774KB, 1000x706px) Image search: [Google]
the go book and it's users.png
774KB, 1000x706px
>>62185316
>And Go is for manlets. Literally all Go developers I've had to deal with are incompetent as fuck.
Checked and kek'd. Just look at their book

>>62185397
>straw man: le post
>>
File: 1503397359034.webm (3MB, 512x288px) Image search: [Google]
1503397359034.webm
3MB, 512x288px
riddle me this
if python is so safe why are cia niggermonkeys writing viruses and exploits in it
>>
>>62185367
I can imagine Rust being more comfortable than C or C++.
My toy programs are basically shells scripts on steroids. I don't see why I would trade flexibility for performance in my case.
>>
>>62185426
>apples and oranges, the post.
riddle me this
why are you so fucking retard?
>>
>>62185397
wow, what a nice collection of non-arguments. what the fuck does pocket event have to to with gecko
>>
>>62185446
>actually falling for that
>>
>>62184720
the '0' literal is an i32, and it won't convert it silently. you have to have:

let x: f32 = 0f32;


But in this case, having the ': f32' part is optional and does nothing.
>>
>>62185426
what is this webm from?
>>
>>62185316
>All other languages I've seen so far either use a GC or have you alloc/free memory manually, so Rust's approach really is new & interesting

That's impossible. You either do it manually or you have some primitive form of gc, which even I'd argue smart punters are
>>
>>62184160
>More control, less safety
>C
>less safe than Python
>Java in the middle
Topkek, is this image from India?
>>
>>62184912
It's not like they're not trying to fix it right now
>>
>>62185698
Well have you checked out Rust you dumbass?

Because you don't have to care about freeing memory ever and it does not run any kind of GC either.

Rust uses lifetimes and a set of rules limiting how and when you can use some piece of data, move data between variables, create pointers/references to them and when they are freed.
That's how Rusts memory safety works and it guarantees no memory leaks, no race conditions, no double free and no use-after-free (including no danglings pointers).
>>
>>62184160
when Racket 7 is released with it's new Chez Scheme backend, Rust and C will both be obsolete and we'll transmute this timeline into the one where lispmachines won.
>>
>>62185316
It's statically linking the stl by default in case the user doesn't have rust. It's just for wider adoption in early stages
>>
>python
>safety
>>
>>62184160
>Did Rustfags manage to convince everyone to rewrite everything into Rust?
No, but they'll pretend its happening. If Bjarne and his lackeys haven't gotten everyone to absolutely stop using C, some hobbyist language with Z E R O footing in the industry sure as fuck isn't going to.
>>
>>62185977
Yeah I know. The problem is you can't really use dynamic linking, even if the enduser does have the rust standard library, because rust has no stable ABI and they don't really want one yet.

Also they could drastically reduce binary size if they finally managed to allow disabling jemalloc on the stable version.
>>
>>62185963
What's the status on Chez?
>>
>>62184912
build system ≠ language
also this >>62185794
and this https://github.com/rust-lang/cargo/issues/2503

I don't know when did he tested this but might be an old build.
Also
>listening to tripfags
seek help
>>
>>62186015
>rust
>safety
>>
>>62186107
>doing your mom raw
>safety
>>
>>62186062
>listening to rustfags
seek help
>>
I'm loving Rust personally.
>>
>>62184160
>more control
heh
>>
>>62186159
Rust has many nice features that I wish C++ could support as elegantly but overall I prefer the style of modern C++
>>
>>62186137
>rust
>safety
pick one
>>
>>62186158
>>
>>62186060
Chez is fast as fuck, the most advanced lisp compiler on the planet.
>>
>>62186191
Can anyone drop me a link to just jump straight into Modern C++?
>>
>>62186201
>muh (((safety)))
>>
>>62186200
With Rust I don't have choose
>>
>>62186202
I know Chez is based, but what's the status on integrating it into Racket?
>>
>>62186231
You sound like a commercial
>>
What is rust?
Baby don't cuck me.
Don't cuck me, you whore.
>>
>>62186248
Maybe they should make it into their slogan.
>>
>>62186231
because rust chooses for you
>>
>>62184877
I know for a fact

>u8 *buf = malloc(BUF_SIZE);
doesn't work in C++ but does in C
>>
>>62186280
rust promotes doublespeak too.
>"memory management" via borrow checker
>no type inference
>garbage tier syntax is "beautiful"
>"safe" code using unsafe blocks
>>
>>62186225
It's literally just smart pointers
>>
>>62186236
From the lead dev:
>Currently, I see no obstacle to getting everything running on Chez by the end of the year, but we'll see how it goes.
>>
>>62186403
>I didn't read the changes
>>
>>62186403
also lambdas + <algorithm>, and some nice new stuff like std::variant
>>
>>62184866
Because Ada is just fine.
>>
>>62184160
Not being static typed makes it incredibly unsafe
>>
>>62186407
Cool, I'm looking forward to it. Hopefully this will give Racket more exposure.
>>
>>62186362
I see you've never used rust
>>
>>62184617
Who the fuck uses FP languages in the real world?
>>
>>62186502
no u
>>
>>62186362
>rust promotes doublespeak too.
>>>/pol/
>>"memory management" via borrow checker
>I don't know the difference between memory management and memory safety
>>no type inference
>golang brainlet needs
>>garbage tier syntax is "beautiful"
>I don't like the syntax
>>"safe" code using unsafe blocks
>why would they allow me to break things if I want to reeee
Welcome to the thread, brainlet
>>
>>62184778
No way in hell. Initiating Scanner or buffer in, take in variables, then closeing said input stream is annoying as shit compared to cin or couture. Also strings are garbage in Java compared to c/c++
>>
>>62186523
>>>/trash/
>>
>>62186523
type inference isn't unique to Go senpai. Without it modern C++ would be entirely intolerable.
>>
>>62186513
From the TIOBE Index:
28. Scala
31. Erlang
34. Lisp
39. F#
42. Clojure
47. Haskell
>>
>>62186574
You can just use traits for those needs.
>>
>>62186617
>>62186574
https://softwareengineering.stackexchange.com/questions/247298/how-are-rust-traits-different-from-go-interfaces
>>
>C/C++
Why do people lumb these two together?
They are very different when it comes to control, safety and stability.
>>
>>62185689
Hatsune Miku
>>
>>62186723
because C++ is a rough superset of C
Nevermind that idiomatic C and C++ are worlds apart, and common C idioms are impossible to implement directly in C++ and require awkward hacks
>>
>>62186863
But C and C++ are as different as C and java.
Knowing one might not mean you know the other.
>>
>>62184355
Control: you are close to the hardware and have some influence over what the machine code looks like.

Safety: you don't have to worry (as much) about buffer overflows & related issues.
>>
I have never programmed. what is the easiest and most useful language to learn first? Python?
>>
>>62187266
Python is immediate gratification. There isn't likely to be much that will confuse you, it's very easy to get the ball rolling and write some toy scripts. Just don't stick with it forever.
>>
>>62187266
>Python
A good starting point, you can start writing small shell scripts for repetitive tasks. Search for the book "learning python the hard way" and take it from there
>>
>>62187296
I'm a cg artist, and the programs we use usually support python + their own scripting (like Maya Python + Mel), so I think it's gonna be the most useful, unless I can write things (tools or plugins) for Maya or Houdini and some other programs in another language.
>>
>>62187026
>But C and C++ are as different as C and java.
>Knowing one might not mean you know the other.
C programs will almost always compile in a C++ compiler with very few edge cases. If C++ were to do anything that would break compatibility with C it would lose almost all its userbase over night
>>
>>62184912
Cargo is way better than any alternative for building large C++ projects.
>>
>>62187349
Most C programs malloc something.
Most C programs do not cast the return value of malloc.
Most C programs do not compile as C++.
>>
File: 1453742303346.gif (628KB, 654x556px) Image search: [Google]
1453742303346.gif
628KB, 654x556px
>>62184160
>And why is modern C++ not an option?
Because javascript noobs can't into memory management. Even though the entire std library follows the RAII idiom and it's already hard to fuck up memory management.
>>
>>62187458
>it's already hard to fuck up memory management.
Cfags do it all the time
>>
>>62187512
because RAII is not applicable to C, only C++ and some other OO languages.
>>
>>62187512
If you go by what people post on this board, 90% of programming is undefined behavior and syntax inconsistencies.
>>
>>62187458
No, it's because regardless of what the language designers do, the fact move semantics are optional and move constructors are written by the user will never make it safe.

There is no way to make C++ actually safe without making an entire new language, which is what Rust is.

Also the C++ type system is shit, call me back when concepts are in, headers are also shit, so call me back when modules are in.
>>
>>62187558
>rust
>safe
>>
File: 1476838142948.png (8KB, 420x420px) Image search: [Google]
1476838142948.png
8KB, 420x420px
Is there even a single algorithm that's faster in Rust than C++?
>>
>>62187576
Yes, the safety of Rust and the concept of extensible safety has been formally proven with Coq for various core data types.
>>
>>62187308 >>62187296

>Search for the book "learning python the hard way" and take it from there
thanks anon.
>>
>>62187558
headers are one of the best features of the language.
How new to programming are you?
>>
>>62187586
Some already are
https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&lang2=gpp
>>
>>62187586
The regex engine made in Rust is one of the fastest ever produced.

The issue is not how performant something can be made in C++ or Rust, if you ignore the effort required you can reach the same speed with both languages, what matters is the ease of use and not having to worry about memory safety at all.
>>
>>62187601
Pretty new I'd say, been programming since the late 90s.

Text inclusion as a module system is literally retarded. Having to write templates in a header is retarded (and also really slow).

Precompiled headers are a bandaid, the real solution is a proper module system.
>>
>>62185963
>TFW my name has been in the release credits twice
>TFW I didn't even do that much, but still got in
I can't tell if this makes me happy or a little sad. I personally don't think my contributions were all that impactful, but okay.
>>
>>62184946
Try again with a source that isn't compromised and biased.
>>
>>62187558
I've never read this much crap in such few sentences.
>There is no way to make C++ actually safe without making an entire new language
Low-level programming is inherently unsafe, so yea. That's not the language's fault, but yours for not knowing your shit.
>Also the C++ type system is shit
wa
>headers are also shit, so call me back when modules are in
why the fuck am I even quoting this shit, just shut the fuck up already
>>
>>62187718
I guess the whole ISO C++ committee is retarded then.
>>
>>62184720
This. Rust is to ideological about "muh safety".
It's a pain to work with.

Give C static typesafe arrays that don't implicitly cast to pointers and you'll have fixed 80% of all pointer related bugs.
>>
>>62187679
Wat
>>
i like the parts of Rust that are just compiler-enforced C++11. everything else just seems sloppy, in particular how you transition between safe and unsafe code. the canonical example of non-aliasing slices made me gag
>>
>>62186589
Who uses any of those shitty obscure languages? I've never met or heard of anyone using them.
>>
>>62187785
>Give C static typesafe arrays that don't implicitly cast to pointers and you'll have fixed 80% of all pointer related bugs.
it takes a special kind of stupid to be a C++ """"programmer"""" and believe this kind of stuff
>>
>>62187867
Who said anything about C++?
>>
>>62187900
You just described std::array.
>>
>>62187918
C doesn't have std::array
>>
>>62187982
Which is where C++ comes in.
>>
>>62188026
Sadly the disadvantages of C++ outweigh the advantages.
>>
>>62184160
Because it is exactly like pic related.

And while Rust macros don't seem quite finished, many C++ metaprogramming facilities - like templates, concepts and maybe soon metaclasses - seem tacked-on, clumsy and create too much cognitive overhead for what they deliver. In fact, both languages should have gone the JAI way.

Also, C++ doesn't even try to support Unicode in any way, and yes, for a hosted environment, in particular for x64 etc it is a must.
>>
>>62187633
these dubs don't lie
>>
>>62188046
C++ has no disadvantages over C outside of slightly less ergonomic void*s and other C++ programmers.
>>
>>62188046
To C? Nah.
>>
>>62188046
What disadvantages?
>>
>>62188093
Ever tried to use a C++ library with another language or a C project?

99% of all libraries don't need all that C++ exclusive shit making it ABI incopatible with most languages, and you just know the devs are never going to maintain their bindings. You've ad-hoc tools to do it for you, but ad-hoc tools are ad-hoc tools.

Then there is all the bloat you need to disable anyway, like exceptions.
Linus still said it best, for C++ to be useful you have to restrict yourself to the C part. And by using C you'll make sure nobody ever uses those fancy C++ features by mistake.

The only only reason C++ gained any sort of popularity is because it kept source compatibility. But because of this we still loads of legacy shit like header files.

I'll admit that C++ is useful for applications (better languages exist for this domain already), but I'd honestly want to kill every dev that uses C++ for a library.
>>
>>62187656
What did you do?
>>
>>62188283
>99% of all libraries don't need all that C++ exclusive shit making it ABI incopatible with most languages, and you just know the devs are never going to maintain their bindings. You've ad-hoc tools to do it for you, but ad-hoc tools are ad-hoc tools.
Good. Scripting language bindings are ad-hoc tools to compensate for C being garbage in the first place. Apart from really limited scenarios where you pass your own very high level, C++ native API to embedded interpreters for macro automation or game scripting there is no good reason to use interpreters in the first place. Literally fucking none. Just provide a native SDK you twat. The same applies even more to more advanced languages like Rust or D or hopefully soon enough Crystal.
>Linus
Joke's on you, he uses Qt, because it turns out writing application level code in C sucks and by consequence so does GTK.
>>
>>62185689
World is Mine AMV
>>
>>62187850
Erlang is the language of telecoms.
>>
>>62188522
>turns out writing application level code in C sucks
Read the last line of my post.
>>
>>62188472
The first time in 6.8 I think I did some edits to the docs maybe? I actually forget. The second time in 6.10 I wrote an implementation of the Adler32 checksum which was merged and then immediately reworked by someone else to operate on zipped data that could potentially be very large.
>>
>>62184160
Can't argue with that graphic :^)
>>
>>62188580
It also turns out that this is a consequence of libraries written in C sucking equally bad.

Just look at APR or glib that are supposed to be a BOOST equivalent but are a joke.
You just can't have good libraries without proper metaprogramming, and even C++s stuff is rather limited.
Something limitd and isolated like SQLite works ok, but look at Lua's API, it's a joke.
>>
>>62187807
Wikipedia is now a fake news source spreading bias and propaganda. They're in league with Soros and the Clintons. Nothing they say can be trusted anymore, including C/C++ articles.
>>
>>62188713
>>62188713
>>>/pol/
please fucking leave
>>
File: 1460474659930.jpg (30KB, 680x486px) Image search: [Google]
1460474659930.jpg
30KB, 680x486px
>>62184160
>Control
>Safety
>>
>>62184160
>memory safety
>more control

>no null pointers
>more control

Yeah no. Rust is a replacement for Java, nothing else. If anything Go is a replacement to C++ and failing miserably at it. Nothing will replace C for as long as unix systems are built in C and previsible assembly is necessary anywhere.
>>
>>62188801
How the fuck is rust a replacement of java -_-
>>
>>62188801
>no null pointers
But it has null pointers.
Do you mean null references? That's retarded, not even C++ has that.
It's an idiotic idea perpetuated by Java because they didn't know about option value types.
>>
>>62188801
>replacement for Java
>has no GC and a good type system

Anon, pls.
>>
>>62189370
i may not like rust but my thoughts exactly on the java thing -_-'
>>
>>62188971
Java already got replaced by C#. There's literally no reason to use Java anymore.
>>
>>62189397
Indeed. I dont like microsoft but C# is pretty nice and fucking awesome next to java.
>>
>>62189397
Yeah, yeah, surely I can run C# both on Linux and Windows without recompilation.
>>
File: 1478504038744.jpg (87KB, 703x707px) Image search: [Google]
1478504038744.jpg
87KB, 703x707px
>>62184160
I use Rust because it's anti-white, anti-trump, anti-America and pro communism.
>>
>>62189442
Steve is useless anyway, all he does is some doc bullshit and evangelism, and if you actually read his "technical" responses he's even wrong most of the time, pretty funny if you ask me.
>>
>>62189442
>using language determines your political views
>>
>>62189480
But political views can influence your choice when picking a language >:^3
>>
>>62189544
If you're retarded, yeah.
>>
>>62189553
Of course
>>
>>62189428
Yes, you can.
>>
>>62189442
Sigh... And I was actually starting to like Rust.
>>
>>62184160
Python is literally less control AND less safety
>>
>>62189762
Dynamic typing is sin.
>>
File: 1502129620234.jpg (81KB, 921x1102px) Image search: [Google]
1502129620234.jpg
81KB, 921x1102px
>>62189469
>>62189480
>>62189760
>>
>>62184912
Because C/C++ build systems are soo much better.

Everybody is a special snowflake that needs to use a different build system these days.
>>
>>62189762
How is Python not memory safe?
>>
Is rust suitable for low level programming?
Like directly manipulating process memory, using inline ASM and using syscalls like ptrace
>>
>>62190142
That's what system programming is, so yes, this is what Rust was designed for.
>>
i don't understand what control and safety mean in relation to programming
>>
>>62190142
There's no good reason to use ASM nowadays unless you require some instruction not exposed by any language.

Hell, it's not even a good representation of how processors work anymore.
>>
>>62190261
Yeah, I have a C++ codebase that has a very specific use.
>>
>tfw rust is implemented in C++
>>
>>62186589
>erlang is fp

barely. maybe elixir I'd agree with.
>>
>>62190846
Rust is implemented in rust: https://github.com/rust-lang/rust
>>
>>62189480
Why would you purposefully surround yourself with people you would obviously clash with unless it's forced upon you by an occupation? Specifically, what would you force yourself to use a language that's surrounded with people that would annoy the shit out of you? Especially when it has zero foothold in the industry, currently.
>>
>>62184877
restrict keyword
>>
>>62190899
Actually the rust compiler is just generating an IL and sending it over to LLVM. Which is made in C and C++. You basically just linked the rust standard library and not its implementation.
>>
>>62190964
By that logic, C is implemented in assembly. And assembly is implemented in microcode. Therefore, Rust is implemented in microcode. QED

But nobody says that because it's retarded and not even close to how the industry treats things.
>>
>>62189397
>There's literally no reason to use Java anymore.
I wish Google had gotten the memo when they pick Java for android development. At least they could had make their brainlet language target android.
>>
>>62190142
There's a whole OS written in Rust
>https://github.com/redox-os/redox/
>>
>>62184912
Cargo's build system is shit. But Cargo is also a package manager, and if you want to use it to manage your project's dependencies, then you have to put up with the shitty build system as well. Oh, and no distro packages Rust libraries yet, because they're still figuring out how to keep Cargo's feature system from causing an absolute clusterfuck. Want to manage your shit by hand? Good luck. Cargo encourages breaking everything up into a million tiny packages, npm style, so you pull in three libraries and wind up with 30 transitive dependencies.

Cargo is trash.
>>
>>62191600
>>62184912
>https://github.com/rust-lang/cargo/issues/2503
That tripfag complaint was already fixed, What other problem you have with Cargo as a build system?
>>
>>62185424
>Checked and kek'd. Just look at their book
The book is an introduction to the language, just as how a helmet and training wheels are part of an introduction to learning how to ride a bike. There is no problem here
>>
>>62192316
>just as how a helmet and training wheels are part of an introduction to learning how to ride a bike
I guess my parents where savages for giving neither a training wheels nor helmet. And I guess my teachers were savages for making me learn Pascal & C just like that.
>>
>>62192344
No, your teachers were savages for not teaching you how to spell correctly. I'm also pretty sure your first programs were "Hello world", not implementing linked lists or creating FTP clients or whatever else.
>>
>>62192382
Can't really blame them, English is not my native language anyway.

>I'm also pretty sure your first programs were "Hello world"
No shit Sherlock. That's pretty much everyone's first program, although mine was "Hello faggot"
>>
File: 1405617695368.jpg (135KB, 288x432px) Image search: [Google]
1405617695368.jpg
135KB, 288x432px
>>62192401
>"Hello faggot"
Your professor knew all along
>>
>>62192436
After that he implemented a rule against cursing in variable names and strings in code. Points taken away each time he saw one.
>>
>>62192464
what a bitch
>>
>>62192401
>Go programmers are retards. Look at their intro book that shows it!
>I'm a huge faggot. My intro program was "Hello faggot" and that shows it!
You thought that C was short for Cock and got excited when finding out that you were taking it, huh?
>>
>>62192517
Way better than using some stupidly opinionated language that doesn't support inheritance, generics and forces handholding when working with arrays.
C is faggots, not brainlets.
>>
>>62186202
How is Chez compared to Python, the SBCL compiler? That thing produces retardedly fast binaries.
>>
>>62191600
waaah waaaah, Im too dumb to use a console based project management system, give me back my Visual Studio enterprise IDE so I can do everything for me and not make me to configure a build like a intelligent human
>>
File: 1502357646102.jpg (177KB, 709x821px) Image search: [Google]
1502357646102.jpg
177KB, 709x821px
>>62184160
>Rustlets
When will they ever learn?
>>
>>62194958
It's ok, someday you'll get a job in the real world too
>>
>>62184188
>it's seeing a lot of use and adoption

Can you name significant projects other than parts of Firefox and an OS nobody will ever use?
>>
>>62195006
>job in the real world
kind of funny how hundreds of thousands of web programmers have no problems using project management systems and yet C++ programmers baaah like a baby when they try and use one
>>
Really though, should I even bother to learn Rust? It looks fun.
>>
>>62197138
>It looks fun.
If it indeed does then go and learn
>>
>>62197138
Go for it. Even if you don't like it on the whole there are sure to be a few features you wish were in C++.
>>
>>62185935
>how Rusts memory safety works and it guarantees no memory leaks, no race conditions, no double free and no use-after-free
See this is exactly why I don't like most rust enthusiasts. What you just described is _mathematically_ impossible.
>>
>>62197895
Besides it's wrong. Rust devs explicitly admitted not minding memory leaks.
>>
File: steve klabnik2.jpg (384KB, 1400x933px) Image search: [Google]
steve klabnik2.jpg
384KB, 1400x933px
>>62184188
https://www.rust-lang.org/en-US/friends.html
>>
>>62197895
>muh halting problem
Do you even realize how many """undecidable""" problems your average C compiler solves on every single run? As soon as you change the allowable answers from "yes" / "no" to "yes" / "maybe not", all those undecidability results go right out the window.
>>
File: steve klabnik 3.jpg (120KB, 1024x683px) Image search: [Google]
steve klabnik 3.jpg
120KB, 1024x683px
>>62197921
that is because memory leaks are memory safe. prove me wrong kid
>>
>>62197957
>how many """undecidable""" problems your average C compiler solves on every single run
None. Each step involved in translating the input to machine code output is decidable for every valid input. Lifetime analysis of objects in memory is not.
>>
>>62197987
Irrelevant of whether you are right or not (they will not make the program crash but can very well lead to other harmful security behavior) the poster I replied to is still retarded for stating Rust prevents memory leaks.
>>
>>62197989
>Lifetime
accurate lifetime*
Just look at how many false positives you get from rustc.
>>
>>62197957
Are you referring to completeness and correctness of the involved algorithms? Overlooking one of them leads to solutions but both is required to provide the safety Rust pretends it has. And it's not even a language issue but a compiler one.
>>
>>62197989
Good job missing literally the entire point.

Yes, lifetime analysis is undecidable in general. So is points-to analysis, range analysis, and pretty much all other analyses that C compilers use to drive their optimizations. (Look up Rice's Theorem some time.) The trick is that in real life, nobody requires their analyses to give a definitive "yes" or "no" for every input - they can answer "unknown" instead, and the optimization will make the conservative assumption. (Or the analysis is designed to give only "yes" / "maybe not" answers in the first place.) Rust's borrow checker is designed the same way, and if the answer to "is this code memory safe" isn't a definitive "yes", then the compiler reports an error.
>>
>>62198097
>create programming language
>make it so it will never be able to have a working compiler by design
Amazing!
>>
>>62198097
>C compilers use to drive their optimizations
Optimizations are not part of the language specification though. CompCert exists for a reason.
>>
>>62198146
Have you never used a statically typed language? Every type checker does the exact same thing.

int x;
if (1) {
x = 12345;
} else {
x = "fuck you";
}


C compilers reject this code even though it obviously never goes wrong. Next will you start bitching about how C "will never be able to have a working compiler by design"?
>>
>>62198238
Whoops, I forgot C's type system is so shitty that it actually permits implicit pointer-to-integer conversions. Replace C with C++ and it's accurate though.
>>
>>62186062
>build system ≠ language
While you are technically correct, I'd argue that modern languages should contain a set of standard tools that work across all supported platforms, at the very least something to handle dependencies and builds, while you shouldn't be restricted to the standard tools, they should exist and work well. If that's not the case I would mark it against the language since it's more than likely going to be a core part of working with said language. If the standard Rust build system is bad then "Rust"(the project) has a practical problem even though actual Rust(the language itself) may not have any problems.

When learning and using a language, the build system is incredibly important, kind of because of the reason you mentioned, it's not the language itself that is giving you issues, it's the tooling around it and that should not be the case, you want to use this language you think is nice but something else surrounding it is frustrating you, this can be a severe detriment to a project. An obvious example would be for a language that only has a compiler for 1 architecture, the language itself can be amazing but it's useless if you can't use it on your platform.
>>
>>62197930
kike
>>
>>62198263
Does C++ disallow that? I thought the only conversions that were impossible in C++ were void* to other pointer types.
>>
>>62198238
>>62198263
And you talk about missing entire points? The issue isn't that a compiler can't accept invalid inputs that "never go wrong" (I find it hilarious you mention that since one of the thing that makes Rust users hard is how everything is "specified" so the validity of inputs should be the first concern), invalid inputs are supposed to be rejected. The issue is, no matter how well implemented your compiler is, it won't be able to compile every valid input. It's not a matter of resource available or anything. It's just mathematically impossible, by design. Now if you don't find that baffling I guess there is no point discussing this further.
>>
>>62184160
>And why is modern C++ not an option?
because it's not Rust, you fucking nazi
>>
>>62191600
>Oh, and no distro packages Rust libraries yet
Fedora, Debian, and Alpine have them off the top of my head.

Not that there's even a reason to bother on a glibc distro. The upstream version automatically installs in your home directory, and everything is statically linked.
>>
>>62186544
you do not need to fucking close input streams in java and Scanner is super easy to use. boilerplate comes in when you have to work with frameworks or standard algorithms or data structures like json or database and shit
>>
>>62184778
>he can't into RAII
>>
>>62198238
>integer autocasting to boolean
disgusting.
>>
>>6219826
>shitty
Don't you mean genius?
>>
>>62198312
>While you are technically correct
That's I read from your post.
>>
File: 1503947760084.jpg (131KB, 1190x1698px) Image search: [Google]
1503947760084.jpg
131KB, 1190x1698px
>>62194988
Not my fault you don't understand generics
>>
>>62200071
What do Rust and Go have in common?
>>
>>62200281
they're both programming languages???
>>
>>62200314
That's debatable.
>>
>>62200326
cool, debate it by yourself
>>
>>62200281
They are meme languages with no real world applications yet autists like to sell as the second coming of Jesus
>>
>>62200314
With entirely different niches, design goals,features and idioms.
>>
>>62200341
lol someone's triggered
>>
>>62184826
>>I don't understand set theory
lmao i almost forgot children's classes just started back
>>
File: lol-i-troll-you1.png (41KB, 755x627px) Image search: [Google]
lol-i-troll-you1.png
41KB, 755x627px
>>62200372
>Rust
>People who writes and ships software
>Golang
>Brainlets that need hand holding
Indeed

>>62200385
pic related

>>62200397
and you forgot to attend or what?
>>
>>62200428
#include <stdlib.h>
int main(void)
{
int *ptr = malloc(sizeof *ptr);
return 0;
}


This program belongs to the set of C programs. It does not belong to the set of C++ programs.
>>
>>62184160

the syntax from the NIM programming language looks very cool
>>
>>62184160

>Did the Rustfags manage to convince everyone to rewrite everything into Rust?

Obviously not, and since 99% of Rust users are also Haskell users, it will never happen, since that means they are academics, you know, those guys who write ten lines of code each semester.
>>
>>62200428
They're both shit because they encourage WET.
>>
>can't even implement a double linked list
Where's my control now mozilla
>>
C++ community has bunch of these do-gooders whose only job is to explain other people how c++ works. They are the cheerleaders, they write books, give talks on conferences and travel from company to company helping then unravel the mess c++ has created. They never solve real problems only problems which get created when somebody tries to solve a problem with c++. If you look at their history, they have spend last 25 years doing the same thing.

It's in their best interest too keep c++ as complicated as possible. It's what sells books and gets them invited to do company internal training sessions. Just like lawyers who draft over complex legislation and then get hired as consultants to private industry to deal with that legislation, for them the bureaucracy is what keeps the bread on the table.
>>
>>62200981
Pajeet, plz
>>
>>62200981
http://harmful.cat-v.org/software/c++/I_did_it_for_you_all
>>
File: 1398538043880.jpg (10KB, 275x297px) Image search: [Google]
1398538043880.jpg
10KB, 275x297px
>>62197930
>Gauges
>>
>>62200520
I prefer my languages DRY
>>
>>62200762
if you used rust you'd know you could.
>>
>>62200981
Where does this c++ is complicated meme come from? The problem is that it's vast and had multiple ways to do something. Pick a style and stick to it
>>
>>62201758
from the fact that it is

>Pick a style and stick to it
might work for your one person hobby project
>>
>>62200981
wtf I hate C++ now
>>
>>62201758
It was started by javafags bitching about muh memory management and how java makes it everything simpler and you should use it instead of C++
>>
>>62201784
Rustfags are so ungrateful. Without C++ there is no LLVM and no rustc.
>>
>>62185221
Dart actually. Go was made to replace some codebases in C++ due to the ridiculous build times.
>>
Whoever designs a language, I also want to be using it. Not just some hello world or isolated mathematical functions. Real world murky stateful constantly changing shit. Language which you can use not just in the calm peaceful office of a tenured professor, a language which is so simple you can keep the concepts of it in your head in an open office full of screaming pajeets. Go is a good stab at this but not low level enough for everyone.
>>
>>62201895
>putting everyone in one basket
>>
>>62194653
I don't know how it compares to SBCL, but Chez is easily the fastest Scheme. I'd guess it's comparable to SBCL.
>>
>>62192550

>doesn't support inheritance
>doesn't support exceptions

That's exactly the reason I use Go desu, although I wouldn't mind generics.
>>
>>62200367

Go is # 16 in language rankings on TIOBE and #15 on Redmonk. It also was the fastest growing language last year. Compared to Rust which isn't even in the top 50.

https://www.tiobe.com/tiobe-index/
http://redmonk.com/sogrady/2017/06/08/language-rankings-6-17/

Rustfags mad that Go is dabbin on them.
>>
>>62195010
tor, and I mean the tor engine is being rewritten in Rust, from C++.
>>
>>62189442
>the right has influence in tech
what is he smoking
>>
>>62198325
>if the type checker conservatively rejects a program that can never actually go wrong, the program is invalid
>if the borrow checker conservatively rejects a program that can never actually go wrong, the compiler is defective
>>
>>62184160
Modern C++ doesn't fix memory management at all compared to rust. It has reference counting (which is much slower than GC; and in C++'s implementation, incredibly verbose, as well as not working in the presence of cycles) and that's it. Use after free, double-free, leaks and bad init are still trivially created.

On top of that, rust has several advantages that C++ is playing catchup toward, like its functionalish support, the type system, the macro system, and perhaps one of the most important aspects, the module system. Plus, cargo is fantastic whereas there is outright no good build solution for C++, let alone dependency management.
>>
>>62184816
The borrow checker can be really cumbersome at times. For example I made a symbolic computation library with support for symbolic differentiation on top of arrayfire and the graph implementation feels awful because I had to work around it.
I also tried creating a 3D environment for simulation work but ended up abandoning it after I got tired of fighting the borrow checker when trying to implement surface-bound UI based on cegui.
>>
I unironically enjoy C++ there is always much to learn and perfect and every time I write in C++ I feel a pleasure that I don't get from any other language so why should I care about Rust.
>>
>>62185316
It's statically compiled by default. Use static compilation instead and you get the same size as C.
>>
>>62185316
>And Go is for manlets.
That sentence doesn't really make you sound like a credible source for anything except shitty memes.
>>
>>62208230
Why would being right make someone incredible?
>>
>>62208247
Being right makes you credible, being a retard who spews shitty memes makes you a retard who spews shitty memes. Or a child.
>>
>>62208268
So why do you say he doesn't sound credible when he's credible by your criteria?
>>
>>62208288
He isn't credible, because he's a retard who spews shitty memes.
If he was right, he would be credible. Being a retard doesn't make him wrong, but it makes it unlikely that he's right, thus making him less credible.
>>
Why doesn't anyone use Ada these days?
>>
>>62208304
So he is right but he's not right because you're wrong which makes him wrong because you're right because he's right which makes you wrong? Makes total sense to me, oh wait!
>>
>>62208319
Because it's shit. Extremely verbose, shit libraries, shit design, either manual memory management or GC, slow (but not that slow).
>>
>>62208358
You're not thinking logically.
Take few deep breaths, calm down, look at the relevant data and try to evaluate it.
I'm still here if you need help.
>>
>>62208378
"if he is right -> he is credible"
He is right
-| he is credible
>>
>>62184943
Python & Java fag here, holy shit learn to English.
>>
>>62202304
redmonk rankings are great, but people should seriously stop citing tiobe index with its fucking visual basic at #6 now like what the fuck, it's above php and javascript already

>>62208026
>whereas there is outright no good build solution for C++, let alone dependency management
thanks for reminding me. gonna have nightmares tonight
>>
>>62208026
c++ can have whatever kind of memory management you want to use.
>>
>>62209148
Nope.
>>
>>62209190
http://www.hboehm.info/gc/
>>
>>62209251
Thanks for proving that you're clinically retarded.
>>
>>62209286
welp, guess you proved me wrong.
you can only use shared_ptrs in c++, cant use anything else.
>>
>>62185689

From sexualizing the miku.
>>
so this... is the power of rust.
>>
>>62208319
Unfortuntatly the only people who use Ada are people who have to use it, by that I mean flight control systems, hospital equipment, anything that means people die if an error happens, it will be programmed in Ada. Unfortunately, Ada has had a bad history of overpriced compilers, and poorly optimized compilers so that Ada simply got a bad reputation. Its also a very deep language that takes a major investment in time to learn. There are no gimmick features to Ada, its a design you cant explain with a quick demo.
>>
>>62205981
Sorry for your retardation.
>>
C++ is a mess,
heaping on more and more features in an attempt to modernize it, while never changing or removing all the mistakes made in the past.

rust was a good idea, designed from the start with all the nice modern ideas added to it.
but it has plenty of faults, and i dont expect it will replace c or c++ ever.
>>
>>62184877
Alright big mathematician, show us sets A and B, such that A is subset of B, but B isn't superset of A.
Thread posts: 298
Thread images: 23


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.