»ö« 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.
AlexDaniel timotimo: sorry, what is? 00:02
I can't possibly see any other way it would work 00:03
in this case, $foo is a *key*
so it must now its value at the time of creation, yeah?
unless I'm missing something
m: my $foo; my $p1 = a => $foo; my $p2 = $foo => ‘a’; $foo = 99; say $p1; dd $p2 00:04
camelia a => 99
Pair $p2 = (Any) => "a"
AlexDaniel m: my $foo; my $p1 = a => $foo; my $p2 = $foo => ‘a’; $foo = 99; say $p1; say $p2
camelia a => 99
(Any) => a
AlexDaniel ↑ golfed
I guess the question is whether “a => $foo” works the way it does by design? 00:05
c: all my $foo; my $p1 = a => $foo; my $p2 = $foo => ‘a’; $foo = 99; say $p1; say $p2 00:06
committable6 AlexDaniel, gist.github.com/a1e9e8501bc051595e...70ef90aa79
AlexDaniel c: all my $foo; my $p1 = a => $foo; my $p2 = $foo => 'a'; $foo = 99; say $p1; say $p2 00:07
committable6 AlexDaniel, gist.github.com/0d6fead97b73e4befa...77f04708f6
jnthn In various ways we've consider a Pair a bit like a one-item hash; seen in that light, the behavior fits
(And for hashes it's of course very much by design) 00:08
*considered
AlexDaniel jnthn: what's the right way to reproduce it with a hash?
m: my $foo; my %h = a => $foo; $foo = 99; say %h
camelia {a => (Any)}
AlexDaniel ↑ that doesn't work
jnthn You'd need an object hash
Oh, wait, you mean the value 00:09
Would need to bind
AlexDaniel m: my $foo; my %h := :{a => $foo}; $foo = 99; say %h
camelia {a => (Any)}
AlexDaniel m: my $foo; my %h := (a => $foo); $foo = 99; say %h
camelia a => 99
jnthn No, bind the value into the hash with :=. Can't use the hash constructor syntax for this
m: my %h; my $foo; %h<a> := $foo; $foo = 99; say %h 00:10
camelia {a => 99}
AlexDaniel as a user, I really didn't expect the pair to behave like this… 00:11
this I mean:
m: my $foo; my $p = a => $foo; $foo = 99; say $p
camelia a => 99
jnthn Also
m: my $foo; my $p = a => $foo; $p.value = 42; say $p; 00:12
camelia a => 42
jnthn m: my $foo; my $p = a => $foo; $p.value = 42; say $foo
camelia 42
AlexDaniel heh
jnthn I remember making .value and l-value being discussed and done intentionally
(Don't remember the arguments, just that it was discussed and purposefully made this way)
perlawhi1l I'm trying to build from HEAD and getting this msg... 00:24
'You asked me to build , but 2017.12-25-g1e2a3fb is not new enough to satisfy version 2017.12.1-25-g1e2a3fb'
timotimo what is your build commandline? 00:25
perlawhi1l it's an alias i run almost every day without issue until today... the alias is essentially this: - 00:26
git pull && perl Configure.pl --gen-moar --gen-nqp --backends=moar && make && make install
perlawhi1l it looks like the '.1' is missing after '12' in the msg: "2017.12-25-g1e2a3fb is not new enough" 00:27
AlexDaniel hah!
jnthn github.com/perl6/nqp/blob/master/t...R_REVISION # probably should not have had the .1 in there 00:28
AlexDaniel git describe includes .1 00:29
Zoffix FWIW that was an automated bump that uses git describe
jnthn *sigh* 00:30
Next time I'll just wait for the next monthly :-)
Zoffix :)
we just need to tweak the thing that complains about too old
jnthn That'd be another solution :)
Zoffix Also PSA: nobody bump MoarVM the last commit has some floppy bug in it (the current version set in NQP seems to be fine tho) 00:31
jnthn I also put in a sanity check to `make release` to prevent the problem that caused the bad tarball happening again.
Zoffix looks into the too-old complainer
jnthn I'd hope anyone bumping revisions would be testing that the bumps they're doing work. :)
Zoffix Mine do a full stresstest :) <3 zscript 00:32
huggable: zscript
huggable Zoffix, Helper script for Rakudo Perl 6 core development: github.com/zoffixznet/z
jnthn Funny thing is, I thought I'd done a build with spesh stressing turned on 00:33
I'm really hoping I just did that step wrong
Otherwise we'll have a bug "not on my machine", which is always a pain.
Zoffix perlawhi1l: what does `git describe --tags` in your MoarVM directory give you? 00:36
perlawhi1l Zoffix: 2017.12-25-g1e2a3fb 00:37
Zoffix dafuq
perlawhi1l: do git checkout master; git pull --tags; 00:38
And I'm guessing your usual build will succeed then
do ^ that in MoarVM repo 00:39
AlexDaniel c: run(:out, :cwd(‘data/moarvm’), ‘git’, ‘describe’).out.slurp.say
committable6 AlexDaniel, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Committable
AlexDaniel e: run(:out, :cwd(‘data/moarvm’), ‘git’, ‘describe’).out.slurp.say
evalable6 2017.12.1-26-g65098f05
AlexDaniel e: run(:out, :cwd(‘data/moarvm’), ‘git’, ‘--version’).out.slurp.say 00:40
evalable6 git version 2.11.0
Zoffix AlexDaniel: does that thing build from scratch each time or does it build in the same repo, while pulling new things?
jnthn sleep &
AlexDaniel Zoffix: like does it git clone the repo from scratch each time? No, it does git pull 00:41
e: run(:out, :cwd(‘/tmp/whateverable/moarvm-repo’), ‘git’, ‘describe’).out.slurp.say 00:43
evalable6
Zoffix e: run(:out, :cwd(‘/tmp/whateverable/moarvm-repo’), ‘git’, ‘describe’, :err).err.slurp.say
evalable6
AlexDaniel that's weird
e: run(:err, :cwd(‘/tmp/whateverable/moarvm-repo’), ‘git’, ‘describe’, :err).err.slurp.say 00:44
evalable6
Zoffix well, I'm just gonna add a `system_or_die('git', 'fetch', '--tags');` and I think that'll avoid this issue in the future and is probably harmless in cases where it isn't needed
AlexDaniel ah it was there…
e: run(:out, :cwd(‘/tmp/whateverable/moarvm-repo’), ‘git’, ‘describe’).out.slurp.say 00:45
evalable6
perlawhi1l Zoffix: Thanks for the help. It still wasn't working but I think I messed up, so just blew away my nqp dir and re-running my alias. should be fine
AlexDaniel shrugs
Zoffix perlawhi1l: hm, ok. I've just pushed the `--fetch` update. 00:47
Zoffix I mean --tags 00:48
Zoffix BTW, figured out my earlier QAST question. Yes, that rogue QAST is rouge, is from the buggy colonpair, and gets there because the colonpair gets compiled in a thing that makes blocks or something and pre-pushes them into the pad... and... *drumroll* yes, nuking that rogue QAST fixed the incorrect warning :) 01:01
Zoffix stresstests the fix
\o
wander HI 02:50
how can perl6 `run` or `shell` be tolerant of bad exit code? 02:51
The spawned command 'diff' exited unsuccessfully (exit code: 1) in block <unit> at -e line 1
although THIS diff fail, I'd like to continue to diff the rest
gist.github.com/W4anD0eR96/9301aef...be52b94ac1 02:52
here is my code, used to be two `shell`, I try to use `run` but cannot workaround 02:53
AlexDaniel wander: just don't do it in sink context 03:08
tusooa failure is an unthrown exception 03:09
AlexDaniel it's not about Failures
it's the Proc object that gets sunk
tusooa well maybe I will need more research on this 03:10
AlexDaniel tusooa: it's a common question actually
and I don't see any docs for it… although I remember that something was written somewhere 03:11
wander workaround it, thank you Alex 03:12
AlexDaniel wander: $ = run …
wander yes
^_^
AlexDaniel wander: wow you're doing something interesting 03:14
AlexDaniel wander: but please don't use ‘shell’ :) (as you immediately get shell injection through $test) 03:15
greppable6: shell\(\" 03:16
greppable6 AlexDaniel, gist.github.com/eb2737834ded5ecd9f...e42863b64d
wander sure it is. it's a long ago when I could even not make code work with `run` :P 03:18
anyway, shell is direct 03:19
AlexDaniel pft… last time I looked `shell` was only used in .t files 03:25
which is something I can close my eyes on
DrForr timotimo: Thanks, nuking. 08:30
At least I've gotten something :) 08:31
Geth modules.perl6.org: dd82fd7987 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/root/help.html.ep
Update info on `from:` search modifier

  - Include "core" tag
  - "cpan" tag is already implemented
12:53
doc: 0ced8615f7 | (Luca Ferrari)++ | doc/Language/control.pod6
Labels can be also applied to 'loop' loops.

State it clearly and provide an example of usage with intra-loop labels.
Close #1691
12:59
synopsebot Link: doc.perl6.org/language/control
mscha m: role Bar { method bar { say "bar: ", self } }; enum Foo <x y z> does Bar; my Foo $f = y; $f.bar; # Shouldn't this work? 13:40
camelia No such method 'bar' for invocant of type 'Foo'
in block <unit> at <tmp> line 1
Zoffix m: role Bar { method bar { say "bar: ", self } }; enum Foo does Bar <x y z> ; my Foo $f = y; $f.bar; 13:45
camelia bar: y
Zoffix I imagine the other variant is an infix `does` that mixes into the list used to make enums out of maybe
mscha Zoffix: thanks! 13:46
Zoffix mscha: prolly worth a ticket to see what the other variant is doing and complain for it. Would you file one? github.com/rakudo/rakudo/issues/new 13:47
mscha Zoffix: sure, I will.
Zoffix mscha++
pmurias do we have a docs page with all the backslash escapes allowed in a string? 13:52
[Coke] docs.perl6.org/language/quoting#In...lation:_qq ? 14:04
mscha m: role Bar { method bar { say "bar: ", self } }; enum Foo does Bar <x y z>; my Foo $f = y; $f.bar; # this works, so ...
camelia bar: y
mscha m: enum Foo does role { method bar { say "bar: ", self } } <x y z>; my Foo $f = y; $f.bar; # ... shouldn't this as well?
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'role'
at <tmp>:1
------> 3enum Foo does role7⏏5 { method bar { say "bar: ", self } } <x
jnthn No 14:09
The does trait parses a typename after it
mscha So is there a way to mixin an anonymous role?
jnthn No, though you can lexically scope a role and then just not export it
mscha OK, thanks. 14:10
jnthn One can mix in an anonymous role with the `does` operator at runtime, but not with the `does` trait at compile time
Geth doc/master: 5 commits pushed by (Luca Ferrari)++ 14:17
Geth doc: 8fd3ee1698 | (Zoffix Znet)++ | doc/Language/quoting.pod6
Document \qq[] escape in `q` quoting docs
14:23
synopsebot Link: doc.perl6.org/language/quoting
buggable New CPAN upload: Scalar-Util-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 14:28
novalinium Is there a way to break a Promise.in? 15:05
raschipi Create another promise that will either keep when the 'in' promise id kept or break when a promise you can break on command is broken. 15:07
jnthn No; typically you'd my $breaker = Promise.new and then use Promise.anyof(Promise.in($seconds), $breaker)
buggable New CPAN upload: epoll-0.1.tar.gz by CTILMES cpan.metacpan.org/authors/id/C/CT/...0.1.tar.gz 15:08
raschipi Yes, what jnthn said.
novalinium Gotcha, so if I wanted to schedule something to either be run ASAP after 10 seconds or be manually triggered earlier I'd use a Promise.anyof to schedule the timeout and call the promise.keep itself early if need be? 15:09
jnthn Yes 15:10
novalinium Elegant! tyty
raschipi Don't forget Promise.then too. 15:11
novalinium So Promise.anyof(Promise.in(TIME).then($breaker), $breaker)? 15:12
jnthn No, you'd put the .then on what anyof returns
novalinium Ah ok
raschipi Promise.anyof(Promise.in(TIME), $breaker).then(TASK)
novalinium Makes more sense now
jnthn :) 15:13
novalinium (I'm writing some radio automation software as a project to learn Perl 6 and the concurrency model is v neat if confusing at times) 15:14
raschipi Reading the docs now, I got .then wrong. It will run the chained promise if the earlier is broken. Is there a way to know if it was kept or broken in the later? 15:15
moritz raschipi: it passes in the promise as the first argument 15:16
novalinium I set the "keep" value of the later promise and check that
moritz m: my $p = Promise.new; $p.then({say .status }); $p.break("foo")
camelia ( no output )
moritz m: my $p = Promise.new; $p.then({say .status }); $p.break("foo"); await $p;
camelia Broken
An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
foo
in block <unit> at <tmp> line 1
moritz m: my $p = Promise.new; $p.then({say .status }); $p.break("foo"); try await $p; 15:17
camelia Broken
raschipi Right, in this case it doesn't make much difference because the promise will always be kept, but it's good to know.
In novalinium's case that is
novalinium ix.io/E1M 15:19
If anyone's interested in some sample of the code
raschipi Very useful to use it as a pipeline too.
novalinium Does anyone here use vim as their editor? 15:21
raschipi I do. 15:22
novalinium Is there a perl6 syntax file?
raschipi Yes
MasterDuke novalinium: yeah, i think it's included by default now 15:23
raschipi It came with mine by default
novalinium Oh awesome! I can enable syntax highlighting then :)
raschipi :set ft? returns filetype=perl6 for me, just tested it. Stock Debian configuration. 15:24
Doesn't work very well but it's trying. 15:25
jkramer Ahoy 16:21
timotimo ahoyhoy 16:22
novalinium hoya
jkramer Quick question: I have a Seq of Seqs of Seqs. How can I remove the outmost Seq so I only iterate over Seqs of Seqs? .flat seems to flatten all the seqs recursively 16:25
novalinium Could you use .map on the outer Seq? 16:26
jkramer Basically I want to do this: 16:27
m: say (^3).combinations(2).map(*.permutations)
camelia (((0 1) (1 0)) ((0 2) (2 0)) ((1 2) (2 1)))
jkramer But iterate over the 6 inner seqs, not the 3 ones with 2 seqs in them each
moritz m: say (^3).combinations(2) 16:29
camelia ((0 1) (0 2) (1 2))
moritz m: say (^3).combinations(2).flat.map(*.permutations)
camelia (((0)) ((1)) ((0)) ((2)) ((1)) ((2)))
jnthn m: say (^3).combinations(2).map(*.permutations.Slip) 16:30
camelia ((0 1) (1 0) (0 2) (2 0) (1 2) (2 1))
moritz jkramer: how about a simple nested loop?
m: for (^3).combinations(2) -> $c { do something with $c.permutations here }
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3> $c { do something with $c.permutations7⏏5 here }
expecting any of:
infix
infix stopper
postfix
statement …
moritz m: for (^3).combinations(2) -> $c { say $c.permutations.join } 16:31
camelia 0 11 0
0 22 0
1 22 1
jnthn m: say (^3).combinations(2).map({ |.permutations }) # arguably prettier alternative
camelia ((0 1) (1 0) (0 2) (2 0) (1 2) (2 1))
jkramer Ah nice, .map(|*.permutations) seems to do the job 16:32
Thanks!
Nested loops work too of course, but this seems nicer
timotimo m: say (^3).combinations(2).permutations 16:34
camelia (((0 1) (0 2) (1 2)) ((0 1) (1 2) (0 2)) ((0 2) (0 1) (1 2)) ((0 2) (1 2) (0 1)) ((1 2) (0 1) (0 2)) ((1 2) (0 2) (0 1)))
novalinium Can I pass a variable into a Promise?
Actually, ignore me
raschipi No
jnthn jkramer: oh, didn't realize | would whatever-curry...nice :) 16:35
moritz if not, you could always .Slip, which does 16:50
buggable New CPAN upload: DB-Pg-0.1.tar.gz by CTILMES cpan.metacpan.org/authors/id/C/CT/...0.1.tar.gz 17:08
comborico1611 Anyone decent with HTML? 17:12
novalinium Sup
comborico1611 Quick question.
Haha.
So, why feature does it add to use scope="row" for <th> 17:13
what feature*
My book didn't mention it, and neither did a quick search. I suppose it is for Javascript? 17:14
novalinium Its an accessibility feature, you can check the WCAG 2 spec
comborico1611 I'm just not seeing the association benefiting anything in pure HTML.
I see. Thanks!
novalinium It baseically makes th semantically better when it isn't in a thead 17:15
novalinium What's the best way to track down the actual location of a "Malformed UTF-8" error 17:44
timotimo like, how far into a given string or file it was?
DrForr From outside perl6? I'd dump it into vim and use '8g8' which jumps to the first malformed UTF-8 byte. 17:45
timotimo whoa, really?
TIL 17:46
geekosaur assuming it really is
how well does that work if the file isn't utf8?
DrForr (TL;DR I have way too much experience at this.)
geekosaur (and vim recognized that)
timotimo fwiw, you can change the file handle to use utf8-c8 instead and that'll allow you to decode broken utf8 and get a string from it that turns back into the original data if you encode it back with utf8-c8, and it'll look funky in the places where invalid utf8 was encountered 17:47
DrForr Dunno if you use other encoding types, but iconv can help there otherwise.
novalinium Hmm, I'm not actually seeing anything from that, I'm not doing any kind of file I/O or mucking about with encodings, I think it might have to do with a HEREDOC, but not sure since its saying line 1 col 38 17:48
DrForr Probably reporting relative to the start of the offending heredoc block thn. 17:49
*then
timotimo but how do you get broken utf8 into source code without the parser immediately complaining? 17:50
rakudo will decode the whole program string right away, i believe?
novalinium: do you get anything if you pass --ll-exception to the perl6 command? 17:51
comborico1611 Lunch!
novalinium timotimo: doesn't seem to make a difference 17:51
It drops into SETTING::src/core/Buf 17:52
timotimo yeah, that'd be the decode method 17:53
where is it called from?
novalinium Trace: ix.io/E26 17:54
AFK
timotimo you're receiving data on a socket and that data's not valid utf8 it looks like
novalinium I'll take a look
Zoffix Kaiepi: FWIW github.com/zoffixznet/z is aimed at core developers. If you're simply looking to *use* Rakudo Perl 6, then you likely want these instructions instead: github.com/zoffixznet/r 18:54
No idea of the instructions work on bsds tho :)
oh, that was meant for #perl6-dev 18:55
Kaiepi i'm interested and learning and developing for as well
Zoffix I need to up my chatlog spying game :)
Kaiepi oh my 18:56
main thing i'm aiiming to do is to get perl6 running smoothly on the bsds 18:59
El_Che Zoffix: sent you a PR for mentioning Alpine packages as well 19:00
Zoffix Merged. Thanks.
El_Che ty 19:01
Kaiepi small, but moarvm should probably not just assume gcc or clang and call that 19:08
when multiple versions can be installed or called something
*else 19:11
raschipi What are they called in BSD? 19:12
geekosaur ports lets you install multiple versions, with version suffixes 19:13
Kaiepi i'm not sure about the name 19:14
buy you can have gcc 5 and gcc4 at the same time
and probably do since the userland has its own out-of-date version 19:15
Kaiepi ohhhh that's where the jdk went 19:15
TimToady still has a fond spot for BSDs, so Kaiepi++ 19:16
Kaiepi <3
El_Che TimToady-approved. What do you want on top of that :) 19:17
Kaiepi /usr/local/jdk
what's with go npm and jdk for doing this 19:18
not like butting the bins and libs where they usually go, just cramming the whole language there
geekosaur for jdk, it;s mostly that it misbehaves if you don't do it the way it expects, which is that
Kaiepi ah 19:19
geekosaur java has never been a wel behaved member of any ecosystem it's installed in 19:19
Kaiepi abstractgenericmemberofsocietyfactory implements oracledelegate 19:21
raschipi Linux distros also can install multiple GCC versions (usually because the kernel requires a specific version), but a link is created to the default.
El_Che Kaiepi: is there a Travis-like service that support BSD's? 19:23
timotimo what, is mac osx not bsd enough for you? :P
El_Che timotimo: if the bsd's can install *.pkg compile on macos, sure! 19:24
Kaiepi i don't think there is 19:25
but that's a great idea
Geth modules.perl6.org: 484ca3d1c3 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | lib/ModulesPerl6/Model/CoreModules.pm
Add Telemetry / snapper to core modules
19:43
sjn Coordinated Universal 19:57
oops :)
o/
El_Che sjn: good coolaid/gajan/coffee there 19:58
geekosaur "it's about time"? 20:04
timotimo .u times 20:49
yoleaux U+2062 INVISIBLE TIMES [Cf] (<control>)
U+2297 CIRCLED TIMES [Sm] (⊗)
U+22A0 SQUARED TIMES [Sm] (⊠)
timotimo u: times
unicodable6 timotimo, U+2062 INVISIBLE TIMES [Cf] (control character)
timotimo, U+2297 CIRCLED TIMES [Sm] (⊗)
timotimo, 646 characters in total: gist.github.com/bbc810c53572d245d7...030de47aa2
buggable New CPAN upload: DB-Pg-0.2.tar.gz by CTILMES cpan.metacpan.org/authors/id/C/CT/...0.2.tar.gz 21:08
buggable New CPAN upload: Scalar-Util-0.0.2.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.2.tar.gz 21:18
buggable New CPAN upload: List-Util-0.0.3.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.3.tar.gz 21:28
lizmat theperlfisher.blogspot.nl/2018/01/a...ively.html # DrForr++ 21:36
Geth doc: a243285ab5 | (Will "Coke" Coleda)++ | doc/Language/control.pod6
fix typo
22:21
doc: 97f1ddef3d | (Will "Coke" Coleda)++ | xt/duplicates.t
default default is a common phrase
synopsebot Link: doc.perl6.org/language/control
doc: 9f0b1bb793 | (Will "Coke" Coleda)++ | xt/code.pws
learn some code
comborico1611 Another cold-spell for Texas. 23:36
jnthn By contrast, winter here is a bit mild for my liking. No snow. 23:37
These things seem unevenly distributed :) 23:38
comborico1611 I definitely prefer a location with actual seasons. Here in Austin, the year just goes by. 23:39