»â« 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 joined, [particle] joined 00:01 [particle]1 left 00:02 mcmillhj joined 00:04 lizmat left 00:05 [particle] left 00:06 mcmillhj left 00:13 Xliff joined 00:14 mcmillhj joined
Xliff \o 00:14
00:15 Xliff left
lookatme o/ 00:17
00:18 mcmillhj left 00:22 markoong left 00:25 fascinum joined 00:26 mcmillhj joined 00:30 Tison left 00:31 mcmillhj left 00:32 Xliff joined
Xliff \o, again 00:32
Does anyone know if "is DEPRECATED" supports all the options of the old "DEPRECATED" sub? 00:33
"sub DEPRECATED" used 3 arguments. I am trying to find a better way to conver that to "is DEPRECATED" without too much modification.
For example -- How would this convert to the trait version: "DEPRECATED('size-request',Any,'0.3.2')" 00:36
00:42 mcmillhj joined
lookatme Don't know that, better ask on the stackoverflow Xliff 00:44
00:46 mcmillhj left 00:53 mcmillhj joined 00:54 [particle] joined 00:55 raschipi joined
Xliff Nah. I'll leave the question up and wait for a response, here. 00:56
The reason I am asking is because I am trying to add to GTK::Simple.
And that project still uses the old method.
So it's br0ke
lookatme Okay 00:58
00:59 [particle] left 01:09 mcmillhj left, mcmillhj joined 01:14 mcmillhj left 01:25 [particle] joined 01:27 pmmmm left 01:28 mcmillhj joined 01:30 [particle] left 01:33 mcmillhj left 01:36 ChoHag left
Xliff Who is working on GTK::Simple? 01:37
01:41 Xliff left 01:43 mcmillhj joined 01:47 mcmillhj left 01:57 [particle] joined 02:01 molaf left 02:02 [particle] left 02:06 Schepeers left 02:09 Schepeers joined, Schepeers left 02:11 Schepeers joined, Schepeers left, mcmillhj joined 02:14 molaf joined 02:16 Tison joined, mcmillhj left 02:19 raschipi left 02:22 Schepeers joined 02:24 Schepeers left 02:26 mcmillhj joined 02:27 Schepeers joined, Schepeers left 02:31 mcmillhj left 02:34 Schepeers joined 02:48 wamba joined
Geth ecosystem: 279c5a0f4d | (Fernando Correa de Oliveira)++ (committed using GitHub Web editor) | META.list
Add OrderedHash to the ecosystem

02:53 [particle] joined 02:59 mcmillhj joined 03:04 mcmillhj left 03:14 Tison left 03:19 mcmillhj joined 03:23 mcmillhj left
skids .tell AlexDaniel yes, anything I say on #perl6-dev or #perl6 may be published with my permission. 03:37
yoleaux skids: I'll pass your message to AlexDaniel.
geekosaur that's not quite the same thing 03:39
logs, not specific snippets
hm, guess that depends on how I understand 'with my permission', to me it sounds like "please check first" 03:40
which is difficult for logs
skids Oh, I meant in the "permission is granted" sense. 03:41
geekosaur this is something it is good to be certain about, since the context is GDPR and our logs going away as a result 03:42
because nobody specifically have permission to be logged
03:44 w_richard_w left
skids .tell AlexDaniel I mean, you hereby have my permission to publish the logs (it was pointed out that could be taken two ways) 03:44
yoleaux skids: I'll pass your message to AlexDaniel.
03:52 mcmillhj joined 03:57 mcmillhj left 04:08 mcmillhj joined 04:13 mcmillhj left 04:19 fascinum left 04:34 mcmillhj joined 04:39 mcmillhj left 04:44 [Sno] left 04:49 mcmillhj joined 04:51 cognominal left 04:54 psychoslave joined, mcmillhj left 04:57 curan joined 04:58 mahafyi left 04:59 mahafyi joined 05:02 skids left, eliasr left 05:05 skids joined 05:06 xtreak joined, redhands joined 05:08 jmerelo joined 05:14 mcmillhj joined 05:18 mcmillhj left 05:20 troys left 05:25 molaf left 05:29 mcmillhj joined 05:31 domidumont joined 05:33 mcmillhj left 05:35 xtreak left, xtreak joined 05:38 domidumont left 05:39 domidumont joined, [Sno] joined 05:40 xtreak left
Geth doc: cbcf464ae7 | (JJ Merelo)++ | doc/Type/X/IO/Unlink.pod6
defined β†’ denied
doc: 46e94bce6b | (JJ Merelo)++ | doc/Type/IO/Path.pod6
Revises unlink, closes #2096
synopsebot_ Link: doc.perl6.org/type/X::IO::Unlink
Link: doc.perl6.org/type/IO::Path
ingy anyone know what digest algorithm is used for .precomp file names? 05:48
sha1 seems to be 44 chars long and precomp names are 40 05:49
jmerelo ingy: I guess we would have to look at the source...
ingy nm
jmerelo ingy: it uses nqp::hash...
ingy sha1 is 40, my bad
05:50 xtreak joined
ingy jmerelo: url? 05:51
jmerelo ingy: I was going to say this: github.com/rakudo/rakudo/blob/ec04...em.pm6#L10 05:52
ingy: but I'm realizing that creates a real hash as in hashmap 05:53
so not that.
ingy: but this is the one github.com/rakudo/rakudo/blob/ec04...it.pm6#L17 05:54
ingy: and yes, it uses nqp::sha1
06:02 sauvin joined, mcmillhj joined 06:08 mcmillhj left 06:17 damnlie left 06:18 kybr left, espadrine left 06:20 mcmillhj joined, damnlie joined 06:24 skids left 06:25 mcmillhj left 06:31 domidumont left 06:36 mcmillhj joined
ingy jmerelo: thx 06:39
jmerelo ingy: :-)
06:41 mcmillhj left
ingy I need to do a similar thing for my testml language. Store precompiled code. I'm just using timestamps at the moment, but it won't work for shipping my precomps. 06:42
jmerelo ingy: the expert in precomp, far as I can tell, is ugexe. Using it very extensively in zef. 06:43
ingy: we have a similar intention in perl6/doc github.com/perl6/doc/issues/1952 06:44
ingy do any mechanisms ship the precomp files 06:45
jmerelo ingy: there's an implementation in pod2onepage, just in case you want to look how it works in practice. It's not well documented, though 06:46
ingy: as in packaging them and using them for deployment? No, I don't think so. It's used only locally.
ingy I see. In my case I have this language called testml that you can write tests that run in any language. like they run in perl6. but the compiler is not perl6. so when I ship perl6 modules that have testml tests, I ship the test sources, but also the precompiled versions. 06:48
so the test runner needs to know that the source file is in sync with the precomp file. and was just wondering what kind of hashing would be best for that. 06:49
jmerelo: you going to the perl conf next week, perchance? 06:50
in utah...
jmerelo ingy: No, sorry. 06:51
ingy no worries :)
bed time for old ingy... 06:52
ttul o/
jmerelo ingy: see you tomorrow :-)
06:56 robertle joined
ingy jmerelo: oh... can you tell from that code what values are using to compute the digest? 06:56
06:56 redhands left
ingy is it just file content or what? 06:57
jmerelo ingy: I think it's just in the name. It computes different sha1 depending on the type of thing, if it's in a repo or not, but I don't think it's using the content. 06:58
ingy: let me see
ingy so it would recompile based on timestamp? 07:00
jmerelo ingy: far as I remember from the pod2tonefile, yes 07:01
ingy: but let me see, I'm not so sure now.
ingy: right, it's using the timestamp github.com/perl6/perl6-pod-to-bigp...nepage#L64 At least in this implementation 07:02
ingy: as I say, not too well documented...
ingy thanks for all the help! 07:03
jmerelo ingy: no problem. My pleasure.
07:05 mcmillhj joined 07:06 psychoslave left 07:07 psychoslave joined 07:10 mcmillhj left, lizmat joined, darutoko joined 07:11 wamba left 07:13 psychoslave left 07:14 dakkar joined 07:16 Hotkeys joined 07:19 mcmillhj joined 07:20 HaraldJoerg joined 07:24 ChoHag joined 07:25 mcmillhj left
Geth doc: 9f1f046710 | (JJ Merelo)++ | 2 files
Adds push-exactly refs #1395
doc: 4a5c96613e | (JJ Merelo)++ | doc/Type/Iterator.pod6
Improves push-at-least refs #1395
synopsebot_ Link: doc.perl6.org/type/Iterator
doc: d6698c4e72 | (JJ Merelo)++ | doc/Type/Iterator.pod6
Includes better examples for .push methods in Iterator docs.

Which then closes #1395
07:40 pecastro joined 07:42 vike left
lizmat clickbaits p6weekly.wordpress.com/2018/06/11/...-redirect/ 07:45
07:47 mcmillhj joined 07:48 domidumont joined 07:50 vike joined 07:51 mcmillhj left 07:55 wamba joined
sjn lizmat: itym "You'll never believe what happened next!" p6weekly.wordpress.com/2018/06/11/...-redirect/ 07:56
07:56 Actualeyes left
lizmat :-) 07:56
sjn "Noone expected how URL would change their life!" 07:57
07:57 Xliff joined
jmerelo :-) 07:58
Xliff \o
sjn o/
Xliff Is anyone working on gtk-simple right now?
I am trying to add gtk_widget_is_focus() and gtk_widget_grab_focus(), but I am running into NativeCall type issues. 08:01
Namely that when I pass any typed widget, I get an error about "expecting a CPointer type but got P6opaque"
Is there any way to force a specific cast to an object type with Perl6? 08:03
jmerelo Xliff: p6Opaque is perl6ish, CPointer is native
Xliff: that means that you will have to work with native objects through and through. 08:04
Xliff I know that. :S
But when I get to the point of using actual GTK::Simple::Widget subclasses, I run into problems.
jmerelo Xliff: so "any typed widget" will have to be natively typed. 08:05
Xliff I just want a way to coerce them to GtkWidget if necessary.
GtkWidget is CPointer.
So if I have a GTK::Simple::VBox, how can I coerce it to GtkWiget if a GtkWidget is called for?
08:05 rindolf joined
jmerelo Xliff: the best thing is probably to raise an issue in the repo. In general, it's not possible to coerce non-native types to native types. Hence the error. 08:06
Xliff Do I need to use MONKEY-TYPING for this?
Or can I just define a "method GtkPointer" and do my conversion there? 08:07
jmerelo Xliff: don't think so. MONKEY-TYPING is used to augment existing classes docs.perl6.org/syntax/augment
Xliff For example: "method GtkPointer { nativecast(GtkPointer, self) }
jmerelo Xliff: conversion might be a better option. Give it a try.
Xliff Er... correction: "method GtkWidget { nativecast(GtkWidget, self) }" ... or would that be +self? 08:08
BTW jmerelo, how are you doing? 08:11
Anything fun?
(I know, I know... I still owe you docs...) 08:12
08:12 aindilis left 08:15 HaraldJoerg left 08:16 xtreak left, robertle left, xtreak joined 08:17 aindilis joined 08:19 Xliff left
jmerelo Xliff: not really now. Filing paperwork for a grant in $dayjob 08:19
Xliff: there are lots of issues still to be done... work on them whenever you feel like :-) 08:20
08:20 aindilis left
jmerelo There's also a squashathon coming up 08:20
squashable6: status
squashable6 jmerelo, Next SQUASHathon in 24 days and β‰ˆ1 hour (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
08:21 xtreak left, HaraldJoerg joined 08:27 mcmillhj joined, HaraldJoerg1 joined 08:29 HaraldJoerg left, psychoslave joined 08:32 mcmillhj left 08:33 scimon joined 08:37 scovit left 08:39 mcmillhj joined 08:43 xtreak joined 08:44 mcmillhj left 08:51 aindilis joined 09:02 scimon left 09:03 scimon joined 09:08 xtreak_ joined 09:10 xtreak left 09:13 lizmat left 09:14 lizmat joined 09:16 xtreak joined 09:17 jmerelo left 09:18 mcmillhj joined 09:20 xtreak_ left 09:23 mcmillhj left
sjn Ooh, I found a confusing error message! \o/ 09:27
echo "foo" | perl6 -ne 'say "${_}"' 09:28
Unsupported use of ${_}; in Perl 6 please use {$_}
(which in this case doesn't do what's expected!)
AlexDaniel sjn: sorry, what is expected? 09:33
m: use isms <Perl5>; say "${_}"
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '${_}' is not declared
at <tmp>:1
------> 3use isms <Perl5>; say "7⏏5${_}"
El_Che sjn: are you fuzzy testing?
sjn El_Che: yeah, playing with some Perl5-isms to see what happens 09:35
09:36 mcmillhj joined
sjn bug report created 09:36
AlexDaniel: in Perl5, ${var} is the same as $var 09:37
AlexDaniel m: $_ = 42; say "{$_}" 09:39
camelia 42
AlexDaniel so why not?
m: $_ = 42; say ${_}
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of ${_}; in Perl 6 please use $_
at <tmp>:1
------> 3$_ = 42; say ${_}7⏏5<EOL>
AlexDaniel the error message is even smart enough to recommend $_ if you're not in a str 09:40
09:40 mcmillhj left
ilmari $ echo "foo" | perl6 -ne 'say "{$_}"' 09:40
Use of uninitialized value $_ of type Any in string context.
it works without the { }
AlexDaniel oh 09:41
09:41 ExtraCrispy joined
AlexDaniel why? 09:41
hmmm 09:42
El_Che it's the quotes 09:43
$ echo "foo" | perl6 -ne 'say ${_}'
Unsupported use of ${_}; in Perl 6 please use $_
sjn {} creates a closure, which resets $_ 09:44
El_Che I did this: echo "foo" | perl6 -ne 'say ${_}'
AlexDaniel sjn: I don't think so 09:45
sjn any variable other than $_ works fine with the example in the error message
AlexDaniel m: $_ = 42; put "{ say $_ }"
camelia 42
AlexDaniel m: $_ = 42; put "{$_}"
camelia 42
sjn so something different happens with a perl6 -ne loop? 09:46
09:53 zakharyas joined 09:54 scimon left, robertle joined 09:58 scimon joined 10:00 mahafyi_ joined 10:01 mahafyi left, mahafyi_ is now known as mahafyi 10:04 mcmillhj joined 10:07 Hotkeys left 10:09 mcmillhj left 10:12 xtreak left 10:15 mcmillhj joined 10:20 mcmillhj left 10:29 cognominal joined 10:32 cognominal left 10:37 cognominal joined 10:42 mcmillhj joined 10:43 scimon left 10:44 scimon joined 10:47 mcmillhj left
Geth doc: 3347f71fa4 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlsyn.pod6
Expand a bit on labels wrt to goto
synopsebot_ Link: doc.perl6.org/language/5to6-perlsyn
Geth doc: 80a4f64926 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Add example of an anonymous sub return itself
doc: ba87ed3068 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
De-emphasize references vs containerized objects
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
doc: 44a39217bf | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Link to the smartmatch documentation
11:07 kurahaupo left 11:08 kurahaupo joined
Geth doc: dbdd6aca58 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Link to actual documentation rather than to synopsis
11:14 mcmillhj joined 11:15 Actualeyes joined, psychoslave left 11:16 markong joined 11:19 mcmillhj left, gregf_ left
moritz ⟰ always up! 11:24
Geth doc: b1bfd97f5b | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Elaborate on the "my Foo .= new()" idiom
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
moritz (I just love the QUADRUPLE ARROWs in Uincode)
lizmat m: dd "⟰"uninames
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3dd "⟰"7⏏5uninames
expecting any of:
infix stopper
statement end
statement modifie…
lizmat m: dd "⟰".uninames
11:26 mcmillhj joined, markong is now known as markoong 11:31 mcmillhj left
Geth doc: 54365a6c8b | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Elaborate a bit on comma versus parentheses
doc: 579461622c | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
infix xor *is* now dociumented
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
11:39 b2gills joined 11:47 zakharyas left 11:49 mcmillhj joined 11:53 mcmillhj left
Geth doc: f6328aeba6 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Elaborate a bit in array/hash interpolation
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
Geth doc: d13b36d607 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Mention that qqw// can also be written as << >>
12:06 nightfrog joined 12:07 psychoslave joined
Geth doc: ccb4f25322 | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Point to "Nil while foo()" idiom
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
12:12 xtreak joined 12:16 xtreak left
Geth doc: bdf3baf8ec | (Elizabeth Mattijsen)++ | doc/Language/subscripts.pod6
Change example of sorting multidimmed

Although the syntax "sort(*[1])" is technically correct, I felt it could be confusing to naive readers with the "say @a[*;1]" syntax just two lines before it. Using "sort( { $_[1] } )" is less magic at a place where there's already quite some magic introduced.
synopsebot_ Link: doc.perl6.org/language/subscripts
12:18 mcmillhj joined, raschipi joined 12:21 zakharyas joined 12:23 mcmillhj left 12:26 psychoslave left 12:28 psychoslave joined 12:29 psychoslave_ joined 12:31 silug joined 12:33 psychoslave left, psychoslave_ is now known as psychoslave 12:35 Hotkeys joined 12:41 noobp6 left 12:45 mcmillhj joined 12:54 mcmillhj left 12:57 mcmillhj joined 13:02 scimon left 13:05 scimon joined, aborazmeh joined, aborazmeh left, aborazmeh joined 13:08 skids joined 13:18 lizmat left 13:25 cosimo joined 13:26 Tison joined 13:27 zakharyas left, zakharyas joined 13:49 aborazmeh left
Tison m: say ("String", Nil, 2).perl 13:52
camelia ("String", Nil, 2)
Tison m: say ["String", Nil, 2].perl
camelia ["String", Any, 2]
Tison it remains me of once lizmat show how `is default` works
b2gills m: my Int @foo is default(42); @foo[3] = Nil; say @foo 13:54
camelia [42 42 42 42]
13:55 lizmat joined 13:57 curan left
Geth doc: 6c60943b1d | (Brad Gilbert)++ (committed using GitHub Web editor) | doc/Language/5to6-perlop.pod6
5to6 `1 while foo()` generates a warning
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
14:08 scimon left
Geth doc: d57a155c2f | (Will "Coke" Coleda)++ | doc/Language/5to6-perlop.pod6
14:08 scimon joined
Geth doc: 961110ac6c | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlop.pod6
Revert "Mention that qqw// can also be written as << >>"

This reverts commit d13b36d6071ddd12bf797df67ed8f05dbde2cb47.
synopsebot_ Link: doc.perl6.org/language/5to6-perlop
14:16 AlexDaniel left, AlexDaniel joined 14:17 zakharyas left 14:19 wamba left 14:22 subroot joined 14:29 scovit joined, scimon left, scimon joined 14:33 cono left
Geth doc: dc1ea46cdf | (Elizabeth Mattijsen)++ | doc/Language/5to6-nutshell.pod6
Hopefully clarify that Perl 6 doesn't have references better
synopsebot_ Link: doc.perl6.org/language/5to6-nutshell
raschipi When everything is a reference, nothing is a reference. 14:39
14:39 rindolf left
lizmat raschipi: indeed, do you have suggestions for improvement? 14:40
raschipi No, I think you did a wonderful job, explaining that p6 has references without saying that p6 has references. 14:41
Perhaps get into binding? I got confused about it's relationship with references a while back. 14:44
14:48 rindolf joined 15:02 n1ge left 15:03 geekosaur joined 15:04 nnunley left 15:09 theathlete joined 15:12 wamba joined 15:13 theathlete left 15:27 troys joined, jmerelo joined 15:33 psychoslave left 15:35 kybr joined 15:36 cognominal left 15:39 [Sno] left, rindolf left 15:48 domidumont left 15:49 xtreak joined, rindolf joined
ingy e: my $a=[];say 'OK' unless $a.elems == 0 16:01
ingy e: my $a=[];say 'OK' unless $a.elems
evalable6 OK
ingy e: my $a=[];say $a.elems == 0
evalable6 True
ingy explain please
jmerelo Let's see. 16:02
ingy err
16:02 HaraldJoerg joined
jmerelo m: say ($a.elems == 0).^name 16:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3say (7⏏5$a.elems == 0).^name
ingy explanation: ingy is dumb
jmerelo m: my $a=[]; say ($a.elems == 0).^name
camelia Bool
jmerelo ingy: :-) not really. Only we sometimes have to understand how Perl 6 behaves in misterious ways. 16:03
m: my $a=[]; say (so $a.elems == 0).^name
camelia Bool
16:03 kaare_ left
jmerelo ingy: first take into account that, by declaring it using $, it's an Scalar, not a Positional. 16:03
So let's see
16:04 HaraldJoerg1 left, kaare_ joined
jmerelo e: my @a=[];say 'OK' unless @a.elems == 0 16:04
ingy I just got my simple logic wrong
jmerelo ingy: right, because of the unless
jmerelo: so it's me who's dumb.
ingy us so dumb it's contagious 16:05
jmerelo As an excuse, I'm kind of dumb-founded by this conversation here github.com/perl6/doc/issues/2096#i...-396585259
But anyway. Positionals better carry a @. 16:06
16:08 lance_w[m] left, unclechu left, AlexDaniel`` left, mienaikage left, Garland_g[m] left, wictory[m] left, CIAvash[m] left, mirlur[m] left, ilmari[m] left, Matthew[m] left
ingy jmerelo: you are JJ? 16:08
I might link to the commit for "I revised the documentation" 16:09
16:10 xtreak left 16:11 evalable6 left, camelia left, greppable6 joined, evalable6 joined, mcmillhj left
jmerelo ingy: will do. 16:12
ingy: but it's right there in the closing notice...
ingy nod, bdfoy is maybe having a bad day :) 16:13
but he's a good guy
16:14 MasterDuke left 16:15 camelia joined 16:17 ChanServ sets mode: +v camelia, mcmillhj joined
raschipi jmerelo: he wants the docs to say what happens when you call unlink in a file that doesn't exist. It doesn't do anything, and returns the name of the file as if it had just deleted it. 16:18
jmerelo raschipi: well, the documents say that it does not return the file name if called as routine, raises an exception if called as a method. That's what it "does" 16:19
raschipi: I mean, it does not return the name of the file if it was not able to delete it, just the names of the files it *was* able to delete. 16:21
robertle to me "the files that were successfully deleted" does not include files that were already gone...
raschipi m: say unlink 'pl6.txt'
camelia unlink is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in sub unlink at src/RESTRICTED.setting line 19
in block <unit> at <tmp> line 1
ingy :)
robertle but it is awefully terse on the subject
raschipi If it was allowed, the line would say '[pl6.txt]'
jmerelo raschipi: it's raising an exception. It does not say anything... 16:22
robertle: What would you add?
raschipi It returns the names of the files that don't exist, not the ones that were deleted.
16:22 mcmillhj left
jmerelo hum 16:22
robertle jmerelo: not sure, but I'll try to phrase something later
jmerelo raschipi: it returns the names of the files that were deleted. If it couldn't delete them *for any reason*, it does not. 16:23
16:23 robertle left
Geth doc: zoffixznet self-assigned unlink doesn't complain if it tries to operate on a file that doesn't exist github.com/perl6/doc/issues/2096
46d35a3526 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6

