🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
Geth doc: tbrowder++ created pull request #3245:
chg p6 to raku; chg .perl to .raku
00:13
Geth doc: tbrowder++ created pull request #3246:
chg p6 to raku; chg .perl to .raku
00:19
Geth doc: tbrowder++ created pull request #3247:
chg p6 to raku; chg .perl to .raku
00:26
Geth doc: tbrowder++ created pull request #3248:
chg .perl to .raku
02:08
Geth doc: 4f6c996bbd | (Tom Browder)++ | doc/Language/variables.pod6
chg p6 to raku; chg '.perl' to '.raku'
06:06
doc: 843ad42aad | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Merge pull request #3244 from tbrowder/p6toraku-variables

chg p6 to raku; chg '.perl' to '.raku'
linkable6 Link: docs.raku.org/language/variables
Geth doc: ab50f612f3 | (Tom Browder)++ | doc/Language/5to6-nutshell.pod6
chg .perl to .raku
06:51
doc: b0b6473ad6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/5to6-nutshell.pod6
Merge pull request #3248 from tbrowder/p6torakup-6to6

chg .perl to .raku
linkable6 Link: docs.raku.org/language/5to6-nutshell
Geth doc: 365ea26721 | (Tom Browder)++ | doc/Language/5to6-perlfunc.pod6
chg pe6 to raku
06:52
doc: 5d862db15e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Merge pull request #3233 from tbrowder/p6toraku-5to6-perlfunc

chg pe6 to raku
linkable6 Link: docs.raku.org/language/5to6-perlfunc
Geth doc: 0ff7418261 | (Tom Browder)++ | doc/Language/nativecall.pod6
chg p6 to raku
06:56
doc: 783e0bd088 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Merge pull request #3242 from tbrowder/p6toraku-nativecall

chg p6 to raku
linkable6 Link: docs.raku.org/language/nativecall
Geth doc: bfdfc9cd40 | (Tom Browder)++ | doc/Language/operators.pod6
chg p6 to raku; chg '.perl' to '.raku'
06:57
doc: df44519417 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #3243 from tbrowder/p6toraku-operators

chg p6 to raku; chg '.perl' to '.raku'
linkable6 Link: docs.raku.org/language/operators
Geth doc: ad0b939b51 | (Tom Browder)++ | doc/Language/unicode_entry.pod6
chg p6 to raku; chg .perl to .raku
06:58
doc: e836824082 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/unicode_entry.pod6
Merge pull request #3245 from tbrowder/p6toraku-unicode_entry

chg p6 to raku; chg .perl to .raku
linkable6 Link: docs.raku.org/language/unicode_entry
Geth doc: a631cac09f | (Tom Browder)++ | doc/Language/traps.pod6
chg p6 to raku; chg .perl to .raku
06:59
doc: 9127fa490c | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Merge pull request #3246 from tbrowder/p6toraku-traps

chg p6 to raku; chg .perl to .raku
linkable6 Link: docs.raku.org/language/traps
Geth doc: 2791126cbf | (Tom Browder)++ | doc/Language/terms.pod6
chg p6 to raku; chg .perl to .raku
07:00
doc: af3d55d7b4 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/terms.pod6
Merge pull request #3247 from tbrowder/p6toraku-terms

chg p6 to raku; chg .perl to .raku Great job! Thanks.
linkable6 Link: docs.raku.org/language/terms
jmerelo .tell Altai-man would you be interested in including a GitHub action in MoarVM repo that test-compiled in Alpine and maybe other environments? 07:02
tellable6 jmerelo, I'll pass your message to Altai-man_
jmerelo m: package Foo:ver<0>:auth<bar> {}; say Foo.^ver, Foo.^auth, Foo.^name 08:03
evalable6 (exit code 1) No such method 'ver' for invocant of type 'Perl6::Metamodel::PackageHOW'
in block <unit> at /tmp/BSoqIqKfyw line 1
jmerelo m: package Foo:ver<0>:auth<bar> {}; say Foo.^name; 08:09
evalable6 Foo
jmerelo m: package Foo:ver<0>:auth<bar> {}; say Foo.^auth;
evalable6 (exit code 1) No such method 'auth' for invocant of type 'Perl6::Metamodel::PackageHOW'. Did you mean any of these?
push
put

