[racket] (off) Purely Functional needs "One Memory/Massively Parallel"

From: Lawrence Bottorff (borgauf at gmail.com)
Date: Fri Feb 7 10:51:17 EST 2014

AFAIK, recursion is must-do pillar of the functional style . . . and that
is why tail recursion came along to solve the real-world problem of the
overflowing stack. Likewise "I/O" is antithetical to functional . . . so,
obviously, data needs to be somehow quasi "live" and not "off site," not
discrete, not outside the domain/range function world. It seems like the
whole functional paradigm is sitting there in the middle of the road
staring at us, waiting for us to finally deal with this issue. .  .

. . . oh, and then I see a talk given by Gilad Bracha where he, like your
typical snarky American put-down comedian, pooh-poohs the whole idea
functional programming (
http://www.infoq.com/presentations/functional-pros-cons). And there's Scala
where the functional is like a dumb plow animal under the intelligent
guiding hand of the object-oriented master. And so, to somebody like me
trying to separate out all the propaganda, it's all very, very confusing.

I take it that you Racket folks are basically satisfied with how far you've
adopted the functional paradigm and you don't see the need to sweat the
whole "pure" thing. You're "realists" in the great American tradition. But
then I'm hearing from the Haskell people (again, not openly for fear of not
seeming realist) that the great benefit of pure functional is that, indeed,
the world can at last be described with all the succinctness and exactness
of mathematical formulae, i.e., math is code, code is math. If you've ever
seen "Structure and Interpretation of Classical Mechanics," you see Scheme
being used throughout the book right along side all the typical math
formulae. This was quite the eye-opener for me. It seemed like not the
wedding, but perhaps the courtship of code and math, i.e., a real step
forward away from math being taken to a slaughterhouse and chopped up to be
eventually fried on processor barbecues.

So please take a break from "realism" and humor me with a few lines of

On Wed, Feb 5, 2014 at 6:46 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:

> (1) Based on my experience, I suggest a 'theorem' that roughly says "there
> is always more data to be put into memory than there is data and there is
> always more need for speed than there is realizable speed in our
> processors."
> (2) I think FP can deal with I/O in a truly functional manner, but no, I
> haven't seen an efficient implementation yet.
> On Feb 5, 2014, at 11:48 AM, Lawrence Bottorff wrote:
> > Please correct me if I'm way off base, but the whole issue of a purely
> functional language being impractical because it should not "go outside"
> the function (e.g. for IO) seems to hinge on the fact that there is (today)
> a segmented, discrete, world out there where data and apis etc. reside
> outside of your box running your program. What if you had limitless live
> memory and parallelism? Isn't the vaunted Google File System just this sort
> of "One Memory/Massively Parallel" beast? If your purely functional program
> were running in such a One Memory/massively parallel space, you could have
> some Ueber-function encompassing the data, within which all your subsequent
> functions could play. You could do anything and everything totally purely
> functionally. Right? So with Haskell, everything is fine, functionally pure
> -- until you have to go outside to interact with stuff outside your
> program. So don't go "outside." Right?
> >
> > I'm coming at this from an old Cartography/GIS angle. Many years ago I
> heard of a project to write GIS software in (then new) Smalltalk. But it
> was deemed not feasible because the model was expected to bring into live
> memory an entire mapping project with all its geographic classes
> instantiated and ready to go . . . then you would do your work. But of
> course today, even on home machines, we measure memory in gigabytes.
> >
> > Obviously, today's computing world is about dealing with lots and lots
> of discrete things: machines, datasets, apis, etc. So, my specific question
> is: Isn't purely functional really just waiting for One Memory/Massive
> Parallel wherein all its supposed foibles are moot? The whole "sort-of"
> functional world simply takes all the discretism for granted. But Isn't the
> purely functional paradigm driving us toward a day when some sort of OM/MP
> (virtual or real) is the rule?
> >
> > LB
> > Grand Marais, MN
> > ____________________
> >  Racket Users list:
> >  http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140207/446ea86d/attachment.html>

Posted on the users mailing list.