»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 May 2018.
00:00 lizmat left 00:22 jeromelanteri joined 00:24 telex joined
Util I am speaking on Perl 6 in 14.5 hours. If anyone would like to review, I would welcome your thoughts. 00:31
hack.p6c.org/~util/secret.pdf
Please don't distribute this version that contains speaker notes.
TIA!
raschipi Util: did you actually roll a dice? 00:36
Util: In page 40, it says it's choosing from 20 sides, but it's from 6 sides. 00:41
Util: On page 95: "We have improved them so much, they extend up into full parser." Perl5 also extended it's regex engine to be a full parser, it's just the worst thing to actually use. 00:48
lucs How do I declare a var that can hold for example an Int or a Foo?
lookatme my $bar where * ~~ Int | Foo; ? 00:49
or using subset
lucs Okay, cool. Thanks. 00:50
00:51 lindylex joined
raschipi subset IntorStr of Any where * ~~ Int | Str; my IntorStr $x; 00:51
lucs Neat, thanks.
Really Cool, eh :) 00:52
raschipi If you are planning on using that in a signature, you can also go with multidispatch 00:57
01:00 lindylex left
lucs raschipi: Yep. 01:01
raschipi multi foo (Int $x) { say "Int"; samewith ~$x }; multi foo (Str $x) { put $x }; foo 3; foo 'a' 01:04
evalable6 Int
3
a
raschipi multi foo (Int $x) { say "Int"; samewith ~$x }; multi foo (Str $x) { put $x }; foo <3>
m: multi foo (Int $x) { say "Int"; samewith ~$x }; multi foo (Str $x) { put $x }; foo <3> 01:05
camelia Ambiguous call to 'foo(IntStr)'; these signatures all match:
:(Int $x)
:(Str $x)
in block <unit> at <tmp> line 1
01:06 Kaiepi joined
raschipi Or you can add a Numeric method to foo and then cast in the signature, TIMTOADI after all. 01:06
01:06 Kaiepi left 01:09 Kaiepi joined 01:12 benjikun joined
raschipi Util: "Texas", we don't call them Texas anymore 01:12
01:22 Kaypie joined, Kaiepi left 01:24 benjikun left, benjikun joined 01:33 Aceeri_ joined
timotimo Util: it might be you really want to show off sort with a single argument, but you could also .roll(5).sort.tail(3) 01:42
also, we no longer require the \ at the end of the line to make method calls go in the next line! \o/
Util raschipi, timotimo: Thanks! 01:45
There is some classic blunder related when coders are holding forth on bad code they have inherited.
The "I rolled a die" line is from my (flawed) memory of such a story.
*I* did not roll, I just made a reference which is perhaps too obscure. I cannot find it on DailyWTF.
01:45 molaf_ joined
timotimo it's an xkcd actually 01:45
well, there is an xkcd with that exact thing in it
raschipi xkcd.com/221/
Not too obscure since at least two people here knew the exact source... 01:46
Util That may be where I know it from. Woohoo!
(I *did* remember the right integer) :^) 01:48
raschipi Util: The only thing I'm missing from your slides a conclusion. You start with a good introduction, goes into examples and then it just ends.
timotimo m: .say for "1 2 3 4 5 6 7 8 9 10 11 12".match(:g, / <{ 3 .. 11 }> /)
camelia 「3」
「4」
「5」
「6」
「7」
「8」
「9」
「10」
「11」
timotimo Util: how much better is that for your tokens year, month, and day? :) :)
though not sure if it does anything with fancy unicode numbers, but <.digit> also does that, doesn't it? 01:49
01:49 jeromelanteri left
timotimo oh, you want 01 there 01:49
m: .say for "01 02 03 04 05 06 07 08 09 10 1 2 3 4 5 6 7 8 9 10 11 12".match(:g, / <{ "03" .. "11" }> /) 01:50
camelia 「01」
「02」
「03」
「11」
「12」
timotimo nope.
forget i said anything ;)
Util raschipi: Slides 165-167 are the "reveal" of where I have been going with my narrative.
raschipi Just need to tie that into the introduction, then. Just conclude the good design leads to a qualitative change on how people program. 01:52
timotimo Util: on page 118, the palindrome one, you can actually omit the parens before the method call if you put a space before the .
m: say ^100 .grep({ $_ eq .flip }).elems
camelia 19
Util timotimo: I looked at matching '01'..'12'. Look at how they have changed it (while I was not looking):
m: say ("01".."12").list;
camelia (01 02 11 12)
timotimo m: say flat("01".."09", "10".."12") 01:53
camelia (01 02 03 04 05 06 07 08 09 10 11 12)
timotimo m: say "01" ... "12" 01:54
camelia (01 02 11 12)
timotimo ok, ... doesn't do it differently 01:55
m: say "01", *.succ, ... "12"
camelia Potential difficulties:
Comma found before apparent sequence operator; please remove comma (or put parens around the ... call, or use 'fail' instead of ...)
at <tmp>:1
------> 3say "01", *.succ,7⏏5 ... "12"
12
in block <u…
timotimo m: say "01", *.succ ... "12"
camelia (01 02 03 04 05 06 07 08 09 10 11 12)
Util timotimo: re:"omit the parens" I am happy to learn that for myself. I will keep that slide as-is, since I am showing off the error. 01:56
timotimo right
on 156 the notes say "my guarantee to the compiler that they are equal size", but that sounds like the compiler will blindly trust you; it will actually throw an exception if the sizes mismatch 01:57
Util timotimo: thanks. When I gave the talk last week, I added "it will complain if they are not (of equal size). I will add it to the notes. 01:59
timotimo OK
other than that it looks like a good talk
raschipi It does look like a good talk, we're just bikeshedding the details. 02:00
timotimo i mean even the things we've mentioned aren't dealbreakers at all
Util raschipi timotimo: You have both given me several points that I intend to adopt. 02:02
raschipi: the "tie-in" I will have to think more on. I do see your point. 02:03
timotimo oh, and saying rakudo is written in itself may oversell it a little 02:05
raschipi timotimo: I disagree with you on that. Rakudo is written in Perl6, he didn't go into self-hosting where it gets a little more complicated. 02:07
timotimo but the grammar, actions, world, compiler bits are all nqp? 02:08
anyway, i'm going to sleep 02:10
have a good one, and good luck on the pres, Util :)
raschipi g'night
Util timotimo, raschipi: Much thanks! 02:14
02:41 benjikun left, benjikun joined 02:49 kjk joined
kjk I have a sub that takes a regex as an argument and smartmatch(!~~) against it. Is it possible to write my regex argument such that the sub when !~~ $myregex effectively matches the complement of $myregex 02:55
raschipi You want everything not matched by the regex? 02:59
kjk hmm, I think I'm not explaining my question clearly. Basically, I want to move the ! of !~~ into $myregex somehow
geekosaur not really. that's always been difficult for regex 03:00
kjk yeah, ic. ok thanks anyway 03:01
maybe I'll make my the parameter also accept a callable instead, that way it's not restricted to matching regex. 03:06
03:41 lizmat joined 04:00 imcsk8_ joined 04:03 Kaypie left, Kaypie joined 04:08 molaf_ left 04:09 molaf joined 04:18 molaf left
b2gills kjk: A Regex is Callable 04:22
m: sub foo ( &code ) { 'abc' ~~ &code }; say foo /b/; say foo { .contains('b') }
camelia 「b」
True
Util kjk: there might be a way using negative lookahead or negative lookbehind. See docs.perl6.org/language/regexes#Ze...Assertions 04:24
04:27 lookatme joined
kjk b2gills: yeah, I ended up making the parameter a Mu just so I can also passed in a Junction of Regex, like /abc/|/def/, while preventing autothreading (which calls my sub twice) 04:30
04:32 lookatme left, aindilis joined 04:35 sauvin joined 04:42 Aceeri_ left 04:49 lookatme joined 04:53 xtreak joined 04:54 lookatme_q joined, lookatme left 05:01 curan joined 05:12 ufobat_ joined 05:21 imcsk8_ left, imcsk8 joined 05:25 imcsk8 left 05:26 hami joined 05:27 imcsk8 joined 05:30 domidumont joined 05:36 hh__ joined 05:37 domidumont left, domidumont joined 05:38 kjk left 05:43 wamba joined, sno joined 05:47 imcsk8 left 05:48 imcsk8 joined 05:51 hh__ left 05:54 hami left 06:00 skids left 06:03 lizmat left 06:12 domidumont left 06:17 Xliff joined
Xliff \o 06:17
06:17 Xliff left 06:18 Xliff joined 06:42 HaraldJoerg joined 06:45 wamba left 06:52 darutoko joined
Geth doc: 6a1fb167a7 | (Moritz Lenz)++ | doc/Type/IO/Socket/INET.pod6
Mention where to look for UDP support
07:01
synopsebot_ Link: doc.perl6.org/type/IO::Socket::INET
07:02 lookatme_q left 07:03 robertle joined 07:16 cognominal joined, wamba joined 07:17 jmerelo joined, lookatme joined 07:20 domidumont joined 07:24 lookatme left 07:25 lookatme joined 07:27 dakkar joined 07:30 ExtraCrispy joined, lookatme left
Geth doc: ead8d75e29 | (JJ Merelo)++ | doc/Language/pragmas.pod6
Adds some `use lib` example