Closes github.com/perl6/doc/issues/2096 D#2096
raschipi "it returns the names of the files that were deleted", but 'pl6.txt' in my line above doesn't exist and therefore couldn't be deleted, but it's name is reurned anyway.
jmerelo raschipi: do that locally. You can't use unlink with Camelia, It's raising an exception, doing nothing. 16:25
raschipi Yes, I did it locally.
got [pl6.txt] 16:26
jmerelo raschipi: I really don't understand here. Would that be an error in Rakudo? 16:27
raschipi: let me check
raschipi I don't think rakudo should do anything about it, the docs should be clarified to say that's the expected behavior.
If there's no error returned from unlink(2), return the name. unlink(2) succeeds both when the file was deleted and when it didn't exist in the first place. 16:28
16:28 mcmillhj joined
jmerelo raschipi: in subroutine mode, yes. It always succeeds, returns the names of the files deleted. 16:29
raschipi And in method form it returns true even when called in an IO object that points to a file that doesn't exist.
jmerelo raschipi: that's what it says in the docs. What you are saying is that maybe it should fail if it couldn't remove a file? Or that it should fail in different ways depending on why it couldn't delete? If you want that behavior, use it as a method. 16:30
ingy how do I flush stdout and stderr after every write operation?
jmerelo .flush on the filehandle docs.perl6.org/routine/flush Which I guess are $*OUT and $*ERR. 16:31
raschipi No, the docs say "The subroutine form returns the names of the files that were successfully deleted". Which is not complete, it returns the names of the files that were succesfully deleted and the ones that didn't exist in the first place.
synopsebot_ Link: doc.perl6.org/type/IO::Path
D#2096 [closed]: github.com/perl6/doc/issues/2096 unlink doesn't complain if it tries to operate on a file that doesn't exist
16:31 scimon left
raschipi The method form returns True when it succesfully deletes the files and when the file didn't exist. 16:32
jmerelo raschipi: Ah, OK. That's bad. And not documented. I didn't know.
16:32 Matthew[m] joined
jmerelo It's clear now in zoffix's patch 16:33
raschipi It shouldn't be changed.
16:33 mcmillhj left
raschipi Rakudo would have to check if the files exist before deleting them, which would be a problem when trying to delete a lot of them. 16:34
jmerelo raschipi: that wasn't in the issue, however...
El_Che it's weird it returns the list of files, it does not sound very usedful
returning an error seems more practical 16:35
raschipi You cast that to Int to get the number of deleted files, and to Boolean to test for a failed operation.
El_Che yeah, not that useful
casting as an error
jmerelo El_Che: it does so in one form. But anyway it's not our thing to judge that. Just to check that actual behavior is as documented. 16:36
16:37 sunnavy joined
jmerelo raschipi: Or it was, since all the *.txt didn't exist to start with. I tested it with files that *did* exist. I get it now... 16:37
geekosaur this might be more interesting if it instead returned the ones that failed, possibly mixin-d with Failure 16:38
16:40 sunnavy left
raschipi m: say my $n = Any but Failure; 16:40
camelia Cannot mix in non-composable type Failure into object of type Any
in block <unit> at <tmp> line 1
geekosaur guess I should have included "if that's possible" 16:41
my point is you might want to know why a particular file failed, and I don;t see a way to get that currently except to go one by one
and not sure even that since you get back what succeeded 16:42
jmerelo geekosaur: you can always use it as a method, individually in each file. It will throw an exception if it can't do something.
16:42 sunnavy joined
geekosaur that's what I just said 16:42
jmerelo geekosaur: right, sorry. 16:43
16:44 domidumont joined 16:45 mcmillhj joined
ingy jmerelo: I'll try .flush 16:45
I think Test::Builder is not flushing properly 16:46
but I might be able to work around that for today
16:46 psychoslave joined
ingy or I might be able to patch Test::Builder 16:46
16:47 Tison left
Geth doc: 6e17351fdc | (JJ Merelo)++ | doc/Type/IO/Path.pod6
Adds another sentence clarifying behavior of unlink

