»ö« 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:43 aborazmeh joined, aborazmeh left, aborazmeh joined 00:55 pierre joined 01:10 enheh joined 01:18 reportable6 left, reportable6 joined 01:26 bisectable6 left, bisectable6 joined, ChanServ sets mode: +v bisectable6 01:29 evalable6 left, evalable6 joined, undersightable6t joined, ChanServ sets mode: +v evalable6, ChanServ sets mode: +v undersightable6t, undersightable6t left 01:30 undersightable6t joined, ChanServ sets mode: +v undersightable6t 01:31 undersightable6t left 01:32 kurahaupo_ is now known as kurahaupo 01:35 FROGGS_ joined 01:38 AlexDaniel left 01:39 FROGGS left
Geth doc: 67cadad365 | (Zoffix Znet)++ | doc/Language/traps.pod6
Rewrite LEAVE trap

  - Remove apocalyptic tone; the behaviour is a lot more predictable
   and avoidable than the prose suggests
  - Use simpler signature in, simply using `rand` to avoid compile
   time dispatch.
  - Explain why LEAVE is called
  - Include more examples of avoiding the issue
01:45
synopsebot Link: doc.perl6.org/language/traps
01:45 thowe left 01:47 ilbot3 left 01:53 cog_ joined 01:54 cognominal left 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:02 cognominal joined 02:03 cog_ left 02:05 ufobat_ joined 02:06 aborazmeh left 02:08 ufobat___ left
Geth ecosystem: 3714d7c19c | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-MeCab was moved to CPAN
02:13
ecosystem: a2da010a67 | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Geo-Hash was moved to CPAN
02:15
02:16 cog_ joined 02:17 cognominal left 02:18 khisanth__ left 02:20 vcv joined 02:22 Praise joined, Praise left, Praise joined
Geth doc: 9e7f24ee76 | (Zoffix Znet)++ | doc/Language/traps.pod6
Explain more why using a multi avoids LEAVE call
02:24
synopsebot Link: doc.perl6.org/language/traps
buggable New CPAN upload: Text-Sift4-0.0.5.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.5.tar.gz 02:31
New CPAN upload: Text-Sift4-0.0.6.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.6.tar.gz
02:33 khisanth__ joined 02:37 AlexDaniel joined 02:53 kurahaupo left 02:54 kurahaupo joined 02:55 thowe joined 02:56 wamba joined 03:00 kaare__ joined 03:08 khw left 03:25 skids left 03:34 vcv left 03:50 AlexDaniel left 04:04 wamba left 04:30 pierre left 04:32 pierre joined 04:49 pierre left 04:59 pierre joined 05:03 pierre left, wamba joined 05:06 thowe left 05:08 committable6 left, committable6 joined, ChanServ sets mode: +v committable6, bisectable6 left, bisectable6 joined 05:17 pierre joined 05:21 pierre left 05:35 pierre_ joined 05:40 pierre_ left 05:41 wamba left 05:58 domidumont joined 06:05 pierre_ joined 06:07 domidumont left, domidumont joined 06:18 domidumont left 06:19 itaipu joined 06:22 domidumont joined 06:27 itaipu left 06:48 noganex joined 06:53 lowbro joined 06:54 lowbro left, lowbro joined 06:58 FROGGS_ left 07:03 kurahaupo_ joined 07:06 kurahaupo left 07:08 robertle joined 07:21 pierre_ left 07:26 pierre_ joined 07:32 darutoko joined 07:40 rindolf joined 07:41 wamba joined 07:42 wamba left 07:44 abraxxa joined 07:48 markong joined
llfourn weekly: Haskell vs Perl 6: First impressions: medium.com/unraveling-the-ouroboro...b0d77a8140 07:50
notable6 llfourn, Noted!
07:54 pierre_ left 08:05 domidumont left 08:06 domidumont joined 08:10 domidumont left, cosimo joined 08:11 rindolf left 08:18 dakkar joined 08:30 dogbert11 left 08:34 rindolf joined 08:36 cosimo left 08:37 pierre__ joined 08:39 pierre__ left 08:40 pierre__ joined 08:43 cosimo joined 08:58 o2joy joined 09:02 cog__ joined, domidumont joined 09:04 cog_ left 09:11 o2joy left, sena_kun joined 09:13 enheh left 09:24 pierre__ left 09:25 w_richard_w left 09:29 pierre__ joined 09:32 Exodist joined 10:05 enheh joined 10:10 wamba joined 10:12 andrzejku_ joined 10:15 wamba left, andrzejku left 10:17 pierre__ left 10:22 wamba joined, wamba left 10:23 wamba joined 10:24 wamba left, pierre__ joined 10:28 pierre__ left
buggable New CPAN upload: ANTLR4-Grammar-0.2.1.tar.gz by JGOFF cpan.metacpan.org/authors/id/J/JG/...2.1.tar.gz 10:41
10:42 pierre_ joined 10:48 pierre_ left 10:56 pierre_ joined
buggable New CPAN upload: ANTLR4-Grammar-0.2.2.tar.gz by JGOFF cpan.metacpan.org/authors/id/J/JG/...2.2.tar.gz 11:01
11:02 scimon joined 11:14 pmurias joined 11:21 avar joined
llfourn gfldex: editted my article in light of your comment thx 11:22
the feature seems to be under developed though
m: foo(&a:(-->Any)){ }; foo(-> --> Int { })
camelia 5===SORRY!5=== Error while compiling <tmp>
You can't adverb &a
at <tmp>:1
------> 3foo(&a:(-->Any)7⏏5){ }; foo(-> --> Int { })
llfourn m: sub foo(&a:(-->Any)){ }; foo(-> --> Int { }) #woops 11:23
camelia Constraint type check failed in binding to parameter '&a'; expected anonymous constraint to be met but got -> --> Int { #`(Bloc...
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
llfourn kinda bad error + an Int should satisy Any
satisfy* 11:24
11:30 pierre_ left 11:31 telex left 11:32 telex joined
gfldex llfourn: you are welcome (as if I would skip an opportunity to smartass :) 11:59
12:08 gregf_ left
Geth doc: 7b4a002cf0 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
fix typo
12:14
synopsebot Link: doc.perl6.org/language/traps
12:26 reportable6 left
pmurias mst: do you think using plenv as a base for a rakudobrew replacement would make sense? 12:26
12:26 reportable6 joined, ChanServ sets mode: +v reportable6 12:30 wamba joined 12:38 ExtraCrispy joined 12:51 itaipu joined 12:56 athenot joined 12:58 mcmillhj joined 12:59 robertle left 13:02 pierre_ joined 13:04 wamba left 13:06 cog_ joined 13:10 cog__ left 13:16 wamba joined 13:20 reportable6 left, reportable6 joined 13:26 cdg joined 13:29 AlexDaniel joined 13:41 andrzejku_ left
rindolf Does anyone want to translate this from p5 to p6 (note the exit(0))? github.com/shlomif/project-euler/t...-euler/622 13:47
13:49 enheh left, pmurias left
lizmat rindolf: what about the exit(0) ? 13:58
rindolf lizmat: the rest of the code is not used 13:59
lizmat but it does need to compile? 14:00
14:01 pmurias joined
rindolf lizmat: you dont need to write it 14:02
lizmat: it is old code 14:03
lizmat ah, well, looks like an interesting project :-)
rindolf lizmat: see github.com/shlomif/project-euler/b...ffle-v2.pl 14:06
14:07 wamba left 14:24 cfa joined 14:25 ccakes joined 14:28 releasable6 left, unicodable6 left, bisectable6 left, squashable6 left, notable6 left, committable6 left, coverable6 left, reportable6 left, benchable6 left, shareable6 left, quotable6 left, statisfiable6 left, bloatable6 left, nativecallable6 left, evalable6 left, greppable6 left
mst pmurias: that or copy perlbrew's design - but if you copied plenv then that would help e.g. people using anyenv 14:34
14:34 notable6 joined, nativecallable6 joined, bloatable6 joined, ChanServ sets mode: +v bloatable6, committable6 joined, ChanServ sets mode: +v committable6, coverable6 joined, greppable6 joined, evalable6 joined, quotable6 joined, releasable6 joined, ChanServ sets mode: +v releasable6, benchable6 joined, unicodable6 joined, shareable6 joined, squashable6 joined, bisectable6 joined, statisfiable6 joined, ChanServ sets mode: +v statisfiable6 14:36 reportable6 joined
cfa morning folks 14:40
rindolf cfa: hi 14:46
cfa hi rindolf 14:49
14:49 enheh joined
rindolf cfa: how are you? 14:50
AlexDaniel o/
cfa rindolf: well thanks; you? 14:56
AlexDaniel: hey hey
rindolf cfa: i solved euler #622
cfa: i made an assumption that i didnt thoroughly prove and it worked 14:57
cfa :) 14:59
pmurias mst: don't you consider perlbrew insane? 15:05
mst pmurias: I consider using perlbrew for *deployment* to be missing the point, but lots of people find it very easy to use, and "mst thinks this is a bad idea in the long run", even if I'm right, doesn't beat "this is better -Ofun for first-time users" 15:06
15:06 pierre_ left
pmurias I have only used plenv (only perlbrew) but I seems to be of similiar -Ofun 15:07
mst cloning rustup but without the stupid sniping of the existing rakudup would also be an option 15:08
pmurias mst: basically the plan for first time users would be to "borrow" the rust approach and have something like p6up.github.io/ install p6env
mst that sounds like a pretty neat approach to me
pmurias sniping?
yeah the sniping was a bit silly 15:09
cfa what sniping?
the copy on the webpage? 15:10
mst right. that achieved absolutely nothing positive whatsoever.
cfa ack
mst and completely overshadowed whether it was a good approach or a good implementation of the approach
anyway, meh, no need to relitigate that 15:11
cfa agreed
15:17 domidumont left 15:19 frithnanth joined 15:20 Zoffix joined
Zoffix mst: FWIW the text on rakudup has changed. There's no sniping anymore: rakudup.github.io/ 15:21
mst oh, that's a huge improvement
15:22 Sgeo_ joined
pmurias thought the discussion was about him sniping rakudoup 15:22
15:23 MilkmanDan left 15:24 MilkmanDan joined, FROGGS joined, itaipu left, Sgeo left
[Coke] I think the "for deployment" is the issue. If I were doing deployments, I'd install the perl I needed inside a container with the system tools and use that. 15:26
15:26 itaipu joined
[Coke] I personally use perlbrew and tools like it for personal use on a single box where I may or may not have root. 15:26
15:28 scimon left
cfa same 15:28
easy to switch between versions, test, upgrade to the latest perl etc. 15:29
[Coke] is reminded that he has to setup a container to run some www::mechanize stuff! 15:30
15:35 frithnanth left, skids joined 15:41 cdg left 15:42 greppable6 left, greppable6 joined 15:43 greppable6 left, greppable6 joined 15:46 domidumont joined 15:51 itaipu left 15:53 dogbert17 joined
AlexDaniel dogbert17: hey 15:57
dogbert17: you love gdb, valgrind and stuff… right?
:)
15:57 abraxxa left
AlexDaniel I have a segv that is actually preventing me from rolling out a bot :( 15:58
it may be Cro-related, I don't know…
15:59 wamba joined
jnthn Is that the one already in RT? 16:00
Or perhaps GitHub Issues... :)
dogbert17 AlexDaniel: bring it on :) 16:01
AlexDaniel jnthn: no, definitely not, but there are some *other* whateverable segfaults :) like this one: github.com/rakudo/rakudo/issues/12...-371295503 16:02
I'll try golfing this new one, I *think* it should be relatively easy
dogbert17 isn't it convenient that you're a golf master :) 16:03
16:04 Zoffix left
AlexDaniel dogbert17: I was dethroned a few week ago 16:04
dogbert17 noooo
AlexDaniel nwellnhof is a freaking magician, I can't keep up with him 16:05
we're both documenting our findings though: github.com/AlexDaniel/6lang-golf-cheatsheet
16:05 geospeck joined, geospeck left
El_Che pmurias, mst: It's a pitty that rakudo isn't relocable. That would open posibilities. Compiling stuff locally it's not what I would call fast and easy 16:06
pmurias El_Che: I'm not the right person to make rakudo relocable, I just hate working on build systems so much 16:07
El_Che non relocable rakudo means unnecessary root/admin rights
AlexDaniel El_Che: not necessarily, but yes :D 16:08
16:08 itaipu joined
El_Che AlexDaniel: in the big scheme of things :) 16:08
AlexDaniel El_Che: I mean, you can use github.com/perl6/whateverable/wiki/Shareable if you're fine with rakudo sitting in /tmp :D
pmurias El_Che: a p6env setup could potentially be extended to install binary rakudos once it's relocatable
El_Che AlexDaniel: I feel suddenly a chill down my spine :) 16:09
16:09 lowbro left 16:10 khw joined
El_Che people with a managed computer may not be able to wirte to local path or install packages 16:10
dropping a tar like the jdk or go goes a long way 16:11
16:16 itaipu left 16:19 comborico1611 joined 16:23 enheh left 16:29 pierre_ joined, mcmillhj left, comborico1611 is now known as comborico1611_ 16:30 comborico1611_ left 16:31 dakkar left 16:32 mcmillhj joined 16:33 pierre_ left 16:37 bwisti joined 16:38 mcmillhj left 16:44 mcmillhj joined 16:48 eliasr joined 16:56 d2alphame joined
timotimo lizmat: i'm about to upload a blog post on my 'site, mind waiting with the weekly until i do? 16:59
i meant to put a nice picture from unsplash.com near the beginning, but it seems unsplash is having some technical difficulties? 17:02
can someone confirm that it won't serve any search results at the moment? 17:03
ok, it's reacting but service is spotty and slow 17:05
dogbert17 timotimo: Arg expression cannot be void, cannot use the return of getrusage 17:09
timotimo where do you get that?
dogbert17 make test
timotimo ah, of course we have tests for that :)
that's nqp's make test?
lichtkind proud to announce math::matrix 0.2
17:10 pharv joined
dogbert17 timotimo: no, rakudo 17:10
timotimo oh, OK
dogbert17 example: perl6 t/06-telemetry/01-basic.t
lichtkind++ 17:11
timotimo i see what i did
AlexDaniel dogbert17: does not segfault without running the whole bot. Bummer. :( 17:12
timotimo glad i don't have to re-bump :)
lichtkind dogbert17, thanks we have almost everything except eigenvalues and vektors 17:13
AlexDaniel timotimo: re "glad i don't have to re-bump", why? It's very easy with z script
timotimo only if you can use z script
AlexDaniel and you can't because? 17:14
timotimo it wants me to put my rakudo, nqp, and moarvm into an empty folder
that's terrible! i feel tyrranized
AlexDaniel no? It will create its own
I use my own rakudo, nqp etc., but I let it do the bumps with its own repos
timotimo yeah, but then i'd have to copy over my work :P
AlexDaniel well, one option is to git pull from a local path 17:15
and another is to… push it upstream
and then do the bump :)
timotimo: just look at this! Isn't it beautiful? github.com/rakudo/rakudo/commit/97...e5c74612df 17:16
AlexDaniel believes that it's a compelling argument :P 17:17
timotimo yeah, well, this bump only introduced a single commit :)
wakelift.de/p/1a39c0ea-adfb-45d2-b...380197d71/ - proof reading welcome 17:18
... how do i center images :D 17:19
17:19 cdg joined, vcv joined 17:32 pierre joined, Sgeo_ left 17:33 Sgeo_ joined 17:35 pharv left 17:37 pierre left 17:39 pharv joined 17:43 pharv left 17:45 pharv joined 17:46 pharv left 17:47 pharv joined 17:58 cfa left
tony-o timotimo: they seem centered to me 18:11
timotimo yup! i managed to do it
my first attempt was <center>![](...)</center>, but that just left the markdown in the result as-is
so i just used a regular <img/> tag instead
also, hi tony-o :)
18:12 pharv left
tony-o what's going on? 18:12
timotimo edument paid me to implement remote debugger support for moarvm! 18:13
am i just imagining things or have i not seen you on irc in a while?
tony-o that's pretty rad
i'm more a lurker now, still working on problems, just not pushing modules 18:14
been working on a better orm
timotimo .o( bettorm )
tony-o haha, i might use that
timotimo i'm not employed by Whateverable, The Foundation™ to come up with dumb bot names for nothing ;) 18:15
18:15 cdg left
tony-o how does the remote debugger work? 18:15
18:15 pharv joined
tony-o is that a cli or gui thing? 18:15
timotimo there's a library and a CLI 18:16
Ulti timotimo: nice post 18:17
timotimo you can ask moarvm to listen to a port, then the library (or you, manually) connect to it via TCP and after a short handshake the protocol is a messagepack-based thingie
thank you, Ulti :)
tony-o ohh that sounds pretty interesting 18:20
18:20 bocaneri left 18:21 pharv left
timotimo you can set breakpoints, suspend and resume single threads or all threads, get a full stacktrace, grab the values of lexicals and attributes, positional items and associative items from objects 18:21
there's also single-stepping (step over and step out are NYI)
tony-o damn, that should lead to some really interesting debuggers 18:22
timotimo hopefully so!
the cli has a few cool tricks up its sleeve, too
like "all lex $threadnum" gives you lexicals for all frames on the stack
gotta be AFK for a bit 18:23
oh, we still need someone to write a shell and a batch script that can pass a port and --debug-suspend (or not) to moar while launching nqp or rakudo 18:24
i.e. rakudo-debugserver-m, nqp-debugserver-m, probably with two positional arguments 18:25
18:25 pharv joined 18:29 enheh joined 18:30 pharv left
lizmat timotimo: just lemme know when :-) 18:34
timotimo: ah, I just saw :-) 18:35
buggable New CPAN upload: Ops-SI-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz 18:41
18:43 comborico1611 joined 18:48 domidumont left
timotimo \o/ 18:52
enheh Hello, everybody! I am a bit confused about type constraints and their association with variables and containers. 18:56
In particular, the container documentation at docs.perl6.org suggests that type constraints are the property of the container, not the variable. If that is so, then I am confused by the example it gives, since it results in a type check failure which would only seem possible if type constraints are the property of the variable:
m: my Int $i = 42; $i := "forty plus two";
camelia Type check failed in binding; expected Int but got Str ("forty plus two")
in block <unit> at <tmp> line 1
enheh If my understanding is correct, binding replaces any container previously bound to the variable. In that case, I would expect the container created during the initial declaration and assignment to be replaced by a non-containerized string in the subsequent bind statement. If type constraints are on containers rather than the variables themselves, shouldn't the Int type constraint disappear along with the replaced container? 18:57
From the documentation:
"Any container can have a type constraint in the form of a type object or a subset. Both can be placed between a declarator and the variable name or after the trait of. The constraint is a property of the container, not the variable. Any (re-)binding may change the type constraint or remove the constraint altogether if bound to a value instead of a container."
19:01 ExtraCrispy left 19:04 cdg joined 19:06 darutoko left 19:07 pharv joined 19:09 cdg left
gfldex m: my Int $i = 42; my \s = "forty plus two"; $i := s; 19:16
camelia Type check failed in binding; expected Int but got Str ("forty plus two")
in block <unit> at <tmp> line 1
gfldex m: my Int $i = 42; constant \s = "forty plus two"; $i := s; 19:17
camelia Type check failed in binding; expected Int but got Str ("forty plus two")
in block <unit> at <tmp> line 1
gfldex goes to read roast
19:20 Kaiepi left 19:28 Zoffix joined
Zoffix enheh: that section shows an example that shows that description is actually incorrect. 19:29
"The default type constraint of a Scalar container is Any" that's also incorrect. Default type constraint for variables is Mu
enheh So are there type constraints both directly tied to containers and also to variables, then? 19:31
Zoffix enheh: I don't know much about it, but I'd say it's both: a variable can have a type constraint attached to it (as in `my Int $x` or `my Int \y`) and a container can have a descriptor that checks types (e.g. in `m: my Int %h; %h<foo> = rand;` where `<foo>` key's container ensures only Ints get stored)
I also notice you can rebind parametarized hashes's values, but parametarized arrays don't offer that option, because their binding methods are typed to accept only the typed values 19:32
m: my Int %h; %h<foo> := rand; dd %h
camelia Hash[Int] %h = (my Int % = :foo(0.9608381618766769e0))
Zoffix m: my Int @h; @h[2] := rand;
camelia Cannot resolve caller BIND-POS(Array[Int]: Int, Num); none of these signatures match:
(Array:D $: int $pos, Int \bindval, *%_)
(Array:D $: Int:D $pos, Int \bindval, *%_)
in block <unit> at <tmp> line 1
Zoffix enheh: there's also this article on containers: perl6advent.wordpress.com/2017/12/02/ 19:33
enheh Zoffix: Yes, that article is part of what led me down this road. :)
gfldex rebinding to typed scalars is unspeced it seams 19:35
enheh: feel free to file issues with the docs and/or roast 19:36
Zoffix Filed already, D#1870
synopsebot D#1870 [open]: github.com/perl6/doc/issues/1870 "Type Constraints" section on containers page contains incorrect info
19:36 pierre_ joined
enheh In exploring this issue, I was unable to find any way to introspect the type constraints on a variable. Is there something I've missed, perhaps? 19:38
Zoffix m: my Int $x; say $x.VAR 19:39
camelia Int
enheh Doesn't that just give information on the underlying container, though, rather than the variable itself?
Zoffix ah yeah 19:40
19:40 pierre_ left
lizmat m: my Numeric $x = 42; say $x.VAR.of 19:41
camelia (Numeric)
lizmat m: my Numeric $x = 42; say $x.WHAT
camelia (Int)
lizmat enheh Zoffix ^^^
Zoffix m: my Numeric $x := 42; say $x.VAR.of 19:42
camelia No such method 'of' for invocant of type 'Int'
in block <unit> at <tmp> line 1
lizmat m: my $x is default(42) = 666; say $x.VAR.default # related
camelia 42
Zoffix lizmat: ^ what about this one, when there's no Scalar on it?
m: my Numeric x := 42; say $x.VAR.of
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my (did you mean to declare a sigilless \x or $x?)
at <tmp>:1
------> 3my Numeric x7⏏5 := 42; say $x.VAR.of
Zoffix m: my Numeric \x = 42; say $x.VAR.of
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3my Numeric \x = 42; say 7⏏5$x.VAR.of
Zoffix ^ or that last one, since you can rebind to it
: my Numeric \z = 42; z := 42 19:43
m: my Numeric \z = 42; z := 42
camelia ( no output )
Zoffix m: my Numeric \z = 42; z := "x"
camelia Type check failed in binding; expected Numeric but got Str ("x")
in block <unit> at <tmp> line 1
lizmat the .VAR gives you the container, if any
if you bind 42, you don't have a container
Zoffix And basically the question is, how can I programmatically know whether the above ^ would bind successfully or throw typecheck
19:44 cdg joined
Zoffix lizmat: with the \z stuff I don't have a container either, do I? 19:44
lizmat nope
19:44 espadrine joined
lizmat hmmm... so how does it know it can't bind ? 19:44
hmmm... interesting
19:45 comborico joined
lizmat jnthn would know :-) 19:45
gfldex the example in the docs used to work btw. And there is no spec test for typed rebinding on scalars.
Zoffix gfldex: it still works as the example shows. The example shows throwage occurs (which it does), but the prose says you can rebind 19:46
gfldex i'm sure we could shed the type check with binding a good while ago
19:48 cdg left
jnthn The bind operator code-gens a type check 19:48
Zoffix p6bindassert 19:49
m: use QAST:from<NQP>; BEGIN $*W.compile_time_evaluate: $, QAST::Stmts.new: QAST::Op.new(:op<bind>, QAST::Var.new(:name<$foo>, :scope<lexical>, :returns(Int), :decl<var>), QAST::WVal.new: :value("x")), QAST::Op.new: :op<say>, QAST::Var.new: :name<$foo>, :scope<lexical> 19:50
camelia x
jnthn That's, I believe, the only place the type information is retained at the binding level
Zoffix m: use QAST:from<NQP>; BEGIN $*W.compile_time_evaluate: $, QAST::Stmts.new: QAST::Op.new(:op<p6bindassert>, QAST::Var.new(:name<$foo>, :scope<lexical>, :returns(Int), :decl<var>), QAST::WVal.new: :value("x")), QAST::Op.new: :op<say>, QAST::Var.new: :name<$foo>, :scope<lexical>
camelia 5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exception details:
Type check failed in binding; expected Str but got Mu (Mu)
in code at <tmp> line 1
19:50 lichtkind left
jnthn Variables don't really exist by runtime. Certainly not in the same way containers do 19:50
Zoffix Ah 19:51
jnthn I guess you could probably write a trait and apply it to the variable, then you'd get the Variable object at compile time and could probably grab the type 19:53
And stash it away...somewhere :)
rindolf lizmat: here? 19:54
19:55 rouking joined
lizmat rindolf: yes 19:55
rindolf lizmat: did you work on the port of my code yet?
lizmat my int $a = 42; sub a(int $b) { } # this appears to allocate an Int for each call to "a"
jnthn: ^^^ is that correct / intentional / unavoidable ??
rindolf: I'm busy with other things 19:56
rindolf lizmat: ah
jnthn lizmat: Does it allocate an int of a lex ref?
*or an
lizmat Int 19:57
jnthn That's...odd
I'd expect an IntLexRef
lizmat perl6 --profile -e 'my int $a = 42; sub a(int $b) { }; a($a) for ^100000'
jnthn Though in both cases I'm planning to teach spesh to get rid of those :)
lizmat is what I used, and it shows about 100K Ints
this is annoying in things like push-exactly :-( 19:58
jnthn You sure that's not because `blah for ^100000` sets $_ on the LHS to the current value, and that this would force a boxing?
lizmat hmmm 19:59
jnthn Anyway, box elimination and ref-taking elimination are on my near-term spesh todo list :)
lizmat ok, so I won't pursue this at this time :-) 20:00
gfldex moar faster is moar better!
lizmat and you're right, the Ints where not from the call, but the ^100000 presumably
Nil for ^100000 # produced the same number of Int allocations
jnthn Well, if you want to take that bit of graph algorithm work off my hands, I won't totally object ;-) 20:01
Yeah, then it's probably that
lizmat I'm afraid I'm too graphically noobed :-)
20:01 aeruder left
jnthn I'm certainly not a natural at graph theory. :-) 20:02
Pretty much always have to think hard about it rather than having any intuition whatsoever. 20:03
Geth doc: gfldex++ created pull request #1871:
Default type is Mu
20:04
20:04 jcallen_ joined, ilbelkyr_ joined 20:05 jcallen left 20:06 aeruder joined
Geth doc: 94c2270cb3 | (Zoffix Znet)++ | doc/Language/containers.pod6
Fix up info on Type Constraints

