Code Monkey home page Code Monkey logo

acolyte.net's People

Contributors

dependabot[bot] avatar fossabot avatar vasar007 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

fossabot

acolyte.net's Issues

Feature request: add class `MonitorList` to observe values in collections

Is your feature request related to a problem? Please describe.
Need to add class MonitorList to observe values in collections.

Describe the solution you'd like
Collection wrapper (proxy pattern) which can track changes and return changes ligt on request. Underlying collections should be anything.

Describe alternatives you've considered
Some time ago I have already implemented this class but I lost it, unfortunately.

Additional context
Do not forget to add tests.

Feature request: add process wrapper (aka `ProcessHolder`)

Is your feature request related to a problem? Please describe.
Process class from .NET has some pitfalls. To resolve them need to add additional wrapper which can handle some cases instead of final user.

Describe the solution you'd like
ProcessHolder has been already implemented by me here.

Describe alternatives you've considered
Try to find some other useful methods in the Internet.

Additional context
Do not forget to add tests.

Split `Acolyte.Collections.EnumerableExtensions` and move it to the Linq folder

Is your feature request related to a problem? Please describe.
Class Acolyte.Collections.EnumerableExtensions contains a lot of lines of code. Need to split this large file.

Describe the solution you'd like
I should split class based on regions like in Linq .NET repository.

Describe alternatives you've considered
None.

Additional context
Do not forget to update tests. All methods in Acolyte.Collections.EnumerableExtensions class and it's all methods should be marked as Obsolete (will be removed in the next major version).

Feature request: add helpers methods to works with pathes and directories

Is your feature request related to a problem? Please describe.
There are some cases when .NET BCL is not enough to work with pathes. So, some helper methods will be useful (e.g. Path.GetFileName(Path.GetDirectoryName(path))).

Describe the solution you'd like
I have already written some methods in project AlgorithmAnalysis. E.g. here.

Describe alternatives you've considered
Try to find some other useful methods in the Internet.

Additional context
Do not forget to write tests.

Feature request: introduce `Acolyte.CSharp.StateMachine` NuGet package

Is your feature request related to a problem? Please describe.
One of the popular pattern — state machine. It will be useful if our package will contain it.

Describe the solution you'd like
I have already implemented state machine here.

Describe alternatives you've considered
None.

Additional context
Do not forget to add tests for new package.

Feature request: add helper classses to work with Interop and COM-objects

Is your feature request related to a problem? Please describe.
Interop and COM-objects should be released at the end of usage. However, there are some issues which users should know and avoid. For this purpose need helper class which can handle it by itself.

Describe the solution you'd like
I have already implemented such class here.

Describe alternatives you've considered
Try to find some other useful methods in the Internet.

Additional context
Do not forget to write tests.

Feature request: add overloads methods for asynchronous work ParallelForEachAsync and SafeParallelForEachAsync

Is your feature request related to a problem? Please describe.
We already have nice parallel ForEach async-like functions that can start bunch of tasks on collection. But there are too few methods to cover all usages.

Describe the solution you'd like
So, we should extend this API according to overloads in System.Linq.Async package (AsyncEnumerable class here)

Describe alternatives you've considered
None.

Additional context
Do not forget to add tests and documentation for new methods.

Feature request: add class to manage threads (aka `ThreadManager`) and some other threading classes

Is your feature request related to a problem? Please describe.
It is not so convinient to create threads manually. I think some helper class for threads will be useful.

Describe the solution you'd like
Common class (may be static) which can create and manage threads. I have already implemented some primitives here.

Describe alternatives you've considered
None.

Additional context
Do not forget to add tests.

Do not create large NuGet package: split `Acolyte` packages on the small ones and linked them

Is your feature request related to a problem? Please describe.
Acolyte.CSharp package contains a lot of different useful code. However, this package cannot be extended infinately. And what if users do not want the whole package but only one of it features?

Describe the solution you'd like
Need to create NuGet package hierarchy as Microsoft did with therir own NuGet packages. Finally, we reamain Acolyte.CSharp and Acolyte.FSharp projects which will be worked as Acolyte.NET — this projects will not contain any code, just links to the other packages.

Describe alternatives you've considered
None.

Additional context
Do not forget to add links to the other packages in this repository.

Replace `Acolyte.Common.HashCode` with `Microsoft.Bcl.HashCode`.

Is your feature request related to a problem? Please describe.
Need to replace Acolyte.Common.HashCode with Microsoft.Bcl.HashCode.

Describe the solution you'd like
We can reuse common logic from package Microsoft.Bcl.HashCode. In additon, need to add several static methods to cover cases for collections and e.t.c.

Describe alternatives you've considered
None.

Additional context
Do not forget to add tests for new logic.

Bug: `Acolyte.Basic.Randomness.ThreadSafeRandom` class can have the same seed value when created simultaneously using default ctor

Describe the bug
System.Random class is not thread-safe. So, we should refactor Acolyte.Basic.Randomness.ThreadSafeRandom to use singleton System.Random class for seed generation to avoid the issue when several Acolyte.Basic.Randomness.ThreadSafeRandom class created simultaneously (using default ctor = seed will be generated randomly) will have the same seed value.

Read about it more here.

To Reproduce

Example from the article mentioned above:

using System;
using System.Linq;
using System.Threading.Tasks;
using Acolyte.Basic.Randomness;

// ⚠ This isn't safe in .NET Framework, don't do it ⚠
Parallel.For(0, 10, x =>  // run in parallel
{
    TheadSafeRandom rng = new(); // 👈 create a private TheadSafeRandom instance
    var numbers = new int[10_000];
    for (int i = 0; i < numbers.Length; ++i)
    {
        numbers[i] = rng.Next(); // Fetch 10,000 random numbers
    }

    var numZeros = numbers.Count(x => x == 0); // how many issues were there?
    Console.WriteLine($"Received {numZeros} zeroes"); // always 0 issues
});

Expected behavior
Acolyte.Basic.Randomness.ThreadSafeRandom class should use singleton Random class for seed generation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.