Re: RFR: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module [v7]

2024-06-04 Thread David Alayachew
On Wed, 8 May 2024 08:30:39 GMT, Raffaello Giulietti wrote: >> Move all random generators mandated in package `java.util.random` and >> currently implemented in module `jdk.random` to module `java.base`, and >> remove module `jdk.random`. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module [v7]

2024-06-04 Thread David Alayachew
On Wed, 8 May 2024 08:30:39 GMT, Raffaello Giulietti wrote: >> Move all random generators mandated in package `java.util.random` and >> currently implemented in module `jdk.random` to module `java.base`, and >> remove module `jdk.random`. > > Raffaello Giulietti has updated the pull request

Re: do I need to subscribe to this list in order to post?

2024-05-22 Thread David Alayachew
Nope. We can see your message. You only subscribe if you want to follow along with the general discussions that you are not explicitly invited to. On Tue, May 21, 2024 at 7:14 PM wrote: > > > This message is for information purposes only. It is not a recommendation, > advice, offer or

Re: Bag (Multiset) Collection

2024-04-20 Thread David Alayachew
Biggest use case is definitely when creating different histograms from the same dataset. Our friends in sci-py land spend A LOT of time doing this. Our R friends also use this frequently. I can imagine this bag implementation would not just be good for Collections, but would play well with the

Re: EnumeratedStream

2024-04-20 Thread David Alayachew
I am in full support of this idea. I do also appreciate the functionality of using a BiFunction on the map method instead of a normal Function, R>. As for the actual enumeration logic, my vote is that it should simply enumerate as it arrives, with no context or care given to what came before it.

Re: Bag (Multiset) Collection

2024-04-20 Thread David Alayachew
ot insisting on anything, I just feel that if there is someone >> (like me lol) who is willing to take on full development and integration >> cycle, there aren't much reason to reject such enhancements. >> >> сб, 20 апр. 2024 г. в 23:31, David Alayachew : >> >>>

Re: Bag (Multiset) Collection

2024-04-20 Thread David Alayachew
Your Bag suggestion has been asked so frequently that there is an FAQ entry in the official Java Docs. https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/doc-files/coll-designfaq.html#a3 On Sat, Apr 20, 2024 at 4:25 PM ІП-24 Олександр Ротань < rotan.olexa...@gmail.com> wrote:

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

2024-04-19 Thread David Alayachew
umbers of other programmers that I > introduced to Java, especially switchers. Many of then feel those > "wordiness" of Java and it repulses potential developers, especially when > there is C# just by the corner. I think that Java has really strong sides, > but I would love to

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

2024-04-19 Thread David Alayachew
rstand that performance is not as valuable as > flexibility and clarity, it is still crucial, at least because of it being > the main factor server maintenance cost after all. > > сб, 20 апр. 2024 г. в 00:32, David Alayachew : > >> It is not the goal of Java to be verbose, b

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

2024-04-19 Thread David Alayachew
list .stream() .withIndex() .filter(WithIndex.filter(predicate)) .mapToIndex() .findFirst() .orElse(-1) On Fri, Apr 19, 2024 at 5:47 PM wrote: > > > -- > > *From: *"David Alayachew" > *To: *"Remi Forax" > *

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

2024-04-19 Thread David Alayachew
-1 it would be more > suitable to use OptionalInt instead, but I would like to hear community > opinion about that. > > сб, 20 апр. 2024 г. в 00:02, David Alayachew : > >> >> No Rémi, I don't think your idea is the right approach. You are working >> on the wrong le

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

2024-04-19 Thread David Alayachew
. But going out of order like this slows down the system and forces reviewers to take extra steps that they wouldn't have to if you had followed protocol. On Fri, Apr 19, 2024 at 5:02 PM David Alayachew wrote: > > No Rémi, I don't think your idea is the right approach. You are working on >

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

2024-04-19 Thread David Alayachew
No Rémi, I don't think your idea is the right approach. You are working on the wrong level of abstraction. Many users ask requests like this all the time, and what you are suggesting would be even more error-prone than the equivalent for loop or the IntStream suggestion that the user above

