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

About this meme language...

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: 114
Thread images: 7

File: CSUEf0kUwAAoqFo.png (50KB, 600x400px) Image search: [Google]
CSUEf0kUwAAoqFo.png
50KB, 600x400px
So, what's up with Rust? I'm tempted to give it a chance and actually make something with it, having read a bunch of tutorials.

But is it worth it? Does it give me anything C or even Python doesn't? It seems to be Rust doesn't have a place at all in the programming spectrum.

Do you use it?
>>
>>57705166
Go, Rust, and D are pretty much the best languages we have.
>>
>>57705219
Elaborate. Your statement is meaningless.
>>
It's C++ for SJW's
>>
>>57705240
Better Systems Development languages. They go a long way with avoidingalot of the problems with C/C++. Although Go and Rust go about them in pretty different ways in certain respects.

For example Rust's borrow system. Yes, it makes for alot of lengthy static analysis.
>>
Is there any good toolchain for embedded development?
>>
>>57705166
It's a language hyped by hackernews and stack overflow (surveys) so a good part of the dev world begin to jump on it even if it leads to no job atm.

I've followed tutorials and played arround with it and I must say I like it. Feels like a new kind of low level language (on par with c++) but with more modern concepts coming from the functionnal languages world. Plus the tooling like cargo is a huge plus.
>>
>>57705359
The syntax gets fucking atrocious fast. It's cumbersome as fuck and the "muh safety" makes you jump through a million little hoops just to get basic shit done.
>>
>>57705166
Nih, half made, poorly constructed, remake of Ada. But other than that it's great.
>>
>>57705166

Rust tries to be "C++ done right".

It's super low-level so you won't really need it unless you are planning to do something super-low level (writing a graphical library, an OS or maybe game development).

It has some nice ideas but it's a little bit too complicated IMHO.
>>
>>57705166
Big learning curve.
Nice package manager.
Memory safety is plus.
Most people who bitch about the language never got past learning the borrow checker.
>It is so complicated
>It makes you jump though so many hoops to do anything
Yeah asshole enjoying crutching on those Garabage Collectors? Or just leaving dangling pointers E V E R Y W H E R E in C/C++? Because that is what you are doing.
Want to port code from Windows AMD64 to ARMv7 Linux? Oh it's 100% safe Rust? Well there is no porting, your code will just compile. Try doing that with C.
>>
>>57705799
This MUST be bait. I stopped leaving dangling pointers anywhere about five years into my programming career. And what's that about architecture being relevant in 99% of C projects? OS maybe, but architecture, especially AMD vs ARM? That makes no sense.

