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

Parameterless call to sleep doesn't work in rakudo #185

Closed
p6rt opened this issue Jul 26, 2008 · 8 comments
Closed

Parameterless call to sleep doesn't work in rakudo #185

p6rt opened this issue Jul 26, 2008 · 8 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 26, 2008

Migrated from rt.perl.org#57294 (status was 'resolved')

Searchable as RT57294$

@p6rt
Copy link
Author

p6rt commented Jul 26, 2008

From @masak

According to S29, the parameter in sleep is named and therefore optional​:

] =item sleep
]
] our Num multi sleep ( Num $for = Inf )
]
] Attempt to sleep for up to C<$for> seconds. Implementations are obligated
] to support sub-second resolutions if that is at all possible.

But rakudo parsefails on encountering a 'sleep' without its parameter.

$ ./perl6 -e 'sleep'
Syntax error at line 1, near "sleep"
current instr.​: 'parrot;PGE​::Util;die' pc 120
(runtime/parrot/library/PGE/Util.pir​:82)
called from Sub 'parrot;Perl6​::Grammar;TOP' pc 16444 (src/gen_grammar.pir​:267)
called from Sub 'parrot;PCT​::HLLCompiler;parse' pc 585
(src/PCT/HLLCompiler.pir​:371)
called from Sub 'parrot;PCT​::HLLCompiler;compile' pc 438
(src/PCT/HLLCompiler.pir​:303)
called from Sub 'parrot;PCT​::HLLCompiler;eval' pc 776
(src/PCT/HLLCompiler.pir​:473)
called from Sub 'parrot;PCT​::HLLCompiler;command_line' pc 1305
(src/PCT/HLLCompiler.pir​:708)
called from Sub 'parrot;Perl6​::Compiler;main' pc 14519 (perl6.pir​:172)

@p6rt
Copy link
Author

p6rt commented Jul 26, 2008

From @pmichaud

On Sat, Jul 26, 2008 at 03​:33​:16AM -0700, Carl Mäsak wrote​:

According to S29, the parameter in sleep is named and therefore optional​:
...
] our Num multi sleep ( Num $for = Inf )

But rakudo parsefails on encountering a 'sleep' without its parameter.

Fixed in r29769, but doesn't yet properly handle the 'Inf' case
because Parrot doesn't seem to have an 'infinite sleep' option
yet. So instead it's just sleeping for 68 years for now.

I'm leaving this ticket open until we can eliminate the hard-coded
constant.

Pm

@p6rt
Copy link
Author

p6rt commented Jul 26, 2008

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Aug 14, 2008

@pmichaud - Status changed from 'open' to 'stalled'

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

From @coke

On Sat Jul 26 12​:27​:56 2008, pmichaud wrote​:

On Sat, Jul 26, 2008 at 03​:33​:16AM -0700, Carl Mäsak wrote​:

According to S29, the parameter in sleep is named and therefore
optional​:
...
] our Num multi sleep ( Num $for = Inf )

But rakudo parsefails on encountering a 'sleep' without its
parameter.

Fixed in r29769, but doesn't yet properly handle the 'Inf' case
because Parrot doesn't seem to have an 'infinite sleep' option
yet. So instead it's just sleeping for 68 years for now.

I'm leaving this ticket open until we can eliminate the hard-coded
constant.

Pm

Looks like current rakudo has sleep defined in the setting, and doesn't
have any constant at all, the parameter is currently required, not
optional.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

@coke - Status changed from 'stalled' to 'open'

@p6rt
Copy link
Author

p6rt commented May 31, 2010

From @moritz

I've now worked around the parrot limitation; closing without tests,
because we currently don't have the tools test infinite sleeping.

@p6rt
Copy link
Author

p6rt commented May 31, 2010

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed May 31, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant