Proposed Version 16.0 Language Features

Slides:



Advertisements
Similar presentations
Copyright © 2002 Pearson Education, Inc. Slide 1.
Advertisements

XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
V14 New Features Dan Baronet. Many new features V14 is probably the release of Dyalog with the most new features.
CSE341: Programming Languages Lecture 6 Tail Recursion, Accumulators, Exceptions Dan Grossman Fall 2011.
Compiled vs Interpreted A tradeoff of flexibility vs efficiency.
Fast Fourier Transform (FFT) (Section 4.11) CS474/674 – Prof. Bebis.
CSE 341 : Programming Languages Lecture 6 Fancy Patterns, Exceptions, Tail Recursion Zach Tatlock Spring 2014.
Introduction to MATLAB adapted from Dr. Rolf Lakaemper.
Technical Road Map Update Morten Kromberg, CTO. Show of Hands Workshops Today: –Putting Dyalog’s Latest Features to Use –MiServer 3.0 – A Framework for.
Digtial Image Processing, Spring ECES 682 Digital Image Processing Week 5 Oleh Tretiak ECE Department Drexel University.
Arrays and Strings. Why? Consider a class of 30 students, each has a score for hw1  Do we want to have 30 variables with different names?  Would it.
Team #6 Date:03/02/2010. TEAM Haritha Rani Jadcherla Vikram Sriram Saloti Annapurna Venkat Narasimha MENTORS Dr. Yue Kwon Mr. Ravi Ganta.
Inverse DFT. Frequency to time domain Sometimes calculations are easier in the frequency domain then later convert the results back to the time domain.
RUBY by Ryan Chase.
CSCI 161 Lecture 7 Martin van Bommel. Control Statements Statements that affect the sequence of execution of other statements Normal is sequential May.
Equations, Properties and Inequalities Review Unit 6 6 th Grade Math.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
New Language Features For Parallel and Asynchronous Execution Morten Kromberg Dyalog LTD Dyalog’13.
Chapter VI Sequence and series of number and its use in solving problem.
Combinational Logic: Other Gate Types
Advanced Tables. Let's build some tables using each of these features and then try combining both features into the same table. Spanning Rows and Columns.
Chapter 9 Introduction to Arrays Fundamentals of Java.
#DYNA16 vecdb The Dyalog Vector Database Workshop W2: Managing Data with Dyalog Morten Kromberg, CXO.
#DYNA16 Dyalog Version 15.0 Highlights Jay Foad, John Daintree Dan Baronet, Brian Becker Morten Kromberg.
Boolean Algebra.
2 2.4 © 2016 Pearson Education, Ltd. Matrix Algebra PARTITIONED MATRICES.
C Programming Lecture 15 Two Dimensional Arrays. Two-Dimensional Arrays b The C language allows arrays of any type, including arrays of arrays. With two.
Arrays Chapter 7.
Matrices Rules & Operations.
APPENDIX a WRITING SUBROUTINES IN C
1.5 Matricies.
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Spring 2017.
Pascal Winter 2010/ Course.
Matrix Operations SpringSemester 2017.
Introduction to MATLAB
CSCE 411 Design and Analysis of Algorithms
CSS161: Fundamentals of Computing
Pure Kevin Edelmann.
Fast Fourier Transform (FFT) (Section 4.11)
Jay Foad & Adám Brudzewsky
Fun with Total Array Ordering (TAO)
Number Patterns.
Z TRANSFORM AND DFT Z Transform
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Spring 2013.
JavaScript Arrays.
Javascript Arrays.
2.2 Introduction to Matrices
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Autumn 2018.
Notes Over 11.5 Recursive Rules
Arrays Chapter 7.
APL Code Golf Autumn Tournament
CSCI N317 Computation for Scientific Applications Unit R
Given value and sorted array, find index.
Проф. С. Молор-Эрдэнэ Тархи ба Оюун \Brain and Mind\
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Zach Tatlock Winter 2018.
Simulation And Modeling
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Spring 2016.
Fourier Transforms.
Chapter 9: Pointers and String
Division Using Arrays.
Matrix Operations SpringSemester 2017.
Arrays and Pointers CSE 2031 Fall May 2019.
Arithmetic and Geometric Sequences
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Spring 2019.
Arrays and Pointers CSE 2031 Fall July 2019.
INTRODUCTION to PERL PART 1.
Brett Wortzman Summer 2019 Slides originally created by Dan Grossman
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Autumn 2017.
a) I can work out the next two terms (numbers) in a sequence
Presentation transcript:

Proposed Version 16.0 Language Features Jay Foad

Version 16 Language Features Dyalog 16.0 (Spring 2017) Cut and Tessellate Merge Under and Obverse Enclose-if-Simple, Link Nub Sieve, Where Version 16 Language Features

Version 16 Language Features Cut ⊂Cut 1 ⊢' Cogito, ergo sum.' ┌────────┬─────┬─────┐ │ Cogito,│ ergo│ sum.│ └────────┴─────┴─────┘ {⊂⌽⍵}Cut 1 ⊢' Cogito, ergo sum.‘ ┌────────┬─────┬─────┐ │,otigoC │ogre │.mus │ └────────┴─────┴─────┘ ⊂Cut ¯1 ⊢' Cogito, ergo sum.‘ ┌───────┬────┬────┐ │Cogito,│ergo│sum.│ └───────┴────┴────┘ Version 16 Language Features

