frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Writing Silly LLM Agent in Haskell

https://xlii.space/eng/writing-silly-llm-in-haskell/
1•xlii•1m ago•0 comments

Building Your First Optimizely Opal Custom Tool

https://www.33sticks.com/articles/building-your-first-optimizely-opal-custom-tool
1•usujason•1m ago•0 comments

Sam Altman Subpoenaed on Stage

https://twitter.com/KarluskaP/status/1986766915277140052
5•anonymousiam•5m ago•0 comments

Kara Swisher Would Rather Work for Sam Altman Than Mark Zuckerberg

https://www.wired.com/story/the-big-interview-podcast-kara-swisher/
1•dkobia•9m ago•0 comments

Can the Global Economy Be Healed?

https://www.newyorker.com/news/the-financial-page/can-the-global-economy-be-healed
3•mitchbob•10m ago•1 comments

Speaking at the Site of a Murder

https://eternallyradicalidea.com/p/speaking-at-the-site-of-a-murder
1•arch_deluxe•10m ago•0 comments

Myna: Monospace typeface designed for symbol-heavy programming languages

https://github.com/sayyadirfanali/Myna
1•birdculture•11m ago•0 comments

Study: Meditation Retreat Rapidly Reprograms Body and Mind

https://today.ucsd.edu/story/meditation-retreat-rapidly-reprograms-body-and-mind
2•giuliomagnifico•12m ago•0 comments

Cornell reaches $60M deal with Trump administration to restore funding

https://www.nbcnews.com/news/us-news/cornell-reaches-60-million-deal-trump-administration-restore...
1•bikenaga•12m ago•0 comments

How to set up Emacs as an SVG editor

https://monospace.games/posts/20231030-editing-svg-with-emacs.html
3•monospacegames•12m ago•0 comments

Towards Humanist Superintelligence

https://microsoft.ai/news/towards-humanist-superintelligence/
1•johnwheeler•14m ago•0 comments

A.I. Abuse Is Reinventing the Law

https://www.nytimes.com/2025/11/07/business/lawyers-ai-vigilantes.html
2•ChrisArchitect•15m ago•1 comments

U.S. Congress considers ban on Chinese collaborations

https://www.science.org/content/article/u-s-congress-considers-sweeping-ban-chinese-collaborations
1•bikenaga•15m ago•0 comments

Rockstar employee shares account of the company's union-busting efforts

https://gtaforums.com/topic/1004182-rockstar-games-alleged-union-busting/
1•mrzool•16m ago•0 comments

Tell HN: Amazon intentionally keeps your money for as long as possible

2•ekjhgkejhgk•17m ago•1 comments

Researchers discover largest spider web

https://www.youtube.com/watch?v=LXMYLzaZZ44
2•kvam•19m ago•2 comments

3 Chinese astronauts stranded in space station, debris strikes return capsule

https://nypost.com/2025/11/06/world-news/3-chinese-astronauts-stranded-in-space-station-after-deb...
3•CGMthrowaway•19m ago•0 comments

Microsoft Contributing "Ramdax" Driver for Upcoming Linux 6.19 Kernel

https://www.phoronix.com/news/Microsoft-RAMDAX-Linux-Driver
1•mikece•22m ago•0 comments

Midjourney's Market Share Is Dropping: Live Data from a Prompt Marketplace

https://promptbase.com/popular-models
1•tinyprojects•22m ago•1 comments

Why Zig Is Quietly Doing What Rust Couldn't: Staying Simple

https://freedium-mirror.cfd/@daxx5/why-zig-is-quietly-doing-what-rust-couldnt-staying-simple-a47f...
2•RustSupremacist•22m ago•1 comments

Bibliotheca Ex Machina

https://www.are.na/cybr-self/bibliotheca-ex-machina
1•hamonrye•22m ago•0 comments

Cline Hooks – Inject Custom Logic into Cline's Workflow

https://cline.bot/blog/cline-v3-36-hooks
1•janpio•25m ago•0 comments