Re: Could we add a lint warning for when the type parameter name overloads an existing type name?

2024-04-14 Thread David Alayachew
is feature? Thank you for your time and consideration! David Alayachew

Re: Overload window methods in Gatherers with step size

2024-03-25 Thread David Alayachew
I actually plan to follow through on that email. I just can't right now because of work emergencies. Literally as soon as those calm down, top of my list is to give Viktor the lost of code examples where I am using the windowBy Gatherer he gave me. On Mon, Mar 25, 2024, 6:24 PM wrote: > Hello,

Re: Any plans to make resource leaks easier to detect?

2024-03-07 Thread David Alayachew
for detecting resource leaks? On Sun, Mar 3, 2024 at 10:02 PM David Alayachew wrote: > And as a side note, I did some pretty in-depth research on the topic, and > stumbled on this post on the lambda mailing list during Java 8's creation. > I am adding it, as it seems to be conside

Re: Any plans to make resource leaks easier to detect?

2024-03-03 Thread David Alayachew
-August/002195.html On Sun, Mar 3, 2024 at 10:00 PM David Alayachew wrote: > > Hello Amber Dev Team and Core Libs Dev Team, > > I am making my own implementation of java.util.stream.Stream that reads > data from the internet lazily. It's basically > java.nio.file.Files.lines(

Any plans to make resource leaks easier to detect?

2024-03-03 Thread David Alayachew
unclosed because there are no compiler warnings or errors if I do so. Are there any plans to make it easier to detect potential resource leaks? Ideally with a compiler warning or error? Thank you for your time and help! David Alayachew [1] = https://stackoverflow.com/questions/77959436

Re: Thoughts on a new method for equality on java.util.Objects?

2024-02-14 Thread David Alayachew
Thank you to Stuart, Michel, and Joe for taking care of closing my enhancement and adding helpful comments, I appreciate it! On Sun, Feb 11, 2024, 5:13 AM David Alayachew wrote: > Since I am abandoning this idea, could someone close my JBS ticket? > > And please link this message in

Re: Thoughts on a new method for equality on java.util.Objects?

2024-02-11 Thread David Alayachew
, 2024 at 5:10 AM David Alayachew wrote: > Hello, > > Thank you for your response! > > So, I had thought of that before posting this email, and mentally, I had > hand-waved away the concern by saying that there were plenty of situations > where equality would still be useful witho

Withdrawn: 8324718: Add a static function to java.util.Objects to simplify object equality checks

2024-02-11 Thread David Alayachew
On Sat, 27 Jan 2024 03:57:58 GMT, David Alayachew wrote: > Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used t

Re: Thoughts on a new method for equality on java.util.Objects?

2024-02-11 Thread David Alayachew
again. And I see the value of "socializing", as @Alan Bateman put it. I had thought this idea through plenty, but I can only see from my perspective. Thank you all for your time and help! David Alayachew On Sun, Feb 11, 2024 at 3:26 AM Holo The Sage Wolf wrote: > How beneficial is

Thoughts on a new method for equality on java.util.Objects?

2024-02-10 Thread David Alayachew
on that takes in T is fair game. This allows flexibility, and lets developers keep their objects simple, thus facilitating things like DOP. Now, perhaps this makes more sense on the BiPredicate interface instead. However, since this was more equality focused, I figured Objects was a better fit. Any thoughts? Thank you all for your time and help! David Alayachew

Re: Gatherers -- conditionalWindowFixed?

2024-01-27 Thread David Alayachew
made for me, and I will post a new email thread either tomorrow or the day after that shows my experience with it. My hope is that I can convince you that this function absolutely is worth adding. Thank you for your time and help! David Alayachew On Wed, Jan 10, 2024 at 2:29 PM Viktor Klang wrote

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 07:52:56 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 07:52:56 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 17:05:59 GMT, Chen Liang wrote: > Your API is risky as well: it won't get a compile error if you add a new > field but forgot to add that field to equality checks too. And since > initialization happens in ``, your said error is quite easy to detect > if this class is ever

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 07:52:56 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 07:52:56 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-27 Thread David Alayachew
On Sat, 27 Jan 2024 15:36:59 GMT, Chen Liang wrote: >> David Alayachew has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rather than reiterating the precondition, let's explain why the method >> fail

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v6]

