Macey  Kling

Macey Kling

1598963700

Why You Should Stop What You’re Doing Right Now and Learn Rust

For the last couple of years, I’ve been hearing more and more about a language named Rust. Well known as the most loved language on Stackoverflow’s annual developer survey for the fifth year in a row, Rust is famous for its memory safety without a garbage collector and concurrency without data races! But Rust is also feared as a hard-to-learn language, scaring away many developers. For way too long, I postponed learning Rust. That was a mistake.

Image for post

Most Loved Languages in StackOverflow Developer Survey 2020

You should learn Rust now.

Recently, to further improve parsing performance on large codebases, we started writing Rust at Wildcard. Among all of the languages I’ve tried out, runtime errors such as segfaults, null pointer exceptions, race conditions, etc. are the norm. I took it for granted that being rigorous was the only way to avoid them and that it was the programmer’s responsibility to ensure everything was properly handled. Testing, static analysis, and other methods sure helped but sometimes it still wasn’t enough.

With Rust, most of these runtime errors are converted to compile-time errors, and once code compiles, it works, and for real.

  • There are no segfaults, memory safety is guaranteed at compile time

  • Null doesn’t exist in Rust solving the notorious billion-dollar mistake

  • Data races are programmatically impossible because of the ownership system in Rust!

Image for post

When a rust programmer says it compiles, he means it works

Rust is fast, it’s a systems programming language, meaning memory management is made manually. It is not garbage collected but it doesn’t feel like writing free or delete all over your code. Rust is designed with a simple concept, variable lifetimes: variables are owned by a certain piece of code and are freed when they get out of its scope, very much like local stack variables in C! If the variable is returned by a function, its ownership is moved to the caller, making it possible to outlive the scope of creation.

The core of Rust philosophy is zero cost abstraction: making things as simple as they should be, but without any performance overhead.

Rust is made to be very approachable. I was shocked by the simplicity of the Rust tooling, cargo the rust package manager is amazingly simple and pleasant to use. I’ve never seen a compiler as user friendly as rustc, pointing at the precise location of errors and even suggesting helpful tips! And for the beginners even going all the way and providing an explanation with examples (see rustc --explain), saving us the need to translate compiler errors on stackoverflow!!

#learn #machine learning #python

What is GEEK

Buddha Community

Why You Should Stop What You’re Doing Right Now and Learn Rust

Serde Rust: Serialization Framework for Rust

Serde

*Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.*

You may be looking for:

Serde in action

Click to show Cargo.toml. Run this code in the playground.

[dependencies]

# The core APIs, including the Serialize and Deserialize traits. Always
# required when using Serde. The "derive" feature is only required when
# using #[derive(Serialize, Deserialize)] to make Serde work with structs
# and enums defined in your crate.
serde = { version = "1.0", features = ["derive"] }

# Each data format lives in its own crate; the sample code below uses JSON
# but you may be using a different one.
serde_json = "1.0"

 

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Point {
    x: i32,
    y: i32,
}

fn main() {
    let point = Point { x: 1, y: 2 };

    // Convert the Point to a JSON string.
    let serialized = serde_json::to_string(&point).unwrap();

    // Prints serialized = {"x":1,"y":2}
    println!("serialized = {}", serialized);

    // Convert the JSON string back to a Point.
    let deserialized: Point = serde_json::from_str(&serialized).unwrap();

    // Prints deserialized = Point { x: 1, y: 2 }
    println!("deserialized = {:?}", deserialized);
}

Getting help

Serde is one of the most widely used Rust libraries so any place that Rustaceans congregate will be able to help you out. For chat, consider trying the #rust-questions or #rust-beginners channels of the unofficial community Discord (invite: https://discord.gg/rust-lang-community), the #rust-usage or #beginners channels of the official Rust Project Discord (invite: https://discord.gg/rust-lang), or the #general stream in Zulip. For asynchronous, consider the [rust] tag on StackOverflow, the /r/rust subreddit which has a pinned weekly easy questions post, or the Rust Discourse forum. It's acceptable to file a support issue in this repo but they tend not to get as many eyes as any of the above and may get closed without a response after some time.

Download Details:
Author: serde-rs
Source Code: https://github.com/serde-rs/serde
License: View license

#rust  #rustlang 

Macey  Kling

Macey Kling

1598963700

Why You Should Stop What You’re Doing Right Now and Learn Rust

For the last couple of years, I’ve been hearing more and more about a language named Rust. Well known as the most loved language on Stackoverflow’s annual developer survey for the fifth year in a row, Rust is famous for its memory safety without a garbage collector and concurrency without data races! But Rust is also feared as a hard-to-learn language, scaring away many developers. For way too long, I postponed learning Rust. That was a mistake.

Image for post

Most Loved Languages in StackOverflow Developer Survey 2020