Version 16 Language Features Cut b←1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 b ⊂Cut 1 ⊢' Cogito, ergo sum.‘ ┌────────┬─────┬─────┐ │ Cogito,│ ergo│ sum.│ └────────┴─────┴─────┘ ⊢Cut ¯1 ⊢' Cogito, ergo sum.‘ Cogito, ergo sum. ⊂Cut 2 ⊢'Cogito,/ergo/sum./‘ ┌────────┬─────┬─────┐ │Cogito,/│ergo/│sum./│ └────────┴─────┴─────┘ ⊂Cut ¯2 ⊢'Cogito,/ergo/sum./' Version 16 Language Features

Version 16 Language Features Cut: the glyph (Not ⍤) Dagger † ? Quad Circle ⌼ ? Different glyphs for different cuts? Version 16 Language Features

Version 16 Language Features Tessellate ⎕←glider←↑⊃⎕NGET'c:\dropbox\demos\glider.txt' 1 X XXX 3 3 ⍡ ⊂ glider ┌───┬───┬───┐ │ │ │ │ │ X│ X │X │ │ │ X│ X │ ├───┼───┼───┤ │ X│ X │X │ │ │ X│ X │ │ XX│XXX│XX │ ├───┼───┼───┤ │ │ X│ X │ │ XX│XXX│XX │ │ │ │ │ └───┴───┴───┘ Version 16 Language Features

Version 16 Language Features Tessellate Hui: life←{1⊖1⌽(-⍴⍵)↑5 6 7∊⍨(3 3 ,Cut ¯3⊢⍵)+.×9⍴1,⍨4⍴2} Kromberg: life←{⊃1 ⍵ ∨.∧ 3 4 = ⊂ 3 3 T {+/,⍵}⊢⍵} Version 16 Language Features

Version 16 Language Features Merge A triadic operation: THAT array but with THESE items at THOSE positions tmp←… ⍝ name the array to form a variable tmp[x]←y ⍝ mutate the variable …tmp ⍝ dereference name to get new value Version 16 Language Features

Version 16 Language Features Merge P[X]+←Q becomes Q(+→X)P P[X] ←Q becomes Q(⊢→X)P … except that instead of an index X we use a Boolean selection mask B Q(+→B)P ⍝ select the major cells B⌿P or a function f that generates one Q(+→f)P ⍝ use selection mask (f P) Version 16 Language Features

Version 16 Language Features Merge ⍝ Stars at selected places in Hello '*' (⊢ → 0 1 0 0 1) 'Hello' H*ll* f ← {0=3|⍵} 100 (× → f) ⍳10 1 2 300 4 5 600 7 8 900 10 See the proposal paper from Dyalog '15 (Sicily) Version 16 Language Features

Version 16 Language Features Under (aka Dual) f⍢g means: Apply g to each argument before applying f Then un-apply g to the result    3 +⍢⍟ 4 ⍝ slide rule 12 * (⍟3) + (⍟4) Version 16 Language Features

Version 16 Language Features Under mean ← +⌿ ÷ ≢ ⍝ arithmetic mean mean⍢⍟ ⍝ geometric mean mean⍢÷ ⍝ harmonic mean mean⍢(*∘2) ⍝ quadratic mean mean⍢(*∘p) ⍝ power mean Version 16 Language Features

Version 16 Language Features Under sort←{(⊂⍋⍵)⌷⍵} ⍝ a better sort idiom sort mat ⍝ sort the rows sort⍤1 ⊢ mat ⍝ sort each row Version 16 Language Features

Version 16 Language Features Under sort←{(⊂⍋⍵)⌷⍵} ⍝ a better sort idiom sort mat ⍝ sort the rows sort⍤1 ⊢ mat ⍝ sort each row sort ⍢ ⍉ mat ⍝ sort the cols sort⍤1 ⍢ ⍉ mat ⍝ sort each col Version 16 Language Features

Version 16 Language Features Under: the definition ⍺ f⍢g ⍵ ←→ g⍣¯1 ⊢ (g ⍺) f (g ⍵) f⍢g ⍵ ←→ g⍣¯1 ⊢ f (g ⍵) Version 16 Language Features

Version 16 Language Features Obverse FFT is the Fast Fourier Transform FFT⍫IFT declares that IFT is the inverse of FFT Hence ×⍢(FFT⍫IFT) does fast convolution (or fast multiplication of huge numbers) Version 16 Language Features

Obverse: the definition f⍫g ⍵ ←→ f ⍵ f⍫g ⍣ ¯1 ←→ g⍫f Version 16 Language Features

Version 16 Language Features (APL2) Partition Dyalog has standardised on ⎕ML=1 so dyadic ⊂ is Partitioned Enclose ⊆←{⎕ML←3 ⋄ ⍺⊂⍵} 0 1 1 2 2 0 ⊆ 'Dyalog' ┌──┬──┐ │ya│lo│ └──┴──┘ Version 16 Language Features

Enclose-if-Simple, Link Enclose-if-simple: ⊆'one' 'two' ←→ 'one' 'two' ⊆'one' ←→ ⊂'one' Link: ⍺⊆⍵ ←→ (⊆⍺),(⊆⍵) X⊆Y⊆Z ←~→ X Y Z More useful in grounded array languages? Version 16 Language Features

Enclose-if-Simple, Link Version 16 Language Features

Version 16 Language Features Nub Sieve ≠←{(⍵⍳⍵)=⍳≢⍵} ≠ 3 1 4 1 5 9 1 1 1 0 1 1 {↑⍵(≠⍵)}'Mississippi' M i s s i s s i p p i 1 1 1 0 0 0 0 0 1 0 0 Version 16 Language Features

Version 16 Language Features Where ⍸←{⍵/⍳⍴⍵} ⍸ 1 0 1 1 0 1 3 4 Refinements: ⍸←{⍵/⍳⍴1/⍵} ⍝ Scalar ⍵ ⍸←{⍵/⍳⍴1/~~⍵} ⍝ Boolean ⍵ Version 16 Language Features