1. The document discusses how to define recursive functions using only lambda calculus without using special forms like define or letrec.
2. It shows how to define the length function recursively using a technique called the "poor man's Y combinator" which involves self-application of the function.
3. It then abstracts out the pattern used to define an arbitrary recursive function, arriving at the Y combinator, which allows any function to be defined recursively.
Jserv gave a talk about the conceptual introduction to LLVM. The session mentioned the evolution of compiler technologies, paradigm shift, LLVM as a promising open source project, and how LLVM changes the IT world.
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
A basic Introduction to Rust. Rust is a modern system programming language which offering different approach than other existing new modern system programming languages to deal with: memory safety without GC, abstraction without overhead, and concurrency without data races.
Recently the interest in concurrent programming has grown dramatically. Unfortunately, parallel programs do not always have reproducible behavior. Even when they are run with the same inputs, their results can be radically different. In this talk I’ll show how to debug concurrency programs in Go.
I’ll start from showing how you can debug your gorotines using delve and gdb debuggers. Then I’ll try to visualize goroutines using different scenarios, sometimes it helps to better understand how things work. Next part of the topic will be about dumping a goroutine stack trace of your application while it’s running and inspect what each goroutine is doing. And I’ll demonstrate how to debug leaking goroutines by tracing the process of how the scheduler runs goroutines on logical processors which are bound to a physical processor via the operating system thread that is attached.
As a bonus i’ll cover debugging tips on how to find deadlocks and how to avoid race conditions in your application.
Jserv gave a talk about the conceptual introduction to LLVM. The session mentioned the evolution of compiler technologies, paradigm shift, LLVM as a promising open source project, and how LLVM changes the IT world.
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
A basic Introduction to Rust. Rust is a modern system programming language which offering different approach than other existing new modern system programming languages to deal with: memory safety without GC, abstraction without overhead, and concurrency without data races.
Recently the interest in concurrent programming has grown dramatically. Unfortunately, parallel programs do not always have reproducible behavior. Even when they are run with the same inputs, their results can be radically different. In this talk I’ll show how to debug concurrency programs in Go.
I’ll start from showing how you can debug your gorotines using delve and gdb debuggers. Then I’ll try to visualize goroutines using different scenarios, sometimes it helps to better understand how things work. Next part of the topic will be about dumping a goroutine stack trace of your application while it’s running and inspect what each goroutine is doing. And I’ll demonstrate how to debug leaking goroutines by tracing the process of how the scheduler runs goroutines on logical processors which are bound to a physical processor via the operating system thread that is attached.
As a bonus i’ll cover debugging tips on how to find deadlocks and how to avoid race conditions in your application.
While CMake has become the de-facto standard buildsystem for C++, it's siblings CTest and CPack are less well known. This talk gives a lightspeed introduction into these three tools and then focuses on best practices on building, testing, and packaging.
BPF of Berkeley Packet Filter mechanism was first introduced in linux in 1997 in version 2.1.75. It has seen a number of extensions of the years. Recently in versions 3.15 - 3.19 it received a major overhaul which drastically expanded it's applicability. This talk will cover how the instruction set looks today and why. It's architecture, capabilities, interface, just-in-time compilers. We will also talk about how it's being used in different areas of the kernel like tracing and networking and future plans.
Vim is the most commonly used editor for traditional C/C++ developers working on Solaris/Linux platform till date. This is aimed at making a quick introduction to Vim editor, its configuration and a number of commands to fully unleash it's editing power.
eBPF is an exciting new technology that is poised to transform Linux performance engineering. eBPF enables users to dynamically and programatically trace any kernel or user space code path, safely and efficiently. However, understanding eBPF is not so simple. The goal of this talk is to give audiences a fundamental understanding of eBPF, how it interconnects existing Linux tracing technologies, and provides a powerful aplatform to solve any Linux performance problem.
go programming language basics
This presentation is a copy of one of the presentation in the slideshare
i just walk through the basic side of go programming language
its about a 45 mins presentation
more details about this language you get from golang.org refer this link
While CMake has become the de-facto standard buildsystem for C++, it's siblings CTest and CPack are less well known. This talk gives a lightspeed introduction into these three tools and then focuses on best practices on building, testing, and packaging.
BPF of Berkeley Packet Filter mechanism was first introduced in linux in 1997 in version 2.1.75. It has seen a number of extensions of the years. Recently in versions 3.15 - 3.19 it received a major overhaul which drastically expanded it's applicability. This talk will cover how the instruction set looks today and why. It's architecture, capabilities, interface, just-in-time compilers. We will also talk about how it's being used in different areas of the kernel like tracing and networking and future plans.
Vim is the most commonly used editor for traditional C/C++ developers working on Solaris/Linux platform till date. This is aimed at making a quick introduction to Vim editor, its configuration and a number of commands to fully unleash it's editing power.
eBPF is an exciting new technology that is poised to transform Linux performance engineering. eBPF enables users to dynamically and programatically trace any kernel or user space code path, safely and efficiently. However, understanding eBPF is not so simple. The goal of this talk is to give audiences a fundamental understanding of eBPF, how it interconnects existing Linux tracing technologies, and provides a powerful aplatform to solve any Linux performance problem.
go programming language basics
This presentation is a copy of one of the presentation in the slideshare
i just walk through the basic side of go programming language
its about a 45 mins presentation
more details about this language you get from golang.org refer this link
For the last few hack days, I've been developing a small clojurescript application using a stack that is fairly new to me: quiescent and figwheel. At the last hack day I finished the application and deployed it as a pure-ClojureScript application with no server-side Clojure code.
I'll demo my application, and talk about some of the things I learned in the process. We'll also live code a ClojureScript web application from scratch and deploy it using Amazon S3 static hosting in a matter of minutes.
VIDEO CAN BE VIEWED AT: https://www.youtube.com/watch?v=qpGmtaxKR70
Slide set from presentation at TEDx Event ("Inspiring Innovation")
hosted by University of Ludwigshafen, HSLU.
For Further Information / Additional Sources:
SYNAGIS:
https://www.synagis.com/
APPLE:
Steve Jobs introduces Original iPod - Apple Special Event (2001). https://www.youtube.com/watch?v=SYMTy6fchiQ
RED BULL:
http://energydrink-de.redbull.com/unternehmen
Keller, KL (2008). Red Bull: Building brand equity in non-traditional ways. In: Best Practice Cases in Branding - Lessons from the World's Strongest Brands. Pearson Prentice Hall.
PUSSANGA:
http://www.pussanga.com/
SRH UNIVERSITY:
http://www.hochschule-heidelberg.de/de/studium/nach-dem-core-prinzip-studieren/
https://www.youtube.com/watch?v=JcMUCnDfAXc
ALTERNATIVE TEACHING METHODS:
http://www.slideshare.net/welfordla/sm-love-story
https://www.youtube.com/watch?v=JcMUCnDfAXc
Social Media Changed Events Forever. Here is Proof!Julius Solaris
The book is out http//socialmediaforeventsebook.com - free to download.
This is a presentation from the upcoming book Social Media for Events. It presents the result of one of the most extensive research about the use of social media at events.
Talk for SCaLE13x. Video: https://www.youtube.com/watch?v=_Ik8oiQvWgo . Profiling can show what your Linux kernel and appliacations are doing in detail, across all software stack layers. This talk shows how we are using Linux perf_events (aka "perf") and flame graphs at Netflix to understand CPU usage in detail, to optimize our cloud usage, solve performance issues, and identify regressions. This will be more than just an intro: profiling difficult targets, including Java and Node.js, will be covered, which includes ways to resolve JITed symbols and broken stacks. Included are the easy examples, the hard, and the cutting edge.
Kibin is the newest and easiest way to get the things you write looked at by another set of eyes. Upload to Kibin and have another user leave edits and feedback on your writing in less than 24 hours!
Find out more at www.kibin.com or www.angel.co/kibin
Functional Programming Past Present FutureIndicThreads
Presented at the IndicThreads.com Software Development Conference 2016 held in Pune, India. More at http://www.IndicThreads.com and http://Pune16.IndicThreads.com
--
Loom & Functional Graphs in Clojure @ LambdaConf 2015Aysylu Greenberg
Graphs are ubiquitous data structures, and the algorithms for analyzing them are fascinating. Loom is an open-source Clojure library that provides many graph algorithms and visualizations. We will discuss how graphs are represented in a functional world, bridge the gap between procedural description of algorithms and their functional implementation, and learn about the way Loom integrates with other graph representations.
Watch video (in Hebrew): http://parleys.com/play/53f7a9cce4b06208c7b7ca1e
Type classes are a fundamental feature of Scala, which allows you to layer new functionality on top of existing types externally, i.e. without modifying or recompiling existing code. When combined with implicits, this is a truly remarkable tool that enables many of the advanced features offered by the Scala library ecosystem. In this talk we'll go back to basics: how type classes are defined and encoded, and cover several prominent use cases.
A talk given at the Underscore meetup on 19 August, 2014.
Evgeniy Muralev, Mark Vince, Working with the compiler, not against itSergey Platonov
The talk will look at limitations of compilers when creating fast code and how to make more effective use of both the underlying micro-architecture of modern CPU's and how algorithmic optimizations may have surprising effects on the generated code. We shall discuss several specific CPU architecture features and their pros and cons in relation to creating fast C++ code. We then expand with several algorithmic techniques, not usually well-documented, for making faster, compiler friendly, C++.
Note that we shall not discuss caching and related issues here as they are well documented elsewhere.
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.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
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
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
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/
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.
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
2. Why do we need the Y combinator?
For fundamental understanding of
recursion, we hope to create
recursive functions using the
lambda calculus:
x | t t | λx.t
3. Why not define or letrec?
(define length (letrec ([length
(lambda (ls) (lambda (ls)
(cond (cond
[(null? ls) 0] [(null? ls) 0]
[else (add1 (length (cdr ls)))]))) [else (add1 (length (cdr ls)))]))])
(length '(a b c)))
1. We don’t have define or letrec in lambda calculus
2. For fundamental understanding of recursion, we
want to see how define and letrec can be created
using just the three elements of lambda calculus:
x | t t | λx.t
3. You will see how this understanding can be useful
when constructing compilers
4. Plan
(define length
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (length (cdr ls)))])))
• We start by constructing a recursive definition of
“length” in a pure subset of Scheme
• Then extract a common pattern that can be
applied to recursive definitions in general
• This common pattern is the Y combinator
5. How do we do that?
• First, notice we can’t really define a recursive
function without binding it to a name
• Second, answer this question:
“Where can we bind something to a name?”
• The answer is: λx.t
• Lambda, the ultimate binder
6. Step 1: Binder
(define length
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (length (cdr ls)))])))
• Step1: create a lambda similar to this define
• This creates a binder where we can bind the function to
• Our goal: bind the function “length” to the name length
7. Step 1: Binder
(lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (length (cdr ls)))])))
• Step1: create a lambda similar to this define
• This creates a binder where we can bind the function to
• Our goal: bind the function “length” to the name length
8. Step 2: Copy
((lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (length (cdr ls)))])))
(lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (length (cdr ls)))]))))
• Make a copy of the function and apply itself
to the copy (self-application)
• This will successfully bind the name length
to the function “itself”
9. Step 3: Small fix
((lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))])))
(lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))]))))
The first argument to the application of
“length” should be itself
10. Step 4: Extract Patterns
((lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))])))
(lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))]))))
• This recursive function will work (try it!)
• This is called “poor man’s Y”
• Now we are going to extract the pattern
in there, so that the same pattern works
for any function.
11. Step 4: Extract Patterns
((lambda (length)
(lambda (ls)
(cond • But we can’t see the original
[(null? ls) 0] definition in there.
[else (add1 ((length length) (cdr ls)))]))) • We hope to see this, but the
(lambda (length) self-applications (length length)
(lambda (ls) bother us.
(cond • Hope we can get rid of them
[(null? ls) 0]
while preserving the semantics.
[else (add1 ((length length) (cdr ls)))]))))
• This recursive function will work (try it!)
• This is called “poor man’s Y” (lambda (length)
• Now we are going to extract the pattern (lambda (ls)
(cond
in there, so that the same pattern works [(null? ls) 0]
for any function. [else (add1 (length (cdr ls)))])))
12. Three Self-applications
((lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))])))
(lambda (length)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))]))))
Notice that this code has
three self-aplications, one
outer and two inner.
13. Abstract Outer Self-application
((lambda (length)
(lambda (ls)
(cond ((lambda (u) (u u))
[(null? ls) 0] (lambda (length)
[else (add1 ((length length) (cdr ls)))]))) (lambda (ls)
(lambda (length) (cond
(lambda (ls) [(null? ls) 0]
(cond [else (add1 ((length length) (cdr ls)))]))))
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))]))))
• First, let’s extract the pattern
which does the outer self-
application
• In compiler terms, this is called
“common subexpression
elimination”
14. Inner Self-application
((lambda (length)
(lambda (ls)
(cond ((lambda (u) (u u))
[(null? ls) 0] (lambda (length)
[else (add1 ((length length) (cdr ls)))]))) (lambda (ls)
(lambda (length) (cond
(lambda (ls) [(null? ls) 0]
(cond [else (add1 ((length length) (cdr ls)))]))))
[(null? ls) 0]
[else (add1 ((length length) (cdr ls)))]))))
Now we have only one self-
application left (why not two?)
15. Abstract Inner Self-application
((lambda (u) (u u))
((lambda (u) (u u)) (lambda (length)
(lambda (length) ((lambda (g)
(lambda (ls) (lambda (ls)
(cond (cond
[(null? ls) 0] [(null? ls) 0]
[else (add1 ((length length) (cdr ls)))])))) [else (add1 (g (cdr ls)))])))
(length length))))
We can now extract the inner
self-application • Done in a very similar way
as the outer one.
• We may call it “factor out”
16. Function is there!
((lambda (u) (u u))
((lambda (u) (u u)) (lambda (length)
(lambda (length) ((lambda (g)
(lambda (ls) (lambda (ls)
(cond (cond
[(null? ls) 0] [(null? ls) 0]
[else (add1 ((length length) (cdr ls)))])))) [else (add1 (g (cdr ls)))])))
(length length))))
• Notice that this part is exactly (define length
(lambda (ls)
the definition of “length” (cond
(modulo alpha-equivalence) [(null? ls) 0]
[else (add1 (length (cdr ls)))])))
• We are almost done!
17. Non-termination (CBV)
used to be here
((lambda (u) (u u))
(lambda (length)
((lambda (g)
(lambda (ls)
(cond
[(null? ls) 0]
[else (add1 (g (cdr ls)))])))
(length length))))
• But notice that (length length)
went outside of (lambda (ls) …)
• This will cause non-termination if
the language is call-by-value
(why?)
18. Eta-expansion
((lambda (u) (u u)) ((lambda (u) (u u))
(lambda (length) (lambda (length)
((lambda (g) ((lambda (g)
(lambda (ls) (lambda (ls)
(cond (cond
[(null? ls) 0] [(null? ls) 0]
[else (add1 (g (cdr ls)))]))) [else (add1 (g (cdr ls)))])))
(length length)))) (lambda (v) ((length length) v))))
• Eta-expand (length length) will
prevent the non-termination while
preserving the semantics
19. Abstract out the function
((lambda (f)
((lambda (u) (u u))
((lambda (u) (u u))
(lambda (length)
(lambda (length)
(f
((lambda (g)
(lambda (v) ((length length) v))))))
(lambda (ls)
(cond “length”
(lambda (g)
[(null? ls) 0]
(lambda (ls)
[else (add1 (g (cdr ls)))])))
(cond
(lambda (v) ((length length) v))))
[(null? ls) 0]
[else (add1 (g (cdr ls)))]))))
• Now we can factor out the
function “length”
• Notice that we can now
substitute f for any function
and get a recursive definition!
20. This is Y combinator!
Y combinator!
Y combinator
((lambda (f)
((lambda (u) (u u))
((lambda (u) (u u))
(lambda (length)
(lambda (length)
(f
((lambda (g)
(lambda (v) ((length length) v))))))
(lambda (ls)
(cond “length”
(lambda (g)
[(null? ls) 0]
(lambda (ls)
[else (add1 (g (cdr ls)))])))
(cond
(lambda (v) ((length length) v))))
[(null? ls) 0]
[else (add1 (g (cdr ls)))]))))
• Now we can factor out the
function “length”
• Notice that we can now
substitute f for any function
and get a recursive definition!
21. Renaming
(lambda (f) (lambda (f)
((lambda (u) (u u)) ((lambda (u) (u u))
(lambda (length) (lambda (x)
(f (f
(lambda (v) ((length length) v))))) (lambda (v) ((x x) v))))))
Does the name “length” matter • Obviously no!
here? • So we can rename it
22. Expanding
(lambda (f) (lambda (f)
((lambda (u) (u u)) ((lambda (x) (f (lambda (v) ((x x) v))))
(lambda (x) (f (lambda (v) ((x x) v)))))) (lambda (x) (f (lambda (v) ((x x) v))))))
Or, if you would like self-
application expanded out,
this is just another form
23. CBV and CBN
Y combinator (call-by-value)
(lambda (f)
((lambda (x) (f (lambda (v) ((x x) v))))
(lambda (x) (f (lambda (v) ((x x) v))))))
Y combinator (call-by-name)
Or, if the language is call-by- (lambda (f)
name, we get this instead ((lambda (x) (f (x x))))
(without eta-expansion) (lambda (x) (f (x x))))))