»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:06 skids left 00:07 skids joined 00:15 tt_ joined 00:17 tt_ left 00:19 von_cheam left 00:22 comborico left 00:26 konsolebox_ left 00:27 konsolebox joined 00:28 pierre joined 00:32 jeromelanteri joined 00:38 pharv joined 00:42 pharv left 00:54 sabayonuser joined 00:55 jeromelanteri left
SmokeMachine m: { CATCH { default {"HERE"} }; ::("bla") } 01:04
camelia No such symbol 'bla'
in block <unit> at <tmp> line 1
SmokeMachine should it die? 01:05
jnthn m: try { CATCH { default {"HERE"} }; ::("bla") } 01:10
camelia ( no output )
jnthn m: { use fatal; CATCH { default {"HERE"} }; ::("bla") }
camelia ( no output )
jnthn If you don't use one of those two, the Failure will escape the block (since it's the block's return value) and thus explode in the program mainline, which is not covered 01:11
(try implies `use fatal` inside of the block it's covering)
01:12 Kaiepi left
SmokeMachine m: { use fatal; CATCH { default {say "HERE"} }; ::("bla") } 01:14
camelia HERE
SmokeMachine thanks!
01:15 Kaiepi joined 01:16 Xliff_ joined, Xliff left
skids you can also sink it if "use fatal" is too much. 01:20
{ CATCH { default {"HERE".say} }; my $a = 42; my $b; sink $b = ::("\$a"); $b }().perl.say
evalable6 42
skids m: { CATCH { default {"HERE".say} }; my $a = 42; my $b; sink $b = ::("blah"); $b }().perl.say 01:21
camelia HERE
Nil
skids m: { CATCH { default {"HERE".say} }; my $a = 42; my $b; $b = ::("blah"); $b }().perl.say
camelia Failure.new(exception => X::NoSuchSymbol.new(symbol => "blah"), backtrace => Backtrace.new)
01:25 konsolebox left 01:27 konsolebox joined 01:43 pierre left
buggable New CPAN upload: HTML-Canvas-0.0.3.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...0.3.tar.gz 01:44
01:51 sabayonuser left 01:54 kurahaupo_ joined 01:57 kurahaupo left 01:58 _kristian left 02:14 pierre joined 02:18 pierre left 02:22 konsolebox left 02:25 konsolebox joined 02:33 wamba left 02:40 shinobi-cl left 02:46 ilbot3 left, pharv joined 02:50 pharv left 02:56 ilbot3 joined 02:58 ChanServ sets mode: +v ilbot3 03:16 konsolebox left 03:17 konsolebox joined, ufobat___ joined 03:20 pierre joined 03:21 ufobat_ left 03:25 pierre left 03:38 pharv joined 03:42 pharv left 04:28 xtreak joined 04:32 xtreak left 04:43 dct_ joined 04:44 circ-user-mVKnC joined 04:49 kurahaupo_ left, kurahaupo joined 04:54 Cabanossi left 04:56 Cabanossi joined 05:08 konsolebox left 05:10 konsolebox joined 05:18 khw left 05:23 AlexDaniel joined 05:32 pierre joined 05:37 darutoko joined
Kaiepi m: my $ver := '2.0.0'; my ($maj, $min, $patch) := $ver ~~ /(\d+)\.(\d+)\.(\d+)/; say "$maj $min $patch" 05:45
camelia Unexpected named argument '' passed
in block <unit> at <tmp> line 1
05:46 pharv joined
Kaiepi m: my $maj := '2.0.0' ~~ /(\d+)\.\d+\.\d+/; say $maj.trim 05:46
camelia 2.0.0
Kaiepi wait why am i trying to use a regex when i can just do .split 05:47
05:49 Zoffix joined, releasable6 left
Zoffix m: dd Version.new: '2.0.0' 05:49
camelia v2.0.0
05:49 releasable6 joined
Zoffix m: dd Version.new('2.0.0').parts 05:50
camelia (2, 0, 0)
05:50 pharv left
Zoffix m: dd '2.0.0'.comb: /\d+/ 05:51
camelia ("2", "0", "0")
Zoffix m: use nqp; subset VLAN of Int where .so; subset Meows of VLAN; my $param := -> Meows $ where .so {}.signature.params.head; dd [.elems, $_] with nqp::getattr($param, Parameter, '@!post_constraints') 05:55
camelia [2, (Meows, -> ;; $_ { #`(Block|64841888) ... })]
Zoffix Is there a way to get more @!post_constraints? More than 2? 05:56
Kaiepi m: Version.new: 'foo' 06:02
camelia ( no output )
Kaiepi m: my ($a, $b, $c) := Version.new: 'foo'
camelia Cannot unpack or Capture `vfoo`.
To create a Capture, add parentheses: \(...)
If unpacking in a signature, perhaps you needlessly used parentheses? -> ($x) {} vs. -> $x {}
or missed `:` in signature unpacking? -> &c:(Int) {}
in block <unit> …
Kaiepi m: my ($a, $b, $c) := dd 'foo'.comb: /\d+/ 06:03
camelia ()
Too few positionals passed to '<unit>'; expected 3 arguments but got 0
in block <unit> at <tmp> line 1
Kaiepi how well does exception handling perform in perl 6? 06:04
Zoffix Don't know what you mean... "well" based on which parameters? 06:05
Kaiepi i mean in node for instance, try/catch makes the entire function it's used in unoptimizable
last i used it at least
Zoffix m: my ($a, $b, $c) = Version.new('2.3.42').parts; dd [$a, $b, $c] 06:06
camelia [2, 3, 42]
Zoffix m: my ($a, $b, $c) = '2.3.42'.comb: /\d+/; dd [$a, $b, $c]
camelia ["2", "3", "42"]
Zoffix Kaiepi: that sounds a lot like premature optimization 06:07
Worrying about that stuff, I mean.
Kaiepi it is for what i'm doing atm 06:09
Zoffix premature optimizing? :) 06:10
Kaiepi yeah
i'm wondering in case i run into some case where i might need to know in the future
06:14 rindolf joined 06:15 dct_ left 06:26 pierre left
Kaiepi t 06:31
06:38 pharv joined 06:41 wamba joined 06:42 pierre joined 06:43 pierre left, pierre joined 06:48 pierre left 06:49 skids left 06:54 greppable6 left, greppable6 joined, ChanServ sets mode: +v greppable6, pharv left 06:55 pharv joined 06:59 pharv left 07:02 kurahaupo left 07:03 kurahaupo joined, Zoffix left 07:06 bisectable6 left, bisectable6 joined, nativecallable6 left, ChanServ sets mode: +v bisectable6, bisectable6 left, nativecallable6 joined, ChanServ sets mode: +v nativecallable6, bisectable6 joined 07:07 darutoko left 07:17 Zoffix joined
Zoffix .tell tyil you have several bugs in your Appsixt module. Variables inside «» gets split on spaces within their values so, say, spaces in paths will break the path into separate args (`my $source = 'bar ber'.IO; dd «foo {$source.IO.path}»;`): gist.github.com/Whateverable/576bc...e13e4a7f26 07:18
yoleaux Zoffix: I'll pass your message to tyil.
07:18 Zoffix left 07:27 robertle joined
perlawhirl hi perlers 07:39
07:40 pharv joined
perlawhirl i been playing around with different combinatoric sequences 07:40
i have an issue with one of my functions that generates the next sequency by modifying positional elements in an Array (or List) 07:41
and the gather/take, when evaluated eagerly, only gives me the last entry
gist.github.com/0racle/6be868d7ef3...9b24387299
this is golfed
but how do i work around this?
as mentioned, this is golfed... it's the rotating of positional elements (@list[*]) that does it... if i simply did `@list .= rotate` it doesn't happen 07:42
AlexDaniel .tell Zoffix re run, «» and notifying users about their bugs: I feel encouraged by your attempt to work on the issue on case by case basis… Lately I feel like it's easier to give up :) irclog.perlgeek.de/perl6/2018-01-24#i_15732558 07:44
yoleaux AlexDaniel: I'll pass your message to Zoffix.
perlawhirl but in my function i'm reversing a portion of the list (eg. `@list[$k..$n] .= reverse`) and i can't seem to make it work right when consuming the seq eagerly
07:53 someuser joined 07:54 bartolin left, bartolin joined
AlexDaniel perlawhirl: this is so weird :D 07:55
07:55 Zoffix joined
AlexDaniel m: sub rots($list is copy) { gather for ^$list { $list[*] .= rotate; take $list; } }; my @l = ^3; say rots(@l).list; say rots(@l).Array; 07:56
camelia ([1 2 0] [2 0 1] [0 1 2])
[[0 1 2] [0 1 2] [0 1 2]]
AlexDaniel that has to be a bug 07:57
07:57 pierre joined
AlexDaniel m: sub rots($list is copy) { gather for ^$list { $list[*] .= rotate; take $list; } }; my @l = <0 1 2>; say rots(@l); say eager rots(@l); 07:58
camelia ([1 2 0] [2 0 1] [0 1 2])
([0 1 2] [0 1 2] [0 1 2])
Zoffix perlawhirl: you're sticking the same Array into all the cells 08:00
m: sub rots($list is copy) { gather for ^$list { $list[*] .= rotate; take $list.List; } }; my @l = <0 1 2>; say rots(@l); say eager rots(@l); 08:01
camelia ((1 2 0) (2 0 1) (0 1 2))
((1 2 0) (2 0 1) (0 1 2))
Zoffix m: sub rots($list is copy) { gather for ^$list { $list[*] .= rotate; take $list.clone; } }; my @l = <0 1 2>; say rots(@l); say eager rots(@l); 08:02
camelia ([1 2 0] [2 0 1] [0 1 2])
([1 2 0] [2 0 1] [0 1 2])
titsuki Is this a rakudo bug? REPL cannot handle binding properly: github.com/hankache/perl6intro/issues/168
Zoffix titsuki: looks like it 08:03
titsuki OK. then I'll tell him so... 08:04
Zoffix m: my @a = ^3; my @b; @a.=rotate; @b[0] = @a; @a.=rotate; @b[1] = @a; @a.=rotate; @b[2] = @a; say @b
camelia [[0 1 2] [0 1 2] [0 1 2]]
Zoffix perlawhirl: ^ this is what you're doing. The difference between the two cases is in the first one each item gets rendered into a string before the next one gets generated 08:05
08:05 committable6 left, committable6 joined
Zoffix m: my @a = ^3; my @b; @a.=rotate; my $answer = '['; @b[0] = @a; @a.=rotate; $answer ~ @a; @b[1] = @a; @a.=rotate; $answer ~ @a; @b[2] = @a; $answer ~ @a; say "$answer]" 08:05
camelia WARNINGS for <tmp>:
[]
Useless use of "~" in expression "$answer ~ @a" in sink context (lines 1, 1, 1)
Zoffix m: my @a = ^3; my @b; @a.=rotate; my $answer = '['; @b[0] = @a; @a.=rotate; $answer ~= @a; @b[1] = @a; @a.=rotate; $answer ~= @a; @b[2] = @a; $answer ~= @a; say "$answer]" 08:06
camelia [2 0 10 1 20 1 2]
AlexDaniel aaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhh
Zoffix++ 08:07
Zoffix m: my @a = ^3; my @b; @a.=rotate; @b[0] = @a; my $answer = '[' ~ [email@hidden.address] @a.=rotate; $answer ~= [email@hidden.address] @b[1] = @a; @a.=rotate; @b[2] = @a; $answer ~= [email@hidden.address] say "$answer]"; say @a 08:09
camelia [[1, 2, 0],[2, 0, 1],[0, 1, 2]]
[0 1 2]
Zoffix m: my @a = ^3; my @b; @a.=rotate; @b[0] = @a; my $answer = '[' ~ [email@hidden.address] @a.=rotate; $answer ~= [email@hidden.address] @b[1] = @a; @a.=rotate; @b[2] = @a; $answer ~= [email@hidden.address] say "$answer]"; say @b
camelia [[1, 2, 0],[2, 0, 1],[0, 1, 2]]
[[0 1 2] [0 1 2] [0 1 2]]
Zoffix perlawhirl: ^ like that :)
$answer is the $r and @b is @r
titsuki: beat you to it. 08:13
titsuki Zoffix: Thanks! 08:14
08:21 Zoffix left
perlawhirl Zoffix: I understand why your code does what it does, but don't immediately see why the gather/take acts this way 08:28
just so i understand it, when eagerly evaluating the gather/take, does it do the equivalent of your `@b[n] = @a` until the gather ends, then returns `@b`
and if that's the case... whats the best way around it, given that i'm generating a sequence by modifying a list in place 08:29
hrm... so a "quick fix" for my actual code is rather than `take @list[^$k]`, I can do `@a = @list[^$k]; take @a.clone`. 08:33
feels a bit messy, but helps illuminate the issue for me
moritz try @list.head($k) 08:35
08:38 Zoffix joined
Zoffix perlawhirl: no, @b.STORE pulls each of the items from the Seq created by gather/take and sticks into a new element in @b, one at a time. Each time it generates a new element, *all previous elements* of @b are too updated, since they all contain the same object. But by the time you **print** the eager version, the Seq was already fully pulled and all of the cells on @b contain the same @a Array that it's in its 08:42
last rotation. In the lazy version, the Seq is pulled **while the Str for printing is made** so despite the same Array being used for everything, by the time it changes on next iteration a Str snapshot of it was already taken
perlawhirl: possibly-helpful articles: perl6advent.wordpress.com/2017/12/02/ rakudo.party/post/Perl-6-Seqs-Drug...ock-n-Roll and rakudo.party/post/Perl-6-Seqs-Drug...ll--Part-2 08:43
08:45 quotable6 left, quotable6 joined, ChanServ sets mode: +v quotable6
Zoffix m: sub rots($list) { ^$list .map: { $list[flat ++$ ..^$list, ^ ++$ ] } }; my @l = ^3; my $r = rots(@l); say $r; my @r = rots(@l); say @r; 08:49
camelia ((1 2 0) (2 0 1) (0 1 2))
[(1 2 0) (2 0 1) (0 1 2)]
perlawhirl When I ran into the issue the first thing I did was re-read your articles on Seq's :D 08:50
08:51 lasse joined
Zoffix m: sub rots { .rotate, *.rotate … {++$ ≥ $_} with $^list }; my @l = ^3; my $r = rots(@l); say $r; my @r = rots(@l); say @r; 08:56
camelia ([1 2 0] [2 0 1] [0 1 2])
[[1 2 0] [2 0 1] [0 1 2]]
perlawhirl Thanks Zoffix. Will dig a bit deeper into this after I put the kids to bed. 08:58
Zoffix \o
08:59 Zoffix left 09:04 Zoffix joined
Zoffix Actually, I got one more: 09:04
m: my &rots = { [.=rotate] xx $_ }; my @l = ^3; my $r = rots(@l); say $r; my @r = rots(@l); say @r;
camelia ([1 2 0] [2 0 1] [0 1 2])
[[1 2 0] [2 0 1] [0 1 2]]
Zoffix :)
perlawhirl: a lot less messy :)
09:04 Zoffix left 09:24 sena_kun joined 09:31 rodarmor left 09:32 rodarmor joined 09:34 Bucciarati left, damnlie left, perlbot left, kybr left, avalenn left, Grauwolf left, stux|RC-- left, DarthGandalf left, Altreus left, Juerd left 09:36 Bucciarati joined, damnlie joined, perlbot joined, kybr joined, avalenn joined, Grauwolf joined, stux|RC-- joined, DarthGandalf joined, Altreus joined, Juerd joined, unicodable6 left, shareable6 left 09:37 shareable6 joined, unicodable6 joined, committable6 left, statisfiable6 left 09:38 bisectable6 left, benchable6 left, releasable6 left 09:39 releasable6 joined 09:51 domidumont joined 09:56 domidumont left 09:57 domidumont joined 09:58 stux|RC-- left, stux|RC-only joined 10:01 pierre left, pierre joined 10:20 kurahaupo left 10:29 Ven`` joined 10:34 bisectable6 joined, benchable6 joined, committable6 joined 10:35 statisfiable6 joined 10:37 ChanServ sets mode: +v statisfiable6 10:41 ufobat___ left 10:49 someuser left
perlawhirl So... I can't use macros in modules? macro works fine in a standalone script 10:52
but using it inside a function in a module, got "Missing serialize REPR function for REPR MVMContext (BOOTContext)"
I'm cool with that, given macros are experimental... just confirming this is expected behavior? 10:53
10:56 pharv left
AlexDaniel greppable6: macro 10:56
greppable6 AlexDaniel, 2897 lines, 63 modules: gist.github.com/4daf1cc8cd6aa24895...ba175ba2b5 10:57
AlexDaniel greppable6: macros
greppable6 AlexDaniel, 137 lines, 35 modules: gist.github.com/4046709a6ed9751b44...03dd39200d 10:58
AlexDaniel greppable6: use experimental \:macros\;
greppable6 AlexDaniel, 7 lines, 3 modules: gist.github.com/c3c9652a784ff1c083...e66cefe9d3
AlexDaniel perlawhirl: can't comment on the issue but maybe take a look at these modules as they seem to work 10:59
11:01 pierre left 11:04 pharv joined 11:08 pharv left
perlawhirl thank... one more lil prob i just stumbled on... possibly related to the recent conversion of all subs to multi?? 11:10
i have a sub in my module that takes a "Callable", ie: foo($iter, &func = &infix:<+>) { ... }
in my tests it's failing on 'foo(@data, &max)' and it's complaining that " expected Callable but got Sub+{is-pure}" 11:11
this worked a few days ago, i'm fairly certain 11:12
11:13 unicodable6 left
perlawhirl m: sub foo($bar, &func) { func($bar) }; foo([^3], &max); 11:14
camelia Type check failed in binding to parameter '&func'; expected Callable but got Sub+{is-pure} (Sub+{is-pure}.new)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
perlawhirl bisectable6: sub foo($bar, &func) { func($bar) }; foo([^3], &max); 11:15
bisectable6 perlawhirl, Bisecting by exit code (old=2015.12 new=235d3f1). Old exit code: 0
perlawhirl, bisect log: gist.github.com/66a1b39ae7c4adacf5...2be5ebb3df
perlawhirl, (2018-02-20) github.com/rakudo/rakudo/commit/55...73aba83013
perlawhirl yeah, it's the commit that made &max a multi. 11:16
11:23 someuser joined
perlawhirl m: my &máximo = &max; 11:27
camelia Type check failed in assignment to &máximo; expected Callable but got Sub+{is-pure} (Sub+{is-pure}.new)
in block <unit> at <tmp> line 1
perlawhirl This seems to be a pretty bad regression 11:28
Additionally, it made it into the compiler release 11:32
11:33 someuser left
AlexDaniel perlawhirl: what release? 11:36
plz don't give me a heart attack when it's not needed :) 11:37
c: 2018.02.1,HEAD sub foo($bar, &func) { func($bar) }; foo([^3], &max); 11:38
committable6 AlexDaniel, ¦2018.02.1: «» ¦HEAD(235d3f1): «Type check failed in binding to parameter '&func'; expected Callable but got Sub+{is-pure} (Sub+{is-pure}.new)␤ in sub foo at /tmp/lYR8EVamam line 1␤ in block <unit> at /tmp/lYR8EVamam line 1␤␤ «exit code = 1»»
AlexDaniel 6c: sub foo($bar, &func) { func($bar) }; foo([^3], &max);
committable6 AlexDaniel, gist.github.com/57c2cd5d31a9940305...aacd47e0d2
AlexDaniel perlawhirl: iirc that regression was somewhat “expected”, which is why we waited for the release to happen before trying to switch stuff to multis :) 11:40
perlawhirl: but please submit a ticket with this particular case 11:41
perlawhirl What I find odd (or I just don't understand) is I can define my own pure sub, export it from a module, and it doesn't suffer the same issue. It identifies (.WHAT) as a Sub+{is-pure}, but i can assign it to a &callable just fine
ok.. will submit GH issue
AlexDaniel thanks!
11:42 SyrupThinker joined 11:49 someuser joined 12:00 pierre joined 12:04 skaji left, skaji joined, circ-user-mVKnC left 12:06 someuser left 12:08 circ-user-mVKnC joined 12:20 pharv joined 12:24 pharv left 12:26 Kaiepi left, Kaiepi joined 12:28 pierre left 12:42 darutoko joined 12:54 isBEKaml joined 13:05 pierre joined 13:15 jeromelanteri joined 13:20 eroux joined
Geth doc: a881041297 | (JJ Merelo)++ | doc/Type/Any.pod6
Fixes the last "return Any"

By looking at the actual implementation. Revised also other "returns empty list". It actually returns an empty list in many cases, so it's OK. I haven't seen any other remainint, so provisionally closes #1731. If anyone finds a particular description that's wrong, I would rather have an specific open issue for that.
13:50
synopsebot Link: doc.perl6.org/type/Any
13:56 jeromelanteri left 14:04 pierre left 14:08 pharv joined 14:11 ribasushi left 14:14 pharv left 14:15 kurahaupo joined 14:30 pierre joined 15:02 bart joined, bart is now known as Guest72553, Guest72553 is now known as brrt 15:04 pierre left 15:07 lasse left 15:36 committable6 left, committable6 joined 15:39 Manifest0 joined, espadrine left 15:42 pierre joined 15:47 pierre left 15:48 Ven`` left
Manifest0 hi. I think i found a bug on a error message produced by perl6 15:54
This is the code: paste.opensuse.org/92568701
and this is the error message it produces: paste.opensuse.org/33633715
:-) 15:56
timotimo looks like you have a quoted string around it, that sometimes happens 15:59
i don't see any opening quotes in the paste, though
oh, haha
no, you have to put a space after "sub"
15:59 dakkar joined
timotimo otherwise you're calling a sub named &sub and trying to pass $t to it, which is not defined 15:59
16:00 brrt left 16:01 brrt joined
timotimo m: a => sub($t){ say $t } 16:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3a => sub(7⏏5$t){ say $t }
timotimo m: a => sub ($t){ say $t }
camelia WARNINGS for <tmp>:
Useless use of "a => sub ($t){ say $t }" in sink context (line 1)
timotimo m: say a => sub ($t){ say $t }
camelia Unexpected named argument 'a' passed
in block <unit> at <tmp> line 1
timotimo m: say (a => sub ($t){ say $t })
camelia a => sub ($t) { #`(Sub|41873912) ... }
timotimo Manifest0: does that help?
16:02 khw joined
timotimo we can probably detect when you're accidentally calling a sub called "sub" rather than declaring an anonymous sub 16:03
16:04 zakharyas joined 16:12 pharv joined 16:16 cdg joined, pharv left 16:19 brrt left 16:24 zakharyas left, Kaiepi left, zakharyas joined, Kaiepi joined 16:29 jgoff joined 16:31 Kaiepi left, Kaiepi joined
Manifest0 timotimo: that's it. A space was missing! 16:39
16:39 silug left
Manifest0 so without a space is a function call and with is an anonymous call? That's going to be confusing... 16:40
That explains the error message 16:41
timotimo aye, just like when you write "if($foo = 10)" that's not an if statement, that's a call to a sub called "if"
in that case you don't have the "i thought i was declaring that variable?" situation you had with "sub($t)" 16:42
16:43 unicodable6 joined
Manifest0 timotimo: thanks for the explanation :-) 16:44
timotimo no prob
16:44 skids joined
jgoff Manifest0: It's one of the reasons I use parentheses sparingly. 16:47
16:48 jgoff is now known as DrForr, pharv joined
Manifest0 DrForr: yeah. I guess i'll have to do the same. I just started learning. I still to get experience in p6 16:49
16:50 pharv_ joined 16:53 pharv left 16:54 pharv joined, pharv_ left 16:56 dakkar left 16:58 pharv left 17:09 Kaiepi left, Kaiepi joined, troys joined 17:17 cdg left
jdv79 m: use Test;like(IO::Path.new("."),/\./) 17:20
camelia IO::Path 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
jdv79 nice
anyway, the docs for Test::like say i coerces so what gives? 17:21
"Marks a test as passed if the $value, when coerced to a string, matches the $expected-regex. "
IO::Path::Str exists
Juerd Either the documentation or the implementation is wrong 17:22
It does not coerce. It even handles non-Str separately. 17:23
jdv79 i see that. its not in S24 so i guess its up for grabs 17:26
but timotimo - why did you make that change? the docs look correct before your change
timotimo i did?
jdv79 github.com/rakudo/rakudo/commit/ba...c9903bf1c3 17:27
maybe that should have been more like if it can't stringify then kick?
timotimo hm, i think the problem you mentioned was in the code before i changed things 17:28
like the commit message mentions, i had test code like "create an array, then call `like` on the different entries"
and it used to bring down the whole test suite if there wasn't an entry at one of the locations
jdv79 it used to be just: $got ~~ $expected
which would have wrked 17:29
timotimo ah, i see
feel free to turn it into Str() then
jdv79 ok
17:31 pierre___ joined 17:32 char_var[buffer] joined 17:35 pierre___ left, ccntrq left 17:39 kaare_ left, ccntrq joined 17:46 AlexDaniel left 17:48 zakharyas left 18:03 Blackraider joined 18:06 espadrine joined
jdv79 shouldn't 'make t/spec/S24-testing/1-basic.t' work? 18:11
18:11 Blackraider left 18:13 Blackraider joined
skids breaks zef while --force-installing zef with it. :-( 18:13
18:31 Blackraider left 18:38 darutoko left 18:46 smarty joined
smarty 3 18:47
18:48 eliasr joined 18:49 smarty left 19:03 pharv joined
rindolf timotimo: here? 19:06
19:07 pharv left 19:17 cdg joined
Geth doc: 0e59d162a9 | (Will "Coke" Coleda)++ | doc/Type/Hash.pod6
fix typos
19:19
synopsebot Link: doc.perl6.org/type/Hash
19:21 cdg left
Kaiepi is there something i'm doing wrong here? this is the only method in the class that's crashing for me, even though the native sub it uses works fine gist.github.com/Kaiepi/3f837104f66...4499181198 19:26
19:30 pierre__ joined
timotimo rindolf: briefly in between pieces of cooking 19:33
going to cut some veggies right now, but feel free to ask something
rindolf timotimo: any luck optimising my program? 19:34
19:35 pierre__ left
Kaiepi never mind, looking at the coredump it's the same problem that's breaking some other native stuff on my system 19:43
MasterDuke rindolf: i asked him the same question yesterday, he had some info irclog.perlgeek.de/perl6-dev/2018-...i_15853760 19:44
timotimo rindolf: did you read backscroll? 19:45
ah, thanks MasterDuke
note, however, that i do get a different result after i made that change :(
so clearly some result in the middle passed the 64bit range
19:45 konsolebox left
rindolf timotimo: was I addressed and online? 19:47
19:50 someuser joined
timotimo possibly not online 19:52
moritz we have public logs 19:54
19:57 hoelzro left, hoelzro joined
MasterDuke rindolf: you said the equivalent code in perl5 ran much faster? 19:58
rindolf MasterDuke: yes 19:59
MasterDuke: about 20s here
MasterDuke: pypy runs it in under a second
20:00 comborico1611 joined
MasterDuke hm. wouldn't perl5 also have problems if intermediate values are getting bigger than 64bit? 20:00
rindolf MasterDuke: see github.com/shlomif/project-euler/t...-euler/618 20:01
MasterDuke: i think so
MasterDuke huh. i guess they don't get quite big enough to actually break things 20:04
El_Che rindolf: do people use pypy nowadays? Most pythonistas I know don't 20:05
20:06 domidumont left
El_Che and google staying on 2.7 regular python and moving stuff to go instead of 3+pypy... 20:07
rindolf El_Che: i do for project euler 20:08
El_Che rindolf: if you don't use a lot of libs it's indeed a great candidate
rindolf MasterDuke: i am getting the same result from pypy3 and from p5
MasterDuke i think timotimo has contributed to pypy in the past 20:09
rindolf MasterDuke: on a core i3 machine
El_Che: yes
timotimo a tiny bit 20:10
pypy is fantastic
El_Che timotimo: does it fix the GIL thing? 20:11
timotimo: how is it that fast btw? regular python is also C 20:12
sounds interesting
rindolf El_Che: pypy has jit and stuff like that 20:13
El_Che a 50x speedup by jit? nice 20:14
20:18 lichtkind joined
rindolf timotimo: El_Che : MasterDuke : bye , gotta reboot 20:19
20:21 rindolf left 20:26 rindolf joined, martinp2 joined
rindolf hi all 20:34
20:34 zakharyas joined 20:37 someuser left
rindolf timotimo: there are intermediate results as output 20:39
20:42 xenotrope joined 20:45 aindilis joined 20:46 zakharyas left, zakharyas joined, lichtkind left
MasterDuke man, a profile shows 231s spent in Int's infix:<%> 20:47
20:55 SyrupThinker left
rindolf MasterDuke: with my program? 20:55
20:59 lichtkind joined 21:00 someuser joined 21:02 aindilis left 21:03 aindilis joined
MasterDuke yeah 21:04
21:06 jeromemathias joined
jeromemathias nice ! 21:06
MasterDuke there are 117598512 calls to it... 21:10
21:15 hankache joined
rindolf MasterDuke: ah 21:15
hankache hello #perl6 21:16
rindolf MasterDuke: can you shortcircuit it to int64 if it is within bounds? 21:17
hankache: hi
hankache hi rindolf
rindolf hankache: how are you?
hankache m: my $a := 3; $a = 4; say $a
camelia Cannot assign to an immutable value
in block <unit> at <tmp> line 1
hankache rindolf: all is well and you? 21:18
21:18 zakharyas left
hankache m: my $a := 3; $a := 4; say $a 21:18
camelia 4
hankache is this sound? ^^^^
rindolf hankache: i got some pull-reqs for pysol fc 21:19
21:19 Kaiepi left, Kaiepi joined 21:20 jeromemathias left
hankache rindolf: nice! 21:21
rindolf hankache: and i worked on some euler problems 21:22
buggable New CPAN upload: CommonMark-0.0.3.tgz by JGOFF cpan.metacpan.org/authors/id/J/JG/...-0.0.3.tgz 21:24
21:25 Kaiepi left, Kaiepi joined
timotimo rindolf: what do you mean "there are intermediate results as output"? 21:28
21:29 pierre__ joined
rindolf timotimo: github.com/shlomif/project-euler/b...v1.pl#L574 21:30
timotimo: oh wait
timotimo: seems like it is just for progress
timotimo yeah, the interesting parts are: how big will $p * $m[$m - $p] get? 21:31
Geth ecosystem: drforr++ created pull request #386:
Add perl6-CommonMark
timotimo i don't expect it to get past 64bit, tbh
the numbers in that array are all modulo'd to $BASE 21:32
so i don't know where my code goes wrong
21:32 Kaiepi left
rindolf timotimo: p < 50k and the d < 1e9+7 21:32
21:32 Kaiepi joined
timotimo m: say (50_000 * 1e9).msb 21:33
camelia No such method 'msb' for invocant of type 'Num'
in block <unit> at <tmp> line 1
timotimo m: say (50_000 * 1e9).lsb
camelia No such method 'lsb' for invocant of type 'Num'
in block <unit> at <tmp> line 1
timotimo oh, must be Int'ed
m: say (50_000 * 1e9).Int.msb
camelia 45
timotimo that'd get past the 32bit where our big integer math gets around allocating actual big int structures, but not outside of where int64 would be enough 21:34
21:34 pierre__ left, Kaiepi left, Kaiepi joined 21:36 Kaiepi left 21:37 Kaiepi joined
timotimo or did i misunderstand? 21:37
rindolf 64-bit is over 1e18 21:38
m: say 1 << 63
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of << to do left shift; in Perl 6 please use +< or ~<
at <tmp>:1
------> 3say 1 <<7⏏5 63
rindolf m: say 1 +< 63
camelia 9223372036854775808
Geth doc: 55f79aba96 | (Zoffix Znet)++ | doc/Type/IO/CatHandle.pod6
Document IO::CatHandle.handles

Closes github.com/rakudo/rakudo/issues/1546 R#1546 Spec: github.com/perl6/roast/commit/1a89a1e8f3 Impl: github.com/rakudo/rakudo/commit/d5baa036fa
21:42
synopsebot Link: doc.perl6.org/type/IO::CatHandle
synopsebot R#1546 [closed]: github.com/rakudo/rakudo/issues/1546 [IO] Implement IO::CatHandle.handles
21:43 ribasushi joined 21:44 jeromemathias joined
jeromemathias perl6 c'est de la barre ! 21:44
rindolf jeromemathias: hi 21:58
MasterDuke huh, making all variables ints, including the arrays, makes it slower 22:11
rindolf MasterDuke: that sucks 22:12
MasterDuke not by much, but i would have expected some sort of speedup instead 22:14
22:14 cdg joined 22:15 martinp2 left
rindolf MasterDuke: perhaps we can use bit vectors 22:15
like vec() in p5
timotimo MasterDuke: that's what i was writing about, though; split the expression with the two array accesses into multiple lines, each assigning into a native int var, then it'll be faster 22:17
MasterDuke wait, this is weird. why does my profile of the unmodified code show 45641 calls to calc_S?
i just stuck 'int ' before every variable declaration 22:18
22:19 cdg left
timotimo yeah, it looked like that somehow incurs a whole lot of boxing and unboxing or something 22:20
MasterDuke must be, it was still using the Int, Int candidate for infix:<%> 22:21
pmurias if there are precompiled files in a path passed to -I rakudo should also find them? 22:29
MasterDuke and how does postcircumfix:<[ ]> have so much exclusive time when all it does is call AT-POS?
timotimo fwiw, in the fastest version i had, it was somehow still using the exact same line number for infix:<%> but even with the same number of calls it was significantly faster 22:30
so .. ?!
22:32 wamba left
pmurias github.com/perl6/roast/blob/master...ion.t#L169 - this test is broken as we just don't find the module this way 22:37
22:37 comborico1611 left
pmurias (so if the interning works or not is not even tested) 22:38
22:39 sena_kun left 22:47 Rawriful joined 22:48 hankache left 22:52 jeromemathias left 22:57 lichtkind left 23:06 isBEKaml left, someuser left 23:15 Kaypie joined, Kaiepi left 23:17 circ-user-mVKnC left 23:27 pmurias left, Zoffix joined
Zoffix pmurias, looks like just `'.pm.' ~ $precomp-ext` should be changed to simply `'.pm6'` here github.com/perl6/roast/blob/master...ion.t#L131 doesn't it? 23:28
23:28 pierre joined
Zoffix oh, nm, there's code that does stuff to it 23:29
Filed as S#391 23:32
synopsebot S#391 [open]: github.com/perl6/roast/issues/391 Broken todo-ed precomp interning test
23:33 Zoffix left 23:35 rindolf left 23:46 pierre left 23:52 comborico1611 joined
MasterDuke timotimo: it's definitely using the Int,Int infix:<%> candidate. i added a note() to the native candidate and it's never getting printed 23:56