Re: RFR: 8242888: Convert dynamic proxy to hidden classes

2024-05-23 Thread forax
> From: "-" > To: "Remi Forax" > Cc: "Chen Liang" , "core-libs-dev" > , "hotspot-dev" , > "kulla-dev" > Sent: Thursday, May 23, 2024 2:56:58 PM > Subject: Re: RFR: 8242888: Convert dynamic proxy to hidden classes

Re: [External] : Gatherer and primitive specialization

2024-06-13 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Thursday, June 13, 2024 12:52:03 PM > Subject: Re: [External] : Gatherer and primitive specialization > Hi Rémi, > Given that Collector has not been specialized since

Re: [External] : Re: New candidate JEP: 431: Sequenced Collections

2022-10-18 Thread forax
- Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Sunday, October 16, 2022 12:25:18 AM > Subject: Re: [External] : Re: New candidate JEP: 431: Sequenced Collections > Hi Rémi, > > On 10

Re: [External] : Re: New candidate JEP: 431: Sequenced Collections

2022-11-02 Thread forax
- Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Saturday, October 29, 2022 2:16:06 AM > Subject: Re: [External] : Re: New candidate JEP: 431: Sequenced Collections [...] > > You se

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-03 Thread forax
lves the inference problem. Rémi - Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Tuesday, May 2, 2023 2:44:28 AM > Subject: Re: The introduction of Sequenced collections is not a source > compa

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread forax
. Rémi > From: "joe darcy" > To: "Ethan McCue" , "Raffaello Giulietti" > > Cc: "Remi Forax" , "Stuart Marks" > , > "core-libs-dev" > Sent: Friday, May 5, 2023 4:38:16 AM > Subject: Re: The introduction of Sequenced

Re: JEP 442: Foreign Function & Memory API => why is it again preview API?

2023-05-17 Thread forax
- Original Message - > From: "Uwe Schindler" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Wednesday, May 17, 2023 9:13:35 AM > Subject: Re: JEP 442: Foreign Function & Memory API => why is it again > preview API? > Hi

Re: Proposal: Collection mutability marker interfaces

2022-08-24 Thread forax
> From: "Ethan McCue" > To: "Remi Forax" > Cc: "John Hendrikx" , "core-libs-dev" > > Sent: Wednesday, August 24, 2022 4:27:01 PM > Subject: Re: Proposal: Collection mutability marker interfaces >> so it's perhaps better

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Thursday, June 29, 2023 11:09:22 AM > Subject: Re: java.util.stream.Stream: API for user-extensible intermediate > operations > From: Remi Forax > Sent: Thursday, 29 J

Re: Gatherer API : wildcards complaint

2024-01-17 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Wednesday, January 17, 2024 5:49:01 PM > Subject: Re: Gatherer API : wildcards complaint > Hi Rémi, > Thank you for the feedback—examples would be much appreciated

Re: Seing a Collector as a Gatherer

2024-01-17 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Sent: Wednesday, January 17, 2024 6:01:38 PM > Subject: Re: Seing a Collector as a Gatherer > Hi Rémi, > Yes, this was something I was hoping to get into the preview, but I wasn't > sure > where

Re: Gatherer: spliterator characteristics are not propagated

