SlideShare a Scribd company logo
1 of 18
F# in the Classroom and the Lab Richard Minerich   Senior Researcher at Bayard Rock   and F# MVP
F# is Open Source You don’t need to buy  Visual Studio to use F# You don’t need to  have Windows to use F#
“Today’s students, from freshmen to seniors, desire relevant assignments that are engaging, challenging, and creative, that also prepare them for their careers.” - Game2Learn: Building CS1 Learning Games for Retention Tiffany Barnes et al.
Play in the Classroom Teach Play Discuss
Interactive Teaching Hot swap code to try different approaches and encourage coding as play/exploration
Simple Engaging APIs -> No complex background needed to start -> Powerful for building easy to use DSLs
Teaching with Games in F# The Students are Given: ,[object Object]
 A Simple API - A Simple Template Example - Time to play - Motivation via Competition
Ants Everywhere!
Ant Visible Cells Visible Cells Nest Cells Has Food? Properties? Properties? Are Full? Yes No Out of Ideas? No Nest  Cells? Food? Phero? Food but  no Phero? Nest  Cell? Take Food Move Toward Max Phero Drop Pheromones Move Toward Nest Yes No Move to a Random Cell Move to a  Random Nest Cell Drop Food
match ant with | HasFood-> matchvisibleCellswith       | HasUnownedFood cells when not here.HasPheromone->DropPheromone (here)       | AreNestnestCells-> matchnestCellswith             | CanDropdropCell->DropFooddropCell             | CantDrop-> Move (randomEmptyCellnestCells)       | AreNotNest cells -> Move (closestToHomevisibleCells) | HasNoFood-> matchvisibleCellswith       | HasUnownedFood cells ->TakeFood (maximizeFood cells)       | HasPheromones cells -> Move (maximizePhero cells)       | _ -> Move (randomEmptyCellvisibleCells)
A Framework for F# Assignments Obfuscated Library CI Server Student Assignment Template
Engaging Classwork Automated Grading Everyone  Wins
F# in the Lab Like Matlab but better in many ways.
Ranking a PEP List
Pain % Matlab function [varargout] = CalcPepIndex (A, E)         A=spconvert(A);     E=full(spconvert (E));     c=0;     d=0;     R=E;     while c < 1000         R1=.975*(A*R)+.025*E;         d=norm(R1-R,1);         c=c+1;         R=R1;     end varargout (0) = R; end function; Pleasure //F# let calcPepIndex (A: matrix)                                (E: Vector<_>) =     let rec calc R =         let R' = 0.975*(A*R) + 0.025*E         let d = Vector.norm(R' - R)         if d = 0.0 then R          else calc R'     calc E
F# vsMatlab Fast Specific General Purpose Tools Easy Deployment Integrates R&D Slow Imprecise Domain Specific Tools Painful Deployment Segregates R&D

More Related Content

Similar to F# in the Classroom and the Lab

Fp for the oo programmer
Fp for the oo programmerFp for the oo programmer
Fp for the oo programmerShawn Button
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJSFestUA
 
Basics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfBasics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfKrizanReyFamindalan
 
F# and functional programming
F# and functional programmingF# and functional programming
F# and functional programmingramikarjalainen
 
From Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant PlatformFrom Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant PlatformDaniel Kornev
 
The top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebasesThe top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebasesPhil Nash
 
Types are eating the world
Types are eating the worldTypes are eating the world
Types are eating the worldFangda Wang
 
24 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015Phillip Trelford
 
Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)Patricia Aas
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScriptTroy Miles
 
The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)Mike Friedman
 
Intro to Functional Programming
Intro to Functional ProgrammingIntro to Functional Programming
Intro to Functional ProgrammingJordan Parmer
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNManish Pandit
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersDiego Freniche Brito
 

Similar to F# in the Classroom and the Lab (20)

Fp for the oo programmer
Fp for the oo programmerFp for the oo programmer
Fp for the oo programmer
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
 
Basics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfBasics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdf
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 
Real World F# - SDD 2015
Real World F# -  SDD 2015Real World F# -  SDD 2015
Real World F# - SDD 2015
 
F# and functional programming
F# and functional programmingF# and functional programming
F# and functional programming
 
From Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant PlatformFrom Dream socialbot to Multiskill AI Assistant Platform
From Dream socialbot to Multiskill AI Assistant Platform
 
The top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebasesThe top 5 JavaScript issues in all our codebases
The top 5 JavaScript issues in all our codebases
 
Types are eating the world
Types are eating the worldTypes are eating the world
Types are eating the world
 
Theperlreview
TheperlreviewTheperlreview
Theperlreview
 
24 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015
 
Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)Trying to learn C# (NDC Oslo 2019)
Trying to learn C# (NDC Oslo 2019)
 
