This document discusses the benefits of purely functional programming using the Frege programming language. Some key points made include:
- Frege is based on principles of pure functional programming and avoids side effects through its type system and lack of assignments.
- Functions in Frege are pure by design and can be reasoned about locally through equational reasoning. This makes code more robust and refactorable.
- Frege supports features like currying, pattern matching, lazy evaluation, and list comprehensions to enable a functional style of programming.
- Examples are given showing how concepts from category theory like natural transformations can be expressed and checked via the type system for robustness.
- Interoperability with Java
JDD2015: Frege - how to program with pure functions - Dierk KönigPROIDEA
FREGE - HOW TO PROGRAM WITH PURE FUNCTIONS
Frege is a Haskell for the JVM. It is so pure that it does not even have assignments in the language! What sounds silly at first is actually extremely beneficial for code to stay correct under composition, refactoring, and parallel execution. This tutorial touches on the various benefits of this approach but mainly focusses on the practical side of development: how to program with the help of purity and how to make it accessible to Java projects.
Be prepared to see a lot of live coding.
A virtual function a member function which is declared within a base class and is re-defined(Overriden) by a derived class. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.
↓↓↓↓ Read More:
Watch my videos on snack here: --> --> http://sck.io/x-B1f0Iy
@ Kindly Follow my Instagram Page to discuss about your mental health problems-
-----> https://instagram.com/mentality_streak?utm_medium=copy_link
@ Appreciate my work:
-----> behance.net/burhanahmed1
Thank-you !
Inspirations for this presentation were drawn from a couple of sprints in one of our internal projects in which we had the freedom of choosing our own technical solutions.
We go through premature optimisation, silver-bullet antipattern, duplication and null-pointer hell.
In the end other antipatterns are swiftly mentioned.
This is a whirlwind tour of the FP land and is primarily meant for developers wanting to embark on their functional programming journey. Java is used to understand most of the concepts, however, where it falls short to explain certain concepts such as lazy evaluation, currying and partial function application, de-structuring and pattern-matching, Scala or Groovy or Clojure or even Haskell are used to demonstrate it.
JDD2015: Frege - how to program with pure functions - Dierk KönigPROIDEA
FREGE - HOW TO PROGRAM WITH PURE FUNCTIONS
Frege is a Haskell for the JVM. It is so pure that it does not even have assignments in the language! What sounds silly at first is actually extremely beneficial for code to stay correct under composition, refactoring, and parallel execution. This tutorial touches on the various benefits of this approach but mainly focusses on the practical side of development: how to program with the help of purity and how to make it accessible to Java projects.
Be prepared to see a lot of live coding.
A virtual function a member function which is declared within a base class and is re-defined(Overriden) by a derived class. When you refer to a derived class object using a pointer or a reference to the base class, you can call a virtual function for that object and execute the derived class's version of the function.
↓↓↓↓ Read More:
Watch my videos on snack here: --> --> http://sck.io/x-B1f0Iy
@ Kindly Follow my Instagram Page to discuss about your mental health problems-
-----> https://instagram.com/mentality_streak?utm_medium=copy_link
@ Appreciate my work:
-----> behance.net/burhanahmed1
Thank-you !
Inspirations for this presentation were drawn from a couple of sprints in one of our internal projects in which we had the freedom of choosing our own technical solutions.
We go through premature optimisation, silver-bullet antipattern, duplication and null-pointer hell.
In the end other antipatterns are swiftly mentioned.
This is a whirlwind tour of the FP land and is primarily meant for developers wanting to embark on their functional programming journey. Java is used to understand most of the concepts, however, where it falls short to explain certain concepts such as lazy evaluation, currying and partial function application, de-structuring and pattern-matching, Scala or Groovy or Clojure or even Haskell are used to demonstrate it.
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
Check out these exercises: http://de.slideshare.net/nicolayludwig/3-cpp-procedural-programmingexercises
- Procedural Programming
- Predefined and User defined Functions
- Declaration and Definition of Functions
- Procedural and recursive Function Calling
- Namespaces and separated Function Definitions
- A Glimpse of Separated Compilation and Translation Units
Virtual function complete By Abdul Wahab (moon sheikh)MoonSheikh1
this presentation topic is might be taught in 2nd semester of BS-IT
in these slides you can find the working concepts of virtual function in c++ programming language
Functional programming with Ruby - can make you look smartChen Fisher
Functional programming can make you look smart and others feel stupid. Learn how with Ruby
code can be found here:
https://github.com/chenfisher/functional-programming-with-ruby
Youtube:
https://www.youtube.com/watch?v=Qzoh8w4OPtU
Vladimir Romanov - How to write code that is easy to read and change? What should you do when you see a piece of code written years ago which is hard to understand? In my experience, this boils down to 4 principles that I would like to share along with some examples in Apex
What is "functional programming", "pure function", "functional language", "lambda function" and "higher-order function" and how these concepts work in modern programming?
Watch the video lesson from Svetlin Nakov and learn more at:
https://softuni.org/dev-concepts/what-is-functional-programming
Are you using Java8 Lambdas & Streams in your core business logic? Then you might be having this strange feeling that it’s not Java anymore: at times it’s cryptic, barely readable.. This was the topic of the workshop with the same name that I held at VoxxedDays Bucharest 2017. These are the slides backing the that workshop.
As a summary, the materials walk through the functional features of Java8, adding details along the way about how we can keep the code clean as we embrace the Java 8 features.
The entire desktop screencast + voice it's on youtube, here: https://youtu.be/uH9A37k2QkU
Pure functions and immutable objects @dev nexus 2021Victor Rentea
aaaaThis presentation focuses on two of the most advanced design tools in your toolbox, whatever the language or framework you might be using. After understanding the basics, we'll see how these concepts can be used in real-world scenarios to simplify those several most complex use-cases in your application. At the end of a mix of slides and live-coding, you'll finally understand the power of these ideas and become prepared to apply them in your day-to-day work.
Along the way, we'll introduce concepts like Side Effects, Idempotency, Referential Transparency, Pure Functions and Deep/Shallow Immutability. Also, we'll talk about the powerful Functional Code / Imperative Shell architecture that you can use for your complex workflows.
Prepare for an entertaining, highly interactive session that will answer all your questions.
Written in Java and spoken in English.
FregeDay: Design and Implementation of the language (Ingo Wechsung)Dierk König
Talk by Ingo Wechsung at the FregeDay 2015, Sept 11th, Basel, Switzerland, covering general characteristics of the language, history, and important design decisions.
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
Check out these exercises: http://de.slideshare.net/nicolayludwig/3-cpp-procedural-programmingexercises
- Procedural Programming
- Predefined and User defined Functions
- Declaration and Definition of Functions
- Procedural and recursive Function Calling
- Namespaces and separated Function Definitions
- A Glimpse of Separated Compilation and Translation Units
Virtual function complete By Abdul Wahab (moon sheikh)MoonSheikh1
this presentation topic is might be taught in 2nd semester of BS-IT
in these slides you can find the working concepts of virtual function in c++ programming language
Functional programming with Ruby - can make you look smartChen Fisher
Functional programming can make you look smart and others feel stupid. Learn how with Ruby
code can be found here:
https://github.com/chenfisher/functional-programming-with-ruby
Youtube:
https://www.youtube.com/watch?v=Qzoh8w4OPtU
Vladimir Romanov - How to write code that is easy to read and change? What should you do when you see a piece of code written years ago which is hard to understand? In my experience, this boils down to 4 principles that I would like to share along with some examples in Apex
What is "functional programming", "pure function", "functional language", "lambda function" and "higher-order function" and how these concepts work in modern programming?
Watch the video lesson from Svetlin Nakov and learn more at:
https://softuni.org/dev-concepts/what-is-functional-programming
Are you using Java8 Lambdas & Streams in your core business logic? Then you might be having this strange feeling that it’s not Java anymore: at times it’s cryptic, barely readable.. This was the topic of the workshop with the same name that I held at VoxxedDays Bucharest 2017. These are the slides backing the that workshop.
As a summary, the materials walk through the functional features of Java8, adding details along the way about how we can keep the code clean as we embrace the Java 8 features.
The entire desktop screencast + voice it's on youtube, here: https://youtu.be/uH9A37k2QkU
Pure functions and immutable objects @dev nexus 2021Victor Rentea
aaaaThis presentation focuses on two of the most advanced design tools in your toolbox, whatever the language or framework you might be using. After understanding the basics, we'll see how these concepts can be used in real-world scenarios to simplify those several most complex use-cases in your application. At the end of a mix of slides and live-coding, you'll finally understand the power of these ideas and become prepared to apply them in your day-to-day work.
Along the way, we'll introduce concepts like Side Effects, Idempotency, Referential Transparency, Pure Functions and Deep/Shallow Immutability. Also, we'll talk about the powerful Functional Code / Imperative Shell architecture that you can use for your complex workflows.
Prepare for an entertaining, highly interactive session that will answer all your questions.
Written in Java and spoken in English.
FregeDay: Design and Implementation of the language (Ingo Wechsung)Dierk König
Talk by Ingo Wechsung at the FregeDay 2015, Sept 11th, Basel, Switzerland, covering general characteristics of the language, history, and important design decisions.
Software Transactional Memory (STM) in Frege Dierk König
Frege is a Haskell for the JVM. It is a perfect fit for supporting STM as an approach to concurrency since it can guarantee through the type system that transactions are free of side effects and more.
Quick into to Software Transactional Memory in FregeDierk König
Frege is a Haskell for the JVM and can as such support STM with all the benefits of a purely functional language. In particular, Frege guarantees through the type system that no transactional variable (TVar) can be accessed outside a transaction and no side effect can happen inside a transaction.
FregeDay: Roadmap for resolving differences between Haskell and Frege (Ingo W...Dierk König
Diskusssion of what kind of differences there are between Haskell 2010 and Frege, how difficult they are to resolve, what their impact is, and what to do about them. Also: how to allow essential differences that will never work outside the JVM and demarcate them from supposed-to-be vanilla Haskell.
FregeDay: Parallelism in Frege compared to GHC Haskell (Volker Steiss) Dierk König
Frege is a Haskell for the JVM and thus uses the JVM features to implement the Haskell abstractions of parallelism. This leads to some interesting findings regarding absolute performance and relative speedup from parallelism that Volker Steiss presented at the FregeDay 2015, Basel, Switzerland.
Video at https://www.youtube.com/watch?v=S-4sYwGY3Sk
JDD2015: Frege - Introducing purely functional programming on the JVM - Dierk...PROIDEA
FREGE - INTRODUCING PURELY FUNCTIONAL PROGRAMMING ON THE JVM
Frege is a Haskell for the JVM. In Frege you program with pure functions, immutable values,
and isolated effects only. This talk gives you a first impression of what this paradigm means to the programmer and how it makes your code robust under composition, allows refactoring without fear, and becomes safe for parallel execution.
This introduction leads you through the benefits that make Frege unique between the JVM languages. It is followed up by the Frege tutorial that provides more detail and examples.
Clojure is a new dialect of LISP that runs on the Java Virtual Machine (JVM). As a functional language, it offers great benefits in terms of programmer productivity; as a language that runs on the JVM, it also offers the opportunity to reuse existing Java libraries. Simon’s interest is in using Clojure to build desktop applications with the Java Swing GUI library. In this presentation Simon discusses how the power of Clojure can be applied to Swing, and whether it hits the sweet spot.
Get into Functional Programming with ClojureJohn Stevenson
A brief guide on how to think in the way of Functional Programming, using Clojure as the example code.
Covers the main concepts and abstractions within Functional Programming & Clojure
Presented at several conferences and meetup events through 2016, with a video captured via GoPro at CeBIT Developer world 2016 on youtube at:
https://www.youtube.com/watch?v=mEfqULqChZs
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
(chapter 5) A Concise and Practical Introduction to Programming Algorithms in...Frank Nielsen
These are the slides accompanying the textbook:
A Concise and Practical Introduction to Programming Algorithms in Java
by Frank Nielsen
Published by Springer-Verlag (2009), Undergraduate textbook in computer science (UTiCS series)
ISBN: 978-1-84882-338-9
http://www.lix.polytechnique.fr/~nielsen/JavaProgramming/
http://link.springer.com/book/10.1007%2F978-1-84882-339-6
Neal Ford Emergent Design And Evolutionary ArchitectureThoughtworks
ThoughtWorks Luminary and Conference Presenter Extraordinaire Neal Ford will be presenting:
Emergent Design & Evolutionary Architecture
Most of the software world has realised that Big Design Up Front (BDUF) doesn’t work well in software. But lots of developers struggle with this notion when it applies to architecture and design, surely you can’t start coding, right? You need some level of understanding before you can start work.
This seminar will explore the current thinking about Emergent Design and Evolutionary Architecture, including:
• Proactive approaches with test driven development
• Reactive approaches including both refactoring and composed methods
• Strategies and techniques for allowing design to emerge from projects as they proceed, keeping your code in sync with the problem domain
• Real world examples of these techniques in action
Neal Ford, Software Architect and Meme Wrangler, ThoughtWorks
Neal is an acclaimed international speaker and expert on designing and building of large-scale enterprise applications. Neal has spoken at over 100 conferences worldwide, delivering more than 600 talks. Neal is also the designer and developer of applications, instructional materials, magazine articles, courseware, video/DVD presentations and author and/or editor of 6 books spanning a variety of technologies, including the most recent The Productive Programmer.
(chapter 2) A Concise and Practical Introduction to Programming Algorithms in...Frank Nielsen
These are the slides accompanying the textbook:
A Concise and Practical Introduction to Programming Algorithms in Java
by Frank Nielsen
Published by Springer-Verlag (2009), Undergraduate textbook in computer science (UTiCS series)
ISBN: 978-1-84882-338-9
http://www.lix.polytechnique.fr/~nielsen/JavaProgramming/
http://link.springer.com/book/10.1007%2F978-1-84882-339-6
Sven and I are going to classify Xtext compared to other concepts and frameworks and demonstrate its capabilities with a refined version of an example I presented in London the week before. After that we discuss the versatile possibilities for extending and customizing the framework and finish with an exciting outlook.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
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
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.
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
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
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.
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/
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
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/
22. can be cached (memoized)
can be evaluated lazily
can be evaluated in advance
can be evaluated concurrently
can be eliminated
in common subexpressions
can be optimized
Pure Functions
27. Robust Refactoring
Changing the order of operations
Requires purity.
100% safe if the type system
can detect natural transformations
Applied Category Theory
credits: Phil Wadler, Tech Mesh 2012 - Faith, Evolution, and Programming Languages
31. pure native encode java.net.URLEncoder.encode :: String -> String
encode “Dierk König“
native millis java.lang.System.currentTimeMillis :: () -> IO Long
millis ()
millis ()
past = millis () - 1000
Does not compile!
Frege -> Java
This is a key distinction between Frege and
other JVM languages!
even Java can be pure
32. allows calling Java
but never unprotected!
is explicit about effects
just like Haskell
Frege
33. Type System
Global type inference and thus
more safety and less work
for the programmer
You don’t need to specify any types at all!
But sometimes you do anyway…
35. Mutable
I/O
Mutable
Mutable
Keep the mess out!
Pure Computation
Pure Computation
Pure Computation
Ok, these are Monads. Be brave. Think of them as contexts
that the type system propagates and makes un-escapable.
Thread-
safe by
design!
Checked
by
compiler
47. List Comprehension
Pythagorean triples: a2 + b2 = c2
pyth n = [
(x,y,z)
| x <- [1..n], y <- [1..n], z <- [1..n],
x*x + y*y == z*z
]
select from
where
„brute force“ or „executable specification“.
A more efficient solution:
48. List Comprehension
Pythagorean triples: a2 + b2 = c2
[ (m*m-n*n, 2*m*n, m*m+n*n)
| m <- [2..], n <- [1..m-1]
]
endless production think „nested loop“
„select“
functions
dynamic
„from“
empty
„where“
50. Frege is different
No More But
state no state (unless declared)
statements expressions (+ „do“ notation)
assignments definitions
variables ST monad as „agent“
interfaces type classes
classes & objects algebraic data types
inheritance parametric polymorphism
null references Maybe
NullPointerExceptions Bottom, error
52. Frege in comparison
Java
Groovy
Frege
Haskell
concept by
Simon Peyton-Jones
Frege makes the Haskell spirit
accessible to the Java programmer
and provides a new level of safety.
apply logic
run computers
practical
robust
53. Unique in Frege
Explicit effects
Purity = no effects
Guarantees extend into Java calls
Laziness enforces purity and
immutable values (no assignments)
Global type inference
requires a purely functional language
(only expressions, no statements)
54. Why Frege
Robustness under parallel execution
Robustness under composition
Robustness under increments
Robustness under refactoring
Enables local and equational reasoning
Best way to learn FP
55. Why FP matters
Enabling incremental development
www.canoo.com/blog/fp1
Brush up computational fundamentals
„An investment in knowledge
always pays the best interest.“
—Benjamin Franklin
58. Gottlob
Frege
"As I think about acts of integrity and grace,
I realise that there is nothing in my knowledge
that compares with Frege’s dedication to truth…
It was almost superhuman.“ —Bertrand Russel
"Not many people managed to create a revolution
in thought. Frege did.“ —Graham Priest
Lecture on Gottlob Frege:
http://www.youtube.com/watch?v=foITiYYu2bc