2024-01-18 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Wednesday, January 17, 2024 8:48:07 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > Hi Rémi, > You can find some of my benches here: [ > htt

Re: Gatherer: spliterator characteristics are not propagated

2024-01-18 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Thursday, January 18, 2024 3:36:07 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > I suspect that it is a rather

Re: Gatherer API : wildcards complaint

2024-01-18 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Wednesday, January 17, 2024 9:00:32 PM > Subject: Re: Gatherer API : wildcards complaint > Ah, now I see what you mean! Thank you \uD83D\uDC4D > The reason for the

Re: Gatherer: spliterator characteristics are not propagated

2024-01-20 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Thursday, January 18, 2024 5:14:38 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated >> And for A.andThen(B)

Re: Gatherer: spliterator characteristics are not propagated

2024-01-22 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Monday, January 22, 2024 4:22:11 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > Hi Rémi, Hello, > For

Re: Gatherer: spliterator characteristics are not propagated

2024-01-23 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Monday, January 22, 2024 10:06:27 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated >> The flags are in s

Re: Gatherer: spliterator characteristics are not propagated

2024-01-25 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Wednesday, January 24, 2024 2:34:11 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > Presuming that you mean mut

Re: Gatherer: spliterator characteristics are not propagated

2024-01-25 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" , "Paul Sandoz" > > Sent: Wednesday, January 24, 2024 2:45:15 PM > Subject: Re: Gatherer: spliterator characteristics are not propagated > As a (related) side-n

Re: Addition of Predicate-based findIndex and findLastIndex methods to java.util.List

2024-04-19 Thread forax
> From: "David Alayachew" > To: "Remi Forax" > Cc: "ІП-24 Олександр Ротань" , "core-libs-dev" > > Sent: Friday, April 19, 2024 11:02:12 PM > Subject: Re: Addition of Predicate-based findIndex and findLastIndex methods > to >

Re: Factory methods for SequencedSet and SequencedMap

2025-01-25 Thread forax
> From: "Rafael Winterhalter" > To: "Remi Forax" > Cc: "core-libs-dev" , "joe darcy" > > Sent: Tuesday, January 21, 2025 10:17:35 AM > Subject: Re: Factory methods for SequencedSet and SequencedMap > Wouldn't this already be po

Re: [External] : Gatherers.fold()

2025-01-02 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Thursday, January 2, 2025 12:26:08 PM > Subject: Re: [External] : Gatherers.fold() > Hi Rémi, Happy new year, >>Thinking a little more, i do not understand why fol

Re: java.lang.String hashCode and @Stable ?

2025-04-11 Thread forax
> From: "Glavo" > To: "Chen Liang" > Cc: "Remi Forax" , "core-libs-dev" > > Sent: Thursday, April 10, 2025 8:54:57 PM > Subject: Re: java.lang.String hashCode and @Stable ? > Hi Chen, > I think we can choose an arbitrary non-zer

Re: java.lang.String hashCode and @Stable ?

2025-04-11 Thread forax
> From: "Chen Liang" > To: "Remi Forax" , "core-libs-dev" > > Sent: Thursday, April 10, 2025 8:16:39 PM > Subject: Re: java.lang.String hashCode and @Stable ? > Hi Remi, > I think this is probably due to these fields being added too early -

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread forax
- Original Message - > From: "Ron Pressler" > To: "Remi Forax" > Cc: "cay horstmann" , "core-libs-dev" > , "David Alayachew" > > Sent: Monday, April 14, 2025 11:46:25 PM > Subject: Re: [External] : Re: My exper

Re: My experience using Java to do CLI Scripting

2025-04-15 Thread forax
- Original Message - > From: "Stuart Marks" > To: "Remi Forax" , "Ron Pressler" > , "David Alayachew" > > Cc: "cay horstmann" , "core-libs-dev" > > Sent: Tuesday, April 15, 2025 12:10:54 AM > Subject

Re: [External] : Re: JDK-8072840: Presizing for Stream Collectors

2025-02-19 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" , "Fabian Meumertzheim" > > Cc: "Paul Sandoz" , "core-libs-dev" > > Sent: Wednesday, February 19, 2025 11:43:33 AM > Subject: Re: [External] : Re: JDK-8072840: Presizing for Stream

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread forax
> From: "Chen Liang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Sunday, May 11, 2025 5:41:25 PM > Subject: Re: Unnecessary logic is added to removeFirst and removeLast of > ArrayList. > > where the generated assembly code by the JITs

Re: Towards a JSON API for the JDK

2025-05-16 Thread forax
- Original Message - > From: "naoto sato" > To: "Remi Forax" , "Paul Sandoz" > Cc: "core-libs-dev" > Sent: Friday, May 16, 2025 6:35:50 PM > Subject: Re: Towards a JSON API for the JDK > Hi Rémi, > > On 5/15/25 2:27 PM

Re: Towards a JSON API for the JDK

2025-05-16 Thread forax
> From: "Brian Goetz" > To: "Remi Forax" > Cc: "Paul Sandoz" , "core-libs-dev" > > Sent: Friday, May 16, 2025 7:46:09 PM > Subject: Re: Towards a JSON API for the JDK > If you read the implementation, you'll see that significan

Re: Towards a JSON API for the JDK

2025-05-16 Thread forax
> From: "Ethan McCue" > To: "Remi Forax" > Cc: "Paul Sandoz" , "core-libs-dev" > > Sent: Friday, May 16, 2025 1:44:52 AM > Subject: Re: Towards a JSON API for the JDK > I present for your consideration the library I made when sp

Re: Towards a JSON API for the JDK

2025-05-16 Thread forax
- Original Message - > From: "Brian Goetz" > To: "Remi Forax" , "Paul Sandoz" > Cc: "core-libs-dev" > Sent: Friday, May 16, 2025 2:53:18 PM > Subject: Re: Towards a JSON API for the JDK > On 5/15/2025 5:27 PM, Remi Forax wrote:

Re: Towards a JSON API for the JDK

2025-05-19 Thread forax
- Original Message - > From: "cay horstmann" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Monday, May 19, 2025 4:12:55 PM > Subject: Re: Towards a JSON API for the JDK > Il 19/05/25 10:13, Remi Forax ha scritto: >>> If only

Re: Towards a JSON API for the JDK

2025-05-19 Thread forax
> From: "Paul Sandoz" > To: "Remi Forax" > Cc: "Brian Goetz" , "core-libs-dev" > > Sent: Monday, May 19, 2025 10:02:50 PM > Subject: Re: Towards a JSON API for the JDK >> On May 19, 2025, at 8:16 AM, Remi Forax wrote: &g

Re: Towards a JSON API for the JDK

2025-05-19 Thread forax
> From: "Paul Sandoz" > To: "Remi Forax" > Cc: "Brian Goetz" , "core-libs-dev" > > Sent: Monday, May 19, 2025 11:18:26 PM > Subject: Re: Towards a JSON API for the JDK > Those extending the non-sealed subtypes of JsonValue must

Re: RFR: 8242888: Convert dynamic proxy to hidden classes

2024-05-23 Thread Remi Forax
- Original Message - > From: "Chen Liang" > To: "core-libs-dev" , "hotspot-dev" > , kulla-...@openjdk.org > Sent: Thursday, May 23, 2024 1:28:01 PM > Subject: Re: RFR: 8242888: Convert dynamic proxy to hidden classes > On Thu, 23 May 2024 03:28:30 GMT, Chen Liang wrote: > >> Please rev

Re: RFR: 8333265: De-duplicate method references in java.util.stream.FindOps

2024-05-30 Thread Rémi Forax
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote: > Extracting duplicate method references to static field reduce proxy class > spinning and loading. In this case 2 less classes loaded when using > `findAny()` on each type of stream. For constant method reference, the solution is to use

Gatherer and primitive specialization

2024-06-13 Thread Remi Forax
Hello, the Gatherer API do not provide primitive specialization while intermediate methods like map(), flatMap() or mapMulti() do. Unlike collectors where it is okay to not be specialized because most collectors mutate a collection that is not specialized too, gatherers can process/transform val

Re: RFR: 8335480: Only deoptimize threads if needed when closing shared arena [v2]

2024-07-13 Thread Rémi Forax
On Fri, 12 Jul 2024 20:59:26 GMT, Jorn Vernee wrote: >> This PR limits the number of cases in which we deoptimize frames when >> closing a shared Arena. The initial intent of this was to improve the >> performance of shared arena closure in cases where a lot of threads are >> accessing and clo

Re: RFR: 8335480: Only deoptimize threads if needed when closing shared arena [v2]

2024-07-13 Thread Rémi Forax
On Fri, 12 Jul 2024 20:59:26 GMT, Jorn Vernee wrote: >> This PR limits the number of cases in which we deoptimize frames when >> closing a shared Arena. The initial intent of this was to improve the >> performance of shared arena closure in cases where a lot of threads are >> accessing and clo

Re: RFR: 8335480: Only deoptimize threads if needed when closing shared arena [v2]

2024-07-15 Thread Rémi Forax
On Mon, 15 Jul 2024 10:50:34 GMT, Jorn Vernee wrote: > This is what I was thinking of as well. close() on a shared arena can be > called by any thread, so it would be possible to have an executor service > with 1-n threads that is dedicated to closing memory. This delays both the closing of th

Re: RFR: 8335480: Only deoptimize threads if needed when closing shared arena [v3]

2024-07-15 Thread Rémi Forax
On Mon, 15 Jul 2024 11:33:30 GMT, Jorn Vernee wrote: >> This PR limits the number of cases in which we deoptimize frames when >> closing a shared Arena. The initial intent of this was to improve the >> performance of shared arena closure in cases where a lot of threads are >> accessing and clo

Re: New candidate JEP: 431: Sequenced Collections

2022-10-14 Thread Remi Forax
- Original Message - > From: "mark reinhold" > To: "Stuart Marks" > Cc: "core-libs-dev" , "jdk-dev" > > Sent: Wednesday, October 12, 2022 1:17:20 AM > Subject: New candidate JEP: 431: Sequenced Collections > https://openjdk.org/jeps/431 > > Summary: Introduce new interfaces to repres

Re: RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-26 Thread Remi Forax
Each time i re-read this JEP, i'm more and more sorry about its state. - we are breaking how Strings worked, now everything in between "..." is not a String anymore. As an example, given a String s, only one of the following lines compiles System.out.println("s = \{s}".toUpperCase()); System.o

Re: RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-27 Thread Remi Forax
I would like to retract the comments i've made below, because the first point is now moot and for the second one, after some more thinking, it may be not that bad and at least the API is very simple to use. Rémi > From: "Remi Forax" > To: "Jim Laskey"

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 17:57:30 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 19:34:37 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 118: >> >>> 116: * @since 20 >>> 117: */ >>> 118: public static final int MAX_INDY_CONCAT_ARG_SLOTS = 200; >> >> I do not think it's a good idea to

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 19:51:21 GMT, Franz Wilhelmstötter wrote: >> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 211: >> >>> 209: @SuppressWarnings("unchecked") >>> 210: public static List toList(E... elements) { >>> 211: return Collections.unmodifiableL

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 19:52:14 GMT, Rémi Forax wrote: >> There have been several requests to make it public in the past. You really >> can't use the methods in this class unless you know the value. Better to >> have the value exposed instead of developers transcribing t

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-28 Thread Rémi Forax
On Fri, 28 Oct 2022 20:01:41 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line >> 1042: >> >>> 1040: * The number of fragments must be one more that the number of >>> ptypes. >>> 1041: * The total number of slots used by the ptypes m

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Rémi Forax
On Sat, 29 Oct 2022 00:56:18 GMT, ExE Boss wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 323: >> >>> 321: * @throws NullPointerException fragments or values is null or if >>> any of the fragments is null >>> 322: */ >>> 323: public static String

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 13:02:18 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 149: >> >>> 147: * {@return the interpolation of the StringTemplate} >>> 148: */ >>> 149: default String interpolate() { >> >> I wonder if all the default

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-02 Thread Rémi Forax
On Tue, 1 Nov 2022 18:22:07 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 119: >> >>> 117: Class tsClass = st.getClass(); >>> 118: if (tsClass.isSynthetic()) { >>> 119: try { >> >> I do not know if this code is wor

Re: [External] : Re: New candidate JEP: 431: Sequenced Collections

2022-11-02 Thread Remi Forax
- Original Message - > From: "Remi Forax" > To: "Stuart Marks" > Cc: "core-libs-dev" > Sent: Wednesday, November 2, 2022 7:27:02 PM > Subject: Re: [External] : Re: New candidate JEP: 431: Sequenced Collections There is also the issue with e

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-02 Thread Rémi Forax
On Wed, 2 Nov 2022 18:27:30 GMT, Jim Laskey wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransLiterals.java >> line 429: >> >>> 427: } >>> 428: >>> 429: private JCClassDecl newStringTemplateClass() { >> >> I find it weird to have the compiler emit an imple

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v11]

2022-11-04 Thread Rémi Forax
On Wed, 2 Nov 2022 21:53:00 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/jdk/internal/template/TemplateSupport.java line >> 147: >> >>> 145: >>> 146: return support.processWithProcessor(); >>> 147: } >> >> Thinking about this protocol some more: this seems to depend on t

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-11-04 Thread Rémi Forax
On Thu, 3 Nov 2022 14:37:55 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/ProcessorLinkage.java line 60: >> >>> 58: * @throws NullPointerException if any of the arguments are null >>> 59: */ >>> 60: MethodHandle linkage(List fragments, MethodType type); >

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]

2022-11-05 Thread Rémi Forax
On Thu, 3 Nov 2022 17:23:53 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalua

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]

2022-11-05 Thread Rémi Forax
On Thu, 3 Nov 2022 17:23:53 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalua

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]