If you are not baiting you then are like most faggots who believe these "selling" points about code safety (merely writing that makes me chuckle, it's ridiculous): a sheltered kid fresh out of college with no programming experience nor real world bread-earning experience at all for that matter.

Come back when you have actually worked in the industry for 20+ years and re-read that post of yours. Try not to be too ashamed.
>>
Rust is C++ for web developers. That's why nobody uses it btw.
>>
Programming on a low level is complicated. Rust presents you with this complexity up front and won't let you compile an "incorrect" program. With C++ you still have to deal with the same amount of complexity, eventually incorrectness will end up biting you in the ass and you'll have to deal with it.
>>
File: steve-profile.jpg (384KB, 1400x933px) Image search: [Google]
steve-profile.jpg
384KB, 1400x933px
>>57705166
>So, what's up with Rust?
It's the latest hipster bullshit lang. When SJWs like that disgusting communist kike Klabnik are pushing it, you know you should stay away.

>I'm tempted to give it a chance and actually make something with it, having read a bunch of tutorials.
Why? Unless you're coding an OS, it's fucking useless. No platform supports and if you plan on getting a job, C++14 is a much better choice.

>But is it worth it? Does it give me anything C or even Python doesn't? It seems to be Rust doesn't have a place at all in the programming spectrum.
Well, there you go. You got it. It's just a language pushed by those Mozilla SJWs.

>Do you use it?
Fuck no.

If you want to do systems programming, just learn C and C++. C++ will be here 10 years from now and will be used heavily, Rust won't.

if you want something that looks like Rust and has most of its features but actually has a future, then learn Swift. And you can get a job with Swift too.

if you want to fuck around with server shit, Go is a better option than Rust.
>>
>>57706020
kek, this guy cares more about social issues than programming.
>>
>>57706020
Best post. Thank you anon. I can go to sleep now.
>>
>>57706059
You reddit types stick out like a sore thumb. Let me guess, you went to /pol/ and now that the election is over you are sampling other boards?

Nobody wants you here. Nobody cares about your non-issues. Rust IS all about social issues, and as a programming language is mediocre at best.

Go away.
>>
>>57706167
Breh, it's literally *not* all about social issues. You only think that because they have a CoC, but if you actually interacted with their community you would find that social issues are rarely discussed.

And as a programming language it's actually really nice. It's a bit verbose at times, but it's really great to use once you've got the syntax/concepts down. Refactoring in Rust is so fucking painless compared to C++

But you probably hit up against it's learning curve early and just gave up, hence the sour grapes attitude you've got rn.
>>
>>57705473
In reference to Rust, yes it can be. As memey as you think 'safety' is, I would be chagrined if I brought down an entire production system because of lack of it.

And don't pretend C/C++ doesn't have it's own brand of hoops with constantly checking with sizeof a / sizeof a[0] semantics.

With that said, C/C++ will never die. I use it still (when I have Go available as an option) when working with SPI/I2C sensor IC's. But going forwards I would rather drop in Go compiled CPython bindings than C.

I got to give it to Go/Rust, being able to drop in natively compiled modules is generally a breeze if you've ever experienced trying to, for example, compile your own Python module using the C interface for Python (not talking about Cython).
>>
>>57706243
Why should anyone use Rust, when Ada exists?
>>
>>57706491
I think rust has a better type system, a more modern approach to language design, and less legacy baggage. Also I think Wirth style languages are fucking ugly as sin
>>
>>57705932
You are not any of the things that you're saying you are, so feel free to stop lying on the internet.
>>
>>57706545
>rust has a better type system
I REALLY don't believe you
>>
>>57706491
Ada doesn't exist on LLVM, neither does a free as in fuck you, top of the line standard library.

In the real world, nobody uses GAHNOO compilers apart the C/C++/Fortran part of GCC, which is only used because there was no alternative for a long time.
As a result, there aren't many good libraries and bindings for Ada.
Same goes for Eiffel. If you restrict a programming language customer in any way - be it proprietary like Eiffel did it or be it ITS GNU OH BTW THERE IS MY PATREON GUBBERMENT like Adacore did it's dead once there is an alternative.

Chances are, there are even more bindings for Rust than Ada now.

As a language, I like Ada more, but that doesn't matter.
>>
>>57706595
It has a very different type system, which I enjoy using more. Ada probably has a more powerful type system, but I think Rust's is better (i.e. more useful and intuitive) from the (very, very, very) limited Ada experience I have.
>>
>>57706619
>Same goes for Eiffel. If you restrict a programming language customer in any way - be it proprietary like Eiffel did it or be it ITS GNU OH BTW THERE IS MY PATREON GUBBERMENT like Adacore did it's dead once there is an alternative.
That said, this tactic works if your goal is ripping off governments.
>>
>>57706619
GCC doesn't limit you from making proprietary software.
>>
>>57706688
That's right, but the library is said to be a pain point, because it's outdated.
Also, looking at previous experiences with MinGW et al it is guaranteed to be a PITA when it comes to Windows ABI compatibility.
>>
>>57706636
That's fine if you like a simpler type system, but Ada's type system is far more powerful than Rust's.
>>
>>57706787
Rust's type system is just comfier imo.

And Ada doesn't have substructural types, so idk if it's more powerful, strictly speaking.
>>
i'm not sure if i like the runtime arrays bound checking.
in a "wannabe c replacement" programming language you don't really want those kind of things.
is there a way to disable it for chosen code blocks? how?
>>
>>57706923
You can apparently use separated *_unchecked methods in unsafe blocks.

Doesn't seem too comfortable, but the times where it matters are

* not that often on normal systems down to mid sized embedded systems
* a sign that you better use the C subset or other garbage language your hardware vendor delivered
>>
>>57707104
>a sign that you better use the C subset or other garbage language your hardware vendor delivered
Addendum: If you don't have dynamic memory allocation and multithreading I don't see the appeal of Rust.
>>
>>
>>57706918
Ada has
Dynamic predicates
Static predicates
User defined floats and their precision
User defined fixed point and their precision
Mod types
Definable ranges
Unions
All in a consistent and simple syntax
>>
>>57707104
it matters when you implement algorithms and data structures.
you don't need bound checks, but would be nice to have generics and automatic compile-time memory management.
>>
>>57707193
>all the stuff related to numbers, like they thought computers are for calculating and taxes only
How to spot an old PL 101
>>
>>57707497
>it matters not when you implement algorithms and data structures most of the times.
ftfy
>>
>>57707502
West else do you need, millennial?
>>
>>57707585
>le millennial meme
>le muh puters are just numbers and random memory accesses under the hood meme
>>
>>57707641
>Avoiding the question
>>
>>57705166
(I have not actually used Rust for a serious project yet)
It looks like a good choice when you want a fast compiled language that allows you to use comfy high level constructs and basic functional concepts.
Atrocious compile times though.
>>
Go vs Rust witch of them is faster?
>>
>>57707971
Go is garbage collected.
>>
>>57707971
Rust has a more advanced backend (LLVM) which should in theory provide better optimizations than Go's default compiler.
Go also has a garbage collector.

But unless you're doing some very optimized complex math stuff the differences will be insignificant.
>>
>>57706491
Rust's type safety didn't cause a 7 billion dollar rocket to explode, so it has that going for it.
>>
>>57707971
Rust is faster, Go needs some advanced under-the-scenes optimization on it's compiler.
>>
>>57708027
>Rust programmers genuinely believe this
>>
>>57705166
every day there is a rust shill thread, why? it seems like mozilla has send a group of sjw cucks to shill for this garbage language. have you seen anything created in rust, which remotely useful AND performant? ofc you didn't because that language is garbage and tries to stay relevant by mozilla shoving it up your ass. even brendan eich who was the ceo of mozilla (who also got fired because of sjw's whining about his stance on gay rights) stood far away from that language and build his new browser "brave" rather in c++. if rust had ANY potential he would've used it, right?
>>
>>57708096
Ada's type safety is checked at runtime, not compile time. It threw an overflow exception converting a 64 bit integer to a 16 bit integer and so the guidance system crashed, and so did the rocket.
>>
>>57708196
Everything you said is wrong. It's checked at compile time and run time. They turned off checking of a variable that was proved to not overflow on the old rocket. They forgot about it when they ported it to the new rocket. The system didn't throw an exception and the rocket spun out of control.
>>
>>57708233
Ada defense force detected
>>
>>57708267
I'm just trying to squash literal lies
>>
>>57708174
I saw a whole operating system written on it, from boot to kernel.

