-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[PT Run] Calculator: rand() return float instead of int #17301
Comments
duplicate of #17300 |
Sorry I closed this mistakenly. It isn't a duplicate. |
I think returning a number between 0 and 1 is pretty common for random functions. |
Hmmm. Didn't know that. |
I think we should have a second operation to return it as int with a custom count of digits. Something like |
Marking it as an enhancement. Though I wonder if it's possible before changing engine. |
It might be a way to only cut |
Both integer and floating are welcome. Sould use 2 different keywords, like @htcfreek mentioned
|
I think this needs to be done on the engine we're using though, which is an open source Calculator Engine. Or be referenced in the issue about changing calculator engine as a requirement. |
For reference, here's the calculator engine: |
@Jay-o-Way , can you please link to it? |
@jaimecbernardo |
Hi @htcfreek, should we close this issue? Or, do we still need a function for generating random integers? |
@GhostVaibhav |
@htcfreek Count me in 👍🏻 |
Hi @htcfreek, some doubts. Would it be easier if rather than handling this request on our end, we handled it on Mages' end? What I meant to say is should I add |
The faster solution would be handle in PT Run. But you can ask to implement it in mages. Not sure if it will get in there. |
The PT Run is a very hacky way of getting this done. What I was thinking,
Does this sound good? |
After thinking again we should first open an issue an maybe a PR on mages repository as this would be the correct way. If the issue/PR not gets accepted, we can implement it in our plugin using a hacky way. |
Hi @htcfreek, I have raised a PR on the Mages repo. Links to follow - But, I have one concern, it's listed under the v3.0.0 milestone and so are the 3 other issues. It would take additional time to get them fixed. So, they are inadvertently blocking the release of this feature. Any suggestions? |
That's what I had feared. We could asked the repository maintainer if it is possible to backport the feature into v2.x release. |
Hi @htcfreek, good news. The PR got merged just now. What should be the next course of action? Should we ping the maintainer for a release? |
Great news.
Yes, I think we can friendly ask for a time plan. I would reference to the PowerToys repository. |
V3.0.0 is out |
Hi @htcfreek, the latest version of Mages has been released. Included with it is the new |
@GhostVaibhav |
@htcfreek |
@GhostVaibhav |
Microsoft PowerToys version
0.56.2
Running as admin
Area(s) with issue?
PowerToys Run
Steps to reproduce
type
rand()
.✔️ Expected Behavior
An integer is returned.
❌ Actual Behavior
Other Software
No response
The text was updated successfully, but these errors were encountered: