Comments (5)
From @briandfoy
While running this program I get a MoarVM panic:
2 + 2 = 4
'two' is not numeric
MoarVM panic: Trying to unwind over wrong handler
The program:
sub add-two-things ( $first, $second ) {
CATCH {
when X::Str::Numeric {
fail q/One of the arguments wasn't a number/
}
}
for $first, $second {
warn "'$_' is not numeric" unless val($_) ~~ Numeric;
}
return $first + $second;
}
my @items = < 2 2 3 two nine ten 1 37 0 0 >;
for @items -> $first, $second {
CONTROL {}
my $sum = add-two-things( $first, $second );
put $sum.defined ??
"$first + $second = $sum" !!
"You can't add $first and $second";
}
--
brian d foy <brian.d.foy@gmail.com>
http://www.pair.com/~comdog/
from old-issue-tracker.
From @AlexDaniel
Golf:
CONTROL {}; warn 42
On 2018-06-08 15:11:08, comdog wrote:
> While running this program I get a MoarVM panic:
>
> 2 + 2 = 4
> 'two' is not numeric
> MoarVM panic: Trying to unwind over wrong handler
>
> The program:
>
> sub add-two-things ( $first, $second ) {
> CATCH {
> when X::Str::Numeric {
> fail q/One of the arguments wasn't a number/
> }
> }
>
> for $first, $second {
> warn "'$_' is not numeric" unless val($_) ~~ Numeric;
> }
>
> return $first + $second;
> }
>
> my @items = < 2 2 3 two nine ten 1 37 0 0 >;
>
> for @items -> $first, $second {
> CONTROL {}
> my $sum = add-two-things( $first, $second );
>
> put $sum.defined ??
> "$first + $second = $sum" !!
> "You can't add $first and $second";
> }
>
from old-issue-tracker.
The RT System itself - Status changed from 'new' to 'open'
from old-issue-tracker.
From @zoffixznet
On Fri, 08 Jun 2018 15:24:32 -0700, alex.jakimenko@gmail.com wrote:
Golf:
CONTROL {}; warn 42
On 2018-06-08 15:11:08, comdog wrote:
While running this program I get a MoarVM panic:
2 + 2 = 4
'two' is not numeric
MoarVM panic: Trying to unwind over wrong handlerThe program:
sub add-two-things ( $first, $second ) {
CATCH {
when X::Str::Numeric {
fail q/One of the arguments wasn't a number/
}
}for $first, $second {
warn "'$_' is not numeric" unless val($_) ~~ Numeric;
}return $first + $second;
}my @items = < 2 2 3 two nine ten 1 37 0 0 >;
for @items -> $first, $second {
CONTROL {}
my $sum = add-two-things( $first, $second );put $sum.defined ??
"$first + $second = $sum" !!
"You can't add $first and $second";
}
This is a dupe of MoarVM/MoarVM#572 (also filed in Rakudo's repo: rakudo/rakudo#1605 )
Closing this ticket in favour of those Issues.
from old-issue-tracker.
@zoffixznet - Status changed from 'open' to 'resolved'
from old-issue-tracker.
Related Issues (20)
- Support for utf16 and binary IO with 16/32-bit bufs HOT 3
- Confusing link to 'zef' HOT 4
- .next-handle seems to change handles but doesn't HOT 5
- Failure return from require when load fails HOT 4
- Coercion type apparently does not check the actual type of the coerced value HOT 11
- Roast S32-io/IO-Socket-Async.t test fails WSL - listen "already in use" test HOT 2
- Wrong set difference of Bag and List HOT 7
- First intermediate value of reduction with zip operator HOT 3
- Odd interaction of HTTP::UserAgent and Promises HOT 6
- precedence error !%foo<a>:exists HOT 4
- LTA: require of non installed module HOT 5
- Problem with sample socket code: core dump from malloc failure and memory corruption HOT 1
- Possible bug in Perl 6 OO HOT 6
- missing symbol name in error for &::() lookup failure HOT 1
- Grammar bug <alnum> vs <alpha> HOT 13
- Quanthashes should be parameterizable HOT 7
- stringification of regex with variables HOT 2
- perl 6 parser bugging out on a comment thinking it is a real var HOT 16
- Please remove link or email address
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from old-issue-tracker.