in block <unit> at /tmp/ajB50RyaK1 line 1
SmokeMachine Voldenet: I was thinking… that it’s possible some one would like, for example, count logged users using something like this: `event login-count { has $count = #login.count; match { login(#login)* } }`. The problem with that is that every new login will create a new login-count event… so I was thinking that we should have a syntax to say something like: acumulate everything, but just emit new event for each 10 09:13
new logins… or just emit 1/min for example...
what do you guys think?
jmerelo SmokeMachine: at the language level? 09:23
SmokeMachine jmerelo: yes... 09:24
jmerelo SmokeMachine: I use rotors for that. But it involves converting Channels to Supplies and back... 09:25
SmokeMachine: it works most of the time, anyway. I'm using it for my evolutionary algorithms.
SmokeMachine: it would work with Supplies, creating a new supply out of an old one... No need for channels.
SmokeMachine jmerelo: that wouldn’t work for me… it should work at “rule” level… but I think the biggest problem for now (before implementing) is finding a good syntax for that... 09:27
I’m thinking in something like: `login()*/10` and `login()*/1min`... 09:28
jmerelo: what do you think?
jmerelo SmokeMachine: cool!
cpan-raku New module released to CPAN! Algorithm::GooglePolylineEncoding (1.0.3) by 03SCIMON 09:41
SmokeMachine And, ofcourse: `bla() ** 10/2` 09:50
but that makes me think, what should this do? `bla() ** 10/3`? and this `bla() ** 10/2 bla() ** 9/3`? 09:52
Should the `/N` work only for the whole match?
lizmat clickbaits rakudoweekly.blog/2020/02/24/2020-...red-noise/ 09:53
SmokeMachine that makes me think that maybe it would be better something like: `event login-count { has $count = #login.count; match(*/10) { login(#login)* } }` 09:54
cpan-raku New module released to CPAN! Trait::Env (1.0.2) by 03SCIMON 09:57
cpan-raku New module released to CPAN! Test::HTTP::Server (0.5.1) by 03SCIMON 11:30
rindolf DrForr: hi, mazal tov! 12:02
tellable6 2020-01-27T22:15:13Z #raku <thundergnat> rindolf Re: slow project euler 686; try rosettacode.org/wiki/First_power_of..._12#Perl_6
rindolf hmmm... it seems faster 12:44
SmokeMachine Maybe something like: `event login-count { has $count = #login.count; match(#login.host/10min) { login(#login, host = #login.host)* } }` to emit 1 event per 10 minutes for each host 12:49
abraxxa can I change the output of Grammar::Tracer to output the whole match and not only its beginning? 14:41
dakkar abraxxa: looking at github.com/jnthn/grammar-debugger/...Tracer.pm6 you could redefine the `summary` method 14:44
abraxxa does rule and token in a Grammer behave any different but whitespace matching? 15:26
masak no, that's the difference 15:27
tellable6 2019-12-25T16:51:28Z #raku <sena_kun> masak not only github.com/masak/data-pretty but github.com/masak/gge wants some de-bitrotting too...
abraxxa i switched proto rule to a proto token and now it behaves completely different
masak sena_kun: oh wow. I'm not surprised.
tellable6 masak, I'll pass your message to sena_kun
masak tellable6: oh, you do that automatically now? neat. 15:28
tellable6 masak, I haven't seen oh around, did you mean o_?
masak haha. still stupid, though
abraxxa: well, duh :P
abraxxa: hot tip: test your grammars. extensively. 15:29
abraxxa I do and it fails
masak positive and negative tests. this is very important.
if TDD was ever made for anything, it's grammars. and vice versa.
abraxxa Grammar::Tracer doesn't show me what's going wrong 15:30
masak abraxxa: maybe what you need is an intuitive understanding of where `rule` implicitly inserts <.ws>
abraxxa I moved one sym down and it's still matched first
masak :) 15:33
abraxxa I don't find that funny!
jnthn
.oO( If only there was a tool that showed you where the whitespace was going to be inserted in rules... )
15:42
abraxxa i had fixed strings under '' when using rule which I now had to remove when switching to token 15:44
masak sorry for smiling -- I did find <sym> matching in a non-first position funny, though I'd be hard-pressed to explain why 15:53
cfa morning all 15:54
abraxxa token comment-line { ^^\h*'#'+\h*<(\N*)>\n } 16:01
this token doesn't match a line starting with regular whitespace followed by #
jnthn m: my token comment-line { ^^\h*'#'+\h*<(\N*)>\n }; say " # foo\n# bar\n #baz\n" ~~ m:g/<comment-line>/ 16:06
evalable6 (「 # foo

comment-line => 「foo」 「# bar

comment-line => 「bar」 「 #baz

comment-line => 「baz」)
jnthn Looks right to me; I'm guessing the problem is elsewhere
abraxxa I've changed it to a rule and removed all \h* and now it matches again 16:09
if the previous token or rule matched the linefeed and the four whitespace chars, will that make the ^^ not match? 16:10
problem is that the Grammar::Tracer output only contains the start of the matching previous line 16:11
jnthn Yes, the ^^ wants to be after the line feed, if the rule ate whitespace at the end of it that'll mean you're no longer at the start of a line... 16:13
Ven_de_Thiel greppable6: X::ParseFail 16:18
greppable6 Ven_de_Thiel, Found nothing!
Ven_de_Thiel also, o/ #raku
greppable6: ParseFail
greppable6 Ven_de_Thiel, 26 lines, 3 modules: gist.github.com/b46e2c2a137fb6ffbb...c58c6691ee
Geth doc: 02d37fa461 | (Tom Browder)++ | doc/Language/modules.pod6
chg p6 to raku
16:19
doc: 2b0cd7b908 | (Tom Browder)++ | doc/Language/modules.pod6
change to canonical URL; add definition of PR
doc: d6324dbfaa | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #3241 from tbrowder/p6toraku-modules

