»ö« 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.
vrurg Funny, 'if' switches &?BLOCK and &?ROUTINE 00:16
m: sub f { if True { say "BLOCK:", &?BLOCK.name, " is ", &?BLOCK.WHAT; say "ROUTINE:", &?ROUTINE.name, " is ", &?ROUTINE.WHAT; } }; f;
camelia BLOCK:f is (Sub)
ROUTINE:<unit> is (Block)
uzl .tell jjmerelo I read you're writing a P6 book, JJ! Will it be a "bible" reference like "Programming Perl" or something less extensive? 00:53
yoleaux uzl: I'll pass your message to jjmerelo.
holyghost .tell jmerelo Good luck with your Perl6 book ! 01:19
yoleaux holyghost: I'll pass your message to jmerelo.
SmokeMachine is $?CLASS a type?! 01:29
b2gills $?CLASS is an alias to the surrounding class 01:47
m: class Foo { method bar (){ say $?CLASS.^methods }}; Foo.bar()
camelia (bar)
SmokeMachine m: say role :: { has $.bla }.^attributes.head.package 02:18
camelia No such method 'gist' for invocant of type '$?CLASS'
in block <unit> at <tmp> line 1
SmokeMachine m: say role R { has $.bla }; class :: does R {}.^attributes.head.package
camelia (R)
SmokeMachine how is it changed?
m: role R { has $.bla }; say class :: does R {}.^attributes.head.package 02:32
camelia (<anon|1>)
SmokeMachine m: role R { has $.bla }; say class :: does R {}.^attributes.head.package.^name
camelia <anon|1>
SmokeMachine m: role R { has $.bla }; say class C does R {}.^attributes.head.package.^name
camelia C
SmokeMachine m: role R { has $.bla }; say class C does R {}.^attributes.head.package
camelia (C)
SmokeMachine m: role R { has $.bla }; class C does R {}; my $r = R.^attributes.head.package; my $c = C^attributes.head.package; dd [:$r, :$c] 02:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
attributes used at line 1
SmokeMachine m: role R { has $.bla }; class C does R {}; my $r = R.^attributes.head.package; my $c = C.^attributes.head.package; dd [:$r, :$c]
camelia No such method 'perl' for invocant of type '$?CLASS'
in block <unit> at <tmp> line 1
SmokeMachine m: role R { has $.bla }; class C does R {}; my $r = R.^attributes.head.package; my $c = C.^attributes.head.package; dd $c 02:34
camelia C $c = C
SmokeMachine m: role R { has $.bla }; class C does R {}; my $r = R.^attributes.head.package; my $c = C.^attributes.head.package; say $r === $c
camelia Type check failed in binding to parameter '<anon>'; expected Any but got $?CLASS (?)
in block <unit> at <tmp> line 1
dduncan m: token od { <ab-[xy]> } 04:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1)
at <tmp>:1
------> 3token od { <ab7⏏5-[xy]> }
dduncan Question, what is wrong with this?
I’m trying to declare a character class that equals the class named “ab” but minus the characters given in the [].
I recalled Perl 6 examples or docs in the past showing something similar. 04:13
m: token od { <ab> & <-[xy]> } 04:23
camelia Potential difficulties:
Useless declaration of a has-scoped method in mainline (did you mean 'my token od'?)
at <tmp>:1
------> 3token 7⏏5od { <ab> & <-[xy]> }
dduncan Is that the best way to formulate my intention? 04:24
Maybe my example was based on an older language design that is obsolete, but I had thought it was possible to more directly use set notions on character classes. 04:25
dduncan Question: Currently my 18K Perl 6 grammar takes the latest Rakudo Star 15 seconds to compile or syntax check; does that sound normal or might there be anything in particular about how I wrote my code that might be making this slower? 04:32
This consists of a large number of small token declarations. 04:33
This is a late-2013 iMac with a 3.2 GHz Intel Core i5, with plenty of RAM and an SSD, and running MacOS High Sierra 10.13.6. It is Rakudo Star 2018.10. 04:39
MasterDuke dduncan: i'm not surprised. parsing is still pretty slow 04:55
MasterDuke i'm not aware of any particular slowdown because of the number of token declarations 04:56
but adding operators does get slower for each one added, see rt.perl.org/Public/Bug/Display.html?id=128760 04:57
dduncan I don’t declare any operators here so that wouldn’t affect this. 05:09
Elronnd does anyone else use vim? 05:40
when syntax highlighting is turned on in a perl6 file, it gets _really_ slow
Elronnd any tips? 05:51
pony I was just thinking that right now 06:11
I wanted to ask as well
Elronnd in this line of code "return ord($c) if $c ne '\\';" I get an error in between the 'o' and the 'r' in ord (?) of "bogus statement. Expecting any of: whitespace" 07:16
why? Why can't I return?
lookatme_q Elronnd, do you mean "\\" ? String in '' will not escape 08:07
jmerelo squashable6: status 08:50
yoleaux 01:19Z <holyghost> jmerelo: Good luck with your Perl6 book !
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 2 days and ≈1 hour (2019-01-05 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo ^^^^ Squashathon is coming!
(And I'm going to London) 08:51
Geth doc: 66ff9197f5 | (JJ Merelo)++ | doc/Type/Distribution/Hash.pod6
Reviews Distribution::Hash

And with this, closes #2136.
09:05
synopsebot Link: doc.perl6.org/type/Distribution::Hash
dduncan FYI, this is the 18K grammar I was speaking of earlier, my first “complete” Perl 6 grammar. github.com/muldis/Muldis_Object_No...osts/Perl6 This is complete conceptually and Rakudo parses it without error, but I still have to execute it and verify/fix that it behaves correctly, and tweak it to actually do capturing, my next task. 09:28
jmerelo dduncan: great! :-) 09:33
moritz I'm kinda amazed that you'd write 18K code (any code, be grammar or regular code) without testing parts of it 09:34
and by "amazed" I actually mean more like "horrified" 09:35
jmerelo moritz: well, that's been known to happen. 09:36
dduncan Well, in this case that code was originally documentation and not meant to be executable by itself, but I chose the Perl 6 grammar syntax rather than EBNF or ANTLR or whatever because I found the Perl 6 syntax to be more expressive. Then when I was actually ready to execute, the natural first step would be to take what I wrote and try to run it in Perl 6. 09:38
moritz dduncan: that makes more sense, thanks for providing more context 09:39
dduncan It also turns out there were not more than 3 kinds of syntax errors, so I did fairly well getting it well formed without running it. 09:41
Geth doc: 506ea88a9a | (JJ Merelo)++ | doc/Type/Telemetry/Sampler.pod6
Those classes didn't actually exist.

Or they don't exist now. Substituted by their real names. Closes #1814.
09:42
synopsebot Link: doc.perl6.org/type/Telemetry::Sampler
dduncan The first error was writing `<[\x<1A>]>` etc rather than `<[\x[1A]]>`; the second was writing `<foo> % <bar>` instead of `<foo>+ % <bar>`; the third was writing `<foo-[xy]>` rather than `<foo> & <-[xy]>`; other than a few instances of those, the grammar was already parseable. 09:45
Geth doc: AlexDaniel unassigned from Tyil Issue GitHub Pod Parsing github.com/perl6/doc/issues/167
39270a90eb | (JJ Merelo)++ | 6 files
09:47
linnucks should I learn perl 5 or perl 6 10:01
jmerelo linnucks: depends on what you are looking for. But, hey, this is a perl6 channel, so thumbs up perl 6
El_Che linnucks: desoite the confusing names, Perl 5 and 6 are two languages with their own strengths and weaknesses (it like asking "do I learn Ruby or Java"). In this channel, however, we can help you with your Perl 6 learning :) 10:05
jmerelo calls a vote on closing the "Github pod parsing" issue: github.com/perl6/doc/issues/167#is...-450831835 10:39
jmerelo I will keep the vote running until Sunday at least. Please repost vote, since I'm not going to be much available until that time. 10:39
tyil jmerelo++ 10:41
tyil I would like to see a way to parse perl 6 pod without touching code 10:41
it generally seems to cause troubles in all sorts of places 10:42
jmerelo tyil: well, raiph's summary on the original discussion, summarized here: github.com/perl6/Pod-To-HTML/issue...448836127, is extremely interesting. But that's orthogonal to the issue *in the documentation repository*. 10:43
tyil: it seems to be there just because, back then in October 2015, there was no better place to put this thing, and since it says "Pod", well, OK. 10:44
tyil jmerelo: I'll read through that "soon", thanks :> 10:46
jmerelo tyil: most of the original issues have been addressed, also. Pod and pod6 are now different, PRs have been merged into GitHub... HTML rendering of Pod6 now mostly works, too.
tyil yeah, I did keep track of the MRs we did for Github support on Pod6 10:47
and noticed they eventually got meregd
AlexDaniel are you all freaking kidding me :) 11:06
tyil AlexDaniel: ?
AlexDaniel there is an issue, and there is an obvious solution (though somebody has to do it)
and we're all voting? For what, for closing the issue?
you don't need a vote to move the issue to another repo 11:07
let it be user-experience or whatever you want
jmerelo AlexDaniel: it's not clear to which one it should be moved. And it's got 37 comments. It's much better, as I said before, close and summarize, preferably somewhere else.
AlexDaniel sure, do it, you don't need to gather votes for that 11:08
jmerelo AlexDaniel: I couldn't risk moving it with you moving it back :-) So it's better if we reach a (rough) consensus.
AlexDaniel I'm not moving it back
I just want to make sure we have an open ticket for tracking a real issue
jmerelo AlexDaniel: the poll is already open. I can't move it *now*
AlexDaniel (an issue that can be solved, by the way, if that's still not clear enough…)
go for it
tyil theoretically, every issue can be solved 11:09
jmerelo AlexDaniel: it can be solved *in theory*. My argument is that it's been solved *already* in the original terms.
AlexDaniel yeah but for example in terms of user experience NOTHING was solved 11:10
tyil I think that's why jmerelo wants to create a new one :)
AlexDaniel but I'm all for it!
and was never against. But I reopened the issue because it was closed with the comment saying that it can't be done… 11:11
now again, I haven't followed the progress on that thing, but I'm just wondering
by any chance, can't we abuse github.com/perl6/atom-language-perl6 to do what we want?
jmerelo tyil: I want to create a new one (somewhere else) *instead* of moving it somewhere else. But I am all for closing it. 11:12
AlexDaniel jmerelo: github.com/perl6/user-experience is probably *the* somewhere else
jmerelo AlexDaniel: feel free to open an issue in any of the repos you have mentioned.
AlexDaniel and yeah I'm okay with restarting the discussion from scratch because the old one is hard to follow
jmerelo AlexDaniel: that is the reason why I wanted to close it and you opened it back. 11:13
AlexDaniel: with 37 comments, the same issues kept cropping up over and over again.
AlexDaniel jmerelo: ok, so did you open a new ticket? And if not, why?
why do you think it's OK to close an issue without opening a new one?
jmerelo AlexDaniel: because I don't think it's an issue that can be easily solved right now, or in the near future. 11:14
jmerelo AlexDaniel: I don't want to burden whoever is in charge of user-experience (apparently no-one) or marketing (ditto) with an issue, when there are already 22 issues that have not been solved there. 11:15
timotimo .tell dduncan the muldis object notation grammar spends a whole lot of time doing "mergesubrule" and "mergesubstates" and "optimize", which are related to building the NFA used for longest token matching, i.e. the | operator and proto/multi tokens. maybe there's some optimization opportunities there.
yoleaux timotimo: I'll pass your message to dduncan.
jmerelo AlexDaniel: I also think it's OK to close an issue if it can be no longer addressed in terms of the repository it's been created (and it didn't belong to the repo to start with) 11:19
AlexDaniel jmerelo: the number of to-be-resolved issues is irrelevant 11:31
if there's a problem, you write it down
jmerelo AlexDaniel: right. And if the problem has been solved, you close it. Those are two completely different issues. 11:33
AlexDaniel but it's not resolved. GitHub still doesn't render pod6
jmerelo AlexDaniel: I think it is, in its original terms, and in the context of the documentation repository. But since there seems to be a difference of opinion, that's why I'm calling a vote. 11:34
AlexDaniel “GitHub doesn't parse P6 pod and shows errors when viewing docs in this repo” 11:35
that's from the OP
jmerelo (for the sake of those who have arrived late to the conversation, here's what we're talking about github.com/perl6/doc/issues/167)
AlexDaniel ok it doesn't show errors now because they were renamed to .pod6…
jmerelo AlexDaniel: which does not belong in perl6/doc to start with.
AlexDaniel move it then, no problem with that 11:36
jmerelo AlexDaniel: so that was one of the things that were addressed *in terms of the repo itself*
AlexDaniel or close and reopen elsewhere
jmerelo AlexDaniel: re: moving it. I've discussed it already. a) I don't think it's an issue. b) I have already called a vote, I can't move it now c) I have no idea where it belongs. 11:37
AlexDaniel /o\
jmerelo AlexDaniel: I have already closed it, and you have reopened it. I'll close it again if the vote reaches that conclusion (or anyone else can do it, for that matter). 11:38
AlexDaniel a) great! b) voting is not needed to move it c) user-experience is fine 11:38
jmerelo AlexDaniel: then vote yes for closing and qualify your vote by assigning the issue to me and saying that you vote yes if JJ opens it in user-experience 11:39
AlexDaniel we've been through that a few times now I think, and I still see issues closed with an expectation that somebody else will dig the discussion back, go through it and file a new ticket
jmerelo (and again, I wouldn't transfer it, I would summarize the issues involved, saving whoever reads it the time to go through 37 comments, with links)
AlexDaniel OK fuck I don't know why it's so hard 11:41
AlexDaniel moves it
jmerelo AlexDaniel++ 11:42
AlexDaniel done github.com/perl6/user-experience/issues/35 11:44
took less than 4 minutes, please just do that instead next time… 11:45
jmerelo AlexDaniel: I did what I thought would the best, you did the same. At least we agree on the fact that something should be done about it :-) 11:47
El_Che you agree to agree 11:55
lizmat I don't .... disagree :-)
scimon So. Hi everyone.
lizmat scimon o/ 11:57
jmerelo hi! 12:05
Geth perl6-examples/master: 11 commits pushed by (Paul Cochrane)++
review: github.com/perl6/perl6-examples/co...c34dea3cbe
12:22
Geth perl6-examples: 6d33fcbcd8 | (Paul Cochrane)++ | Makefile
Install test-required dependencies

