»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
dalek kudo-star-daily: f38f36b | coke++ | log/ (9 files):
today (automated commit)
02:34
kudo-star-daily: f05fa8e | coke++ | log/ (9 files):
today (automated commit)
kudo-star-daily: ffe4bdb | coke++ | log/ (9 files):
today (automated commit)
rl6-roast-data: c9b7318 | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: 08c78ac | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: 0b7a064 | coke++ | / (9 files):
today (automated commit)
dalek kudo/nom: f098e0f | lizmat++ | src/core/control.pm:
Make 'samewith' also work on subs, masak++

This fixes #125539
04:32
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125539
dalek ast: b7acec1 | lizmat++ | S06-multi/redispatch.t:
Add samewith tests for RT #125539
04:41
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125539
dalek kudo/nom: dc36c34 | lizmat++ | docs/ChangeLog:
Some more ChangeLog entries
04:47
kanl masak: funny analogies :) i'm certain the logic is sound. the problem i have is when monitoring a set of *ephemeral* data and alerting on some conditions, i'd like to not drag people out of their beds when nothing is there, and simply that. be it common sense or logic, when it comes to that, it'd be hard to face an angry mob of sleep deprived people and calmly explain the soundness of it all :) 05:26
that said, i'm sure i can find ways work around that. no point tossing the baby out with the bath water :) 05:28
ugexe kanl: re your proc async RT (gist.github.com/anonymous/79a7e59c...0f6ac09e): does this happen if you use print instead of say? 05:31
kanl i've not tried that. but .print does not tag a newline to the string right? the reason for using .say there is to demonstrate that the output is not tapped in its entirety. 05:34
i.e. the output is broken into pieces and arrives ad-hoc. so one would have to assemble it before working on it. 05:35
ugexe no
you still get the newline, so it still gets printed. the only assembly is calling .lines on the final product if you want it split line by line 05:40
kanl i've not tried calling .lines on the output inside the tap, either. i did call .split by newlines, but not getting expected result. 05:45
ugexe you would calls .lines outside the tap on whatever your finished string with lots of newliens is 05:47
kanl ah ic.
ugexe and for print/say where you want to preseve order and lines you would want to use .act 05:48
my $p = Proc::Async.new( | < ps waxu > ); $p.stdout.act({ $_.print }); await $p.start;
kanl i've no problem with the doing things in order with .act. i think the problem i'm having is different. 05:50
prior, i suspect it wasn't really a problem but by design, that output is not tapped in its entirety. 05:51
ugexe i dont know enough about threading yet but there looked to be a race condition where the very last chunk of buffer could go unread
ugexe is that at all consistent with the missing output? 05:52
kanl not missing.
only broken into pieces.
i've not missed any output. 05:53
ugexe oh. thats why you call .print
or $p.stdout.lines, or $p.stdout.get
dalek ast: 1c5d601 | lizmat++ | S32-array/adverbs.t:
Comprehensive testing array slicing with adverbs
05:55
dalek kudo/nom: 5919a84 | lizmat++ | t/spectest.data:
Comprehensive testing array slicing with adverbs
05:56
lizmat breakfast&
kanl ugexe: i need to re-read the doc :)
i'm seeing no .lines or .get on the Supply
type
i'd apologies for any confusion i might've caused , but this could very well be the case of lacking documentatino on various things. so, simply put, i knew of no better or right way of doing something, so i tried doing the wrong thing, and getting the wrong results :p 05:58
apologize even. 05:59
ugexe i was thinking of a channel i think. a supply has .list but thats not split on newlines
anyway it sounds like you want a .tap that fires everytime a new line is reached 06:00
kanl no. no. that's not what i want
kanl like i said, it could very well be the correct behavior if buffering is done that way intentionally. 06:01
if it's by design, all it needs is more detailed documentation. 06:02
ugexe that buffer though is where the race condition might be 06:06
kanl i'm not even sure how one might interpret "entirety" in the case of asynchronous I/O. i hope it does not mean the entire lifespan of the program, which could be interactive, and input and output could be interlaced.
kanl imagine if one were to implement Exepct with it. 06:08
*Expect* 06:09
ugexe ive been trying to read from sterr and stdout from non-async Proc, but one always blocks the other
kanl then you must've been very lucky :) 06:10
ugexe gist.github.com/ugexe/cf047b86bfb66ada37df 06:12
unfortunately reading .out and .err each in their own thread causes it to explode 06:13
lizmat was just reading masak's interview (again) 06:18
"In Perl (5 and 6), imports happen on the package level, and so there is a real risk of collisions"
masak: I think you're wrong there: in Perl 6, imports are lexical as well 06:19
m: sub ok { say "Hello" }; { use Test; ok 1 }; ok
camelia rakudo-moar dc36c3: OUTPUT«ok 1 - ␤Hello␤»
jdv79 wasn't there an exception or two? maybe subsets or types or somethings like that
lizmat m: sub ok($a) { say "Hello" }; { use Test; ok 1 }; ok 42 06:20
camelia rakudo-moar dc36c3: OUTPUT«ok 1 - ␤Hello␤»
lizmat m: my @a; say @a[1,2,3].perl; say @a[1..3].perl 06:24
camelia rakudo-moar 5919a8: OUTPUT«(Any, Any, Any)␤()␤»
lizmat thinks they should be the same ?
ugexe m: my @a; say @a[1,2..4].perl; 06:30
camelia rakudo-moar 5919a8: OUTPUT«(Any, Any, Any, Any)␤»
lizmat thing is, if I make [1..3] return (Any,Any,Any), I break a lot of spectests 06:31
(and get some todo's passing)
but more breakage
wonder what the GLR would mean for this
ugexe must be whatever related eh 06:33
m: my @a; say @a[*,1..3].perl; say @a[1,*..3].perl; say @a[1,2..*].perl
camelia rakudo-moar 5919a8: OUTPUT«((), Any, Any, Any)␤()␤()␤»
lizmat my head starts to hurt now 06:34
lizmat catches up on some sleep 06:35
ShimmerFairy m: say [0,1] ~~ [0,1]; say [[0, 1]] ~~ [[0, 1]];
camelia rakudo-moar 5919a8: OUTPUT«True␤False␤»
ShimmerFairy Something I caught the other day; I hope this would be considered a bug
ugexe m: say [[0,1]] cmp [[0,1]] 06:38
camelia rakudo-moar 5919a8: OUTPUT«Same␤»
ShimmerFairy Yeah, I had to resort to cmp for that, but it still seems odd that you can't smartmatch a multidim array
kanl masak,moritz: while not putting at risk centries of progress on logic and mathematical truth, i've found happiness/sanity with ( Nil.any ) :)
m: my @a = ( Nil.any ); say so @a.all > 0; say so @a.none > 0; say so @a.any > 0; say so @a.one > 0;
camelia rakudo-moar 5919a8: OUTPUT«False␤True␤False␤False␤»
kanl now there's that set of ephemeral data looking ready to be monitored 06:39
raydiak .tell lizmat looks like the range slicing behavior is/was intentional: github.com/rakudo/rakudo/commit/a8...e6a5c92a04 06:40
yoleaux raydiak: I'll pass your message to lizmat.
masak good morning, #perl6 07:16
bartolin o/
dalek ast: 3957fed | usev6++ | S (2 files):
Add tests for RT #115390
07:19
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=115390
masak m: say so any.all > 0 07:26
camelia rakudo-moar 5919a8: OUTPUT«5===SORRY!5===␤Argument to "any" seems to be malformed␤at /tmp/zXdmCxO4lH:1␤------> 3say so any7⏏5.all > 0␤Other potential difficulties:␤ Function "any" may not be called without arguments (please use () or whitespace to denote argum…»
masak m: say so any().all > 0 07:27
camelia rakudo-moar 5919a8: OUTPUT«False␤»
masak kanl: it might be happiness, but I'm not ready to call it "sanity" until I understand what `any().all` means :)
kanl call me a lunatic, but a happy one :) 07:28
masak as you wish.
masak I'm the other way. I can stand a little misery, as long as I understand what my program does. 07:29
happiloon the world needs more programmers like you :) 07:30
masak well, it's a sweet deal. usually the understanding makes me happy enough. :>
happiloon i otoh, would like to get the romans off my back before going back to my geometry problems :p 07:32
ShimmerFairy masak: maybe it's some kind of multiuniversal statement? "Take all of the possible anys"? :P
masak what wouldbe a good three-letter acronym for "using tests to map out the design, before diving into the implementation"? 09:00
kanl TDD => test driven design ? 09:05
moritz TDM => Test Driven Modeling? 10:24
masak kanl: TDD is kinda taken, though... 10:41
moritz: yes, something like that :)
ShimmerFairy I wonder if [[0, 1], [2, 3]] ~~ [[0, 1], [2, 3]] should be True. Right now it isn't (because Array's ACCEPTS method uses !=== when comparing elements), and I'm not sure if that's intended or a bug. 10:53
bartolin std: my $foo :a # :a parsed as trait 11:02
camelia std 28329a7: OUTPUT«ok 00:00 135m␤»
bartolin m: my $foo :a # RT #119763 11:03
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=119763
camelia rakudo-moar 5919a8: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
bartolin is that NYI (setting a trait with colonpair syntax)? 11:04
I didn't find that syntax in roast or in the design documents, but Rakudo parses the ':a' as a trait as well
FROGGS m: my $foo :rw 11:08
yoleaux 2 Jul 2015 10:07Z <lizmat> FROGGS: there's something weird going on with repeated qqx[], it seems
2 Jul 2015 10:13Z <lizmat> FROGGS: looking at failures in t/spec/S24-testing/line-numbers.t and t/spec/S32-io/IO-Socket-INET.t
camelia rakudo-moar 5919a8: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
FROGGS bartolin: I have no idea
bartolin it seems to blow up in github.com/rakudo/rakudo/blob/nom/....nqp#L2526 11:13
but I was mainly curious, because I haven't seen that syntax before ... 11:14
masak looks more like an adverb than a trait. 11:41
question is, what is it an adverb on...? 11:42
ShimmerFairy: I think I agree with you. I would like it if [].ACCEPT did ~~ recursively down its structure 11:43
ShimmerFairy: in fact, I believe I once submitted an RT ticket about that
ShimmerFairy masak: I changed !=== to !~~ for fun, and it did fail some tests. Not sure if that's a failure of the tests or of making the change.
masak hm, or maybe I didn't. can't find it now. 11:48
masak searches the logs instead
masak oh yes, here: irclog.perlgeek.de/perl6/2014-08-29#i_9264839 11:49
masak ShimmerFairy: seemed what I did was not to submit an RT ticket, but to submit a suggested change to S03 11:50
(since stalled)
ShimmerFairy Yeah, I'd like it if smartmatch was changed so [[1,2]] ~~ [[1,2]] were true, and so on. To me, smartmatch is supposed to (roughly) check the equality of two things the way a human would ("If I were to look at these two things myself, would I say they're equal?"). 11:53
ShimmerFairy Or to put it another way, it's the least strict check for equality we have, as I understand it :) 11:53
masak ShimmerFairy: *nod*
ShimmerFairy: good news, that particular one is already True under eqv semantics 11:54
m: say [[1, 2]] eqv [[1, 2]]
camelia rakudo-moar 5919a8: OUTPUT«True␤»
masak but not all things I'd expect to be true under ~~ are true under eqv
m: say [[1, 2]] eqv [[1.0, "2"]]
camelia rakudo-moar 5919a8: OUTPUT«False␤»
ShimmerFairy Huh, didn't know/forgot about eqv; I used cmp when I ran into this the other day.
masak m: say 1 ~~ 1.0; say 2 ~~ "2"
camelia rakudo-moar 5919a8: OUTPUT«True␤True␤»
ShimmerFairy m: say [1, 2] ~~ [1.0, "2"] 11:56
camelia rakudo-moar 5919a8: OUTPUT«False␤»
masak ...yes, I think I would like to be using a slang that forbade `has $twigilless;` :) 12:08
masak hm, we have comparison ops for Date objects but not for DateTime objects... this is probably an oversight. 12:09
m: my $dt1 = DateTime.now; my $dt2 = $dt1.later(:1hour); say $dt1 < $dt2
camelia rakudo-moar 5919a8: OUTPUT«Cannot call Real(DateTime: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at /tmp/8051nuMDbp:1␤␤»
masak submits NYI rakudobug 12:10
m: my $dt1 = DateTime.now; my $dt2 = $dt1.later(:1hour); say $dt1.Instant < $dt2.Instant 12:12
camelia rakudo-moar 5919a8: OUTPUT«True␤»
masak seems to be a current workaround.
dalek ast: 75119ec | lizmat++ | S32-array/adverbs.t:
Apparently, ranges *always* auto-trunc, raydiak++
12:30
lizmat ^^^ still not sure that's the right thing to do, though 12:31
yoleaux 06:40Z <raydiak> lizmat: looks like the range slicing behavior is/was intentional: github.com/rakudo/rakudo/commit/a8...e6a5c92a04
lizmat I could see this being true for any infinite list of indexes
m: my @a; say @a[1,2,3].perl; say @a[1..3].perl; say @a[1,2..3].perl # these not being the same, feels odd to me 12:32
camelia rakudo-moar 5919a8: OUTPUT«(Any, Any, Any)␤()␤(Any, Any, Any)␤»
masak I think I'm only surprised-ish at the last line. 12:38
ShimmerFairy Hm. This is the first time I've seen the 'unit' keyword; why is it necessary for the semicolon version of 'module' (and only the semicolon version)? 13:55
timotimo because people kept writing "class foobar;" and were surprised when the rest of the file was the class body 14:08
dalek ecs: 66d345c | hoelzro++ | S05-regex.pod:
Detail action methods + dynvar behavior
14:09
timotimo i.e. they expected the behavior to be equivalent to "class foobar { ... }"
ShimmerFairy ah, so it's for a C++-ism then :) 14:10
timotimo oh, yeah, i remember now that that's how you stub stuff in cpp 14:12
ShimmerFairy Yeah, 'unit' seemed useless to me until you brought up that people were expecting C++-ish behavior. 14:14
timotimo i wasn't very happy with the way we handled the move from without-unit to with-unit 14:16
ShimmerFairy How was it handled? 14:18
timotimo it started giving annoying deprecation messages immediately, but just putting unit into your modules would give you compilation errors with the previous version
colomon timotimo: +1 14:20
yoleaux 4 Jul 2015 17:34Z <hoelzro> colomon: could you have a look at github.com/perl6-community-modules...ts/pull/2?
ShimmerFairy I think I would've preferred a disambiguation warning over a deprecation: "Use 'unit module foo;' if you mean to declare the file as a module, or 'module foo {...}' if you mean to stub the module."
timotimo though i believe the deprecation warnings only actually show up if you build a non-release version
colomon hoelzro++ 14:22
masak m: class C { has $.x = 42; method new(|) { callsame() } }; say C.new.x 15:37
camelia rakudo-moar 5919a8: OUTPUT«42␤»
masak m: say Date.new(2016, 1, 31).later(:1month) 15:43
camelia rakudo-moar 5919a8: OUTPUT«day of 2016/2 out of range. Is: 31, should be in 1..29␤ in block <unit> at /tmp/1Md4pCV602:1␤␤»
masak hm.
not sure it should fail there...
I'd rather it gave 2016-03-03.
ShimmerFairy That 2016/2 looks weird at-a-glance 15:48
ugexe FROGGS: is your Proc shell/run work meant to accept user declared IO::Pipes for :out and :err in the future? as in, i could pass in my own stdout and stderr pipes to be redirected to? 16:15
meant to in the future, that is
skids .tell lizmat Re: my@a; @a[1,2..3] irclog.perlgeek.de/perl6/2015-06-16#i_10755209 if it helps figure out how the GLR will impact that. 16:17
yoleaux skids: I'll pass your message to lizmat.
FROGGS ugexe: I think so, yes
skids (I agree with masak, I would expect the 2..3 in [1,2..3] to autotruncate if [2..3] autotruncates) 16:19
ugexe i was able to merge the output of stdout and stderr using the current Procs as-is, but it blocks until the end of the program :( 16:20
well, until the pipes are closed anyway
masak ShimmerFairy: yeah, the 2016/2 isn't optimal either... 16:35
lucasb m: my @a = 1,2,3; my $x = @a; @$x = Empty; say @a.perl # this is ok 16:46
camelia rakudo-moar 5919a8: OUTPUT«[]<>␤»
lucasb m: my @a = 1,2,3; my %h = a=>@a; @(%h<a>) = Empty; say @a.perl # this is ok
camelia rakudo-moar 5919a8: OUTPUT«[]<>␤»
lucasb m: my @a = 1,2,3; my @b = [@a]; @(@b[0]) = Empty; say @a.perl
camelia rakudo-moar 5919a8: OUTPUT«[1, 2, 3]<>␤»
lucasb ^^ I can't clear an array when it is an array element 16:47
oops! sorry, my mistake 16:49
m: my @a = 1,2,3; my @b = $@a; @(@b[0]) = Empty; say @a.perl
camelia rakudo-moar 5919a8: OUTPUT«[]<>␤»
ugexe still, this seems odd
lucasb m: my @a = 1,2,3; my @b = $@a; say @b.perl 16:50
camelia rakudo-moar 5919a8: OUTPUT«[[1, 2, 3]]<>␤»
lucasb m: my @a = 1,2,3; my @b = [@a]; say @b.perl
camelia rakudo-moar 5919a8: OUTPUT«[[1, 2, 3]]<>␤»
BenGoldberg m: my @a = 1,2,3; my @b = [@a]; say @b[0].perl 16:51
camelia rakudo-moar 5919a8: OUTPUT«[1, 2, 3]␤»
lucasb I think it is because they have the same .perl representation, but they are not completely similar
BenGoldberg m: my @a = 1,2,3; my @b = [@a]; say @a.perl
camelia rakudo-moar 5919a8: OUTPUT«[1, 2, 3]<>␤»
ugexe your enot binding though
BenGoldberg m: my @a = (1,2,3); say @a.perl; 16:52
camelia rakudo-moar 5919a8: OUTPUT«[1, 2, 3]<>␤»
BenGoldberg m: my @a = (1,2,3); say +@a;
camelia rakudo-moar 5919a8: OUTPUT«3␤»
BenGoldberg m: my @a := (1,2,3); say +@a;
camelia rakudo-moar 5919a8: OUTPUT«3␤»
BenGoldberg m: my @a := (1,2,3); say @a.perl;
camelia rakudo-moar 5919a8: OUTPUT«(1, 2, 3)␤»
ugexe m: my @a = 1,2,3; my @b := [@a]; say @b[0].perl
camelia rakudo-moar 5919a8: OUTPUT«1␤»
BenGoldberg m: my @a := (1,2,3); my @b = [@a]; say @b.perl 16:53
camelia rakudo-moar 5919a8: OUTPUT«[[1, 2, 3]]<>␤»
BenGoldberg m: my @a := (1,2,3); my @b := ($@a); say @b.perl
camelia rakudo-moar 5919a8: OUTPUT«(1, 2, 3)␤»
BenGoldberg m: my @a := (1,2,3); my @b := (item $@a); say @b.perl
camelia rakudo-moar 5919a8: OUTPUT«(1, 2, 3)␤»
BenGoldberg m: my @a := (1,2,3); my @b := (item $@a); say +@b
camelia rakudo-moar 5919a8: OUTPUT«3␤»
ugexe you can /msg camelia queries as well 16:54
DrForr Or even use the debugger's REPL :) 17:03
dalek osystem: aa0639d | RabidGravy++ | META.list:
Add Audio::Libshout
17:12
RabidGravy there, next up some encoding shizzle 17:13
lucasb My mistake was that [@a] was building an new array, since [] flattens inside (I forgot that), so the reference to @a was lost. Sorry for the noise. 17:23
ugexe thanks for reminding me at least 17:29
BenGoldberg m: my @a = (1,2,3); say "Whay is this " ~ @a.perl.substr(*-2) ~ " here?"; 17:37
camelia rakudo-moar 5919a8: OUTPUT«Whay is this <> here?␤»
lucasb BenGoldberg: iiuc, It's the difference between itemized vs non-itemized arrays 17:38
iirc, TT said this difference will be gone after GLR (right?) 17:39
skids So if truncation does end up applying to all ranges inside a list inside .[] maybe we should qualify that as a special flavor of flattening. 18:14
And if we need that internally anyway, also have a Range method slice(Range $lim: *@values) is export
leont Did smart-matching against a type change recently? 18:15
skids There was a mod involving junctions a few weeks ago IIRC.
leont This started failing: github.com/Leont/tap-harness6/blob...ator.t#L45 18:17
skids irclog.perlgeek.de/perl6/2015-06-15#i_10750086 # junction mod
leont Replacing $expected with $expected.WHAT seems to fix it, but feels rather counter-intuitive
I have this feeling something else is wrong, but I'm clueless what 18:18
Maybe the Z operator changed wrt GLR? #justaguess
skids Any idea how recently it started to fail? 18:19
leont No, I haven't tried running it in 2-3 months I think 18:21
A closer look at the output suggest it's a Z problem 18:22
It seems to try to match against another object also on the left hand side
skids Try -> ($got, $expected) 18:29
skids (or "for flat") 18:30
lizmat is looking at the newio branch and resists the urge to zap it into oblivion 18:31
yoleaux 16:17Z <skids> lizmat: Re: my@a; @a[1,2..3] irclog.perlgeek.de/perl6/2015-06-16#i_10755209 if it helps figure out how the GLR will impact that.
leont That solved everything :-) 18:32
Thanks
nine lizmat: why would you? 18:33
dalek Heuristic branch merge: pushed 140 commits to rakudo/newio by lizmat
cognominal lizmat++ 18:34
lizmat because it does not have enough consensus
and it is a royal pain to keep even compiling (it doesn't anymore now)
nine :/ 18:35
skids Is there a TLDR doc of what it changes?
cognominal IO and GLR are the two important items impacting the language as seen by the users. I hope they will progress. 18:36
lizmat skids: github.com/perl6/specs/blob/newio/S16-io.pod
cognominal lizmat++ for the rul 18:38
cognominal * url 18:39
skids lizmat: I find those docs easy to read, but maybe something more side-by-side might help build consensus -- "we currently to do this and it would be this instead because" 18:41
dalek c: 5dc0865 | ugexe++ | lib/Type/IO/Path.pod:
IO::Path.extension
18:43
c: c754919 | ugexe++ | lib/Type/Proc (2 files):
:$cwd param for process spawning
c: f988b2c | (Nick Logan)++ | lib/Type/ (3 files):
Merge pull request #100 from ugexe/ugexe

IO::Path .extension, Proc[::Async] :$cwd param
RabidGravy is anyone looking at doing any audio codec stuff or know of anyone who is? I'm just about to start a liblame binding and I may define a generalised interface for that kind of thing 18:45
cognominal A very minor complaints about synopses. Why do we keep (always out of date) document versioning/modification date when everything is under git? This make the document looking stale when they are not.
skids Frankly I've been avoiding working too much with IO, partly because of looming changes. 18:46
timotimo RabidGravy: why would you suppor such a shitty codec? ;) 19:01
cognominal lizmat, is there a device to limit l?stat system calls, like _ in Perl 5? 19:02
lizmat no, there isn't
in a concurrent world, I'm not sure what that would mean 19:03
on the other hand, you would be looking at a snapshot state
I'm not sure what would be wise in that respect
flussence well, you could use a given $stat-result {} block... though if we were to have a direct equivalent to p5 I imagine it'd be called $*STAT 19:04
leont Also, that has serious portability issues
skids
.oO(AV standards/APIs are such a thicket of madness these days.)
19:05
RabidGravy timotimo, I'd rather not have to frankly, but a) it's a realpolitik and b) the libvorbis API is horrid and I want to do an easy one first ;-)
leont Because Windows doesn't have a concept that maps 1:1, file-tests are much slower than they should be because _ forces it to do all the extra work always
timotimo RabidGravy: i'm not proposing ogg, i'm proposing opus :) 19:06
i mean vorbis vs opus
RabidGravy Opus is on the list, but as it's from the same stable I would imagine the API is equally horrid 19:08
timotimo what makes the libvorbis api so bad? 19:13
RabidGravy lots of bitty, fiddly functions 19:17
timotimo hm 19:18
RabidGravy the lame API is simplicity itself, initialise it with some parameters then chuck PCM data at a function which populates a buffer of unsigned chars with the encoded stuff 19:23
lizmat I'm looking at how much will break if we outlaw \$ \@ \% 20:14
gist.github.com/lizmat/4e8ed8c56f15f3b6147f
so far, there's a few specific spectests that fail 20:15
and some of them I think are pretty bogus to begin with
what to think of:
my @array = <a b c>;
my $ref = \@array;
timotimo we shouldn't let them bog us down so much
that seems like a test that ought to be kicked out 20:16
lizmat from t/spec/S02-literals/autoref.t
people coming from Perl 5 are used to writing \@a to get a reference
I don't think we're making it that harder on people if we would force P6ers to *always* have to use () to create a capture 20:17
even it is a single parameter on
e
aka, if you *really* meant to do \@a., you would have to do \(@a)
Begi Hey ! I've got a random string, like tkat : " tdtdttdt201678tft " 20:19
lucasb your patch didn't include \&foo ?
Begi How can I do to get the number in this string ?
lizmat lucasb: good point :-) 20:20
masak Begi: $string ~~ /(\d+)/ or die "didn't find a number"
Begi: say +$0
lizmat lucasb: updated the gist 20:23
Begi masak : Thanks ! 20:24
dalek ast: 038ad11 | lizmat++ | S02-literals/autoref.t:
Remove bogus \ tests from 2008

