This document summarizes Lecture 1 of Real World Haskell. It introduces functional programming and Haskell, discusses the Haskell Platform and interactive interpreter ghci. It demonstrates defining simple functions and expressions, writing small interactive programs, and using recursion to number lines of text. Resources for learning more about Haskell are provided.
An overview of the programming techniques available and some of the ongoing research in the Haskell community around concurrent and parallel programming.
An overview of the programming techniques available and some of the ongoing research in the Haskell community around concurrent and parallel programming.
Slideshare hasn't imported my notes, so here's the link to the Google Presentation: https://goo.gl/Gl4Vhm
Haskell is a statically typed, non strict, pure functional programming language. It is often talked and blogged about, but rarely used commercially. This talk starts with a brief overview of the language, then explains how Haskell is evaluated and how it deals with non-determinism and side effects using only pure functions. The suitability of Haskell for real world data science is then discussed, along with some examples of its users, a small Haskell-powered visualization, and an overview of useful packages for data science. Finally, Accelerate is introduced, an embedded DSL for array computations on the GPU, and an ongoing attempt to use it as the basis for a deep learning package.
Scala 3 enum for a terser Option Monad Algebraic Data TypePhilip Schwarz
(download for flawless slides)
* Explore a terser definition of the Option Monad that uses a Scala 3 enum as an Algebraic Data Type.
* In the process, have a tiny bit of fun with Scala 3 enums.
* Get a refresher on the Functor and Monad laws.
* See how easy it is to use Scala 3 extension methods, e.g. to add convenience methods and infix operators.
The diagrams for function composition and Kleisli composition were made using https://q.uiver.app/ by https://twitter.com/varkora.
Source code: https://github.com/philipschwarz/scala-3-enum-for-terser-option-monad-algebraic-data-type
Errata:
slide 14 is an unwanted leftover - it is the same as slide 15 minus a diagram.
on slide 19, the colons in the extension method declarations are not needed
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit - Haskell and...Philip Schwarz
See how feeding FP workhorses map and filter with monadic steroids turns them into the intriguing mapM and filterM.
Graduate to foldM by learning how it behaves with the help of three simple yet instructive examples of its usage.
Use the powers of foldM to generate all permutations of a collection with a simple one-liner.
Exploit what you learned about foldM to solve the N-Queens Combinatorial Problem with an iterative approach rather than a recursive one.
The Functional Programming Triad of Map, Filter and FoldPhilip Schwarz
This slide deck is my homage to SICP, the book which first introduced me to the Functional Programming triad of map, filter and fold.
It was during my Computer Science degree that a fellow student gave me a copy of the first edition, not long after the book came out.
I have not yet come across a better introduction to these three functions.
The upcoming slides are closely based on the second edition of the book, a free online copy of which can be found here:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html.
Download for original image quality.
Errata:
slide 20: the Clojure map function is in fact the Scheme one repeated - see code below for correction.
Scheme code: https://github.com/philipschwarz/the-fp-triad-of-map-filter-and-fold-scheme
Clojure code: https://github.com/philipschwarz/the-fp-triad-of-map-filter-and-fold-clojure
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...Philip Schwarz
See how the guard function has migrated from MonadPlus to Alternative and learn something about the latter.
Learn how to write a Scala program that draws an N-Queens solution board using the Doodle graphics library.
See how to write the equivalent Haskell program using the Gloss graphics library.
Learn how to use Monoid and Foldable to compose images both in Haskell and in Scala.
Link to part 1: https://www.slideshare.net/pjschwarz/nqueens-combinatorial-problem-polyglot-fp-for-fun-and-profit-haskell-and-scala-part-1
Errata:
On slide 22, the last line of the showQueens function should of course be show(solution).draw(frame) rather than show(solution).draw
On slide 43, it would be better if the definitions of the beside, above and on Monoids were also shown.
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
This slide deck can work both as an aide mémoire (memory jogger), or as a first (not completely trivial) example of using left folds, left scans and iteration, to implement mathematical induction.
Errata: on almost half of the slides there is some minor typo or imperfection or in some cases a minor error and in one case, an omission. See a later version for corrections and some improvements.
(for best quality images, either download or view here: https://philipschwarz.dev/fpilluminated/?page_id=455)
Scala code for latest version: https://github.com/philipschwarz/fp-fold-scan-iterate-triad-a-first-example-scala
Function Applicative for Great Good of Palindrome Checker Function - Polyglot...Philip Schwarz
Embark on an informative and fun journey through everything you need to know to understand how the Applicative instance for functions makes for a terse palindrome checker function definition in point-free style.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2Philip Schwarz
(download for perfect quality) See aggregation functions defined inductively and implemented using recursion.
Learn how in many cases, tail-recursion and the accumulator trick can be used to avoid stack-overflow errors.
Watch as general aggregation is implemented and see duality theorems capturing the relationship between left folds and right folds.
Through the work of Sergei Winitzki and Richard Bird.
Presented online for C++ on Sea (2020-07-17)
Video at https://www.youtube.com/watch?v=Bai1DTcCHVE
Lambdas. All the cool kid languages have them. But does lambda mean what C++ and other languages, from Java to Python, mean by lambda? Where did lambdas come from? What were they originally for? What is their relationship to data abstraction?
In this session we will into the history, the syntax, the uses and abuses of lambdas and the way in which lambda constructs in C++ and other languages do (or do not) match the original construct introduced in lambda calculus.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...Philip Schwarz
(download for perfect quality) - See how recursive functions and structural induction relate to recursive datatypes.
Follow along as the fold abstraction is introduced and explained.
Watch as folding is used to simplify the definition of recursive functions over recursive datatypes
Part 1 - through the work of Richard Bird and Graham Hutton.
This version corrects the following issues:
slide 7, 11 fib(0) is 0,rather than 1
slide 23: was supposed to be followed by 2-3 slides recapitulating definitions of factorial and fibonacci with and without foldr, plus translation to scala
slide 36: concat not invoked in concat example
slides 48 and 49: unwanted 'm' in definition of sum
throughout: a couple of typographical errors
throughout: several aesthetic imperfections (wrong font, wrong font colour)
Big picture of category theory in scala with deep dive into contravariant and...Piotr Paradziński
A big picture of category theory in Scala - starting from regular functors with additional structure (Apply, Applicative, Monad) to Comonads. Usually, we think about structures like Monoids in a monoidal category with particular tensor. In here I analyze just signatures of different abstractions.
Exploration of Contravariant functors as a way to model computation "backward" or abstract over input with the ability to prepend operation. Examples for predicates, sorting, show and function input (or any other function parameter except the last one).
Profunctors as abstraction unifying Functors and Contravariant functors to model both input and output. Example for Profunctor - function with one argument.
Relation to Bifunctors, Kan extensions, Adjunctions, and Free constructions.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 5Philip Schwarz
(download for best quality slides) Gain a deeper understanding of why right folds over very large and infinite lists are sometimes possible in Haskell.
See how lazy evaluation and function strictness affect left and right folds in Haskell.
Learn when an ordinary left fold results in a space leak and how to avoid it using a strict left fold.
Errata:
slide 15: "as sharing is required" should be "as sharing is not required"
slide 43: 𝑠𝑓𝑜𝑙𝑑𝑙 (⊕) 𝑎 should be 𝑠𝑓𝑜𝑙𝑑𝑙 (⊕) 𝑒
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part ...Philip Schwarz
(download for flawless image quality) Can a left fold ever work over an infinite list? What about a right fold? Find out.
Learn about the other two functions used by functional programmers to implement mathematical induction: iterating and scanning.
Learn about the limitations of the accumulator technique and about tupling, a technique that is the dual of the accumulator trick.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 4Philip Schwarz
(download for flawless image quality) Can a left fold ever work over an infinite list? What about a right fold? Find out.
Learn about the other two functions used by functional programmers to implement mathematical induction: iterating and scanning.
Learn about the limitations of the accumulator technique and about tupling, a technique that is the dual of the accumulator trick.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part ...Philip Schwarz
(download for best quality slides) Gain a deeper understanding of why right folds over very large and infinite lists are sometimes possible in Haskell.
See how lazy evaluation and function strictness affect left and right folds in Haskell.
Learn when an ordinary left fold results in a space leak and how to avoid it using a strict left fold.
This version eliminates some minor imperfections and corrects the following two errors:
slide 15: "as sharing is required" should be "as sharing is not required"
slide 43: 푠푓표푙푑푙 (⊕) 푎 should be 푠푓표푙푑푙 (⊕) 푒
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
This slide deck can work both as an aide mémoire (memory jogger), or as a first (not completely trivial) example of using left folds, left scans and iteration, to implement mathematical induction.
This is just an updated version of the original slide deck which makes minor improvements and minor corrections in almost half of the slides.
(for best quality images, either download or view here: https://philipschwarz.dev/fpilluminated/?page_id=455)
You can see the Scala code here: https://github.com/philipschwarz/fp-fold-scan-iterate-triad-a-first-example-scala
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Philip Schwarz
Quicksort - a whistle-stop tour of the algorithm in five languages and four paradigms.
Programming Paradigms: Functional, Logic, Imperative, Imperative Functional
Languages: Haskell, Scala, Java, Clojure, Prolog
Slideshare hasn't imported my notes, so here's the link to the Google Presentation: https://goo.gl/Gl4Vhm
Haskell is a statically typed, non strict, pure functional programming language. It is often talked and blogged about, but rarely used commercially. This talk starts with a brief overview of the language, then explains how Haskell is evaluated and how it deals with non-determinism and side effects using only pure functions. The suitability of Haskell for real world data science is then discussed, along with some examples of its users, a small Haskell-powered visualization, and an overview of useful packages for data science. Finally, Accelerate is introduced, an embedded DSL for array computations on the GPU, and an ongoing attempt to use it as the basis for a deep learning package.
Scala 3 enum for a terser Option Monad Algebraic Data TypePhilip Schwarz
(download for flawless slides)
* Explore a terser definition of the Option Monad that uses a Scala 3 enum as an Algebraic Data Type.
* In the process, have a tiny bit of fun with Scala 3 enums.
* Get a refresher on the Functor and Monad laws.
* See how easy it is to use Scala 3 extension methods, e.g. to add convenience methods and infix operators.
The diagrams for function composition and Kleisli composition were made using https://q.uiver.app/ by https://twitter.com/varkora.
Source code: https://github.com/philipschwarz/scala-3-enum-for-terser-option-monad-algebraic-data-type
Errata:
slide 14 is an unwanted leftover - it is the same as slide 15 minus a diagram.
on slide 19, the colons in the extension method declarations are not needed
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit - Haskell and...Philip Schwarz
See how feeding FP workhorses map and filter with monadic steroids turns them into the intriguing mapM and filterM.
Graduate to foldM by learning how it behaves with the help of three simple yet instructive examples of its usage.
Use the powers of foldM to generate all permutations of a collection with a simple one-liner.
Exploit what you learned about foldM to solve the N-Queens Combinatorial Problem with an iterative approach rather than a recursive one.
The Functional Programming Triad of Map, Filter and FoldPhilip Schwarz
This slide deck is my homage to SICP, the book which first introduced me to the Functional Programming triad of map, filter and fold.
It was during my Computer Science degree that a fellow student gave me a copy of the first edition, not long after the book came out.
I have not yet come across a better introduction to these three functions.
The upcoming slides are closely based on the second edition of the book, a free online copy of which can be found here:
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html.
Download for original image quality.
Errata:
slide 20: the Clojure map function is in fact the Scheme one repeated - see code below for correction.
Scheme code: https://github.com/philipschwarz/the-fp-triad-of-map-filter-and-fold-scheme
Clojure code: https://github.com/philipschwarz/the-fp-triad-of-map-filter-and-fold-clojure
N-Queens Combinatorial Problem - Polyglot FP for Fun and Profit – Haskell and...Philip Schwarz
See how the guard function has migrated from MonadPlus to Alternative and learn something about the latter.
Learn how to write a Scala program that draws an N-Queens solution board using the Doodle graphics library.
See how to write the equivalent Haskell program using the Gloss graphics library.
Learn how to use Monoid and Foldable to compose images both in Haskell and in Scala.
Link to part 1: https://www.slideshare.net/pjschwarz/nqueens-combinatorial-problem-polyglot-fp-for-fun-and-profit-haskell-and-scala-part-1
Errata:
On slide 22, the last line of the showQueens function should of course be show(solution).draw(frame) rather than show(solution).draw
On slide 43, it would be better if the definitions of the beside, above and on Monoids were also shown.
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
This slide deck can work both as an aide mémoire (memory jogger), or as a first (not completely trivial) example of using left folds, left scans and iteration, to implement mathematical induction.
Errata: on almost half of the slides there is some minor typo or imperfection or in some cases a minor error and in one case, an omission. See a later version for corrections and some improvements.
(for best quality images, either download or view here: https://philipschwarz.dev/fpilluminated/?page_id=455)
Scala code for latest version: https://github.com/philipschwarz/fp-fold-scan-iterate-triad-a-first-example-scala
Function Applicative for Great Good of Palindrome Checker Function - Polyglot...Philip Schwarz
Embark on an informative and fun journey through everything you need to know to understand how the Applicative instance for functions makes for a terse palindrome checker function definition in point-free style.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 2Philip Schwarz
(download for perfect quality) See aggregation functions defined inductively and implemented using recursion.
Learn how in many cases, tail-recursion and the accumulator trick can be used to avoid stack-overflow errors.
Watch as general aggregation is implemented and see duality theorems capturing the relationship between left folds and right folds.
Through the work of Sergei Winitzki and Richard Bird.
Presented online for C++ on Sea (2020-07-17)
Video at https://www.youtube.com/watch?v=Bai1DTcCHVE
Lambdas. All the cool kid languages have them. But does lambda mean what C++ and other languages, from Java to Python, mean by lambda? Where did lambdas come from? What were they originally for? What is their relationship to data abstraction?
In this session we will into the history, the syntax, the uses and abuses of lambdas and the way in which lambda constructs in C++ and other languages do (or do not) match the original construct introduced in lambda calculus.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - with ...Philip Schwarz
(download for perfect quality) - See how recursive functions and structural induction relate to recursive datatypes.
Follow along as the fold abstraction is introduced and explained.
Watch as folding is used to simplify the definition of recursive functions over recursive datatypes
Part 1 - through the work of Richard Bird and Graham Hutton.
This version corrects the following issues:
slide 7, 11 fib(0) is 0,rather than 1
slide 23: was supposed to be followed by 2-3 slides recapitulating definitions of factorial and fibonacci with and without foldr, plus translation to scala
slide 36: concat not invoked in concat example
slides 48 and 49: unwanted 'm' in definition of sum
throughout: a couple of typographical errors
throughout: several aesthetic imperfections (wrong font, wrong font colour)
Big picture of category theory in scala with deep dive into contravariant and...Piotr Paradziński
A big picture of category theory in Scala - starting from regular functors with additional structure (Apply, Applicative, Monad) to Comonads. Usually, we think about structures like Monoids in a monoidal category with particular tensor. In here I analyze just signatures of different abstractions.
Exploration of Contravariant functors as a way to model computation "backward" or abstract over input with the ability to prepend operation. Examples for predicates, sorting, show and function input (or any other function parameter except the last one).
Profunctors as abstraction unifying Functors and Contravariant functors to model both input and output. Example for Profunctor - function with one argument.
Relation to Bifunctors, Kan extensions, Adjunctions, and Free constructions.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 5Philip Schwarz
(download for best quality slides) Gain a deeper understanding of why right folds over very large and infinite lists are sometimes possible in Haskell.
See how lazy evaluation and function strictness affect left and right folds in Haskell.
Learn when an ordinary left fold results in a space leak and how to avoid it using a strict left fold.
Errata:
slide 15: "as sharing is required" should be "as sharing is not required"
slide 43: 𝑠𝑓𝑜𝑙𝑑𝑙 (⊕) 𝑎 should be 𝑠𝑓𝑜𝑙𝑑𝑙 (⊕) 𝑒
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part ...Philip Schwarz
(download for flawless image quality) Can a left fold ever work over an infinite list? What about a right fold? Find out.
Learn about the other two functions used by functional programmers to implement mathematical induction: iterating and scanning.
Learn about the limitations of the accumulator technique and about tupling, a technique that is the dual of the accumulator trick.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part 4Philip Schwarz
(download for flawless image quality) Can a left fold ever work over an infinite list? What about a right fold? Find out.
Learn about the other two functions used by functional programmers to implement mathematical induction: iterating and scanning.
Learn about the limitations of the accumulator technique and about tupling, a technique that is the dual of the accumulator trick.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala - Part ...Philip Schwarz
(download for best quality slides) Gain a deeper understanding of why right folds over very large and infinite lists are sometimes possible in Haskell.
See how lazy evaluation and function strictness affect left and right folds in Haskell.
Learn when an ordinary left fold results in a space leak and how to avoid it using a strict left fold.
This version eliminates some minor imperfections and corrects the following two errors:
slide 15: "as sharing is required" should be "as sharing is not required"
slide 43: 푠푓표푙푑푙 (⊕) 푎 should be 푠푓표푙푑푙 (⊕) 푒
The Functional Programming Triad of Folding, Scanning and Iteration - a first...Philip Schwarz
This slide deck can work both as an aide mémoire (memory jogger), or as a first (not completely trivial) example of using left folds, left scans and iteration, to implement mathematical induction.
This is just an updated version of the original slide deck which makes minor improvements and minor corrections in almost half of the slides.
(for best quality images, either download or view here: https://philipschwarz.dev/fpilluminated/?page_id=455)
You can see the Scala code here: https://github.com/philipschwarz/fp-fold-scan-iterate-triad-a-first-example-scala
Quicksort - a whistle-stop tour of the algorithm in five languages and four p...Philip Schwarz
Quicksort - a whistle-stop tour of the algorithm in five languages and four paradigms.
Programming Paradigms: Functional, Logic, Imperative, Imperative Functional
Languages: Haskell, Scala, Java, Clojure, Prolog
A short talk on what makes Functional Programming - and especially Haskell - different.
We'll take a quick overview of Haskell's features and coding style, and then work through a short but complete example of using it for a Real World problem.
http://lanyrd.com/2011/geekup-liverpool-may/sdykh/
Go Beyond Higher Order Functions: A Journey into Functional ProgrammingLex Sheehan
Here's an introduction to folks using FP in various programming languages (especially those with built-in support for first class functions).
Join Lex Shehan as he shares his journey into FP as a retrospective; it should be great introduction to folks to using FP in other languages (especially those with built-in support for first class functions).
Our journey will include:
* high order functions in javascript (lodash)
* functional programming in Ruby
* going deeper in FP with Scala
* learning Haskell to gain a broader understanding of FP
* the history of FP and what Category Theory has to do with FP
* challenges & opportunities of incorporating FP techniques in Go
This talk discusses ways to keep work playful (and as a side effect do better work), including:
* Dealing with crusty data formats and protocols in a lighthearted way
* Scripting other people’s software (whether they know it or not)
* Sharing your code with co-workers without annoying them
* Deploying your programs to honest-to-goodness paying customers
This talk is about the world's most popular programming language... Java? Python? COBOL?
No... Excel!
Excel somehow hits the sweet spot between being powerful enough to run entire domains like finance and insurance, but also easy enough to attract a huge audience. Why is that?
In this talk we'll explore some of the mechanisms that make spreadsheets so powerful, while implementing a few interesting mathematical problems in spreadsheets. While doing that, you might learn some (functional) programming concepts too, as we'll talk about sorting, dynamic programming and lambdas.
Folding Unfolded - Polyglot FP for Fun and Profit - Haskell and Scala Part 2 ...Philip Schwarz
(download for perfect quality) See aggregation functions defined inductively and implemented using recursion.
Learn how in many cases, tail-recursion and the accumulator trick can be used to avoid stack-overflow errors.
Watch as general aggregation is implemented and see duality theorems capturing the relationship between left folds and right folds.
Through the work of Sergei Winitzki and Richard Bird.
This version corrects the following issues:
slide 32: = reverse --> reverse =
Slide 33: 100_000 -> 1_000_000
It also adds slides 36, 37 and 38
ScalaDays 2013 Keynote Speech by Martin OderskyTypesafe
Scala gives you awesome expressive power, but how to make best use of it? In my talk I will discuss the question what makes good Scala style. We will start with syntax and continue with how to name things, how to mix objects and functions, where (and where not) to use mutable state, and when to use which design pattern. As most questions of style, the discussion will be quite subjective, and some of it might be controversial. I am looking forward to discuss these topics with the conference attendees.
I am Cecily K. I am a Python Assignment Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming from, University of Chicago, USA. I have been helping students with their homework for the past 10 years. I solve assignments related to Python Programming.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Python Programming Assignments.
LESSON 3B. FOCUS: FOR LOOPS, NESTED LOOPS, TASKS AND CHALLENGES.
Introduction to, with examples, For loops. Challenges and tasks included with solutions (predict the output). Compare ‘while’ and ‘for’ loops. Use the break statement and explore how it works in different scenarios. Learn about Nested Loops. Learn about the need for initialisation (set starting value). Create your own for loops. Create the beginnings of an arithmetic quiz using a random function and for loops. Big ideas discussion: Is the universe digital. A program? Introducing Gottfried Leibniz and Konrad Zuse. Includes a suggested videos, ‘Big ideas’ discussion, and HW/research projects section.
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.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
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.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
2. Welcome!
A few things to mull over:
Our pace will be fairly rapid.
Stop me and ask questions—early and often.
I assume no prior Haskell or functional programming exposure.
3. What’s software, doc?
What does a program do?
It consumes old data.
It computes over the old data.
It produces new data.
4. A familiar program
Consider the Unix sort command:
Consumes (possibly unsorted) lines of text.
Sorts the lines.
Produces sorted lines of text.
5. Have you ever run sort?
If so, you’re already a functional programmer.
6. What’s functional programming?
Definition
Functional programming is a style of programming that emphasizes
functions and function application.
7. What’s a function?
Definition
A function inspects its input, and produces an output.
Definition
Function application involves supplying a function with one or
more arguments (inputs).
9. So what?
I can already write code that inspects inputs and produces outputs
in C, Python, or whatever.
So what’s different about functional programming (FP)?
We only inspect inputs; we don’t change them.
In fact, we generally don’t change any data.
10. What’s interesting about functional programming?
I’ll tell you what got me hooked:
It requires a substantially different way of thinking about
programming.
In exchange for the challenge, it offers great expressiveness
and conciseness.
It is beautiful.
11. Why Haskell?
Why choose Haskell over Erlang, Clojure, F#, OCaml, . . . ?
It is the most radical of the practical functional languages.
It will force you to learn many new things at once,
and to unlearn things that perhaps you thought you knew.
12. Getting started with Haskell
We’ll be using the Haskell Platform:
http://hackage.haskell.org/platform/
What is this Platform, anyway?
A modern, optimising compiler (ghc)
An interactive interpreter (ghci)
Useful standard libraries
An awesome package manager (cabal)
13. Starting with interaction
The interactive interpreter for the Haskell Platform is named ghci
(for “GHC interactive”). When you run it, you’ll see something like
this:
GHCi, version 6.10.3: http://www.haskell.org/ghc/
:? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude>
That “Prelude>” is the prompt.
14. Really simple stuff
What happens when you enter these expressions at the ghci
prompt?
2+2
putStrLn ”hi mom!”
”foo” ++ ”bar”
:quit
15. Handy things to know
You should be able to use your arrow keys to edit your ghci
input.
Up and down arrows should go through your input history.
Tab should complete names: try typing put<TAB>.
16. Haskell source files
The standard Haskell source file extension is “.hs”.
By convention, files use InterCapsNaming.
Save the following in a file named Hello.hs:
main = putStrLn ” h e l l o , w o r l d ! ”
17. Run your program immediately
We can run our new program straight away, via the runghc
batch interpreter:
$ runghc Hello.hs
hello, world!
18. Compilation
We can also compile our new program to a native executable:
$ ghc --make Hello
[1 of 1] Compiling Main ( Hello.hs, Hello.o )
Linking Hello ...
(GHC’s “--make” option is super-useful!)
We can run our new program in the usual way:
$ ./Hello
hello, world!
19. Operators and things
Haskell’s rules for writing expressions with operators should look
familiar.
b ˆ2 − 4∗ a ∗ c
The ˆ operator is (integral) exponentiation.
Expressions group as you might expect, i.e. (bˆ2) − (4∗a∗c).
Confused about operator precedence? Parens are your friend!
20. What about functions?
To apply a function to some arguments, we simply write it next to
its arguments.
length ” hello ”
Function application binds tighter than operations, so if you write
this:
sqrt 2 − 3
What you’ll get is this:
(sqrt 2) − 3
If you mean something else, tell the compiler!
sqrt (2 − 3)
21. A more complex expression
Look familiar?
(−b + sqrt (bˆ2 ∗ 4∗a∗c)) / (2∗a)
(It’s part of the solution to a quadratic equation.)
22. Expressions are all very well
But we need a bit more to do anything useful.
We have to be able to give things names.
To define something, we supply a name, an equals sign, and an
expression.
e = 2.718281828459045
23. A more useful definition
When we supply more than one name before the equals sign, the
remainder are the arguments to a function.
oneRoot a b c = (−b + ( b ˆ2 + 4∗ a ∗ c ) ) / ( 2 ∗ a )
We’ve now defined a function named oneRoot, with three
arguments.
Try saving this definition into a source file, then load it into
ghci and use it.
What’s the result of this expression in ghci?
oneRoot 2 3 4
24. Your turn!
I’m going to open up an Emacs window.
Tell me how to write a function that computes the mean of
three numbers.
25. Speaking of Emacs
What are the best tools for working with Haskell source code?
Emacs
vim
Google for “emacs haskell mode” or “vim haskell mode” for details.
Do you prefer IDEs?
At least for now, you’ve come to the wrong language. Back to
Visual Studio with you!
Less flippant answer: there are no mature Haskell IDEs yet.
26. Of source files and editors
Haskellers hate tab characters! (For the same reason Python
programmers do: they’re unportable.)
A decent Haskell mode for a good editor will give you some useful
features:
Syntax highlighting.
Intelligent indentation.
Compilation and jump-to-error support.
No tabs!
Maybe interaction with ghci.
27. A very tiny, marginally useful program
wordCount x s = show ( l e n g t h ( words x s ) ) ++ ”n”
main = i n t e r a c t wordCount
What’s going on here?
The words function breaks up a text string into a list of words.
The length function. . . well, you can guess.
The show function takes something (in this case, a number)
and represents it as a string.
The ++ operator means “append.”
28. Oh, and then there’s interact
The interact function is your gateway to Unix shell pipeline bliss.
It:
reads from standard input;
feeds it to your function as a string;
consumes the string that your function produces; and
prints it to standard output.
29. Another very tiny program
I need your help!
Who can suggest what’s going on here?
import Data . L i s t ( s o r t )
s o r t L i n e s xs = unlines ( sort ( l i n e s xs ))
main = i n t e r a c t s o r t L i n e s
30. Figuring stuff out
When you’re in exploratory mode (i.e. most of the time, at least
for me), ghci is your friend.
Wonder what lines does? Simply try it, and find out!
Prelude> lines "foonbarnquuxn"
["foo","bar","quux"]
What else did we find out here?
31. Lists
The syntactic sugar for a list of items is square brackets
surrounding items, which are separated by commas:
[4 ,8 ,15 ,16 ,23 ,42]
[ True , F a l s e ]
[ ” L i n d e n ” , ” Lab ” ]
Let’s try some experiments with lists.
Can we write this? [7, True]
What about this? [[1,2],[3,4]]
33. Another small program
Let’s develop something! Another Unix-like command!
We’ll write a program that prefixes each line of input with a line
number.
Okay. . . so now what?
34. When in doubt
If I don’t know how to solve a problem, I like to start by seeing if
there are bits of it I know how to solve.
What do we already know about?
Defining new functions!
And, of course, using existing functions!
We have a small library of built-in functions and operators,
e.g. show, unlines, and ++.
35. The small problem
Given one number and one line of text, how should we render
them?
36. The small problem
Given one number and one line of text, how should we render
them?
oneNumber n s = show n ++ ” : ” ++ s
37. The small problem
Given one number and one line of text, how should we render
them?
oneNumber n s = show n ++ ” : ” ++ s
Let’s try this function in ghci:
Prelude> oneNumber 3 "blargh"
"3: blargh"
38. Powering up
That’s a good start. But now what?
We need to produce a whole series of lines with numbers.
39. Powering up
That’s a good start. But now what?
We need to produce a whole series of lines with numbers.
lineNumbers n xs =
i f x s == [ ]
then []
else oneNumber n ( head x s )
: l i n e N u m b e r s ( n+1) ( t a i l x s )
40. Powering up
That’s a good start. But now what?
We need to produce a whole series of lines with numbers.
lineNumbers n xs =
i f x s == [ ]
then []
else oneNumber n ( head x s )
: l i n e N u m b e r s ( n+1) ( t a i l x s )
Hey! See that little lonely “:”? It’s a list constructor (like cons in
Lisp or Scheme).
41. The quantum leap
Wow, we just did something interesting:
We wrote a recursive function.
Not bad for the first lecture!
42. The quantum leap
Wow, we just did something interesting:
We wrote a recursive function.
Not bad for the first lecture!
We still lack a little glue to create a complete program.
43. The quantum leap
Wow, we just did something interesting:
We wrote a recursive function.
Not bad for the first lecture!
We still lack a little glue to create a complete program.
b u n c h i e x s = unwords ( l i n e N u m b e r s 1 ( l i n e s x s ) )
main = i n t e r a c t b u n c h i e
44. Accompanying materials
Where should you be going to learn more?
http://book.realworldhaskell.org/
http://learnyouahaskell.com/
http://haskell.org/
http://slideshare.net/bos31337
#haskell on irc.freenode.net (I’m bos)
45. Accompanying materials
Where should you be going to learn more?
http://book.realworldhaskell.org/
http://learnyouahaskell.com/
http://haskell.org/
http://slideshare.net/bos31337
#haskell on irc.freenode.net (I’m bos)
Source code for these slides and examples:
darcs get http://darcs.serpentine.com/rwh-course
46. Recap
What have we covered today?
What functional programming is. A tiny bit about Haskell.
The Haskell Platform, and why it matters.
Writing expressions, and defining functions.
Simple interactive Unix-like commands.
47. Recap
What have we covered today?
What functional programming is. A tiny bit about Haskell.
The Haskell Platform, and why it matters.
Writing expressions, and defining functions.
Simple interactive Unix-like commands.
There will be homework. Assignments will go out later today to
the haskell mailing list.
48. Recap
What have we covered today?
What functional programming is. A tiny bit about Haskell.
The Haskell Platform, and why it matters.
Writing expressions, and defining functions.
Simple interactive Unix-like commands.
There will be homework. Assignments will go out later today to
the haskell mailing list.
Thanks! Questions?