»ö« 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.
ctilmes tony-o: I use DB::Pg a lot. It is the most mature and most tested. DB::MySQL and DB::SQLite are based on code extracted from DB::Pg, but are less tested themselves. 02:12
tellable6 2019-10-07T18:36:31Z #perl6 <tony-o> ctilmes how production ready do you suppose
2019-10-07T18:36:48Z #perl6 <tony-o> ctilmes DB::MySQL is?
cpan-p6 New module released to CPAN! Tomtit (0.1.5) by 03MELEZHIK 02:45
guifa Someone joking talked about using ¿? and ¡! as circumfixes and tried it out. The ¿? works fine but ¡ ! doesn’t for some reason, even though I’m fairly certain they have the same level of precedence 04:24
Ah, it’s because ! is a meta operator, but if there’s no operator coming after it, but there is a defined circumfix using !, perhaps the grammar is failing too quickly to try to provide that helpful error message? 04:27
Geth_ doc: d1c5b4ccf4 | (JJ Merelo)++ | doc/Language/grammars.pod6
Includes the example and explanation

Adding commentary line complicated the grammar a bit too much, and I wasn't clear what the message was anyway. I guess that for exemplifying the reuse of grammars and corresponding actions it's OK, as well as for showing off some kinda complicated grammars.
This closes #1759, if this is not what you were looking for, feel free to clarify and reopen.
05:49
synopsebot Link: doc.perl6.org/language/grammars
Xliff m: class A { has $.able = 2; has $.baker = 'β'; }; say A.new».<able baker> 05:55
camelia Type A does not support associative indexing.
in block <unit> at <tmp> line 1
Xliff m: class A { has $.able = 2; has $.baker = 'β'; }; my $a = A.new; say <able baker>».&{ $a."$_"() } 05:57
camelia (2 β)
Xliff m: class A { has $.able is rw = 2; has $.baker is rw = 'β'; }; my $a = A.new; <able baker>».&{ $a."$_"() } = ('ni', 'mo'); say <able baker>».&{ $a."$_"() } 05:57
camelia Cannot assign to a readonly variable or a value
in block <unit> at <tmp> line 1
Xliff m: class A { has $.able is rw = 2; has $.baker is rw = 'β'; }; my $a = A.new; <able baker>».&{ return-rw $a."$_"() } = ('ni', 'mo'); say <able baker>».&{ $a."$_"() } 05:58
camelia Attempt to return outside of any Routine
in block <unit> at <tmp> line 1
Xliff m: class A { has $.able is rw = 2; has $.baker is rw = 'β'; }; my $a = A.new; <able baker>».&{ sub { return-rw $a."$_"() } } = ('ni', 'mo'); say <able baker>».&{ $a."$_"() }
camelia Cannot modify an immutable Sub (sub { })
in block <unit> at <tmp> line 1
Xliff m: class A { has $.able is rw = 2; has $.baker is rw = 'β'; }; my $a = A.new; <able baker>».&{ sub { return-rw $a."$_"() }() } = ('ni', 'mo'); say <able baker>».&{ $a."$_"() } 05:59
camelia Use of uninitialized value $_ of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in sub at <tmp> line 1
No such method '' for invocant of type 'A'. Did you mean any of the…
Xliff m: class A { has $.able is rw = 2; has $.baker is rw = 'β'; }; my $a = A.new; <able baker>».&{ sub { return-rw $a."$^a"() }($_) } = ('ni', 'mo'); say <able baker>».&{ $a."$_"() }
camelia No such method 'able' for invocant of type 'Str'. Did you mean any of these?
abs
all

