»ö« 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 moritz on 22 December 2015.
00:02 mcmillhj left
Zoffix m: Rat.^roles.say 00:02
camelia ((Rational[Int,Int]) (Real) (Numeric))
Zoffix foo3: ^ fixed now
00:03 foo3 left 00:05 troys is now known as troys_ 00:06 mudman left, cdg left 00:14 mcmillhj joined, kurahaupo joined 00:17 wander4096 left 00:18 mcmillhj left 00:25 wonner joined 00:29 wonner left 00:33 Khisanth left 00:34 aborazmeh joined, aborazmeh left, aborazmeh joined 00:48 virtualsue left 00:49 virtualsue joined 00:53 Khisanth joined, astj joined
thou m: my $x; 'abc xyz' ~~ /:s <ident> $x=<ident> /; say($x); # github.com/perl6/roast/blob/master...sing.t#L11 00:53
camelia (Any)
thou I can't seem to get this to work, although roast looks like it should?
Zoffix .tell teatime I wrote fudged tests for the Range-as-quantifier-in-regex thing. Unfudge them when you fix the bug. I *think* they're correct, but keep an eye out on wrong tests; I'm not omniscient :) github.com/perl6/roast/commit/44937e865e 00:54
yoleaux Zoffix: I'll pass your message to teatime.
Zoffix thou: I don't see that test file in the list of files that run: github.com/rakudo/rakudo/blob/nom/...ctest.data 00:55
There are a couple of such tests left over ones. It's still to be decided whether they need to be kept (I think they'll get tossed in 6.d)
thou ah, so it's probably not implemented
geekosaur not the problem 00:56
Zoffix Well, I'm not aware of <ident> being a thing that matches
geekosaur hm
Zoffix m: say "foo" ~~ /<ident>/
camelia 「foo」
ident => 「foo」
Zoffix Oh, OK
thou What I'm doing now is basically / $<x>=[foo] { $x = $<x>.tail } /
geekosaur ident's a builtin
I get the match failing, so $x not assigned 00:57
00:57 astj left
thou I'm just trying to avoid having to stuff junk into $/ when I just want to reference it in a closure right after the match basically 00:57
e.g. github.com/Leont/yamlish/pull/18/c...cd8c63R242 00:58
But it's not a big deal, the $<foo>.tail method is working
Zoffix doesn't quite follow why .tail is needed 01:00
thou $<foo> becomes a list of matches 01:01
since it's inside a [ ... ]* group
Zoffix m: "xxxx" ~~ /$<x>="x"*/; say $<x>.^name 01:02
camelia Match
Zoffix m: my $x; 'abc xyz' ~~ /:s <ident> (<ident>) {$x = ~$0} /; say($x); 01:03
camelia xyz
Zoffix I see why I thought <ident> didn't exist. Last time I tried it, I typed it as <indent> :)
thou m: "xxx" ~~ / [$<x>='x' { dd ~$<x> }]* / 01:04
camelia "x"
"x x"
"x x x"
thou m: "xxx" ~~ / [$<x>='x' { dd ~$<x>.tail }]* /
camelia "x"
"x"
"x"
geekosaur ok, yeh, looks like $foo=<...> is NYI
Zoffix Ah. Thanks.
thou m: "xxx" ~~ / [('x') { dd ~$0 }]* / 01:07
camelia "x"
"x x"
"x x x"
thou m: "xxx" ~~ / [('x') { dd ~$0.tail }]* / 01:08
camelia "x"
"x"
"x"
thou Alright, thanks! 01:11
teatime Zoffix++ 01:14
yoleaux 00:54Z <Zoffix> teatime: I wrote fudged tests for the Range-as-quantifier-in-regex thing. Unfudge them when you fix the bug. I *think* they're correct, but keep an eye out on wrong tests; I'm not omniscient :) github.com/perl6/roast/commit/44937e865e
01:15 Ven`` left 01:20 astj joined 01:26 ryn1x joined, timrs2998 joined
Geth doc: ecbbf2eff6 | (Brian Duggan)++ | doc/Type/IO/Socket/Async.pod6
Fix typo in example.

The text says port 3333, the code says 8080
01:37
01:45 ilbot3 left 01:54 ilbot3 joined, ChanServ sets mode: +v ilbot3
pierrot 830 01:55
01:57 wander4096 joined 02:06 cdg joined 02:11 Cabanossi left 02:13 timrs2998 left, Cabanossi joined, mcmillhj joined 02:15 ryn1x left 02:30 llfourn joined 02:35 ShalokShalom left 02:43 epony left 02:47 mcmillhj left 02:52 noganex_ joined 02:54 noganex left 02:55 skids left 02:59 mcmillhj joined 03:04 eliasr left, mcmillhj left
Xliff Er... 03:04
s(xmlParserInput)
*sigh*
Inline::Perl5( 03:06
*fetch stage failed for Inline::Perl5: Unable to handle source 'www.cpan.org/authors/id/N/NI/NINE/P...6.tar.gz')
Better.
...and zef will not recognize that there is a new version. 03:07
03:15 mcmillhj joined, sftp left 03:16 Morfent left 03:17 mr-foobar left, virtualsue left 03:18 mr-foobar joined 03:20 mcmillhj left 03:21 cdg left, sftp joined 03:22 wamba joined 03:23 timrs2998 joined 03:24 virtualsue joined 03:26 pilne left, Cabanossi left 03:27 Cabanoss- joined, Cabanoss- is now known as Cabanossi 03:30 mcmillhj joined 03:31 telex left 03:32 telex joined 03:35 mcmillhj left 03:46 mcmillhj joined 03:51 mcmillhj left, wander4096 left 03:55 Cabanossi left 03:57 Cabanossi joined 03:58 virtualsue left 04:02 virtualsue joined, mcmillhj joined 04:07 mcmillhj left 04:13 ChoHag left, ChoHag joined 04:18 mcmillhj joined 04:21 astj_ joined 04:22 mcmillhj left 04:23 nine_ joined, ab5tract_ joined 04:24 charsbar_ joined, jdv79_ joined, ChoHag left 04:25 wamba left, teatime_ joined 04:27 BenGoldberg left 04:28 FK04 joined, xi joined 04:29 incredible_ joined, levex_ joined, astj left, teatime left, levex left, zacts left, charsbar left, incredible left, andrewalker left, weabot left, FiendKing04 left, ab5tract left, ccntrq left, jdv79 left, BooK left, avar left, nine left, cibs left 04:30 charsbar_ is now known as charsbar, AlexDaniel joined, ccntrq joined 04:31 andrewalker joined, avar joined, ChoHag joined 04:32 evalable6 left, committable6 left, ggherdov left, BooK joined, squashable6 left, unicodable6 left, SCHAPiE left 04:33 releasable6 left, greppable6 left, ggherdov joined 04:34 mcmillhj joined 04:35 virtualsue left 04:37 cibs joined, virtualsue joined, zacts joined 04:38 mcmillhj left 04:40 ryn1x joined 04:41 SCHAPiE joined
Geth doc: 32002de6d8 | (Will "Coke" Coleda)++ | 10 files
Make test files that work on repo files respect TEST_FILES

TEST_FILES is an env file of comma separated files to test
04:47
doc: 20bfc3d6d6 | (Will "Coke" Coleda)++ | 9 files
Rework tests to skip files after the files are selected

