»ö« 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.
cpan-p6 New module released to CPAN! FindBin::libs (0.0.1) by 03LEMBARK 00:46
swissChili Hey folks, I'm trying to learn perl6 again, I've used perl5 estensively but am fairly new to perl6. How can I check if a file exists in p6? 03:40
I've looked on the subroutine docs and can't find anything 03:41
sjn m: say "/etc".IO.e 03:42
camelia True
sjn it's an IO method 03:43
m: say "/etc/example".IO.e
camelia False
sjn swissChili: docs at doc.perl6.org/routine/e 03:44
a good place to start when you already know Perl 5 is to check out the migration guides at doc.perl6.org/language.html 03:46
swissChili great, thank you so much! 03:48
From what I gather perl style flags (-e, -m, etc) aren't a thing in p6, is that correct?
Geth doc: 311e8d2038 | (JJ Merelo)++ | 2 files
Reflows and moves unique to the indep routines refs #1518
05:50
doc: 03f0e18fcf | (JJ Merelo)++ | 2 files
squish and repeated were not really in List

Moved to independent routines, with the sub only definition. Refs #1518
doc: 2c66df86b0 | (JJ Merelo)++ | doc/Type/List.pod6
Reflows, closes #2823
synopsebot Link: doc.perl6.org/type/List
Geth doc: 0ad9db1362 | (JJ Merelo)++ | doc/Type/Routine.pod6
Reflow while preparing for #2824
06:11
doc: 99dea0cf21 | (JJ Merelo)++ | doc/Type/Routine.pod6
Moves is default with the other traits #2824
synopsebot Link: doc.perl6.org/type/Routine
doc: 0d62e8fa52 | (JJ Merelo)++ | doc/Type/Routine.pod6
Adds information on is raw, closes #2824
jmerelo releasable6: status 06:15
releasable6 jmerelo, Next release in ≈27 days and ≈12 hours. 1 blocker. 140 out of 451 commits logged (⚠ 2 warnings)
jmerelo, Details: gist.github.com/c5643bf123d16b9a86...3184a2a586
lizmat weekly: digitalbarbedwire.com/2019/05/23/s...challenge/ 08:04
notable6 lizmat, Noted!
holyghost I'm off for the weekend, take care 09:29
yoleaux 23 May 2019 13:50Z <vrurg> holyghost: Thanks! Any help with any platform is welcome for sure. I would most likely close the existing openbsd ticket. So, feel free to open a new one.
cpan-p6 New module released to CPAN! Log::Timeline (0.1) by 03JNTHN 09:54
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Language revision dependent spectests: change the approach. github.com/perl6/problem-solving/issues/31 10:15
elcaro m: { say (2, 4 ... 500_000); say (now - ENTER now).Int } 11:02
camelia (2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152…
elcaro bisectable6: { say (2, 4 ... 1_000_000); say (now - ENTER now).Int < 1 }
moritz m: { (2, 4 ... 500_000).join; say (now - ENTER now).Int }
camelia 3
bisectable6 elcaro, Bisecting by output (old=2015.12 new=0023f64) because on both starting points the exit code is 0
elcaro something going odd with large gists
taking a long time to gist, like it's egarly evaluating 11:03
hmmm
maybe a prob with me only ?
AlexDaniel bisectable should trim too large output…
bisectable6 elcaro, bisect log: gist.github.com/a2564932778bc3e1b2...0ad11cf79e 11:03
elcaro, (2019-03-02) github.com/rakudo/rakudo/commit/8f...c4b46ea8fe
moritz m: { (2, 4 ... 500_000).gist; say (now - ENTER now).Int } 11:04
camelia 3
elcaro should be instant
moritz why? it's not infinite
elcaro it is on my old 2018.04
check the bisect
moritz m: { say (2, 4 ... 500_000).gist.chars; say (now - ENTER now).Int }
camelia 352
3
AlexDaniel elcaro: ah it was taking long to time out
AlexDaniel c: 8f424c9d8e^,8f424c9d8e { say (2, 4 ... 1_000_000); say (now - ENTER now).Int < 1 } 11:05
committable6 AlexDaniel, gist.github.com/1e4fa2fe9d903b10ad...eccfbb27d2
AlexDaniel or not
c: 8f424c9d8e^,8f424c9d8e { say (2, 4 ... 1_000_000); say (now - ENTER now).Int }
committable6 AlexDaniel, gist.github.com/e1ff352cd834b76a20...baec89fd98
AlexDaniel anyway, yeah, looks like a bug to me
elcaro: please file a ticket :) 11:06
c: 8f424c9d8e^,8f424c9d8e say (2, 4 ... 1_000_000).is-lazy 11:07
elcaro AlexDaniel: Will do
committable6 AlexDaniel, ¦8f424c9d8e^,8f424c9: «False␤»
AlexDaniel c: 8f424c9d8e^,8f424c9d8e say (2, 4 ... 1_000_000).is-lazy; say (now - ENTER now).Int
committable6 AlexDaniel, ¦8f424c9d8e^: «False␤0␤» ¦8f424c9: «False␤6␤»
AlexDaniel so is-lazy itself iterates the thing? Hah 11:07
lizmat: ↑
lizmat interesting, please make an issue :-) 11:09
elcaro lizmat: I'm on it
lizmat .Seq(3) @0 11:13
├ 0 = Scalar: 1(0).Str
├ 1 = Scalar: 10000(5747).Str
└ 2 = Int: 4238(0).Str
oops, ww
elcaro Issue #2920 raised 11:15
lizmat elcaro++ 11:16
nadim_ lizmat: Nice oops, what about wrapping things up a bit? note the coloring of the class, if you want to, so you can see what's yours and wha't Perl's 14:25
nopaste.linux-dev.org/?1203424
nadim_ m: bleah:(0) 14:45
camelia ===SORRY!===
This type (QAST::WVal) does not support positional operations
nadim_ It's not so much the error message above that is not helping but the fact that the compilation ends and there is no information about where in the file it happened
shall I report this somewhere? 14:46
timotimo yes, a rakudo ticket would be fine 14:47
nadim_ will do
nadim_ timotimo: github.com/rakudo/rakudo/issues/2921 14:52
ugexe use --ll-exception? 15:03
Geth doc: JJ assigned to antoniogamiz Issue Make link checker work locally; make it a test github.com/perl6/doc/issues/1433
d60e8a0de5 | (JJ Merelo)++ | doc/Language/list.pod6
16:32
jmerelo m: my @lazy-array = lazy 1, 11, 121 ... 10**100; 16:39
camelia ( no output )
jmerelo m: my @lazy-array = lazy 1, 11, 121 ... 10**100; say @lazy-array.^name 16:40
camelia Array
doc: bb48e46478 | (JJ Merelo)++ | doc/Language/list.pod6
Clarifying roles and reflowing.

Closes #2139
synopsebot Link: doc.perl6.org/language/list
timotimo kawaii: is the discord irc bot sick? 17:13
kawaii timotimo: uh not sure, I didn't create/maintain it sorry! 17:14
timotimo your name just came to mind when i thought "discord" :P 17:15
timotimo oh, it's tyil who runs it, isn't it? 17:15
AlexDaniel maettu, rba: ↑ 17:18
another thing you should be aware of :)
timotimo ah, good point 17:19
sena_kun is github.com/perl-gsoc-2019/ideas/bl...linking.md accepted, right? and it means an ability to ship a single binary, right? 17:41
lizmat yes, I think that is indeed the goal 17:43
sena_kun thanks 17:44
rba Hmm. What is the discord irc bot? 17:50
jmerelo sena_kun: yep. It's now in the community bonding phase, but I'm not sure how they are doing. 17:51
MasterDuke sena_kun, jmerelo: they're discussing in #moarvm right now 17:52
jmerelo MasterDuke: great
MasterDuke rba: bridges the discord room and this channel 17:52
jmerelo Thanks!
sena_kun jmerelo, I see, so that's what I thought. Just got asked by a friend, "Can Perl 6 give binaries?" and I responded with "There is a gsoc project doing this year", but then wanted to re-confirm I am right. :) 17:53
s/this/this this/ 17:54
MasterDuke sena_kun: i think samcv did something with flatpak already and jnthn has App::Wix for windows if they don't mind big files 17:54
samcv yeah there is some flatpak thing. i think somebody else did it better though 17:55
samcv not sure. otherwise ask me and i'll show you my repo. 17:55
samcv did we fix the issue that perl 6 can't be relocated yet? 17:55
sena_kun I think "yes" 17:56
MasterDuke yeah
samcv ok. then yeah. my package works but can be simplified now :)
maybe why it's failing the build. in addition to maybe other things. i used to have to use sed on binary files to change the directory :)
kawaii timotimo: ah, no it's the API::Discord module I maintain :)
samcv so now it's muchhh easier to do :)
sena_kun I told there are docket images available, so it is probably enough
*docker
samcv yeah. my appimage is not production ready anyway. modules were. weird 17:57
random module breakyness
can't install modules etc
timotimo samcv: wasn't that AppImage? 18:06
ah, you also mentioned those
samcv yep 18:13
kawaii It'd be interesting to see Java binaries to run Perl 6 code, I expect something is possible with the JVM backend. 19:08
antoniogamiz can someone tell me difference between when :(Pod::FormattingCode $) and :("",Pod::FormattingCode $,"") 19:53
?
sena_kun antoniogamiz, where is this from?
antoniogamiz htmlify 19:54
there's a comment that says # XXX: Remove when extra "" have been purged 19:55
sena_kun both are signatures, first one takes a Pod::FormattingCode object(though leaves it anonymous), the second takes three arguments, two are constant empty strings, in between there is a Pod::FormattingCode.
m: sub foo("", Int $_, "") { say $_ }; foo('', 42, '') 19:56
camelia 42
sena_kun m: sub foo("", Int $_, "") { say $_ }; foo('', 42)
camelia Too few positionals passed; expected 3 arguments but got 2
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
sena_kun m: sub foo("", Int $_, "") { say $_ }; foo('', 42, 'bar')
camelia Constraint type check failed in binding to parameter '<anon>'; expected "" but got "bar"
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
sena_kun so it enforces a call like `'', $code, ''`, though I don't have an idea for what it can be necessary, you can be interested in taking a look at callers 19:57
antoniogamiz that happens a lot in htmilify xdd
thanks sena_kun
sena_kun I don't know what you are doing, I would just look at recent attempts to rewrite the whole thing from scratch... but that's just me. good luck, anyway. 19:59
s/doing, /doing, but / 20:00
antoniogamiz I'm trying to understand how definitions are made
sena_kun would stick a `say $_` at github.com/perl6/doc/blob/master/h...fy.p6#L570 and something like `say normal`, `say a thing with weird "" around` in `when` blocks, and then run the thing to see what it prints out and what items go into ("", Pod::FormattingCode $, ""), and what items go into :(Pod::FormattingCode $), once you can figure the difference in input, you can think of what to do with it. 20:03
antoniogamiz sena_kun: yep, I will do that :) 20:07
this is also to build tests and move that logic to Perl6::Documentable
sena_kun but it somehow seems very unidiomatic for me, so ++antoniogamiz if you will be able to get rid of it. ;) 20:08
antoniogamiz first I have to untagle it haha 20:09
sena_kun yes, that's for sure
antoniogamiz surprise, that case does not even run in the full set docs 20:20
sena_kun .oO ( rip and tear, rip and tear ) 20:21
antoniogamiz :D
MasterDuke kawaii: the truffle branch of nqp can make binaries with graalvm that start instantly 20:27
antoniogamiz use say everywhere is the best debugger :D 20:39
sena_kun I remember Comma to be unable to parse htmlify, not sure if it is so today 20:40
antoniogamiz Comma? 20:41
sena_kun commaide.com/
antoniogamiz uoh :oo 20:42
sena_kun yes, unfortunately, it cannot process htmlify.p6 as it is now. :/
antoniogamiz for the moment :D 20:43
sena_kun yup
jnthn sena_kun: Hm, why not? 20:44
sena_kun jnthn, it fails to parse it in multiple places
for example, `=begin` with an indentation, `>>` operation in an expression(which is a hard one) 20:45
kawaii I should probably update my Comma, still using the release version 20:46
sena_kun kawaii, hmm, what release? 20:47
kawaii sena_kun: like the first public release of the community edition 20:47
jnthn Ah, then yes, there is a newer community one than that. :)
sena_kun and it fixes a number of bugs 20:48
kawaii can I just overwrite the files with the files from the new tarball? 20:49
sena_kun better to put it in the sibling directory, and once you migrate, you can just remove the old one 20:50
jnthn sena_kun: Will see if I can figure out any of the htmlify.p6 issues...at least when I'm not distracting myself with $shiny-new-feature :) 20:51
sena_kun jnthn, good luck.
jnthn heh, for the =begin identation one and my recollection of the grammar there, "good luck" is indeed useful :)
sena_kun this way, I hope a grahical debugger will be helpful for antoniogamiz to hack on docs. ;) 20:52
antoniogamiz :) 20:54
uzl Hello #perl6! 20:56
sena_kun o/
timotimo greetings uzl
uzl So do I pass an array of values to a MAIN with an array signature? 20:57
uzl greetings, sena_kun and timotimo! 20:57
antoniogamiz o/
AlexDaniel uzl: you mean like, properly? I don't think it actually works, but if you have sub MAIN(:@foo) you can then do --foo=42 --foo=43 20:58
it only works if you have zero, two or more elements 20:59
MasterDuke hm, didn't someone say they were going to work on that recently 21:00
uzl AlexDaniel: Oh, I see! Do you think a similar behavior will ever be part of Rakudo? 21:00
AlexDaniel uzl: it's already part of rakudo, it just doesn't work if you only pass one argument 21:01
AlexDaniel ah wait 21:01
github.com/rakudo/rakudo/issues/2797
according to this ticket, it was recently fixed
so lizmat++ and feel free to use it :) 21:02
uzl BTW, what does the '<foo>' symbolizes in the usage message? A list of values?
kawaii sena_kun: wow, Comma detected my previous installation and asked if I wanted to import my settings :O 21:03
sena_kun kawaii, well, it is based on IntelliJ, and IntelliJ does that. ;)
AlexDaniel uzl: it doesn't symbolize anything I think, IMO it should say foo instead of <foo> 21:04
sena_kun so you don't want to overwrite anything, really, just enough to get a new one, import settings, possibly remove the old one if you want, and get back to work with new features. :]
MasterDuke sena_kun: do i need any additional plugins to also use comma for c (moarvm) development?
AlexDaniel uzl: although, if you have something like `sub MAIN(‘foo’)` 21:04
uzl: then it'll be foo instead of <foo>
uzl: man git seems to use a similar notation 21:06
where fixed strings like subcommands are shown as is and everything else is in <>
sena_kun MasterDuke, do we have a lot of Perl 6 code in moarvm? If it is (almost) pure C, then I'd take something that you are using usually.
MasterDuke sena_kun: not a lot of perl 6 code. i mean to use comma for the pure c 21:07
sena_kun MasterDuke, no, Comma is a Perl 6 IDE. You can try out CLion, which is based on IntelliJ as Comma is. 21:08
uzl AlexDaniel: Thanks for the explanation. I just noticed that the foo example in the issues uses a named array but I'm trying with a positional (e.g, sub MAIN(@foo) { ... }). 21:10
Is it possible to use a positional instead?
AlexDaniel uzl: yes, just has to be *@foo 21:10
uzl Oh, great! Thanks. The reason why it needs the '*' is the same reason why one would use in a regular subroutine right? 21:13
I mean... for the slurpy behavior.
AlexDaniel uzl: I guess, but it makes me wonder why `sub MAIN(@foo)` works at all 21:15
shouldn't it complain or something?
uzl It doesn't work on my end! That's why I was struggling with it ;-)! 21:17
nadim_ I have a sub that returna Str but I want it to return a variable container. how does one do that?
uzl It prints out the usage message.
uzl nadim_: return-rw? 21:17
nadim_ ah, right! 21:18
uzl nadim_: docs.perl6.org/syntax/%20return-rw
nadim_ I read about it yesterday :) memory is not so goodany longer 21:18
but what if one wants to return some variables as rw and other ro? 21:19
uzl I'm not a 100% sure but wouldn't using just `return` returns a value which means it's ro since it cannot be mutated? 21:21
Or do you mean returning both from the same subroutine?
nadim_ returning both 21:22
uzl Sorry but I'm not sure :(! 21:23
nadim_ no problem ;) 21:23
AlexDaniel uzl: this works for me: perl6 -e 'sub MAIN(*@foo) { dd @foo }' foo bar baz
e: run <perl6 -e>, 「sub MAIN(*@foo) { dd @foo }」, <foo bar baz> 21:24
evalable6 Array element = ["foo", "bar", "baz"]
AlexDaniel uzl: oh, you mean with just @foo? Yeah… 21:24
doesn't complain and doesn't work 21:25
uzl AlexDaniel: Yeah, it works for me too. I was just confirming that without the *, the usage message is printed.
with just @foo
So I guess it's working as expected
lizmat weekly: blogs.perl.org/users/laurent_r/2019...kings.html 22:47
notable6 lizmat, Noted!