frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Functional Programmers need to take a look at Zig

https://pure-systems.org/posts/2026-04-29-functional-programmers-need-to-take-a-look-at-zig.html
30•xngbuilds•1h ago

Comments

dnautics•40m ago
io is not a monad. theres nothing stopping you from stashing a global io "object" and just passing the global wherever you interface with the stdlib.

It's dependency injection. and yes, you can model dependecies like a monad but most people, even in less pure fp langs, don't.

i don't really say this to just be a pedant, but if you're an fp enjoyer, you will be disappointed if you get the picture that zig is fp-like, outside of a few squint-and-it-looks-like things

tux1968•27m ago
My reading of the article, was that the author seems to be in search of a new paradigm, that moves beyond what he sees as the limitations of "fp-like" languages as they exist today. His point appears to be that Zig provides the benefits of "fp-like" languages that exist today, while avoiding at least some of the downsides.

And he does admit you may have to squint, to appreciate the fp capabilities provided by Zig.

jstanley•22m ago
> Noise is anything that must be written for the program to function that is not relevant to the domain.

> ...

> What facilities does the language provide me to create correct-by-construction systems and how easily can I program the type-system.

Isn't programming the type-system orthogonal to the program's domain in the same way that manual memory management is?

rdevilla•12m ago
No? I don't agree. The domain can be strongly modelled in the types; for instance, declaring kilometers, seconds, etc. instead of using primitive floats/reals everywhere, to statically prevent dimensional analysis issues.
pyrolistical•18m ago
I don’t get it

Why write:

EqPoint.eql(a, c)

When you can write:

Point.eql(a, c)

continuational•16m ago
Do you really prefer this:

  fn Maybe(comptime T: type) type {
    return union(enum) {
        value: T,
        nothing,

        const Self = @This();

        pub fn just(the_val: T) Self   { return .{ .value = the_val }; }
        pub fn nothing() Self          { return .nothing; }

      }
    }
Over this?

    data Maybe a = Just a | Nothing
rdevilla•11m ago
My old memories of Guava in Java 6 have been triggered.
rene_d•9m ago
Optionals handle this in zig:

  var value: ?T = null;
Write:

  value = 10;
Read:

  if (value) |x| x+=1
nesarkvechnep•6m ago
Came to say this. Early in my career I really thought implementing Maybe in any language is necessary but not I know better. Use the idioms and don’t try to make every language something it’s not.
eikenberry•7m ago
This looks like an example of a low level language vs a high level language (relatively speaking). The low level language makes a lot more of what is going on underneath explicit compared to the higher level language which abstracts that away for a common pattern. Presumably that explicitness allows for more control and/or flexibility. So apples to oranges?
voxl•11m ago
A functional programmer who casts away proper sum types and pattern matching is no functional programmer at all
givemeethekeys•8m ago
Isn't the whole point of abstraction to not care about whats underneath unless you really have to? But ideally, you don't because the abstraction is "good enough"?

I haven't heard anyone writing code in Elixir complain about performance issues.

AI optimism surges in Asia, unlike in the U.S.

https://restofworld.org/2026/ai-optimism-asia/
1•TheWeiHu•2m ago•0 comments

The Shadow Glass

https://morrigan-tech.com/blog/the-shadow-glass/
1•milkglass•6m ago•0 comments

OpenObserve Raises $10M Series A

https://openobserve.ai/blog/series-a-announcement/
2•safeie•10m ago•0 comments

Monad Tutorials Timeline

https://wiki.haskell.org/Monad_tutorials_timeline
2•brudgers•20m ago•1 comments

Lessons from Building an OTel Normalizer for GenAI

https://www.groundcover.com/blog/otel-normalizer-genai-part-1
2•thebitofmyheart•24m ago•0 comments

Physicists reveal universal speed limit on quantum information scrambling

https://phys.org/news/2026-04-physicists-reveal-universal-limit-quantum.html
2•thunderbong•30m ago•1 comments

Talking About Dark Matter – Sixty Symbols [video]

https://www.youtube.com/watch?v=qxuMRaUbWow
1•celias•31m ago•1 comments

Show HN: Vela Coach – an open-source coach that reads your Granola transcripts

https://github.com/Vela-Engineering/coach
1•yihlamur•31m ago•0 comments

Ashby's Law of Requisite Variety (Cybernetics)

https://en.wikipedia.org/wiki/Variety_(cybernetics)
1•nomilk•33m ago•0 comments

Humanoid Robots Are Still a Body Problem with Jerry Pratt [video]

https://www.youtube.com/watch?v=fsPDZjWMKMs
2•thunderbong•39m ago•0 comments

Meta stock drops on quarterly results 'internet disruptions' user numbers down

https://www.cnbc.com/2026/04/29/meta-q1-earnings-report-2026.html
1•1vuio0pswjnm7•43m ago•0 comments

In Backlash Against Tech in Schools, Parents Are Winning Rollbacks

https://www.nytimes.com/2026/04/29/technology/parents-school-tech-backlash.html
2•1vuio0pswjnm7•46m ago•0 comments

Tourist dies after being bitten at snake show while on vacation in Egypt

https://www.cnn.com/2026/04/28/africa/tourist-dies-snake-bite-egypt-scli-intl
1•fortran77•46m ago•0 comments

OpenAI, Sam Altman Hit with Slate of Lawsuits over Mass Shooting Canadian School

https://www.law.com/therecorder/2026/04/29/openai-sam-altman-hit-with-slate-of-lawsuits-over-mass...
2•1vuio0pswjnm7•48m ago•0 comments

Infrastructure Spend in the AI Era

https://redmonk.com/sogrady/2026/04/29/infrastructure-spend-in-the-ai-era/
1•mooreds•48m ago•0 comments

The Harmful Consequences of the Robustness Principle (2018)

https://datatracker.ietf.org/doc/html/draft-thomson-postel-was-wrong-03
1•Tomte•49m ago•0 comments

AMS – Detect unsafe LLMs in 30 seconds via activation analysis

https://github.com/GoogleCloudPlatform/activation-model-scanner
1•gmessenger•51m ago•0 comments

Fanspeak (1999)

https://www.fantasymaps.com/stuff/fanspeak.html
1•ipnon•52m ago•0 comments

Operation Sundevil (1990)

https://en.wikipedia.org/wiki/Operation_Sundevil
1•rickcarlino•58m ago•0 comments

Stablecoin Reserve Race: Brazil Pix, Morgan Stanley, OCC Charters

https://stablecoinbrief.substack.com/p/stablecoin-reserve-race-brazil-pix
1•knivef•1h ago•0 comments

Building agents that reach production systems with MCP

https://claude.com/blog/building-agents-that-reach-production-systems-with-mcp
1•gmays•1h ago•0 comments

Biology is a Burrito: A text- and visual-based journey through a living cell

https://burrito.bio/essays/biology-is-a-burrito
28•the-mitr•1h ago•4 comments

Can LLMs create lasting flashcards from readers' highlights?

https://memory-machines.com/report/
1•jryio•1h ago•0 comments

The Arpanet Reconstruction Project

https://obsolescence.dev/arpanet_home.html
2•ecliptik•1h ago•0 comments

Where the goblins came from

https://openai.com/index/where-the-goblins-came-from/
178•ilreb•1h ago•79 comments

Demonstrating the idea of gamma camera imaging [video]

https://www.youtube.com/watch?v=PyGlHtvihXA
5•num42•1h ago•0 comments

Ernie 5.1 Preview

https://ernie.baidu.com/
3•qainsights•1h ago•0 comments

Strait of Hormuz Daily Intelligence

https://insights.windward.ai/
3•jnord•1h ago•0 comments

LFM2-24B-A2B: Scaling Up the LFM2 Architecture

https://www.liquid.ai/blog/lfm2-24b-a2b
2•nateb2022•1h ago•0 comments

Finetuning Activates Verbatim Recall of Copyrighted Books in LLMs

https://github.com/cauchy221/Alignment-Whack-a-Mole-Code
41•reconnecting•1h ago•11 comments