not only if we're picking the default files; allows us to not care if we pass in a bunch of inappropriate files for a test with TEST_FILES
doc: 9bf3803415 | (Will "Coke" Coleda)++ | 2 files
Run the most recent files on all tests, not just aspell
04:48 timrs2998 left
[Coke] in perl6/doc you can now run 'util/xt-recent.sh' which will run make xtest only on the most recently changed files in the commit log. 04:48
04:49 mcmillhj joined
[Coke] You can also do "TEST_FILES=a,b,c make xtest" if there's you want to test a specific file. 04:50
... If there's a specific file you want to test, I mean. 04:51
04:52 AlexDaniel left
[Coke] Note that the xt-recent takes about 35s here vs. 3.5minutes for a full xtest. 04:54
04:54 mcmillhj left
Geth doc: 05df5f3d57 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
whitespace
04:54
04:56 Cabanossi left 04:57 khw left, Cabanossi joined 05:05 mcmillhj joined 05:10 mcmillhj left 05:14 travis-ci joined
travis-ci Doc build errored. Will "Coke" Coleda 'whitespace' 05:14
travis-ci.org/perl6/doc/builds/280270693 github.com/perl6/doc/compare/9bf38...df5f3d57ef
05:14 travis-ci left
buggable [travis build above] ✓ All failures are due to: timeout (1 failure). 05:14
05:15 HoboWithAShotgun joined 05:21 mcmillhj joined 05:24 AlexDaniel joined 05:25 mcmillhj left 05:29 troys_ is now known as troys 05:41 troys left 05:42 AlexDaniel left 05:44 leont joined 05:48 AlexDaniel joined 05:49 ryn1x left 05:52 ChoHag left 05:57 abraxxa joined, virtualsue left 05:58 aborazmeh left 05:59 ChoHag joined 06:00 domidumont joined 06:02 thou left, thou joined 06:04 virtualsue joined, domidumont left, domidumont joined 06:07 domidumont left 06:08 domidumont joined 06:18 abraxxa left 06:19 knobo joined 06:21 thou left, wander4096 joined, thou joined 06:24 eliv joined, eater left, eliv left, eliv joined 06:26 eater joined, Cabanossi left 06:27 Cabanossi joined 06:29 setty1 joined 06:31 ufobat joined 06:41 leont left 06:45 HoboWithAShotgun left 06:50 ken joined 06:51 ken is now known as Guest2284 06:56 wander4096 left 06:59 robertle left
tyil are there any documents on making (background) services in perl 6? 07:02
07:06 ChoHag left 07:07 wander4096 joined
wander4096 how can i match text in such form 07:07
gist.github.com/W4anD0eR96/da9cb94...c7738094ec
what i need is id ==> venue 07:08
below is a try
gist.github.com/W4anD0eR96/7f4a760...1ea8e3ce0f
but it fails at `id = {W11-0302}' 07:09
i try to fix the problem, but get new bugs
since no need of any other lines, maybe clips = <id><a-line><a-line><a-line><venue><a-line><a-line> 07:11
but i stuck in match a line properly 07:12
07:13 AlexDaniel left, darutoko joined, piojo joined 07:16 cschwenz joined
piojo m: say 10.000000000000001 == 10.Num 07:17
camelia True
piojo Isn't that weird? In other languages, math operations are cast to the more precise version, not the less 07:18
moritz m: say 10.000000000000001.^name 07:21
camelia Rat
moritz piojo: you can't generally say that Rat is more precise than Num, nor the other way 'around
there is no one obvious and true way 07:22
m: say 0.01e0 + 0.01e0 + 0.01e0 == 0.03e0
camelia True
moritz I wonder how that works :-)
piojo moritz: I thought Rat had infinite precision, but I haven't thought about this as much as the dev team
moritz piojo: no, only FatRat has that 07:23
07:23 AlexDaniel joined
piojo moritz: oh, thanks 07:23
07:32 lowbro joined, lowbro left, lowbro joined 07:34 abraxxa joined
TEttinger m: say 10.000000000000001.Num == 10.Num 07:35
camelia True
TEttinger m: say (20 - 10.000000000000001).Num == 10.Num
camelia True
TEttinger m: say 20 - 10.000000000000001
camelia 9.999999999999999
TEttinger interesting, it isn't just flooring 07:36
07:36 nadim joined
wander4096 m: say 10.000000000000001 == 10.FatRat 07:37
camelia False
wander4096 m: say 10.000000000000001 == 10.Rat
camelia False
07:38 AlexDaniel left 07:39 pmurias joined 07:40 patrickz joined 07:46 Guest2284 left 07:48 Guest2284 joined 07:51 AlexDaniel joined 07:52 bisectable6 left, bloatable6 left, benchable6 left, coverable6 left, quotable6 left, statisfiable6 left, nativecallable6 left, committable6 joined, quotable6 joined, evalable6 joined, bloatable6 joined, unicodable6 joined, ChanServ sets mode: +v quotable6, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v bloatable6, ChanServ sets mode: +v unicodable6, releasable6 joined, coverable6 joined, nativecallable6 joined, greppable6 joined, benchable6 joined, bisectable6 joined, squashable6 joined, ChanServ sets mode: +v nativecallable6, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v benchable6, ChanServ sets mode: +v bisectable6, ChanServ sets mode: +v squashable6, statisfiable6 joined
AlexDaniel squashable6: status 07:57
squashable6 AlexDaniel, Next SQUASHathon in 9 days and ≈2 hours (2017-10-07 UTC-12⌁UTC+14)
07:57 wamba joined
piojo m: my $n = 27.09269; say $n.WHAT; say $n.Num.Rat == $n; 07:57
camelia (Rat)
False
piojo m: my $n = 27.09269; say $n.WHAT; my $diff = $n-$n.Num.Rat; say $diff.WHAT; say $diff.perl; 07:58
camelia (Rat)
(Rat)
<27/38300000>
piojo m: my $n = 27.09269; say $n.perl; say $n.Num.perl; 07:59
camelia 27.09269
27.09269e0
piojo Bug?
08:07 jonas1 joined 08:09 dakkar joined 08:11 Cabanossi left 08:12 Cabanossi joined 08:13 ufobat left, xinming left 08:14 sproctor joined 08:15 ufobat joined, gfldex left, xinming joined
DrForr Heh. Work email topic - '[puppet] RAT in kitchen 08:17
s/$/'/ 08:20
08:21 teatime_ is now known as teatime 08:22 cdg joined 08:24 wamba left 08:25 wamba joined 08:26 [particle] left, cdg left 08:27 [particle] joined 08:28 robertle joined
lizmat . 08:33
u-ou . 08:36
08:42 gfldex joined, Guest2284 left 08:44 Guest2284 joined 08:46 nadim left 08:49 nadim joined 08:50 AlexDaniel left 08:52 sftp left 08:53 AlexDaniel joined 08:59 wamba left 09:01 wander4096 left 09:03 sftp joined
El_Che DrForr: where is work nowadays? 09:11
DrForr sighs deeply. 09:12
GoodData in Prague.
El_Che why the sigh? 09:13
DrForr Just really not liking the seemingly constant change, but that's how the work environment is nowadays I guess.
El_Che I see. It sounds tiring indeed 09:15
I'll be close to the GoodData location soon :) -> Open Source Summit 09:18
DrForr Would that by chance be at the Hilton here in Prague? 09:19
El_Che around the corner: events.linuxfoundation.org/events/o...mit-europe
yep
the hilton
DrForr I saw a few people with... Aha, it is.
El_Che (I am not staying there, but a colleague is)
DrForr I saw 3 people with SUSE backpacks on my walk to work.
El_Che (I like to walk to a venue, no everyone does)
still a month to go 09:20
thus should be an other event
DrForr Do you have my Romanian number? I'll *hopefully* be in town.
El_Che not sure, I'll look it up (maybe on one of the fosdem mails) 09:21
thx
The undersell Linus Torvalds on the page: "Linus Torvalds - Linux Foundation Fellow"
lol
moritz nice chap, cool fellow :-) 09:22
09:25 amalia___ joined, Aaronepower joined
El_Che "Donald Trump - Famous golver and prolific tweeter user" 09:25
s/golver/golfer/ 09:26
stmuk "I am your God" - Linus
El_Che "Larry Wall - Linguïst and creator of rn"
t 09:31
09:32 mr-foobar left 09:34 mr-foobar joined
DrForr Probably too late to submit a talk. 09:34
Xliff If a NativeCall routine returns NULL, will that be interpreted as Nil, or the specified return type? 09:40
09:45 nowan left 09:46 Morfent joined 09:48 nowan joined 09:52 TEttinger left
jnthn Xliff: Type object of the specified return type 09:53
09:54 AlexDaniel left
Xliff jnthn++: Thanks 10:00
m: use NativeCall; my int32 $a = int32; say "a" if $a; 10:01
camelia Cannot unbox a type object (int32) to int.
in block <unit> at <tmp> line 1
Xliff Hrm.
jnthn Native types don't have a NULL :) 10:02
Xliff OK, well if a returned value is set to the type object? Will that still be untruthy?
jnthn Yes, type object are untruthy and undefined
Xliff YAY!
I keep forgetting old lessones I leanred during my first experiments with NativeCall a year ago. 10:03
s/ones/ons/
10:04 AlexDaniel joined 10:06 AlexDaniel left 10:07 AlexDaniel joined 10:09 domidumont left
piojo m: my $n = 27.09269; say $n.perl; say $n.Num.perl; say $n == $n.Num; say ($n - $n.Num); 10:11
camelia 27.09269
27.09269e0
True
0
piojo m: my $n = 27.09269; say $n.WHAT; my $diff = $n-$n.Num.Rat; say $diff.WHAT; say $diff.perl;
camelia (Rat)
(Rat)
<27/38300000>
piojo m: my $n = 27.09269; say $n.perl; say $n.Num.Rat.perl; my $diff = $n-$n.Num.Rat; say $diff.WHAT; say $diff.perl; 10:12
camelia 27.09269
<20753/766>
(Rat)
<27/38300000>
Zoffix Num is floating point
piojo Zoffix: I know, but this is a number that should be represented exactly 10:13
Zoffix Ah, OK
piojo err, for single precision float
maybe double precision has different exact numbers
thx :)
10:14 knobo left
piojo m: my $n = 27.09269; say $n.perl; say $n.Num.perl; 10:15
camelia 27.09269
27.09269e0
piojo so they are numerically the same, as Num and as Rat. Right?
m: my $n = 27.09269; say $n.WHAT; say $n.perl; say $n.Num.perl; say $n.Num.Rat == $n 10:16
camelia (Rat)
27.09269
27.09269e0
False
10:16 Guest2284 left
Zoffix Maybe. I wouldn't trust .perl too much when displaying these TBH 10:16
s: 2.2, 'perl', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/9dba.../Rat.pm#L5
Zoffix s: 2e2, 'perl', \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/9dba...Num.pm#L34
tbrowder .tell timotimo problem seems to be a CGI script cannot use a “use lib </some/path/lib>;” to find an uninstalled module.
yoleaux tbrowder: I'll pass your message to timotimo.
Zoffix s: 2e2, 'Str', \() 10:17
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/9dba...Num.pm#L97
Zoffix Well, at least the Rat one. I see it does divs and reductions
piojo m: my $n = 27.09269; dd $n; dd $n.Num;
camelia Rat $n = 27.09269
27.09269e0
Zoffix dd is just .perl with a bowtie
tbrowder the excption looks like it’s from rakudo 10:18
piojo Zoffix: okay, fair enough. Is there any way to see a number's full value?
10:18 Guest2284 joined 10:20 margeas joined
piojo I will just use C++ to check this :P 10:20
Zoffix m: say 2.2.nude
camelia (11 5)
Zoffix OK 10:21
I guess what I'm saying is: if you're spotting a possible bug in precision, it's equally possible the code generating Str/Num views of Rat could have a bug hiding the imprecision 10:22
piojo m: C++ agrees that this is represented exactly as a double 10:23
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3C++7⏏5 agrees that this is represented exactly
expecting any of:
infix
infix stopper
statement end
statement m…
piojo Zoffix: it should pass round trip conversion
Zoffix Str, maybe, but not Num 10:24
Actually no, neither has to
piojo Zoffix: Num is a double-precision float, right?
Zoffix .perl should tho
piojo And we're dealing with a number that's represented exactly
Zoffix piojo: are you talking about your number? I meant Rat representation in general
piojo Zoffix: yes, my number 10:25
discovered because a program was failing that shouldn't have
dealing with serialized numbers, which were parsed into Rat--this is reasonable
10:25 ChoHag joined
Zoffix m: ⅓.Str.Rat.nude.say; ⅓.Num.Rat.nude.say; ⅓.perl.EVAL.nude.say 10:25
camelia (333333 1000000)
(1 3)
(1 3)
piojo but my "convert to Num if it won't lose any precision" logic failed because the "won't lose precision" thing was giving the wrong value
Zoffix m: say ⅓.Num 10:26
camelia 0.333333333333333
piojo m: my $n = 27.09269; say $n.nude; say $n.Num.nude; say $n.Num.Rat.nude;
camelia (2709269 100000)
No such method 'nude' for invocant of type 'Num'. Did you mean any of these?
none
note

in block <unit> at <tmp> line 1
10:26 Guest2284 left
Zoffix m: say 27.09269.nude; say 27.09269.Num.nude 10:26
camelia (2709269 100000)
No such method 'nude' for invocant of type 'Num'. Did you mean any of these?
none
note

in block <unit> at <tmp> line 1
Zoffix m: say 27.09269.nude; say 27.09269.Num.Rat.nude 10:27
camelia (2709269 100000)
(20753 766)
jnthn m: say (2709269e0 / 100000e0) == 27.09269e0
camelia True
Zoffix yeah, looks like it's losing something or other. I see it converted .33333333333333 to 1/3, so it looks like it tries to be smarter than just slapping a denominator onto it
piojo Zoffix: oh, that's interesting 10:28
10:28 Guest2284 joined
Zoffix m: my $r = FatRat.new: 2709269, 100000; say $r.nude; say $r.Num.FatRat.nude 10:28
camelia (2709269 100000)
(20753 766)
Zoffix shrugs
jnthn (I wondered if the issue could be that all it has is the numerator/denominator, not the original values, and doing the floating point conversion/division of each of those doesn't work out, but it seems that it does) 10:29
10:30 eliasr joined
piojo I'll file a bug 10:31
timotimo .tell tbrowder what user does the script run as? what are its permissions? could it, for example, fail to create a precomp folder in that lib folder? 10:32
yoleaux 10:16Z <tbrowder> timotimo: problem seems to be a CGI script cannot use a “use lib </some/path/lib>;” to find an uninstalled module.
timotimo: I'll pass your message to tbrowder.
Zoffix m: say 27.09269.nude; say 27.09269.Num.Rat(1e-10).nude 10:36
camelia (2709269 100000)
(2709269 100000)
Zoffix piojo: ^ turns out it works if you set smaller epsilon (default is 1e-6) 10:37
10:40 knobo joined
tbrowder timotimo: it looks definitely like a rakudo bug. i can demo it with a short script using cro server and client. 10:47
yoleaux 10:32Z <timotimo> tbrowder: what user does the script run as? what are its permissions? could it, for example, fail to create a precomp folder in that lib folder?
Geth doc: 8de3bbc0de | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Num.pod6
Document Num.🐀 methods

The .Rat is already documented as being provided by Real, but Num has its own impl of it. The .FatRat isn't documented and isn't provided by Real (but probably should be?)
tbrowder good question, but
good questions. i will look... 10:48
i don’t see any .precomp in the local lib, but i think that’s because it never finds the lib. the exception msg shows it looks in the right place but doesn’t see it. 10:51
let me tidy the script and i’ll post it. 10:52
10:55 ChoHag left 10:56 Guest2284 left, ChoHag joined 10:58 Guest2284 joined 11:00 domidumont joined
piojo Zoffix: oh! Thanks for finding that 11:03
tbrowder timotimo: looks like i cried wolf again. found a typo in local script. 😞
11:03 zakharyas joined
tbrowder path was wrong... 11:03
piojo Zoffix: let me tell you my use case, and try to convince you this should be changed somehow (if possible)... 11:04
Zoffix: the original data was a floating point number, serialized to JSON and sent over the network. A server picked it up and treated it as a Rat (since that seems to be the default type for numbers in most cases). I tried to add it to a database, found that I had to convert it to Num for it to be valid, but upon doing so, the value isn't right anymor 11:06
oh, wait--if it's the 2nd conversion that's wrong, then the part I've described so far has no issue
So when it's deserialized, it's turned into a Rat with epsilon=0 11:07
at least, that's how it seems, since it's read from JSON or from the REPL with full precision 11:08
11:08 rindolf joined
piojo so the only part that's wrong is the way I wrote the round-trip conversion check 11:08
11:14 travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Document Num.🐀 methods 11:14
travis-ci.org/perl6/doc/builds/280372695 github.com/perl6/doc/compare/05df5...e3bbc0de31
11:14 travis-ci left 11:18 kurahaupo left
piojo Zoffix: little copy/paste issue with FatRat here: github.com/perl6/doc/compare/05df5...e3bbc0de31 11:19
tbrowder ref travis: are numbered rakudo versions faster than “latest” for testing? 11:27
11:29 nadim left 11:30 AlexDaniel left
timotimo how do you mean "faster"? 11:41
11:45 zakharyas left
pmurias cr.openjdk.java.net/~rpressler/loom...posal.html # fibers & continuations comming to JVM 11:46
moritz tbrowder: try it and see? 11:49
11:49 itaipu joined 12:01 virtualsue left
Zoffix piojo: you could also store it as two Ints that you Rat-ify back 12:01
piojo: I missed what I was meant to be convinced about.... 12:02
12:02 virtualsue joined
Geth doc: jstuder-gh++ created pull request #1582:
Remove Duplicate Code From Supply Migrate Example
12:02
doc: 49568f39cc | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Num.pod6
Fix typo; piojo++
12:03
doc: 9bc1a755e9 | (Jeremy Studer)++ (committed by Zoffix Znet) | doc/Type/Supply.pod6
Remove Duplicate Code From Supply Migrate Example (#1582)
12:04
Zoffix tbrowder: pretty sure all versions are built with rakudobrew, so no, it won't be faster. Ask gfldex; I recall he made a .travisyml that runs fast 12:08
Geth_ DBIish: 432f1ad2c5 | (Jonathan Stowe)++ | META6.json
Up version
12:14
DBIish: aad9a96465 | (Jonathan Stowe)++ | 4 files
Use the proper DEPRECATED() sub

fixes #102
Zoffix swaps geths 12:17
hm 12:18
Again push webhooks without commits :/ 12:19
stupid github
12:20 domidumont left
Geth DBIish: 432f1ad2c5 | (Jonathan Stowe)++ | META6.json
Up version
12:20
DBIish: aad9a96465 | (Jonathan Stowe)++ | 4 files
Use the proper DEPRECATED() sub

fixes #102
Zoffix k
piojo Zoffix: Sorry, I stopped because I realized the *core* part wasn't wrong, just my attempt at checking equality 12:23
I should have been clearer that I changed my mind--nothing was fundamentally bad about the current API 12:24
But it IS a little icky that a default number is a Rat, but conversion to Rat will give reduced precision compared to the default Rat 12:25
12:25 HoboWithAShotgun joined
piojo Not a serious issue, though, since it only comes up when you use conversion operators 12:25
12:25 HoboWithAShotgun left 12:27 daxim left
Zoffix piojo: I don't get what a "default number" is... :/ 12:29
m: '2e0'.Numeric.^name.say 12:32
camelia Num
piojo Zoffix: Sorry, I'm being hand-wavy. I mean most small floating point numbers, when present in the REPL or a .p6 script
m: say 1.93384.WHAT
camelia (Rat)
piojo I believe Rat and Int will cover most common numbers that are written in a script or parsed from some input. 12:33
12:34 abraxxa left
piojo (For example, JSON::Fast turns these numbers into Rat as well) 12:34
Zoffix piojo: but that's not the "default number". You're using the syntax for a Rat literal and it gives you a Rat literal.
Well, that's JSON::Fast's problem :) It can turn them into whatever it wants :)
m: say 1.93384e0.^name
camelia Num
12:35 abraxxa joined
Zoffix m: my $n = '1.93384'; $n.&[~]('e0').Numeric.^name.say 12:35
camelia Num
Zoffix ehehe
piojo Zoffix: I see what you mean
But I don't see what you did there :) 12:36
Zoffix m: my $n = '1.93384'; ($n ~ 'e0').Numeric.^name.say
camelia Num
piojo I guess I'm bringing too much baggage from other languages where \d+\.\d+ means floating point or double
Zoffix attached 'e0' to the end of the string, so the .Numeric parses it as a Num from the get-go
piojo Zoffix: I wouldn't go so far as to admit my argument has no merit, though--what I called "default" numbers is still the canonical way to write a number (math, not perl) 12:38
[Coke] waves
12:39 abraxxa left
Zoffix particle 12:39
12:40 nadim joined
piojo Zoffix: As far as I can tell, the parser special-cases its input--everything is parsed from script/REPL with epsilon=0, right? 12:40
tbrowder Zoffix: thanks
12:41 abraxxa joined
piojo so it ends up feeling like a "perl" Rat has a higher precision than an explicit Rat 12:41
12:41 ChoHag left
piojo I'm not saying this is terrible. It is merely awkward. 12:41
12:41 ChoHag joined
Zoffix has no idea what this conversation is about anymore 12:42
tbrowder .tell gfldex Zoffix says you have a fast travis yml, can you let me see it? thanks
yoleaux tbrowder: I'll pass your message to gfldex.
piojo Zoffix: no worries
12:43 abraxxa left, abraxxa joined 12:46 ryn1x joined
Zoffix There *is* a bug tho in how 1.1121 literals are parsed 12:47
m: (9.99999999999999999999999999999999999999999999999).nude.say
camelia (999999999999999999999999999999999999999999999999 100000000000000000000000000000000000000000000000)
Zoffix ^ Rat denominator is supposed to be uint64 maximum.
And currently the planned fix is to make that ^ a RatStr 12:48
12:48 ChoHag left, abraxxa left, abraxxa joined 12:51 ryn1x left 12:52 knobo left 12:56 Cabanossi left, nadim left 12:57 ChoHag joined, mcmillhj joined, zakharyas joined, Cabanossi joined 13:02 itaipu left 13:04 nadim joined 13:06 nicq20 left 13:08 cdg joined 13:10 cdg left, cdg joined 13:12 cdg_ joined 13:15 nattefrost joined, amalia___ left, cdg left, knobo joined 13:18 nadim left 13:24 itaipu joined 13:26 knobo left 13:29 itaipu left 13:30 xi is now known as weabot
Xliff Is the OpenSSL module working? I am getting test errors when trying to install it. 13:31
13:31 itaipu joined
Xliff Test Summary Report 13:31
-------------------
t/15-issue-36.t (Wstat: 512 Tests: 4 Failed: 2)
Zoffix m: sub foo { $^v.uc }; my $x = "meow"; $x .= &foo; say $x 13:32
camelia MEOW
Zoffix <3 .= &sub form
13:33 wamba joined 13:35 HoboWithAShotgun joined
Zoffix m: my $file = "meow"; my $ver = "6.c"; my $new-file = "$file{ ".$ver" if $ver.contains: 'propos'}"; dd $new-file 13:37
camelia Str $new-file = ""
Zoffix spot the bug :P
Xliff :P 13:38
Where's the }?
Zoffix the }?
Xliff Won't string interpolation complain since there is no closing curly in $new-file?
Zoffix It's there
Xliff Oh, ew. 13:40
Zoffix--: Malicious use of double quotes.
13:40 nadim joined, skids joined
Zoffix The bug is (in this program) is $file interpreted as a hash 13:40
Xliff Yes. I was getting there. 13:41
Zoffix m: my $file = "meow"; my $ver = "6.c"; my $new-file = "$file { ".$ver" if $ver.contains: 'propos'}"; dd $new-file
camelia Str $new-file = "meow "
Xliff Still... my eyes saw an unterminated {} in a string.
I had to cross them to see the '}'
tyil I'm trying to make a perl program fork into the background, so it can run as a service, but once it forks, moar starts using 400% cpu
script is here: cry.nu/p/j4ax
DrForr Xliff: braiding makes that interesting :) 13:42
tyil once I can figure this out in a clean fashion I'll see if I can make a fancy module for it
Xliff DrForr: Braiding? Do I really want to know? Please let it be about hair. 13:43
mspo tyil: are you looping at all? shouldn't it just fork, run, and exit/ 13:44
oh does baile() loop?
tyil mspo: it starts up a bailador process, which should already do the looping
mspo k
tyil: does it busy loop without the forking?
tyil busy loop?
Zoffix Xliff: when Rakudo is parsed, it's parsed with a braid of 3 languages: main, quote, and regex. So you can have nested quotes 13:45
mspo strace it :)
Zoffix (or 4, perl5regex?)
tyil (baile() correctly loops if its not forked, if that what you mean)
Xliff Zoffix++ #explanation
mspo tyil: yeah that's what I was asking
tyil I've never made a service before, so I'm not familiar with all the fancy terminology :(
I know of strace, I havent used it before I think
mspo try it out 13:46
it might show something obvious or it might not
DrForr More to the point they're not "nested" because the quoted string belongs in a different strand of the braid, so it operates under that language's nesting rules. 13:47
tyil mspo: a.uguu.se/yRGDtJeSqleO_strace.log it doesnt reveal much obvious to me right now :p 13:50
Xliff DrForr: Tell that to my eyes... that know nothing of this 'braaaydiingggg'. 13:51
mspo tyil: you probably need to run it with -f so it follows your fork
13:51 knobo joined
Xliff "$file{ ".$ver" if $something == "blah" }" -- Is just evil. 13:52
tyil ah
mspo otherwise I just see a lot of memory stuff
and then clone(), stuff, exit
13:53 wamba left
ugexe m: with 42 { (1,).map: {say $_; say $^a} } 13:54
camelia 42
1
13:54 gfldex_work joined
gfldex_work tbrowder: gfldex.wordpress.com/2017/04/14/sp...up-travis/ 13:54
tyil mspo: a.uguu.se/2ijpQ3AYOH5B_strace.log it seems to clone a lot 13:55
gfldex_work tbrowder: please note the comments, there is more then one way to be fast
13:57 gfldex_work left
DrForr 'exit -1;' is fast but may not be the most helpful approach :) 13:57
mspo yeah you produced 22 threads
ugexe you can also make your travis script push the rakudo directory to github once, then afterwards just download and untar the archive to install (a joke, but it actually works)
tyil mspo: thats something that shouldnt happen, right? :p 13:59
mspo shouldn't you be checking if pid is == 0 or > 0?
not sure about < 0
tyil I'm trying to follow some linux daemon howto, which tells me the return of getpid is -1 on failure
and > 0 if forking succeeded
14:00 nine_ is now known as nine, quotable6 left, nativecallable6 left, benchable6 left, releasable6 left, unicodable6 left, evalable6 left, bloatable6 left, greppable6 left, bisectable6 left, squashable6 left, coverable6 left, committable6 left, statisfiable6 left
tyil but if I change one of the checks the latter check to == 0, it seems to not spawn a plethora of threads, but continue on the code in run() 14:02
mspo yeah a child will get $pid = 0
parent will get pid > 0
the parent's $pid (of > 0) will be the actual pid of the child 14:03
tyil ok, so I should check if the pid was 0, and exit if it is 14:04
since 0 is the parent, and the parent needs to die
or am I reading wrong
Zoffix Xliff: twitter.com/zoffix/status/821800160569212930 14:05
14:05 knobo left
mspo tyil: 0 is the child; run() if 0 14:05
tyil: if you want to kill the parent, exit if > 0
tyil: and just bail out if < 0 because you couldn't fork and probably broke something :) 14:06
timotimo still a bit surprising forking works out with moarvm, as we do use threads 14:07
tyil if $pid < 0 { die "fork failed" } if $pid > 0 { exit 0; } # to gracefully stop the parent process
ugexe m: with 42 { say $^a }; # i dunno if i love or hate that this works like this
camelia 42
timotimo and i don't recall seeing any setup code for how threads should handle a fork
tyil all code after that has $pid as 0, thus is only ran by the child 14:08
mspo timotimo: it should probably be done in BEGIN, which should be guarateed to be single threaded or something
I just made that up
timotimo now that we have spesh on a separate thread, there is no point in user code where there aren't threads 14:09
Zoffix All rakudo programs are multi-threaded. Even empty ones use more than one thread 14:10
mspo so p6 isn't fork safe?
Zoffix shrugs
14:10 Cabanossi left
mspo or even setuid, etc safe 14:11
14:12 Cabanossi joined, nadim left
timotimo oh, those are per process, not per "process" 14:13
mspo there's a whole drama surrounding golang's usage in "system" space and people discovering that it doesn't actually work 14:14
14:14 nadim joined
timotimo oh dang 14:15
mspo because the runtime offers no escape hatch doing setup code before spinning up threads
I mean you can just say that you can't do it up front (like erlang would)
Zoffix
.oO( we could add a phaser... )
14:16
ugexe cant just set max threads to 1?
timotimo no
the spesh thread starts up before the user program is even considered
mspo here's a more compicated version of the issue: www.weave.works/blog/linux-namespa...-don-t-mix
timotimo what we could have is an evnironment variable 14:17
mspo but it's basically the same as go not being able to do the fork/drop-privileges dance
a phaser (BEGIN_SINGLE_THREAD) or en ENV that you can change at runtime seem like the best options 14:18
when I've thought about it
timotimo not fork, but how about evaling a new program?
mspo so you start with THREADS=1, do namespace/fork/privleges/whatever, set THREADS=NUMCPUS
tyil mspo: if I replace the run; with loop { say "pomf"; sleep .5; }, it seems to work properly, if I then replace the say "pomf" with say $config.get() and add the my $config Config .=new(), it still works, but when I add the $config.read() part, it loops twice and then just uses a lot of cpu
timotimo we don't allocate "just numcpus" threads now, though
we check how much cpu usage there is to see if spawning new threads would help 14:19
mspo anyway the 80% use-case is initialization/setup code
timotimo maybe it'd be better to have a commandline flag 14:20
i can even imagine a separate binary for no-threads-until-a-certain-point situations
mspo here's more on the golang stuff: github.com/golang/go/issues/1435 14:21
timotimo the spesh worker can just wait until a specific instruction has been fired
mspo anyway it's a runtime decision if you want to support that level of control or not :) 14:22
weabot is there a language-provided way to limit recursion in perl 6? 14:23
to avoid infinite recursion?
14:23 rindolf left
timotimo there is not 14:23
only running out of memory or counting recursion levels yourself 14:24
weabot alright thanks
14:26 troys joined, rindolf joined 14:31 eliv left
Xliff Zoffix: AAAIIEEE! 14:32
Zoffy: Why do you hate me so? :)
Zoffix :)
14:40 zakharyas left 14:41 nattefrost left, levex_ is now known as levex 14:42 levex left, levex joined, sftp left 14:45 epony joined 14:46 sftp joined
HoboWithAShotgun how would i split a string into chunks of two characters? in p5 i'd use unpack 14:46
ilmari m: "some string".comb(2).say 14:47
camelia (so me s tr in g)
14:48 lowbro left 14:52 nadim left
HoboWithAShotgun m: sub split-rgb ( RGBString $rgb ) { return $rgb.substr(1).comb(2).map: { "0x$_".Int }; }; say split-rgb("#FFAA0F"); 14:54
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'RGBString' in parameter declaration.
at <tmp>:1
------> 3sub split-rgb ( RGBString7⏏5 $rgb ) { return $rgb.substr(1).comb(2).
HoboWithAShotgun m: sub split-rgb ( $rgb ) { return $rgb.substr(1).comb(2).map: { "0x$_".Int }; }; say split-rgb("#FFAA0F");
camelia (255 170 15)
HoboWithAShotgun yay. thanks
14:55 Cabanossi left 14:57 Cabanossi joined
Zoffix I think there's a module for doing this 14:57
buggable: eco Color
buggable Zoffix, Color 'Format conversion, manipulation, and math operations on colours': github.com/zoffixznet/perl6-Color 5 other matching results: modules.perl6.org/s/Color
Zoffix m: sub split-rgb { $^s.comb(/<:hex>**2/)».parse-base: 16 }; "#FFAA0F".&split-rgb.say 14:59
camelia (255 170 15)
Zoffix m: sub split-rgb { $^s.comb(/<:hex>**2/)».parse-base: 16 }; "FFAA0F".&split-rgb.say
camelia (255 170 15)
15:00 nadim joined
Zoffix hm.. what's with the ded *able bots :/ 15:01
===SORRY!=== 15:03
15:03 mr-foobar left
Zoffix Cannot locate symbol 'SSL_load_error_strings' in native library 'libssl.so' 15:03
on the bot server when I try perl6 bin/Committable.p6
.tell AlexDaniel something worng with the bots. They're all dead and if I try to run one, I get "Cannot locate symbol 'SSL_load_error_strings' in native library 'libssl.so'" 15:04
yoleaux Zoffix: I'll pass your message to AlexDaniel.
15:05 mr-foobar joined
jnthn I have a hazy memory that that is some kind of libssl version thingy 15:05
I think I merged an IO::Socket::Async::SSL patch
Zoffix hm, I think IRC::Client uses that module /me tries updating
But what I wanted to show with the bot is how awesome the Color module is ^_^ $ perl6 -e 'use Color; Color.new("#FFAA0F").rgb.say' 15:06
(255 170 15)
15:08 kurahaupo joined, committable6 joined, ChanServ sets mode: +v committable6, committable6 left 15:09 thou left, committable6 joined, unicodable6 joined, bloatable6 joined, ChanServ sets mode: +v unicodable6, ChanServ sets mode: +v bloatable6, quotable6 joined, benchable6 joined, coverable6 joined, bisectable6 joined, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, releasable6 joined, evalable6 joined, ChanServ sets mode: +v releasable6, ChanServ sets mode: +v evalable6, greppable6 joined, squashable6 joined, ChanServ sets mode: +v squashable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
Zoffix jnthn++ that was it :D 15:09
15:09 thou joined
Zoffix .tell AlexDaniel nm, just needed to update IO::Socket::Async::SSL 15:09
yoleaux Zoffix: I'll pass your message to AlexDaniel.
jnthn Yay :)
Zoffix c: HEAD use lib <data/all-modules/zoffixznet/perl6-Color/lib>; use Color; Color.new("#FFAA0F").rgb.say
committable6 Zoffix, ¦HEAD(36122f1): «(255 170 15)»
Xliff m: my $m = "Mmmm"; say $m.^name 15:10
Is de bot dead?
15:10 thou left
camelia Str 15:10
moritz m: say 42
camelia 42
15:10 thou joined
Xliff No just lagged. 15:11
OK, so what is a slick way to get the variable to print out it's name.
Zoffix m: my $m = "Mmmm"; say $m.VAR.name
camelia $m
Xliff Take the above, I would like that to output "m"
Ah... that one.
Zoffix it don't always work; all depends on how you get it
m: my $m := "Mmmm"; say $m.VAR.name
camelia No such method 'name' for invocant of type 'Str'. Did you mean any of these?
none
note
take

in block <unit> at <tmp> line 1
Zoffix m: my $m = "Mmmm"; -> \m is raw { say m.VAR.name }($m) 15:12
camelia $m
Xliff Right. Coz that is a bind.
Zoffix m: my $m = "Mmmm"; -> \meows is raw { say meows.VAR.name }($m)
camelia $m
Zoffix s/is raw//; :)
m: my $m = "Mmmm"; my $not-m := $m; say $not-m.VAR.name 15:13
camelia $m
Zoffix So basically you can get the variable name of the original container. But that container might be bound some other variable (at least how as far as I understand all this stuff) 15:14
15:15 yht joined
jnthn Yes. What you're actually getting is the name of is the Scalar container. 15:16
15:16 itaipu left 15:20 thou left 15:23 itaipu joined 15:28 setty1 left 15:30 grondilu joined
grondilu whishes !SomeType would mean $_ !~~ SomeType 15:31
m: subset Odd of Int where $_ % 2; say 2 ~~ !Odd
camelia True
grondilu m: subset Odd of Int where $_ % 2; say 3 ~~ !Odd
camelia True
15:32 mst left, mst joined
Zoffix m: subset Odd of Int where $_ % 2; say !Odd 15:32
camelia True
Zoffix That's what you're comparing against
m: subset Odd of Int where $_ % 2; say 3 !~~ Odd
camelia True
Zoffix :(
m: subset Odd of Int where * !%% 2; say 3 !~~ Odd 15:33
camelia False
grondilu m: subset Odd of Int where $_ % 2; say Odd.WHAT
camelia (Odd)
15:34 troys is now known as troys_
grondilu m: multi prefix:<!>(U: $type) { $type.none }; subset Odd of Int where { $_ % 2 }; say 2 ~~ !Odd 15:35
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'U' in parameter declaration.
at <tmp>:1
------> 3multi prefix:<!>(U7⏏5: $type) { $type.none }; subset Odd of I
grondilu m: multi prefix:<!>($type:U) { $type.none }; subset Odd of Int where { $_ % 2 }; say 2 ~~ !Odd 15:36
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'U' in parameter declaration.
at <tmp>:1
------> 3multi prefix:<!>($type:U7⏏5) { $type.none }; subset Odd of Int wher
Zoffix grondilu: I think that's the wrong way to write that `where` clause. You're numerically smartmatching the result of `%` against the original value
15:36 rindolf left
grondilu am I? 15:36
Zoffix Yes. 15:37
grondilu * % 2 I guess then
Zoffix Yup, that'll work, 'cause that's a closure
grondilu I thought any $_ expression was interpreted as a block
Zoffix nope
It thunks it, and the result of that thunk is used for smartmatching. 15:38
moritz note that boolean results also work, becase ~~ True is always true and ~~ False is always False
Zoffix Yeah. In this case though, the result is numeric
$_ !%% 2 would work
15:41 cschwenz left
Xliff Um. How can I tell a superclass to trust any descended subclass? 15:42
I think depending on the superclass to trust every sub that needs it is rather onerous. 15:43
15:43 troys_ is now known as troys
grondilu not related : does the declaration order matter for the dispatch of multi methods? 15:43
because I wrote method calls that I thought would be ambiguous but somehow I get no error on execution. 15:44
Xliff: there is a "trust" keyword 15:46
Zoffix Yeah, it matters in some cases
grondilu not sure it implemented yet though
moritz m: class A { multi method x() { say 1 }; ulti method x() { say 2 } }; A.x()
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot have a multi candidate for 'x' when an only method is also in the package 'A'
at <tmp>:1
grondilu *it's
Zoffix m: multi x($ where 42) {say "here"}; multi x($ where .so) { say "there" }; x 42
camelia here
moritz m: class A { multi method x() { say 1 }; multi method x() { say 2 } }; A.x()
camelia Ambiguous call to 'x'; these signatures all match:
:(A $: *%_)
:(A $: *%_)
in block <unit> at <tmp> line 1
Zoffix m: multi x($ where .so) { say "there" }; multi x($ where 42) {say "here"}; x 42
camelia there
grondilu there is no ambiguity here though 15:48
oh wait
there is
15:48 domidumont joined
grondilu so the order prevails with where clauses? 15:48
m: multi x($ where 42) { say "there" }; multi x($ where .so) { say "here" }; x 42 15:50
camelia there
Zoffix Yeah
There's also an RFC ticket for that rt.perl.org/Ticket/Display.html?id...et-history
Xliff grondilu: Yes, but I don't want to have to use that for EVERY descendent class that may need to use it. This is an API. There's know way I can know!
I guess I will need accessors. 15:51
15:52 rindolf joined
grondilu Xliff: if it's an API you can write in your docs that any descendant should explicity trust its own descendants 15:52
(though I suppose you can't trust your user classes as you don't know their names) 15:53
(so there is that)
yeah, better write explicit public accessors 15:54
Xliff Yeah, just did. Read only accessors, and I get a MoarVM panic.
15:55 abraxxa left 15:57 patrickz left
Xliff Golf'd 15:58
m: class A { has $.a; submethod BUILD(:$a) { $!a = $a; }; method new($a) { self.bless(:$a); }; method a { $.a }; }; class B is A { has $.b; submethod BUILD(:$a, :$b) { $!b = $b; nextwith(:$a); }; method new($a, $b) { self.bless(:$a, :$b) }; method test { say $.b; say self.a; } }; my $b = B.new(1, 2); $b.test;
camelia 2
MoarVM panic: Memory allocation failed; could not allocate 319328 bytes
15:59
Xliff If I remove the call to self.a -- no panic. 16:01
m: class A { has $.a; submethod BUILD(:$a) { $!a = $a; }; method new($a) { self.bless(:$a); }; method a { $.a }; }; class B is A { has $.b; submethod BUILD(:$a, :$b) { $!b = $b; nextwith(:$a); }; method new($a, $b) { self.bless(:$a, :$b) }; method test { say $.b; } }; my $b = B.new(1, 2); $b.test;
camelia 2
16:02 robertle left
Xliff m: class A { has $.a; submethod BUILD(:$a) { $!a = $a; }; method new($a) { self.bless(:$a); }; method a { $.a }; }; class B is A { has $.b; submethod BUILD(:$a, :$b) { $!b = $b; nextwith(:$a); }; method new($a, $b) { self.bless(:$a, :$b) }; method test { say $.b; } }; my $a = A.new(42); $a.a; 16:02
camelia MoarVM panic: Memory allocation failed; could not allocate 319376 bytes
Xliff Ooor... not
m: class A { has $.a; submethod BUILD(:$a) { $!a = $a; }; method new($a) { self.bless(:$a); }; method a { $!a }; }; class B is A { has $.b; submethod BUILD(:$a, :$b) { $!b = $b; nextwith(:$a); }; method new($a, $b) { self.bless(:$a, :$b) }; method test { say $.b; } }; my $a = A.new(42); $a.a;
camelia ( no output )
Xliff m: class A { has $.a; submethod BUILD(:$a) { $!a = $a; }; method new($a) { self.bless(:$a); }; method a { $!a }; }; class B is A { has $.b; submethod BUILD(:$a, :$b) { $!b = $b; nextwith(:$a); }; method new($a, $b) { self.bless(:$a, :$b) }; method test { say $.b; } }; my $a = A.new(42); $a.a.say; 16:03
camelia 42
Xliff OK, so endless look because it calls ... itself?
s/look/loop/
Zoffix $.a is a method call 16:06
`has $.a;` is a shortcut for `has $!a; method a { $!a }`; If you call `$.a` inside `method a` then yeah, it'll infiniloop 16:07
Alright. Time to get 6.d in shape 16:08
\o
16:08 grondilu left, Zoffix left 16:09 Cabanossi left 16:10 japhb left
Xliff .tell Zoffix So in this situation, should I not RT the infiniloop? Maybe add a caveat to the docs? 16:12
yoleaux Xliff: I'll pass your message to Zoffix.
16:12 xinming left, Cabanossi joined 16:13 xinming joined 16:15 gregf_ left 16:17 Zoffix joined, leont joined
Zoffix Xliff: no, there's no bug. The docs should make it clear that `$.a` is a method call. I wouldn't exactly call it a caveat tho 16:18
Zoffix &
16:18 Zoffix left 16:26 sproctor left 16:30 wamba joined 16:31 gregf_ joined 16:33 mr-foobar left, dakkar left 16:36 mr-foobar joined 16:39 domidumont left, domidumont joined 16:40 domidumont left 16:41 khw joined, leont left 16:42 domidumont joined 16:46 ryn1x joined 16:49 robertle joined 16:51 ryn1x left 16:53 kshannon left, kshannon joined 16:54 leont joined 16:56 Guest2284 left, wamba left 16:58 Guest2284 joined 17:01 yht left, cdg joined 17:03 ChoHag left, mr-foobar left 17:04 cdg_ left, cdg_ joined 17:05 mr-foobar joined 17:06 cdg left, patrickz joined 17:08 AlexDaniel joined
AlexDaniel squashable6: status 17:09
yoleaux 15:04Z <Zoffix> AlexDaniel: something worng with the bots. They're all dead and if I try to run one, I get "Cannot locate symbol 'SSL_load_error_strings' in native library 'libssl.so'"
squashable6 AlexDaniel, Next SQUASHathon in 8 days and ≈16 hours (2017-10-07 UTC-12⌁UTC+14)
yoleaux 15:09Z <Zoffix> AlexDaniel: nm, just needed to update IO::Socket::Async::SSL
AlexDaniel thanks 17:10
17:25 troys is now known as troys_ 17:26 leont left 17:29 nowan left 17:41 patrickz_ joined 17:45 patrickz left, darkmorph joined 17:47 Aaronepower left
hythm Hi, I'm writing app with Bailador and IoC, All the routes are in TWEAK method of the App class here: github.com/hythm7/movieo/blob/mast...eo.pm?ts=2 , I would like to organize the routes in better way for, example routes under /movie is on separate file, routes under /tvshows on separate file, and so on. but I'm not sure how to do that, Any suggestion? 17:49
moritz hythm: disclaimer: I know nearly nothing about Bailador; maybe ufobat has a better idea :-) 17:52
hythm: but those route setups all look like simple data structures passed to the get or post function
hythm: so you could easily have separate modules that all have routes() method 17:53
17:53 Aaronepower joined, patrickz joined, Util joined
moritz and they all return a hash of the form get => { '/movie/edit/:id'=> { ... }, more get methods here }, post => { '/movie/edit/:id'=> { ... } }, 17:53
and then you can load as many modules as you want, call their routes method, iterate over the result, call get() and post() as appropriate 17:54
17:54 sprocket joined
hythm moritz: I'm actually following ufobat's app "VoteImproved" as a template for organizing the code, but in my case I have many routes, thats why I needed to organize them. 17:55
sprocket hello #perl6!
moritz \o sprocket
hythm moritz: sounds a good idea, I will look into doing it as separate modules 17:56
sprocket question regarding initializing arrays - if i declare an array with: “my @buffer := CArray[uint8];”, how can i initialize the first $x places of that array to, for example, zero
moritz hythm: or maybe those separate modules can call get() and post() themselves instead of returning the data structure; dunno if Bailador likes that :-)
17:56 thundergnat joined
sprocket in p5 there’s a list multiplier operator, is there one in p6 as well? 17:56
17:56 patrickz_ left
moritz m: say 0 xx 5; 17:56
camelia (0 0 0 0 0)
sprocket oh, hey, there it is :) 17:57
thanks, moritz!
17:57 Rawriful joined
hythm moritz: will try these options and see how it lokks 17:57
thundergnat Is there any way in Perl 6, to tell how many elements have been reified in a lazily generated array? 17:58
m: my @a = 'a bunch of words,'.words, { 'some more random words,'.words } ... *; say @a[^10]; # say @a.reified.elems?
camelia This Seq has already been iterated, and its values consumed
(you might solve this by adding .cache on usages of the Seq, or
by assigning the Seq into an array)
in block <unit> at <tmp> line 1
moritz thundergnat: I don't think so. That's pretty much internal to Array or List 18:00
thundergnat: if you need more control over that, a lazy list is probably the wrong tool, because it's meant to automagically handle all that 18:01
18:02 ChoHag joined, leont joined 18:03 mr-foobar left 18:04 mr-foobar joined
thundergnat moritz I suspected as much but wondered . Thanks 18:05
perlpilot thundergnat: why did you want it ooc?
Xliff What's the best way to pass initialization parameters (ala via new) from a sub-class to a super-classes submethod BUILD? 18:06
18:06 cdg_ left
Xliff I thought that callwith and nextwith would work, but given this class tree -- A<-B-<-C, where A is the base class, I can't seem to get information from class C to class A. 18:07
perlpilot Xliff: submethods don't participate in inheritance
Xliff So how can I properly initialize all attributes in a class chain?
I can't naturally get B's attributes from C. 18:08
And the same applies to A from b.
So if submethods aren't the way, then how should it be done?
set accessors? 18:09
timotimo put all stuff you need in the arguments you bless with and each class in the inheritance chain runs their own BUILD and/or TWEAK
Xliff So I can set members from A via C by C's self.bless call in new()? 18:10
thundergnat perlpilot: Sorry, other conversations going on elswhere. It isn't anything critical. A lazy list works out really well for what I am trying to do, I just wondered if there was some way to query the number of reified elements.
Xliff And would TWEAK be run after BUILD?
18:10 espadrine joined
moritz Xliff: TWEAK rusn after BUILD, yes 18:11
Xliff k
18:11 patrickz_ joined, thundergnat left
timotimo yeah, the .new would be responsible in that case 18:12
18:12 cdg joined 18:13 nowan joined 18:14 patrickz left
Geth doc: a783b06494 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
Postpone .child -> .child (secure) swap to 6.e

Postponed until 6.e because there's a huge amount of ecosystem usage and the IO::Path.add that is the alternative is too new for module authors to reliably switch to using it.
18:14
18:19 AlexDaniel left, xinming left
Xliff OK, that worked. But there are still situations where I think this may fall short. 18:19
It's C-think, but...
18:19 xinming joined
Xliff One thing I can think of is when the value set to superclass attributes need to be affected by the subclass. 18:20
18:20 ChoHag left
Xliff I think I can work around those with accessors and TWEAK, but I don't know if TWEAK can take parameters? Where is TWEAK documented? 18:21
18:24 Ven`` joined
perlpilot Xliff: docs.perl6.org/language/objects#in...ntry-TWEAK 18:25
though, there's not much there.
18:25 Cabanossi left 18:27 Cabanossi joined, ChoHag joined 18:28 cdg_ joined 18:30 Guest2284 left 18:31 cdg left
timotimo TWEAK takes the same parameters as BUILD does 18:32
18:33 cdg_ left
timotimo hm, the TWEAK there looks weird, may be missing a format code 18:33
sjn o/ 18:34
sjn was at the 50 year anniversial lectures for the Simula language today o/ 18:35
18:35 japhb joined
timotimo ooh cool 18:37
18:38 andrzejku_ joined
moritz is slightly suspicious of programming languages older than himself :-) 18:38
mspo perl was born in 1987 18:39
there are probably a number of people here younger
or do young people all use the slack? :)
japhb Wait, so this December we celebrate 30 years of Perl? That's pretty cool. 18:42
leont Yeah 18:43
perl5.git.perl.org/perl.git/commit...059a2804f1
18:48 domidumont left 18:52 Ven`` left
stmuk Lisp is 60 next year :O 18:53
yoleaux 15:40Z <Zoffix> stmuk: why is t/harness6 blocked from using more than 1 test job? It works fine for me. What exactly is wrong with it?
15:44Z <Zoffix> stmuk: never mind. Apparently the orignal problem was fixed already. I removed the plug that made harness die on JOBS>1
18:53 Ven`` joined
Xliff perlpilot++: Yes. I see it. That is fairly sparse. Is there better information in the Synopsis which describes this feature? 18:58
In a month or so, someone will need to amend the /topic. 19:00
I say we all get drunk with each other over IRC on 12-17
or 17-12 for you odd ppls. 19:01
19:05 daxim joined 19:14 sprocket left, sprocket joined, darutoko left
ufobat hythm, as long as you "use Bailador" you have the bailador DSL and cann call get and post, to setup routes, wherever you like 19:24
19:25 Hor|zon left
ufobat hythm, maybe you dont want to use IoC? github.com/Bailador/Bailador/blob/...ollers.pl6 19:26
hythm, moritz, i think it is not neccessary that you return anything in a "routes" method. What if you have a "setup-routes()" method and those simply set up the routes with the bailador specific DSL 19:29
moritz ufobat: that's what I suggested later :-) 19:30
ufobat as usual, i am faster at typing than thinking or reading :) 19:31
the same applies if you use IoC 19:32
19:33 Hor|zon joined, mr-foobar left 19:35 mr-foobar joined
hythm ufobat, moritz, yes, setup-route method sounds cleaner in my opinion. I will try that. Thank you both for answering 19:37
ufobat :) 19:38
19:42 ChoHag left 19:44 andrzejku_ left 19:45 TEttinger joined, notostraca joined
tyil so, I'm still trying to get a process to fork into the background properly, but it still isn't working quite the way I want 19:45
I made a small script to make sure my other code isnt breaking it 19:46
cry.nu/p/28or
but rn the loop { } runs 19 times on every run thus far
and then just stops
but there's still a moar process consuming cpu running
19:46 sprocket left
tyil oh, for one run it seemed to go better, hitting 1094 runs before I killed it, but the run after it iterates 19 times again 19:48
19:49 sprocket joined, espadrine left, troys_ is now known as troys, notostraca left
jnthn suspects fork + multi-threaded VM = pain 19:49
Since fork only clones one thread - the one that called it
19:49 TEttinger left
jnthn So suddenly you've got an instance of the VM missing most of its threads 19:50
tyil I kinda want to be able to properly fork into the bg somehow, so I can run this as a service
hmm
robertle there is also something weird around fork and locks, as the locks get copied/cloned in whatever their current state is... 19:51
jnthn That also
tyil I find it odd that it consequently stops at 19 tho
jnthn That's probably when it needs to do a GC run
I'd guess so, anyway 19:52
19:52 patrickz joined
jnthn And that it then tries to get the background optimization thread to join in and...it ain't there. 19:52
geekosaur jnthn, you can stop suspecting. that's why python doesn;t do threads, perl 5 does ithreads, and ghc warns not to have multiple threads before forkProcess
the edge cases are nasty and hairy 19:53
jnthn OK, then I guess I might as well just switch to saying "don't do fork in MoarVM, it won't ever work"
tyil so its impossible in perl 6 to make services which run in the background? :< 19:54
also, the current run seems to work correctly, going at 31k+ iterations now
geekosaur fork first, thread only after
this even appleis to C
jnthn That doesn't help for VMs that start their own internal threads
19:55 patrickz_ left
tyil geekosaur: fork is the first thing that happens in that script's MAIN sub tho 19:55
jnthn So, anything that does concurrent GC, or background optimization.
geekosaur potentially you can handle those cases, although you need careful accounting
tyil it seems to rarely actually work, but most of the times it'll stop after 19 iterations
jnthn Yeah, I see there's some handler that is called but...
It looks incredibly tricky to pull off 19:56
tyil what edgecase am I hitting here where it accidentally works? 19:57
geekosaur the most common failure mode is that some thread is holding e.g. a mutex (or a userspace lock) during the fork 19:58
the thread goes away but the lock is process level and remains, with nithing around to know to unlock it
so then things work until something else needs that lock and suddenly you deadlock
tyil in the script I linked it worked on my last try, but the tries before that, with the exact same code, all stopped functioning at the 19th iteration 19:59
geekosaur this applies to any process level resource: filehandles, mutexes, etc.
HoboWithAShotgun m: say 1.111111111111111111111
camelia 1.11111111111111111604544
19:59 ChoHag joined 20:00 patrickz left
geekosaur I couldn't tell you why it sometimes works because I don't know internal details concerning what locks are held when 20:00
tyil ah 20:01
geekosaur I know what's going on and in fact was explaining essentially the same problem in #haskell about a half hour ago >.>
and have in the past explained it for perl 5, etc.
jnthn I know the details and know there's more than one possibility for which lock it could be :)
geekosaur yep, that also complicates things :)
tyil would it be possible to make background services in perl 6 a viable thing, or should I give up hope ;~; 20:02
geekosaur it might be easiest to do the backgrounding as a scaffold (e.g. shell script)
tyil I'm not familiar with internals of anything, except frogs, so I have no idea how much effort it would be
geekosaur: basically, make a shell script which forks into the background, and then runs the perl application? 20:03
20:03 cdg joined, mr-foobar left
ufobat isnt fork() just creating a clone of the process? dont you get a copy of all mutexes/locks and threads? how could for example a thread "be not there" while there is still a ramaining mutex 20:03
geekosaur this kind of thing is also why e.g. systemd (and other system managers like Apple's launchd) manages backgrounding itself. it's a Hard Problem(tm)
ufobat, you get a copy of all mutexes and all flehandles. 20:04
but you only get the currently executing thread and it becomes the main thread of the new process
tyil sadly I think systemd is the worst way to solve a problem, so thats not an option
ufobat AH!
tyil that, and BSD doesnt support systemd at all
and I intend to run this service on a BSD server once its done
geekosaur conceptually systemd is a very good solution. practically, it's so badly implemented as to not be a solution
ufobat and there is no way to "clone" other threads as well? 20:05
20:05 mr-foobar joined
geekosaur ufobat, no, and if you think about it, it's a bad idea 20:05
tyil that I can agree with, if the systemd concept would also drop its desire to do literally everything
geekosaur consider: parent process has a thread that has aquired a mutex so it can have exclusive access to some resource
another thread fork()s
if you clone all threads then both parent and child processes now think they own that resource 20:06
*then threads in both
if it's something like a database file where you want only one writer across an entire system or you will lose data, this is data loss about to happen
ufobat yeah as a general rule you're right, but if you as a programmer know which threads you have and wait for a "good point in time" to fork you could have a reasonable result
geekosaur except you don't 20:07
consider that we generally, for good reason, do 2-level locking
ufobat what is that? 20:08
geekosaur the actual lock is a memory location, we use a fast-mutex (futex in linux terms) to synchronize access to that memory location, but do not otherwise hold process/kernel level locks when that location is "locked"
but now user code has to knwo about that memory location to know if it's a good time to fork or not 20:09
leont Threads are why pthreads has a at_fork function, so you can fix up the locking -_-
jnthn s/Threads/Forks/ ?
oh, or maybe not :)
geekosaur and the more things that have to know about these locks, the more expensive threading, and forking, and locking get for everyone
jnthn Can prase it both ways :)
leont jnthn: no, I meant that literally 20:10
geekosaur you *can* solve it but you end up with avery heavy solution like perl 5's interpreter-per-thread
20:10 notostraca joined
leont at_fork also meant that fork suddenly wasn't async-signal safe anymore, something POSIX didn't immediately realise 20:10
(because the at_fork handlers invariably aren't async-signal-safe 20:11
tyil back
ufobat okay :-) thanks for the explanation
tyil geekosaur, ufobat, jnthn: thanks for the information, I'll try my hand at a posix-shell wrapper that does the forking for me, and write a small article to help other users in case they wonder
leont IME, you can have at most 2 out of forks, threads and a higher level programming language 20:12
geekosaur yeh, I've been collecting my comments about the haskell version because it;s come up in the past as well, and need to turn them into a haskell wiki article at some point
tyil tfw found the first thing perl 6 is "bad" at in my experience :( 20:13
geekosaur it wouldn;t be directly applicable to perl 6 but most of the same issues apply in some sense to any other language. C squeaks by only by not having higher level data structures
20:13 cdg_ joined
geekosaur but as soon as your user code adds them in order to do real work, you run into them again 20:13
moritz C doesn't automatically start a a thread pool scheduler for you that can hold on to locks 20:14
geekosaur (and libc has some, which is where that aync-signal-safe stuff comes in)
20:14 virtualsue left
jnthn geekosaur++ # lots of useful details 20:15
My feeling from all this is that trying to make MoarVM do better at fork is probably going to lead to it both still being bad at it *and* getting worse at other stuff while trying to achieve that. 20:16
20:16 cdg left
jnthn "A strange game. The only winning move is not to play." 20:17
ufobat :D
20:18 ufobat left, raschipi joined 20:19 wamba joined
HoboWithAShotgun one day we will have perl 6 compile to c++ source with native integration of c++ libraries 20:28
make it happen j :)
leont They're way too different for that to make sense 20:31
tyil in case anyone wonders, cry.nu/p/6ceb
seems to do the forking as a shell wrapper
additional bonus, it sets -Ilib for me :p 20:32
20:34 mr-foobar left 20:37 mr-foobar joined
tyil can I reassign $*IN to a filehandle so all output gets written to a file instead of STDIN? 20:48
leont It's a normal contextual variable 20:49
tyil $*OUT and STDOUT* sorry 20:52
Ven`` same answer :P
tyil ye, just to clarify :p
lizmat my $*OUT = open("foo", :w ) 20:55
20:55 lizmat left 20:56 robertle left
tyil tfw she left immediatly 20:56
:(
20:57 leont left, lizmat joined
tyil wb lizmat 20:57
lizmat yeah, flaky Ziggo wifi :( 20:58
21:04 skids left 21:12 setty1 joined 21:13 mcmillhj left 21:15 rindolf left 21:19 itaipu left, troys is now known as troys_ 21:20 itaipu joined 21:32 timrs2998 joined 21:34 notostraca is now known as TEttinger 21:43 jonas1 left 21:50 nadim left 21:52 headcase joined 21:53 pmurias left 21:54 rgrau joined 21:57 Ven`` left, wamba left 22:02 sprocket left, sprocket joined 22:04 AlexDaniel joined
Xliff m: class A { has $!func; method test { &( $!func )("foo"); }; method setFunc($f) { $!func = $f }; }; class B is A { submethod TWEAK { sub a { say "FOO!"; }; self.setFunc(&a); }; }; my $b = B.new(); $b.test; 22:06
camelia Too many positionals passed; expected 0 arguments but got 1
in sub a at <tmp> line 1
in method test at <tmp> line 1
in block <unit> at <tmp> line 1
22:07 setty1 left
Xliff m: class A { has $!func; method test { &( $!func )("foo"); }; method setFunc($f) { $!func = $f }; }; class B is A { submethod TWEAK { sub a($bar) { say "FOO!{$bar}"; }; self.setFunc(&a); }; }; my $b = B.new(); $b.test; 22:07
camelia FOO!foo
Xliff Can someone tell me why I am getting this: 22:09
Variable '$server' is not declared. Did you mean '$!server'?
at /home/cbwood/projects/p6-webservice-eveonline/scripts/../lib/WebService/EveOnline/RESTBase.pm6 (WebService::EveOnline::RESTBase):42
------> method getServer(⏏$server) {
From here: 22:10
github.com/Xliff/p6-webservice-eve...STBase.pm6 22:11
22:11 thou joined
Xliff Rather... 22:11
22:11 committable6 left
Xliff github.com/Xliff/p6-webservice-eve...se.pm6#L27 22:11
If I take out the contents to TWEAK, it compiles. Is this not legal?
lizmat if self.setCacheNameFunc(&cache_name_func); returns a Failure, then you will get that. Could that be the case? 22:16
night #perl6!@ 22:17
afk&
jnthn Xliff: I don't spot it (but I'm super tired), but often that's a run-away quote and it's trying to interpolate $server 22:18
22:19 raschipi left
Xliff jnthn: I found it. 22:19
timotimo Xliff: i think your use of || is wrong in the getServer function
you either need | there to get a junction or use a regex
Xliff: so where was the issue? 22:20
Xliff timotimo++: ohh! A totally separate bug!
github.com/Xliff/p6-webservice-eve...se.pm6#L31
jnthn++ was right. The regex is incomplete and being interpreted as a string. 22:21
22:21 pilne joined
timotimo oh! 22:21
Xliff I don't know HOW that 's' got there, but it did (probably missed an Alt-F) and totally changed the code.
timotimo it's an s/// without the part after the /
Xliff Exactly.
Crap that drives me up the wall!
timotimo that needs an "in regex" version, too 22:22
the error message i mean
not only "inside double quoted string"
22:23 committable6 joined, ChanServ sets mode: +v committable6 22:26 Cabanossi left
u-ou I like perl 5 . but I love perl 6. 22:26
22:27 Cabanossi joined 22:32 skids joined 22:35 headcase left, headcase joined 22:37 itaipu left, sprocket left 22:39 sprocket joined 22:45 kerframil joined 22:46 troys_ is now known as troys 22:49 Rawriful left
HoboWithAShotgun m: say 3e-1 - .3 22:50
camelia 5.55111512312578e-17
HoboWithAShotgun m: say (3e-1).WHAT
camelia (Num)
HoboWithAShotgun Shouldn't that be a Rat? 22:51
m: say 3e-1.Num - .3 22:52
camelia 5.55111512312578e-17
HoboWithAShotgun m: say 3e-1 - .3.Num
camelia 5.55111512312578e-17
timotimo you get a Num if you use that exponent syntax
that's our "escape hatch" to get a num when you would otherwise get a rat 22:53
HoboWithAShotgun i know, i would have expected a rat when the base is an int
timotimo nah, for that you'll need the actual * 10 ** 123
HoboWithAShotgun oh
22:54 sprocket left
HoboWithAShotgun m: say 3e-1 - (1/3).Num 22:54
camelia -0.0333333333333333
HoboWithAShotgun bah, i am tired 22:55
food, bed, cya
22:56 sprocket joined 23:02 headcase_ joined 23:04 headcase left 23:08 epony left
Xliff Why is Grammar::Tracer saying that rules are matching when my Grammar.parse($s) returns Nil? 23:11
23:11 epony joined 23:12 sprocket left
timotimo could be you're not matching from begininng to end 23:13
try if subparse will match
Xliff ^ 23:14
23:14 sprocket joined
Xliff Yep. That's weird. 23:14
And Tracer seems to imply that I AM matching from beginning to end. There is no overall fail mark. 23:15
23:16 epony left, headcase joined
timotimo right, it doesn't know about the parse/subparse difference 23:17
it totally should
Xliff kk 23:18
I am now seeing what I want. Thanks, timotimo++
timotimo yay
Xliff HTTP::UserAgent has a bug in the header parser grammar.
timotimo one last good deed before i go to bed 23:19
Xliff message-header => 「expires: Wed, 27 Sep 2017 23:02:16 GMT」
field-name => 「expires」
field-value => 「 Wed, 27 Sep 2017 23:02:16 GMT」
field-content => 「ed, 27 Sep 2017 23:02:16 GMT」
See the problem?
timotimo yeah, it drops the W there
not sure why
Xliff Note, that for some reason, it does NOT drop the T in Tue!
Now to study the grammar. 23:20
timotimo haha
it has w instead of \w?
23:20 headcase_ left
Xliff Think so. 23:20
Cos that's the only DOW it drops. 23:21
timotimo do you remember the "printer doesn't print on wednesdays" thing? :D
tuesdays*
Xliff github.com/sergot/http-useragent/b...er.pm6#L18 23:22
LOL, tt
timotimo huh, what
what's the use case for this special case?
surely there's a test that covers this?
ugexe ETag 23:23
timotimo lives-ok { $h.parse('ETag: W/"1201-51b0ce7ad3900"') }, "parse";
Xliff Is there some kind of field modifier for http headers that need W?
timotimo yeah
i have no idea why this is a thing
Xliff Well, CRAP.
geekosaur 'is this doesn't print on tuesdays hard, or 500 mile email hard?'
timotimo geekosaur: <3 23:24
Xliff geekosaur: That remains to be seen.
timotimo strong vs weak etag validators
Xliff Now is that the only time we need this?
geekosaur surely that can go into the ETag handler? 23:25
ugexe in any case that should be happening in the actions, not the grammar
Xliff IIF field-name == "ETag'?
ugexe: Y
FWIW: There is no "etag handler"
timotimo at the moment it's ignoring weak vs strong completely, and i'm not sure it even does anything with etag in general
Xliff Any value that starts with a "W" will get it choped. 23:26
timotimo yeah, i'd call that wrong
also, why is the / optional there?
Xliff So if the field-name MUST be etag, I can change the Actions to fix it. 23:27
And just drop that out of the grammar.
23:27 BenGoldberg joined
timotimo that would be preferable, i'd say 23:27
Xliff OK. Yay! Another thing I get to fix! :)
timotimo thank you for your hard work :) 23:28
Geth doc: c8cc4801f1 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
Add that IO::Path.chdir will be entirely removed in 6.e
23:29
doc: e0e32d0092 | (Wenzel P. P. Peppmeyer)++ (committed by Zoffix Znet) | doc/Language/functions.pod6
note multi hiding via non-multi in lexical scope (#1574)
23:30 greppable6 left, greppable6 joined, ChanServ sets mode: +v greppable6
Xliff Oh... 23:31
W8....
If that's not done there than the grammar cannot properly process both ETag values and quoted ones. 23:32
>_<
23:32 quotable6 left
timotimo hm, so either it has to be w/" or W/" 23:33
23:33 headcase_ joined
timotimo maybe it's enough for now to require the / to be there 23:33
or is that really optional?
23:35 epony joined, headcase left
Xliff Doesn't look like the / is optional for ETag. 23:36
The problem, however, is that the existing grammar will work for ETags, but will fail for ANY value that starts with 'W' and not followed by / 23:37
I will need to test that.
... "<!before \h> ['W/' | 'w/']?" looks to work. 23:39
timotimo i'm going to bed
seeya!
Xliff nn
ugexe that still seems broke for any header field other than etag that could start with W/ 23:40
timotimo i'd say perhaps require the " " as well
at the moment you can start a header's value with " but not end it with one 23:41
or start it without and end it with one
it won't be included either way
ugexe its a valid start to base64 value
timotimo oh
ugexe W/ is (why it cant be ignored)
Xliff So yeah. Doing that works for ETags, too 23:42
So unless someone can find an instance where the '/' is optional, I'm going with this.
Oh, 23:43
ugexe what about `Custom-Auth-Header: W/7fhEfhkjafeHF`
Xliff ugexe++ # I didn't think about that.
23:43 headcase joined
Xliff So now doing: <!before \h> ( ['W/' | 'w/'] )? 23:45
And if field-name is not "ETag"; then $/0 will be added back to field-value
23:46 headcase_ left, troys is now known as troys_ 23:54 Xal left 23:55 headcase left 23:56 Xal joined, headcase joined 23:59 cdg joined