Maurizio, thanks for pointing the bug out - however I don't think I was
impacted by it.

I agree with you that a more complex examples might distract the audience
from the main presentation points.

As mentioned in one of my previous email, I finalized some examples myself:
1. One example for memory layouts creates a structure where we associate
the SSN (social security number) to a credit score. The main point here is
to make a mix between char arrays and integers.
Code is here:
https://github.com/knowledge-base-and-tutorials/java14-features/blob/master/src/main/java/com/github/kbnt/java14/fma/ForeignMemoryAccessExamples.java
(method called example03SSNToCreditScore)
Presentation of the case is here:
https://www.youtube.com/watch?v=NwXzT8T6mb8&list=PLGDP1Irs2PmWNwAwMPdyOxCqkFqB6gtp9&index=7&t=1287s
2. A more complex example (in memory off-heap analytics and memory mapped
files) is the sleep analytics:
Code is here:
https://github.com/knowledge-base-and-tutorials/java14-features/blob/master/src/main/java/com/github/kbnt/java14/fma/SleepAnalytics.java
(the class' javadoc should describe it)
Presentation of the case is here:
https://www.youtube.com/watch?v=NwXzT8T6mb8&list=PLGDP1Irs2PmWNwAwMPdyOxCqkFqB6gtp9&index=7&t=1734s

If you find anything useful in those and want to use but the license
(Apache 2.0 for the code and CC-BY-SA for the videos) is in the way, let me
know and I can change them to something friendlier (where e.g. no
attribution is needed).

Cheers!
  Chris T


On Fri, Feb 14, 2020 at 6:26 PM Maurizio Cimadamore <
maurizio.cimadam...@oracle.com> wrote:

>
> On 13/02/2020 03:39, Chris T wrote:
>
> No problem! Nice talk at FOSDEM, Maurizio ;-)!
>
> One suggestion, for future talks - when it comes to memory layouts please
> construct an example that is a little bit more complex (by end of the
> upcoming weekend I will publish one that can be used). I had trouble with
> bit alignment when working on mine, but I will come back with the details
> (no bug or anything but more clarity would be beneficial in the docs). In
> your example (the Point one) the alignment is 32 but that is now always the
> case... The reason I mention this as an issue is that the Java development
> community is more "high-level". Believe it or not, bit alignment is not
> anymore "a thing" with most of us ;-)...
>
> Hey Chris - on alignment there was an issue that was uncovered on
> panama-dev - I think this fix should probably be ported to mainline:
>
> https://bugs.openjdk.java.net/browse/JDK-8238320
>
> This might make working with layout with padding a bit more tedious than
> intended, although this is probably not what you ran into.
>
> Re: talk suggestion - yes, more realistic examples would probably be
> better - but it's always hard to strike the right balance; if the example
> is more realistic it can be harder to follow, which might not be good when
> you are showing new concepts. But I'll keep that in mind for the future -
> after all this is a new API, and, as it's always the case, the more you
> think about how to explain these concepts and the more you do it, the more
> ways you find to get the message across in an optimal way.
>
> Thanks!
> Maurizio
>
>
>
> I will also think about some API enhancements I would like to see as a
> developer...
>
> Thanks!
>   Chris T
>
> On Tue, Feb 11, 2020 at 4:07 AM Maurizio Cimadamore <
> maurizio.cimadam...@oracle.com> wrote:
>
>> Thanks Paul!
>>
>> Maurizio
>>
>> On 10/02/2020 17:58, Paul Sandoz wrote:
>> > I modified the JEP with updated code snippets that compile against the
>> latest API in JDK 14 [*].
>>
>

Reply via email to