r/functionalprogramming • • Dec 21 '23

Podcasts [Podcast] Elixir Wizards S11E10 Actor Model and Concurrent Processing in Elixir vs. Clojure and Ruby with Xiang Ji & Nathan Hessler

4 Upvotes

🎧 Tune in here: smr.tl/S11E10ACTOR or wherever you prefer to stream podcasts

In today’s episode, Xiang Ji and Nathan Hessler join Elixir Wizards Sundi and Owen to compare notes on actor model implementation in Elixir, Ruby, and Clojure, concurrency across the VMs, and practical implications for your tech stack.


r/functionalprogramming • • Dec 20 '23

Question Looking for an old article about a functional programmer wizard.

18 Upvotes

I read the article around 2015, so it may be older than that. The article was about a wizard/functional programmer, and they had to build up their whole world, starting with atoms, then pairs etc.

I can't find it for the life of me. Does anyone else remember what I'm talking about?


r/functionalprogramming • • Dec 19 '23

λ Calculus Making Sense of Lambda Calculus 0: Abstration, Reduction, Substitution?

Thumbnail
aartaka.me
5 Upvotes

r/functionalprogramming • • Dec 19 '23

JavaScript Monads in JavaScript

23 Upvotes

r/functionalprogramming • • Dec 18 '23

Gleam Gleam v0.33 – Exhaustive Gleam

Thumbnail
gleam.run
9 Upvotes

r/functionalprogramming • • Dec 18 '23

Question immutable and mutable bindings naming (const, var, let, let mut) umm "let" vs "var"??

10 Upvotes

In Haskell we have let. I get that. I think. In Rust we have let and let mut, and const for compile time constants. I get that. In Zig we have const and var. Again, I get that. F# has let and let mutable similar to Rust.

I Swift and lately in the newly developed "Hylo" we have "let" for immutable bindings and "var" for mutable bindings. I do not get how these are opposites in terms of naming. How are "let" and "var" consistent in this context?

This is nitpicky, but I've always felt this is counterintuitive. We have const and let in JS but JS is a mess and this was just patched in since var was taken and tainted since forever.

(I think it's better to post this in functional programming sub, even though the languages involved are not really all functional, just because functional folks are pretty rigorous and clear-headed when it comes to semantics. Again, sorry to nitpick this.)


r/functionalprogramming • • Dec 15 '23

Question Side effects handling

7 Upvotes

Beside Haskell, is there other languages with special treatment of side effects. The kola language seems to have an alternative way of handling them, but it has no ecosystem yet.

Is there a language that lets you tag pure function and check them at compile time?


r/functionalprogramming • • Dec 09 '23

Question Which functional programming language has the best build system/tooling?

69 Upvotes

By build system, I mean something like Haskell's Stack or Cabal. By tooling, I mean IDEs or language servers.


r/functionalprogramming • • Dec 08 '23

Question Looking for feedback on my Advent of Code Day 1 solution in Elm

Thumbnail self.elm
5 Upvotes

r/functionalprogramming • • Dec 07 '23

TypeScript Blog post: fp concepts with Typescript

19 Upvotes

Hi everyone, I wrote a an exploration of some fp concepts in Typescript. It covers newtypes, state monad, some functional programming, deterministic computations, event sourcing and some other things you may or may not find exciting.

While it's a bit unfocused, I believe it may be useful to those of you who is interested to learn more about functional programming in Typescript and also get more intuition on diverse programming ideas. I use fp-ts as a functional programming library there.

It also has some nice interactive iframes to play around, hope you'll like it!

The repo of the code used in article: https://github.com/Firfi/graphgen-ts

Feel free to share your thoughts and critique here.


r/functionalprogramming • • Dec 04 '23

Question What is the origin of the 'Type directed search' idea?

10 Upvotes

Hello, I am relatively new to Haskell and I found Hoogle really useful.

And I searched other ecosystems and realized that many functional languages already (unofficially) support type-directed search or similar tools, for example, Idris, Scala, Purescript, OCaml, Rust, just the name a few.

I am really curious about this kind of concept(e.g. wondering why usually functional languages are supported, while most 'famous' languages are not.), and I came to the question: "What is the origin of this idea?"

I know that there are many pre-researches by scholars, but I want to know which one was the actual 'practical' implementation. I think it is Hoogle, but I am not sure.


r/functionalprogramming • • Dec 04 '23

Question What is the best web framework in the statically typed functional programming world?

41 Upvotes

I've heard a lot of good things about Phoenix for Elixir but can't get over the dynamic type system. What is the best framework with similar features to Rails or Laravel? I've used light weight servers like Opium for OCaml but haven't found anything similar to frameworks found in OO languages.


r/functionalprogramming • • Dec 04 '23

Conferences First ACM Workshop on Functional Software Architecture: Videos and Papers

Thumbnail
functional-architecture.org
8 Upvotes

r/functionalprogramming • • Dec 03 '23

Lisp ScreamingFist: a JIT framework for Scheme

Thumbnail
gitlab.com
3 Upvotes

r/functionalprogramming • • Nov 30 '23

FP Multi-phase computation as an applicative functor - Jeremy Gibbons - Type-Driven Development (TyDe) 2023

Thumbnail
youtube.com
12 Upvotes

r/functionalprogramming • • Nov 30 '23

Question Question about chaining functions/procedures on a list

6 Upvotes

Hi all, I'm quite new to functional programming which means I don't know all the typical jargon used with that paradigm. I mostly do my functional programming in Scheme for now.

I have a question that is applicable to most programming languages I think. In Scheme I can do map/filter that uses a proc/pred on a list to return a new list. My question is that if I first filter out the list and then map a function on it, I loop over the list twice right? So for example, a list of numbers I first filter on less than 3 and then I add 5 to every number in the filtered list.

My second question, how can I combine those operations to loop only once? How is such a thing called in functional programming?


r/functionalprogramming • • Nov 30 '23

Question The Seasoned Schemer Help

7 Upvotes

I'm reading the seasoned schemer right now and am kinda losing my mind over chapter 16, would anyone mind explaining this part to me? They have defined a variant of the Y-Combinator called the applicative order imperative Y combinator as such:

(define Y!
  (lambda (L)
    (let ((h (lambda (l) (quote ()))))
      (set! h
          (L (lambda (arg) (h arg))))
      h)))

They then go on to provide some function called biz, to demonstrate the difference between the regular Y-Combinator and this new variant. biz is defined as such:

(define biz
  (let ((x 0))
    (lambda (f)
      (set! x (+ 1 x))
      (lambda (a)
        (if (= a x)
            0
            (f a))))))

Why would the call ((Y biz) 5) return 0, but ((Y! biz) 5) not have any answer? I'm failing to understand this. Thanks!


r/functionalprogramming • • Nov 25 '23

FP Implementing a Functional Logic Programming Language via the Fair Scheme | Andrew Michael, Jost Portland State University

Thumbnail pdxscholar.library.pdx.edu
5 Upvotes

r/functionalprogramming • • Nov 21 '23

FP Roc-lang website update

27 Upvotes

roc-lang.org website updated with more examples and descriptions of key design goals. 🤘


r/functionalprogramming • • Nov 20 '23

Python Purely Functional Algebraic Effects in Python via Coroutines

Thumbnail
github.com
4 Upvotes

r/functionalprogramming • • Nov 20 '23

Question Is the code still functional programming?

13 Upvotes

If i declare a variable inside a function and mutate it, is it still considered functional?

For example, if i write a function to find the max of an array with a for loop and a max value and return that max value the function is still pure. It doesn't have any side effects, since the max variable is not global but it does contraddict the principle of immutability of data. So my question is, can you use for loops and variables inside of functions or not?

(ik of another way of getting the result using functions like reduce in javascript, thats not the point of the question)


r/functionalprogramming • • Nov 19 '23

Question How would you create a counter

3 Upvotes

Since I often read here that FP is really simple, it's just that our mind is wired in a wrong way, how would you simply create a counter dictionary / HashMap ?


r/functionalprogramming • • Nov 16 '23

Podcasts [Podcast] Elixir Wizards S11E05 Embedded Systems in Elixir vs. C, C++, and Java with Connor Rigby & Taylor Barto

3 Upvotes

🎧 tune in: https://smr.tl/S11E05EMBED or wherever you stream podcasts

🔧 Today on Elixir Wizards, Connor Rigby & Taylor Barto join Sundi Myint to talk shop on embedded systems development with Elixir vs. C, C++, & Java.

How does Elixir stack up and broaden capabilities in firmware projects?


r/functionalprogramming • • Nov 15 '23

Question Is Elixir becoming the most commercially popular FP language out there?

31 Upvotes

Why I am asking is I think I've seen it be the only FP language that's actually "trending" upwards in the recent years. Scala and Haskell I thiiiink are both going down in popularity, but Elixir seems to be having quite a bit of momentum, being popular both with Erlang folks and the Ruby crowd.

EDIT: by the way, Gleam does look real good. Maybe this is what FP needs -- is a friendly, practical language that's easy to pick up.