• d

    Doug Moen

    2 years ago
    When did functional programming begin? • 1952, "The Use of Sub-Routines in Programmes", D.J.Wheeler, https://dl.acm.org/doi/pdf/10.1145/609784.609816 Mentions higher order functions like "integrate", which is (somehow) parameterized by the function to be integrated. • 1956, Fortran, John Backus. FORTRAN=FORmula TRANslation. Fortran supports nested arithmetic expressions. "Programming on the right side of the assignment statement" is an early glimpse of expression-oriented functional programming, as mentioned later in [Landin 1966]. • 1960, LISP, John McCarthy, "Recursive functions of symbolic expressions and their computation by machine, part I". Lisp is the first programming language with conditional expressions, recursive functions, higher order functions (including "map" under the name "maplist"), plus garbage collection. This is the true birth of functional programming, even though LISP has a strong imperative core, and some key elements are missing: LISP is not lexically scoped; there are no closures, and no convenient syntax for curried function calls. http://www-formal.stanford.edu/jmc/recursive.pdf • 1962, APL, Kenneth Iverson, the book "A Programming Language" is published. Has an exceptionally powerful expression language, including the now standard "map" and "reduce" higher order functions (under different names). There is no APL interpreter yet. http://www.softwarepreservation.org/projects/apl/Books/APROGRAMMING%20LANGUAGE • 1964, P.J.Landin, "The Mechanical Evaluation of Expressions" describes a referentially transparent, lexically scoped, pure functional language with lexically scoped closures and curried functions. The syntax is a recognizable precursor to ML and Haskell. A virtual machine called the SECD machine is described for implementing functional languages (including lexical scoping and closures, which are missing from LISP). Earliest use of "referential transparency" to describe a programming language? https://www.cs.cmu.edu/~crary/819-f09/Landin64.pdf • 1966, P.J.Landin, "The Next 700 Programming Languages". This is the earliest published use of the term "functional programming" I can find, although it is by now reportedly in common use. This is the original manifesto for functional (ie, non-imperative) programming. It describes the research language ISWIM, spawning the ML/Haskell lineage of functional languages. http://www-formal.stanford.edu/jmc/recursive.pdf
    d
    i
    +1
    3 replies
    Copy to Clipboard
  • s

    S.M Mukarram Nainar

    2 years ago
    Anyone know of any "toy" optimizing compilers for a functional programming language that are small enough to study and fit in head? Looking for learning resources. Tangentially, are there any nanopass compilers that are used outaide of education?
    s
    w
    +3
    12 replies
    Copy to Clipboard
  • Duncan Cragg

    Duncan Cragg

    2 years ago
    Anyone here implementing a functional language themselves? I'm interested in: how you do lazy evaluation and how you do any parallelisation (or is that concurrency?)
    Duncan Cragg
    e
    +2
    12 replies
    Copy to Clipboard
  • Don Abrams

    Don Abrams

    2 years ago
    The author of the CT/math book I'm reading (Paolo Aluffi) suggested that if functions defs put output first (
    f : B <- A
    instead of
    f : A -> B
    ) then function composition like
    f . g
    would make more sense. Then a couple chapters later he goes on to say that writing
    (x)f
    instead of
    f(x)
    would make
    (f.g)(x)
    be
    ((x)g)f
    (or even maybe
    xgf
    ) Both are nice suggestions, but the mix really does hurt my head
    Don Abrams
    s
    +2
    6 replies
    Copy to Clipboard
  • f

    François-René Rideau

    1 year ago
    A friend on twitter asks for what are good minimal lisps that run on top of the JS ecosystem. Can you help me reply? https://twitter.com/seagreen__/status/1310250528358760448
    f
    a
    2 replies
    Copy to Clipboard
  • Dan Cook

    Dan Cook

    1 year ago
    I was curious to see if I could make a data structure using nothing but lambdas, and I came up with these JavaScript snippets: (H)=>((F)=>F(F)())((S,V,P)=>(X)=>X?S(S,X,S(S,V,P))😦H(V),P||S(S))) (H)=>((F)=>F(F)())((Q,V,N)=>(X)=>X?Q(Q,V,Q(Q,X,N))😦H(V),N||Q(Q))) Try this in your browser debugger: (...either snippet here...)(console.log)(1)(2)(3)()(4)()()(5)()()()()()()(8)()()
    Dan Cook
    e
    6 replies
    Copy to Clipboard
  • Don Abrams

    Don Abrams

    1 year ago
  • Rob Haisfield

    Rob Haisfield

    1 year ago
    I was thinking about how “mathematical substitutions” make sense as a metaphor for abstraction. Would this sort of thing be helpful? In what contexts? Thinking about how when I use a function as an argument I should be able to “expand” and “collapse” the function to see more verbose versions of it. Is there anything that already does this?
    Rob Haisfield
    1 replies
    Copy to Clipboard
  • Rob Haisfield

    Rob Haisfield

    1 year ago
    Are there any Zactronics like games for functional programming?

    https://www.youtube.com/watch?v=w1_zmx-wU0U

    Rob Haisfield
    i
    +1
    5 replies
    Copy to Clipboard
  • Rob Haisfield

    Rob Haisfield

    1 year ago
    If we were to take the flipbook analogy from The Joy of Clojure for State, Identity, and Time, how would it be represented differently in Unison? https://www.unisonweb.org/
    Rob Haisfield
    1 replies
    Copy to Clipboard