This talk discusses abstract syntax trees, parsing, domain specific languages, interpreters, and code generation. It provides examples of turtle and Small Basic languages and their corresponding abstract syntax trees. It also discusses different approaches to language design and lists resources for learning more about functional programming languages like F# through books, websites, and Koans exercises.
This document discusses functional programming in Python. It begins by defining functional programming and some of its key concepts like immutable data, functions as first-class citizens, and recursion. It then shows how Python supports functional programming with features like first-class functions, lambda expressions, and built-in functions like map, filter and reduce. Finally, it discusses other functional programming techniques in Python like partial function application, currying, and tail call optimization, while noting some of Python's limitations for functional programming like its non-pure nature and lack of pattern matching.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
This document discusses Python control flow statements and built-in constants. It covers truth value testing in Python, including objects considered False. It also covers if/elif/else statements, for loops, while loops, and the break, continue, and pass statements. The range function is described for generating numeric sequences, and the zip function is shown pairing multiple iterables. Built-in constants like True, False, and None are also summarized.
The document discusses functions in C++. It defines a function as a block of code that performs a specific task. There are two types of functions: built-in functions provided by the language and user-defined functions created by the programmer. The components of a function include the function header, body, parameters, return type, local variables, and return statement. Functions can pass arguments either by value or by reference. The document provides examples of built-in and user-defined functions as well as examples demonstrating call by value and call by reference.
The document introduces building a parser in PHP by explaining reasons for common fears around parsing, showing examples of language grammars like BNF and EBNF, and demonstrating how to generate a parser in PHP using PEG parsing expressions to parse a sample query language across multiple versions, with the potential to optimize parsed queries.
The document provides an overview of a hands-on workshop on the Python programming language conducted by Abdul Haseeb for a faculty development program. The workshop covers the basics of Python including its history, design philosophy, why it is popular, how to get started with the Python IDE, basic data types, variables, operators, input/output functions, and differences between Python versions 2 and 3. Examples are provided to demonstrate various Python concepts like strings, integers, floats, lists, tuples, dictionaries, functions to convert between types, and string operations. Comparisons between Python and C/C++ highlight differences in syntax, commenting, error handling and code readability.
This talk discusses abstract syntax trees, parsing, domain specific languages, interpreters, and code generation. It provides examples of turtle and Small Basic languages and their corresponding abstract syntax trees. It also discusses different approaches to language design and lists resources for learning more about functional programming languages like F# through books, websites, and Koans exercises.
This document discusses functional programming in Python. It begins by defining functional programming and some of its key concepts like immutable data, functions as first-class citizens, and recursion. It then shows how Python supports functional programming with features like first-class functions, lambda expressions, and built-in functions like map, filter and reduce. Finally, it discusses other functional programming techniques in Python like partial function application, currying, and tail call optimization, while noting some of Python's limitations for functional programming like its non-pure nature and lack of pattern matching.
(video of these slides available here http://fsharpforfunandprofit.com/fppatterns/)
In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID.
The functional programming community has design patterns and principles as well.
This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.
Using functional concepts in Python. Introduction to functional programming and exploring each of the concepts, like map, filter and reduce in detail and how functional programming can help creating massively parallel software systems
This document discusses Python control flow statements and built-in constants. It covers truth value testing in Python, including objects considered False. It also covers if/elif/else statements, for loops, while loops, and the break, continue, and pass statements. The range function is described for generating numeric sequences, and the zip function is shown pairing multiple iterables. Built-in constants like True, False, and None are also summarized.
The document discusses functions in C++. It defines a function as a block of code that performs a specific task. There are two types of functions: built-in functions provided by the language and user-defined functions created by the programmer. The components of a function include the function header, body, parameters, return type, local variables, and return statement. Functions can pass arguments either by value or by reference. The document provides examples of built-in and user-defined functions as well as examples demonstrating call by value and call by reference.
The document introduces building a parser in PHP by explaining reasons for common fears around parsing, showing examples of language grammars like BNF and EBNF, and demonstrating how to generate a parser in PHP using PEG parsing expressions to parse a sample query language across multiple versions, with the potential to optimize parsed queries.
The document provides an overview of a hands-on workshop on the Python programming language conducted by Abdul Haseeb for a faculty development program. The workshop covers the basics of Python including its history, design philosophy, why it is popular, how to get started with the Python IDE, basic data types, variables, operators, input/output functions, and differences between Python versions 2 and 3. Examples are provided to demonstrate various Python concepts like strings, integers, floats, lists, tuples, dictionaries, functions to convert between types, and string operations. Comparisons between Python and C/C++ highlight differences in syntax, commenting, error handling and code readability.
Learn c++ (functions) with nauman ur rehmanNauman Rehman
The document discusses functions in C++. It defines a function as a group of statements that perform a task and can take input arguments and return an output value. Functions make the code more organized and reusable. The document covers function prototypes, definitions, calls, passing arguments by value and by reference, pointer functions, and array functions. It provides examples of different types of functions.
Video and more content at fsharpforfunandprofit.com/pbt
"The lazy programmer's guide to writing 1000's of tests: An introduction to property based testing"
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
This document summarizes new features in Swift 2 including guard/defer statements for flow control, protocol extensions for default implementations, and error handling improvements like throwing and catching errors. It also mentions Swift becoming open source with its source code released under a permissive license and contributions accepted from the community, including ports for Linux. Nest is provided as an example open source Swift web framework project on GitHub.
Pointer variables store memory addresses and can be used to indirectly access other variables. Pointers allow values to be passed by reference into functions rather than by value. Arrays can be accessed using pointers by treating the array name as a pointer to its first element. Dynamic memory allocation with new/delete operators allows pointers to reference variables in heap memory.
The document discusses loop control structures in C++. It explains the for, while, and do-while loops and provides examples. It also covers break, continue, return, and goto statements used to control program flow in loops.
Swift is a multi-paradigm programming language developed by Apple for iOS, macOS, watchOS, and tvOS. It was inspired by Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and other languages. The document discusses Swift's history, principles, syntax including variables, constants, data types, functions, closures, and control structures. It provides code examples and explanations of Swift's main features.
Let's make a contract: the art of designing a Java APIMario Fusco
The document discusses best practices for designing Java APIs. It emphasizes making APIs intuitive, consistent, discoverable and easy to use. Some specific tips include using static factories to create objects, promoting fluent interfaces, using the weakest possible types, supporting lambdas, avoiding checked exceptions and properly managing resources using try-with-resources. The goal is to design APIs that are flexible, evolvable and minimize surprises for developers.
This document discusses functional programming (FP) and its benefits compared to object-oriented programming (OOP). It defines FP as programming with pure functions that have no side effects. The document explores eliminating side effects through techniques like separating function concerns and returning descriptions of side effects rather than executing them. It also covers FP concepts like higher order functions, recursion, and data types like Option for handling errors/exceptions. The goal is to introduce FP techniques and when each paradigm (FP vs OOP) is best suited.
An Overview Of Python With Functional ProgrammingAdam Getchell
This document provides an overview of the Python programming language and its capabilities for functional programming. It describes Python's attributes such as being portable, object-oriented, and supporting procedural, object-oriented, and functional programming. It also lists several popular Python modules that provide additional functionality and examples of code written in both a procedural and object-oriented style in Python. Finally, it provides examples of functional programming concepts like map, filter and reduce implemented in Python along with references for further information.
The document discusses functional programming and pattern matching. It provides examples of using pattern matching in functional programming to:
1. Match on algebraic data types like lists to traverse and operate on data in a recursive manner. Pattern matching allows adding new operations easily by adding new patterns.
2. Use pattern matching in variable declarations to destructure data like tuples and case class objects.
3. Perform pattern matching on function parameters to selectively apply different logic based on the patterns, like filtering even numbers from a list. Everything can be treated as values and expressions in functional programming.
The document provides an introduction to Python programming. It discusses key concepts like variables, data types, operators, and sequential data types. Python is presented as an interpreted programming language that uses indentation to indicate blocks of code. Comments and documentation are included to explain the code. Various data types are covered, including numbers, strings, booleans, and lists. Operators for arithmetic, comparison, assignment and more are also summarized.
This is continuation of the slide Advanced C part 1. In part 1 you learnt about fundamentals of C - How to build an algorithm, operators. In this module - Advanced C part 2 you will be learning about functions, pointers and standard Input Output functions. This slide will help you to move a further ahead in Advanced C and gain deeper knowledge on it.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Python quickstart for programmers: Python Kung Fuclimatewarrior
The document provides an overview of key Python concepts including data types, operators, control flow statements, functions, objects and classes. It discusses lists in depth, covering creation, iteration, searching and common list methods. It also briefly touches on modules, exceptions, inheritance and other advanced topics.
This document provides an overview of pointers and dynamic arrays in C++. It discusses pointer variables, memory management, pointer arithmetic, array variables as pointers, functions for manipulating strings like strcpy and strcmp, and advanced pointer notation for multi-dimensional arrays. Code examples are provided to demonstrate concepts like passing pointers to functions, dereferencing pointers, pointer arithmetic on arrays, and using string functions. The overall objective is to introduce pointers and how they enable dynamic memory allocation and manipulation of data structures in C++.
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document discusses functional programming concepts like purity, laziness, immutability, and concurrency. It provides examples using Clojure to illustrate higher order functions like map and filter, immutable data structures, and concurrency in a functional paradigm. The key benefits highlighted are readability, maintainability, avoiding side effects, and easing concurrency through sharing immutable data across threads.
OpenGurukul : Language : C++ ProgrammingOpen Gurukul
This document provides information about C++ classes and objects. It defines what a class is, noting that classes are like structures but with additional features such as data hiding and default private access. An object is defined as an instance of a class. The document discusses access specifiers like public, private, and protected. It also covers static variables and functions, constant functions, and friend functions/classes.
Different Ways of Function Composition in Scala:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fine-grained composability of functions is one of the core advantages of FP.
Treating "Functions as Data" means that we can store, manipulate, pass functions around and compose them in much the same way we do with data.
This talk demonstrates different ways of function composition in Scala.
The focus lies on scala.Function1, because due to tupling and currying we can regard any FunctionN (except Function0) as a Function1. Curried functions are easier to compose.
Starting with the composition methods of scala.Function1: apply, compose and andThen, we will investigate folding a Seq of functions.
We can also define a pipe operator |> as in F# in order to 'pipe' values through a pipeline of functions.
Defining a Monoid for Function1 allows us to combine two or more functions into a new one.
A function can also be seen as a Functor and a Monad. That means: Functions can be mapped and flatMapped over. And we can write for-comprehensions in a Function1 context just as we do with List, Option, Future, Either etc.
Being Monads, we can use functions in any monadic context. We will see that Function1 is the Reader Monad.
The most powerful way of function composition is Kleisli (also known as ReaderT). We will see that Kleisli (defined with the Id context) is the Reader Monad again.
The document discusses building compilers and domain-specific languages (DSLs) in F#. It describes using FParsec for parsing, building an abstract syntax tree (AST), and interpretation/execution. Examples include building parsers and interpreters for a turtle graphics language, an internal DSL for build automation, an external DSL for games, and a Small Basic compiler. It recommends resources like F# Koans, TryFSharp.org and the book for learning more.
What's in Kotlin for us - Alexandre Greschon, MyHeritageDroidConTLV
The document discusses Kotlin for Android development. It provides an overview of Kotlin, explaining that it is a programming language created by JetBrains that is now adopted by Google for Android. It highlights some key features of Kotlin like being concise, interoperable with Java, and adding null safety to the type system. The rest of the agenda covers topics like Android Kotlin extensions, functions, classes, and a glimpse at the future of Kotlin.
Learn c++ (functions) with nauman ur rehmanNauman Rehman
The document discusses functions in C++. It defines a function as a group of statements that perform a task and can take input arguments and return an output value. Functions make the code more organized and reusable. The document covers function prototypes, definitions, calls, passing arguments by value and by reference, pointer functions, and array functions. It provides examples of different types of functions.
Video and more content at fsharpforfunandprofit.com/pbt
"The lazy programmer's guide to writing 1000's of tests: An introduction to property based testing"
We are all familiar with example-based testing, as typified by TDD and BDD. Property-based testing takes a very different approach, where a single test is run hundreds of times with randomly generated inputs.
Property-based testing is a great way to find edge cases, and also helps you to understand and document the behaviour of your code under all conditions.
This talk will introduce property-based testing and show how it works, and why you should consider adding it to your arsenal of testing tools.
This document summarizes new features in Swift 2 including guard/defer statements for flow control, protocol extensions for default implementations, and error handling improvements like throwing and catching errors. It also mentions Swift becoming open source with its source code released under a permissive license and contributions accepted from the community, including ports for Linux. Nest is provided as an example open source Swift web framework project on GitHub.
Pointer variables store memory addresses and can be used to indirectly access other variables. Pointers allow values to be passed by reference into functions rather than by value. Arrays can be accessed using pointers by treating the array name as a pointer to its first element. Dynamic memory allocation with new/delete operators allows pointers to reference variables in heap memory.
The document discusses loop control structures in C++. It explains the for, while, and do-while loops and provides examples. It also covers break, continue, return, and goto statements used to control program flow in loops.
Swift is a multi-paradigm programming language developed by Apple for iOS, macOS, watchOS, and tvOS. It was inspired by Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and other languages. The document discusses Swift's history, principles, syntax including variables, constants, data types, functions, closures, and control structures. It provides code examples and explanations of Swift's main features.
Let's make a contract: the art of designing a Java APIMario Fusco
The document discusses best practices for designing Java APIs. It emphasizes making APIs intuitive, consistent, discoverable and easy to use. Some specific tips include using static factories to create objects, promoting fluent interfaces, using the weakest possible types, supporting lambdas, avoiding checked exceptions and properly managing resources using try-with-resources. The goal is to design APIs that are flexible, evolvable and minimize surprises for developers.
This document discusses functional programming (FP) and its benefits compared to object-oriented programming (OOP). It defines FP as programming with pure functions that have no side effects. The document explores eliminating side effects through techniques like separating function concerns and returning descriptions of side effects rather than executing them. It also covers FP concepts like higher order functions, recursion, and data types like Option for handling errors/exceptions. The goal is to introduce FP techniques and when each paradigm (FP vs OOP) is best suited.
An Overview Of Python With Functional ProgrammingAdam Getchell
This document provides an overview of the Python programming language and its capabilities for functional programming. It describes Python's attributes such as being portable, object-oriented, and supporting procedural, object-oriented, and functional programming. It also lists several popular Python modules that provide additional functionality and examples of code written in both a procedural and object-oriented style in Python. Finally, it provides examples of functional programming concepts like map, filter and reduce implemented in Python along with references for further information.
The document discusses functional programming and pattern matching. It provides examples of using pattern matching in functional programming to:
1. Match on algebraic data types like lists to traverse and operate on data in a recursive manner. Pattern matching allows adding new operations easily by adding new patterns.
2. Use pattern matching in variable declarations to destructure data like tuples and case class objects.
3. Perform pattern matching on function parameters to selectively apply different logic based on the patterns, like filtering even numbers from a list. Everything can be treated as values and expressions in functional programming.
The document provides an introduction to Python programming. It discusses key concepts like variables, data types, operators, and sequential data types. Python is presented as an interpreted programming language that uses indentation to indicate blocks of code. Comments and documentation are included to explain the code. Various data types are covered, including numbers, strings, booleans, and lists. Operators for arithmetic, comparison, assignment and more are also summarized.
This is continuation of the slide Advanced C part 1. In part 1 you learnt about fundamentals of C - How to build an algorithm, operators. In this module - Advanced C part 2 you will be learning about functions, pointers and standard Input Output functions. This slide will help you to move a further ahead in Advanced C and gain deeper knowledge on it.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
Python quickstart for programmers: Python Kung Fuclimatewarrior
The document provides an overview of key Python concepts including data types, operators, control flow statements, functions, objects and classes. It discusses lists in depth, covering creation, iteration, searching and common list methods. It also briefly touches on modules, exceptions, inheritance and other advanced topics.
This document provides an overview of pointers and dynamic arrays in C++. It discusses pointer variables, memory management, pointer arithmetic, array variables as pointers, functions for manipulating strings like strcpy and strcmp, and advanced pointer notation for multi-dimensional arrays. Code examples are provided to demonstrate concepts like passing pointers to functions, dereferencing pointers, pointer arithmetic on arrays, and using string functions. The overall objective is to introduce pointers and how they enable dynamic memory allocation and manipulation of data structures in C++.
The document discusses arrays in C++. It explains one-dimensional and two-dimensional arrays, how to declare, initialize, and access elements of arrays. Key points include arrays storing a collection of like-typed data, being indexed starting from 0, initializing during declaration, and accessing two-dimensional array elements requiring row and column indices. Examples are provided to demonstrate array concepts.
The document discusses functional programming concepts like purity, laziness, immutability, and concurrency. It provides examples using Clojure to illustrate higher order functions like map and filter, immutable data structures, and concurrency in a functional paradigm. The key benefits highlighted are readability, maintainability, avoiding side effects, and easing concurrency through sharing immutable data across threads.
OpenGurukul : Language : C++ ProgrammingOpen Gurukul
This document provides information about C++ classes and objects. It defines what a class is, noting that classes are like structures but with additional features such as data hiding and default private access. An object is defined as an instance of a class. The document discusses access specifiers like public, private, and protected. It also covers static variables and functions, constant functions, and friend functions/classes.
Different Ways of Function Composition in Scala:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Fine-grained composability of functions is one of the core advantages of FP.
Treating "Functions as Data" means that we can store, manipulate, pass functions around and compose them in much the same way we do with data.
This talk demonstrates different ways of function composition in Scala.
The focus lies on scala.Function1, because due to tupling and currying we can regard any FunctionN (except Function0) as a Function1. Curried functions are easier to compose.
Starting with the composition methods of scala.Function1: apply, compose and andThen, we will investigate folding a Seq of functions.
We can also define a pipe operator |> as in F# in order to 'pipe' values through a pipeline of functions.
Defining a Monoid for Function1 allows us to combine two or more functions into a new one.
A function can also be seen as a Functor and a Monad. That means: Functions can be mapped and flatMapped over. And we can write for-comprehensions in a Function1 context just as we do with List, Option, Future, Either etc.
Being Monads, we can use functions in any monadic context. We will see that Function1 is the Reader Monad.
The most powerful way of function composition is Kleisli (also known as ReaderT). We will see that Kleisli (defined with the Id context) is the Reader Monad again.
The document discusses building compilers and domain-specific languages (DSLs) in F#. It describes using FParsec for parsing, building an abstract syntax tree (AST), and interpretation/execution. Examples include building parsers and interpreters for a turtle graphics language, an internal DSL for build automation, an external DSL for games, and a Small Basic compiler. It recommends resources like F# Koans, TryFSharp.org and the book for learning more.
What's in Kotlin for us - Alexandre Greschon, MyHeritageDroidConTLV
The document discusses Kotlin for Android development. It provides an overview of Kotlin, explaining that it is a programming language created by JetBrains that is now adopted by Google for Android. It highlights some key features of Kotlin like being concise, interoperable with Java, and adding null safety to the type system. The rest of the agenda covers topics like Android Kotlin extensions, functions, classes, and a glimpse at the future of Kotlin.
Ruby is amazing. It has a huge standard library and a core choc full of weird and wonderful things. In this talk, given at the Ipswich Ruby User Group, I give a whimsical nonstop tour through some of the more obscure parts of Ruby.
Dart (https://www.dartlang.org/) is a general-purpose programming language to build web, server, IoT and mobile applications.
AngularDart (https://webdev.dartlang.org/angular) - also called Angular 2 for Dart or simply Angular - is a web app framework that focuses on productivity, performance, and stability. Hundreds of Google engineers use AngularDart to build the sophisticated, mission-critical apps that bring in much of Google’s revenue.
Flutter (https://www.flutter.io/) is a promising project to build mobile apps for iOS and Android from a single codebase in Dart.
Dart, AngularDart and Flutter significantly increase the productivity of the developers.
Slides from following meetup
https://www.meetup.com/Luxembourg-Dart-Lang-Meetup/events/237012072/
Dart (https://www.dartlang.org/) is a general-purpose programming language to build web, server, IoT and mobile applications.
Flutter (https://www.flutter.io/) is a promising project to build mobile apps for iOS and Android from a single codebase in Dart.
Dart and Flutter significantly increase the productivity of the developers.
Slides from following meetup
https://www.meetup.com/Luxembourg-Dart-Lang-Meetup/events/235373973/
This document provides an overview of using the base::browser() function in R for interactive debugging. browser() allows you to pause execution and "hack into" functions to inspect variables and execute code line-by-line. The document demonstrates using browser() to debug a loop that was adding 5 to each column of iris without accounting for the factor column. It pauses at the problem line to inspect variables and continue execution, finding and fixing the bug. More complex examples show how browser() enables debugging nested functions and accessing data in grouped operations.
The document discusses key concepts in functional programming with F#, including:
1. Syntax examples that show how to write functions in F# compared to C#.
2. Functional idioms like composition and pattern matching that allow building programs in a modular way.
3. How the F# type system and compiler checks allow programs to be written in a way that avoids common bugs through techniques like exhaustive pattern matching and units of measure.
The document discusses 5 programming languages that the author has learned over the years: Ruby, Erlang, Haskell, Common Lisp, and Clojure. For each language, it provides a brief overview of its origins, paradigms, and interesting features. It encourages readers to try the languages if they are interested in functional programming, parallelism, strong typing, metaprogramming, or Lisp dialects on the JVM.
This document provides an overview of the Elixir ecosystem, fundamental concepts, and runtime. It discusses key tools like IEx, Mix, and Hex. It covers naming conventions, modules, functions, pattern matching, control flow, and error handling. It also describes fundamental Elixir types like strings, lists, tuples, maps, and structs. Finally, it provides an introduction to the BEAM virtual machine and Elixir processes.
The document provides an overview of the Rust programming language. It describes how Rust grew out of a personal project at Mozilla in 2009. Rust aims to be a safe, concurrent, and practical language supporting multiple paradigms. It uses concepts like ownership and borrowing to prevent data races at compile time. Rust also features traits, generics, pattern matching, and lifetimes to manage memory in a flexible yet deterministic manner.
This document provides examples of built-in functions and decorators in Python like map, filter, all, any, getattr, hasattr, setattr, callable, isinstance, issubclass, closures, and memoization decorators. It demonstrates how to use these functions and decorators through examples. Built-in functions like map, filter and decorators allow extending functionality of functions. Closures enable functions to remember values in enclosing scopes. The @decorator syntax is demonstrated to be equivalent to applying a function to another function.
This document discusses F# and FParsec. It provides examples of parsing expressions in FParsec using lazy evaluation and references, as opposed to NParsec which uses bindings. FParsec allows defining recursive parsers in a natural way in F#.
I demonstrate a small slice of Rakudo, an implementation of a dynamic language with some advanced features.
During the actual talk I used the REPL to do live demonstrations, often taking suggestions from the audience.
Python is a dynamic programming language that is designed for readability and simplicity. It can be used for web applications, data analysis, GUIs, games, and more. Some key features of Python include being highly readable, using intuitive and clear naming conventions, being interactive and forgiving, treating everything as an object, and using generators and list/dict/set comprehensions which allow data to be projected in a functional style.
JavaScript for Unleashed a game about a robbery in London and its pretty long i do not know why you would want it but here have it :P also this is not pro its just for school because i am a loner like that and i have nothing better to do
Scala presentation by Aleksandar ProkopecLoïc Descotte
This document provides an introduction to the Scala programming language. It discusses how Scala runs on the Java Virtual Machine, supports both object-oriented and functional programming paradigms, and provides features like pattern matching, immutable data structures, lazy evaluation, and parallel collections. Scala aims to be concise, expressive, and extensible.
This Python script uses SSH to connect to network devices, gather configuration and connection status data, and test ISDN dial backup connections. It contains classes to initialize SSH connections, log in to devices, retrieve interface and dial string configuration details, execute test calls to verify two B-channel connections and EIGRP neighbor establishment, and disable/enable SNMP traps. The script has been updated over time to improve error handling and switch from Telnet to SSH connections.
Similar to FParsec Hands On - F#unctional Londoners 2014 (20)
This document outlines how to be a rock star developer by drawing analogies to rock stars and musicians. It discusses rocking interviews by making cool demos and solving FizzBuzz in multiple programming languages. To rock the job, the document suggests crafting your own tools like frameworks and databases, and putting skills together through projects like a programming language and data journalism platform called The Gamma. The overall message is that developers can achieve rock star status by learning instruments like guitar, and developing skills as deeply as musicians do.
The document discusses the F# functional programming language and community. It provides information about F# meetups in London that meet every 2-4 weeks to discuss topics like machine learning, finance, and games. It also summarizes that F# is a statically typed, functional-first language that can be used with .NET and is influenced by languages like OCaml, Python, and C#. Code examples are provided to demonstrate F# features like pattern matching and type providers.
- The document discusses the growth of the F# programming language and community over the past 10-20 years. It notes how the language and number of available learning resources have expanded significantly.
- Key developments include the addition of features like Type Providers and LINQ queries to F# as well as its ability to target over 2 billion devices natively or via tools like Fable that compile F# to JavaScript.
- The F# community has also grown substantially with user groups in major cities and startups using the language raising large amounts of funding.
F# is a statically typed, functional-first programming language that is also object-oriented and supports cross-platform development. It draws influences from OCaml, Python, Haskell, and C#. The document discusses the F# community, software foundation, and testimonials about productivity and performance gains from companies using F#. It also previews live demos of common functional concepts in F# like recursion, pattern matching, computation expressions, type providers, and building apps and games.
The document contains various notes and information snippets on topics including:
- WiFi login details
- Maslow's hierarchy of needs
- LAMP stack vs 3-tier architecture
- Performance impacts of small delays in page load times
- Quicksort algorithm implementation in Haskell
- Comparisons of Reactive Extensions, F# Observable, and Nessos Streams libraries
- HybridDictionary data structure optimization in .NET
- B+ tree data structure praise
- Phillip Trelford's Twitter handle and blog
The document summarizes information about the F# programming language and Copenhagen .Net user group. It provides an overview of F# features, testimonials of productivity gains and reduced bugs from using F#, examples comparing F# and C# code, and information about the F# Software Foundation and resources for learning F#.
The document discusses various techniques for generative and procedural art using functional programming concepts in F#. It provides examples of generative art inspired by artists like Mondrian and Lohse that are created algorithmically. It also discusses using randomness, cellular automata, and choose your own adventure concepts to procedurally generate art, text, images, and animations. Resources like libraries and coding dojos are provided for learning and experimenting with functional generative and procedural art techniques in F#.
The document discusses building domain specific languages and describes a talk about creating an interpreter for a turtle graphics language, including showing the abstract syntax tree for the turtle language and code samples for a Small Basic interpreter built with an AST. It also briefly mentions resources for learning F# like online tutorials, exercises, and a book, as well as taking questions at the end.
Building cross platform games with Xamarin - Birmingham 2015Phillip Trelford
In this session we'll explore building cross platform indie games quickly and easily using Xamarin tools. We'll look at deploying to iOS, Android and even Raspberry Pi. Expect a splattering of practical game design tips and a segment where you get to adapt a popular arcade game on your laptop. Example code will be primarily in F#, but no prior experience of game development or F# is required.
This document summarizes Phillip Trelford's talk at the Functional Kats Conference in 2015. It discusses performance comparisons between different programming languages and data structures, including reactive extensions in C# and F# observables. It also covers topics like immutable vs mutable data structures and choosing pragmatic solutions that optimize for speed. Source code examples are provided for concepts like quicksort algorithms and higher-order functions.
This document summarizes Phillip Trelford's presentation on F# on the desktop. It discusses F# user groups in London and testimonials from companies using F# for games, risk management, and software. It also covers desktop programming with F# using UI libraries, data access, visualization, and type providers. Examples are given for spreadsheets, mobile development, and cross-platform frameworks. Resources for learning F# are provided at the end.
Ready, steady, cross platform games - ProgNet 2015Phillip Trelford
"In this session we'll explore modern cross platform game development, focusing on simple game design concepts for maximizing fun and classic games programming techniques for maximizing frame rates. We'll use Xamarin Studio to target iOS and Android off the same code base and the power of F# to allows us to put together a game in less than 4 hours."
This document summarizes information about the F# programming language presented by Phil Trelford at NDC Oslo 2015. It describes F# as a statically typed, functional-first language in the .NET framework that is shorter, easier to read, refactor and has fewer bugs than C#. It provides examples of common programming tasks like classes, tests, and JSON parsing that are more concise and clear in F# compared to C#. It also lists several organizations that saw major productivity gains from adopting F#.
This document provides information about the F# programming language and F# community. It describes F# as a statically typed, functional-first, open source .NET language. It highlights benefits of F# such as increased productivity, efficiency, and correctness compared to other languages. It provides examples of code in both F# and other languages like C#. It also lists various resources for learning F# including user groups, books, tutorials, and the F# Software Foundation.
The document discusses using domain specific languages to teach programming concepts to children through a turtle graphics language, provides examples of abstract syntax trees for different languages like a turtle language and Small Basic, and recommends resources for learning more about language design and domain specific languages including tryfsharp.org, a F# koans project, and Neil Danson's story about writing a C# compiler from scratch in 24 days.
This document summarizes a presentation about using F# for real-world applications. It provides examples showing that F# code can be more concise and require less code than equivalent C# solutions. It also demonstrates integrating F# into C# projects and leveraging F# features like units of measure and higher-order functions in both languages. Live coding examples are provided for functional patterns in both F# and C#. Resources for learning more about the F# language and community are also listed.
The document summarizes an F# conference presentation by Phil Trelford on the benefits of using the F# programming language. It provides information on the F# London Meetup group, describes F# as a statically typed, functional-first, open source .NET language, and gives examples of how tasks are simplified in F# compared to C#. It also shares testimonials from companies that increased productivity after adopting F#.
The document discusses machine learning techniques for analyzing passenger data from the Titanic disaster to predict survival. It provides an overview of decision trees and how they can be used to classify passengers by attributes like gender and class. Code examples are given in F# for loading and preprocessing the Titanic dataset, creating a decision tree, and using it to classify new passengers.
This document discusses the use of the F# programming language for finance and trading applications. It provides information on F# user groups focused on finance, examples of companies using F# in finance, and advantages like increased productivity, performance, correctness, and managing complexity. It also describes features of F# like type providers and unit types that are useful for financial calculations.
This document summarizes Phillip Trelford's presentation on F# tools for machine learning and data science. It discusses F# meetup groups in London and Copenhagen, case studies using F# for modeling Halo 3 player skills and AdCenter learning algorithms, and live demos of F# for k-means clustering, type providers for CSV and R, and the FSLab library. It also provides testimonials on F# from Microsoft and Amyris and resources for learning more about F#.
How GenAI Can Improve Supplier Performance Management.pdfZycus
Data Collection and Analysis with GenAI enables organizations to gather, analyze, and visualize vast amounts of supplier data, identifying key performance indicators and trends. Predictive analytics forecast future supplier performance, mitigating risks and seizing opportunities. Supplier segmentation allows for tailored management strategies, optimizing resource allocation. Automated scorecards and reporting provide real-time insights, enhancing transparency and tracking progress. Collaboration is fostered through GenAI-powered platforms, driving continuous improvement. NLP analyzes unstructured feedback, uncovering deeper insights into supplier relationships. Simulation and scenario planning tools anticipate supply chain disruptions, supporting informed decision-making. Integration with existing systems enhances data accuracy and consistency. McKinsey estimates GenAI could deliver $2.6 trillion to $4.4 trillion in economic benefits annually across industries, revolutionizing procurement processes and delivering significant ROI.
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceICS
This webinar explores the “secure-by-design” approach to medical device software development. During this important session, we will outline which security measures should be considered for compliance, identify technical solutions available on various hardware platforms, summarize hardware protection methods you should consider when building in security and review security software such as Trusted Execution Environments for secure storage of keys and data, and Intrusion Detection Protection Systems to monitor for threats.
What is Continuous Testing in DevOps - A Definitive Guide.pdfkalichargn70th171
Once an overlooked aspect, continuous testing has become indispensable for enterprises striving to accelerate application delivery and reduce business impacts. According to a Statista report, 31.3% of global enterprises have embraced continuous integration and deployment within their DevOps, signaling a pervasive trend toward hastening release cycles.
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...kalichargn70th171
Visual testing plays a vital role in ensuring that software products meet the aesthetic requirements specified by clients in functional and non-functional specifications. In today's highly competitive digital landscape, users expect a seamless and visually appealing online experience. Visual testing, also known as automated UI testing or visual regression testing, verifies the accuracy of the visual elements that users interact with.
A neural network is a machine learning program, or model, that makes decisions in a manner similar to the human brain, by using processes that mimic the way biological neurons work together to identify phenomena, weigh options and arrive at conclusions.
The Role of DevOps in Digital Transformation.pdfmohitd6
DevOps plays a crucial role in driving digital transformation by fostering a collaborative culture between development and operations teams. This approach enhances the speed and efficiency of software delivery, ensuring quicker deployment of new features and updates. DevOps practices like continuous integration and continuous delivery (CI/CD) streamline workflows, reduce manual errors, and increase the overall reliability of software systems. By leveraging automation and monitoring tools, organizations can improve system stability, enhance customer experiences, and maintain a competitive edge. Ultimately, DevOps is pivotal in enabling businesses to innovate rapidly, respond to market changes, and achieve their digital transformation goals.
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...kalichargn70th171
In today's fiercely competitive mobile app market, the role of the QA team is pivotal for continuous improvement and sustained success. Effective testing strategies are essential to navigate the challenges confidently and precisely. Ensuring the perfection of mobile apps before they reach end-users requires thoughtful decisions in the testing plan.
In this infographic, we have explored cost-effective strategies for iOS app development, focusing on building high-quality apps within a budget. Key points covered include prioritizing essential features, leveraging existing tools and libraries, adopting cross-platform development approaches, optimizing for a Minimum Viable Product (MVP), and integrating with cloud services and third-party APIs. By implementing these strategies, businesses and developers can create functional and engaging iOS apps while minimizing development costs and time-to-market.
Nashik's top web development company, Upturn India Technologies, crafts innovative digital solutions for your success. Partner with us and achieve your goals
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid
IBM watsonx Code Assistant for Z, our latest Generative AI-assisted mainframe application modernization solution. Mainframe (IBM Z) application modernization is a topic that every mainframe client is addressing to various degrees today, driven largely from digital transformation. With generative AI comes the opportunity to reimagine the mainframe application modernization experience. Infusing generative AI will enable speed and trust, help de-risk, and lower total costs associated with heavy-lifting application modernization initiatives. This document provides an overview of the IBM watsonx Code Assistant for Z which uses the power of generative AI to make it easier for developers to selectively modernize COBOL business services while maintaining mainframe qualities of service.
Building the Ideal CI-CD Pipeline_ Achieving Visual PerfectionApplitools
Explore the advantages of integrating AI-powered testing into the CI/CD pipeline in this session from Applitools engineer Brandon Murray. More information and session materials at applitools.com
Discover how shift-left strategies and advanced testing in CI/CD pipelines can enhance customer satisfaction and streamline development processes, including:
• Significantly reduced time and effort needed for test creation and maintenance compared to traditional testing methods.
• Enhanced UI coverage that eliminates the necessity for manual testing, leading to quicker and more effective testing processes.
• Effortless integration with the development workflow, offering instant feedback on pull requests and facilitating swifter product releases.
Orca: Nocode Graphical Editor for Container OrchestrationPedro J. Molina
Tool demo on CEDI/SISTEDES/JISBD2024 at A Coruña, Spain. 2024.06.18
"Orca: Nocode Graphical Editor for Container Orchestration"
by Pedro J. Molina PhD. from Metadev
Folding Cheat Sheet #6 - sixth in a seriesPhilip Schwarz
Left and right folds and tail recursion.
Errata: there are some errors on slide 4. See here for a corrected versionsof the deck:
https://speakerdeck.com/philipschwarz/folding-cheat-sheet-number-6
https://fpilluminated.com/deck/227
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfkalichargn70th171
Moving to a more digitally focused era, the importance of software is rapidly increasing. Software tools are crucial for upgrading life standards, enhancing business prospects, and making a smart world. The smooth and fail-proof functioning of the software is very critical, as a large number of people are dependent on them.
What’s new in VictoriaMetrics - Q2 2024 UpdateVictoriaMetrics
These slides were presented during the virtual VictoriaMetrics User Meetup for Q2 2024.
Topics covered:
1. VictoriaMetrics development strategy
* Prioritize bug fixing over new features
* Prioritize security, usability and reliability over new features
* Provide good practices for using existing features, as many of them are overlooked or misused by users
2. New releases in Q2
3. Updates in LTS releases
Security fixes:
● SECURITY: upgrade Go builder from Go1.22.2 to Go1.22.4
● SECURITY: upgrade base docker image (Alpine)
Bugfixes:
● vmui
● vmalert
● vmagent
● vmauth
● vmbackupmanager
4. New Features
* Support SRV URLs in vmagent, vmalert, vmauth
* vmagent: aggregation and relabeling
* vmagent: Global aggregation and relabeling
* vmagent: global aggregation and relabeling
* Stream aggregation
- Add rate_sum aggregation output
- Add rate_avg aggregation output
- Reduce the number of allocated objects in heap during deduplication and aggregation up to 5 times! The change reduces the CPU usage.
* Vultr service discovery
* vmauth: backend TLS setup
5. Let's Encrypt support
All the VictoriaMetrics Enterprise components support automatic issuing of TLS certificates for public HTTPS server via Let’s Encrypt service: https://docs.victoriametrics.com/#automatic-issuing-of-tls-certificates
6. Performance optimizations
● vmagent: reduce CPU usage when sharding among remote storage systems is enabled
● vmalert: reduce CPU usage when evaluating high number of alerting and recording rules.
● vmalert: speed up retrieving rules files from object storages by skipping unchanged objects during reloading.
7. VictoriaMetrics k8s operator
● Add new status.updateStatus field to the all objects with pods. It helps to track rollout updates properly.
● Add more context to the log messages. It must greatly improve debugging process and log quality.
● Changee error handling for reconcile. Operator sends Events into kubernetes API, if any error happened during object reconcile.
See changes at https://github.com/VictoriaMetrics/operator/releases
8. Helm charts: charts/victoria-metrics-distributed
This chart sets up multiple VictoriaMetrics cluster instances on multiple Availability Zones:
● Improved reliability
● Faster read queries
● Easy maintenance
9. Other Updates
● Dashboards and alerting rules updates
● vmui interface improvements and bugfixes
● Security updates
● Add release images built from scratch image. Such images could be more
preferable for using in environments with higher security standards
● Many minor bugfixes and improvements
● See more at https://docs.victoriametrics.com/changelog/
Also check the new VictoriaLogs PlayGround https://play-vmlogs.victoriametrics.com/
Stork Product Overview: An AI-Powered Autonomous Delivery FleetVince Scalabrino
Imagine a world where instead of blue and brown trucks dropping parcels on our porches, a buzzing drove of drones delivered our goods. Now imagine those drones are controlled by 3 purpose-built AI designed to ensure all packages were delivered as quickly and as economically as possible That's what Stork is all about.
3. INTERNAL DSLS - EXAMPLES
Fake
#r "tools/FAKE/tools/FakeLib.dll"
open Fake
Target "Test" (fun _ ->
trace "Testing stuff..."
)
Target "Deploy" (fun _ ->
trace "Heavy deploy action"
)
"Test" // define the dependencies
==> "Deploy"
Run "Deploy"
Canopy
"starting a game of 2048" &&& fun _ ->
start firefox
url "http://gabrielecirulli.github.io/2048/"
let score = element ".score-container"
printfn "Score %s" score.Text
while not(lost()) && not (won()) do
press up
press right
press left
press up
10. FPARSEC TUTORIAL
open FParsec
let test p str =
match run p str with
| Success(result, _, _) -> printfn "Success: %A" result
| Failure(errorMsg, _, _) -> printfn "Failure: %s" errorMsg
test pfloat "1.25"
test pfloat "1.25E 2"
let str s = pstring s
let floatBetweenBrackets = str "[" >>. pfloat .>> str "]"
test floatBetweenBrackets "[1.0]"
test floatBetweenBrackets "[]"
test floatBetweenBrackets "[1.0]"
11. PARSING OPERATORS
// we set up an operator precedence parser for parsing the arithmetic expressions
let opp = new OperatorPrecedenceParser<float,unit,unit>()
let expr = opp.ExpressionParser
opp.TermParser <- number <|> between (str_ws "(") (str_ws ")") expr
// operator definitions follow the schema
// operator type, string, trailing whitespace parser, precedence, associativity, function to apply
opp.AddOperator(InfixOperator("+", ws, 1, Associativity.Left, (+)))
opp.AddOperator(InfixOperator("-", ws, 1, Associativity.Left, (-)))
opp.AddOperator(InfixOperator("*", ws, 2, Associativity.Left, (*)))
opp.AddOperator(InfixOperator("/", ws, 2, Associativity.Left, (/)))
opp.AddOperator(InfixOperator("^", ws, 3, Associativity.Right, fun x y -> System.Math.Pow(x, y)))
opp.AddOperator(PrefixOperator("-", ws, 4, true, fun x -> -x))
12. TURTLES ALL THE WAY
DOWN
FParsec Hands On
F#unctional Londoners
2014
14. TURTLE AST
module AST
type arg = int
type command =
| Forward of arg
| Turn of arg
| Repeat of arg * command list
15. TURTLE PARSER: FORWARD AND
TURN
open AST
open FParsec
let pforward =
pstring "forward" >>. spaces1 >>. pfloat
|>> fun x -> Forward(int x)
let pleft =
pstring "left" >>. spaces1 >>. pfloat
|>> fun x -> Turn(int -x)
let pright =
pstring "right" >>. spaces1 >>. pfloat
|>> fun x -> Turn(int x)
16. TURTLE PARSER: REPEAT
COMMAND
let pcommand = pforward <|> pleft <|> pright
let block = between (pstring "[") (pstring "]") (many1 (pcommand .>> spaces))
let prepeat =
pstring "repeat" >>. spaces1 >>. pfloat .>> spaces .>>. block
|>> fun (n,commands) -> Repeat(int n, commands)
17. TURTLE PARSER: FORWARD
REPEAT
let prepeat, prepeatimpl = createParserForwardedToRef ()
let pcommand = pforward <|> pleft <|> pright <|> prepeat
let block = between (pstring "[") (pstring "]") (many1 (pcommand .>> spaces))
prepeatimpl :=
pstring "repeat" >>. spaces1 >>. pfloat .>> spaces .>>. block
|>> fun (n,commands) -> Repeat(int n, commands)
18. TURTLE INTERPRETER: PATTERN
MATCHING
let rec perform turtle = function
| Forward n ->
let r = float turtle.A * Math.PI / 180.0
let dx, dy = float n * cos r, float n * sin r
let x, y = turtle.X, turtle.Y
let x',y' = x + dx, y + dy
drawLine (x,y) (x',y')
{ turtle with X = x'; Y = y' }
| Turn n -> { turtle with A = turtle.A + n }
| Repeat (n, commands) ->
let rec repeat turtle = function
| 0 -> turtle
| n -> repeat (performAll turtle commands) (n-1)
repeat turtle n
and performAll = List.fold perform
19. TURTLE: PROCEDURES
to square
repeat 4 [forward 50 right 90]
end
to flower
repeat 36 [right 10 square]
end
to garden
repeat 25 [set-random-position flower]
end
garden
22. SMALL BASIC
SAMPLE
Sub Init
gw = 598
gh = 428
GraphicsWindow.BackgroundColor =
"DodgerBlue"
GraphicsWindow.Width = gw
GraphicsWindow.Height = gh
color = "1=Orange;2=Cyan;3=Lime;"
size = "1=20;2=16;3=12;"
passed = 0
cd = "False" ' collision detected
EndSub
23. SMALL BASIC AST
/// Small Basic expression
type expr =
| Literal of value
| Identifier of identifier
| GetAt of location
| Func of invoke
| Neg of expr
| Arithmetic of expr * arithmetic * expr
| Comparison of expr * comparison * expr
| Logical of expr * logical * expr
/// Small Basic instruction
type instruction =
| Assign of assign
| SetAt of location * expr
| PropertySet of string * string * expr
| Action of invoke
| For of assign * expr * expr
| EndFor
| If of expr
| ElseIf of expr
| Else
| EndIf
| While of expr
| EndWhile
| Sub of identifier * string list
| EndSub
| Label of label
| Goto of label
24. SMALL BASIC PARSER
/// > For i = 1 To 100 Step 2
let pfor =
let pfrom = str_ws1 "For" >>. pset
let pto = str_ws1 "To" >>. pexpr
let pstep = str_ws1 "Step" >>. pexpr
let toStep = function None -> Literal(Int(1)) | Some s -> s
pipe3 pfrom pto (opt pstep) (fun f t s -> For(f, t, toStep s))
let pendfor = str_ws "EndFor" |>> (fun _ -> EndFor)
25. SMALL BASIC COMPILER: GOTO
| Goto(name) ->
let label = obtainLabel il name
il.Emit(OpCodes.Br, label)
| Label(name) ->
let label = obtainLabel il name
il.MarkLabel(label)
27. F# KOANS
[<Koan>]
let SquareEvenNumbersWithPipelineOperator() =
(* In F#, you can use the pipeline operator to get the benefit of
the parens style with the readability of the statement style. *)
let result =
[0..5]
|> List.filter isEven
|> List.map square
AssertEquality result __