2022-11-05 Thread Rémi Forax
On Thu, 3 Nov 2022 17:23:53 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalua

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]

2022-11-05 Thread Rémi Forax
On Thu, 3 Nov 2022 17:23:53 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalua

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-11-09 Thread Rémi Forax
On Wed, 9 Nov 2022 21:12:46 GMT, Jim Laskey wrote: >> Changing > > Raw list? I think this comment is not on the right part of the code. - PR: https://git.openjdk.org/jdk/pull/10889

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]

2022-11-09 Thread Rémi Forax
On Sat, 5 Nov 2022 22:23:23 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Internalize FormatConcatItem > > src/java.base/share/classes/java/lang/template/StringTem

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v16]

2022-11-10 Thread Rémi Forax
On Thu, 10 Nov 2022 15:09:14 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: Unsigned long to double and back

2022-11-11 Thread Remi Forax
Hi all, I don't know if it's the correct way to do it or if there is a better way, but i'm using var result = (double) (value & 0x7fffL ); if (value < 0) { result = result + 9.223372036854776E18; } The idea is to mask the sign bit, do the conversion to double and if the sign b

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-17 Thread Rémi Forax
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard API

Re: RFR: 8300237: Minor improvements in MethodHandles

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 09:51:31 GMT, Claes Redestad wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > > src/java.base/share/classes/java/lang/invoke/MethodHandles.ja