chg p6 to raku
linkable6 Link: docs.raku.org/language/modules
doc/master: 5 commits pushed by (Tom Browder)++, (Juan Julián Merelo Guervós)++
doc: 6840bea8ff | (Tom Browder)++ | doc/Language/glossary.pod6
chg p6 to raku
16:20
doc: bf50be3df7 | (Tom Browder)++ | doc/Language/glossary.pod6
use canonical URL
doc: 17441eaa29 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
Merge pull request #3239 from tbrowder/p6toraku-glossary

chg p6 to raku
linkable6 Link: docs.raku.org/language/glossary
doc: 4773a6b853 | (Tom Browder)++ | doc/Language/haskell-to-p6.pod6
chg p6 to raku
16:22
doc: da314d4ba2 | (Tom Browder)++ | doc/Language/haskell-to-p6.pod6
tidy grammar per comment
doc: a160ba1c8e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/haskell-to-p6.pod6
Merge pull request #3240 from tbrowder/p6toraku-haskell-to-p6

chg p6 to raku
linkable6 Link: docs.raku.org/language/haskell-to-p6
jmerelo Just a reminder we're still admitting project proposals for Outreachy github.com/perl-foundation-outreac...2020-ideas 16:31
sena_kun jmerelo, can't some gsoc ideas just be ported there? 16:42
tellable6 2020-02-25T15:27:58Z #raku <masak> sena_kun: oh wow. I'm not surprised.
jmerelo sena_kun: mostly, but you need to take into account that onboarding tasks have to be added, and it requires more involvement from early on, so we encourage 3 or more mentors per project. 16:43
cpan-raku New module released to CPAN! Trait::Env (1.0.3) by 03SCIMON 16:51
sena_kun El_Che, ping? 16:56
El_Che pong (although a slow pong, on the train) 17:00
sena_kun El_Che, can you PM me later today when comfortable to discuss alpine issue (I Have some new info) 17:01
jmerelo sena_kun: I'm around to help if needed...
El_Che sena_kun: is it sensitive? we can always open an temporarely channel 17:03
sena_kun El_Che, not really, I guess, it's just less noisy, maybe 17:04
El_Che sena_kun, jmerelo: joint #rakuadhoc 17:08
-t
Grinnz you should use ## for ad hoc channels 17:09
or maybe #raku-foo? i don't know if that ownership is automatic 17:10
rypervenche I've got two arrays of equal size. I want to Z~ them together, but also add a '=' in between each created element. How might I accomplish this? 17:27
leont By doing two Z~ ? 17:29
jnthn m: my @a = 1,2,3; my @b = 4,5,6; say @a Z[&({"$^a=$^b"})] @b
evalable6 (1=4 2=5 3=6)
rypervenche Oooh 17:30
leont @a Z~ "="xx@a Z~ @b 17:31
m: my @a = 1, 2, 3; my @b = 4, 5,6; say @a Z~ "="xx@a Z~ @b
evalable6 (1=4 2=5 3=6)
cfa m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a »~» '=' Z~ @b 17:32
evalable6 (1=4 2=5 3=6)
jnthn That's also cute... 17:33
rypervenche Oooooh
jnthn Also this one:
m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a Z~ "=", * Z~ @b
evalable6 (1=4 2=5 3=6)
cfa nifty
jnthn The , * instead of xx @a
leont Huh, I didn't know that one!
leont Whatever really is that whatever :-D 17:34
cfa oh btw leont, i tried Getopt::Long as a drop-in replacement recently 17:35
very neat
one question: do you plan to auto-provide usage documentation?
rypervenche Thanks for all of the answers. Very TIMTOWTDI indeed. 17:36
rypervenche Another kind of related question. Is it possible to have two arrays, one of variable names (with or without $, not sure if needed), and one of values, and combine them together while declaring them all at the same time? Much like: my ($var1, $var2) = <one two>; but where the first array is actually a variable? 17:41
Doc_Holliwood m: .say for (1, 10, 11, 100, 101, 110... *)[0..10] 17:43
jnthn No, because lexical declarations need to be known at compile time
evalable6 (exit code 1) Unable to deduce arithmetic or geometric sequence from 100,101,110 (or did you really mean '..'?)
in block <unit> at /tmp/aaJfExAX6t line 1
rypervenche In my mind it would look something like: my @var-names = @values; 17:44
leont cfa: yeah I do, I just haven't gotten around to it
One of the main factors is that I'm not entirely sure what I want the output to look like exactly 17:45
cfa leont: neat 17:47
and yeah, understood
leont The builtin one tends to become very confusing when one has many arguments (e.g. type "zef foo"), but I'm not quite sure what the alternative would look like
cfa nods 17:49
rypervenche Oh! I missed jnthn's response. Hmm.
leont Also, you may want to have a look at Getopt::Subcommands. It's a bit more experimental at this stage but the two-stage argument handling does seem like a good idea. 17:50
rypervenche jnthn: I was looking to take some bash variables from a file (like: VAR1="$HOME/Desktop") and convert them into Raku syntax via a grammar, and possibly in the actions create our-scoped variables. That won't be possible then? Is there something similar that I could do? 17:54
jnthn Depends what problem you're trying to solve. In theory you can write a module with an EXPORT, pass it the file, and it will export variables :) 17:55
I did something like that once for shell commands (in a talk, as an example) 17:56
rypervenche I was planning on turning this into a module, yeah.
cfa leont: cool, will check that out 18:04
fwiw, i have no real issues with the builtin one... but for the = signs 18:05
leont Yeah the = signs are the main reason why I needed something else as well 18:13
But having more specific error messages for a lot of issues is a strong second reason
cfa sounds good
i gather there was a motivation for using = in the first place
leont It's essentially a design constraint of using a blind parser 18:17
The default parser converts the command line arguments into a capture without knowing anything about those arguments, so it can't know --foo should take an argument or not 18:18
cfa ah, okay
presumably that's in the typeless MAIN(:$foo) case? 18:19
because once you provide a type it's no longer ambiguous?
leont The default parser doesn't look at MAIN at all until it has already parsed the arguments
cfa aha
leont Then it tries to dispatch to MAIN, and if that doesn't work prints the usage message 18:21
That's why the error message is so non-specific, it only knows that the capture doesn't fit the sub, it doesn't know why.
cfa i see
anyway, usability wise it's not wonderful: i tend to do --foo <TAB>, then insert the = after completion 18:22
where i'm completing a filename 18:23
(i doubt i'm alone in this)
leont It's also why you definitely shouldn't do «Str $file where *.IO.f» like in one of documentation examples; the usage message really isn't really a replacement for "no such file $file"
Geth doc: 2e51f74560 | Coke++ | doc/Language/haskell-to-p6.pod6
avoid awkward phrasing.

passes spelling test again.
linkable6 Link: docs.raku.org/language/haskell-to-p6
leont Essentially all types other than Any or Str give confusing error message in the default parser, because all mismatches trigger the usage message instead of something like «--filesize argument "abc" must be an integer» 18:28
discord6 <Highlander> rypervenche: here's a link to the talk jnthn is referencing www.youtube.com/watch?v=id4pDstMu1s 18:49
<Highlander> Also the talk slides since the camera work is a bit dodgy in parts: jnthn.net/papers/2015-fosdem-static-dynamic.pdf
discord6 <Highlander> the code samples in and around slide 56 should be a great starting point for your use case 18:51
rypervenche Ahh, thanks Highlander. (not sure how highlighting works via Discord) 18:52
discord6 <Highlander> Discord uses @'s but I'm not sure if you need the discriminator (a 4-digit number, since names needn't be unique) as well 18:55
jmerelo .tell tbrowder got feedback from OSCON, not selected. I'm going to Houston anyway :-) 19:09
tellable6 jmerelo, I'll pass your message to tbrowder
abraxxa is there a helper method to lookup up an item of an array which is a hash and the attributes all match a given hash (it might have additional keys)? 19:13
I'd use my $match = @array.first: ???; 19:14
does smartmatch what I need? 19:15
tbrowder jmerelo: great, see you there!
moritz what do you mean by "the attributes"? 19:16
abraxxa: also, an example or two might help
abraxxa my %looking-for = ( name => 'foo', color => 'blue' ); my @existing-items = ({ name => 'foo', color => 'blue', otherattr => 'baz' }, { name => 'bar', color => 'red', otherattr => 'baz' }); 19:17
my %service = @existing-services.first: $_ ~ %service-lookup; 19:18
abraxxa my %service = @existing-items.first: $_ ~ %looking-for; 19:18
moritz abraxxa: according to the docs, there is sensible Hash ~~ Hash operation defined that suits you 19:20
abraxxa my %service = @existing-items.first: * ~ %looking-for; seems to be the correct syntax, but why * and not $_ as in a grep? 19:21
moritz say @e.first({ all( $_{%looking-for.keys} ~~ %looking-for.values)}) 19:22
that's what I'd use to be explicit
abraxxa that doesn't do what I expect
moritz no?
abraxxa my example
moritz it returns the first hash in your example 19:23
abraxxa it always returns the first hash 19:28
moritz cannot confirm 19:30
if I change the order, it still returns the one with color => 'blue'
lizmat abraxxa: have you considered using objects rather than hashes? then you could create an ACCEPTS method, which would be used inside the block of a first
moritz m: my %looking-for = ( name => 'foo', color => 'blue' ); my @e = ( { name => 'bar', color => 'red', otherattr => 'baz' }, { name => 'foo', color => 'blue', otherattr => 'baz' },); say @e.first({ all( $_{%looking-for.keys} ~~ %looking-for.values)}) 19:31
evalable6 {color => blue, name => foo, otherattr => baz}
abraxxa lizmat: no, too complicated to this use-once migration code
Firehol linux iptables config frontend to Fortigate firewall rule migration
wrote a Grammar for Firehol
lizmat or, if it is the same type of object, you wouldn't have to 19:32
abraxxa moritz: I also need an exists check in there to silence the warnings
moritz: shouldn't the all function that an array? 19:33
moritz abraxxa: this question no verb 19:34
abraxxa s/that/take/
lizmat m: class A { has $.a }; my @a = ^10 .map: { A.new(a => $_ ) }; my $needle = A.new(a => 8); dd @a.first: * eqv $needle # abraxxa 19:35
evalable6 A @a = A.new(a => 8)
moritz abraxxa: Hash.keys returns a list (or at least something iterable) 19:35
abraxxa there is no Hash to Hash comparision operator that doesn deep nested comparision? 19:36
abraxxa moritz: yes, but that's in the one positional parameter to all which uses an operator to return True or False 19:36
abraxxa moritz: or is the all like $_.all in this case? 19:37
moritz all() returns a Junction 19:38
abraxxa those myriads of types really suck!
discord6 <Highlander> (which will get boolified, and when it does it will be truthy only if "all" its components are truthy)
Voldenet SmokeMachine: from what you've specified, I making rules on the whole collection of events would be more flexible - (#ev.count % 10 == 0), (#ev.last.date - #ev.first.date < 10m) - hiding that fact would be enormously leaky abstraction anyway
lizmat abraxxa: again, why hashes ??
feels to my you're applying Perl 5 idioms in Raku 19:39
abraxxa lizmat: because the FortiManager API takes JSON
lizmat: of course I do, that's what I do since 20 years
moritz but that doesn't mean you have to work with JSON-compatible data types *inside* your applicaiton
lizmat well, using hashes is generally not the most performant way in Raku
abraxxa it's not an application
lizmat objects are *much* better optinizable
abraxxa i don't care 19:40
write fast not run fast
moritz abraxxa: s/application/code/ then
lizmat *
abraxxa raku is more in the way than it helps
I only choose it because of Grammars
lizmat abraxxa: feels to me it is in the way because you're going against the flow 19:41
discord6 <Highlander> I feel like there must be a way to do what you're trying to do without much hassle
abraxxa Array.first doesn't even have an example using block syntax
discord6 <Highlander> Why again did moritz's solution not work as expected? Seems like it should do what you're asking for 19:43
abraxxa moritz: this doesn't work: my %service = @existing-services.first({ all( $_{%service-lookup.keys}:exists && $_{%service-lookup.keys} eq %service-lookup.values )}); 19:44
Use of uninitialized value %result{'dport'} of type Any in string context.
there is no %result anywhere in my code
moritz m: my %looking-for = ( name => 'foo', color => 'blue' ); my @e = ( { name => 'bar', color => 'red', otherattr => 'baz' }, { name => 'foo', color => 'blue', otherattr => 'baz' },); say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} ~~ %looking-for.values)})
evalable6 {color => blue, name => foo, otherattr => baz} 19:45
abraxxa moritz: good, that's what i've done too after reading that :exists returns a List/Array/Whatever of boolean values 19:51
moritz: thanks!
moritz you're welcome 19:53
discord6 <Highlander> see, anything's possible (and easy most of the time) 19:55
abraxxa great, the attribute I have to check is an Array and there is no deep nested comparision operator 20:03
shouldn't eqv do this? 20:04
abraxxa m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },); say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values)}) 20:18
evalable6 Nil
abraxxa there you have it 20:19
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say Dump @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); 20:20
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ZASRPWQxYy
Undeclared name:
Dump used at line 1
abraxxa m: use Data::Dump; my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say Dump @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); 20:20
evalable6 (exit code 1) 04===SORRY!04=== Er…
abraxxa, Full output: gist.github.com/573b7b70f789a99836...8bb666518a
abraxxa m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); 20:20
evalable6 {name => foo, tcp-portrange => [35450-35490:35450-35490]}
abraxxa why does the former not work? 20:20
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); 20:21
evalable6 {name => foo, tcp-portrange => [35450-35490:35450-35490]}
abraxxa m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values)}); 20:22
evalable6 Nil
tobs abraxxa: Hash.values returns a Seq which doesn't eqv the List that is returned by a hash slice 20:36
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values.list)}); 20:37
evalable6 {name => foo, tcp-portrange => [35450-35490:35450-35490]}
Xliff m: multi a (&a --> Nil) { say &a.^signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 }; 20:38
evalable6 (exit code 1) No such method 'signature' for invocant of type 'Perl6::Metamodel::ClassHOW'
in sub a at /tmp/KXBg7ux6eB line 1
in block <unit> at /tmp/KXBg7ux6eB line 1
tellable6 2020-02-24T18:58:56Z #raku-dev <MasterDuke> Xliff: does github.com/rakudo/rakudo/commit/c9...dfc7568c70 do anything for your compile times?
Xliff m: multi a (&a --> Nil) { say &a.signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 }; 20:39
evalable6 ("so", "say", "we", "all")
Xliff m: multi sub a (&a --> Nil) { say &a.signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 };
evalable6 ("so", "say", "we", "all")
Geth doc/star-RAKU: ed6507a548 | (Stoned Elipot)++ | 2 files
Be more explicity and less elliptical
20:52
cpan-raku New module released to CPAN! Gnome::Gtk3::Glade (0.8.9) by 03MARTIMM
New module released to CPAN! Gnome::Gtk3 (0.25.1) by 03MARTIMM
abraxxa tobs: that's what I meant with 'the myriads of types suck' 21:02
Geth doc/master: 4 commits pushed by (Stoned Elipot)++, stoned++ 21:05
Doc_Holliwood m: .say for Inf..42; 21:12
evalable6
Doc_Holliwood m: .say for Inf, Inf - 1 ... 42;
evalable6 (signal SIGHUP) Inf
NaN
NaN
NaN
NaN
NaN
NaN
NaN…
21:13
evalable6 Doc_Holliwood, Full output: gist.github.com/03c24f8def44938dd9...6c92de5a6a 21:14
Doc_Holliwood shouldn't that, die or something?
Geth doc: uzluisf++ created pull request #3250:
Partially document the 'is built' trait
21:20
jnthn Num stuff typically uses NaN rather than exceptions
guifa NaN is a bit of a standards thing too 21:36
guifa It’s for things that are undefined (numerically — not :D defined) or unrepresentable 21:37
Doc_Holliwood Ok, but Inf to the left of .. 21:55
It could warn at least, I mean, that makes no sense right? having that 21:56
lizmat m: dd Inf.succ
evalable6 Inf
lizmat m: dd Inf.pred
evalable6 Inf
lizmat hmmm
Doc_Holliwood no that's fine
inf + 1 equals inf
lizmat m: dd Inf - 1
evalable6 Inf
lizmat so it should generate an infinite number of Inf's ? 21:57
guifa To me Inf + 1 is intuitively Inf, but admittedly, math with infinity is a bit field specific, with some allowing degrees of inifnity (transfinite numbers and all)
jnthn Hm, I wonder where the NaN comes from then...
Doc_Holliwood it should die "Cannot count FROM infinity" or something
lizmat yeah, I was wondering that as well... 21:58
Doc_Holliwood: please file an issue :-)
Doc_Holliwood hey guifa. my infinity is bigger than yours 21:59
:-)
guifa You laugh but it’s literally a thing :-)
Doc_Holliwood i know 22:00
guifa Although the guy who invented it got laughed at hard enough to suicide :(
m: dd Inf + Inf 22:01
evalable6 Inf
guifa m: dd Inf + 1
evalable6 Inf
guifa m: dd Inf - Inf 22:02
evalable6 NaN
guifa Okay, phew, we’re following ANSI for all this stuff
m: dd 1 / Inf
evalable6 0e0
guifa cheers
MasterDuke moritz: fyi, camelia is down 22:04