The `--/test` option to `zef` doesn't install the dependencies needed to run all of the tests, hence we need to use `--test`. However, in order to avoid running the tests for all of the other dependencies, we first install the base dependencies *without* tests and then install the remainder *with* tests. This way dependencies required for running the tests (such as `Test::META`) are installed and the test suite passes.
13:15
perl6-examples: 35ecaf0008 | (Paul Cochrane)++ | t/003-categories.t
Revert "Fix sporadic categories test failure"

  ... since it didn't fix the problem; the test failures in the categories
tests are still sporadic.
Geth perl6-examples: e487f8dae3 | (Paul Cochrane)++ | Makefile
Use --test-depends to install test-required deps

Thanks to @ugexe for the heads up!
17:18
Geth doc: 93e28c399a | cfa++ | xt/headings.t
Add "NQP" as an exception to the heading capitalisation test.

  (Address test failure for subtitle added in [ceedca6d7].)
17:20
[Coke] waves. 17:34
m: say $?DISTRIBUTION 17:37
camelia Nil
Geth doc: 9a7861ad74 | Coke++ | doc/Language/variables.pod6
run test in separate file
17:44
synopsebot Link: doc.perl6.org/language/variables
masak I have an open PR in 007 right now renaming `True` and `False` to `true` and `false` 18:53
as usual, I don't mean to get anyone up in arms about changing Perl 6 :) 18:54
but I'm curious in retrospect how it came to be in Perl 6 (and in Python) that we write those literals with upper-case
because usually upper-case signals a class/role/grammar/type
but these are more like enum values
moritz they are type-like 18:57
cfa morning all 19:08
masak moritz: True and False are type-like? 19:35
in what sense?
masak asked the same question on #python 19:36
masak #python tells me "it's for historical reasons", basically 19:42
avuserow masak, I assume you'll get this link from #python, but here's the Python PEP about True/False: www.python.org/dev/peps/pep-0285/ 19:43
tldr from my memory is "they surveyed pypi, then picked what was most popular"
masak didn't -- thanks!
this is very interesting reading 19:44
avuserow (I may have misremembered that tldr, or gotten that from another document) 19:45
other fun fact: you can redefine True and False in Python 2 but not 3
masak oh! `True` and `False` were based on `None`, which is more understandable because it's a singleton type 19:46
funnily enough, the type of `None` is not called `None` but `NoneType`
masak does anyone remember exactly when whitespace stopped being allowed before postfixes in the Perl 6 spec? 19:55
I think it must've been sometime during the '00s
lizmat masak: True and False are enums of Bool, and enums typically are titlecased? 20:03
Geth perl6-examples: c5b9fc3e46 | (David Warring)++ | .travis.yml
CI Rakudo bump for deps
20:10
kiwi_60 m: { .say, .put } for (any( 1, 3, 7 ) + 1), any( <h H> ) ~ 'amadryas';
camelia any(2, 4, 8)
2
4
8
any(hamadryas, Hamadryas)
hamadryas
Hamadryas
kiwi_60 m: say $*PERL.compiler 20:12
camelia rakudo (2018.12.117.g.29.d.7.f.7095)
masak lizmat: yes, that seems to be the case (although S12 seems to lower-case sometimes, too...?) 20:14
masak lizmat: but then, _whyyyyy_ are enum values title-cased? is it to highlight their, um, singleton-y nature, even though they aren't really singletons? 20:15
I only speak for myself, but it's weird to me that enum values are title-cased. title-case is for things like types. enum values feel to me much more like instances, or lexical variables, or members, all of which are lower-cased. 20:16
lizmat well... yeah... enums are strange
masak fun fact: enums are a poor echo of disjoint union types, in languages which don't have a type system that can sustain the latter :P 20:18
but here I go, being smug again
El_Che masak: is 007 the 3rd-system syndrome done right? :P 20:23
masak not aiming to supersede anything, no :) 20:24
just trying to create a coherent whole, a fast-iterating experiment, and a working macro environment -- all in one package
but sometimes I do take a bit of a stance "against" Perl 6 -- for example renaming s/grep/filter/ after some consideration 20:25
and s/sub/func/
lizmat masak: why not s/sub/function/ ? 20:26
El_Che unix roots? 20:27
lazyness
I prefer func myself
lizmat well, grep -> filter has nothing to do with unix roots afaik, so why sub -> func then 20:28
if you want to be clearer, sub -> function then makes more sense to me...
looking towards the future
El_Che being coherent is a pita 20:29
(it's also true for documentation and papers) 20:30
masak lizmat: I definitely considered 'function', but it felt too dehuffmanized for such a common keyword
cfa fn, fun, func all seem common 20:31
masak lizmat: similarly, I considered 'fun', but it felt too huffmanized and too cute
El_Che "dehuffmanized" <-- you get points for that
masak Arc does 'fun' and 'mac', which -- while I respect it on some level -- I feel is a bit too cute
cfa well, it's arc
qed 20:32
masak El_Che: I consider JavaScript to be a live experiment towards that conclusion
EcmaScript 6 introduced something on the order of five different ways not to have to write `function` in your code :P
avuserow if `fun` is too cute, why not make it less cute and call it `defun`? :P
masak avuserow: I confess to not having considered that one :) 20:33
El_Che masak: make sure things are kind of coherent before it becomes popular :)
masak avuserow: but `defun` *is* cute, in how it re-uses the 'f' for both 'def' and 'fun'
El_Che: one of the nice things about having ~0 users is I can make changes like that 20:34
El_Che about "sub", to me it feels like a Perl 5 leftover
with built-in signatures, but still
masak El_Che: which is why I felt a shiver down my spine when I got a person writing actual scripts and modules in 007 o.O
El_Che masak: that's what happen when you put code out :)
[Coke] We are a perl, so that seems fine. 20:35
masak El_Che: I'm curious where Perl 5 got it from. I know "subroutine" is an established term, but it feels like a term that has been (at least somewhat) left behind
007 is a Perl too. discuss. :P
and who can claim that it isn't Perlish to look towards other traditions and drink heavily from them? 20:36
[Coke] masak: hard to argue with
masak if I could spend the rest of my programming career making it easier for people to create quick-and-dirty languages like 007, I think I'd be pretty happy 20:37
interestingly, that feels very much within Perl 6's charter
cfa well, you could argue that function is a worse term in languages that don't enforce purity
El_Che [Coke]: sub is for me something that can be a function and a method
cfa subroutine seems more in line with communiting potential side effects
er, communicating*
masak cfa: I think it's a case of "here's how the word is used in actual practice, so there" 20:38
cfa true
masak (i.e. descriptivism)
cfa function and subroutine are used pretty interchangeably in most languages
masak and function is by far the more common term nowadays
El_Che cfa: not syntax-wise, like masak states you see mostly func(tion) nowadays 20:39
masak "subroutine" feels like something they use in Star Trek when they want to belittle the Doctor hologram and tell him he isn't a real person
El_Che haha, so true
cfa ha
lizmat
.oO( Jim, I'm a program, not a subroutine! )
[Coke] I have a recollection that perl's sub came from the basic word, but I can't find anything to back that up 20:40
masak which means it's somewhat still in the general vocabulary, but unused *enough* to be stolen for Star Trek technobabble
[Coke]: ooooh that makes a lot of sense
and BASIC (as I recently learned) is mostly gussied-up FORTRAN II 20:41
...and indeed FORTRAN II has `SUBROUTINE`
:D
it also has `FUNCTION`
pmurias_ masak: I thought a tiny bit about the regex explainer, and one idea is that something that shows which prefix of a regex still matches a string could be useful 20:42
masak it'd be a good start, for sure
pmurias_: with rakudo.js it could even be built for the browser :) 20:43
pmurias_ masak: even a CLI version would be useful 20:45
masak aye
[Coke] regex101.com 20:46
[Coke] finds github.com/firasdib/Regex101/issues/848 20:47
masak now that I think back on it, QBasic has `SUB` and `FUNCTION` as well
pmurias masak: the regex prefix thing would help with in the small regex writing 20:55
masak: for larger stuff (like fully blown grammars) I think making testing individual subrules more convinient would help a lot 20:57
masak: optimally once we have a decent way of displaying module docs it would be awesome if those regex unit tests could be used as examples 21:01
masak: kind of like smart links in the old days 21:02
masak aye 21:08
Geth doc: 2f9ac56a46 | cfa++ | doc/Type/Signature.pod6
Provide an example of combining array and hash slurpies.
21:18
synopsebot Link: doc.perl6.org/type/Signature
pmurias masak: if Perl 6 ended up with CPAN for grammar parts that would be awesome/useful 21:25
buggable New CPAN upload: BlkMeV-0.2.0.tar.gz by DONPDONP cpan.metacpan.org/authors/id/D/DO/...2.0.tar.gz 21:45
[Coke] tries to do a build on windows for the first time in a year 21:59
[Coke] ... saw a bunch of warnings in moarvm build and one or two linker warnings on rakudo, but wnet very smoothly. 22:06
MasterDuke [Coke]: running a spectest on windows? 22:25
[Coke] no, wanted to be able to test docs there. 22:29
cfa [Coke]: neat 22:29
[Coke] I can fire off a spectest if you like. (ISTR zoffix was keeping a ticket up to date with windows spec results)
gfldex jnthn++ # for a faster year 2019 :) 22:35
MasterDuke [Coke]: i think he was doing that only periodically, and since he's less active now, might be nice to get some recent data if you can 22:38