🦋 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.
00:08 Doc_Holliwood left 00:15 softmoth left, softmoth joined
Xliff softmoth: You can't instantiate a Callable via something like Callable.new. You have to create a sub/method/block and use that. 00:19
softmoth Thanks, Xliff. I don't see an obvious instance of that, but I'll hunt around for it. 00:22
Does something in this line try to instantiate a Callable that I'm missing? sub get-data is defined at the top of the test file. my $out = $stache.render($tmpl, { a => get-data($repeats).hyper(:degree($threads)) }); 00:24
I'll play around w/ it. 00:26
Xliff softmoth: What is trying to be executed, here? 00:29
Generally, .hyper is followed by a .map
It doesn't look like there is a callable to be parallelized.
Hence the message.
m: ^7.hyper 00:30
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3^77⏏5.hyper
WARNINGS for <tmp>:
Useless use of "^" in expression "^7.hyper" in sink context (line 1)
No such meth…
Xliff m: (^7).hyper
camelia ( no output )
Xliff m: (^7).hyper(threads => 4) 00:31
camelia ( no output )
Xliff m: (^7).hyper(threads => 4).map( *.log.say )
camelia -Inf
0
0.6931471805599453
1.0986122886681098
1.3862943611198906
1.6094379124341003
1.791759469228055
Xliff OK. Off to vex some sprites! Take care, everyone! 00:32
00:32 Xliff left
softmoth Xliff: thanks, 00:32
tellable6 softmoth, I'll pass your message to Xliff
moon-child m: ^7 .hyper
camelia ( no output )
raydiak m: role A { multi method a ([]) { 0 }; multi method a (@) { 1 } }; say A.a([1]); 00:42
camelia Cannot resolve caller a(A:U: Array:D); none of these signatures match:
(A: @ (), *%_)
in block <unit> at <tmp> line 1
raydiak summerisle: ^^ your bug seems to require a combination of multimethods, autopunning roles, and @ in the signature. change any of that, and the bug scurries off into hiding in my testing so far 00:45
00:47 oneeggea_ joined
summerisle interesting 00:48
autopunning had come to mind as being related but i dismissed it as I don't know terribly much about autopunning semantics 00:49
raydiak m: class A { multi method a ([]) { 0 }; multi method a (@) { 1 } }; say A.a([1]);
camelia 1
raydiak works if you change role to class
m: role A { multi method a () { 0 }; multi method a ($) { 1 } }; say A.a(1); 00:50
camelia 1
raydiak works if you don't use @ in the sig
even as a role
00:50 oneeggeach left
summerisle i'll have to play with that after i finish the rest of this - that's really odd nonetheless 00:51
raydiak something about listy parameters specifically breaks mmd when the role is punned to a class. that's as much as I can figure without digging into internals I honestly don't know much about 00:52
do you want to report it? if not I'll make a proper report later tonight, have to step away for now 00:53
bisectable6: role A { multi method a ([]) { 0 }; multi method a (@) { 1 } }; say A.a([1]); 00:57
bisectable6 raydiak, Will bisect the whole range automagically because no endpoints were provided, hang tight
raydiak, Output on all releases: gist.github.com/5f223e470569db82f6...87229cb83f 00:58
raydiak, More than 4 changes to bisect, please try a narrower range like old=2018.11 new=HEAD
00:58 pecastro left 01:03 londoed left, londoed joined
summerisle well there certainly are a few changes there github.com/rakudo/rakudo/compare/2......2016.03 01:10
i may report it - if i don't i'll let you know and you can do it 01:11
it looks like lizmat might have made some changes that touched parameters, just from skimming messages - don't know if they would have any insight 01:14
raydiak yeah I was just looking at those, lots of parameter work especially optimizations
01:18 Benett left, Benett joined 01:19 xelxebar_ joined
summerisle I think I'll elect to finish with what I'm doing - you're welcome to file. 01:19
01:19 xelxebar left
raydiak will do. going to check it out closer and report it later 01:39
m: role A { multi method a (%:()) { 0 }; multi method a (%) { 1 } }; say A.a({a=>1});
camelia Cannot resolve caller a(A:U: Hash:D); none of these signatures match:
(A: % (), *%_)
in block <unit> at <tmp> line 1
raydiak also same for hashes
Associatives, I should say
01:55 oneeggea_ left 01:59 mahafyi joined 02:11 kvw_5 joined 02:14 kvw_5_ left 03:06 muffindrake left, Manifest0 left, Manifest0 joined 03:08 muffindrake joined
summerisle another question that's not well-answered by docs.raku.org - what does one go about to set the topic variable within a closure that has been passed, e.g. to imitate map() 03:10
nvm 03:12
it's implicit
03:20 neshpion left 03:26 ex_nihilo joined 04:00 asymptotically left, asymptotically joined 05:00 quotable6 left, notable6 left, evalable6 left, bisectable6 left, linkable6 left, squashable6 left, greppable6 left, bloatable6 left, statisfiable6 left, tellable6 left, sourceable6 left, nativecallable6 left, coverable6 left, shareable6 left, releasable6 left, unicodable6 left, committable6 left, benchable6 left 05:01 linkable6 joined, coverable6 joined, quotable6 joined, squashable6 joined 05:02 evalable6 joined, unicodable6 joined, nativecallable6 joined, bisectable6 joined, tellable6 joined 05:03 benchable6 joined, releasable6 joined, shareable6 joined, greppable6 joined, bloatable6 joined, committable6 joined, sourceable6 joined 05:04 notable6 joined, statisfiable6 joined
summerisle raydiak: found more strange multiple dispatch behavior 05:08
gist.github.com/6afaea7a299c016811...ab4d6f78ec
this reminds me - has anyone asked about adding symbols (short strings that are globally unique) to raku? 05:10
05:48 parabolize left 05:52 xinming left 05:53 xinming joined 06:12 mahafyi left 06:21 guifa2 left 06:23 guifa2 joined 06:25 softmoth left
guifa2 summerisle: you mean like WHICH and/or WHERE values? 06:32
06:39 guifa2 left 06:41 frost-lab joined 06:51 rindolf joined 06:57 wamba joined 07:57 sena_kun left 08:15 Black_Ribbon joined 08:28 vike left 08:38 Doc_Holliwood joined 08:43 sena_kun joined 08:50 vike joined 08:58 Fritz joined
Fritz Hi, I am using DB::Pg on MacOS 11.2.3 (Big Sur). zef install DB::Pg was working fine up to rakudo-2020.12. Both with rakudo-2021.02.1 and rakudo-2021.03 I get the following error:  zef install DB::Pg 09:07
===> Searching for: DB::Pg
===> Searching for missing dependencies: pq:ver<5>:from<native>
No such method 'as' for invocant of type 'Any'
I had the same problem when trying on a Parallels based VM with Ubuntu 20.04 and on an OmniOS based lx zone with Ubuntu 20.04.
When going back to rakudo-2020.12 everything works just fine.
Anybody have an idea how I can debug or fix that?
09:14 aborazmeh joined 09:18 xinming left 09:20 xinming joined 09:23 Sgeo left 09:24 camelCaser joined 09:26 camelCaser left, bdju left
sena_kun Fritz, trying to confirm. 09:26
09:27 domidumont joined, bdju joined 09:30 camelCaser joined 09:31 aborazmeh left
sena_kun Fritz, hmm, I cannot confirm on a gnu/linux box. 09:31
09:31 guifa2 joined 09:32 guifa2 left
sena_kun Fritz, do you have postgres devel package (with shared libs)? 09:32
09:59 pecastro joined 10:01 Black_Ribbon left
rindolf hi all! i am yak shaving 10:04
tyil hi yak shaving, I'm tyil
rindolf www.shlomifish.org/Files/files/text/rakudo.txt - what to do? 10:18
10:21 camelCaser left
rindolf found it! stale ~/.raku cache 10:32
10:34 aborazmeh joined
rindolf tyil: hi 10:36
10:47 guifa2 joined 10:48 guifa2 left
Fritz sena_kun I'll try again on Ubuntu. 10:49
sena_kun Thanks for checking. 10:50
rindolf is now playing: 11Voice Male - Hail Holy Queen (uit Sister Act)-M3z6XCug_W8.mp4 [0800:43/0703:51] 10:53
10:55 wamba left 11:01 aindilis` joined 11:04 aborazmeh left, aindilis left 11:05 frost-lab left 11:19 domidumont left 11:30 aindilis` left, aindilis` joined 11:33 aborazmeh joined
Fritz Seems there was an old version of NativeLibs installed on the Parallels-based Ubuntu. After uninstalling DB::Pg and installing it again, everything worked with rakudo-2021.03. 11:38
11:38 wamba joined
Fritz No luck on MacOS though, still 11:39
zef install DB::Pg
===> Searching for: DB::Pg
===> Searching for missing dependencies: pq:ver<5>:from<native>
No such method 'as' for invocant of type 'Any'
I suspect there is something wrong with my libpq installation. How can I find out where zef is searching for it? 11:43
11:55 hvxgr_ left, hvxgr_ joined, hvxgr_ left 11:57 hvxgr joined, jmiven left 11:58 Fritz left 12:43 tadzik joined
tbrowder hi, folks 12:50
looking for best solution for finding number of fractional digits in a number (string or number) 12:56
i can get the fractional part, use comb to count the digits, subtract 2 for the leading zero and decimal point. any shorter way? 12:58
codesections wait, a class can implement a role with stubbed methods without matching the method's signature? 13:12
m: role R { method foo(Int --> Int) {...}}; class C does R { method foo(Str $s--> Str) { "I didn't $s"}}; say C.foo('realize that') 13:14
camelia I didn't realize that
codesections tbrowder: As a micro optimization, you can replace .comb.Int - 2 with .chars - 2 13:19
m: role R { method multi foo(Int --> Int) {...}}; class C does R { multi method foo(Str $s--> Str) { "$s"}}; say C.foo('Oh') 13:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3role R { method multi7⏏5 foo(Int --> Int) {...}}; class C does R
codesections m: role R { multi method foo(Int --> Int) {...}}; class C does R { multi method foo(Str $s--> Str) { "$s"}}; say C.foo('Oh')
camelia 5===SORRY!5=== Error while compiling <tmp>
Multi method 'foo' with signature :(C: Int $, *%_ --> Int) must be implemented by C because it is required by a role
at <tmp>:1
13:23 domidumont joined
codesections I see. I guess I'd only looked at stubs in the context of multi methods. (Really, I tend to default to multi methods unless I have a good reason not to, for easier testing/other shenanigans) 13:24
13:27 xinming left 13:28 xinming joined 13:29 xelxebar_ left, xelxebar joined
tbrowder codesections: yes, i just thought of that in the shower i just got out of, thanks! 13:35
m: my $x = 2.4999; my $nplaces = (($x - $x.truncate).abs).chars-2; say $nplaces; 13:37
camelia 4
codesections m: my $x = 2.4999; my $nplaces = with ($x - $x.truncate) {.chars - .index('.') }; say $nplaces; 13:41
camelia 5===SORRY!5===
Word 'with' interpreted as a listop; please use 'do with' to introduce the statement control word
at <tmp>:1
------> 3my $x = 2.4999; my $nplaces = with7⏏5 ($x - $x.truncate) {.chars - .index('.'
Unexpected block in in…
codesections m: my $x = 2.4999; my $nplaces = do with ($x - $x.truncate) {.chars - .index('.') }; say $nplaces;
camelia 5
codesections m: my $x = 2.4999; my $nplaces = do with ($x - $x.truncate) {.chars - .index('.') - 1}; say $nplaces;
camelia 4
codesections probably worse, depending on what your optimizing for. But it's another approach, anyway, and avoids the need to call .abs given that you're stringifying anyway 13:43
(or .chars - 2 - .starts-with('-'), for that matter) 13:51
14:00 phogg left, domidumont left 14:07 ens_ is now known as ens 14:17 xelxebar left
tbrowder ok, given that $x may be a number OR a numstr, should i have two sigs (multisub)? i'm going to add it to my Math::FractionalPart module. 14:28
another question, what is best name for that func? how about: 14:29
decimals, ndecimals, decimalplaces, places, ... 14:30
thoughts anyone?
got to go to grandson's lacrosse game, back later... 14:31
14:33 tadzik left 14:35 xelxebar joined 14:39 Froogal joined
codesections .tell tbrowder hope you enjoyed the lacrosse game. It seems like the most accurate description for what that returns is "the number of digits in the fractional part". So how about frac-part-digits or something along those lines? 14:40
tellable6 codesections, I'll pass your message to tbrowder
Froogal Hi!  So I'm trying to install Cro using the instructions on their website but I'm not having any luck, I keep getting "/usr/bin/ld: cannot find -ltommath /usr/bin/ld: cannot find -latomic_ops" I don't get much when I type ltommath in the search either.  Are they missing C libraries? 14:41
codesections that's sure what that sounds like to me. I haven't run into that, though 14:45
maybe this one, for the first? github.com/libtom/libtommath 14:47
(But I don't know why that's not specified as a native dependency, if that's the case. I guess that's a bug?) 14:48
ugexe that sounds like a raku error 14:49
codesections 31: @bpm(CCINC)@@nfpq(@bpm(INCPATH)@/libtommath)@ \ 14:50
^^^^ ln 31 of rakudo/tools/templater/moar/Makefile.in
ugexe right, both libtomath and libatomic are used by moarvm 14:51
codesections so, yeah, ugexe seems to be right, looks like a moar issue
Froogal I should go research MoarVM?  Or submit a bug report?
ugexe the question is why then does this happen when installing cro... which seems like maybe an old verion of zef, or an old version of raku is trying to launch zef? 14:52
does installing any other module work?
(where an old version of zef might have launching itself with the old version of raku)
Froogal Hmmm output of 'raku -v' => '/usr/bin/ld: cannot find -ltommath
[LibraryMake] /usr/bin/ld: cannot find -latomic_ops'
I can install other modules, I have in the past anyway. 14:53
ugexe how did you install raku?
Froogal I used apt 14:54
To install Rakudo
ugexe what does `raku -e 'say $*RAKU.compiler'` say?
Froogal `rakudo (2020.06)` (Also I didn't know there was code highlighting on here thanks for that :) 14:56
14:56 asy joined
ugexe hmmm, i wonder if something is wrong with that apt package then. that version isn't relatively that old 14:56
14:57 asymptotically left
Froogal Re-install? 14:57
ugexe well im guessing its not declaring libtomath as a dependency or some such, so it would still happen 14:58
github.com/nxadm/rakudo-pkg -- this is known to work afaik though, and it has debian/ubuntu instructions (although might have to add the source to your sources.list or whatever)
i personally use rakubrew.org/ but that might be a bit much for anyone who doesn't regularly use multiple versions of raku 14:59
15:03 helloworld joined
Froogal ugexe Thank you!  I will look into both of these :) 15:05
15:08 aindilis` left 15:11 Froogal left 15:12 tadzik joined 15:14 domidumont joined 15:33 softmoth joined 15:35 xinming left, xinming joined 15:38 ex_nihilo left 15:42 parabolize joined 15:46 HarmtH_ left 15:47 HarmtH joined 15:49 HarmtH left, HarmtH joined 15:50 HarmtH left 15:51 wamba left, HarmtH joined 15:53 HarmtH left, HarmtH_ joined 16:01 aborazmeh left 16:19 wamba joined 16:20 Fritz joined 16:30 ens left 16:48 benkolera left 16:56 wamba left 16:58 helloworld left 17:04 guifa2 joined
guifa2 ugexe: is there a part of zef's install process where it opens up files all at once and then later closes them all? I tried hunting in the code but I couldn't find anything like that. With one of my modules, I can hit an open file limit when installing. 17:10
17:10 sena_kun left 17:12 sena_kun joined 17:16 ctilmes joined
ctilmes alpine edge rakudo upgraded to 2021.03 17:17
17:17 Fritz left
tbrowder .tell codesections lacrosse games exciting...thnx for name suggestion, i may add several aliases for the routine. 17:17
tellable6 tbrowder, I'll pass your message to codesections
El_Che releasable6: status
releasable6 El_Che, Next release in ≈27 days and ≈1 hour. 1 blocker. Changelog for this release was not started yet
El_Che, Details: gist.github.com/0e134068b5c25e76dd...c04ff5b8c3
17:18 ctilmes left
guifa2 tbrowder: for counting the fractional digits, stringifying is your best bet, I used that for a long time in Intl::Format::Number and Intl::Number::Plural. Probably the most technically correct way is to, once you've got integral-value = 0, multiple by 10 and check if there's a fractional-value = 0. The number of times you do that tells you the number of gitis you have. 17:20
17:20 justsomeguy joined
guifa2 Of course, you also need to put in a stop gap measure for irrational and repeating numbers 17:20
tbrowder ok, i’ll ask for a check before i publish the updated module 17:21
tellable6 hey tbrowder, you have a message: gist.github.com/a2264a3233ab7143aa...22928f92db
17:21 epony left 17:22 aborazmeh joined
guifa2 (it's kind of shame you can't calculate fractional digits with a single math routine like you can integral digits, but c'est la vie) 17:23
17:23 PimDaniel joined
PimDaniel o/ 17:23
tellable6 hey PimDaniel, you have a message: gist.github.com/7362d41f53e196e941...9106175f3d
El_Che ctilmes: \o/
tellable6 El_Che, I'll pass your message to ctilmes
PimDaniel Hi all 17:25
May we change temporary and locally array subscript so that it begins to 1 instead of 0?
Well the question is more : is there a simple solution to do it? 17:27
guifa2 tbrowder: you might be interested in the code here github.com/alabamenhu/IntlFormatNu...r.pm6#L153 But it's probably very much overkill for you vs $foo.chars - 2 ^_^
PimDaniel or $foo.end - 1 i suppose. 17:28
ugexe guifa2: precompilation (although that happens in rakudo), which would happen during testing or during the actual install in zef 17:30
PimDaniel If the solution is too complex, definitly, NO! but thank's anyway! 17:31
guifa2 ugexe: using -Ilib does precompile as well, though, right?
PimDaniel 17:32
m: role OneBased { method AT-POS(\x) { nextwith x - 1 }; method ASSIGN-POS(\x, \y) { nextwith x - 1, y }; method BIND-POS(\x, \y) { nextwith x - 1, y }}; my @foo does OneBased; @arr[1] = 'a'; say @arr
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@arr' is not declared
at <tmp>:1
------> 3ith x - 1, y }}; my @foo does OneBased; 7⏏5@arr[1] = 'a'; say @arr
guifa2 err
m: role OneBased { method AT-POS(\x) { nextwith x - 1 }; method ASSIGN-POS(\x, \y) { nextwith x - 1, y }; method BIND-POS(\x, \y) { nextwith x - 1, y }}; my @foo does OneBased; @foo[1] = 'a'; say @foo
camelia [a]
ugexe -Ilib doesn't precompile anything until you actually use something that needs to be precompiled. if some test doesn't happen to load every single module then it wouldnt be precompiled
PimDaniel thank's guifa2 17:34
summerisle guifa2: regarding symbols, both - same instance and identity 17:35
17:37 wamba joined, aborazmeh left, Sgeo joined
guifa2 ugexe: noted. I *think* in my case every module should be loaded (it's a hierarchical dependency structure, so the main module ultimately depends on all of them), but I'll see if I can narrow down the cause further. I had been thinking the issue is likely with /resources since I have 113 modules files (a lot but Cro and Red push similar numbers and don't have the same issue), but I have ~1k resource files which is *definitely* a lot 17:39
PimDaniel guifa2 i need to seek storage mode for the 2 dimentions.
17:55 epony joined
summerisle m: class Foo { multi method bar(:$a) { 'a' }; multi method bar(:$b) }; say Foo.bar(:$b); 18:06
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3bar(:$a) { 'a' }; multi method bar(:$b) 7⏏5}; say Foo.bar(:$b);
»
summerisle m: class Foo { multi method bar(:$a) { 'a' }; multi method bar(:$b) { 'b' } }; say Foo.bar(:$b);
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3method bar(:$b) { 'b' } }; say Foo.bar(:7⏏5$b);
»
summerisle m: class Foo { multi method bar(:$a) { 'a' }; multi method bar(:$b) { 'b' } }; say Foo.bar(:b);
camelia a
summerisle bisectable6: class Foo { multi method bar(:$a) { 'a' }; multi method bar(:$b) { 'b' } }; say Foo.bar(:b);
bisectable6 summerisle, Will bisect the whole range automagically because no endpoints were provided, hang tight
summerisle, ¦6c (52 commits): «a␤»
summerisle, Nothing to bisect!
summerisle m: multi bar(:$a) { 'a' }; multi bar(:$b) { 'b' }; say bar(:b); 18:08
camelia b
guifa2 summerisle: you need to use :$b! 18:09
m: class Foo { multi method bar(:$a) { 'a' }; multi method bar(:$b!) { 'b' } }; say Foo.bar(:b); 18:10
camelia a
guifa2 err
okay that does feel off now lol
m: class Foo { multi method bar(:$a!) { 'a' }; multi method bar(:$b!) { 'b' } }; say Foo.bar(:b);
camelia b
tbrowder guifa2: thanks! 18:11
summerisle is there documentation on the ! operator guifa2 18:27
guifa2 summerisle: means "is mandatory" — docs.raku.org/type/Signature#Optio..._arguments 18:29
it's the opposite of ? (is optional) for signatures
18:33 aindilis joined 18:34 domidumont left 18:44 UukGoblin left, UukGoblin joined
softmoth Xliff: I found the problem w/ Template::Mustache & hyper: it was this debugging line: self.log: :level<Trace>, "#** Resolve of $obj.WHAT.raku() as '$obj'"; I'm still golfing it down smaller to understand it better, but commenting that line out removes the crash. 18:49
tellable6 softmoth, I'll pass your message to Xliff
El_Che weekly: rakudo-pkg 2021.03 released 18:51
notable6 El_Che, Noted! (weekly)
summerisle guifa2: out of curiosity, why is the behaviour such for methods but not subs 18:54
softmoth child class may use options that parent class doesn't know about 18:55
18:55 mowcat joined
softmoth IMO this is one of the big gotchas I ran into w/ perl 6^W^WRaku when learning, especially when trying to pass a pair and it just gets swallowed as an unrecognized named param unless you use explicit quoting on the pair's key 18:56
guifa2 softmoth: parentheses actually will keep it positional too 19:00
m: sub foo($a) { say $a }; foo :a2)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3sub foo($a) { say $a }; foo :a27⏏5)
guifa2 err
m: sub foo($a) { say $a }; foo (:a2)
camelia a2 => True
codesections softmoth: I haven't looked into that enough to be sure, but I *think* I call that a bug 19:01
tellable6 2021-03-21T17:17:42Z #raku <tbrowder> codesections lacrosse games exciting...thnx for name suggestion, i may add several aliases for the routine.
codesections m: 1 === 9 :a
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<===>
at <tmp>:1
------> 031 === 9 :a7⏏5<EOL>
expecting any of:
pair value
summerisle m: sub foo(:$a) { say 'a' } ; sub foo(:$b) { say 'b' } ; foo(:b); foo(:a);
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of routine 'foo'. Did you mean to declare a multi-sub?
at <tmp>:1
------> 3) { say 'a' } ; sub foo(:$b) { say 'b' }7⏏5 ; foo(:b); foo(:a);
expecting any of:
hori…
summerisle m: multi foo(:$a) { say 'a' } ; multi foo(:$b) { say 'b' } ; foo(:b); foo(:a); 19:02
camelia b
a
guifa2 the docs do mention the named parameter method/sub distinction 19:03
"Unlike sub, if you use named parameters with multi methods, the parameters must be required parameters to behave as expected."
docs.raku.org/language/functions#Multi-dispatch (but perhaps taht should be made a bit clearer) 19:04
codesections m: class C { method m(List $l (Pair $p)) { say $l }}; C.m: (1) => 2 19:05
camelia Type check failed in binding to parameter '$l'; expected List but got Pair (1 => 2)
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
19:05 justsomeguy left
codesections m: class C { method m(List $l (Pair $p)) { say $l }}; C.m: (<a> => 2, <b> => 5) 19:06
camelia Too few positionals passed to 'm'; expected 1 argument but got 0 in sub-signature of parameter $l
in method m at <tmp> line 1
in block <unit> at <tmp> line 1
codesections guifa2: ^^^^ call *that* method, I dare ya :)
PimDaniel guifa2 After reading the code and learning the reference i don't really understand the precise meaning of AT-POS/ASSIGN-POS/BIND-POS methods precisely. To make a 2D array with this role i think this should be done by a kindof recursing trick to apply the role. But i'm really stucked at this point because theses concepts are for me too obscur. Help me when you can if you're too busy at the 19:11
PimDaniel moment. Thanks in advance. Jean-Yves.
*at the moment. Thank's in advance! 19:12
clear
19:12 PimDaniel left 19:29 aindilis` joined 19:30 aindilis left
softmoth codesections, I think it's well by design. Just LTA, but the other alternatives are worse. 19:32
codesections softmoth: you may well be right about that. Looking into it is on my to-do list (to see if it's worth opening an issue for/trying to get a warning or error) 19:33
softmoth Unless I'm misunderstanding what you're referring to. I mean that this is intentional: x.m(foo => 1) # named param, not pair
19:33 aindilis` left
codesections yeah, no, _that_'s definitely intentional 19:34
softmoth roger 19:35
codesections m: sub f(|c) { say |c }; f(key => :first<v>:second<v>) 19:40
camelia Unexpected named argument 'key' passed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
codesections m: sub f(*%n) { say *n }; f(key => :first<v>:second<v>)
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3sub f(*%n) { say *7⏏5n }; f(key => :first<v>:second<v>)
expecting any of:
infix
infix stopper
postfix
state…
codesections m: sub f(*%n) { say %n }; f(key => :first<v>:second<v>) 19:41
camelia {key => first => v}
codesections softmoth: I meant more like ^^^^^ where &infix:«=>» "eats" a pair 19:42
SmokeMachine m: say Array[Int].new: <a> # is this a LTA error message? 19:44
camelia Type check failed in assignment to ; expected Int but got Str ("a")
in block <unit> at <tmp> line 1
vrurg m: sub foo(Pair:D $p) { note $p }; foo("a" => 13) 19:45
camelia a => 13
vrurg Sorry, I didn't follow the discussion, but isn't it what you guys are looking for? 19:46
codesections m: sub foo(Pair:D $p) { note $p }; foo("a" => :first<val>:second<val>)
camelia a => first => val
codesections no, ^^^ is what I'm talking about. Which is easy to solve -- just add ()s around the list 19:47
but seems like a bug - :second<val> is being absorbed by &infix:«=>» without an error, which isn't the case for many other operators 19:48
m: say 1 === 1 :second<val> 19:49
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &infix:<===>
at <tmp>:1
------> 3say 1 === 1 :second<val>7⏏5<EOL>
codesections but I plan to look into it more before deciding it's a bug
vrurg codesections: I'm never got too close to postfix adverbs, but I suspect :second gets passed as a named argument to the infix op sub.
codesections oh, yeah, it definitly does 19:50
vrurg So, it's not a bug then.
codesections well, what I'm saying is that it might be a bug that the infix op *accepts* :second. As I showed with &infix:<===>, many infix ops that know they can't do anything with a named arguement will throw a "you can't adverb me" error 19:52
I *think* &infix:«=>» is missing that error and should have it, but I need to dig a bit more to see if there's some reason it was left off on purpose 19:53
vrurg codesections: agree. There is still some mystery to me as to when rakudo complains about unexpected named arguments and when it does not. 19:54
20:18 berber44 joined 20:29 aborazmeh joined 20:47 tealecloud joined 20:49 HarmtH_ left 20:50 HarmtH joined 20:53 maggotbrain left
SmokeMachine vrurg: I think I’ve fixed the schema creation without constraints 21:12
vrurg SmokeMachine: thanks! I saw github push notification. But not sure if will have time to test it until the mid-end of the coming week. 21:13
SmokeMachine no
*np 21:14
21:21 wingfold joined 21:32 HarmtH_ joined, HarmtH left, rindolf left 21:55 aborazmeh left 22:04 tealecloud left 22:05 tealecloud joined, tealecloud left 22:07 Black_Ribbon joined
guifa2 Sweet 22:54
LanguageTag has now been reworked and is fully set up as a value type
lizmat gjui++ 22:56
guifa2++ rather :-)
guifa2 Still trynig to work out the kinks on having multiple LanguageType classes and how they need to best play together, but I might be overengineering there 22:57
guifa2 is NEVER guilty of overengineering /s 22:58
codesections :D 22:59
guifa2++
guifa2 not sure if I'll get the release out in time for the weekly though 23:00
guifa2 curses $day-job
lizmat guifa2: there'll be another weekly!
guifa2 lizmat: yeah but since I did a formal release of LanguageTaggish and LanguageTag::Simple last week, I wanted to get the redone "normal" one ready for the same weekly ;-) 23:01
lizmat an admirable goal :-) 23:02
codesections there's something to be said for releasing a version on Tuesday or Wednesday, though. That way, some people who are free this week will have a chance to check it out now, and others who miss it now may catch it when it's in the next weekly 23:05
(or at least that's what I tell myself every time _I_ miss a weekly!)
23:07 linkable6 left, evalable6 left, evalable6 joined 23:10 linkable6 joined
guifa2 codesections: ha, true. Also I just saw your reddit post and feel like I'm about to repeat myself ha 23:18
23:19 HarmtH_ left, HarmtH joined
codesections yeah, same. "Weekly" is probably a little too often for most of us to have made a _ton_ of progress on anything 23:19
(well, except lizmat, apparently ) 23:20
but, still, even if it's mostly just posts along the lines of "I'm still working on the same stuff, making progress, but not as much as I'd wanted to" 23:21
that still seems like it'd be nice/good for the community 23:22
guifa2 codesections: indeed. I just hate that even as I'm releasing stuff, progress doesn't mean much until all of it's pieced together.
codesections it's good for people to see that they're not alone.
yeah, I know that feeling
23:23 Doc_Holliwould joined, Doc_Holliwood left
guifa2 I actually was almost tempted to make a language tag that used binary subtags for speed in comparison. I realized that with 37 possible values (a..z0..9Ø) x 8 characters per subtag, I could store it all in an int64 with room to spare, but I'm basically 1100% sure that's a premature optimization ;-) 23:26
s/binary/integal
23:26 wingfold left
codesections ha. That is a _high_ degree of certainty 23:27
23:28 HarmtH left 23:29 HarmtH joined 23:34 softmoth left, softmoth joined 23:40 vrurg left 23:42 wingfold joined, torbjorn joined 23:52 finsternis joined 23:53 vrurg joined, Doc_Holliwould left
torbjorn I have a grammar that parses ~30kb of text (the output of pactl list). Lately it started failing to parse. How should I go about figuring out why it fails? 23:58
guifa2 torbjorn: have you tried using grammar debug? 23:59
torbjorn The ::Tracer lists the last matching text.. it seems, reasonably truncated, but doesnt say why it fails