Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a randi() function to generate random integers #124

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

GhostVaibhav
Copy link
Contributor

@GhostVaibhav GhostVaibhav commented Jun 28, 2024

Types of Changes

Addition of a randi() function to generate random integers, accepting an argument, let's say max. The generated number is 0 < generated_value <= max

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

Added a function to generate random integers. This PR closes #123

@GhostVaibhav GhostVaibhav changed the title Added a randi function to generate random integers Added a randi() function to generate random integers Jun 28, 2024
@GhostVaibhav
Copy link
Contributor Author

GhostVaibhav commented Jun 28, 2024

Hi @FlorianRappl, I'm not that well versed in C#, it would be great if you could have a look. Thanks!

@GhostVaibhav
Copy link
Contributor Author

The build script is not running correctly. It tries to copy files from a directory named netstandard2.0 while the files are present in a directory named netstandard2.1. How should we proceed further?

Copy link
Owner

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - only the Randi definition needs to consider currying and the arguments.

@FlorianRappl
Copy link
Owner

The build script is not running correctly. It tries to copy files from a directory named netstandard2.0 while the files are present in a directory named netstandard2.1. How should we proceed further?

It is broken for a longer time - I had no time to fix it until now. The problem is a bit more complex than that - there are some things which require one framework but won't work in another etc. - to fix it certain dependencies need to be replaced.

@FlorianRappl FlorianRappl merged commit 0381d18 into FlorianRappl:devel Jun 28, 2024
0 of 2 checks passed
@GhostVaibhav GhostVaibhav deleted the ghostvaibhav/123 branch June 28, 2024 19:31
@GhostVaibhav GhostVaibhav restored the ghostvaibhav/123 branch June 28, 2024 19:31
@GhostVaibhav
Copy link
Contributor Author

Hi @FlorianRappl, can we backport this feature into a v2.x release? If yes, what could be the timeline for the same? If no, how should we proceed further? This PR is associated with an issue in the Powertoys repo as well linked here.

@FlorianRappl
Copy link
Owner

Theoretically yes but the build failure is not related to v3, but rather to the build agent. As such there won't be a successful build with V2 either.

I can have a look but it will take some time as this project is currently not sponsored and therefore without priority.

@GhostVaibhav
Copy link
Contributor Author

Surely @FlorianRappl, can you provide some rough ETA for the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Addition of randi() function
2 participants