Slides from Guy McCusker's Inaugural Lecture at the University of Bath, 25 April 2012. A brief introduction to game semantics of programming languages.
Max Koretskyi "Why are Angular and React so fast?"Fwdays
Very few developers have the need to write super optimized code. In application development, we tend to favor readability over optimization. But that’s not the case with frameworks. Developers who use frameworks expect them to run as fast as possible. In fact, speed is often a defining characteristic when choosing a framework. There are techniques that make code run faster. You’ve probably heard about linked lists, monomorphism, and bitmasks, right? Maybe you've even used some. Well, you can find all these and a bunch of other interesting approaches in the sources of most popular JS frameworks.
Over the past year, I’ve seen a lot while reverse-engineering Angular and React. In this talk, I want to share my findings with you. Some of you may end up applying them at work. And others, who knows, may even end up writing the next big framework.
Python is a high level language focused on readability. The Python community developed the concept of "Pythonic Code", requiring not only semantic correctness, but also conformity to universally acknowledged stylistic criteria.
A pre-requisite to write pythonic code is to write idiomatic code. Using the right idioms is a matter of acquired taste and experience, however, some idioms are quite easy to learn.
This presentation focuses on some of these idioms and other stylistic criteria:
* for vs. while
* iterators, itertools
* code conventions (space invaders)
* avoid default values bugs
* first order functions
* internal/external iterators
* substituting the switch statement
* properties, attributes, read only objects
* named tuples
* duck typings
* bits of metaprogramming
* exception management: LBYL vs. EAFP
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
Today, we almost exclusively think of code in software projects as a collection of text files. The tools that we use (version control systems, IDEs, code analyzers) also use text as the primary storage format for code. In fact, the belief that “code is text” is so deeply ingrained in our heads that we never question its validity or even become aware of the fact that there are other ways to look at code.
In my talk I will explain why treating code as text is a very bad idea which actively holds back our understanding and creates a range of problems in large software projects. I will then show how we can overcome (some of) these problems by treating and storing code as data, and more specifically as a graph. I will show specific examples of how we can use this approach to improve our understanding of large code bases, increase code quality and automate certain aspects of software development.
Finally, I will outline my personal vision of the future of programming, which is a future where we no longer primarily interact with code bases using simple text editors. I will also give some ideas on how we might get to that future.
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
Learning from other's mistakes: Data-driven code analysisAndreas Dewes
Static code analysis is an useful tool that can help to detect bugs early in the software development life cycle. I will explain the basics of static analysis and show the challenges we face when analyzing Python code. I will introduce a data-driven approach to code analysis that makes use of public code and example-based learning and show how it can be applied to analyzing Python code.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Max Koretskyi "Why are Angular and React so fast?"Fwdays
Very few developers have the need to write super optimized code. In application development, we tend to favor readability over optimization. But that’s not the case with frameworks. Developers who use frameworks expect them to run as fast as possible. In fact, speed is often a defining characteristic when choosing a framework. There are techniques that make code run faster. You’ve probably heard about linked lists, monomorphism, and bitmasks, right? Maybe you've even used some. Well, you can find all these and a bunch of other interesting approaches in the sources of most popular JS frameworks.
Over the past year, I’ve seen a lot while reverse-engineering Angular and React. In this talk, I want to share my findings with you. Some of you may end up applying them at work. And others, who knows, may even end up writing the next big framework.
Python is a high level language focused on readability. The Python community developed the concept of "Pythonic Code", requiring not only semantic correctness, but also conformity to universally acknowledged stylistic criteria.
A pre-requisite to write pythonic code is to write idiomatic code. Using the right idioms is a matter of acquired taste and experience, however, some idioms are quite easy to learn.
This presentation focuses on some of these idioms and other stylistic criteria:
* for vs. while
* iterators, itertools
* code conventions (space invaders)
* avoid default values bugs
* first order functions
* internal/external iterators
* substituting the switch statement
* properties, attributes, read only objects
* named tuples
* duck typings
* bits of metaprogramming
* exception management: LBYL vs. EAFP
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
Today, we almost exclusively think of code in software projects as a collection of text files. The tools that we use (version control systems, IDEs, code analyzers) also use text as the primary storage format for code. In fact, the belief that “code is text” is so deeply ingrained in our heads that we never question its validity or even become aware of the fact that there are other ways to look at code.
In my talk I will explain why treating code as text is a very bad idea which actively holds back our understanding and creates a range of problems in large software projects. I will then show how we can overcome (some of) these problems by treating and storing code as data, and more specifically as a graph. I will show specific examples of how we can use this approach to improve our understanding of large code bases, increase code quality and automate certain aspects of software development.
Finally, I will outline my personal vision of the future of programming, which is a future where we no longer primarily interact with code bases using simple text editors. I will also give some ideas on how we might get to that future.
Following a game show format made popular by Joshua Bloch and Neal Gafter's Java Puzzlers this presentation intends to both entertain and inform. Snippets of Python code the whose behaviour is not entirely obvious are shown, the audience will then be asked to pick from a number of options what the behaviour of the program is. The correct and sometimes non-intuitive answer will then be given along with a brief explanation of the idea the puzzle exposes. Only a modest working knowledge of the Python language is required to understand the puzzles, but the puzzles may also entertain the more experienced Python programmer.
Learning from other's mistakes: Data-driven code analysisAndreas Dewes
Static code analysis is an useful tool that can help to detect bugs early in the software development life cycle. I will explain the basics of static analysis and show the challenges we face when analyzing Python code. I will introduce a data-driven approach to code analysis that makes use of public code and example-based learning and show how it can be applied to analyzing Python code.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Basics of Iterators and Generators,Uses of iterators and generators in python. advantage of iterators and generators. difference between generators and iterators.
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)Tech in Asia ID
This slide was shared on Tech in Asia Jakarta 2016 @ 17 November 2016.
Get updates about our dev events delivered straight to your inbox by signing up here: http://bit.ly/tia-dev ! Be the first to know when new information is available!
Go Reactive: Event-Driven, Scalable, Resilient & Responsive SystemsJonas Bonér
The demands and expectations for applications have changed dramatically in recent years. Applications today are deployed on a wide range of infrastructure; from mobile devices up to thousands of nodes running in the cloud—all powered by multi-core processors. They need to be rich and collaborative, have a real-time feel with millisecond response time and should never stop running. Additionally, modern applications are a mashup of external services that need to be consumed and composed to provide the features at hand.
We are seeing a new type of applications emerging to address these new challenges—these are being called Reactive Applications. In this talk we will discuss four key traits of Reactive; Event-Driven, Scalable, Resilient and Responsive—how they impact application design, how they interact, their supporting technologies and techniques, how to think when designing and building them—all to make it easier for you and your team to Go Reactive.
生成式對抗網路 (Generative Adversarial Network, GAN) 顯然是深度學習領域的下一個熱點,Yann LeCun 說這是機器學習領域這十年來最有趣的想法 (the most interesting idea in the last 10 years in ML),又說這是有史以來最酷的東西 (the coolest thing since sliced bread)。生成式對抗網路解決了什麼樣的問題呢?在機器學習領域,回歸 (regression) 和分類 (classification) 這兩項任務的解法人們已經不再陌生,但是如何讓機器更進一步創造出有結構的複雜物件 (例如:圖片、文句) 仍是一大挑戰。用生成式對抗網路,機器已經可以畫出以假亂真的人臉,也可以根據一段敘述文字,自己畫出對應的圖案,甚至還可以畫出二次元人物頭像 (左邊的動畫人物頭像就是機器自己生成的)。本課程希望能帶大家認識生成式對抗網路這個深度學習最前沿的技術。
Functional Programming and Composing Actorslegendofklang
With the world being non-deterministic, with failure being abundant, and with communication latency being very real—how do we design systems that are capable of dealing with these conditions and how can we expose abstractions that are feasible to reason about?
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
3. Computers and
software are...
• Important
• Ubiquitous
• Complicated
4. Layers of complexity
• Programs
• Compilers
• Operating System
• Hardware
• ... and that’s just on one
computer.
5. The usual answer:
models
• The “layers” are already
abstractions.
• They encapsulate parts
of the system and
interact with the rest via
reduced interfaces.
• We don’t understand
the whole truth - just a
model.
6. Two models of drinking
from a tap
• I turn on the tap and I
get a drink
7. Two models of drinking
from a tap
• Turning the tap opens a
valve which releases
water supplied at a
pressure of 2 bar...
8. Models and
abstractions
• Our conceptual models and their
corresponding abstractions make complex
systems tractable.
• Really good models (e.g. scientific theories)
help us predict, design, and discover.
• What models will help us with
programming?
9. Turing machines
• Alan Turing devised an
early model of
computation: the Turing
Machine.
• A TM manipulates data
stored on a tape
according to a table of
rules - a fixed program.
10. Turing machines
• Turing machines expose powerful and
central concepts:
• computability
• time usage
• space usage
• But they are monolithic, and too low-level
to be of use in analysing modern software.
11. Goal: compositionality
• Software is built by assembling small pieces
of code into large programs.
• Our models should reflect and empower
this compositionality.
• We need abstractions that support
composition.
12. Functions
• Possibly the most widely used (mathematical) abstraction.
• We can happily plug functions together:
• 2x
• sin(x)
• sin(2x)
• x2
• sin(2x) + x2
• These are all functions of type (R→R)
13. Understanding +
• The + in the last example operates on two
functions to give another function
sin(2x) + x 2
• So + has the type
(R→R) ⨉ (R→R) → (R→R)
14. Higher-order functions
and programming
• These higher order functions provide both a
mathematical model of programming and
an approach to programming itself.
• higher-order functional programming
began with LISP in the 1950s.
16. Programs as functions
function fact(x:int):int {
if (x == 0) return 1
else return (x * fact(x-1));
}
x ↦ x!
3↦3⨉2 ⨉1=6
but why?
17. Programs as functions
function fact(x:int):int {
if (x == 0) return 1
else return (x * fact(x-1));
}
x ↦ x!
3↦3⨉2 ⨉1=6
but why?
18. Infinity
• Recursion introduces infinity to the picture.
• For programmers, infinity is where the power
lies.
• For models, infinity is where the problems lie.
• We need some topology to interpret
recursion: a recursive function is modelled as
the limit of an infinite sequence of
approximants.
20. Modelling memory
• Code like
y := y-1
manipulates (an abstraction of) the memory
of the computer.
• To model these with functions, we need to
model the memory itself as a function
identifiers → values.
21. Mathematical semantics
• These ideas were the basis of mathematical
semantics developed by Strachey, Scott and
others from around 1970.
• The theory provides:
• an understanding of recursion and loops
• ways of proving certain correctness
properties of programs (e.g. Hoare logic)
22. But
• For imperative programs, the theory breaks
abstractions: functions can manipulate the
memory in arbitrary ways.
• There is no way to see the two factorial
programs as “the same.”
23. A different abstraction:
interaction
• Replace functions with interacting agents.
• An agent is a “black box” that receives
messages from its environment and sends
out responses.
• Ideas like these were first used in modelling
concurrent systems (Hoare’s CSP, Milner’s
CCS) around 1980.
44. A formalisation: game
semantics
• This idea can be made precise in lots of
ways. Here’s one.
• Interaction is the playing of a game between
the agent and its environment.
• The game specifies what moves are available
and when they can be played.
• Agent and environment take turns.
45. The integer game
request environment
0 1 2 ... agent
A game is a tree of moves. Child moves can
only be played once their parents have been
played.
46. and its dual
request agent
0 1 2 ... environment
54. The identity function
request request
0 1 2 ... 0 1 2 ...
•This strategy implements the function x ↦ x by
copying information.
•It works for any game, with no knowledge of
the moves: pure logic.
55. History-free strategies
• Every strategy we have seen so far chooses
its move based only on the last move by
the environment.
• Notice: history-freeness is preserved by
plugging.
56. A new theory
• These ideas form game semantics.
• Games models possess a lot of the
mathematical structure from the function-
based semantics:
• compositionality,
• recursion as a limit of approximants, etc.
• But also...
57. A theorem
Theorem [Abramsky-Jagadeesan-
Malacaria 1993/2000; cf. Hyland-Ong,
Nickau]
Every pure functional program denotes a
history-free strategy.
Every computable history-free strategy
can be programmed.
58. Imperative programs
• Imperative programs work by interacting
with the computer’s memory.
• Idea: model a memory location as an agent.
write(true) write(false) read
ok ok true false
65. Interacting with the
memory
read
cell
write(true) ok read ...then what?
A good memory location cannot be history
free. But the right history-sensitive strategy is
clear.
66. Extending the theory
• The theory of game semantics extends to
arbitrary history-sensitive strategies.
• Then the cell can respond appropriately to
read moves, so we can model the memory.
• Hence...
71. Infinity
• Infinity enters the games models because
we have to allow moves to be repeated.
• As usual, this is where all the technical
problems are.
72. Taming infinity
• We need infinity to interpret recursion and
loops.
• But we can tame it too:
• restrict to finite data sets
• limit the ways moves can be repeated
• find out what programs are left
73. Towards automated
correctness checking
Theorem [Ghica-M]
For a certain constrained class of
programs, strategies are finite state
machines.
Therefore, we can automatically check
whether two such programs are equal.
74. More
• Lots of other kinds of games to model other
kinds of programs, logic, ... [numerous authors]
• Implementation of strategies as circuits [Ghica]
• Logical counterparts of history-sensitive
strategies [Churchill, Laird, M]
• Relational and geometrical foundations of
game semantics [Calderon, M, Power,
Wingfield].
75. Further
• Modelling the whole
system - all layers,
multiple computers,
people?
• Quantitative models?
Power consumption,
transmission and storage
costs, ...
76. Legal bits
• Photographs used under Creative Commons Attribution-
NonCommercial-ShareAlike licence:
• Circuit Board http://www.flickr.com/photos/loganwilliams/
• Tic Tac Toe http://www.flickr.com/photos/anonymonk/
• Code http://www.flickr.com/photos/circle_hk
• Go http://www.flickr.com/photos/spwelton/
• Lego http://www.flickr.com/photos/kaptainkobold/
• Cat drinking http://www.flickr.com/photos/meantux/
• Alan Turing http://www.flickr.com/photos/sbisson/
• Blue Sky http://www.flickr.com/photos/11247304@N06