Slides for my recent presentation at the CASE meetup, May 21st. Discusses functional programming features in Scala. Goes from basic FP features like higher-order functions all the way through to monads.
This document discusses Scala in the wild, focusing on its use at Novell in building Pulse, a next-gen communications platform. It highlights some of the challenges of using Scala in an enterprise setting, including the need for actor recovery mechanisms and better Java interoperability. It also notes tendencies of Java developers new to Scala to write Java-style code in Scala and fail to leverage advanced Scala features. The document proposes adopting conventions to help Scala developers write more idiomatic and effective Scala code.
The document provides an overview of higher-kinds, typeclasses, type-level encodings, and continuations in Scala. It discusses how kind systems classify types, how typeclasses allow abstraction over types, and examples of encoding data structures like linked lists at the type level. It also introduces delimited continuations in Scala and how they can be used to simulate control flow constructs like break statements.
Scala is a programming language that mixes object oriented and functional programming in a powerful and flexible way. While it can not be considered as a mainstream language, it has seen a growing adoption trend.An important ingredient for this diffusion is its complete interoperability with Java and the fact that it runs on a solid platform such as the JVM.
It is currently the 4th most loved programming language and the 2nd top paying technology of 2016 (StackOverflow Developers Survey).
These slides have been used for a 4h seminar at the University of Cagliari the 17th of December 2016
This document provides a dictionary of scala programming concepts including definitions of common jargon like ADT, typeclasses, extension methods, and call-by semantics. It defines ADT as algebraic data types, which were introduced in languages like Algol 60 and ML, and pattern matching which allows decomposing ADT values. Typeclasses are defined as rules for types like equality, with instances providing implementations. Extension methods and implicit conversions add methods to types via implicit parameters. Call-by-name and call-by-need semantics are discussed in relation to lazy evaluation.
This document provides an overview of functional programming concepts in Java 8 including lambdas and streams. It introduces lambda functions as anonymous functions without a name. Lambdas allow internal iteration over collections using forEach instead of external iteration with for loops. Method references provide a shorthand for lambda functions by "routing" function parameters. Streams in Java 8 enhance the library and allow processing data pipelines in a functional way.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
This document discusses Scala in the wild, focusing on its use at Novell in building Pulse, a next-gen communications platform. It highlights some of the challenges of using Scala in an enterprise setting, including the need for actor recovery mechanisms and better Java interoperability. It also notes tendencies of Java developers new to Scala to write Java-style code in Scala and fail to leverage advanced Scala features. The document proposes adopting conventions to help Scala developers write more idiomatic and effective Scala code.
The document provides an overview of higher-kinds, typeclasses, type-level encodings, and continuations in Scala. It discusses how kind systems classify types, how typeclasses allow abstraction over types, and examples of encoding data structures like linked lists at the type level. It also introduces delimited continuations in Scala and how they can be used to simulate control flow constructs like break statements.
Scala is a programming language that mixes object oriented and functional programming in a powerful and flexible way. While it can not be considered as a mainstream language, it has seen a growing adoption trend.An important ingredient for this diffusion is its complete interoperability with Java and the fact that it runs on a solid platform such as the JVM.
It is currently the 4th most loved programming language and the 2nd top paying technology of 2016 (StackOverflow Developers Survey).
These slides have been used for a 4h seminar at the University of Cagliari the 17th of December 2016
This document provides a dictionary of scala programming concepts including definitions of common jargon like ADT, typeclasses, extension methods, and call-by semantics. It defines ADT as algebraic data types, which were introduced in languages like Algol 60 and ML, and pattern matching which allows decomposing ADT values. Typeclasses are defined as rules for types like equality, with instances providing implementations. Extension methods and implicit conversions add methods to types via implicit parameters. Call-by-name and call-by-need semantics are discussed in relation to lazy evaluation.
This document provides an overview of functional programming concepts in Java 8 including lambdas and streams. It introduces lambda functions as anonymous functions without a name. Lambdas allow internal iteration over collections using forEach instead of external iteration with for loops. Method references provide a shorthand for lambda functions by "routing" function parameters. Streams in Java 8 enhance the library and allow processing data pipelines in a functional way.
Scala is becoming the language of choice for many development teams. This talk highlights how Scala excels in the world of multi-core processing and explores how it compares to Java 8.
Video Presentation: http://youtu.be/8vxTowBXJSg
Some parts of our applications don't need to be asynchronous or interact with the outside world: it's enough that they are stateful, possibly with the ability to handle failure, context, and logging. Although you can use ZIO 2 or monad transformers for this task, both come with drawbacks. In this presentation, Jorge Vásquez will introduce you to ZPure, a data type from ZIO Prelude, which lets you scale back on the power of ZIO 2, but with the same high-performance, type-inference, and ergonomics you expect from ZIO 2 libraries.
This document provides a cheat sheet overview of Scala concepts including packages, imports, variables, constants, classes, traits, generics, methods, functions, operators, arrays, main methods, annotations, assignments, selection, iteration and references. Key points are that Scala uses packages similarly to Java but with curly brace delimiters, imports can be used anywhere in a file, variables use 'var', constants use 'val', classes inherit from Any and can use traits for mixins, generics are defined with type parameters, functions are objects, operators are methods, arrays are classes, main returns Unit, and assignments use = while iteration prefers recursion over loops.
This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
This document discusses various techniques for working with types in Scala, including:
1. The main alternatives for Scala types including classical OO, algebraic, generic, and structured types. It recommends choosing styles based on use cases and setting guidelines.
2. The differences between run-time and compile-time dispatch and how they are implemented in Scala.
3. Techniques for working with types including tagged types, type aliases, and implicit evidence to provide different behaviors based on types known at compile-time.
4. Resources for learning more about advanced type-level programming in Scala, particularly the Shapeless library.
Scala is an object-oriented and functional programming language that runs on the Java Virtual Machine. It was created in 2001 by Martin Odersky and aims to integrate features of object-oriented and functional languages. Scala code is compiled to JVM bytecode and supports interoperability with Java libraries and frameworks. Some key features of Scala include support for immutable data structures, pattern matching, traits for mixing composition, and functional programming constructs like functions as first-class values. Scala has gained popularity in industry at companies like LinkedIn, Twitter, and The Guardian.
My Scala by the Bay 2014 talk on exploring the ideas behind the implementation of the generic library shapeless, and general ideas about how to do "type level" programming in Scala.
This document provides an overview of Scala fundamentals including:
- Scala is a programming language for the JVM that supports both object-oriented and functional paradigms.
- It defines variables, values, lazy values, functions, types, classes, objects, traits, and higher-order functions.
- Classes can extend other classes and traits, allowing for multiple inheritance. Objects are used as singletons.
- Functional concepts like immutability, anonymous functions, and higher-order functions are supported.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
This document summarizes a talk given about Nokia's migration to Scala for its Places API. The key points are:
1) Nokia migrated its Places API codebase to Scala to take advantage of Scala's features like its powerful type system, immutable data structures, and functional programming capabilities.
2) The migration was done gradually over time while continuing to develop new features. They discovered many benefits of Scala along the way like improved test readability and JSON parsing capabilities.
3) Nokia uses Scala features like case classes, options, and functions to model data and add type safety to its codebase. This uncovered bugs that would have been hard to find in Java.
Introduction to Functional Programming with Scalapramode_ce
The document provides an introduction to functional programming with Scala. It outlines the following topics that will be covered: learning Scala syntax and writing simple programs; important functional programming concepts like closures, higher-order functions, purity, lazy evaluation, currying, tail calls, immutability, and type inference; and understanding the functional programming paradigm through Scala. It also provides some background information on Scala and examples of Scala code demonstrating various concepts.
This document summarizes a nonstandard library called psp-std that provides consistency, correctness, and convenience without dependencies. It includes:
- A consciously constructed namespace that reexports common Scala types with consistent names.
- Support for empty values through type classes like Empty, providing default empty values when collections are converted.
- Additional collection methods like splitAfter, grep, splitAround for filtering, splitting, and matching patterns in collections.
- Predicate algebra for filtering collections based on boolean combinations of predicates.
- Support for pairness awareness when working with paired data like zipped collections.
- Fair trade collections that allow type-safe mapping and other operations across different collection types.
This document discusses the evolution of programming languages and hardware over time. It covers older languages like FORTRAN, BASIC, and C/C++. It also discusses newer languages like Rust, Go, and Julia. It describes how memory management, concurrency models, and distributed computing have changed. It proposes using techniques like functional interpreters and macros to allow languages to be more easily extended and adapted to new hardware. The document advocates for approaches that can efficiently support both old and new programming ideas.
A teaser talk for Scala newbies, introducing five basic elements that (in my opinion) make the transition from Java to Scala a no-brainer.
Given at the 7th JJTV (Israeli Java/JVM user group) tool night, July 2nd, 2013.
This document discusses refactoring Scala code to improve quality and maintainability. It provides examples of issues like stringly typed code, abuse of collections, and poor scoping. The presentation recommends addressing these by using case classes instead of tuples, parsing values instead of passing raw strings, giving intermediate steps meaningful names, and separating logic and data through traits or type classes. Well-scoped code with a small public API and private implementation details is emphasized.
The document discusses Scala as a potential replacement for Java on the JVM. It provides quotes from several influential Java developers who express their view that Scala is the most capable replacement for Java currently available on the JVM, and the momentum behind Scala is growing. The document also briefly outlines an agenda for introducing Scala, covering basic syntax, patterns, functions, classes and traits.
Knolx Session : Built-In Control Structures in ScalaAyush Mishra
Scala has only a handful of built-in control structures including if, while, for, try, match, and function calls. These control structures can be used in both an imperative style by modifying program state, as well as a functional style by returning new values. For example, a for loop can iterate over a sequence and return a new collection with the results of the body expression.
Some parts of our applications don't need to be asynchronous or interact with the outside world: it's enough that they are stateful, possibly with the ability to handle failure, context, and logging. Although you can use ZIO 2 or monad transformers for this task, both come with drawbacks. In this presentation, Jorge Vásquez will introduce you to ZPure, a data type from ZIO Prelude, which lets you scale back on the power of ZIO 2, but with the same high-performance, type-inference, and ergonomics you expect from ZIO 2 libraries.
This document provides a cheat sheet overview of Scala concepts including packages, imports, variables, constants, classes, traits, generics, methods, functions, operators, arrays, main methods, annotations, assignments, selection, iteration and references. Key points are that Scala uses packages similarly to Java but with curly brace delimiters, imports can be used anywhere in a file, variables use 'var', constants use 'val', classes inherit from Any and can use traits for mixins, generics are defined with type parameters, functions are objects, operators are methods, arrays are classes, main returns Unit, and assignments use = while iteration prefers recursion over loops.
This is brief presentation on the Scala programming language. It is aimed at Java developers who are curious about Scala. It was given at a San Francisco Java User Group in January 2009.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
This document discusses various techniques for working with types in Scala, including:
1. The main alternatives for Scala types including classical OO, algebraic, generic, and structured types. It recommends choosing styles based on use cases and setting guidelines.
2. The differences between run-time and compile-time dispatch and how they are implemented in Scala.
3. Techniques for working with types including tagged types, type aliases, and implicit evidence to provide different behaviors based on types known at compile-time.
4. Resources for learning more about advanced type-level programming in Scala, particularly the Shapeless library.
Scala is an object-oriented and functional programming language that runs on the Java Virtual Machine. It was created in 2001 by Martin Odersky and aims to integrate features of object-oriented and functional languages. Scala code is compiled to JVM bytecode and supports interoperability with Java libraries and frameworks. Some key features of Scala include support for immutable data structures, pattern matching, traits for mixing composition, and functional programming constructs like functions as first-class values. Scala has gained popularity in industry at companies like LinkedIn, Twitter, and The Guardian.
My Scala by the Bay 2014 talk on exploring the ideas behind the implementation of the generic library shapeless, and general ideas about how to do "type level" programming in Scala.
This document provides an overview of Scala fundamentals including:
- Scala is a programming language for the JVM that supports both object-oriented and functional paradigms.
- It defines variables, values, lazy values, functions, types, classes, objects, traits, and higher-order functions.
- Classes can extend other classes and traits, allowing for multiple inheritance. Objects are used as singletons.
- Functional concepts like immutability, anonymous functions, and higher-order functions are supported.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala is a modern programming language created by Martin Odersky that provides static typing and supports both object-oriented and functional programming paradigms. It compiles to Java bytecode and runs on the Java Virtual Machine (JVM), allowing it to interoperate with Java. Many consider Scala to be a better alternative to Java due to its concise and expressive syntax. Scala sees widespread use in production systems and has growing job opportunities for developers with Scala skills.
This document summarizes a talk given about Nokia's migration to Scala for its Places API. The key points are:
1) Nokia migrated its Places API codebase to Scala to take advantage of Scala's features like its powerful type system, immutable data structures, and functional programming capabilities.
2) The migration was done gradually over time while continuing to develop new features. They discovered many benefits of Scala along the way like improved test readability and JSON parsing capabilities.
3) Nokia uses Scala features like case classes, options, and functions to model data and add type safety to its codebase. This uncovered bugs that would have been hard to find in Java.
Introduction to Functional Programming with Scalapramode_ce
The document provides an introduction to functional programming with Scala. It outlines the following topics that will be covered: learning Scala syntax and writing simple programs; important functional programming concepts like closures, higher-order functions, purity, lazy evaluation, currying, tail calls, immutability, and type inference; and understanding the functional programming paradigm through Scala. It also provides some background information on Scala and examples of Scala code demonstrating various concepts.
This document summarizes a nonstandard library called psp-std that provides consistency, correctness, and convenience without dependencies. It includes:
- A consciously constructed namespace that reexports common Scala types with consistent names.
- Support for empty values through type classes like Empty, providing default empty values when collections are converted.
- Additional collection methods like splitAfter, grep, splitAround for filtering, splitting, and matching patterns in collections.
- Predicate algebra for filtering collections based on boolean combinations of predicates.
- Support for pairness awareness when working with paired data like zipped collections.
- Fair trade collections that allow type-safe mapping and other operations across different collection types.
This document discusses the evolution of programming languages and hardware over time. It covers older languages like FORTRAN, BASIC, and C/C++. It also discusses newer languages like Rust, Go, and Julia. It describes how memory management, concurrency models, and distributed computing have changed. It proposes using techniques like functional interpreters and macros to allow languages to be more easily extended and adapted to new hardware. The document advocates for approaches that can efficiently support both old and new programming ideas.
A teaser talk for Scala newbies, introducing five basic elements that (in my opinion) make the transition from Java to Scala a no-brainer.
Given at the 7th JJTV (Israeli Java/JVM user group) tool night, July 2nd, 2013.
This document discusses refactoring Scala code to improve quality and maintainability. It provides examples of issues like stringly typed code, abuse of collections, and poor scoping. The presentation recommends addressing these by using case classes instead of tuples, parsing values instead of passing raw strings, giving intermediate steps meaningful names, and separating logic and data through traits or type classes. Well-scoped code with a small public API and private implementation details is emphasized.
The document discusses Scala as a potential replacement for Java on the JVM. It provides quotes from several influential Java developers who express their view that Scala is the most capable replacement for Java currently available on the JVM, and the momentum behind Scala is growing. The document also briefly outlines an agenda for introducing Scala, covering basic syntax, patterns, functions, classes and traits.
Knolx Session : Built-In Control Structures in ScalaAyush Mishra
Scala has only a handful of built-in control structures including if, while, for, try, match, and function calls. These control structures can be used in both an imperative style by modifying program state, as well as a functional style by returning new values. For example, a for loop can iterate over a sequence and return a new collection with the results of the body expression.
This document provides an overview of Scala concepts and syntax for a Scala workshop. It discusses setting up the development environment, explaining basic Scala concepts like variables, functions, lists, classes, traits, and exceptions. It also outlines the workshop agenda which includes forming pairs, labs, and knowledge sharing.
The document discusses Scala and why some developers think it could replace Java on the JVM. It provides quotes from several influential developers, including the creator of Java and Groovy, expressing their view that Scala is the best candidate to replace Java in the long run. Specifically, James Gosling says that if he had to pick another language on the JVM besides Java, it would be Scala. Charlie Nutter describes Scala as the current heir apparent to the Java throne and the momentum behind Scala is now unquestionable. James Strachan says that if he had seen the Programming in Scala book in 2003, he may have never created Groovy and that his tip for a long term replacement for Java is
The document discusses how to rewrite Java code in Scala by taking advantage of Scala's functional programming features like case classes, pattern matching, filters, maps, folds, and generators to make the code more concise and readable. It provides examples of rewriting common Java constructs like filtering lists, mapping over lists, and reducing lists using these Scala features.
This document provides an overview of the Scala programming language, including what it is, its toolchain, basic syntax examples comparing it to Java, built-in support for XML, actors, and advantages and disadvantages. Scala is an object-functional language that runs on the JVM and is intended to be a "better Java". It has features like XML support, an actor model for concurrency, and combines object-oriented and functional programming paradigms, but its ecosystem and compiler can be slow and syntax for some functional features is verbose.
The document provides an overview of the Scala programming language. It begins with an agenda that outlines topics like differences between Java and Scala, Scala data types, variables, classes, functions, closures, exception handling and collections. It then discusses specific aspects of Scala like verbosity reduction compared to Java, functional programming influences, object-oriented features, interoperability with Java and compilation to Java bytecode. Examples are provided to illustrate Scala concepts like functions, classes, recursion, higher-order functions and exception handling. The document aims to explain Scala and reasons for differences from Java.
Day 1 covered variables, methods, classes, tuples, options, functions, pattern matching, traits and the schedule for the rest of the day which includes higher order functions, implicit conversions, XML support and building a quiz game.
This document provides an introduction to the Scala programming language. It discusses what Scala is, how to get started, basic concepts like mutability and functions, and Scala features like classes, traits, pattern matching, and collections. Scala combines object-oriented and functional programming. It runs on the Java Virtual Machine and is compatible with Java. The document provides code examples to demonstrate Scala concepts and features.
Many developers will be familiar with lex, flex, yacc, bison, ANTLR, and other related tools to generate parsers for use inside their own code. For recognizing computer-friendly languages, however, context-free grammars and their parser-generators leave a few things to be desired. This is about how the seemingly simple prospect of parsing some text turned into a new parser toolkit for Erlang, and why functional programming makes parsing fun and awesome
Scala is a programming language that runs on the Java Virtual Machine (JVM) and is designed to express common programming patterns in a concise, elegant, and type-safe way. Some key points about Scala include that it is functional and object-oriented, statically typed, and allows seamless integration with Java. Scala code is often more concise than equivalent Java code through features like pattern matching and immutable data structures. Functional programming principles like pure functions, recursion, and avoiding side effects are emphasized in Scala.
An Introduction to Scala for Java DevelopersMiles Sabin
The document provides an introduction to Scala for Java developers. It outlines key features of Scala including cleaning up Java syntax, going beyond Java with features like case classes, traits, and pattern matching, and its functional focus including support for higher-order functions, the Option type, and for comprehensions. The document also briefly discusses the Scala IDE for Eclipse.
BCS SPA 2010 - An Introduction to Scala for Java DevelopersMiles Sabin
This document provides an introduction to Scala for Java developers. It outlines how Scala cleans up Java syntax by making semi-colons optional, using == for equals and eq for reference equality, and allowing periods to be omitted. It also describes how Scala goes beyond Java by supporting features like case classes, pattern matching, named and default arguments, and mixin composition with traits. The document provides examples of using these features and explains how Scala seamlessly interoperates with Java.
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.
The document provides an overview of key differences between Python and Scala. Some key points summarized:
1. Python is a dynamically typed, interpreted language while Scala is statically typed and compiles to bytecode. Scala supports both object-oriented and functional programming paradigms.
2. Scala has features like case classes, traits, and pattern matching that Python lacks. Scala also has features like type parameters, implicit conversions, and tail call optimization that Python does not support natively.
3. Common data structures like lists and maps are implemented differently between the languages - Scala uses immutable Lists while Python uses mutable lists. Scala also has features like lazy vals.
4. Control
Выступление в рамках спецкурса "Немейнстримовые технологии разработки", читаемого в НГУ. http://bit.ly/mainstreamless
Аудио дорожка работает, но нужно иметь некоторое терпение, так как грузится она не моментально.
Lazy Java by Mario Fusco
Like all imperative languages Java is, with some minor but notable exceptions, an eagerly evaluated programming language. Nevertheless the introduction of lambdas in Java 8 also allowed the adoption of some lazy patterns and data structures that are more typically employed in functional languages. Streams represent the most evident example of how also native Java API has taken advantage of laziness, but there is a number of other interesting scenarios where laziness can be an effective solution to quite common problems. In fact laziness is the only possible technique to process potentially infinite amount of data, or more in general to delay the expensive evaluation of an expression only when and if it is necessary. But laziness is even more than that: for instance the reader monad delays not only a computation but also the need of external dependencies thus lowering the abuse of dependency injection, while a trampoline uses laziness to delay and then linearize recursive calls preventing the overflow of the stack. The purpose of this talk is illustrating why and how implementing laziness in Java with practical examples delivered with both slides and live coding sessions.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfChart Kalyan
A Mix Chart displays historical data of numbers in a graphical or tabular form. The Kalyan Rajdhani Mix Chart specifically shows the results of a sequence of numbers over different periods.
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on integration of Salesforce with Bonterra Impact Management.
Interested in deploying an integration with Salesforce for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Ivanti’s Patch Tuesday breakdown goes beyond patching your applications and brings you the intelligence and guidance needed to prioritize where to focus your attention first. Catch early analysis on our Ivanti blog, then join industry expert Chris Goettl for the Patch Tuesday Webinar Event. There we’ll do a deep dive into each of the bulletins and give guidance on the risks associated with the newly-identified vulnerabilities.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Digital Marketing Trends in 2024 | Guide for Staying AheadWask
https://www.wask.co/ebooks/digital-marketing-trends-in-2024
Feeling lost in the digital marketing whirlwind of 2024? Technology is changing, consumer habits are evolving, and staying ahead of the curve feels like a never-ending pursuit. This e-book is your compass. Dive into actionable insights to handle the complexities of modern marketing. From hyper-personalization to the power of user-generated content, learn how to build long-term relationships with your audience and unlock the secrets to success in the ever-shifting digital landscape.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
2. whoami
Author of Scala for Java Refugees
and other articles on Scala and FP
Former editor Javalobby / EclipseZone
Engaged in academic research
involving Scala DSLs and text parsing
(ScalaBison, GLL
Combinators, ScalaQL)
3. Agenda
Define “functional programming” (sort
of)
See some common elements of FP
Motivate why this stuff is useful in the
real world (hopefully)
Show practical functional techniques
and design patterns
Explain monads!
Hopefully pique your interest in
learning and applying more of this
7. Definitions
Q: What is “purely-functional”?
◦ Everything is immutable (no variables)
8. Definitions
Q: What is “purely-functional”?
◦ Everything is immutable (no variables)
◦ Absolutely no side-effects
println(quot;Hello, World!quot;)
9. Definitions
Q: What is “purely-functional”?
◦ Everything is immutable (no variables)
◦ Absolutely no side-effects
◦ Referential transparency
10. Definitions
Q: What is “purely-functional”?
◦ Everything is immutable (no variables)
◦ Absolutely no side-effects
◦ Referential transparency
◦ Bondage discipline?
11. Definitions
Scala is not purely-functional
◦ vars
◦ Mutable collections
◦ Uncontrolled side-effects (println)
12. Definitions
Scala is not purely-functional
◦ vars
◦ Mutable collections
◦ Uncontrolled side-effects (println)
Is Scala a “functional language”?
16. Functional Trademarks
Higher-order functions
Closures are anonymous functions
◦ Ruby, Groovy, Python; none of these
count!
Singly-linked immutable lists (cons
cells)
val names = quot;Chrisquot; :: quot;Joequot; :: Nil
val names2 = quot;Danielquot; :: names
17. Functional Trademarks
Higher-order functions
Closures are anonymous functions
◦ Ruby, Groovy, Python; none of these
count!
Singly-linked immutable lists (cons
cells)
Usually some form of type-inference
val me = quot;Danielquot;
// equivalent to...
val me: String = quot;Danielquot;
18. Functional Trademarks
Higher-order functions
Closures are anonymous functions
◦ Ruby, Groovy, Python; none of these
count!
Singly-linked immutable lists (cons
cells)
Usually some form of type-inference
foreach { s => println(s) }
19. Functional Trademarks
Higher-order functions
Closures are anonymous functions
◦ Ruby, Groovy, Python; none of these
count!
Singly-linked immutable lists (cons
cells)
Usually some form of type-inference
Immutable by default (or encouraged)
val me = quot;Danielquot;
var me = quot;Danielquot;
20. What does this buy you?
Modularity (separation of concerns)
Understandability
No more “spooky action at a distance”
…
21. What does this buy you?
public class Company {
private List<Person> employees;
public List<Person> getEmployees() {
return employees;
}
public void addEmployee(Person p) {
if (p.isAlive()) {
employees.add(p);
}
}
}
22. What does this buy you?
Modularity (separation of concerns)
Understandability
No more “spooky action at a distance”
Flexible libraries (more on this later)
Syntactic power (internal DSLs)
23. What does this buy you?
quot;vectorquot; should {
quot;store a single elementquot; in {
val prop = forAll { (i: Int, e: Int) =>
i >= 0 ==> { (vector(0) = e)(0) mustEqual e }
}
prop must pass
}
quot;implement lengthquot; in {
val prop = forAll { list: List[Int] =>
val vec = Vector(list:_*)
vec.length mustEqual list.length
}
prop must pass
}
}
24. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
25. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
def factorial(n: Int) = {
var back = 1
for (i <- 1 to n) {
back *= i
}
back
}
26. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
def factorial(n: Int): Int = {
if (n == 1)
1
else
n * factorial(n - 1)
}
27. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
def factorial(n: Int) = {
def loop(n: Int, acc: Int): Int = {
if (n == 1)
acc
else
loop(n - 1, acc * n)
}
loop(n, 1)
}
28. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
Higher-order functions instead of
recursion
29. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
Higher-order functions instead of
recursion
Combinators instead of higher-order
functions
30. Functional Idioms
Recursion instead of loops
◦ Scala helps with this by allowing methods
within methods
Higher-order functions instead of
recursion
Combinators instead of higher-order
functions
Monads!
31. Example #1
Retrieve structured, formatted data from
across multiple .properties files
and multiple keys within those files.
# daniel.properties # tim.properties
name.first = Daniel name.first = Timothy
name.last = Spiewak name.last = Olmsted
age = 21 age = 22
33. def toInt(s: String) = try {
s.toInt
} catch {
case _ => null
}
// uninteresting and ugly
def readFile(file: String): Map[String, String] = {
import collection.jcl.Hashtable
try {
val is = new BufferedInputStream(new FileInputStream(file))
val p = new Properties
p.load(is)
is.close()
new Hashtable(p).asInstanceOf[Hashtable[String, String]]
} catch {
case _ => null
}
}
34. import collection.mutable.ListBuffer
def readPeople(files: List[String]): List[Person] = {
val back = new ListBuffer[Person]
for (file <- files) {
val props = readFile(file)
if (props != null) {
if (props.contains(quot;name.firstquot;) &&
props.contains(quot;name.lastquot;) &&
props.contains(quot;agequot;)) {
val age = toInt(props(quot;agequot;))
if (age != null)
back += new Person(props(quot;name.firstquot;),
props(quot;name.lastquot;), age)
}
}
}
back.toList
}
36. def readPeople(files: List[String]): List[Person] = files match {
case file :: tail => {
val props = readFile(file)
val back = if (props != null) {
if (props.contains(quot;name.firstquot;) &&
props.contains(quot;name.lastquot;) &&
props.contains(quot;agequot;)) {
val age = toInt(props(quot;agequot;))
if (age != null)
new Person(props(quot;name.firstquot;), props(quot;name.lastquot;), age)
else
null
} else null
} else null
if (back != null)
back :: readPeople(tail)
else
readPeople(tail)
}
case Nil => Nil
}
38. def readPeople(files: List[String]): List[Person] = {
files.foldRight(List[String]()) { (file, people) =>
val props = readFile(file)
val back = if (props != null) {
if (props.contains(quot;name.firstquot;) &&
props.contains(quot;name.lastquot;) &&
props.contains(quot;agequot;)) {
val age = toInt(props(quot;agequot;))
if (age != null)
new Person(props(quot;name.firstquot;), props(quot;name.lastquot;), age)
else
null
} else null
} else null
if (back != null)
back :: people
else
people
}
}
43. def readPeople(files: List[String]) = {
import Function._
files flatMap readFile flatMap { props =>
val fNames = props get quot;name.firstquot;
val names = fNames flatMap {
(_, props get quot;name.lastquot;)
}
val data = names flatMap {
case (fn, ln) =>
(fn, ln, props get quot;agequot; map toInt)
}
data map tupled(new Person _)
}
}
44. What did we just see?
foldLeft / foldRight
◦ Catamorphisms
◦ Use when you want to reduce all of the
elements of a collection into a single
result
◦ Capable of almost anything!
45. What did we just see?
foldLeft / foldRight
def sum(nums: List[Int]) = {
nums.foldLeft(0) { (x, y) =>
x + y
}
}
46. What did we just see?
foldLeft / foldRight
def sum(nums: List[Int]) = {
nums.foldLeft(0) { _ + _ }
}
47. What did we just see?
foldLeft / foldRight
def sum(nums: List[Int]) = {
(0 /: nums) { _ + _ }
}
48. What did we just see?
foldLeft / foldRight
map
◦ Use when you want to transform every
element of a collection, leaving the results
in the corresponding location within a new
collection
49. What did we just see?
foldLeft / foldRight
map
val nums = List(quot;1quot;, quot;2quot;, quot;3quot;, quot;4quot;, quot;5quot;)
nums map { str => str.toInt }
50. What did we just see?
foldLeft / foldRight
map
val nums = List(quot;1quot;, quot;2quot;, quot;3quot;, quot;4quot;, quot;5quot;)
nums map { _.toInt }
51. What did we just see?
foldLeft / foldRight
map
flatMap (has two meanings)
◦ Collections: Use when you want to
transform every element optionally
◦ Monads: Should have really been called
“bind” (or >>=). More later…
52. What did we just see?
foldLeft / foldRight
map
flatMap (has two meanings)
def toCharArray(arr: Array[String]) = {
arr flatMap { _.toCharArray }
}
toCharArray(Array(quot;Danielquot;, quot;Spiewakquot;))
// =>
Array('D', 'a', 'n', 'i', 'e', 'l',
'S', 'p', 'i', 'e', 'w', 'a', 'k')
53. Other Common Util Methods
filter (used in for-comprehensions)
val nums = List(1, 2, 3, 4, 5)
nums filter { _ % 2 == 0 }
54. Other Common Util Methods
filter (used in for-comprehensions)
val nums = List(1, 2, 3, 4, 5)
nums filter (0 == 2 %)
55. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
val evens = List(2, 4, 6)
val odds = List(1, 3, 5)
evens zip odds
// =>
List((1, 2), (3, 4), (5, 6))
56. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
forall and exists
val nums = List(1, 2, 3, 4, 5)
nums forall { _ % 2 == 0 } // => false
57. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
forall and exists
val nums = List(1, 2, 3, 4, 5)
nums exists { _ % 2 == 0 } // => true
58. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
forall and exists
take and drop
val nums = List(5, 4, 3, 2, 1)
nums take 2
// =>
List(5, 4)
59. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
forall and exists
take and drop
val nums = List(5, 4, 3, 2, 1)
nums drop 2
// =>
List(3, 2, 1)
60. Other Common Util Methods
filter (used in for-comprehensions)
zip / zipWithIndex
◦ zipWith (not available pre-2.8.0)
forall and exists
take and drop
foreach
val names = List(quot;Danielquot;, quot;Chrisquot;)
names foreach println
61. Example #2
Comparing the prefix of a List[Char]
to a given string.
List[Char] String Result
List('d', 'a', 'n', 'i', 'e', 'l') quot;danquot; true
List('d', 'a', 'n', 'i', 'e', 'l') quot;ielquot; false
List('t', 'e', 's', 't') quot;testingquot; false
List('t', 'e', 's', 't') quot;testquot; true
62. def isPrefix(chars: List[Char], str: String) = {
if (chars.lengthCompare(str.length) < 0) {
false
} else {
val trunc = chars take str.length
trunc.zipWithIndex forall {
case (c, i) => c == str(i)
}
}
}
63. More About Combinators
The “Essence of Functional
Programming”
Combine simple things to solve
complex problems
Very high level
Think about Lego™ bricks
64. More About Combinators
The best example: Parser
Combinators
def expr: Parser[Int] = (
num ~ quot;+quot; ~ expr ^^ { case (x, _, y) => x + y }
| num ~ quot;-quot; ~ expr ^^ { case (x, _, y) => x - y }
| num
)
def num = quot;quot;quot;d+quot;quot;quot;.r ^^ { _.toInt }
65. More About Combinators
The best example: Parser
Combinators
def expr: Parser[Int] = (
num ~ quot;+quot; ~ expr ^^ { case (x, _, y) => x + y }
| num ~ quot;-quot; ~ expr ^^ { case (x, _, y) => x - y }
| num
)
def num = quot;quot;quot;d+quot;quot;quot;.r ^^ { _.toInt }
expr(quot;12 + 7 - 4quot;) // => Success(15)
expr(quot;42quot;) // => Success(42)
67. More About Combinators
Three Types of Combinators
◦ Sequential (first a, then b)
◦ Disjunctive (either a, or b)
a | b
68. More About Combinators
Three Types of Combinators
◦ Sequential (first a, then b)
◦ Disjunctive (either a, or b)
◦ Literal (exactly foo)
quot;fooquot;
69. More About Combinators
Three Types of Combinators
◦ Sequential (first a, then b)
◦ Disjunctive (either a, or b)
◦ Literal (exactly foo)
Note: Our example uses a regular
expression parser, but that is only a
generalization of the literal parser
70. More About Combinators
Seldom created, often used
Good for problems which split into
smaller sub-problems
72. March of the Monads
Monads are not scary
Monad explanations are scary
73. March of the Monads
Monads are little containers for
encapsulating something
◦ What the “something” is depends on the
monad
An instance of a monad can be
“bound” together with another instance
of that monad
Most combinators are monads
74. March of the Monads
All monads have
◦ A type constructor
class Option[A] { … }
◦ A single-argument constructor
new Some(quot;one to watch over mequot;)
◦ A flatMap method which behaves
properly
a flatMap { v => v.next }
76. March of the Monads
Option
◦ This is what the Groovy folks really wanted
when they designed the “Elvis Operator”
Parser
◦ Sequential parser is really two bound
parsers
◦ Disjunctive parser uses an optional
monadic function: orElse
◦ Literal parser is the one-argument
constructor
Function1 (sort of)
◦ We could say that function composition is
77. Learn More
Read my blog! :-)
◦ http://www.codecommit.com/blog
Some better sources…
◦ http://apocalisp.wordpress.com/
◦ http://michid.wordpress.com/
◦ http://joelneely.wordpress.com/
◦ http://scala-blogs.org
A really good paper…
◦ Monadic Parser Combinators
(1996; Hutton, Meijer)