Also some possible explanation of the rationale of including non-existing files in the output list. Refs #2096, does not close, because it's been closed already. Thanks again @briandfoy for the report, and sorry for not understanding the problem from the beginning.
synopsebot_ Link: doc.perl6.org/type/IO::Path
jmerelo raschipi: See ↑↑↑↑↑↑↑ 16:49
ingy e: $*OUT.flush; $*ERR.flush
16:49 molaf joined, raynold joined
ingy I get: Cannot flush handle: Failed to flush filehandle: Operation not supported 16:50
16:50 mcmillhj left 16:51 domidumont left
ingy on * 2018.04.1 16:51
raschipi "returns the names of the files that C<do not exist> after the operation". jmerelo: it just trusts the operating system, if it doesn't get an error from unlink(2), it returns the name of the file. It doesn't check if the file is really gone if that's what you mean. 16:52
jmerelo raschipi: I guess so. I would have to check the actual code, but it's down in NQP, which goes even further down to the MoarMV. 16:53
raschipi: It makes sense.
jmerelo: I mean, I actually checked the code of the whole thing to answer the issue. It's not as if I just closed it without doing anything. 16:54
17:00 dakkar left
ingy as TimToady once told me, the agreement of semantics in human communication is HARD, and the root of all mankind's problems 17:01
I may have embellished just a bit :)
jmerelo ingy: :-) 17:02
raschipi: I'll change that too.
raschipi Well, I do think it's a serious problem, but I don't agree it causes slavery. Some people are just cunts, it doesn't come from a misunderstanding.
ingy iirc, I told him to shut up at the time only to realize an hour later how brilliantly correct he was... (an hour later 4 people had 4 different ideas of the very simple topic of conversation) 17:03
17:03 mcmillhj joined 17:07 Zoffix joined
Zoffix ingy: what OS is that on? 17:08
17:08 n1ge joined
Zoffix the flush thing 17:08
ingy mac
17:08 shareable6 joined 17:09 undersightable6 joined, ChanServ sets mode: +v undersightable6
ingy Zoffix: ^ 17:09
Zoffix ye 17:10
Geth doc: a6247146bf | (JJ Merelo)++ | doc/Type/IO/Path.pod6
Right another attempt at rephrasing the behavior of unlink refs #2096
synopsebot_ Link: doc.perl6.org/type/IO::Path
17:12 lance_w[m] joined, CIAvash[m] joined, ilmari[m] joined, wictory[m] joined, unclechu joined, mirlur[m] joined, AlexDaniel`` joined, mienaikage joined, Garland_g[m] joined
jmerelo Anyway, I think we're are trying to do our best. We might be wrong sometimes, but it does not help to thumb-down anyone. 17:13
Zoffix jmerelo: you probably made bdfoy's shitlist and he'll now hate you forever. 17:14
jmerelo It was my mistake, I am sorry for that, I'm trying my best to undo the mistake.
Zoffix passes jmerelo club membership application.
ingy: this gives the same error, right? perl6 -e '$*OUT.flush' 17:15
Like with no redirection or any of that business.
jmerelo ducks under the cover
ingy hmm. no that works
AlexDaniel jmerelo: hello. This cover is actually pretty nice :) 17:16
ingy Zoffix: that gives no error
I'll try to make something that does in a 1-liner 17:17
Zoffix ingy: FWIW, this is the C code that does the flushing: github.com/MoarVM/MoarVM/blob/mast...#L224-L240 and MVM_platform_fsync is just mapped to fsync: github.com/MoarVM/MoarVM/blob/mast...rm/io.h#L8
Geth doc: bbbce35fd5 | (JJ Merelo)++ | doc/Type/IO/Path.pod6
Fixes POD error
raschipi jmerelo: it's clear now. 17:18
jmerelo raschipi: OK :-) 17:19
Zoffix: this stackoverflow.com/questions/508214...2_50821434 will probably make him hate me even more.
17:20 [Sno] joined
ingy bdfoy likes me :) 17:20
I think so anyway, haven't seen him since 2012
jmerelo ingy: everyone using YAML likes you :-) 17:21
ingy definitely not true
Zoffix: do you recall WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was: 17:22
No such symbol 'TestML::StdLib'
Zoffix ingy: yeah
jmerelo ingy: well, there's this tribe of JSONers...
ingy Zoffix: what repo is that issue on? 17:23
I forgot how I worked around it
getting it again
Zoffix ingy: github.com/ingydotnet/testml-pm6/tree/0.2.0 based on my brower history.... 17:24
ingy: and the fix is probably somewhere in this convo: colabti.org/irclogger/irclogger_log...05-24#l840 17:25
workaround I mean 17:26
ingy Zoffix: I mean didn't we file a perl6 issue?
I just don't know what github repo to look for it in
Zoffix ingy: it'd be in rakudo/rakudo 17:27
ingy k
Zoffix ingy: R#1515 or R#1865 maybe 17:28
synopsebot_ R#1515 [open]: github.com/rakudo/rakudo/issues/1515 Erroneous unhandled failures for runtime module loading
R#1865 [open]: github.com/rakudo/rakudo/issues/1865 require Foo; does not replace `package` with proper class
ingy Zoffix: btw I can't repro the flush error outside testml yet: perl6 -MTest::Builder -e 'my $t = Test::Builder.new; $t.plan(1); $t.ok(1); $t.diag("hmmm"); $*OUT.flush; $*ERR.flush'
17:29 psychoslave left
ingy Zoffix: R#1502 17:29
synopsebot_ R#1502 [open]: github.com/rakudo/rakudo/issues/1502 Failure.DESTROY warning sometimes warns when Failure was technically handled
Zoffix jmerelo: FWIW, the docs document it as "Support for combinations of modes other than what is listed above is implementation-dependent and should be assumed unsupported" 17:30
jmerelo: and :mode<wo>, :append isn't on the list. 17:31
ingy Zoffix: I thought it was just from using 'unit class'
er, 1502 is not it 17:32
Zoffix ingy: R#1502 doesn't look like your issue. That one is just the case of one failure bailing out before the next on in the same statement has a chance to be examined.
jmerelo Zoffix: right. Should open an issue for :mode<wo>?
Zoffix jmerelo: what sort of issue?
CIAvash[m] Gitlab seems to be down and because "META6.json"s can't be reached, the modules hosted on gitlab are not included in ecosystem-api.p6c.org/projects.json and zef says it cannot find those modules. Is this the intended behaviour? 17:33
jmerelo Zoffix: ":mode<wo>, :append isn't on the list." But I guess one should assume that is implementation independent and should be assumed unsupported, right?
Zoffix jmerelo: I mean, the docs are correct. We only support the listed combinations. All the other dozens of permutations are UB (Undefined Behaviour) 17:34
jmerelo Zoffix: yep, that is what I understood, but from the covers I'm ducking in I have to read stuff twice or thrice to avoid mistakes. 17:35
Zoffix CIAvash[m]: probably could be improved..
CIAvash[m]: this is the relevant repo you could file an Issue in github.com/perl6/ecosystem/ that's where the projects.json generator is. Or you could file in github.com/ugexe/zef 17:36
CIAvash[m]: probably could add a conditional in here that would read use dist's info from previous run if we fail to fetch the new one: github.com/perl6/ecosystem/blob/ma...pl#L14-L19 17:38
ingy: FWIW this works fine for me and doesn't crash perl6 -MTest::Builder -e 'my $t = Test::Builder.new; $t.plan(1); $t.ok(1); $t.diag("hmmm"); $*OUT.flush; $*ERR.flush'
ingy Can someone help me do this right: '$str ~~ s:g/(\d+)/@list[$0 - 1]/'
Zoffix What's wrong with it now? 17:39
ingy Zoffix: yeah for me too,