»ö« 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.
Geth doc: 0436eaba21 | Antonio++ (committed using GitHub Web editor) | doc/Type/List.pod6
fix definition of map not being considered code
06:03
synopsebot Link: doc.perl6.org/type/List
antoniogamiz morning o/ 06:22
Xliff \o 06:25
chloekek p6: my $x := 1; say $x.VAR.perl; 06:52
camelia 1
chloekek p6: my $x = 1; say $x.VAR.perl;
camelia 1
lizmat m: my $x := 1; say $x.VAR.^name 06:53
camelia Int
lizmat m: my $x = 1; say $x.VAR.^name
camelia Scalar
chloekek Is VAR special cased in the compiler or is it a method? 06:54
lizmat special cased, afaik 06:58
github.com/rakudo/rakudo/blob/mast....nqp#L5998 06:59
chloekek Thanks. 07:02
p6: my $x := 1; say $x.REPR 07:03
camelia P6opaque
lizmat m: my int $x = 42; say $x.REPR 07:05
camelia P6opaque
lizmat hmmm...
lizmat guess it gets HLLized first 07:06
chloekek p6: use NativeCall; class A is repr('CPointer') { }; my $x = A.new; say $x.REPR 07:13
camelia CPointer
daxim lizmat, did you delete redd.it/ch5su7 as submitter or was it a subreddit moderator? 07:28
lizmat daxim: I did 07:29
also: I will no longer post on r/perl
Geth perl6.org/more-adult-intro: 505b5152f8 | (Elizabeth Mattijsen)++ | source/index.html
Give Perl 6 a more adult intro

  - de-emphasize being the sister of Perl 5
  - emphasize part of the Perl community
  - emphasize continued development, rather than being just new
07:30
perl6.org: lizmat++ created pull request #132:
Give Perl 6 a more adult intro
07:31
cpan-p6 New module released to CPAN! Gnome::Gtk3 (0.17.5) by 03MARTIMM 07:56
New module released to CPAN! Gnome::GObject (0.13.13) by 03MARTIMM
lizmat weekly: blogs.perl.org/users/laurent_r/2019...ystem.html 08:06
notable6 lizmat, Noted!
scimon lizmat: Should I tell you about a blog post? Or just use weekly to note it? 09:27
(Hi BTW)
jnthn lizmat: .REPR is an object operation (like .WHAT), so doing it on a native will first auto-box the native 09:38
lizmat weekly: www.khanate.co.uk/blog/2019/07/24/p...d-testing/ 09:54
yoleaux 09:35Z <jnthn> lizmat: It wouldn't help much, since the issue is ultimately that one thread sees it's the first into the state block and runs the state initializer (which is what a `once` block is treated as, effectively), and then the second thread would (correctly) see it's not the first thing, so just sail on through and read the (so far uninitialized) state variable.
notable6 lizmat, Noted!
chloekek Never realised I could write ^∞ instead of 0 .. ∞! 😮 10:01
p6: sub prefix:<Z> { ^∞ Z @^a }; for Z qw[a b c] -> ($i, $s) { say "$i: $s" }; 10:03
camelia 0: a
1: b
2: c
lizmat scimon: A couple of noted on the argument s/noted/notes/ 11:25
scimon Oh yes. Thanks
lizmat and the value got is used s/got/gotten/ ??? not sure about that one 11:26
the amout of time s/amout/amount
lizmat scimon: that's it :-) 11:28
timotimo scimon: how do you "use up Perl6"? :) 11:35
timotimo scimon: does HTTP::UserAgent return a Failure or throw when an error is returned, like a 500 or a 404 or something? 11:38
scimon timotimo: Yeah probably. Like I say if I was being serious about it I'd add some tests for that kind of thing. 11:39
I think "The value got" is allowed. 11:40
scimon (I've made changes) 11:43
And I tagged it perl6 programming so tiobe should be happy ;) 11:44
lizmat scimon++
timotimo do they search "perl6 programmnig" or "perl 6 programming"? 11:48
scimon .... Ummm 11:49
timotimo i wonder if it'd be better to "use MAIN :named-anywhere" instead of "my %*SUB-MAIN-OPTS = :named-anywhere" 11:57
really just a syntactic sugar cube
lizmat timotimo: you can't export dynamic vars yet :-(
timotimo dang
lizmat I mean, they *do* get exported, but they're uninitialized 11:58
scimon I do love to auto generated usage stuff. :)
timotimo yeah 12:09
chloekek p6: module M { our $x = 2; }; say 1; say $M::y; # why does this not fail at compile time? 13:17
camelia 1
(Any)
chloekek Also surprised it succeeds without no strict; 13:21
lizmat chloekek: $M::y is short for M::<$y>, basically a stash lookup at runtime 13:24
chloekek Aha. 13:24
lizmat m: class A {}; dd A::<$foo> 13:27
camelia Any element{'$foo'} = Any
lizmat m: class A {}; dd $A::foo
camelia Any element{'$foo'} = Any
lizmat m: class A { our $foo = 42 }; dd A::<$foo>
camelia Int $foo = 42
lizmat m: class A { our $foo = 42 }; dd A::.keys 13:28
camelia ("\$foo",).Seq
chloekek p6: class A { our $foo = 42 }; dd A:: 13:37
camelia Stash element = {"\$foo" => 42}
chloekek p6: module M { our $foo = 1; our sub f { say $foo } }; M::<$foo> = 2; M::f; M::<$foo>:delete; M::f; M::<$foo> = 3; M::f; 13:39
camelia 2
2
2
chloekek Seems like the scalar container foor $foo is lexically captured by f. 13:40
p6: module M { our $foo := 1; our sub f { say $foo } }; M::<$foo> = 2; M::f; M::<$foo>:delete; M::f; M::<$foo> = 3; M::f; 13:42
camelia 1
1
1
chloekek Make sense; lexically referenced ours aren't looked up in the stash at runtime. 13:45
Xliff m: class X::Me is exception { has $.a; has $.b; method message { "{ $.a } / { $.b }" }; }; X::Me.new(a => 1, b => 2).throw 14:18
camelia 5===SORRY!5=== Error while compiling <tmp>
'X::Me' cannot inherit from 'exception' because it is unknown.
Did you mean one of these?
'Exception'
'Exceptions'

