Hacker News with Generative AI: Functional Programming

Curry: A functional logic programming language (curry-lang.org)
Curry is a declarative multi-paradigm programming language which combines in a seamless way features from functional programming (nested expressions, higher-order functions, strong typing, lazy evaluation) and logic programming (non-determinism, built-in search, free variables, partial data structures).
Implementing Unsure Calculator in 100 lines of Haskell (alt-romes.github.io)
The recently trendy Unsure Calculator makes reasoning about numbers with some uncertainty just as easy as calculating with specific numbers.
Falsify: Hypothesis-Inspired Shrinking for Haskell (2023) (well-typed.com)
Consider this falsify property test that tries to verify the (obviously false) property that all elements of all lists of up to 10 binary digits are the same (we will explain the details below; hopefully the intent is clear):
Language Showcase: Lux (2022) (compilerspotlight.substack.com)
Lux is a purely-functional and statically-typed lisp that pushes the boundaries of what's possible in terms of meta-programming.
Why Gleam Wins over F# (medium.com)
Have you ever felt that programming should be more elegant, more predictable, and less prone to errors? If so, you might have already explored the world of functional programming. I’ve witnessed the rise of various functional programming languages, each promising to solve the common problems we face in software development. Today, I want to focus on two contenders in this space: F# and Gleam.
Functional Programming Lessons Conclusion (jerf.org)
As many others observe as well, one of the major reasons to write is to firm up ideas in one’s own head. Serializing an idea out into English words is still no guarantee one understands it deeply, but it is great progress over a very fuzzy idea that has never been fleshed out at all.
Concurrency in Haskell: Fast, Simple, Correct (bitbashing.io)
After nearly a decade of building embedded systems in C, C++, and Rust, I’ve somehow ended up writing Haskell for a living.
Keeping it Old-Tool: REPL habits of a grug-brained Clojure programmer (evalapply.org)
Keeping it Old-Tool: REPL habits of a grug-brained Clojure programmer
Hasochism: The pleasure and pain of dependently typed Haskell programming [pdf] (2013) (strath.ac.uk)
Beyond Traditional Pattern Matching in Lisp (github.com/naver)
LispE, a modern Lisp dialect developed by Naver, introduces innovative constructs—defpat, defmacro, and defpred—that set it apart from traditional Lisp implementations like Common Lisp, Scheme, and Clojure.
Functors: Identity, Composition, and fmap (codehakase.com)
In writing software, we often encounter scenarios where a value resides within a context, a container of sorts. Standard function application, so straightforward with simple values, presents a challenge in these situations. Consider the Maybe data type in Haskell, which encapsulates the possibility of a value’s absence. Applying functions to values wrapped in Maybe requires a different approach, as direct function application results in a type error.
Functors, Applicatives, and Monads (thecoder.cafe)
Hello! Today, we will explore functional programming with the concepts of functors, applicatives, and monads. We will discuss what they are and why they matter one step at a time. Note that all the examples will be in Haskell, but you’re not required to know Haskell to read this post.
Beyond Traditional Pattern Matching in Lisp (github.com/naver)
LispE, a modern Lisp dialect developed by Naver, introduces innovative constructs—defpat, defmacro, and defpred—that set it apart from traditional Lisp implementations like Common Lisp, Scheme, and Clojure.
Half Constructed Objects Are Unnecessary (jerf.org)
Functional programming languages of the type I’m talking about have immutable objects1.
Non-Obvious Haskell Idiom: Guard-Sequence (entropicthoughts.com)
Reading production Haskell code, we sometimes stumble over idioms that look confusing at first, but which show up frequently enough that they are worth learning. This is one of those examples, where we optionally return something with guard-sequence.
Two new graph-based functional programming languages (lwn.net)
Functional programming languages have a long association with graphs. In the 1990s, it was even thought that parallel graph-reduction architectures could make functional programming languages much faster than their imperative counterparts. Alas, that prediction mostly failed to materialize. Even though graphs are still used as a theoretical formalism in order to define and optimize functional languages (such as Haskell's spineless tagless graph-machine), they are still mostly compiled down to the same old non-parallel assembly code that every other language uses.
Functional Tests as a Tree of Continuations (2010) (evanmiller.org)
One of the most essential practices for maintaining the long-term quality of computer code is to write automated tests that ensure the program continues to act as expected, even when other people (including your future self) muck with it.
The State of Coherence in the Land of Type Classes (programming-journal.org)
Type classes are a popular tool for implementing generic algorithms and data structures without loss of efficiency, bridging the gap between parametric and ad-hoc polymorphism.
F# for Fun and Profit (fsharpforfunandprofit.com)
This site will introduce you to F# and show you ways that F# can help in day-to-day development of mainstream commercial business software. On the way, I hope to open your mind to the joys of functional programming – it really is fun!
A float walks into a gradual type system (ruudvanasseldonk.com)
I am building a new configuration language: RCL. It’s a gradually typed superset of json that extends json into a simple functional language that enables abstraction and reuse. Its main purpose is to generate json, yaml, and toml files, but it makes a pretty good json query tool too. Think jq, but without having to ask an LLM to write the query for you.
Demystifying monads in Rust through property-based testing (sunshowers.io)
In programming pedagogy, monads have a place as a mystical object from the functional programming world that’s hard to understand and even harder to explain.
Neut Programming Language (vekatze.github.io)
Neut is a functional programming language with static memory management.
Vine: A programming language based on Interaction Nets (vine.dev)
Neut Programming Language (vekatze.github.io)
Neut is a functional programming language with static memory management.
Why Clojure? (gaiwan.co)
Clojure is not one of the handful of "big" mainstream languages. This means that sometimes people are surprised that we are all in on Clojure. Why go against the grain? Why make it harder for yourself by building on niche technology?
Purely Functional Sliding Window Aggregation Algorithm (byorgey.github.io)
Suppose we have a list of items of length \(n\), and we want to consider windows (i.e. contiguous subsequences) of width \(w\) within the list.
Demystifying monads in Rust through property-based testing (sunshowers.io)
In programming pedagogy, monads have a place as a mystical object from the functional programming world that’s hard to understand and even harder to explain.
Jill – a functional programming language for the Nand2Tetris platform (github.com/mpatajac)
Jill is a functional programming language built for the Nand2Tetris platform, as an alternative to the original Jack high-level language.
Having an Effect (2016) (okmij.org)
This research has been a journey following the tantalizing lead: the founding papers on monads, monad transformers, free monads and extensible-effects were all about extensible interpreters.
Is NixOS truly reproducible? (luj.fr)
Build reproducibility is often considered as a de facto feature provided by functional package managers like Nix. Although the functional package manager model has important assets in the quest for build reproducibility (like reproducibility of build environments for example1), it is clear among practitioners that Nix does not guarantee that all its builds achieve bitwise reproducibility. In fact, it is not complicated to write a Nix package that builds an artifact non-deterministically: