»ö« 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.
genzix Hi possibly stupid question but is there a way to do compile time loops yet? I tried macros(not stable) and a for loop but idk what else. This is just a for fun project and i think i might be able to use modules instead ix.io/1O5u/perl6 00:49
Kaiepi wide string support on moarvm is done! i just need to write tests 01:56
irced cheers.
lucs Is there any special reason why IO::Path doesn't supply a file test for sockets? 03:17
lucs & # ZZ 03:34
formalin14 Hi all, is there any web framework recommandation, like Dancer in perl5? How about Cro? 03:43
irced Cro has gotten mention here before. 04:39
moritz Cro is the best-designed web server... thingy in Perl 6 06:13
IMHO
it's not primarily optimized for producing HTML, but still pretty good for that
El_Che lo 06:31
Wahnburger Session Security with Cro: i dont dig it after reading the docs. Does anybody have a working peace of code to show that part? :) 06:50
Geth doc: JJ assigned to antoniogamiz Issue Linking to pragmas github.com/perl6/doc/issues/1488
JJ assigned to antoniogamiz Issue Re-organise exception types documentation github.com/perl6/doc/issues/516

Fix IO::Handle.flush() code exampe
07:01
brrt folks, I was asked yesterday, 'what is scripting'. 07:34
my answer was, 'scripting is when you control a large system (which is implied by context) with a small program' 07:35
a): do you agree, b): is Perl6 properly a scripting language, according to that definition, c): is it a *good* scripting language?
e.g. for javascript, the 'large system' would be the browser. For perl5, the 'large system' would be the UNIX environment and the POSIX interface that perl5 provides 07:36
For a lua script embedded in a larger C/C++ program, the C/C++ program is, obviously, the large system / implied environment 07:37
and d): what is, precisely, the large system controlled by perl6 programs. 07:39
brrt I think the answer to d) is the answer to the question 'what is perl6's niche' 07:39
synopsebot Link: doc.perl6.org/type/IO::Handle
masak antenoon, #perl6 07:54
brrt ohai masak
patrickb brrt: a) yes (there are probably other good definitions, but I like this one) b) yes c) yes, it can be used unakwardly in such contexts d) there can be many answers. I have used p6 for poke-files-around-do-some-regex tasks quite some. So it does file the perl5/UNIX niche well too. 07:54
Geth doc: e201639441 | (JJ Merelo)++ | doc/Language/classtut.pod6
Deindent and reflow preceding #1606
07:54
doc: 73ebb80269 | (JJ Merelo)++ | doc/Language/classtut.pod6
Adds description of DESTROY to the class tutorial.

