Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Cross Building the FreeBSD ports tree by Baptiste Daroussineurobsdcon
Abstract
Building packages is a resource consuming task and can take very long on embedded devices or low power architectures. Being able to use the power of amd64 servers to build packages for arm or mips allows to make this task faster and less tedious.
This talk will cover the following topic:
State of art to build arm/mips packages on FreeBSD from a powerful amd64 box
How to create a cross building environement
How the ports tree does automatically handle cross building
How dependencies are handled when cross building packages
How to workaround non cross buildable or broken build system like perl and python
Cross build monster ports: chromium, libreoffice, openjdk and firefox
What are the current limitation
Future directions for the cross building framework in the ports tree.
Speaker bio
Baptiste Daroussin is a unix system engineer, FreeBSD committer for both base and ports, a member of the port management team.
He is responsible for a couple of the important changes that happened in the ports over the past few years: New options framework, pkgng, Stage support and more.
Although the signs were out there in the open, the introduction of Swift was one of the big surprises of WWDC 2014. In this talk, I've outlined the reasonings why a 30yo language is being phased out and the main improvements introduced in Swift as well as Xcode 6.
Webinar - Windows Application Management with PuppetOlinData
This webinar will help you to understand how to install Windows application and services, We will also look into how to manage windows services related to the application.
How we manage React Microfrontends at JobMatchMeFelix Kühl
How and why we use a monorepo, webpack code splitting, static html rendering and critical css injection to bundle all our react applications and micro frontends into a single build while retaining reasonable bundle sizes and an almost perfect page speed score (Without having to eject create-react-app of course).
@ JSUnconf 2019
Tips And Tricks For Bioinformatics Software Engineeringjtdudley
This is a talk I've given twice at Stanford recently. It's essentially a brain dump of my thoughts on being a Bioinformatician with lots of links to useful tools.
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Ruby Meditation
Speech of Ruslan Tolstov, Ruby Developer at MLSDev, at Ruby Meditation 27, Dnipro, 19.05.2019
Slideshare -
Next conference - http://www.rubymeditation.com/
During this talk, we’ll discuss serverless technologies. In particular, we will talk about popular serverless platforms like AWS Lambda, Google CF, and Microsoft AF and also dwell upon serverless frameworks for managing and deploying your functions. As well, we will touch upon the potential use cases of this new approach in your existing projects.
Announcements and conference materials https://www.fb.me/RubyMeditation
News https://twitter.com/RubyMeditation
Photos https://www.instagram.com/RubyMeditation
The stream of Ruby conferences (not just ours) https://t.me/RubyMeditation
Building Bricks with MRuby: A Journey to MRuby on LEGO RobotsTorsten Schönebaum
Constructing robots with LEGO is fun, programming them using Ruby even more. If you ever wanted to know how to start with MRuby on a device that can be changed into anything you can build with LEGO — this talk is for you.
Those are the slides for a talk held at EuRuKo 2019 in Rotterdam. A recording of the talk can be found at https://www.youtube.com/watch?v=KpBayzPz4_Y
Fast Slim Correct: The History and Evolution of JavaScript.John Dalziel
A look back at how JavaScript has evolved over the past 18 years - how it broke out of the browser and can now be found in the most unexpected places. Presented at Worthing Digital, 7th Nov 2013.
Modern advanced malware samples are used to infect countries and they make part of the current cyber war, cyber espionage and financial attacks. Furthermore, critical actors, who write these malicious codes, try to make the static and dynamic analysis really hard by heavily virtualize and obfuscate codes using techniques such as CFG, virtualization, call stack manipulation, dead code, opaque predicate and so on. Therefore, to manage complex sceneries as exposed above, we are able to use tools such as METASM, MIASM and several emulation techniques to make code simpler. At end, the goal is to reduce the code (most of time by using symbolic analysis), making us able to get a better understanding about the threat. This presentation aims to show concepts and a practical approach on how to handle these reverse engineering problems.
Composer has triggered a renaissance in the PHP community, it has changed the way we deal with other people’s code and it has changed the way we share our code. We are all slowly moving to using Composer, from Wordpress to Joomla and Drupal and frameworks in between. But many of us mistreat composer, follow outdated practices or simply lack a few tricks. In this session i’ll get you the low down on how to use composer the right way.
Cross Building the FreeBSD ports tree by Baptiste Daroussineurobsdcon
Abstract
Building packages is a resource consuming task and can take very long on embedded devices or low power architectures. Being able to use the power of amd64 servers to build packages for arm or mips allows to make this task faster and less tedious.
This talk will cover the following topic:
State of art to build arm/mips packages on FreeBSD from a powerful amd64 box
How to create a cross building environement
How the ports tree does automatically handle cross building
How dependencies are handled when cross building packages
How to workaround non cross buildable or broken build system like perl and python
Cross build monster ports: chromium, libreoffice, openjdk and firefox
What are the current limitation
Future directions for the cross building framework in the ports tree.
Speaker bio
Baptiste Daroussin is a unix system engineer, FreeBSD committer for both base and ports, a member of the port management team.
He is responsible for a couple of the important changes that happened in the ports over the past few years: New options framework, pkgng, Stage support and more.
Although the signs were out there in the open, the introduction of Swift was one of the big surprises of WWDC 2014. In this talk, I've outlined the reasonings why a 30yo language is being phased out and the main improvements introduced in Swift as well as Xcode 6.
Webinar - Windows Application Management with PuppetOlinData
This webinar will help you to understand how to install Windows application and services, We will also look into how to manage windows services related to the application.
How we manage React Microfrontends at JobMatchMeFelix Kühl
How and why we use a monorepo, webpack code splitting, static html rendering and critical css injection to bundle all our react applications and micro frontends into a single build while retaining reasonable bundle sizes and an almost perfect page speed score (Without having to eject create-react-app of course).
@ JSUnconf 2019
Tips And Tricks For Bioinformatics Software Engineeringjtdudley
This is a talk I've given twice at Stanford recently. It's essentially a brain dump of my thoughts on being a Bioinformatician with lots of links to useful tools.
Use cases for Serverless Technologies - Ruslan Tolstov (RUS) | Ruby Meditatio...Ruby Meditation
Speech of Ruslan Tolstov, Ruby Developer at MLSDev, at Ruby Meditation 27, Dnipro, 19.05.2019
Slideshare -
Next conference - http://www.rubymeditation.com/
During this talk, we’ll discuss serverless technologies. In particular, we will talk about popular serverless platforms like AWS Lambda, Google CF, and Microsoft AF and also dwell upon serverless frameworks for managing and deploying your functions. As well, we will touch upon the potential use cases of this new approach in your existing projects.
Announcements and conference materials https://www.fb.me/RubyMeditation
News https://twitter.com/RubyMeditation
Photos https://www.instagram.com/RubyMeditation
The stream of Ruby conferences (not just ours) https://t.me/RubyMeditation
Building Bricks with MRuby: A Journey to MRuby on LEGO RobotsTorsten Schönebaum
Constructing robots with LEGO is fun, programming them using Ruby even more. If you ever wanted to know how to start with MRuby on a device that can be changed into anything you can build with LEGO — this talk is for you.
Those are the slides for a talk held at EuRuKo 2019 in Rotterdam. A recording of the talk can be found at https://www.youtube.com/watch?v=KpBayzPz4_Y
Fast Slim Correct: The History and Evolution of JavaScript.John Dalziel
A look back at how JavaScript has evolved over the past 18 years - how it broke out of the browser and can now be found in the most unexpected places. Presented at Worthing Digital, 7th Nov 2013.
Modern advanced malware samples are used to infect countries and they make part of the current cyber war, cyber espionage and financial attacks. Furthermore, critical actors, who write these malicious codes, try to make the static and dynamic analysis really hard by heavily virtualize and obfuscate codes using techniques such as CFG, virtualization, call stack manipulation, dead code, opaque predicate and so on. Therefore, to manage complex sceneries as exposed above, we are able to use tools such as METASM, MIASM and several emulation techniques to make code simpler. At end, the goal is to reduce the code (most of time by using symbolic analysis), making us able to get a better understanding about the threat. This presentation aims to show concepts and a practical approach on how to handle these reverse engineering problems.
Swift is a robust language for mobile but cloud development opens the door to new opportunities for today's top app developers. Integrating projects to backend systems can sometimes be problematic, requiring new tools and skills. It doesn't have to be; end-to-end Swift opens the door to radically simpler app dev so we can all focus on the engagement. This session will describe the work that's been done to bring Swift to the server, both in terms of efforts in the Swift.org projects, and with implementation of server frameworks, and show you how you can quickly create and deploy applications with both server and client components.
Presented by Chris Bailey at the Swift Summit, Nov 7th 2016
Software Development Automation With Scripting LanguagesIonela
The Scripting languages are deployed in many operative systems, either in UNIX/Linux or Windows. These languages are developed for general purpose process automation and web programming. But you can consider using them for the software development process in many ways. Among these languages, awk and Perl are suitable for automate and speed up software development for embedded systems, because many embedded systems only have cross tool chain, without powerful IDE supports for process automation.
Swift Summit: Pushing the boundaries of Swift to the ServerChris Bailey
Swift is a robust language for mobile but cloud development opens the door to new opportunities for today's top app developers. Integrating projects to backend systems can sometimes be problematic, requiring new tools and skills. It doesn't have to be; end-to-end Swift opens the door to radically simpler app dev so we can all focus on the engagement. This session will describe the work that's been done to bring Swift to the server, both in terms of efforts in the Swift.org projects, and with implementation of server frameworks, and show you how you can quickly create and deploy applications with both server and client components.
Presented at the Swift Summit, Nov 7th 2016
Everyone is currently talking about Docker and Kubernetes. But what does that mean for me as an ASP.NET core developer? This session shows the basic concepts of Docker and Kubernetes and illumes the advantages of these technologies and platforms. We will build a fully automated build and release pipeline with Azure DevOps to support a modern DevOps process within the team.
Why Rust? by Edd Barrett (codeHarbour December 2019)Alex Cachia
For longer than I have existed, memory errors have plagued systems programming. Although many such errors are benign, sadly many end up being security vulnerabilities, or worse, exploits. In this talk, I will discuss how a security exploit is born, and how the Rust
programming language tries to prevent them.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Be pinched by a cRUSTacean to prevent programming errors !
1. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 1/49
RUSTRUST
Be pinched by a cBe pinched by a cRUSTRUSTacean to prevent programmingacean to prevent programming
errors !errors !
2. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 2/49
2 words about us2 words about us
$ cat ~/.bash_profile
NAME="René Ribaud"
AGE=43
source ./1998.sh
PROFESSION="Unices system and storage"
"administrator , since 2003"
HISTORY="Lots (too many) infrastructure"
"implementation projects"
"Discover Linux & FLOSS between"
"1995 / 2000"
"First step in the cloud around 2011"
", pre-sales solution architect"
"2014 (Cloud, DevOps)"
"I’m an Ops !"
COMPANY="CGI 20th November 2017"
JOB="Information system architect"
"specialized around DevOps technologies"
3. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 3/49
2 words about us2 words about us
François BestFrançois Best
Freelance Developer
Embedded/Realtime C/C++
background
Seduced by the Dark Side of the Web
Current interests:
Rust (of course)
Security / Cryptography
Decentralisation
Personal data protection
& de-GAFAMing
Github: |
Web:
@franky47
@47ng
francoisbest.com
4. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 4/49
What is RUST ?What is RUST ?
New systems programming language
Multi paradigm language (imperative, functional, object
oriented (not fully))
By Mozilla and the Community
Dual license MIT and Apache v2.0
First stable release May 15th, 2015
Rust 2018 (v1.31), a major new edition released
December 6th, 2018
5. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 5/49
Goal ?Goal ?
Provide an alternative to C/C++ and also higher-levelProvide an alternative to C/C++ and also higher-level
languageslanguages
6. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 6/49
Why is this Ops guy speaking about aWhy is this Ops guy speaking about a
programming language ?programming language ?
7. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 7/49
Immune to coder disease 1Immune to coder disease 1
My language is the best !My language is the best !
And my code is also the best !And my code is also the best !
This is part of my job to know languages and especially how to build projects usingThis is part of my job to know languages and especially how to build projects using
themthem
8. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 8/49
Immune to coder disease 2Immune to coder disease 2
I don't make mistakes, only bad coders are making onesI don't make mistakes, only bad coders are making ones
Really, how do you explain all major projects security issues ?Really, how do you explain all major projects security issues ?
I'm fed up about segfaults and null pointer exceptions !I'm fed up about segfaults and null pointer exceptions !
9. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 9/49
Why is RUST exciting to me ?Why is RUST exciting to me ?
And probably why should you look at it ?And probably why should you look at it ?
10. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 10/49
PromisesPromises
Focus on safety -> avoids errors and helps finding them
!
Especially safe concurrency
Fast, really fast !
11. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 11/49
But alsoBut also
Compiled language, few runtime dependencies
Produces binaries, that could be static with musl
Can interact easily with other languages via ABI and
bindings (Python, C/C++, JS...)
State of mind, hard at compile time, but safe at runtime
Somewhere challenging !
12. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 12/49
Ripgrep (rg)Ripgrep (rg)
An application written in RustAn application written in Rust
A grep enhanced
Compatible with standard grep
Search speed is really
impressive
Look also at fd, exa, lsd...
13. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 13/49
And a cute mascot !And a cute mascot !
14. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 14/49
What it looks likeWhat it looks like
extern crate flate2;
use flate2::read::GzDecoder;
use std::fs::File;
use std::io::Read;
fn run() -> String {
let path = "ascii.txt.gz";
let mut contents = String::new();
let gz = File::open(path).unwrap(); // open and decompress file
let mut uncompress = GzDecoder::new(gz);
uncompress.read_to_string(&mut contents).unwrap();
contents // return implicitly contents
}
fn main() {
println!("Hello, world!");
let result = run(); // call run function
println!("{}", result); // display compress file content
}
15. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 15/49
Language featuresLanguage features
Static type system with local type
inference
Explicit mutability
Zero-cost abstractions
Runtime-independent concurrency safety
Errors are values
No null
Static automatic memory management
No garbage collection
16. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 16/49
Safety is achieved by mainly 3 conceptsSafety is achieved by mainly 3 concepts
17. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 17/49
MutabilityMutability
struct Bike {
speed: u32,
distance: u32,
brand: String,
}
fn main() {
let mybike = Bike {
speed: 25,
distance: 1508,
brand: "Liteville".to_string(),
};
mybike.speed = 30; //Reassign !!!
println!(
"Bike {}: speed={} distance={}",
mybike.brand, mybike.speed, mybike.distance
);
}
18. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 18/49
Mutability errorMutability error
error[E0594]: cannot assign to field `mybike.speed` of immutable binding
--> src/main.rs:14:5
|
8 | let mybike = Bike {
| ------ help: make this binding mutable: `mut mybike`
...
14 | mybike.speed = 30; //Reassign !!!
| ^^^^^^^^^^^^^^^^^ cannot mutably borrow field of immutable binding
error: aborting due to previous error
For more information about this error, try `rustc --explain E0594`.
error: Could not compile `immutability`.
19. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 19/49
Ownership & BorrowingOwnership & Borrowing
Every piece of data is uniquely owned
Ownership can be passed
When owned data reaches the end of a scope, it is
destroyed
20. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 20/49
OwnershipOwnership
fn main() {
let s1 = String::from("Hello, RUST ! 🦀");
let s2 = s1;
println!("{}", s1);
}
21. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 21/49
Ownership errorOwnership error
--> src/main.rs:3:9
|
3 | let s2 = s1;
|
= note: #[warn(unused_variables)] on by default
error[E0382]: borrow of moved value: `s1`
--> src/main.rs:4:20
|
3 | let s2 = s1;
| -- value moved here
4 | println!("{}", s1);
| ^^ value borrowed here after move
|
= note: move occurs because `s1` has type
`std::string::String`, which does not implement the `Copy` trait
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.
error: Could not compile `owned2`.
22. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 22/49
OwnershipOwnership
fn main() {
let s = String::from("Hello, RUST ! 🦀");
display(s);
display(s); // Already owned !
}
fn display(some_string: String) {
println!("{}", some_string);
}
23. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 23/49
Ownership errorOwnership error
error[E0382]: use of moved value: `s`
--> src/main.rs:5:13
|
4 | display(s);
| - value moved here
5 | display(s); // Already owned !
| ^ value used here after move
|
= note: move occurs because `s` has type `std::string::String`,
which does not implement the `Copy` trait
24. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 24/49
Ownership & BorrowingOwnership & Borrowing
Access can be borrowed (mutable and
immutable)
You can borrow mutably once
Or multiple times immutably
Exclusive: mutable or immutable, never both
25. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 25/49
BorrowingBorrowing
fn main() {
let s = String::from("Hello, RUST ! 🦀");
display(&s);
display(&s);
}
fn display(some_string: &String) {
println!("{}", some_string);
}
Hello, RUST ! 🦀
Hello, RUST ! 🦀
26. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 26/49
Borrowing mutableBorrowing mutable
fn main() {
let s = String::from("Hello");
change(&s);
println!("{}", s);
}
fn change(some_string: &String) {
some_string.push_str(", RUST ! 🦀");
}
27. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 27/49
Borrowing mutable errorBorrowing mutable error
error[E0596]: cannot borrow immutable borrowed content `*some_string` as mutable
--> src/main.rs:9:5
|
8 | fn change(some_string: &String) {
| ------- use `&mut String` here to make mutable
9 | some_string.push_str(", RUST ! 🦀");
| ^^^^^^^^^^^ cannot borrow as mutable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0596`.
error: Could not compile `borrow_mut`.
28. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 28/49
Borrowing mutable fixedBorrowing mutable fixed
fn main() {
let mut s = String::from("Hello");
change(&mut s);
println!("{}", s);
}
fn change(some_string: &mut String) {
some_string.push_str(", RUST ! 🦀");
}
Hello, RUST ! 🦀
29. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 29/49
References validity checksReferences validity checks
#[derive(Debug)]
struct Person<'a> {
first_name: &'a str,
last_name: &'a str,
age: &'a i32,
phone: Vec<&'a str>,
}
fn return_reference<'a>() -> Person<'a> {
let age = 25;
Person {
first_name: "John",
last_name: "Doe",
age: &age,
phone: vec!["123-123", "456-456"],
}
}
fn main() {
let person = return_reference();
println!("{:?}", person);
}
30. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 30/49
References validity checks errorReferences validity checks error
error[E0597]: `age` does not live long enough
--> src/main.rs:15:15
|
15 | age: &age,
| ^^^ borrowed value does not live long enough
...
18 | }
| - borrowed value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function
body at 9:1...
--> src/main.rs:9:1
|
9 | fn return_reference<'a>() -> Person<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.
31. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 31/49
Concurrency without fearConcurrency without fear
32. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 32/49
Concurrency without fearConcurrency without fear
33. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 33/49
Concurrency without fear errorConcurrency without fear error
Rust type system allows no data racesRust type system allows no data races
error[E0596]: cannot borrow `words` as mutable, as it is a captured variable
in a `Fn` closure
--> src/main.rs:19:54
|
19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap());
| ^^^^^^^^^^ cannot borrow
as mutable
|
help: consider changing this to accept closures that implement `FnMut`
--> src/main.rs:19:19
|
19 | .for_each(|arg| tally_words(arg.to_string(), &mut words).unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0596`.
34. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 34/49
High level abstractionHigh level abstraction
Generics and TraitsGenerics and Traits
Define shared behavior
Define behavior based on types
Define behavior from various types with trait
bounds
35. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 35/49
Unsafe RustUnsafe Rust
Allow to disengage some safety features
Use at your own risk !
Crates using unsafe code can be audited with cargo-
geiger
36. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 36/49
A modern languageA modern language
with builtin code quality standardswith builtin code quality standards
Documentation embedded into code
Unit tests
Integration tests
Great documentation (books and std
lib)
37. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 37/49
A modern languageA modern language
with tools to be productivewith tools to be productive
Environment setup and update rustup
Package (crates) management cargo + plugin
Code formatting rustfmt
Compiler rustc
Efficient error messages
Potential solution
Linter clippy
Code completion racer
Help transition to 2018 edition rustfix
Editor integration (IntelliJ, Vs code, Vim,
Emacs...)
38. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 38/49
Opinionated for productivityOpinionated for productivity
Avoiding bikesheddingAvoiding bikeshedding
Crates have a defined filesystem structure
Modules & exports based on file location (like Python)
But with control over public / private exports (like
ES6)
Batteries included, but replaceable
Procedural macros for DSLs (eg: JSON, CSS...)
Custom compile-time extensions with build scripts
Cargo extensions with cargo-foo binary crates
39. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 39/49
Interesting cratesInteresting crates
That extend the std libThat extend the std lib
Date and time management chrono
Parallel iteration rayon
HTTP client reqwest
Command line parsing clap, docopt,
structopt
Logging log
Serialization serde
Regular expressions regex
...
40. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 40/49
Area of useArea of use
Command line tools
Web and network
services
Embedded device, IOT
WebAssembly
Games
41. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 41/49
Who is using Rust ?Who is using Rust ?
Mozilla, servo project
RedHat, stratis
project
Dropbox
Telenor
Chef
42. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 42/49
Who is using Rust ?Who is using Rust ?
Ready at dawn
Chucklefish that published Stardew Valley and Starbound,
is using Rust in their new projects Wargroove and
Witchbrook to get safe concurrency and portability
43. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 43/49
Who is using Rust ?Who is using Rust ?
Clevercloud, (Geoffroy Couprie)
nom, parser
Sozu, reverse proxy
Snips
ANSSI: RFC for secure application design in
Rust
44. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 44/49
Governance and communityGovernance and community
Rust is pragmaticRust is pragmatic
All features are driven by needs of real software
The language is evolved with user feedback
Consciously chooses familiar constructs
Picks good ideas from others
Doesn’t want to be the primary language at all
cost
45. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 45/49
Governance and communityGovernance and community
Beloved language and communityBeloved language and community
Voted "Most loved language" on Stackoverflow 2018,
2017, 2016
Only 1/100 of survey respondents have issues with the
Rust community
Newcomers from all directions
https://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wantedhttps://insights.stackoverflow.com/survey/2018/#most-loved-dreaded-and-wanted
46. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 46/49
Governance and communityGovernance and community
growthgrowth
https://8-p.info/visualizing-crates-io/https://8-p.info/visualizing-crates-io/
Crates.ioCrates.io
47. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 47/49
Governance and communityGovernance and community
Help from the communityHelp from the community
Lots of books
IRC and Discord
channels
User forum
Youtube channel
Meetups
48. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 48/49
Governance and communityGovernance and community
Beloved language and communityBeloved language and community
Experience from Mozilla to drive open projects
All major decisions, go to an open Request For
Comments process
Release every 6 weeks
3 channels: stable, beta and nightly
Medium time to merged PR for changes: 6 days!
More then 4/5 of contributions to the Rust language come
from outside Mozilla
The compiler has more then 2000 contributors
49. 3/27/2019 Be pinched by a cRUSTacean to prevent programming errors !
localhost:8000/rust/?print-pdf#/ 49/49
THANK YOUTHANK YOU
René Ribaud <rene.ribaud@cgi.com>
François Best
<contact@francoisbest.com>