[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]

Rust thread?

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: 122
Thread images: 8

File: rust-logo.png (24KB, 209x208px) Image search: [Google]
rust-logo.png
24KB, 209x208px
Is Rust a good language for a total programming newbie to learn? I've been self studying this and Python for a while, and I'm wondering if I should drop Rust for now. I like what I've read about Rust, (Safety & Control) and would like to continue with it.

My job requires the occasional repetitive task for testing purposes, and Rust seems like it would fit the job better for this over Python, because I don't need Rust to be installed.
>>
Safety & Control for what? These words alone doesnt mean anything. On Rust context, they are most buzzwords than anything.

The real key there is just marketing: Rust have a built-in code analyzer which just say "Your code isn't good... Fix it". Nothing more, nothing less. Any good static analyzer would perform equally or even better.

What we really need is a methodology related to Project Guidelines: Better design outside the language scope.
>>
>>58912929
Ok. So does a lack of guidelines make the language bad for newbs?
>>
>>58912832
Rust is a fairly young and quite rapidly evolving language. It lacks the powerful, stable libraries available for C and C++, and the ones built in to Go and the higher level languages like Python, Java, and .NET.

Depending on what you're testing, having a binary program probably doesn't make much sense. It's unwieldy, while scripting is just the tool for the job. If installing python isn't feasible, look for the OS's built in scripting capabilities: powershell or bash.
>>
>>58913099

My advice concerns about theory related to software development in general: It's literally "know what you are doing". Languages are just tools...

But you're right also, but not only for newbs: C++ is a huge example. We don't need someone redesigning everything from scratch once again.
>>
>>58913217
>Know what you are doing
I've heard "the right hammer for the right nail" before along these lines too.

What are some good ways to learn software dev? I'm fairly computer literate and programming is really the final frontier for me. I can grasp most technical concepts quickly, but learning development is a bit abstract.
>>
>>58912832
Rust is good at solving problems that, by the sound of it, you don't actually have. Learn Python first, or bash/powershell like the other anon suggested. If you really, truly need something self-contained, you can use py2exe.
>>
>>58912929
Rust also has a proper type system and support for functional programming.
>>
>>58913601

Which most of these "language expressivity" concepts are partially (or none at all) used on today code. Pajeets and code monkeys are the majority, remember that. Majority of developers can't even grasp basic tooling about quality (Debuggers, analyzers, sanitizers, gnu stuff and so on).
>>
>>58912929
t. pajeet. It's ok pajeet, one day you'll learn to poo in the loo, and then you'll reach enlightenment and stop saying the most retarded shit 4chan has ever seen!
>>
>>58913878
>Pajeets and code monkeys are the majority, remember that. Majority of developers can't even grasp basic tooling about quality (Debuggers, analyzers, sanitizers, gnu stuff and so on).
This is literally the reason why Go exists. If you want a language designed for stupid people, use Go.
>>
>>58913436
or, better yet, learn Go

>>58913928
>look at me, I'm smart
you can learn and use both, you know
>>
I started with C, wouldn't recommend any C languages or Rust, just start with javascript / node.js first.
>>
>>58914290
Do this if you just want to learn syntax and making programs. C is useful if you want in depth knowledge of how programs are ran and what happens under the hood. Rust tries to follow this, but what ends up happening is you're forced to look deep under the hood just to figure out why your programs are not working as intended. All in all which language you pick depends on what depth of understanding you require.
>>
don't use rust it's SJW TRASH
C++ is fully redpilled
case and point: https://github.com/PurpleI2P/i2pd/commit/c231eff4b1d74c2f09b1bd3584923f7e1ffc718c
>>
File: mathandcoding3.jpg (2MB, 5333x4000px) Image search: [Google]
mathandcoding3.jpg
2MB, 5333x4000px
>>58912929
>Safety & Control for what? These words alone doesnt mean anything. On Rust context, they are most buzzwords than anything.
>t. Javascriptfag