in sub at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { has $.able = 2; has $.baker = 'β'; }; my $a = A.new; ($a, $b) = <able baker>».&{ $a."$_"() }; $a.say; $b.say 06:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3s $.baker = 'β'; }; my $a = A.new; ($a, 7⏏5$b) = <able baker>».&{ $a."$_"() }; $a.s
Xliff m: class A { has $.able = 2; has $.baker = 'β'; }; my $a = A.new; my ($a, $b) = <able baker>».&{ $a."$_"() }; $a.say; $b.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Redeclaration of symbol '$a'
at <tmp>:1
------> 3 $.baker = 'β'; }; my $a = A.new; my ($a7⏏5, $b) = <able baker>».&{ $a."$_"() }; $a
expecting any of:
shape declaration
Xliff m: class A { has $.able = 2; has $.baker = 'β'; }; my $A = A.new; my ($a, $b) = <able baker>».&{ $A."$_"() }; $a.say; $b.say 06:01
camelia 2
β
Geth_ doc: a3b39c4f32 | (JJ Merelo)++ | doc/Language/grammars.pod6
No tabs
synopsebot Link: doc.perl6.org/language/grammars
sarna hello, is there any html parser written in raku, or do I have to resort to inline::perl5? 06:09
Xliff sarna: There's HTML::Marser::XML. Don't know how good that is. 06:10
sarna I found bindings for Gumbo too, I'll try both 06:11
thanks Xliff
Geth_ doc: sarna++ created pull request #3047:
Fix wrong output
07:06
sarna oh geez that's me 07:08
Geth_ doc: 2c35861159 | sarna++ | doc/Language/list.pod6
Fix wrong output
07:16
doc: bec6bdb7c0 | sarna++ (committed using GitHub Web editor) | doc/Language/list.pod6
Merge pull request #3047 from sarna/master