This (hopefully) closes #1606
synopsebot Link: doc.perl6.org/language/classtut
brrt patrickb: little discussion that way :-) 07:55
masak lazyweb question: someone like Kernighan (but not necessarily Kernighan) once implemented (or just designed) a "better shell than bash". there were great simplifications in how quoting worked, for example. what's the name of the shell, and where's the article he wrote where he described this that I can't find right now despite looking? 07:55
brrt masak: haven't heard of it 07:56
masak he was quite clear that bash, as languages go, was not up to the task 07:58
brrt well, not surprising. 08:00
masak I'm currently trying to explain to a more junior friend why there are so many scripts written in bash, when Perl and Python exist, are better languages, and allow for more flexible/safe/manageable code 08:07
patrickb For me it's mostly easy copy-paste-ablity of what I already tried in the console + bash being more widely available than the Ps. 08:10
rfold Clearly those were not better languages in the eye of the script authors. 08:15
kawaii Well I can understand why someone wouldn't want to write a Perl 5 script, but hey maybe one day Rakudo will be one of those out-of-the-box packages like P5 and Python! 08:16
brrt Perl 5 is not at all a bad scripting language.... 08:17
kawaii brrt: if your first experience with perl was 6, it's very hard to look at 5 and feel motivated, in my experience at least :) 08:27
Skarsnik hello :) 08:32
rfold Is :D redundant on an is required has? has Int:D $x is required; 08:33
rfold If not, why is has Int:D $x; not equivalent to has $x is required;? 08:34
masak kawaii: I respectfully disagree. I have a hot an fiery enthusiasm for Perl 6, but I also love and respect Perl 5, especially Perl 5 plus the CPAN ecosystem 08:36
Skarsnik It can be defined in the constructeur I guess without the code using the class to define x
masak and*
kawaii: and I daresay that love and respect for Perl 5 has matured mostly after I became a 100% Perl 6 developer 08:37
Skarsnik There is no new release since 2019.03.1 ? :( 08:37
kawaii Skarsnik: it's happening, just waiting for a moarvm release 08:38
rba AlexDaniel: ping
Skarsnik Kinda want to write a small blog post/something about my Perl 6 benchmark x) 08:39
sena_kun cheers up Skarsnik to do it 09:09
Skarsnik Kinda have to redo it on a VM, old rakudo does not compile on WSL 09:09
kawaii The new release is coming with a whole bunch of optimisations, should be fun :) 09:16
antoniogamiz mmm this test is really necessary? 10:09
I mean, if a pod6 file has an error it should be thrown by extract-pod when it's been compiled, right? 10:10
s/been/being
sena_kun antoniogamiz, what test? 10:13
antoniogamiz ups, I forgot to pass the link 10:15
github.com/perl6/doc/blob/master/t...od-valid.t
sena_kun antoniogamiz, I think it is useful. when sending a patch, running tests is faster than doing a full build. 10:17
antoniogamiz mmm it takes a big time though, I said it because I'm trying to integrate the Pod::To::Cached module 10:19
and only compile pods once in the whole process
sena_kun antoniogamiz, but testing and building are two separate processes, no?
antoniogamiz mmm each time tests are runned the documentation is built to 10:21
s/to/too
sena_kun you mean the whole site or just pod files? 10:22
antoniogamiz whole site
you can see it here => travis-ci.org/perl6/doc/jobs/556176386 10:23
sena_kun it is a question of what travis told to do, not how user runs tests locally 10:24
antoniogamiz mm 10:27
Geth doc: kjkuan++ created pull request #2895:
Fix typo and clarify a sentence
10:47
Geth doc: d42a8709c3 | (Jack Kuan)++ (committed using GitHub Web editor) | doc/Language/unicode.pod6
Fix typo and clarify a sentence
10:58
doc: 41c473934f | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Language/unicode.pod6
Merge pull request #2895 from kjkuan/patch-2

Fix typo and clarify a sentence
synopsebot Link: doc.perl6.org/language/unicode
patrickb .seen sergot 11:32
yoleaux I saw sergot 24 Jan 2019 14:32Z in #perl6: <sergot> oh, Mar and May...
timotimo .tell Skarsnik did you see that gumbo has probably been fixed? 11:54
yoleaux timotimo: I'll pass your message to Skarsnik.
grondilu m: say "hi" 12:48
yoleaux 24 Mar 2019 23:28Z <TreyHarris> grondilu: I think you want `.ACCEPTS(Array) && .all ~~ Num given [pi]`
camelia hi
grondilu TreyHarris: can you remind me what this was about?
anyway .ACCEPTS(Array) is really an ungly notation. 12:49
IMHO
Altreus ahoy! I've got a %json from a deserialised JSON object and I'm trying to use it as a constructor (indirectly). However, if I have an array in the JSON structure and an @ in the class I'm constructing, I end up with the JSON array being the first element of the object's array property, rather than the entirety of it 12:51
«dd %json» shows me :roles($["506956809471262731", "506956997543985222"])
This seems clear that it would go in as a scalar into the array instead of being the entire array, but how can I stop this?
grondilu you want to use an instance as a constructor o.O? 12:52
Altreus I don't want to have to meticulously pick apart %json to turn them into real arrays but I can probably deal with a quick x for %json.values
what :)
I want to use a hash as a constructor?
Class.new(|%json)
grondilu That's not how you instantiate a class in Perl 6 12:53
Altreus It has been so far
What should I be doing?
grondilu hang on
timotimo ah, i think this is a problem often encountered, isn't it? 12:54
grondilu oh wait I may have confused this with Perl 5 instantiation for a bit.
Altreus xD
grondilu I haven't coded in Perl 6 for a while either lol
Altreus perl5 would be easy because it's always a reference
grondilu perl5 is not as fun as perl6 though 12:55
Altreus no but it's way quicker for me to write :D
I don't have to keep asking IRC about core language principles
hopefully perl6 will go the same way soon
grondilu What was confusing is what you wrote is that you talked about using %json as a constructor, but what you were realy talking about is construction parameters. 12:56
*in what you
Altreus ah yeah, that is true
grondilu Have you read the Apocalipse?
*Apocalypses
Altreus Nope
grondilu I find they are the best docs.
Altreus I was hoping there was a book called the Apocalisp
jnthn Altreus: Class.new(|%json.Map) should remove the containerization
Altreus jnthn to the rescue 12:57
grondilu yeah :)
timotimo ooooh
grondilu Altreus: do you want a link to the Apocalypses docs?
Altreus sure thing :) 12:58
grondilu hang on
I did put there somewhere 12:59
timotimo perl6.org/archive/ or something 12:59
perl6.org/archive/doc/design/apo/A01.html 13:00
AlexDaniel rba: pong?
timotimo not sure where an index for that lives, tho
grondilu yeah 13:00
perl6.org/archive/doc/apocalypse.html
timotimo ah, that's not so surprising
grondilu yeah, quite sensible
pmurias masak: what do you think is the reasons why there are so many bash scripts? 13:02
grondilu hum, that's not quite the doc I was thinking abut
rba AlexDaniel: Bram (nubie in irc) is a volunteer in perl6-infra area. I like he try to look into Dockerizing of websites and I thought examples.perl6.org would be a got start. 13:03
grondilu *about
grondilu needs to reboot
rba AlexDaniel: May you had Bram's github account brm-ryd to perl6 org in github?
grondilu exit 13:03
AlexDaniel rba: ah sure
grondilu oops
AlexDaniel rba: ok, actually, hold on 13:03
rba: I just lifted your permissions in perl6 org, see if you can add them yourself now 13:04
you'd also need that for webhooks and stuff, I think
rba: “Two-factor security disabled” maybe you want to fix that, though :) 13:05
rba AlexDaniel: Is examples.perl6.org in the domain of jmerelo?
AlexDaniel: “Two-factor security disabled”. Oh. Will check... 13:06
AlexDaniel rba: IMO yes, but examples subdomain gets so little attention anyway…
rba AlexDaniel: That's why I thought this might be a got start for him. 13:07
patrickb rba: Is there a reason the rakudo releases are not restored yet? (rakudo.org/files/rakudo still gives 500) 13:08
rba AlexDaniel: I would like to do it myself, yet there are other things which I need to do first... :-|
patrickb They seem to be available here: perlgeek.de/static/p6/rakudo/ 13:09
rba patrickb: We are in the middle of getting DNS stuff rearanged. As soon as this done, we like to move the websites to new servers.
patrickb: Yes, for know moritz is hosting it there. 13:10
patrickb rba: It's awesome someone finally tackles the infrastructure stuff and puts it on solid ground. Big thank you!
AlexDaniel patrickb: also, while it'd be nice to restore the links there, I'm thinking about just uploading all these files into github releases 13:11
less things to maintain that way
rba patrickb: :-) Will still take some time though. I just try to make step by step every week. And it's currently more to coordinate than to hack/install.
AlexDaniel rba++
grondilu is back 13:11
I think I have a hard copy of the doc I was thinking about on an other computer 13:12
rba AlexDaniel: Would make sense to have the release on githob in the release tab too. Agree.
AlexDaniel: Thanks for adding me. Just invited brm-ryd to the perl6 org. 13:17
AlexDaniel 👍
grondilu I've found the specs I was talking about. 13:18
I'll make a html mirror 13:19
hum... weird, I can't find my grondilu.github.io repo 13:22
ok, found it. 13:23
oh I found my local clone 13:25
grondilu oh my bad, I think it wasn't pushed or something 13:26
rfold Does anyone else get a HSTS error when visiting marketing.perl6.org ?
Seems like an expired certificate. 13:27
rfold Oh no, the domain of the certificate is wrong, it's for perl6.nl instead of marketing.perl6.org 13:28
grondilu Someone earlier was asking for good docs. IMHO github.com/perl6/specs are the best. 13:42
too bad they are not available in html though 13:43
though I thought they were somewhere.
candr I have some subs that have a lot of parameters and was thinking about just passing around a struct instead.... is the best thing to use in perl6 for this a class? 13:48
AlexDaniel grondilu: they were, before the infrastructure collapsed :)
lucs Is there any special reason why IO::Path doesn't supply a file test for sockets?
AlexDaniel grondilu: design.perl6.org/ it was I think 13:49
AlexDaniel grondilu: but, I mean… what's good about them? They're mostly outdated, and they talk about the design which is not strictly important for the end user 13:51
jnthn candr: Yes, probably. 13:53
candr I thought it might be weird to start passing around class object just for parameters without going full blown oo and making methods and all that 13:55
jnthn Just 'cus it says "class" doesn't mean there's any real OO going on. And for a simple parameter object there's no methods to write; just `class Foo { has $.bar; has $.baz; }` :) 14:00
timotimo maybe even "class Foo is rw { ... }"
then all attributes will be re-assignable at any time
if you want that, of course
ugexe AlexDaniel: i like the format for exploration 14:01
ugexe and the (used to be) best part of the html pages was they linked to tests in the roast that related to the topic 14:02
grondilu guys, I have a 11Mo tar file of the old specs 14:43
what is the best way to publish it nowadays?
Those specs were summaries of the Apocalypses. I learned Perl 6 with them. 14:44
It started as : 14:45
grondilu damn I can't copy paste for some reason 14:45
"This document originally Apocalypse 1, which covers the initial design concept." 14:48
grondilu "That original summary may be found below under 'Random Thoughts'." 14:49
oops I missed a word in the first sentence.
"This document originally summarized Apocalypse 1, which covers the initial design concept." 14:50
"However, these synopses also contain updates to reflect the evolving design of Perl 6 over time, unlike the Apocalypses, which are frozen in time as historical documents." 14:54
"These updates are not marked--if a synopses disagrees with its Apocalypse, assume the synopsis is correct." 14:55
lucasb wow, only now I see design.perl6.org/ is being redirect to the docs site
grondilu I just relized I could just take a picture. 14:56
grondilu of my screen, that is. 14:56
lucasb well, the HTML version of those POD5 documents can be browsed in e.g. github.com/perl6/specs/blob/master...erview.pod 14:57
was that what you are talking about? :)
tyil what's the way to check for the latest available rakudo-star on rakudo.org? rakudo.org/latest/star/source is still doing 500 errors from what I can tell 14:58
grondilu There is more than S01 15:03
grondilu S02 was about bits 15:05
I've posted a screenshot on Facebook
oh no worries, it turns out they are all on github.com/perl6/specs/blob/master/ 15:10
jkramer Ahoy 15:11
grondilu lizmat: do you still have access to this repo?
jkramer m: my %h = :lol<123>, :foo<asd>; 'foo' ~~ /$<asd>=({%h.keys})/; dd $<asd>
camelia Match.new(from => 0, list => (), pos => 0, orig => "foo", made => Any, hash => Map.new(()))
jkramer How do I do this correctly? I want to match any key of %h.
grondilu what is it you want to do? 15:12
try to explain it ELI5 15:13
or don't, nevermind
jkramer Well I'd expect this to be evaluated the same way an array would, like here: docs.perl6.org/language/regexes#Qu...TM_matches 15:14
moritz m: my %h = :lol<123>, :foo<asd>; my @keys = %h.keys; say 'foo' ~~ / @keys /
camelia 「foo」
timotimo i'd expect it also to work with @(%h.keys) in the regex
grondilu jkramer: have you checked on rosettacode.org?
moritz jkramer: attention, {} is a code block for side effects
jkramer Ahh, I see. Thanks! :)
moritz its return value is not used by the regex engine
so, create an array outside the regex 15:15
'cause otherwise, the regex engine needs to re-evaluate the expression in each backtracking step
which will be horribly slow
jkramer Yep, I kinda thought it works the same as {} in strings. Speed is not an issue here, just trying some stuff 15:16
grondilu I'm off, see you later guys. 15:17
moritz there are interpolating code blocks as well, <?{ ... }> if memory serves right 15:20
timotimo no, that's for True/False 15:25
interpolating regex code would be <{ }> 15:26
moritz ah, thanks timotimo :D 15:29
I forgot all that after I wrote a book about it :D
but makes sense, ? is always for boolean
lizmat weekly: perlweeklychallenge.org/blog/meet-...mpion-015/ 16:06
notable6 lizmat, Noted!
rfold p6: class C { has %.tags is Set[Str:D]; } 16:07
camelia ===SORRY!===
Object of type Set[Str:D] in QAST::WVal, but not in SC
rfold What does this error message mean? 16:08
jnthn It's an internal compiler error 16:09
(And so implies a compiler bug of some sort) 16:10
lizmat hmmm.... maybe we should disallow that for now? 16:11
jnthn Or figure out the bug :)
lizmat I'm not sure what the semantics would be
it being an immutable Set ? 16:12
rfold jnthn: thanks :D
jnthn lizmat: Oh, right, 'cus it's on an attribute... Well, arguably the STORE in a newly created object is initialization.... 16:24
lizmat yeah, but what if you do it in a TWEAK ? 16:25
jnthn Tough luck, I guess :)
Though we could maybe treat such an assignment in TWEAK/BUILD as initial also 16:26
lizmat thing is, that I do find the idea of an immutable Set as an attribute useful
jnthn But then what if they call a private method to help with stuff, and the private method is also called from elsewhere, etc.
lizmat I guess some dynamic variable being set ?
in any case, things would need to be thought out here 16:27
meanwhile /me is going to see Far from Home now
rfold subtest ‘spaghetti is only compatible with sauces’ => { … } # wonderful :) 16:33
Xliff \o 21:16
m: Any.new.gist.say 21:17
camelia Any.new
Xliff m: (Str ~~ Any).say 21:18
camelia True
Nobody Q: Can someone fill a noob in on why i can do this 'append: stuff' vs 'append(stuff)' with arrays? can't seem to find docs on this. 21:53
yoleaux 16 Feb 2017 14:50Z <faraco> Nobody: I'm bored.
AlexDaniel Nobody: you can do it with any method call 22:00
Nobody: docs.perl6.org/language/objects#Using_objects 22:01
Nobody AlexDaniel: so its just an alternative way to pass method arguments?
AlexDaniel yes
m: say 4.log(2) 22:02
camelia 2
AlexDaniel m: say 4.log: 2 22:03
camelia 2
Nobody AlexDaniel: thanks, I'll read over the linked page.
AlexDaniel m: say log 4: 2
camelia 2
sboss I am looking for some information on Perl6 regex to match symbols like <, >, & / (for example). I tried googling it but I have failed. 22:14
If someone could just point me in the right direction I would appreciate it 22:15
timotimo sounds like you want "<", ">", "&", "/" for example
sboss Yes
timotimo yeah, that's literally all you need, just need to quote it 22:16
sboss Kk thanks
timotimo perl6 regex has the simple rule where symbols need to be escaped to match literally, and letters match literally
AlexDaniel sboss: also docs.perl6.org/language/regexes#Pr...er_classes 22:19
m: say ‘Hello <world>, this “is” a 'test'.’.match(/<punct>/) 22:20
camelia 「,」
punct => 「,」
AlexDaniel m: say ‘Hello <world>, this “is” a 'test'.’.match(:g, /<punct>/)
camelia (「,」
punct => 「,」 「“」
punct => 「“」 「”」
punct => 「”」 「'」
punct => 「'」 「'」
punct => 「'」 「.」
punct => 「.」)
AlexDaniel we can also see what other unicode properties are there
unidump: <>&/ 22:21
unicodable6 AlexDaniel, gist.github.com/8715ac51d5bb38810b...94d8b19c41
masak pmurias: I don't know why there are so many bash script. in all likelihood, I'm missing some factor to explain that. but it is possible for something to be unfit and popular at the same time, so that might simply be it. 22:35
scripts*
AlexDaniel masak: a shell with better quoting is maybe `fish`? 22:39
I don't think I've heard of any other one that is relatively popular and fixes the quoting issue
AlexDaniel timotimo: re gumbo, I don't think there's “probably”. I tested it and it works now 22:44
Xliff [text hidden] 23:09
timotimo Xliff: i hope that's not a password? :) 23:18
Xliff Yeah. But you'd have to be here to use it. 23:22
I will now have to change all of my VM passwords. :P
timotimo oops
Xliff :P
timotimo clipboards are dangerous
Xliff It's only used in two places.
No. That was serious power window misusage.
timotimo power window? 23:23
Xliff Clipboards may be dangerous, but misleading focus kills
timotimo oh
Xliff Can you blank that from the logs? 23:24
timotimo i dunno who runs colabti
moritz' irclog.perlgeek.de doesn't exist any more
Xliff Yeah. I know.
timotimo Powered by irclogger2. Hosted by colabti.org. For comments, questions or to report problems, tell feb on #irclogger on irc.freenode.net. 23:25
Xliff goes back to futzing with Amazon's inconsistent AWS API
wildtrees whats the perl6 story on nixos? anyone know? 23:42
AlexDaniel wildtrees: according to this it's not in nixpkgs: repology.org/project/rakudo/versions 23:58
wildtrees I have a rakudo-sta-2017 something 23:59