Ruby-like Syntax. defmodule MyMap do def map([], _func), do: [] def map([head tail], func) do [func.(head) map(tail, func)] end end

Size: px
Start display at page:

Download "Ruby-like Syntax. defmodule MyMap do def map([], _func), do: [] def map([head tail], func) do [func.(head) map(tail, func)] end end"

Transcription

1 vs

2

3

4

5 Ruby-like Syntax defmodule MyMap do def map([], _func), do: [] def map([head tail], func) do [func.(head) map(tail, func)] MyMap.map [1, 2, 3, 4], fn(i) -> i * i

6

7 Ruby to Elixir what's great and what you might miss Tobias pragtob.info

8 What's great

9 Pattern Matching defmodule Patterns do def greet(%{name: name, age: age}) do IO.puts "Hi there #{name}, what's up at #{age}?" def greet(%{name: name}) do IO.puts "Hi there #{name}" def greet(_) do IO.puts "Hi" Patterns.greet %{name: "Tobi", age: 26} Patterns.greet %{name: "Tobi"} Patterns.greet ["Mop"]

10 Pattern Matching defmodule Patterns do def greet(%{name: name, age: age}) do IO.puts "Hi there #{name}, what's up at #{age}?" def greet(%{name: name}) do IO.puts "Hi there #{name}" def greet(_) do IO.puts "Hi" Patterns.greet %{name: "Tobi", age: 26} Patterns.greet %{name: "Tobi"} Patterns.greet ["Mop"]

11 Method Overloading defmodule Patterns do def greet(%{name: name, age: age}) do IO.puts "Hi there #{name}, what's up at #{age}?" def greet(%{name: name}) do IO.puts "Hi there #{name}" def greet(_) do IO.puts "Hi" Patterns.greet %{name: "Tobi", age: 26} Patterns.greet %{name: "Tobi"} Patterns.greet ["Mop"]

12 Optional Type all?(t) :: all?(t, (element -> as_boolean(term))) :: boolean def all?(enumerable, fun \\ fn(x) -> x ) def all?(enumerable, fun) when is_list(enumerable) do do_all?(enumerable, fun)

13 Functional Programming

14

15 Immutable Data variable = 10 do_something(variable) insert_in_db(variable)

16 Immutable Data person = Person.new(attributes) do_something(person) insert_in_db(person)

17 Immutable Data person = Person.new(attributes) person = do_something(person) insert_in_db(person)

18 Transformation of Data

19 Explicitness

20 Minimize state vs Hiding State

21 Same Input, Same Output

22 Testing++

23 Changesets def new_changeset(model, params \\ :empty) do model > cast(params, ~w(name username), []) > unique_constraint(:username) > validate_length(:username, min: 1, max: 20) def registration_changeset(model, params) do model > new_changeset(params) > cast(params, ~w(password), []) > validate_length(:password, min: 6, max: 100) > put_pass_hash()

