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

permutations(30) and count-only #1528

Open
AlexDaniel opened this issue Feb 16, 2018 · 1 comment
Open

permutations(30) and count-only #1528

AlexDaniel opened this issue Feb 16, 2018 · 1 comment
Labels
regression Issue did not exist previously

Comments

@AlexDaniel
Copy link
Contributor

AlexDaniel commented Feb 16, 2018

Code:

say +permutations(30)

Result (2016.07.1):

265252859812191058636308480000000

Result (HEAD(beaad7b)):

Cowardly refusing to permutate more than 20 elements, tried 30
in block <unit> at /tmp/78oLs8E9NR line 1

Change bisected: (2016-09-09) 8a66833

Output on all 6c releases: https://gist.github.com/0c7ecedcd136277d8692e36560670121

Basically, this part:

nqp::if(
$n > nqp::if(nqp::iseq_i($?BITS,32),13,20), # must be HLL comparison
(die "Cowardly refusing to permutate more than {
$?BITS == 32 ?? 13 !! 20
} elements, tried $n"),

is too early, and because of that it never gets to this:
method count-only {
nqp::isge_i($!todo, 0) ?? nqp::p6box_i($!todo) !! 0
}
method bool-only { nqp::p6bool(nqp::isgt_i($!todo, 0)) }

Somewhat related: #1331

@AlexDaniel AlexDaniel added good first issue This issue is likely easy for beginners to resolve and removed good first issue This issue is likely easy for beginners to resolve labels Feb 16, 2018
@taboege
Copy link
Contributor

taboege commented Jun 18, 2019

I'd question in general if the method should really fail because an argument is too big for an implementation detail to work. That's not tormenting the implementors enough.

@AlexDaniel AlexDaniel added the regression Issue did not exist previously label Jun 18, 2019
Altai-man added a commit that referenced this issue Aug 21, 2021
NQP bump brought: Raku/nqp@2021.07-1-gc3aca8ac6...2021.07-6-g6c0f22ea3
6c0f22ea3 [MoarVM Bump] Brings 10 commits
71899a940 Merge pull request #734 from usev6/jvm_with
ad700a25f [JVM] Let with/without use 'defined'
7e3358647 [JVM] Coerce to SixModelObject for isconcrete test
35351569a these ops were removed

MoarVM bump brought: MoarVM/MoarVM@2021.07-8-g860cc6550...2021.07-18-g343d0f37f
343d0f37f Merge pull request #1528 from MasterDuke17/free_filename_if_exception_thrown_when_loading_bytecode
7355f744e Free filename if exception when loading bytecode
f75179c47 Merge pull request #1472 from MoarVM/ryu
96ce6d848 Merge pull request #1526 from MoarVM/fix_spesh_log_gc_deadlock
d4a8093eb Fix deadlock by untimely GC in multi-threaded programs
7f8bc1e77 Switch to our own mirror of Ryū.
a81f129ad In `MVM_coerce_n_s`, move the NaN and Inf handling inside an UNLIKELY test.
0c032a009 Remove the Grisu3 code.
7907b85b0 Switch MVM_coerce_n_s to Ryū from Grisu3 with a sprintf fallback.
8cc7fbdf7 Add Ryū as a submodule.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

2 participants