For the best viewing experience, please download this presentation and view it in Keynote. SlideShare doesn't handle the animations well.
Blocks are a powerful language feature. However, they are underused and under-appreciated in Objective-C, especially compared to Ruby. My intent is to make blocks easy to understand and show many practical uses of blocks.
Behavioral reflection is crucial to support for example functional upgrades, on-the-fly debugging, or monitoring critical applications. However the use of reflective features can lead to severe problems due to infinite metacall recursion even in simple cases. This is especially a problem when reflecting on core language features since there is a high chance that such features are used to implement the reflective behavior itself. In this paper we analyze the problem of infinite meta-object call recursion and solve it by providing a first class representation of meta-level execution: at any point in the execution of a system it can be determined if we are operating on a meta-level or base level so that we can prevent infinite recursion. We present how meta-level execution can be represented by a meta-context and how reflection becomes context-aware. Our solution makes it possible to freely apply behavioral reflection even on system classes: the meta-context brings stability to behavioral reflection. We validate the concept with a robust implementation and we present benchmarks.
Slides from presentation at TOOLS 2008 Zuerich, 30.06.2008
Behavioral reflection is crucial to support for example functional upgrades, on-the-fly debugging, or monitoring critical applications. However the use of reflective features can lead to severe problems due to infinite metacall recursion even in simple cases. This is especially a problem when reflecting on core language features since there is a high chance that such features are used to implement the reflective behavior itself. In this paper we analyze the problem of infinite meta-object call recursion and solve it by providing a first class representation of meta-level execution: at any point in the execution of a system it can be determined if we are operating on a meta-level or base level so that we can prevent infinite recursion. We present how meta-level execution can be represented by a meta-context and how reflection becomes context-aware. Our solution makes it possible to freely apply behavioral reflection even on system classes: the meta-context brings stability to behavioral reflection. We validate the concept with a robust implementation and we present benchmarks.
Slides from presentation at TOOLS 2008 Zuerich, 30.06.2008
In this presentation I implement the MVVM pattern by combining Core Data and Reactive Cocoa. The MVVM pattern can use any data storage and binding libraries, but I chose Core Data and Reactive Cocoa since they are common on iOS. Demo at https://github.com/rob-brown/Demos/tree/master/MVVMDemo.
The basics of Reactive Cocoa. The tips and tricks in this presentation will cover almost all the use cases for Reactive Cocoa. Demo here: https://github.com/rob-brown/Demos/tree/master/RACDemo.
iOS State Preservation and RestorationRobert Brown
Covers iOS app state preservation and restoration with extra emphasis on NSCoding. WWCD 2012 session 208 glosses over some of the fine details of how NSCoding works. Understanding this foundation better helps in understanding state preservation and restoration.
Core Data can be intimidating at first. With a proper introduction, the transition into using Core Data can be much smoother. This presentation gives an overview of the core and advanced parts of Core Data.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
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
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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/
In this presentation I implement the MVVM pattern by combining Core Data and Reactive Cocoa. The MVVM pattern can use any data storage and binding libraries, but I chose Core Data and Reactive Cocoa since they are common on iOS. Demo at https://github.com/rob-brown/Demos/tree/master/MVVMDemo.
The basics of Reactive Cocoa. The tips and tricks in this presentation will cover almost all the use cases for Reactive Cocoa. Demo here: https://github.com/rob-brown/Demos/tree/master/RACDemo.
iOS State Preservation and RestorationRobert Brown
Covers iOS app state preservation and restoration with extra emphasis on NSCoding. WWCD 2012 session 208 glosses over some of the fine details of how NSCoding works. Understanding this foundation better helps in understanding state preservation and restoration.
Core Data can be intimidating at first. With a proper introduction, the transition into using Core Data can be much smoother. This presentation gives an overview of the core and advanced parts of Core Data.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
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
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
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/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
I'm excited to share my latest predictions on how AI, robotics, and other technological advancements will reshape industries in the coming years. The slides explore the exponential growth of computational power, the future of AI and robotics, and their profound impact on various sectors.
Why this matters:
The success of new products and investments hinges on precise timing and foresight into emerging categories. This deck equips founders, VCs, and industry leaders with insights to align future products with upcoming tech developments. These insights enhance the ability to forecast industry trends, improve market timing, and predict competitor actions.
Highlights:
▪ Exponential Growth in Compute: How $1000 will soon buy the computational power of a human brain
▪ Scaling of AI Models: The journey towards beyond human-scale models and intelligent edge computing
▪ Transformative Technologies: From advanced robotics and brain interfaces to automated healthcare and beyond
▪ Future of Work: How automation will redefine jobs and economic structures by 2040
With so many predictions presented here, some will inevitably be wrong or mistimed, especially with potential external disruptions. For instance, a conflict in Taiwan could severely impact global semiconductor production, affecting compute costs and related advancements. Nonetheless, these slides are intended to guide intuition on future technological trends.
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.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
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.
4. What are blocks?
Pieces of code that can be stored and executed when
needed
Also known as lambdas, closures, anonymous
functions, first-class functions, higher-order functions
Can be passed as a parameter, returned from a
method/function, and stored in data structures
Blocks make adding new features to a language easy
5. What does “closure” mean?
Blocks store all the variables that are in scope when the
block is created
Closure makes it possible to store a block indefinitely,
then restore the context at will
Objective-C objects are automatically retained/released
C objects must be manually retained/released
8. Gotchas
Retain loops
Xcode profiler will warn you of block retain loops
Unlike regular Objective-C objects, blocks are created
on the stack
Be sure to call -copy if you need it to live beyond the
current stack frame
Make sure to de-stackify blocks before storing them
in a data structure
10. What are blocks good for?
Completion callbacks
Continuations
Multithreading
Delegate replacement
Other design pattern modifications
11. Callbacks
Most uses of blocks are some form of callback
Since blocks have closure, they can restore the caller’s
context without any effort on our part
12. Completion Blocks
Most common use of blocks in Objective-C
A callback that happens only after some task has
finished
Some operations, such as network requests take an
unknown amount of time
Core Animation also uses many completion blocks
13. Completion Blocks
Object Object
A B
Block
Object B finishes executing and calls
Object A calls Object B and
passescompletion block.
the a completion block.
14. Completion Blocks
Object Object
A B
Block
Object B finishes executing and calls
Object A calls Object B and
passescompletion block.
the a completion block.
15. Completion Blocks
Object Object
A B
Block
Object B finishes executing and calls
Object A calls Object B and
passescompletion block.
the a completion block.
16. Continuations
Think of it like a completion block wrapped in a
completion block wrapped in a completion block...
Essentially building your own runtime stack.
17. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
18. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
19. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
20. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
21. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
22. Continuations
Object Object Object
A B C
Block
Object C BAthen calls Objectand to
Object finisheswraps Object A’s
Object A calls Object needwith
So, Object B Object B B and calls
Object and executing C
block theacompletion C finishes.
knownew completion block.
passes new completion block.
theinwhen Object block.
a completion block.
23. Multithreading: GCD
Grand Central Dispatch (GCD) makes heavy use of
blocks
Blocks are not tied to a thread until they are executed
Blocks can be queued up without blocking threads
Threads can spend more time running and less time
waiting
24. Multithreading: GCD
Code can be made asynchronous simply by
surrounding it with dispatch_async(queue, ^{ ... });
36. Block Delegation
Delegates are essentially protocols that specify a list of
method callbacks
These method callbacks can be easily replaced with
block callbacks
Rule of thumb: 3 or less delegate callbacks should be
handled using blocks.
37. Block Delegation
Advantages:
No additional protocols
No need to conform to a protocol
Easy to change block callbacks dynamically
40. Template Method
Sometimes algorithms differ by only a few lines
Those few lines can be replaced by a virtual method
Subclasses define the virtual method
41. Template Method
Let’s use blocks instead!
Advantages:
No need for subclassing
May not need a new class at all
Template can be changed dynamically
47. Builder Pattern
Some objects have complex structures that vary widely
between uses
Examples: Database tables, UITableView
A block can define the construction of an object
48. Builder Pattern
// Ruby on Rails database table construction
create_table :person do |t|
t.string :name, null: false
t.integer :age, null: false
t.float :weight
end
49. Builder Pattern
// Contrived example, but very feasible.
// Creating a custom table view form.
[RBTableView tableViewUsingBlock:^(RBTableView * t) {
[t addStringField:@“name” required:YES];
[t addIntegerField:@“age” required:YES];
[t addFloatField:@“weight” required:NO];
}];
52. Lockless Exclusion
Accessor
Solution:
Have another object handle thread-safety
Put critical code in a block
Give the block to the thread-safety handler
62. Read/Write LEA
Code that only reads from shared memory doesn’t
need exclusive access
Code that writes to shared memory needs exclusive
access
GCD barrier blocks and concurrent queues are a
perfect solution
63. Read/Write LEA
// Read-only LEA
- (void)accessSharedDataReadOnlyAsync:(void(^)(id sharedData))block {
NSParameterAssert(block);
// myQueue must be a concurrent queue!
dispatch_async([self myQueue], ^{
block([self sharedData]);
});
}
64. Read/Write LEA
// Read/write LEA
- (void)accessSharedDataReadWriteAsync:(void(^)(id sharedData))block {
NSParameterAssert(block);
// myQueue must be a concurrent queue!
dispatch_barrier_async([self myQueue], ^{
block([self sharedData]);
});
}
The practical application of blocks is language independent.\n
\n
\n
\n
\n
\n
ARC usually handles calling -copy for you.\nARC does not handle calling -copy before storing a block in a data structure.\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Continuations are powerful enough to build many features into a language. For example, you can add exceptions to a language using continuations. \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
I’m assuming the 2-core processor is not hyper-threaded.\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
The builder pattern is, in a way, the opposite of the template pattern. A template defines the main algorithm and the subroutines are added in via implementing virtual methods or blocks. The builder pattern defines the subroutines and the conductor method or block defines the main algorithm. \n
\n
Advantages: \nNo need to subclass UITableView (RBTableView technically).\nEasy to make custom table views.\n
\n
\n
\n
\n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n
“Manager” does not imply the singleton pattern. The shared data manager could be any arbitrary object. \n