Closes github.com/perl6/doc/issues/1870 D#1870 Closes github.com/perl6/doc/pull/1871 D#1871 Based on irclog.perlgeek.de/perl6/2018-03-26#i_15968371
20:06
synopsebot Link: doc.perl6.org/language/containers
synopsebot D#1870 [closed]: github.com/perl6/doc/issues/1870 "Type Constraints" section on containers page contains incorrect info
D#1871 [closed]: github.com/perl6/doc/pull/1871 Default type is Mu
20:06 dct joined
enheh I admit I'm a little lost with the NQP stuff and the stuff about Perl 6 internals, but if there is still any light to be shed on what is happening, perhaps this example might still be enlightening: 20:07
m: my Int $x = 42; my $y = 33; $x := $y; $x = "foo"; $x.say; $x.VAR.say; $x.VAR.of.say;
camelia foo
foo
(Mu)
enheh It's unlcear whether the type constraint should belong to the container or the variable, but maybe it gets applied to both? After $x's container is replaced by one with a Mu type constraint, one can assign a non-Int value with no problem. But as soon as we bind a non-Int to $x again, it fails. 20:08
Zoffix enheh: contraint's on the container and `$x := $y` changes the container (and thus the constraint) in $x 20:10
enheh Oops, forgot the last bit: 20:11
m: my Int $x = 42; my $y = 33; $x := $y; $x = "foo"; $x.say; $x.VAR.say; $x.VAR.of.say; $x := "foo";
camelia foo
Type check failed in binding; expected Int but got Str ("foo")
in block <unit> at <tmp> line 1

