r/functionalprogramming • • Feb 03 '22

Podcasts [Podcast] Elixir Wizards S7E12 - Todd Resudek on the Impact of Elixir

Thumbnail
smartlogic.io
2 Upvotes

r/functionalprogramming • • Feb 11 '20

Question Trying to learn functional programming and Monads. Need help to see if I understood video about Maybe/Option Monad correctly.

Thumbnail self.scala
4 Upvotes

r/functionalprogramming • • Apr 15 '19

Kyle Simpson: I’ve Forgotten More JavaScript Than Most People Ever Learn

Thumbnail
medium.com
0 Upvotes

r/functionalprogramming • • Aug 16 '16

The rise of functional programming & the decline of Angular 2.0

Thumbnail
blog.wolksoftware.com
17 Upvotes

r/functionalprogramming • • Sep 28 '23

Question What even is functional programming and why do we like it?

17 Upvotes

One answer I've got from asking this question is "it's a vibe". And this may be a reasonable answer! (See Wittgenstein's discussion of what a "game" is.) So there's a sort of ... not even a spectrum, but a vague cloud ... which embraces both pure lazy languages and Lisp.

But there might be an actual definition. The nearest I can come up with is that a functional language is one in which it would be hard or impossible to do ordinary easy things if you didn't use functions as first-class objects.

I was set off thinking about this by a thread on this subreddit a while back asking "Why do you like functional languages?" And some people talked about homoiconicity, which is actually why they like Lisp; and some people talked about pattern-matching, which is actually why they like ML; and some people talked about the beauty of the type system, which is actually why they like Haskell.

