Nikos Baxevanis

Results 271 comments of Nikos Baxevanis

This looks like a bug in [Xeger.cs](https://github.com/moodmosaic/Fare/blob/81c1b2e176c217f79a39d0b63e2438f94afee7b4/Src/Fare/Xeger.cs) which has been ported from [here](https://code.google.com/archive/p/xeger/). It's been a long-long time since I did all this, and I currently don't have Java installed...

Also, I can't remember if Xeger guarantees that the generated strings should be unique, but from what I see in the source code, the issue might be [here](https://github.com/moodmosaic/Fare/blob/81c1b2e176c217f79a39d0b63e2438f94afee7b4/Src/Fare/Xeger.cs#L85-L90), and I'd...

For one, [this](https://github.com/moodmosaic/Fare/blob/81c1b2e176c217f79a39d0b63e2438f94afee7b4/Src/Fare/Xeger.cs#L42) should be the only available constructor for Xeger―[this](https://github.com/moodmosaic/Fare/blob/81c1b2e176c217f79a39d0b63e2438f94afee7b4/Src/Fare/Xeger.cs#L62) one should be deprecated as it always creates a *new* Random instance.

Based on what discussed in #27, I'm not 100% sure there's much we can do to generate totally different results. At least now we can generate some more distinct elements....

Perhaps we can fix this in .NET Framework [by specifying the seed](https://docs.microsoft.com/en-us/dotnet/api/system.random.-ctor?view=netframework-4.8#System_Random__ctor_System_Int32_) value.

Thank you for investigating :+1: :100: Random.cs is licensed under MIT license, so I think it should be OK to copy some parts from that file and use them here....

One improvement is to use the following (already released) overload: https://github.com/moodmosaic/Fare/blob/703c5e24b9b4e352663f0b4acf8ab832c75cffbc/Src/Fare/Xeger.cs#L42 It's then up to the caller to supply a `Random` instance, but even a default (shared) instance should be...

Thank you for reporting this, @gianmarialari. This look like a `xeger` issue to me, and it'd be better if we could ping the maintainer(s) of the current upstream/java version. I...

Great, just saw it, https://github.com/bluezio/xeger/issues/3. Let's see what we get back.

Thank you, @gianmarialari :+1: