This document discusses immutability in Ruby. It explains that immutable data structures can improve predictability, consistency, and scalability for multi-threaded and distributed applications. While immutable structures may have lower performance for certain operations like random access, there are patterns like using immutable objects and transforming data instead of mutating it that can provide the benefits of immutability in Ruby applications. The document also provides examples of implementing immutable user objects that can be validated and updated without directly mutating the original data.
Swift - Modern & Expressive, or Magical Unicorn?Mike Jones
Presentation on Swift 1.0 to give those coming from other languages a brief overview of the language. Presented first at Reasons to Be Creative, Brighton. 2015
Paco van der Linden, werkzaam als Senior ADF Ontwikkelaar bij AMIS, heeft met Groovy een aantal interessante oplossingen ontwikkeld. De kennis en ervaring die hij daarbij met Groovy in combinatie met Java (en ADF) heeft opgedaan, heeft hij op maandag 26 november gedeeld in een kennissessie.
Swift - Modern & Expressive, or Magical Unicorn?Mike Jones
Presentation on Swift 1.0 to give those coming from other languages a brief overview of the language. Presented first at Reasons to Be Creative, Brighton. 2015
Paco van der Linden, werkzaam als Senior ADF Ontwikkelaar bij AMIS, heeft met Groovy een aantal interessante oplossingen ontwikkeld. De kennis en ervaring die hij daarbij met Groovy in combinatie met Java (en ADF) heeft opgedaan, heeft hij op maandag 26 november gedeeld in een kennissessie.
Derivatives of Trigonometric Functions, Part 2Pablo Antuna
In this presentation we find the derivative of cos(x) and then we solve two examples.
For more videos and lessons: http://www.intuitive-calculus.com/der...
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
Elixir and Phoenix are known for their speed, but that’s far from their only benefit. Elixir isn’t just a fast Ruby and Phoenix isn’t just Rails for Elixir. Through pattern matching, immutable data structures and new idioms your programs can not only become faster but more understandable and maintainable. This talk will take a look at what’s great, what you might miss and augment it with production experience and advice.
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
Elixir and Phoenix are known for their speed, but that’s far from their only benefit. Elixir isn’t just a fast Ruby and Phoenix isn’t just Rails for Elixir. Through pattern matching, immutable data structures and new idioms your programs can not only become faster but more understandable and maintainable. This talk will take a look at what’s great, what you might miss and augment it with production experience and advice.
Tackling Asynchrony with Kotlin CoroutinesTech Triveni
Reactive Programming is an approach to asynchronous programming. Like every other tool, reactive programming tools like RxJava or Reactor come with their own challenges. Kotlin Coroutines alleviates many of these challenges. Kotlin Coroutines, when being designed, had the advantage of being able to explore existing code that uses reactive stream.
This talk will highlight some of these practical challenges and show how Kotlin Coroutines tackle them. The challenges that will be covered are changes in interface design, programming paradigm shift, reactive type selection, exception handling, cancellation, resource leakage, and sequential vs concurrent.
Derivatives of Trigonometric Functions, Part 2Pablo Antuna
In this presentation we find the derivative of cos(x) and then we solve two examples.
For more videos and lessons: http://www.intuitive-calculus.com/der...
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
Elixir and Phoenix are known for their speed, but that’s far from their only benefit. Elixir isn’t just a fast Ruby and Phoenix isn’t just Rails for Elixir. Through pattern matching, immutable data structures and new idioms your programs can not only become faster but more understandable and maintainable. This talk will take a look at what’s great, what you might miss and augment it with production experience and advice.
Elixir & Phoenix – fast, concurrent and explicitTobias Pfeiffer
Elixir and Phoenix are known for their speed, but that’s far from their only benefit. Elixir isn’t just a fast Ruby and Phoenix isn’t just Rails for Elixir. Through pattern matching, immutable data structures and new idioms your programs can not only become faster but more understandable and maintainable. This talk will take a look at what’s great, what you might miss and augment it with production experience and advice.
Tackling Asynchrony with Kotlin CoroutinesTech Triveni
Reactive Programming is an approach to asynchronous programming. Like every other tool, reactive programming tools like RxJava or Reactor come with their own challenges. Kotlin Coroutines alleviates many of these challenges. Kotlin Coroutines, when being designed, had the advantage of being able to explore existing code that uses reactive stream.
This talk will highlight some of these practical challenges and show how Kotlin Coroutines tackle them. The challenges that will be covered are changes in interface design, programming paradigm shift, reactive type selection, exception handling, cancellation, resource leakage, and sequential vs concurrent.
A bird's eye view on some programming languages, focusing on concepts like typing, execution model or style. Presented on T3chFest 2016 in Leganés, Madrid, Spain.
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.
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.
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.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
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.
15. Lista de Elementos
(prepend)
real
Mutable array - unshift 0.050518
Mutable array - shift 0.028875
Immutable list - unshift 0.342788
(6.8x mais lento)
Immutable list - shift 0.028016
(+/- mesma velocidade)
16. Lista de Elementos
real
Mutable array - push 0.047483
Mutable array - pop 0.029408
Mutable array - unshift 0.050518
Mutable array - shift 0.028875
Immutable deque - append at last 0.537605 (11x mais lento)
Immutable deque - pop 0.179720 (6x mais lento)
Immutable deque - append at first 0.496692 (9.5x mais lento)
Immutable deque - shift 0.172747 (6x mais lento)
17. Random Access
real
Mutable array 0.047483
Mutable array - get random element 0.047016
Mutable array - pop 0.029408
Immutable vector 1.782584
(37x mais lento!!!)
Immutable vector - get random element 0.213734
(4.5x mais lento)
Immutable vector - pop 4.246951
(144x mais lento!!!)
18. “Hack”
real
Mutable array 0.343495
Immutable list - prepend 3.075296 (10x mais lento)
Immutable list - from mutable 0.955190 (3.7x mais lento)
Immutable Deque - from mutable 0.947304 (3.7x mais lento)
Immutable Vector - from mutable 0.299589 (1.8x mais lento)
20. An object has state (data)
and behavior (code)
(Wikipedia)
Wikipedia is not a reliable source
(Every university professor)
21. class User
include Anima.new(:name, :email)
end
user = User.new(name: "Foo", email: "foo@bar.com")
user.email << ".br"
user.email # => "foo@bar.com.br"
def user.nada
"#{name} = #{email}"
end
user.nada # => "Foo = foo@bar.com.br"
class User
include Anima.new(:name, :email)
include Adamantium
end
user = User.new(name: "Foo", email: "foo@bar.com")
user.email << ".br" # => can’t modify frozen object
def user.nada
"#{name} = #{email}"
end # => can’t modify frozen object
22. class User
include Anima.new(:name, :email)
end
user = User.new(name: "Foo", email: "foo@bar.com")
user2 = user.with(email: "other@email.com")
user.email # => "foo@bar.com"
user2.email # => "other@email.com"
Como trabalhar?
23. Padrões - Data First
class User
include Anima.new(:name, :children)
include UpInAnima
NULL = new(name: "", children: Hamster::Vector[])
end
class Children
include Anima.new(:name, :age)
include UpInAnima
NULL = new(name: "", age: 0)
end
24. Padrões - Data First
https://bit.ly/2JjCUzE
user = User::NULL
.with(name: "Ariovaldo")
.update_in(:children) { |c|
c.add(Children::NULL.with(name: "Emily",
age: 9))
}
# Emily's birthday!
user.update_in(:children, 0, :age) { |age|
age + 1
}
28. Talk is Easy...
class User
extend Sequel::Model::ClassMethods
include Anima.new(:id, :name, :email)
self.dataset = DB[:users]
def self.call(param)
new(param)
end
def update!(params)
validate(params).then do |new_obj|
pk = self.class.primary_key
pk_value = send(pk)
self.class.dataset.where(pk => pk_value).update(new_obj.to_h)
new_obj
end
end
private :with
private def validate(params)
new_obj = with(params)
errors = NameValidation.call(new_obj.to_h).errors
if(errors.empty?)
Either.right(new_obj)
else
Either.left(errors)
end
end
end
30. class User
# …
private def validate(params)
new_obj = with(params)
errors = NameValidation.call(new_obj.to_h).error
if(errors.empty?)
Either.right(new_obj)
else
Either.left(errors)
end
end
end
31. class User
# ...
def update!(params)
validate(params).then do |new_obj|
pk = self.class.primary_key
pk_value = send(pk)
self.class.dataset
.where(pk => pk_value)
.update(new_obj.to_h)
new_obj
end
End
private :with
# ...
end
32. u2 = u.update!(name: "") # => Either left=....
User.first
# => #<User id=1 name="Foo Bar" email=nil>
u2 = u.update!(email: "szabo@mailinator.com")
User.first
# => #<User id=1 name="Foo Bar" email="szabo@mailinator.com">
u2 = u.update!(name: "Szabo")
User.first
# => #<User id=1 name="Szabo" email=nil>
u = User.first
# => #<User id=1 name="Foo Bar" email=nil>