»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Xliff jnthn: Ah. Thanks for the update, and have a great time at PerlCon! 00:00
00:04 nepugia left 00:08 wildtrees left 00:10 MilkmanDan left 00:11 MilkmanDan joined
SmokeMachine m: my $a = "bla".IO.open(:w); $a.close; $a.say: "bla" 00:14
camelia Failed to open file /home/camelia/bla: Permission denied
in block <unit> at <tmp> line 1
SmokeMachine m: my $a = "/tmp/bla".IO.open(:w); $a.close; $a.say: "bla"
camelia Cannot do 'say' on a handle in binary mode
in block <unit> at <tmp> line 1
SmokeMachine LTA error message?
00:14 melezhik34 joined 00:15 melezhik34 is now known as melezhik2 00:22 pamplemousse left 00:36 melezhik2 left
Voldenet github.com/rakudo/rakudo/blob/a904...e.pm6#L674 00:43
i believe you just need to check for $!PIO being nqp::null to provide valid close message
Xliff Where are X::IO exceptions defined, you'd need to create X::IO::ClosedHandle, right? 00:48
Voldenet Probably, but even `$!PIO or die "Handle is closed";` would be better, wouldn't it? 00:50
oh, right, you can't catch the type then
it's a lot of work then, I'd fix that if it was just one line ┐(´~`;)┌ 00:51
`my class X::IO::ClosedHandle does X::IO { has $.trying; method message { "Cannot do '$.trying' on a closed handle" } }` 00:52
if someone is able to edit more than one files at the same time without feeling tired, it's fixable, however there's tons of methods that try acting on closed handle 00:53
Xliff I know.
Voldenet it's also interesting how methods check for $!decoder being defined, but use $!encoder afterwards 00:54
github.com/rakudo/rakudo/blob/mast...e.pm6#L655 00:55
Doesn't seem planned
Xliff Funny... flush checks $!PIO 00:56
Voldenet And it even throws the literal message, not X::IO exception, ha :D
EOF also does nqp::isnull($!PIO) 00:58
00:59 ufobat_ joined
Xliff Voldnet/SmokeMachine: Should create an issue. 00:59
It's not a hard fix... just tedious. 01:00
Ah. Exceptions are defined in core/Exceptions.pm6 01:01
Would be a good place to put X::IO::ClosedHandle -- github.com/rakudo/rakudo/blob/a904...n.pm6#L650 01:02
01:02 ufobat left
Voldenet there are more fun bugs lying around that github.com/rakudo/rakudo/issues/2272 01:03
Xliff Oh yeah. 01:10
01:11 Xliff left 01:15 noisegul_ joined
Voldenet Btw, regarding atomicity, is reference assignment an atomic operation 01:19
01:19 noisegul left
Voldenet or should nqp::atomicstore be used (btw, I'd expect nqp::atomicstore to return the previous value, not the new value) 01:19
01:22 Sgeo__ joined, epony joined 01:25 Sgeo_ left
timotimo it has to be atomicstore 01:30
regular assignment is not atomic
Voldenet timotimo: thanks, that's what I've expected
timotimo in most circumstances you'd want a compare-and-swap rather than an assignment
but at least the atomic store makes sure other threads get th data i think? 01:31
discord6 <Tyler (Aearnus)> so, do I need to add a provides entry to META6 for every single module that I make (even private ones)? 01:40
timotimo anything you want to be able to "use" anywhere 01:41
discord6 <Tyler (Aearnus)> I don't need to use it anywhere
<Tyler (Aearnus)> just from within my main module
<Tyler (Aearnus)> but it seems like I can't use my private modules from my main module if I don't add it to meta6 01:42
timotimo that's somewhere 01:43
Voldenet timotimo: I've checked and nqp::cas also does full memory barrier - on windows it's _InterlockedCompareExchange64 and __sync_val_compare_and_swap on gcc
s/windows/msftc/
discord6 <Tyler (Aearnus)> ah... I see what you're saying ahah. so is there no way to use things on a relative path or something? 01:46
timotimo things may not come from "on disk" 01:48
discord6 <Tyler (Aearnus)> makes sense 01:49
<Tyler (Aearnus)> just a little bit awkward to have to make a nonlocal change like that every time I want a new module 01:56
02:02 Sgeo_ joined 02:05 Sgeo__ left
timotimo comma does it for you :) 02:19
discord6 <Tyler (Aearnus)> ooh 02:20
<Tyler (Aearnus)> hmm, is there a way to do a qualified import? like, I have gist.github.com/Aearnus/fedc345571...11ad7f3ea1 and I want to call it as TortoiseShell::begin(...) 02:27
<Tyler (Aearnus)> aha. it has to be our scoped. the docs are kinda meh on that 02:39
02:43 Cabanossi left 02:52 Cabanoss- joined 02:56 Xliff joined
Xliff \o 02:57
Is there an easy way to distinguish if a Num can fit in a num32 or a num64?
02:58 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 03:05 Maylay left 03:07 Maylay joined 03:16 Sgeo__ joined 03:19 Sgeo_ left
Voldenet Xliff: 'fit' isn't a good word 03:19
m: my num32 $n = Num(3.14159265359); say $n 03:20
camelia 3.1415927410125732
Voldenet it loses precision pretty fast
03:24 Sgeo_ joined
Voldenet m: sub fits-into-num32(Num $n, $precision = $*TOLERANCE) { my num32 $x = $n; abs($x - $n) < $precision }; my $n = Num(3.14159265359); for 1e-7, 1e-8 { say fits-into-num32($n, $_); } 03:26
camelia True
False
03:27 Sgeo__ left
Voldenet it's a naive implementation, maybe someone comes up with something better 03:30
03:32 Xliff left 03:50 Sgeo__ joined 03:51 Sgeo__ left 03:53 Sgeo joined, Sgeo_ left 04:04 holyghost left 04:55 pamplemousse joined 05:17 molaf joined 05:18 empT joined 05:34 redhands joined 05:43 pamplemousse left 05:53 pamplemousse_ joined 06:04 antoniogamiz joined 06:08 pamplemousse_ left
antoniogamiz time to install Comma :D 06:20
06:24 Summertime left
Voldenet if that's an app, it has unusually terrible name 06:24
how does one google it? :P
06:24 Summertime joined
antoniogamiz Voldenet: Comma perl6 editor 06:24
:D
=> commaide.com/ 06:25
Voldenet It seems a lot better than atom 06:26
antoniogamiz I'm changing from vscode 06:28
jmerelo has recommended me a lot so I thought to give it a try
Voldenet I'll see it too, I hope it's not an elaborate trojan :P 06:29
antoniogamiz uoh it has a shortcut to jump to the declaration 06:30
I think I'm going to use that one a lot, I missed it in vscode
Voldenet vscode perl6 plugin doesn't have jump to declaration? :O 06:32
Geth doc: b596b5b0d9 | (Trey Harris)++ | doc/Language/nativecall.pod6
nativecall: Add language to address #2684

The syntax for NativeCall callable signature constraints under Rakudo deviates from the usual syntax. There is an issue at rakudo/rakudo#2878 addressing this, but until this is addressed, some minimal explanation for the strange syntax is needed.
06:33
synopsebot Link: doc.perl6.org/language/nativecall
synopsebot RAKUDO#2878 [open]: github.com/rakudo/rakudo/issues/2878 NativeCall callback signature constraint
doc: f8c1778717 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Merge pull request #2791 from perl6/nativecall-constraint-syntax

nativecall: Add language to address #2684
06:37 kylese joined 06:43 mahafyi joined 06:55 rindolf joined, mahafyi left, sjm_uk joined
Geth doc: 7a7f642162 | (Tim Smith)++ | doc/Type/Mu.pod6
Align Mu.so & Mu.not docs with design

The previous explanation of so() (double-negation) wasn't consistent with implementation or mentioned in design docs. It's a common JavaScript idiom but not relevant to Perl 6. This aligns with the docs for prefix:<so> and :<not>, too. Ref #2693.
06:56
synopsebot Link: doc.perl6.org/type/Mu
doc: 8e1693204a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
Applies some of the changes requested

So that the PR is acceptable.
doc: 07dffb4838 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
Merge pull request #2697 from softmoth/so-not

Align Mu.so & Mu.not docs with design
06:59 empT left 07:05 antoniogamiz left 07:06 mahafyi joined
Geth doc: d0d7cd5c4a | (JJ Merelo)++ | doc/Language/nativecall.pod6
After #2791 fix
07:10
synopsebot Link: doc.perl6.org/language/nativecall
07:33 [particle]1 left, [particle] joined
ufobat_ I am looking for a way to build a supply that produces all possible solutions for a NxN matrixes (or 2d arrays) just filled with 0 and 1, any ideas? 07:33
for N=2 it would be ((0 0) (0 1) (1 0) (1 1)), e.g
07:34 redhands left
ufobat_ ah last sentence is nonsense, it would start with (0 0)(0 0)(0 0)(0 0) till all elments set to 1 07:34
does the methods of List help somehow, i am looking for a smart thing with permuations, combinations or X or something 07:47
discord6 <Tyler (Aearnus)> hmm 07:48
07:54 Aearnus joined
Aearnus ufobat_: like this? 07:54
m: my $n = 2; gather { for (0..($n**2 - 1)) { my $l = $_.base(2).comb; take (|(0 xx $n - $l.elems) , |$l) } }
camelia ( no output )
Aearnus lmao oops
m: my $n = 2; gather { for (0..($n**2 - 1)) { my $l = $_.base(2).comb; take (|(0 xx $n - $l.elems) , |$l) } }.say 07:55
camelia ((0 0) (0 1) (1 0) (1 1))
Aearnus m: my $n = 3; gather { for (0..($n**2 - 1)) { my $l = $_.base(2).comb; take (|(0 xx $n - $l.elems) , |$l) } }.say
camelia ((0 0 0) (0 0 1) (0 1 0) (0 1 1) (1 0 0) (1 0 1) (1 1 0) (1 1 1) (1 0 0 0))
ufobat_ wow :)
Aearnus oops. looks like i messed up on the `for` argument. i'm rusty on combinations and things. might have to be up to n factorial. 07:56
ufobat_ it looks smart but it
is not what i wanted :)
Aearnus ah shucks!
ufobat_ i think for N=2 i need (0 0)(0 0) , next would be (0 0)(0 1) next (0 0)(1 0) 07:58
but i think i am confused due to the fact that i am having 2d arrays
Geth doc: JJ self-assigned Site formatting seems to have been disrupted github.com/perl6/doc/issues/2911
JJ assigned to noisegul Issue `p6doc IO::Path` on windows github.com/perl6/doc/issues/2534

Adds fallback site to docs, closes #2911 after updating
07:59
ufobat_ but a 2d array with N is a 1d List with the length of N**2, no? i just need to count from 0 to 2**N and make a 2d array of it 08:00
and then i can take your idea :-) 08:02
Aearnus ufobat_: u can do that really easily with cross product 08:04
m: constant $n = 2; sub f() { gather { for (0..([*] 1..$n) + 1) { my $l = $_.base(2).comb; take (|(0 xx $n - $l.elems) , |$l) } } }; (f() X, f()).say 08:05
camelia (((0 0) (0 0)) ((0 0) (0 1)) ((0 0) (1 0)) ((0 0) (1 1)) ((0 1) (0 0)) ((0 1) (0 1)) ((0 1) (1 0)) ((0 1) (1 1)) ((1 0) (0 0)) ((1 0) (0 1)) ((1 0) (1 0)) ((1 0) (1 1)) ((1 1) (0 0)) ((1 1) (0 1)) ((1 1) (1 0)) ((1 1) (1 1)))
Aearnus :)
ufobat_ cool :-) 08:07
Aearnus and you can do cross product as many times as you need to make arbitrary height matricies as well using the reduction operator w/ the `xx` operator 08:08
m: constant $n = 3; sub f() { gather { for (0..([*] 1..$n) + 1) { my $l = $_.base(2).comb; take (|(0 xx $n - $l.elems) , |$l) } } }; ([X,] f() xx 3).say 08:09
camelia (((0 0 0) (0 0 0) (0 0 0)) ((0 0 0) (0 0 0) (0 0 1)) ((0 0 0) (0 0 0) (0 1 0)) ((0 0 0) (0 0 0) (0 1 1)) ((0 0 0) (0 0 0) (1 0 0)) ((0 0 0) (0 0 0) (1 0 1)) ((0 0 0) (0 0 0) (1 1 0)) ((0 0 0) (0 0 0) (1 1 1)) ((0 0 0) (0 0 1) (0 0 0)) ((0 0 0) (0 0 1)…
ufobat_ i dont get how/why the part behind the take works
Aearnus that's just list concatenation there
i take a list of 0's which is the right length (`0 xx $n - $l.elems`) and concatenate it on the front of the list `$l` 08:10
left padding
and the `|` is to convert the two lists into a docs.perl6.org/type/Slip so I can concatenate them without creating more depth in the list 08:11
(wish I knew why perl6 didn't have a list concat operator...) 08:12
ufobat_ ah 08:14
08:32 rfold joined 08:37 rfold left 08:38 rfold joined 08:47 molaf left 08:48 mahafyi left 08:49 sjm_uk left 08:54 domidumont joined 09:07 domidumont left 09:08 Black_Ribbon left 09:19 rfold is now known as chloekek, chloekek left 09:20 chloekek joined 09:27 Aearnus left
discord6 <Tyler (Aearnus)> how can I specify that a method method createWindow(int32, int32, str --> Window) can only be called on an uninitialized class? 09:37
<Tyler (Aearnus)> (as in: it's a constructor)
<Tyler (Aearnus)> figured it out, nvm 09:42
09:44 sena_kun joined 09:45 Xliff joined
Xliff \o 09:46
09:47 chloekek left 09:55 Voldenet left 09:58 kylese left 10:00 Voldenet joined, Voldenet left, Voldenet joined 10:18 aborazmeh joined, aborazmeh left, aborazmeh joined 10:58 aborazmeh left 11:18 jmerelo joined
jmerelo Rebuilding docs... perl6docs.github.io should be OK 11:19
yoleaux 20 Jul 2019 14:40Z <uzl> jmerelo: From the SO question about iteration, this is the example using the Iterator role (sprunge.us/Mz6GCl) but I'm still unable to iterate over the Scalar object. Am I doing something wrong? Thanks.
jmerelo .tell uzl I'll have to check it out. The whole terminology is kinda tricky, but it's OK once you get the grasp of it. 11:20
yoleaux jmerelo: I'll pass your message to uzl.
Xliff What "scalar object" is that/ 11:21
11:24 chloekek joined
Xliff Wonder if there is an online Jupyter notebook for Perl6... 11:24
11:25 kensanata joined
jmerelo Xliff: you mean a Jupyter notebook server?
11:27 jmerelo left, robertle joined
Xliff Yes 11:27
11:41 kensanata left 11:47 sjm_uk joined
Xliff .tell uzl You need a new iterator object. Everytime that method is called. You can't use self. 11:47
yoleaux Xliff: I'll pass your message to uzl.
11:47 MasterDuke joined
MasterDuke AlexDaniel: around? 11:49
11:51 Poohman joined 12:07 telex left 12:08 telex joined 12:09 Xliff left
Poohman hello all, 12:09
I had written a script some months ago where I had created an enum in a class and this class then had a data member of this enum 12:10
I could use Json::Class to directly push an object of this class to the to-json function 12:11
now I have the alarm "type check failed in binding to parameter "$value"; expected Any but got Mu 12:12
this script had worked perfectly some months ago 12:13
in the type graph the pnly thing which is not an Any but a Mu is a Junction 12:14
do enums come under Junctions 12:15
?
12:16 Xliff joined
Xliff .tell uzl Try this version: sprunge.us/qgIQde 12:16
yoleaux Xliff: I'll pass your message to uzl.
Xliff .tell uzl Also thanks for turning me on to sprunge... it's nifty! 12:17
yoleaux Xliff: I'll pass your message to uzl.
12:19 cygx joined
Kaiepi m: enum Foo ( ); say Foo ~~ Any 12:19
camelia True
Kaiepi m: enum Foo ( ); say Foo.WHAT ~~ Any 12:20
camelia True
cygx Poohman: some low-level objects are also considered Mu
yoleaux 18 Jul 2019 14:40Z <timotimo> cygx: it'd be nice if the github repo for the webring had a clickable link directly to the ring's home, either in a README.md or in the description "website" field
Kaiepi m: enum Foo ( ); sub foo($bar) { say $bar }; foo Foo 12:21
cygx If they make it from nqp to perl6 land, that's a bug
camelia (Foo)
Kaiepi oh right i'm forgetting Metamodel::EnumHOW defualts to Any for its refinee
Poohman hmm strange - let me then doublecheck by the stringifying it and passing it as a string - the rest of the members to the to-json are only date and Num - but let me doublecheck and make dure its the enum that is causing the problem 12:25
12:32 molaf joined 12:39 xinming joined, nepugia joined 12:41 xinming_ left 13:00 pamplemousse joined 13:13 grumble left 13:15 sjm_uk left 13:18 MasterDuke left 13:20 grumble joined 13:22 sjm_uk joined 13:38 nepugia left, Actualeyes left 13:40 nepugia joined 13:41 nepugia left 13:44 nepugia joined 13:45 reach_satori_ joined
Poohman Hello cygx and Kaiepi - I checked and it doesnt seem to be a problem with my class members 13:47
the problem seems to be in Json::Class or Json::Marshal modules
13:48 reach_satori left
Poohman the alarm that I had mentioned earlier comes when the attribute of the object is checked 13:48
can attributes have the type Mu? 13:49
13:50 breinbaas left
timotimo they can 13:50
Poohman The alarm occurs inn the subroutine _marshal in Json::Marshal 13:51
timotimo: ok
13:51 lucasb joined 13:52 domidumont joined 14:39 nepugia left
Poohman hello all, if I want to add a few print statements in the installed modules, how do I do it? Can I directly edit the long file names some in the errors? Or are they in some compiled form? 14:42
shown in the errors I meant .. 14:43
14:43 Cabanoss- left
sena_kun Poohman, no, you can't and should not. 14:47
jnthn Obtain the module's source, edit that, and then use -Ipath/to/source to make it use your edited version in preference to any installed one
sena_kun Poohman, to do what you want to do, you need to obtain module sources, e.g. just clone from github, and then do `-I/path/to/my/clone/dir/lib`, then those will be used.
Poohman ok thanks guys 14:49
14:52 nepugia joined 14:54 Cabanossi joined 15:00 sjm_uk left 15:05 zakharyas joined 15:35 pamplemousse left
noisegul_ How to write an aliased, optional command-line argument with a `where` constraint? Example: `Str :f($file) where $file.IO.e` works but is not optional yet. 15:46
15:46 noisegul_ is now known as noisegul, huf joined
Poohman :m 15:47
m: 15:49
evalable6
Poohman m: say "test, been a while"; 15:50
camelia test, been a while
Poohman m: a = Date.new(2019-07-21);say a; 15:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3a =7⏏5 Date.new(2019-07-21);say a;
Poohman m: a = Date.new(2019-07-21);
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3a =7⏏5 Date.new(2019-07-21);
Poohman m: Date.new(2019-07-21);
camelia Potential difficulties:
Leading 0 has no meaning. If you meant to create an octal number, use '0o' prefix; like, '0o7'. If you meant to create a string, please add quotation marks.
at <tmp>:1
------> 3Date.new(2019-077⏏5-21);…
Poohman m: Date.new("2019-07-21"); 15:52
camelia ( no output )
Poohman m: a = Date.new("2019-07-21");say a;
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3a =7⏏5 Date.new("2019-07-21");say a;
Poohman m: my $a = Date.new("2019-07-21");say a; 15:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
Poohman m: my $a = Date.new("2019-07-21");say $a;
camelia 2019-07-21
Poohman m: my $a = Date.new("2019-07-21");say $a; say $a.daycount; 15:54
camelia 2019-07-21
58685
15:54 huf left 15:56 huf joined
Poohman m: my $a = Date.new("2019-07-21");say $a; say $a.daycount;for $a.^attributes -> $attr { say $attr;my $value = $attr.get_value($a);say $value;} 16:05
camelia 2019-07-21
58685
Int $!year
2019
Int $!month
7
Int $!day
21
Int $!daycount
58685
Callable &!formatter
(Callable)
Poohman m: my $a = Date.new("2019-07-21");say $a; for $a.^attributes -> $attr { say $attr;my $value = $attr.get_value($a);say $value;}
camelia 2019-07-21
Int $!year
2019
Int $!month
7
Int $!day
21
Int $!daycount
(Int)
Callable &!formatter
(Callable)
Poohman why is the above difference happening with the daycount member?? 16:06
16:06 pamplemousse joined
Poohman This was the problem I had with Json::Class and Json::Marshal 16:06
if I dont print out the daycount value using say before passing the object to to-json() daycount returns (Mu) instead of the value 16:09
16:13 kaare_ joined 16:19 jmerelo joined
cygx $!daycount gets lazily initialized - cf src/core/Dateish.pm6:49 16:24
16:36 pecastro joined 16:38 cwilson left
Poohman ok 16:57
16:58 tilpner joined
tilpner Not sure where to file this issue: marketing.perl6.org/id/1541379592/pdf_digital from blogs.perl.org/users/zoffix_znet/20...lease.html is broken 17:01
17:12 uzl joined
uzl o/ 17:14
yoleaux 11:20Z <jmerelo> uzl: I'll have to check it out. The whole terminology is kinda tricky, but it's OK once you get the grasp of it.
11:47Z <Xliff> uzl: You need a new iterator object. Everytime that method is called. You can't use self.
12:16Z <Xliff> uzl: Try this version: sprunge.us/qgIQde
12:17Z <Xliff> uzl: Also thanks for turning me on to sprunge... it's nifty!
uzl jmerelo: Yeah, that's what I've noticed. Probably it'll get better as I get accustomed to the terminology. 17:15
jmerelo uzl: good luck! 17:18
17:20 redhands joined
uzl .tell Xliff Would you mind expound on the "need of a new iterator object" and "not using self"? Alternatively, you could add it to this SO answer (stackoverflow.com/a/57129217/10824322) if you've an account or add a new answer. ;-) 17:22
yoleaux uzl: I'll pass your message to Xliff.
uzl jmerelo: Thanks!
jmerelo uzl: when Xliff tells you about not using self, please raise an issue in the documentation (where it's used) :-) 17:23
uzl .tell No problem. I started using it myself when somebody here posted a link. So thanks to that person for turning us to it. ;-)
yoleaux uzl: I'll pass your message to No.
uzl jmerelo: Sure. Will do!
17:25 cygx left 17:45 jmerelo left 18:00 Black_Ribbon joined 18:08 melezhik left 18:13 reach_satori_ left
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue No way of having new versions of CORE classes for new language revisions github.com/perl6/problem-solving/issues/71 18:42
¦ problem-solving: AlexDaniel self-assigned Ecosystem: versioning issues github.com/perl6/problem-solving/issues/72 18:43
¦ problem-solving: AlexDaniel self-assigned Official release of Perl 6 implementation github.com/perl6/problem-solving/issues/70 18:44
¦ problem-solving: AlexDaniel assigned to jnthn Issue Status of the POD6 implementation github.com/perl6/problem-solving/issues/69
18:51 uzl left
AlexDaniel tilpner: github.com/perl6/problem-solving/issues/68 18:53
tilpner Oh, I see. Looks like there was a larger incident or migration. Thanks! :) 18:54
AlexDaniel tilpner: yeah, we're trying to redo things the right way this time, so it's going to take a bit 18:55
18:56 domidumont left 19:01 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 19:05 reach_satori joined 19:08 nepugia left
redhands so, I vaguely remember 1/3 + 1/3 displaying in REPL as something like 2/3, but now it seems to stringify as 0.666667, am I remembering wrong? 19:16
feels like this is hiding the niceness of the Rat class, I assume this Rat class already keeps a $numerator and $denominator? is this redividing in the Str method to produce this 0.666667 string? 19:19
19:19 kaare_ left
AlexDaniel redhands: say (1/3 + 1/3).Str 19:20
19:20 kaare_ joined
AlexDaniel oops 19:20
m: say (1/3 + 1/3).Str
camelia 0.666667
AlexDaniel m: say (1/3 + 1/3).perl
camelia <2/3>
AlexDaniel m: say (1/3 + 1/3).nude
camelia (2 3)
AlexDaniel redhands: so yes, that's how it is stringified 19:21
redhands: I guess in most cases when people want to print something they don't expect to get the numerator and denumerator separately 19:22
or a fraction
tobs I would argue that a decimal expansion gives you a better idea of how big a number is when numerator and denominator are huge. 19:23
m: say (1/3 + 1/3).gist 19:24
camelia 0.666667
redhands Ah I see, thanks! I did see the .perl, maybe .Str always returned 0.666667, and I'm just misremembering, the 2/3 output feels a bit more intuitive for me (and no information lost), I figure the .Str must be diving somewhere internally? 19:25
tobs: oh I see, i guess that makes sense
AlexDaniel m: say 0.12345.nude 19:27
camelia (2469 20000)
redhands AlexDaniel: Ah thank you 19:28
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue One more approach for EXPORT problems. github.com/perl6/problem-solving/issues/74
doc/new-issue-template-format: 49af5485aa | (Trey Harris)++ (committed using GitHub Web editor) | 6 files
Update issue templates for #2904

This is WIP for discussion.
Two things (at least) need to be added:
1. A pull request template 2. Where we should point people who have issues with the language that they are having the impulse to express via a doc fix. (There isn’t a one-size-fits-all answer here, since some things will go to rakudo and some to perl6 for instance, but a general rule of thumb should be included in the templates, I think?)
doc: treyharris++ created pull request #2912:
Update issue templates for #2904
19:31 yqt joined
cpan-p6 New module released to CPAN! Gnome::Gtk3 (0.17.3) by 03MARTIMM 19:36
Geth doc: 616e6b0e0a | Coke++ | 2 files
fix typos.

fix indefinite article
19:38
doc/new-issue-template-format: 871623e778 | (Trey Harris)++ | 2 files
Minor fixes

  - something-is-incorrect.md had `bug` rather than `docs` as a default label
  - An old `something-s-incorrect` WIP made it in somehow
19:39
doc/new-issue-template-format: 40ebd1394e | (Trey Harris)++ | .github/issue_template.md
Remove legacy issue_template.md; pull_request.md

Remove the legacy issue template.
Also, just a note that since I don't think we'll be using the multiple pull-request templates feature (since it requires nonstandard tools support) and the "new" location for a single global hidden template is exactly the same as the "old" one, we can just leave it in place as-is.
19:49
19:50 pamplemousse_ joined
chloekek What's the difference between the module and package keywords? 19:53
19:53 pamplemousse left
chloekek p6: module M {}; say M.perl 19:57
camelia M
chloekek p6: packae M {}; say M.perl
19:57 molaf left
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
M used at line 1
Undeclared routine:
packae used at line 1
19:57
chloekek p6: package M {}; say M.perl
camelia M
Xliff .
yoleaux 17:22Z <uzl> Xliff: Would you mind expound on the "need of a new iterator object" and "not using self"? Alternatively, you could add it to this SO answer (stackoverflow.com/a/57129217/10824322) if you've an account or add a new answer. ;-)
chloekek p6: package A {}; module B {}; say A.WHAT; say B.WHAT;
camelia (A)
(B)
19:58
Xliff .tell uzl SO question updated.
yoleaux Xliff: I'll pass your message to uzl.
chloekek p6: package A {}; module B {}; say A.^mro; say B.^mro;
camelia No such method 'mro' for invocant of type 'Perl6::Metamodel::PackageHOW'
in block <unit> at <tmp> line 1
19:59 MasterDuke joined
TreyHarris camelia:Every module is a package. But not every package is a module. Classes and grammars and roles are packages, too 20:00
You can have multiple top-level packages in a file, but if you use 'unit' you can only have one
Dumb dumb, I meant chloekek rather than camelia. :-D 20:01
A bare package is functionally very similar to a module--the differences are in loading and importing. You can read the docs for the rundown--there's a section comparing the two in "Reference" 20:02
But unless you're mucking about with the language, you probably want to default to module if you're writing non-OO library code. A full rundown is given in perl6docs.github.io/language/packages 20:04
chloekek Thanks, I'll check that out. 20:05
TreyHarris Well, the other difference between modules and packages are what they can introspect, because modules have an identity. But that's a pretty arcane difference 20:10
20:23 zakharyas left
xinming Anyone here knows what template system is currently used by perl6? 20:30
sena_kun xinming, template system as in? 20:31
Xliff xinming: There are several. 20:32
xinming: What are you trying to do?
xinming just like xslate in perl5 20:34
I used xslate in perl6 too, But not that handy, So, I wish like something like that in perl6.
template toolkit in perl6 is good also. :-)
sena_kun Cro::WebApp 20:35
for example
xinming Ok.
Xliff Template6
Template::Mojo
There are many!
sena_kun modules.perl6.org/search/?q=template 20:36
20:45 Cabanoss- joined 20:46 Cabanossi left 21:04 robertle left 21:06 yqt left
chloekek Cool, using Perl 6 to intercept Minecraft chat messages and respond with commands. :) 21:11
21:28 chloekek left 22:01 khisanth_ left 22:04 MasterDuke left 22:14 khisanth_ joined
TreyHarris I ♥️ .duckmap, I dunno how I got along without it 22:16
Perl 6 in genneral removes so much special casing that special casing becomes a bit of a code smell 22:17
Xliff .duckmap 22:20
TreyHarris Xliff: That's what I typed, if it came out wrong because of the emoji, apologies 22:21
Xliff No. I'm trying to rationalize the name. 22:22
And I think I have it.
"duck" as in.. "walks, quacks, looks" then apply block. 22:23
Not the name I'd use, but it works... once you get the etymology.
TreyHarris and "duck-typing" is when a language lets you run code against an object regardless of its formal type so long as it handles all the methods actually called on it (i.e. 22:27
walks like a duck)
(Perl 6 has duck-typing for non-invocants when you don't specify the type in a routine's signature) 22:29
hmm... I guess it even has duck-typing for invocants if you enable augment and add methods to Any or Mu. But it doesn't let you write a method that is only added to objects who have the methods performed on the invocant like... *shrug* can't remember, but I recall some language that had that. Would've had to have been a non-dynamic language with static compilation. 22:38
22:48 pecastro left 22:55 rindolf left 23:13 |oLa| joined 23:21 pamplemousse_ left
Xliff #perl6-devs -- FWIW - I know rakudo/3075 will be a BITCH to nail down. However I am worried that something is going wrong and perl6 isn't reporting it. Please help! 23:22
timotimo R#3075 23:23
synopsebot R#3075 [open]: github.com/rakudo/rakudo/issues/3075 Conflicting use statement does not produce an error, but fails dynamic compilation.
timotimo have you looked at RAKUDO_MODULE_DEBUG output? 23:25
Xliff No. 23:26
timotimo that could perhaps give an important hint as to the difference between the "do everything" script and the "use only one module" one-liner
23:27 |oLa| left
Xliff Considering I barely know how to read the contents of that, I thought it best leave that to someone who knew how to read it. 23:27
I can add that to the bug.
OK. Results from step 5 added 23:30
23:30 MilkmanDan left 23:31 MilkmanDan joined, |oLa| joined
Xliff step 8 added 23:35
Step 11 added, but link goes to a gist. It's over a meg in size. 23:40
23:43 redhands left 23:44 sena_kun left 23:47 aborazmeh joined, aborazmeh left, aborazmeh joined