The \ in the tests were really used in the sense they exist in Perl 5.
20:37
ast: 4d25274 | lizmat++ | S02-types/capture.t:
Create capture with \() instead of just \
20:46
ast: 999cf98 | lizmat++ | S02-types/flattening.t:
Use itemizing instead of capturing

Which I think was the intent of these tests
20:48
ast: b07b9a8 | lizmat++ | S02-types/lists.t:
Create capture with \() instead of just \
20:50
ast: 21b7ed5 | lizmat++ | S02-types/mixed_multi_dimensional.t:
Use itemizing instead of capturing
20:53
lucasb lizmat++; the fact theses tests using \@a, \%h were passing is funny and luck, right? 20:55
lizmat yes, I think so
they were using the fact making a capture on a single thing, also itemizes 20:56
dalek ast: 4705fc0 | lizmat++ | S03-operators/assign.t:
Correct needless backslashing in interpolation
21:07
ast: b6d6d31 | lizmat++ | S03-operators/assign.t:
Fix (temporarily) some tests using \@a

It feels that the capturing was a misinformed "reference" taking. By taking the capture out, 4 TODO's passed, and one test failed. This seems GLR sensitive, so I just changed the fudging to match.
lucasb m: class C is Capture {}; C.new 21:15
camelia rakudo-moar 5919a8: OUTPUT«Method 'BUILD' not found for invocant of class 'C'␤ in block <unit> at /tmp/hevuso2Ren:1␤␤»
masak lucasb: some classes are a bit special-cased, and have a BUILD method instead of a BUILD submethod. Capture is one of those.
lucasb Capture's new is: method new(...) { nqp::create(self).BUILD(...) }
masak m: class C is Capture { method BUILD() {} }; C.new 21:16
camelia ( no output )
masak m: class C is Capture { method BUILD() {} }; C.new; say "alive"
camelia rakudo-moar 5919a8: OUTPUT«alive␤»
lucasb masak: Oh, thanks
But there is a submethod BUILD in Capture
masak yes, there is. 21:17
masak oh, that's it then. 21:18
if we call BUILD explicitly like that, it expects to find a BUILD in the derived class, too.
normally, BUILD is called several times up the inheritance chain. if it doesn't exist, no biggie. 21:19
here, it has to exist in the class being instantiated.
lucasb I still must study the object creation stuff like nqp::create/bless/new. idk what calls what. I thought this was an object creation problem... 21:22
masak then this is an excellent resource for you: perlgeek.de/blog-en/perl-6/object-c...ation.html
RabidGravy so NativeCall callbacks seem to work but is one with a signature of (const char *format, va_list ap) going to fly?
dalek ast: 27c655b | lizmat++ | integration/99problems-11-to-20.t:
Use itemizing instead of capturing
21:23
lucasb masak: thanks very much!
RabidGravy I'm thinking that I'm screwed by the va_list 21:24
lizmat m: my $a = \3 # would we call this a scalar *reference* ? 21:27
camelia ( no output )
lizmat feels to me we have a lot of bogus tests in t/spec/S03-operators/eqv.t and t/spec/S03-operators/value_equivalence.t 21:28
brrt .ask FROGGS if he cares enough about the 'system dynasm' option to object to me removing it 21:31
yoleaux brrt: I'll pass your message to FROGGS.
brrt oh, and that i'm removing it anyway :-P 21:32
timotimo RabidGravy: in theory, dyncall has support for "..." args, but it's not hooked up to moarvm at all yet 21:34
RabidGravy timotimo, cheers. I'll wing it and see what happens and if it becomes an issue I'll pester RT ;-) 21:37
dalek rakudo/nom: 01edd37 | lizmat++ | src/Perl6/Grammar.nqp: 21:43
rakudo/nom: Disallow \$ \@ \% \& to create a Capture
rakudo/nom:
rakudo/nom: For people coming from Perl 5, it is all too common to use \@a to
rakudo/nom: indicate a reference to @a. In Perl 6, we don't do references as
lizmat ^^^ complete commit message: gist.github.com/lizmat/df26b76c8d3426191577 21:44
nwc10 or github.com/rakudo/rakudo/commit/01edd37 :-) 21:45
lizmat ah, better :-)
nwc10 free diff with every commit message!
lizmat yeah... 21:46
maybe the URL should be posted first :-)
nwc10 * not actually true for merge commits
lucasb Since the sigiled forms are disallowed, why not making the parentheses required in all cases? 21:47
lizmat that's what this patch effectively does? 21:48
masak lucasb: because there are other things besides sigils and parentheses?
geekosaur lucasb, that commit was a few back
lizmat ah, of course,
sub a(\a) {}
geekosaur [05 20:46] <dalek> roast: 4d25274 | lizmat++ | S02-types/capture.t:
[05 20:46] <dalek> roast: Create capture with \() instead of just \
lucasb What? :D just a minute 21:49
geekosaur and yes, my original form of that (not quite as invasive :) handled the \a type case (after I found \key in the setting)
that was the spec commit that made \() the official syntax
followed by other commits to make existing stuff follow the new spec 21:50
lizmat geekosaur: which spec commit are you referring to?
geekosaur [05 20:46] <dalek> roast: 4d25274 | lizmat++ | S02-types/capture.t: 21:51
[05 20:46] <dalek> roast: Create capture with \() instead of just \
?
which I'd just pasted a few minutes ago?
lizmat that was a roast commit ?
geekosaur oh, sigh
right, that's a test not the actual spec
lizmat yup
geekosaur whoops
lizmat hehe
geekosaur officially Having A Day :/ 21:52
lizmat ok, glad we're on the same page again
:-(
geekosaur (this follows about 6 typoed code examples in a row over in #xmonad)
lizmat m: my $a = \3; my $b := 3; dd $a, $b # and here I thought these were equivalent 21:53
camelia rakudo-moar 5919a8: OUTPUT«$a = \(3)␤3␤»
lizmat I guess we want to weed out \ \d as well 21:54
as some P5ers might think it's a backref
lucasb m: say (\42).WHAT
camelia rakudo-moar 5919a8: OUTPUT«(Capture)␤»
lucasb so, "\42" should be now "\(42)", right? 21:55
lizmat well, it will still work now because I didn't check for \ \d, only for \$, \@, \% and \&
but yeah 21:56
m: say \42 eqv \(42)
camelia rakudo-moar 5919a8: OUTPUT«True␤»
lizmat ok, will ponder over that after some shuteye
so good night, #perl6!
RabidGravy ttfn #perl6! 22:12
skids .tell lizmat you're probably already aware of it, but PR#454 will prevent Parameter.perl from emitting "\%" and "\&" 22:13
yoleaux skids: I'll pass your message to lizmat.
ShimmerFairy Hm. I'm not entirely sure I agree with getting rid of \$a and such as allowed ways to create a capture. I don't mind the change itself, but I'm a bit suspicious of doing too much to make things easier for P5 users. At some point your P5 knowledge _will_ fail, so I can't help but wonder if it's worth getting rid of any particular source of failure.
geekosaur that was my argument for just making it a warning, with parenthesization suppressing the warning but not otherwise required 22:15
s/argument/reason/, not like I actually argued it anywhere :) 22:16
ShimmerFairy When it comes to stuff confusing folks used to Perl 5, I think it's worth remembering that we're specifically not an iteration of Perl 5 :) 22:17
geekosaur but the p6u message that triggered it is something I've seen before, a p5 user naively translating perl 5 refs to what they thought was the p6 equivalent
ShimmerFairy I'd argue it's the programmer's fault for naively translating from P5 to P6 in general, and not the fault of the language design. 22:19
geekosaur (and considering it "natural", when in fact only p5 would ever make you do that. well, and C, but you don't have any other choice in C...)
ShimmerFairy Like I said, this specific change itself doesn't bother me much, but I do hope we don't find ourselves bending over backwards to change the language to be more P5-user-friendly. 22:21
geekosaur I don't think there will be much more like this? but there are already a lot of p5 traps in there, and this is expected because it's billed as Perl and not some new language 22:23
masak 'night, #perl6
BenGoldberg m: my $scalar = 42; my $ref = \$scalar; say ++{$_}(|$ref);
# not as easy to dereferene as it is in p5
camelia rakudo-moar 01edd3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NUnGljb4WA␤This appears to be Perl 5 code␤at /tmp/NUnGljb4WA:1␤------> 3my $scalar = 42; my $ref = \$scalar7⏏5; say ++{$_}(|$ref);␤ expecting any of:␤ postfix␤»
geekosaur that said, I think there are more uses of single-element captures than I had spotted (and apparently running the spectest does not show warnings... maybe I should have made it an error for that test?) 22:24
...
I liked my warning better :)
ftr: 22:25
| <?before '$' | '@' | '%'> <.worry("To pass an array or hash to a function in Perl 6, just pass it as is, and for other uses of Perl 5's ref operator consider binding with ::= instead. Parenthesize as \\(...) if you intended a capture of a single variable.")> <termish>
BenGoldberg m: my $scalar = 42; my $ref = \\($scalar); say ++{$_}(|$ref); 22:26
camelia rakudo-moar 01edd3: OUTPUT«Method 'succ' not found for invocant of class 'Capture'␤ in block <unit> at /tmp/f_4q2ohVAE:1␤␤»
BenGoldberg m: my $scalar = 42; my $ref = \($scalar); say ++{$_}(|$ref);
camelia rakudo-moar 01edd3: OUTPUT«43␤»
ShimmerFairy geekosaur: That's a bit too directed towards Perl 5 for my taste :)
geekosaur yet it is similar to existing warnings about Perl 5
would you like to review the codebase and complain about all the other ones?
ShimmerFairy I know I've complained about the octal warning when I wanted to zero-pad my numbers before. 22:27
b2gills Octal goes all the way back to early assembly though so is valid for people coming from many languages 22:28
BenGoldberg Maybe we should think about making warning categories, and find a way for users to disable them in a scope, a la perl5's 'no warnings qw<category>' ?
ShimmerFairy It's probably because I don't know a bit of Perl 5, but I think of Perl 6 as its own thing, so I'm generally opposed to things done with P5 users in mind. (I still don't like the fact that parts of the spec have things omitted because "it's just like in P5") 22:29
ShimmerFairy BenGoldberg: There have been a few times where I wanted some sort of use I-dont-know-P5 pragma, that stopped preventing various behaviors because the compiler thinks I'm trying to write P5 :) 22:30
skids I'd like to see that too but AFAIC it can take a back seat to more pressing matters. 22:39
geekosaur the problem is that perl has a lot of history behind it, and for every person who's coming to perl 6 fresh there are dozens coming to it from perl 5 --- and previous iterations of perl have taken care to maintain compatibility (which is why perl 5 has those refs instead of something sensible) 22:42
perl 6 is a major break and either we cut the cord completely or we provide help for existing perl users to migrate to it 22:43
s/are dozens/will be dozens/
ShimmerFairy I understand that, but as someone who came to Perl 6 with no prior experience with Perl, I'm not a fan of the parts of the language that assume I'm a P5 user. 22:44
timotimo ← same here 23:12
i've actually got a PR for rakudo open that gives the user the ability to remove p5 warnings, but at that time i only had a single warning to remove and that seemed almost useless :) 23:13
skids THATs where I remember seeing that. I was like "don't we have that already?" 23:14
timotimo :) 23:20
feel free to improve upon it a bit more 23:21