Your move...
>>
>>57708174
>ceo of mozilla has anything to do with rust
>opinion of the guy who created the worst language we have to deal with today matters
>>
>>57708349
theres a operating system written in javascript, whats your point?
>>
>>57708435
Rust's isn't shit.

:^)
>>
>>57708435
>from boot to kernel
>>
>>57708349
>>57708435
>>57708444
>>57708466
on how many layers of autism do you have to be to think that creating a kernel in language means dogshit about the language itself?
you could write a kernel even in whitespace
>>
>>57708492
STFU steve
>>
>>57708508
kill yourself jeff.
>>
>>57708174
I use c++ at my job, I used to really like it. I'm starting to hate it. It's absolutely awful. Rust solves a lot of problems.

The real problem with rust is adoption, it's not good enough to be 10%,20%,50% better it has to be a game changer for huge companies to switch.

I think rust is a worthy attempt at revisiting the problems of systems programming. From an idealist point of view, they succeeded. From a marketing view, I don't see many fortune 500 companies using it without wide spread adoption first.
>>
>>57705219
I'd add Nim to that list.
>>
>>57708918
Wtf is that shit fake fuckin language
>>
>>57705219
> imcoolrightguys.jpg
>>
>>57705166
So what's meme with Meme? I'm memed to meme meme a meme and memy meme meme with meme meme, having meme a meme of memes.
>>
>>57705166
Ever heard of Scala?
Rust is the Scala of C++.
Do not use if you do not need ludicrous speed and type safety, because it's fucking complicated.
It's cool though.

