»ö« 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.
00:01 [particle] joined, p6bannerbot sets mode: +v [particle] 00:04 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 00:05 [particle] left 00:07 lichtkind joined 00:08 isviridov_away22 joined, isviridov_away22 left, p6bannerbot sets mode: +v lichtkind 00:09 mcmillhj left 00:19 mcmillhj joined 00:20 p6bannerbot sets mode: +v mcmillhj 00:24 mcmillhj left
Herby_ My googling is failing me a bit. 00:24
Is there a simple way of getting P6 on the Raspberry Pi 3? 00:25
00:35 [particle] joined
Herby_ disregard, looks like I can use nxadm's Debian 8 package 00:36
00:36 p6bannerbot sets mode: +v [particle] 00:39 mcmillhj joined 00:40 p6bannerbot sets mode: +v mcmillhj, [particle] left 00:44 mcmillhj left 00:51 entonian joined 00:52 p6bannerbot sets mode: +v entonian 00:53 entonian left 00:59 estan_ joined, estan_ left 01:08 mcmillhj joined 01:09 p6bannerbot sets mode: +v mcmillhj, molaf left 01:12 mcmillhj left 01:18 [particle] joined, p6bannerbot sets mode: +v [particle] 01:20 lichtkind left 01:21 molaf joined, [particle]1 joined 01:22 p6bannerbot sets mode: +v molaf, p6bannerbot sets mode: +v [particle]1, [particle] left 01:26 mcmillhj joined 01:27 p6bannerbot sets mode: +v mcmillhj, [particle]1 left 01:28 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix Herby_: FWIW, you can also build from scratch: github.com/zoffixznet/perl6.party/...udo-perl-6 01:28
Herby_ Zoffix: awesome, i was looking for a guide like that. Thanks! 01:30
01:31 mcmillhj left 01:32 lichtkind joined 01:33 p6bannerbot sets mode: +v lichtkind
vrurg I wonder: if an attribute from a parent class needs to be set at object initialization stage how could it be done? Neither $.parent-attr nor $!parent-attr are not available in TWEAK... 01:35
Zoffix how come $.parent-attr not available? 01:36
vrurg m: class Foo { has $.attr; }; class Bar is Foo { submethod TWEAK { $.attr = "YES" } }; Bar.new; 01:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Virtual method call $.attr may not be used on partially constructed object (maybe you mean $!attr for direct attribute access here?)
at <tmp>:1
------> 3ss Bar is Foo { submethod TWEAK { $.attr7…
01:37 [particle] joined
Zoffix try self.attr instead 01:37
vrurg No method error
geekosaur that's telling you the truth. the attribute exists, the iplicit etter and seter don't yet so $.x doesn't work
01:37 p6bannerbot sets mode: +v [particle]
vrurg m: class Foo { has $.attr; }; class Bar is Foo { submethod TWEAK { self.attr = "YES" } }; Bar.new; 01:38
camelia Cannot modify an immutable Any ((Any))
in submethod TWEAK at <tmp> line 1
in block <unit> at <tmp> line 1
vrurg m: class Foo { has $.attr is rw; }; class Bar is Foo { submethod TWEAK { $.attr = "YES" } }; Bar.new;
camelia 5===SORRY!5=== Error while compiling <tmp>
Virtual method call $.attr may not be used on partially constructed object (maybe you mean $!attr for direct attribute access here?)
at <tmp>:1
------> 3ss Bar is Foo { submethod TWEAK { $.attr7…
vrurg m: class Foo { has $.attr is rw; }; class Bar is Foo { submethod TWEAK { self.attr = "YES" } }; Bar.new;
camelia ( no output )
vrurg Ok, self works... I need more investigation on what's going on in my code. Thanks! 01:39
Zoffix R#2152
synopsebot R#2152 [open]: github.com/rakudo/rakudo/issues/2152 Using `%.foo` in places throws, but changing it to `self.foo` works
vrurg m: class Foo { has $.attr is rw; }; class Bar is Foo { submethod TWEAK { self.attr = "YES" } }; say Bar.new.attr; 01:40
camelia YES
vrurg Zoffix: Doe it mean I shall expect that at some point (sigil).attr notation will work eventually? 01:43
01:43 mcmillhj joined 01:44 p6bannerbot sets mode: +v mcmillhj 01:48 mcmillhj left 01:50 AlexDaniel left 01:56 w_richard_w joined 01:57 mcmillhj joined, p6bannerbot sets mode: +v w_richard_w, p6bannerbot sets mode: +v mcmillhj 02:01 mcmillhj left
Zoffix vrurg: I'm not an expert in that area and don't know for sure, but just logically thinking about it: if we can make `self.foo` work, surely we can make `$.foo` work as well 02:04
Zoffix &
02:04 Zoffix left 02:05 w_richard_w left 02:10 mcmillhj joined 02:11 p6bannerbot sets mode: +v mcmillhj 02:15 mcmillhj left 02:37 Herby__ joined 02:38 p6bannerbot sets mode: +v Herby__
Herby__ Found this repo on Algorithms, figured I'd try my hand with some Perl 6 solutions 02:39
github.com/TheAlgorithms
Here is my first pass at Bubble Sort: tio.run/##VY5NCoMwFITXySke1IWlTzGm...FUT24jCu/f
It appears to yield correct results but it is squawking a bunch of warnings at me
where am I going wrong?
02:40 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 02:44 w_richard_w joined, p6bannerbot sets mode: +v w_richard_w, mcmillhj left 02:45 w_richard_w left
MasterDuke Herby__: you're going to far. your range goes to @array.elems - 1, but then you add 1 when indexing 02:46
geekosaur you're comparing the last element against the next position which is empty
that 02:47
MasterDuke likewise
Herby__ hmm 02:48
02:54 mcmillhj joined 02:55 p6bannerbot sets mode: +v mcmillhj 02:59 mcmillhj left 03:04 vike1 joined 03:05 p6bannerbot sets mode: +v vike1
Herby__ Fixed it: tio.run/##VY5NCoMwFITXySke1IWlTzGm...ntxGFN6/AQ 03:10
Here's the P6 version on Rosetta code: rosettacode.org/wiki/Sorting_algor...ort#Perl_6
03:18 w_richard_w joined 03:19 p6bannerbot sets mode: +v w_richard_w 03:23 mcmillhj joined 03:24 p6bannerbot sets mode: +v mcmillhj 03:26 w_richard_w left, fake_space_whale joined 03:27 p6bannerbot sets mode: +v fake_space_whale 03:28 mcmillhj left 03:30 lizmat left 03:32 Herby__ left 03:34 mcmillhj joined 03:35 p6bannerbot sets mode: +v mcmillhj 03:39 mcmillhj left 03:51 mcmillhj joined 03:52 p6bannerbot sets mode: +v mcmillhj 03:56 mcmillhj left 04:09 regreg_ joined 04:10 mcmillhj joined, p6bannerbot sets mode: +v regreg_ 04:11 p6bannerbot sets mode: +v mcmillhj 04:15 mcmillhj left 04:17 MasterDuke left 04:41 mcmillhj joined 04:42 p6bannerbot sets mode: +v mcmillhj 04:46 mcmillhj left 05:00 mcmillhj joined 05:01 p6bannerbot sets mode: +v mcmillhj 05:04 epony left 05:05 mcmillhj left 05:07 vrurg left 05:08 araraloren joined 05:09 p6bannerbot sets mode: +v araraloren, snkcld joined 05:11 snkcld left
araraloren o/ 05:13
buggable New CPAN upload: Getopt-Advance-1.0.7.tar.gz by ALOREN modules.perl6.org/dist/Getopt::Adva...pan:ALOREN 05:17
05:18 Sgeo left, graphene left 05:19 Sgeo joined, graphene joined, p6bannerbot sets mode: +v Sgeo 05:20 p6bannerbot sets mode: +v graphene 05:27 mcmillhj joined 05:28 p6bannerbot sets mode: +v mcmillhj 05:30 fake_space_whale left 05:33 mcmillhj left 05:40 graphene left 05:41 graphene joined 05:42 p6bannerbot sets mode: +v graphene 05:43 araraloren left 05:44 araraloren joined 05:45 p6bannerbot sets mode: +v araraloren, araraloren left, araraloren joined 05:46 p6bannerbot sets mode: +v araraloren, mcmillhj joined 05:47 p6bannerbot sets mode: +v mcmillhj 05:50 molaf left, kurahaupo left 05:51 mcmillhj left, kurahaupo joined 05:52 p6bannerbot sets mode: +v kurahaupo 05:55 regreg_ left 05:56 regreg_ joined 05:57 p6bannerbot sets mode: +v regreg_ 05:59 Griwes25 joined, Griwes25 left 06:08 regreg_ left 06:16 epony joined, p6bannerbot sets mode: +v epony 06:24 troys left, mcmillhj joined 06:25 p6bannerbot sets mode: +v mcmillhj 06:29 mcmillhj left 06:32 antoniomika joined, molaf joined 06:33 p6bannerbot sets mode: +v molaf 06:35 |oLa| joined 06:36 p6bannerbot sets mode: +v |oLa| 06:39 antoniomika left 06:40 jushi17 joined, jushi17 left 06:42 mcmillhj joined 06:43 p6bannerbot sets mode: +v mcmillhj 06:46 kurahaupo left, kurahaupo joined 06:47 mcmillhj left, p6bannerbot sets mode: +v kurahaupo 06:54 jmerelo joined, p6bannerbot sets mode: +v jmerelo 07:02 hami joined, p6bannerbot sets mode: +v hami 07:12 hami left 07:18 mcmillhj joined, araraloren_ joined 07:19 p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v araraloren_ 07:20 araraloren left 07:21 molaf left 07:22 mcmillhj left 07:24 DarthGandalf joined, p6bannerbot sets mode: +v DarthGandalf 07:27 lizmat joined, p6bannerbot sets mode: +v lizmat 07:35 mcmillhj joined 07:36 p6bannerbot sets mode: +v mcmillhj 07:39 zakharyas joined, mcmillhj left, p6bannerbot sets mode: +v zakharyas 07:52 hotswaphdd joined 07:57 zakharyas left 07:59 hotswaphdd left 08:01 mcmillhj joined 08:02 p6bannerbot sets mode: +v mcmillhj 08:04 |oLa| left 08:06 mcmillhj left
Geth doc: e178989095 | (JJ Merelo)++ | doc/Language/glossary.pod6
Moves anchors above and fixes hash links refs #1303
08:11
synopsebot Link: doc.perl6.org/language/glossary
08:15 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 08:20 mcmillhj left 08:34 domidumont joined
CIAvash[m] .tell kephra_lk look at the last two examples on docs.perl6.org/routine/cross 08:34
yoleaux CIAvash[m]: I'll pass your message to kephra_lk.
08:35 p6bannerbot sets mode: +v domidumont 08:36 |oLa| joined, p6bannerbot sets mode: +v |oLa| 08:40 sena_kun joined, p6bannerbot sets mode: +v sena_kun 08:44 rindolf joined, p6bannerbot sets mode: +v rindolf 08:47 mcmillhj joined 08:48 p6bannerbot sets mode: +v mcmillhj 08:52 mcmillhj left 08:56 ambs joined, p6bannerbot sets mode: +v ambs 08:58 SCHAPiE joined, p6bannerbot sets mode: +v SCHAPiE 09:00 mcmillhj joined, p6bannerbot sets mode: +v mcmillhj 09:04 mcmillhj left 09:09 pecastro joined, p6bannerbot sets mode: +v pecastro 09:27 mcmillhj joined 09:28 p6bannerbot sets mode: +v mcmillhj 09:32 mcmillhj left 09:50 t0d0r joined, t0d0r left 09:55 robertle joined, p6bannerbot sets mode: +v robertle
buggable New CPAN upload: AccountableBagHash-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 10:37
10:42 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet, graphene left, p6bannerbot sets mode: +v Voldenet 10:44 graphene joined, p6bannerbot sets mode: +v graphene 10:45 pjs2 joined, pjs2 left 10:48 Xliff_ joined, dogbert2_ joined 10:49 reppie joined, p6bannerbot sets mode: +v Xliff_, p6bannerbot sets mode: +v dogbert2_, [particle]1 joined, p6bannerbot sets mode: +v reppie, Gruber joined 10:50 p6bannerbot sets mode: +v [particle]1, p6bannerbot sets mode: +v Gruber, stux|RC-- joined 10:51 markk joined, [ptc]_ joined, TimToady_ joined, jjmerelo joined, p6bannerbot sets mode: +v stux|RC-- 10:52 p6bannerbot sets mode: +v markk, p6bannerbot sets mode: +v [ptc]_, p6bannerbot sets mode: +v TimToady_, p6bannerbot sets mode: +v jjmerelo, profan joined, moritz_ joined 10:53 cibs_ joined, jeek_ joined, ilbelkyr_ joined, p6bannerbot sets mode: +v ilbelkyr_, Celelibi_ joined, p6bannerbot sets mode: +v profan, p6bannerbot sets mode: +v moritz_, avarab joined, avarab left, avarab joined, smash_ joined, kybr_ joined, p6bannerbot sets mode: +v avarab, Syrup joined, xinming_ joined, p6bannerbot sets mode: +v cibs_ 10:54 p6bannerbot sets mode: +v jeek_, rahogaboom joined, p6bannerbot sets mode: +v rahogaboom, p6bannerbot sets mode: +v Celelibi_, p6bannerbot sets mode: +v avarab, p6bannerbot sets mode: +v smash_, p6bannerbot sets mode: +v kybr_, diego_k joined, p6bannerbot sets mode: +v Syrup, p6bannerbot sets mode: +v xinming_ 10:55 p6bannerbot sets mode: +v diego_k 10:56 kurahaupo left, jmerelo left, [particle] left, cibs left, Xliff left, avar left, xinming left, SqrtNegInf left 10:57 avuserow joined, ccntrq joined 10:58 p6bannerbot sets mode: +v avuserow, p6bannerbot sets mode: +v ccntrq, mniip joined, p6bannerbot sets mode: +v mniip 10:59 CIAvash[m] joined, p6bannerbot sets mode: +v CIAvash[m] 11:00 Voldenet left, kurahaupo joined 11:01 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet, p6bannerbot sets mode: +v kurahaupo, p6bannerbot sets mode: +v Voldenet 11:04 CIAvash[m] is now known as CIAvash 11:18 Guest86691 joined 11:19 p6bannerbot sets mode: +v Guest86691 11:22 Guest86691 left 11:25 Syrup left 11:29 SyrupThinker joined 11:30 p6bannerbot sets mode: +v SyrupThinker 11:33 lizmat left 11:36 Zoffix joined, p6bannerbot sets mode: +v Zoffix
Zoffix m: say '123' ~~ / :my $a=2; <{ '$a' }> / 11:36
camelia 「2」
Zoffix Is this meant to work like that? I'm surprised the variable gets interpreted like that. I would've thought it'd match just as plain string '$a'
sena_kun well, isn't it `<{}>` which gives you interpolation? 11:41
it's described at docs.perl6.org/language/regexes.ht...erpolation
11:41 jjmerelo left
sena_kun >Note that the first two syntax interpolate the string lexically, while <$pattern> and <{$pattern.method}> causes implicit EVAL, which is a known trap. 11:41
Zoffix ok. thanks. 11:42
11:42 Zoffix left
Geth doc: threadless-screw++ created pull request #2336:
Rewrite of Syntax-Identifier section
11:42
sena_kun well, the question may be "aren't `''` quotes should imply "return a plain string here"", but `EVAL '$a'` gives you '5'. 11:43
and I guess in case of `<{ $a }>` those quotes are implied, but in `<{ '$a' }>` those are explicit. 11:44
just my guess though. :)
tobs m: say '123' ~~ / :my $a=2; <{ 「'$a'」 }> / 11:50
camelia Nil
sena_kun m: say '123' ~~ / :my $a=2; <{ 「$a」 }> / 11:52
camelia 「2」
12:11 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias do we have documentation how list flattening works? 12:11
docs.perl6.org/language/list - isn't good at all 12:12
it contains bits of info and examples but it doesn't contain an actuall description how things work 12:17
12:18 vike1 left 12:19 rahogaboom left
Geth doc: f41418bf0f | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Lock/Async.pod6
Make right/wrong examples more similar

To ensure the reader doesn't assume the wrongness comes from lack of variable use.
12:21
synopsebot Link: doc.perl6.org/type/Lock::Async
12:32 pmurias left 12:33 pmurias joined, p6bannerbot sets mode: +v pmurias
Geth doc: 89bc20da78 | (Paweł Murias)++ | doc/Type/Str.pod6
Fix description of Str.comb($integer)
12:38
synopsebot Link: doc.perl6.org/type/Str
12:39 Trixis2 joined, Trixis2 left
buggable New CPAN upload: Getopt-Advance-1.0.8.tar.gz by ALOREN modules.perl6.org/dist/Getopt::Adva...pan:ALOREN 12:47
13:00 andrzejku joined, p6bannerbot sets mode: +v andrzejku 13:01 ExtraCrispy left, node80814 joined, node80814 left 13:04 moser25 joined, moser25 left, avarab left 13:05 Bucciarati left 13:07 avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar, Bucciarati joined, p6bannerbot sets mode: +v avar, p6bannerbot sets mode: +v Bucciarati 13:13 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 13:14 pmurias left, pmurias joined, p6bannerbot sets mode: +v pmurias 13:15 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 13:16 p6bannerbot sets mode: +v aborazmeh 13:17 pmurias left 13:19 pmurias joined, p6bannerbot sets mode: +v pmurias 13:26 pokk14 joined, pokk14 left 13:28 camelia joined 13:29 p6bannerbot sets mode: +v camelia 13:30 mlen4 joined, p6bannerbot sets mode: +v mlen4 13:36 Fritz joined, p6bannerbot sets mode: +v Fritz 13:40 regreg joined 13:41 p6bannerbot sets mode: +v regreg, mlen4 left, SqrtNegInf joined 13:42 p6bannerbot sets mode: +v SqrtNegInf
Fritz Hi 13:42
This works: DBIish.connect('Pg', :host<localhost>, :database<agrammon_dev>, :user<postgres>); 13:43
This doesn't: my $db-info = (:host<localhost>, :database<agrammon_dev>, :user<postgres>); DBIish.connect('Pg', $db-info);
What am I doing wrong?
sena_kun connect('Pg', |%$db-info); 13:45
and better:
Fritz This is the error message: Too many positionals passed; expected 2 arguments but got 3
sena_kun my %db-info = host => 'localhost', database => 'foo', user => 'foo';
give me a second...
m: sub f($a, :$b, :$c) { say $a + $b + $b }; my %params = b => 1, c => 2; say f(1, |%params); 13:47
camelia 3
True
sena_kun of course, way to create a hash isn't important here.
m: sub f($a, :$b, :$c) { say $a + $b + $b }; my %params = :1b, :2c; say f(1, |%params);
camelia 3
True
Fritz Ok. So I guess flattening the hash makes it the same list of parameters. 13:48
sena_kun m: sub f($a, :$b, :$c) { say $a + $b + $b }; my %params = :b(1), :c(2); say f(1, |%params);
camelia 3
True
sena_kun Fritz, yes, about that. :)
m: sub f($a, :$b, :$c) { say $a + $b + $b }; my $params = :b(1), :c(2); say f(1, |%$params);
camelia WARNINGS for <tmp>:
3
True
Useless use of ":c(2)" in sink context (lines 1, 1)
Fritz Thanks very much!
sena_kun you are welcome! 13:49
Fritz May I ask another one?
sena_kun sure
Fritz This fails: require DBIish; DBIish.connect(); with No such method 'connect' for invocant of type 'DBIish' 13:50
It works (obviously) with use DBIish; 13:51
moritz_ empty connect() works?
13:52 regreg left
Fritz No. Undeclared routine: connect used at line 181 13:52
And DBIish::connect gives Could not find symbol '&connect' 13:53
I looked at docs.perl6.org/language/modules#require but don't get it. 13:54
I am trying to use either DB::Pg (if on Linux) or DBIish (if on MacOSX). I works if I just use DB::Pg; use DBIish; but that seems both silly and dangerous ... 13:55
sena_kun well, I think that when you do `require DBIish`, you have a package under this name in scope(opposite to having a class under this name in scope). and now I need to remember how to get what you want... 13:57
m: use DBIIsh; 13:59
camelia ===SORRY!===
Could not find DBIIsh at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/perl6
CompUnit::R
sena_kun m: use DBIish;
camelia ===SORRY!===
Could not find DBIish at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/rakudo-m-inst-2/share/perl6
CompUnit::R
sena_kun star: use DBIish;
Fritz Ah ... as I am doing this inside a if then else, I guess I could get away with just doing a use XY; inside the if and else blocks?
camelia ( no output ) 14:00
sena_kun star: use DBIish; say DBIish.HOW;
camelia Perl6::Metamodel::ClassHOW.new
sena_kun star: require DBIish; say DBIish.HOW;
camelia Perl6::Metamodel::PackageHOW.new
sena_kun Fritz, not sure about that, to be honest. 14:01
Fritz According to docs.perl6.org/language/modules#Le...le_loading this should do what I want: my $db; if true { use DBIish; $db = DBIish.connect() } else { use DB::Pg; $db = DB::Pg.... } 14:03
Ok, thanks. I will try that. Seems to be working for the moment. 14:04
timotimo the "use" is at compile time in this code 14:05
so even though one is in the "then" and one in the "else" branch, both will be run 14:06
and if either is missing, compilation will fail
Fritz Ah, stupid me, you are right.
timotimo rakudo.org/post/lexical-require-upgrade-info - this should help
Fritz Thats why I wanted to require in the first place ...
timotimo correct
14:17 erana_ left
araraloren_ what about the `use :if` 14:17
Fritz Timo, the link you provides is basically the same info as in docs.perl6.org/language/modules#require ... I just cant' figure out what instead of DBIish.connect() I have to use.
timotimo oh
probably ::('DBIish').connect() 14:18
actually
14:19 pmurias left
timotimo it depends on how your code looks, but if you have like: my $connection; unless (try require DBIish) === Nil { $connection = (require DBIish).connect(...) }; without $connection { my $driver = (try require DB::Pg); unless $driver === Nil { $connection = $driver.connect(...) } }; without $connection { exit note "please install either DBIish or DB::Pg" } 14:21
that ought to work
Fritz This require DBIish; my $db = ::('DBIish').connect('Pg', :user<postgres>, :host<localhost>, :database<agrammon_dev>); gives No such method 'connect' for invocant of type 'DBIish' 14:23
I know I should add the try stuff, but that would be next. 14:24
sena_kun star: 'require DBIish; ::("DBIish").connect
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 3'require DBIish; ::("DBIish").connect7⏏5<EOL>
expecting any of:
single quotes
term
sena_kun star: 'require DBIish; try ::("DBIish").connect
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 3require DBIish; try ::("DBIish").connect7⏏5<EOL>
expecting any of:
single quotes
te…
sena_kun star: 'require DBIish; say ::("DBIish").connect 14:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'"
at <tmp>:1
------> 3require DBIish; say ::("DBIish").connect7⏏5<EOL>
expecting any of:
single quotes
te…
sena_kun star: require DBIish; ::("DBIish").connect
camelia Too few positionals passed; expected 2 arguments but got 1
in method connect at /home/camelia/star-2017.07/share/perl6/site/sources/F18EA8A0FD337C840672427703CC68FA0720FEDF (DBIish) line 29
in block <unit> at <tmp> line 1
sena_kun oops
my bad
Fritz SORRY ... looking at the wrong line (I had a second connect() attempt not commented out. 14:26
timotimo aah, that makes sense
araraloren_ star: say try require DBIish;
camelia (DBIish)
timotimo yeah, that kind of thing happens to me all the time, too :)
araraloren_ m: say try require DBIish;
camelia Nil
araraloren_ star: say require DBIish;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
DBIish used at line 1
Undeclared routine:
require used at line 1
Fritz So: require DBIish; my $db = ::('DBIish').connect('Pg', :user<postgres>, :host<localhost>, :database<agrammon_dev>); works fine. 14:27
Thanks everyone!
timotimo \o/
araraloren_ o////////
oh
14:28 aborazmeh left
timotimo that looks painful 14:28
14:30 pmurias joined, p6bannerbot sets mode: +v pmurias
Geth doc: sarna++ created pull request #2338:
Fix a link
14:35
doc: 21cc40d03b | sarna++ | doc/Type/IO.pod6
Fix a link
14:36
doc: 5a1c928b0a | (Bartosz Janus)++ (committed using GitHub Web editor) | doc/Type/IO.pod6
Merge pull request #2338 from sarna/master

Fix a link
synopsebot Link: doc.perl6.org/type/IO
14:37 ThatDamnRanga15 joined 14:40 OleChees17 joined, pmurias left, p6bannerbot sets mode: +v OleChees17 14:41 pmurias joined, p6bannerbot sets mode: +v pmurias 14:42 ThatDamnRanga15 left 14:43 OleChees17 left 14:44 pmurias left 14:48 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 14:49 p6bannerbot sets mode: +v aborazmeh, pmurias joined, p6bannerbot sets mode: +v pmurias, Fritz left 14:54 pmurias left 14:56 pmurias joined, p6bannerbot sets mode: +v pmurias 14:58 pmurias left, plat_8 joined 14:59 p6bannerbot sets mode: +v plat_8 15:00 plat_8 left, Ven`` joined 15:01 p6bannerbot sets mode: +v Ven`` 15:03 aborazmeh left 15:07 MilkmanDan left 15:08 MilkmanDan joined, p6bannerbot sets mode: +v MilkmanDan 15:11 ndurchx joined, ndurchx left, reppie is now known as x[LGWs4x4i]uG2N0 15:12 fake_space_whale joined 15:13 p6bannerbot sets mode: +v fake_space_whale 15:14 pmurias joined, p6bannerbot sets mode: +v pmurias 15:23 MilkmanDan left
pmurias is there a tool to show me where a method on something is defined? 15:23
15:24 TimToady_ is now known as TimToady 15:27 MilkmanDan joined, p6bannerbot sets mode: +v MilkmanDan
timotimo yup 15:27
s: Str, "comb", \()
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/5f35...l.pm6#L197
15:28 thowe left 15:30 Ven`` left 15:31 Ven`` joined, lichtkind left 15:32 p6bannerbot sets mode: +v Ven``
pmurias s: help 15:32
SourceBaby pmurias, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ help used at line 6␤␤
15:33 Guest61881 joined
pmurias s: Seq, 'unique' 15:33
SourceBaby pmurias, Something's wrong: ␤ERR: Type check failed in binding to parameter '&code'; expected Callable but got Method+{is-nodal} (Method+{is-nodal}.new)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 45␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 36␤ in block <unit> at -e li
15:33 Guest61881 left
pmurias s: Seq, 'unique', \() 15:34
SourceBaby pmurias, Sauce is at github.com/rakudo/rakudo/blob/5f35....pm6#L1571
15:39 Kaiepi left
xinming_ m: my %a = (:a(1..5), :b[1..5]); %a<a>.perl.say; %a<b>.perl.say; 15:41
camelia 1..5
$[1, 2, 3, 4, 5]
xinming_ m: my %a = (:a(1..5) :b[1..5]); %a<a>.perl.say; %a<b>.perl.say;
camelia 1..5
1..5
xinming_ Anyone here would clarify this for me? why there are the differences between them?
the (:a(1..5), :b[1..5]) vs (:a(1..5) :b[1..5]);
15:46 pmurias left, rharper22 joined 15:47 p6bannerbot sets mode: +v rharper22
xinming_ m: %a = (:a<a b c> :c<a b c>); 15:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%a = (:a<a b c> :c<a b c>);
xinming_ m: my %a = (:a<a b c> :c<a b c>);
camelia ===SORRY!===
cannot stringify this
xinming_ m: my %a = :a<a b c> :c<a b c>;
camelia ( no output )
xinming_ m: my %a = :a<a b c> :c<a b c>; %a.perl.say;
camelia {:a($("a", "b", "c"))}
xinming_ m: my %a = (:a<a b c> :c<a b c>); %a.perl.say;
camelia ===SORRY!===
cannot stringify this
xinming_ Is this a bug? (:a<a b c> :c<a b c>).perl.say;
m: (:a<a b c> :c<a b c>).perl.say;
camelia ===SORRY!===
cannot stringify this
geekosaur known bug and it has nothing to do with .perl 15:49
15:53 jmerelo joined 15:54 p6bannerbot sets mode: +v jmerelo, rharper22 left 15:56 Gamah5 joined
geekosaur mm, I know we've seen this one but not spotting it. it may be in rt instead of github. basically two consecutive colonpairs gets misparsed 15:57
the "SORRY!" means it's blowing up in the compile phase, not runtime 15:58
xinming_ Got it, thanks. 16:01
16:03 Gamah5 left 16:09 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias github.com/perl6/doc/issues/2339 - new docs issue, is it clear enough? 16:10
16:12 fedux_ joined, fedux_ left 16:14 Ven`` left 16:15 ccc joined 16:16 p6bannerbot sets mode: +v ccc
pmurias in general the docs seem to be confused if something is reference documentation or an introduction 16:18
I'm not sure how fix that
example: in docs.perl6.org/language/functions we alude that routines have several forms but we mention only the two most notable forms 16:20
xinming_ pmurias: thanks, I'll check them. 16:21
16:23 pmurias left, araraloren_ left
ccc m: my @a=[^4];-> (Int :@lst) {say @lst}(@a) 16:23
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Array ($[])
in block <unit> at <tmp> line 1
jmerelo m: my @a=[^4];-> (Int :@lst) {say @lst}(|@a) 16:24
camelia Cannot unpack or Capture `0`.
To create a Capture, add parentheses: \(...)
If unpacking in a signature, perhaps you needlessly used parentheses? -> ($x) {} vs. -> $x {}
or missed `:` in signature unpacking? -> &c:(Int) {}
in block <unit> at …
jmerelo my @a=[^4];-> (Int :@lst) {say @lst}( lst => @a) 16:25
ccc Why does the array get itemized?
jmerelo m: my @a=[^4];-> (Int :@lst) {say @lst}( lst => @a)
camelia Too few positionals passed to '<anon>'; expected 1 argument but got 0
in block <unit> at <tmp> line 1
timotimo m: my @a = [^4]; say @a.perl
camelia [0, 1, 2, 3]
ccc timotimo: Doesn't have the needed Positional[Int] constraint 16:26
timotimo i think the problem is that you're not passing the array
and its default value is just Array
jmerelo m: my @a=[^4];-> (Int @lst) {say @lst}( @a)
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Int (0)
in block <unit> at <tmp> line 1
timotimo oh, oyu're trying to unpack it
m: my Int @a = [^4]; -> Int @lst { say @lst.perl }(@a)
camelia Array[Int].new(0, 1, 2, 3)
jmerelo m: my @a:=[^4];-> (Int @lst) {say @lst}( @a)
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Int (0)
in block <unit> at <tmp> line 1
timotimo the reason why you get 0 instead of Positional[Int] there is that you're telling the signature to unpack the first argument and find an array in its first slot 16:27
like this:
jmerelo timotimo: thanks!
timotimo m: my &foo = -> ($a, $b) { say "a is $a and b is $b" }; foo([1,2])
camelia a is 1 and b is 2
ccc I'm sending ONE argument the array INTO one argument and array. Why isn't it doing the expected thing? 16:28
edit -- I'm sending ONE argument the array INTO one argument, an array. 16:29
jmerelo ccc: to be precise, you're sending a Positional into another Positional.
ccc yes 16:30
Array is shorter to say than Positional
timotimo which exact code are we talking about now, ccc?
ccc m: my @a=[^4];-> (Int :@lst) {say @lst}(@a)
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Array ($[])
in block <unit> at <tmp> line 1
jmerelo ccc: not exactly the same, though. In this case the problem is the type. 16:31
timotimo why do you have the colon there, and why do you have parenthesis around it?
jmerelo m: my Int @a=[^4];-> (Int :@lst) {say @lst}(@a)
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Array ($[])
in block <unit> at <tmp> line 1
jmerelo m: my Int @a=[^4];-> (Int @lst) {say @lst}(@a)
camelia Type check failed in binding to parameter '@lst'; expected Positional[Int] but got Int (0)
in block <unit> at <tmp> line 1
timotimo m: sub test(Int :@a) {}()
camelia ( no output )
jmerelo m: my Int @a=[^4];-> Int @lst {say @lst}(@a)
camelia [0 1 2 3]
ccc Ah - I have a named parameter! Confusing error message.
jmerelo The parenthesis is doing the itemization... 16:32
ccc m: my @a=[^4];-> (Int :@lst) {say @lst}(:lst(@a))
camelia Too few positionals passed to '<anon>'; expected 1 argument but got 0
in block <unit> at <tmp> line 1
jmerelo m: my @a=[^4];-> @lst {say @lst}(@a)
camelia [0 1 2 3]
ccc jmerelo: I NEED it to be type constrained
timotimo m: -> Int @test { say "@test is good" }([^4]) 16:33
camelia Type check failed in binding to parameter '@test'; expected Positional[Int] but got Array ($[0, 1, 2, 3])
in block <unit> at <tmp> line 1
timotimo m: -> Int @test { say "@test is good" }(my Int @ = [^4])
camelia @test is good
jmerelo ccc: just take the first form. The thing is eliminating the parentheses.
timotimo m: -> Int @test { say "@test is good" }(Array[Int].new(^4))
camelia @test is good
timotimo m: -> Int @test { say "@test[] is good" }(Array[Int].new(^4))
camelia 0 1 2 3 is good
timotimo m: -> Int @test { say [email@hidden.address] is good" }(Array[Int].new(^4))
camelia Array[Int].new(0, 1, 2, 3) is good
16:33 pmurias joined, p6bannerbot sets mode: +v pmurias
jmerelo Hi, pmurias . You've probably seen my answer to your issue in perl6/doc, right? 16:34
ccc In the code I'm working on the type constraint is on a method. 16:35
timotimo: Can you make that work with sub (Int :@a) ... 16:36
timotimo m: sub do-it(Int @test) { say [email@hidden.address] is good" }; do-it(Array[Int].new(^4)) 16:37
camelia Array[Int].new(0, 1, 2, 3) is good
ccc m: my @a=[^4];-> (Int @lst) {say @lst}(@a)) 16:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3my @a=[^4];-> (Int @lst) {say @lst}(@a)7⏏5)
16:38 Trieste24 joined
timotimo you're missing a very important point here 16:38
the parenthesis you're using there have a meaning that you do not want
16:39 p6bannerbot sets mode: +v Trieste24
ccc m: mya @a=[^4];sub (Int @a) {say @a}(@a) 16:39
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared
at <tmp>:1
------> 3mya 7⏏5@a=[^4];sub (Int @a) {say @a}(@a)
ccc m: my @a=[^4];sub (Int @a) {say @a}(@a)
camelia Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[0, 1, 2, 3])
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo well, you need to pass an Array-Of-Int, not just an array that happens to have ints in it at that moment
ccc I still don't understand what's wrong with the above. 16:40
timotimo the last one?
ccc yes
timotimo m: my Int @a=[^4];sub (Int @a) {say @a}(@a)
camelia [0 1 2 3]
timotimo this is how you make it work
16:41 titsuki left
ccc So user's of my class have to use put the darn thing in a variable? 16:41
timotimo no 16:42
m: sub (Int @a) {say @a}(Array[Int].new(1, 2, 3, 4))
camelia [1 2 3 4]
ccc I'm passing an array of int
timotimo no variable needed
alternatively, you perhaps want this instead:
m: sub do-it(@a where .all ~~ Int) {say @a} do-it([1, 2, 3, 4]); do-it([1, 2, "foo"]) 16:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3sub do-it(@a where .all ~~ Int) {say @a}7⏏5 do-it([1, 2, 3, 4]); do-it([1, 2, "foo"
expecting any of:
timotimo m: sub do-it(@a where .all ~~ Int) {say @a}; do-it([1, 2, 3, 4]); do-it([1, 2, "foo"])
camelia [1 2 3 4]
Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got Array ($[1, 2, "foo"])
in sub do-it at <tmp> line 1
in block <unit> at <tmp> line 1
16:43 Trieste24 left
ccc m: my @a=[^4];sub (@a where .all ~~ Int) {say @a}(@a) 16:44
camelia [0 1 2 3]
ccc Ok, so the lesson is that the parameter unpacking doesn't descend into the container to check Positional[Foo], the sub or method has to do it itself? 16:46
timotimo types in perl6 are nominal, which means the name of the type is what counts
except it's not a name as in "string", but as in parameterized roles and such 16:47
ccc Well that makes Array[Foo] much less useful as part of an API. If used, it's a traps for users. 16:48
timotimo m: sub do-the-slow-thing(@a where .all ~~ Int) { my $i = 0; while $i < @a.end { say @a[$i]; sleep 0.1 } }; my @haha = 1, 2, 3, 4, 5, 6, 7, 8; start { do-the-slow-thing(@haha); }; sleep 0.2; @haha[7] = "LOL";
camelia 1
1
timotimo m: sub do-the-slow-thing(@a where .all ~~ Int) { my $i = 0; while $i < @a.end { say @a[$i]; sleep 0.1 } }; my @haha = 1, 2, 3, 4, 5, 6, 7, 8; my $are-you-finished = start { do-the-slow-thing(@haha); }; sleep 0.2; @haha[7] = "LOL"; await $are-you-finished 16:49
i forgot to $i++
camelia (timeout)1
timotimo m: sub do-the-slow-thing(@a where .all ~~ Int) { my $i = 0; while $i < @a.end { say @a[$i++]; sleep 0.1 } }; my @haha = 1, 2, 3, 4, 5, 6, 7, 8; my $are-you-finished = start { do-the-slow-thing(@haha); }; sleep 0.2; @haha[7] = "LOL"; await $are-you-finished
camelia 1
2
3
4
5
6
7
timotimo oh?
m: sub do-the-slow-thing(@a where .all ~~ Int) { my $i = 0; while $i < @a.end { say @a[$i++]; sleep 0.1 } }; my @haha = 1, 2, 3, 4, 5, 6, 7, 8; my $are-you-finished = start { do-the-slow-thing(@haha); }; sleep 0.1; @haha[5] = "LOL"; await $are-you-finished
camelia 1
2
3
4
5
LOL
7
timotimo nice array of ints you have there
would be a shame if someone put a LOL in it 16:50
pmurias jmerelo: I'm looking at the answer...
timotimo how would you like sub test(Int @foo) to behave? 16:51
ccc Look if you're expecting a container to contain nothing but type Foo, SOMETHING has to check it. We're just sweeping the difficulty to the caller if he has to do Array[Foo].new. 16:53
timotimo either that or you use the "where" or a named subset that has the check within it
github.com/zoffixznet/perl6-Subset-Helper - perhaps this is also interesting to you 16:54
ccc Yes I've played around with subset already. 16:55
timotimo if you want to, you can invert the responsibilities and have your library call a user-provided function and pass the container they want the user to fill 16:56
ccc If I'm designing an API for a module, I believe it's my duty to take care of the tedious little gotchas. It shouldn't be dumped on the user of the module.
timotimo right, which it won't be if you use subsets, right?
that was worded kind of poorly
the "tell don't ask" principle, or something 16:57
which is also good for multithreaded stuff, because it's easier to not mess up data accesses
i wish i remembered what talk it was from, jnthn had mentioned that in one place; probably the "8 ways to do concurrent programming" one? in the section about actors and monitors? 16:59
jnthn Thanks for multi-dispatch, it's entirely possible to have an API that both efficiently handles Array[Int] (e.g. O(1) check) *and* has a candidate that delegates to that doing the O(n) check.
yoleaux 12:15Z <Zoffix> jnthn: RE github.com/perl6/roast/commit/8b5e39093 Do you think there's some similarity between Lock::Async.lock/.unlock and IO::Handle.lock/.unlock? Because in that commit we spec Lock::Async.unlock to throw if not locked, but IO::Handle.unlock silently does nothing. Was wondering if this asymetry is acceptable.
jnthn oops, *thanks *to* multi dispatch
timotimo wow, that was a *fast* response to me mentioning you
jnthn hah, was just glancing the converstaion :) 17:00
timotimo convertion station?
jnthn *conversation :P
Yes, there's a mention of tell don't ask in that talk; also there's probably at least as much on it in my Objects ∩ Concurrency talk :) 17:01
pmurias jmerelo: I didn't even notice that flattening was described in more detail in the List class documentation
timotimo then that's potentially the better one
i should ingest more talks about design in that kind of space, surely 17:02
jmerelo pmurias: there's almost always the two parts: a detailed method-by-method documentation, and then a tutorial. Anyway, if you find something missing, please reformulate. Or if it's not clear enough that flattening was described there with more detail.
pmurias "except when they are not itemized or they are the single argument to an operation such as append:" seems unclear what operations flatten 17:03
17:05 bluezinc21 joined, bluezinc21 left
jmerelo pmurias: please clarify that in the issue, if you don't mind. 17:05
jnthn .tell Zoffix Both Lock and Lock::Async will complain about unlock while not held (difference being that Lock::Async isn't recursive). Both of those are in-process locks. File locks are just calling some OS-provided API; I'm guessing it doesn't error out, or we ignore the error. So we'd have to try to track it ourselves, though I don't know if we can without making a new gotcha. Needs exploring some more.
yoleaux jnthn: I'll pass your message to Zoffix.
pmurias jmerelo: how should I reference particular unclear sentences? 17:06
quote them?
jmerelo pmurias: yep, that would help.
17:07 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel
pmurias jmerelo: doing the split between tutorial and reference documention purely in the way that method references are reference material and other pages are tutorial does seem to have problems 17:08
17:08 shareable6 joined, ChanServ sets mode: +v shareable6, bloatable6 joined, greppable6 joined, ChanServ sets mode: +v greppable6 17:09 p6bannerbot sets mode: +v shareable6
pmurias the per type pages seem to be gathering cookbook style hints and the tutorial pages are sometimes growing long lists of exhaustive variants of things 17:09
17:09 p6bannerbot sets mode: +v bloatable6
jmerelo pmurias: it certainly does. Sometimes methods include several examples, and, well, "tutorialize" as long as there's not a lot of other concepts in there. 17:09
17:09 p6bannerbot sets mode: +v greppable6
jmerelo pmurias: that's the style of some of the doccers, yes. I mean, style is not uniform. 17:10
pmurias: that means that reference is sometimes too much tutorialish and tutorials too much referenceish.
17:11 graphene left
jmerelo pmurias: but changing to another kind of structure would be huge, and given current resources, simply will not be done. So we have to make do improving what we can, given current organization. 17:11
17:12 graphene joined 17:13 p6bannerbot sets mode: +v graphene
pmurias jmerelo: splitting up some pages into reference documentation and tutorial could be done on invidual basis 17:19
it's not something that requires some kind of huge one time investment 17:20
jmerelo pmurias: as long as we know which ones we should split, that's correct. 17:25
17:29 khisanth_ left 17:43 khisanth_ joined 17:44 p6bannerbot sets mode: +v khisanth_ 17:55 dogsec24 joined, dogsec24 left, statisfiable6 joined 17:56 p6bannerbot sets mode: +v statisfiable6 17:58 andrzejku left, jemershaw16 joined 17:59 p6bannerbot sets mode: +v jemershaw16 18:03 AlexDaniel left 18:04 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 18:06 jemershaw16 left, pmurias left 18:10 pmurias joined, p6bannerbot sets mode: +v pmurias 18:15 Gruber is now known as Grrrr 18:20 jmerelo left 18:25 Kaiepi joined 18:26 p6bannerbot sets mode: +v Kaiepi 18:28 Kaiepi left 18:29 Kaiepi joined 18:30 p6bannerbot sets mode: +v Kaiepi 18:34 Kaiepi left 18:41 Kaiepi joined, pmurias left 18:42 p6bannerbot sets mode: +v Kaiepi, pmurias joined, p6bannerbot sets mode: +v pmurias
mst glot.io/snippets/f59gs0jd0d 18:46
does rakudo not try and spot things like that given the type info available?
18:47 petercommand joined, p6bannerbot sets mode: +v petercommand
masak mst: not yet, no 18:51
mst ah
masak there's plenty of low-hanging fruit there that doesn't happen at compile time 18:52
not sure your case is the lowest-hanging, since it seems to rely on propagation of type information along the execution flow... but still, static typechecking has a long way to go in Rakudo 18:53
I'm not aware that the spec says much about static typechecking one way or another
18:59 domidumont left 19:04 zxcvz joined 19:05 p6bannerbot sets mode: +v zxcvz, pmurias left 19:07 pmurias joined, p6bannerbot sets mode: +v pmurias 19:19 damaxi joined 19:20 p6bannerbot sets mode: +v damaxi 19:23 wac16 joined 19:24 p6bannerbot sets mode: +v wac16 19:29 wac16 left 19:36 pmurias left 19:37 pmurias joined, p6bannerbot sets mode: +v pmurias 19:38 pmurias left 19:42 pmurias joined, p6bannerbot sets mode: +v pmurias
jnthn masak: I think successive versions of the spec (that is, test suite) will gradually add more things as being detected at compile time; the introduction of such things needs to happen at langauge version boundaries, though. 19:45
masak: It's fair to say that hasn't been a particular focus so far, though. 19:46
19:51 pmurias left 19:53 zuzabrik joined, zuzabrik left 19:54 kurahaupo left 19:55 kurahaupo joined, vike1 joined, p6bannerbot sets mode: +v kurahaupo 19:56 p6bannerbot sets mode: +v vike1, pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias masak: re static type checking, a big problem with that is that you can either disallow programs or allowed type errors at runtime 19:58
* disallow valid programs
masak jnthn: apologies, my use of "the spec" is archaic. I meant the synopses.
pmurias: would it be so bad to disallow mst's example program at compile time instead of failing at run time? 19:59
pmurias: I don't think I see your point about a big problem
jnthn pmurias: We may indeed make some programs fail by detecting problems they never concretely run into at runtime, yes, thus my comment about why extra checks want to come in at language version bumps. 20:00
masak oh right, true 20:01
pmurias masak: I mean you can either add a static type system *or* catch some type errors in an adhoc manner
masak agree it makes sense to turn on such strictures either behind a pragma, or at version boundaries
jnthn I don't really understand the statement "add a static type system". Perl 6 *has* a type system. We don't currently perform many possible analyses that it makes possible. 20:02
(Compile time analyses, to be clear) 20:03
20:03 pmurias left
jnthn But rather defer all enforcement until runtime. Bringing forward the point that we detect problems isn't adding a static type system, it's just better exploiting the one we have. 20:03
20:04 kurahaupo left, kurahaupo joined
masak it is a good point though that an improved static type system might start flagging up things that never actually caused problems in a working program 20:05
20:05 p6bannerbot sets mode: +v kurahaupo
jnthn Indeed. 20:06
hahainternet would ♥ to see improved static typing 20:07
jnthn Ah well, something to take some steps on for 6.e :)
20:10 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias jnthn: by adding a static type system I mean in the sense we could have a TypeScript like TypedPerl6 slang that would enforce type safety at compile time 20:13
jnthn: as opposed to the compiler catching obvious runtime errors at compile time
jnthn pmurias: That could happen *too*, but there's already bags of scope for doing more in core. 20:14
pmurias: With the type system we already have in the langauge.
Of course, I've no objections to somebody working on a slang like you describe also. :)
diakopter jnthn: typo "thanks to these change." 20:15
jnthn Where?
oh, I found it 20:16
pmurias is changing the type hierarchy at runtime disallowed in Perl 6?
jnthn In the default MOP, we don't really allow for that. Nobody has terribly missed it. :) 20:17
jnthn afk for a bit 20:18
diakopter: Fixed, thanks
pmurias has think if that would allow any crazy optimizations for the js backend :) 20:21
Xliff_ What's the latest release of rakudo? 20:28
El_Che 09 20:29
20:33 damaxi left 20:43 pecastro left 20:47 pecastro joined 20:48 p6bannerbot sets mode: +v pecastro 20:50 kurahaupo left 20:51 kurahaupo joined
Xliff_ Does anyone know why this error would come up in stage parse? 20:51
Cannot look up attributes in a GTK::RadioToolButton type objec
20:52 p6bannerbot sets mode: +v kurahaupo
timotimo Xliff_: does it point to anywhere specific if you use --ll-exception? 20:54
Xliff_ Will check
Yes, but even with that location, the error makes no sense. 20:58
Found it. The problem was using ::?CLASS.name in the DEPRECATED trait message. 21:11
21:26 zonum9 joined, zonum9 left
timotimo ah, instead of .^name? 21:26
and for some reason the class also had a "name" method? 21:27
Xliff_ Yeah. Belonging to the top-level superclass. 21:28
So does ::?CLASS just replace the current class type object? 21:29
I thought it was a meta object.
21:30 lichtkind joined
timotimo you mean represent? 21:31
i do believe you get the type object from it
21:31 p6bannerbot sets mode: +v lichtkind 21:37 leont joined, p6bannerbot sets mode: +v leont 21:43 fcbsd19 joined, p6bannerbot sets mode: +v fcbsd19 21:46 kybr_ left, kybr joined 21:47 p6bannerbot sets mode: +v kybr 21:48 fcbsd19 left 21:50 quester joined, p6bannerbot sets mode: +v quester
geekosaur m: dd ::?CLASS 21:56
camelia 5===SORRY!5=== Error while compiling <tmp>
No such symbol '::?CLASS'
at <tmp>:1
------> 3dd ::?CLASS7⏏5<EOL>
geekosaur guess that follows
22:02 panicbit joined 22:03 p6bannerbot sets mode: +v panicbit 22:08 pmurias left 22:12 sena_kun left 22:47 Graypup_ joined, Graypup_ left 22:53 kensanata joined, p6bannerbot sets mode: +v kensanata 23:16 pecastro left 23:23 rindolf left 23:25 sclv8 joined 23:26 p6bannerbot sets mode: +v sclv8 23:30 sclv8 left 23:34 zampa8 joined, zampa8 left 23:51 kensanata left 23:53 graphene left 23:54 mfa29810 joined 23:55 graphene joined, p6bannerbot sets mode: +v graphene 23:57 mfa29810 left 23:59 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh