»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:03 vendethiel left 00:11 eternaleye left 00:12 eternaleye joined 00:18 andreoss left
japhb Yeah, faster JSON parsing would be a huge win for me as well. 00:24
There are places I'd love to use it as a least common denominator interchange format, but the current parsing is just too slow for any reasonable amount of data. 00:25
00:33 baest left, davido_ left 00:34 baest joined, kst` joined 00:35 davido_ joined 00:37 sftp joined 00:38 kst left 00:46 alini joined, laouji joined 00:54 adu joined 00:55 vendethiel joined 00:58 aborazmeh left
nbdsp Greetings! I read the section "fancy method calls" in docs, but can't figure out how to access a private variable with its text name. E.g. 00:58
class C { has $!field = "10"; method meth( $var ) { say self!<$var>; } }; my $c = C.new; $c.meth( "field" ); 00:59
m: class C { has $!field = "10"; method meth( $var ) { say self!<$var>; } }; my $c = C.new; $c.meth( "field" );
camelia rakudo-moar 239d74: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oC6VvYJTyB␤Missing required term after infix␤at /tmp/oC6VvYJTyB:1␤------> 3"; method meth( $var ) { say self!<$var>7⏏5; } }; my $c = C.new; $c.meth( "field" )␤ expecting any of:␤ prefi…»
01:00 aborazmeh joined, aborazmeh left, aborazmeh joined
japhb nbdsp: Private attributes and private methods are separate (unlike the unification of public attributes and public methods), but both can be reached using the MOP. 01:14
(Essentially you're digging into things the object doesn't *want* you to reach easily, so you have to go through the class's meta-object to pull it out.
)
01:15 Akagi201 joined
japhb If you want to see the deepest, ugliest guts, you can look at the code that makes DUMP work in Rakudo -- but note that it's got a lot of extra logic to handle the case that a VM-level object has escaped into Perl 6 space, but we still want to display it sanely. (DUMP is a low-level debugging tool, after all, designed for figuring such things out.) 01:16
nbdsp Oh. Though it's not quite clear why private methods are easier to access than private fields. But thanks for pointing to MOP! 01:17
01:18 vendethiel left, aborazmeh left
japhb nbdsp: Private methods and private attributes are visible within the class, certainly. Outside the class, what is the easier access that you are thinking of that favors one over the other? 01:20
nbdsp japhb: In the docs design.perl6.org/S12.html#Fancy_method_calls there are plenty of ways to access private methods through string variables. But not private fields. 01:30
01:35 DarthGandalf joined
nbdsp m: class C { has $!field = "10"; method meth( $var ) { say $!<$var>; } }; my $c = C.new; $c.meth( "field" ); 01:36
camelia rakudo-moar 239d74: OUTPUT«Nil␤»
01:41 adu left
raydiak I suppose because, if I understand correctly, private attributes have no accessor at all, not even a private one; just a lexical alias to the attribute, more like a my var than an accessor method 01:43
01:45 ilbot3 left 01:47 ilbot3 joined, alini left, colomon left 01:53 aborazmeh joined, aborazmeh left, aborazmeh joined
japhb nodnod 02:04
m: class C { method !priv() { say "Hi!" } }; C.new!priv(); 02:05
camelia rakudo-moar 239d74: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rflpvixbu7␤Private method call to priv must be fully qualified with the package containing the method␤at /tmp/rflpvixbu7:1␤------> 3od !priv() { say "Hi!" } }; C.new!priv()7⏏5;␤»
nbdsp But how to access attributes via metaobject? When I try self.^attributes[0] = "1"; there is an error "Cannot modify immutable attribute"
japhb nbdsp: See the above as well, access to private methods isn't as simple as it appears in that section of S12
nbdsp: You need to make it 'is rw' in order to have a container for it. 02:06
(or have it be a native attribute)
02:06 KCL_ joined 02:07 KCL left
nbdsp Will the private attribute remain private if it is set as 'rw'? 02:07
japhb I have to ask though, what is your actual use case? Why are you trying so hard to work around privacy, rather than just make the relevant attributes/methods public?
nbdsp Is accessing an attribute via string variable instead of string literal has something in relation to privacy? 02:09
japhb m: class C { has $!foo is rw = 12; method !priv() { say $!foo } }; my $c = C.new; $c!priv(); $c.^attributes[0] = 5; $c!priv();
camelia rakudo-moar 239d74: OUTPUT«useless use of 'is rw' on $!foo in any at src/Perl6/World.nqp:2052␤␤5===SORRY!5=== Error while compiling /tmp/eKoLxB7rbM␤Private method call to priv must be fully qualified with the package containing the method␤at /tmp/eKoLxB7rbM:1␤------>…»
japhb Hmmm, won't let you make a container without making it public, it seems. Interesting 02:10
m: class C { has $!foo is rw = 12; method !priv() { say $!foo } }; my $c = C.new; $c!C::priv(); $c.^attributes[0] = 5; $c!C::priv();
camelia rakudo-moar 239d74: OUTPUT«useless use of 'is rw' on $!foo in any at src/Perl6/World.nqp:2052␤␤5===SORRY!5=== Error while compiling /tmp/CYheS5Osob␤Cannot call private method 'priv' on package C because it does not trust GLOBAL␤at /tmp/CYheS5Osob:1␤------> 3y $!foo …»
02:10 noganex_ joined
japhb Yeah, that's the next problem. ^^ You have to be trusted to use that syntax. Only the MOP gets around that. 02:10
nbdsp: No, I'm asking why you're trying to look at a private attribute from outside the class. It's private, after all -- an implementation detail that outside code should never care about. 02:11
(The MOP gets a pass here because if you're doing meta-programming it's assumed you know what you're doing and accept the risks in order to create magic.) 02:12
02:13 colomon joined, noganex left
nbdsp I don't try to look at private attribute outside the class. I'd like to access the provate attribute from within the class but with name contained in a string. 02:15
02:24 Akagi201 left 02:25 Akagi201 joined 02:27 Akagi201 left
nbdsp m: class C { has $!field = "10"; method meth( ) { self.^attributes[0] = 1; } }; my $c = C.new; $c.meth( ); 02:27
camelia rakudo-moar 239d74: OUTPUT«Cannot modify an immutable Attribute␤ in method ASSIGN-POS at src/gen/m-CORE.setting:9266␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3428␤ in method meth at /tmp/zGyA_rFCE1:1␤ in block <unit> at /tmp/zGyA_rFCE1:1␤␤»
nbdsp m: class C { has $!field = "10"; method meth( ) { say self.^attributes; } }; my $c = C.new; $c.meth( ); 02:28
camelia rakudo-moar 239d74: OUTPUT«Mu $!field␤»
02:28 Akagi201 joined 02:31 vendethiel joined 02:40 raiph left, Akagi201 left 02:43 Akagi201 joined 02:44 btyler joined 02:48 anocelot joined 02:52 btyler left 02:54 Akagi201 left 02:55 vendethiel left 02:56 Akagi201 joined
nbdsp m: class C { has $!field = "10"; method meth( ) { self.^attributes[0].set_value(1); } }; my $c = C.new; $c.meth( ); 02:57
camelia rakudo-moar 239d74: OUTPUT«Too few positionals passed; expected 3 arguments but got 2␤ in method set_value at src/gen/m-CORE.setting:4058␤ in method meth at /tmp/UeY3ckQ7dH:1␤ in block <unit> at /tmp/UeY3ckQ7dH:1␤␤»
nbdsp m: class C { has $!field = "10"; method meth( ) { self.^attributes[0].set_value(self, 1); } }; my $c = C.new; $c.meth( ); 03:00
camelia ( no output )
03:06 btyler joined 03:11 uvb joined 03:13 Akagi201 left 03:14 Akagi201 joined
dalek c: d37c260 | skids++ | lib/Language/objects.pod:
Document object cloning.
03:17
03:18 El_Che left 03:20 El_Che joined 03:28 Akagi201 left 03:42 Akagi201 joined 03:44 Akagi201 left 03:46 baest_ joined 03:47 baest left 03:49 anocelot left 03:50 anocelot joined 03:51 adu joined 03:52 Alina-malina left 03:58 Akagi201 joined 03:59 BenGoldberg left, raiph joined 04:00 Akagi201 left 04:01 aborazmeh left 04:02 Akagi201 joined 04:03 spider-mario left, tinyblak_ joined 04:04 btyler left 04:05 spider-mario joined 04:07 tinyblak left 04:16 skids left 04:17 uvb left 04:19 Akagi201 left
dalek kudo-star-daily: 4688aea | coke++ | log/ (2 files):
today (automated commit)
04:23
rl6-roast-data: c900a45 | coke++ | / (9 files):
today (automated commit)
04:29 btyler joined
[Coke] I think If I needed to do lookup by name of something, I'd probably stick it in a hash instead. Not sure if that helps. 04:30
04:30 anaeem1_ joined, anaeem1_ left 04:31 anaeem1 joined 04:32 araujo joined, adu left 04:38 sterfry joined
sterfry really? 04:38
04:39 sterfry left
Zoffix heh 04:40
Drive-by incredulity.
04:51 laouji left 05:00 Alina-malina joined 05:04 lolisa joined 05:07 raiph left 05:10 dolmen joined 05:13 alini joined 05:17 silug left 05:22 lolisa left 05:23 KCL joined 05:26 KCL_ left 05:30 LordVorp left 05:32 silug joined 05:33 Perl6_newbee joined 05:41 laouji joined 05:45 Psyche^ joined 05:49 Patterner left 05:50 kaare__ joined 05:55 risou is now known as risou_awy 05:56 risou_awy is now known as risou 06:10 laouji_ joined 06:14 laouji left 06:20 sqirrel joined 06:24 pyrimidine joined 06:25 baest_ is now known as baest 06:26 baest left, baest joined, pyrimidi_ left 06:43 rindolf joined
jnthn morning, #perl6 06:43
06:44 pyrimidi_ joined 06:46 pyrimidine left 06:49 _mg_ joined 06:51 dolmen left 06:54 sqirrel left, brrt joined 06:58 Ven joined
raydiak mornin jnthn 06:59
masak mornin', #perl6 07:00
raydiak \o masak 07:01
Ven \o, masak 07:02
masak japhb: it's not so much that "public attributes and public methods are unified", it's more like "public attribute = private attribute + (autogenerated) public accessor method"...
jnthn In answer to the backlog question of "can I get 'self' through CALLER", I can confirm the answer is "no" 'cus it's not marked dynamic; moreover we actually *do* optimize the self lexical out in some cases. :) 07:03
07:04 RabidGravy joined, lizmat joined
masak good :) 07:05
lizmat good morning from the 2015 QA Hackathon in Berlin
moritz \o lizmasakjnthndiakven
masak lizmat++ # assuring quality, together with dozens others 07:06
Ven \o lizmat++
07:07 alini left
tadzik g'morning 07:09
sjn \o
jnthn waves to all at the QA Hackathon :)
07:10 tadzik is now known as QAHackathon, araujo left
QAHackathon waves back 07:10
07:10 [TuxCM] joined, QAHackathon is now known as tadzik
Ven waves at tadzikathon 07:10
07:10 araujo joined
Ven So, I was thinking of writing a quickcheck library for perl6, but then I realized -- do we get anything from encoding it there instead of in subsets/PRE/POST? 07:11
07:11 Perl6_newbee left
nine Should I be worried that I get random test failures in Inline::Perl5? Like 8 out of 20 test files die and never the same ones. 07:12
yoleaux 15 Apr 2015 22:24Z <lizmat> nine: S22:235 specifies depends as "A list of run-time dependencies, specified as C<use> strings."
synbot6 Link: design.perl6.org/S22.html#line_235
yoleaux 15 Apr 2015 22:24Z <lizmat> nine: so you can depend on a specific version / auth of a module
jnthn nine: Yes, that sounds like memory corruption-ish problems
nine jnthn: oh, the answer is much simpler than that: I have -j6 in my .proverc and apparently running those tests in parallel does not work. I guess it's got something to do with t/precomp.t 07:17
dalek p: d4b4bcc | jnthn++ | src/QRegex/P6Regex/Grammar.nqp:
Better error on solitary backtrack control.

Provide a way for Perl6::Grammar to override this to use a typed exception too.
07:20
jnthn nine: phew :)
07:23 dolmen joined
dalek kudo/nom: b55263a | jnthn++ | / (3 files):
Give a good error for solitary backtrack control.

Resolves RT #77786, which complained about a poor error for / : /.
07:24
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77786
dalek ast: 13567f2 | jnthn++ | S05-metasyntax/repeat.t:
Test for RT #77786.
07:25
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77786
Ven would it be interesting to be able to disable PRE/POST in "release mode", or should the JIT take care of optimizing these out? 07:28
07:29 Rounin joined 07:30 cschwenz joined 07:32 leont joined 07:35 spider-mario left
dalek rakudo/nom: e1e71d3 | lizmat++ | src/core/Any.pm: 07:36
rakudo/nom: Simplify dd(), make it work for expressions
rakudo/nom:
rakudo/nom: $ 6 'dd my $a = 42, 43'
rakudo/nom: $a = 42
07:36 dalek left 07:37 dalek joined, ChanServ sets mode: +v dalek
Ven Can I inspect a constructor? (to see what kind of arguments it needs). 07:41
07:45 zakharyas joined 07:49 rindolf left 07:50 Amurita joined 07:51 tinyblak_ left
Ven the problem I'm thinking of is: I want to create instances on-the-fly, but it seems hard to know which types the arguments need. I probably need to inspect the constructor, check the argument names, and if they don't have types associated, try to find a member field and check its type... 07:52
jnthn Ven: Default constructors take named arguments and have them bound to the attributes with accessors, so you can .^attributes.grep(*.has-accessor) or so 07:53
moritz Ven: what problem are you trying to solve? 07:54
Ven m: class A{has $.a = 5; submethod BUILD{}}; say A.new(:a(10)).a; A .^attributes.grep(*.has-accessor)
camelia rakudo-moar e1e71d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/a_jHoZe6Da␤Two terms in a row␤at /tmp/a_jHoZe6Da:1␤------> 3bmethod BUILD{}}; say A.new(:a(10)).a; A7⏏5 .^attributes.grep(*.has-accessor)␤ expecting any of:␤ infix␤ infix stop…»
Ven m: class A{has $.a = 5; submethod BUILD{}}; say A.new(:a(10)).a; say A.^attributes.grep(*.has-accessor)
camelia rakudo-moar e1e71d: OUTPUT«5␤Mu $!a␤»
Ven jnthn: ^ what about this? I need to check for an user-defined constructor basically?
moritz Ven: 'cause if there's only a limited set of possible keys, you can just pass them all to .new
Ven: that way (introspecting the objects) lies madness
DrForr Incidentally there's now a Perl6 FB group, if anyone's at all interested. 07:55
Ven moritz: I wanted to write a quickcheck-like (the "like" is important) library for perl6, and I'm thinking on how I can create instances "for you"
nine JSON::Tiny failes with: # Failed test 'Hash of Stuff'
# at t/04-roundtrip.t line 39
# expected: {:!keyfive, :keyfour(4), :keyone(["an", "array"]), :keyseven(3.2), :keysix, :keythree({:another("hash")}), :keytwo("A string")}
07:55 dolmen left
nine # got: {:!keyfive, :keyfour(4), :keyone(["an", "array"]), :keyseven(3.2), :keysix, :keythree({:another("hash")}), :keytwo("A string")} 07:55
moritz Ven: ok, then you'll have to make do with approximations 07:56
Ven moritz: that's what I don't want to do :P 07:57
07:58 tinyblak joined
moritz Ven: then have fun solving the Halting problem 07:58
nine It's about time someone solved that
Ven moritz: what needs solving the halting problem?
and why do everyone throws the halting problem around all the time? :P
moritz Ven: you can't really know what the new, BUILD and BUILDALL methods do if one or more of them is overridden
Ven moritz: I don't need to 07:59
I need to call them with the correctly-typed arguments, that's all
moritz Ven: if you don't want to make do with approximations, you have to
Ven I'll probably add a "register_type(Mu:U, Callable)".
07:59 abraxxa joined, tinyblak left
Ven m: say :{}.WHAT.perl 08:01
camelia rakudo-moar e1e71d: OUTPUT«Hash[Mu,Any]␤»
Ven m: say :{Int, 5}{Int}; say :{x => 2, Int, 5}{Int} 08:02
camelia rakudo-moar e1e71d: OUTPUT«postcircumfix:<{ }> not defined for type Block␤ in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3671␤ in block <unit> at /tmp/b71nAj4lnj:1␤␤»
Ven EMOREPARENTHESES 08:04
08:07 nbdsp left 08:12 darutoko joined
nine Is there a way to declare a multi candidate with a fixed value for a named argument? multi foo(Str :$foo) { ... } 08:14
multi foo(Str :$foo where { $foo eq 'foo' }) { ... } like this but without having to use a where block? 08:15
jnthn Not afaik, but you can write that as "where 'foo'" 08:16
08:19 telex left 08:20 leont left, telex joined, tinyblak joined
nine jnthn: thanks! This also fixed my JSON::Tiny failures?! 08:21
moritz nine: note that named params play a secondary role in multi dispatch 08:25
nine: so dispatching mostly one a named param is usually a bad idea 08:26
nine moritz: I guess I don't have much choice. My candidate is multi sub EVAL(Cool $code, :$lang where { $lang // '' eq 'perl5' }, PseudoStash :$context) 08:27
08:28 FROGGS joined 08:29 donaldh joined
moritz nine: ok 08:30
08:31 laouji_ left
Ven can I inspect a subset's where? 08:32
08:32 andreoss` joined, laouji joined
jnthn m: $subset-type.^refinement 08:32
camelia rakudo-moar e1e71d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uqYomkocz6␤Variable '$subset-type' is not declared␤at /tmp/uqYomkocz6:1␤------> 3$subset-type.^refinement7⏏5<EOL>␤ expecting any of:␤ method arguments␤»
jnthn oops 08:33
didn't mean to m: it :)
Ven mumbles something about said halting problem... :)
m: subset Foo of Int where 10..50; say Foo.WHAT; say Foo.^refinement; 08:34
camelia rakudo-moar e1e71d: OUTPUT«(Foo)␤-> ($_) { #`(Block|65247216) ... }␤»
Ven it's always translated to a block, sadly. means I can't use that to generate anything
FROGGS o/ 08:38
jnthn o/ FROGGS 08:39
Ven mmh, I need to "ok" inside of my quickchecker, but then how to prettify stacktraces... 08:41
o/ FROGGS !
dalek ecs: d702a9e | (Cédric VINCENT)++ | S17-concurrency.pod:
Fix .cue parameter names.
08:42
psch m: multi f("a") { say "a!" }; multi f(Str $a) { say "$a?!" }; f "ab"; f "a" 08:44
camelia rakudo-moar e1e71d: OUTPUT«ab?!␤a!␤»
08:45 dakkar joined
psch nine: literal as positional parameter just works, from the looks of it 08:45
iohh 08:46
yeah
that's why it was asked for named
psch goes to get more coffee
Ven should a quickcheck use "ok" for its invariant checking, and should it print the generated value in the "ok"'s "description"? 08:47
dalek Heuristic branch merge: pushed 299 commits to rakudo/tab-completion by FROGGS 08:48
08:48 leont joined
nwc10 good *, leont 08:48
Ven should Perl6 come bundled with types such as NegativeInt, PositiveInt? I thought about "RangedInt", but we can't have compile-time "parameters" to subset (I'm thinking of template<int from, int to> using range = from..to or something) 08:50
lizmat
.oO( PInt :-)
08:52
Ven m: my %h = :{(Int) => { round rand * 1000 }, DEFAULT => 5} # mmh? Pretty please? 08:53
camelia rakudo-moar e1e71d: OUTPUT«use of uninitialized value of type Int in string context in block <unit> at /tmp/M5rbDfbi8r:1␤␤Saw 1 call to deprecated code during execution.␤================================================================================␤%h = itemized hash call…»
leont Oh hai 08:54
jnthn Ven: You'd want := there
Ven m: my %h := :{(Int) => { round rand * 1000 }, DEFAULT => 5} # mmh? Pretty please?
camelia ( no output )
Ven jnthn: or should I use a scalar instead? 08:55
(because I can't use := for an attribute)
08:56 Ven left
jnthn Ven: could do 08:57
09:00 flaf_ joined 09:01 leont left 09:02 flaf_ left, Ven joined 09:04 pippo joined
pippo m: my $a = 42; dd $a; 09:05
camelia rakudo-moar e1e71d: OUTPUT«$a = 42␤»
pippo On the REPL I also have "cannot stringify this". Is it OK? 09:06
dalek kudo/nom: d8ec4d1 | jnthn++ | src/Perl6/Grammar.nqp:
Toss unused dynamic.
kudo/nom: 753dae8 | jnthn++ | src/Perl6/Grammar.nqp:
Add %*PRAGMAS as a first step to lexical pragmas.

For now this will just let us get things like MONKEY-TYPING and soft to behave lexically; the key driver is to support upcoming refactor of how "use fatal;" works, however.
09:06 tinyblak left 09:07 tinyblak joined
tadzik pippo: same here, looks like the REPL is trying to stringify the return value of dd 09:07
and what that is, I have no idea
before you asked I didn't know dd existed :) 09:08
pippo :-)
09:08 espadrine joined 09:09 _mg_ left
pippo That means that I hove no local pb. Thank you tadzik. 09:10
dalek kudo/nom: b3292f6 | jnthn++ | src/Perl6/Grammar.nqp:
Make 'use MONKEY-TYPING' lexical.
kudo/nom: b220d9a | jnthn++ | src/Perl6/ (2 files):
Make 'use soft' lexical.
pippo o/
09:10 pippo left
Ven mmh, can I split my test plans? 09:10
09:11 tinyblak left
Ven The basic idea -- I want Sixcheck.check to run :$iterations tests, but each call to Sixcheck.check must have its own plan... 09:11
dalek Heuristic branch merge: pushed 120 commits to nqp/no-readlineint by FROGGS 09:12
line-Perl5: e939cf1 | (Stefan Seifert)++ | / (2 files):
Fix passing arrays to P5 callables

Arrays were always flattened. Fixed to pass them as arrayrefs instead.
Uncovered by roast++
nwc10 Ven: Yes, the test harness certainly supports that 09:13
jnthn Ven: Sonds like subtests 09:14
*sounds
Test.pm supports those.
nwc10 but I don't know how to get the test modules to do subtests.
Ven goes off to Google
[ptc] Ven: no need to google: doc.perl6.org/language/testing
masak I wonder if there would be a market demand for a Perl 6 module that provided an object-oriented API to regex ASTs. 09:16
i.e. build your regex programmatically. or take a given regex and traverse its AST.
Ven [ptc]: google gave me that link :)
jnthn masak: I'd figured that'd fall under the QTree work :)
masak jnthn: it sure would. 09:17
dalek kudo/nom: 7adc750 | lizmat++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Improve Invocant requires a type object message

  - show the name of the object
  - if an instance was needed, nudge towards a possibly missing .new
kudo/nom: d603ba4 | lizmat++ | src/core/Attribute.pm:
Auto-generated accessors need an instance now

This improves the error:
   Cannot look up attributes in a type object
now to:
   Invocant requires a 'Foo' instance, but a type object was passed.
   Did you forget a .new?
masak jnthn: but it strikes me that this could be cheated long before Qtree is in place.
Ven subtests work, amazing
masak jnthn: and maybe it'd give useful clues/hints on how Qtree oughta work, too.
lizmat Ven: they have been for a while :-) 09:18
[ptc] Ven: great!
Ven EDIDNTKNOW
masak jnthn: OO'd regex building could be cheated worst-case with EVAL. introspection would probably have to drop down to the nqp level, I guess.
lizmat don't look at the way it is coded, though :-) It's very Perl 4ish
masak lizmat++ # better error messages 09:19
[ptc] Ven: was talking to steven++ about misleading perl6 doc links at nlpw and he said he'd not found doc.perl6.org in that which google spits out
masak that's QA! :)
nine lizmat++ waking us up occasionally by pinging
Ven [ptc]: my google might be biased :)
[ptc] Ven: glad to hear that doc.perl6.org has gone up a bit in Google's ranking :-)
masak lizmat++ # nice to hear that ping :) 09:20
09:20 vendethiel joined
dalek pan style="color: #395be5">perl6-examples: 6052e63 | paultcochrane++ | lib/HomePage.pod:
Add missing categories to HomePage

Thanks to japh++ for pointing this out
09:21
kudo/nom: bf00dd1 | jnthn++ | src/Perl6/Optimizer.nqp:
Explicitly detect Failure in constant folding.

Before, we set $*FATAL, but since "use fatal" isn't meant to be done that way, we can't use this approach any more.
09:22
kudo/nom: db45d92 | jnthn++ | src/ (4 files):
Re-implement 'use fatal' to be more correct.

