The document provides an overview of the Go programming language including its guiding principles, syntax, concurrency model, and examples of usage. It discusses that Go was created at Google in 2007 to have better support for concurrency and scalability compared to other languages. It emphasizes simplicity, readability, and minimalism in design. Go uses goroutines and channels for concurrency where goroutines are lightweight threads and channels allow goroutines to communicate without shared memory. Examples demonstrate basic syntax, goroutines, and using channels for patterns like ping-pong.
This presentation is about custom machine translation in AEM. It takes OOTB Microsoft Translator as reference. This is developer-centric and contains code snippets of Microsoft Translation
Quick intro to Neural Machine Translation and overview of the Joey NMT toolkit.
Code: https://github.com/joeynmt/joeynmt
Demo: https://github.com/joeynmt/joeynmt/blob/master/joey_demo.ipynb
Simplifying training deep and serving learning models with big data in python...Holden Karau
More Serious Business Kitty Description:
While some deep learning systems have promised to not require any kind of data preparation or cleaning, in practice many folks find that effectively training their models requires some amount of data preparation and often we spend more time on our data preparation than anything else. This talk will examine tools for data preparation that can be used at scale on "big-data" and then how to use their results on-line at serving time (where we hopefully no longer require a cluster to predict every new user).
Less Serious Business Kitty Description:
Deep Learning, in addition to being a world class tool for detecting the presence of cats, requires large amounts of data for training. As much vendors may say "no data prep required", they are all lying*. This talk will look tools to build a deep learning pipeline with feature prep on top of existing big data technologies without rewriting your code for serving.
Traditionally feature prep done in a big data system, like Spark, Flink, or Beam, would have to be rewritting for the on-line serving component. This is about as much fun as when we have to rewrite our sample Python code into Java, as for some reason that's what a lot companies associate with "production." Come for the deep learning buzz-words, stay for the how to perform on-line serving without writing Java code.
*All vendors are optimists when it comes to their own products, including the vendors who pay Holden and Gris but they pay us so its ok.
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Holden Karau
TensorFlow is all kinds of fancy, from helping startups raising their series A in Silicon Valley to detecting if something is a cat. However, when things start to get “real,” you may find yourself no longer just dealing with mnist.csv but instead needing do large-scale data prep as well as training.
Holden Karau details how to use TensorFlow in conjunction with Apache Spark, Flink, and Beam to create a full machine learning pipeline—including the annoying feature engineering and data prep components that we like to pretend don’t exist. Holden also explains why these feature prep stages need to be integrated into the serving layer. She concludes by examining changing industry trends, like Apache Arrow, and how they impact cross-language development for things like deep learning. Even if you’re not trying to raise a round of funding in Silicon Valley, this talk will give you tools to do interesting machine learning problems at scale.
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018Holden Karau
Apache Spark has driven a lot of adoption of both Scala and functional programming concepts in non-traditionally industries. For many programmers in the big data world they coming looking for a solution to scaling their code, and quickly find themselves dealing with immutable data structures and lambdas, and those who love it stay. However, there is a dark side (of escape), much of Spark’s functional programming is changing, and even though it encourages functional programming it’s in a variety of languages with different expectations (in-line XML as a valid part of your language is fun!). This talk will look at how Spark does a good job of introduce folks to concepts like immutability, but also places where we maybe don’t do a great job of setting up developers for a life of functional programming. Things like accumulators, our three different models for streaming data, and an “interesting” approach to closures (come to find out what the ClosuerCleaner does, stay to find out why). The talk will close out with a look at how the functional inspired API is in exposed in the different languages, and how this impacts the kind of code written (Scala, Java, and Python – other languages are supported by Spark but I don’t want to re-learn Javascript or learn R just for this talk). Pictures of cute animals will be included in the slides to distract from the sad parts.
Video: https://www.youtube.com/watch?v=EDJfpkDpoE4
Outline of my experience introducing and championing the usage of Julia Language inside a medium sized Financial organization. Cover reason for using it, reason why I thought it was a good fit and some advice on how to improve other first experience
This presentation is about custom machine translation in AEM. It takes OOTB Microsoft Translator as reference. This is developer-centric and contains code snippets of Microsoft Translation
Quick intro to Neural Machine Translation and overview of the Joey NMT toolkit.
Code: https://github.com/joeynmt/joeynmt
Demo: https://github.com/joeynmt/joeynmt/blob/master/joey_demo.ipynb
Simplifying training deep and serving learning models with big data in python...Holden Karau
More Serious Business Kitty Description:
While some deep learning systems have promised to not require any kind of data preparation or cleaning, in practice many folks find that effectively training their models requires some amount of data preparation and often we spend more time on our data preparation than anything else. This talk will examine tools for data preparation that can be used at scale on "big-data" and then how to use their results on-line at serving time (where we hopefully no longer require a cluster to predict every new user).
Less Serious Business Kitty Description:
Deep Learning, in addition to being a world class tool for detecting the presence of cats, requires large amounts of data for training. As much vendors may say "no data prep required", they are all lying*. This talk will look tools to build a deep learning pipeline with feature prep on top of existing big data technologies without rewriting your code for serving.
Traditionally feature prep done in a big data system, like Spark, Flink, or Beam, would have to be rewritting for the on-line serving component. This is about as much fun as when we have to rewrite our sample Python code into Java, as for some reason that's what a lot companies associate with "production." Come for the deep learning buzz-words, stay for the how to perform on-line serving without writing Java code.
*All vendors are optimists when it comes to their own products, including the vendors who pay Holden and Gris but they pay us so its ok.
Powering Tensorflow with big data using Apache Beam, Flink, and Spark - OSCON...Holden Karau
TensorFlow is all kinds of fancy, from helping startups raising their series A in Silicon Valley to detecting if something is a cat. However, when things start to get “real,” you may find yourself no longer just dealing with mnist.csv but instead needing do large-scale data prep as well as training.
Holden Karau details how to use TensorFlow in conjunction with Apache Spark, Flink, and Beam to create a full machine learning pipeline—including the annoying feature engineering and data prep components that we like to pretend don’t exist. Holden also explains why these feature prep stages need to be integrated into the serving layer. She concludes by examining changing industry trends, like Apache Arrow, and how they impact cross-language development for things like deep learning. Even if you’re not trying to raise a round of funding in Silicon Valley, this talk will give you tools to do interesting machine learning problems at scale.
Apache spark as a gateway drug to FP concepts taught and broken - Curry On 2018Holden Karau
Apache Spark has driven a lot of adoption of both Scala and functional programming concepts in non-traditionally industries. For many programmers in the big data world they coming looking for a solution to scaling their code, and quickly find themselves dealing with immutable data structures and lambdas, and those who love it stay. However, there is a dark side (of escape), much of Spark’s functional programming is changing, and even though it encourages functional programming it’s in a variety of languages with different expectations (in-line XML as a valid part of your language is fun!). This talk will look at how Spark does a good job of introduce folks to concepts like immutability, but also places where we maybe don’t do a great job of setting up developers for a life of functional programming. Things like accumulators, our three different models for streaming data, and an “interesting” approach to closures (come to find out what the ClosuerCleaner does, stay to find out why). The talk will close out with a look at how the functional inspired API is in exposed in the different languages, and how this impacts the kind of code written (Scala, Java, and Python – other languages are supported by Spark but I don’t want to re-learn Javascript or learn R just for this talk). Pictures of cute animals will be included in the slides to distract from the sad parts.
Video: https://www.youtube.com/watch?v=EDJfpkDpoE4
Outline of my experience introducing and championing the usage of Julia Language inside a medium sized Financial organization. Cover reason for using it, reason why I thought it was a good fit and some advice on how to improve other first experience
Repeating History...On Purpose...with ElixirBarry Jones
A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
Presentation given at Funding Circle on Thomas Wurthinger's paper on Truffle/Graal.
Paper: https://pdfs.semanticscholar.org/8251/bd1f9496b61e7418b96a816f31477de4c75d.pdf
Java Memory Consistency Model - concepts and contextTomek Borek
Java Memory Consistency Model is a difficult topic.
It's useful in making sure that multi-threaded programs on multi-threaded cores will interact with each other (and through memory) in a consistent manner.
It's specification is damn hard (even according to folks with lots of concurrent experience, like Doug Lea) to read, understand and routinely follow without error.
This presentation talks about some fallacies surrounding memory model, explains it, offers definitions and reasons for it's existence. It ain't deep, it's more entry level stuff.
A simple explanation of basic principles of Distributed Programming with NodeJS. The CAP Theorem is fully explained, with working code the you can try yourself!
My speech about Microservices at Geecon Prague: what are microservices and why we use them? what are the anti-patterns? what opensource solution we can use to manage them?
Brief introduction to the Python programming language, for complete beginners who have never learned a programming language before. Resources and links are included.
“An investment in knowledge always pays the best interest.” – Benjamin Franklin. Here is a list of 10 books that I believe that every developer should read. Take a look.
Green Custard Friday Talk 5: React-Native PerformanceGreen Custard
In Green Custard's 5th Friday talk, William explores the subject of React-Native Performance.
Topics covered:
- Native: The good
- Native: The not so good
- Hybrid summary
- React-Native summary
- React-Native: Component mapping to Native
- React-Native: Architecture
- Performance
- Bridge 2.0 - The React-Native Approach
Green Custard is a custom software development consultancy. To discover more about their work and the team visit www.green-custard.com.
Want to write a book in Jupyter - here's howJim Arlow
Describes how to create books and other interactive long form texts using Jupyter notebooks. Provides simple tools and techniques for extracting reusable code and creating tables of contents.
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
Understanding object model and bytecode is a crucial part in understanding an interpreted object-oriented language. Smalltalk, one of the oldest object-oriented programming languages, has a great object model and has been used bytecode and VM since 1970s. It is interesting to compare Smalltalk's and Python's object model and bytecode. Guido once said "I remember being surprised by its use of metaclasses (which is quite different from that in Python or Ruby!) when I read about them much later. " and "Smalltalk's bytecode was a bigger influence of Python's bytecode though." It is interesting to compare Smalltalk's and Python's metacalss and bytecode.
Functional programming is not about complicated thingsMichael Langford
Goes into some typical functional languages you may want to try, lessons to pull out of them, some iOS Swift and Objective C programming (Objective-C with Underscore.m). Use of SVMaybe for parsing. Map, Reduce, Filter. Functional programming's impact on Cyclomatic Complexity. (Edited to length).
Becoming a Software Craftsman takes a lot of practice. Using Code Katas in Coding Dojos is an excellent way to get that practice in a low stress fun way. Discover how to do that.
Introduction to GoLang by Amal Mohan N. This presentation is an introduction to GoLang - it's history, features, syntax, importance etc.
concurrency, go-routines, golang, google, gopher, introduction, programming
Repeating History...On Purpose...with ElixirBarry Jones
A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
Presentation given at Funding Circle on Thomas Wurthinger's paper on Truffle/Graal.
Paper: https://pdfs.semanticscholar.org/8251/bd1f9496b61e7418b96a816f31477de4c75d.pdf
Java Memory Consistency Model - concepts and contextTomek Borek
Java Memory Consistency Model is a difficult topic.
It's useful in making sure that multi-threaded programs on multi-threaded cores will interact with each other (and through memory) in a consistent manner.
It's specification is damn hard (even according to folks with lots of concurrent experience, like Doug Lea) to read, understand and routinely follow without error.
This presentation talks about some fallacies surrounding memory model, explains it, offers definitions and reasons for it's existence. It ain't deep, it's more entry level stuff.
A simple explanation of basic principles of Distributed Programming with NodeJS. The CAP Theorem is fully explained, with working code the you can try yourself!
My speech about Microservices at Geecon Prague: what are microservices and why we use them? what are the anti-patterns? what opensource solution we can use to manage them?
Brief introduction to the Python programming language, for complete beginners who have never learned a programming language before. Resources and links are included.
“An investment in knowledge always pays the best interest.” – Benjamin Franklin. Here is a list of 10 books that I believe that every developer should read. Take a look.
Green Custard Friday Talk 5: React-Native PerformanceGreen Custard
In Green Custard's 5th Friday talk, William explores the subject of React-Native Performance.
Topics covered:
- Native: The good
- Native: The not so good
- Hybrid summary
- React-Native summary
- React-Native: Component mapping to Native
- React-Native: Architecture
- Performance
- Bridge 2.0 - The React-Native Approach
Green Custard is a custom software development consultancy. To discover more about their work and the team visit www.green-custard.com.
Want to write a book in Jupyter - here's howJim Arlow
Describes how to create books and other interactive long form texts using Jupyter notebooks. Provides simple tools and techniques for extracting reusable code and creating tables of contents.
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
Understanding object model and bytecode is a crucial part in understanding an interpreted object-oriented language. Smalltalk, one of the oldest object-oriented programming languages, has a great object model and has been used bytecode and VM since 1970s. It is interesting to compare Smalltalk's and Python's object model and bytecode. Guido once said "I remember being surprised by its use of metaclasses (which is quite different from that in Python or Ruby!) when I read about them much later. " and "Smalltalk's bytecode was a bigger influence of Python's bytecode though." It is interesting to compare Smalltalk's and Python's metacalss and bytecode.
Functional programming is not about complicated thingsMichael Langford
Goes into some typical functional languages you may want to try, lessons to pull out of them, some iOS Swift and Objective C programming (Objective-C with Underscore.m). Use of SVMaybe for parsing. Map, Reduce, Filter. Functional programming's impact on Cyclomatic Complexity. (Edited to length).
Becoming a Software Craftsman takes a lot of practice. Using Code Katas in Coding Dojos is an excellent way to get that practice in a low stress fun way. Discover how to do that.
Introduction to GoLang by Amal Mohan N. This presentation is an introduction to GoLang - it's history, features, syntax, importance etc.
concurrency, go-routines, golang, google, gopher, introduction, programming
Creating a compiler for your own languageAndrea Tino
A guide through Computational Linguistics for developing Compilers and Interpreters.
The document is not in a definitive state and some parts might be incomplete or still at draft level. Definitive version will be uploaded soon by updating this document.
Go, Golang, Golnguage, what is go language, what is go, History of go, Founders of Go, Why Go is invented ?, Why Go?, Who are using go today?, What will you see in Go?, What will you not see in Go?, Structure of Go Programs, Features of Go, Drawbacks of Go
CODE GIST: https://gist.github.com/tyndyll/cce72c16dc112cbe7ffac44dbb1dc5e8
A high level introduction to the Go programming language, including a sample Hello World web server
Après la présentation de #Flutter, Julien nous révèle toute la puissance de #Go, encore un autre langage de programmation créé par Google.
After the #Flutter presentation, Julien reveals all the power of #Go, yet another programming language created by Google.
Go is a new systems programming language from Google. Go has many interesting features such as 'communication channels' that makes it suitable for use in multi-core machines, and network programming. With Ken Thompson (of Unix fame) as one of its designers, Go has elegant and minimal design that is appealing to most programmers. This talk gives a technical introduction to Go that is of interest to anyone working in system software.
[Presentation I have in 2010 - I haven't updated it with recent changes to the Go language]
Advantages of golang development services & 10 most used go frameworksKaty Slemon
Golang is a programming language trusted by companies like Dropbox, Facebook, Netflix & Uber. Here we are providing Golang pros & list of top 10 Golang Frameworks.
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.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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/
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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
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.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
2. Agenda
● What is Go?
○ Guiding Principles
■ Why Simplicity is Important?
■ Why Readability is Important?
● Why You Should Learn Go?
○ Interest Over Time
○ Go In Production
○ What still needs work
● Syntax Overview
○ Hello World
● Go’s Concurrency Model
○ A Word on CSP And Communications Model
○ The Go Runtime
○ Goroutines
■ What Are Goroutines?
■ Goroutines VS. Threads
○ Channels
○ Examples
3. What Is Go?
Go (golang) is a programming language developed at
Google[9] in 2007 by Robert Griesemer, Rob Pike, and
Ken Thompson.[7]
Go is a general-purpose language designed with
systems programming in mind.
● strongly typed and garbage-collected and has
● explicit support for concurrent programming.
● Programs are constructed from packages, whose
properties allow efficient management of
dependencies.
● The existing implementations use a traditional
compile/link model to generate executable
binaries.
4. What Is Go?
Motivation:
● Needed a better language for what they do at Google
● Personal motivation: Wanted a clean, small, compiled language with
modern features.
● Clear about what was wrong: Complexity, missing concurrency support,
lack of scalability, insane build times.
● Good ideas about how to address issues.
● Unpolished thoughts about the rest.
● Three experienced people's insights on how not to do it.
Check out this lecture
5. History
● Project starts at Google in 2007 (by Griesemer, Pike, Thompson)
● Open source release in November 2009
● More than 250 contributors join the project
● Version 1.0 release in March 2012
6. Guiding Principles
Guiding principles
● Simplicity, safety, and readability are paramount.
● Striving for orthogonality in design.
● Minimal: One way to write a piece of code.
● It's about expressing algorithms, not the type
system.
7. Why Simplicity Is Important?
Simple Calculation The Ruby Way:
result = 0
for i in 0..10
result += i
end
(1..10).inject(0) { |result, element| result + element }
=> 55
(1..10).reduce(0) { |result, element| result + element }
=> 55
result = 0
(1..10).each{ |element| result += element }
=> 55
result = 0
(1..10).map { |element| result += element }
=> 55
This is without while, until and regular for
loops….
It's a bit overdoing it, but you get the picture..
8. Why Simplicity Is Important?
Simple Calculation The Gopher Way:
sum := 0
for i := 0; i < 10; i++ {
sum += i
}
9. Why Readability Is Important?
• If a language has too many features, you waste time choosing which
ones to use.
• Then implement, refine, possibly rethink and redo.
• Later, "Why does the code work this way?"
• The code is harder to understand simply because it is using a more
complex language.
• Preferable to have just one way, or at least fewer, simpler ways.
• Features add complexity. We want simplicity.
• Features hurt readability. We want readability.
• Readability is paramount.
10. Why Readability Is Important?
• Readable means Reliable
• Readable code is reliable code.
• It's easier to understand.
• It's easier to work on.
• If it breaks, it's easier to fix.
• If the language is complicated:
– You must understand more things to read and work on the code.
– You must understand more things to debug and fix it.
A key tradeoff: More fun to write, or less work to maintain
11. Interpreted VS Statically Compiled
Interpreted Languages
• Execute instructions directly,
without previously compiling a
program into machine-
language instructions.
• The interpreter executes the
program directly, translating
each statement into a sequence
of one or more subroutines
already compiled into machine
code.
• Reflection
• Dynamic Typing - the process of
verifying the type safety of a
program at runtime
Compiled Languages
• Quicker than those translated
at run time, due to the
overhead of the translation
process.
• Static Typing - finding type
errors reliably at compile time,
which should increase the
reliability of the delivered
program
12. Interpreted VS Statically Compiled
Interpreted (High Level) Languages
• More Readable (Usually)
• Portable - Platform
Independent Like JVM
• Powerfull
• Flexible
• Slower execution compared to
direct native machine code
execution on the host CPU.
• Easily to Reverse Engineer
Some Examples:
Ruby, Python, Javascript, Perl,
Scheme and many more!
Compiled (Low Level) Languages
• Not platform-independent
• Adding one more step to
deployment and debugging
process
Some Examples:
C/C++, Java, C#, Go, Visual basic,
Haskell, Erlang, Rust and others
13. So, Why You Should Learn Go?
• Modern
• Compact, concise, general-
purpose
• Imperative statically type-
checked, dynamically type-safe
• Garbage-collected
• Compiles to native code,
statically linked
• Fast compilation, efficient
execution
• Multi Platform Support
• Extensive Standard Library
Designed by programmers for programmers!
16. Go Helps Google
• Slow builds
• Uncontrolled dependencies
• Each programmer using a different subset of the language
• Poor program understanding (code hard to read, poorly documented,
and so on)
• Duplication of effort
• Cost of updates
• Version skew
• Difficulty of writing automatic tools
• Cross-language builds
17. Not All Is Good In The Hood
● Error handling / no Exceptions
● No generics
● Stuck in 70’s
● No OOP - No Inheritance, You can Embed
● Version Management of Dependencies - Some Solutions but should be
released in the next Go release
● Getting time to get used to if you come from a Proper OOP Language.
20. Go’s Concurrency Model
Why We Should care about languages that use concurrency?
The modern world is parallel
● Multicore.
● Networks.
● Clouds of CPUs.
● Loads of users.
● Our technology should help.
That's where concurrency comes in.
21. Go’s Concurrency Model
Go Concurrency relies on Tony Hoare's
Communicating sequential processes article
from 1978
Message Passing Model with Interprocess
communication
The Most important slogan of all:
“Do not communicate by sharing
memory; instead, share memory by
communicating.”
22. Go’s Concurrency Model
Traditional threading models (commonly used when writing Java, C++,
and Python programs, for example) require the programmer to
communicate between threads using shared memory. Typically, shared
data structures are protected by locks, and threads will contend over
those locks to access the data
Go provides:
● Concurrent execution (goroutines)
● Synchronization and messaging (channels)
● Multi-way concurrent control (select)
● (and Also mutex for old school locking)
23. The Go Runtime
Package runtime contains operations that interact with Go's runtime system,
such as functions to control goroutines.
it contains a runtime which provides garbage collection, reflection and many
other features.
Why Go’s Executable Are HUGE!?
24. Goroutines
A goroutine is a function that is capable of running concurrently with other functions.
To create a goroutine we use the keyword go followed by a function invocation:
So This:
func main() {
fmt.Println("start")
doSomething()
fmt.Println("end")
}
Becomes:
func main() {
fmt.Println("start")
go doSomething()
fmt.Println("end")
}
25. Goroutines VS. Threads
• Memory Consumption - 2kb vs 1mb
• Setup and teardown costs - No Resources from the os, Only the runtime
• Switching costs - Registers Switching
• How goroutines are executed - Runtime allocated os threads and distribute
goroutines on them
26. Goroutines VS. Threads
• Goroutines blocking
Goroutines are cheap and do not cause the thread on which they are multiplexed to block if they
are blocked on
– network input
– sleeping
– channel operations or
– blocking on primitives in the sync package.
Even if tens of thousands of goroutines have been spawned, it's not a waste of system
resources if most of them are blocked on one of these since the runtime schedules another
goroutine instead.
In simple terms, goroutines are a lightweight abstraction over threads.
A Go programmer does not deal with threads, and similarly the OS is not aware of the existence
of goroutines. From the OS's perspective, a Go program will behave like an event-driven C
program. [5]
28. Channels
Channels are a staple of
concurrency built right into the Go
language, and provide a way for
goroutines to synchronise, and
share information.
Go's concurrency primitives - goroutines and channels - provide an elegant and distinct means of structuring concurrent software. (These concepts have an interesting history that begins with C. A. R. Hoare's Communicating Sequential Processes.) Instead of explicitly using locks to mediate access to shared data, Go encourages the use of channels to pass references to data between goroutines. This approach ensures that only one goroutine has access to the data at a given time. The concept is summarized in the document
http://blog.nindalf.com/how-goroutines-work/
Memory Consumption
The creation of a goroutine does not require much memory - only 2kB of stack space. They grow by allocating and freeing heap storage as required.[2][3] Threads on the other hand start out at 1Mb (500 times more), along with a region of memory called a guard page that acts as a guard between one thread's memory and another.[7] A server handling incoming requests can therefore create one goroutine per request without a problem, but one thread per request will eventually lead to the dreaded OutOfMemoryError.
Setup and teardown costs
Threads have significant setup and teardown costs because it has to request resources from the OS and return it once its done. The workaround to this problem is to maintain a pool of threads. In contrast, goroutines are created and destroyed by the runtime and those operations are pretty cheap. The language doesn't support manual management of goroutines.
Switching costs
When a thread blocks another has to be scheduled in its place. Threads are scheduled preemptively, and during a thread switch, the scheduler needs to save/restore ALL registers, that is, 16 general purpose registers, PC (Program Counter), SP (Stack Pointer), segment registers, 16 XMM registers, FP coprocessor state, 16 AVX registers, all MSRs etc. This is quite significant when there is rapid switching between threads. Goroutines are scheduled cooperatively and when a switch occurs, only 3 registers need to be saved/restored - Program Counter, Stack Pointer and DX. The cost is much lower.
How goroutines are executed
As mentioned earlier, the runtime manages the goroutines throughout from creation to scheduling to teardown. The runtime is allocated a few threads on which all the goroutines are multiplexed. At any point of time, each thread will be executing one goroutine. If that goroutine is blocked, then it will be swapped out for another goroutine that will execute on that thread instead.[6]