foo
(Mu)
enheh Zoffix: Yes, exactly!
Zoffix enheh: and binding operator does a typecheck. In case of `$x := $y`, $y has same type as $x; in case of `$x := "foo"`, "foo" is of type Str, but $x is of type Int 20:12
enheh Zoffix: But later when we try to rebind a string, somehow the Int constraint still exists on the $x var.
Zoffix nah, it's the bindinding operator typechecking now, based on types of its args, not the constraints on anything 20:13
m: my $x = "x"; my $y = 33; $x := $y; 20:14
camelia ( no output )
Zoffix hmmm
In this case it's just normal bind, not p6bindassert :/
And with %h<foo> := 42; it's .BIND methodcall. 20:15
Geth doc: gfldex++ created pull request #1872:
link to binding operator
doc: gfldex++ created pull request #1873:
tell that and when := throws X::TypeCheck::BindingType
doc: b3e167e67a | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | doc/Language/containers.pod6
link to binding operator
doc: 4027fae60b | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/containers.pod6
Merge pull request #1872 from gfldex/patch-10

  link to binding operator
doc: 0daea5a2eb | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
tell that and when := throws X::TypeCheck::BindingType
20:16
doc: 16f15dff57 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #1873 from gfldex/patch-11

tell that and when := throws X::TypeCheck::BindingType
synopsebot Link: doc.perl6.org/language/operators
20:18 athenot left 20:19 vcv left
Zoffix Ah, 'cause there's no constraint on it 20:19
m: my Str $x = "x"; my Int $y = 33; $x := $y; 20:20
camelia Type check failed in binding; expected Str but got Int (33)
in block <unit> at <tmp> line 1
Zoffix yey
enheh Zoffix: That makes sense to me.
20:21 sena_kun left
Zoffix OK, fairly clear now: if you bind to a constrained container or a variable with a value, the binding operator performs a typecheck for you. The constraint on containers typechecks when you store stuff into containers. And binding operator calls on an array index or hash key desugars to a method call and lets the method do typechecks 20:21
And the typecheck the binding operator performs is based: (*) for containers, the type constraint on the container; (*) for values, the type of the value 20:22
m: my Str $x := <42>; my Int $y = 33; $x := $y;
camelia Type check failed in binding; expected Str but got Int (33)
in block <unit> at <tmp> line 1
Zoffix no, doesn't work here :(
m: my Str \z = <42>; my Int $y = 33; z := $y; 20:23
camelia Type check failed in binding; expected Str but got Int (33)
in block <unit> at <tmp> line 1
Zoffix How does it know that it wants a Str and not IntStr?
gfldex enheh++ # for reading carefully
enheh gfldex: Thanks! 20:26
Zoffix Ah, ok, it 20:27
m: BEGIN { my Str \z = <42>; BEGIN say $*W.find_lexical_container_type: 'z'; exit }
camelia (Str)
Zoffix So it is a proprty of the variable in this case and the compiler at compile time rakes for the variable to find what the constraint is and it codegens a binding operator that does a typecheck based on that type. 20:28
ZofBot: it's so easy!
ZofBot Zoffix, ” And Father said, “Were you listening to what was saying, Christopher?” said, “Yes, was listening to what you were saying, but when someone gets murdered you have to find out who did it so that they can be punished
enheh Zoffix: Nice! 20:29
20:31 bwisti left
buggable New CPAN upload: ANTLR4-Grammar-0.2.3.tar.gz by JGOFF cpan.metacpan.org/authors/id/J/JG/...2.3.tar.gz 20:41
Zoffix buggable: fc5 20:44
buggable Zoffix, Far Cry 5 will be released in 3 hours, 15 minutes, and 14 seconds
Zoffix \o/ \o/ \o/
Yeah, those IRC::Client bugs I wanted to fix this week... Ain't gonna happen :P 20:45
20:45 Zoffix left
Geth doc: ronaldxs++ created pull request #1874:
Mention attribute mutators by Proxy and refer to mutators.t in roast
20:47
20:47 pharv left 20:48 pharv joined
tadzik haha, that's quite a feature for a bot :) 20:49
and of course one has to try...
buggable: hl2ep3
:( 20:50
20:51 Sgeo__ joined
timotimo ;( 20:51
20:52 cdg joined 20:54 Sgeo_ left 20:56 d2alphame left 21:02 pharv left, pharv joined
dogbert17 timotimo: when did we last do a Coverity Scan? 21:07
21:09 mcmillhj left 21:10 |oLa| joined
timotimo hm, could have been a while ago 21:11
21:11 comborico left
Geth doc: 054585c9f1 | (JJ Merelo)++ | doc/Type/Range.pod6
Realigning comments

Thanks to @AlexDaniel for pointing it out.
21:12
synopsebot Link: doc.perl6.org/type/Range
doc: e0776d5902 | (JJ Merelo)++ | 5 files
Merge branch 'master' of github.com:perl6/doc
21:15 skids left 21:26 rindolf left 21:31 cdg left 21:34 dct left 21:35 pierre_ joined 21:39 pharv left, pierre_ left 21:40 pharv joined
timotimo something's still wrong with telemetry? 21:44
21:47 cdg joined 21:51 pharv left, pharv joined 21:52 cdg left 21:54 committable6 left, committable6 joined 21:55 committable6 left, committable6 joined
lizmat timotimo: maybe something I borked ? 21:56
and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/03/26/...ly-perl-6/
timotimo don't think so
looks like i borked it actually
AlexDaniel m: sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch, :4degree).map({(gather foo).list}); say now - BEGIN now
camelia ((42 50) (42 50) (42 50))
3.049271
AlexDaniel why is this taking 3 seconds? 21:57
lizmat probably because it doesn't start more threads 21:59
timotimo i can't read the code because the comments with - in them make my vim violently explode when trying to syntax-highlight ... 22:00
22:00 pharv left
lizmat AlexDaniel: yup, that's the reason 22:01
I think this is a basic flaw of the current supervisor algorithm
if something doesn't use any CPU, it doesn't cause any other workers to be started
(I think :-)
22:02 mniip left
lizmat AlexDaniel: probably best to create an issue for it 22:02
timotimo oh, maybe i was on a moarvm branch that doesn't do getrusage right
AlexDaniel lizmat: ok, next question
m: sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch, :4degree).map({(gather foo)}); say now - BEGIN now
camelia ((42 50) (42 50) (42 50))
3.04887136
AlexDaniel m: sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch, :4degree).map({gather foo}); say now - BEGIN now 22:03
camelia ((42 50) (42 50) (42 50))
3.0514149
AlexDaniel hm, what's the question
no question I guess
timotimo OK, got back onto moarvm master and everything's good
AlexDaniel m: sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch).map({(gather foo)})
camelia ((42 50) (42 50) (42 50))
timotimo time to read the weekly :3 22:04
AlexDaniel e: sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch).map({(gather foo)})
evalable6 ((42 50) (42 50) (42 50))
AlexDaniel c: d0fbe7447 sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch).map({(gather foo)})
committable6 AlexDaniel, ¦d0fbe74: «The iterator of this Seq is already in use/consumed by another Seq␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤ in block <unit> at /tmp/dZ5N1bJhVh line 1␤␤ «exit code = 1»»
22:04 mniip joined
AlexDaniel bisect: old=d0fbe7447 sub foo() { sleep 1; take 42; take 50 }; say <a b c>.hyper(:1batch).map({(gather foo)}) 22:05
bisectable6 AlexDaniel, Bisecting by exit code (old=d0fbe74 new=1c4eebe). Old exit code: 1
AlexDaniel, bisect log: gist.github.com/bf4042793422150f8d...89ca3af1a9
AlexDaniel, (2018-03-26) github.com/rakudo/rakudo/commit/1c...903ce4fdec
AlexDaniel lol did you just fix that? xD
timotimo maybe just more difficult to make it explode?
AlexDaniel “committed 4 hours ago”
timotimo lizmat++ # weekly 22:10
22:12 pharv joined 22:15 telex left 22:17 pharv left 22:18 telex joined 22:25 mniip left 22:29 pharv joined 22:30 mniip joined 22:31 pmurias left 22:32 cdg joined 22:33 pharv left
Geth whateverable/master: 6 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ 22:37
22:40 pharv joined 22:41 undersightable6 joined 22:45 FROGGS left 22:48 skids joined 22:50 comborico1611 left 22:51 Herby_ joined
Herby_ o/ 22:52
22:52 undersightable6 left, undersightable6 joined, ChanServ sets mode: +v undersightable6
timotimo \o 22:53
23:00 comborico1611 joined
Geth whateverable: d03880d3f9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Undersightable.p6
Of course I meant .eager

D'oh!
23:01
AlexDaniel jnthn++
jnthn :) 23:05
'night o/
AlexDaniel o/
23:05 markong left
Geth whateverable: e6e3f9ae7d | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Undersightable.p6
Class name should not have 6 in it
23:09
23:13 wamba left 23:20 pharv left 23:42 pharv joined 23:47 pharv left
Geth doc: 5463011fe5 | cfa++ | xt/code.pws
Add 'bindingtype' (X::TypeCheck::BindingType) to the code dictionary.

Pass aspell.t.
23:57
23:58 mniip left 23:59 mniip joined