Per TimToady++, a dynamic variable is the wrong approach. Rather, we should do it by AST re-writing in the leixcal scope where 'use fatal' is in force. This is a first attempt at implementing that. It's good enough to pass all of the spectests that the previous 'use fatal' implementation did. $*FATAL goes away as a result.
09:27 Ven left
dalek ast: 7d91cd7 | jnthn++ | S04-exceptions/fail.t:
More tests for 'use fatal' and boolifiers.
09:30
ast: 0251db6 | jnthn++ | S32-exceptions/misc.t:
Test 'use MONKEY-TYPING' acts lexically.
09:34 Ven joined 09:35 andreoss` left
Ven my very basic idea: github.com/vendethiel/Sixcheck/blo...ate.t#L17. my very basic implem: github.com/vendethiel/Sixcheck/blo...eck.pm#L27 09:35
should "check-sub" (or check-code or check-callable) call every single .candidates? 09:36
dalek kudo/nom: b2a928e | jnthn++ | src/Perl6/Actions.nqp:
Add defined to 'use fatal' defusers.
09:36 leont joined
dalek ast: be7773b | jnthn++ | S04-exceptions/fail.t:
Test 'use fatal' respects defined also.
09:36
kudo/nom: b8f4051 | peschwa++ | src/core/Any.pm:
Don't implicitly return a VM array from &dd.
09:37
psch &dd shouldn't be hot enough to not want an explicit return, i hope
dalek kudo/nom: df38418 | lizmat++ | src/core/Attribute.pm:
Hide auto-generated accessors from backtraces

There is no point in guiding developers to the location in the core settings where they are generated!
09:39
lizmat psch: dd is supposed a debugging aid to be called in sink context 09:40
Ven lizmat++ # good catch
psch lizmat: so it's not supposed to be used as the last statement in the REPL?
lizmat: because that's where the VM array can't be stringified
lizmat ah, ok
makes sense :-)
lizmat hardly ever uses the REPL 09:41
dalek kudo/newio: b55263a | jnthn++ | / (3 files):
Give a good error for solitary backtrack control.

Resolves RT #77786, which complained about a poor error for / : /.
09:42
09:42 dalek left
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77786 09:42
09:43 dalek joined, ChanServ sets mode: +v dalek
masak ooh, that was one of mine. jnthn++ 09:43
Ven m: for ^10 -> Int $i { $i.say }
camelia rakudo-moar 753dae: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
09:45 leont left, vendethiel left
Ven m: my @args = do for ^10 { "hey" when 1; "bar" when 2; "baz" when 3; default { $_ } }; say @args; 09:46
camelia rakudo-moar 753dae: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
Ven m: my @args = do for ^10 { when 1 { "hey" }; when 2 { "bar" }; when 3{"baz"}; default { $_ } }; say @args; # I need to remember this 09:47
camelia rakudo-moar 753dae: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FgUWYzoNva␤Missing block␤at /tmp/FgUWYzoNva:1␤------> 3"hey" }; when 2 { "bar" }; when 3{"baz"}7⏏5; default { $_ } }; say @args; # I need␤ expecting any of:␤ parameterized block␤»
Ven m: my @args = do for ^10 { when 1 { "hey" }; when 2 { "bar" }; when 3 {"baz"}; default { $_ } }; say @args; # I need to remember this
camelia rakudo-moar 753dae: OUTPUT«0 hey bar baz 4 5 6 7 8 9␤»
09:47 konsolebox joined, konsolebox left 09:48 konsolebox joined, pecastro left
dalek kudo/nom: 9dada5e | usev6++ | src/core/Cool.pm:
Make .subst-mutate on non-strings return match object(s)
09:48
ast: 8986659 | peschwa++ | S05-substitution/subst.t:
Add test for PR #403.
09:49
psch hm
so i've merged the PR manually, does github realizse that?
or do i just "Close and comment"?
tadzik it should realize
usually does for me
psch hm 09:50
09:53 pecastro joined
psch i'm making a mess again it seems :P 09:53
tadzik: so i still click "Merge PR" on github? 10:02
jnthn psch: Probably you want to just comment you merged it manually and press "comment and close"
tadzik psch: did you push after merging? :) 10:03
psch tadzik: yeah, it's the one reported by dalek credited a usev6 a few minutes ago
jnthn: aw shucks, so i did it right all along and made a mess out of insecurity? :) 10:04
oh
i think i know the problem
i apparently missed --no-ff
'cause there's no merge commit
grml 10:05
jnthn Well, you maybe rebased or avoided the merge commit, which is good, but may have thrown github off
I'm happy not to litter history with lots of merge commits, though :)
10:07 tinyblak joined
psch it's a bit unfortunate that github doesn't think that the right way to merge though 10:08
seeing as PRs can be "closed" or "merged", with no way to decide that directly
nwc10 sadly github has made some daft choices. 10:11
torturing users for the benefit of implementors
10:11 laouji left 10:12 laouji joined 10:13 _mg_ joined, tinyblak left
psch i'm wondering if #299 actually has any merit 10:15
on the one hand it simplies the code in make_smartmatch and fits StrDistance into the ACCEPTS interface, but on the other it's probably a tad slower and the ACCEPTS method looks weird to me 10:16
github.com/rakudo/rakudo/pull/299/files for reference
FROGGS psch: is it really slower? 10:17
psch FROGGS: right, don't guess, meassure :)
dalek kudo/nom: 225d3d8 | jnthn++ | src/Perl6/Actions.nqp:
s/QAST::Stmt/QAST::Stmts/ in p6fatalize code-gen.

Otherwise we can cause premature reclaim of various locals.
kudo/nom: 89ed334 | jnthn++ | src/Perl6/Actions.nqp:
It's Failure.sink, not Failure.Sink.
kudo/nom: b3a5c79 | jnthn++ | src/Perl6/Actions.nqp:
Fix incorrect fatalization of method calls.

They get wrapped in hllize, and that should be transparent to the "in boolean context".
line-Perl5: 913a47a | (Stefan Seifert)++ | / (2 files):
Prevent inherited Any methods from interfering with calls to P5 methods

Perl5Object inherits methods like "push" and "list" from Any. This prevents the fallback that passes calls to such methods to the wrapped P5 object from kicking in. Work around that by explicitly adding wrapper methods.
Thanks to lizmat++ for giving the inspiration.
ast/fudge: 09d96ff | usev6++ | t/README:
Add dir to test fudge itself
tadzik masak: yt?
psch i'll bench it first 10:18
nine woohoo...this should fix most of the gotchas I mentioned in my FOSDEM talk :)
tadzik noice :)
masak tadzik: kinda. 10:19
10:19 cognominal joined
tadzik masak: I'm trying to find the author of topo-sort, that was imported into Panda::Builder from ufo, I believe 10:21
or otherwise someone who could help me understand where and why it stringifies what it gets
colomon twas masak++, wasn’t it? 10:22
tadzik I think so
masak I wrote the original for ufo.
I believe moritz++ copied it into panda, perhaps?
tadzik: could you link me to the line and file in panda? 10:23
tadzik well, I'm not trying to assign the blame :)
masak: yes, will push it in a moment
10:24 rindolf joined
Ven Would it make sense to have Int.pick / Int.roll? 10:24
DrForr Sounds rather Postscript :) 10:26
jnthn Ven: Not really given it's arbitrary precision. 10:27
lizmat int8.pick might make sense 10:28
Ven jnthn: so I should just go with (-5000..5000).pick, say?
lizmat m: int8.Range.pick.say
camelia rakudo-moar 9dada5: OUTPUT«-31␤»
lizmat m: uint8.Range.pick.say
camelia rakudo-moar 9dada5: OUTPUT«253␤»
lizmat m: uint8.Range.pick.say
camelia rakudo-moar 9dada5: OUTPUT«33␤»
lizmat m: uint8.Range.pick(*).say
camelia rakudo-moar 9dada5: OUTPUT«5 77 207 231 175 204 19 111 143 251 190 188 174 209 164 232 160 149 23 106 39 163 124 219 199 123 211 72 89 221 25 127 138 234 217 182 22 82 248 215 141 36 133 17 31 26 27 101 189 192 59 132 226 206 15 6 220 94 95 158 21 41 99 84 58 33 156 125 44 246 148 2…»
10:29 Amurita left, diana_olhovik_ joined, aborazmeh joined, aborazmeh left, aborazmeh joined, leont joined
dalek ast: 410bcb4 | jnthn++ | S32-str/numeric.t:
Adapt test in prep for try doing 'use fatal'.
10:29
tadzik masak: github.com/tadzik/panda/blob/revde...em.pm#L150 10:30
masak: I'm passing a list of Panda::Project-s into topo-sort, and the dependency tree. topo-sort does its magic but sometimes (!) it gives me back a string instead of Panda::Project 10:31
dalek ast/fudge: 609a62b | FROGGS++ | t/fudge.t:
add test file to test fudge in-/outputs
10:33
nine We're using title case for use :from<Perl5> but EVAL still defaults to $lang = 'perl6'. Should the latter be using title case as well? Would be more consistent. 10:34
psch four runs each with 10000 iterations of the same transliterations give me between .05 and .2 faster runtime with ACCEPTS instead of special casing in make_smartmatch 10:35
10:35 brrt left
psch on hack, which i guess might be just noise 10:35
nwc10 measure it with cachegrind? 10:36
which will count the instructions
psch nwc10: how do i do that?
nwc10 OK, given that perl6-m is not (yet) a real executable, but a shell script
and valgrind doesn't cope with a shell script 10:37
if you were testing it as
./perl6-m foo ...
then do this:
cat perl6-m
lizmat m: my Int @y = 2..3,5..*; say @y.map( { say $_ >= @y.gimme( $_ + 1 ); last } ) # Tux's problem golfed down
camelia rakudo-moar 9dada5: OUTPUT«False␤␤»
nwc10 which gives you something like:
lizmat that should be True
nwc10 #!/bin/sh
exec /home/nc/Sandpit/moar-O2/bin/moar --execname="$0" --libpath="/home/nc/Sandpit/moar-O2/share/nqp/lib" --libpath="." /home/nc/Perl/rakudo/perl6.moarvm "$@"
RabidGravy In the "Obsolete Functions" section of S29 it says several times "The NameServices role in S16 covers most of these." but there is no apparent mention of the "NameServices role" in S16 that I can see 10:38
nwc10 take that second line
grab this bit:
exec /home/nc/Sandpit/moar-O2/bin/moar --execname="$0" --libpath="/home/nc/Sandpit/moar-O2/share/nqp/lib" --libpath="." /home/nc/Perl/rakudo/perl6.moarvm "$@"
and go
psch nwc10: yeah, i know about that. i don't know how to invoke cachegrind, but it's apparently a valgrind flag
sorry for being unclear there :)
nwc10 valgrind --tool=cachegrind /home/nc/Sandpit/moar-O2/bin/moar --execname="$0" --libpath="/home/nc/Sandpit/moar-O2/share/nqp/lib" --libpath="." /home/nc/Perl/rakudo/perl6.moarvm foo ...
OK, sorry, guessed the detail a bit wrong
Ven m: subset MultiSub of Sub where *.candidates.elems > 1; sub x(MultiSub){}; multi sub f(Int){}; multi sub f(Str){}; x(&f);
camelia rakudo-moar 9dada5: OUTPUT«Cannot look up attributes in a type object␤ in sub x at /tmp/_ZpFkDXORn:1␤ in block <unit> at /tmp/_ZpFkDXORn:1␤␤»
Ven ^ jnthn: does that look like a bug? 10:39
nwc10 I think that last bit is what you need
10:39 _mg_ left
nwc10 you can probably drop the --execname="$0" bit 10:39
but I've not bothered
10:40 _mg_ joined
psch not having --execname can through "uninitialized value of type Str" iirc 10:41
*throw
masak tadzik: looking.
10:41 mr-fooba_ left
dalek ast/fudge: 1c13068 | usev6++ | t/README:
Add minimial explanation to README
10:45
ast/fudge: 57211c4 | usev6++ | t/01-implname. (3 files):
Add example in-/output to test 'implname'
10:46 rurban_ joined
psch hm, pretty much all numbers are bigger with ACCEPTS :) 10:46
psch goes to read up how to read cachegrind output 10:47
masak tadzik: there's nothing in that code that suggests to me that topo-sort would stringify. 10:48
tadzik masak: yeah, invisible for me too :/
masak tadzik: rather, I'd look at the earlier parts of revdeps.
tadzik: maybe try to run revdeps and topo-sort in isolation, mocking the rest, trying to reproduce the stringification thing under known circumstances. 10:49
tadzik no, I checked before and after the call to topo-sort
somewhere there Panda::Project(panda) turns into 'panda'
yeah, I'll try that
masak the only thing is that there are some hashes involved whose key type is Str()
tadzik well, it doesn't have to be
masak but looking at topo-sort, I don't really see how that would make the list of returned modules strings. 10:50
tadzik we do have hashes on objects, there's nothing in topo-sort that turns those into strings
nine What does \%hash mean exactly in Perl 6?
jnthn Ven: Looks like, yes. 10:51
masak m: my %hash; say %hash.WHAT; say (\%hash).WHAT
camelia rakudo-moar b3a5c7: OUTPUT«(Hash)␤(Capture)␤»
10:51 Ven left
masak nine: takes a Capture of the hash. kind of like a reference to it. 10:51
psch m: my %h; say \%h ~~ :(%)
camelia rakudo-moar b3a5c7: OUTPUT«True␤»
psch nine: doc.perl6.org/type/Capture 10:52
masak tadzik: right. aka "inexplicable" or "this shouldn't happen"
psch "The flip-side of Signatures"
masak tadzik: which is why I'm really interested in an isolated case where it's reproduced :)
tadzik yeah
masak psch: right, that's a good way of saying it. Signatures are what declare parameters in the callee; Captures bundle up arguments at the call site. 10:53
nine masak: so does line 38 in S01-perl-5-integration/basic.t make sense? { my $test = '%h.kv received as hash'; my ($k,$v) = $p5_dumper(%h.kv);
masak: sorry, wrong line 10:54
masak: { my $test = '\%h received as hashref'; my %o := $p5_dumper(\%h); is(%o<a>, 1, $test);
lizmat m: my @a; say @a[^Inf].perl # better golf of Tux's problem
camelia rakudo-moar b3a5c7: OUTPUT«()␤»
lizmat do we consider this to be correct or not? 10:55
psch masak: skids++ then, he's apparently the one who wrote that to doc.perl6.org :)
jnthn lizmat: I think that one is correct
masak nine: think so. that'd be kind of like passing `$%h` in Perl 5.
lizmat m: my @a; say @a[^4].perl # is this?
masak er.
camelia rakudo-moar b3a5c7: OUTPUT«()␤»
masak kind of like passing `\%h` in Perl 5.
jnthn lizmat: That one I'm less sure on; would need to see the design docs.
nine masak: to me \%hash looks like Perl 5 while $%hash would be the Perl 6 equivalent 10:56
lizmat m: my @a; say @a[0,1,2,3].perl # is this?
camelia rakudo-moar b3a5c7: OUTPUT«(Any, Any, Any, Any)␤»
10:57 _mg_ left
jnthn lizmat: Pretty sure that one is correct. 10:57
masak nine: yeah, I was confused there for a while.
jnthn lizmat: If it wasn't you couldn't say @a[0,1,2,3] = ...; 10:58
lizmat jnthn: but how is 0,1,2,3 different from ^4 ?
masak nine: but functionally \%h in Perl 6 is quite similar to \%h in Perl 5.
jnthn lizmat: The first is a list, the second is a range object. I agree it's weird they differ; again, we should check design docs to see if they have any hint,s but my guess is it's an accidental over-generalization of ^Inf handling. 10:59
psch m: sub f (%h) { say %h.perl }; my %h = 1..4; f(%h); f(\%h)
camelia rakudo-moar b3a5c7: OUTPUT«{"1" => 2, "3" => 4}<>␤Type check failed in binding %h; expected 'Associative' but got 'Capture'␤ in sub f at /tmp/m1Yy8hxkXO:1␤ in block <unit> at /tmp/m1Yy8hxkXO:1␤␤»
lizmat well, the former when used as an array index, does not check the result of gimme() on the array 11:00
psch aiui, Captures usually want to smartmatch against of be flatted into a Signature
nwc10 www.youtube.com/watch?v=BhMSzC1crr...e=youtu.be
lizmat the latter does, hence it produces an empty list
nwc10 poor thing. you can see it firing the lateral thruster just after it landed
lizmat nwc10: and when it starts going wrong, it fires the lateral thruster on the wrong side quite aggresively as if to hasten the blowup 11:01
dalek ast/fudge: 049e6b4 | FROGGS++ | t/fudge.t:
run our first two fudge tests
11:02
ast: de516e7 | jnthn++ | S02-names-vars/names.t:
Fix an overly-specific test.

The message it was looking for is gone soon; throwing an exception on asking for a type check causes too much pain.
11:04
11:04 anaeem1 left
dalek kudo/nom: 3fb51c7 | jnthn++ | src/core/ (2 files):
Declare Failure early, in prep for fatalizing try.

We'll need it stubbed before encountering the first 'try' in the setting.
11:04
hahainternet lizmat: they were experiencing control system lag 11:05
you can see the oscillations it's causing 11:06
and how the last firing was clearly significantly late
they've definitely got this next time
dalek kudo/nom: 0a122c6 | jnthn++ | src/Perl6/Actions.nqp:
Don't re-visit things when fatalizing.

Avoids getting duplicate p6fatalize insertions in the tree.
11:07
kudo/nom: d4cc3d9 | jnthn++ | src/core/Str.pm:
Make :37<a> a Failure, not an exception.

It now matches the other failrure modes of Str.Numeric, which also fail rather that die. (Note that the exception was thrown by the nqp::radix_I op before.)
nine masak: sorry, this still doesn't make any sense to me. Capture is Positional. It's a kind of a list. In my eyes this is far away from a reference in Perl 5.
dalek ecs: e32d821 | (Cédric VINCENT)++ | S17-concurrency.pod:
s/excuse/cause/ for Promise.
11:08
11:09 tinyblak joined 11:13 eli-se joined
eli-se hmm 11:13
.botsnack
yoleaux :D
synbot6 om nom nom
eli-se It should be possible to make yoleaux go OOM.
11:15 tinyblak left
dalek kudo/nom: 04f78eb | jnthn++ | src/Perl6/Metamodel/GenericHOW.nqp:
Don't explode on trying to type-check type var.

It gives little benefit, at the cost of having to guard various kinds of type check against it.
11:15
kudo/nom: e843eff | jnthn++ | src/Perl6/Actions.nqp:
Don't lose returns on call node when fatalizing.
eli-se it converts arbitrary user input into Ruby symbols, for which the memory is never freed
11:17 abraxxa left
dalek kudo/nom: ce73705 | jnthn++ | src/Perl6/Actions.nqp:
Unbust hash/block distinction under 'use fatal'.
11:18
11:19 eli-se left 11:20 vendethiel joined 11:21 _mg_ joined
dalek kudo/nom: d9fc6c6 | jnthn++ | src/Perl6/Actions.nqp:
Correctly fatalize code in thunks.
11:23
11:24 brrt joined
psch hm, maybe i confused the two pastes before 11:28
right now i get ~12M less I refs
which sounds kind of much
dalek kudo/nom: 2a3e1bf | jnthn++ | src/Perl6/Grammar.nqp:
Apply 'use fatal' inside of try blocks.

This brings us in line with S04. The new 'use fatal' implementation does not cause action-at-a-distance. Only one spectest needed some adaptation for this change, so hopefully fallout in the ecosystem will be rather minimal.
11:29
ast/fudge: 17504b1 | usev6++ | t/02-version. (3 files):
Add example in-/output to test 'version'
11:31
lizmat m: try die 11:32
camelia ( no output )
jnthn m: try +'foo' 11:33
camelia rakudo-moar d4cc3d: OUTPUT«Unhandled exception: Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/…»
jnthn m: try ...
camelia rakudo-moar d4cc3d: OUTPUT«Unhandled exception: Stub code executed␤ at src/gen/m-CORE.setting:14345 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:throw:121)␤ from src/gen/m-CORE.setting:16201 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.settin…»
jnthn Both of these are fixed
lizmat jnthn++ 11:34
dalek ast: cfd0c6b | jnthn++ | S04-statements/try.t:
Unfudge tests for RT #123053.
11:37
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123053
11:38 eternaleye left 11:39 aborazmeh left
dalek ast: 800eff0 | jnthn++ | S04-statements/try.t:
Tests for RT #117217.
11:40
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117217
11:40 eternaleye joined
dalek line-Perl5: 020dcff | (Stefan Seifert)++ | / (2 files):
Make Perl5Callables real Callables
11:41
nine This is madness! my $self = "some text"; is ~EVAL(q/"self is $self"/,:lang<perl5>),"self is some text","lexical inside an EVAL"; 11:44
sjn a/me managed to get Perl6 into a Computerworld article :D (in Norwegian, but still... :) www.cw.no/artikkel/utvikling/samfun...konferanse 11:45
11:46 chenryn joined
tadzik awesome :) 11:46
lizmat jnthn: bare startup time has gone up from .16 to .20 for me
jnthn nine: Nice! 11:47
lizmat: Do you know exactly when-ish?
lizmat today
:-(
11:47 andreoss` joined
lizmat sort of bisecting now 11:48
nwc10 I think I noticed it yesterday
lizmat ah, ok
that could be
jnthn OK. I need to eat somehting...bbi15
lizmat the last commit 2a3e1bfbae669ffc took it from .19 to .20 for me 11:49
11:49 _mg_ left 11:50 aborazmeh joined, aborazmeh left, aborazmeh joined, konsolebox left 11:51 Alina-malina left, laouji left, Alina-malina joined
brrt is there a perl6 way to get assign a container directly to a class attribute 11:51
like 11:52
m: my $a = 3; my $b := $a; $a *= 3; say $b;
camelia rakudo-moar 2a3e1b: OUTPUT«9␤»
11:52 Ven joined
brrt ... but for attributes 11:52
Ven jnthn: noted, thanks. I'll find a way to work around it for now
the "problem" 5..* is that it can change meaning based on its context 11:53
(I hit that trying `@a[5..*] = infinite-list`) 11:54
dalek ast/fudge: e998023 | usev6++ | t/02-version. (4 files):
Fix expected output for skipped tests; add another output example
11:57
andreoss` is rakudo running on cygwin?
Ven .tell eli-se ruby symbols are GC'd 11:58
yoleaux Ven: I'll pass your message to eli-se.
Ven andreoss`: it runs fine in cmd.exe :)
brrt andreoss`: the rakudo star packages are actually windows-native (i.e compiled with the whole visual studio shebang)
lizmat m: class A { has $.b is rw }; my $a = A.new; $a.b = 42; say $a.b # brrt, this what you mean? 11:59
camelia rakudo-moar 2a3e1b: OUTPUT«42␤»
andreoss` i want normal paths
brrt lizmat: maybe :-), lets try
nine jnthn: just to be clear. The line I posted is _not_ working right now. Many other tests in S01-perl-5-integration do however
andreoss` windows-native build doens't run inside cygwin
11:59 anaeem1 joined
Ven andreoss`: normal path? a/b/c works inside cmd 12:00
brrt m: class A { has $.b is rw }; my $a = A.new; my $b = 42; $a.b = $b; $b *= 2; say $a.b;
camelia rakudo-moar 2a3e1b: OUTPUT«42␤»
brrt m: class A { has $.b is rw }; my $a = A.new; my $b = 42; $a.b := $b; $b *= 2; say $a.b;
camelia rakudo-moar 2a3e1b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2HDmOdBlFs␤Cannot use bind operator with this left-hand side␤at /tmp/2HDmOdBlFs:1␤------> 3}; my $a = A.new; my $b = 42; $a.b := $b7⏏5; $b *= 2; say $a.b;␤»
brrt i had expected that, yes
lizmat I wonder if that's a shortcoming of the autogenerated accessor 12:01
RabidGravy andreoss`, I'd be suprised if it wouldn't build for cygwin, assuming all the dependencies are met
andreoss` ok..i will give it a try, since rakudobrew already failed on cygwin 12:02
brrt i wonder...
12:03 tinyblak joined
lizmat fwiw, the newio branch doesn't have any specific Cygwin support anymore 12:03
andreoss` Ven: i didn't know about this feature, still no normal escaping though
12:03 tinyblak_ joined
Ven normal escaping? 12:03
12:03 konsolebox joined
brrt m: class A { has $.b; method set-b($b is rw) { $!b := $b; } }; my $a = A.new; my $b = 21; $a.set-b($b); $b *= 2; say $a.b; 12:04
camelia rakudo-moar 2a3e1b: OUTPUT«42␤»
andreoss` Ven: '' "" are different from UNIX
brrt the key question is of course, which of these is expected
Ven Yes, use "", escaping works inside :P
12:05 konsolebox left, konsolebox joined
andreoss` i better run cygwin bash, less pain 12:05
12:06 mr-foobar joined, aborazmeh left 12:07 Ven left, tinyblak left
brrt i'd argue that the current behavior is expected. binding is a low-level concept that should probably not sneak up on you 12:08
why the asking? i'm thinking of writing a (scientific) modelling library with perl6 12:09
because perl6 is actually a really nice language to write something like that in 12:10
moritz brrt: which is why I wrote Math::Model in it :-)
12:10 Ven joined
brrt oh you did that? awesome 12:10
12:10 andreoss` left
moritz (though that's just a fancy way to write and integrate a system of PDEs) 12:10
tadzik masak: mystery solved :) 12:11
dalek ast/fudge: 11c2412 | usev6++ | t/02-version.out_v6. (3 files):
Use required versions as default for description of skipped tests
brrt that's basically what i need, too
tadzik or so I think
12:12 chenryn left
brrt 'Math::RungeKutta has last been verified to work on contemporary rakudo on 2011-02-13.' 12:13
Ven should quickcheck stop on the first "wrong" value it's found? (effectively only planning one test)
masak tadzik: tell me tell me
moritz brrt: that information is out of date; it used to be in star until 2015.01 or so
12:14 anaeem1 left
brrt ah ok, so it'll probably just work 12:14
12:14 chenryn joined
moritz brrt: yes; and if not, do tell me :-) 12:14
tadzik masak: so, there's the dependencies hash
it's values will sometimes end up in @order
and those values were strings
brrt btw, what is the perl6 stance on modules? very many small ones or a small number of do-it-alls
masak ok, so the reason we suspected 12:15
tadzik yeah, something was leaking after all :)
masak tadzik: oh, the hash *values*!
I see now.
nine How's v5 doing these days?
masak tadzik: I guess topo-sort could easily be rewritten so that the values are always objects.
tadzik masak: well, they can be 12:16
but if you pass Str in, Str will get out too :)
jnthn nine: Oh, it'd be a cool thing to make work though:)
moritz brrt: I don't think there's a shared stance
tadzik I also simplified it a little bit, because the 'color-of' confused me
I mean, I'm not used to calling things that are black and white colored :) 12:17
moritz brrt: all I can say is that when people contribute usefull stuff to my modules, I usually accept :-)
(maybe with the exception of JSON::Tiny, which should stay ::Tiny)
tadzik so I turned that into %visited which holds bools, and now it reads nicely
brrt right
masak sjn++ # www.cw.no/artikkel/utvikling/samfun...konferanse 12:18
nine jnthn: I think this is the first time that I have no idea whatsoever how I could implement that :) And I'm really not sure if the feature is worth it. Haven't come across a use case so far.
masak tadzik: I think it makes more sense in the original code.
jnthn lizmat: Hm, that is only 0.01 different, though, not the whole thing...
masak tadzik: a real bfs has three colors: black, grey, white.
tadzik: they kind of mean "unseen", "seen but not visited", "visited", respectively
tadzik masak: yeah, but this isn't bfs :) 12:19
12:19 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
tadzik it's dfs 12:19
masak hm, you're right.
yeah, then the naming doesn't make sense.
or maybe it does, but the reason was lost along the way.
brrt afk
12:19 brrt left
tadzik ISTR this code looking differently 12:20
masak: oh, it used to have black-white-grey 12:21
jnthn lizmat: Almost 50% is spent in Inc.pm, looking at a --profile-compile
lizmat jnthn: well aware of that
making @*INC initialization breaks panda, however :-(
*lzay
tadzik masak: github.com/masak/ufo/blob/1011bf07...dd/ufo#L47
lizmat *lazy
jnthn lizmat: Yeah, I plan to look at these bits soonish 12:22
tadzik this indeed has 3 shades of gray
jnthn lizmat: Want to spend this afternoon continuing with NFG work, though...
hm, I wonder why we spend so long in Str.Numeric...
lizmat sure, it's been bugging me for 9 months now, it can wait now :-) 12:23
Str.Numeric is not a simple method
jnthn I agree, more "what calls it" 12:24
Ven Maybe quickcheck should actually run ONE test with the failing value? else it's just really spammy (the default is 100 iterations per check) 12:25
lizmat m: (-Inf..0).infinite.say # fail 12:27
camelia rakudo-moar 2a3e1b: OUTPUT«0␤»
12:28 konsolebox left
lizmat it's a fail because a: it should be True and b. it is not a Bool 12:29
m: (-Inf..42).infinite.say # checking where the 0 comes from
camelia rakudo-moar 2a3e1b: OUTPUT«0␤»
dalek ast/fudge: 646f693 | usev6++ | t/03-count. (2 files):
Add example in-/output for '#?DOES'
12:36
12:39 dolmen joined
Ven Okay, my sixcheck is now able to generate values from a sub signature to try the sub out! 12:42
Seriously, the runtime introspection capabilities are amazing. 12:44
12:44 Akagi201 joined 12:46 chenryn left
dalek line-Perl5: e8589a5 | (Stefan Seifert)++ | / (3 files):
Fix passing strings containing NULL bytes from P6 to P5.
12:48
Ven
.oO( I always loved pascal strings )
12:53
dalek kudo/nom: eadbae0 | lizmat++ | src/Perl6/ (2 files):
Speedup $_ S/ S! container initialization
12:54
lizmat this brings me back in the .19 startup range
m: my Int @x; @x[40..41] = ^10; @x.perl.say # another fail :-( 12:55
camelia rakudo-moar 2a3e1b: OUTPUT«Array[Int].new()␤»
lizmat m: my Int @x; @x[40,41] = ^10; @x.perl.say # this works
camelia rakudo-moar 2a3e1b: OUTPUT«Array[Int].new(Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, 0, 1)␤»
Ven Should sixcheck try to generate an invocant? or should you use `-> {$f.x(|@_, |%_)}`? Maybe that's a non-question, actually 13:02
lizmat m: my @a; say @a[0,1,2,3]; say @a[^4]; # should these give the same result, or not? 13:17
camelia rakudo-moar 2a3e1b: OUTPUT«(Any) (Any) (Any) (Any)␤␤»
lizmat if not, why? if they should be the same, what should it be? (Any,Any,Any.Any) or () ?
I just tried a patch that would make them both return (Any...), but that breaks splicing from an empty array 13:18
(it hangs on it)
dalek ast: 9180f5a | lizmat++ | S32-array/splice.t:
Make sure we never hang
13:20
moritz m: my @a; @a[^4] = <x y z a>; say @a.perl 13:21
camelia rakudo-moar eadbae: OUTPUT«[]<>␤»
13:21 _mg_ joined
moritz lizmat: iirc the difficutlty is that people expect @a[5..*] to return the whole array except for the first four elements 13:22
lizmat moritz: the above fails because the array is empty at the time of assignment
my patch fixes that 13:23
*but*
$ 6 'my @a; say @a[^4]'
(Any) (Any) (Any) (Any)
m: my @a; say @a[^4]
camelia rakudo-moar eadbae: OUTPUT«␤»
13:23 skids joined
lizmat $ 6 'my @a; @a[^4] = <a b c d>; say @a.perl' 13:24
["a", "b", "c", "d"]<>
m: my @a; say @a[^Inf] = <a b c d> # this should probably work as well, no? 13:25
camelia rakudo-moar eadbae: OUTPUT«␤»
moritz m: my @a := 1, 2, 4, 8 ... *; my @b := @a[2..*]; say @b[^3]
camelia rakudo-moar eadbae: OUTPUT«(timeout)» 13:26
moritz :(
13:31 konsolebox joined, konsolebox left
masak Perl 6: Let's See What Happens When We Combine Dozens Of Neat But Tricky Features 13:38
jnthn I thought array indexing isn't lazy... 13:39
(As in, by design)
moritz has lost overview 13:41
13:51 cognominal left
dalek p/no-readlineint: cbea790 | hoelzro++ | / (6 files):
Remove references to readlineint_fh

This corresponds to recent changes in MoarVM, in the no-moar-linenoise branch.
I haven't removed readlineintfh from the Parrot stage 0 stuff, because the tests are currently failing, and I don't want to bork Parrot worse than it already is.
13:52
p/no-readlineint: 92163dd | hoelzro++ | src/HLL/Compiler.nqp:
Restore prompt to REPL
p/no-readlineint: c71650f | hoelzro++ | src/HLL/Compiler.nqp:
Break reading of lines out into a helper method
p/no-readlineint: f38ce8a | hoelzro++ | tools/build/MOAR_REVISION:
DON'T MERGE ME Bump MoarVM version
p/no-readlineint: c9d1eae | hoelzro++ | src/HLL/Compiler.nqp:
Preserve interactive eval context as an attribute of the compiler
13:53 kaare__ is now known as kaare_ 13:54 raiph joined
Ven $checker.check-sub(-> Int $x, Int $y { $x + $y }, * == *.reduce(*+*)); <- This now passes with Sixcheck! 13:55
timotimo cute :) 14:02
lizmat m: my @a = ^Inf; my @b = @a[^Inf]; say @b[^10] 14:07
m: my @a = ^Inf; my @b := @a[^Inf]; say @b[^10]
camelia rakudo-moar eadbae: OUTPUT«(timeout)» 14:08
dalek ast/fudge: 0fccf4e | FROGGS++ | / (2 files):
allow to fudge for specific language versions

Examples:
   #?v6.0.0..v6.0.5
   #?v6+ * "test file approved for sixyness"
   #?v6.1+ "upcomming feature"
14:09
tadzik ===CONFUSED!=== ¯\(°_o)/¯ 14:10
Ven Parameter has a "named_names" method. should it be "named-names"?
moritz yes
sjn supports tadzik's update to this error message 14:11
timotimo "gah! your compiler ate a SPARC!" 14:13
14:15 diana_olhovik_ left
dalek kudo/nom: 54fbdfe | lizmat++ | src/core/Range.pm:
Simplify Range.BUILD
14:15
kudo/tab-completion: ba05a15 | hoelzro++ | tools/build/Makefile-Moar.in:
Remove reference to linenoise in Moar config
14:18
rakudo/tab-completion: 42bec6d | hoelzro++ | src/Perl6/Compiler.nqp:
rakudo/tab-completion: Use new readline method from NQP for prompting
14:18 dalek left, diana_olhovik joined 14:19 dalek joined, ChanServ sets mode: +v dalek
hoelzro psch: with your latest more input changes, is CTRL-d in the REPL supposed to keep trying to get input? 14:20
or is that something I broke in my tab completion branch?
14:24 perlpilot is now known as PerlJAm, PerlJAm is now known as PerlJam
dalek ast/fudge: b97f53f | usev6++ | t/02-version. (4 files):
Fix tests for 'fudge'
14:26
14:26 donaldh left
hoelzro ok, I must've broken something 14:29
commute&
tadzik FROGGS: github.com/tadzik/panda/issues/132 14:38
confirm pls :)
psch hoelzro: i've mostly removed multiline support from nom again. i'm still trying to figure out how to approach it less cheaty 14:39
14:44 _mg_ left
[TuxCM] .tell ptc github.com/travis-ci/travis-ci/issues/2978# 14:44
yoleaux [TuxCM]: I'll pass your message to ptc.
14:44 rurban_ left
[ptc] [TuxCM]: agreed, I'd like to see fewer resources wasted as well 14:45
nine Updated S01-perl-5-integration in github.com/perl6/roast/pull/57. Please comment :) Some are plain bug fixes, some changes may need discussion.
[TuxCM] we met the Travis people here in Berlin. would you be willing to coordinate this with them?
[ptc] [TuxCM]: I'm sort of hoping to get moarvm/nqp/rakudo as a set of packages in Debian (at least experimental packages of some sort), and then use these to bootstrap perl6 on Travis 14:46
[TuxCM]: re: coordination: definitely!
[ptc] wishes he were at the perlqa hackathon....
[TuxCM] Carla Drago <carla@travis-ci.org> 14:47
[ptc] [TuxCM]: what should I say other than that which has been mentioned in the GH issue?
[TuxCM] that we had contact and that you would be willing to discuss the most usefull solution 14:48
14:48 rurban_ joined
[ptc] ok, I can do that :-) 14:48
[TuxCM] they kinda agreed that perl6 should be added
[ptc] cool! 14:49
[TuxCM] yeah
nine jnthn: why did you forbid overwriting registered module loaders in commit e40c9bc80267da19de6d80c2927aea25dd87160f? 14:55
jnthn nine: To flag up accidental conflicts, which I figured would most likely lead to confusing bugs. 14:56
14:56 molaf__ joined
jnthn nine: Also 'cus I didn't know of any use case where you'd need to replace it. Do you have one? 14:57
lizmat m: .say for Range.new(Inf,-42)
camelia rakudo-moar 54fbdf: OUTPUT«(signal XFSZ)-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-9223372036854775808␤-922337203685…»
lizmat DIHWIDT :-) 14:58
nine jnthn: I'm thinking about having a stub module loader for Perl 5 that tries to load Inline::Perl5 which would then replace the stub. 14:59
moritz DIMWIT? :-)
nine jnthn: Would help with some tests in S01-perl-5-integration
15:00 molaf_ left
jnthn nine: ah 15:01
[ptc] moritz: Did I mean what I thought? ;-)
ugexe perl5 already has tools that result in perls being built from scratch every time. i think its a mistake to not consider various build options/flags/etc
re: travis
jnthn nine: Feel free to add a :force option there 15:02
ugexe i've found a lot of bugs to the ecosystem using travis like that hours after rakudo commits
[ptc] ugexe: I agree with you, however want to get stable versions into travis for module builders and other users who want stability 15:03
15:03 colomon left
ugexe [ptc]: yea, but its trivial to have it build from source *if* the version you request doesnt exist 15:03
[ptc] ugexe: don't know how to specify the flexibility to get extra build options/flags etc..., how does perl5 handle it atm?
hoelzro psch: ok, thanks for the info 15:04
ugexe it uses perlbrew, just like travis-ci. if travis has a build for that specific perl/flags, it will just use that. otherwise it will build it with perlbrew
[ptc] ok, so as a simple user of perlbrew (I usually just say "install"), it's possible to specify build flags (I'm guessing) 15:05
can rakudobrew also handle extra flags to configure the build in specific ways?
ugexe well, at a minimum, you can specify threaded vs non threaded perls 15:06
15:06 colomon joined, FROGGS[mobile] left
ugexe the other flags are tied to perlbrews install command 15:07
--clang etc
dalek ast/fudge: 8c5b533 | FROGGS++ | fudge:
clear $DOES flag after loop iteration
15:08
[ptc] at present, one can (at the very least) say "language: perl" and the rest "just works (TM)", what would be good is "language: perl6" and then the latest release is chosen
ugexe right. or if you added other things to the matrix, you just if those options match whatever perl6 is being used. if not, build it with rakudobrew/configure.pl/whatever 15:09
you just check^
15:10 araujo left
[ptc] sounds doable. Am trying to visualise what the .travis.yml would look like. Will paste something into the issue in a mo 15:10
ugexe building on jvm is trivial as well. the only problem is that the interpreter get invoked every time a module is compiled so it takes way too long 15:11
FROGGS hopes that pmichaud and TimToady like the latest changes to fudge
15:11 araujo joined
ugexe if you could compile multiple modules without having to startup a perl6 interpretter every time it would be slick 15:12
[ptc] that's probably why having Rakudo* on various VMs as prebuilt options would be a good idea
then at least one can reduce the module compile times to the not-yet-available modules
ugexe its a great idea, because a lot of people dont want to install the jvm but want their stuff to work on it 15:13
you can test your module on jvm on travis right now, but if you have 3 or 4 dependencies then it will exceed the build time limit 15:14
and thats with --notests
dalek ast: b71e0ce | usev6++ | t/README:
Add dir to test fudge itself
15:16
roast: 6f83501 | FROGGS++ | t/fudge.t:
roast: add test file to test fudge in-/outputs
15:16 dalek left
ugexe [ptc]: github.com/travis-perl/helpers check this out sometime 15:16
15:16 dalek joined, ChanServ sets mode: +v dalek 15:19 sqirrel joined
[ptc] ugexe: thanks, will do 15:20
ugexe: just posted an idea as to how the .travis.yml could look like. Comments welcome 15:21
15:21 lizmat_ joined
ugexe i tried to test your travis build script, but ill be damned if i can get a travis enviroment actually working 15:21
[ptc] did you use vagrant to set things up? 15:22
it wasn't overly easy...
15:22 Ven left
ugexe i setup vagrant. but i couldnt get the travis run command working as intended 15:22
15:23 Akagi201 left, leont left, lizmat left, dolmen left, FROGGS left, [TuxCM] left
sjn tadzik: 0pointer.net/blog/ 15:25
15:26 lizmat_ is now known as lizmat
ugexe [ptc]: if you include the VM as a matrix ENV then it will allow it to fire a build for each automatically 15:26
15:27 Ven joined 15:28 zakharyas left
ugexe [ptc]: if you include the VM as a matrix ENV then it will allow it to fire a build for each automatically 15:28
oops
env: - BACKEND=moar\n - BACKEND=jvm 15:29
then you get to see each backend it succeeded or failed on in your branch result page
[ptc] wow, didn't know you could do that. Mind you, my Travis-foo is still only at the basics stage 15:30
ugexe travis-ci.org/ugexe/P6TCI and github.com/ugexe/P6TCI/blob/master/.travis.yml 15:31
15:31 muraiki joined
ugexe you can even allow failures for certain env values so your badge doesnt go red when it fails on, say , parrot :) 15:31
[ptc] heh :-) 15:32
ugexe: just found my build process, let me piece things back together
15:32 Ugator joined
tadzik jnthn: github.com/jnthn/test-mock/pull/5 pls merge :) 15:34
[ptc] ugexe: vagrant up; vagrant ssh; (in vagrant vm) git clone github.com/travis-ci/travis.rb.git; git clone my-perl6-module; cd my-perl6-module; ~/travis.rb/bin/travis compile > build.sh; bash build.sh
dalek kudo/nom: 67df04e | lizmat++ | src/core/Range.pm:
Add .infinite as a BUILD-time attribute