Re: RFR: 8300237: Minor improvements in MethodHandles [v2]

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 10:18:42 GMT, Claes Redestad wrote: >> Using lambdas inside MethodHandles is quite dangerous given that lambdas are >> initialized using method handles. It may work now because >> longuestParameterList() is not called when initializing a lambda but it may >> make any change

Re: RFR: 8300237: Minor improvements in MethodHandles [v3]

2023-01-17 Thread Rémi Forax
On Tue, 17 Jan 2023 18:07:37 GMT, Sergey Tsypanov wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > > Sergey Tsypanov has updated the pull request incrementally w

Re: RFR: 8300237: Minor improvements in MethodHandles [v5]

2023-01-18 Thread Rémi Forax
On Wed, 18 Jan 2023 07:32:58 GMT, Sergey Tsypanov wrote: >> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()` >> when we don't need a copy >> - comparison of two lists can be done without `Stream.reduce()` > > Sergey Tsypanov has updated the pull request incrementally w

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-24 Thread Rémi Forax
On Tue, 24 Jan 2023 10:23:14 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/ImmutableCollections.java line 169: >> >>> 167: @SuppressWarnings("unchecked") >>> 168: static List listCopy(Collection coll) { >>> 169: if (coll instanceof List12 || (coll instanceof

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-24 Thread Rémi Forax
On Tue, 24 Jan 2023 13:40:37 GMT, Viktor Klang wrote: >> `coll instanceof ListN list` should work. > > @forax @stuart-marks Yeah, that works. It's unfortunate that it's not > possible to match on the actual (generic) type, as then both sides of the || > could u

Re: Math.clamp method?

2023-01-25 Thread Remi Forax
- Original Message - > From: "Tagir Valeev" > To: "core-libs-dev" > Sent: Wednesday, January 25, 2023 2:41:41 PM > Subject: Math.clamp method? > Hello! > > Quite often it's necessary to clamp a numerical value to a given > range, using the algorithm like this: > int clampedValue = value

Re: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by default

2023-01-26 Thread Remi Forax
> From: "Glavo" > To: "core-libs-dev" > Sent: Thursday, January 26, 2023 1:35:06 PM > Subject: [Proposal] Make toLowerCase and toUpperCase based on Locale.ROOT by > default > At present, the no-parameter toLowerCase and toUpperCase methods of String are > based on the default locale. > I checke

Re: RFR: 8301220: Return value of toArray() of Сollection types from java.base should be trusted [v2]

2023-01-27 Thread Rémi Forax
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote: >> I checked the `java.base` module, and all the `Collection#toArray()` method >> of collections be implemented correctly. >> >> Their return values can be trusted, so many unnecessary array duplication >> can be eliminated. > > Glavo has updated

