<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: joe_mwangi</title><link>https://news.ycombinator.com/user?id=joe_mwangi</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 13 Jun 2026 16:21:02 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=joe_mwangi" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by joe_mwangi in "First Valhalla related stuff will land in Java 28"]]></title><description><![CDATA[
<p>This is awesome. First step to an interesting direction of the language.</p>
]]></description><pubDate>Wed, 10 Jun 2026 18:50:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=48480930</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48480930</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48480930</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Where Is the JVM Tax?"]]></title><description><![CDATA[
<p>More reasons why java value classes will be a game changer.</p>
]]></description><pubDate>Mon, 25 May 2026 16:21:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=48268621</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48268621</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48268621</guid></item><item><title><![CDATA[New comment by joe_mwangi in ".NET (OK, C#) finally gets union types"]]></title><description><![CDATA[
<p>Java’s planned approach is more like typeclass-style interfaces than unrestricted operator overloading. Types opt into core-defined operator contracts, rather than every library inventing arbitrary meanings for symbols.</p>
]]></description><pubDate>Sun, 24 May 2026 20:03:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=48260546</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48260546</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48260546</guid></item><item><title><![CDATA[New comment by joe_mwangi in ".NET (OK, C#) finally gets union types"]]></title><description><![CDATA[
<p>Damn. You're old school. Java’s answer is virtual threads, not async/await. The idea is that most server-side IO can stay in direct style enabling blocking-looking code, cheap virtual threads underneath. So you don’t split the whole codebase into sync vs async functions just to avoid blocking OS threads. CompletableFuture and reactive APIs still exist, but Loom reduces the need to use them as the default application model. You can now launch millions of virtual threads to do IO.</p>
]]></description><pubDate>Sun, 24 May 2026 19:58:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=48260507</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48260507</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48260507</guid></item><item><title><![CDATA[New comment by joe_mwangi in ".NET (OK, C#) finally gets union types"]]></title><description><![CDATA[
<p>Notice you point out features that were easy to add during the beginning where there was no concern of backward compatibility? Now that java is porting value classes to mainline and we might have them soon, and planned operator overloading through type class, I believe java approach is making careful design choices that are semantically sound, rather than adding features that create edge cases such as boxing invariants in unions like C#.</p>
]]></description><pubDate>Sun, 24 May 2026 07:49:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=48255365</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48255365</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48255365</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Java: Rethink Domain Primitives with Valhalla"]]></title><description><![CDATA[
<p>Value types will be optionally null. What java will introduce to the tooling is narrowing of nullness types. Hence Foo! <: Foo? <: Foo. This will assist in enabling safe domains or scope in code that are null-restricted with ease. Hence we can model around such a type system rule.</p>
]]></description><pubDate>Wed, 20 May 2026 14:12:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=48208159</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48208159</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48208159</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Great stuff!!!</p>
]]></description><pubDate>Tue, 12 May 2026 12:28:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=48107280</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48107280</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48107280</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Yup. They started transferring to the main line, but will require many tests to know if they have any issues. <a href="https://github.com/openjdk/jdk/pull/31120" rel="nofollow">https://github.com/openjdk/jdk/pull/31120</a></p>
]]></description><pubDate>Tue, 12 May 2026 08:30:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=48105682</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48105682</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48105682</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>I'm actually planning to resurrect a dead raytracer project (<a href="https://github.com/mambastudio/MambaTracer" rel="nofollow">https://github.com/mambastudio/MambaTracer</a>)  that has a GPU backend. And possible develop a future 2D API (a lot of work I know). There is an interesting world in multipurpose programming of GPUs, and it took me a while to realise prefix sum is the “hello world” in that area. As a matter of fact, most GPU code without efficient GPU prefix sum, don’t perform well for specific algorithms that might require some scan data, and that’s where CUDA dominates, which has an amazing implementation, and not in other areas such as OpenCL. The raytracer I was making, I encountered a bug that took me I think a month to deduce after some frustration, based on a discovery of my rudimentary struct implementation (through classes and annotation – which I totally agree with you they are a bit annoying) had an misalignment layout which made me rethink, something is wrong with my model approach. So, I needed to solve data and layout representation between java and native code, to be simple, concise, with little headache. If you notice the TypedMemory, the idea is to ensure a user can implement their own libraries with data models without depending on it, and thus becomes a simple plug. Unfortunately, @size will make your code have it as a dependency. Hopefully one day we have multifields as stack allocated arrays (<a href="https://web.archive.org/web/20251101203905/https://cr.openjdk.org/~jrose/values/multi-field.html" rel="nofollow">https://web.archive.org/web/20251101203905/https://cr.openjd...</a>) , hence maybe have value `record(char c, float[3] array) {}`</p>
]]></description><pubDate>Tue, 12 May 2026 08:27:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48105660</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48105660</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48105660</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>It's a long roadmap, but this is their ultimate objective. Once java has value classes, future carrier classes and member patterns, that's when we shall see some very huge interest for java in ML. Also, they plan to introduce typeclasses in which it will be convenient to introduce operator overloading, and collection/array literals etc syntax. The idea is to unify the types in java, and then enable much stronger semantics to ensure data oriented programming becomes ergonomic in java.</p>
]]></description><pubDate>Tue, 12 May 2026 07:12:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=48105202</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48105202</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48105202</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>I have not used SBE but looking at it, my understanding is that it starts from an explicit schema, typically XML, and generates encoder/decoder flyweights over a binary buffer. That gives much more control to the user in terms of field order (very important), sizes. Here, TypedMemory takes a different starting point in which the Java record shape is the schema, and the library derives the FFM MemoryLayout/accessors from that. I think the difference is schema/codegen/protocol orientation vs Java-type/FFM/in memorylayout orientation.</p>
]]></description><pubDate>Mon, 11 May 2026 21:39:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=48101012</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48101012</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48101012</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Interesting approach. I think Project Babylon did the same thing <a href="https://github.com/openjdk/babylon/blob/code-reflection/hat/optkl/src/main/java/optkl/ifacemapper/SegmentMapper.java" rel="nofollow">https://github.com/openjdk/babylon/blob/code-reflection/hat/...</a><p>I had tested it and it's quite fast. Actually, you don't need to generate any bytecode on the fly. Problem is when you deal with array as fields, implementation becomes difficult. You can revisit if interested to come back to such an implementation one day.</p>
]]></description><pubDate>Mon, 11 May 2026 21:18:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100814</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100814</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100814</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Hope you come back. Would be cool to venture in this new data oriented programming phase java has invested a lot in.</p>
]]></description><pubDate>Mon, 11 May 2026 21:02:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100644</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100644</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100644</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Hahaha... inspired by it actually.</p>
]]></description><pubDate>Mon, 11 May 2026 21:01:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100636</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100636</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100636</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Yeaaah. You might be right. Hopefully we have this one day <a href="https://openjdk.org/jeps/8261007" rel="nofollow">https://openjdk.org/jeps/8261007</a></p>
]]></description><pubDate>Mon, 11 May 2026 21:01:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100631</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100631</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100631</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>I use c-struct layout. I should be more explicit in the readme. I use classfile api to generate bytecode during initialisation of the Mem<T> and bytecode stored in cache in case if initialised again somewhere based on the same record type (I don't cache for records that are declared locally in a method). The class created from implementing Mem is a hidden class. So, basically, given a record, one can be able to analyse the layout based on record state description, and then for that Mem implementation (hidden class) we generate static final field varhandles + layout, segment is an instance field, and then generate bytecode the get and set to avoid reflection (actually, this is where most headache is in implementation). Go to the test package and see simple code for some adhoc rudimentary java (and native) files for benchmarks. Planning to test JMH benchmarks soon.</p>
]]></description><pubDate>Mon, 11 May 2026 20:56:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100570</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100570</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100570</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Thanks. Main goal. Unions is where I decided to pause - no simple and ergonomic way to do it at the moment.</p>
]]></description><pubDate>Mon, 11 May 2026 20:10:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=48100021</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48100021</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48100021</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Library for fast mapping of Java records to native memory"]]></title><description><![CDATA[
<p>Yup. Totally agree. Java does needs an array of structs. Hopefully value classes will help out through flattened array. But in future, one can use value records with this library with probable zero cost allocation. But the library doesn't use any reflection calls for get and set hence high performance as a result, and using records helps a lot with escape analysis. Planning to do some serious benchmarks soon. Some preliminary tests shows it's similar to c code (example code in test package). Performance suffers if record fields are arrays due to heap allocation of arrays.</p>
]]></description><pubDate>Mon, 11 May 2026 20:07:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=48099983</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48099983</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48099983</guid></item><item><title><![CDATA[Library for fast mapping of Java records to native memory]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/mamba-studio/TypedMemory">https://github.com/mamba-studio/TypedMemory</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=48099616">https://news.ycombinator.com/item?id=48099616</a></p>
<p>Points: 166</p>
<p># Comments: 37</p>
]]></description><pubDate>Mon, 11 May 2026 19:33:31 +0000</pubDate><link>https://github.com/mamba-studio/TypedMemory</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=48099616</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48099616</guid></item><item><title><![CDATA[New comment by joe_mwangi in "Java 26 is here"]]></title><description><![CDATA[
<p>Here it is <a href="https://youtu.be/Gz7Or9C0TpM?si=Rk5pTeAC6ibqS-M-" rel="nofollow">https://youtu.be/Gz7Or9C0TpM?si=Rk5pTeAC6ibqS-M-</a></p>
]]></description><pubDate>Sat, 28 Mar 2026 10:54:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=47553424</link><dc:creator>joe_mwangi</dc:creator><comments>https://news.ycombinator.com/item?id=47553424</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47553424</guid></item></channel></rss>