Pegarus & Poison. Rubinius VM as a Multilanguage Platform

Size: px
Start display at page:

Download "Pegarus & Poison. Rubinius VM as a Multilanguage Platform"

Transcription

1 Pegarus & Poison Rubinius VM as a Multilanguage Platform Thursday, July 29, 2010

2 Brian Ford brixen on {twitter IRC gmail} Thursday, July 29, 2010

3

4

5

6 discussion rant tutorial Q&A interaction Thursday, July 29, 2010

7 fundamentally, we solve problems Thursday, July 29, 2010

8

9 how?

10 We spend most of our time talking about How dynamic vs static functional vs object-oriented threads vs events Rails vs Django Ruby vs Python vs Perl vs PHP C++ vs Java SQL vs NoSQL Thursday, July 29, 2010

11 what?

12 We spend a lot less talking about What should we build Facebook? Twitter? Google? Windows? Thursday, July 29, 2010

13 why?

14 We spend the least time on the most important question... Why am I doing this? Thursday, July 29, 2010

15 because

16 do as I say, not as I do

17 values morals emotions attachments Thursday, July 29, 2010

18 right vs wrong

19 context

20 $ ruby bt.rb bt.rb:7:in `bar': boo (RuntimeError) from bt.rb:2:in `foo' from bt.rb:7:in `bar' from bt.rb:10

21 $ rbx bt.rb An exception occurred running bt.rb boo (RuntimeError) Backtrace: Object#bar {} at bt.rb:7 Object#foo at bt.rb:2 Object#bar at bt.rb:7 main. script at bt.rb:10 Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:67 Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:91 Rubinius::Loader#script at kernel/loader.rb:429 Rubinius::Loader#main at kernel/loader.rb:521 Rubinius::Loader.main at kernel/loader.rb:558 Object# script at kernel/loader.rb:570 Thursday, July 29, 2010

22 cargo culting is a failure to understand why? Thursday, July 29, 2010

23 we are hard-wired for mimicry Thursday, July 29, 2010

24 mirror neurons

25 there is no place in our programming languages for rationale Thursday, July 29, 2010

26 so, you want to implement a programming language Thursday, July 29, 2010

27 handful of VMs to choose from... Thursday, July 29, 2010

28 handful of VMs to choose from... and, they all suck Thursday, July 29, 2010

29 primary language primary data types Thursday, July 29, 2010

30 Rubinius An implementation of Ruby github.com/evanphx/rubinius Thursday, July 29, 2010

31 In ~3.5 years... virtual machine garbage collector bytecode compiler Ruby core library primitives system JIT compiler RubySpecs Thursday, July 29, 2010

32 In ~3.5 years tons virtual machines garbage collectors bytecode compilers Ruby core library primitives systems JIT compilers of RubySpecs Thursday, July 29, 2010

33 rewrite lazily

34 rewrite lazily... but, for everyone s sake, rewrite! Thursday, July 29, 2010

35 C++ virtual machine generational garbage collector Ruby bytecode compiler Ruby core library native threads (GIL) Fibers (experimental) LLVM-base JIT compiler Thursday, July 29, 2010

36 Pegarus An implementation of LPEG github.com/brixen/pegarus Thursday, July 29, 2010

37 A Text Pattern-Matching Tool based on Parsing Expression Grammars Thursday, July 29, 2010

38 disadvantages of regexes ad hoc extensions no formal semantics unpredictable complexity difficult optimizations Thursday, July 29, 2010

39 advantages of a parsing machine fairly simple formal semantics optimizations Thursday, July 29, 2010

40

41 /./

42 /a/

43 /.a/

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63 Poison An interpretation of Potion github.com/brixen/poison Thursday, July 29, 2010

64 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

65 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

66 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

67 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

68 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

69 Potion syntax* * examples from _why s docs Thursday, July 29, 2010

70 $ cat test.pn "hello" print

71 $ bin/poison test.pn \ \ \ \ "hello" "print"

72 Some missing parts exceptions method arities variadic methods expression grouping singleton methods class methods Thursday, July 29, 2010

73 Rubinius rbx compile --help Thursday, July 29, 2010

74 $ rbx compile -S -e 'a = 1' [:script, [:lasgn, :a, [:lit, 1]]]

75 $ rbx compile -A -e 'a = 1' \ \ 1