2024-01-26 Thread David Alayachew
> Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used to provide > the values that we will check for equality. Dav

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v5]

2024-01-26 Thread David Alayachew
> Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used to provide > the values that we will check for equality. Dav

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v4]

2024-01-26 Thread David Alayachew
> Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used to provide > the values that we will check for equality. Dav

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v3]

2024-01-26 Thread David Alayachew
> Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used to provide > the values that we will check for equality. Dav

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v2]

2024-01-26 Thread David Alayachew
On Sat, 27 Jan 2024 04:21:02 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v2]

2024-01-26 Thread David Alayachew
On Sat, 27 Jan 2024 04:21:02 GMT, David Alayachew wrote: >> Adding a function to Objects in order to facilitate equality checking and >> enhance readability. You simply specify the 2 objects that you want to check >> for equality, and then provide the functions which will

Re: RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks [v2]

2024-01-26 Thread David Alayachew
> Adding a function to Objects in order to facilitate equality checking and > enhance readability. You simply specify the 2 objects that you want to check > for equality, and then provide the functions which will be used to provide > the values that we will check for equality. Dav

RFR: 8324718: Add a static function to java.util.Objects to simplify object equality checks

2024-01-26 Thread David Alayachew
Adding a function to Objects in order to facilitate equality checking and enhance readability. You simply specify the 2 objects that you want to check for equality, and then provide the functions which will be used to provide the values that we will check for equality. - Commit

Re: New method on java.util.function.Function -- ternary method

2024-01-15 Thread David Alayachew
Hello Magnus, Thank you for closing my bug! Terribly sorry to ask another favor, but could you link the following link for traceability in the JBS submission? https://mail.openjdk.org/pipermail/amber-dev/2024-January/008488.html Thank you again for the time and help! David Alayachew On Mon

Re: Gatherers -- conditionalWindowFixed?

2024-01-09 Thread David Alayachew
And this may also be better named as a split method instead of the long conditionalWindowFixed. On Wed, Jan 10, 2024 at 1:17 AM David Alayachew wrote: > Oh, I made a mistake. Let me try it again. > > If the predicate is true, add the element to the current list (create list > pri

Re: Gatherers -- conditionalWindowFixed?

2024-01-09 Thread David Alayachew
at 1:05 AM David Alayachew wrote: > Hello Core Libs Dev Team, > > I have been reading through JEP 461 (https://openjdk.org/jeps/461) about > Gatherers, and I'm really excited for what this will enable for us. > > By far, the most important functionality that this API facilitate

Gatherers -- conditionalWindowFixed?

2024-01-09 Thread David Alayachew
think this is worth adding is because it facilitates a really common use case. We may not want all windows to be the same size. Is this something worth adding to the Gatherers API? Thank you for your time and help! David Alayachew

Re: New Java feature

2024-01-04 Thread David Alayachew
amber-...@openjdk.org On Thu, Jan 4, 2024 at 8:29 PM Bradley Willcott wrote: > Hi there. > I am sorry if this is 'off subject'. However, where do I go to propose a > new java feature? And please be nice :-). > > Thanks, > Brad. >

Re: New Java feature

2024-01-04 Thread David Alayachew
Try and search up the idea before posting though. A lot of people have made feature requests before you. On Thu, Jan 4, 2024 at 8:40 PM David Alayachew wrote: > amber-...@openjdk.org > > On Thu, Jan 4, 2024 at 8:29 PM Bradley Willcott > wrote: > >> Hi there. >>

Re: New method on java.util.function.Function -- ternary method

2023-12-31 Thread David Alayachew
bovementioned article -- https://inside.java/2023/12/15/switch-case-effect/#other-switch-tricks Could someone help me close this on JBS? Or should it just not be closed at all? Here is a link to the JBS -- https://bugs.openjdk.org/browse/JDK-8319802 Thank you for your time and help! David Alayachew

Re: New method on java.util.function.Function -- ternary method

2023-11-08 Thread David Alayachew
nput) > ? trueFunction.apply(input) > : falseFunction.apply(input) > ; > > } > > } On Thu, Nov 9, 2023 at 12:12 AM David Alayachew wrote: > It has been a month since I sent this proposal. Since no one has told me > that this is a

