»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
benjikun howdy timotimo 00:57
timotimo howdy
xinming How do we call the same sub or method with arg modified? 05:14
geekosaur manually, unless you are doing dispatching and want to try the next candidate which is callwith or nextwith. to call the exact same sub again there is no mechanism. 05:19
xinming thanks 05:46
m: my @a = ('a' .. 'c'); my @b = (1 .. 3); my @c = @a x @b; @c.perl.say; 05:47
camelia ["a b ca b ca b c"]
xinming In perl6, There is a op to combine @a and @b, what that op is called? so the output will be something like, [a 1
In perl6, There is a op to combine @a and @b, what that op is called? so the output will be something like, [a 1], [a 2], [a 3], [b 1], [b 2], [b 3]... 05:48
not zip
m: my @a = ('a' .. 'c'); my @b = (1 .. 3); my @c = @a zip @b; @c.perl.say;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3a' .. 'c'); my @b = (1 .. 3); my @c = @a7⏏5 zip @b; @c.perl.say;
expecting any of:
infix
infix stopper
postfix
xinming m: my @a = ('a' .. 'c'); my @b = (1 .. 3); my @c = @a y @b; @c.perl.say;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3a' .. 'c'); my @b = (1 .. 3); my @c = @a7⏏5 y @b; @c.perl.say;
expecting any of:
infix
infix stopper
postfix
xinming m: my @a = ('a' .. 'c'); my @b = (1 .. 3); my @c = @a Z @b; @c.perl.say;
camelia [("a", 1), ("b", 2), ("c", 3)]
xinming m: my @a = ('a' .. 'c'); my @b = (1 .. 3); my @c = @a X @b; @c.perl.say; 05:49
camelia [("a", 1), ("a", 2), ("a", 3), ("b", 1), ("b", 2), ("b", 3), ("c", 1), ("c", 2), ("c", 3)]
xinming This is what I want.
I use the x which is wrong
Geth doc: 318d8a89df | (JJ Merelo)++ | doc/Language/101-basics.pod6
Deletes last reference to Perl 5

I have actually left the reference when talking about `use v6`. In fact, it happens to me from time to time, and there's no way to explain what it does other than referencing this.
I agree with @stmuk that it shouldn't be moved. It serves its purpose, which is to serve as an introduction *for anyone*, not for Perl 5 users now that all those references have been eliminated. This closes #2191
08:12
synopsebot Link: doc.perl6.org/language/101-basics
Tison xinming: @array x <rhs> would numify the rhs and repeat @array +<rhs> times 09:21
X is cross meta op IIRC
docs.perl6.org/language/operators#...perator%29
sarna-web m: for 1..3 -> $n {.say} 10:02
camelia (Any)
(Any)
(Any)
sarna-web why doesn't it say "1 2 3"?
sarna-web also, this is weird 10:07
m: for '1'..'9' -> $n {say $n} 10:08
camelia 1
2
3
4
5
6
7
8
9
sarna-web m: for '1'..'10' -> $n {say $n}
camelia 1
sarna-web :D
lizmat m: say "2" cmp "10" # indeed 10:11
camelia More
Geth Pod-To-HTML/master: 6 commits pushed by (Armand Halbert)++, (Jonathan Stowe)++ 10:13
sarna-web m: for '00'..'99' -> $n {say $n}
camelia 00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
5…
sarna-web oh, that works :^)
lizmat m: for '000'..'99' -> $n {say $n} # this doesn't :-) 10:19
camelia 000
xinming m: class A { multi method t (Str $s) { $s.say; }; multi method t (Hash %h) { nextwith (to-json %) } }; A.new.t({}) 10:27
camelia Cannot resolve caller t(A: Hash); none of these signatures match:
(A: Str $s, *%_)
(A: Hash %h, *%_)
in block <unit> at <tmp> line 1
xinming How can we do nextwith on the method?
m: class A { multi method t (Str $s) { $s.say; }; multi method t (Hash %h) { nextwith to-json({}) } }; A.new.t({}) 10:28
camelia Cannot resolve caller t(A: Hash); none of these signatures match:
(A: Str $s, *%_)
(A: Hash %h, *%_)
in block <unit> at <tmp> line 1
xinming m: class A { multi method t (Hash %h) { nextwith to-json({}) }; multi method t (Str $s) { $s.say; }; }; A.new.t({})
camelia Cannot resolve caller t(A: Hash); none of these signatures match:
(A: Hash %h, *%_)
(A: Str $s, *%_)
in block <unit> at <tmp> line 1
xinming m: class A { multi method t (%h) { nextwith to-json({}) }; multi method t (Str $s) { $s.say; }; }; A.new.t({})
camelia ( no output )
xinming m: class A { multi method t (Hash $x) { nextwith to-json($x) }; multi method t (Str $s) { $s.say; }; }; A.new.t({}) 10:29
camelia ( no output )
xinming m: class A { multi method t (Hash $x) { nextwith to-json($x) }; multi method t (Str $s) { $s.say; }; }; A.new.t("{abc}")
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
abc used at line 1. Did you mean 'abs'?
xinming m: class A { multi method t (Hash $x) { nextwith to-json($x) }; multi method t (Str $s) { $s.say; }; }; A.new.t("abc")
camelia abc
xinming m: class A { multi method t (Hash $x) { nextwith to-json($x) }; multi method t (Str $s) { $s.say; }; }; A.new.t(%({}))
camelia ( no output )
xinming m: use JSON::Fast; class A { multi method t (Hash $x) { nextwith to-json($x) }; multi method t (Str $s) { $s.say; }; }; A.new.t({}} 10:29
camelia ===SORRY!===
Could not find JSON::Fast at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6
CompUni…
xinming nextsame 10:32
not nextwith
Need a lot of attention to distinuish all the differences between these
xinming m: ["hello" X [1..5]].perl.say; 11:14
camelia [("hello", 1), ("hello", 2), ("hello", 3), ("hello", 4), ("hello", 5)]
xinming m: (["hello" X [1..5]].map: .hash).perl.say; 11:15
camelia Cannot map a Array to a Hash.
Did you mean to add a stub ({...}) or did you mean to .classify?
in block <unit> at <tmp> line 1
xinming m: (["hello" X [1..5]].map: *.hash).perl.say;
camelia ({:hello(1)}, {:hello(2)}, {:hello(3)}, {:hello(4)}, {:hello(5)}).Seq
thundergnat m: ("hello" X=> [1..5]).perl.say; 11:31
camelia (:hello(1), :hello(2), :hello(3), :hello(4), :hello(5)).Seq
mscha m: my SetHash $foo; for ^250_000 { $foo{$_} = True; }; say now - INIT now; 11:48
camelia 3.2284417
mscha m: my %foo{Int}; for ^250_000 { %foo{$_} = True; }; say now - INIT now;
camelia 0.8601462
mscha m: 'my %foo; for ^250_000 { %foo{$_} = True; }; say now - INIT now; 11:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1)
at <tmp>:1
------> 3 %foo{$_} = True; }; say now - INIT now;7⏏5<EOL>
expecting …
mscha m: my %foo; for ^250_000 { %foo{$_} = True; }; say now - INIT now;
camelia 0.3908848
mscha Conclusion: using a SetHash is *much* slower than using a regular hash. 11:48
In addition, using a (regular) hash with Int keys is slower than using a hash with default string keys. 11:49
xinming termbin.com/qsdk <--- Anyone here tells me why will this method always ROLLBACK when I use txn-do: ? 13:11
I check the pg log, I found it always call ROLLBACK instead of COMMIT 13:12
Where I do wrong?
the True in sink context in LEAVE phasers are just testing.
the $! returns Nil always. 13:13
xinming but somehow, the UNDO block is always processed. 13:13
I just now find the problem, maybe this is a bug, or someone can explain this for me? termbin.com/r43u 13:23
jnthn xinming: UNDO and REDO care about the result that the block they're in evaluates to 13:27
When you return, you throw a control exception, which means you exit the nested block with an undefiend value, which triggers UNDO
jnthn Solution: don't write `return`, or put the UNDO/KEEP at the sub level 13:29
xinming Does that mean we can't return "value"?
a little confused how the logic is 13:30
jnthn Sure, you just need your UNDO/REDO at the level of the sub 13:31
jnthn Then they'll examine the sub's return value 13:31
xinming termbin.com/qsdk <--- What about this?
jnthn Exactly the same situation, no? 13:32
xinming jnthn: for the return part, I'm thinking how these can be better solved 13:32
the method txn-do
jnthn Oh, you want the early return
xinming jnthn: Yes, if we have early return, how this can be fixed? 13:33
jnthn Just remove the second return, and use an implicit return
xinming If we early return, the KEEP will be executed, and then, we got result commited.
jnthn So the block has the correct result
Or if you don't like that, factor the second part out into another sub
xinming If the LEAVE last statement return False, Will it cause UNDO to be run? 13:36
I found that if i have LEAVE statement in txn-do method, It'll still go to UNDO 13:37
Zoffix PSA: we modified perl6 GitHub org perms a bit. Default org perm was Write and has been reduced to Read. Any new repo now will need you to add `perl6` team to it with write perms, if you want regular members of the or to be able to write to it. The nqp repo has been excluded from the `perl6` default team. To add new committers to `nqp` repo, add them to `nqp` team. If you used to be a contributor to nqp and now 13:53
lost your access, ping one of the org admins and we'll be able to add you back
s/of the or to/of the org to/; 13:57
pochi "MoarVM panic: Internal error: zeroed target thread ID in work pass" 14:31
what does this mean?
AlexDaniel pochi: most likely a bug, although it somewhat depends on what you were doing 14:58
xinming m: my %x = ("a", "b"); sub t ( %h) { %h.perl.say }; t ({ |%^C :a("b") }); 15:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of %^C variable
at <tmp>:1
------> 3; sub t ( %h) { %h.perl.say }; t ({ |%^C7⏏5 :a("b") });
xinming m: my %x = ("a", "b"); sub t ( %h) { %h.perl.say }; t ({ |%x, :a("b") });
camelia Type check failed in binding to parameter '%h'; expected Associative but got Block (-> ;; $_? is raw { #`...)
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
xinming m: my %x = ("a", "b"); sub t ( %h) { %h.perl.say }; t ({ %x, :a("b") }); 15:28
camelia {:a("b")}
xinming m: my %x = ("x", "y"); sub t ( %h) { %h.perl.say }; t ({ %x, :a("b") });
camelia {:a("b"), :x("y")}
xinming m: sub h () { my %x = ("a", "b") }; sub t ( %h) { %h.perl.say }; t ({ h(), :a("b") }); 15:29
camelia Type check failed in binding to parameter '%h'; expected Associative but got Block (-> ;; $_? is raw { #`...)
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
xinming How do we force { } to be a hash in this case?
samcv AlexDaniel: i'm working on github.com/rakudo/rakudo/issues/2198 right now 15:30
yoleaux 10 Aug 2018 18:56Z <AlexDaniel> samcv: GH#2198
synopsebot GH#2198 [open]: github.com/rakudo/rakudo/issues/2198 [UNI][regression] The Regional Indicator Symbols seem to get mangled when flipped sometimes
AlexDaniel cool!
xinming m: sub h () { my %x = ("a", "b"); %x }; sub t ( %h) { %h.perl.say }; t {(h(), :a("b"))};
camelia Type check failed in binding to parameter '%h'; expected Associative but got Block (-> ;; $_? is raw { #`...)
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
jmerelo samcv++ 15:32
xinming m: sub h () { my %x = ("a", "b"); %x }; sub t ( %h) { %h.perl.say }; t {:a("b"), h}; 15:36
camelia {:a("b")}
xinming m: sub h () { my %x = ("x", "y"); %x }; sub t ( %h) { %h.perl.say }; t {:a("b"), h};
camelia {:a("b"), :x("y")}
xinming m: sub h () { my %x = ("a", "c", "x", "y"); %x }; sub t ( %h) { %h.perl.say }; t {:a("b"), h}; 15:37
camelia {:a("c"), :x("y")}
xinming m: sub default () { my %x = ("a", "c", "x", "y"); %x }; sub t ( %h) { %h.perl.say }; t {default, :a("b") };
camelia Type check failed in binding to parameter '%h'; expected Associative but got Block (-> ;; $_? is raw { #`...)
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
xinming m: sub default () { my %x = ("a", "c", "x", "y"); %x }; sub t ( %h) { %h.perl.say }; t { %(default), :a("b") };
camelia Type check failed in binding to parameter '%h'; expected Associative but got Block (-> ;; $_? is raw { #`...)
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
xinming In my case, is there a way to force the "block" to be hash? 15:40
xelak m: my $p=Proc::Async.new("xxxx"); await $proc.start; CATCH { default {say "caught!"}} 15:43
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$proc' is not declared. Did you mean 'Proc'?
at <tmp>:1
------> 3my $p=Proc::Async.new("xxxx"); await 7⏏5$proc.start; CATCH { default {say "caugh
xelak m: my $p=Proc::Async.new("xxxx"); await $p.start; CATCH { default {say "caught!"}} 15:43
camelia caught!
xelak m: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; CATCH { default {say "caught!"}} 15:47
camelia caught!
xelak m: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}} 15:50
camelia caught!
Herby o/ 15:57
xelak m: my $p=Proc::Async.new("/bin/sh echo 42; echo 100 >&2"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}} 15:59
camelia caught!
xelak m: my $p=Proc::Async.new("/bin/sh echo 42; echo 100 >&2"); $p.Supply.act: { .print }; await $p.start;
camelia Proc::Async is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
timotimo try with p6: instead
xelak p6: my $p=Proc::Async.new("/bin/sh echo 42; echo 100 >&2"); $p.Supply.act: { .print }; await $p.start; 16:00
camelia Proc::Async is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
AlexDaniel you mean e: ?
e: my $p=Proc::Async.new("/bin/sh echo 42; echo 100 >&2"); $p.Supply.act: { .print }; await $p.start;
evalable6 (exit code 1) Unhandled exception in code scheduled on thread 4
Cannot invoke this object (REPR: Null; VMNull)
xelak e: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}} 16:01
evalable6 (exit code 1) Unhandled exception in code scheduled on thread 4
Cannot invoke this object (REPR: Null; VMNull)
xelak e: my $p=Proc::Async.new("xxxx"); await $p.start; CATCH { default {say "caught!"}} 16:02
evalable6 caught!
xelak e: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}}
evalable6 (exit code 1) Unhandled exception in code scheduled on thread 4
Cannot invoke this object (REPR: Null; VMNull)
AlexDaniel well, hmm… the shell example should be like this
e: my $p=Proc::Async.new("/bin/sh", "-c", "echo 42; echo 100 >&2"); $p.Supply.act: { .print }; await $p.start 16:03
evalable6 42
100
xelak But how can I catch the exception?
AlexDaniel and it dies correctly in this case:
m: $p=Proc::Async.new("xxxxxxx"); await $p.start
camelia Proc::Async is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
AlexDaniel e: $p=Proc::Async.new("xxxxxxx"); await $p.start
evalable6 (exit code 1) Cannot assign to an immutable value
in block <unit> at /tmp/W_zAK07tga line 1
AlexDaniel e: my $p=Proc::Async.new("xxxxxxx"); await $p.start
evalable6 (exit code 1) An operation first awaited:
in block <unit> at /tmp/x3QaCgKJXR line 1

Died with the exception:
no such file or directory
16:04
AlexDaniel ↑ that's correct
xelak e: $p=Proc::Async.new("xxxxxxx"); await $p.start; CATCH { default {say "caught!"}}
evalable6 caught!
AlexDaniel e: my $p=Proc::Async.new("xxxxxxx"); react { whenever $p.stdout { .print }; whenever $p.start { say "proc finished" } }
evalable6 (exit code 1) An operation first awaited:
in block <unit> at /tmp/U37WgiZjPk line 1

Died with the exception:
no such file or directory
in block <unit> at /tmp/U37WgiZjPk line 1
AlexDaniel this is also fine ↑ 16:05
xelak e: $p=Proc::Async.new("xxxxxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}}
evalable6 caught!
AlexDaniel e: my $p=Proc::Async.new("xxxxxxx"); react { whenever $p.stdout { .print }; whenever $p.start { say "proc finished" } }; CATCH { default { say "caught!" } } 16:06
evalable6 caught!
AlexDaniel isn't it a bit weird that the exception is thrown outside the react block?
xelak e: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}}
evalable6 (exit code 1) Unhandled exception in code scheduled on thread 4
Cannot invoke this object (REPR: Null; VMNull)
xelak e: $p=Proc::Async.new("xxxxxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}} 16:07
evalable6 caught!
xelak e: $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}} 16:08
evalable6 caught!
jnthn Hm, that "cannot invoke this object" is a bit odd 16:10
Geth perl6.org: de50d50978 | (Steve Mynott)++ | source/downloads/index.html
mention 2018.06.1 released to fix Windows/Linenoise
jnthn e: $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"; sleep 1}} 16:11
evalable6 caught!
jnthn e: $p=Proc::Async.new("xxxx"); $p.stdout.act: { .print }; await $p.start; CATCH { default {say "caught!"; sleep 1}} 16:12
evalable6 caught!
xelak e: my $p=Proc::Async.new("xxxx"); $p.Supply.act: { .print }; await $p.start; CATCH { default {say "caught!"}}
evalable6 (exit code 1) Unhandled exception in code scheduled on thread 4
Cannot invoke this object (REPR: Null; VMNull)
16:13
xelak So, what happend here? 16:14
jnthn It's not entirely clear, but --ll-exception makes it look like a null code object was stuffed into the scheduler's queue 16:15
samcv AlexDaniel: fixing some issues with join as well with regional indicators I discovered 16:16
xelak e: my $p=Proc::Async.new("/bin/sh", "-c", "echo '42'; echo '100' >&2"); $proc.Supply.act: { .print }; await $proc.start; 16:20
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/FTtAXOBXNb
Variabl…
xelak, Full output: gist.github.com/d1d8f3ebe279654b2f...4482ca929e
xelak my $p=Proc::Async.new("/bin/sh", "-c", "echo '42'; echo '100' >&2"); $p.Supply.act: { .print }; await $p.start; 16:21
evalable6 42
100
plutes thanks 16:36
jdv79 why'd i just get "subscribed" to 10 seemingly random "perl6 repos"? 16:39
stmuk I think there have been admin changes to "perl6" repos 16:42
timotimo access for nqp repos has been shuffled around, so you probably got removed in one step and added in another
xelak e: for ^10 -> $i { my $p = Proc::Async.new(<<"$*EXECUTABLE" -e "say 42; note 100">>); my $s = $p.Supply(:bin); my $c = $s.Channel; my $o = IO::Pipe.new(:on-read({(try $c.receive) // buf8}), :on-close({$c.close})); await $p.start; say "Failed ($i)" if set($o.lines) !eqv set('42', '100'); } 16:51
evalable6
xelak e: for ^20 -> $i { my $p = Proc::Async.new(<<"$*EXECUTABLE" -e "say 42; note 100">>); my $s = $p.Supply(:bin); my $c = $s.Channel; my $o = IO::Pipe.new(:on-read({(try $c.receive) // buf8}), :on-close({$c.close})); await $p.start; say "Failed ($i)" if set($o.lines) !eqv set('42', '100'); } 16:52
evalable6
xelak e: for ^50 -> $i { my $p = Proc::Async.new(<<"$*EXECUTABLE" -e "say 42; note 100">>); my $s = $p.Supply(:bin); my $c = $s.Channel; my $o = IO::Pipe.new(:on-read({(try $c.receive) // buf8}), :on-close({$c.close})); await $p.start; say "Failed ($i)" if set($o.lines) !eqv set('42', '100'); } 16:53
evalable6
Zoffix . 16:53
yoleaux 16:15Z <stmuk> Zoffix: can you please fix rakudo.org to point to R* source/windows 2018.06.1 (note Mac DMG version unchanged). I don't seem to have access anymore
Zoffix AlexDaniel: so looks like a bunch of repos didn't have any teams assigned to them and now people ain't got access to them. Any tips to get perl6 team assigned to all(?) repos (except for nqp)? 16:54
Geth rakudo.org: 0ad12624a6 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/files.html.ep
List 2018.06.1 for Windows
16:56
rakudo.org: 373d08f1f5 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/files.html.ep
List 2018.06.1 for source
16:57
AlexDaniel Zoffix: there are 69 repos in total and 54 are configured for write access 16:58
so we just have to configure the remaining 15…
how do we find them though :)
xelak e: for ^100 -> $i { my $p = Proc::Async.new(<<"$*EXECUTABLE" -e "say 42; note 100">>); my $s = $p.Supply(:bin); my $c = $s.Channel; my $o = IO::Pipe.new(:on-read({(try $c.receive) // buf8}), :on-close({$c.close})); await $p.start; say "Failed ($i)" if set($o.lines) !eqv set('42', '100'); } 17:00
AlexDaniel and how much faster would it be to check them one by one, heh…
evalable6 (signal SIGHUP) «timed out after 10 seconds»
xelak e: for ^50 -> $i { my $p = Proc::Async.new(<<"$*EXECUTABLE" -e "say 42; note 100">>); my $s = $p.Supply(:bin); my $c = $s.Channel; my $o = IO::Pipe.new(:on-read({(try $c.receive) // buf8}), :on-close({$c.close})); await $p.start; say "Failed ($i)" if set($o.lines) !eqv set('42', '100'); }
evalable6
stmuk BTW if anyone chocolatey related is here .. the choco star needs bumping too .. (I just tweeted at briandfoy anyway)
timotimo could bdf have something to do with that? 17:02
stmuk yes its the three at the bottom of chocolatey.org/packages/rakudostar 17:03
AlexDaniel Zoffix: ok I'm doing it manually and I'll probably finish in 5 mins
Zoffix AlexDaniel++ # thanks
AlexDaniel dammit, 68 out of 69 17:08
AlexDaniel I missed one :D 17:08
ah, I know which one
Zoffix: done, 69 out of 69 17:09
Zoffix sweet
AlexDaniel I wonder how many email notifications I generated this time
Zoffix #yolo 17:10
AlexDaniel Zoffix: fwiw github.com/rakudo/rakudo/issues/21...-412356255
let me know if you can run it
AlexDaniel if not I can do it too of course, but maybe not today 17:10
Zoffix AlexDaniel: yeah, I can run it 17:11
AlexDaniel “[GitHub] Subscribed to 7 perl6 repositories” whew
it was smart enough not to send 7 emails 17:12
although it feels like soon I'll get another one about the remaining 8 repos
Zoffix MUAHAHA 17:13
Zoffix waits for ssh actually to connect
c'mon, don't hold out on me bruh 17:14
I'm in :D 17:15
AlexDaniel: look what I'm gonna toast on :D i.imgur.com/vzdyEap.png 17:16
160 cores 3.8 Terra byte sof RAM
AlexDaniel Zoffix: omg… so how can I get that? I mean, I think I'm even running out of the initial google cloud bonus…
which is a good motivation for me to optimize toaster, right :) 17:17
Zoffix I dunno, I had to request quota increase to even boot this thing 17:17
AlexDaniel also, I'm thinking about integrating some bisection logic right into toaster
Zoffix And it's expensive AF... like $17/h or something
AlexDaniel Zoffix: but they didn't give you any extra free credit?
Zoffix I already used it up long time ago 17:18
Well, it lasts only X months I think and I already past that point
AlexDaniel it's my last month I think and I have like 30€ left
Zoffix uhhh 17:37
oh ok, toaster crashed 'cause the disk is just full *phew* 17:38
Geth perl6.org: a237d2d5ea | (Steve Mynott)++ | source/downloads/index.html
Revert "mention 2018.06.1 released to fix Windows/Linenoise"

This reverts commit de50d50978a7c19aaea2e1e35970dff2dec037e5.
17:54
rakudo.org: e399d54ae8 | (Steve Mynott)++ | templates/files.html.ep
Revert "List 2018.06.1 for Windows"

This reverts commit 0ad12624a6735e5507b97929a5fcc6409c1b5ba5.
17:56
rakudo.org: a5b036377d | (Steve Mynott)++ | templates/files.html.ep
Revert "List 2018.06.1 for source"

This reverts commit 373d08f1f574c611ab623ade37751dee01cf10be.
Zoffix fuksake "Command terminated by signal 11" 18:10
may as well have run it on my 24-core box *eyeroll* 18:12
Xliff Don't you mean 24-thread? 18:24
:)
When did you get THAT beast? I assembled a 20-core machine back in late May 18:25
Xliff i.imgur.com/vzdyEap.png :-O 18:27
Zoffy. Share tha luv, bruv! Where can I get access to one of those? 18:28
m: sub a { say "A" }; &("a"); 18:29
camelia ( no output )
Xliff m: sub a { say "A" }; &{"a"};
camelia ( no output )
Xliff m: sub a { say "A" }; &"a";
camelia 5===SORRY!5=== Error while compiling <tmp>
Name must begin with alphabetic character
at <tmp>:1
------> 3sub a { say "A" }; &7⏏5"a";
expecting any of:
infix
infix stopper
statement end
stat…
Xliff m: sub a { say "A" }; my $a = "a"; &($a) 18:30
camelia ( no output )
Xliff m: sub a { say "A" }; my $a = "a"; &($a)()
camelia No such method 'CALL-ME' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Xliff m: sub a { say "A" }; my $a = "a"; &{$a}()
camelia ( no output )
Xliff ?!?
&::("a")
m: sub a { say "A" }; my $a = "a"; &::("a")
camelia ( no output )
Xliff m: sub a { say "A" }; my $a = "a"; say &::("a")
camelia &a
Xliff m: sub a { say "A" }; my $a = "a"; &a; 18:31
camelia WARNINGS for <tmp>:
Useless use of &a in sink context (line 1)
Xliff m: sub a { say "A" }; my $a = "a"; a;
camelia A
Xliff m: sub a { say "A" }; my $a = "a"; ::("a") 18:32
camelia No such symbol 'a'
in block <unit> at <tmp> line 1
Xliff m: sub a { say "A" }; my $a = "a"; ::("&a")
camelia ( no output )
Xliff m: sub a { say "A" }; my $a = "a"; "&a"; 18:32
camelia WARNINGS for <tmp>:
Useless use of constant string "&a" in sink context (line 1)
MasterDuke Xliff: he's using google compute engine (or whatever it's called) 18:33
Xliff Ooo 18:34
MasterDuke++
OK, so if I have $a = "a" and sub a(); how can I call sub a() using $a?
moritz &::($a)() 18:35
Xliff I could have sworn I tried that.
m: sub a { say "A" }; my $a = "a"; &::($a)()
camelia A
Xliff Oh fizzlesticks.
Zoffix Xliff: no, 24-core 18:36
Xliff: you can get access to Google Compute Engine
regreg hello, i want to learn a scripting language (but not python), what should i learn? perl5 or perl6?
Zoffix regreg: perl6
regreg is perl6 more future-proof? 18:37
Zoffix regreg: yup: marketing.perl6.org/id/1531540189/any
regreg i'm a C programmer if matters
Zoffix We got NativeCall too. Lets you use C libraries fairly easily: docs.perl6.org/language/nativecall 18:38
Just had a program running on 160 cores: pbs.twimg.com/media/Dkaoat3WwAAjRyM.jpg 18:39
Sounds like what a future-proof lang would do to me :)
regreg i'm interested in a side-project using llvm to write a JIT, or is the default moar perl6 jit good enough and would be a waste of time on my side?
Zoffix regreg: dunno, I think #moarvm folks would be more capable to answer that. 18:40
regreg i see, there is a moarvm channel
Zoffix regreg: person named brrt in particular. They're the moarvm JIT expert 18:41
regreg i see.. thanks 18:41
Ulti regreg: there are a couple of projects targetting other VMs/langs like graalvm and javascript 18:43
regreg i'm interested into writing a linux kernel replacement in a more productive language even if that means less performance 18:44
so i need a good jit
Zoffix .tell AlexDaniel well, I tried toasting twice but looks like the 160-core toaster segfaults after some time (toaster itself runs on an older rakudo, not on HEAD). Kinda annoyed with it now and don't wanna re-toast on my 64-core box. Here are the partial results: toaster.perl6.party/
yoleaux Zoffix: I'll pass your message to AlexDaniel.
AlexDaniel .
yoleaux 18:44Z <Zoffix> AlexDaniel: well, I tried toasting twice but looks like the 160-core toaster segfaults after some time (toaster itself runs on an older rakudo, not on HEAD). Kinda annoyed with it now and don't wanna re-toast on my 64-core box. Here are the partial results: toaster.perl6.party/
Zoffix regreg: in that case perl6 might be a bad choice. First stable release was like 2.5 years ago and performance currently ain't that great. Still tons of work to do. 18:45
Unless of course you want to help us out make MoarVM faster in the process of writing the linux thing :D
regreg Zoffix, is perl6 the hightest level language around? i don't care that much about performance 18:46
Zoffix regreg: no idea. Not really a conosseiur of languages.
regreg hmm
i like that perl6 has multimethods
Zoffix :) 18:47
AlexDaniel: maybe partial results ain't useful at all actually, because normally it re-toasts failures once, but in those results it didn't get to that stage 18:48
AlexDaniel Zoffix: I know… I hope I'll get some time next month to make toaster even fancier
Zoffix: because, for example, is there really any need to install any module more than once?
Zoffix mhm 18:49
AlexDaniel that could cut most of the run time, I think
I mean, if n-installing is eliminated :)
and then, there's github.com/perl6/whateverable/wiki/Shareable
so we don't necessarily have to build rakudo at all, just take the tar. And if the module fails, take another one… and keep doing until bisected :) 18:50
also, if that eliminates toaster flops (it should), then we can run tests of each module more than once 18:51
and give them “flopper” status if we find that
but yeah… I'm slightly overloaded with all kinds of project… mmm… I wish somebody else contributed that :) 18:52
projects*
*hint-hint* #perl6 :)
Zoffix That reminds me
AlexDaniel right 18:53
also I'd be glad to give away pretty much any project of mine. Squashathons are up for grabs, whateverable too 18:58
AlexDaniel not because I don't want to work on these perl6-related things, it's just because I want to work on *other* perl6-related stuff :) 18:58
lizmat . 19:10
xinming If an @array is iterable, After we use for @array -> $item { } Will the @array result be cached the second time we call for @array -> $item { } ??? 19:49
moritz xinming: yes 19:50
arrays can be lazy, but they store once-evaluated values
m: my @a = 1, 1, -> $a, $b { my $r = $a + $b; say "calculating $r" } ... *; say @a[5]; say @a[4] 19:51
camelia calculating 2
calculating 2
calculating 2
calculating 2
True
True
moritz m: my @a = 1, 1, -> $a, $b { my $r = $a + $b; say "calculating $r"; $r } ... *; say @a[5]; say @a[4] 19:52
camelia calculating 2
calculating 3
calculating 5
calculating 8
8
5
xinming Thanks
xinming m: (15.4 % 2).perl.say; 20:04
camelia 1.4
xinming What is the operator called to return the 14 instead of remainder? 20:05
jnthn m: (15.4 div 2).perl.say 20:10
camelia Cannot resolve caller infix:<div>(Rat, Int); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
jnthn oh, wait, not that one :)
m: (15.4 / 2).floor.perl.say
camelia 7
jnthn Oh, gah, that isn't it either
hah :)
jnthn wonders if there is an operator for that...
tobs I don't think so, been looking at the table 20:11
xinming There is one IIRC
because I read the doc a month ago, I have the impression for that, I just forgot
I'll look again.
timotimo m: say 15.4.round(2) 20:12
camelia 16
timotimo m: say 15.4.floor(2)
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
timotimo hm, that could conceivably have that parameter
b2gills regreg: With the SLang feature, Perl 6 is the superset of all programming languages. (It is not part of the spec yet, but does work in Rakudo) 20:22
regreg b2gills, what does SLang do?
timotimo basically lets you change or completely replace the parser for a given scope 20:23
xinming I know when can have something like, my @a; my $iter = sub { @a[$++]; }; for @b { my $item = $iter(); ... }; 20:29
Is there something better idiom in perl6 for this?
timotimo you can @a[$++] xx 10 20:30
m: my @a = <a b c x y z g h i>; .say for @a[$++] xx @a;
camelia a
b
c
x
y
z
g
h
i
timotimo ^- using @a as the RHS of xx will use its length 20:31
xinming I mean the $iter thing
timotimo but there's also .iterator and .pull-one
xinming not the xx thing.
I'll check about .iterator
timotimo m: my @a = <1 2 3 4 5>; my $iter = @a.iterator; for ^10 { say $iter.pull-one }
camelia 1
2
3
4
5




jnthn Maybe see also gather/take
xinming pull-one is what I want. 20:32
b2gills It seems as if you are trying to do iterators like you would in Python. 20:33
xinming I never used python :-)
This is how I do something in perl5 20:34
timotimo fwiw, your code also works as you wrote it, doesn't it?
you may want to have a make-iter sub that returns that sub you have in your code
so that you can "start from the beginning" if you want
xinming timotimo: I know that'll work, Just try to do it the perl6 way. 20:35
jnthn The Perl 6 ways is almost never to call pull-one yourself :)
timotimo you can use Seq, either @a.Seq or Seq.from-iterator 20:36
jnthn I can think of like 1 or 2 times in all the (non-core) Perl 6 I've written when it was the best way to do something :)
timotimo and loop over that
jnthn Indeed, typically one has a Seq or some other iterable data source and just does a `for` or `map` or one of the numerous other list processing methods
xinming timotimo: Can you please give an example of @a.Seq? 20:39
b2gills A Seq is just a wrapper around an Iterator
m: my @a = 1,2,3,4; for @a.Seq { .say } 20:40
camelia 1
2
3
4
b2gills m: my @a = 1,2,3,4; {my \iterator = @a.Seq.iterator; loop {m\ } } 20:41
camelia 5===SORRY!5=== Error while compiling <tmp>
Use of a closing delimiter for an opener is reserved
at <tmp>:1
------> 3y \iterator = @a.Seq.iterator; loop {m\ 7⏏5} }
b2gills m: my @a = 1,2,3,4; {my \iterator = @a.Seq.iterator; loop {my \pulled = iterator.pull-one; last if pulled =:= IterationEnd; pulled.say } } 20:42
camelia 1
2
3
4
b2gills I prefer `for @a.Seq { .say }` over that last one, there is a lot less to get wrong 20:43
Also there is `.grep` and `.map` that works on Seq 20:44
jnthn for @a.Seq { } is just a longer way to write for @a { } though :)
xinming m: say 15.4.floor(2) 20:45
camelia Too many positionals passed; expected 1 argument but got 2
in block <unit> at <tmp> line 1
xinming m: say 15.4.floor;
camelia 15
timotimo fwiw
m: say (15.4 - 1).round(2)
camelia 14
timotimo ^- that's just like how you can turn round into floor by subtracting 0.5 from anything
xinming actually, I'm trying to get 15.4 ? 3 return's 15 20:46
timotimo m: say (15.4 - 1.5).round(3)
camelia 15
xinming 15.4 - (15.4 % 3)
m: 15.4 - (15.4 % 3)
camelia WARNINGS for <tmp>:
Useless use of "-" in expression "15.4 - (15.4 % 3)" in sink context (line 1)
xinming m: (15.4 - (15.4 % 3)).say;
camelia 15 20:47
xinming m: (15.4 - (15.4 % 2)).say
camelia 14
xinming I'm thinking wether there is op for this.
:-)
IIRC, there is one already.
b2gills m: say pi.round( 0.0001 )
camelia 3.1416
b2gills m: say 15.round(7) 20:49
camelia 14
Xliff m: my $a = 15.4; say ($a - ($a % 3)).round(3) 22:15
camelia 15
Xliff That way you don't need the naked 1.4
m: my $a = 16.6; say ($a - ($a % 3)).round(3)
camelia 15
Xliff xinming ^^
You can turn that into a sub fairly easily. 22:16
m: sub infix:<div2> ($a, $b) { ($a - ($a % $b)).round($b) }; (16.6 div2 3).say 22:17
camelia 15
Summertime m: say ('x-0'..*)[20]; say ('x0'..*)[20]; 22:18
camelia x-20
z0
Geth doc: 3859d61375 | Coke++ | doc/Language/101-basics.pod6
whitespace
22:32
synopsebot Link: doc.perl6.org/language/101-basics
CGML7 8,8 0,0 1,1 0,0 8,8 22:50
8,8 0,0 1,1 0,0 1,1 0,0 8,8
8,8 0,0 12,12 8,8
8,8 12,12 0,0 12,12 8,8
CGML7 8,8 12,12 0,0 12,12 8,8 22:50
8,8 12,12 0,0 12,12 8,8
8,8 12,12 1,1 12,12 0,0 12,12 8,8
8,8 12,12 1,1 12,12 0,0 12,12 8,8
8,8 12,12 0,0 12,12 8,8
8,8 12,12 11,11 12,12 1,1 12,12 8,8
8,8 12,12 1,1 12,12 11,11 0,0 11,11 12,12 1,1 12,12 8,8
8,8 12,12 1,1 12,12 11,11 12,12 1,1 12,12 22:51
8,8 12,12 1,1 12,12 11,11 0,0 11,11 12,12 1,1 12,12
8,8 12,12 1,1 12,12 11,11 12,12 1,1 12,12
1,0 kloeri: and I'm tired of you guys
1,0 thinking you can ban staff
1,0 when we complain about your spam
Xliff m: say ('x0'..*)[^5]; 22:55
camelia (x0 x1 x2 x3 x4)
Xliff m: say ('x0'..*)[^14];
camelia (x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 y0 y1 y2 y3)
Xliff m: say 16.6 div 3 22:56
camelia Cannot resolve caller infix:<div>(Rat, Int); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
Xliff m: say (16.6 div 3) 22:56
camelia Cannot resolve caller infix:<div>(Rat, Int); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
Xliff m: say (16.6 / 3)
camelia 5.533333
Xliff m: say (16.6 / 3).floor
camelia 5
Xliff m: say (16.6 % 3)
camelia 1.6
Xliff m: say (16.6 % 3.0) 22:57
camelia 1.6
Xliff m: say (16.6 div 3.0)
camelia Cannot resolve caller infix:<div>(Rat, Rat); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
Xliff m: say ((16.6).Rat div 3.Rat) 22:58
camelia Cannot resolve caller infix:<div>(Rat, Rat); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
Xliff m: my Rat $a = 16.6; my Rat $b = 3; say ($a div $b) 22:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot assign a literal of type Int (3) to a variable of type Rat. You can declare the variable to be of type Real, or try to coerce the value with 3.Rat or Rat(3), or just write the value as 3.0
at <…
Xliff m: my Rat $a = 16.6; my Rat $b = 3.0; say ($a div $b)
camelia Cannot resolve caller infix:<div>(Rat, Rat); none of these signatures match:
(Int:D \a, Int:D \b)
(int $a, int $b --> int)
in block <unit> at <tmp> line 1
Xliff m: say 15 div 3;
camelia 5
Xliff Why doesn't div coerce FP types to Init? 22:59
s/Init/Int