Which closes #2105. If the OP needs more clarification, please comment or reopen. Thanks for the report.
07:38
synopsebot_ Link: doc.perl6.org/language/pragmas
07:39 jrra joined 07:46 psychoslave_ joined 07:47 psychoslave_ left 07:48 lookatme joined
moritz .tell pmurias I just got a security alert from github that nqp/nqp depends on hoek, which has a vulnerability (CVE-2018-3728) in versions < 4.2.1. Can you upgrade please? 07:48
yoleaux moritz: I'll pass your message to pmurias.
jmerelo moritz: what is hoek? I couldn't find a single reference to it in the repo 07:51
07:52 scimon joined
jmerelo moritz: OK, I see. It's some stuff related to the JS vm, some downstream dependency... 07:54
El_Che hence, pmurias :)
07:59 ExtraCrispy left 08:00 lizmat joined 08:03 ExtraCrispy joined 08:14 pmurias joined, pmurias left 08:16 xtreak left 08:41 xtreak joined 08:47 pmurias joined, frankjh joined 09:06 jeromelanteri joined 09:16 jeromelanteri left 09:17 scimon left 09:22 scimon joined 09:26 hankache joined
hankache hello #perl6 09:26
09:27 scimon left
hankache somewhere on github there was a page that lists various editors and their level of support for Perl 6. Does anyone have the link? I can't remember which repo. 09:28
AlexDaniel hankache: github.com/perl6/user-experience/issues/19 09:31
hankache AlexDaniel Thanks 09:32
09:33 jeromelanteri joined 09:40 zakharyas joined 09:54 scimon joined 09:55 gregf_ joined 09:59 scimon left
yoleaux Zoffix: remind moritz to check if perl6.org TLS renewal worked 10:01
10:06 ExtraCrispy left, ExtraCrispy joined 10:11 damnlie joined
moritz Expires: July 14, 2018 10:12
10:16 hankache left 10:22 ExtraCrispy left 10:24 bhm joined 10:26 scimon joined 10:39 jeromelanteri left 10:41 rindolf joined 10:42 committable6 joined, reportable6 joined, benchable6 joined, greppable6 joined, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v greppable6, releasable6 joined, bloatable6 joined, ChanServ sets mode: +v bloatable6, unicodable6 joined, ChanServ sets mode: +v unicodable6 10:43 evalable6 joined, notable6 joined, nativecallable6 joined, coverable6 joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6, bisectable6 joined, squashable6 joined, quotable6 joined, ChanServ sets mode: +v quotable6, shareable6 joined, scimon left, undersightable6 joined, ChanServ sets mode: +v undersightable6
pmurias jmerelo: hoek is a dependency of a dependency, it sees we had an outdated/vulnerable version of it in the js backends dependenies of dependencies versions list 10:46
yoleaux 07:48Z <moritz> pmurias: I just got a security alert from github that nqp/nqp depends on hoek, which has a vulnerability (CVE-2018-3728) in versions < 4.2.1. Can you upgrade please?
10:47 lizmat left 10:51 jeromelanteri joined 10:53 Zoffix joined 11:10 raschipi joined 11:17 lookatme left 11:18 lookatme joined
Zoffix lucs: lookatme raschipi instead of `where * ~~ Int | Foo;` use just `where Int | Foo`. The `where` clause already smartmatches so adding a second smartmatch is redundant. Also, the `where Int|Foo` form is actually optimized into two typechecks, whereas the other form would involve invoking a callable each time 11:27
raschipi You're completely right, and I didn't even see it, just copied and pasted it. 11:28
11:32 Zoffix left
raschipi Thanks, Zoffix 11:33
ilmari didn't someone here do a blog post about the overlap between perl5 and perl6 contributors?
Geth perl6-mode: 0d3df72743 | (Tom Browder)++ (committed using GitHub Web editor) | README.md
update capability and plans
11:35
11:38 rindolf left 11:46 xtreak left
Geth perl6-mode: cf8119a28a | (Tom Browder)++ (committed using GitHub Web editor) | README.md
add reference for indentation support
11:46
11:49 xtreak joined 11:53 rindolf joined 11:55 Xliff left
buggable New CPAN upload: perl6-cache-async-0.1.3.tar.gz by ROBERTLE cpan.metacpan.org/authors/id/R/RO/...1.3.tar.gz 11:55
Geth perl6-mode: 4ad9987e25 | (Tom Browder)++ (committed using GitHub Web editor) | perl6-mode.el
add TODO note for HEREDOC indentation
11:59
perl6-mode: 88de065795 | (Tom Browder)++ (committed using GitHub Web editor) | test/test-smie.p6
add test file for HEREDOC indentation
12:07
tbrowder_ anyone here use emacs and perl6-mode? i’m going to try to fix HEREDOC indentation and need some user feedback. 12:09
AlexDaniel yes?
tbrowder_: btw what's currently the difference between github.com/perl6/perl6-mode and github.com/hinrik/perl6-mode 12:10
the one in perl6-mode has more commits I think, but which one is installed for most of the users? 12:11
hmm melpa.milkbox.net/#/perl6-mode
I guess perl6/ org one
ok
tbrowder_ when you write a HEREDOC chunk do you (1) want emacs to leave everything as is inside the HEREDOC or (2) align any text outside the left column of the ending HERE token? 12:12
to your question, our perl6-mode has diverged from henrik’s. 12:13
12:14 SHODAN left 12:16 jmerelo left
AlexDaniel tbrowder_: I expect it to do this: gist.github.com/AlexDaniel/be1ca3c...031ac304a7 12:20
El_Che releasable6: status 12:21
releasable6 El_Che, Next release will happen when it's ready. 0 blockers. 87 out of 118 commits logged
El_Che, Details: gist.github.com/3d03385d54580cfc76...8778260527
12:21 scimon joined, xtreak left
tbrowder_ AlexDaniel: what if your second line of text is indented from the rest? 12:23
Does the current behavior satisfy you? 12:24
I like my indentation preserved, at least from the leading column of the HERE token. 12:26
Later I’ll make a gist showing some examples of what I mean. Maybe we could have a HEREDOC style selector... 12:27
masak m: class C { has $!fn; method new() { my $fn = -> { say "OH HAI" }; return self.bless(:$fn) }; method foo { $!fn() } }; C.new.foo 12:33
camelia Cannot find method 'Any' on object of type List
in method foo at <tmp> line 1
in block <unit> at <tmp> line 1
masak surely I'm committing some kind of thinko above -- anyone care to enlighten me?
oh! because you can't initialize private things with .bless, d'oh 12:34
we never fixed that, did we? :)
AlexDaniel tbrowder_: I think it's not just emacs-related, and vim should probably follow the same rules too 12:35
masak m: class C { has $!fn; method new() { my $fn = -> { say "OH HAI" }; return self.bless(:$fn) }; submethod BUILD(:$!fn) {}; method foo { $!fn() } }; C.new.foo
camelia OH HAI
masak there we go.
AlexDaniel as well as other IDEs that can do perl6
raschipi AlexDaniel: I don't think vim has filetype-specific mechanisms for HERDOCS. 12:36
12:36 sena_kun joined
AlexDaniel raschipi: hmmm really? 12:37
12:51 cognominal left 12:53 ChoHag joined
timotimo Zoffix, have you seen the old page "WITCH"? "what is this character here"? it does basically what you want for the "syntax finder" except it doesn't have a search tool, just a list of clickable links and sub-pages 12:57
Zoffix, www.perlfoundation.org/perl6/index.cgi?witch
13:01 scimon left, Zoffix joined
Zoffix timotimo: thanks. No, haven't seen it before. Yeah, it's similar to what I was thinking of. 13:02
Geth doc: 9632a11ef7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
Fix a couple of typos
13:05
synopsebot_ Link: doc.perl6.org/type/Mu
13:06 hankache joined
hankache .seen lizmat 13:08
yoleaux I saw lizmat 18 Jun 2018 22:26Z in #moarvm: <lizmat> depends how you look at it
Zoffix is struggling to find the "Edit" button on the latest weekly
hankache hello Zoffix 13:09
timotimo Zoffix: i can see it, it's below all the share buttons and the related posts, where the date and author name are
though perhaps you somehow got logged out?
i see it on both the main page and the individual post page
Zoffix timotimo: I don't got enough perms to edit posts by others, I think. I see an edit button only on my own post
timotimo ah, shall i make an edit for you? 13:10
Zoffix timotimo: but anyway, the link to Perl6intro got HTTPS in it, but there's no HTTPS on the site
timotimo: github.com/hankache/perl6intro/iss...-398390992
in "looking for someone to translate his excellent Introduction "
timotimo oh, i see
updated 13:11
Zoffix timotimo++
hankache timotimo++
Zoffix: Altai-man volunteered to do the Russian translation. 13:12
Zoffix cool
timotimo should we put a note about that in the post?
hankache timotimo: I don't think that would be necessary 13:14
imho
timotimo: Can I bother you with one small edit?
timotimo sure
13:15 kjk joined
hankache My family name is Hankache. An additional c slipped in the weekly. 13:16
timotimo updated
hankache timotimo: Thanks a lot
13:16 Zoffix left 13:18 ZzZombo joined 13:19 ZzZombo left, ZzZombo joined 13:23 cognominal joined 13:26 lizmat joined 13:35 markoong joined 13:36 hankache left 13:37 skids joined 13:46 raschipi left 13:51 Kaypie left 13:53 n1ge joined 13:55 jeromelanteri left 14:00 zakharyas left 14:04 coverable6 left, benchable6 left, bisectable6 left, evalable6 left, unicodable6 left, statisfiable6 left, quotable6 left, greppable6 left, bloatable6 left, notable6 left, shareable6 left, squashable6 left, releasable6 left, reportable6 left, undersightable6 left, committable6 left, nativecallable6 left 14:11 ZzZombo_ joined
lizmat .tell hankache I've unslipped a c in the weekly 14:11
yoleaux lizmat: I'll pass your message to hankache.
14:11 webstrand joined, ZzZombo left, ZzZombo_ left, ZzZombo_ joined 14:12 molaf joined, ZzZombo_ is now known as ZzZombo 14:14 perlpilot joined, perlpilot left, ZzZombo_ joined 14:15 ZzZombo__ joined 14:16 ZzZombo_ left, ZzZombo_ joined
pmurias moritz: the warning seems to be caused by a dependency of an dependency I'm getting rid of once I merge a branch 14:17
14:17 ZzZombo left 14:18 benjikun2 joined
moritz pmurias: ok; it doesn't seem urgent. Thanks for digging into that. 14:18
14:20 ZzZombo__ left, benjikun left
Geth doc: f8b777983f | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
Fix typo in bless documentation