You should learn Rust now.

Recently, to further improve parsing performance on large codebases, we started writing Rust at Wildcard. Among all of the languages I’ve tried out, runtime errors such as segfaults, null pointer exceptions, race conditions, etc. are the norm. I took it for granted that being rigorous was the only way to avoid them and that it was the programmer’s responsibility to ensure everything was properly handled. Testing, static analysis, and other methods sure helped but sometimes it still wasn’t enough.

With Rust, most of these runtime errors are converted to compile-time errors, and once code compiles, it works, and for real.

  • There are no segfaults, memory safety is guaranteed at compile time

  • Null doesn’t exist in Rust solving the notorious billion-dollar mistake

  • Data races are programmatically impossible because of the ownership system in Rust!

Image for post

When a rust programmer says it compiles, he means it works

Rust is fast, it’s a systems programming language, meaning memory management is made manually. It is not garbage collected but it doesn’t feel like writing free or delete all over your code. Rust is designed with a simple concept, variable lifetimes: variables are owned by a certain piece of code and are freed when they get out of its scope, very much like local stack variables in C! If the variable is returned by a function, its ownership is moved to the caller, making it possible to outlive the scope of creation.

The core of Rust philosophy is zero cost abstraction: making things as simple as they should be, but without any performance overhead.

Rust is made to be very approachable. I was shocked by the simplicity of the Rust tooling, cargo the rust package manager is amazingly simple and pleasant to use. I’ve never seen a compiler as user friendly as rustc, pointing at the precise location of errors and even suggesting helpful tips! And for the beginners even going all the way and providing an explanation with examples (see rustc --explain), saving us the need to translate compiler errors on stackoverflow!!

#learn #machine learning #python

Jerad  Bailey

Jerad Bailey

1598891580

Google Reveals "What is being Transferred” in Transfer Learning

Recently, researchers from Google proposed the solution of a very fundamental question in the machine learning community — What is being transferred in Transfer Learning? They explained various tools and analyses to address the fundamental question.

The ability to transfer the domain knowledge of one machine in which it is trained on to another where the data is usually scarce is one of the desired capabilities for machines. Researchers around the globe have been using transfer learning in various deep learning applications, including object detection, image classification, medical imaging tasks, among others.

#developers corner #learn transfer learning #machine learning #transfer learning #transfer learning methods #transfer learning resources

Obie  Rowe

Obie Rowe

1598403060

How To Get Started With Machine Learning With The Right Mindset

You got intrigued by the machine learning world and wanted to get started as soon as possible, read all the articles, watched all the videos, but still isn’t sure about where to start, welcome to the club.

Before we dive into the machine learning world, you should take a step back and think, what is stopping you from getting started? If you think about it, most of the time, we presuppose things about ourselves and assume that to be true without question.

The most normal presumption that we make about ourselves is that we need to have prior knowledge before getting started. Get a degree, complete a course, or have a good understanding of a particular subject.

The truth is that most of the time, this is a lie, the prior knowledge you think you need is most of the time not required or is so big that even experts from the field don’t fully understand it. The Seek of this prior knowledge is a trap that will make you run in circles, which leads us to the next presumption.

The perfect condition, you can’t wait for the ideal environment or situation to get started, things will never be 100% ready, try and fail, then try again. It takes a lot of time to get good at machine learning; you won’t learn all at once and especially at the beginning.

Instead of trying to acknowledge everything before getting started, do a little bit every day; you can make significant progress by creating small things every day for a considerable amount of time. The perfect condition will never exist, do it in your path, be consistent with it, and the results will come.

After you start making little progress every day, you probably will end up having a struggle with something or failing to achieve your goal at a certain point. This feeling is tough; it’s hard to see yourself not making any progress, not having any sense of gratification, and then still not give up.

Machine learning is hard, it might take you a few weeks, months or even years to see progress in a certain point but isn’t any harder than any other technical skill, it requires repetition and dedication to get where you want, you need to test it, make a mistake and learn from i

#machine-learning #artificial-intelligence #python-machine-learning #learn-machine-learning #latest-tech-stories #machine-learning-uses #ml-top-story #ai-and-ml

sophia tondon

sophia tondon

1620898103

5 Latest Technology Trends of Machine Learning for 2021

Check out the 5 latest technologies of machine learning trends to boost business growth in 2021 by considering the best version of digital development tools. It is the right time to accelerate user experience by bringing advancement in their lifestyle.

#machinelearningapps #machinelearningdevelopers #machinelearningexpert #machinelearningexperts #expertmachinelearningservices #topmachinelearningcompanies #machinelearningdevelopmentcompany

Visit Blog- https://www.xplace.com/article/8743

#machine learning companies #top machine learning companies #machine learning development company #expert machine learning services #machine learning experts #machine learning expert