A Middle Layer for Offloading JVM-Based SQL Engines' Execution to Native Engines

https://github.com/apache/incubator-gluten
1•gangtao•29m ago•0 comments

Ask HN: What's the manager's role in shaping a report's career path?

1•allsystemsgo•32m ago•0 comments

Show HN: I made a browser extension to practice phonetic scripts (like katakana)

https://github.com/scpedicini/glyph-shift
2•vunderba•34m ago•1 comments

Avalonia Partners with Google's Flutter Team to Bring Impeller Rendering to .NET

https://avaloniaui.net/blog/avalonia-partners-with-google-s-flutter-t-eam-to-bring-impeller-rende...
1•heftymouse•34m ago•0 comments

Ente completes CERN sponsored audit

https://ente.io/blog/cern-audit/
1•amai•35m ago•0 comments

Show HN: Covpeek – Cross-language coverage report CLI parser (Rust/Go/TS/Python)

https://github.com/Chapati-Systems/covpeek
2•Wronnay•35m ago•0 comments

Yamaha Helm Master Ex

https://yamahaoutboards.com/rigging/helm-master-ex
1•gist•37m ago•1 comments

New North Carolina PFAS exposure findings as Chemours plans expansion

https://www.thenewlede.org/2025/10/new-north-carolina-pfas-exposure-findings-as-chemours-plans-ex...
2•PaulHoule•38m ago•0 comments
Open in hackernews

I Love OCaml

https://mccd.space/posts/ocaml-the-worlds-best/
175•art-w•4h ago

Comments

dmpk2k•2h ago
OCaml has been one of those "almost there" languages since at least 2002. Most of the worthwhile ideas in OCaml will be absorbed into more popular languages by the time existing friction is sorted out. :/
StopDisinfo910•2h ago
What is this alleged friction?

Because plenty of people have been shipping great projects in Ocaml since it was released so it doesn’t seem to be much of an issue to many.

I doubt Ocaml will be surpassed soon. They just added an effect system to the multicore rewrite so all things being considered, they seem to be pulling even more ahead.

dmpk2k•2h ago
Alleged? Come now.

Beginners face the following problems: there's multiple standard libraries, many documents are barely more than type signatures, and data structures aren't printable by default. Experts also face the problem of a very tiny library ecosystem, and tooling that's often a decade behind more mainstream languages (proper gdb support when?). OCaml added multicore support recently, but now there is the whole Eio/Lwt/Async thing.

I used to be a language nerd long ago. Many a fine hour spent on LtU. But ultimately, the ecosystem's size dwarfs the importance of the language itself. I'm sympathetic, since I'm a Common Lisp man, but I don't kid myself either: Common Lisp isn't (e.g.) Rust. I like hacking with a relic of the past, and that's okay too.

ernst_klim•1h ago
TBH I think it's rather a post-hoc rationalization of why the language is not popular.

> there's multiple standard libraries

Scala has a far more fragmented ecosystem with Cats, Scalaz, Zio and Akka. C++ and Java have a bunch of stdlib extensions like boost, Guava, Apache Commons etc.

> many documents are barely more than type signatures

Can be said of most of Java, Kotlin, Scala, Erlang etc etc. Just compiled javadocs, sometimes with a couple of unhelpful lines.

> data structures aren't printable by default

Neither they are in C++

I think the real reason it's not popular is that there are languages which solve more or less the same problems of system programming but look far more familiar to an avg. programmer who was raised on C++ and Java.

StopDisinfo910•1h ago
> there's multiple standard libraries

There is only one standard library and it shipped with the compiler.

> data structures aren't printable by default

So? That’s the case with most languages. Ocaml has a deriver to make types printable and a REPL which automatically prints for testing.

> tooling that's often a decade behind more mainstream languages

Opam is a fully featured package manager, dune works fine, bucks2 supports Ocaml.

> proper gdb support when?

Ocaml has had a rewindable debugger since approximately forever.