Also fixes the (-Inf..42) case (previously, this was not infinite)
[ptc] ugexe: I *think* it went like that...
ugexe: hope it helps you get your build working
15:34 diana_olhovik left
[ptc] ugexe: I never actually got it running the test suite for my test perl6 module though. Nevertheless, perl6 worked fine and did everything I expected. 15:35
ugexe: it took *ages* to build (mainly at the parse step, *lots* of IO going on), nevertheless, I think this was a vagrant vm problem (I'm using virtualbox) rather than a problem which will show up on travis 15:36
jnthn tadzik: done!
tadzik ossum thanks :)
15:36 leont joined
jnthn merged a copule of similar ones for his other modules too :) 15:37
15:38 grondilu joined, FROGGS joined, dolmen joined
dalek ast: 0bdd7bd | usev6++ | t/ (4 files):
Add another test case for testing 'fudge'
15:38
15:39 [TuxCM] joined
ugexe [ptc]: ill give it a shot in a bit. i remember following instructions where I had to install the travis CLI, then install the build module for the CLI, then the run module for the CLI 15:41
[ptc] ugexe: yeah, that's basically what I just outlined. It's a bit of a pita but it's sufficient to debug the build script
ugexe yeah, i notice you dont do 'travis run' which is where i got hung up at 15:42
where are you putting the perl6.rb script though 15:43
lizmat m: my @a; @a[^4] = 1,2,3,4; say @a.perl
camelia rakudo-moar 54fbdf: OUTPUT«[]<>␤»
15:43 telex left
lizmat m: my @a = ^10; @a[^4] = 1,2,3,4; say @a.perl 15:43
camelia rakudo-moar 54fbdf: OUTPUT«[1, 2, 3, 4, 4, 5, 6, 7, 8, 9]<>␤»
FROGGS m: my @a; @a[0,1,2,3] = 1,2,3,4; say @a.perl 15:44
camelia rakudo-moar 54fbdf: OUTPUT«[1, 2, 3, 4]<>␤»
[ptc] ugexe: maybe travis run is something I missed out...
15:44 telex joined
[ptc] ugexe: the perl6.rb script is in /vagrant/lib/travis/build/script 15:45
ugexe: I ran 'vagrant up' from within my travis-build branch mentioned in the pr 15:46
ugexe ah ok. your process is most likely correct, i wouldnt look too much into the travis run thing i mentioned 15:47
rjbs new postfix operator 'plusplus' which increments the number described by a string 15:51
$x = "two"; $x plusplus;
15:52 spider-mario joined, sqirrel left
masak rjbs: it'd have to be $x\plusplus because of the postfix rule. 15:55
Ven Oh, I just learned France turned into Big Daddy. Amazing. Great.
masak m: sub postfix:<plusplus>($s) { $s++ }; my $t = "42"; say $t\plusplus
camelia rakudo-moar 67df04: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub postfix:<++> at src/gen/m-CORE.setting:2305␤ in sub postfix:<plusplus> at /tmp/ZcI3wOw_VL:1␤ in block <unit> at /tmp/ZcI3wOw_VL:1␤␤»
masak m: sub postfix:<plusplus>($s is rw) { $s++ }; my $t = "42"; $t\plusplus; say $t 15:56
camelia rakudo-moar 67df04: OUTPUT«43␤»
masak m: sub postfix:<plusplus>($s is rw) { $s++ }; my $t = "42"; $t plusplus; say $t
camelia rakudo-moar 67df04: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hWSvyI1IZg␤Two terms in a row␤at /tmp/hWSvyI1IZg:1␤------> 3us>($s is rw) { $s++ }; my $t = "42"; $t7⏏5 plusplus; say $t␤ expecting any of:␤ infix␤ infix stopper␤ sta…»
masak rjbs: ^^
tadzik sooooo, loading HTTP::UserAgent takes 16 seconds for me 15:57
that's precompiled
15:58 Ven left 15:59 raiph left
rjbs masak: 😢 16:00
ugexe thats odd. HTTP::UserAgent, including IO::Socket::SSL, takes no where near that long to load for me. 16:01
16:01 chenryn joined
masak rjbs: Postfix Depression Syndrome 16:01
16:02 nbdsp joined, Ugator left
tadzik ugexe: I installed Task::Star, and now my MANIFEST is 68K 16:02
16:03 chenryn left
rjbs masak: Postfix often depresses me, but usually it's the other postfix. 16:04
masak heh.
moritz is there also a Qmail Depression Syndrome? 16:05
rjbs Yes, much more serious.
There's a whole book about understanding the corresponding Sendmail problem.
It's called the DS.m4
jnthn doesn't mention Microsoft Exchange... :P
FROGGS Exchange is quite nice, from a user perspective 16:06
tadzik hmmm, how do I profile CompUnitRepo? :)
jnthn tadzik: use happens at BEGIN time, so try --profile-compile
16:06 gfldex joined
tadzik oh, perfect :) 16:06
16:07 dolmen left
nbdsp m: module M { sub foo{ say "foo" } }; M::foo; 16:08
camelia rakudo-moar 67df04: OUTPUT«Could not find symbol '&foo'␤ in method <anon> at src/gen/m-CORE.setting:16202␤ in any find_method_fallback at src/gen/m-Metamodel.nqp:2908␤ in any find_method at src/gen/m-Metamodel.nqp:1052␤ in block <unit> at /tmp/wULSupUzMX:1␤␤»
jnthn nbdsp: Needs to be "our sub foo ..." 16:09
nbdsp Greetings! Could someone advise please how to have two or more namespaces in a file?
Oh.. thanks!
16:09 cschwenz left
masak at #perl6, we answer your question *before* you ask them :) 16:11
jnthn :P
16:12 eli-se joined
FROGGS m: say $_ 16:16
camelia rakudo-moar 67df04: OUTPUT«(Any)␤»
lizmat .tell TimToady I think 'my @a; @a[^2] should say Any,Any, just like @a[0,1] does. Thoughts ? 16:20
yoleaux lizmat: I'll pass your message to TimToady.
dalek p/sprintf: aa86255 | usev6++ | t/hll/06-sprintf.t:
Adjust tests for '%b'
16:30
lizmat maybe my @a; @a[^inf] should return a infinite lazy list of Any's 16:32
but then we would have to differntiate between ranges with Inf and ranges with Whatever 16:33
16:36 rurban_ left
dalek pan style="color: #395be5">perl6-examples: 8d705f8 | paultcochrane++ | / (2 files):
Build menu-tabs attr to allow setting of menu tabs on website
16:40
pan style="color: #395be5">perl6-examples: 1ca59a1 | paultcochrane++ | / (2 files):
Convert header-html into a method
pan style="color: #395be5">perl6-examples: 4979048 | paultcochrane++ | lib/Pod/Htmlify.pm6:
Use menu-tabs to populate menu tabs in html header
pan style="color: #395be5">perl6-examples: f858493 | paultcochrane++ | t/004-website.t:
Check setting menu-tabs explicitly
pan style="color: #395be5">perl6-examples: ec6972c | paultcochrane++ | / (2 files):
Specify menu tab link fully