Language supports it
Language supports itLanguage supports it
Language supports it
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)The Perl API for the Mortally Terrified (beta)
The Perl API for the Mortally Terrified (beta)
 
Intro to Functional Programming
Intro to Functional ProgrammingIntro to Functional Programming
Intro to Functional Programming
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Functional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented ProgrammersFunctional Programming for Busy Object Oriented Programmers
Functional Programming for Busy Object Oriented Programmers
 
In Vogue Dynamic
In Vogue DynamicIn Vogue Dynamic
In Vogue Dynamic
 

More from Richard Minerich

How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...Richard Minerich
 
GHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtGHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtRichard Minerich
 
Functional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureFunctional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureRichard Minerich
 
Getting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsGetting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsRichard Minerich
 
How you can get started with F# today
How you can get started with F# todayHow you can get started with F# today
How you can get started with F# todayRichard Minerich
 

More from Richard Minerich (6)

How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...How we use functional programming to find the bad guys @ Build Stuff LT and U...
How we use functional programming to find the bad guys @ Build Stuff LT and U...
 
GHCi: More Awesome Than You Thought
GHCi: More Awesome Than You ThoughtGHCi: More Awesome Than You Thought
GHCi: More Awesome Than You Thought
 
Functional Ideas for a Cloudy Future
Functional Ideas for a Cloudy FutureFunctional Ideas for a Cloudy Future
Functional Ideas for a Cloudy Future
 
Fun and Games in F#
Fun and Games in F#Fun and Games in F#
Fun and Games in F#
 
Getting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n MonadsGetting the MVVM Kicked Out of Your F#'n Monads
Getting the MVVM Kicked Out of Your F#'n Monads
 
How you can get started with F# today
How you can get started with F# todayHow you can get started with F# today
How you can get started with F# today
 

Recently uploaded

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

F# in the Classroom and the Lab

  • 1. F# in the Classroom and the Lab Richard Minerich Senior Researcher at Bayard Rock and F# MVP
  • 2. F# is Open Source You don’t need to buy Visual Studio to use F# You don’t need to have Windows to use F#
  • 3.
  • 4. “Today’s students, from freshmen to seniors, desire relevant assignments that are engaging, challenging, and creative, that also prepare them for their careers.” - Game2Learn: Building CS1 Learning Games for Retention Tiffany Barnes et al.
  • 5. Play in the Classroom Teach Play Discuss
  • 6. Interactive Teaching Hot swap code to try different approaches and encourage coding as play/exploration
  • 7. Simple Engaging APIs -> No complex background needed to start -> Powerful for building easy to use DSLs
  • 8.
  • 9. A Simple API - A Simple Template Example - Time to play - Motivation via Competition
  • 11. Ant Visible Cells Visible Cells Nest Cells Has Food? Properties? Properties? Are Full? Yes No Out of Ideas? No Nest Cells? Food? Phero? Food but no Phero? Nest Cell? Take Food Move Toward Max Phero Drop Pheromones Move Toward Nest Yes No Move to a Random Cell Move to a Random Nest Cell Drop Food
  • 12. match ant with | HasFood-> matchvisibleCellswith | HasUnownedFood cells when not here.HasPheromone->DropPheromone (here) | AreNestnestCells-> matchnestCellswith | CanDropdropCell->DropFooddropCell | CantDrop-> Move (randomEmptyCellnestCells) | AreNotNest cells -> Move (closestToHomevisibleCells) | HasNoFood-> matchvisibleCellswith | HasUnownedFood cells ->TakeFood (maximizeFood cells) | HasPheromones cells -> Move (maximizePhero cells) | _ -> Move (randomEmptyCellvisibleCells)
  • 13. A Framework for F# Assignments Obfuscated Library CI Server Student Assignment Template
  • 14. Engaging Classwork Automated Grading Everyone Wins
  • 15. F# in the Lab Like Matlab but better in many ways.
  • 17. Pain % Matlab function [varargout] = CalcPepIndex (A, E) A=spconvert(A); E=full(spconvert (E)); c=0; d=0; R=E; while c < 1000 R1=.975*(A*R)+.025*E; d=norm(R1-R,1); c=c+1; R=R1; end varargout (0) = R; end function; Pleasure //F# let calcPepIndex (A: matrix) (E: Vector<_>) = let rec calc R = let R' = 0.975*(A*R) + 0.025*E let d = Vector.norm(R' - R) if d = 0.0 then R else calc R' calc E
  • 18. F# vsMatlab Fast Specific General Purpose Tools Easy Deployment Integrates R&D Slow Imprecise Domain Specific Tools Painful Deployment Segregates R&D
  • 19. Learning in F# Researching with F# Finding Opportunities with .NET