at <tmp>:1
Xliff m: class X::Me is Exception { has $.a; has $.b; method message { "{ $.a } / { $.b }" }; }; X::Me.new(a => 1, b => 2).throw
camelia 1 / 2
in block <unit> at <tmp> line 1
Xliff Huh. 14:19
Xliff m: class X::Me is Exception { has $.a; has $.b; method message { "{ $.a } / { $.b }" }; }; my $a = 1; $b = 2; X::Me.new(:$a, :$b).throw 14:22
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3 { "{ $.a } / { $.b }" }; }; my $a = 1; 7⏏5$b = 2; X::Me.new(:$a, :$b).throw
Xliff m: class X::Me is Exception { has $.a; has $.b; method message { "{ $.a } / { $.b }" }; }; my ($a, $b) = (1,2); X::Me.new(:$a, :$b).throw
camelia 1 / 2
in block <unit> at <tmp> line 1
perryprog Weird question, but does anyone have some favorite perl 6 answers for codegolf.stackexchange.com? 15:40
jmerelo squashable6: 16:10
squashable6 jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable
jmerelo squashable6: status
squashable6 jmerelo, Next SQUASHathon in 7 days and ≈11 hours (2019-08-03 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo We've got to do something about this, I guess...
xelak m: class Intx is Int {}; my Intx $i = 42; 16:14
camelia Type check failed in assignment to $i; expected Intx but got Int (42)
in block <unit> at <tmp> line 1
xelak Is there a way to overload the assigment operator so that this ^^^^ works?
jmerelo xelak: internal classes are tricky. 16:15
m: class Intx is Int {}; my Intx $i := 42
camelia Type check failed in binding; expected Intx but got Int (42)
in block <unit> at <tmp> line 1
jmerelo m: class Intx is Int {}; my Intx $i .= new(42)
camelia ( no output ) 16:16
jmerelo m: class Intx is Int {}; my Intx $i .= new(42); say $i.perl
camelia 42
jmerelo well, who knew. That worked...
xelak ^^^^
xelak jmerelo: I know it works this way, but I would prefer it if it'd work the other way :-) ... 16:22
El_Che jmerelo: did the heatwave reach Granada? 16:23
not the regular one, I mean :)
antoniogamiz so... I have a strange problem.. I have changed a file, I have executed and the changes have not appeared 16:27
I even have deleted the .precomp dir and still nothing 16:28
El_Che you probably didn't delere the correct one :) 16:31
antoniogamiz I have deleted the one in the working dir and the one lib/ 16:31
El_Che in ~/.perl6? 16:32
jmerelo xelak: yep... but again, internal types are tricky. That's going to always work. Take into account that 42 is not supposed to be an Intx automatically; it's an Int literal, so you have to make it go through the hoops to make it become Intx 16:33
El_Che quick test: mv ~/.perl6 ~/perl6-backup
jmerelo El_Che: I just came back from Western Spain. Yep, it was hot there...
El_Che (except f you installed modules there :) )
antoniogamiz I did :* 16:34
:(* 16:35
antoniogamiz he, if I execute the tests it recognizes the changes, but if I execute the program in bin/ it doesnt 16:37
El_Che jmerelo: for me Wastern Spain still sounds like being a poor hidalgo going there (and further) to make it big :)
the price of too many history books still floating around in my head :) 16:38
jmerelo El_Che: a bit further west, but yep, kinda the same place. 16:39
El_Che jmerelo: I saw your twitter feed, travelling a lot lately it seems 16:40
jmerelo yep, I've been doing that a lot lately. Next destination: Riga! 16:41
El_Che jmerelo: taking (some of) your family? 16:42
jmerelo El_Che: 4/5 of it :-) 16:44
El_Che ah nice! 16:46
antoniogamiz have you ever heard about 'RaceSeq'? 17:16
as a type in perl6 I mean
jnthn Yes
antoniogamiz mm, then it's not documented 17:17
jnthn m: [1..5].race.WHT.say
camelia No such method 'WHT' for invocant of type 'RaceSeq'. Did you mean 'WHY'?
in block <unit> at <tmp> line 1
jnthn m: [1..5].race.WHAT.say
camelia (RaceSeq)
jnthn It's what `race` returns
antoniogamiz good, then I will open an issue because HyperSeq and RaceSeq does not appear in the docs 17:18
antoniogamiz s/does/do sorry 17:25
cpan-p6 New module released to CPAN! PDF::Class (0.3.7) by 03WARRINGD 19:18
SmokeMachine should `perl6 -I.` use META6.json to know where to look for modules? 20:16
SmokeMachine Should this work? www.irccloud.com/pastebin/DjZJGnoA/ 20:29
www.irccloud.com/pastebin/J1WzfZ3q/ 20:32
ugexe if -I points to a directory with META6.json then it will use that as the authority of what modules are available 20:33
if -I points to a directory with no META6.json then the file system acts as the authority of what modules are available
the problem is you are using versions inside your provides section, which rakudo doesn't understand yet 20:34
zef already understands that though, so whatever rakudo does it will Just Work
s/whatever/whenever/
SmokeMachine rakudo do not understand :ver<> inside of the META6? 20:35
ugexe not inside the `provides` 20:36
well, it doesn't undestand it anywhere either yeah
SmokeMachine :( 20:37
ugexe zef parses those names with github.com/ugexe/zef/blob/e7389737...m6#L13-L30 -- if someone wanted to write that parser in nqp it we could put it into core and use it internally
SmokeMachine ugexe: I was trying to use META6 to track database migrations with versions... do you think there is a better way to do that? 20:38
ugexe CompUnit::DependencySpecification.from-string("Foo::Bar:ver<1.0>")
theoretically where it might exist in the future^
SmokeMachine about the link... it doesn't seem to be extremely complex... I think I could try to implement it... 20:40
ugexe just remember it has to parse stuff like `Foo::Bar:auth<First Last [email@hidden.address]
but yeah other than that it shouldnt be hard 20:41
m: $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name<Test>)).distribution.Str.say; 20:44
camelia CORE:ver<6.d>:auth<perl>:api<0>
ugexe distribution stringify the namespace to the format that requires a parser 20:45
SmokeMachine ugexe: should it be here? github.com/rakudo/rakudo/blob/612d...cation.pm6
ugexe yeah that is where i would put it 20:47
SmokeMachine ugexe: great! I'll start coping the perl6 version you sent me (the grammar) to there and test it... if it works, I'll try to convert that to nap, does that make sense? 20:48
ugexe sure 20:49
MasterDuke why does it have to be in nqp?
SmokeMachine speed? 20:51
ugexe i mean it could prove it never gets used significantly on start-up to actually matter, but i suspect something needs to be added somewhere for figuring out the precomp path parts 20:54
SmokeMachine it's taking too long just too pull the repo... 21:02
discord6 <Tyler (Aearnus)> what's the current weekly challenge? 21:08
SmokeMachine ugexe: What should be populated on that class? 21:23
SmokeMachine I'm not being able to compile... 21:59
it hangs...
SmokeMachine www.irccloud.com/pastebin/G5acEGip/ 22:08