Re: RFR: 8301220: Return value of toArray() of Сollection types from java.base should be trusted [v2]

2023-01-28 Thread Rémi Forax
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote: >> I checked the `java.base` module, and all the `Collection#toArray()` method >> of collections be implemented correctly. >> >> Their return values can be trusted, so many unnecessary array duplication >> can be eliminated. > > Glavo has updated

Re: NPE throwing behavior of immutable collections

2023-01-31 Thread Remi Forax
> From: "Glavo" > To: "Stuart Marks" > Cc: "John Hendrikx" , "core-libs-dev" > > Sent: Tuesday, January 31, 2023 10:12:24 PM > Subject: Re: NPE throwing behavior of immutable collections > I understand that null is prohibited by default, but can we also provide a set > of factory methods that a

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-10 Thread Remi Forax
- Original Message - > From: "Volker Simonis" > To: "core-libs-dev" , "hotspot-dev" > > Sent: Friday, February 10, 2023 8:03:47 PM > Subject: Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't > be unloaded [v2] > On Fri, 10 Feb 2023 17:29:37 GMT, Ioi Lam wrote: > >>

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-17 Thread Rémi Forax
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were not

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Rémi Forax
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote: >> Prior to >> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358) >> LambdaMetaFactory has created VM-anonymous classes which could easily be >> unloaded once they were not

