Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joe_mwangi
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
joe_mwangi
1mo ago
Also, future specialisation if it is introduced, it will enable the JIT to get enough information to ensure <T> becomes stored in cpu registeres or enable <T[]> to be flattened in memory.
2.
▲
by
joe_mwangi
2mo ago
Yeaaah. They are going to introduce approaches for the programmer to decide if tearability is allowed or not. Already there are internal annotations for fields and types to enable it that probably will become a language feature in future.
3.
▲
by
joe_mwangi
2mo ago
They are researching to have immutable arrays. Also multifields (stack allocated arrays as fields in value classes). So, there is a possibility.
4.
▲
by
joe_mwangi
2mo ago
I've done some tests with current value classes in latest prototype with full optimisation through annotation. Apparently, everything was being compiled to assembly code with no gc calls. It seems this old school ideology of slow java
5.
▲
by
joe_mwangi
3mo ago
Also, this will be used for future null-restricted types.
6.
▲
by
joe_mwangi
3mo ago
Better late than never.
7.
▲
by
joe_mwangi
3mo ago
This time, 30mb.
8.
▲
by
joe_mwangi
3mo ago
Yup. By design, value classes will use cpu registers as a 1st priority instead.
9.
▲
by
joe_mwangi
3mo ago
Until they implement member patterns. https://openjdk.org/projects/amber/design-notes/patterns/tow...
10.
▲
by
joe_mwangi
3mo ago
> yet But up the comment section, someone thinks they won't be there 'in the future'
11.
▲
by
joe_mwangi
3mo ago
And I notice, people aren't aware more things are being planned for. For example, the carrier classes being proposed, they will separate state description with state representation and this is where value classes will shine syntactical
12.
▲
by
joe_mwangi
3mo ago
And the only syntax change is adding 'value'.
13.
▲
by
joe_mwangi
3mo ago
Since they plan to have null-restricted types, then I don't see any issue.
14.
▲
by
joe_mwangi
3mo ago
But with null-restricted types, Integer! and int has no difference semantically and representation. They plan to introduce null-restricted types in future.
15.
▲
by
joe_mwangi
3mo ago
This is awesome. First step to an interesting direction of the language.
16.
▲
by
joe_mwangi
4mo ago
More reasons why java value classes will be a game changer.
17.
▲
by
joe_mwangi
4mo ago
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.
18.
▲
by
joe_mwangi
4mo ago
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 who
19.
▲
by
joe_mwangi
4mo ago
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
20.
▲
by
joe_mwangi
4mo ago
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. Hen
21.
▲
by
joe_mwangi
4mo ago
Great stuff!!!
22.
▲
by
joe_mwangi
4mo ago
Yup. They started transferring to the main line, but will require many tests to know if they have any issues. https://github.com/openjdk/jdk/pull/31120
23.
▲
by
joe_mwangi
4mo ago
I'm actually planning to resurrect a dead raytracer project ( https://github.com/mambastudio/MambaTracer ) that has a GPU backend. And possible develop a future 2D API (a lot of work I know). There is an interestin
24.
▲
by
joe_mwangi
4mo ago
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 type
25.
▲
by
joe_mwangi
4mo ago
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
26.
▲
by
joe_mwangi
4mo ago
Interesting approach. I think Project Babylon did the same thing https://github.com/openjdk/babylon/blob/code-reflection/hat/... I had tested it and it's quite fast. Actually, you don't ne
27.
▲
by
joe_mwangi
4mo ago
Hope you come back. Would be cool to venture in this new data oriented programming phase java has invested a lot in.
28.
▲
by
joe_mwangi
4mo ago
Hahaha... inspired by it actually.
29.
▲
by
joe_mwangi
4mo ago
Yeaaah. You might be right. Hopefully we have this one day https://openjdk.org/jeps/8261007
30.
▲
by
joe_mwangi
4mo ago
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
More ›