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

Fix StdlibRandomNextBytes call #3150

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Nov 6, 2024

The hoon code that generates the stdlib call is:

-- => rm != |= [rng=* width=@] (raws:`_og`rng width)

i.e the random number generator is the first argument and the width is the second argument. We have the arguments transposed in the corresponding Juvix builtin API so the call was failing.

This PR transposes the argumetns in the stdlib call so the builtin API and hoon generated nock code are compatible.

lukaszcz
lukaszcz previously approved these changes Nov 6, 2024
The hoon code that generates the stdlib call is:

```
=>  rm  !=  |=  [rng=* width=@]   (raws:`_og`rng width)
```

i.e the random number generator is the first argument and the width is
the second argument. We have the arguments transposed in the
corresponding Juvix builtin API so the call was failing.

This PR transposes the argumetns in the stdlib call so the builtin API
and hoon generated nock code are compatible.
@janmasrovira janmasrovira force-pushed the fix-stdlib-random-next-bytes-call branch from facbc72 to 0055c6a Compare November 6, 2024 21:32
@janmasrovira janmasrovira merged commit 2a463a0 into main Nov 7, 2024
4 checks passed
@janmasrovira janmasrovira deleted the fix-stdlib-random-next-bytes-call branch November 7, 2024 08:05
@paulcadman paulcadman modified the milestones: 0.6.8, 0.6.7 Nov 7, 2024
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.

3 participants