24 iex(13)> user = Repo.get_by(User, name: "Homer") iex(14)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(15)> Repo.preload(user, :videos) Explicit preloading iex(16)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(17)> user = Repo.preload(user, :videos) iex(18)> user.videos [%Rumbl.Video{ meta : #Ecto.Schema.Metadata<:loaded>, category: #Ecto.Association.NotLoaded<association :category is not loaded>, category_id: nil, description: "such great many wow", id: 3, inserted_at: #Ecto.DateTime< T18:42:41Z>, title: "Hubidubiee", updated_at: #Ecto.DateTime< T18:42:41Z>, url: " user: #Ecto.Association.NotLoaded<association :user is not loaded>, user_id: 5}]

25 iex(13)> user = Repo.get_by(User, name: "Homer") iex(14)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(15)> Repo.preload(user, :videos) Explicit preloading iex(16)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(17)> user = Repo.preload(user, :videos) iex(18)> user.videos [%Rumbl.Video{ meta : #Ecto.Schema.Metadata<:loaded>, category: #Ecto.Association.NotLoaded<association :category is not loaded>, category_id: nil, description: "such great many wow", id: 3, inserted_at: #Ecto.DateTime< T18:42:41Z>, title: "Hubidubiee", updated_at: #Ecto.DateTime< T18:42:41Z>, url: " user: #Ecto.Association.NotLoaded<association :user is not loaded>, user_id: 5}]

26 iex(13)> user = Repo.get_by(User, name: "Homer") iex(14)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(15)> Repo.preload(user, :videos) Explicit preloading iex(16)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(17)> user = Repo.preload(user, :videos) iex(18)> user.videos [%Rumbl.Video{ meta : #Ecto.Schema.Metadata<:loaded>, category: #Ecto.Association.NotLoaded<association :category is not loaded>, category_id: nil, description: "such great many wow", id: 3, inserted_at: #Ecto.DateTime< T18:42:41Z>, title: "Hubidubiee", updated_at: #Ecto.DateTime< T18:42:41Z>, url: " user: #Ecto.Association.NotLoaded<association :user is not loaded>, user_id: 5}]

27 iex(13)> user = Repo.get_by(User, name: "Homer") iex(14)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(15)> Repo.preload(user, :videos) Explicit preloading iex(16)> user.videos #Ecto.Association.NotLoaded<association :videos is not loaded> iex(17)> user = Repo.preload(user, :videos) iex(18)> user.videos [%Rumbl.Video{ meta : #Ecto.Schema.Metadata<:loaded>, category: #Ecto.Association.NotLoaded<association :category is not loaded>, category_id: nil, description: "such great many wow", id: 3, inserted_at: #Ecto.DateTime< T18:42:41Z>, title: "Hubidubiee", updated_at: #Ecto.DateTime< T18:42:41Z>, url: " user: #Ecto.Association.NotLoaded<association :user is not loaded>, user_id: 5}]

28 Readability

29 The right tool

30 A new land

31 Meta Programming defmacro plug(plug, opts \\ []) do quote {unquote(plug), unquote(opts), true}

32 What you might miss

33 Magic meta programming def method_missing(*args) args.map(&:to_s).join(" ") puts I can haz bareword strings!

34 Dirtiness

35 Baggage

36 Eco-System

37

38 Thanks & Enjoy Elixir Tobias pragtob.info

39 Photo Attribution CC BY-ND CC BY CC BY-NC CC BY-NC-ND CC BY-SA

Elixir and Phoenix. fast, concurrent and explicit. Tobias pragtob.info

Elixir and Phoenix. fast, concurrent and explicit. Tobias pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info defmodule MyMap do def map([],

More information

Elixir and Phoenix fast, concurrent and explicit Tobias pragtob.info

Elixir and Phoenix fast, concurrent and explicit Tobias pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info Platform defmodule MyMap do

More information

Elixir and Phoenix fast, concurrent and explicit Tobias pragtob.info

Elixir and Phoenix fast, concurrent and explicit Tobias pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info Elixir and Phoenix fast, concurrent and explicit Tobias Pfeiffer @PragTob pragtob.info Platform defmodule MyMap do

More information

iex(1)> defmodule RepeatN do def repeat_n(function, count) do ...(1)> end repeat_n(function, count - 1) {:module, RepeatN,...}

iex(1)> defmodule RepeatN do def repeat_n(function, count) do ...(1)> end repeat_n(function, count - 1) {:module, RepeatN,...} The other day iex(1)> iex(1)> defmodule RepeatN do...(1)> def repeat_n(_function, 0) do...(1)> # noop...(1)>...(1)> def repeat_n(function, 1) do...(1)> function.()...(1)>...(1)> def repeat_n(function,

More information

Reverse Sort. array = (1..1_000).to_a. array.sort do item, other other <=> item end

Reverse Sort. array = (1..1_000).to_a. array.sort do item, other other <=> item end The other day Reverse Sort array = (1..1_000).to_a array.sort do item, other other item end CRuby vs JRuby $ ruby -v ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] $ time ruby scripts/sort.rb

More information

The Actor Model. CSCI 5828: Foundations of Software Engineering Lecture 13 10/04/2016

The Actor Model. CSCI 5828: Foundations of Software Engineering Lecture 13 10/04/2016 The Actor Model CSCI 5828: Foundations of Software Engineering Lecture 13 10/04/2016 1 Goals Introduce the Actor Model of Concurrency isolation, message passing, message patterns Present examples from

More information

Clojure. The Revenge of Data. by Vjeran Marcinko Kapsch CarrierCom

Clojure. The Revenge of Data. by Vjeran Marcinko Kapsch CarrierCom Clojure The Revenge of Data by Vjeran Marcinko Kapsch CarrierCom Data Processing is what we do Most programs receive, transform, search, and send data Data is raw, immutable information In its essence,

More information

CPS506 - Comparative Programming Languages Elixir

CPS506 - Comparative Programming Languages Elixir CPS506 - Comparative Programming Languages Elixir Dr. Dave Mason Department of Computer Science Ryerson University c 2017 Dave Mason History Joe Armstrong worked at Ericson Erlang originally for lab development

More information

Organized by Jean-François Cloutier Held at Big Room Studios, Portland, ME. Holy Elixir, Batman! Meetup June 16, 2015

Organized by Jean-François Cloutier Held at Big Room Studios, Portland, ME. Holy Elixir, Batman! Meetup June 16, 2015 Organized by Jean-François Cloutier Held at Big Room Studios, Portland, ME Holy Elixir, Batman! Meetup June 16, 2015 A Sampling of Elixir's Superhero Powers Second Order Functions Pipes Pattern Matching

More information

Macros, and protocols, and metaprogramming - Oh My!

Macros, and protocols, and metaprogramming - Oh My! Macros, and protocols, and metaprogramming - Oh My! (aka "What is Elixir and why should you care?") jim mccoy, Facebook Infosec Tools mccoy@fb.com (jim.mccoy@gmail.com) Who? Currently build and maintain

More information

Look at all these toys!

Look at all these toys! Look at all these toys! Help it s Ruby! All alone Is Ruby dying? Where do Rubyists go? Where do Rubyists go? Tobias Pfeiffer @PragTob pragtob.info 673 Responses First Rails Release Rails 1.0 Why did

More information

MTAT Agile Software Development

MTAT Agile Software Development MTAT.03.295 Agile Software Development Lecture 2: Elixir fundamentals Luciano García-Bañuelos Elixir s numeric values Integer arbitrary-precision arithmetic Float 64 bits, double precision 1250 0xB21 0o732

More information

STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 1

STEAM Clown & Productions Copyright 2017 STEAM Clown. Page 1 What to add next time you are updating these slides Update slides to have more animation in the bullet lists Verify that each slide has stand alone speaker notes Page 1 Python 3 Running The Python Interpreter

More information

functional ErlangVM Parallelism

functional ErlangVM Parallelism functional functional ErlangVM functional ErlangVM Parallelism Who wants to go and build a system in Elixir? You shouldn t Elixir, Your Monolith and You Tobias Pfeiffer @PragTob pragtob.info Your Monolith

More information

reinsight Mobile Quick Start Guide

reinsight Mobile Quick Start Guide reinsight Mobile Quick Start Guide Overview The purpose of this document is to provide an overview of the features in reinsight Mobile. This document will review the process to access reinsight Mobile,

More information

The Actor Model, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 18 10/23/2014

The Actor Model, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 18 10/23/2014 The Actor Model, Part Two CSCI 5828: Foundations of Software Engineering Lecture 18 10/23/2014 1 Goals Cover the material presented in Chapter 5, of our concurrency textbook In particular, the material

More information

Versioned APIs with Phoenix. Elvio Vicosa

Versioned APIs with Phoenix. Elvio Vicosa Versioned APIs with Phoenix Elvio Vicosa About the author My name is Elvio Vicosa and I am a software developer based in Berlin, Germany. I've been working with software for over 10 years and throughout

More information

A First Look at ML. Chapter Five Modern Programming Languages, 2nd ed. 1

A First Look at ML. Chapter Five Modern Programming Languages, 2nd ed. 1 A First Look at ML Chapter Five Modern Programming Languages, 2nd ed. 1 ML Meta Language One of the more popular functional languages (which, admittedly, isn t saying much) Edinburgh, 1974, Robin Milner

More information

Developers Care About the License Using SPDX to Describe License Information. Jilayne Lovejoy 6 October 2015

Developers Care About the License Using SPDX to Describe License Information. Jilayne Lovejoy 6 October 2015 Developers Care About the License Using SPDX to Describe License Information Jilayne Lovejoy 6 October 2015 sharing code! Developers care about the license How do we share? 2 CC0 from Pixabay 3 How do

More information

Metaprogramming. Concepts of Programming Languages. Alexander Schramm. 2. November Institut für Softwaretechnik und Programmiersprachen

Metaprogramming. Concepts of Programming Languages. Alexander Schramm. 2. November Institut für Softwaretechnik und Programmiersprachen Metaprogramming Concepts of Programming Languages Alexander Schramm Institut für Softwaretechnik und Programmiersprachen 2. November 2015 A. Schramm 2. November 2015 1/39 Table of Contents Introduction

More information

GRAPHIC WEB DESIGNER PROGRAM

GRAPHIC WEB DESIGNER PROGRAM NH128 HTML Level 1 24 Total Hours COURSE TITLE: HTML Level 1 COURSE OVERVIEW: This course introduces web designers to the nuts and bolts of HTML (HyperText Markup Language), the programming language used

More information

The. Pragmatic Bookshelf. PragPub. The Second Iteration IN THIS ISSUE. * José Valim on Swift, Ruby, & Elixir

The. Pragmatic Bookshelf. PragPub. The Second Iteration IN THIS ISSUE. * José Valim on Swift, Ruby, & Elixir The Pragmatic Bookshelf PragPub The Second Iteration IN THIS ISSUE * José Valim on Swift, Ruby, & Elixir Issue #62 August 2014 PragPub August 2014 Contents FEATURES Protocols in Swift, Ruby, and Elixir...

More information

If we have a call. Now consider fastmap, a version of map that uses futures: Now look at the call. That is, instead of

If we have a call. Now consider fastmap, a version of map that uses futures: Now look at the call. That is, instead of If we have a call (map slow-function long-list where slow-function executes slowly and long-list is a large data structure, we can expect to wait quite a while for computation of the result list to complete.

More information

Python BASICS. Introduction to Python programming, basic concepts: formatting, naming conventions, variables, etc.

Python BASICS. Introduction to Python programming, basic concepts: formatting, naming conventions, variables, etc. Python BASICS Introduction to Python programming, basic concepts: formatting, naming conventions, variables, etc. Identikit First appeared in 1991 Designed by Guido van Rossum General purpose High level

More information

A Second Look At ML. Chapter Seven Modern Programming Languages, 2nd ed. 1

A Second Look At ML. Chapter Seven Modern Programming Languages, 2nd ed. 1 A Second Look At ML Chapter Seven Modern Programming Languages, 2nd ed. 1 Outline Patterns Local variable definitions A sorting example Chapter Seven Modern Programming Languages, 2nd ed. 2 Two Patterns

More information

Introduction 2 Lisp Part III

Introduction 2 Lisp Part III Introduction 2 Lisp Part III Andreas Wichert LEIC-T (Página da cadeira: Fenix) (I) Home Work (II) Data Types and Generic Programming (III) Lisp is Science (IV) Lisp Macros (V) More about Common Lisp an

More information

Elixir Documentation. Release. Elixir community

Elixir Documentation. Release. Elixir community Elixir Documentation Release Elixir community Sep 18, 2017 Contents 1 Getting started guides 3 1.1 Introduction to Elixir........................................... 3 1.1.1 1 Introduction..........................................

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2018 Lecture 7b Andrew Tolmach Portland State University 1994-2018 Dynamic Type Checking Static type checking offers the great advantage of catching errors early And

More information

Functional Programming. Pure Functional Programming

Functional Programming. Pure Functional Programming Functional Programming Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends only on the values of its sub-expressions (if any).

More information

CMSC 330, Fall 2013, Practice Problems 3

CMSC 330, Fall 2013, Practice Problems 3 CMSC 330, Fall 2013, Practice Problems 3 1. OCaml and Functional Programming a. Define functional programming b. Define imperative programming c. Define higher-order functions d. Describe the relationship

More information

Perl 6 Hands-On Tutorial

Perl 6 Hands-On Tutorial Perl 6 Hands-On Tutorial DCBPW 2016 Brock Wilcox awwaiid@thelackthereof.org Rakudo 楽土 Install Resources REPL Script Application Library Install Rakudobrew # Linux sudo apt-get install build-essential git

More information

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.)

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) David Haraburda January 30, 2013 1 Introduction Scala is a multi-paradigm language that runs on the JVM (is totally

More information

Functions, Scope & Arguments. HORT Lecture 12 Instructor: Kranthi Varala

Functions, Scope & Arguments. HORT Lecture 12 Instructor: Kranthi Varala Functions, Scope & Arguments HORT 59000 Lecture 12 Instructor: Kranthi Varala Functions Functions are logical groupings of statements to achieve a task. For example, a function to calculate the average

More information

Lecture 1. basic Python programs, defining functions

Lecture 1. basic Python programs, defining functions Lecture 1 basic Python programs, defining functions Lecture notes modified from CS Washington CS 142 Except where otherwise noted, this work is licensed under: http://creativecommons.org/licenses/by-nc-sa/3.0

More information

Note that pcall can be implemented using futures. That is, instead of. we can use

Note that pcall can be implemented using futures. That is, instead of. we can use Note that pcall can be implemented using futures. That is, instead of (pcall F X Y Z) we can use ((future F) (future X) (future Y) (future Z)) In fact the latter version is actually more parallel execution

More information

Quiz 1 (March 14, 2016)

Quiz 1 (March 14, 2016) MIT 6.005: Software Construction Max Goldman revised Sunday 13 th March, 2016, 15:30 Quiz 1 (March 14, 2016) Your name: Your Athena username: You have 50 minutes to complete this quiz. It contains 12 pages

More information

CS177 Recitation. Functions, Booleans, Decision Structures, and Loop Structures

CS177 Recitation. Functions, Booleans, Decision Structures, and Loop Structures CS177 Recitation Functions, Booleans, Decision Structures, and Loop Structures Functions Collection of instructions that perform a task as: o Printing your name and course. o Calculating the average of

More information

Functional Objects. Christopher Simpkins CS 3693, Fall Chris Simpkins (Georgia Tech) CS 3693 Scala / 1

Functional Objects. Christopher Simpkins CS 3693, Fall Chris Simpkins (Georgia Tech) CS 3693 Scala / 1 Functional Objects Christopher Simpkins csimpkin@spsu.edu CS 3693, Fall 2011 Chris Simpkins (Georgia Tech) CS 3693 Scala 2011-08-29 1 / 1 Functional Objects Functional objects have immutable state. Immutable

More information

Scala : an LLVM-targeted Scala compiler

Scala : an LLVM-targeted Scala compiler Scala : an LLVM-targeted Scala compiler Da Liu, UNI: dl2997 Contents 1 Background 1 2 Introduction 1 3 Project Design 1 4 Language Prototype Features 2 4.1 Language Features........................................

More information

Learn Functional Programming with Elixir

Learn Functional Programming with Elixir Extracted from: Learn Functional Programming with Elixir New Foundations for a New World This PDF file contains pages extracted from Learn Functional Programming with Elixir, published by the Pragmatic

More information

Functional programming

Functional programming Functional programming Functional programming In functional programming, functions are the core building blocks In pure functional programming, functions are like mathematical functions Mathematical functions

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu/program/philippines-summer-2012/ Philippines Summer 2012 Lecture 1 Introduction to Python June 19, 2012 Agenda About the Course What is

More information

AUTOMATION TESTING FRAMEWORK FOR LUMINOUS LMS

AUTOMATION TESTING FRAMEWORK FOR LUMINOUS LMS AUTOMATION TESTING FRAMEWORK FOR LUMINOUS LMS CONTENT Introduction. List of tools used to create Testing Framework Luminous LMS work scheme Testing Framework work scheme Automation scenario set lifecycle

More information

αrby : An Embedding of Alloy in Ruby Aleksandar Milicevic, Ido Efrati, and Daniel Jackson

αrby : An Embedding of Alloy in Ruby Aleksandar Milicevic, Ido Efrati, and Daniel Jackson 1 αrby : An Embedding of Alloy in Ruby Aleksandar Milicevic, Ido Efrati, and Daniel Jackson {aleks,idoe,dnj@csail.mit.edu What exactly is this embedding? 2 2 What exactly is this embedding? alloy API for

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Type Inference Some statically typed languages, like ML (and to a lesser extent Scala), offer alternative

More information

CMSC 330, Fall 2013, Practice Problem 3 Solutions

CMSC 330, Fall 2013, Practice Problem 3 Solutions CMSC 330, Fall 2013, Practice Problem 3 Solutions 1. OCaml and Functional Programming a. Define functional programming Programs are expression evaluations b. Define imperative programming Programs change

More information

LFE - a lisp on the Erlang VM

LFE - a lisp on the Erlang VM Robert Virding Principle Language Expert at Erlang Solutions Ltd. LFE - a lisp on the Erlang VM What LFE isn t It isn t an implementation of Scheme It isn t an implementation of Common Lisp It isn t an

More information

Taking Off with /

Taking Off with / Taking Off with Phoenix @scrogson / https://github.com/scrogson Phoenix https://github.com/phoenixframework Phoenix is a framework for building modern web apps, API backs, and distributed systems. Written

More information

CPSC 3740 Programming Languages University of Lethbridge. Control Structures

CPSC 3740 Programming Languages University of Lethbridge. Control Structures Control Structures A control structure is a control statement and the collection of statements whose execution it controls. Common controls: selection iteration branching Control Structures 1 15 Howard

More information

Week 6: Introduction to Programming for GIS and Spatial Data Analysis GEO GEO A

Week 6: Introduction to Programming for GIS and Spatial Data Analysis GEO GEO A Week 6: Modules Procedures and Functions Introduction to Programming for GIS and Spatial Data Analysis GEO4938 1469 GEO6938 147A Review: Sequences of Instructions Strict sequential flow: Step One Two Three

More information

WE ARE ALL BLESSED. Bruce Tate

WE ARE ALL BLESSED. Bruce Tate WE ARE ALL BLESSED Bruce Tate Dave Thomas @redrapids @pragdave 1 DAVE'S STORY 2 3 4 https://upload.wikimedia.org/wikipedia/commons/0/0b/hand-operated_card_punch-2.jpg 5 https://upload.wikimedia.org/wikipedia/commons/e/e8/ibm_card_punch_029.jpg

More information

Common LISP Tutorial 1 (Basic)

Common LISP Tutorial 1 (Basic) Common LISP Tutorial 1 (Basic) CLISP Download https://sourceforge.net/projects/clisp/ IPPL Course Materials (UST sir only) Download https://silp.iiita.ac.in/wordpress/?page_id=494 Introduction Lisp (1958)

More information

Using Type Annotations to Improve Your Code

Using Type Annotations to Improve Your Code Using Type Annotations to Improve Your Code Birds-of-a-Feather Session Werner Dietl, University of Waterloo Michael Ernst, University of Washington Open for questions Survey: Did you attend the tutorial?

More information

Installing macos High Sierra

Installing macos High Sierra Install macos High Sierra on a blank hard drive. Written By: Arthur Shi ifixit CC BY-NC-SA www.ifixit.com Page 1 of 8 INTRODUCTION If you have recently upgraded or replaced the hard drive for your MacBook

More information

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics

CMSC 330: Organization of Programming Languages. Formal Semantics of a Prog. Lang. Specifying Syntax, Semantics Recall Architecture of Compilers, Interpreters CMSC 330: Organization of Programming Languages Source Scanner Parser Static Analyzer Operational Semantics Intermediate Representation Front End Back End

More information

How to code control statements

How to code control statements Chapter 8 How to code control statements The equality operators ==!= PHP Type Coercion Rules for comparisons Operand 1 Operand 2 Action NULL String Convert NULL to an empty string. Boolean or NULL Not

More information

Scheme as implemented by Racket

Scheme as implemented by Racket Scheme as implemented by Racket (Simple view:) Racket is a version of Scheme. (Full view:) Racket is a platform for implementing and using many languages, and Scheme is one of those that come out of the

More information

Modularly Programmable Syntax

Modularly Programmable Syntax Modularly Programmable Syntax Cyrus Omar Jonathan Aldrich Computer Science Department Carnegie Mellon University [CMU POP Retreat 2015] List Syntax DERIVED FORM [1, 2, 3, 4, 5] EXPANSION Cons(1, Cons(2,

More information

Principles of Programming Languages 2017W, Functional Programming

Principles of Programming Languages 2017W, Functional Programming Principles of Programming Languages 2017W, Functional Programming Assignment 3: Lisp Machine (16 points) Lisp is a language based on the lambda calculus with strict execution semantics and dynamic typing.

More information

It is better to have 100 functions operate one one data structure, than 10 functions on 10 data structures. A. Perlis

It is better to have 100 functions operate one one data structure, than 10 functions on 10 data structures. A. Perlis Chapter 14 Functional Programming Programming Languages 2nd edition Tucker and Noonan It is better to have 100 functions operate one one data structure, than 10 functions on 10 data structures. A. Perlis

More information

Robotics with Elixir

Robotics with Elixir Meetup organized by Jean-François Cloutier Held at Big Room Studios, Portland, ME, USA Robotics with Elixir Part 1 Ghost in the Machine September 15, 2015 Lego Mindstorms The Greatest Toy Ever! And it

More information

CMSC330 Fall 2017 Final Exam

CMSC330 Fall 2017 Final Exam CMSC330 Fall 2017 Final Exam Name (PRINT YOUR NAME IN ALL CAPS ): Discussion Time (circle one) 10am 11am 12pm 1pm 2pm 3pm Discussion TA (circle one) JT Greg Justin Michael BT Daniel David Derek Cameron

More information

Recap: Functions as first-class values

Recap: Functions as first-class values Recap: Functions as first-class values Arguments, return values, bindings What are the benefits? Parameterized, similar functions (e.g. Testers) Creating, (Returning) Functions Iterator, Accumul, Reuse

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu Cali, Colombia Summer 2012 Lesson 1 Introduction to Python Agenda What is Python? and Why Python? Basic Syntax Strings User Input Useful

More information

SD314 Outils pour le Big Data

SD314 Outils pour le Big Data Institut Supérieur de l Aéronautique et de l Espace SD314 Outils pour le Big Data Functional programming in Python Christophe Garion DISC ISAE Christophe Garion SD314 Outils pour le Big Data 1/ 35 License

More information

Taking the Derivative

Taking the Derivative Taking the Derivative Programming II - Elixir Version Johan Montelius Spring Term 2018 Introduction You of course know how to take the derivative of a function, this is something you probably learned already

More information

MTAT Agile Software Development

MTAT Agile Software Development MTAT.03.295 Agile Software Development Lecture 1: Introduction Luciano García-Bañuelos Course objective The objective of this course is to introduce some of the practices on agile software development,

More information

Your First Ruby Script

Your First Ruby Script Learn Ruby in 50 pages Your First Ruby Script Step-By-Step Martin Miliauskas @mmiliauskas 1 Your First Ruby Script, Step-By-Step By Martin Miliauskas Published in 2013 by Martin Miliauskas On the web:

More information

Announcements For This Lecture

Announcements For This Lecture Lecture 4 Strings Announcements For This Lecture Chapter 8 Readings 8.1, 8.2, 8.4, 8.5 Avoid for-loop sections Next Lab More expression tables Testing functions Assignment 1 Will post it on Monday Need

More information

Structure and Interpretation of Computer Programs

Structure and Interpretation of Computer Programs CS 61A Summer 2015 Structure and Interpretation of Computer Programs Final INSTRUCTIONS You have 3 hours to complete the exam. The exam is closed book, closed notes, closed computer, closed calculator,

More information

Shared state model. April 3, / 29

Shared state model. April 3, / 29 Shared state April 3, 2012 1 / 29 the s s limitations of explicit state: cells equivalence of the two s programming in limiting interleavings locks, monitors, transactions comparing the 3 s 2 / 29 Message

More information

Symbolic Programming. Dr. Zoran Duric () Symbolic Programming 1/ 89 August 28, / 89

Symbolic Programming. Dr. Zoran Duric () Symbolic Programming 1/ 89 August 28, / 89 Symbolic Programming Symbols: +, -, 1, 2 etc. Symbolic expressions: (+ 1 2), (+ (* 3 4) 2) Symbolic programs are programs that manipulate symbolic expressions. Symbolic manipulation: you do it all the

More information

About Double Dispatch

About Double Dispatch Learning Object-Oriented Programming and Design with TDD About Double Dispatch Stéphane Ducasse http://stephane.ducasse.free.fr http://www.pharo.org W8S02 W8S02 2 / 31 Outline Some fun exercises Thinking

More information

COSE212: Programming Languages. Lecture 3 Functional Programming in OCaml

COSE212: Programming Languages. Lecture 3 Functional Programming in OCaml COSE212: Programming Languages Lecture 3 Functional Programming in OCaml Hakjoo Oh 2017 Fall Hakjoo Oh COSE212 2017 Fall, Lecture 3 September 18, 2017 1 / 44 Why learn ML? Learning ML is a good way of

More information

Declarative concurrency. March 3, 2014

Declarative concurrency. March 3, 2014 March 3, 2014 (DP) what is declarativeness lists, trees iterative comutation recursive computation (DC) DP and DC in Haskell and other languages 2 / 32 Some quotes What is declarativeness? ness is important

More information

Lists, loops and decisions

Lists, loops and decisions Caltech/LEAD Summer 2012 Computer Science Lecture 4: July 11, 2012 Lists, loops and decisions Lists Today Looping with the for statement Making decisions with the if statement Lists A list is a sequence

More information

CS558 Programming Languages. Winter 2013 Lecture 3

CS558 Programming Languages. Winter 2013 Lecture 3 CS558 Programming Languages Winter 2013 Lecture 3 1 NAMES AND BINDING One essential part of being a high-level language is having convenient names for things: variables constants types functions etc. classes

More information

JavaScript: Objects, Methods, Prototypes

JavaScript: Objects, Methods, Prototypes JavaScript: Objects, Methods, Prototypes Computer Science and Engineering College of Engineering The Ohio State University Lecture 22 What is an Object? Property: a key/value pair (aka "name"/value) Object:

More information

Splay Trees. Programming II - Elixir Version. Johan Montelius. Spring Term 2018

Splay Trees. Programming II - Elixir Version. Johan Montelius. Spring Term 2018 Splay Trees Programming II - Elixir Version Johan Montelius Spring Term 2018 Introduction A splay tree is an ordered binary tree with the advantage that the last key we looked for is found in the root

More information

n n Try tutorial on front page to get started! n spring13/ n Stack Overflow!

n   n Try tutorial on front page to get started! n   spring13/ n Stack Overflow! Announcements n Rainbow grades: HW1-6, Quiz1-5, Exam1 n Still grading: HW7, Quiz6, Exam2 Intro to Haskell n HW8 due today n HW9, Haskell, out tonight, due Nov. 16 th n Individual assignment n Start early!

More information

IFQL. Paul Dix Founder &

IFQL. Paul Dix Founder & IFQL Paul Dix Founder & CTO @pauldix paul@influxdata.com Evolution of a query language REST API SQL-ish Vaguely Familiar select percentile(90, value) from cpu where time > now() - 1d and host = servera

More information

Test Listeners (Test Hooks)

Test Listeners (Test Hooks) Test Listeners (Test Hooks) Available since Katalon Studio v5.2 Manage Test Listeners Visualized Workflow Example Test Listeners is a new feature of Katalon Studio introduced since version 5.2. It is a

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Week 13 - Part 1 Thomas Wies New York University Review Last lecture Object Oriented Programming Outline Today: Scala Sources: Programming in Scala, Second

More information

Red Hat Satellite 6.4

Red Hat Satellite 6.4 Red Hat Satellite 6.4 API Guide A guide to using the Red Hat Satellite Representational State Transfer (REST) API Last Updated: 2019-02-07 Red Hat Satellite 6.4 API Guide A guide to using the Red Hat

More information

Immersion Day. Getting Started with Amazon S3. January Rev

Immersion Day. Getting Started with Amazon S3. January Rev January 2016 Rev 2015-01-15 Table of Contents Overview... 3 Create a Bucket in S3... 4 Add an Object to a Bucket... 5 View an Object... 6 Move an Object... 7 Delete an Object and Bucket... 8 Conclusion...

More information

SAS VISUAL ANALYTICS SAS VISUAL STATISTICS 7.2, 7.3 AND BEYOND

SAS VISUAL ANALYTICS SAS VISUAL STATISTICS 7.2, 7.3 AND BEYOND SAS VISUAL ANALYTICS SAS VISUAL STATISTICS 7.2, 7.3 AND BEYOND C op yr i g h t 2 0 1 5, S A S I n s t i t u t e I n c. A l l r i g h t s r es er v e d. VA 7.2 (MAY 2015) KEY ENHANCEMENTS IN VA 7.2 Administration

More information

Object Model Comparisons

Object Model Comparisons Object Model Comparisons 1 Languages are designed, just like programs Someone decides what the language is for Someone decides what features it's going to have Can't really understand a language until

More information

Topics Covered Thus Far CMSC 330: Organization of Programming Languages

Topics Covered Thus Far CMSC 330: Organization of Programming Languages Topics Covered Thus Far CMSC 330: Organization of Programming Languages Names & Binding, Type Systems Programming languages Ruby Ocaml Lambda calculus Syntax specification Regular expressions Context free

More information

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation Automated SQL Ownage Techniques October 30 th, 2009 Sebastian Cufre Developer Core Security Technologies sebastian.cufre@coresecurity.com Copyright The Foundation Permission is granted to copy, distribute

More information

Lecture Notes on Induction and Recursion

Lecture Notes on Induction and Recursion Lecture Notes on Induction and Recursion 15-317: Constructive Logic Frank Pfenning Lecture 7 September 19, 2017 1 Introduction At this point in the course we have developed a good formal understanding

More information

CSE341 Spring 2017, Final Examination June 8, 2017

CSE341 Spring 2017, Final Examination June 8, 2017 CSE341 Spring 2017, Final Examination June 8, 2017 Please do not turn the page until 8:30. Rules: The exam is closed-book, closed-note, etc. except for both sides of one 8.5x11in piece of paper. Please

More information

CS 61A Discussion 8: Scheme. March 23, 2017

CS 61A Discussion 8: Scheme. March 23, 2017 CS 61A Discussion 8: Scheme March 23, 2017 Announcements Ants is due today. Finish it! Also turn it in! HW 6 is due tomorrow. Finish it! Also turn it in! HW party today from 6:30-8:30p in 247 Cory. Midterm

More information

{json:api} chris-guzman.com/jsonapi.pdf

{json:api} chris-guzman.com/jsonapi.pdf {json:api} @speaktochris @NexmoDev chris-guzman.com/jsonapi.pdf Ruby! & Android "! {json:api} A specification for building APIs in JSON {json:api} A specification for building APIs in JSON (duh) {json:api}

More information

ruby2c Automatic translation of ruby code to C. by Seattle.rb s Ryan Davis & Eric Hodel

ruby2c Automatic translation of ruby code to C. by Seattle.rb s Ryan Davis & Eric Hodel ruby2c Automatic translation of ruby code to C. by Seattle.rb s Ryan Davis & Eric Hodel Overview Background information and Goals Introduction to metaruby

More information

Hard deadline: 3/28/15 1:00pm. Using software development tools like source control. Understanding the environment model and type inference.

Hard deadline: 3/28/15 1:00pm. Using software development tools like source control. Understanding the environment model and type inference. CS 3110 Spring 2015 Problem Set 3 Version 0 (last modified March 12, 2015) Soft deadline: 3/26/15 11:59pm Hard deadline: 3/28/15 1:00pm Overview In this assignment you will implement several functions

More information

HOW TO USE WORDPRESS TO BUILD A WEBSITE A STEP-BY-STEP GUIDE

HOW TO USE WORDPRESS TO BUILD A WEBSITE A STEP-BY-STEP GUIDE HOW TO USE WORDPRESS TO BUILD A WEBSITE A STEP-BY-STEP GUIDE YOUR WEBSITE How to login Go to your website and add /wp-admin: www.palondoncourse.co.uk/xxxxxxxxx/wp-admin This will bring up the login screen.

More information

Language Syntax version beta Proposed Syntax

Language Syntax version beta Proposed Syntax Superpowered game development. Language Syntax version.0. beta Proposed Syntax Live/current version at skookumscript.com/docs/v.0/lang/syntax/ November, 0 Better coding through mad science. Copyright 00-0

More information

Introduction to Python programming, II

Introduction to Python programming, II GC3: Grid Computing Competence Center Introduction to Python programming, II (with a hint of MapReduce) Riccardo Murri Grid Computing Competence Center, University of Zurich Oct. 10, 2012 Today s class

More information

Symbolic Computation and Common Lisp

Symbolic Computation and Common Lisp Symbolic Computation and Common Lisp Dr. Neil T. Dantam CSCI-56, Colorado School of Mines Fall 28 Dantam (Mines CSCI-56) Lisp Fall 28 / 92 Why? Symbolic Computing: Much of this course deals with processing

More information

Try the following example using the Try it option available at the top right corner of the below sample code box

Try the following example using the Try it option available at the top right corner of the below sample code box About the Tutorial Elixir is a dynamic, functional language designed for building scalable and maintainable applications. It is built on top of Erlang. Elixir leverages the Erlang VM, known for running

More information