This document discusses applications of functional programming languages. It analyzes algorithms, data mining, game programming, and data visualization in functional languages like Haskell, Erlang, and Clojure. For algorithms, it compares merge sort implementations in Python and Haskell. For data mining, it examines examples in Python, Haskell, and Scala and finds that functional programming is not widely used in practice. Game programming in Haskell is discussed through examples of optimizing a game for performance. Data visualization challenges in functional languages involve representing tree and graph structures. In conclusion, while functional programming fits some applications well, it has not seen broad real-world adoption likely due to its restrictions compared to mainstream languages.
this presentation is an introduction to R programming language.we will talk about usage, history, data structure and feathers of R programming language.
Workshop presentation hands on r programmingNimrita Koul
This document provides an overview of the R programming language. It discusses that R is an environment for statistical computing and graphics. It includes conditionals, loops, user defined functions, and input/output facilities. The document describes how to download and install R and RStudio. It also covers key R features such as objects, classes, vectors, matrices, lists, functions, packages, graphics, and input/output.
R programming language: conceptual overviewMaxim Litvak
This is an advanced overview of the programming language R showing the concepts and paradigms used there.
Target audience: R programmers who want to see the big picture and software engineers who have a broad experience in other technologies and want to grasp how R is designed.
R is a programming language and software environment for statistical analysis and graphics. It is widely used among statisticians and data scientists. R was created by Ross Ihaka and Robert Gentleman in the early 1990s and is currently developed by the R Core Team. Key features of R include its use as a programming language, effective data handling and storage, graphical display capabilities, and large collection of statistical and machine learning packages. R is open source, has a large user community, and is often used for statistical analysis, data mining, and creating statistical graphics.
The presentation is a brief case study of R Programming Language. In this, we discussed the scope of R, Uses of R, Advantages and Disadvantages of the R programming Language.
Brief introduction to the R language and its use in large data applications. Tools and techniques for data ingestion and analytics are touched on. Packages and support for publishing research and visualizations are described.
It is one of the Best Presentation on the topic "R Programming" having interesting Slides consisting of Amazing Images & Very Useful Information. It also have Transitions & Animation which makes the Presentation more Interesting & Attractive.
Created By - Abhishek Pratap Singh (Aps)
this presentation is an introduction to R programming language.we will talk about usage, history, data structure and feathers of R programming language.
Workshop presentation hands on r programmingNimrita Koul
This document provides an overview of the R programming language. It discusses that R is an environment for statistical computing and graphics. It includes conditionals, loops, user defined functions, and input/output facilities. The document describes how to download and install R and RStudio. It also covers key R features such as objects, classes, vectors, matrices, lists, functions, packages, graphics, and input/output.
R programming language: conceptual overviewMaxim Litvak
This is an advanced overview of the programming language R showing the concepts and paradigms used there.
Target audience: R programmers who want to see the big picture and software engineers who have a broad experience in other technologies and want to grasp how R is designed.
R is a programming language and software environment for statistical analysis and graphics. It is widely used among statisticians and data scientists. R was created by Ross Ihaka and Robert Gentleman in the early 1990s and is currently developed by the R Core Team. Key features of R include its use as a programming language, effective data handling and storage, graphical display capabilities, and large collection of statistical and machine learning packages. R is open source, has a large user community, and is often used for statistical analysis, data mining, and creating statistical graphics.
The presentation is a brief case study of R Programming Language. In this, we discussed the scope of R, Uses of R, Advantages and Disadvantages of the R programming Language.
Brief introduction to the R language and its use in large data applications. Tools and techniques for data ingestion and analytics are touched on. Packages and support for publishing research and visualizations are described.
It is one of the Best Presentation on the topic "R Programming" having interesting Slides consisting of Amazing Images & Very Useful Information. It also have Transitions & Animation which makes the Presentation more Interesting & Attractive.
Created By - Abhishek Pratap Singh (Aps)
A short tutorial on R, basically for a starter who wants to do data mining especially text data mining.
Related codes and data will be found at the following lnik: http://textanalytics.in/wm/R%20tutorial%20(DATA2014).zip
R is a statistical and graphical programming language that is easy to use and powerful. It is free and exists on many platforms. The number of R users has been growing substantially each year as it has become the lingua franca of data science. R allows for data import, analysis, and visualization through functions, packages, and libraries. Common data types in R include vectors, matrices, data frames, factors, and lists which allow for storing and manipulating different types of data.
R is a free statistical programming language and software environment used for statistical analysis and graphics. It was originally based on S, a programming language developed at Bell Labs in the 1970s for statistical analysis. R can be used for data manipulation, calculation, and graphical displays. It includes functions for topics like linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, and graphical techniques.
This document discusses the Lisp programming language. It provides an introduction to Lisp, describes some of its key features like rich arithmetic, generic functions, and macros. It explains that Lisp is well-suited for artificial intelligence programs. The document also gives some examples of Lisp code and applications that use Lisp like Yahoo Store, AutoCAD, and Emacs.
This short text will get you up to speed in no time on creating visualizations using R's ggplot2 package. It was developed as part of a training to those who had no prior experience in R and had limited knowledge on general programming concepts. It's a must have initial guide for those exploring the field of Data Science
Given what a beautiful and mature functional programming language R is, there is a surprising, though understandable, lack of visibility of functional programming techniques in R. This is a talk given to the Mumbai R meetup group in October/November, 2014, meant to introduce the audience to Functional Programming in R.
R is a programming language and software environment for statistical analysis, graphics, and reporting. It was created at the University of Auckland for statistical analysis and graphics. R provides tools for data analysis including statistical functions, data handling, graphical display, and importing/exporting data from other programs like Excel. Some key data types in R are vectors, lists, matrices, and data frames. R can also perform regression analysis and create graphical outputs like pie charts, bar plots, and histograms.
R is a programming language and software environment for statistical analysis, graphics representation and reporting. Are You Interested to Learning R Programming in Best Institute Join Besant Technologies in Bangalore.
This document summarizes a seminar presentation on the R programming language. It begins with an introduction to R's history and features. Key points covered include that R is a functional programming language developed for statistical analysis. It has a large number of built-in statistical functions and packages. The document then discusses R packages, graphical user interfaces, getting started with basic objects and functions, and programming features like flow control and functions. Examples are provided. Reasons for using R include its matrix calculation, data visualization and statistical analysis capabilities. Comparisons are made to other languages like Python and Java. The document concludes that R has become a high-quality open-source software for statistical computing and graphics.
A relatively short Introduction to R as presented at the Belgian Software Craftmanship meetup group.
The goal of this presentation is to give you an introduction to:
• The style of the language
• It's ecosystem
• How common things like data manipulation and visualization work
• How to use it for machine learning
• Webdevelopment and report generation in R
• Integrating R in your system
License:
Introduction To R by Samuel Bosch
To the extent possible under law, the person who associated CC0 with Introduction To R has waived all copyright and related or neighboring rights
to Introduction To R.
http://creativecommons.org/publicdomain/zero/1.0/
BASIC was originally created in 1963 as a teaching language to simplify programming. It has influenced computer science education and raised the need for coding knowledge. R is a free statistical programming language used for data analysis, modeling, and visualization. It includes many statistical and machine learning methods. UNIX was developed in the late 1960s and became widely used, while Linux is an open-source OS inspired by UNIX. Both operate using commands in a terminal rather than a graphical user interface.
Basic tutorial for R programming. this video contains lot of information about r programming like
agenda
history
SOFTWARE PARADIGM
R interface
advantages of r
drawbacks of r
This document provides an introduction to the basics of R programming. It begins with quizzes to assess the reader's familiarity with R and related topics. It then covers key R concepts like data types, data structures, importing and exporting data, control flow, functions, and parallel computing. The document aims to equip readers with fundamental R skills and directs them to online resources for further learning.
The document introduces R programming and data analysis. It covers getting started with R, data types and structures, exploring and visualizing data, and programming structures and relationships. The aim is to describe in-depth analysis of big data using R and how to extract insights from datasets. It discusses importing and exporting data, data visualization, and programming concepts like functions and apply family functions.
This document provides an introduction to using R Studio for statistical analysis. It discusses how to install both R and R Studio on Windows and Mac systems. It then covers creating scripts and files in R Studio, basic R syntax including assigning values to variables, vectors, and strings. The document also demonstrates how to install and load packages to access additional functions, and how to access built-in datasets to practice working with data in R.
The R language is a project designed to create a free, open source language which can be used as a replacement for the S-PLUS language, originally developed as the S language at AT&T Bell Labs, and currently marketed by Insightful Corporation of Seattle, Washington. R is an open source implementation of S, and differs from S-plus largely in its command-line only format.
Topics Covered:
1.Introduction to R
2.Installing R
3.Why Learn R
4.The R Console
5.Basic Arithmetic and Objects
6.Program Example
7.Programming with Big Data in R
8.Big Data Strategies in R
9.Applications of R Programming
10.Companies Using R
11.What R is not so good at
12.Conclusion
R is a programming language for statistical analysis and graphics. It is an open-source language developed by statisticians to allow for easy statistical analysis and visualization of data. The document provides an overview of R, discussing its origins, functionality, uses in data science, and popular packages and IDEs used with R. Examples are given of basic R syntax for vectors, matrices, data frames, plotting, and applying functions to data.
R is a statistical computing and graphics language used for statistical development and data analysis. It provides effective data handling, storage, and reporting with a wide range of statistical and graphical techniques. Some key features of R include its open source nature, large community support through CRAN, and ability to handle complex mathematical formulas and statistical tests easily. However, R also has a steep learning curve and some available packages can be buggy. Common R objects include vectors, lists, matrices, arrays, factors, and data frames to store and manipulate tabular data.
R is a programming language and software environment for statistical analysis and graphics. It was created by Ross Ihaka and Robert Gentleman in the early 1990s at the University of Auckland, New Zealand. Some key points:
- R can be used for statistical computing, machine learning, and data analysis. It is widely used among statisticians and data scientists.
- It runs on Windows, Mac OS, and Linux. The source code is published under the GNU GPL license.
- Popular companies like Facebook, Google, Microsoft, Uber and Airbnb use R for data analysis, machine learning, and statistical computing.
- R has a variety of data structures like vectors, matrices, arrays, lists
R is a programming language and free software environment for statistical analysis and graphics. It is widely used among statisticians and data scientists for developing statistical software and data analysis. Some key facts about R:
- It was created in the 1990s by Ross Ihaka and Robert Gentleman at the University of Auckland.
- R can be used for statistical computing, machine learning, graphical display, and other tasks related to data analysis.
- It runs on Windows, Linux, and MacOS operating systems. Code written in R is cross-platform.
- R has a large collection of statistical and graphical techniques built-in, and users can extend its capabilities by downloading additional packages.
- Major
A short tutorial on R, basically for a starter who wants to do data mining especially text data mining.
Related codes and data will be found at the following lnik: http://textanalytics.in/wm/R%20tutorial%20(DATA2014).zip
R is a statistical and graphical programming language that is easy to use and powerful. It is free and exists on many platforms. The number of R users has been growing substantially each year as it has become the lingua franca of data science. R allows for data import, analysis, and visualization through functions, packages, and libraries. Common data types in R include vectors, matrices, data frames, factors, and lists which allow for storing and manipulating different types of data.
R is a free statistical programming language and software environment used for statistical analysis and graphics. It was originally based on S, a programming language developed at Bell Labs in the 1970s for statistical analysis. R can be used for data manipulation, calculation, and graphical displays. It includes functions for topics like linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, and graphical techniques.
This document discusses the Lisp programming language. It provides an introduction to Lisp, describes some of its key features like rich arithmetic, generic functions, and macros. It explains that Lisp is well-suited for artificial intelligence programs. The document also gives some examples of Lisp code and applications that use Lisp like Yahoo Store, AutoCAD, and Emacs.
This short text will get you up to speed in no time on creating visualizations using R's ggplot2 package. It was developed as part of a training to those who had no prior experience in R and had limited knowledge on general programming concepts. It's a must have initial guide for those exploring the field of Data Science
Given what a beautiful and mature functional programming language R is, there is a surprising, though understandable, lack of visibility of functional programming techniques in R. This is a talk given to the Mumbai R meetup group in October/November, 2014, meant to introduce the audience to Functional Programming in R.
R is a programming language and software environment for statistical analysis, graphics, and reporting. It was created at the University of Auckland for statistical analysis and graphics. R provides tools for data analysis including statistical functions, data handling, graphical display, and importing/exporting data from other programs like Excel. Some key data types in R are vectors, lists, matrices, and data frames. R can also perform regression analysis and create graphical outputs like pie charts, bar plots, and histograms.
R is a programming language and software environment for statistical analysis, graphics representation and reporting. Are You Interested to Learning R Programming in Best Institute Join Besant Technologies in Bangalore.
This document summarizes a seminar presentation on the R programming language. It begins with an introduction to R's history and features. Key points covered include that R is a functional programming language developed for statistical analysis. It has a large number of built-in statistical functions and packages. The document then discusses R packages, graphical user interfaces, getting started with basic objects and functions, and programming features like flow control and functions. Examples are provided. Reasons for using R include its matrix calculation, data visualization and statistical analysis capabilities. Comparisons are made to other languages like Python and Java. The document concludes that R has become a high-quality open-source software for statistical computing and graphics.
A relatively short Introduction to R as presented at the Belgian Software Craftmanship meetup group.
The goal of this presentation is to give you an introduction to:
• The style of the language
• It's ecosystem
• How common things like data manipulation and visualization work
• How to use it for machine learning
• Webdevelopment and report generation in R
• Integrating R in your system
License:
Introduction To R by Samuel Bosch
To the extent possible under law, the person who associated CC0 with Introduction To R has waived all copyright and related or neighboring rights
to Introduction To R.
http://creativecommons.org/publicdomain/zero/1.0/
BASIC was originally created in 1963 as a teaching language to simplify programming. It has influenced computer science education and raised the need for coding knowledge. R is a free statistical programming language used for data analysis, modeling, and visualization. It includes many statistical and machine learning methods. UNIX was developed in the late 1960s and became widely used, while Linux is an open-source OS inspired by UNIX. Both operate using commands in a terminal rather than a graphical user interface.
Basic tutorial for R programming. this video contains lot of information about r programming like
agenda
history
SOFTWARE PARADIGM
R interface
advantages of r
drawbacks of r
This document provides an introduction to the basics of R programming. It begins with quizzes to assess the reader's familiarity with R and related topics. It then covers key R concepts like data types, data structures, importing and exporting data, control flow, functions, and parallel computing. The document aims to equip readers with fundamental R skills and directs them to online resources for further learning.
The document introduces R programming and data analysis. It covers getting started with R, data types and structures, exploring and visualizing data, and programming structures and relationships. The aim is to describe in-depth analysis of big data using R and how to extract insights from datasets. It discusses importing and exporting data, data visualization, and programming concepts like functions and apply family functions.
This document provides an introduction to using R Studio for statistical analysis. It discusses how to install both R and R Studio on Windows and Mac systems. It then covers creating scripts and files in R Studio, basic R syntax including assigning values to variables, vectors, and strings. The document also demonstrates how to install and load packages to access additional functions, and how to access built-in datasets to practice working with data in R.
The R language is a project designed to create a free, open source language which can be used as a replacement for the S-PLUS language, originally developed as the S language at AT&T Bell Labs, and currently marketed by Insightful Corporation of Seattle, Washington. R is an open source implementation of S, and differs from S-plus largely in its command-line only format.
Topics Covered:
1.Introduction to R
2.Installing R
3.Why Learn R
4.The R Console
5.Basic Arithmetic and Objects
6.Program Example
7.Programming with Big Data in R
8.Big Data Strategies in R
9.Applications of R Programming
10.Companies Using R
11.What R is not so good at
12.Conclusion
R is a programming language for statistical analysis and graphics. It is an open-source language developed by statisticians to allow for easy statistical analysis and visualization of data. The document provides an overview of R, discussing its origins, functionality, uses in data science, and popular packages and IDEs used with R. Examples are given of basic R syntax for vectors, matrices, data frames, plotting, and applying functions to data.
R is a statistical computing and graphics language used for statistical development and data analysis. It provides effective data handling, storage, and reporting with a wide range of statistical and graphical techniques. Some key features of R include its open source nature, large community support through CRAN, and ability to handle complex mathematical formulas and statistical tests easily. However, R also has a steep learning curve and some available packages can be buggy. Common R objects include vectors, lists, matrices, arrays, factors, and data frames to store and manipulate tabular data.
R is a programming language and software environment for statistical analysis and graphics. It was created by Ross Ihaka and Robert Gentleman in the early 1990s at the University of Auckland, New Zealand. Some key points:
- R can be used for statistical computing, machine learning, and data analysis. It is widely used among statisticians and data scientists.
- It runs on Windows, Mac OS, and Linux. The source code is published under the GNU GPL license.
- Popular companies like Facebook, Google, Microsoft, Uber and Airbnb use R for data analysis, machine learning, and statistical computing.
- R has a variety of data structures like vectors, matrices, arrays, lists
R is a programming language and free software environment for statistical analysis and graphics. It is widely used among statisticians and data scientists for developing statistical software and data analysis. Some key facts about R:
- It was created in the 1990s by Ross Ihaka and Robert Gentleman at the University of Auckland.
- R can be used for statistical computing, machine learning, graphical display, and other tasks related to data analysis.
- It runs on Windows, Linux, and MacOS operating systems. Code written in R is cross-platform.
- R has a large collection of statistical and graphical techniques built-in, and users can extend its capabilities by downloading additional packages.
- Major
Modern Programming Languages classification PosterSaulo Aguiar
This study aims to provide a better, up-to-date understanding of the programming languages design space and classification that includes the multitude of interesting languages that have emerged during the past ten years but have not yet been covered in depth by past classification efforts.
This document provides an introduction to the SciPy Python library and its uses for scientific computing and data analysis. It discusses how SciPy builds on NumPy to provide functions for domains like linear algebra, integration, interpolation, optimization, statistics, and more. Examples are given of using SciPy for tasks like LU decomposition of matrices, sparse linear algebra, single and double integrals, line plots, and statistics. SciPy allows leveraging Python's simplicity for technical applications involving numerical analysis and data manipulation.
This document provides information about the LISP and PROLOG programming languages. It defines LISP as a list processing language invented in 1958 that manipulates lists. PROLOG is described as a declarative language where programs are expressed in terms of relations. Examples of simple programs are provided in both LISP using recursion and factorials, and in PROLOG using logic rules. The document outlines some applications and advantages of each language such as artificial intelligence and natural language processing for LISP and expert systems for PROLOG. Similarities and differences between the languages are also summarized.
Using Language Oriented Programming to Execute Computations on the GPUSkills Matter
F# has a number of features that support language oriented programming (LOP) – the ability to create an abstract description of a problem then have this description executed in another environment. In this talk we’ll look at the design of an F# library that uses LOP techniques to a user execute matrix calculations either on the CPU or GPU. We’ll examine the features that F# provides to support this technique. We’ll start by taking a look at union types and active patterns, and then we’ll see how these are used by F#’s quotation system to give access to an abstract description of functions. Finally, we’ll see how these descriptions of functions can then be translated into computations the GPU understands and executed.
This document provides an introduction and overview of R programming for statistics. It discusses how to run R sessions and functions, basic math operations and data types in R like vectors, data frames, and matrices. It also covers statistical and graphical features of R, programming features like functions, and gives examples of built-in and user-defined functions.
R is an open source statistical programming language developed from S at the University of Auckland in 1993. It is dynamically typed and treats vectors as first-class objects. Functions in R are also objects that can be assigned to variables. R has various options for binding scalars and vectors together into arrays and data frames for aggregate analysis. It also includes many built-in functions for numerical, statistical, and character manipulation of data.
The document discusses functional programming concepts and provides examples in Python. It defines functional programming, compares it to procedural and object-oriented paradigms, and outlines key concepts like pure functions, recursion, immutable data, and higher-order functions. It also provides examples of map, filter and reduce functions in Python and discusses advantages of the functional style.
This document provides an overview of the "Programming in Scala" course, including:
- The course is divided into lectures introducing Scala features and a individual project to develop a non-trivial Scala application.
- It covers programming paradigms like object-oriented programming, functional programming, and compares imperative vs functional styles.
- Scala is introduced as a multi-paradigm language that blends OOP and FP on the JVM, making it appealing for its concise syntax and ability to seamlessly use Java libraries.
- The first Scala application example shows the object keyword, Unit return type, and string interpolation.
- Primitive types in Scala include integral,
A programming paradigm is a style or approach to programming. Some common paradigms include imperative, declarative, structured, procedural, functional, object-oriented, logic-based, and constraint-based programming. Paradigms define aspects like control flow, use of variables and data, and how programmers specify programs. Many popular languages support multiple paradigms to varying degrees. Pure languages focus on a single paradigm while multi-paradigm languages facilitate multiple approaches. Paradigms are not exclusive categories as programs may incorporate elements of different styles.
This document provides an overview of the R programming language. It discusses R's history, introduction, basics, data types, operators, control statements, functions, plotting features, comparisons to other languages like Python and Java, advantages like being open source and supporting data analysis and statistics, and disadvantages such as a complicated language. The document serves as an introduction to R programming.
This document provides an overview of key concepts related to programming languages. It discusses the definition of a programming language and the history and evolution of popular languages from 1951 to present. It covers programming language paradigms like procedural, object-oriented, functional, and logic-based languages. It also discusses factors that influence language design like efficiency, regularity, and issues in language translation. Finally, it summarizes the structure and operation of computers and how different programming models map to underlying computer architectures.
Parsl: Pervasive Parallel Programming in PythonDaniel S. Katz
The document summarizes Parsl, a Python library for pervasive parallel programming. Parsl allows users to naturally express parallelism in Python programs and execute tasks concurrently across different computing platforms while respecting data dependencies. It supports various use cases from small machine learning workloads to extreme-scale simulations involving millions of tasks and thousands of nodes. Parsl provides simple, scalable, and flexible parallel programming while hiding complexity of parallel execution.
This document provides an overview of the CSC 447 course on Organization of Programming Languages taught at the Federal University of Agriculture, Abeokuta. The course will cover topics like language definition structures, data types, control structures, runtime considerations, and language evaluation over weeks 1 and 2. It also outlines various programming language paradigms, implementation methods, influences on language design, and criteria for comparing languages.
R can perform various data analysis and data science tasks for free through its extensive packages and community support. It is an open-source statistical programming language that is widely used for data manipulation, visualization, and machine learning. Some key features of R include its ability to perform interactive visualization, ensemble learning, text/social media mining, and integration with other languages and technologies like SQL, Python, and Tableau. While powerful, R does have some limitations like a steep learning curve and slower execution compared to other languages.
This document provides an overview of a lecture on functional programming in Scala. It covers the following topics:
1. A recap of functional programming principles like functions as first-class values and no side effects.
2. An introduction to the Haskell programming language including its syntax for defining functions.
3. How functions are defined in Scala and how they are objects at runtime.
4. Examples of defining the factorial function recursively in Haskell and Scala, and making it tail recursive.
5. Concepts of first-class functions, currying, partial application, and an example of implementing looping in Scala using these techniques.
Similar to Programming Languages - Functional Programming Paper (20)
Microsoft Virtual Academy Certificate of Completion PythonShreya Chakrabarti
Shreya Chakrabarti completed the Introduction to Programming with Python course on February 9, 2017. The document provides information on a course completion by Shreya Chakrabarti for Introduction to Programming with Python achieved on February 9, 2017.
This document summarizes a student project that analyzed speech data to predict schizophrenia using machine learning algorithms. The students collected speech data from schizophrenic and healthy individuals over two days. They tested logistic regression, naive Bayes, random forest, decision tree, and OneR algorithms on the data. Logistic regression performed best, accurately predicting schizophrenia from emotions data over 80% of the time. The small dataset size was a challenge, and future work could involve implementing support vector machines and obtaining a larger dataset.
The document describes an automatic system to switch an E1 link from a failed working link to a standby link in order to maintain mobile network coverage. The system monitors E1 links connecting BTS sites to the core network. If a failure is detected, the system automatically switches to the backup E1 link to keep the BTS radiating without disrupting user connectivity or causing inconvenience. This provides a faster response than manual switching and improves the customer experience during network issues.
The document describes a project submitted by four students for their Bachelor of Engineering degree. The project is about developing a system for automatic switchover of an E1 link to a standby link in the event of a failure of the primary E1 link. This is to ensure uninterrupted mobile service by keeping the base transceiver station radiating even if the main E1 link fails. The system will switch to the backup E1 link without the need for an on-site engineer, preventing service disruptions especially at odd hours.
Project Loon uses high-altitude balloons floating in the stratosphere to provide internet access to remote areas. The balloons have antennas that receive signals from the ground and pass them between each other to form a communications network. When signals reach areas in need of internet, the balloons provide connectivity. The balloons are powered by solar panels and controlled using algorithms to move with wind patterns to desired locations around the globe. Project Loon began testing in 2013 and has partnered with carriers in countries like Brazil, Sri Lanka, Indonesia, and India to launch the technology on a large scale.
Survey Paper on Google Project Loon- Ballon for EveryoneShreya Chakrabarti
Google's Project Loon uses high-altitude balloons placed in the stratosphere at around 18km to create an aerial wireless network and provide internet access to rural and remote areas. The balloons act as floating wireless towers, connecting to antennas on the ground. Google has conducted experimental launches in New Zealand, Brazil, Australia and plans to partner with countries like India and Sri Lanka to expand internet access using this technology. The balloons are constructed of polyethylene plastic and can remain floating for over 100 days powered by an onboard solar panel and battery.
This document contains the final report for the Bears in Canada project. It includes an introduction describing the project's goal of tracking bear populations and health statistics. It then lists the problem statement, proposed solution, functional dependencies, logical and physical data models, sample query results, and revisions made to the initial data models. The report provides concise documentation of the database design process and outcomes for the project.
The document discusses big data and Hadoop. It defines big data as the large amounts of data created every day that are difficult to store, analyze, and visualize due to their huge volume. Hadoop is presented as an open-source software framework for distributed storage and processing of big data using clusters of commodity hardware. Key Hadoop components like HDFS for storage and MapReduce for processing are described. Several example MapReduce algorithms are provided to illustrate how to find maximum/minimum temperatures and total customer orders.
Programming Languages - Functional Programming Paper
1. Functional
Programming
Submitted by:
Chad McQuinn,Nicholas Armstrong,Shreyas C.S & Shreya
Chakrabarti
Abstract
In the project, we have studied, applications that can use functional programming languages.
We have studied the numerous approaches for using Functional Programming languages in
applications like Algorithms,Data-Mining,Game Programming and Data Visualization.
In this report we are going to discuss those applications on the basis of performance,
understandability, readability etc. This report contains the information about these applications
in various functional languages and the analysis that we have performed on those languages.
Rajeev Raje | CS 56500 - Programming Languages | Project Report | 12/12/2016
2. 1
Table of Contents
Table of Contents
Introduction to Functional Programming Languages and Problem Statement 2
Proposed Approach and Outcomes 2
Applications of Functional Programming Languages 2
Algorithms in Functional Programming 3
Data Mining in Functional Programming 5
Game Programming in Haskell 6
Data Visualization 7
Observations 8
Conclusions 9
Critique 9
Appendix 10
Functional Programming | References 14
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
3. 2
Introduction to Functional Programming Languages and Problem Statement
The main motivation behind developing a Functional Programming paradigm was to make the
behaviour of a program predictable.Functional programming was thus developed based on
Mathematics namely to maintain its predictable nature. Functional Programming language finds
its roots in “Lambda Calculus” and as indicated in the name itself Functional Programming
languages operates using functions.Due to its inherent property of avoiding changing state and
mutable data function,functions in these type of programming languages provide same output
every-time the same function is called.
Although there are many more programming languages based on functional programming,
some of the most popular pure functional languages which find applications in the real world
include Haskell, Hope, Erlang, Clojure, and Common Lisp.
Our problem is to use some of these languages to study their implementation in some of the
popular applications in computer science.These applications were chosen as the demand for
computations in some of these areas is higher than others and application of languages which
use a functional paradigm and are mathematical in nature would be of greater use in this area.
Proposed Approach and Outcomes
We will examine functional approaches to solving various problems in computer science and
software engineering. Our selected problems are Algorithms (in particular, sorting), Data Mining,
Game Programming, and Data Visualization.
In each section, we will describe how well functional programming fits the problem, using
measures such as code simplicity, performance (time/space complexity), popularity, and other
factors.
Applications of Functional Programming Languages
The various areas of Computer Science which we thought would benefit from the inherent
properties of Functional Programming languages are discussed in the following section.
Fig 1 is a pictorial representation of the properties of Functional Programming Languages that
we found might be helpful in the applications discussed after the figure.
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
4. 3
Fig:1
Algorithms in Functional Programming
Algorithms boast of being the heart of computer science field. Problem solving using Algorithms
has found widespread application in areas beyond Computer Science as well.We tried to
implement a merge sort algorithm in a Functional and Non-Functional Programming Language.
Consider the example sorting- Mergesort algorithm in Python and Haskell:
Python Haskell
1. List is split into two parts
def merge(a, b):
if len(a) == 0:
return b
elif len(b) == 0:
return a
elif a[0] < b[0]:
return [a[0]] + merge(a[1:], b)
else:
1. List is split into two parts
mergesort'splitinhalf :: [a] -> ([a], [a])
mergesort'splitinhalf xs = (take n xs, drop
n xs)
where n = (length xs) `div` 2
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
5. 4
return [b[0]] + merge(a, b[1:])
2. Two parts are sorted by the algorithm
3. The sorted parts are merged by a special
merging procedure for sorted lists
def mergesort(x):
if len(x) < 2:
return x
else:
h = len(x) // 2
return merge(mergesort(x[:h]),
mergesort(x[h:]))
2. Two parts are sorted by the algorithm
mergesort'merge :: (Ord a) => [a] -> [a] ->
[a]
mergesort'merge [] xs = xs
mergesort'merge xs [] = xs
mergesort'merge (x:xs) (y:ys)
| (x < y) = x:mergesort'merge xs (y:ys)
| otherwise = y:mergesort'merge (x:xs)
ys
3. The sorted parts are merged by a special
merging procedure for sorted lists
mergesort :: (Ord a) => [a] -> [a]
mergesort xs
| (length xs) > 1 = mergesort'merge
(mergesort ls) (mergesort rs)
| otherwise = xs
where (ls, rs) = mergesort'splitinhalf xs
About Python syntax:
● L[0] is the first element of list L
● L[1:] is the list of all remaining
elements
● More generally L[:n] is the list of up to
the n-th element, L[n:] the rest
● A + B if A and B are both lists is the
list obtained by concatenation
● [x] is a list containing just the single
element x
About Haskell syntax:
mergesort’splitinhalf : returns a pair of
arrays into which the original array was split.
n is equal to the half of the length of the
array, and then we use the standard
functions take and drop.
take n xs : Get the first n elements of the list
drop n xs : rest of the list after those first n
elements
Function for merging two sorted arrays:
The function receives two arrays and
produces one array of the same type.
The algorithm for merging:
1. If the first list is empty [] then the result of
the merge is the second list xs
2. If the second list is empty [] then the result
of the merge is the first list xs
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
6. 5
3. Otherwise we compare the first elements
of the lists and append with the colon :
function the least of them to the new list
which is the result of merging the remaining
two lists
Function mergesort:
If the length of the list is greater than 1 then
we do the standard step of the algorithm.
Otherwise the list with the length of 1 is
already sorted (the condition for ending the
recursion). The code reads exactly the same
as the textual description of the algorithm
given earlier but now this is a formal and
shorter specification.
Data Mining in Functional Programming
With the increasing advent of Data being used in nearly every possible field in the real world.
Data driven decision making and improving performances of tools already in place to operate on
this data is becoming vital with every passing day.
Functional Programming language was thought to find a great application in the field because of
its strengths of Parallelism,Transformations and Ability to perform faster computations.
We used an example in Non-Functional,Functional and a hybrid language to make observations
of data mining tasks done in these respective languages. Code for these examples is mentioned
in the appendix.
Parameters Data Mining in
Non-Functional
Language
(Python)
Data Mining in
Functional Language
(Haskell)
Data Mining in Hybrid
Language
(Scala)
Level of Difficulty to
learn
Easy Difficult Moderate
Orientation Analytical Oriented
Language
Mathematically oriented
Language
Engineering Oriented
Language
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
7. 6
Data Parsing One data type can be
easily parsed as other
data type
The fields are statically
typed and it cannot be
passed as any other
data type,if tried it
would raise a compile
error
Data parsing although not
inherent to scala it uses XML
packages for data parsing
Memory Usage The entire data file is
loaded into memory
Data is achieved in
streaming fashion, with
constant memory usage
Data file is loaded into
memory
Calculations Functions need to be
written to perform
further advanced
calculations on the data
Inherent Mathematical
features make it very
easy to perform
advanced calculations
Inherent Functional
Programming features allow
faster computations in Scala
There was no significant difference found in execution times for examples run in the above
languages.The poll in the appendix of this paper, and other resources on the internet show that
using functional programming languages despite their mathematical abilities are not a popular
choice amongst practitioners of Data Mining in the real world.
Other Data Mining Tools based on Functional Programming Languages
● Common Lisp
● Clojure (Dialect of Common Lisp)
● Julia- Although not functional because of its ability to support extensive mathematical
function library it is considered functional many a times
● PolyFARM - Data Mining application developed entirely in Standard Haskell
Game Programming in Haskell
Not many commercial games have been written in Haskell (see references). Henrik Nilsson &
Ivan Perez presented at PDP14 (Principles and Practice of Declarative Programming) on a
breakout game written in Haskell as a proof of concept. Their premise was to use features of
declarative functional programming to view games as a “network of signals and signal
transformers”. Their proof of concept included multiple levels and even background music.
Ultimately this was expanded into a full Android game.
These authors were involved with Keera Studios and have published a blog describing
optimizing a game that was producing 10-15 FPS (frames per second) on Android and 60-70
FPS (frames per second) on desktop machines. Ultimately through optimization techniques,
they achieved 500 FPS on desktop machines.
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
8. 7
After realizing that traditional functional programming was in some ways not a good fit for game
programming, they turned to Functional Reactive Programming (FRP), which allows for a
functional language to describe entities that change over time. These changes can be discrete
or continuous, and the authors found a Haskell package, Yampa, that supports both models (4).
Their first approach was to profile the application. They were examining memory usage, speed
(primarily measured in FPS), and impact of the changes (simplicity of the required code).
Time and Space Complexity
They first determined where time was being spent and how much memory was being
consumed. Initially some optimizations were applied to native libraries being used by the game,
but this resulted in a relatively small increase of 20-30 FPS.
They next found that Haskell implementation was consuming hundreds of megabytes of
memory. Worse, memory usage was growing dramatically over time. This was largely due to
lazy evaluation. Since individual object fields are not evaluated until they are needed, an entire
object must live until this evaluation is performed--even if it is ultimately never needed. This
resulted in a large amount of memory growth over time. By using strictness(6) (which
overcomes the lazy evaluation) they were able to overcome this. This reduced memory
consumption and increased FPS dramatically. The desktop version increased from 90 FPS to
over 300 FPS with this change. Memory usage also exhibited a flat profile with a steady usage
of around 3 megabytes. Here is an example of strictness in Haskell: the language’s Complex
data type
data RealFloat a => Complex a = !a :+ !a
This definition forces both components to be evaluated at definition time; a Complex instance
will not live on simply because (for example) its imaginary component has not been evaluated
yet.
Simplicity of Code
The authors describe code changes to achieve parallelization that in many cases were
extremely simple--as few as 5 or 10 lines of code increasing parallelization and consequently
FPS by 10% or more. Some easy parallelization increased the desktop version to over 500
FPS. However, Android performance had only been increased to around 25 FPS. At this
framerate, collisions were not precise and the physics of the game were not realistic, with
objects passing through each other, etc. By isolating the physics logic from the renderer and
parallelizing this way, they were able to achieve physics evaluation at over 30 FPS while the
renderer stayed at 15 FPS. This resulted in much more satisfactory physics behavior. This
parallelization for Android required just a few new objects and 10 lines of code.
Data Visualization
One of the key issues with visualising data in functional program involves its inherent tree like
structure. As mentioned in the “A Survey of Program Visualizations for the Functional
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
9. 8
Paradigm” there are situations involving lazy evaluation where these trees become directed
graphs. Also noted there are several utilities that handle this visualization including CIDER,
KIEL, Prospero, Hint, and TERSE. Dealing with large trees or directed graphs has its own
concerns so several of these utilities provide ways of compressing these graphs. Some utilities
provide filters for visualizing data in the spatial sense and temporal sense. Some of these
utilities reduce the tree(graph) by minimizing regions that are trivial evaluations. One thing that
is noticeable about these utilities is that it attaches itself to a paradigm that is quite commonly
learned in intro computer science classes. The flow chart.
Another aspect to consider is UML. As noted in “Metamodel and UML Profile for Functional
Programming Languages” UML was originally intended to be a universal general purpose
modeling language. Applying UML to functional programming requires some modification. One
of those modifications ties into the functional language Haskell referred to as the Haskell
metamodel. The metamodel consists of three class diagrams. Haskell programs are organized
into modules. Two program elements are represented in a module, functions and user data
types.
Observations
1. Higher-order functions (which let a person pass functions to functions, or return functions
from functions) let a person factor out a lot of duplication in the small. In algorithms section we
refactored the existing Java app to use higher order functions, and found and fixed several bugs
along the way (all related to bugs by copy & paste).
2. Immutable data structures, which are often used in FP, free an individual from having to
constantly worry about what the code will do to the data which is passed into it. In the Java app,
we found a lot of “defensive copying”, which could simply be deleted as we changed many core
data structures from mutable to immutable.
3. Strong types, which appear in many functional programming languages (but not all), tell us
more about statically-proven properties of the code. In the Java app, we changed a lot of code
from using null to using a generic optional data structure, which more clearly communicates
where values may be absent. This let us delete a lot of defensive null-checking, as well as fix a
few NPEs in uncommon code paths.
4. Pure functions, which are functions that don’t have side effects (i.e. their output is a
deterministic function of their input), are much easier to understand and test, because one
doesn’t have to wonder if the function’s behavior will change based on hidden state. In the Java
application, we were able to convert a lot of stateful functions to stateless functions, which made
the code much simpler and fixed a few bugs.
Some of the reasons we found out,why functional programming languages are not a popular
choice amongst people from all of these areas are listed as below:
● Functional languages forbid state and traditional iteration structures
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
10. 9
● Absent side effects, all computation is done by evaluating functions, and these functions
should behave the same way any time they are called with precisely the same
arguments
● Functional programs forbid assignment
● All loops must be implemented with recursion. This might seem absurdly restrictive
● Difficult to learn
Conclusions
Although we tried to find topics that played to the strengths of functional programming, we did
not find many real-world uses of pure functional programming. In Data mining, we found that
hybrid languages(Scala) are much more popular. Some of the most common computer science
algorithms do not lend themselves to a pure functional model. Although the authors we
surveyed showed that you can write a game using pure functional programming, this still isn’t a
popular choice. The relative lack of popularity of pure functional programming has also led to
there being few tools for visualization.
Critique
Goals of Software Engineering:
1. Code that works reliably, even in parts of the application that aren’t used very often.
2. Code that can be easily understood by other people (The person writing the code won’t be
around forever).
3. Code that is factored in such a way as to minimize the cost of changing it (because if one
thing is certain, it’s that requirements never stop changing).
(They also usually want it fast and cheap, too, but that’s a topic for another post.)
For our algorithms section, despite the fact that this program is “purely functional”, the
code is complete and utter garbage:
1. It had several bugs when first written, and it took a lot of time to track them down.
2. It’s hard to understand. In fact, a C implementation would probably be easier to understand.
3. For such a small function, it would be awfully hard to maintain. Making changes safely would
require a large amount of mental effort and testing, and you might not be able to reuse much
code.
More generally, our original goal was to survey more topics.Lack of information in many areas,
lead us on including only the four in the paper. We also wanted to find use cases for which
functional programming was a good fit, a poor fit, or somewhere in-between, but this judgment
was very subjective and we dropped it.
Functional languages are increasingly being adopted by industry in the real world.
To name a few examples, Haskell used by Facebook makes its news feeds run smoothly;
WhatsApp relies on Erlang to run messaging servers, achieving up to 2 million connected users
per server; Twitter, LinkedIn, Foursquare, Tumblr, and Klout rely on the hybrid, Scala to build
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
11. 10
their core infrastructure for sites. Indirect application of functional programming features include
Google’s popular Map-Reduce algorithm which derives its map and reduce functions commonly
found in functional programming.
What would we do if we were starting over today? We would probably try to do more
comparison of functional programming against other paradigms, and do more presentation of
measurable results.
Appendix
Data Mining Poll
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
13. 12
import seaborn as sns
import matplotlib.pyplot as plt
r = requests.get('https://github.com/datailluminations/PredictingFlightsDelay',
stream=True)
with open("flights.csv", 'wb') as f:
for chunk in r.iter_content(chunk_size=1024):
if chunk:
f.write(chunk)
zf = zipfile.ZipFile("flights.csv.zip")
filename = zf.filelist[0].filename
fp = zf.extract(filename)
df = pd.read_csv(fp, parse_dates="FL_DATE").rename(columns=str.lower)
2) Code Snippet for Data Mining in Haskell
{-# LANGUAGE TypeApplications, OverloadedStrings, OverloadedLabels,
TypeOperators, DataKinds, FlexibleContexts #-}
import Labels.Explore
main =
runResourceT $
httpSource "https://github.com/datailluminations/PredictingFlightsDelay" responseBody
.|
zipEntryConduit "ontime.csv" .|
fromCsvConduit
@("fl_date" := Day, "tail_num" := String)
(set #downcase True csv) .|
dropConduit 10 .|
takeConduit 5 .>
tableSink
3) Code Snippet for Data Mining in Scala
import java.io.File
import scala.io.{ BufferedSource, Source }
import sys.process._
import java.net.URL
import java.io.File
new URL("https://github.com/datailluminations/PredictingFlightsDelay") #> new
File("Output.html")
abstract class StackTable[T] {
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
14. 13
val file: File
def getDate(n: scala.xml.NodeSeq): Long = n.text match {
case "" => 0
case s => dateFormat.parse(s).getTime
}
def dateFormat = {
import java.text.SimpleDateFormat
import java.util.TimeZone
val f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")
f.setTimeZone(TimeZone.getTimeZone("GMT"))
f
}
def getInt(n: scala.xml.NodeSeq): Int = n.text match {
case "" => 0
case x => x.toInt
}
def parseXml(x: scala.xml.Elem): T
def parse(s: String): Option[T] =
if (s.startsWith(" <row ")) Some(parseXml(scala.xml.XML.loadString(s)))
else None
}
Code for Merge sort
1) Code Snippet for Merge sort in Haskell
mergesort'splitinhalf :: [a] -> ([a], [a])
mergesort'splitinhalf xs = (take n xs, drop n xs)
where n = (length xs) `div` 2
mergesort'merge :: (Ord a) => [a] -> [a] -> [a]
mergesort'merge [] xs = xs
mergesort'merge xs [] = xs
mergesort'merge (x:xs) (y:ys)
| (x < y) = x:mergesort'merge xs (y:ys)
| otherwise = y:mergesort'merge (x:xs) ys
mergesort :: (Ord a) => [a] -> [a]
mergesort xs
| (length xs) > 1 = mergesort'merge (mergesort ls) (mergesort rs)
| otherwise = xs
where (ls, rs) = mergesort'splitinhalf xs
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
15. 14
2) Code Snippet for Merge sort in Python
def merge(a, b):
if len(a) == 0:
return b
elif len(b) == 0:
return a
elif a[0] < b[0]:
return [a[0]] + merge(a[1:], b)
else:
return [b[0]] + merge(a, b[1:])
def mergesort(x):
if len(x) < 2:
return x
else:
h = len(x) // 2
return merge(mergesort(x[:h]), mergesort(x[h:]))
Functional Programming | References
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016
16. 15
Image on Report Title:
http://programminghints.com/2016/04/need-fu
nctional-programming/
Introduction to Functional Programming:
https://en.wikipedia.org/wiki/Functional_progr
amming
http://comjnl.oxfordjournals.org/content/32/2/
98.short
http://wiki.c2.com/?FunctionalProgrammingLa
nguage
Algorithms in Functional Programming:
Sorting examples
https://smthngsmwhr.wordpress.com/2012/11
/09/sorting-algorithms-in-haskell/
http://stackoverflow.com/questions/18761766
/mergesort-python
Data-Mining in Functional Programming:
http://www.anderson.ucla.edu/faculty/jason.fr
and/teacher/technologies/palace/datamining.
htm
https://www.fpcomplete.com/blog/2016/09/dat
a-haskell
http://stevenskelton.ca/real-time-data-mining-
spark/
http://www.kdnuggets.com/2012/08/poll-analy
tics-data-mining-programming-languages.htm
l
Data-Visualization in Functional
Programming:
A Survey of Program Visualization for the
Gaming References:
“Top 7 Programming Languages Used in
Video Games”
https://www.freelancer.com/community/articl
es/top-7-programming-languages-used-in-vi
deo-games
“FRP and Yampa Tutorials”
http://www.cs.nott.ac.uk/~nhn/frp-yampa-tut
orials.html
“A breakout game in Haskell using SDL and
FRP”
https://github.com/ivanperez-keera/haskhan
oid
“From 60 Frames per Second to 500 in
Haskell”
http://keera.co.uk/blog/2014/10/15/from-60-f
ps-to-500/
“Functional reactive programming”
https://en.wikipedia.org/wiki/Functional_react
ive_programming
“The Yampa package”
http://hackage.haskell.org/package/Yampa-0
.9.6
“Types, Again”
https://www.haskell.org/tutorial/moretypes.ht
ml
Critique
http://nsr.oxfordjournals.org/content/2/3/349.
full
Functional Programming | CS 56500 - Programming Languages | Project Report | 12/12/2016