It doesn't mean anything to people who have never written C/C++.
>>
>>58913928
>using Go for systems programming
Even the Go people have given up on that meme and are selling Go as a better web-server alternative to Node.

>>58912832
Learn C++ before you learn Rust. Rust will likely not see any substantial use outside of Mozilla. Also a lot of concepts in Rust are basically to patch the shortcomings of C++ and won't make any sense to you until you've written substantial C++ and have seen how it can trip you up.

The Rust ecosystem is a very small fraction of the C++ ecosystem and its compilers aren't as mature as C++. You will almost always get C++ to run faster than equivalent Rust code just because the C++ compilers have had decades of headstart over Rust.
>>
>>58914382
>case and point: https://github.com/PurpleI2P/i2pd/commit/c231eff4b1d74c2f09b1bd3584923f7e1ffc718c
Can you explain? Are SJWs known for being opposed to unnecessarily low MTU settings, and I just didn't get the memo?
>>
>>58914492
subtle redpill is subtle
>>
>>58914190
Sure, you should learn Go, but why the fuck would you willingly use Go?
>>
>>58914338
it's best to have the kid get motivated by making small cool programs and have his curiosity grown by a high level language
>>
>>58914475
go is more relevant now that rust will be in its entire lifetime.
I think it's the reaction from the oracle vs google java patent shitfest
>>
>>58914534
Oh for fuck's sake. The fact that the correct MTU number is literally one thousand four hundred eighty-eight does not make C++ "redpilled". Especially since this is some random-ass project that happens to be written in C++, not the language/compiler/standard library itself.
>>
>>58914475
Rust is already quite relevant outside mozilla. Unlike go, which is so shit that not even google uses it (google has more rust users than go users).
>>
KILL YOURSELF
>>
>>58914930
As much as I'd want this to be true I think that's bullshit.
Please prove me wrong with some source.
>>
>>58915022
https://www.rust-lang.org/en-US/friends.html
>>
>>58915113
>google not even on the list
>>
The Rust hype is declining and before you know it only Mozilla uses it for Servo.
>>
>>58914930
That's just complete bullshit tho.
>>
Rust is fucking shitt conan exiles is way better...
>>
>>58912832
So tell me this, "Rustaceans"... If Rust is so good, how come Linux isn't written in it???
>>
>>58913601
Like saying McDonalds has healthy food because they sell salads. Rust FP is crippled to the max. You'll notice it once you try to make anything reusable based on Iterators, almost impossible.

>>58914394
Fuck off. The "C/C++ is unsafe" circlejerk is driven by people who have never written nor mastered the languages. These fucking idiots are the programming epitome of /pol/acks telling you how awful Sweden is even though they never visited that country.
>>
File: 1456672038441.jpg (47KB, 493x342px) Image search: [Google]
1456672038441.jpg
47KB, 493x342px
I need books.
Books for absolute beginner in programming, assumes that I know what a variable means.

Where are those books?

Also, why are people telling golang is more "productive" than Rust?
>>
>>58918986
>assumes that I don't* know
>>
>>58917186
yet.
>>
>>58917186
There is an UNIX like OS calledo Redox OS written entirely in Rust

>Microkernel architecture
>Drivers run in the userspace
>Memory safe
>Includes common Unix commands
>>
>>58919999
>literally called Redo

>drivers run in userspace
How horrifying.

>memory safe
What does this even mean?

>includes common Unix commands
How would it be a UNIX like if it didn't?
>>
>>58920031
I meant Redox OS, that was a typo

>How horrifying.
It actually means driver crashes won't make you reboot your computer

>What does this even mean?
No memory leaks and buffer overflows in the kernel

>How would it be a UNIX like if it didn't?
Common UNIX libraries are modified in most Linux distros. For example, $cat is different in common Linux distros than BSD Reno derivatives. Look up the source code.


Educate yourself
>>
>>58920105
>It actually means driver crashes won't make you reboot your computer
It also means horrible performance.

>No memory leaks and buffer overflows in the kernel
See above.