Changes the meaning, but should be correct according to the context.
14:23
synopsebot_ Link: doc.perl6.org/type/Mu
14:33 dogbert17 joined 14:47 scimon joined 14:58 lizmat left
scimon So I'm debating taking the talk I did at LPM on Perl6 signatures (which as I had 15 minutes only covered parameters types) and expanding it to 45 minutes and going into signatures, types and multi methods in scary details for YAPC in Glasgow. 14:58
Am I insane?
14:59 ZzZombo_ left
moritz you are, but you're not the only one 15:00
I considered writing a whole book on the subject :)
scimon This is true. 15:02
The LPM talk was mostly made by me going through the docs and trying all the different combinations of things in order to catch potential weirdness. 15:03
15:04 jmerelo joined 15:08 nativecallable6 joined, ChanServ sets mode: +v nativecallable6, greppable6 joined, coverable6 joined, committable6 joined, bloatable6 joined, notable6 joined, quotable6 joined, ChanServ sets mode: +v coverable6, ChanServ sets mode: +v committable6, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v notable6, ChanServ sets mode: +v quotable6, releasable6 joined, evalable6 joined, bisectable6 joined, ChanServ sets mode: +v bisectable6, reportable6 joined 15:10 titsuki joined, lizmat joined 15:13 curan left
scimon I have submitted my talk. Now to write my talk. ;) 15:19
15:19 wamba left 15:21 ExtraCrispy joined 15:24 domidumont left
kjk what's the recommended way to test (using Test) that a sub produces the expected output to stdout? 15:26
timotimo eco: Capture 15:27
buggable timotimo, Found 3 results: IO::Capture::Simple, Shell::Capture, IO::MiddleMan. See modules.perl6.org/s/Capture
timotimo the first one or the last one can probably help
kjk gotcha, will look into both, thanks! 15:28
timotimo there may be another package that this search didn't find, i can't quite remember 15:29
15:30 uzl joined
CIAvash[m] github.com/zoffixznet/perl6-Test-Output 15:37
timotimo ah, that looks good 15:38
kjk: ^
kjk that's perfect! thanks!
15:44 jmerelo left 15:45 Khisanth joined 16:00 wamba joined 16:07 zakharyas joined 16:09 pmurias left 16:11 [particle] joined 16:18 frankjh left 16:19 zakharyas left 16:20 robertle left 16:21 n1ge left, n1ge joined 16:24 scimon left 16:25 Andrew_ joined
buggable New CPAN upload: IP-Random-0.0.2.tar.gz by JMASLAK modules.perl6.org/dist/IP::Random:cpan:JMASLAK 16:25
Andrew_ Hello there, I'm new to perl6 (at this moment I'm lerning :D ) and I would like to know what path should I take for web dev. with perl? 16:27
lizmat Andrew_: you probably want to have a look at Cro
cro.services
El_Che Cro is hte way to go atm 16:28
timotimo github.com/jnthn/cro-webapp - cro itself doesn't have sugar for templating yet, but this is a work-in-progress that may become part of cro itself for developing web apps specifically
Andrew_ nice, thanks 16:29
but i heard something about catalystframework?
timotimo so you'll want to find a templating engine that you like, if you don't use Cro::WebApp. there shouldn't be any obstacles to just using any templating library you find
that's a perl5 framework
Andrew_ hmm 16:30
jnthn I actually have that templating engine running in production already, so it's stable in that sense at least. :-)
timotimo perl5 and perl6 are quite different, both have different strengths and weaknesses
Andrew_ so which one should i chose? 16:31
for web
between perl5 san perl6
timotimo i guess it depends on what your specific requirements are 16:32
like, do you expect very high traffic? 16:33
16:33 dakkar left
timotimo how complex is the business logic in your web app going to be? 16:33
Andrew_ high trafic and complex business :)) 16:34
timotimo i should have specified, what's "high" to you?
Andrew_ let me rephrase everything :))
I will start an intern in perl web dev in about 1 month and i wanna prepare a little 16:36
16:36 domidumont joined
timotimo ah, if you're going to be working a job, it's likely that they will employ perl5 rather than perl6 16:36
i.e. if they have existing code and are not explicitly mentioning perl6, they are likely using perl5 16:37
learning perl6 can help you become a better programmer, certainly, but since you've got a limited time budget, you should invest that in learning perl5 first, i'd imagine
Andrew_ Catalyst, Dancer2 or Mojolicious
i found these 16:38
timotimo TBH, i haven't done any perl5 yet
but those three are very popular indeed
16:38 sno left, webstrand left
Andrew_ well :)) what should i chose? 16:38
uzl Hi, everybody!
16:38 perlpilot joined
timotimo sorry, i can't help with that decision :( 16:39
timotimo AFK
Andrew_ thanks anyway
tadzik Mojolicius will allow you to write both dancer-style and catalyst-style apps
hoelzro Andrew_: I really like Mojolicious
timotimo YW, and good luck with the internship!
hoelzro (FWIW)
16:39 webstrand joined
tadzik I'd say it's a good option :) 16:39
Andrew_ okey so i should start with that
timotimo just pray to god their existing code isn't a "web app" based on CGI.pm :) 16:40
Andrew_ thank you very much!
:)) i don't know anything about that for now:D
uzl I'd like to configure the constructor "new" so that it doesn't take any arguments and create a new constructor with a different name. Not sure how to get around it.
timotimo uzl: a constructor is really just any method that calls bless, either indirectly or directly 16:41
so put a method new() { say "no" }; method constructor($a, $b) { return self.bless(a => $a, otherattr => $b) } 16:42
uzl timotimo: ok, i'll try that!
timotimo: I've been reading the docs and I'm not sure in which situations I'd use bless, BUILD, or BUILDALL. 16:43
timotimo you probably won't override BUILDALL more than once in your whole life ;)
16:44 lex joined
timotimo BUILD is required when you want to access private attributes, because they are not accessible in a regular constructor 16:44
bless is what you call to actually create an instance, and bless will call BUILDALL, which is responsible for calling the BUILD method of all classes in your hierarchy
16:45 Andrew_ left
uzl timotimo: for most situations, i should be fine with bless and BUILD, meaning I don't need to touch BUILDALL. 16:45
?
jnthn You pretty much never need to touch BUILDALL 16:46
lizmat uzl: or use bless, for that matter
just a BUILD method or a TWEAK method is usually enough
timotimo oh, how could i forget TWEAK 16:47
TWEAK is almost always better than BUILD, because it doesn't make your default values and such on attributse "go away"
uzl lizmat: going back to doc to read about TWEAK ;)
Thank you, guys! 16:48
17:04 ExtraCrispy left
Geth doc: 08a981e4d1 | (Elizabeth Mattijsen)++ | doc/Type/Any.pod6
Any.toggle was introduced in 2017.12
17:09
synopsebot_ Link: doc.perl6.org/type/Any
Geth doc: 89bf0ab968 | (Elizabeth Mattijsen)++ | doc/Language/pragmas.pod6
Fix typo
17:21
synopsebot_ Link: doc.perl6.org/language/pragmas
lizmat Travis complains about whateverable.6lang.org giving a Service Unavailable 17:25
17:25 zakharyas joined 17:28 _uzl joined, uzl left
masak heredocs are weird. 17:29
17:29 |oLa| joined
timotimo you think? i like 'em a lot 17:29
masak me too :) 17:30
doesn't stop them being weird, though
timotimo Cannot find method 'method_table' on object of type Perl6::Metamodel::CurriedRoleHOW 17:39
in method setup at /home/timo/perl6/install/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 282
am i doing it wrong?
could it be that the .? call to calling_convention is the thing that's blowing up? 17:46
17:49 zakharyas left
kjk p6: IterationEnd ~~ Mu 17:49
camelia Cannot resolve caller ACCEPTS(Mu: ); none of these signatures match:
(Mu:U: \topic, *%_)
(Mu:U: Mu:U \topic, *%_)
in block <unit> at <tmp> line 1
kjk is that expected?
p6: IterationEnd.WHAT 17:50
camelia ( no output )
kjk p6: IterationEnd.WHAT.say
camelia (Mu)
17:51 _uzl left
timotimo yeah, i removed the maybemeth spesh plugin optimization and the error is now about a missing symbol in openssl.so 17:51
jnthn: do you have an idea what this could be? some bad combination of roles and that spesh plugin? 17:52
17:57 zakharyas joined 18:02 Zoffix joined
Zoffix kjk: no, it's a bug. You could fix it :) 18:02
18:03 sarna joined
Zoffix kjk: oh, wait no, not a bug 18:03
kjk: well, a bug 18:04
SHRODINGERBUG
kjk currently I work around it by calling .WHAT first before smart matching 18:07
Zoffix kjk: basically, there's no Mu:D candidate to make junctions thread, buuut, we can have that and still have a Mu:D candidate. You can fix the bug by changing `Any` to `Mu:D` here: github.com/rakudo/rakudo/blob/mast...Mu.pm6#L16 and then adding another candidate for junction threading: multi method ACCEPTS(Mu:U: Junction:D \topic) { topic.THEAD: { self.ACCEPTS: $_ } }
timotimo THEAD? 18:08
Zoffix mhm
it's new-ish
18:08 espadrine joined
Zoffix m: <a b c>.all.THREAD: { say "zomg it's a $_" } 18:08
camelia zomg it's a a
zomg it's a b
zomg it's a c
timotimo surely that's meant to be THREAD?
Zoffix ah, right
timotimo OK
Zoffix too much HTML :) 18:09
timotimo %)
kjk let me open the issue in rakudo first
Zoffix I see we ain't got any Mu:D.ACCEPT candidates either
m: say 42 ~~ Mu.D
camelia No such method 'D' for invocant of type 'Mu'
in block <unit> at <tmp> line 1
Zoffix m: say 42 ~~ Mu.new
camelia Died with X::Multi::NoMatch
in block <unit> at <tmp> line 1
18:13 benji__ joined
Zoffix m: class Foo { multi method z (\z) { z.uc }; multi method z (Junction:D \z) { z.THREAD: { self.z: $_ } } }; for ^10000 { Foo.z: rand | 42 | 100; Nil }; say now - ENTER now 18:13
camelia 0.1182759
18:13 |oLa| left
Zoffix m: class Foo { multi method z (\z) { z.uc } }; for ^10000 { Foo.z: rand | 42 | 100; Nil }; say now - ENTER now 18:13
camelia 0.37057782
timotimo oh, i see that the maybemeth spesh plugin was already disabled for the release
Zoffix weird that threading manually is like 3x faster than using binder's threading, eh? 18:14
timotimo doesn't the junctive fallback have to go through the slow-path binder?
Zoffix yeah
timotimo and it has to figure out which argument has to be threaded, and it has to look through all of 'em to find the right one, too
whereas i guess THREAD will just always go over the junction for $_? 18:15
18:15 diakopter joined
Zoffix Ah, ok, now I get it 18:15
diakopter m: grammar Flail { token TOP { <TOP> 'w' | 'v' } }; Flail.subparse('vwwwwww').say; 18:16
camelia (timeout)
diakopter referencing RT bug #132004 18:17
Zoffix RT#132004
synopsebot_ RT#132004 [open]: rt.perl.org/Ticket/Display.html?id=132004 [REGEX] Left-recursion causes infinite loop
18:17 benjikun2 left
diakopter what 18:17
I just said that
oh, the link
such left recursion can be dynamically detected and evaded (and still generate appropriate parses); it takes some more bookkeeping and machinations 18:19
Zoffix I thought LTM stopped when the same token was gone into. 18:20
jnthn Zoffix: LTM does, yes, but LTM just picks the branch 18:22
Zoffix Ah 18:23
18:24 sauvin left
masak diakopter: \o 18:25
diakopter awooooga
18:25 Zoffix left 18:27 zachk joined, zachk left, zachk joined 18:30 lizmat left 18:33 shareable6 joined, ChanServ sets mode: +v shareable6
diakopter shareable6: help 18:33
shareable6 diakopter, Like this: shareable6: f583f22 # See wiki for more examples: github.com/perl6/whateverable/wiki/Shareable
AlexDaniel .tell lizmat whoops, yeah. Brought it back up 18:35
yoleaux AlexDaniel: I'll pass your message to lizmat.
diakopter that's quite the bot menagerie
18:39 zakharyas left
AlexDaniel diakopter: I think some should be slaughtered 18:41
diakopter I like the gptrixie one
AlexDaniel e.g. nobody is using nativecallable6
diakopter cull them all
AlexDaniel hmm…
okay…
diakopter I'm teasing 18:42
don't listen to me
AlexDaniel but you're serious about liking nativecallable6, right? :)
diakopter I mean..
I like the name of gptrixie 18:43
(and i'm impressed by what it does)
sarna AlexDaniel: what does nativecallable6 do?
diakopter masak: lol, nativecullable 18:44
AlexDaniel sarna: it's basically a bot that wraps GPTrixie (github.com/Skarsnik/gptrixie)
nativecallable6: struct s {int a; float b; char c};
nativecallable6 AlexDaniel, gist.github.com/82556c65094c005d0f...0254b2e2a3
AlexDaniel BOOOOOOOO 18:45
sarna :(
18:45 nativecallable6 left, nativecallable6 joined, ChanServ sets mode: +o diakopter
diakopter oh look, that still works 18:45
AlexDaniel nativecallable6: struct s {int a; float b; char c};
18:45 diakopter sets mode: -o diakopter
nativecallable6 AlexDaniel, gist.github.com/571571c0cc3e327269...88567c9474 18:45
18:45 sarna left
AlexDaniel this was working a day ago… 18:45
here's a better example: gist.github.com/Whateverable/dc533...599341b6c2 18:46
18:47 sarna joined, unicodable6 joined, ChanServ sets mode: +v unicodable6, benchable6 joined, squashable6 joined, ChanServ sets mode: +v squashable6, statisfiable6 joined
AlexDaniel nativecallable6: struct s {int a; float b; char c}; 18:47
18:47 undersightable6 joined
nativecallable6 AlexDaniel, gist.github.com/518aa161af6495228e...a7c232575a 18:47
AlexDaniel come on… 18:48
AlexDaniel shrugs
18:50 lizmat joined
sarna DL 18:50
D: *
we should slaughter it
diakopter slaughterable6
18:54 darutoko left 19:01 sarna left 19:08 perlpilot left 19:09 HaraldJoerg left 19:10 HaraldJoerg joined 19:11 wamba left 19:16 diakopter left 19:17 molaf left 19:19 lex left 19:21 wamba joined 19:24 domidumont left 19:29 uzl joined
hoelzro oh yay, I was looking for references to the various bots! 19:33
AlexDaniel hoelzro: another list is here: github.com/perl6/doc/issues/711#is...-235414744 19:36
hoelzro thanks!
El_Che hoelzro: I'll try the fix once rakudo is out, that's why the setup would be identical to my install and more likely to be in the situation to trigger the bug 19:37
hoelzro sounds good!
El_Che the package upgrades over the existing installation 19:38
thx in advance 19:39
hoelzro happy to help!
El_Che happy to see it fixed
hoelzro thanks again for helping me walk through it
AlexDaniel El_Che: should I merge the release branch into master now so that the fix is in master also?
El_Che the fix should be released 19:40
it's kind of blocking in the sense that it gives a bad impression that the 2 solutions proposed by the repl do not work 19:41
19:41 looksee joined
El_Che thinking on dfoy's book 19:41
AlexDaniel El_Che: so to clarify, the fix was merged into the release branch, so the upcoming release will have it. But it's not on `master`
El_Che ah ok, is the merging to master blocked by something?
19:42 molaf joined, sno joined 19:43 looksee left
AlexDaniel El_Che: not really 19:43
AlexDaniel does it
El_Che hoelzro: my linux pkgs have rakudo + zef. I am considering adding Linenoise or Readline to the mix, so people have a minimal setup. Plus for Linenoise: self contained C lib; minus: dependencies on other Perl 6 dependencies that should be included (there goes the minimal).
hoelzro: Plus for Readline: no perl6 module deps; minus: external C dependencies that would result on a dependency for the packages (they have none at the moment) 19:44
AlexDaniel El_Che: done
El_Che AlexDaniel++
I will create minimal docker images, that can easily have a few deps included, but for the pkg I am more conservative 19:45
hoelzro El_Che: tbh, I forget which Perl 6 stuff I rely on for Linenoise =/
I think it's stuff for building the Linenoise lib
El_Che It looks like it 19:46
I will look into it more in detail
hoelzro sounds good 19:47
El_Che the compile it at install time trick is nice :) 19:48
it works around the problem readline has
hoelzro well, it helps that Linenoise has a much more liberal license
(actually, I guess it doesn't - readline is GPL, which means the Readline module needs to be too, right?) 19:49
El_Che and is small
hoelzro yeah - that's why I chose linenoise
El_Che readline is already installed on most system
the trick is that often more versions are installed
both versioned and no naked .so 19:50
to the perl6 bindings break
I have a 1 line fix fork that makes it work with libreadline7, but it means older versions are out of luck
uzl Earlier I asked about object construction and although I read the docs again (and followed the advices), I am still lost. 19:51
The class I have has only private attributes. I'm planning to customize the constructor "new" so it
doesn't take any arguments. However, when it's called on the class it should return an object with the attributes
initialized to some default values. As for the second constructor (let's call it "create"), it should take
named parameters and initialize the private attributes.
El_Che the non versioned perl6 code does not find 5 or 7 (what's on debian and opensuse) and seems to expect 6 (dunno how)
uzl: you can pass arguments to new and do stuff with the passed arguments 19:57
looks way easier, but of course you can do what you write
I am pretty sure people mentiones BUILD and TWEAK already 19:58
I don't see the problem with passing construction data to new 19:59
you don't have to offer a getter for those things if not needed
geekosaur the main problem is BUILDALL, I think. your class can't inherit (not even from Any or Mu) if you don;t replicate that in your custom new
iirc; there;s been some changes there 20:00
uzl geekosaur: I won't be subclassing the class. 20:01
timotimo geekosaur: i'm confused by what you're saying. how do youm ean "replicate" in "your custom new"?
20:02 Zoffix joined
Zoffix uzl: I tend to define private method !CREATE-SELF and bind to privates through it 20:02
geekosaur timotimo, did this change? default new calls BUILDALL which constructs the actual object. including standard object behaviors inherited by BUILDALL calling the new from Any and Mu?
Zoffix uzl: !SET-SELF rather, but name doesn't matter
geekosaur I think it's still documented that way
Zoffix m: class Foo { has $!meow; has $!moo; method new { self.bless }; method !SET-SELF(:$!meow, :$!moo) { self }; method create { self.bless!SET-SELF: |%_ }; method z { dd [$!meow, $!moo] } }; Foo.new.z; Foo.create(:42meow :100moo).z 20:03
camelia [Any, Any]
[42, 100]
timotimo bless calls BUILDALL, the default new calls bless
so all you need to do is call bless
uzl Zoffix: Will take a look at that.
Zoffix Calling .bless won't save private attrs tho 20:04
m: class Foo { has $!z; method new { self.bless: :42z }; method d { dd $!z } }.new.d 20:05
camelia Any $!z = Any
Zoffix m: class Foo { has $!z; method !SET-SELF(:$!z) { self }; method new { self.bless!SET-SELF: :42z }; method d { dd $!z } }.new.d
camelia Int $!z = 42
Zoffix s/save/set/;
uzl El_Che: I could pass construction data to "new" but I want to customize it so that it sets the attributes to some default.
Zoffix uzl: FWIW, you *are* aware that you can give defaults to attributes right in their definition, right? 20:06
m: class Foo { has $.meow = 'foos'; has $.bar = $!meow.uc.flip; }.new.Capture.say
camelia \(:bar("SOOF"), :meow("foos"))
Zoffix uzl: and I didn't follow earlier discussion, so I don't know if it was mentioned already, but there's also submethod TWEAK where you can tweak the attrs 20:07
uzl El_Che: I want the other constructor to show some intent. For example, MyClass.from-keysheet( data => "", etc.); 20:08
Zoffix m: class Foo { has $.meow = 'foos'; has $.bar; submethod TWEAK { $!bar = $!meow eq "foos" ?? "tis teh foos" !! "something else"} }.new.Capture.say
camelia \(:bar("tis teh foos"), :meow("foos"))
Zoffix m: class Foo { has $.meow = 'foos'; has $.bar; submethod TWEAK { $!bar = $!meow eq "foos" ?? "tis teh foos" !! "something else"} }.new(:42meow).Capture.say
camelia \(:bar("something else"), :meow(42))
El_Che uzl: intent is more for a method, I would say
uzl: anyway, perl6 is flexible enough to do whatever you need :)
uzl Zoffix: i'll have to look more closely to your examples, Zoffix! 20:09
Zoffix m: dd say List.from-iterator: ^10 .iterator
camelia (0 1 2 3 4 5 6 7 8 9)
Bool::True
Zoffix ^ that one uses a differnt constructor
uzl Zoffix: Thanks!
Zoffix s: (), 'from-iterator', \(^1 .iterator)
SourceBaby Zoffix, Something's wrong: ␤ERR: Could not find candidate that can do \(<anon|19>.new)␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 32␤ in block <unit> at -e line 6␤␤
Zoffix weird
oh, it's that bug with Callable 20:10
ah
20:10 lizmat left
Zoffix s: List, 'from-iterator', \(^1 .iterator) 20:10
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/ff2b...t.pm6#L187
Zoffix hehe, OK nevermind, that one is just nqp code :) 20:11
(unsupported for users, so you shouldn't use it in your programs)
20:12 lizmat joined 20:20 Zoffix left 20:27 lizmat left 20:32 lizmat joined 20:54 Pheix joined
Pheix irclog 20:55
tyil There's no =LICENSE for POD as far as I can tell, is this intentional? 20:57
MasterDuke Pheix: are you looking for colabti.org/irclogger/irclogger_logs/perl6 ? 21:00
21:03 Pheix left
lizmat tyil: not sure, App::mi6 uses =head1 COPYRIGHT AND LICENSE 21:05
yoleaux 18:35Z <AlexDaniel> lizmat: whoops, yeah. Brought it back up
buggable New CPAN upload: PDF-Class-0.2.4.tar.gz by WARRINGD modules.perl6.org/dist/PDF::Class:cpan:WARRINGD
21:07 Pheix joined 21:08 Pheix left, Pheix joined 21:09 Pheix left 21:24 ufobat_ left, wamba left 21:29 _uzl joined, lizmat left, uzl left
AlexDaniel El_Che: actually, I think it's better to turn off automatic CI tests for the canary 21:34
El_Che: I tend to restart the build manually whenever I upload a tar
El_Che AlexDaniel: we can restrict it to tags maybe 21:38
removed the cronjob 21:39
AlexDaniel thanks
El_Che and "build push branches" and "build pushed PRs" 21:40
is master is considere a branch, we're set :)
21:43 _uzl left 21:52 lizmat joined 22:04 benji__ is now known as benjikung, benjikung is now known as benjikun 22:07 dha joined, sena_kun left 22:16 HaraldJoerg left 22:28 haxmeister joined
[Coke] is shitov normally on IRC? 22:32
lizmat no 22:33
I don't think so
[Coke] Well, in case he reads this, love his book. :) 22:38
MasterDuke is he still blogging? 22:48
lizmat not afaik 22:53
:-(
[Coke] tries to apply his new channel/supply/promise knowledge to the doc repo and fails! 22:56
sjn MasterDuke: shitov blogs on perl6.online/ now and then 22:58
23:19 [Coke] joined 23:23 lizmat left 23:28 dha left 23:36 Xliff joined 23:37 Xliff left, Xliff joined