Channels

# administrivia

# announcements

# devlog-together

# in-germany

# in-israel

# introduce-yourself

# linking-together

# of-end-user-programming

# of-functional-programming

# of-graphics

# of-logic-programming

# of-music

# present-company

# reading-together

# thinking-together

# two-minute-week

- d
Doug Moen

2 years agoWhen 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.pdfdi+13 replies - s
S.M Mukarram Nainar

2 years agoAnyone 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?sw+312 replies Duncan Cragg

2 years agoAnyone 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?)e+212 repliesDon Abrams

2 years agoThe author of the CT/math book I'm reading (Paolo Aluffi) suggested that if functions defs put output first (

instead of`f : B <- A`

) then function composition like`f : A -> B`

would make more sense. Then a couple chapters later he goes on to say that writing`f . g`

instead of`(x)f`

would make`f(x)`

be`(f.g)(x)`

(or even maybe`((x)g)f`

) Both are nice suggestions, but the mix really does hurt my head`xgf`

s+26 replies- f
François-René Rideau

1 year agoA 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/1310250528358760448fa2 replies Dan Cook

1 year agoI 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)()()e6 repliesDon Abrams

1 year ago1 repliesRob Haisfield

1 year agoI 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?1 repliesRob Haisfield

1 year agoAre there any Zactronics like games for functional programming?https://www.youtube.com/watch?v=w1_zmx-wU0U▾

i+15 repliesRob Haisfield

1 year agoIf 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/1 replies