> OCaml added multicore support recently, but now there is the whole Eio/Lwt/Async thing.

Lwt was the default and everyone agrees eio is the future now that effects are there. Async is a Janestreet thing with pretty much no impact on the language outside of Janestreet.

Honestly, I maintained my initial point. Ocaml alleged frictions were always widely overstated.

When I was writing Ocaml professionally 15 years ago, there was no dune and no opam and it was already fairly easy to use the language.

greener_grass•1h ago
For me the issue is ecosystem. The foundations are great but I need more useful and well supported packages.

For example, there is no OAuth2 client library for OCaml [1]

[1] https://ocaml.org/docs/is-ocaml-web-yet

jddj•2h ago
Almost there, but in the meantime supporting a casual squillion dollars of trades at JS
zdragnar•2h ago
Unless you're building another JS, it'd be nice if there were other companies so heavily invested in it. There's a lot out there beyond compiler prototypes and high speed financial trades, but there's not enough talk of people using ocaml for those things.
disgruntledphd2•23m ago
Ocaml was (historically, at least) used by Facebook for basically all of their linter/compiler/type checker work. The hack checker was in Ocaml, as was the JS thing (flow, maybe?).

So that does seem to be a good use-case for the language.

ng12•1h ago
Yes and they had to basically build their own version of the compiler to keep everything from falling over (https://oxcaml.org/).
byefruit•1h ago
This is the wrong interpretation of the oxcaml project. If you look at the features and work on it, it's primarily performance or parallelism safety features.

The latter going much further than most mainstream languages.

wrenky•1h ago
> Our hope is that these extensions can over time be contributed to upstream OCaml.

Yeah, its more just extensions to support their use cases at scale. Think of it more as bleeding edge ocmal, once they work out kinks/concerns they'll get merged back into the language OR if it remains ultra specific it'll stay in oxcaml.

Not a complete own version lol

ng12•1h ago
Yes but the context of the thread is OCaml being "almost there". Having to build this stuff in-house is pretty good evidence.
StopDisinfo910•1h ago
Evidence of what?

The main user has been writing extensions to the compiler that they test before pushing for integration like they have done for the past twenty years or so. They publish these versions since last year.

Hardly a failure and certainly not something mandatory to keep things from failing over. Your initial comment is extremely disingenuous.

throw-qqqqq•35m ago
I don’t know about that.

Python gets forked in other investment banks as well. I wouldn’t say that is evidence of any deficiencies, rather they just want to deal with their own idiosyncrasies.

See https://calpaterson.com/bank-python.html

procaryote•1h ago
Yeah, but when these things happen I ask myself, is Jane Street successful because of ocaml, or did they just happen to pick ocaml and then make it work?

There might be some power in attracting all the people who happen to love ocaml, if there are enough of competent people to staff your company, but that's more a case of cornering a small niche than picking on technical merits

warkdarrior•51m ago
Clearly Jane Street wouldn't be where it is, a top proprietary trading firm in US, without static type checking.
7thaccount•2m ago
They've spoken about this before and might not have picked OCaml if they had to make the decision again today. I think at the time it made the most sense.

They can also make it work in any language as they claim to only recruit the best and brightest in the world (this may be the truth).

My opinion is they could have chosen many languages and had similar results while balancing different trade-offs.

hardwaregeek•2h ago
Perhaps OCaml is the Velvet Underground of languages. Only a few thousand people learned OCaml but every one made a programming language[1]

[1]: https://quoteinvestigator.com/2016/03/01/velvet/

greener_grass•1h ago
That would be Elm :)
giovannibonetti•1h ago
Roc says hi!
1-more•29m ago
I've been saying for ages! Gleam, Roc, Derw, Gren, Cara, Zokka, and the error messages in Rust.

https://news.ycombinator.com/item?id=45646520#45752905