Don't assume we want the link to be somewhere under the /categories/ dir.
pan style="color: #395be5">perl6-examples: 66425da | paultcochrane++ | htmlify.pl:
Explictly configure menu tabs

This allows the tabs to be a bit cleaner looking as well as remove some inconsistency in presentation.
16:41 muraiki left
timotimo [ptc]: do you know why so many of the examples look like this? examples.perl6.org/categories/games...actoe.html 16:42
as in: the source code twice in a row ...
also, it would probably be awesome to pygmentize the source code, like the doc.perl6.org thing does :)
shall i open tickets for that?
FROGGS $ perl6-m --optimize=off -e 'sub postfix:<^^^>($a) is looser(&infix:<+>) { $a; 77 }; say 6^^^ + 8'
Cannot invoke this object (REPR: Null, cs = 0)
rt.perl.org/Ticket/Display.html?id=116012
bbl 16:43
16:43 FROGGS left
timotimo why would you define the precedence of a postfix operator in relation to an infix operator? 16:44
that confuses me
but the failure mode is still not right 16:45
[ptc] timotimo: doubled up code: if there isn't any pod describing an example, the code is inserted in its place. Then I add a stripped-down version of the code at the end.
timotimo: you're right, I should stop doing that...
timotimo: the pygmentize stuff is in the back of my mind. Patches are certainly welcome ;-) 16:46
16:46 spider-mario left
[ptc] timotimo: you can open tickets for that if you want :-) 16:46
nine What do you think? github.com/rakudo/rakudo/pull/409 Transparently support Inline::Perl5. This allows most of the S01-perl-5-integration spec tests to pass 16:47
if Inline::Perl5 is installed.
16:48 leont left
lizmat range slices issues now rakudobugged as #124316 16:51
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124316
lizmat dinner&
16:51 lizmat left
PerlJam nine++ nice! 16:51
ashleydev nine: example? 16:53
PerlJam nine: I'm assuming it doesn't do the lexical "use v5;" part yet
nine: and that's probably for the best IMHO
16:55 dakkar left
PerlJam nine: why github.com/niner/rakudo/commit/5ef...bf3425R198 instead of the more straight-forward version on line 213? 16:56
i.e. multi sub EVAL(Cool $code, :$lang = 'perl5', PseudoStash :$context) { 16:57
17:00 [TuxCM] left
dalek pan style="color: #395be5">perl6-examples: 974e959 | paultcochrane++ | lib/Pod/ (2 files):
Stop adding source code when no pod in source

This is because the source code (without pod) is being added anyway, thus it would be added twice if there isn't pod in the source, which would be silly.
17:01
japhb masak: Yes, I knew that (re: the definition of public attributes). I was trying to talk the questioner through things a little at a time. 17:02
17:02 mohij joined
nine ashleydev: perl6 -e 'use DBI:from<Perl5>; my $dbh = DBI.connect(...);' 17:03
PerlJam: no lexical use v5 yet, no.
ashleydev wow 17:04
nine++
Zoffix nine++ 17:07
17:08 rurban_ joined
japhb Definitely nine++ 17:10
17:12 Akagi201 joined
RabidGravy is there any reason that the parrot features that IO::Select uses can't be exposed through nqp? 17:14
17:15 espadrine left, _mg_ joined
leedo i was looking for select in the p6 docs the other day, mainly out of curiosity 17:15
17:17 Akagi201 left
RabidGravy yeah unfortunately the IO::Select only works for parrot backend 17:22
17:22 muraiki joined
RabidGravy a straight up NativeCall implementation wouldn't be too tricky but I couldn't work out how to got the actual FD from an IO::Handle 17:23
17:23 KCL_ joined 17:26 KCL left
timotimo RabidGravy: IO::Socket::SSL has to get the actual FD, so there's something somewhere that can do it 17:27
RabidGravy cool, will look 17:28
timotimo i think we're also in need of a module that could set low-level operating-system provided special-use flags on sockets 17:32
17:34 Aurelie joined 17:36 rurban_ left
ugexe should @array[^0] return the same value as @array[0..0]? 17:40
grondilu no 17:41
^0 is Nil, isn't it?
ugexe yeah
masak m: say (^0).WHAT
camelia rakudo-moar 67df04: OUTPUT«(Range)␤»
masak no, it's a Range. 17:42
ugexe well, i mean i get a no value from the array
grondilu m: say ^0,
camelia rakudo-moar 67df04: OUTPUT«0..^0␤»
grondilu m: say Nil,^0
camelia rakudo-moar 67df04: OUTPUT«Nil0..^0␤»
masak anyway, agree that @array[^0] should be *empty* while @array[0..0] should contain one element (@array[0])
ugexe so if you want to use a variable as a range, you should probably use @array[0..$index], not @array[^$index] i presume? 17:43
masak ugexe: depends what you want.
ugexe: I do ^$size more often than I do 0..$index
ugexe m: my @a = 300,301; my $max = 0; my $code = 300; given $code { when /^3/ { when all(@a[^$max]) { say "xx" } } }; 17:57
camelia rakudo-moar 67df04: OUTPUT«xx␤»
ugexe thats what was tripping me up
at one time months ago that would not say "xx" 17:59
18:00 eli-se left 18:03 _mg_ left 18:12 Aurelie left, agentzh_ left, agentzh joined, Akagi201 joined 18:17 Akagi201 left
moritz m: say :16('D835') 18:22
camelia rakudo-moar 67df04: OUTPUT«55349␤»
dalek on: 215b406 | (Anthony Parsons)++ | t/05-utf16.t:
Add tests for utf16 surrogate pairs
18:23
on: 60b3d80 | (Anthony Parsons)++ | lib/JSON/Tiny (3 files):
Implement surrogate pair handling using Bufs

Tested on Rakudo 2013.08-3-g7cb364b (Parrot & JVM)
on: 9a0d31f | (Anthony Parsons)++ | README:
Strike surrogates off todo list
on: 7278e40 | moritz++ | / (5 files):
Merge branch 'master' of github.com/flussence/json

Conflicts: lib/JSON/Tiny/Actions.pm
18:24 SHODAN left, Shozan joined 18:27 Ugator joined
timotimo and now someone could implement the surrogate pair handling in JSON::Fast ... 18:27
18:33 cognominal joined, Rounin left, SHODAN joined 18:34 Shozan left
DrForr scratches his head at 'Calling rl_get_screen_size(Pointer, Pointer) will never work with declared signature (Pointer, Pointer)'. 18:34
ugexe m: my IO::Path $path = "/home".IO; say $path.resolve; # maybe related to this? 18:37
camelia rakudo-moar 67df04: OUTPUT«Type check failed in assignment to '$path'; expected 'IO::Path' but got 'IO::Path'␤ in block <unit> at /tmp/3U7PZA6bqe:1␤␤»
ugexe its actually returning a native str
DrForr Possibly. It occurs consistently where I'm declaring a Pointer[Int] function signature. 18:38
18:38 yogan joined
TimToady perhaps parameterized types need to count their parameters as part of the longname 18:38
yoleaux 16:20Z <lizmat> TimToady: I think 'my @a; @a[^2] should say Any,Any, just like @a[0,1] does. Thoughts ?
DrForr Nod, the fact that the signature is 'Pointer[Int]' but displayed as just 'Pointer' could lead to further confusion. 18:39
Should I file a bug? 18:40
18:40 zakharyas joined
RabidGravy ugexe, I thought that got fixed? 18:40
DrForr I just rebuilt rakudo-moar 5 minutes ago. 18:41
psch RabidGravy: no, it's PR 407
IO.resolve that is
nbdsp m: class B{ submethod foo{ say "B::foo" } }; class D is B { method meth { self.foo } }; D.new.meth;
camelia rakudo-moar 67df04: OUTPUT«Method 'foo' not found for invocant of class 'D'␤ in method meth at /tmp/uaQprMw41w:1␤ in block <unit> at /tmp/uaQprMw41w:1␤␤»
RabidGravy yeah, oh didn't get merged :)
nbdsp Greetings! Could someone advise please what is the syntax of a call of base class submethod? 18:42
ugexe i think its the same as you could call a subroutine 18:43
s/could/would/
psch i guess you need to look through the MRO and check the submethod table for each entry 18:44
TimToady because submethods are infrastructural, we don't generally have submethods call each other, but have a normal method that calls all the submethods
psch 'cause the class itself doesn't know the submethod, because those aren't inherited, iirc
psch might be wrong there, never looked closely at what submethods are and do 18:45
TimToady why do you need submethods rather than ordinary methods? 18:46
ugexe RabidGravy: as mentioned its fixed in a pr, but the underlying error message problem isnt fixed
TimToady or, were youusing "submethod" just to mean "the method I want to call"?
ugexe well, underlying isnt the right word 18:47
nbdsp I want to overload a field accessor in a base class.
TimToady then why not just overlaod it virtually?
that's why we distinguish $!foo from $.foo, after all 18:48
b2gills m: use v7; # shouldn't this be an error?
camelia ( no output )
ugexe i.e. it didn't get a IO::Path, it was getting a str. the pr makes it actually return an IO::Path, but why it originally reported it was returning an IO::Path is a different beast
TimToady b2gills: probably a no-op currently
nbdsp I want to call it from a constructor, where virtual calls don't work yet. 18:49
TimToady they do if you say self.foo rather than $.foo
b2gills v5 and v6 are optional matches instead of parallel matches in grammar
TimToady we just put in the restriction on $.foo to keep people from sloppy thinking 18:50
but you can still get past it
nbdsp Oh, with self.foo it works. Thanks! 18:51
TimToady the other point is that if your constructor is trying to do infrastructural things, those things probably belong in BUILD anyway
18:52 spider-mario joined
nbdsp Well, I referenced to BUILD as 'constructor' here, since 'new' seems to be needed only for positional arguments. 18:54
TimToady we tend to reserve "constructor" for 'new' and things like 'new, and use 'initializer' for things like BUILD
so 'constructor' for the outward-facing API, and 'initializer' for the inward facing, as it were 18:56
18:56 tinyblak_ left
vendethiel o/ 18:56
nbdsp Thanks. Will be using these terms correctly. 18:59
TimToady so basically the programmer calls the constructor at the class boundary, the constructor calls bless to convey its "blessing" upon the arguments, bless calls some number of initializers as it deems appropriate, and the initializers call into the reprs to actually initialize the representations, which even the class doesn't need to care about
(representational polymorphism being the technical term there)
so Perl 6 doesn't care in the class definition (much) whether the represenation is P6Opaque, P5Hash, or CStruct 19:00
19:00 risou is now known as risou_awy
TimToady *sentation 19:00
masak orthogonal reprs are a really good idea.
19:01 risou_awy is now known as risou
TimToady "given a sufficiently smart optimizer" 19:01
masak which we need anyway :P
TimToady eye 19:02
DrForr Bug #124317 filed, incidentally. 19:04
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124317
masak DrForr++ 19:07
DrForr: is the 'is native' part necessary to reproduce the bug?
DrForr Hadn't checked, but I would assume not. 19:08
masak it'd be significant to know either way. 19:09
slightly more so if it is, though :)
DrForr Checking now. 19:10
19:10 eli-se joined
DrForr Looks like it is required, I just created a 'role Pointer[::Type] { }' so I didn't have to change the rest of the code, no error. 19:12
masak interrrresting. 19:14
masak purrs
DrForr I also haven't checked to see if two 'sub's will do the same thing, I'm wondering if there's an implicit 'self' causing the problem but don't know the core. 19:16
TimToady m: multi sub foo(:bar(42)) { say "HERE" }; foo(:bar(42)) 19:21
camelia rakudo-moar 67df04: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gcPH3dhotM␤Malformed parameter␤at /tmp/gcPH3dhotM:1␤------> 3multi sub foo(:bar(7⏏0542)) { say "HERE" }; foo(:bar(42))␤ expecting any of:␤ formal parameter␤»
TimToady m: multi sub foo(:bar([$a,$b])) { say "HERE $a,$b" }; foo(:bar([1,2]))
camelia rakudo-moar 67df04: OUTPUT«HERE 1,2␤»
TimToady m: multi sub foo(:bar(@foo [$a,$b])) { say "HERE $a,$b" }; foo(:bar([1,2])) 19:22
camelia rakudo-moar 67df04: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YFkgf9pK1F␤Unable to parse named parameter; couldn't find right parenthesis␤at /tmp/YFkgf9pK1F:1␤------> 3multi sub foo(:bar(@foo7⏏5 [$a,$b])) { say "HERE $a,$b" }; foo(:ba␤»
TimToady we seem to be a bit inconsistent about whether the inside of :bar() can be treated as a subsig
I wonder if we can relax that somewhat...
19:22 robinsmidsrod left 19:23 robinsmidsrod joined
TimToady m: multi sub foo(:bar(:(@foo [$a,$b]))) { say "HERE $a,$b" }; foo(:bar([1,2])) 19:25
camelia rakudo-moar 67df04: OUTPUT«Cannot call foo(Array); none of these signatures match:␤ (Any :bar(:($)) (@foo (Any $a, Any $b)))␤ in sub foo at /tmp/oGW6T4onoP:1␤ in block <unit> at /tmp/oGW6T4onoP:1␤␤»
DrForr masak: Also it's probably specific to the calling args, I just wrote a paramtrized return value and it didn't throw an error. 19:28
19:31 robinsmidsrod left, robinsmidsrod joined
TimToady m: say :(42) ::= 42; 19:33
camelia rakudo-moar 67df04: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at /tmp/buVskeoy2Q:1␤␤»
TimToady m: say :(42) ::= \(42);
camelia rakudo-moar 67df04: OUTPUT«(Int $ where { ... })␤»
masak DrForr: then maybe -- hypothesizing here -- it's something to do with how parameters are appropriated by the 'is native' trait.
TimToady m: multi sub foo(:bar(:(42))) { say "HERE" }; foo(:bar(42)) 19:34
camelia rakudo-moar 67df04: OUTPUT«Cannot call foo(Int); none of these signatures match:␤ (Any :bar(:($)) (Int $ where { ... }))␤ in sub foo at /tmp/92YTZanGHt:1␤ in block <unit> at /tmp/92YTZanGHt:1␤␤»
19:34 [TuxCM] joined
TimToady erm? 19:34
m: multi sub foo(:bar(:(42))) { say "HERE" }; foo(:bar(\(42)))
camelia rakudo-moar 67df04: OUTPUT«HERE␤»
TimToady so close...
jnthn: seems like we just need a touch more cowbell^Wautocapture 19:36
DrForr masak: It's more random than that. I have one that returns 'CArray[Str]' cleanly, and another which returns the same but throws the error. The clean one has a single argument, the bad one has two arguments. 19:38
masak DrForr: the plot thickens. I don't immediately have a rationale for that behavior. 19:40
DrForr Neither do I offhand.
masak btw, caller:arguments :: callee:parameters
DrForr Let me push the file so you can see the variants...
github.com/drforr/perl6-readline/b...adLine.pm6 - Just look for the XXX markers. 19:42
masak yeah, doesn't tell me much. too many details. 19:43
too many moving parts.
DrForr Yep, I understand.
19:43 Akagi201 joined
DrForr The nested classes don't seem to interact with the problem, if it helps. 19:44
masak I/you/we need to identify the smallest set of circumstances that causes the error. 19:45
19:46 yqt joined
masak by removing all the circumstances that don't. 19:46
I find the only reliable way of understanding these things is to remove all the distractions from the problem.
TimToady removes himself to eat lunch 19:47
DrForr Oh, I completel understand. I was just presenting a single instance as part of the bug.
19:48 Akagi201 left
masak can you remove the NativeCall dependency, for example? that would be extremely useful. 19:49
19:50 lizmat joined
DrForr Not without replicating the Pointer role, apparently. I don't yet know enough of the language to be able to create a useful mimic. 19:50
Or at least when I created an empty Pointer[::Type] role it wasn't enough to recreate the problem. 19:51
dalek kudo/nom: 5eff25a | (Stefan Seifert)++ | src/ (3 files):
Transparently support Inline::Perl5