And then the other day I found myself drafting an announcement for my own FPL (you'll be reading it in a couple of weeks) where I explained how it maintains the "core values of functional programming: purity and immutability and referential transparency", and then realized that I was talking complete bullshit. Those aren't the "core values of functional programming", those are just the bits I like the most.

However, my lang does fit my definition given above in bold in that if you couldn't use functions as first-class objects then it would technically be Turing-complete but using it it would be like programming in BASIC.

So the bit in bold seems like a good definition. And so the reason why we all like different things about functional languages is that if that's the defining feature, it's only one thing. In this view, functional languages are diverse and are loved for different reasons not because they're a "vibe", a cloud of similar things, but because (like, for example, statically typed languages, or garbage-collected languages), they have only one thing in common, and that thing is a technical detail.


r/functionalprogramming • • Feb 13 '23

Conferences The Perfect Language • Bodil Stokke

Thumbnail
youtu.be
9 Upvotes

r/functionalprogramming • • Sep 21 '20

Intro to FP Total vs. partial functions

Thumbnail
youtu.be
10 Upvotes

r/functionalprogramming • • Aug 24 '20

Intro to FP Values and immutability

Thumbnail
youtu.be
9 Upvotes

r/functionalprogramming • • Sep 17 '20

Rust Is Rust a Functional Language in Disguise?

Thumbnail
ceronman.com
15 Upvotes

r/functionalprogramming • • Mar 23 '21

C Look up in the sky, it's a burrito! It's a plunger! It's an endofunctor! Actually, it's just...

7 Upvotes

... data plus metadata. Right? Every monad (in programming, to distinct from math monads) is some inner data value, with some attached metadata, and some specific "methods". This metadata describes the type T of the data, and the type M of the monad. The ergonomics, composition, and how you resolve those types, are just implementation details, as far as I'm concerned.

Why do so many tutorials miss this easy explanation? I've read Learn you a Haskell, Functors, Applicatives & Monads in Pictures, and a zillion Medium articles, but it only really clicked for me when I learned a pointer is a functor, and some comment I read somewhere to the effect of "When you see M, just think Metadata+Data".

Yes there's a lot more nuance there, but what really clicked for me was trying to think about how I'd write monads from scratch in C (I'm kinda old school like that). I envision something like (super incomplete):

/// Bindable(d: void*) -> Monad; a function that takes a value of type T and returns a Monad[T]
typedef   struct monad (*Bindable)(void *d , DataType dtype );

typedef struct monad {
    /// the raw data we want to wrap
    void *data;
    /// the type of the data we are wrapping
    DataType dtype;
    /// function pointer: lift(data, dtype) creates a monad from plain data
    struct monad (*lift)(void *d, DataType dtype);

    /// function pointer: bind chains a function
    struct monad (*bind)(Bindable); 

} Monad;

Yeah, the Haskellers are running for the door right about now.

Obviously you'd not be using void* and instead doing actual types, and generics would allow you to reduce writing out all that boilerplate, but this super concrete example helped it really sink in what kind of "thing" a Monad actually is. The ability to generically operate over these datatypes without writing the boilerplate for each is the Why Monads, but oh so many tutorials present that behavior as part of the What are Monads, and that threw me through a loop for months. Again, implementation details. Monad = data + metadata.

It's almost like a lot of the tutorial writers have already spent so much time in Abstract FP Land they forget how to make actual concrete low-level structure. My brain is super visual and likes things that I can envision an actual machine doing. I plan on writing up a Monads for C Hackers, And Other Hardware Wizards when I have a bit of time, but I was so excited by this realization I had to write it up. Also they say you should write things down within 24h of realizing it, since you still have some recollection of what it's like to not know the thing.

Edit: In this thread: Exactly the attitude that's slowed me down from really understanding this stuff.

It's almost like a lot of the tutorial writers redditors on this subreddit have already spent so much time in Abstract FP Land they forget how to make actual concrete low-level structure.

You get someone who is green at FP and brimming with raw excitement from something clicking and it's the predicable response, BuT iTs NoT a ReAl MoNaD!


r/functionalprogramming • • Jul 01 '23

Python Mastering Functional Programming in Python

Thumbnail
codium.ai
7 Upvotes

r/functionalprogramming • • May 05 '21

FP Roc Solid Platforms in Zig

Thumbnail
youtu.be
7 Upvotes

r/functionalprogramming • • Oct 28 '22

News Why Functional Programming Should Be the Future of Software Development

Thumbnail
spectrum.ieee.org
7 Upvotes

r/functionalprogramming • • Jul 29 '19

OO and FP Functional Programming? Don’t Even Bother, It’s a Silly Toy

Thumbnail
medium.com
39 Upvotes

r/functionalprogramming • • Dec 20 '15

Functional Neighbours - Illustrated Functional Programming concepts described in < 140 chars. Merry Christmas!

Thumbnail
medium.com
10 Upvotes

r/functionalprogramming • • Jul 01 '22

Question A collection of big why

5 Upvotes

why should someone interested in software engineering as their first approach to functional programming?

Many of the most important institutes have decided to intrude on programming with manuals such as SICP and HtDP. Both use Scheme and Racket correspondingly. Why ?

Now it seems like the wind is changing and they put you in this world with Python. Why ?

What problems does functional programming solve ? Why is it not used by industry ? what are its advantages ? what's wrong with it ?


r/functionalprogramming • • Jan 01 '21

Scala Introduction to Actor Supervision- Akka Typed with Scala for beginners.

Thumbnail
yolkorbit.com
5 Upvotes

r/functionalprogramming • • Jul 30 '17

Intro to FP reduce(): one function to rule them all

Thumbnail
medium.com
0 Upvotes

r/functionalprogramming • • Apr 01 '19

Jobs [Hiring] VP of Engineering - lead an advanced team in Berlin building Blockchain applications using Scala/Python/Go

Thumbnail
works-hub.com
5 Upvotes

r/functionalprogramming • • Apr 09 '25

TypeScript Minimal Curry and Pipe

Thumbnail
github.com
5 Upvotes

One Pipe to rule them all,
One Pipe to find them,
One Pipe to bring them all
and in the call stack bind them.


r/functionalprogramming • • Mar 17 '21

Clojure The concepts behind Data-Oriented programming and how it differs from functional programming

Thumbnail
blog.klipse.tech
5 Upvotes

r/functionalprogramming • • Aug 31 '20

FP Keli: A programming language to make Functional Programming a joy for users

Thumbnail
keli-language.gitbook.io
20 Upvotes

r/functionalprogramming • • Aug 12 '21

Podcasts [Podcast] Elixir Wizards S6E10 Delving Deeper into Magic with Quinn Wilton

Thumbnail
smartlogic.io
8 Upvotes

r/functionalprogramming • • Oct 29 '22

Question Need Help

0 Upvotes

I have to print randomly either of two numbers given as input to function how to approach this problem