z500•1h ago
And now C# is slowly absorbing features from ~~OCaml.NET~~ F#. So that's nice, at least.
pohl•2h ago
To this day, whenever I see Machine Learning abbreviated, my heart skips a beat, then I become crestfallen as I realize I'm not about to read something about Meta Language.
PaulHoule•1h ago
ML blew my mind back in the late 1980s when I got to use it on a 80286 machine for the first time!
kjmh•1h ago
ML refers to Meta Language and LLM refers to Languages and Logic Montreal [0], a PL theory group. [0] https://llm.uqam.ca
embedding-shape•1h ago
> PL theory group

I know there are great many Polish people in the world, but why it matters so much in this case? They could have been any nationality, even French!

pluralmonad•59m ago
I believe many people use PL to mean programming language. I'm wondering if your joke just wooshed me.
embedding-shape•39m ago
You believe I'd purposefully misread an abbreviation in a comment about misreading abbreviations, and also coincidentally tried to make fun of two other nationalities (maybe even three, depending on political views), all at the same time?

I would never.

crdrost•38m ago
I mean pohl's joke above whooshed kjmh so it's all fine. The important thing for threads like this one is for us to name drop all of the weird programming languages that we have used, publicly avow the greatness of ones that we have not, and make a New Year's resolution that we will never follow, to actually pick up those great languages and write something in them...
seanw444•1h ago
I'd rather have that issue than seeing "AI" plastered all over the place. I'm of the opinion AI should be reserved for artificial general intelligence. These things aren't intelligent yet. They're just em-bloat-ified traditional machine learning techniques. Not that they're useless. I just hate the terminology.

If people start using the term AI, we better be living in I, Robot. Not whatever the hell this is.

Tangential rant. Sorry.

crdrost•29m ago
We lost this fight at least by 1994 when Sun acquired “Thinking Machines,” which to its credit was bankrupting itself by making highly parallel supercomputers, at least. Now of course there is a new AI company of the same name. If the wrestling world echoes the computing world, one can only wonder what in 5-10 years will be the equivalent of Undertaker throwing Mankind off of Hell In A Cell to plummet 16 feet down through an announcer’s table...
wslh•2h ago
Offtopic HTML issue to the author: there is a trailing </head> tag at the end of your generated HTML after the </body> (instead of </html>).
fmbb•2h ago
> It is an old language, and there are a few features that could probably be left out like the OOP-related features, and some libraries in the ecosystem over-complicate things like in Haskell.

If one can stand a language that is just a little bit older, there is always Standard ML. It is like OCaml, but perfect!

assbuttbuttass•2h ago
I love standard ml (I'm currently writing a compiler for it), but it's far from perfect. There are weird special cases in the language definition like the ad-hoc overloading between int and real, or the annoying value restriction. Records also feel half-baked, with no support for updating fields or for partially-specified records where the full set of fields is not known
mkehrt•1h ago
I've written a fair amount of SML (though years ago) and I can't remember the value restriction ever being an issue.

I certainly agree that SML isn't really a production language, though.

retrac•1h ago
> with no support for updating fields

While it's not yet standard nearly all Standard ML implementations support what has become known as "Successor ML" [0]. A large subset of Successor ML is common to SML/NJ, MLton, Poly/ML, MLKit and other implementations.

That includes record update syntax, binary literals, and more expressive patterns among other deficiencies in Standard ML.

For me the two big remaining issues are:

1) There's only limited Unicode support in both the core language and the standard library. This is a big issue for many real-world programs including these days the compilers for which SML is otherwise a wonderful language.

2) The module system is a "shadow language" [0] which mirrors parts of SML but which has less expressiveness where modules cannot be treated as first-class values in the program. Also if you define infix operators in a module their fixity isn't exported along with the function type. (Little annoyance that gets me every time I am inclined to write Haskell-style code with lots of operators. Though maybe that's just another hint from the universe that I shouldn't write code like that.) Of course, the fix to that would be a fundamentally different language; not a revised SML.

[0] http://mlton.org/SuccessorML

[1] https://gbracha.blogspot.com/2014/09/a-domain-of-shadows.htm...