Re: RFR: 8302154: Hidden classes created by LambdaMetaFactory can't be unloaded [v2]

2023-02-22 Thread Rémi Forax
On Wed, 22 Feb 2023 17:05:00 GMT, Kasper Nielsen wrote: >> Volker Simonis has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Remove assertions which insist on Lambda proxy classes being strongly >> linked to their class loader >> - Remo

Re: JEP-198 - Lets start talking about JSON

2023-02-28 Thread Remi Forax
> From: "Brian Goetz" > To: "Ethan McCue" , "core-libs-dev" > > Sent: Tuesday, February 28, 2023 8:48:00 PM > Subject: Re: JEP-198 - Lets start talking about JSON > As you can probably imagine, I've been thinking about these topics for quite a > while, ever since we started working on records an

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-23 Thread Rémi Forax
On Thu, 23 Mar 2023 15:49:37 GMT, Jim Laskey wrote: >> On the flip side, for those that don't use `var`; >> >> >> Processor simple = Processor.of(st-> new >> JSONObject(st.interpolate())); >> Processor string = >> Processor.of(StringTemplate::interpolate); >> >> >> vs. >> >> >> SimpleProc

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-23 Thread Rémi Forax
On Thu, 23 Mar 2023 12:17:55 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/runtime/TemplateRuntime.java line 204: >> >>> 202: Object[] values >>> 203: ) throws Throwable { >>> 204: List asList = Collections.unmodifiableList(new >>> ArrayList<>(Arrays.as

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Remi Forax
- Original Message - > From: "Kasper Nielsen" > To: "Chris Hegarty" > Cc: "core-libs-dev" > Sent: Friday, March 24, 2023 6:53:51 PM > Subject: Re: The non-deterministic iteration order of Immutable Collections >> >> I don't (yet) want to be prescriptive in any potential solution. And I

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-25 Thread Rémi Forax
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with two additional > commits since the last revision: > > - More specification tweaks. > - Add simple overrides to ArrayList. src

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-25 Thread Rémi Forax
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with two additional > commits since the last revision: > > - More specification tweaks. > - Add simple overrides to ArrayList. src

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-25 Thread Rémi Forax
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with two additional > commits since the last revision: > > - More specification tweaks. > - Add simple overrides to ArrayList. src

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-25 Thread Rémi Forax
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with two additional > commits since the last revision: > > - More specification tweaks. > - Add simple overrides to ArrayList. Thi

Re: The non-deterministic iteration order of Immutable Collections

2023-03-26 Thread Remi Forax
- Original Message - > From: "Jens Lideström" > To: "core-libs-dev" > Sent: Sunday, March 26, 2023 11:38:07 AM > Subject: Re: The non-deterministic iteration order of Immutable Collections > I think Map#of and friends would be more useful and less error prone if they > where to return co

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does

Re: RFR: 6983726: remove Proxy from MethodHandleProxies.asInterfaceInstance SAM conversion

2023-03-28 Thread Rémi Forax
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote: > As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does

  1   2   3   >