>Common UNIX libraries are modified in most Linux distros. For example, $cat is different in common Linux distros than BSD Reno derivatives. Look up the source code.
It is also different in FreeBSD than in BSD Reno because BSD Reno is a proprietary BSD.

"Modified" means nothing, anon. All that matters is if they're there or not. See POSIX.
>>
>>58920135
>It also means horrible performance.
Not necessarily, the traditional drivers are written for being used in the kernel space. Performance overhead is definitely be overcome with proper standards (See NetBSD)

>How would it be a UNIX like if it didn't?
>implying memory leaks ensure better performance
what?

Are you sure you know what you are talking about? Or is it just the common butthurt over Rust?
>>
>>58920189
>Not necessarily, the traditional drivers are written for being used in the kernel space. Performance overhead is definitely be overcome with proper standards (See NetBSD)
No, necessarily.

When instructing a device to do DMA, you need to allocate continuous buffers in RAM that the device can reach. In user space, you have no control over physical addresses because you are running in a virtual address space and pages can be shuffled around at whatever actual address based solely on the discretion of the OS. This means that you either have to drop in and out of kernelspace whenever your driver needs to set up a DMA buffer (which would also require an incredibly bloated DMA API)

or it would require control over physical address space from userspace, something that is a huge security risk and would mean that userspace can overwrite whatever physical address it wants to.

NetBSD runs drivers in kernel space because the developers aren't completely fucking insane, so I don't see how that supports your argument.
>>
Every company is slowly going towards go anyway, the syntax of rust is terrible and they know it.
>>
I tried using Rust for a small project once but I gave up because of insanely long compile times.
>>
>>58920250
Rekt.
>>
>>58920254
Go and Rust are not competitors,
Go was originally created to be a systems language. Now it tries to (migh be able to) replace Java or C#.

Rust is trying to be the better C++

>>58920258
I use golang for my pet project. The compile time is very low. But the compiler errors are a bit cryptic. They are working on it though.

>>58920250
Please refer to
https://ts.data61.csiro.au/publications/papers/Leslie_CFGGMPSEH_05.pdf
and
https://ts.data61.csiro.au/publications/papers/Leslie_CFGGMPSEH_05-tr.pdf

Hopefully this will clear things up about the current tradition of kernel and drivers' instruction and allocation algorithms

>>58920436
stop samefagging and start reading
>>
>>58920493
>Hopefully this will clear things up about the current tradition of kernel and drivers' instruction and allocation algorithms
Please refer to my specific example. They admit that they do not consider the ramifications of exposing physical addresses to userspace. They also just expose pinning user pages to userspace.

>Note that we do not tackle the problem of protecting the system from errant driver DMA, we leave this aspect for future work.

They did what I already noted was a bad idea in >>58920250
>or it would require control over physical address space from userspace, something that is a huge security risk and would mean that userspace can overwrite whatever physical address it wants to.


In other words, the benefit of running in userspace is entirely lost. A bad driver will be able to pass along a bad pointer to the device and your system will crash. A malicious driver will have access to kernel space memory and be able to read and write to it.
>>
>>58920589
>A bad driver will be able to pass along a bad pointer to the device and your system will crash. A malicious driver will have access to kernel space memory and be able to read and write to it.
Only if C had memory safety...
Oh wait
>>
>>58920254
Go is not a viable systems programming language because it doesn't get nearly the performance of C/C++/Rust.

Go is as fast/slow as Java which is usually 1.5x to 5x slower than equivalent C++. That already removes it from the systems prog space. That's why they pivoted to competing with Java and Node for the web server space.

Golang really doesn't belong anywhere. It's a half-assed server language and a half-assed systems language.
>>
>>58920626
It has nothing to do with "memory safety", it has everything to do with exposing physical memory to userspace is a bad idea. "Memory safety" in rust is nothing more than glorified bounds checking and some reference counting. This is about (deliberately) addressing parts of memory you're not supposed to address or be able to address.
>>
>>58920626
>>58920667
>>58920589
>>58920493
Not to mention that they also conclude that running in user-space has severe performance penalty for interrupt-heavy devices, such as network cards, or high-bandwidth devices, such as high-speed SSD disks.

