This document discusses streaming and input/output (I/O) actions in Haskell. It explains that I/O actions fetch values from the outside world and can only be handled in an impure environment using the <- operator. Various I/O functions are presented, including reading and writing files lazily using readFile and putStr, as well as getting user input from the command line with getLine.
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
These are the outline slides that I used for the Pune Clojure Course.
The slides may not be much useful standalone, but I have uploaded them for reference.
Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.
The event will be led by Zoltan Domahidi (Senior Kotlin Software Engineer at Magyar Telekom).
Reactive Programming in the Browser feat. Scala.js and PureScriptLuka Jacobowitz
Creating User Interfaces has traditionally been a mostly imperative matter and building UIs in a functional way has never really been easy. In this talk we’ll learn how to build UIs using only pure functions with the help of Reactive Programming and Scala.js or PureScript. We will take a look at the strengths and weaknesses of each languages, explore OutWatch, a new UI Library based on Rx, look at what works well, identify more challenging tasks and unlock the full potential of functional design and type safety with functional programming in the browser.
The GPars (Groovy Parallel Systems) project provides multiple abstractions for concurrent, parallel programming in Groovy and Java. Rather than dealing directly with threads, synchronization, and locks, or even the java.util.concurrent classes added in Java 5, the project allows you to think in terms of actors, data flows, or composable asynchronous functions (to name a few).
In this talk, I covered the basics of GPars, including what it's like to learn to use it. Although I've done a fair amount of concurrent programming, I've just started using GPars. As such, this talk should be suitable for Groovy beginners.
Javascript foundations: Function modulesJohn Hunter
This presentation forms part of a tutorial on learning Javascript foundations. It introduces the Function module - a pattern for creating objects with private members.
A JavaScript function is a block of code designed to perform a particular task.
Why Functions?
You can reuse code: Define the code once, and use it many times. You can use the same code many times with different arguments, to produce different results.
Java 8 Stream API and RxJava ComparisonJosé Paumard
The slides of my JavaOne talk: Java 8 Stream API and RxJava Comparison: Patterns and Performances.
The spliterators patterns can be found here: https://github.com/JosePaumard/jdk8-spliterators.
Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.
The event will be led by Zoltan Domahidi (Senior Kotlin Software Engineer at Magyar Telekom).
Reactive Programming in the Browser feat. Scala.js and PureScriptLuka Jacobowitz
Creating User Interfaces has traditionally been a mostly imperative matter and building UIs in a functional way has never really been easy. In this talk we’ll learn how to build UIs using only pure functions with the help of Reactive Programming and Scala.js or PureScript. We will take a look at the strengths and weaknesses of each languages, explore OutWatch, a new UI Library based on Rx, look at what works well, identify more challenging tasks and unlock the full potential of functional design and type safety with functional programming in the browser.
The GPars (Groovy Parallel Systems) project provides multiple abstractions for concurrent, parallel programming in Groovy and Java. Rather than dealing directly with threads, synchronization, and locks, or even the java.util.concurrent classes added in Java 5, the project allows you to think in terms of actors, data flows, or composable asynchronous functions (to name a few).
In this talk, I covered the basics of GPars, including what it's like to learn to use it. Although I've done a fair amount of concurrent programming, I've just started using GPars. As such, this talk should be suitable for Groovy beginners.
Javascript foundations: Function modulesJohn Hunter
This presentation forms part of a tutorial on learning Javascript foundations. It introduces the Function module - a pattern for creating objects with private members.
A JavaScript function is a block of code designed to perform a particular task.
Why Functions?
You can reuse code: Define the code once, and use it many times. You can use the same code many times with different arguments, to produce different results.
Java 8 Stream API and RxJava ComparisonJosé Paumard
The slides of my JavaOne talk: Java 8 Stream API and RxJava Comparison: Patterns and Performances.
The spliterators patterns can be found here: https://github.com/JosePaumard/jdk8-spliterators.
Twins: Object Oriented Programming and Functional ProgrammingRichardWarburton
Object-Oriented Programming has well established design principles, such as SOLID. For many developers architecture and functional programming are at odds with each other: they don’t know how their existing tricks of the trade convert into functional design. This problem becomes worse as hybrid languages such as Java 8 or Scala become common. We’ll talk about how functional programming helps you implement the SOLID principles, and how a functional mindset can actually help you achieve cleaner and simpler OO design.
The idea of this talk is presenting the Golang functional features, the pros e cons of apply functional paradigm in Golang. Do you want to improve readability and maintainability of your code using more functional paradigms? So, come on and let's have a fun time together!
Check out these exercises: http://de.slideshare.net/nicolayludwig/3-cpp-procedural-programmingexercises
- Procedural Programming
- Predefined and User defined Functions
- Declaration and Definition of Functions
- Procedural and recursive Function Calling
- Namespaces and separated Function Definitions
- A Glimpse of Separated Compilation and Translation Units
Scala, Haskell and LISP are examples of programming languages using the functional programming paradigm. Join us in this TechTalk to know why functional programming is so important, how to implement some of its core concepts in your existing programming languages, and how functional programming inspired Google's Map Reduce, Twitter's Algebird, and many other technologies.
By Mohammad Ghabboun - Senior Software Engineer, SOUQ.com
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
Python
Language
is uesd in engineeringStory adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
Story adapted from Stephen Covey (2004) “The Seven Habits of Highly Effective People” Simon & Schuster).
“Management is doing things right, leadership is doing the right things”
(Warren Bennis and Peter Drucker)
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they should believe the change is really going to happen.
The decision maker:
Leaders usually control resources such as people, budgets, and equipment, and thus have the authority to make decisions (as per their span of control) that affect the initiative.
During change, leaders must leverage their decision-making authority and choose the options that will support the initiative.
The Decision-Maker is decisive and sets priorities that support change.
The Sponsor:
Champion and advocates for the change at their level in the organization.
A Sponsor is the person who won’t let the change initiative die from lack of attention, and is willing to use their political capital to make the change happen
The Role model:
Behaviors and attitudes demonstrated by them are looked upon by everyone else. . Hence, they must be willing to go first.
Employees watch leaders for consistency between words and actions to see if they s
Conférence des Geeks Anonymes sur " le langage Go ", par Thomas Hayen le 23 septembre 2020.
Cette conférence est disponible en vidéo sur Youtube : https://youtu.be/AlGGneVGTJk
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Welocme to ViralQR, your best QR code generator.ViralQR
Welcome to ViralQR, your best QR code generator available on the market!
At ViralQR, we design static and dynamic QR codes. Our mission is to make business operations easier and customer engagement more powerful through the use of QR technology. Be it a small-scale business or a huge enterprise, our easy-to-use platform provides multiple choices that can be tailored according to your company's branding and marketing strategies.
Our Vision
We are here to make the process of creating QR codes easy and smooth, thus enhancing customer interaction and making business more fluid. We very strongly believe in the ability of QR codes to change the world for businesses in their interaction with customers and are set on making that technology accessible and usable far and wide.
Our Achievements
Ever since its inception, we have successfully served many clients by offering QR codes in their marketing, service delivery, and collection of feedback across various industries. Our platform has been recognized for its ease of use and amazing features, which helped a business to make QR codes.
Our Services
At ViralQR, here is a comprehensive suite of services that caters to your very needs:
Static QR Codes: Create free static QR codes. These QR codes are able to store significant information such as URLs, vCards, plain text, emails and SMS, Wi-Fi credentials, and Bitcoin addresses.
Dynamic QR codes: These also have all the advanced features but are subscription-based. They can directly link to PDF files, images, micro-landing pages, social accounts, review forms, business pages, and applications. In addition, they can be branded with CTAs, frames, patterns, colors, and logos to enhance your branding.
Pricing and Packages
Additionally, there is a 14-day free offer to ViralQR, which is an exceptional opportunity for new users to take a feel of this platform. One can easily subscribe from there and experience the full dynamic of using QR codes. The subscription plans are not only meant for business; they are priced very flexibly so that literally every business could afford to benefit from our service.
Why choose us?
ViralQR will provide services for marketing, advertising, catering, retail, and the like. The QR codes can be posted on fliers, packaging, merchandise, and banners, as well as to substitute for cash and cards in a restaurant or coffee shop. With QR codes integrated into your business, improve customer engagement and streamline operations.
Comprehensive Analytics
Subscribers of ViralQR receive detailed analytics and tracking tools in light of having a view of the core values of QR code performance. Our analytics dashboard shows aggregate views and unique views, as well as detailed information about each impression, including time, device, browser, and estimated location by city and country.
So, thank you for choosing ViralQR; we have an offer of nothing but the best in terms of QR code services to meet business diversity!
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Free Complete Python - A step towards Data Science
05. haskell streaming io
1. Streaming, IO
Sebastian Rettig
“I/O actions are like boxes with little feet that go out and
“I/O actions are like boxes with little feet that go out and
fetch some value from the outside world for us.” ([1])
fetch some value from the outside world for us.” ([1])
2. Functional Programming
● No Variables
● Functions only, eventually stored in
Modules
– Behavior do not change, once defined
– → Function called with same parameter
calculates always the same result
● Function definitions (Match Cases)
● Recursion (Memory)
3. Haskell Features
● Pure Functional Programming Language
● Lazy Evaluation
● Pattern Matching and Guards
● List Comprehension
● Type Polymorphism
4. Functional vs. Imperative (1)
● Imperative Program:
– give the computer a series of steps to
execute
– → say the computer how to do something
to achieve the goal
● Functional Program:
– define what something is
– → don't care about the steps
5. Functional vs. Imperative (2)
● Pure function (functional):
– can not change a state (because we have
no variables → no state to change)
– can only return some result
– → call 2 times with same parameters has
always to return the same result!
– e.g.: add:: Tree a -> a -> Tree a
● returns a complete new tree, because
function can not change the state
6. Functional vs. Imperative (3)
● Imperative function:
– can change a state
→ has side-effects
– no guarantee, that function can crash the
whole program
– → take care of all possible side-effects:
● validate input
● test, test, test!
7. Nice to remember (1)
● Lambda-Functions:
– <param> <param> → <operation>
– e.g.:
● a b -> a+b
● map (x -> x+3) [2,3,4]
returns [5,6,7]
8. Nice to remember (2)
● where & let .. in:
– additional definitions
– let .. in: defines scope of usage
● let = definition
● in = scope of definition (optional)
● e.g.: add x = let a=9 in a + x
– where: has scope in whole function
● e.g.: add x = a + x
where a=9
9. Nice to remember (3)
● GHCi Commands (Interpreter):
– :t
● returns the function header (type)
● e.g.: :t tail
tail :: [a] -> [a]
– :i
● returns the function definition (interface)
● e.g.: :i tail
tail :: [a] -> [a] -- Defined in
GHC.List
10. Pure vs. Impure Functions
● haskell use pure functions
● a pure function can not change a state
● but how can we communicate with that
function?
● → we have to use impure functions
● → impure functions are for communicating
with the outside world*
(*) just a placeholder, real description in next session
11. The one and only program (1)
● let's write the first IO program:
main = putStrLn “Hello World!”
● store it in helloworld.hs
● compile instructions:
ghc --make helloworld.hs
● and execute:
./helloworld
12. The one and only program (2)
main = putStrLn “Hello World!”
● main = main entry point for IO actions
● :i main
main :: IO () -- Defined in Main
● :i putStrLn
putStrLn :: String -> IO () -- Defined
in System.IO
13. What if we want more IO
actions?
main = do
putStrLn “Say me your Name!”
name <- getLine
putStrLn $ “Hello” ++ name
● do syntax glues IO actions together
● bind operator <- binds some result to a
placeholder
● $ operator switches to right associative
14. IO Actions
● an I/O action is like a box with little feet that will go
out into the real world and do something there [1]
● the only way to open the box and get the data inside
it is to use the <- operator [1]
● IO-Functions are impure functions
– called 2 times with same parameters do not
always return the same result
● you can only handle impure data in an impure
environment
15. Bind Operator
● so what type is bind to name?
name <- getLine
– :t getLine
getLine :: IO String
– name has the type String
● ! The last action in a do-block can not be bound !
● Quiz: Is this valid?
name = “Hello” ++ getLine
● Quiz: What is test?
test <- putStrLn “Hello”
16. Include Pure Functions
● easy by using let:
main = do
putStrLn “Your First Name:”
fname <- getLine
putStrLn “Your Last Name:”
lname <- getLine
putStrLn “Your Age:”
age <- getLine
let name = fname ++ lname
daysOld = yearsToDays
putStrLn $ “You are ” ++ name ++
“ and ” ++ daysOld ++ “ Days old.”
17. Program Loop
● use return to stop:
main = do
putStrLn “Your Name:”
name <- getLine
if null name
then return ()
else do
putStrLn $ “Hello ” ++ name
main
18. File Streaming
● readFile: reads contents of a file lazy
● :t readFile
readFile :: FilePath -> IO String
● What is FilePath?
– :i FilePath
type FilePath = String -- Defined in
GHC.IO
– → FilePath is synonym for String
19. File Streaming
● e.g.:
main = do
contents <- readFile filename
putStr contents
● of course IO functions are also lazy:
main = do
contents <- readFile filename
putStr $ take 5 contents
– no matter how long the file is
20. Sources
[1] Haskell-Tutorial: Learn you a Haskell (http://learnyouahaskell.com/,
2012/03/15)
[2] The Hugs User-Manual (
http://cvs.haskell.org/Hugs/pages/hugsman/index.html, 2012/03/15)
[3] The Haskellwiki (http://www.haskell.org/haskellwiki, 2012/03/15)