Re: New method on java.util.function.Function -- ternary method

2023-11-08 Thread David Alayachew
It has been a month since I sent this proposal. Since no one has told me that this is a terrible idea, I will submit this as an enhancement to JBS, and once the ticket is made, start work on creating a pull request. On Tue, Oct 3, 2023 at 3:13 AM David Alayachew wrote: > Whoops, bad imp

Re: New candidate JEP: 461: Stream Gatherers (Preview)

2023-10-26 Thread David Alayachew
Alternatively, point me in the direction of the repo, and I'll be happy to take a crack at it. On Thu, Oct 26, 2023 at 6:54 PM David Alayachew wrote: > Hello Mark, > > Thank you for posting this! > > This feature will be a blessing, and I can't wait for it to drop. > > Cou

Re: New candidate JEP: 461: Stream Gatherers (Preview)

2023-10-26 Thread David Alayachew
. Thank you for your time and help! David Alayachew On Thu, Oct 26, 2023 at 4:26 PM Mark Reinhold wrote: > https://openjdk.org/jeps/461 > > Summary: Enhance the Stream API to support custom intermediate > operations. This will allow stream pipelines to transform

Re: New method on java.util.function.Function -- ternary method

2023-10-03 Thread David Alayachew
Whoops, bad import. Please replace the following line with the one after it. > import java.util.function.Function; > import java.util.function.*; On Tue, Oct 3, 2023 at 3:09 AM David Alayachew wrote: > Hello all, > > I have an idea that I want to run by you all

New method on java.util.function.Function -- ternary method

2023-10-03 Thread David Alayachew
s are a functional transformation of the input. That way, intent is clarified. But if we go that route, maybe this function should get a better name to capture that? testThenApply? ternaryTransform? ternaryApply? Thank you for your time and help! David Alayachew

Re: @Incubating

2023-08-21 Thread David Alayachew
Oh, I see that you are referring to JavaDoc tags as opposed to Java Annotations. In that case, nevermind. On Mon, Aug 21, 2023 at 11:59 AM David Alayachew wrote: > Hello Pavel, > > I am not on the teams of any of the mailing lists you responded to, but I > feel confident that

Re: @Incubating

2023-08-21 Thread David Alayachew
the status quo. It may help to remember that annotations are written much like how you write a class or an interface. Therefore, their naming conventions follow those of classes and interfaces, which is to say, they start with an upper case letter. Thank you for reaching out! David Alayachew On Mon, Aug

Re: Illegal field name when trying to compile with a javax.swing.Action

2023-07-17 Thread David Alayachew
ng _ as identifer without --enable-preview) instead. > > Chen Liang > > On Tue, Jul 18, 2023 at 11:43 AM David Alayachew > wrote: > >> Wait, nevermind. Don't ignore. I was able to recreate this issue on the >> command line using the abovementioned JDK. Could someone come

Re: Illegal field name when trying to compile with a javax.swing.Action

2023-07-17 Thread David Alayachew
at 2:26 AM David Alayachew wrote: > H, this one might actually be IDE specific. Please ignore. >

Re: Illegal field name when trying to compile with a javax.swing.Action

2023-07-16 Thread David Alayachew
H, this one might actually be IDE specific. Please ignore.

Illegal field name when trying to compile with a javax.swing.Action

2023-07-16 Thread David Alayachew
lassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) at ToDoList.main(ToDoList.java:73) Attached is the zip. StackOverflow was not much help, so I thought I would reach out here. Thank you all for your time and help! David Alayachew <>

Re: EnumSet doesn't implement SequencedSet

2023-05-25 Thread David Alayachew
via the ordinal of the enum (giving me a priority queue of strategies until I find one that solves the problem). So for me, the order matters greatly, and I think that it should be reflected in the API. Thank you for your time! David Alayachew