So all in all, it's clearly a bad idea.
>>
Rust BTFO'd
>>
>>58920727
>>58920667
>>58920589
He's not going to respond anon.
>>
>>58920589
>Note that we do not tackle the problem of protecting the system from errant driver DMA, we leave this aspect for future work.
seL4 (which is also by NICTA/Data61) solves this by configuring the IOMMU so that devices can only write to memory controlled by the process that manages the device.
>>
>>58920982
>seL4 (which is also by NICTA/Data61) solves this by configuring the IOMMU so that devices can only write to memory controlled by the process that manages the device.
The IOMMU only protects against rogue device writes. It doesn't protect against a bad/malicious driver.

The problem is that you're still exposing physical addresses to user space, which opens up for a userspace processes reading and writing into kernelspace.
>>
>>58921050
I don't understand your objection.

Suppose we have an API that works like this:
> driver (userspace): requests 1024 contiguous pages
> kernel: reports that the pages are available at physical address 0x12345000 and virtual address 0x23456000
Then the driver sets up DMA using the physical address and reads the results using the corresponding virtual address.

Do you see some way for the driver to use this API to access kernel memory? Or, is there some reason why this API is completely unsuitable for the intended purpose?
>>
>>58921474
>Do you see some way for the driver to use this API to access kernel memory?
The driver doesn't need to use the addresses returned from this API, it can very well just ignore setting up the correct IOMMU domains and make the device write to arbitrary addresses.

>Or, is there some reason why this API is completely unsuitable for the intended purpose?
Yes, some devices are unable to address above a certain amount of bits. Old Nvidia graphic cards are only unable to address 30 bits, but the IO address space may be 64-bits. There may also be some funky alignment issues.

Therefore, you need low-level control in order to specify the range.
>>
>>58920667
>the google shills are so shitty they can't even use reality to discuss rust, they have to make shit up
Classic.
>>58920589
Are you trying to chain random statements hoping that they can be construed to somehow align with reality? Pathetic. Come back when you have stopped failing OS 101.
>>
>>58912832
>Is Rust a good language

No. It's shit made for retards.
>>
>>58920817
>>58920960
samefagging game strong
>>
>>58921566
There's nothing incorrect about neither of my posts anon. You're grasping for straws.

Just because you don't understand how device drivers work, doesn't mean you can dismiss it all together.
>>
>>58921580
What?
>>
>>58920660
and none of this is relevant to the thread because OP is doing business automation
>>
>>58921580
Rust is everything C++ should have been.
>>
>>58921551
>it can very well just ignore setting up the correct IOMMU domains
IOMMU settings in seL4 are handled by the kernel, just like page tables are.

>Yes, some devices are unable to address above a certain amount of bits.
>There may also be some funky alignment issues.
So add an option for the driver to request N pages somewhere in a specific address range, with specific alignment. I'm surprised you even raised this as an objection, given the solution is so obvious.

Anything else?
>>
>>58914586
>I think it's the reaction from the oracle vs google java patent shitfest
It's more the reaction to the technical failures of Python internally at Google.
>>
>>58921639
>Anything else?
How do you propose calling user-space callbacks for device initiated interrupts.

Protip: you need to guarantee that user-space driver doesn't block (same as for a kernel space driver), and that the cost of context switching is low.
>>
>>58921639
>>58921474
So now a user-space process can exhaust memory by requesting all the available address ranges and then simply avoid releasing it back.

Great fucking idea.
>>
>>58921733
Are you actually this stupid, or just pretending?
>>
>>58921639
I just want to add that IOMMU kills P2P performance for devices that doesn't implement ATS (which most doesn't do) unless you identity map.
>>
>>58917455
>driven by people who have never written nor mastered the language

