the other PARADIGM

stack based, concatinative
languages

 A class of simple, consistent, performant, function-level languages 

(e.g. FORTH, JOY, CAT, etc.)

Paradigms

you might know

  • OOP (objects, internal state, inheritance)
  • Functional (immutable procedural):
  • The application of functions. Lambda calculus (value-level programming)
  • The composition of functions.
    Concatenative -- stack based
    (function-level programming)

Next to OOP, Functional, Procedural.

Concatenative is less well known.

wait, what is a

Paradigm anyway

A conceptual model that represents how software appears to work.

Ways to solve problems within that conceptual model.

Twenty cents.

why many Paradigms?

problems have many shapes.

What shape is your problem?

Components in a hierarchy?

Event driven?

Composed of object?

Composition of function?

Mental Model that is manageable

Each paradigm comes with a mental model (a philosophy) that...

  • encourages programming techniques (idioms) that make problem solving manageable.
  • lets you imagine (in a simple way) how the computer operates

We need a mental model of how our program and the computer cooperate.

Object Oriented

encourages a mental model of things,  that maintain their own internal state, but ultimately need to be changed by external influence. It's about mixing data and methods, distributed state changes, code reuse by inheritance.

Functional (Lambda)

encourages a mental model of pure functions that operate on only the values passed in, code reuse by application of higher order functions.

Programming is done by first declaring the intent of the program, then later stating the exact commands the program should execute.

Concatinitive (Stack)

encourages a mental model of pure functions that operate on a stack of values and return a stack of values, code reuse by composition.

Point-Free: Name Code, Not Data

A quick History of the CONCATINATIVE PARADIGM

  • The Lambda Calculus (Alanzo Church)
  • Combinatory Logic (Moses Schönfinkel and Haskell Curry)

1930's                                                   1950's

Forth

1970 Chuck Moore

  • RPN (post-fix notation, mostly)
  • stack-based

Forth, the programming language.

4 size ."quick tour"

UPS and Fedex use digital signature tablets coded in Forth. Power companies use electrical switches coded in Forth. GE released a SONET switch whose OS **IS** Forth — plug in a serial console, and you’ll get the OK prompt! Half of the orbiters around Mars run on Forth. The space shuttle’s robotic arm and flight nav computers were programmed in Forth.

Forth: stack oriented language

reverse polish (e.i. post-fix) notation

no parentheses 

3 size ."quick tour"

Forth good and the bad IMO

+ terse and readable

- not pure functional*

 

2 size ."quick tour"

Forth good and the bad IMO

+ terse and readable

- not pure functional*

 

1 size ."quick tour"

Postscript

  • RPN (post-fix notation)
  • stack-based

1982

'77 John Backus Turing Award lecture

Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs

  • creates languages: FP, FP84, FL
  • makes a distinction between 'value-level' and 'function-level' languages

1977

'77 John Backus Turing Award lecture

Joy

  • RPN (post-fix notation)
  • stack-based
  • functional

2001 Manfred Von Thun

'93 Henry Baker, Linear Lisp

Factor

  • RPN (post-fix notation)
  • stack-based
  • functional
  • dynamic types, with an object system

2003 Slava Pestov

'02 Brent Kirby, Concatenation Calculus

Concatenation Calculus

  • place holder

'02 Brent Kirby

'02 Brent Kirby, Concatenation Calculus

Factor

2003 Slava Pestov

Cat

  • RPN (post-fix notation)
  • stack-based
  • functional
  • strongly typed

2006 Christopher Diggins

Off shoots

  • RawrCat (github.com/ephsec/RawrCat)

Kitten

  • RPN (post-fix notation) also in-fix
  • stack-based
  • functional
  • strongly typed

2011 Jon Purdy

Pounce

  • RPN (post-fix notation) and in-fix
  • stack-based
  • functional 

2018 (Yet Another Concatenative Language)

create a

for fun, to learn how languages work. Have to make the difficult decisions of what is important and what should be left out.

 LANGUAGE

Simple and constructive

deck

By Nate Morse

deck

  • 713