76 $ rbx compile -B -e 'a = 1' ============= : script ============== Arguments: 0 required, 0 total Locals: 1: a Stack size: 2 Lines to IP: 1: : meta_push_1 0001: set_local 0 # a 0003: pop 0004: push_true 0005: ret Thursday, July 29, 2010

77 $ rbx compile -B -e 'def foo(a) a + 1 end; foo 5' ============= : script ============== Arguments: 0 required, 0 total Locals: 0 Stack size: 5 Lines to IP: 1: : push_rubinius 0001: push_literal :foo 0003: push_literal #<Rubinius::CompiledMethod foo file=(snippet)> 0005: push_scope 0006: push_variables 0007: send_stack :method_visibility, : send_stack :add_defn_method, : pop 0014: push_self 0015: push_int : allow_private 0018: send_stack :foo, : pop 0022: push_true 0023: ret ================= :foo ================= Arguments: 1 required, 1 total Locals: 1: a Stack size: 3 Lines to IP: 1: : push_local 0 # a 0002: meta_push_1 0003: meta_send_op_plus :+ 0005: ret Thursday, July 29, 2010

78 $ rbx compile -B -N foo -e 'def foo(a) a + 1 end; foo 5' ================= :foo ================= Arguments: 1 required, 1 total Locals: 1: a Stack size: 3 Lines to IP: 1: : push_local 0 # a 0002: meta_push_1 0003: meta_send_op_plus :+ 0005: ret Thursday, July 29, 2010

79 Thank you

80 Image Credits [3] lwn.net/images/conf/ks-jls-09/matz2.jpg [7] [9] blog.tmcnet.com/blog/tom-keating/images/chow-hound-what-no-gravy.jpg [10] [11] spamusement.com/gfx/17.gif [16] pyeuler.wdfiles.com/local--files/start/functional-programming-joke.png [21] student.biology.arizona.edu/honors2007/group11/monkeysee.jpg Thursday, July 29, 2010

Accelerating Ruby with LLVM

Accelerating Ruby with LLVM Accelerating Ruby with LLVM Evan Phoenix Oct 2, 2009 RUBY RUBY Strongly, dynamically typed RUBY Unified Model RUBY Everything is an object RUBY 3.class # => Fixnum RUBY Every code context is equal RUBY

More information

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview...

Contents in Detail. Who This Book Is For... xx Using Ruby to Test Itself... xx Which Implementation of Ruby?... xxi Overview... Contents in Detail Foreword by Aaron Patterson xv Acknowledgments xvii Introduction Who This Book Is For................................................ xx Using Ruby to Test Itself.... xx Which Implementation

More information

code://rubinius/technical

code://rubinius/technical code://rubinius/technical /GC, /cpu, /organization, /compiler weeee!! Rubinius New, custom VM for running ruby code Small VM written in not ruby Kernel and everything else in ruby http://rubini.us git://rubini.us/code

More information

What is a compiler? Xiaokang Qiu Purdue University. August 21, 2017 ECE 573

