functional.cafe is one of the many independent Mastodon servers you can use to participate in the fediverse.
functional.cafe is an instance for people interested in functional programming and languages.

Server stats:

221
active users

Public

Features like IFD are useful in build systems because they allow build systems to be Monadic, in the words of the Hadrian paper: build things to decide what to build. By comparison, an Applicative build system such as Bazel can only take in things that are known statically; in Bazel it is thus common to check in generated build instructions. This property in category theory is illustrated in the type signatures of the operations of Monad and Applicative:
#nix
dl.acm.org/doi/10.1145/3241625
jade.fyi/blog/nix-evaluation-b

ACM SIGPLAN NoticesNon-recursive make considered harmful: build systems at scale | ACM SIGPLAN Notices Most build systems start small and simple, but over time grow into hairy monsters that few dare to touch. As we demonstrate in this paper, there are a few issues that cause build systems major scalability challenges, and many pervasively used build ...

@xameer IFD makes the Nix language a Monadic build system. RFC 92 dynamic derivations make the derivation layer a Monadic build system, so that the language doesn't suffer from the disadvantages of Monadicity, such as having to keep the language evaluator alive while building.

cc the author @Ericson2314

Public

@roberth @Ericson2314
> evaluation is inherently sequential (at least in the current implementation), while only realization is parallel. This means that builds with multiple cases of IFD do not scale well because they happen strictly one after the other.
Via nix academy
Is this still correct?

Public

@xameer @Ericson2314 Yes. Parallelizing evaluation doesn't scale very well and tends to require user-provided hints (like a Haskell-inspired par function), whereas a derivation graph is trivially concurrent.
I also suspect eval parallelism may interfere with an improved eval caching strategy, but this is speculative.
Speaking of speculative, par is speculative execution :D (the mostly good kind, not the fragile CPU kind)