jimbokun•12m ago
As I was saying, Successor ML is like OCaml, but perfect!
DeathArrow•2h ago
For something a bit more modern but still related to OCaml, one can try F#.
greener_grass•1h ago
F# is a practical choice but the language features are quite far behind OCaml now.

{Ecosystem, Functors} - choose 1

runevault•1h ago
From an outsider's perspective, it feels like Ocaml has more active development of features, between the new effects system they added in 5 and all the work Janestreet is doing to let Ocaml developers have more control over performance.

F# is not stagnant thankfully, it gets updates with each new version of dotnet (though I haven't checked what is coming with dotnet 10), but I don't recall anything on the level of the above Ocaml changes in years.

greener_grass•1h ago
Applicative Computation Expressions are a big deal (added in F# 5). Recent changes have been smaller in scope.

Unfortunately lots of the more advanced stuff seems to be blocked on C# team making a decision. They want a smooth interop story.

But F# remains a solid choice for general purpose programming. It's fast, stable and .NET is mainstream.

runevault•1h ago
Oh yeah I love f#, I need to find more excuses to use it. I just wish it felt like MS was willing to invest more into it. But at least they have not abandoned it and continue to put some resources into its ongoing growth.
phplovesong•25m ago
F# also has a real slow compiler. Last time hello world took a few secs on brand new mac.
sanufar•1h ago
OCaml’s REPL is lovely, but I found myself having some friction with initial startup. The build/package system was pretty convoluted, and I ended up choosing JS’s Core stdlib for my needs (a simple compiler). With the new multicore release it’d be cool to see OCaml in some more practical projects!
paulsmith•34m ago
As an OCaml-curious, is this the community recommendation, to choose the Jane Street stdlib if you’re just getting started?
tlavoie•19m ago
It's probably the path of least resistance if following the Real World OCaml book (https://dev.realworldocaml.org/), which is quite excellent.
pkilgore•1h ago
There's some other stuff, but I personally believe if the tooling was closer to Rust/Go than C, it would be a lot, lot more popular.

Nobody wants to effectively learn a lisp to configure a build system.

phplovesong•26m ago
Dune is quite good these days. The lisp part is really just sexps (not a full languge). But i kind of get your point.
ufko_org•1h ago
Yes, in every ML/OCaml tutorial, sooner or later the words object, class, and type inference appear and that’s when a once–minimalist language turns into an academic Frankenstein.
rwmj•1h ago
I don't think objects and classes are used much by OCaml programmers (not by me anyway). Type inference is a rather fundamental feature, and fairly easy to understand.
giovannibonetti•1h ago
Why does type inference contribute to that issue?
Barrin92•1h ago
It's not a minimalist language, you know what the "O" in Ocaml stands for right? It's a multi-paradigm language that explicitly accommodates more styles of programming than Caml, it's why it exists.
pulkas•1h ago
darklang team loved ocaml too. in the end they ended up using f#.
karmakaze•1h ago
I've dabbled in F# (and aside from the rough setup with little coherent information at the time) had a pretty good time. Actor-based concurrency was easy to grok. The one gotcha was whenever those mutable Arrays entered the picture.

I'd like to hear some practical reasons for preferring OCaml over F#. [Hoping I don't get a lot about MS & .NET which are valid concerns but not what I'm curious about.] I want to know more about day to day usage pros/cons.

ernst_klim•1h ago
> I'd like to hear some practical reasons for preferring OCaml over F#

Bigger native ecosystem. C#/.net integration is a double edged sword: a lot of libraries, but the libraries are not written in canonical F#.

A lot of language features F# misses, like effect handlers, modules, GADTs etc.

karmakaze•1h ago
I did get some sense of that where F# sort of (actually is) 2nd class to C# which is slowly gaining some F# features, but F# itself isn't well promoted/supported.

As for missing language features, they can also be a double-edged sword. I slid down that slippery slope in an earlier venture with Scala. (IIRC mostly implicits and compile times).

Nelkins•51m ago
There are libraries that simulate a lot of these things (e.g. https://github.com/G-Research/TypeEquality for GADTs). You're absolutely right that it's not as first class as in OCaml, but the tools are there if you want them.
p0nce•1h ago
Well I need both float and double, so cannot even start using it.
ModernMech•1h ago
>why isn’t OCaml more popular?

OCaml did become popular, but via Rust, which took the best parts of OCaml and made the language more imperative feeling. That's what OCaml was missing!

StopDisinfo910•53m ago
Rust is very different from Ocaml. Rust is a low level language with a borrow checkers, traits, no first class module system, no GADT, no effects.

The similarities are fairly superficial actually. It’s just that Rust is less behind the PL forefront that people are used to and has old features which look impressive when you discover them like variants.

There is little overlap between what you would sanely use Rust for and what you would use Ocaml for. It’s just that weirdly people use Rust for things it’s not really suited for.

reddit_clone•20m ago
Ocaml can be as imperative as you need it to be. Or as functional.

It has no dogmatic inclination towards functional. It has a very pragmatic approach to mutation.

pasxizeis•1h ago
As a Rust newbie and seasoned Go dev, I'm pretty interested to knownwhere would people experienced in both OCaml and Haskell, would put it in the spectrum.
hollerith•1h ago
What does "it" refer to? Ocaml?
7thaccount•1h ago
What spectrum? Language practicality? Popularity?

OCaml has some high profile use at Jane Street which is a major fintech firm. Haskell is more research oriented. Both are cool, but wouldn't be my choice for most uses.

bojo•1h ago
My team still has 8 year old Haskell systems in production. We pivoted away from the language a few years ago, which I discuss here a bit: https://news.ycombinator.com/item?id=37746386

I personally love ML languages and would be happy to keep developing in them, but the ecosystem support can be a bit of a hassle if you aren't willing to invest in writing and maintaining libraries yourself.

efficax•1h ago
OCaml is fantastic, but I avoided it and went with Rust for many projects because it had no multicore story and no green threads for a very long time. But it has that now, and I wish I could go back and start everything over in OCaml.
darksaints•14m ago
I've also felt very similar, and adopted Rust for those reasons. Even though I'd still love to have a garbage collected, AOT compiled ML-variant, using OCaml still feels like a step backwards now. OCaml's module system and generics feel clumsy and unintuitive now that I've used Rust's Trait system.
fer•1h ago
One of the best P2P clients ever created is written in OCaml: https://github.com/ygrek/mldonkey

I'm still surprised it can do so many things so well, so fast.

japhib•1h ago
Elixir is the closest thing to OCaml that has a chance at semi-mainstream usage IMO.

It has basically all of the stuff about functional programming that makes it easier to reason about your code & get work done - immutability, pattern matching, actors, etc. But without monads or a complicated type system that would give it a higher barrier to entry. And of course it's built on top of the Erlang BEAM runtime, which has a great track record as a foundation for backend systems. It doesn't have static typing, although the type system is a lot stronger than most other dynamic languages like JS or Python, and the language devs are currently adding gradual type checking into the compiler.

DrewADesign•1h ago
I think it’s odd that elixir doesn’t get more love. It ticks a lot of boxes that folks here get excited about, has a great ecosystem and tooling, BEAM is great, and it’s much more syntactically familiar than erlang to my eye. I know of a couple companies aside from the perennial goto examples that built sizable saas products backed by it.
skybrian•56m ago
What does deployment look like? Can you get a static binary easily like with Go?
crdrost•46m ago
You don't get it from language tooling because you are compiling to a bytecode that runs in a virtual machine (BEAM).

The current tool to wrap your bytecode with a VM so that it becomes standalone is Burrito[1], but there's some language support[2] (I think only for the arch that your CPU is currently running? contra Golang) and an older project called Distillery[3].

1: https://github.com/burrito-elixir/burrito

2: https://hexdocs.pm/mix/Mix.Tasks.Release.html

3: https://hexdocs.pm/distillery/home.html

pluralmonad•54m ago
Elixir is good at managing complexity. I love flattening hierarchy and dealing with edge cases right in function definitions using pattern matching. Every other language without it just feels crippled after getting used to the feature.
cardanome•19m ago
The backend work I do is just super boring.

I always wanted to learn Elixir but never had a project where it could show it strengths. Good old PHP works perfectly fine.

Also corporations like their devs to be easily replaceable which is easier with more mainstream languages, so it is always hard for "newer" languages to gain traction. That said I am totally rooting for Elixir.

phplovesong•48m ago
Gleam also. But i cant justify a non compiled language in many things i do.
cultofmetatron•45m ago
gleam is compiled... to erlang bytecode
seafoamteal•36m ago
It's compiled to Erlang, not BEAM bytecode, as the latter is not a stable, backward-compatible API to target, and you lose all of the optimization work put into the Erlang compiler. It's also compiled to JavaScript, so it can run on both the front-end and back-end.
phplovesong•18m ago
I want a static binary. Not some IR i run on some VM.
vvpan•47m ago
If it's functional (recursion vs imperative loops) most people/organizations will not use it. At this point that is just the reality.
zaphar•42m ago
Having loops is not the defining feature that separates functional from imperative. Where did this idea come from? I'm suddenly seeing it in a lot of places.
gmadsen•36m ago
its a simplification of immutability and its consequences
cyberpunk•42m ago
immutability?

    Interactive Elixir (1.19.0) - press Ctrl+C to exit (type h() ENTER for help)
    iex(1)> x = 1
    1
    iex(2)> x = 2
    2
    iex(3)>

What's immutable about elixir? It's one of the things which I MISS from Erlang -- immutability.
nitros•32m ago
This is like saying Haskell doesn't have immutability because it has the state monad, or that rust doesn't because you can shadow with let.

Data is immutable and thats much more important than whether local variables can be modified imo.

debugnik•20m ago
Shadowing is not mutability. The former isn't affected by control flow nor does it affect closures.
BenGosub•36m ago
Writing OCaml and writing Elixir code is much different for me. OCaml requires more braincells, while Elixir is more flexible.
BenGosub•34m ago
I think that a better question is why F# isn't a more popular language, since it's much closer to OCaml, than Elixir and you can use the whole Dotnet ecosystem in F#, which is one of the weakest points of OCaml (no libraries).
schonfinkel•2m ago
The answer is Microsoft, I kid you not. I've worked with F# professionally for many years is its incredible how they are literally sitting atop a gold mine that is the output of Microsoft research and do basically nothing with it. Even though it's sold as an ecosystem, .NET revolves around C# and its related tooling.

"Type Providers" are an example of such negligence btw, it never got popular even though some of its ideas (Typed SQL that can generate compile-time errors) are getting traction now in other ecosystems (like Rust's SQLx). My team used SQL Providers in a actual production system, combined with Fable (for F# on front end) and people always commented how our demos had literally 0 bugs, maybe it was too productive for our own good.

belter•12m ago
BEAM performance model trades throughput for isolation, which hurts CPU-bound tasks, and ironically, whenever you need speed, you end up using NIFs that break BEAM safety guarantees, and reintroduce the exact fragility Elixir was supposed to avoid.

In 2025, Elixir is a beautiful system for a niche that infrastructure has already abstracted away.

jimbokun•4m ago
> In 2025, Elixir is a beautiful system for a niche that infrastructure has already abstracted away.

Do you mean Kubernetes?

My mental model of Erlang and Elixir is programming languages where the qualities of k8s are pushed into the language itself. On the one hand this restricts you to those two languages (or other ports to BEAM), on the other hand it allows you to get the kinds of fall over, scaling, and robustness of k8s at a much more responsive and granular level.

a-dub•57m ago
fun fact: the secret sauce that makes fftw fast is a code generator written in ocaml: https://github.com/FFTW/fftw3/tree/master/genfft
yujzgzc•55m ago
I loved Ocaml but now I love TypeScript more. It's got about the same amount of type safety, the ergonomics are better to me, and the packaging and ecosystem tooling are leaps and bounds above anything else.
phplovesong•53m ago
You would not really build the same software tho.
phplovesong•49m ago
I kind of wish (like the OP mentioned) there was a ML (ocaml) like language that compiled to Go source. You would get the best of both worlds and access to a huge ecosystem.
nathcd•19m ago
There's Borgo: https://github.com/borgo-lang/borgo

I've never used it so can't speak from any experience, and unfortunately it doesn't seem particularly active (and doesn't mention a current status anywhere), and doesn't have a license, so shrug. When it's been posted here (https://news.ycombinator.com/item?id=40211891), people seemed pretty excited about it.

phplovesong•15m ago
Borgo looks like some guys phd thesis. It looks like it was a fun experiment.

I feel a new simple ocaml like language that just compiled to Go would be really popular, really fast. And it would not even need to build a ecosystem, as Go already have all the things you need.

Something like what Gleam is for Erlang.

fermigier•24m ago
Little known fact: OCaml was at one point called "Zinc" ("Zinc is not Caml").
ilaksh•20m ago
Why isn't it more popular if it's so good? Because popularity and merit are not the same thing. People confuse them all the time though.

Check out the most popular music today. Like the top ten songs currently. Do you think those are really the best songs out there?

Popularity is mostly driven by either trends or momentum.

ArnavAgrawal03•19m ago
Came here to say I love Ocaml too
timhh•18m ago
> why isn’t OCaml more popular

I've used OCaml a bit and found various issues with it:

* Terrible Windows support. With OCaml 5 it's upgraded to "pretty bad".

* The syntax is hard to parse for humans. Often it turns into a word soup, without any helpful punctuation to tell you what things are. It's like reading a book with no paragraphs, capitalisation or punctuation.

* The syntax isn't recoverable. Sometimes you can add a single character and the error message is essentially "syntax error in these 1000 lines".

* Ocamlfmt is pretty bad. It thinks it is writing prose. It will even put complex `match`es on one line if they fit. Really hurts readability.

* The documentation is super terse. Very few examples.

* OPAM. In theory... I feel like it should be great. But in practice I find it to be incomprehensible, full of surprising behaviours, and also surprisingly buggy. I still can't believe the bug where it can't find `curl` if you're in more than 32 Unix groups.

* Optional type annotation for function signatures throws away a significant benefit of static typing - documentation/understanding and nice error messages.

* Tiny ecosystem. Rust gets flak for its small standard library, but OCaml doesn't even have a built in function to copy files.

* Like all FP languages it has a weird obsession with singly linked lists, which are actually a pretty awful data structure.

It's not all bad though, and I'd definitely take it over C and Python. Definitely wouldn't pick it over Rust though, unless I was really worried about compile times.

agentultra•5m ago
Why isn't it more popular?

I think Richard Feldman [0] proposed some of the most reasonable theories as to why functional programming isn't the norm. Your language needs to be the platform-exclusive language for a widely used platform, have a killer application for a highly desired application domain, or be backed by a monster war-chest of marketing money to sway opinions.

Since Feldman's talk, Python has grown much faster in popularity in the sense of wide use in the market place... but mostly because it's the scripting language of choice for PyTorch and AI-adjacent libraries/tooling/frameworks which is... a killer application.

I like OCaml. I started evaluating functional programming in it by taking the INRIA course online. I spent the last four and half years working in Haskell. I've built some side projects in Zig. I was a CL stan for many years. I asked this question a lot. We often say, "use the best tool for the job." Often that means, "use the tool that's available."

I think languages like OCaml, Rust, Haskell etc can be "popular," but in the sense that people like to talk about them and want to learn them and be able to use them (at least, as trends come and go). It's different from "popular" as in, "widely adopted."

[0] https://www.youtube.com/watch?v=QyJZzq0v7Z4