What is a compiler? Xiaokang Qiu Purdue University. August 21, 2017 ECE 573 What is a compiler? Xiaokang Qiu Purdue University ECE 573 August 21, 2017 What is a compiler? What is a compiler? Traditionally: Program that analyzes and translates from a high level language (e.g.,

More information

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction Lecture content TDDA69 Data and Program Structure Introduction Cyrille Berger Course Introduction to the different Programming Paradigm The different programming paradigm Why different paradigms? Introduction

More information

What is a compiler? var a var b mov 3 a mov 4 r1 cmpi a r1 jge l_e mov 2 b jmp l_d l_e: mov 3 b l_d: ;done

What is a compiler? var a var b mov 3 a mov 4 r1 cmpi a r1 jge l_e mov 2 b jmp l_d l_e: mov 3 b l_d: ;done What is a compiler? What is a compiler? Traditionally: Program that analyzes and translates from a high level language (e.g., C++) to low-level assembly language that can be executed by hardware int a,

More information

Compiler Design Spring 2018

Compiler Design Spring 2018 Compiler Design Spring 2018 Thomas R. Gross Computer Science Department ETH Zurich, Switzerland 1 Logistics Lecture Tuesdays: 10:15 11:55 Thursdays: 10:15 -- 11:55 In ETF E1 Recitation Announced later

More information

Scala, Your Next Programming Language

Scala, Your Next Programming Language Scala, Your Next Programming Language (or if it is good enough for Twitter, it is good enough for me) WORLDCOMP 2011 By Dr. Mark C. Lewis Trinity University Disclaimer I am writing a Scala textbook that

More information

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory SCRIPTING Overview Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Reflection Bindings Serialization Performance, memory Rationale C++ isn't the best choice

More information

Parsing Scheme (+ (* 2 3) 1) * 1

Parsing Scheme (+ (* 2 3) 1) * 1 Parsing Scheme + (+ (* 2 3) 1) * 1 2 3 Compiling Scheme frame + frame halt * 1 3 2 3 2 refer 1 apply * refer apply + Compiling Scheme make-return START make-test make-close make-assign make- pair? yes

More information

Dynamic Languages Strike Back. Steve Yegge Stanford EE Dept Computer Systems Colloquium May 7, 2008

Dynamic Languages Strike Back. Steve Yegge Stanford EE Dept Computer Systems Colloquium May 7, 2008 Dynamic Languages Strike Back Steve Yegge Stanford EE Dept Computer Systems Colloquium May 7, 2008 What is this talk about? Popular opinion of dynamic languages: Unfixably slow Not possible to create IDE-quality

More information

Perl in The Enterprise. Dave Cross Magnum Solutions Ltd

Perl in The Enterprise. Dave Cross Magnum Solutions Ltd Perl in The Enterprise Dave Cross dave@mag-sol.com Magnum Solutions Ltd http://mag-sol.com/ What We Will Cover What is Enterprise Computing? Why Perl is good in the Enterprise Why Perl is bad in the Enterprise

More information

Semantic Analysis. Lecture 9. February 7, 2018

Semantic Analysis. Lecture 9. February 7, 2018 Semantic Analysis Lecture 9 February 7, 2018 Midterm 1 Compiler Stages 12 / 14 COOL Programming 10 / 12 Regular Languages 26 / 30 Context-free Languages 17 / 21 Parsing 20 / 23 Extra Credit 4 / 6 Average

More information

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction Cyrille Berger

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction Cyrille Berger Lecture content TDDA69 Data and Program Structure Introduction Cyrille Berger Course Introduction Concepts and models of programming languages The different programming paradigms Why different paradigms?

More information

Parrot VM. Allison Randal Parrot Foundation & O'Reilly Media, Inc.

Parrot VM. Allison Randal Parrot Foundation & O'Reilly Media, Inc. Parrot VM Allison Randal Parrot Foundation & O'Reilly Media, Inc. There's an odd misconception in the computing world that writing compilers is hard. This view is fueled by the fact that we don't write

More information

MRI Internals. Koichi Sasada.

MRI Internals. Koichi Sasada. MRI Internals Koichi Sasada ko1@heroku.com MRI Internals towards Ruby 3 Koichi Sasada ko1@heroku.com Today s talk Koichi is working on improving Ruby internals Introduce my ideas toward Ruby 3 Koichi Sasada

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 1 - Introduction Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages Spring 2014

More information

The role of semantic analysis in a compiler

The role of semantic analysis in a compiler Semantic Analysis Outline The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Technical Game Development II IMGD 4000 (D 11) 1. having agents follow pre-set actions rather than choosing them dynamically

Technical Game Development II IMGD 4000 (D 11) 1. having agents follow pre-set actions rather than choosing them dynamically Scripting Technical Game Development II Professor Charles Rich Computer Science Department rich@wpi.edu References: Buckland, Chapter 6 IMGD 4000 (D 11) 1 Scripting Two senses of the word scripted behavior

More information

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Scripting 1 Overview Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Rationale C++ isn't the best choice for all problems Complicated feature set, syntax Low-level,

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

Full version is >>> HERE <<<

Full version is >>> HERE <<< database programming language definition; iphone programming language objective c; groovy programming language books; programming language knowledge Full version is >>> HERE

More information

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented Course Goal CMSC 330: Organization of Programming Languages Introduction Learn how programming languages work Broaden your language horizons! Different programming languages! Different language features

More information

Lisp to Ruby to Rubinius

Lisp to Ruby to Rubinius Lisp to Ruby to Rubinius ネットワーク応用通信研究所楽天技術研究所 Ruby アソシエーション @yukihiro_matz Yukihiro "Matz" Matsumoto Lisp 1/59 Lisp one of the oldest O-Parts out of place artifact 2/59 O-Parts of the language oldest but

More information

Getting Started with Java. Atul Prakash

Getting Started with Java. Atul Prakash Getting Started with Java Atul Prakash Running Programs C++, Fortran, Pascal Python, PHP, Ruby, Perl Java is compiled into device-independent code and then interpreted Source code (.java) is compiled into

More information

IMGD 4000 Technical Game Development II Scripting

IMGD 4000 Technical Game Development II Scripting IMGD 4000 Technical Game Development II Scripting Robert W. Lindeman Associate Professor Human Interaction in Virtual Environments (HIVE) Lab Department of Computer Science Worcester Polytechnic Institute

More information

Where We Are. Lexical Analysis. Syntax Analysis. IR Generation. IR Optimization. Code Generation. Machine Code. Optimization.

Where We Are. Lexical Analysis. Syntax Analysis. IR Generation. IR Optimization. Code Generation. Machine Code. Optimization. Where We Are Source Code Lexical Analysis Syntax Analysis Semantic Analysis IR Generation IR Optimization Code Generation Optimization Machine Code Where We Are Source Code Lexical Analysis Syntax Analysis

More information

Modern Stored Procedures Using GraalVM

Modern Stored Procedures Using GraalVM Modern Stored Procedures Using raalvm Oracle Labs Matthias Brantner Safe Harbor Statement The following is intended to outline our general product direction. t is intended

More information

Implementing Perl 6 Jonathan Worthington Dutch Perl Workshop 2008

Implementing Perl 6 Jonathan Worthington Dutch Perl Workshop 2008 Implementing Perl 6 Jonathan Worthington Dutch Perl Workshop 2008 I didn t know I was giving this talk until yesterday. I could have written my slides last night, but Guess what will be released at Christmas?*

More information

Java and C II. CSE 351 Spring Instructor: Ruth Anderson

Java and C II. CSE 351 Spring Instructor: Ruth Anderson Java and C II CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis Administrivia Lab 5 Due TONIGHT! Fri 6/2

More information

A Tour of Language Implementation

A Tour of Language Implementation 1 CSCE 314: Programming Languages Dr. Flemming Andersen A Tour of Language Implementation Programming is no minor feat. Prometheus Brings Fire by Heinrich Friedrich Füger. Image source: https://en.wikipedia.org/wiki/prometheus

More information

Truffle A language implementation framework

Truffle A language implementation framework Truffle A language implementation framework Boris Spasojević Senior Researcher VM Research Group, Oracle Labs Slides based on previous talks given by Christian Wimmer, Christian Humer and Matthias Grimmer.

More information

CSc 453 Interpreters & Interpretation

CSc 453 Interpreters & Interpretation CSc 453 Interpreters & Interpretation Saumya Debray The University of Arizona Tucson Interpreters An interpreter is a program that executes another program. An interpreter implements a virtual machine,

More information

Programming: C ++ Programming : Programming Language For Beginners: LEARN IN A DAY! (Swift, Apps, Javascript, PHP, Python, Sql, HTML) By Os Swift

Programming: C ++ Programming : Programming Language For Beginners: LEARN IN A DAY! (Swift, Apps, Javascript, PHP, Python, Sql, HTML) By Os Swift Programming: C ++ Programming : Programming Language For Beginners: LEARN IN A DAY! (Swift, Apps, Javascript, PHP, Python, Sql, HTML) By Os Swift If searching for the book Programming: C ++ Programming

More information

CMSC 330: Organization of Programming Languages. Administrivia

CMSC 330: Organization of Programming Languages. Administrivia CMSC 330: Organization of Programming Languages Administrivia 1 Course Goal Learn how programming languages work Broaden your language horizons Different programming languages Different language features

More information

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction

Lecture content. Course goals. Course Introduction. TDDA69 Data and Program Structure Introduction Lecture content TDDA69 Data and Program Structure Introduction Cyrille Berger Course Introduction Introduction to the different Programming Paradigm The different programming paradigms Why different paradigms?

More information

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages.

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages. Aboutthe Tutorial Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages. Parrot is going to change the way you see PERL! Audience This tutorial has

More information

CS101 Introduction to Programming Languages and Compilers

CS101 Introduction to Programming Languages and Compilers CS101 Introduction to Programming Languages and Compilers In this handout we ll examine different types of programming languages and take a brief look at compilers. We ll only hit the major highlights

More information

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context Types 1 / 15 Outline Introduction Concepts and terminology The case for static typing Implementing a static type system Basic typing relations Adding context 2 / 15 Types and type errors Type: a set of

More information

Announcements. My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM.

Announcements. My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM. IR Generation Announcements My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM. This is a hard deadline and no late submissions will be

More information

JavaScript and V8 A functional-ish language and implementation in the mainstream

JavaScript and V8 A functional-ish language and implementation in the mainstream JavaScript and V8 A functional-ish language and implementation in the mainstream Andreas Rossberg, Google Munich rossberg@google.com CEFP 2011, Budapest Outline JavaScript Background Functional concepts

More information

Introduction. CS 2210 Compiler Design Wonsun Ahn

Introduction. CS 2210 Compiler Design Wonsun Ahn Introduction CS 2210 Compiler Design Wonsun Ahn What is a Compiler? Compiler: A program that translates source code written in one language to a target code written in another language Source code: Input

More information

Having Fun with Social Coding. Sean Handley. February 25, 2010

Having Fun with Social Coding. Sean Handley. February 25, 2010 Having Fun with Social Coding February 25, 2010 What is Github? GitHub is to collaborative coding, what Facebook is to social networking 1 It serves as a web front-end to open source projects by allowing

More information

PERL 6 and PARROT An Overview. Presentation for NYSA The New York System Administrators Association

PERL 6 and PARROT An Overview. Presentation for NYSA The New York System Administrators Association PERL 6 and PARROT An Overview Presentation for NYSA The New York System Administrators Association June 9 th, 2004 By Josh Rabinowitz http://skateboarddirectory.com Why Perl 6? Perl 5 codebase difficult

More information

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar BEAMJIT: An LLVM based just-in-time compiler for Erlang Frej Drejhammar 140407 Who am I? Senior researcher at the Swedish Institute of Computer Science (SICS) working on programming languages,

More information

Titan: A System Programming Language made for Lua

Titan: A System Programming Language made for Lua Titan: A System Programming Language made for Lua Hugo Musso Gualandi, PUC-Rio in collaboration with André Maidl, Fabio Mascarenhas, Gabriel Ligneul and Hisham Muhammad Part 1: Why Titan We started out

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

Compiling Techniques

Compiling Techniques Lecture 10: Introduction to 10 November 2015 Coursework: Block and Procedure Table of contents Introduction 1 Introduction Overview Java Virtual Machine Frames and Function Call 2 JVM Types and Mnemonics

More information

Computer Science Seminar. Whats the next big thing? Ruby? Python? Neither?

Computer Science Seminar. Whats the next big thing? Ruby? Python? Neither? Computer Science Seminar Whats the next big thing? Ruby? Python? Neither? Introduction Seminar Style course unlike many computer science courses discussion important, encouraged and part of your grade

More information

INTRODUCTION PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/10

INTRODUCTION PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/10 INTRODUCTION PRINCIPLES OF PROGRAMMING LANGUAGES Norbert Zeh Winter 2018 Dalhousie University 1/10 GOAL OF THIS COURSE 2/10 GOAL OF THIS COURSE Encourage you to become better programmers 2/10 GOAL OF THIS

More information

Servlet Performance and Apache JServ

Servlet Performance and Apache JServ Servlet Performance and Apache JServ ApacheCon 1998 By Stefano Mazzocchi and Pierpaolo Fumagalli Index 1 Performance Definition... 2 1.1 Absolute performance...2 1.2 Perceived performance...2 2 Dynamic

More information

CS 3360 Design and Implementation of Programming Languages. Exam 1

CS 3360 Design and Implementation of Programming Languages. Exam 1 1 Spring 2016 (Monday, March 21) Name: CS 3360 Design and Implementation of Programming Languages Exam 1 This test has 18 questions and pages numbered 1 through 6. Reminders This test is closed-notes and

More information

Inside PHP Tom OSCON th July, 2012

Inside PHP Tom OSCON th July, 2012 Inside PHP Tom Lee @tglee OSCON 2012 19th July, 2012 Overview About me! New Relic s PHP Agent escapee. Now on New Projects, doing unspeakably un-php things. Wannabe compiler nerd. Terminology & brief intro

More information

Programming Languages, Summary CSC419; Odelia Schwartz

Programming Languages, Summary CSC419; Odelia Schwartz Programming Languages, Summary CSC419; Odelia Schwartz Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design

More information

Type Inference. Prof. Clarkson Fall Today s music: Cool, Calm, and Collected by The Rolling Stones

Type Inference. Prof. Clarkson Fall Today s music: Cool, Calm, and Collected by The Rolling Stones Type Inference Prof. Clarkson Fall 2016 Today s music: Cool, Calm, and Collected by The Rolling Stones Review Previously in 3110: Interpreters: ASTs, evaluation, parsing Formal syntax Formal semantics

More information

CS143 Final Fall 2009

CS143 Final Fall 2009 CS143 Final Fall 2009 Please read all instructions (including these) carefully. There are 4 questions on the exam, all with multiple parts. You have 2 hours to work on the exam. The exam is closed book,

More information

COP 3402 Systems Software. Lecture 4: Compilers. Interpreters

COP 3402 Systems Software. Lecture 4: Compilers. Interpreters COP 3402 Systems Software Lecture 4: Compilers 1 Outline 1. Compiler and interpreters 2. Compilers 3. 4. PL/0 lexical tokens 2 Compilers / Programming languages are notations for describing computations

More information

Different Species of Python

Different Species of Python Different Species of Python Presented by David Malcolm FUDcon 2011 Tempe Licensed under the Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/

More information

Databases on the web

Databases on the web Databases on the web The Web Application Stack Network Server You The Web Application Stack Network Server You The Web Application Stack Web Browser Network Server You The Web Application Stack Web Browser

More information

Copyright 2014 Oracle and/or its affiliates. All rights reserved.

Copyright 2014 Oracle and/or its affiliates. All rights reserved. Copyright 2014 Oracle and/or its affiliates. All rights reserved. On the Quest Towards Fastest (Java) Virtual Machine on the Planet! @JaroslavTulach Oracle Labs Copyright 2015 Oracle and/or its affiliates.

More information

Programming in Python

Programming in Python COURSE DESCRIPTION This course presents both the programming interface and the techniques that can be used to write procedures in Python on Unix / Linux systems. COURSE OBJECTIVES Each participant will

More information

CS Introduction to Computational and Data Science. Instructor: Renzhi Cao Computer Science Department Pacific Lutheran University Spring 2017

CS Introduction to Computational and Data Science. Instructor: Renzhi Cao Computer Science Department Pacific Lutheran University Spring 2017 CS 133 - Introduction to Computational and Data Science Instructor: Renzhi Cao Computer Science Department Pacific Lutheran University Spring 2017 Previous class We have learned the path and file system.

More information

JRuby+Truffle. Kevin Menard. Chris Seaton. Benoit Daloze. A tour through a new Ruby Oracle Oracle Labs

JRuby+Truffle. Kevin Menard. Chris Seaton. Benoit Daloze. A tour through a new Ruby Oracle Oracle Labs JRuby+Truffle A tour through a new Ruby implementahon Chris Seaton @ChrisGSeaton Oracle Labs Benoit Daloze @eregontp JKU Linz Kevin Menard @nirvdrum Oracle Labs Ruby logo copyright (c) 2006, Yukihiro Matsumoto,

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

A NET Refresher

A NET Refresher .NET Refresher.NET is the latest version of the component-based architecture that Microsoft has been developing for a number of years to support its applications and operating systems. As the name suggests,.net

More information

Extending Jython. with SIM, SPARQL and SQL

Extending Jython. with SIM, SPARQL and SQL Extending Jython with SIM, SPARQL and SQL 1 Outline of topics Interesting features of Python and Jython Relational and semantic data models and query languages, triple stores, RDF Extending the Jython

More information

A History of the Erlang VM

A History of the Erlang VM Erlang Solutions Ltd. A History of the Erlang VM Robert Virding Pre-history AXE programmed in PLEX PLEX - programming language for exchanges - proprietary - blocks (processes) and signals - in-service

More information

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++ Crash Course in Java Netprog: Java Intro 1 Why Java? Network Programming in Java is very different than in C/C++ much more language support error handling no pointers! (garbage collection) Threads are

More information

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013 CS252 Advanced Programming Language Principles Prof. Tom Austin San José State University Fall 2013 What are some programming languages? Why are there so many? Different domains Mobile devices (Objective

More information

CS 415 Midterm Exam Spring 2002

CS 415 Midterm Exam Spring 2002 CS 415 Midterm Exam Spring 2002 Name KEY Email Address Student ID # Pledge: This exam is closed note, closed book. Good Luck! Score Fortran Algol 60 Compilation Names, Bindings, Scope Functional Programming

More information

CS 301. Lecture 05 Applications of Regular Languages. Stephen Checkoway. January 31, 2018

CS 301. Lecture 05 Applications of Regular Languages. Stephen Checkoway. January 31, 2018 CS 301 Lecture 05 Applications of Regular Languages Stephen Checkoway January 31, 2018 1 / 17 Characterizing regular languages The following four statements about the language A are equivalent The language

More information

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified Course Goal CMSC 330: Organization of Programming Languages Introduction Instructors: Mike Hicks, Chau-Wen Tseng TAs: Srividya Ramaswamy, Eylul Dogruel, Khoa Doan Learn how programming languages work!

More information

Parrot Compiler Tools. Allison Randal The Perl Foundation & O'Reilly Media, Inc.

Parrot Compiler Tools. Allison Randal The Perl Foundation & O'Reilly Media, Inc. Parrot Compiler Tools Allison Randal The Perl Foundation & O'Reilly Media, Inc. There's an odd misconception in the computing world that writing compilers is hard. This view is fueled by the fact that

More information

PyPy - How to not write Virtual Machines for Dynamic Languages

PyPy - How to not write Virtual Machines for Dynamic Languages PyPy - How to not write Virtual Machines for Dynamic Languages Institut für Informatik Heinrich-Heine-Universität Düsseldorf ESUG 2007 Scope This talk is about: implementing dynamic languages (with a focus

More information

Introduction to Java

Introduction to Java Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn

More information

Rust: system programming with guarantees

Rust: system programming with guarantees Rust: system programming with guarantees CRI Monthly Seminar Arnaud Spiwack Pierre Guillou MINES ParisTech, PSL Research University Fontainebleau, July 6th, 2015 1 / 29 High level programming languages

More information

Python for C programmers

Python for C programmers Python for C programmers The basics of Python are fairly simple to learn, if you already know how another structured language (like C) works. So we will walk through these basics here. This is only intended

More information

Compilers. Type checking. Yannis Smaragdakis, U. Athens (original slides by Sam

Compilers. Type checking. Yannis Smaragdakis, U. Athens (original slides by Sam Compilers Type checking Yannis Smaragdakis, U. Athens (original slides by Sam Guyer@Tufts) Summary of parsing Parsing A solid foundation: context-free grammars A simple parser: LL(1) A more powerful parser:

More information

CSCI 334: Principles of Programming Languages. Lecture 2: Lisp Wrapup & Fundamentals. Higher-Order Functions. Activity

CSCI 334: Principles of Programming Languages. Lecture 2: Lisp Wrapup & Fundamentals. Higher-Order Functions. Activity Garbage Collection CSCI 334: Principles of ming Languages Lecture 2: Lisp Wrapup & Fundamentals ~] java -verbose:gc Garbage [GC 17024K->3633K(83008K), 0.0067267 secs] [GC 20657K->6988K(83008K), 0.0073014

More information

CMSC330 Fall 2009 Final Exam

CMSC330 Fall 2009 Final Exam CMSC330 Fall 2009 Final Exam Name Do not start this exam until you are told to do so! Instructions You have 120 minutes for to take this midterm. This exam has a total of 120 points. An average of 1 minute

More information

Soar Markup Language (SML) IJCAI Nate Derbinsky

Soar Markup Language (SML) IJCAI Nate Derbinsky Soar Markup Language (SML) IJCAI 2016 Nate Derbinsky Topics Big picture System setup + Hello Soar (homework) Basic usage Example walkthrough Additional resources July 11, 2016 Soar Markup Language (SML)

More information

Syntax and Grammars 1 / 21

Syntax and Grammars 1 / 21 Syntax and Grammars 1 / 21 Outline What is a language? Abstract syntax and grammars Abstract syntax vs. concrete syntax Encoding grammars as Haskell data types What is a language? 2 / 21 What is a language?

More information

Notes of the course - Advanced Programming. Barbara Russo

Notes of the course - Advanced Programming. Barbara Russo Notes of the course - Advanced Programming Barbara Russo a.y. 2014-2015 Contents 1 Lecture 2 Lecture 2 - Compilation, Interpreting, and debugging........ 2 1.1 Compiling and interpreting...................

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

Practicing at the Cutting Edge Learning and Unlearning about Performance. Martin Thompson

Practicing at the Cutting Edge Learning and Unlearning about Performance. Martin Thompson Practicing at the Cutting Edge Learning and Unlearning about Performance Martin Thompson - @mjpt777 Learning and Unlearning 1. Brief History of Java 2. Evolving Design approach 3. An evolving Hardware

More information

Expressions and Assignment

Expressions and Assignment Expressions and Assignment COS 301: Programming Languages Outline Other assignment mechanisms Introduction Expressions: fundamental means of specifying computations Imperative languages: usually RHS of

More information

DOWNLOAD : THE RUBY PROGRAMMING LANGUAGE

DOWNLOAD : THE RUBY PROGRAMMING LANGUAGE DOWNLOAD : THE RUBY PROGRAMMING LANGUAGE RUBY - OFFICIAL SITE ruby is... a dynamic, open source programming language with a focus on simplicity and productivity. it has an elegant syntax that is natural

More information

Project. there are a couple of 3 person teams. a new drop with new type checking is coming. regroup or see me or forever hold your peace

Project. there are a couple of 3 person teams. a new drop with new type checking is coming. regroup or see me or forever hold your peace Project there are a couple of 3 person teams regroup or see me or forever hold your peace a new drop with new type checking is coming using it is optional 1 Compiler Architecture source code Now we jump

More information

WELCOME TO PERL = Tuesday, June 4, 13

WELCOME TO PERL = Tuesday, June 4, 13 WELCOME TO PERL11 5 + 6 = 11 http://perl11.org/ Stavanger 2012 Moose + p5-mop Workshop Text Preikestolen Will Braswell Ingy döt net Austin 2012 PERL 11 5 + 6 = 11 perl11.org Will Braswell, Ingy döt net,

More information

An Introduction to Python (TEJ3M & TEJ4M)

An Introduction to Python (TEJ3M & TEJ4M) An Introduction to Python (TEJ3M & TEJ4M) What is a Programming Language? A high-level language is a programming language that enables a programmer to write programs that are more or less independent of

More information

Compiling Techniques

Compiling Techniques Lecture 2: The view from 35000 feet 19 September 2017 Table of contents 1 2 Passes Representations 3 Instruction Selection Register Allocation Instruction Scheduling 4 of a compiler Source Compiler Machine

More information

LLVM for a Managed Language What we've learned

LLVM for a Managed Language What we've learned LLVM for a Managed Language What we've learned Sanjoy Das, Philip Reames {sanjoy,preames}@azulsystems.com LLVM Developers Meeting Oct 30, 2015 This presentation describes advanced development work at Azul

More information

Lecture 4 Memory Management

Lecture 4 Memory Management Lecture 4 Memory Management Dr. Wilson Rivera ICOM 4036: Programming Languages Electrical and Computer Engineering Department University of Puerto Rico Some slides adapted from Sebesta s textbook Lecture

More information

BEAMJIT, a Maze of Twisty Little Traces

BEAMJIT, a Maze of Twisty Little Traces BEAMJIT, a Maze of Twisty Little Traces A walk-through of the prototype just-in-time (JIT) compiler for Erlang. Frej Drejhammar 130613 Who am I? Senior researcher at the Swedish Institute

More information

Subprogram Concept. COMP3220 Principle of Programming Languages. Zhitao Gong Spring

Subprogram Concept. COMP3220 Principle of Programming Languages. Zhitao Gong Spring Subprogram Concept COMP3220 Principle of Programming Languages Zhitao Gong 2016 Spring 1 / 30 Outline Introduction Closure Parameter Passing Summary 2 / 30 Introduction Tow fundamental abstractions process

More information

Scripted Components: Problem. Scripted Components. Problems with Components. Single-Language Assumption. Dr. James A. Bednar

Scripted Components: Problem. Scripted Components. Problems with Components. Single-Language Assumption. Dr. James A. Bednar Scripted Components: Problem Scripted Components Dr. James A. Bednar jbednar@inf.ed.ac.uk http://homepages.inf.ed.ac.uk/jbednar (Cf. Reuse-Oriented Development; Sommerville 2004 Chapter 4, 18) A longstanding

More information

Scripted Components Dr. James A. Bednar

Scripted Components Dr. James A. Bednar Scripted Components Dr. James A. Bednar jbednar@inf.ed.ac.uk http://homepages.inf.ed.ac.uk/jbednar SAPM Spring 2012: Scripted Components 1 Scripted Components: Problem (Cf. Reuse-Oriented Development;

More information

CS152 Programming Language Paradigms Prof. Tom Austin, Fall Syntax & Semantics, and Language Design Criteria

CS152 Programming Language Paradigms Prof. Tom Austin, Fall Syntax & Semantics, and Language Design Criteria CS152 Programming Language Paradigms Prof. Tom Austin, Fall 2014 Syntax & Semantics, and Language Design Criteria Lab 1 solution (in class) Formally defining a language When we define a language, we need

More information