What we really need is the Scala of C.
>>
>>57705219
Reddit: The Post
>>
>>57705606
>Rust tries to be "C++ done right".
That would be C#, except that C# doesn't just try, it succeeds.

There are rare cases where C++ is still useful for optimization purposes, when speed is an issue (nowadays it usually isn't).

Otherwise, C# is the best C descendant ever made and best OOP language, period.

And I say this as a person who hates Microsoft.
>>
>>57711810
No, C# is Java done right.
C++ is just a shithouse that everyone uses because there's no alternative.
>>
File: monads.png (49KB, 1000x716px) Image search: [Google]
monads.png
49KB, 1000x716px
>>57705219
>he doesn't use pure languages
quite disgusting tbqh familia baka
>>
>>57708918
Nim isn't even stable yet.
>>
>>57706020
hmm now that you mention it, I will install a Fedora with Clang + Netbeans and Qt, and check out C++14.

I hated C++ in uni, it was like:
> class
> let's write a for loop
> let's write a class that has a function

> exam
> let's write 10 classes that has 15 functions each and the entire program works together flawless, you have 60 minutes
>>
>>57705219
forgot to add the oh-so-ever-cool code golfing languages.

>>57711731
Well, Scala never made it. Never got huge, or relevant. It's fun and all, but that's it.
>>
File: lisp.png (23KB, 154x128px) Image search: [Google]
lisp.png
23KB, 154x128px
>>57711856
>he doesn't use homoiconic languages
>>
>>57705166
I googled how to write a graph in rust and it seemed really convoluted, compared to C. I dunno, maybe I'm just not smart enough for this language.
>>
>>57714703
I think it's meant to solve concurrent high-performance server issues or embedded programming issues. I think the borrowing system is highly interesting but narrow. I'm not working even near these problem spaces so I can't say for sure.
>>
>>57714703
That's probably because there was a lot of syntax you didn't understand.
>>
File: 1477344416832.png (28KB, 300x59px) Image search: [Google]
1477344416832.png
28KB, 300x59px
>>57705219
>>57708918
>library function as a keyword
>>
>>57707547
idk, for me the zero-cost abstraction and memory safety was a huge thing.

it's ok to make memory safety the default choice. i just want a way to choose no runtime checks instead. something like:
myarr[2]; // default choice, memory safety with runtime checks
myarr.unsafe_at(2); // no runtime checks
>>
>>57716584
>idk, for me the zero-cost abstraction and memory safety was a huge thing.

Same here.
That said, with all the other things, I feel like it wasn't made for small embedded platforms where the costs of boundary checking hurts most.
The custom restricted C/BASIC/UI-based languages of the hardware vendors had a point if they were not terrible implemented most of the times, as to be expected of hardware vendors.

On normal computers, I'm conflicted about the boundary checks, as search results vary from
>doubles execution time
>merely noise
>doesn't matter on modern CPUs
>terrible in C/C++ only
>>
>>57706167
You're fucking schizophrenic. Get yourself checked.
>>
I don't understand what the people advertising this language are getting out of it. Do you work for Mozilla?
>>
>>57705166
>So, what's up with Rust? I'm tempted to give it a chance and actually make something with it, having read a bunch of tutorials.
Great language ruined by its community
>>
>>57716584
Why would something like this even be built into the language to begin with, though?

The language should just provide the mechanism, not the policy. High-level constructs like arrays with known sizes should be implemented *in* the language, not be part of the language.
>>
>>57717622
>High-level constructs like arrays with known sizes should be implemented *in* the language, not be part of the language.
This, to be sincere.
>>
Rust's whole design is based on SJW ideology
See: the whole memory safety and muh safe spaces thing
>>
>>57706491
I've honestly never heard an intelligent answer to this question
>>
>>57706491
Abstraction

Ada is very old and has very few modern high-level type system concepts. The programs you can write with it are very primitive, and the syntax is very clunky.
>>
>>57718252
What's specifically is primitive. Especially compared to c++ types, where c++ has done everything and isn't limited to "primitive" programs.
>>
File: theLogo.png (15KB, 400x400px) Image search: [Google]
theLogo.png
15KB, 400x400px
>>57711856
>he doesn't use an applied type system to program
>>
>>57706015
>Programming on a low level is complicated
>move
>add
>add
>move
Oh wow.
>>
>>57718554
>"Hey anon, why haven't you still fixed the seam carving algorithm you received from your coworker, consisting of adds and moves?"
>[cries in add and move]
>>
>>57718554
Try writing something like a generic function when all you have is stuff like add and move.
>>
>>57717564
Take your pick: What should be shilled next?

Exception: The language shilling network(TM) will not shill shitty dynamically typed/homoseiconix/immersive languages or academic crap that clearly has no place in the real world.
>>
>>57718678
add add add
add
add add add
add
add

mov mov
mov mov
mov mov
mov mov
mov mov mov

add add add
add add
add add
add add
add add

mov mov mov
mov
mov
mov
mov mov mov

add
add add add
add
add
add add

mov
mov
mov
mov
mov

add add add
add add
add add
add add
add add add

mov mov mov
mov mov
mov mov
mov mov
mov mov
>>
>>57705166
Rust is C++ for people who don't like C++.
If you like it then there's nothing in it for you.
>>
>>57717622
because rust claim to be safe, and it's not always a good thing.

i'm 100% ok with trading readability and syntax complexity to get safety, but i wouldn't trade performance with anything.
>>
>>57719111
if you like c++ you don't know what a good programming language is.
c++ is ok just because it don't have any serious competitor, but it's not a good language. it sucks.
>>
Does it have dependent and higher-kinded types?
>>
>>57719276
I never said it was a good programming language.

Good programmers can work around a bad programming language anyway. Just look at modern PHP frameworks and JavaScript.
>>
http://home.pipeline.com/~hbaker1/ForthStack.html

>>57719359
Dependent types, specifically dependent pair, are difficult to implement without a dynamic enough runtime environment (basically, a GC)

>>57717622
>>57717646
>High-level constructs like arrays with known sizes should be implemented *in* the language, not be part of the language.
It's a noble goal, but how would you go about designing this sort of language? The only way would be dependent types which have their own set of complications
>>
>>57719363
>let's not improve our tools because our programmers are good enough!
>we still have buffer overflows in the year 201x
>>
All these new language just add syntactic sugar to patterns we already use.

And I think that's great. It removes the need for the programmer to worry about it and focus in his own work instead.
>>
>>57719466
No, they don't.

If you had learned programming properly instead of at a bootcamp you wouldn't make such a stupid remark.
>>
>>57719359
>>57719410

There are proposals for something similar to both of these, although discussion seems to have stalled currently.

(const-) dependent type system: https://github.com/rust-lang/rfcs/pull/1657

Associated type constructors (an incremental step towards HKTs): https://github.com/rust-lang/rfcs/pull/1598
>>
>>57705799
Dangling pointers aren't really an issue in newer c++ code
>>
>>57707971
>Go
>no generics

kek
>>
>>57719855
I really don't understand why they are so hesitant to add them.
It's not like a really shallow, unflexible version of generics that literally functions as placeholder only was hard to grok or compile fast.
>>
>>57719410
>It's a noble goal, but how would you go about designing this sort of language? The only way would be dependent types which have their own set of complications
Well for example, Haskell's approach is to give you ‘unsafe’ primitives in the language itself and let libraries create ‘safe’ wrappers on top (with runtime or static checks)

for example Data.Vector, which relies on unsafe* primitives for its efficient low-level operations and exposes ‘safe’ primitives that add runtime checks on top of these.
>>
>>57718252
>The programs you can write with it are very probative

>C exists with one of the most simplistic types
These are the words of a middle schooler
>>
>>57720356
who are you quoting?
>>
>>57721175
First is a typoed quote, second is an implying, third is my opinion on the matter.
Thread posts: 114
Thread images: 7


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