<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: kcsrk</title><link>https://news.ycombinator.com/user?id=kcsrk</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 16 May 2026 10:49:19 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=kcsrk" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by kcsrk in "O(x)Caml in Space"]]></title><description><![CDATA[
<p>What’s surprised me in the last few months is that agents are great at producing OCaml 5+ and OxCaml code, not much of which is out there in the training data. OxCaml’s strong types and modes seem to serve as great testable oracles to guide the agents.<p>I taught a course on concurrent programming based on OCaml 5 and OxCaml where almost all of the code in the teaching materials were vibe coded. I reviewed all of the code (because I was teaching it to a class of 50+ students) and frankly the agent writes better O(x)Caml (mostly) than me.</p>
]]></description><pubDate>Fri, 15 May 2026 13:31:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=48148367</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=48148367</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48148367</guid></item><item><title><![CDATA[New comment by kcsrk in "Control structures in programming languages: from goto to algebraic effects"]]></title><description><![CDATA[
<p>Not necessarily. You can implement them using a monad. See <a href="https://dl.acm.org/doi/10.1145/2804302.2804319" rel="nofollow">https://dl.acm.org/doi/10.1145/2804302.2804319</a>. That said, in GHC Haskell the implementation on top of stack switching seems to outperform other implementation strategies. See <a href="https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0313-delimited-continuation-primops.rst#putting-numbers-to-the-cost" rel="nofollow">https://github.com/ghc-proposals/ghc-proposals/blob/master/p...</a>.<p>In OCaml 5, we’ve made it quite fast: <a href="https://kcsrk.info/papers/drafts/retro-concurrency.pdf" rel="nofollow">https://kcsrk.info/papers/drafts/retro-concurrency.pdf</a>. For us, the goal is to implement concurrent programming, for which a stack switching implementation works well. If you use OCaml effect handlers to implement state effect, it is going to be slower than using mutable state directly. And that’s fine. We’re not aiming to simulate all effects using effect handlers, only non-local control flow primitives like concurrency, generators, etc.</p>
]]></description><pubDate>Sun, 09 Nov 2025 05:51:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=45863265</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=45863265</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45863265</guid></item><item><title><![CDATA[New comment by kcsrk in "Evolving the OCaml Programming Language (2025) [pdf]"]]></title><description><![CDATA[
<p>It was overlooked because I didn't know!<p>Great to hear about virt-v2v. I will reach out to you by email.</p>
]]></description><pubDate>Fri, 05 Sep 2025 11:58:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=45137532</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=45137532</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45137532</guid></item><item><title><![CDATA[New comment by kcsrk in "Evolving the OCaml Programming Language (2025) [pdf]"]]></title><description><![CDATA[
<p>It is often hard to see the shape of these things before a serious PR attempt is made. Each of the PRs reveals more of the shape of the problem being solved. Hard to skip them in practice, especially for new contributors.</p>
]]></description><pubDate>Fri, 05 Sep 2025 05:29:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=45135247</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=45135247</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45135247</guid></item><item><title><![CDATA[New comment by kcsrk in "Evolving the OCaml Programming Language (2025) [pdf]"]]></title><description><![CDATA[
<p>You are right that the dynamic arrays story does not read like a straightforward “how to inspire contributions.” But part of what I wanted to do in the talk was to show things as they actually unfolded. In OCaml compiler development, there is a very strong emphasis on correctness and long-term stability. That can make contributions, especially to core language features, feel harder than they might in faster-moving ecosystems.<p>The dynamic arrays case is a good illustration. What began as a small PR grew into years of design iterations, debates about representation, performance, and multicore safety, and eventually a couple of thousand lines of code and more than 500 comments before it landed. From one perspective, that looks discouraging. From another, it shows the weight we place on getting things right, because once a feature ships, it is very hard to undo.<p>That tension, between wanting to be open and encouraging contributions but also needing to protect stability, is something I think we should be talking about openly. My hope is that by making the process more visible we can demystify it and help contributors understand not just what happened, but why.</p>
]]></description><pubDate>Fri, 05 Sep 2025 05:05:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=45135152</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=45135152</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45135152</guid></item><item><title><![CDATA[New comment by kcsrk in "Evolving the OCaml Programming Language (2025) [pdf]"]]></title><description><![CDATA[
<p>I am the author of the talk here o/.<p>This talk is a _subjective_ take on how the OCaml programming language evolves, based on my observations over the last 10 years I've been involved with it. My aim/hope is to demystify the compiler development process and the tradeoffs involved and encourage more developers to take a shot at contributing to the OCaml compiler.<p>Happy to answer questions, but also, more importantly, hear your comments and criticisms around the compiler development process, ideas to make it more approachable, etc.</p>
]]></description><pubDate>Fri, 05 Sep 2025 04:03:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=45134878</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=45134878</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45134878</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml Programming: Correct and Efficient and Beautiful"]]></title><description><![CDATA[
<p>Kcas is the Haskell STM analogue in OCaml <a href="https://github.com/ocaml-multicore/kcas/">https://github.com/ocaml-multicore/kcas/</a></p>
]]></description><pubDate>Sun, 27 Jul 2025 01:41:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=44698229</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=44698229</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44698229</guid></item><item><title><![CDATA[Data Race Free OCaml]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/doc/proposals/data-race-freedom.md">https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/doc/proposals/data-race-freedom.md</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=35872303">https://news.ycombinator.com/item?id=35872303</a></p>
<p>Points: 2</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 09 May 2023 10:37:22 +0000</pubDate><link>https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/doc/proposals/data-race-freedom.md</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=35872303</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=35872303</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>Right. It is hard in general to compare performance or generated code across languages as they make different trade offs. Table 3 and 5 show compilation of our memory model to X86 and ARMv7. The compilation and the related work section discusses trade offs.<p>To summarise, atomic read and write in OCaml is more expensive than C++ since C++ SC atomics only establish total order between SC operations on not operations that are weaker but related to SC operations by happens before. We need stronger atomics for local data race freedom.<p>Our non atomic are also stronger than non atomics on C++ and Java. That said, The non atomic operations are free on X86 (compiled to plain loads and stores) and involve a lightweight fence before stores on weaker architectures such as ARM, Power and RISC-V. The performance results show that extra fences before stores have a barely noticeable impact on ARM and Power.</p>
]]></description><pubDate>Sun, 18 Dec 2022 13:57:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=34037655</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34037655</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34037655</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>See examples in the second section and the results in the paper: <a href="https://kcsrk.info/papers/pldi18-memory.pdf" rel="nofollow">https://kcsrk.info/papers/pldi18-memory.pdf</a></p>
]]></description><pubDate>Sat, 17 Dec 2022 15:15:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=34028389</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34028389</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34028389</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>Still early days, but I had done some exploratory work in the past on Reagents, a composable lock-free library [1]. Now that OCaml 5 is released, we're reviving this work.<p>It's semantics is weaker than STM -- unlike STM, it doesn't provide serializability but Reagents can compile down to multi-word compare and swap operations, which can be implemented with the help of hardware transactions (when present) or efficient software implementations of it [2]. Hence, Reagent programs should be faster than STM.<p>[1] <a href="https://github.com/ocaml-multicore/reagents">https://github.com/ocaml-multicore/reagents</a>
[2] <a href="https://arxiv.org/pdf/2008.02527.pdf" rel="nofollow">https://arxiv.org/pdf/2008.02527.pdf</a></p>
]]></description><pubDate>Sat, 17 Dec 2022 04:14:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=34024578</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34024578</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34024578</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>The local types are less invasive than the full support for typed effects. In particular, they are opt-in and associated complexity is pay-as-you-go. In my initial experiments, they seemed pretty nice to program with.</p>
]]></description><pubDate>Fri, 16 Dec 2022 13:48:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=34014410</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34014410</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34014410</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>Here are some parallel benchmarks from the Sandmark continuous benchmarking service: <a href="https://sandmark.tarides.com/?app=Parallel+Benchmarks&parallel_02=%5B%27turing_5.1.0%2Btrunk%2Bparallel_20221214_aa4f842%27%5D&parallel_00=5.1.0%2Btrunk%2Bparallel&parallel_find_by=variant&parallel_01=20221214&parallel_num_variants=1" rel="nofollow">https://sandmark.tarides.com/?app=Parallel+Benchmarks&parall...</a></p>
]]></description><pubDate>Fri, 16 Dec 2022 13:14:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=34014166</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34014166</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34014166</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Multicore is out"]]></title><description><![CDATA[
<p>Rather than a full effect system, we're very likely to have lexically scoped "checked" effects with the help of modal types. I briefly talked about it at the end of my ICFP keynote: <a href="https://icfp22.sigplan.org/details/icfp-2022-papers/48/Retrofitting-Concurrency-Lessons-from-the-Engine-Room" rel="nofollow">https://icfp22.sigplan.org/details/icfp-2022-papers/48/Retro...</a><p>There are other cool stuff that is being worked on, which I am very excited about: <a href="https://discuss.ocaml.org/t/jane-street-compiler-development-and-open-source/10806" rel="nofollow">https://discuss.ocaml.org/t/jane-street-compiler-development...</a>. Hopefully, we will see many of these make it into OCaml 6.</p>
]]></description><pubDate>Fri, 16 Dec 2022 13:07:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=34014113</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=34014113</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34014113</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Alpha Release"]]></title><description><![CDATA[
<p>For nested parallel computations (think Scientific Programming, where one would use OpenMP, Rust Rayon, etc), we have domainslib [1]. Eio, a direct-style, effect-based IO library is pretty competitive against Rust Tokio [2]. The performance will only get better as we get closer to the 5.0 release.<p>[1] <a href="https://github.com/ocaml-multicore/domainslib" rel="nofollow">https://github.com/ocaml-multicore/domainslib</a><p>[2] See the http server performance graphs at <a href="https://tarides.com/blog/2022-03-01-segfault-systems-joins-tarides#ecosystem" rel="nofollow">https://tarides.com/blog/2022-03-01-segfault-systems-joins-t...</a></p>
]]></description><pubDate>Wed, 15 Jun 2022 14:55:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=31753877</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=31753877</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31753877</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Alpha Release"]]></title><description><![CDATA[
<p>Parallelism [1] and native-support for concurrency through effect handlers [2].<p>[1] <a href="https://kcsrk.info/webman/manual/parallelism.html" rel="nofollow">https://kcsrk.info/webman/manual/parallelism.html</a><p>[2] <a href="https://kcsrk.info/webman/manual/effects.html" rel="nofollow">https://kcsrk.info/webman/manual/effects.html</a></p>
]]></description><pubDate>Wed, 15 Jun 2022 14:51:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=31753774</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=31753774</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31753774</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml 5.0 Alpha Release"]]></title><description><![CDATA[
<p>I would also recommend reading the effect handlers tutorial in OCaml 5.0 manual: <a href="https://kcsrk.info/webman/manual/effects.html" rel="nofollow">https://kcsrk.info/webman/manual/effects.html</a>.</p>
]]></description><pubDate>Wed, 15 Jun 2022 14:48:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=31753728</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=31753728</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31753728</guid></item><item><title><![CDATA[New comment by kcsrk in "OCaml Multicore merged upstream"]]></title><description><![CDATA[
<p>> it seems it provides sequential consistency when using atomics and acquire/release semantics when not.<p>(author of the said paper here) This is wrong. I suggest reading the paper closely. If not, the morning paper has a good summary [1,2].<p>[1] <a href="https://blog.acolyer.org/2018/08/09/bounding-data-races-in-space-and-time-part-i/" rel="nofollow">https://blog.acolyer.org/2018/08/09/bounding-data-races-in-s...</a><p>[2] <a href="https://blog.acolyer.org/2018/08/10/bounding-data-races-in-space-and-time-part-ii/" rel="nofollow">https://blog.acolyer.org/2018/08/10/bounding-data-races-in-s...</a></p>
]]></description><pubDate>Mon, 10 Jan 2022 17:40:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=29878433</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=29878433</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29878433</guid></item><item><title><![CDATA[New comment by kcsrk in "PR to Merge Multicore OCaml"]]></title><description><![CDATA[
<p>Effect handlers are a foundation of all non-local control flow abstractions. Anything that requires fancy control-flow can be implemented with effect handlers. This includes green threads, async/await, generators (or iterators as some languages call it), but also higher-level applications such as algorithmic differentiation, probabilistic programming, model checking and fuzzing of parallel programs, etc.<p>A few of these applications were discovered only very recently. The aim is that this language primitive will inspire further discoveries for expressing useful abstractions elegantly.<p>Some of these ideas are summarised in this talk: <a href="https://m.youtube.com/watch?v=VEhkhxoGJSk" rel="nofollow">https://m.youtube.com/watch?v=VEhkhxoGJSk</a></p>
]]></description><pubDate>Wed, 22 Dec 2021 03:32:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=29645328</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=29645328</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29645328</guid></item><item><title><![CDATA[New comment by kcsrk in "Adapting the OCaml Ecosystem for Multicore OCaml"]]></title><description><![CDATA[
<p>We don't compare against Go pervasively. Benchmarking across languages is hard generally, but here is a result on a specific benchmark comparing several versions of OCaml benchmarks against Go and Rust on a Http server benchmark: <a href="https://github.com/ocaml-multicore/retro-httpaf-bench/pull/15" rel="nofollow">https://github.com/ocaml-multicore/retro-httpaf-bench/pull/1...</a>.<p>If there are suggestions to make the Go and Rust versions, please feel free to tell us how in the issue tracker.</p>
]]></description><pubDate>Wed, 01 Sep 2021 03:51:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=28376258</link><dc:creator>kcsrk</dc:creator><comments>https://news.ycombinator.com/item?id=28376258</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28376258</guid></item></channel></rss>