🦋 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.
guifa FINALLY. 00:04
.tell sena_kun :-D llunes, 12 de payares de 2019 a les 00:02:36; 2019年11月12日月曜日 0時02分36秒; понеделник, 12 ноември 2019 г., 0:04:02 ч.
tellable6 guifa, I'll pass your message to sena_kun
00:06 wildtrees joined
TreyHarris guifa: not sure what's that about, but since you happened to three languages two in which I read my linguistics degree, and the third which I don't recognize but seems close to Spanish and French (Asturian maybe?), you should know that those three forms are in differing degrees of formality (assuming I'm reading the Asturian-ish thing correctly...) 00:12
the Russian one is semi-formal, while the Japanese one is quite formal; the only way you could get more formal is by dropping the digits and using kanji for numbers (well, short of going to old Japanese dating, and including the era name) 00:14
guifa TreyHarris: this is the data from CLDR pulled into create “full” date/time string. sena_kun was needing the Bulgarian date formatting the other day but I didn’t quite have it ready
TreyHarris ah. Bulgarian? Bizarre, I wonder how it got so much Romance rooted date names? 00:15
I thought Bulgarian was written only in Cyrillic, too 00:16
guifa It’s Asturian - Japanese - Bulgarian 00:17
TreyHarris Oh, right. I should have noticed the "misspellitng" of November, but my eyes glided right over it
The rest is fine for Russian 00:18
00:19 cpan-raku left
guifa The goal here is that programmers can just say “format-time(now)” and it’ll do a localized time format, or format-date-time(now, :length<full>) to get the above. It’ll auto pull from the user’s environment variables (or equivalent) and be nice and pretty 00:20
TreyHarris Hah, three of those languages have regularized systems of correlatives, too--kismet! 00:21
00:21 cpan-raku joined, cpan-raku left, cpan-raku joined
TreyHarris Got it. Were that it was as easy to do counting and numbering i18n as Gregorian dating 00:22
guifa My goal is to make it that easy :-) 00:23
It’s already working for dates, times, numbers, and lists. The numbers even have a regex token you can use to capture local number forms 00:24
TreyHarris I'm fascinated to see how you handle Japanese, where there are 350 counting systems in the government-approved list (although only a couple dozen in the high school list, which is sufficient to not sound dumb) 00:25
I describe it to folks as if you absolutely had to know what animals were in "packs" vs. "rookeries" vs. "schools" vs. "parliaments" vs. "exaltations" and were unable to speak of any animal without knowing this 00:27
guifa CLDR doesn’t have counter words in it. That’d have to be given to the localizer, sadly.
TreyHarris Ah. Then you end up saying "3 pieces of water" and "2 pieces of pants" 00:28
guifa But I’ve mostly ported over Mozilla’s Fluent framework, and there actually are ways to deal with that
TreyHarris The worst is when you need to encode the spoken form as well, since a lot of languages do absolutely crazy things you can hide under the carpet by using standized decimal digits 00:31
Like languages where you count "Seventy-eight, seventy-nine, seventy-ten, seventy-eleven... seventy-ninteen, ninety"
guifa A lot of that is in CLDR actually 00:32
The rule to cover French numbers from 60-79 for instance is <rbnfrule value="60" radix="20">soixante[-→%%et-un→];</rbnfrule> 00:33
I haven’t yet created the parser and generater yet though :-) baby steps 00:34
abraxxa how can I call make on whatever token has matched for such a token? token param { <src> | <dst> | <proto> | <inface> | <outface> | <sport> | <dport> | <dscp> }
TreyHarris wow, yeah... dipping in, that's pretty cray-cray. Like, you actually have the lists of emperors and consuls of Rome so you can express years before the Fall. And the list of popes... I wonder what CLDR does for expressing ecclesiastical time during the schism?
The full database must be huge 00:36
guifa TreyHarris: they actually already have all the Japanese eras in there. priority is given, like Unicode, to systems in current use, and then other systems can get work done. I think the last release added like 3-4 different new calendar types 00:38
st.unicode.org/cldr-apps/v#locales/// take a browse
abraxxa: trying this
TreyHarris guifa:yep, i found it. I was just looking at the proposals for the older systems because that's where it truly gets pretty ridiculous
guifa token param { $<match>=[<src> | <dst> | <proto> | <inface> | <outface> | <sport> | <dport> | <dscp>] } 00:39
I think that’ll work
abraxxa: oops, sorry, I guess it doesn’t. That only works for text capturing =\ 00:43
There may be a cleaner way to do it but probably the easiest is
method param { make ($<src> // $<dst> … ).made } 00:45
But in general you might want to look at using a proto token, which sort of automagically handles it for you
so you’d have
proto token param { … }; token param:sym<src> { … }; where you insert the actual definitino of <src> there. Then you call param.made, it’ll contain whichever of the various tokens it actually matched. Caveat: treats all tokens with | alternation, not ||. 00:47
abraxxa yeah I've looked into that but I also have cases which are more complex like rule group { 'group with' <param>+ [ <router> | <server> | <group> | <comment> | <include> ]+ 'group end' } 00:48
but it starts to work now, thanks! 00:50
guifa FOr that one, I would pull that router/server/group stuff out and put it into its own tokens
One of the things I’ve learned is that the smaller and more numerous your tokens are, the more manageable things tend to be.
abraxxa they are separate tokens 00:52
rules in my case
a group can contain any of them 00:53
guifa I mean make it like
rule group { 'group with' <param>+ <option>+ 'group end' }
proto rule option { * } 00:54
rule option:sym<router> { routerdefintion }
etc
abraxxa got it
will try that after some sleep
thanks for the help and good night! 00:55
guifa sleep well! 00:57
01:03 squashable6 left 01:05 squashable6 joined 01:07 pmurias left 01:12 squashable6 left 01:14 squashable6 joined 01:36 vrurg joined 01:43 stanley_tam joined 01:45 wildtrees left 02:27 marcusr joined
ZzZombo m: ->{~$++}().say 02:36
camelia 0
ZzZombo m: ->{~$<a>}().say
camelia Use of Nil in string context

in block at <tmp> line 1
02:44 xinming_ left 02:46 marcusr left, marcusr joined 02:49 xinming_ joined 03:41 Xliff left, hythm joined 04:41 statisfiable6 left, bloatable6 left, unicodable6 left, releasable6 left, reportable6 left, benchable6 left, quotable6 left, greppable6 left, committable6 left, squashable6 left, coverable6 left, nativecallable6 left, shareable6 left, notable6 left 04:42 notable6 joined, committable6 joined, reportable6 joined 04:43 evalable6 joined, tellable6 joined, releasable6 joined, unicodable6 joined, greppable6 joined, quotable6 joined, nativecallable6 joined 04:44 benchable6 joined, shareable6 joined, squashable6 joined, statisfiable6 joined, coverable6 joined, bloatable6 joined 05:10 rindolf joined 05:11 hythm left 05:15 stanley_tam left 05:41 stanley_tam joined 05:51 stanley_tam left 06:05 jmerelo joined
ZzZombo m: say: 1 06:17
camelia WARNINGS for <tmp>:
Useless use of constant integer 1 in sink context (line 1)
ZzZombo m: say 1:
camelia 1
ZzZombo m: say: 06:18
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say7⏏5:
Confused
at <tmp>:1
------> 3say:7⏏5<EOL>
expecting any of:
colon pair
Other potential difficulties:
Unsupported use…
ZzZombo m: say * * *(1, 2) 06:21
camelia { ... }
ZzZombo m: say (* * *)(1, 2)
camelia 2
ZzZombo m: say (* * 2)(4)
camelia 8
06:34 abraxxa left 06:37 abraxxa joined 07:06 sena_kun joined 07:12 marcusr left, marcusr joined 07:22 ufobat joined 07:38 jmerelo left, stoned75 left
abraxxa can i mix rule and token in a proto rule? 08:17
08:28 chloekek joined 08:32 xinming joined
ZzZombo m: 1,2,3 ==> say 08:32
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 031,2,3 ==> say7⏏5<EOL>
Other potential difficulties:
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_,…
ZzZombo m: 1,2,3 ==> say() 08:33
camelia (1 2 3)
ZzZombo m: 1,2,3 ==> say(3,2,1)
camelia 321(1 2 3)
ZzZombo m: |1,2,3 ==> say(3,2,1)
camelia 321(1 2 3)
ZzZombo m: |(1,2,3) ==> say(3,2,1)
camelia 321123
08:35 xinming_ left
ZzZombo m: :2<101>.say 08:50
camelia 5
09:07 Altai-man_ joined 09:09 sena_kun left
abraxxa what's the return value of docs.perl6.org/type/Hash#method_push ? 09:18
Altai-man_ a element pushed, no? 09:24
abraxxa Altai-man_: I had to use @options.push($group.push(%params)); instead of @options.append($group.push(%params)); 09:39
how can I grep for defined values?
make $/<option>».made.grep: .defined; 09:40
Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?
I already tried five different syntaxes
make $/<option>».made.grep({ .defined }).list; seems to work 09:43
Altai-man_ grep(*.defined)? 09:45
you use whatever star syntax when there is no block, but with a block you get $_ to work with
abraxxa ok, that works too 09:49
I want to return a list instead of an array to that I don't get an array inside another array but instead adding the items of the inner to the outer array, how can i do that?
it's in a grammar action method 09:50
Altai-man_ convert using .List?
abraxxa there seems to be an upper and lowercase list method 09:52
but neither is documented docs.perl6.org/type/Array
Altai-man_ m: [1,2,3].List.say;
camelia (1 2 3)
Altai-man_ m: [1,2,3].list.say;
camelia [1 2 3]
abraxxa uppercase gives me a Cannot call 'push' on an immutable 'List' 09:53
lowercase doesn't change the output
Altai-man_ abraxxa, can you provide a bit more of your code?
abraxxa method TOP ($/) { make $/<option>».made.grep(*.defined).list; }
one if the option types is group
which should add n hashes to the TOP list instead of an array including its contents 09:54
make @options; is how I currently return the generated array in method option:sym<group> ($/) {
Altai-man_ m: grammar G { rule TOP { ('a')+ } }; G.parse('aaa').say; 09:55
camelia 「aaa」
0 => 「a」
0 => 「a」
0 => 「a」
Altai-man_ m: grammar G { rule TOP { (<a>)+ }; rule a { 'a' } }; class A { method TOP($/) { make $0>>.made.grep(*.defined).list }; method a { make 'a'; } } G.parse('aaa', actions => A).made.say; 09:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3efined).list }; method a { make 'a'; } }7⏏5 G.parse('aaa', actions => A).made.say;
expecting any of:
Altai-man_ m: grammar G { rule TOP { (<a>)+ }; rule a { 'a' } }; class A { method TOP($/) { make $0>>.made.grep(*.defined).list }; method a { make 'a'; } }; G.parse('aaa', actions => A).made.say;
camelia Nil
Altai-man_ m: grammar G { rule TOP { (<a>)+ }; rule a { 'a' } }; class A { method TOP($/) { make $0>>.made }; method a { make 'a'; } }; G.parse('aaa', actions => A).made.say;
camelia Nil
Altai-man_ ok, need to open editor for this one... 09:58
m: grammar G { token TOP { (<a>)+ }; token a { 'a' } }; class A { method TOP($/) { make $0>>.made }; method a { make 'a'; } }; G.parse('aaa', actions => A).made.say; 09:59
camelia Too many positionals passed; expected 1 argument but got 2
in method a at <tmp> line 1
in regex a at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
abraxxa not sure if the group can return multiple items instead of one array 10:00
so if the upper layer must handle it be introspecting what the lower one returns
Altai-man_ grammar G { token TOP { <a>+ }; token a { 'a' } }; class A { method TOP($/) { make $<a>>>.made.grep(*.defined).list; }; method a($/) { make 'a'; } }; G.parse('aaa', actions => A).made; 10:02
m: grammar G { token TOP { <a>+ }; token a { 'a' } }; class A { method TOP($/) { make $<a>>>.made.grep(*.defined).list; }; method a($/) { make 'a'; } }; G.parse('aaa', actions => A).made;
camelia ( no output )
Altai-man_ m: grammar G { token TOP { <a>+ }; token a { 'a' } }; class A { method TOP($/) { make $<a>>>.made.grep(*.defined).list; }; method a($/) { make 'a'; } }; G.parse('aaa', actions => A).made.say;
camelia (a a a)
Altai-man_ abraxxa, something like this ^ ?
abraxxa Altai-man_: yes, thats the basic structure only that token a might return a Hash or an Array 10:03
but I guess I have to code that using a given when based on the type 10:04
Altai-man_ you can do `my $opts = $<options>.made; make foo, bar, $opts`
implementation of an action method is not restricted to a single line thing 10:05
10:06 patrickb joined
abraxxa paste.scsys.co.uk/587140 10:06
patrickb o/ 10:07
Altai-man_ patrickb, o/ 10:08
abraxxa, WHAT is redundant in `given/when`
abraxxa, why do you need `.hash` call in `when Hash`? I think you shouldn't 10:10
abraxxa thanks for the suggestions, both work 10:12
Altai-man_ \o/
I am also a bit confused about what the results of `@options.append($group.map({.push(%params)}))` would be, but maybe that's because I don't know about data structures involved
abraxxa it seems I need the same code in the TOP rule 10:13
TOP method
Altai-man_ result of `.push` is the element pushed, so if you're doing it in map, it is equivalent to just `%params`
abraxxa the TOP method should always return a List or an Array 10:14
Altai-man_: I'm adding all key/value pairs of the %params Hash to each element of the group Array 10:15
@options.push($group.map({.push(%params)}).list); is the same 10:16
Altai-man_ m: my $group = [1,2,3]; $group.map({ .push(%( :a42 )) }).say; 10:19
camelia Cannot resolve caller push(Int:D: Hash:D); none of these signatures match:
(Any:U \SELF: |values is raw)
in block <unit> at <tmp> line 1
Altai-man_ m: my $group = [%(),%(),%()]; $group.map({ .push(%( :a42 )) }).say;
camelia ({a42 => True} {a42 => True} {a42 => True})
abraxxa is there any type besides Array I could use to return from group?
Altai-man_ m: my $group = [%(),%(),%()]; $group.map({ .push(%( a => 42 )) }).say; 10:20
camelia ({a => 42} {a => 42} {a => 42})
abraxxa instead of group introspecting it's contents I like that a group rule just returns multiple hashes instead of an array of hashes
Altai-man_ m: my $group = [%( b => 50 ),%(),%()]; $group.map({ .push(%( a => 42 )) }).say;
camelia ({a => 42, b => 50} {a => 42} {a => 42})
Altai-man_ m: my $group = [%( b => 50 ),%(),%()]; $group.map({ $_.push(%( a => 42 )) }).say; 10:21
camelia ({a => 42, b => 50} {a => 42} {a => 42})
Altai-man_ hmmm...
I'd add $_ for clarify, but not smart enough to think of something more obvious
abraxxa, maybe you can `.flat`? 10:22
ZzZombo m: &i.say
camelia Nil
ZzZombo m: dd &i
camelia Nil
ZzZombo m: dd &i, i
camelia Nil
<0+1i>
ZzZombo wut
m: dd &rand
camelia Sub rand = proto sub rand (*%) {*}
Altai-man_ m: my @a = [%( a => 42 ), [ %( b => 50 ) ]]; for @a.flat -> $h { say $h }
camelia {a => 42}
[b => 50]
Altai-man_ m: my @a = [%( a => 42 ), [ %( b => 50 ) ]]; say @a.flat
camelia ({a => 42} [b => 50])
Altai-man_ m: my @a = [%( a => 42 ), [ %( b => 50 ) ]]; say @a.flat.flat
camelia ({a => 42} [b => 50])
Altai-man_ ok, this is not super flat. :/ 10:23
m: my @a = %( a => 42 ), [ %( b => 50 ) ]; say @a.flat.flat
camelia ({a => 42} [b => 50])
abraxxa works when I add it to TOP but not to the return value of group
Altai-man_ that's why I hate containers 10:24
ZzZombo m: constant &c = &Int.new;c.say 10:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Illegally post-declared type:
Int used at line 1
abraxxa docker? :-)
ZzZombo m: constant &c = Int::new;c.say
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a constant
at <tmp>:1
Exception details:
Could not find symbol '&new'
in block at <tmp> line 1
ZzZombo m: constant &c = &Int::new;c.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Type check failed in constant declaration of &c; expected Callable but got Any (Any)
at <tmp>:1
------> 3constant &c = &Int::new7⏏5;c.say
patrickb Is there any documentation of how the p6c ecosystem works and is meant to work wrt versioning? 10:26
El_Che releasable6: status 10:29
releasable6 El_Che, Next release will happen when it's ready. There are no known blockers. 248 out of 470 commits logged (⚠ 9 warnings)
El_Che, Details: gist.github.com/9b52586176d69ff927...e1f5ecea4b
10:31 Doc_Holliwood joined
tobs m: class A { our method f {} }; dd A::<&f> 10:32
camelia Method f = method f (A: *%_) { #`(Method|80906464) ... }
10:32 HoboWithAShotgun left 10:34 HoboWithAShotgun joined
AlexDaniel patrickb: I don't think so 10:34
10:35 Doc_Holliwood left 11:08 sena_kun joined 11:10 Altai-man_ left
cpan-raku New module released to CPAN! P5-X (0.0.5) by 03ELIZABETH 11:11
New module released to CPAN! P5-X (0.0.6) by 03ELIZABETH
11:28 joule joined 12:04 xinming left 12:06 xinming joined 12:09 Doc_Holliwood joined 12:10 HoboWithAShotgun left 12:14 mid_laptop joined
rindolf so TimToady has been mia from freenode? 12:25
missing in action
abraxxa I can't get a grammar token to work which should match a quoted list of words 12:32
paste.scsys.co.uk/587141 12:33
12:39 MitarashiDango[m left 12:58 mid_laptop left
abraxxa oh for gods sake! 13:06
values can't be used as token name
13:07 Altai-man_ joined 13:09 sena_kun left 13:26 robertle_ joined
tbrowder hi, question on best practice for public code: what about defining var names as \myvar and then using in rest of scope as myvar? confusing? 13:27
i have never used it but thinking of using it on rosetta code 13:28
robertle_ isn't hiding the sigils decidedly non-perlish? 13:30
13:31 xinming left, HoboWithAShotgun joined, xinming joined
El_Che rakuish 13:34
13:35 Doc_Holliwood left
guifa tbrowder: I use them occasionally particularly when I’m doing mathy functions 13:36
13:37 mid_laptop joined
guifa sub quadratic(\a, \b, \c) { … } 13:37
El_Che I read perl5 references when I see that :) 13:39
tbrowder i'm working (not very hard) on avl tree and starting with a java implementation so the absence of sigils prompted the thought...
13:39 perryprog left
tobs m: my \x = 10; x = 20 # the sigil is not just for looks and interpolation, it is what puts containers into variables 13:39
camelia Cannot modify an immutable Int (10)
in block <unit> at <tmp> line 1
tobs without a sigil, they don't behave variably 13:40
tbrowder El_Che: ditto! thnx for head tap!
okay, then sigilizing all...thnx
tobs without the sigil, I guess one would have to bind a container to the name at initialization 13:41
m: my \x = $; say x = 10; say x = 20
camelia 10
20
13:42
tobs so you can do without sigils, but I don't know of any syntactic sugar for that (except for the sigil) :)
El_Che I think that sigils + constant cover most bases 13:43
sigilless vars sounds to me more usefor for people creating slangs or DSLs :)
no ":)" intended, sorry :)
tobs or in signatures
El_Che tobs: to accept different type of containerized values? 13:44
jnthn Also in places you really don't want to impose any context
Like when building lazy pipelines out of parts
tobs El_Che: I was more thinking that parameters are ro by default, so it doesn't matter that they're not variable and indeed it sometimes looks nicer without a sigil 13:45
but those are interesting points 13:46
(about the context)
El_Che tobs: I see
13:47 timotimo[m] joined, MitarashiDango[m joined, uzl[m] joined, AlexDaniel` joined, rba[m] joined, tyil[m] joined, Demos[m] joined 13:48 matiaslina joined, CIAvash joined, aearnus[m] joined
tobs now I wonder if a proper "Raku from ground up" tutorial shouldn't start with sigilless variables and binding, and then introduce the sigilled ones as a convenience thing. 13:51
[Coke] imagines you could teach it either way. 13:55
El_Che I think that one should learn the 80% stuff first and then the special cases 13:57
14:03 mid_laptop left
robertle_ also, the main goal must be to write readable code, right? the sigils give extra, perhaps redundant, information about what that variable is. that helps readability a lot. so there must be a good reason to avoid that, and "looks nice" doesn't sound like a very strong reason, eye of the beholder and all 14:03
the argument earlier that you may sometimes want to deliberately make the point, or abuse the system for DSL reasons. that's a bit different... 14:04
14:11 lucasb joined
mspo is sigilless the preferred idiom? 14:16
[Coke] mspo: depends on what you're trying to do. 14:24
for beginners, I'd argue the default should be with sigils.
mspo what will rakucritic say by default 14:26
[Coke]: I love sigils, personally
[Coke]: I know a lot of people don't but it's, like, free information 14:27
sort(foo) vs sort(@foo)
14:27 thundergnat98 joined
mspo [Coke]: I like to pack in contextual information where it's easy 14:28
server hostnames are another good example
thundergnat98 FWIW, sigiless variables variables are in general faster when declaring in a tight hot loop. They seem to have less overhead tan sigiled variables. 14:29
Probably just an artifact of our current optimizations and not long term... but I'm writing programs in the now. 14:30
See rosettacode.org/wiki/Palindromic_ga...ers#Perl_6 Using sigiled vars in the iterators imposed a small but consistent performance penalty. 14:31
mspo that sounds like a bug to me 14:32
thundergnat98 Like
mspo I guess the sigil forces a type check on each iteration
thundergnat98 I said, an artifact of the current state of the optimizations.
jnthn Remember that `my $foo = 42` means we allocate a Scalar, and `my \foo = 42` does not 14:33
So you're saving on allocations, GC, and dereferences
robertle_ but would a future version of the runtime not optimize that away? 14:35
14:36 thundergnat98 left
mspo what does \foo = 42 allocate? 14:37
14:40 kensanata joined
mspo oh you couldn't use \foo in a loop since you can't change its value (thinking, like, a for loop) 14:43
they're like erlang atoms
a helpful comparison for almost no one ;)
14:47 thundergnat2 joined
thundergnat2 m: for 'a'..'f' -> \char { print char } # <- mspo: \foo in a for loop 14:48
camelia abcdef
thundergnat2 Well... \char
14:49 thundergnat2 left
brass It's so funny, when I started learning raku it felt pretty weird but by now I find it incredibly easy to write and it feels like the other scripting languages I was using before are extremely limiting and crappy 14:49
mspo thundergnat: weird 14:52
guifa brass: that’s a pretty common experience I think 14:53
14:54 xinming left
tbrowder can one use \obj to reference a class instance? 14:54
thats the use case i was considering 14:55
14:56 xinming joined 14:57 thundergnat23 joined
mspo thundergnat23: I don't actually get why that's allowed 14:59
thundergnat23 tbrowder: yes. And if your class has a STORE method, you pretty much have to. See Rakudo issue #3292
Mspo: think of it as a temporary constant.
15:00 thundergnat23 left
mspo thundergnat23: can you skip assigning a name at all in that case? 15:00
tellable6 mspo, I'll pass your message to thundergnat23
15:00 cpan-raku left 15:01 cpan-raku joined, cpan-raku left, cpan-raku joined
mspo how many bots are in here? :) 15:01
lucasb .bots 15:04
cpan-raku 03cpan-raku:121.0.1 (2019-04-12T16:14:21Z) reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadannouncer-irc
tyil there used to be a dozen other bots 15:06
camelia is also a bot
jnthn robertle_: Yes, that's largely what the PEA work is about 15:07
tyil Geth, discord6, benchable6, bloatable6, ...
mspo: github.com/perl6/doc/issues/711
15:08 sena_kun joined
robertle_ cool, but then "it's currently a tiny bit faster" doesn't side like a good basis for general code style recommendations (as usual) 15:08
15:09 Altai-man_ left
mspo tyil: lol 15:13
lucasb it's not just a performance matter. using a sigilless "variable" also shows the intention of, well, the intended use :)
mspo would $* do the same speed up? 15:15
I probably (definitely) don't grok the lambda -> scoping to get it
robertle_ lucasb: sure, if the sigilles variant makes it more clear then of course it's the better option. I would bet however that 90+% of all code does not fall into that category...
guifa has a code block he’s using for the advent post that I think is a good use of sigil-less vars 15:19
but it’s basically a pure functional math expression 15:20
robertle_ nice teaser ;) 15:23
guifa Let’s just say I’ve never seen a cleaner block to calculate Q-grams before 15:26
(five lines. FIVE LINES. and no nasty golfing line noise to do it) 15:27
16:05 robertle_ left 16:11 kensanata left 16:15 jmerelo joined 16:17 Lytz1 joined
cpan-raku New module released to CPAN! Math::FFT::Libfftw3 (0.3.1) by 03FRITH 16:23
16:36 chloekek left 16:38 patrickb left 16:47 Lytz1 left 17:07 Altai-man_ joined 17:09 sena_kun left
El_Che how are we doing release-wise? 17:13
jmerelo releasable6: status 17:16
releasable6 jmerelo, Next release will happen when it's ready. There are no known blockers. 248 out of 477 commits logged (⚠ 9 warnings)
jmerelo, Details: gist.github.com/dae7a5865fe1638ae4...2565f269a2 17:17
17:44 MasterDuke left
japhb El_Che: The release can go whenever -- the problem is we are currently without available release managers, so we're waiting on humans to have free cycles. 17:51
El_Che japhb: yes, AlexDaniel++ said he was very busy
18:06 Altai-man_ left 18:10 sena_kun joined 18:11 sena_kun left
japhb El_Che: Starts with samcv for Moar -- and judging by time in channel, she may be even busier. 18:13
18:14 patrickb joined 18:18 chloekek joined
El_Che samcv++'s work is greatly appreciated 18:26
18:29 sena_kun joined 18:31 sena_kun left 18:35 sena_kun joined 18:36 sena_kun left 18:43 vrurg left 18:44 vrurg joined 18:58 vrurg left, vrurg joined
AlexDaniel mspo: all whateverable bots are described here: github.com/perl6/whateverable/wiki 19:02
I'll be free-er in a day or two :) 19:12
19:14 wildtrees joined, wildtrees left
jmerelo AlexDaniel++ 19:16
AlexDaniel also, when I'm busy, I'm actually writing a bunch of raku code 19:17
which at some point used to be very useful because I'd stumble upon bugs all the time
nowadays I see no bugs
El_Che Is't that the plot of the 6th sense? 19:18
I see bugs and it turns out...
19:20 wildtrees joined 19:23 squashable6 left
dogbert17 m: say is-prime(-1) # LTA 19:24
camelia Invalid number of rounds (100), valid range is 0..256

in block <unit> at <tmp> line 1
19:25 stoned75 joined, squashable6 joined
AlexDaniel dogbert17: ehh… 19:37
dogbert17: github.com/MoarVM/MoarVM/pull/1130...-526843829
dogbert17 haha, I'll blame my cold which I'm currently recovering from 19:39
AlexDaniel dogbert17: I thinkt here's no ticket, so you can create one :) 19:48
19:50 jmerelo left
abraxxa can a make return multiple things? hashes in my case 20:08
in Perl 5 in a map block you can return no list items by returning () or more than one, is this possible here in an action class of a grammar too? 20:10
20:14 ufobat_ joined
tobs m: my @a = map { $_ %% 2 ?? slip([$_, $_]) !! Empty }, 1..10; dd @a 20:16
camelia Array @a = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10]
tobs abraxxa: using slip() you can return a multitude of elements which flatten into a list (@a in that case). Empty is a Slip of the empty list, so it effectively returns nothing from a map. 20:18
20:18 ufobat left
abraxxa tobs: PERFECT! thanks! 20:19
20:42 MasterDuke joined 21:02 joule left 21:22 Doc_Holliwood joined 21:24 HoboWithAShotgun left
tbrowder hi, question on private methods, can i have a public and a private method with the same name, but distinguished by the ! 21:29
lucasb m: say class { method foo { 2 * self!foo }; method !foo { 21 } }.foo 21:33
camelia 42
tbrowder lucasb: thnx! i forget about using the repl here 21:35
lucasb m: class { method bar { "[$.foo]" }; method foo { 'x' } }.bar.say 21:38
camelia [x]
21:38 patrickb left
lucasb m: class { method bar { "[$!foo]" }; method !foo { 'x' } }.bar.say 21:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Attribute $!foo not declared in class <anon|1>
at <tmp>:1
------> 3bar { "[$!foo]" }; method !foo { 'x' } }7⏏5.bar.say
expecting any of:
horizontal whitespace
postfix…
lucasb awww :(
it would be orthogonal if $!foo worked for private methods, like $.foo works for public ones :) 21:39
tbrowder .seen thundergnat 21:47
tellable6 tbrowder, I saw thundergnat 2019-11-12T14:59:46Z in #raku: <thundergnat23> Mspo: think of it as a temporary constant.
TreyHarris lucasb: So Liskov substitutability isn't possible here? :-( 21:58
thundergnat Somebody rang?
tellable6 2019-11-12T15:00:28Z #raku <mspo> thundergnat23: can you skip assigning a name at all in that case?
thundergnat tbrowder: What's up? 21:59
tbrowder i have an avl implementation for throwing darts at
TreyHarris simulated dart-throwing? Neat! 22:00
thundergnat Cool. Want observations?
tbrowder yes, i’ll put it in a gist shortly... 22:01
see gist gist.github.com/tbrowder/c18009374...599588eec9 22:07
i still need a delete method, and i would like to wrap more stuff inside the tree so one doesn't have to have the node outside the tree object. 22:09
line 62 is missing a semi on the end 22:13
thundergnat Extra closing parenthesis and missing semi 22:14
Looks ok to me so far. At least, I see nothing that makes me say hmmm. 22:17
tbrowder ok, removing parens from max calls 22:19
and other places 22:21
22:24 Kaiepi left, Kaeipi joined
tbrowder delete is not so easy, going to take some more work. 22:47
22:48 chloekek left
tbrowder but the rest looks pretty clean—new gist coming... 22:49
new gist: gist.github.com/tbrowder/b7ac40576...1566968abe 22:53
disregard comment on delete method--that source was not so good 22:54
Geth doc: b4d4d89c4b | (Stoned Elipot)++ | doc/Language/operators.pod6
Remove leftovers from formatting code removal
23:51 lucasb left