[ art / civ / cult / cyb / diy / drg / feels / layer / lit / λ / q / r / sci / sec / tech / w / zzz ] archive provided by lainchan.jp

lainchan archive - /λ/ - 10



File: 1492025919560.png (35.36 KB, 300x225, serveimage.jpg)

No.10

Rust general, share resources, PDFs and experiences with the language.

  No.305

A few months ago I started implementing pong using sdl in rust (just for the heck of it).

It is a really interesting language, but it required me to really change my way of programming (I've been using mostly C++ before), for two reasons:

1) Rust is an expression-oriented language, something that was new to me.

2) Rust really forces you to think about what you develop, there is no way of doing things "quick and dirty".

If you want to get into rust, expect to need a lot of time to learn it. It is the complete opposite of a easy-to-learn language like python, which can be picked up on the go.

  No.592

I have to say that the Rust standard library is really well designed. It's streamlined and makes everyday tasks very easy to do, and it has the best iterator class I've ever seen. Pipelines of iterator adapters lead to some very expressive one-liners by chaining standard library functions and a few lambdas.

This is in stark comparison to C++ which arguably has one of the worst standard libraries that I've ever encountered in a high-level language. In C++ I often find myself writing my own functions for really basic stuff, either because the standard library doesn't include it, or because the way the standard library does it is horribly bad or unsafe. Which often ends up leading to Boost and all the issues that come with that.

  No.593

>>592
Also I don't want to come off as fanboyish or as a C++ hater with that comment. The C++ library ecosystem is great and has a lot of stuff that I couldn't find elsewhere. I just hate the standard library with a passion because of how often it ends up being utterly useless for what I want to do.

  No.603

>>592
This may be true but the few Rust libraries I've seen that aren't standard libraries have felt really immature. The ralloc library was naively designed an inefficient. The piston library is overly abstracted, badly documented, and confusing (multiple types and functions with the same exact name, and subtle differences; types whos name do not reflect very well their purpose). Also some libraries do not care about compatibility and insist on staying in beta forever. These experiences have turned me off of Rust. What do you think?

  No.608

I think the main concept in Rust is the concept of borrowing and ownership to replace garbage collection. People say its a very good system of expliciting defining how data is allocated/deallocated in memory that improves how you think about code. I'm having trouble getting the big picture on how Rust works, I have noticed that Pluralsight has a beginner video course on Rust which might be good.

  No.685

>>592
I find C++'s libs much nicer than java's. Streams are the only nice thing in java IMO and it misses a lot of things that would be useful like a pair class for example.
I also find iterators nicer in C++ but if you use streams in java I guess that wins out.

  No.686

It's nice, but I don't see the appeal. It doesn't fill any hole of mine that would need filling at the moment.

  No.687

>>608
>Pluralsight
Are you for real? Why the hell would you recommend that out of the myriad of FREE resources available elsewhere?
Get out of here. You are advertising.

  No.696

>>687
If everyone used free resources than no one would bother to write and publish books. Notice we have a book thread on this forum...gee, I wonder why people still read published books when they could just use all the crappy free online tutorials? Well maybe people are not living in mom's basement like you and actually have to learn this stuff for school and work.

Also video courses on Lynda and Pluralight can often be a faster and easier way of learning than books. So leave your stupid opinions to yourself, there are people here who are actually trying to get work done.