This allows most of the S01-perl-5-integration spec tests to pass if Inline::Perl5 is installed.
19:53
kudo/nom: dd77b78 | lizmat++ | src/ (3 files):
Merge pull request #409 from niner/nom

Transparently support Inline::Perl5
masak DrForr: right. I think that's our biggest clue so far. 19:54
19:54 gtodd joined
dalek line-Perl5: 189699f | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
Support transparent use of Inline::Perl5 by Rakudo
19:54
masak DrForr: what about copy-pasting the Pointer role out of it's NativeCall (pun intended) environment?
(and then getting rid of the NativeCall dependency)
gtodd Jonathan's blog makes it possible to use rare unicode characters and mean it 😹 19:55
DrForr That's what I was thinking, let me give it a try.
gtodd 😹++
dalek ast: c6135c2 | (Stefan Seifert)++ | S01-perl-5-integration/ (3 files):
Replace nonsensical VAR usage by proper itemization

According to S12, VAR on a non-scalar is a no-op. The intention in these tests seems to be to pass arrays and hashes to Perl 5 code so they arrive 3c233f3 | lizmat++ | integration/weird-errors.t: Mention RT #123686 & RT #124318 together
19:57
19:57 dalek left 19:58 dalek joined, ChanServ sets mode: +v dalek
jnthn TimToady: I *think* :bar(:(42)) is parsing as a named param with two possible names: bar and the empty string... I dunno exactly what parses the 42... :) 20:00
DrForr masak: Trimming things down. 20:03
20:04 espadrine joined
masak DrForr++ 20:04
20:04 mr_ron joined 20:05 leont joined
mr_ron m: sub f(Int $x){ return $x + 42 }; CATCH {default{ say 'caught exception: ', $_; $_.resume} }; f(1/2); say 'after catch'; 20:06
camelia rakudo-moar 67df04: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ECgM5IqIX_␤Whitespace required after keyword 'default'␤at /tmp/ECgM5IqIX_:1␤------> 3nt $x){ return $x + 42 }; CATCH {default7⏏5{ say 'caught exception: ', $_; $_.resum␤»
mr_ron m: sub f(Int $x){ return $x + 42 }; CATCH {default { say 'caught exception: ', $_; $_.resume} }; f(1/2); say 'after catch';
camelia rakudo-moar 67df04: OUTPUT«caught exception: Type check failed in binding $x; expected 'Int' but got 'Rat'␤ in sub f at /tmp/zDmS8GdBGC:1␤ in block <unit> at /tmp/zDmS8GdBGC:1␤␤after catch␤»
mr_ron OK so far but now look
m: sub f(Int $x){ return $x + 42 }; CATCH {default { say 'caught exception: ', $_; $_.resume} }; f(0.5); say 'after catch'; 20:07
camelia rakudo-moar 67df04: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5plRGrqPpK␤Calling f(Rat) will never work with declared signature (Int $x)␤at /tmp/5plRGrqPpK:1␤------> 3'caught exception: ', $_; $_.resume} }; 7⏏5f(0.5); say 'after catch';␤»
mr_ron should the two cases behave so differently?
geekosaur no constant folding yet? so the former is caught at runtime but the latter at compile time? 20:08
jnthn Compilers are free to catch code that they can prove can never work at runtime at compile time. 20:10
However, they're not mandated to.
Te 1/2 case will likely end up being spotted at compile time at some point. 20:11
TimToady so tests that assume it's one way or the other are bogus 20:13
20:13 molaf__ left
TimToady I suspect we have a lot of tests in that category 20:13
20:13 colomon left
gtodd masak: any "masakism workshop" solutions on examples.perl6.org/ ? 20:14
jnthn *nod*
I fix 'em when I spot 'em.
gtodd not sure everything still works but I remember being quite impressed by github.com/masak/workshop ... 20:16
20:17 darutoko left
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123686
TimToady we probably have to glare at every test someday for over/underspecificity, but the one's containing "will never" or dies_ok without an EVAL, or throws_like are all deeply suspicious from that standpoint 20:20
*ones
jnthn TimToady: is "foo".codes desired as an O(1) or an O(n) operation?
lizmat TimToady: so you're saying a "dies_ok" is better than a specific "throws_like" ? 20:21
[ptc] gtodd: not aware of any masakism workshop solutions on examples.perl6.org.
gtodd: feel free to submit some new ones :-) Patches welcome!
masak gtodd: no, but that's a great idea! remind me again at a time when I'm not going to bed. ;)
'night, #perl6
[ptc] 'night masak!
jnthn o/ masak
DrForr Night, I'll post a new bug when I have it narrwed down. 20:22
jnthn lizmat: No, thrwos_like has an overload that can EVAL too
gtodd OK :-) I was just looking through and remembered I even edited the links in the SVG "map"
... using perl5 ;-)
[ptc] as suggested by [Coke]++, I've been looking into the opscode docs in nqp. 20:23
is there any obvious way to work out what arguments an opcode takes?
TimToady throws_like is okay iff we say that a compile-time caught "will never work" returns the same error code the run-time failure does, and we don't test parts of the message that change "didn't work" to "will never work"
[ptc] also, what is the xor opcode for? I mean, there are bitwise versions of xor, but there is an xor which seems not to do much (and I don't think has any tests) 20:24
jnthn Testing the message always feels smelly to me anyway.
We have typed exceptions so you don't have to test the message...
TimToady from an I18n pov if nothing else
[ptc] and on another note, there are lots of failures for parrot opcodes, what to do with the parrot stuff? Should it go from nqp?
lizmat well, X::AdHoc being the exception to that rule, I guess 20:25
jnthn I guess part of the issue is a lot of the RTs we have read "I got a crappy erorr for X"
lizmat: Yeah, though in general we're trying to have less of those... :)
Whenever I need to write a test to close an RT about an error, I'm adding a typed exception and testing against that.
lizmat I guess going through roast and changing all dies_ok to throws_like (even when it's X::AdHoc) would give us a good statistic 20:26
TimToady dies_ok is okay as long as it's on an EVAL, to hide compile-time vs run-time distinction
but it does tend to be underspecific, compared to throws_like 20:27
lizmat but how can you be sure it died for the right reason ???
mr_ron I feel a little underqualified to ask further, but it sounds like Perl 6 code that is running with exception handling might break because a smarter update of the compiler decides it can't work..
lizmat a few months ago I changed about 100 dies_ok's to throws_like and found about 5 false positives
mr_ron s/compiler/interpreter or whatever/ 20:28
lizmat aka, dying for the wrong reason, but passing the test because it did die
TimToady mr_ron: that's probably about the time the compiler should be paying attention to which version of Perl 6 it's emulating
one could argue for an automatic deprecation warning at that point: this code will not compile when you update your current language to v6.Triceratops 20:30
jnthn Maybe. We probably need to get a better feel for how often these things will happen in the real world. 20:31
20:31 cschwenz joined
TimToady
.oO("Warning: emulation support for v6.Dinosaur will go away in v6.Mammal")
20:32
eli-se I wrote APL code today. It was a refreshing experience. 20:34
yoleaux 11:58Z <Ven> eli-se: ruby symbols are GC'd
eli-se vendethiel: since what version?
vendethiel 2.2
(IIRC)
TimToady eli-se: well of course, it's the reading that ain't so exciting
eli-se vendethiel: fascinating
I bet yoleaux runs on an ancient Ruby version!
vendethiel no idea :-) 20:35
20:37 zakharyas left, huf_ is now known as huf 20:38 yqt left 20:39 colomon joined
grondilu (Dinosaurs are not deprecated. They're still flying around nowadays) 20:40
dalek pan style="color: #395be5">perl6-examples: ece01d9 | (Steve Mynott)++ | categories/cookbook/17sockets/17-0 (2 files):
start of 17sockets
20:41
eli-se One of my pets is a dragon. 20:42
20:42 FROGGS joined 20:44 colomon left, Rounin joined, colomon joined 20:46 leont left
vendethiel eli-se: (LRIO doesn't count as one) 20:47
[ptc] did I ask a silly question about nqp before, or was it just the wrong time to ask? 20:48
DrForr What's the bot syntax to leave messages 20:50
s/$/?
jnthn [ptc]: Ah, I see them. What an op takes - guess the JVM backend's Compiler.nqp is the easier one to parse them out of...
lizmat [ptc]: if this is about parrot, I understand that nqp will continue to support parrot, no?
eli-se .tell yoleaux .botsnack
yoleaux eli-se: Thanks for the message.
synbot6 om nom nom
jnthn [ptc]: xor is the Perl 6 ^^ operator
lizmat I need a .botsnack as well
synbot6 om nom nom
[ptc] .tell lizmat .botsnack 20:51
yoleaux [ptc]: I'll pass your message to lizmat.
synbot6 om nom nom
eli-se Can synbot6 also .tell things?
lizmat I think synbot6 is not very picky about its .botsnack
yoleaux 20:51Z <[ptc]> lizmat: .botsnack
synbot6 om nom nom
[ptc] jnthn: ok, thanks, I'll need to look up the ^^ operator
jnthn [ptc]: Should be spectests for it also. 20:52
DrForr .tell masak #124321 - The minimal criminal appears to be monkeypatching of Pointer.parameterize.
yoleaux DrForr: I'll pass your message to masak.
synbot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124321
[ptc] jnthn: one can use the repl in nqp much like in rakudo, right?
lizmat goes to bed
[ptc] jnthn: ah, spectests I missed. Right, cool
jnthn [ptc]: Pretty much, though it's less tested/polished I guess :)
20:52 lizmat left
[ptc] starts taking notes 20:52
jnthn Some things implemented in the NQP repo probably only get their real testing thorugh Rakudo's spectests. 20:53
mr_ron thanks to all for clarification ...
jnthn Then, MoarVM doesn't even have a test suite, so you're forced to test it using the NQP and Rakudo test suites. :)
[ptc] jnthn: yes, it's interesting that moarvm is tested via nqp...
ah, bet me to it 20:54
jnthn Yes, it's a deliberate choice to make sure those working on MoarVM test it from the perspective of its customers.
[ptc] jnthn: what to do with parrot stuff in the nqp repo though? I mean, some of the opcodes won't be implemented which are currently documented, right? 20:55
jnthn [ptc]: Well, the Parrot stuff stays there; I'm guessing the question is more like "we get ops documentation test failures 'cus of the missing ops"?
20:55 FROGGS left
[ptc] jnthn: that's an interesting perspective wrt testing moar. I stumbled across that while trying to test changes I'd made to moarvm after a coverity scan check 20:56
20:56 eli-se left
[ptc] jnthn: yes, there are ops docs test failures due to missing ops... 20:56
jnthn [ptc]: Note that you don't have to rebuild NQP nor Rakudo after doing a "make install" of Moar
20:57 mr_ron left
jnthn [ptc]: Even my dual-core laptop can manage the NQP test suite of 4,000 or so tests in around 8s. 20:58
So it's possible to get a quick sanity check.
[ptc] e.g. not ok 931 - documented op 'cancel' exists in parrot
jnthn Yeah. Maybe the best way with that is to not treat Parrot's failure to implement an op as a test failure?
Or mark them skip/todo 20:59
[ptc] jnthn: thanks for your help. Now I've got enough to work on to get the number of missing ops down. :-)
jnthn :-)
[ptc]: btw, if yo're doing NQP level documentation work, it may be good to be aware of github.com/edumentab/rakudo-and-nq...ls-course/ if you ain't already. 21:00
[ptc] makes more notes 21:03
dalek pan style="color: #395be5">perl6-examples: e0eda16 | (Steve Mynott)++ | categories/cookbook/17sockets/17-0 (2 files):
more 6ish
21:04
21:05 nbdsp left
[ptc] ha! Permanent head Damage! 21:06
... piled higher and deeper ;-)
21:07 muraiki left
jnthn :) 21:08
Sleep time...'night
[ptc] gn8 21:10
21:12 skids left 21:19 Ugator left 21:20 kst` is now known as kst
dalek c: 95a354b | (Steve Mynott)++ | lib/Language/syntax.pod:
typo
21:20
nine There are spectests that pass when run individually via prove -e 'perl6' but fail with Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/6 subtests when run through make spectest. 21:25
How can I debug this?
21:26 RabidGravy left
tony-o are they compiled? 21:28
nine: ^
21:28 telex left
nine How can I find that out? 21:29
tony-o you can see if there is a blib folder or .moarvm files
(the blib folder would have .moarvm files in it ^) 21:30
21:30 telex joined
nine Doesn't seems like 21:30
21:32 Akagi201 joined 21:33 aborazmeh joined, aborazmeh left, aborazmeh joined 21:34 rindolf left 21:37 Akagi201 left 21:41 Vlavv_ left 21:44 aborazmeh left 21:46 PerlJam left, Zoffix left 21:47 raiph joined
tony-o you could try make --debug=v 21:53
not sure what will come of it, though 21:54
21:54 Vlavv_ joined 21:57 tinyblak joined 22:01 tinyblak left
dalek p: bebba4b | paultcochrane++ | t/docs/opcodes.t:
Skip tests for documented ops in parrot

Not all ops are as yet implemented in parrot and checking for documented but not implemented ops is currently distracting for this vm.
22:03
22:05 Woodi left 22:07 [TuxCM] left 22:17 gfldex left 22:19 [TuxCM] joined 22:22 kaare_ left 22:23 kaare_ joined 22:28 kaare_ left 22:36 bjz left 22:37 [particle] left, [particle] joined 22:54 grondilu left 23:01 skids joined 23:02 nbdsp joined
nbdsp Greetings! I'm trying to call MySQL natively and don't know what type should be used for fetching binary columns. Currently have the following stub: sub mysql_fetch_row( OpaquePointer $result_set ) returns CArray[Str] is native('libmysqlclient') { * } . But it fails on binary fields with an error about "Malformed UTF-8". And return type CArray[Buf] is not supported. 23:03
23:11 Woodi joined 23:16 Rounin left 23:17 mohij left 23:21 Akagi201 joined, Woodi left 23:25 Akagi201 left
skids nbdsp: maybe see if CArray[CPointer] or something like that is supported, then nativecast? How does mysql tell you the length of the binary fields anyway? 23:26
23:28 Woodi joined
nbdsp Field lengths are fetched with mysql_fetch_lengths. But how to construct a Buf from CPointer, given a length? 23:30
23:33 cschwenz left
dalek kudo/tab-completion: 8fa167c | hoelzro++ | src/Perl6/Compiler.nqp:
Return null string (instead of undefined) if linenoise is done
23:34
timotimo that's a tough question 23:38
i don't think we have something like that yet; except you can nativecall into memcpy to copy the contents of a Pointered thing into a Buf maybe?
nbdsp Also there is no way to create a List or Buf from CArray if length is known? 23:40
timotimo i don't think so :( 23:42
nbdsp Strange, strings are not native C type and CArray[Str] works. Maybe there is a way to convert Str to Buf with something other than 'encode('utf8')'? 23:45
23:47 raiph left
timotimo well, you have an "is encoded" trait from NativeCall 23:50
23:59 spider-mario left