Steve Dekorte
09/08/2019, 2:59 PMKartik Agaram
Duncan Cragg
09/13/2019, 8:50 AMIvan Reese
Duncan Cragg
09/13/2019, 4:57 PMGarth Goldwater
09/13/2019, 5:16 PMGarth Goldwater
09/13/2019, 5:16 PMDoug Moen
09/13/2019, 5:54 PMDoug Moen
09/13/2019, 6:03 PMwhile
statement. I include those things to simplify the programming model for imperative programmers, and so that I can transliterate GLSL into Curv without converting loops to tail recursion, etc. So Ivan's statement isn't really true of Curv.Kartik Agaram
Ivan Reese
Ivan Reese
Doug Moen
09/13/2019, 6:21 PMDoug Moen
09/13/2019, 6:26 PMIvan Reese
tbabb
09/13/2019, 7:36 PMtbabb
09/13/2019, 7:39 PMSteve Dekorte
09/13/2019, 9:20 PMIvan Reese
Ivan Reese
Ivan Reese
tbabb
09/13/2019, 10:01 PMSteve Dekorte
09/13/2019, 10:15 PMDoug Moen
09/13/2019, 10:32 PMDoug Moen
09/13/2019, 10:40 PMtbabb
09/13/2019, 10:45 PMDoug Moen
09/14/2019, 12:43 AMDoug Moen
09/14/2019, 12:51 AMSteve Dekorte
09/14/2019, 1:09 AMKartik Agaram
Kartik Agaram
shalabh
09/14/2019, 7:05 AMIvan Reese
Kartik Agaram
Ivan Reese
Google Search, from the perspective of the web searcher, isn't a pure function — every time you do a Google search for the same term, you get a different result. You could try to model it as a pure function, but that'd require some contortions that are easy to describe ("Just take the current index as an additional hidden / curried argument") but that fall apart upon further reflection. Google search is actually a process, not a function, and rather than trying to model it using the ill-fitting formalisms of math, we can more naturally model it using the formalisms of systems theory.OO embodies some elements of process / systems theory very elegantly. Erlang is probably a great touchstone here. Compare with Milner's π-calculus, a mathematical formalism that encodes some parts of process / systems theory, which I find to be not nearly as simple or elegant as the very OO process model in Erlang. (Hedging against expected counterarguments: Of course, that doesn't mean there can't be a way to encode process / systems theory in mathematics that is simple and elegant. But I think it's fair to say that this is a case where currently OO does better than FP.)
Garth Goldwater
09/14/2019, 2:08 PMGarth Goldwater
09/14/2019, 2:16 PMshalabh
09/14/2019, 3:42 PMKartik Agaram
shalabh
09/14/2019, 9:04 PMMutation should be merely a hack for performanceIf you say at the machine level bits shouldn't be mutated in place except as an optimization, I fully agree. I'm thinking more in terms of higher level processes that we describe - identity and mutation should be part of the language as well as snapshots and consistency..
Kartik Agaram
I'm thinking more in terms of higher level processes that we describe - identity and mutation should be part of the language as well as snapshots and consistency..That's definitely a level-up on the rhetoric I've heard so far in favor of state! Great thread.
If it wasn't for the 'sameness' across those different scattered bits, this wouldn't be a bug, would it? 😉The bug was just that the pipeline was wedged. It really didn't matter whether name
X
got assigned row m
or n
. I think that's extremely common. Deep in the guts of our computers, software is often just arcane book-keeping without any meaningful mapping to the real world. And this has been true of bureaucracies long before software existed. Was it a Kafka short story where the guy's record says he's dead and he can't convince the bureaucrat that he's alive? I think focusing on 'identity' risks confusing map for territory.Kartik Agaram
shalabh
09/15/2019, 12:34 AMshalabh
09/15/2019, 12:47 AMSteve Dekorte
09/15/2019, 1:02 AMPezo - Zoltan Peto
09/15/2019, 1:50 AMDoug Moen
09/15/2019, 1:53 AMIn OOP, how do you send a message to another process? Well we've been sending messages to other objects all along so 'very much the same way'. The models of pure functional code and 'sending a message' are incompatible enough to require a fair bit of algebraic gymnastics.In modern languages, "OOP" is just classes and inheritance, and "sending a message" is just overwrought terminology for indirect function call. Even in Smalltalk, message sends have synchronous function call semantics. Functional languages also have function calls. O'Caml is a pedigreed functional language with OOP (as in: classes and inheritance), so there's no conflict between FP and class based OOP. When you talk about "sending a message to another process", it sounds like you are talking about the Actor model. The only Actor language I know is Erlang, which is considered a functional language.
Pezo - Zoltan Peto
09/15/2019, 2:04 AMSteve Dekorte
09/15/2019, 2:05 AMDoug Moen
09/15/2019, 3:09 AMDoesn’t Erlang have mutable state within a process and doesn’t it send messages between processes? So at least on the process level, Erlang is about mutable message sending objects?Haskell supports this as well. Every general purpose language has threads and concurrency, and threads are useless unless they can change state in response to messages (or whatever the IPC mechanism is). Haskell has several IPC mechanisms: if you use the Control.Concurrent.Actors library, you can even use the Actor model. What makes Erlang functional is that data structures are immutable values and variables are immutable: they cannot be reassigned once they are bound to a value. An Erlang process manages its mutable state using a tail recursive function F that is passed the current process state as an argument. Each time F is called, it receives a message, processes it, then calls itself with its updated state as an argument. This is a functional style, not an OOP style of programming.
shalabh
09/15/2019, 5:08 AMEdward de Jong / Beads Project
09/15/2019, 7:26 AMEdward de Jong / Beads Project
09/15/2019, 7:27 AMPezo - Zoltan Peto
09/15/2019, 8:55 AMPezo - Zoltan Peto
09/15/2019, 9:21 AMPezo - Zoltan Peto
09/15/2019, 9:34 AMPezo - Zoltan Peto
09/15/2019, 9:36 AMSteve Dekorte
09/15/2019, 5:54 PMSteve Dekorte
09/15/2019, 5:58 PMIvan Reese
Ivan Reese
Edward de Jong / Beads Project
09/15/2019, 6:19 PMSteve Dekorte
09/15/2019, 6:25 PMEdward de Jong / Beads Project
09/15/2019, 6:57 PMSteve Dekorte
09/15/2019, 8:00 PMDuncan Cragg
09/15/2019, 8:19 PMWe are going to see 100 million programmers added in the next 5 years
Duncan Cragg
09/15/2019, 8:19 PMSteve Dekorte
09/15/2019, 8:26 PMKartik Agaram
Edward de Jong / Beads Project
09/15/2019, 9:14 PMEdward de Jong / Beads Project
09/16/2019, 8:47 AMPezo - Zoltan Peto
09/24/2019, 1:33 PMshalabh
09/25/2019, 4:34 PMDoug Moen
09/25/2019, 4:45 PMPezo - Zoltan Peto
09/25/2019, 5:18 PMPezo - Zoltan Peto
09/25/2019, 5:33 PMGarth Goldwater
09/25/2019, 5:42 PMSteve Dekorte
09/25/2019, 8:01 PMKartik Agaram
Steve Dekorte
09/25/2019, 8:11 PMtbabb
09/25/2019, 8:27 PMKartik Agaram
Kartik Agaram
> Separating functions and data feels pretty foundational to pretty much all paradigms.@Steve Dekorte:
Do you mean besides the paradigm of OOP?I see, I misunderstood what you meant by "separating functions and data". The term 'functional programming' existed long before OOP: • The 1978 Turing Award lecture, "Can programming be liberated from the von Neumann style?" makes no mention of OOP or Simula (1962) or Smalltalk (1972). • The famous 1990 paper "Why Functional Programming matters" makes no mention of OOP or C++ (which first came out in 1985). I mostly get my sense of the term from those sources. While I usually don't care to argue semantics of terms, 'FP' seems still relatively crisp in meaning and so worth defending.
Kartik Agaram