Fix wrong output
synopsebot Link: doc.perl6.org/language/list
Geth_ modules.perl6.org: d17c8c140e | (Roman Baumer)++ | update-modules.perl6.org
pngcrush chech refine
07:29
antoniogamiz o/ 08:05
m: say "/a/".Regex 08:06
camelia No such method 'Regex' for invocant of type 'Str'
in block <unit> at <tmp> line 1
antoniogamiz how can i convert strings to regexs? mm
m: my $regex="a?"; say "a" ~~ /$regex/ 08:08
camelia Nil
antoniogamiz mmm
Xliff m: my $regex="a?"; say "a" ~~ / "$regex" / 08:10
camelia Nil
Xliff m: my $regex="a?"; say "a" ~~ / { $regex } /
camelia 「」
Xliff m: my $regex="a?"; say "a" ~~ / a? /
camelia 「a」
Xliff m: my $regex="a?"; say "a" ~~ / <{ $regex }> /
camelia 「a」
Xliff ^^
antoniogamiz uoh, thanks a lot! :D 08:11
Xliff :)
AlexDaniel Gumbo is pretty great, especially now given that the segfaults were fixed 11:01
Xliff Gumbo? 11:05
HTML parsing lib?
How is that compared to Mojo::DOM?
jast no segfaults sounds like a great feature for sure :-)
AlexDaniel Xliff: I'm pretty sure it's much faster and it handles slightly broken html better 11:42
Xliff Ah. 11:43
sarna hey, is there a way to install all packages from the "depends" section in META6.json? 12:21
with zef/mi6/some other tool
Xliff zef --install-deps .
sarna thanks!
doesn't work :D 12:22
Xliff What error did it give you?
sarna it printed usage
Xliff Are you in the directory with the META6.json?
sarna yes
lizmat old version of zef ?
sarna 0.7.1 12:23
Xliff I'm on 0.7.4
lizmat --deps-only
sarna damn, alright
Xliff Ah --deps-only. My bad.
lizmat Xliff: fwiw, you're suggestion made complete sense to me :-) 12:24
*your
Xliff Ah! --serial exists! 12:24
Wish there were configurable options. I would make that default.
sarna okay, this one works :) thanks y'all 12:25
pmurias . 13:06
tellable6 2019-10-07T17:17:06Z #perl6 <SmokeMachine> pmurias: look how interesting: perl6.github.io/6pad/#9789cd026063...7aaa2d489f
SmokeMachine pmurias: has the ->result hanged for you on $p4? 13:14
rindolf3 Hi all. 13:15
pmurias SmokeMachine: I'm checking that out
SmokeMachine: take a long time to load on my crappy mobile internet 13:16
rindolf3: hi
* takes
rindolf3 TimToady: and all! Hi: hope i''m not trolling but I think we might as well admit that the perl 6 implementation and that the perl 6 deskign takes too long to implement and will take too long to reimplement every time. perhaps let's do a "third system design" of some less ambitious and less perfect but more realizable design. 13:17
pmurias rindolf3: there have been various mini Perl6s in the past and people didn't really seem to be interested in them 13:21
Xliff rindolf3: Why try another implementation when the current one works fine?
rindolf3 Xliff: we will need to redo it sometimes in the future 13:30
Xliff rindolf3: And I ask again... why? 13:32
rindolf3 Xliff: perhaps we can admit that perl 5 competitors like python, ruby, julia, go, JS, typescript, etc. are decent enough, and that we can recommend people to use them instead of p5 or in addition to it, and many of them were inspired by p5 to a certain degree. 13:32
Xliff I would recommend that someone use the right tool for the job. 13:33
And the current implementation of Perl6 is rapidly becoming an option as the "right tool" for many jobs. 13:34
rindolf3 Xliff: i actually used Inline::Python to embed hspell.ivrix.org.il/ into my perl 5 code
Xliff And while Python, Julia, Go and the rest have their strengths and weaknesses, I think Perl6 covers more bases than any single language I have used.
rindolf3 well, think about it
so far it seems I won't waste too much time writing my euler solutions in p6. 13:35
Xliff What is the deficiency you are running into?
SmokeMachine rindolf3: Sorry, but I can't understand (probably my terrible english's fault), what are you suggesting? 13:36
Xliff rindolf3: Do you have example euler code in Perl 5?
pmurias rindolf3: who do you mean as "we", in your admit suggestion
rindolf3 SmokeMachine, Xliff: yes, the code performs slower than p5, cpy3 and usually much slower than pypy 13:37
Xliff Ah!
jnthn Despite many folks making the waterfall model the butt of their jokes, it's surprising how many of them seem to think language design/implementation happens that way, rather than implementation feeding back into design, until they converge on something implementable and good to use.
Xliff Now I understand.
rindolf3 pmurias: the perl 6 design community 13:38
Xliff rindolf3: Have you tried implementing thise solutions in nqp?
rindolf3 Xliff: nqp is unreadable
Xliff: and requires a lot more work
Xliff rindolf3: Ah. 13:39
rindolf3 Xliff: I think zoffix implemented it once or twice for me
Xliff rindolf3: Can you show me some of the euler code you did in perl6?
Or even perl5?
sena_kun if one wants to make moarvm+rakudo slower, one needs to help or sponsor its development. there are already cases when Perl 6 performance is on par or better with other languages and it is pretty clear that other parts of it can be improved.
jnthn sena_kun: I hope you mean "faster" ;) 13:40
Xliff heh
sena_kun you don't need to throw everything away and start from scratch again and again, just polish the thing we already have
rindolf3 Xliff: anyway, I also have decided to stop using mageia because mageia cauldron is not as good as fedora and it has a much smaller community
sena_kun jnthn, ah, indeed
:)
pmurias rindolf3: I'm sure a lot of the members of the Perl 6 design community consider a lot of other languages decent enough for use 13:41
rindolf3: but I don't see a collective "recommendation" accomplishing anything
rindolf3 Xliff: sooner or later ppl can admit they were wrong: www.shlomifish.org/humour/Selina-M...-to-selina
Xliff rindolf3: Code? 13:42
rindolf3 Xliff: sorry - itis a private repo due to PE policy
Xliff Ah. 13:43
What about some of the things Zoffix helped you with?
Are those anywhere?
rindolf3 Xliff: i can share after i get back home - i''m at the ward now
Xliff OK.
rindolf3 Xliff: they should be
Xliff m: sub lpf($n is copy) { for 2, 3, *+2 ... * { while $n %% $ { $n div= $; return $_ if $_ > $n }; }; }; lpf( 600_851_475_143 ) 13:46
camelia (timeout)
Xliff Hmmm...
According to this page, that should have completed in 2.6 seconds -- perl6advent.wordpress.com/2012/12/...ect-euler/
m: sub lpf($n is copy) { for 2, 3, *+2 ... * { while $n %% $_ { $n div= $_; return $_ if $_ > $n }; }; }; lpf( 600_851_475_143 ) 13:47
camelia ( no output )
Xliff m: sub lpf($n is copy) { for 2, 3, *+2 ... * { while $n %% $_ { $n div= $_; return $_ if $_ > $n }; }; }; lpf( 600_851_475_143 ); say now - BEGIN now
camelia 0.12019765
Xliff m: sub lpf($n is copy) { for 2, 3, *+2 ... * { while $n %% $_ { $n div= $_; return $_ if $_ > $n }; }; }; say lpf( 600_851_475_143 ); say now - BEGIN now
camelia 6857
0.14821175
Xliff There we go.
Note the difference 7 years makes.
2.6s down to 0.14s
m: sub lpf($n is copy) { for 2, 3, *+2 ... * { while $n %% $_ { $n div= $_; return $_ if $_ > $n }; }; }; say lpf( 600_851_475_143 ); say now - INIT now 13:48
camelia 6857
0.081017
Xliff And that result eliminates parsing time.
sena_kun .oO ( and this is without PEA ) 13:49
SmokeMachine PEA?
sena_kun partial escape analysis, en.wikipedia.org/wiki/Escape_analysis
Xliff [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map *.list ==> grep * > 1000000 ==> elems ==> say; say now - INIT now 13:50
m: [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map *.list ==> grep * > 1000000 ==> elems ==> say; say now - INIT now
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix ==> instead.
at <tmp>:1
------> 3.list ==> grep * > 1000000 ==> elems ==>7⏏5 say; say now - INIT now
Xliff m: [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map *.list ==> grep * > 1000000 ==> elems() ==> say; say now - INIT now
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1…
Xliff m: [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map *.list ==> grep * > 1000000 ==> elems() ==> say(); say now - INIT now
camelia 0
0.02288661
Xliff m: [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map: *.list ==> grep: * > 1000000 ==> elems() ==> say(); say now - INIT now 13:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3p, 0] } ... * ==> (*[0..100])() ==> map:7⏏5 *.list ==> grep: * > 1000000 ==> elems(
expecting any of:
colon pair
Xliff m: [1], -> @p { [0, @p Z+ @p, 0] } ... * ==> (*[0..100])() ==> map *.list ==> grep * > 1000000 ==> elems() ==> say(); say now - INIT now 13:55
camelia 0
0.02185019
Xliff I don't think I've got the invocation of that right.
pmurias SmokeMachine: I'll investigate what's wrong with the promises 13:56
SmokeMachine: ahh, it seem the Perl 6 Promises are broken/NYI 14:00
will investigate further 14:01
SmokeMachine pmurias: but that happened for you too? 14:11
pmurias SmokeMachine: yes the same thing 14:21
AlexDaniel rindolf3: you're not entirely wrong, I can probably agree that we can simplify things a little bit by deprecating and then removing some parts or features 14:29
but I don't think that'll really make it easier to implement the language, it'll just make it a little bit smaller and maybe more consistent 14:30
AlexDaniel I also wouldn't mind if somebody creates a speed-oriented compiler that implements a subset of Raku. Why not! 14:33
moritz niecza!
AlexDaniel but rakudo is already fast enough for all the things I do, and it is constantly getting faster
AlexDaniel so it'll be a bit tough to sell that to me, maybe if it can produce code for microcontrollers or something then I'll use it 14:34
rindolf3: for example, have you seen this? www.youtube.com/watch?v=QNeu0wK92NE 14:36
pmurias AlexDaniel: implementing a tiny subset of Perl 6 that runs super fast is certainly doable 14:37
AlexDaniel pmurias: it was actually attempted just recently, I just can't remember the name of the thing…
pmurias AlexDaniel: but just simplifing it a bit won't help significantly
AlexDaniel it also wasn't open-source
pmurias AlexDaniel: forgot a name of that to lua thing, but I remember that too 14:38
AlexDaniel ah, this thing: twitter.com/agentzh/status/826922812099043328
moon_child AlexDaniel: sounds like nqp 16:14
tony-o .tell ctilmes something is up with the DB::MySQL , it is flapping segfaults, works fine, and randomly exiting on OSX, it seems a lot more stable on linux but i'm still testing 17:32
tellable6 tony-o, I'll pass your message to ctilmes
ctilmes tony-o: I develop under linux, but appreciate any guidance to bugs you can narrow down 17:44
tellable6 2019-10-08T17:32:12Z #perl6 <tony-o> ctilmes something is up with the DB::MySQL , it is flapping segfaults, works fine, and randomly exiting on OSX, it seems a lot more stable on linux but i'm still testing
nino_ so I read perl is dying, any comments?
Kaiepi is it that article that was on hn 17:46
guifa Programming languages don’t really die, particularly ones that have been around as long as perl has. There are people still using COBOL and FORTRAN for crying out loud 17:48
vrurg With regard to that article, we have a good proverb on this: dogs barking, caravan is walking. 17:50
Dogs always bark... 17:51
Kaiepi print in perl 5 does the same thing as it does in perl 6 wrt newlines, right? 17:56
guifa Indeed 17:57
Kaiepi aight, so i thought that article was pretty silly when they say it's hard to tell what code written in it is doing, then explain what print does wrong. of course it'd be hard to tell what it's doing if you can't write hello world with it 17:58
guifa The difference comes in when you add in say 18:01
say in P5 is (AFAIA) just print + NL
in P6, say/put have NL, print does not. say reads from .gist, put/print from .Str 18:02
tobs m: $*OUT.nl-out = "\r\n"; say "Content-Type: text/plain" # can also set the line separator for a stream 18:14
camelia Content-Type: text/plai
tobs P5 has $\ to which print, not say, reacts I think 18:15
[Coke] m: say "\xA66E" 18:18
camelia
[Coke] m: say "\xA66E".charnames 18:47
camelia No such method 'charnames' for invocant of type 'Str'
in block <unit> at <tmp> line 1
[Coke] m: say "\xA66E".uninames 18:49
camelia (CYRILLIC LETTER MULTIOCULAR O)
cpan-p6 New module released to CPAN! LibCurl (0.9) by 03CTILMES 20:08
Xliff . 20:09
Xliff m: class A { method A { say $*PACKAGE.WHICH }; }; A.a; A.new.a 20:46
camelia No such method 'a' for invocant of type 'A'. Did you mean 'A'?
in block <unit> at <tmp> line 1
Xliff m: class A { method A { say $*PACKAGE.WHICH }; }; A.new.a
camelia No such method 'a' for invocant of type 'A'. Did you mean 'A'?
in block <unit> at <tmp> line 1
Xliff m: class A { method a { say $*PACKAGE.WHICH }; }; A.new.a
camelia Failure|75623200
Xliff m: class A { method a { say $*PACKAGE.WHICH }; }; A.a; A.new.a
camelia Failure|78780160
Failure|78935320
Xliff m: class A { method a { say $*PACKAGE }; }; A.a; A.new.a
camelia Dynamic variable $*PACKAGE not found
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: class A { method a { say ::?CLASS.WHICH }; }; A.a; A.new.a 20:47
camelia A|U78873760
A|U78873760
Xliff m: my %h = ( a => 1, b => 2, c => 4 ); my %d = %h; my @a = ( %d.pairs.map({ .value *= 2; .clone }).flat ); %d.pairs.say; h.pairs.say; 20:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
h used at line 1
Xliff m: my %h = ( a => 1, b => 2, c => 4 ); my %d = %h; my @a = ( %d.pairs.map({ .value *= 2; .clone }).flat ); %d.pairs.say; %h.pairs.say;
camelia (a => 2 c => 8 b => 4)
(b => 2 a => 1 c => 4)
Geth_ doc: gdonald++ created pull request #3048:
Roles can also be mixed in using 'is'.
22:57
guifa literally just wrote “Dateish-ish” in a comment 23:00
vrurg .ask jnthn I'd like to merge R#3199 if you don't mind of .-, .?+, and .?- operators. 23:16
synopsebot R#3199 [open]: github.com/rakudo/rakudo/pull/3199 [WIP][roles] [WIP] Implement perl6/problem-solving#103
tellable6 vrurg, I'll pass your message to jnthn
guifa Okay, here comes a typical guifa-can’t-decide-what-to-name-something 23:53
For some of the calendars I’m implementing there’s the possibility for there to be a margin of error for certain functions 23:54
Xliff guifa: FuzCal? 23:54
:)\
guifa Haha
Xliff *:)
guifa More or less actually. I thought margin of error, but that’s normally thought of as a percentage 23:55
But for me it’ll be given as a range value (e.g. -1..2) so margin-of-error doesn’t quite sound right. .spread, .accuracy, .precision are all short but don’t quite seem accurate 23:56
.potential-deviation sounds … long
Xliff RangeCal?
RangeDates? 23:57
guifa The roll will get applied to an Int
Xliff You mean role? 23:58
guifa so like, $date.day-of-year would return “2 but PotentialError.new(-1..2)”
And then one could use it as an Int (and get 2), but also say $foo.potential-error-range and get -1..2 23:59
Xliff DayRange?