gr8 b8 m8
>>
>>58921751
These ranges have to be pinned in memory in order to do DMA. Please explain to me how you would prevent a malicious driver from doing this.

>inb4 a malicious kernel space driver would be able to do the same
Yes, that is correct. But the claim here is that user-space drivers are able to protect from malicious and bad drivers.
>>
>>58921625
>Rust is everything C++ should have been.

slow? or c#
>>
>>58921772
Have you ever heard of mlock(2)?
>>
>>58921592
OK pajeet whatever you say, you are an expert fizzbuzz java programmer. One day you'll know what a kernel is.
>>
>>58921775
No, producing programs that doesn't have shitty exploits.
>>
>>58921775
Given that it's neither, I would wager he meant neither. Really makes you think huh.
>>
>>58921775
>Rebranded Java?
definately no
>>
>>58921795
>>58921801

what's wrong with c++11 especially with c++14?
>>
>>58921790
You haven't addressed anything in my posts... You're just going into full defensive mode and spouting memes.

>>58921788
mlock() might block (suspend process until resources are available), requesting a DMA range might not. mlock() also gives no guarantee on where in physical memory pages are locked, only that they remain in RAM. The kernel can still shuffle it around.
>>
>>58921830
start with template >C++14
>14
ooh look, they fixed that broken shitty language in fourteen, right :D

https://groups.google.com/a/isocpp.org/forum/#!msg/std-proposals/qd3L1-bGg1A/vGcb4ahJ5UYJ
>>
>>58921830
Hi,


template <class X> void f() {}
template <> void f<int>() {}
COMPILES


struct S {
template <class X> void f() {}
template <> void f<int>() {}
};
--> error: explicit specialization of 'f' in class scope
FUCKING RETARDED
WOW IT REALLY MAKES SENSE THAT THIS WORKS AT GLOBAL SCOPE BUT NOT IN-CLASS


struct S {
template <class X> struct Inner {};
template <> struct Inner<int> {};
};
--> error: explicit specialization of 'Inner' in class scope
FUCKING RETARDED


struct S {
template <class X, class = void> struct Inner {};
template <class bullshit> struct Inner<int, bullshit> {};
};
WOW, RETARDS, WORKS WITH A STUPID-RETARDED WORKAROUND


struct S {
template <class X, class=void> void f() {}
template <class bullshit> void f<int, bullshit>() {}
};
--> function template partial specialization is not allowed
FUCKING RETARDED
WOW THE RETARDED WORKAROUND DOESN'T WORK FOR FUNCTIONS


template <class X> void f(X x) {}
template <class X> void f(X* x) {}
OH, OK THIS GOOD


template <class X, class Y> void f() {}
template <class Y> void f<int, Y>() {}
--> function template partial specialization is not allowed
FUCKING RETARDED.


I don't even want to hear 1 piece of bullshit out of a single one of you people's mouths about this one.
If you give me one piece of bullshit, you're a fucking n00b.

Every one of these things is used for metaprogramming.

After 15 years of awareness about these problems, nothing was fixed.
And now with C++14, yet another oversight release, we're heading for 20 years of fucking retardation.

Thank you standards body people for your retarded level of awareness, you fucking retards.
Can you fix the holes you fucking retards?
>>
File: 1470930284936.jpg (447KB, 800x800px) Image search: [Google]
1470930284936.jpg
447KB, 800x800px
>>58921876
>>
>>58921876
kek
>>
>>58914475
>its compilers aren't as mature as C++

rustc outputs LLVM IR, which is then compiled to your architecture of choice. The level of optimization it can achieve is only dependent of what this IR can be optimized to.
>>
>>58912832
Look at a simple "Hello, World" example in Rust and you will quickly change your mind. Don't fall for this meme.
>>
>>58921830
Many things:
-retains C syntax which causes a plethora of issues, including the necessity to let people shoot themselves (and others) in the foot repeatedly
-constantly growing amount of features making it impossible to learn the whole language, or understand it when reading someone else's code
-syntax is strewn with inconsistencies which make correct parsers an engineering feat in and of itself. Those inconsistencies are necessary to keep tacking on features while retaining C syntax.
-No proper way to do memory safety. In particular, no cost-free constructs (this is what the borrow checker in rust is, it's completely free, there is no reference counting or gc).
It's going in the right direction for features, but in the wrong direction for actual usability because it bloats and balloons instead of being fixed.
>>
>>58921921
hurr hurr durr
fn main() {
println!("you are a faggot");
}
>>
>>58921863
> 2 messages have been deleted.
Maximum butthurt.
Get over it, Rust is the superior C++.
>>
Holy shit
"YOU WANT ME TO WRITE THE PROPOSAL?
I'M NOT EVEN FUCKING SANE
YOU THINK I KNOW HOW TO WRITE A PROPOSAL
YOU PEOPLE ARE SUPPOSEDLY SANE
AND YOU CAN'T EVEN DO IT

WHY DO YOU HAVE TO WASTE SO MUCH TIME ON THE RETARDED PROPOSALS WITH ALL THE PRETTY PRINT?
DO YOU THINK I HAVE FUCKING TIME FOR A BUNCH OF FUCKING PRETTY PRINT
WHY DONT YOU READ MY FUCKING POST WHERE I SAID IT'S FUCKING RETARDED AND BE HAPPY WITH THAT AS THE PROPOSAL
AND THEN WRITE THE GODDAMN STANDARD WORDING TO IT AND USE WHAT I SAID ABOUT RETARDATION AS THE LITERAL PRESENTATION
YOU DON'T NEED A BUNCH OF FUCKING HIGH-WORDING LITERARY C++ DOCUMENTARIAN TPS-REPORT MAGIC FOR WEIRD FUCKING FREAK BEARDED MEN WHO ARE GONNA VOTE NO BECAUSE IT WASNT WORDED RIGHT TO FIGURE THIS SHIT OUT, OK?
WHY YOU THINK C++ IS SO FUCKING SLOW? BECAUSE ALL YOU FUCKING RETARDS NEED A BUNCH OF FUCKING POWERPOINT DIAGRAMS TO UNDERSTAND ANYTHING
FIX THE GODDAMN WORDING AND THEN JUST DO IT, WHO HAS TIME TO FUCK AROUND WITH DOCUMENT INDENTATION BULL-CRAP AND A BIG FUCKING PRETEXT WHERE I TRY TO SOUND ALL NICE AND SANE FOR CRAZY PEOPLE JUST TO MAKE YOU UNDERSTAND THE CONCEPT
THAT YOU NEED TO FIX THE BASIC FUCKING TEMPLATE FEATURES"

Is this /g/?
>>
>C++ permanently BTFO
>>
>>58921931
Different poster but that syntax is really horrible. There's so much punctuation for no reason I can understand, more than Perl. How can anyone tell what this program does?
>>
>>58922602
it's like one more symbol than the C version...
>>
>>58922602
The sad part is that it took me 2 minutes to figure out you were not serious.
>>
File: 1237 - S32TlGW.jpg (140KB, 575x523px) Image search: [Google]
1237 - S32TlGW.jpg
140KB, 575x523px
>>58912832

Why do faggots always have to learn the latest hipster shit languages?

Learn what is fucking useful. Do you go into math class and ask if you should learn some obscure theoretical bullshit mathematics? NO. No one gives a fuck about it, and it will NEVER be useful. Learn practical shit that will give you a useful skill.

Go learn Brainfuck and kill yourself
>>
>>58922602
kek
>>
>>58922630
Dumb frogposter
>>
>>58922635

Dumb non-frogposter
>>
So where did those C/C++ (((expert))) codemasters run off to?
>>
>>58918986

C primer is quite good.
>>
>>58918986
The rust manual is great.
>>
>>58918986
>Also, why are people telling golang is more "productive" than Rust?
Go's syntax is more similar to existing languages, also the whole gimmick of Rust is that it bullies you into writing safe code (less error prone), which causes a lot of time to be wasted coaxing the compiler into compiling code.
>>
I would learn C/C++ first so that when you start learning Rust you understand why a lot of it is the way it is.
>>
>>58923884
>Go's syntax
>more similar to existing languages,
This has to be satire, or a false flag. Top kek!
>>
>>58912832
Learn D
>>
>>58918986
>Also, why are people telling golang is more "productive" than Rust?
Because you're extremely productive in Go.

You have to re-implement everything! Need a small library to do logging? Were you might just download a library or use another package in another language? Well in Go there are all kinds of path restrictions. So it's really just best if you write it yourself.

Need a bunch of structures to all bind to the same interface? Even though they're _very_ similar? Start copy-and-pasting.

Go is really language to write 2000+ LOC pre day. You end up copying and pasting so much boilerplate and interface garabage it never ends. Most languages you inherit, or abstract these nitty gritty bullshit details away.Not Go IT IS SIMPLE.
>>
>>58914382
>SJW
I am to the right of Jullian Ebola and I use Rust.
>>
>>58918986

>Also, why are people telling golang is more "productive" than Rust?

Because they don't really know what they're talking about. Most of these Gotards can't even figure out Go; let a lone a language like Rust.
>>
>>58912832
Rust is just another meme-language no one will use.
>>
>>58927341
>>
>>58914475

>Also a lot of concepts in Rust are basically to patch the shortcomings of C++

What needs to be fixed are shortcomings in programmers. Programmers can't be trusted, that should be the main design philosophy of any safe language. They overestimate their abilities, so they need violent force to program in a sane way.

That's why a safe language should by default be statically typed (programmers can't be trusted with type inference), be bounds checked (programmers can't be trusted with pointers) and share nothing writeable at any given point in time (programmers can't be trusted with handling low level locking, they certainly can't be trusted with lock-free programming).
>>
>>58919999

>Drivers run in the userspace

This is not a good thing, it's too fucking slow.

One of the reasons we need a safer low level language is because it's impossible to efficiently get memory protection between more than 2 contexts on the most common processor. The hardware is retarded, so we need to use languages which try to keep drivers in their sandbox regardless of programming errors to mitigate that.
>>
>>58921927
std::unique_ptr has no overhead.
>>
>>58912832
How fast does it compile?
How large are the binaries?
How much memory does it consume compared to the same programm written in C++?
>>
>>58921927
>-No proper way to do memory safety. In particular, no cost-free constructs (this is what the borrow checker in rust is, it's completely free, there is no reference counting or gc).
You are wrong. Modern C++ is completely safe if you run sanitizers on your code, and every C++ programmer already does this.
>>
File: 2017-02-13_17-26-34.png (2KB, 690x23px) Image search: [Google]
2017-02-13_17-26-34.png
2KB, 690x23px
>>58929890
I'm mostly interested in sub 10MB RAM usage.
>>
>>58930011
You will never achieve that with meme languages ("modern languages"). Use C, which is guaranteed to never need more than 10MB of memory.
>>
>>58914706
we must secure the existence of our language and a future for c++ code
>>
>>58917455
>The "C/C++ is unsafe" circlejerk is driven by people who have never written nor mastered the languages.
Yeah, know nothing hacks like Bjarne.
Unlike you who totally knows what you're talking about and are in no way bulshitting.
>>
>>58917455
Swedish muslim sepples fags truly are the worst kind of people
kys
>>
>>58929896
>Modern C++ is completely safe if you run sanitizers on your code
This statement is provably false.
It's mostly safe if you only use a small subset of the language, but you can totally write code that fucks your stack up and is uncatchable anon. Ownership detection without a borrow checker or annotation is an undecidable problem.
>>
>>58930183
>implying this asshole that sounds like he hasn't even watched the latest cppcon talks is a sepplesfag
Anon, please.
Thread posts: 122
Thread images: 8


[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.