Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-31

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:05 Arrowhead joined #perl6
00:13 TimToady flussence: I find -v works much better than -m
00:17 flussence ha, so it does. I set it a bit too low (5MB) to see what'd happen and `perl6 --version` wouldn't work because *bash* couldn't run ncurses functions any more :)
00:19 flussence (wonder if I need to turn a bunch of kernel cruft back on to have -m work...)
00:19 _nadim hi, if someone could run the tests on this https://github.com/nkh/P6-Data-Dump-Tree.git
00:20 _nadim having Terminal::ANSIColor installed is a plus, although a test without it installed would be nice too
00:21 disturbingly_rea joined #perl6
00:21 _nadim .tell tadzik could we get an uninstall verb in Panda
00:21 yoleaux _nadim: I'll pass your message to tadzik.
00:22 disturbingly_rea I vote for 'remove' over 'uninstall'
00:22 _nadim that would be even better, yes
00:23 RabidGravy _nadim, I think you'll find the answer will contain something like "it will require support in Compunit::Repository"
00:24 awwaiid mmm. I updated Inline::Ruby to 0.0.2, but panda says it won't install it becaues 0.0.1 is already installed (which is true, but shouldn't matter). What should I do?
00:24 RabidGravy --force
00:25 RabidGravy but that seems like a mistake nonetheless
00:25 awwaiid k
00:25 _nadim RabidGravy: and who is the master of Compunit::Repository?
00:25 addison joined #perl6
00:26 awwaiid is there a way to have panda install from a git clone, or is there some other way to get a cloned build to install into rakudobrew land?
00:26 disturbingly_rea perl6 is lovely for project Euler (when it's fast enough for my dumb algorithms). Sometimes I still have to translate them to scala :( (though 'is-prime' is a grand built-in for that problem space)
00:26 disturbingly_rea just sharing some love
00:27 RabidGravy awwaiid, the bootstrap.pl?
00:28 awwaiid RabidGravy: I mean a module from ecosystem
00:28 awwaiid RabidGravy: (if the answer is still boostrap.pl, could you elaborate?)
00:29 disturbingly_rea Can we have a repl that accepts multiple lines?
00:29 RabidGravy oh i see, clone the thing local make the changes "panda install ."
00:29 disturbingly_rea Is there a project for that where I could contribute?
00:30 disturbingly_rea (I mean 'sub foo(bar) { ## presses enter and expects to be able to type the next line of the sub
00:30 awwaiid RabidGravy: great, thanks!
00:31 rburkholder joined #perl6
00:34 skyl4rk joined #perl6
00:36 llfourn joined #perl6
00:36 disturbingly_rea nobody with any hints for a multi-line entry repl then?
00:37 RabidGravy apparently not
00:37 grondilu probably not obvious a thing to do
00:37 cygx joined #perl6
00:38 disturbingly_rea seems standard, though
00:38 disturbingly_rea python/scala/clojure etc
00:38 disturbingly_rea even J
00:38 cygx disturbingly_rea: there's some initial work on a Jupyter kernel: https://github.com/timo/iperl6kernel
00:38 RabidGravy I'd say look at making it module space in the first instance
00:38 grondilu disturbingly_rea: how do they do it?  Do they rely on an external lib or somthing?
00:40 disturbingly_rea gronilu: depends. With python, it ships with. With clojure, it's part of the de facto build tool leiningen...
00:40 disturbingly_rea grondilu: I can't type
00:41 cygx disturbingly_rea: that's what tab completion is for
00:41 evdubs joined #perl6
00:42 disturbingly_rea cygx: I had no idea that worked in IRC.... this is the only channel I've ever been in ;) Great tip!
00:42 cygx well, it's a feature of your client, not IRC itself
00:42 disturbingly_rea I use the browser client
00:42 disturbingly_rea for reasons previously given
00:55 bapa joined #perl6
01:05 nbrown joined #perl6
01:13 joydo joined #perl6
01:15 kittenlips joined #perl6
01:16 kittenlips Can one define the return type for methods and functions in P6?
01:16 yoleaux 30 Dec 2015 20:43Z <MadcapJake> kittenlips: thanks! glad you like it! My highlighter is just using Atom's builtin grammar engine and the builtin node-oniguruma regex engine.
01:17 AlexDaniel kittenlips: --> Type
01:17 cygx m: sub foo(--> Int) { "nok" }; foo
01:17 camelia rakudo-moar eca5df: OUTPUT«Type check failed for return value; expected Int but got Str␤  in sub foo at /tmp/MZH7I_oRNZ line 1␤  in block <unit> at /tmp/MZH7I_oRNZ line 1␤␤»
01:17 AlexDaniel m: sub foo (Int $a, Int $x --> Bool) { return True }
01:17 camelia rakudo-moar eca5df: ( no output )
01:17 cygx m: sub foo() returns Int { "nok" }; foo
01:17 camelia rakudo-moar eca5df: OUTPUT«Type check failed for return value; expected Int but got Str␤  in sub foo at /tmp/R8YLkaHYG0 line 1␤  in block <unit> at /tmp/R8YLkaHYG0 line 1␤␤»
01:17 kittenlips AlexDaniel: if you have parameters where does it go after or before?
01:18 cygx after
01:18 AlexDaniel hmmm
01:18 AlexDaniel what happens if you put it before? Let's see…
01:18 kittenlips ah I see it now sorry missed your message
01:18 kittenlips Thank you!
01:18 AlexDaniel m: sub foo (--> Bool, Int $a, Int $x) { return True }
01:18 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GaE78idELy␤Type 'Bool' is not declared. Did you mean 'Cool'?␤at /tmp/GaE78idELy:1␤------> 3sub foo (--> Bool7⏏5, Int $a, Int $x) { return True }␤»
01:18 AlexDaniel shit, again this problem
01:18 sprocket joined #perl6
01:18 AlexDaniel m: sub foo (--> Bool Int $a, Int $x) { return True }
01:18 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GYIfM8kTxz␤Type 'Bool' is not declared. Did you mean 'Cool'?␤at /tmp/GYIfM8kTxz:1␤------> 3sub foo (--> Bool7⏏5 Int $a, Int $x) { return True }␤»
01:19 * AlexDaniel submits rakudobug
01:20 deepi joined #perl6
01:20 kittenlips m: sub foo (Int $a, Rat $x) --> Bool { return True; }
01:20 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xhiS1XPatU␤Missing block␤at /tmp/xhiS1XPatU:1␤------> 3sub foo (Int $a, Rat $x)7⏏5 --> Bool { return True; }␤    expecting any of:␤        new name to be defined␤»
01:21 sprocket joined #perl6
01:21 AlexDaniel kittenlips: I think that the idea is that the return type is part of the signature
01:22 cygx_ joined #perl6
01:22 AlexDaniel kittenlips: therefore inside the brackets
01:22 deepi hi
01:22 kittenlips AlexDaniel: ah ok, yes that makes sense. My brain intuitively wanted to put the return type syntax after the signature parentheses
01:22 AlexDaniel kittenlips: well, that's how other languages do that, but not all of them
01:23 kittenlips yes I Python, which I also program in
01:23 AlexDaniel kittenlips: for example in SQL you can have OUT parameters that are declared inside the brackets
01:23 deepi i need help in writing perl code which edits cornjobs (deletes certain entries which match the regex )
01:23 kittenlips PL/SQL
01:23 AlexDaniel kittenlips: uh! Yes.
01:24 gfldex deepi: what version of Perl do you aim to write code for?
01:24 kittenlips deepi: are you interested in writing it in Perl 6?
01:24 hobbs kittenlips: well that's a different thing. You can do that with rw args, but it's not the same as a return value (just as in PL/SQL it's not the same as the return value)
01:24 AlexDaniel corn jobs!
01:24 kittenlips deepi: Perl5 is perfectly suited for corn jobs
01:25 AlexDaniel hobbs: sometimes you can use it interchangeably
01:25 cygx kittenlips: you can declare a return type after the parens via `returns`
01:25 kittenlips cygx thank you
01:26 kittenlips m: sub foo (Int $x, Rat $y) returns Bool { return True };
01:26 camelia rakudo-moar eca5df: ( no output )
01:26 AlexDaniel nice!
01:26 kittenlips SO MANY WAYS to do things in Perl 6
01:27 kittenlips it's very humbling when a language makes you feel like a child all over again
01:28 AlexDaniel cygx: I didn't know that, thanks
01:28 cygx glad to be of service
01:29 raiph joined #perl6
01:30 AlexDaniel well, it wouldn't be me if I didn't try this
01:30 AlexDaniel m: sub foo (Int $a, Int $x --> Int) returns Str { return True }
01:30 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kQmhtyNVcd␤Redeclaration of return type for foo (previous return type was Int)␤at /tmp/kQmhtyNVcd:1␤»
01:31 AlexDaniel yeah… that's what I did… did not expect the error message to be so right
01:31 kittenlips AlexDaniel cygx: in the docs you see for example method definitions that show use of returns
01:32 kittenlips although for people like me I would only find that if it explicity documented that there are two ways
01:32 AlexDaniel kittenlips: it should be documented! Where did you find it?
01:32 AlexDaniel or was it just some random page?
01:33 gfldex it is not documented and i'm on it
01:33 skids There's actually supposedly a distinction between the two.
01:33 kittenlips AlexDaniel: it's not explicitly documented for example alongside --> form but you see it in https://doc.perl6.org/type/Signature when methods are described
01:34 AlexDaniel gfldex++
01:34 kittenlips gfldex this part isn't clear to me https://doc.perl6.org/type/Signature#method_returns
01:34 aborazmeh joined #perl6
01:34 aborazmeh joined #perl6
01:35 kittenlips it just shows that if you define a signature with --> form return type then if you call .returns method on it you get back Int
01:35 kittenlips sorry the type
01:35 AlexDaniel m: sub foo() returns Bool; say &foo.returns
01:35 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2hNUaooRUG␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at /tmp/2hNUaooRUG:1␤------> 3sub foo() returns Bool;7⏏5 say &foo.returns␤»
01:35 aindilis joined #perl6
01:35 AlexDaniel m: sub foo() returns Bool {}; say &foo.returns
01:35 camelia rakudo-moar eca5df: OUTPUT«(Bool)␤»
01:35 psy joined #perl6
01:35 AlexDaniel kittenlips: ↑
01:35 AlexDaniel kittenlips: but that's the point!
01:35 kittenlips AlexDaniel++
01:36 AlexDaniel kittenlips: it's a *method* “returns”
01:36 kittenlips But it doesn't explicitly tell you in the docs that you can use the keyword returns to define the return type in your function/method declaration
01:36 kittenlips as an alternative to the --> form
01:36 AlexDaniel kittenlips: yeah, well, I think that it should be documented somewhere else. Like in http://doc.perl6.org/language/functions
01:37 kittenlips m: sub foo(--> Int) {}; &foo.returns;
01:37 camelia rakudo-moar eca5df: ( no output )
01:37 skids m: Int sub a { "foo" }; a();
01:37 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gJI1S7Hyua␤Two terms in a row␤at /tmp/gJI1S7Hyua:1␤------> 3Int7⏏5 sub a { "foo" }; a();␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement m…»
01:37 skids m: my Int sub a { "foo" }; a();
01:37 camelia rakudo-moar eca5df: OUTPUT«Type check failed for return value; expected Int but got Str␤  in sub a at /tmp/1mV6q4VYmE line 1␤  in block <unit> at /tmp/1mV6q4VYmE line 1␤␤»
01:37 llfourn joined #perl6
01:37 kittenlips hey, shouldn't that have worked?
01:37 kittenlips m: sub foo(--> Int) {}; say &foo.returns;
01:37 camelia rakudo-moar eca5df: OUTPUT«(Int)␤»
01:37 kittenlips right
01:38 AlexDaniel skids: that would be too much, don't you think? :)
01:38 kittenlips m: Int sub a { "foo" }; say &a.returns;
01:38 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lLpbz_ojJg␤Two terms in a row␤at /tmp/lLpbz_ojJg:1␤------> 3Int7⏏5 sub a { "foo" }; say &a.returns;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        …»
01:38 kittenlips m: Int sub a() { "foo" }; say &a.returns;
01:38 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lq5PsM3iST␤Two terms in a row␤at /tmp/lq5PsM3iST:1␤------> 3Int7⏏5 sub a() { "foo" }; say &a.returns;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤      …»
01:39 kittenlips m: Int sub a() { 1 }; say &a.returns;
01:39 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wc7aY3hrej␤Two terms in a row␤at /tmp/Wc7aY3hrej:1␤------> 3Int7⏏5 sub a() { 1 }; say &a.returns;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        st…»
01:40 skids Actually now that I look at S06 it looks like maybe the distinction between .of and the probably deprecated or never implemented .as is likely obselete and handled by coercive types.
01:40 cygx m: my Int sub foo() {}; say &foo.returns
01:40 camelia rakudo-moar eca5df: OUTPUT«(Int)␤»
01:40 cygx ^ kittenlips
01:41 kittenlips question to everyone and I know it's just not important, but is it good programming style to have a space between sub/method name and signature when you declare it or not?
01:41 kittenlips cygx++ so there are THREE ways to do it
01:41 skids kittenlips: there are some circumstances where not having the space makes syntax errors later on wonky, IIRC.
01:42 kittenlips m: my Int sub foo() {}; say &foo.returns; sub bar(--> Int) {}; say &bar.returns; sub baz() returns Int {}; say &baz.returns;
01:42 camelia rakudo-moar eca5df: OUTPUT«(Int)␤(Int)␤(Int)␤»
01:43 AlexDaniel m: my Int sub foo(--> Int) returns Int {}; say &foo.returns
01:43 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4V7LMPeRFY␤Redeclaration of return type for foo (previous return type was Int)␤at /tmp/4V7LMPeRFY:1␤------> 3my Int sub foo(--> Int) returns Int {}7⏏5; say &foo.returns␤    expecting any of:␤   …»
01:43 kittenlips I even think there's a fourth way
01:44 kittenlips m: --> Int $a, Rat $b returns Int {};
01:44 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PzTuS1gcLQ␤Prefix -- requires an argument, but no valid term found␤at /tmp/PzTuS1gcLQ:1␤------> 3--7⏏5> Int $a, Rat $b returns Int {};␤    expecting any of:␤        prefix␤»
01:44 skids m: sub foo() of Int {}; say &foo.returns
01:44 camelia rakudo-moar eca5df: OUTPUT«(Int)␤»
01:44 kittenlips skids++
01:44 kittenlips wow this is like a game
01:44 kittenlips FOUR WAYs
01:45 AlexDaniel nooooooooooooooooooooooo
01:45 kittenlips Is of just a synonym for returns or does it have other special significance?
01:45 AlexDaniel *mind blown*
01:45 AlexDaniel gfldex: document all of them!
01:45 gfldex m: sub f(Int ::T $t --> $ where * ~~ T) { $t }; f(1);
01:45 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EQGNgK68HV␤Malformed return value␤at /tmp/EQGNgK68HV:1␤------> 3sub f(Int ::T $t -->7⏏5 $ where * ~~ T) { $t }; f(1);␤»
01:45 gfldex m: sub f(Int ::T $t --> T) { $t }; f(1);
01:45 camelia rakudo-moar eca5df: OUTPUT«Type check failed for return value; expected T but got Int␤  in sub f at /tmp/80NXSkd2K6 line 1␤  in block <unit> at /tmp/80NXSkd2K6 line 1␤␤»
01:45 gfldex that may be worth a bug report too
01:45 gfldex see http://design.perl6.org/S06.html#En_passant_type_capture
01:46 kittenlips I have so much to learn because I don't even know what these ::X syntax do
01:47 gfldex m: sub f(Int $t --> 123 ) { }; say f(1)
01:47 camelia rakudo-moar eca5df: OUTPUT«123␤»
01:47 kittenlips gfldex++
01:48 skids m: sub f (::T $x, T $y_is_same_type_as_x) { }; f(4,"foo"); #kittenlips: that, basically
01:48 camelia rakudo-moar eca5df: OUTPUT«Type check failed in binding $y_is_same_type_as_x; expected Int but got Str␤  in sub f at /tmp/XedNUupx78 line 1␤  in block <unit> at /tmp/XedNUupx78 line 1␤␤»
01:48 gfldex m: sub f(Int $t --> 123 ) { return }; say f(1)
01:48 camelia rakudo-moar eca5df: OUTPUT«123␤»
01:48 gfldex m: sub f(Int $t --> 123 ) { return 666 }; say f(1)
01:48 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yo0zqv1uGH␤No return arguments allowed when return value 123 is already specified in the signature␤at /tmp/yo0zqv1uGH:1␤------> 3sub f(Int $t --> 123 ) { return 666 7⏏5}; say f(1)␤»
01:49 kittenlips gfldex I'm trying to find the most appropriate place in the docs to document return types
01:49 kittenlips signature return types
01:49 gfldex m: sub f(Int $t --> 123 ) { return 666 }; say f(1); CATCH { default { say $_.perl } }
01:49 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dlx05kAGLJ␤No return arguments allowed when return value 123 is already specified in the signature␤at /tmp/dlx05kAGLJ:1␤------> 3sub f(Int $t --> 123 ) { return 666 7⏏5}; say f(1); CATCH { default { …»
01:49 gfldex looks like that one is uncatchable
01:49 hobbs kittenlips: "of" is actually the one that's documented in S06 (it's also used for typed arrays and such, so you can have my @array of Int)
01:50 sammers hi everyone, are there any good resources for Role-oriented programming that you can recommend?
01:50 gfldex m: sub f(Int $t --> Str(Int) ) { return 666 }; say f(1).WHAT; CATCH { default { say $_.?perl } }
01:50 camelia rakudo-moar eca5df: OUTPUT«X::TypeCheck::Return.new(operation => Any, got => 666, expected => Str(Int))␤»
01:50 gfldex m: sub f(Int $t --> Str(Int) ) { return 666 }; say f("1").WHAT; CATCH { default { say $_.?perl } }
01:50 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ixG19kPdwq␤Calling f(Str) will never work with declared signature (Int $t --> Str(Int))␤at /tmp/ixG19kPdwq:1␤------> 3t $t --> Str(Int) ) { return 666 }; say 7⏏5f("1").WHAT; CATCH { default { say $_.…»
01:50 kittenlips hobbs++ one question though should users be reading the synopses for documention?
01:51 gfldex m: sub f(Str $t --> Str(Int) ) { $t }; say f("1").WHAT; CATCH { default { say $_.?perl } }
01:51 camelia rakudo-moar eca5df: OUTPUT«X::TypeCheck::Return.new(operation => Any, got => "1", expected => Str(Int))␤»
01:51 hobbs kittenlips: I dunno, but I am. :)
01:51 skids kittenlips: probably add a section to http://docs.perl6.org/language/functions#Defining%2FCreating%2FUsing_Functions
01:51 kittenlips as a new user to Perl 6 I wasn't looking there
01:51 hobbs I'd assume not, but it's still a resource
01:51 gfldex kittenlips: that S?? are not updated anymore, so there are a few things in there that are gone already
01:52 gfldex docs.perl.org will be the user facing side of the language spec
01:52 kittenlips oh hobbs were you talking about the roast?
01:52 sprocket joined #perl6
01:54 kittenlips m: class MyClass { multi method foo (Int $x) returns Bool { return True; } multi method foo (Int $x, Rat $y) returns Str { return "Barf" } }
01:54 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BgosIFaTF2␤Strange text after block (missing semicolon or comma?)␤at /tmp/BgosIFaTF2:1␤------> 3o (Int $x) returns Bool { return True; }7⏏5 multi method foo (Int $x, Rat $y) retur␤    expecting an…»
01:55 hobbs sammers: it's for Perl 5 + Moose, not for Perl 6, but rjbs's OSCON tutorial "Moose is Perl" covers role-based patterns really nicely starting about a third of the way in. Just, y'know, all of the code examples are wrong :)
01:56 kittenlips m: class MyClass { multi method foo (Int $x) returns Bool { return True; } multi method foo (Int $x, Rat $y) returns Str { return "Barf"; } }
01:56 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w7V4So0p8G␤Strange text after block (missing semicolon or comma?)␤at /tmp/w7V4So0p8G:1␤------> 3o (Int $x) returns Bool { return True; }7⏏5 multi method foo (Int $x, Rat $y) retur␤    expecting an…»
01:56 sammers hobbs: great, thanks. I will take a look. For role naming, is it basically the name is an adjective? Like the examples here? And then act as a collection of actions?
01:56 * timotimo is working on making .hyper pay attention to the incoming sequence numbers
01:57 pjscott joined #perl6
01:57 skids glfdx: when was it decided to shuk off the synopsis as the design docs?  I don't see where docs.perl6.org can serve the same purpose and stay beginner-friendly.
01:58 skids glfdex even
01:58 kittenlips m: multi foo (Int $x) returns Bool { }; multi foo (Int $x, Rat $y) returns Str { }
01:58 camelia rakudo-moar eca5df: ( no output )
01:58 kittenlips Is it bad programming style to have a multi dispatch sub/method which returns different types?
01:58 kittenlips I would think so
01:59 Ben_Goldberg joined #perl6
02:00 pjscott joined #perl6
02:00 gfldex kittenlips: the dispatcher doesn't care. And the return type check is just that, a type check.
02:01 * skids wonders if they make thin usb keyboards meant to sit on top of a laptop keyboard because the laptop keyboard sucks.
02:01 gfldex m: sub f(--> Any) { Nil }; dd f();
02:01 camelia rakudo-moar eca5df: OUTPUT«Nil␤»
02:01 gfldex m: sub f(--> Int) { Nil }; dd f();
02:01 camelia rakudo-moar eca5df: OUTPUT«Nil␤»
02:01 gfldex kittenlips: see ^^^
02:02 kittenlips what is dd?
02:02 BenGoldberg Data Dumper
02:02 BenGoldberg Or perhaps, Debug Dumper
02:02 kittenlips thanks
02:02 kittenlips or Dig Dug
02:02 BenGoldberg I haven't played that in a looooong time.
02:03 sammers hobbs: found it, https://youtu.be/LKXvG6VKew4?t=3263
02:04 kittenlips gfldex your commands are you showing a bug in Rakudo?
02:06 hobbs sammers: in practice I've seen plenty of role names that are nouns. Adjectives are a good way to think about it, but when there's a perfectly good noun for "doodad that does XYZ"... :)
02:07 gfldex kittenlips: sorry, i don't get you
02:07 gfldex kittenlips: since this is a parse-error ===SORRY=== even
02:07 kittenlips in the examples you were trying to show
02:07 kittenlips m: sub f(--> Any) { Nil }; dd f();
02:07 camelia rakudo-moar eca5df: OUTPUT«Nil␤»
02:07 kittenlips m: sub f(--> Int) { Nil }; dd f();
02:07 camelia rakudo-moar eca5df: OUTPUT«Nil␤»
02:07 skids kittenlips: no, Nil and Failure are always allowed as return types even when specified otherwise.
02:07 kittenlips oh wow I didn't know that
02:08 gfldex and Nil is not (always) a failure mode indicator
02:08 skids (So that soft errors can still get out from inside.)
02:08 kittenlips I have to say Perl 6 is going to need amazing docs in order to lower barrier of entry, it is a very very deep language
02:08 sammers thanks hobbs, I have seen some modules in the modules.perl6.org use class Foo does Role {} which seems a little generic as naming conventions go...
02:09 pierre-vigier joined #perl6
02:12 kittenlips gfldex: if you are updating the docs I believe documentation of return type constraints should be actually in three places
02:12 kittenlips http://docs.perl6.org/language/objects#Methods https://doc.perl6.org/type/Signature#Type_Constraints https://doc.perl6.org/language/functions#Signatures
02:12 awwaiid kittenlips: yes ... I keep drawing all of these mind-maps to try to figure out a minimal set of axioms for the language :)
02:13 gfldex Function.html points to Signature.html, what is the right place for it beside the FAQ
02:13 gfldex the FAQ got --> covered
02:13 kittenlips and here again are the FOUR WAYs we discovered
02:14 kittenlips m: my Int sub foo() {}; sub bar(--> Int) {}; sub baz() returns Int {}; sub bom() of Int {};
02:14 camelia rakudo-moar eca5df: ( no output )
02:15 gfldex how do i quite a > in Pod6?
02:15 gfldex *quote
02:15 gfldex X<-->> doesn't work so well :)
02:17 cognominal joined #perl6
02:17 skids C<-->>?
02:17 flussence try X<< --> >>?
02:18 timotimo or X«-->»
02:18 timotimo (unless this is pod5
02:18 timotimo )
02:19 flussence .oO( pod6 ought to let us write q:X{}... )
02:21 skids I see C«=>» used, so «-->» should work
02:21 kittenlips is it normal for Github to barf when trying to look at pod?
02:21 kittenlips https://github.com/perl6/doc/blob/master/doc/Language/operators.pod
02:22 flussence yep, completely normal for github...
02:22 kittenlips pod is kryptonite for Github
02:22 kittenlips or should i say Pod6
02:22 xpen joined #perl6
02:23 flussence I'd say perl6 in general is, it's been an uphill battle to make that site not suck to use :/
02:23 kittenlips And hopefully someday properly syntax highlight Perl6
02:23 FROGGS joined #perl6
02:24 kittenlips I guess every site has it's drawbacks for work we also have a lot of projects on Bitbucket and it has its own share of probs
02:25 timotimo [0 1 2 3 5 6 7 8 10 11 12 14 15 17 18 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 38 39]
02:25 timotimo so close to the goal!
02:25 kittenlips timotimo: which goal?
02:25 kittenlips .hyper?
02:26 flussence gitlab does a passable job of p6 highlighting. most of it comes out red for some reason, but it's readable...
02:26 timotimo yes
02:27 kittenlips flussence: that's true it at least doesn't make things worse by highlighting
02:28 pjscott joined #perl6
02:28 kittenlips have to say both nine and MadcapJake work on syntax highlighting efforts has been awesome
02:28 flussence then again, it might be using a perl5 highlighter and just getting lucky on the boring code I throw at it :D
02:28 dalek doc: 95c4a87 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
02:28 dalek doc: doc Constraining Return Types
02:28 dalek doc: review: https://github.com/perl6/doc/commit/95c4a878ab
02:28 dalek doc: b1baf91 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
02:28 dalek doc: Merge pull request #303 from gfldex/master
02:28 dalek doc:
02:28 dalek doc: doc Constraining Return Types
02:28 dalek doc: review: https://github.com/perl6/doc/commit/b1baf91ee5
02:29 addison joined #perl6
02:29 gfldex m: sub f(%a is default(0)) { $a }; f.perl.say;
02:29 camelia rakudo-moar eca5df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mh5Tua98BP␤Can't use unknown trait 'is default' in a parameter declaration.␤at /tmp/Mh5Tua98BP:1␤    expecting any of:␤        rw␤        readonly␤        copy␤        required␤        raw␤   …»
02:29 kittenlips glfdex++
02:30 kittenlips just one thing constrain --> contraint if you use it in noun form
02:32 johnjohn101 joined #perl6
02:32 johnjohn101 hi perl 6 peeps
02:33 dalek doc: c3db56f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
02:33 dalek doc: fix typos
02:33 dalek doc: review: https://github.com/perl6/doc/commit/c3db56fe2e
02:33 dalek doc: e1e225b | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
02:33 dalek doc: Merge pull request #304 from gfldex/master
02:33 dalek doc:
02:33 dalek doc: fix typos
02:33 dalek doc: review: https://github.com/perl6/doc/commit/e1e225baf9
02:33 kittenlips hi johnjohn101
02:33 gfldex that was the test if you are paying attention :)
02:33 kittenlips ;-)
02:33 timotimo [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39]
02:33 timotimo doesn't that look good?
02:34 kittenlips awesome! what am I looking at?
02:35 flussence working threads? :)
02:35 kittenlips just kid, i know you wanted to make sure hyper was controlling order
02:35 flussence (does that even use threads?)
02:35 timotimo :)
02:35 timotimo yes, it does
02:35 timotimo 0.12user 0.02system 0:00.14elapsed 104%CPU (0avgtext+0avgdata 78992maxresident)k
02:35 autarch what's a good we to compare to Regex objects?
02:35 kittenlips The spec says that .hyper must retain order while .race doesn't have to right?
02:35 timotimo yep
02:35 timotimo [0 1 2 3 4 5 6 7 8 10 11 9 14 15 16 17 18 19 20 21 12 13 22 23 24 25 26 27 28 29 30 31 32 35 36 33 34 37 38 39]
02:36 timotimo ^- this one is with .race
02:36 flussence autarch: um, that's a bit vague
02:36 kittenlips timotimo: is this something you had to implement in MoarVM?
02:36 timotimo no
02:36 timotimo i'll clean up the code a tiny bit and push it to a branch
02:36 kittenlips oder?
02:36 [Tux] joined #perl6
02:36 autarch flussence: I want to see if two Regex objects are the same
02:36 timotimo then you can see it
02:37 flussence I think regexes stringify to their code, not sure if it canonicalises them in any way though
02:37 timotimo not at all
02:37 flussence m: my $x; my $y = rx/ foo  bar       $x baz/; say $y
02:37 camelia rakudo-moar eca5df: OUTPUT«rx/ foo  bar       $x baz/␤»
02:38 autarch yeah, that's what I was afraid of - I'll find another way to make this work
02:38 timotimo i think the control flow could be made a bit simpler
02:38 llfourn joined #perl6
02:38 timotimo but i'm dead tired right now ;)
02:39 dalek rakudo/hyper_tracks_sequence_numbers: 730639f | timotimo++ | src/core/HyperSeq.pm:
02:39 dalek rakudo/hyper_tracks_sequence_numbers: hyper now cares about sequence numbers of work
02:39 dalek rakudo/hyper_tracks_sequence_numbers:
02:39 dalek rakudo/hyper_tracks_sequence_numbers: this code wants to get a bit cleaned up. i'm sure
02:39 dalek rakudo/hyper_tracks_sequence_numbers: the control flow could be a bit less convoluted.
02:39 dalek rakudo/hyper_tracks_sequence_numbers: review: https://github.com/rakudo/rakudo/commit/730639f8df
02:39 pjscott joined #perl6
02:39 timotimo kittenlips: have a look
02:39 flussence maybe :samespace one to the shape of the other, then string compare them... hm
02:40 * flussence decides down this route lies worse insanity than html parsing and stops thinking too hard about it
02:41 sprocket joined #perl6
02:42 BenGoldberg html parsing isn't insanity.  html parsing with pure old fashioned regex is insanity.
02:45 autarch I think with Perl 6 we could parse http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 pretty easily
02:45 pjscott joined #perl6
02:45 hobbs HTML parsing isn't *completely* sane no matter what, when you get into the realm of "wrong but you still have to accept it" sort of constructs
02:46 sprocket joined #perl6
02:46 xpen joined #perl6
02:47 herby_ joined #perl6
02:47 herby_ Good evening, everyone!
02:47 kittenlips me too, night all
02:47 kittenlips left #perl6
02:48 timotimo aaw
02:48 timotimo i hoped maybe kittenlips could have a look at cleaning that code up
02:48 pjscott joined #perl6
02:49 xpen_ joined #perl6
02:52 BenGoldberg joined #perl6
02:52 xinming_ joined #perl6
02:54 johnjohn101 left #perl6
02:55 autarch every time I start working on one module I end up with an urge to write another module to make writing this one easier
02:55 BenGoldberg joined #perl6
02:56 flussence seems endemic round these parts...
02:56 llfourn joined #perl6
02:59 ugexe m: say ::("Test").^methods[^3]; say ::("Test").Int; # whats really happening that .^methods doesn't fail?
02:59 camelia rakudo-moar eca5df: OUTPUT«(BUILD DESTROY AT-POS)␤No such symbol 'Test'␤  in block <unit> at /tmp/sOFDTLwzxm line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/sOFDTLwzxm line 1␤␤»
02:59 * timotimo doesn't seem to have that
03:00 timotimo m: say ::("Test").WHAT
03:00 camelia rakudo-moar eca5df: OUTPUT«(Failure)␤»
03:00 timotimo you can ask the failure for its methods no-prob
03:00 ugexe ah
03:01 ugexe but .Int is listed in .^methods
03:02 timotimo yeah, but it throws the exception :)
03:03 timotimo m: say Failure ~~ Any
03:03 camelia rakudo-moar eca5df: OUTPUT«True␤»
03:03 timotimo m: say Any.new.Int
03:03 camelia rakudo-moar eca5df: OUTPUT«Method 'Int' not found for invocant of class 'Any'␤  in block <unit> at /tmp/svLz8CGmA3 line 1␤␤»
03:03 timotimo hmm.
03:03 timotimo ah, yes. Failure has its own Int method
03:03 timotimo it throws when unhandled, otherwise it returns 0
03:04 timotimo um, it returns Int
03:04 timotimo on jvm it returns 0
03:05 awwaiid hmm. "only onlystar-protos can be merged"
03:09 timotimo bedtime
03:09 timotimo good night!
03:10 gfldex is there any consensus where and how to store *.pod for a module?
03:11 vendethiel joined #perl6
03:12 noganex_ joined #perl6
03:13 gfldex the consensus in the eco system seams to be: "a README.md will do dude!"
03:14 ugexe most people read the docs directly from github, so that would make sense
03:14 flussence putting it in a doc/ directory with the same structure as lib/ seems like a sensible choice
03:14 autarch gfldex: I've been writing actual pod for my code - I don't think a README.md is sufficient for anything non-trivial
03:14 autarch I have vague plans around making Dist::Wocky turn pod into markdown and update a gh-pages branch on "wocky release"
03:15 autarch which seems like a reasonable thing to do til we have a cpan of our own
03:15 ugexe github displays non-pod6 pod already
03:15 rjbs autarch: Can Dist::Wocky announce releases over XMPP?
03:16 autarch rjbs: uh, it can't do squat right now ;)
03:16 autarch but I'm sure that could be a plugin someone else could write
03:16 SwellJoe joined #perl6
03:16 rjbs Could that plugin be called Dist::Wocky::Jabber? @_@
03:17 awwaiid https://gist.github.com/awwaiid/01fe0e56e2c1220548a1 # All the :lang
03:17 autarch rjbs: ah, I see
03:19 awwaiid I got Lua, Ruby, Python, and Perl5 all running from EVAL in the same p6 script (but not the same block)
03:25 b2gills m: say (^5).hyper(:batch(1),:degree(5)).map({ sleep 0.5 - $_/10; $_ }).eager # reliably in the exact wrong order (backlogging)
03:25 camelia rakudo-moar eca5df: OUTPUT«(4 3 2 1 0)␤»
03:28 pjscott joined #perl6
03:30 addison joined #perl6
03:44 uvtc joined #perl6
03:52 edehont joined #perl6
03:55 psy joined #perl6
04:04 jasanj joined #perl6
04:11 cdg joined #perl6
04:17 visitor joined #perl6
04:24 pjscott joined #perl6
04:25 pjscott joined #perl6
04:42 addison joined #perl6
04:48 FROGGS joined #perl6
04:48 rickbike joined #perl6
04:52 addison joined #perl6
04:53 pjscott joined #perl6
04:55 bpmedley joined #perl6
04:59 nexyssno joined #perl6
04:59 FROGGS joined #perl6
05:07 pjscott joined #perl6
05:11 protium joined #perl6
05:17 pjscott joined #perl6
05:19 addison joined #perl6
05:28 uvtc left #perl6
05:30 FROGGS joined #perl6
05:31 rburkholder joined #perl6
05:39 xinming joined #perl6
05:39 ugexe why does cur.install add a shebang to source files?
05:40 ugexe nevermind, the module author added it to their module for some reason...?
05:40 ugexe is there any reason to do that?
05:41 nige1 joined #perl6
05:43 pjscott joined #perl6
05:43 * TimToady smiles at the usage of "shebang" for #!, which he coined so very long ago that nobody knows it...
05:45 tony-o_ i'll credit you next time my old man tells me i can't say that at work timotimo
05:45 tony-o_ TimToady:
05:45 flussence I'd guess the most likely reason for putting it in a module is to trick vim's ftdetect into doing the right thing
05:46 flussence or some other highlight thingy
05:46 tony-o_ my really old modules have that, mostly because i'd use it to ensure valid syntax from vim
05:46 hobbs TimToady: I thought it was William Hung in 2004 :)
05:47 TEttinger I took a CS class with the very same William Hung
05:47 TEttinger he was not exactly competent
05:47 Cabanossi joined #perl6
05:47 hobbs ha
05:48 TEttinger he contributed, IIRC, between 0 and 10 lines of code to the final group project
05:49 TEttinger 10 might be generous
05:49 tony-o_ that's 10 lines you didn't have before
05:49 TEttinger and a lot of hassle asking him, did you read the docs yet?
05:50 TEttinger and of course he bailed when we got allowed overtime to finish it. only 2 people in the what, 5-person group stuck with it to the end
05:51 tony-o_ sounds like there are some holes in this story
05:51 TEttinger yep
05:51 TEttinger but mostly we bit off more than we could chew, and he didn't know how to chew
05:54 ugexe site/dists/$SHA1<depends> has a value of `[ [ ] ]` when meta6.json has `"depends" : [ ]`, and a value of `[ ]` if there there is no `depends` in the meta
05:54 regreg joined #perl6
05:55 FROGGS joined #perl6
06:02 TimToady nah, I coined it long before that in some of my ancient patch files for rn or some such, "Delete everything down to the shebang line and run it through shell" was how it went, or some such.
06:03 TimToady 'course it's possible that multiple people invented it independently, but I never heard anyone else use it before me
06:04 TimToady this would probably be in the late '80s
06:05 hobbs I was kidding of course :)
06:07 hobbs but that's interesting. I don't think anyone really *does* know the origin for sure, although wikipedia has you as the earliest known cite.
06:09 * frew wonders if it would be fun to make a perl6-ish pico-8
06:09 TimToady oh, good, they listened to me then, after I noticed they had "nobody knows" earlier :)
06:10 TimToady well, I know the origin for pretty sure :)
06:10 pierre-vigier joined #perl6
06:11 TimToady after all, I was there when I coined it :)
06:11 TimToady and it was quite intentional at the time
06:12 TimToady me already being the sort of tail that wags the dog frequently
06:13 kaare_ joined #perl6
06:14 hobbs :)
06:15 xpen joined #perl6
06:15 pjscott joined #perl6
06:16 TimToady and it was certainly just short for "sharp bang" when I coined it, regardless of their ruminations in that paragraph
06:17 moritz good morning
06:22 rickbike Happy Old Year, #perl6
06:22 skids o/
06:23 rickbike I had a issue manually installing Panda.
06:23 rickbike The scripts use git:// urls
06:23 rickbike Github recommends https:// for cloning
06:24 rickbike BTW, perl6 rocks, thanks for all the hard work!
06:25 TimToady yer welcome!
06:26 rickbike created issue: https://github.com/tadzik/panda/issues/277
06:28 adrusi I'm having problems installing panda. trying to package actually, but a normal manual install is failing
06:28 adrusi bootstrap.pl succeeds but when I run pandas I get this error http://ix.io/n4z
06:28 rickbike Visiting my Dad, maybe ComCast ISP doesn't like git:// ?
06:28 gfldex .u ᚒ
06:28 yoleaux U+1692 OGHAM LETTER UR [Lo] (ᚒ)
06:31 TimToady .u 卅
06:31 yoleaux No characters found
06:32 sprocket joined #perl6
06:32 gfldex perfectly fine chars for operators if you ask me --> https://en.wikipedia.org/wiki/Ogham_%28Unicode_block%29
06:32 hobbs rickbike: not sure what a fix should be, if any (the git urls really *should* work), but I have a workaround for you if you would like it
06:33 adrusi git:// urls won't work if port 22 is blocked
06:34 hobbs sure they will, git:// is port 9418, not 22 :)
06:35 rickbike since https "always" works, it should be the goto url everywhere in the scripts
06:35 rickbike the panda scripts seem to be using git urls, so those should be replaced with https
06:37 ugexe jdv79: so even though its not specced, source-url is part of rakudo's Distribution object apparently: https://github.com/rakudo/rakudo/blob/nom/src/core/Distribution.pm#L25
06:38 rickbike from Fetcher.pm:
06:38 rickbike when /^[http|https]'+git://'/ { return git-fetch $from.subst(/'+git'/, ''), $to, $commit;}
06:39 rickbike Is that substituting git into https URLs?
06:39 hobbs no
06:40 skids it's removing '+git'
06:40 hobbs it's replacing http+git:// with http://
06:40 hobbs and likewise with https
06:40 hobbs other than that, it uses the URL that the module says it should
06:40 hobbs you won't find the problem in the code.
06:41 skids Hrm well META.list in ecosystem is all https methods.
06:42 hobbs it's the URLs within the META.infos pointed to by that list
06:43 hobbs e.g. https://raw.githubusercontent.com/tadzik/File-Find/master/META.info has source-url: "git://github.com/tadzik/File-Find.git"
06:43 skids We have something that lints those IIRC?
06:43 hobbs rickbike: do you want a workaround so you can get some stuff installed? That, at least, is pretty easy
06:44 hobbs at least for everything on github, which is... apparently everything :)
06:44 rickbike hobbs: yes, please :)
06:45 hobbs rickbike: just add these two lines to ~/.gitconfig: http://paste.scsys.co.uk/503700
06:45 rickbike hobbs++
06:46 hobbs ++ whoever created that super useful feature :)
06:47 ugexe cur.install should not install a module that fails to precompile. '===SORRY!=== Error while compiling ...' but it still installed the dist
06:47 ugexe jeez
06:49 TimToady finally nailed the value loop context bug, whew!
06:50 TimToady turned out when it created a new block it was pushing it into the declarations of a block too far up the stack, so that even if the outer were set correctly on the block, the variables were not elaborated at the time the block was cloned
06:50 [Tux] test        Method 'get' not found for invocant of class 'Any'
06:50 [Tux] in sub MAIN at test.pl line 229
06:50 [Tux] in block <unit> at test.pl line 220
06:51 ugexe ArgFiles was just changed to CatFiles or something... probably related to that somehow
06:51 TimToady likely
06:51 [Tux] for lines () {
06:52 TimToady lizmat: ^^
06:53 pjscott joined #perl6
06:53 [Tux] same for     for lines() :eager {
06:53 [Tux] that is an older script, and I know :eager isn't needed anymore
06:55 pjscott joined #perl6
06:58 * skids changes a few packages to https, such that he can.
07:02 SwellJoe joined #perl6
07:02 regreg joined #perl6
07:08 araujo joined #perl6
07:17 edehont joined #perl6
07:17 gfldex i just checked and git:// is a lot faster
07:18 pierre-vigier joined #perl6
07:19 edehont Hi, dear Perl-people!
07:20 skids o/
07:20 edehont Trying to get my head around supplies and taps, I get a weird result from the example in the docs: http://doc.perl6.org/type/Supply#method_share
07:20 rickbike gfldex: some evil ISPs throttle upper ports, apparently including git:
07:21 edehont Both arrays @first and @second remain empty, so the result of the final say is 0.
07:23 gfldex m: my $s = Supply.from-list(^100000).share; my @first; $s.tap: { @first.push($_) }; my @second; $s.tap: { @second.push($_) }; say @first + @second;
07:23 camelia rakudo-moar eca5df: OUTPUT«0␤»
07:24 gfldex m: my $supplier = Supplier.new; my $supply_1 = $supplier.Supply; $supply_1.tap(-> $v { say "One $v" }); my $supply_2 = $supplier.Supply; $supply_2.tap(-> $v { say "Two $v" }); $supplier.emit(42);
07:24 camelia rakudo-moar eca5df: OUTPUT«One 42␤Two 42␤»
07:25 gfldex m: my $s = Supply.from-list(^100000); my @first; $s.tap: { @first.push($_) }; my @second; $s.tap: { @second.push($_) }; say @first, @second;
07:25 camelia rakudo-moar eca5df: OUTPUT«[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 8…»
07:27 pjscott joined #perl6
07:27 dalek rakudo/from-loop: 9cecde8 | (Stefan Seifert)++ | src/core/Exception.pm:
07:27 dalek rakudo/from-loop: De-confuse people trying to load a module for a CORE type
07:27 dalek rakudo/from-loop:
07:27 dalek rakudo/from-loop: Tell people who try to load a module when a similarly named internal
07:27 dalek rakudo/from-loop: type is available. E.g. give a helpful message when someone tries to:
07:28 dalek joined #perl6
07:29 dalek joined #perl6
07:31 lnrdo joined #perl6
07:31 TimToady m: sub f($x) { my $z; do $z while ++$z < $x;}; say f(5)
07:31 camelia rakudo-moar eca5df: OUTPUT«Cannot call prefix:<++>(Any); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num $a is rw)␤  in block <uni…»
07:33 skids m: my $s = Supply.interval(1).share; my @first; $s.tap: { @first.push($_) }; sleep 1; my @second; $s.tap: { @second.push($_) }; sleep 1; say @first + @second;
07:33 camelia rakudo-moar eca5df: OUTPUT«1␤»
07:33 gfldex m: my $su = Supplier.new; my $s = $su.Supply; my @first; $s.tap: { @first.push($_) }; my @second; $s.tap: { @second.push($_) }; $su.emit($_) for ^1000; say @first + @second;
07:33 camelia rakudo-moar eca5df: OUTPUT«2000␤»
07:33 gfldex edehont: see ^^^
07:34 skids m: my $s = Supply.interval(1).share; my @first; $s.tap: { @first.push($_) }; sleep 1; my @second; $s.tap: { @second.push($_) }; sleep 1; say @first, @second;
07:34 camelia rakudo-moar eca5df: OUTPUT«[1 2][2]␤»
07:34 gfldex not sure if the example should have worked or if it's outdated tho
07:34 skids That example is screwey.
07:34 skids Maybe it is assuming caching
07:34 edehont gfldex: Thanks!
07:36 skids m: my $s = Supply.interval(1).share; my @first; $s.tap: { @first.push($_) }; sleep 1; my @second; $s.tap: { @second.push($_) }; sleep 1; say @first + @second; say @first, @second; say @first + @second;
07:36 camelia rakudo-moar eca5df: OUTPUT«3␤[1 2][2]␤3␤»
07:37 gfldex m: Supply.from-list(^10).share.WHAT.say
07:37 camelia rakudo-moar eca5df: OUTPUT«(Supply)␤»
07:37 skids Though it's kinda strange that the .elems seems to take some sort of shortcut when the arrays are not iterated.
07:37 edehont gfldex: With beginners like me, in the end the documentation will be fool proof!
07:37 gfldex the iterator is doing count-only i guess
07:38 xpen joined #perl6
07:38 Psyche^ joined #perl6
07:39 CIAvash joined #perl6
07:40 nige1 joined #perl6
07:41 _mg_ joined #perl6
07:41 xpen joined #perl6
07:42 pjscott joined #perl6
07:43 domidumont joined #perl6
07:43 xpen_ joined #perl6
07:44 edehont gfldex: Thanks for now, will be back later.
07:46 pierre-vigier joined #perl6
07:48 domidumont joined #perl6
07:51 TimToady m: sub f($x) { my $z; do $z while ++$z < $x;}; say f(5)
07:51 camelia rakudo-moar 8d8d74: OUTPUT«(1 2 3 4)␤»
07:51 TimToady that's better
07:52 skids TimToady++
07:52 TimToady closed #127013 and dups #127022 & #127069
07:54 TimToady .tell jnthn We now do value loops using your Seq.from-loop routines, after some drama over doing block transforms outside of where @!BLOCKS is a valid way to look things up
07:54 yoleaux TimToady: I'll pass your message to jnthn.
07:58 moritz off-topic question: can somebody recommend some tooling for creating e-books?
07:58 moritz I'd like to write text in markdown or another simple markup format, and generate epub and PDF files from that
07:59 gfldex epub is compressed xhtml with some fairy dust
08:00 gfldex after you got the xhtml you use https://metacpan.org/pod/EBook::EPUB to stich them together
08:00 dalek doc: 03f2f85 | skids++ | doc/Type/Supply.pod:
08:00 dalek doc: Better and less racey example of Supply.share
08:00 dalek doc: review: https://github.com/perl6/doc/commit/03f2f857e8
08:00 gfldex there is a javatool publishing houses require to be used that checks epubs for conformance
08:02 gfldex https://github.com/IDPF/epubcheck there it is
08:03 AlexDaniel joined #perl6
08:03 anaeem1_ joined #perl6
08:03 lnrdo joined #perl6
08:04 moritz gfldex: thanks
08:04 AlexDaniel m: say 𝍬
08:04 camelia rakudo-moar 8d8d74: OUTPUT«40␤»
08:05 AlexDaniel m: say 𝍪
08:05 camelia rakudo-moar 8d8d74: OUTPUT«20␤»
08:05 AlexDaniel ah, right
08:05 moritz gfldex: thanks
08:05 AlexDaniel m: say 𝍢
08:05 camelia rakudo-moar 8d8d74: OUTPUT«3␤»
08:05 AlexDaniel counting rods, yay!
08:06 moritz googling shows that people recommend pandoc to convert markdown to epub
08:09 CIAvash moritz: Not sure it helps https://www.masteringemacs.org/article/how-to-write-a-book-in-emacs
08:11 darutoko joined #perl6
08:13 xinming_ joined #perl6
08:18 xinming joined #perl6
08:18 dalek rakudo/nom: 5a69da8 | TimToady++ | src/core/Exception.pm:
08:18 dalek rakudo/nom: improve message on premature virtual method call
08:18 dalek rakudo/nom:
08:18 dalek rakudo/nom: fixes RT #127097
08:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a69da88b9
08:23 virtualsue joined #perl6
08:31 xinming joined #perl6
08:32 atweiden joined #perl6
08:34 FROGGS joined #perl6
08:37 atweiden joined #perl6
08:38 adrusi I'm able to get panda installed so that I can at least get to the help message if I run it as root and specify PERL6LIB=/usr/share/perl6/vendor/lib
08:39 xpen joined #perl6
08:39 atweiden i made a short script for installing p6 modules with distro package managers (no panda): https://github.com/atweiden/alacryd
08:39 atweiden it's working so long as you install maximum one module
08:39 atweiden the problem is different modules want to write to the same files on disk
08:39 atweiden this makes pacman angry
08:40 skids I would guess the result would also be bad, since the package manager would just overwrite.
08:40 atweiden skids: indeed
08:40 atweiden but for a second there i thought i had made a breakthrough :p
08:40 adrusi If I don't use root it fails because it tries to precompile the source files in /usr/share/perl6/vendor/lib which only root can do obviously
08:41 atweiden adrusi: been clashing with that as well
08:41 skids arusi: yeah I've seen some other folks talking about that but I don't know how far they got taming rakudo for a central install + user mods.
08:42 adrusi I've been trying to make this package work https://aur.archlinux.org/packages/perl6-panda/
08:42 atweiden i saw that pkg earlier
08:42 atweiden it's what inspired me to write alacryd
08:42 atweiden :)
08:42 adrusi it looks like it's trying to do something along those lines with "rm "$pkgdir/usr/share/perl6/vendor/repo.lock""
08:43 adrusi atweiden, did you look into that at all?
08:43 atweiden adrusi: this is closest i've got to sanity http://ix.io/n4C
08:43 atweiden but it only works for one module
08:43 luiz_lha joined #perl6
08:43 atweiden *at a time
08:44 adrusi which files conflict?
08:44 nine adrusi: how did you do your "normal manual install" to arrive at that message?
08:45 lnrdo joined #perl6
08:45 atweiden /usr/share/perl6/vendor/precomp/413F3BD5D4F94D649F3E47499CCF19AF880EAC42.1451260638.8563/41/4101BAF379CCF9916615A00E2198D1A21E865858
08:45 atweiden /usr/share/perl6/vendor/precomp/413F3BD5D4F94D649F3E47499CCF19AF880EAC42.1451260638.8563/41/4101BAF379CCF9916615A00E2198D1A21E865858.deps
08:45 atweiden which is bad because one of those is moarvm bytecode
08:46 xpen_ joined #perl6
08:46 adrusi nine: honestly at this point I'm not not able to replicate it
08:47 adrusi I was following the instructions in the panda readme at the time, I think I stopped seeing that error after rebuilding the entire perl6 toolchain
08:47 atweiden you'd think the filesystem locations would be deterministic
08:47 nine atweiden: does it make sense to search recursively in bin/?
08:47 atweiden nine: what do you mean?
08:48 nine atweiden: your alacryd script searches the dists's bin/ directory recursively using the find sub. But I can't see a use-case for that. bin/ will always contain just one or several scripts, but having subdirectories in there doesn't make sense
08:49 atweiden oh, i just lifted that from panda or find::bundled
08:49 atweiden the script could easily do without it
08:51 pierre-vigier m: say [[1,2]];say [[1,2],];
08:51 camelia rakudo-moar 5a69da: OUTPUT«[1 2]␤[[1 2]]␤»
08:52 pierre-vigier how comes it flattens without the trailing comma...
08:52 nine atweiden: $*REPO[0] doesn't make sense either. $*REPO is the first repository in a linked list.
08:52 nine pierre-vigier: single argument rule
08:52 atweiden i thought it was a seq?
08:52 nine atweiden: nope
08:52 nine m: say $*REPO.^name
08:52 camelia rakudo-moar 5a69da: OUTPUT«CompUnit::Repository::Installation␤»
08:52 RabidGravy joined #perl6
08:53 nine m: say $*REPO.next-repo.^name
08:53 camelia rakudo-moar 5a69da: OUTPUT«CompUnit::Repository::Installation␤»
08:53 rindolf joined #perl6
08:53 Woodi hallo #perl6 :)
08:54 pierre-vigier m: "Hello".say
08:54 camelia rakudo-moar 5a69da: OUTPUT«Hello␤»
08:55 dalek rakudo/nom: 37e998d | lizmat++ | src/core/Promise.pm:
08:55 dalek rakudo/nom: Fix for RT #127101
08:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/37e998d92e
08:55 dalek Inline-Python: 18f0c88 | (Brock Wilcox)++ | / (5 files):
08:55 dalek Inline-Python: Further use of RESOURCES
08:55 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/18f0c88b4f
08:55 dalek Inline-Python: f11f02f | niner++ | / (5 files):
08:55 dalek Inline-Python: Merge pull request #9 from awwaiid/resources-lib
08:55 Woodi so Marpa have a better grammar then Perl6: http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2015/12/topdown.html  looks challenge has been thrown :)  it means "rewrite" someday ? :)
08:55 dalek Inline-Python:
08:55 dalek Inline-Python: Further use of RESOURCES
08:56 dalek Inline-Python:
08:56 dalek Inline-Python: Thank you very much! I'd have copied just the same :)
08:56 dalek Inline-Python: review: https://github.com/niner/Inline-Python/commit/f11f02f869
08:56 FROGGS joined #perl6
08:58 dalek roast: f153dc5 | lizmat++ | S17-promise/a (2 files):
08:58 dalek roast: Add tests for RT #127101
08:58 dalek roast: review: https://github.com/perl6/roast/commit/f153dc570b
09:00 nine Woodi: I don't see an issue. If Perl 6's grammars are not enough for your use case, just use Marpa.
09:00 nine It's no either or.
09:02 moritz marpa is a C library at its core, no?
09:02 moritz you could bind it via nativecall
09:03 nige1 joined #perl6
09:04 RabidGravy someone mentioned to me that the were working on a binding, can't remember who though
09:06 nine ugexe: can you also tell me how to implement your "should not install a module that fails to precompile" rule?
09:06 nine https://github.com/drforr/perl6-Marpa
09:07 nine It's in the ecosystem even :)
09:08 RabidGravy oh yes, I knew I'd heard about it
09:08 RabidGravy DrForr++
09:09 pierre-vigier joined #perl6
09:12 kaare_ It would be nice if using Marpa was just a switch of the use statement, but I guess the structure is completely different ?
09:12 rindolf joined #perl6
09:14 moritz if you want the same structure, why use Marpa at all?
09:14 kanishka joined #perl6
09:15 kaare_ As I understand the compaints, Marpa can go further than Perl 6 Grammars.
09:15 moritz but if you want to make use of that, you can't have it just as a switch
09:16 kaare_ If you have a grammar and want to improve on that. And find that you need Marpa, then you'd have to rewrite it all.
09:16 kaare_ Or you could just incrementally go further.
09:16 brrt joined #perl6
09:16 moritz ok, point taken
09:16 dotness joined #perl6
09:17 [particle] joined #perl6
09:21 nine .tell ugexe can you also tell me how to implement your "should not install a module that fails to precompile" rule?
09:21 yoleaux nine: I'll pass your message to ugexe.
09:23 kaare_ But I don't know where grammars give up. I'm surprised to see the two CSV modules don't use them, for example.
09:24 nine .tell ugexe :ver<*> doesn't look like a good idea. For one because you ask for version '*' (a string). But apart from that it seems to be doing here what you intended (tested with Inline::Python:ver<*> and Inline::Python:ver(v0.1))
09:24 yoleaux nine: I'll pass your message to ugexe.
09:24 atweiden joined #perl6
09:25 nine kaare_: CSV is just terribly hard to parse really as it doesn't have a fixed grammar. You need to support lots of options for dealing with real world CSVs
09:26 andreoss joined #perl6
09:27 |Tux| kaare_, the *main* reason for not using grammars in Text::CSV is that the module allows too much dynamic settings
09:27 kaare_ OTOH there is a PDF::Grammar. Looks nice
09:27 nine .tell ugexe what exactly did tony-o offer to whom? I'm genuinly curious. Also what do you mean by "then boilerplate was merged"?
09:27 yoleaux nine: I'll pass your message to ugexe.
09:27 |Tux| e.g. the separation character may change between each pass on the users request
09:28 |Tux| we tried a grammar approach (which was really hard to get right)
09:28 |Tux| the default escape character being equal to the default quotation character does not simplify the use of grammar :)
09:29 kaare_ |Tux|: OK, but is it "just" a challenge, or is nearby impossible?
09:29 nine .tell awwaiid panda caches the module database locally. So even after you upload a new version, your local database may be out of date and panda uses version information from there, even though the downloaded module has updated info. So panda update is necessary right now.
09:29 yoleaux nine: I'll pass your message to awwaiid.
09:30 |Tux| I'd choose the first, but there are 4 possible approaches to parsing CSV (wwith options)
09:30 kaare_ IOW, would Marpa handle it?
09:30 atweiden joined #perl6
09:30 |Tux| 1. state machine, 2. Grammars, 3. Simple brute force and fix, 4. Chunks
09:31 * |Tux| doesn't know Marpa
09:31 atweiden adrusi: upon further review, alacryd works
09:31 atweiden adrusi: i had forgotten that Compress::Zlib::Raw depends on Find::Bundled, and the Find::Bundled files were conflicting with those already installed to disk
09:31 atweiden *precomp files
09:32 kaare_ |Tux|: And Text;;CSV uses ... ?
09:32 |Tux| 4
09:32 |Tux| 1 would probably be the fastest, but also causes ugly and hard to maintain code
09:33 kaare_ Because of the number of distinct states?
09:34 brrt computer, hi
09:34 |Tux| 1: http://tux.nl/Talks/CSV6/state.html 2: http://tux.nl/Talks/CSV6/grammar.html 4: http://tux.nl/Talks/CSV6/chunks.html
09:34 |Tux| Chunks because of easy to understand and maintainable code
09:34 |Tux| Text::CSV has a huge pile of options
09:34 orq joined #perl6
09:35 |Tux| https://github.com/Tux/CSV/blob/master/lib/Text/CSV.pod
09:37 brrt Text::CSV is a big relief from python's csv library though... :-)
09:37 |Tux| can I take that as a compliment?
09:37 lizmat .tell jnthn feels to me that Supply.Promise should really be a promise on the Supplier to be kept in Supplier.done, so we wouldn't need a tap for it
09:37 yoleaux lizmat: I'll pass your message to jnthn.
09:38 lizmat afk for a few hours
09:38 lizmat &
09:40 kaare_ |Tux|: Thanks for the explanations. Really nice to know the reason for design choices.
09:41 |Tux| welcome
09:43 |Tux| perl5's Text::CSV_XS is written in perl and XS. The main functionality is highly optimized C (XS) code, where a state machine makes way more sense than chunks, because of the buffering overhead needed in XS
09:43 |Tux| that also explains the speed difference we still face
09:46 virtualsue joined #perl6
09:46 kaare_ I donẗ worry much about speed right now.
09:46 kaare_ Of course, in a year or so...
09:47 brrt Tux: certainly :-)
09:47 RabidGravy weeEeeEEEeell, I started on a termcap parser nine months ago which uses a grammar and part of the reason I haven't finished was that it was ridiculously slow
09:47 |Tux| thank you!
09:48 hankache joined #perl6
09:48 RabidGravy (i.e. twenty seconds to parse a typically /etc/termcap)
09:48 edehont joined #perl6
09:49 hankache morning
09:50 brrt morning
09:50 brrt we need more intelligent grammars, for sure, but it's kind of an open problem
09:50 lnrdo joined #perl6
09:50 hankache any news about that hyper problem we were talking about yesterday?
09:52 araujo joined #perl6
09:52 araujo joined #perl6
09:52 kaare_ m: say [+] (1_000_000 .. 1)
09:52 camelia rakudo-moar 37e998: OUTPUT«-499999499999␤»
09:52 kaare_ ?
09:53 moritz kaare_: that's an optimization bug. Should say 0
09:54 moritz m: say (1_000_000 .. 1).elems
09:54 camelia rakudo-moar 37e998: OUTPUT«0␤»
09:55 brrt what
09:56 brrt m: say [+] (100 .. 1);
09:56 camelia rakudo-moar 37e998: OUTPUT«-4949␤»
09:56 brrt m: say (100 .. 1);
09:56 camelia rakudo-moar 37e998: OUTPUT«100..1␤»
09:56 brrt m: say (100..1).WHAT;
09:56 camelia rakudo-moar 37e998: OUTPUT«(Range)␤»
09:57 brrt m: say (100..1).List;
09:57 camelia rakudo-moar 37e998: OUTPUT«()␤»
09:57 brrt why....
09:57 brrt have we applieda specific hyper [+] on ranges?
09:57 moritz it's not a hyper, but a reducer
09:57 moritz and yes
09:58 brrt well, thats.... great, actually
09:58 brrt you're right
09:58 moritz m: say (10 ... 1) # if you want a list of decreasing values
09:58 camelia rakudo-moar 37e998: OUTPUT«(10 9 8 7 6 5 4 3 2 1)␤»
09:58 brrt m:  say (10 ... 1).WHAT
09:58 camelia rakudo-moar 37e998: OUTPUT«(Seq)␤»
10:00 kaare_ moritz: ok, thanks
10:01 hankache can someone try this on their local rakudo:
10:01 hankache my @array = (1..1000); my @result = @array.hyper.map( {$_ + 1} ); say @result;
10:01 hankache are the results sorted ??
10:01 hankache because they're not on mine
10:02 virtualsue_ joined #perl6
10:02 moritz nope, aren't
10:03 moritz and I think that's a bug
10:03 moritz only .race is allowed to change the order
10:03 hankache moritz yes this is what i thought
10:03 moritz perl6-m -e 'my @array = (1..1000); say [<] @array.hyper.map( {$_ + 1})'
10:03 moritz False
10:04 moritz without the .hyper it says True
10:04 hankache but this made me wonder:
10:04 hankache my @array = (1..10000); my @result = @array.hyper.map( {$_ + 1} ); say @result == @result.sort;
10:04 kaare_ m: say [+] (1 .. 1_000_000)'
10:04 camelia rakudo-moar 37e998: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QthSdhY0tj␤Two terms in a row␤at /tmp/QthSdhY0tj:1␤------> 3say [+] (1 .. 1_000_000)7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤ …»
10:04 hankache m: my @array = (1..10000); my @result = @array.hyper.map( {$_ + 1} ); say @result == @result.sort;
10:04 camelia rakudo-moar 37e998: OUTPUT«True␤»
10:04 hankache ^^
10:04 moritz hankache: == is numerical comparison
10:04 kaare_ ok, that works on my moar
10:04 moritz m: my @array = (1..1000); say [<] @array.map( {$_ + 1})'
10:04 camelia rakudo-moar 37e998: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W3q8JSaNFr␤Two terms in a row␤at /tmp/W3q8JSaNFr:1␤------> 3(1..1000); say [<] @array.map( {$_ + 1})7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
10:04 moritz m: my @array = (1..1000); say [<] @array.map( {$_ + 1})
10:04 camelia rakudo-moar 37e998: OUTPUT«True␤»
10:05 moritz m: my @array = (1..1000); say [<] @array.map( {$_ + 1})
10:05 camelia rakudo-moar 37e998: OUTPUT«True␤»
10:05 moritz m: my @array = (1..1000); say [<] @array.map( {$_ + 1})
10:05 camelia rakudo-moar 37e998: OUTPUT«True␤»
10:05 moritz my local rakudo is pretty old, so it might have been fixed in the mean time
10:05 hankache moritz i have the latest rakudo
10:05 hankache so i should use ~~ instead of == ?
10:06 kaare_ It's strange that perl6 -e 'say [+] (1 .. 1_000_000)' and perl6 -e 'say [+] (1 ... 1_000_000)' has the same result on my rakudo
10:06 kaare_ only the former is much much faster
10:06 vendethiel joined #perl6
10:07 moritz kaare_: not so strange if you consider that the range operator (..) preserves more information, and thus makes it much simpler to optimize operations such as [+]
10:08 kaare_ m: say [+] (1 .. 1_000_000)
10:08 camelia rakudo-moar 37e998: OUTPUT«500000500000␤»
10:09 RabidGravy c'mon kids you've got 14 (London) hours to make 12 modules
10:09 kaare_ m: say [+] (1 ... 1_000_000)
10:09 camelia rakudo-moar 37e998: OUTPUT«(timeout)»
10:09 kaare_ moritz: The range version is faster than Perl 5.The other is glacially slow
10:10 RabidGravy I'd expect that
10:10 xinming_ joined #perl6
10:11 kaare_ So it's just a matter of applying the same optimizations to all loops, and it will be faster than Perl 5 ;-)
10:11 moritz kaare_: this particular optimization is not running a loop at all :-)
10:11 leont joined #perl6
10:12 RabidGravy the range version may not be a loop and the ... version is making a million item list
10:13 leont m: my $f = any(<a b>); say "a" ~~ / $f /;
10:13 camelia rakudo-moar 37e998: OUTPUT«P6opaque: no such attribute '$!pos'␤  in block <unit> at /tmp/ME7ECnkVzs line 1␤␤»
10:13 leont Smells like a bug
10:13 moritz it does
10:14 leont Also, is List.sort stable? If not, would it be sensible to add a :stable argument?
10:14 moritz leont: it is
10:14 leont Awesome :-)
10:17 hankache timotimo fixed it but his code needs cleanup https://rt.perl.org/Public/Bug/Display.html?id=127099
10:17 leont rakudobugged the former
10:18 hankache if we can get https://github.com/rakudo/rakudo/commit/730639f8df914cfb0a55f7c8a8dabe2ef243581c into rakudo it will be great
10:22 AlexDaniel joined #perl6
10:23 nine m: BEGIN (1, 2)[*-1]
10:23 camelia rakudo-moar 37e998: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8xvfmauIqj␤An exception occurred while evaluating a BEGIN␤at /tmp/8xvfmauIqj:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Cannot invoke this object␤  at :␤»
10:23 nine woah ^^^
10:23 pierre-vigier joined #perl6
10:23 RabidGravy badoom
10:24 espadrine joined #perl6
10:24 AlexDaniel m: say BEGIN { (1, 2)[*-1] }
10:24 camelia rakudo-moar 37e998: OUTPUT«2␤»
10:26 AlexDaniel hankache: https://rt.perl.org/Public/Bug/Display.html?id=127099
10:26 AlexDaniel ah
10:26 AlexDaniel you've already found it
10:26 AlexDaniel I should probably read the whole backlog before answering things…
10:27 AlexDaniel m: say [+] (100 .. 1) # WAT
10:27 camelia rakudo-moar 37e998: OUTPUT«-4949␤»
10:27 moritz AlexDaniel: a bug; also mentioned in the backlog :-)
10:28 AlexDaniel :)
10:28 hankache AlexDaniel thanks for submitting the rt
10:28 Begi joined #perl6
10:29 AlexDaniel hankache: I hope it will be fixed soon.
10:29 hankache AlexDaniel timotimo++ did something that is pending cleanup
10:35 leont Where is "is export" documented? Couldn't find it in S06 or S10
10:36 s_kilk joined #perl6
10:36 moritz likely S11
10:36 moritz https://doc.perl6.org/language/modules#Exporting_and_Selective_Importing
10:36 vendethiel o/, #perl6!
10:38 leont Ah, I see
10:38 leont It makes sense to be there now I'm reading it, but before that it didn't
10:40 leont How do I export something without making it part of a tag? (Other than :ALL)
10:40 leont Wait, by making it explicitly :ALL, I guess
10:41 leont Not very intuitive to me, if the goal is really "I want to explicitly import functions:
10:41 leont "
10:44 nine I wonder how many more people will report panda's already-installed problem before someone just adds the 3 lines to fix it
10:45 edehont gfldex: First paragraph on http://doc.perl6.org/type/Supply contains a link "Supplier" that links to "http://doc.perl6.org/doc/Type/Supplier". It should however link to "http://doc.perl6.org/type/Supplier".
10:46 edehont gfldex: Is this the right way to report these things?
10:47 leont I think there's a git repo for the website, just forgot which one it is
10:47 leont https://github.com/perl6/doc
10:47 moritz it's the perl6/doc repo on github
10:48 moritz the link is in the footer on every single page :-)
10:49 edehont Only ONCE on every page? :-)
10:50 RabidGravy edehont, don't worry, my typo I'll fix it
10:50 leont Obviously, that's because we're all writing our own install clients ;-)
10:50 dalek doc: 871edff | moritz++ | doc/Type/ (3 files):
10:50 dalek doc: Fix some inks, edehont++
10:50 dalek doc: review: https://github.com/perl6/doc/commit/871edffe92
10:51 RabidGravy actually, they were all mine :-(
10:51 RabidGravy sorry for any inconvenience
10:51 moritz edehont: thanks for reporting that. I've done a "git grep /Type" and found a few more instances
10:52 edehont I'm a beginner with Github, so it was not too obvious for me to go that route. I'll learn!
10:57 |Tux| nine, why not du upgrade instead of install automatically if panda detects that situation and report "up-to-date" if that proves to be the fact (just like cpan doas)
10:59 masak good noon, #perl6
11:00 lizmat masak o/
11:00 moritz good morning, masak. It's *always* morning in UGT :)
11:00 itaipu joined #perl6
11:01 edehont moritz: Not only s/Type/type/ but also s/doc\///...
11:02 moritz edehont: aye; and I missed on.
11:02 dalek doc: bfadf5e | moritz++ | doc/Type/Supply.pod:
11:02 dalek doc: Fix another link
11:02 dalek doc: review: https://github.com/perl6/doc/commit/bfadf5e3a6
11:03 masak moritz: that's not where I live, though ;)
11:04 hankache joined #perl6
11:07 pierre-vigier joined #perl6
11:07 masak quick global poll: Q::Identifier or Q::Ident ?
11:07 s_kilk joined #perl6
11:07 masak (I'm asking because I keep using 'ident' as a variable/property name, but the type is the whole word, and I'm wondering in which direction I should enforce consistency)
11:08 hankache identifier
11:08 masak hankache: because "ident" is opaque?
11:08 hankache easier to read
11:08 andreoss Q::Symbol
11:08 hankache yes masak
11:08 spider-mario joined #perl6
11:09 masak andreoss: "symbol" is neat, but too overloaded, and too unlike actual praxis/tradition in the Perl world.
11:10 masak hankache: I was entirely doing that argument, too, until I saw that in the code base I use 'ident' 489 times and 'identifier' only 87 times.
11:10 masak hankache: I'm afraid to lose a bit of convenience expanding that short form everywhere.
11:11 hankache masak I am a big fan of full words elements instead of elems etc. but u guess this is completely subjective
11:11 hankache i guess**
11:11 masak yeah
11:11 masak but what I ask about is people's subjective opinions, so that's fine :)
11:11 hankache ok :)
11:12 masak it's not a matter that can be settled objectively, as far as I can tell
11:12 masak "'identifier' is obviously better" -- "oh, ok then" :P
11:12 masak by the way, today's autopun: https://twitter.com/cathywilcox1/status/607891406372237313
11:13 hankache hehe
11:16 leont Another subjective one: which do you like better:
11:16 leont Path::Iterator.skip-vcs.ext(rx/ 'pl' 6? $ /).shebang(rx/ ^ '#!' .* 'perl6' /).in(@dirs)
11:17 leont or
11:17 leont find(@dirs, :ext(rx/ 'pl' 6? $ /), :shebang(rx/ ^ '#!' .* 'perl6' /), :skip-vcs)
11:17 * leont is used to the former, but feels like the latter will be more intuitive to others
11:18 virtualsue_ joined #perl6
11:18 masak huh. 'identifier' wasn't so bad. hankache++
11:19 nige1 joined #perl6
11:19 hankache masak yeay!!
11:19 AlexDaniel m: say [+] 1000.5 .. 0
11:19 camelia rakudo-moar 37e998: OUTPUT«0␤»
11:19 leont Also, is their a cute way to create a pair without stringifying the key?
11:20 AlexDaniel m: say [+] 1000 .. 0
11:20 camelia rakudo-moar 37e998: OUTPUT«-499500␤»
11:20 masak m: say :foo
11:20 camelia rakudo-moar 37e998: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/ECacKnY_pB line 1␤␤»
11:20 AlexDaniel m: say [+] 0 .. 1000
11:20 camelia rakudo-moar 37e998: OUTPUT«500500␤»
11:20 masak m: say (:foo)
11:20 camelia rakudo-moar 37e998: OUTPUT«foo => True␤»
11:20 AlexDaniel m: say [+] 0 .. 1000.5
11:20 camelia rakudo-moar 37e998: OUTPUT«500500␤»
11:20 masak leont: like that?
11:21 masak m: say (42 => 7)
11:21 camelia rakudo-moar 37e998: OUTPUT«42 => 7␤»
11:21 masak leont: or like that?
11:21 masak leont: it's not pairs as such that stringify the key, it's hashes (by default)
11:22 leont I thought fat arrow did
11:22 masak as you see above, no
11:22 masak m: say (False => 7).perl
11:22 camelia rakudo-moar 37e998: OUTPUT«:False(7)␤»
11:22 masak er
11:22 Skarsnik joined #perl6
11:22 masak m: say ((False) => 7).perl
11:22 camelia rakudo-moar 37e998: OUTPUT«Bool::False => 7␤»
11:22 leont Ah!
11:22 nine |Tux|: because nobody seems to care enough about that issue to start coding
11:23 masak leont: maybe it does :)
11:23 masak leont: but parens break that
11:23 andreoss > clang: error: no such file or directory: '3rdparty/dyncall/dyncallback/libdyncallback_s.a'
11:23 andreoss
11:23 * masak .oO( parentheses are for grouping! ) :P
11:23 leont m: say ((Str) => 1).perl
11:23 camelia rakudo-moar 37e998: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/UTbY9JilL3 line 1␤Str => 1␤»
11:24 Skarsnik Hello
11:24 yoleaux 30 Dec 2015 21:57Z <nine> Skarsnik: does perl6 -e 'use Test::More:from<Perl5>; diag("foo")' # print "# foo"? If yes, we have established that passing strings from Perl 6 to Perl 5 works and it's the other way around that's the issue
11:25 Skarsnik m: { loop(my $i = 0; $i < 5; ++$i) { say $i } }
11:25 camelia rakudo-moar 37e998: OUTPUT«5===SORRY!5===␤Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens␤at /tmp/Djm4jrUlis:1␤------> 3{ loop7⏏5(my $i = 0; $i < 5; ++$i) { say $i } }␤Unexpected block in infix position (two terms in a row…»
11:25 Skarsnik m: { loop (my $i = 0; $i < 5; ++$i) { say $i } }
11:25 camelia rakudo-moar 37e998: OUTPUT«0␤1␤2␤3␤4␤»
11:25 FROGGS joined #perl6
11:25 Skarsnik oh it's fixed :)
11:27 Skarsnik nine, root@testperl6:~/piko/Inline-Perl5# perl6 -I lib -e 'use Test::More:from<Perl5>; diag("foo")' -> Erreur de segmentation
11:27 Skarsnik Seg fault
11:27 |Tux| what is the eta for the utf8-c8 fix, so I could start testing/playing?
11:27 Skarsnik I should remove set LC_ALL to C in my shell x)
11:28 leont masak++ # that helped in cleaning up my code
11:28 lizmat |Tux|: this will have to wait until someone hacks that into MoarVM, and I'm afraid the bus factor on that is 0 atm
11:28 |Tux| :(
11:28 |Tux| lizmat, is the .get already adressed?
11:29 lizmat the empty line lost at the end you mean?
11:29 * leont wishes he had the tuits to dive into moarvm
11:29 |Tux| m: for (lines()) { say; }
11:29 camelia rakudo-moar 37e998: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7EjP3YowD2␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun␤at /tmp/7EjP3YowD2:1␤------> 3…»
11:29 |Tux| m: for (lines()) { .say; }
11:29 camelia rakudo-moar 37e998: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
11:30 |Tux| no, the error message I got. one sec
11:30 virtualsue joined #perl6
11:30 |Tux| Method 'get' not found for invocant of class 'Any'
11:30 |Tux| in sub MAIN at test-t.pl line 21
11:30 lizmat .oO( superstitious parens )
11:31 |Tux| which is the line «for (lines()) {»
11:31 masak m: for lines() { .say }
11:31 camelia rakudo-moar 37e998: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
11:31 |Tux| superstitious parens is very unlikely to be the cause for this message :]
11:32 lizmat no, I was just seeing them  :-)
11:32 masak right, we're just reminding you :)
11:32 lizmat m: .say for lines
11:32 camelia rakudo-moar 37e998: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
11:32 nine Skarsnik: can you perl6-gdb-m that?
11:32 |Tux| sometimes my code requires the extra parens (because of Slang::Tuxic) so I can put the required parens in the right position :P
11:33 lizmat |Tux|: ah, that problem started yesterday ?
11:33 |Tux| yes, between 16:00 MET yesterday and 08:00 MET today
11:33 masak oh, what I wouldn't do to get -i in Rakudo
11:33 masak maybe even implement it meself! :D
11:33 Skarsnik after lunch ^^
11:34 nine masak: that's just the best answer ;)
11:35 uruwi joined #perl6
11:37 cygx joined #perl6
11:37 cygx |Tux|: what would be your use case for utf8-c8?
11:38 |Tux| images and real binary data in CSV
11:38 |Tux| e.g. database exports
11:38 cygx |Tux|: utf8-c8 currently does normalization
11:38 cygx just use latin1 ;)
11:39 |Tux| utf8-c8 currently dumps core
11:39 jeteve joined #perl6
11:39 cygx depending on input? I remember having used it 'successfully'
11:40 |Tux| m: my Str$s=Buf.new(^2048 .map({256.rand.Int})).decode("utf8-c8")
11:40 camelia rakudo-moar 37e998: ( no output )
11:40 cygx m: Buf.new(255).decode("utf8-c8")
11:40 camelia rakudo-moar 37e998: OUTPUT«(signal SEGV)»
11:40 cygx there you go
11:41 lizmat m: Buf.new(254).decode("utf8-c8")
11:41 camelia rakudo-moar 37e998: OUTPUT«(signal SEGV)»
11:41 lizmat m: Buf.new(253).decode("utf8-c8")
11:41 camelia rakudo-moar 37e998: OUTPUT«(signal SEGV)»
11:41 lizmat m: Buf.new(240).decode("utf8-c8")
11:41 camelia rakudo-moar 37e998: ( no output )
11:42 lizmat m: Buf.new(241).decode("utf8-c8")
11:42 camelia rakudo-moar 37e998: ( no output )
11:42 cygx I guess it doesn't like starting a string with invalud utf-8
11:42 cygx m: Buf.new(42,255).decode("utf8-c8")
11:42 camelia rakudo-moar 37e998: ( no output )
11:43 |Tux| that was lizmat's conclusion at first too, but jnthn knew is was a deeper cause
11:46 dalek ecosystem: 2a46583 | (Stefan Seifert)++ | META.list:
11:46 dalek ecosystem: Add CompUnit::Repository::Panda to the ecosystem
11:46 dalek ecosystem:
11:46 dalek ecosystem: CompUnit::Repository::Panda automatically tries to install all modules that
11:46 dalek ecosystem: your program uses and that are not already installed.
11:46 dalek ecosystem:
11:46 dalek ecosystem: Fully recursive installation will need more infrastructure in
11:46 dalek ecosystem: CompUnit::RepositoryRegistry, so we only install modules that are used by
11:46 dalek ecosystem: compunits that use CompUnit::Repository::Panda directly.
11:46 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2a46583acd
11:46 nine Now that was a fun one ^^^ :)
11:46 lizmat m: sub MAIN { .say for lines }   # only happens within MAIN
11:46 camelia rakudo-moar 37e998: OUTPUT«Method 'get' not found for invocant of class 'Any'␤  in sub MAIN at /tmp/NDOXIupMjS line 1␤  in block <unit> at /tmp/NDOXIupMjS line 1␤␤»
11:46 xinming joined #perl6
11:47 |Tux| nine++
11:48 nine To be clear: it's really just a proof of concept more than anything else, albeit one that shows the possibilities with our repository architecture :)
11:49 [ptc] nine++  :-)
11:49 leont That modules scares me a little
11:49 andreoss left #perl6
11:49 leont s/s//
11:50 * lizmat wonders why it isn't called CloudPan  :-)
11:50 nine lizmat: I work at a marketing company. I've seen enough marketing for a life time :)
11:53 lizmat |Tux|: found the problem, testing a fix
11:54 * |Tux| feels like a canary again - tweet peep
11:55 RabidGravy nine++ # nice one
11:59 RabidGravy is it premature to start documenting the CompUnit stuff?
12:00 RabidGravy if only so that people can start making their own stuff that uses it rather than bugging nine++
12:02 nine RabidGravy: the CompUnit stuff we have now is part of 6.c, so we may as well document it. We need to make all future changes in a backwards compatible way.
12:02 ChoHag It's never premature to document things.
12:03 RabidGravy well, except if it's going to completely change in the near future or something
12:03 ChoHag Nope.
12:04 ChoHag Then the documentation just needs to indicate that the thing its documentation might completely change in the near future.
12:04 RabidGravy okay carry on then
12:05 ChoHag For example: Perl 6.
12:05 RabidGravy I look forward to your help in the documentation then
12:06 RabidGravy anyway off to the pub for a bit
12:07 ChoHag My help in the documentation has already begun, actually.
12:07 CQ joined #perl6
12:08 ChoHag And on that note I was a little saddened to see prima donnas prancing around the breakage of pod parsing the other day.
12:10 Skarsnik nine, perl6-gdb does not really work for me sadly
12:11 nine Skarsnik: why's that?
12:12 ShimmerFairy ChoHag: when was this?
12:13 nine ChoHag: in a sense, I'm actually glad. Because now I don't have to care anymore about that Grammar::Tracer bug. That would have been a "huge fucking pain".
12:13 Skarsnik How to explain... it launch gdb but input get hidden and it look like it time out/run nothing, the bt is always empty
12:14 spider-mario joined #perl6
12:14 ChoHag A week or so I think.
12:14 ChoHag A small 'clarification' of module terms.
12:14 lizmat ok, seems I have added an incompatibility
12:15 lizmat if @*ARGS contains a file name that doesn't exist, it now bombs when initializing $*ARGFILES
12:15 leont m: my %as{Any:U} = ((Str) => ~*)
12:15 camelia rakudo-moar 37e998: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/KLdX_kMGMu line 1␤␤»
12:15 lizmat rather then the first time $*ARGFILES is used
12:15 ChoHag Yes it's always better to not fix bugs than to actually have documentation.
12:15 leont That is not what I had expected :-/
12:16 ChoHag *sigh* I have to make custard.
12:16 ChoHag I've barely sat down...
12:17 zengargoylew joined #perl6
12:19 lucasb joined #perl6
12:19 leont Now I understand, the fat comma is eaten by the WhateverCode!
12:19 spider-mario joined #perl6
12:19 leont How do I stop that?
12:20 xpen joined #perl6
12:20 nine leont: replace the ~* by {~$_}
12:21 regreg joined #perl6
12:21 lizmat .oO( => eaten by * )
12:22 xpen_ joined #perl6
12:23 lucasb it's very strange how Whatever is handled in pairs. it seems it depends on the type of the key, and also on the expression on the value
12:23 lucasb m: say (foo => ~*).perl
12:23 camelia rakudo-moar 37e998: OUTPUT«:foo(WhateverCode.new)␤»
12:23 lucasb m: say (foo => *).perl
12:23 camelia rakudo-moar 37e998: OUTPUT«:foo(*)␤»
12:24 lucasb m: say (42 => *).perl
12:24 camelia rakudo-moar 37e998: OUTPUT«WhateverCode.new␤»
12:24 cygx .oO( strangely inconsistent )
12:26 lucasb m: say $( ).perl
12:26 camelia rakudo-moar 37e998: OUTPUT«$()␤»
12:26 nine Skarsnik: a more reduced test: perl6 -e 'use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q/sub foo { print @_; }/); $p5.call("foo", "hello world\n");'
12:26 nine Skarsnik: what does this print? ^^^
12:26 lucasb ^^ timotimo++ told me that $() is *not* an itemized empty list, so the .perl representation is wrong
12:27 spider-mario joined #perl6
12:27 Skarsnik nothing x)
12:27 Skarsnik but it does not segfault
12:28 nine Skarsnik: and this? perl6 -e 'use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q/sub foo { "hello world" }/); say $p5.call("foo");'
12:29 jnthn joined #perl6
12:29 amoe joined #perl6
12:29 Skarsnik hello world
12:30 Jonis joined #perl6
12:30 dalek Inline-Perl5: 5f51d6f | (Stefan Seifert)++ | lib/Inline/Perl5.pm6:
12:30 dalek Inline-Perl5: Fix more type discrepancies. STRLEN is size_t
12:30 dalek Inline-Perl5:
12:30 dalek Inline-Perl5: May fix passing strings from Perl 6 to Perl 5 on 32 bit machines.
12:30 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/5f51d6fe56
12:30 nine Skarsnik: please try this fix ^^^
12:30 smash joined #perl6
12:30 nine Had an IV there instead of size_t
12:31 dalek rakudo/nom: 4c1f815 | lizmat++ | src/core/Main.pm:
12:31 dalek rakudo/nom: Only initialize @*ARGS in MAIN_HELPER, Tux++
12:31 dalek rakudo/nom:
12:31 dalek rakudo/nom: Since init of $*ARGFILES is now lazy, we only need to init @*ARGS here
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4c1f815c07
12:31 dalek rakudo/nom: badcf48 | lizmat++ | src/core/Argfiles.pm:
12:31 dalek rakudo/nom: Don't bother with IO::CatHandle if only got $*IN
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/badcf486ca
12:31 dalek rakudo/nom: e458a20 | lizmat++ | src/core/IO/CatHandle.pm:
12:31 dalek rakudo/nom: Make sure API of .get/getc is identical to IO::Handle
12:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e458a20da7
12:32 integral joined #perl6
12:32 integral joined #perl6
12:32 Actualeyes joined #perl6
12:33 Odud joined #perl6
12:33 Skarsnik root@testperl6:~/piko/Inline-Perl5# perl6 -I lib -e 'use Test::More:from<Perl5>; diag("foo")' # foo
12:33 Skarsnik :)
12:34 lizmat $ time perl6 test-t.pl  <hello.csv    real0m12.212s   # Tux
12:34 nine Skarsnik: sooo..what's still missing?
12:35 Skarsnik running the test now
12:36 Skarsnik I was going to give you a ssh access to this system x)
12:36 lnx joined #perl6
12:37 Rotwang joined #perl6
12:37 Jonis joined #perl6
12:38 smash joined #perl6
12:38 amoe joined #perl6
12:39 Skarsnik All tests successful.
12:39 Skarsnik Files=25, Tests=343, 225 wallclock secs ( 0.03 usr  0.55 sys + 122.47 cusr 89.44 csys = 212.49 CPU)
12:39 Skarsnik Result: PASS
12:39 nine Yeah! \o/
12:40 dalek Inline-Perl5: 50a7f11 | (Stefan Seifert)++ | META.info:
12:40 dalek Inline-Perl5: First version to be really 32 bit safe
12:40 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/50a7f119b0
12:40 _nadim joined #perl6
12:41 timotimo lucasb: yeah, i think i even fixed that stringification once ...
12:42 jnthn joined #perl6
12:42 stmuk joined #perl6
12:42 fjk joined #perl6
12:44 lucasb Rakudo always gives you the opportunity to fix things twice :)
12:44 DrForr joined #perl6
12:49 Jonis joined #perl6
12:49 smash joined #perl6
12:49 timotimo the thing is i thought i had also written a test for it, but apparently i haven't
12:50 stmuk joined #perl6
12:51 amoe joined #perl6
12:51 nexysno_ joined #perl6
12:52 * hankache is nuking everything and building from scratch
12:53 hankache I made it my daily routine ;)
12:53 leont lucasb: yeah, that is odd!
12:55 Skarsnik can someone kill me? I just discover an easy way to parse c header file...
12:55 nine hankache: why?
12:55 Skarsnik clang -Xclang -ast-dump -fsyntax-only src/gumbo.h
12:56 hankache nine i did update rakudo, it seems that some modules were not working anymore
12:56 hankache nine and since i can't nuke modules, the only bet is nuke everything and rebuild
12:56 nine hankache: if your previous rakudo was >= 6.c, this should never happen
12:56 |Tux| shhhhhh
12:56 hankache unless i am missing something
12:57 nine hankache: also it's fairly trivial to just nuke modules (even if you shouldn't): rm -R install/share/perl6 && make install
12:57 hankache nine yes it was >= 6.c
12:57 nine hankache: then please allow us to debug it properly
12:57 hankache nine unfortunately i already nuked everything
12:58 hankache nine but next time if i encounter anything odd i'll let you know
12:59 hankache nine i don't remember what the error was but trying to launch the REPL gave me an error
12:59 loren joined #perl6
13:00 hankache nine and upgrading rakudo was done smoothly no errors or such. just running the REPL gave errors
13:02 kid51 joined #perl6
13:02 |Tux| csv-ip5xs        50000    17.743    17.635
13:02 |Tux| test             50000    22.254    22.146
13:02 |Tux| test-t           50000    12.308    12.200
13:02 |Tux| csv-parser       50000    47.911    47.803
13:02 |Tux| NICE!
13:03 loren Evening, #Perl 6.. *_*
13:03 hankache hi loren
13:03 loren hankache, hi o/
13:03 |Tux| o/ (14:03 over here)
13:03 hankache nine in other programming languages, how do you update anyway ?
13:04 nine hankache: well after upgrading Perl 5, you have to re-install all modules...how much I love that
13:05 hankache nine personally i always prefer to nuke and re-install, this is why it is no problem for me
13:06 |Tux| nine: s/all/XS/
13:06 nine hankache: I upgrade rakudo multiple times a day. I'd hate to re-install every time :)
13:06 loren It's 21:05  here ..
13:06 hankache nine i don't do it that often this is why maybe
13:06 nine |Tux|: well you could copy over all non-XS modules.
13:07 |Tux| otoh, I build with fallback to older versions disabled, so I indeed need to rebuild all my 1950 installed distributions again after upgrading perl5
13:07 Tonik joined #perl6
13:07 |Tux| nine, with the default options, yoiu don't need to: it will find them in the old folder structure
13:08 pierre-vigier joined #perl6
13:08 |Tux| $ perl5 -V:inc_version_list
13:08 nine |Tux|: then I guess openSUSE's packages deactivate that option
13:09 |Tux| OpenSUSE 13.1$ /usr/bin/perl -V:inc_version_list
13:09 |Tux| inc_version_list='5.18.0/x86_64-linux-thread-multi 5.18.0';
13:09 |Tux| and yes, I think that vendors clear out old folders on system upgrades
13:09 stmuk joined #perl6
13:10 Rotwang joined #perl6
13:10 Jonis joined #perl6
13:10 * |Tux| never uses system-perl
13:10 smash joined #perl6
13:10 |Tux| OpenSUSE Tumbleweed$ /usr/bin/perl -V:inc_version_list
13:10 |Tux| inc_version_list='5.22.0/x86_64-linux-thread-multi 5.22.0';
13:11 M-matthew joined #perl6
13:11 lnx joined #perl6
13:11 leont The re-use of old module dirs in p5 was nice in 1994, but not so much in 2015
13:12 |Tux| agree
13:12 leont Mainly because it's reusing PP modules but not XS, so that tends to generate missing dependencies
13:13 Arrowhead joined #perl6
13:17 ZoffixW joined #perl6
13:18 Jonis joined #perl6
13:18 jnthn joined #perl6
13:18 smash joined #perl6
13:18 ZoffixW m: sub announce-hny ($irc, Hash $tz, Instant :$next-new-year) {}; my $irc = 42; my $tz = {}; announce-hny $irc, $tz; say 'ok'
13:18 camelia rakudo-moar e458a2: OUTPUT«ok␤»
13:18 ZoffixW For some reason in my code, the above gives "Invocant requires an instance of type Instant, but a type object was passed.  Did you forget a .new?"
13:18 Rotwang joined #perl6
13:19 ZoffixW And if I add :next-new-year(now), then there aren't errors. What could be causing that?
13:19 lizmat |Tux|: made a small tweak in CSV, could you verify / bench ?
13:19 |Tux| pull?
13:19 lizmat yes, please
13:19 lnx joined #perl6
13:19 Arrowhead Hello. Here's what I've been working on the last couple of days: OpenGL bindings. https://github.com/bartschuller/perl6-OpenGL
13:19 AlexDaniel oooooh
13:20 ZoffixW Here's a larger version of the code: https://gist.github.com/zoffixznet/01e41984dc3249079fa7
13:20 lizmat Arrowhead++
13:20 ZoffixW wow, that's sweet. Arrowhead++
13:20 AlexDaniel Arrowhead: that's very cool
13:20 Skarsnik neat
13:20 lizmat Arrowhead: is it in the ecosystem already ?
13:21 Arrowhead I'm interested in reports on other OS's besides Mac. And it does literally nothing more than what the screenshot shows, but it's a start.
13:22 Skarsnik 1Gb ram + 1GB swap is enough to build rakudo/moar?
13:22 Arrowhead lizmat: nope. Is it ok to drastically change module names and APIs for stuff in the ecosystem?
13:22 brrt joined #perl6
13:23 lizmat Arrowhead: well, probably not  :-)
13:23 nine Why not? As long as you're clear that this is pre-alpha software
13:23 lizmat Skarsnik: feels like that is enough
13:23 Arrowhead I think we need 2 ecosystems then, because I do agree we need a place to gather stuff like this as well, even though I can't guarantee anything about stability.
13:24 leont Skarsnik: probably, but don't expect to do anything else at the same time
13:24 ZoffixW Skarsnik, fwiw, I successfully built on 1GB RAM and 3GB swap. I seem to recall someone saying 2.5GB total is needed, but I may be imagining things
13:24 lizmat Arrowhead: I feel nine is right, as long as you make clear it's pre-alpha
13:24 lizmat Arrowhead: then people know what their dealing with
13:24 virtualsue joined #perl6
13:25 leont Yeah, it's all about expectation management
13:25 |Tux| test-t           50000    12.267    12.159
13:25 Skarsnik I will create a swap file if needed then lol
13:25 Skarsnik it's just a vm x)
13:25 leont At this stage, people won't be terribly upset if stuff breaks AFAICT, but that will change as perl6 gets adopted more.
13:26 ZoffixW Arrowhead, nah, we don't need two ecosystem. Just give a nice fat warning that it's experimental and things can change, like here: https://github.com/zoffixznet/perl6-IRC-Client#description
13:26 Skarsnik I found a tool that output clang ast as XML, give me hope to generate C Binding from just a C header :)
13:26 ZoffixW I think it's fine to release experimental stuff at any stage. More user input. Maybe more volunteers.
13:26 Arrowhead Ok, I'll submit it then.
13:27 nine It's hard to imagine a CPAN without version 0.02 modules with authors having great plans and the last release being from 2007. May sound useless, but we have used and even adopted such modules.
13:27 AlexDaniel Arrowhead: “Cannot locate native library 'libglfw3.so.3'” I have debian packages libglfw3 and libglfw3-dev install, what else do I need?
13:27 lizmat ZoffixW Skarsnik just monitored building the settings on OS X: the moar process grows to just over 1G
13:27 AlexDaniel installed*
13:27 Skarsnik it's not like we have a strict protocol if you want to remove something Kappa
13:27 lizmat I'm not sure how much memory building Moar / NQP take, but assume that to be less
13:27 * ZoffixW makes a mental note
13:27 dalek rakudo/query_repos: c639da5 | (Stefan Seifert)++ | src/core/CompUnit/Repository (3 files):
13:27 dalek rakudo/query_repos: CompUnit::Repository::resolve
13:27 dalek rakudo/query_repos:
13:27 dalek rakudo/query_repos: New method to ask the repository chain if a module matching the given
13:27 dalek rakudo/query_repos: DependencySpecification is available. This could for example be used
13:27 lizmat nine: I stand corrected  :-)
13:27 dalek rakudo/query_repos: by panda to avoid trying to install an already installed module.
13:27 dalek rakudo/query_repos: review: https://github.com/rakudo/rakudo/commit/c639da573a
13:27 nine lizmat: what do you think about this? ^^^
13:27 leont It's the precompiling the setting step that takes most memory, IME
13:28 leont Anything else isn't really heavy
13:28 nine Anyone: what do you think about this commit?
13:28 lizmat nine: feels a bit like the old .candidates interface  :-)
13:28 Arrowhead AlexDaniel: Can you figure out what the library is called then? dpkg -L libglfw3 and look at the .so files.
13:28 lizmat nine: fwiw, I think TimToady likes us to return Nil rather than type objects
13:28 nine lizmat: well, yes. Because .candidates was a good idea that is worthy of bringing back :)
13:28 Skarsnik My bet is libglw.so.3
13:29 Skarsnik not libglw3 x)
13:29 ZoffixW This is weird... the error I'm having disappears if I comment out this line:     my $prefix = $next-new-year ?? 'Happy New Year to' !! "Next New Year is in {denominate $next-new-year} in";
13:29 Skarsnik root@testperl6:/tmp/CastXML# apt-file search libglfw3.so.3
13:29 Skarsnik root@testperl6:/tmp/CastXML# apt-file search libglfw.so.3
13:29 Skarsnik libglfw3: /usr/lib/i386-linux-gnu/libglfw.so.3
13:30 nine lizmat: next step would be to add a method for even fuzzier search in the repos, i.e. where the short-name is also smart matched, for usage by Module::Pluggable.
13:30 ZoffixW m: sub announce-hny ($irc, Hash $tz, Instant :$next-new-year) {my $prefix = $next-new-year ?? 'Happy New Year to' !! "Next New Year is in {$next-new-year} in";}; my $irc = 42; my $tz = {}; announce-hny $irc, $tz; say 'ok'
13:30 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Instant in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub announce-hny at /tmp/InX7R73BdT line 1␤ok␤»
13:30 Jonis joined #perl6
13:30 AlexDaniel Arrowhead: it is  libglfw.so.3
13:30 nine lizmat: this would then return a list of candidates instead of the first match.
13:30 lucasb ZoffixW: I think denominate expects a concrete value
13:30 ZoffixW Oh, I'm a dumbass
13:30 lizmat ++nine :)
13:30 AlexDaniel Arrowhead: and also just libglfw.so
13:31 ZoffixW lucasb, I need to switch the ?? and !! parts in the conditional :P
13:31 Arrowhead AlexDaniel:  right. can you try with that changed in GLFW.pm6? constant LIB = ('glfw', v3);
13:31 jnthn joined #perl6
13:31 AlexDaniel Arrowhead: sure
13:31 stmuk joined #perl6
13:32 ZoffixW Atom barely chugs along on a 3300-line file -_-
13:32 Arrowhead I'm expecting more trouble with the GL library itself.
13:32 ZoffixW And it's mostly due to P6 highlighting :/
13:32 lnx joined #perl6
13:32 * ZoffixW switches into mst mode, for performance reasons :P
13:32 AlexDaniel Arrowhead: NativeCall: Consider adding the api version of the library you want to use, sub foo is native(GL, v1) Segmentation fault
13:34 Arrowhead AlexDaniel: oops. Ok, I guess I'll have to install Virtualbox again, etc. That could take a while.
13:34 Arrowhead btw: what would be the way to silence that warning when all you have is libfoo.so?
13:35 Skarsnik constant LIB = $*DISTRO.name eq 'macosx' ?? '/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib' !! ('GL');
13:35 Skarsnik I am not sure if that work correctly to have a list with a only the name x)
13:35 AlexDaniel Arrowhead: ('GL', v1);
13:36 Skarsnik m: use NativeCall :TEST; say check_library_name(('GL'));
13:36 AlexDaniel Arrowhead: I've tried that and now all I have is a segmantation fault
13:36 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qDik5FB0oO␤Undeclared routine:␤    check_library_name used at line 1. Did you mean 'guess_library_name'?␤␤»
13:36 nige1 joined #perl6
13:36 Skarsnik m: use NativeCall :TEST; say find_library_name(('GL'));
13:36 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aPZ3P0Kair␤Undeclared routine:␤    find_library_name used at line 1. Did you mean 'guess_library_name'?␤␤»
13:36 Skarsnik Oh thx the error lol
13:36 Skarsnik m: use NativeCall :TEST; say guess_library_name(('GL'));
13:36 camelia rakudo-moar e458a2: OUTPUT«NativeCall: Consider adding the api version of the library you want to use, sub foo is native(GL, v1)␤libGL.so␤»
13:37 Arrowhead m: use NativeCall :TEST; say guess_library_name(('GL', v1));
13:37 camelia rakudo-moar e458a2: OUTPUT«libGL.so.1␤»
13:37 Arrowhead AlexDaniel: see? then it expects a 1 in the name
13:37 Skarsnik GL does not have a version? like 2 or 3 now?
13:37 Arrowhead as you can see from my hardcoded file name: not on my Mac.
13:38 Arrowhead anyway, you're on your own for now until I can get a Linux VM set up.
13:38 Skarsnik it's weird there is no libGL.3.dylib ?
13:39 Skarsnik hm, for debian libgl1-mesa-glx: /usr/lib/i386-linux-gnu/libGL.so.1
13:39 AlexDaniel that's what I've found as well
13:39 nine On my system libglfw3.so.3 is called libglfw.so.3
13:39 Skarsnik Oh yeah OpenGL is not a weird case where the lib could be provided by a vendor?
13:40 Rotwang joined #perl6
13:40 amoe joined #perl6
13:40 Arrowhead Actually, they don't want to do libraries anymore. They want you to ask for function pointers, but NativeCall can't call function pointers, so what I have working on Mac may not work anywhere else.
13:40 nine AlexDaniel: other than that, everything seems to work :)
13:40 lnx joined #perl6
13:40 jnthn joined #perl6
13:41 dalek rakudo/query_repos: 92ef589 | (Stefan Seifert)++ | src/core/CompUnit/Repository (3 files):
13:41 dalek rakudo/query_repos: CompUnit::Repository::resolve
13:41 dalek rakudo/query_repos:
13:41 dalek rakudo/query_repos: New method to ask the repository chain if a module matching the given
13:41 dalek rakudo/query_repos: DependencySpecification is available. This could for example be used
13:41 dalek rakudo/query_repos: by panda to avoid trying to install an already installed module.
13:41 dalek rakudo/query_repos: review: https://github.com/rakudo/rakudo/commit/92ef589c74
13:41 stmuk joined #perl6
13:42 ab6tract joined #perl6
13:42 AlexDaniel nine: does not work here, hmmm :(
13:42 nine Arrowhead: On my system libglfw3.so.3 is called libglfw.so.3. Other than that, everything seems to work :)
13:43 Arrowhead work as in you get a window?
13:43 AlexDaniel if I do ('GL', v1) then it just segfaults
13:43 Arrowhead nine: with the triangle?
13:43 nine Arrowhead: yes, just like in your screen shot
13:43 Arrowhead yay!
13:44 smash joined #perl6
13:46 Skarsnik nine, I was thinking of being able to write is native('foo', False) to allow to cut off the warning explicitly (like for mysqlclient that does not follow a correct versionning)
13:46 itaipu joined #perl6
13:47 ab6tract m: sub f(:$x)  { $x ?? "no x" !! "x is $x" } # minimal case for ZoffixW's issue
13:47 camelia rakudo-moar e458a2: ( no output )
13:47 ab6tract doh.
13:48 ab6tract m: sub f(:$x)  { $x ?? "no x" !! "x is $x" }l say f()
13:48 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7IdrYUshVW␤Strange text after block (missing semicolon or comma?)␤at /tmp/7IdrYUshVW:1␤------> 3ub f(:$x)  { $x ?? "no x" !! "x is $x" }7⏏5l say f()␤    expecting any of:␤        infix␤       …»
13:48 ab6tract m: sub f(:$x)  { $x ?? "no x" !! "x is $x" }; say f()
13:48 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value $x of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub f at /tmp/zMAM7jWOGm line 1␤x is ␤»
13:48 ab6tract this seems like it could be connected to the .DEFINITE patch?
13:48 Arrowhead BTW the demo is based on http://www.opengl-tutorial.org/ and I'll probably try to implement more from that.
13:50 integral joined #perl6
13:50 integral joined #perl6
13:50 ZoffixW ab6tract, the above seems correct to me. the undefined $x is stringified, generating the warning. The issue I was getting is the error was saying the typed named param my sub had received "a typed object" whenever I omited it
13:51 ab6tract ZoffixW: but $x should not evaluate to True if it is empty / undefined
13:51 ab6tract or uninitialized.
13:51 ab6tract it is the same problem AFAICT, because in neither example should it be going to the second half of the ternary
13:51 ZoffixW ab6tract, right. And your example has the same error as my code had: the evaluated paths in the ternary are switched around
13:52 ZoffixW the path that stringifies $x is in the "false" path
13:52 leont Any I the only one who is missing a definedness operator, much like ? does for booleans?
13:52 lnx joined #perl6
13:52 ZoffixW like // ? :)
13:53 ab6tract leont: defined is not usually what you want anymore.
13:53 leont Could be, could be I have p5isms in my p6
13:53 smash joined #perl6
13:53 stmuk joined #perl6
13:54 ab6tract leont: stick to truthy :)
13:54 ZoffixW m: sub infix:<≤> { * <= * }; sub infix:<≥> { * >= * }; say 4 ≤ 5
13:54 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IVA_6YAsUw␤Calling infix:<≤>(Int, Int) will never work with declared signature ()␤at /tmp/IVA_6YAsUw:1␤------> 3<= * }; sub infix:<≥> { * >= * }; say 4 7⏏5≤ 5␤»
13:54 leont I have cases where that just doesn't work
13:55 ZoffixW m: sub infix:<≤> ($, $) { * <= * }; sub infix:<≥> ($, $)  { * >= * }; say 4 ≤ 5
13:55 camelia rakudo-moar e458a2: OUTPUT«WhateverCode.new␤»
13:55 leont E.g. 0 is a perfectly fine exit-status, but Int means there is no exit-status
13:55 ShimmerFairy leont: then you want 'with' :)
13:55 ab6tract ZoffixW: the WhateverCode doesn't populate the signature for you
13:55 ShimmerFairy m: with "foo".index("f") { say "Yay!" }
13:55 camelia rakudo-moar e458a2: OUTPUT«Yay!␤»
13:56 ShimmerFairy m: with "foo".index("b") { say "aw" }
13:56 camelia rakudo-moar e458a2: ( no output )
13:56 leont with doesn't have a ternary operator, yet
13:56 jshy joined #perl6
13:56 ShimmerFairy One could probably invent ¿¿ ¡¡ or ??? !!! or somesuch :P
13:57 leont ??? !!! doesn't sound like a bad idea at all
13:57 dalek perl6-roast-data: 0ace568 | coke++ | / (7 files):
13:57 dalek perl6-roast-data: today (automated commit)
13:57 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0ace568e4a
13:57 ZoffixW leont, is that for $foo.defined ?? !! ?
13:57 ab6tract m: sub infix:<≤> ($, $) { * <= * }; sub infix:<≥> ($, $)  { * >= * }; say (4 ≤ 5)(4,5)
13:57 camelia rakudo-moar e458a2: OUTPUT«True␤»
13:57 lucasb hey, the tag v6.c is still there at rakudo repo. wasn't people talking about removing it?
13:58 ZoffixW ab6tract, so a closure is returned?
13:58 leont Yeah
13:59 lucasb you are all trying to explain things in the mailing list, while contributing to the confusion having that tag in the rakudo repo
13:59 ZoffixW m: sub infix:<≤> ($a, $b) { $a <= $b }; sub infix:<≥> ($a, $b)  { $a >= $b }; say 4 ≤ 5
13:59 camelia rakudo-moar e458a2: OUTPUT«True␤»
13:59 ab6tract ZoffixW: most common use case of 'with' is for array indices and other things that are falsey
13:59 Rotwang joined #perl6
13:59 ab6tract but which you want to pass through
13:59 lnx joined #perl6
13:59 smash joined #perl6
13:59 stmuk joined #perl6
14:00 ZoffixW I really miss having ≤ and ≥ as the Texas variants confuse me into thinking some sort of assigning defaults is happening
14:00 * Skarsnik don't want to read DBI code :(
14:00 * ZoffixW contemplates Operators::Extra
14:01 ShimmerFairy ZoffixW: to be fair, I still don't know why they're not in CORE.
14:01 ZoffixW ShimmerFairy, yeah, I'd think they're far more useful than division sign that looks like two dots with a line
14:01 lizmat m: enum XB (:TB(1024*1024*1024*1024), :GB(1024*1024*1024), :MB(1024 * 1024), :KB(1024), :bytes(1)); sub human($b,$p = 0.1) { for XB.^enum_value_list -> $XB { return "{round($b/$XB,$p)} $XB" if $b div $XB }}; say human 4000    # wonder if this warrants an ecosystem module or not
14:01 camelia rakudo-moar e458a2: OUTPUT«3.9 KB␤»
14:02 ZoffixW Does precompilation solve the addition of custom operators being super expensive?
14:02 ZoffixW lizmat, http://modules.perl6.org/repo/Number::Denominate
14:02 ZoffixW lizmat, there's already an :info-1024 set, though I think it uses full names. You can define your own sets tho
14:04 nine Ok, I'm taking the rest of the year off. See you all next year :) Oh and happy new year!
14:04 ab6tract wrt to that example, it's returning a WhateverCode. which is a closure, but also slightly more opaque
14:04 Skarsnik Happy new year nine
14:04 ab6tract m: my $f = * >= ++$; say $f(1); say $f(1)
14:04 camelia rakudo-moar e458a2: OUTPUT«True␤False␤»
14:04 lizmat ZoffixW: good to know  :-)
14:04 Skarsnik Is there any plan for translation support? x)
14:04 ab6tract nine: cheers man! have a great one!
14:05 dalek roast: b0c17ab | usev6++ | S32-exceptions/misc.t:
14:05 dalek roast: Add test for RT #126888
14:05 dalek roast: review: https://github.com/perl6/roast/commit/b0c17ab00c
14:05 awwaiid bye nine!
14:05 yoleaux 09:29Z <nine> awwaiid: panda caches the module database locally. So even after you upload a new version, your local database may be out of date and panda uses version information from there, even though the downloaded module has updated info. So panda update is necessary right now.
14:07 ZoffixW I see a slight difference tho :) It doesn't round with decimals: https://gist.github.com/zoffixznet/d1679d9e4c443ac9fe67
14:07 hankache joined #perl6
14:08 jnthn joined #perl6
14:08 Jonis joined #perl6
14:08 hankache i nuked everything and build from scratch
14:08 hankache when i try to panda install Linenoise it complains about File::Find being already installed
14:09 hankache what should i do?
14:09 integral joined #perl6
14:09 ZoffixW Use the --force, Luke
14:09 ZoffixW It's an issue: https://github.com/tadzik/panda/issues/274
14:09 brrt joined #perl6
14:11 hankache panda --force install Linenoise
14:11 hankache still fails
14:11 ZoffixW Yeah
14:11 ZoffixW Oh. What's the error?
14:11 hankache File::Find:ver<0.1>:auth<>:api<> already installed
14:11 pjscott joined #perl6
14:12 Skarsnik DBI code is crazy lol
14:12 hankache and Readline doesn't install
14:12 ZoffixW hankache, weird. That method was working for me last night
14:12 hankache so i have no line editing :(
14:13 Skarsnik Readline need to be fixed for recent rakudo no?
14:14 Lordo joined #perl6
14:14 lucasb hankache: Use rlwrap, Luke :)
14:15 ZoffixW m: my $x = now; say "{$x.WHAT}"
14:15 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Instant in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/HYjkz97_iu line 1␤␤»
14:15 ZoffixW :/
14:16 ZoffixW m: my $x = now; say "{$x.WHAT.Str}"
14:16 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Instant in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at /tmp/BagRJBA3it line 1␤␤»
14:16 [Coke] lucasb: yes, I asked about removing it. No one had a strong opinion.
14:16 Skarsnik that weird
14:16 Skarsnik it should know $x is an Instant
14:17 AlexDaniel ZoffixW: ah right, we still don't have ≤ ≥ ≠ :)
14:17 ZoffixW m: my $x = now; say $x.WHAT ~ ' '
14:17 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Instant in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/rHSJTzvs4B line 1␤ ␤»
14:17 Skarsnik m: say now.WHAT
14:17 camelia rakudo-moar e458a2: OUTPUT«(Instant)␤»
14:17 leont Anyway to do "call method if invocant is defined", other than spelling it out?
14:17 ZoffixW leont, $foo?.bar
14:17 ZoffixW or ?. I forget :)
14:17 lucasb [Coke]: I'm a outsider, but I have a strong +1 for removing the tag :)
14:18 hankache great same for JSON::Fast
14:18 leont .? isn't quite the same
14:18 ZoffixW m: class Foo { method bar { say "baars" }};  Foo.new.?bar.?foo
14:18 camelia rakudo-moar e458a2: OUTPUT«baars␤»
14:18 ZoffixW leont, oh, I though it was. What's the difference?
14:18 leont m: say Str.?Int
14:18 camelia rakudo-moar e458a2: OUTPUT«Invocant requires an instance of type Str, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/tM_iJEBtwJ line 1␤␤»
14:18 hankache how can i install the modules ?
14:18 hankache --force is not working
14:19 leont It checks for method availability, not for definedness
14:19 AlexDaniel hankache: what is the error then?
14:19 smash joined #perl6
14:19 stmuk joined #perl6
14:19 RabidGravy joined #perl6
14:19 hankache AlexDaniel JSON::Fast:ver<v0.3>:auth<>:api<> already installed
14:19 jnthn joined #perl6
14:19 ZoffixW leont, just curious, what's the use case?
14:19 gumma joined #perl6
14:19 AlexDaniel hankache: and when you do 「panda --notests install JSON::Fast」 ?
14:19 AlexDaniel oops
14:20 Rotwang joined #perl6
14:20 ab6tract ZoffixW: hmm, looks like 'now' has even more issues than just the weird bad-ternary-path :(
14:20 AlexDaniel --force, not --notests
14:20 leont I'm looking for a shorter version of this:
14:20 lnx joined #perl6
14:20 leont return $!exit-status.defined && $!exit-status.status;
14:20 amoe joined #perl6
14:20 hankache AlexDaniel same error
14:20 ZoffixW ab6tract, there's no issue with the ternary
14:20 AlexDaniel hankache: huh!
14:20 ZoffixW As for above, it happens with other types too:
14:20 ZoffixW m: my $x = 42; say $x.WHAT ~ ' '
14:20 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Int in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/tRKDz0PNLt line 1␤ ␤»
14:20 lizmat leont: return .status with $!exit-status
14:20 ab6tract ZoffixW:  ah, nevermind
14:20 AlexDaniel leont: actually, this question has already been asked a few times
14:20 hankache AlexDaniel panda --force install JSON::Fast
14:21 leont lizmat: Ah!
14:21 AlexDaniel leont: I don't really remember what is the answer. Hmmm
14:21 ab6tract but there is still the ternary issue from earlier
14:21 hankache AlexDaniel same error as panda install JSON::Fast
14:21 Skarsnik DBD::Pg allows arrays (as arrayrefs) to be passed in to both
14:21 Skarsnik the L</quote> and the L</execute> methods. In both cases, the array is
14:21 Skarsnik flattened into a string representing a Postgres array.
14:21 Skarsnik duh, that cheating/bad
14:21 leont Yes, the ternary I'd use in many more places
14:21 AlexDaniel hankache: this is not nice. I'm not sure how to help though
14:21 ab6tract m: my $x; say $x ?? 'no x' !! "x is $x"
14:22 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value $x of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/ZkhuDVqoTe line 1␤x is ␤»
14:22 ab6tract this is definitely a bug
14:22 ZoffixW ab6tract, no it's not. You're not using the ternarry correctly
14:22 leont Method above it has «$!exit-status.defined ?? $!exit-status.exitcode !! Int». with doesn't really make that  better
14:22 ZoffixW m: say True ?? "Yes it's true" !! "No it's not true"
14:22 camelia rakudo-moar e458a2: OUTPUT«Yes it's true␤»
14:22 ab6tract oh, damnit.
14:22 hankache AlexDaniel well yeah i can't install most of the modules i need because they depend on the ones panda needs
14:22 ZoffixW :)
14:22 ab6tract that's my fault for cargo culting your code ;P
14:22 ZoffixW ^_^
14:22 AlexDaniel hankache: could it be that your panda is old and does not support --force ?
14:23 ab6tract and suffering from jetlag
14:23 ab6tract :)
14:23 AlexDaniel hankache: just a blind guess
14:23 integral joined #perl6
14:23 integral joined #perl6
14:23 hankache AlexDaniel i nuked everything and built from scratch
14:23 hankache AlexDaniel i should have the latest
14:24 AlexDaniel hankache: well, if it is listed in panda --help then yeah
14:24 hankache AlexDaniel yes listed
14:24 AlexDaniel dunno then :(
14:25 smash joined #perl6
14:25 stmuk joined #perl6
14:26 hankache AlexDaniel thank you in all cases
14:26 AlexDaniel leont: ah
14:26 amoe joined #perl6
14:26 Rotwang joined #perl6
14:26 lnx joined #perl6
14:26 AlexDaniel m: sub foo { return ‘test’ }; foo() andthen .say
14:26 camelia rakudo-moar e458a2: OUTPUT«test␤»
14:26 bpmedley joined #perl6
14:26 AlexDaniel m: sub foo { return Any }; foo() andthen .say
14:26 camelia rakudo-moar e458a2: ( no output )
14:26 perlpilot good $localtime all
14:26 AlexDaniel leont: is that what you want?
14:27 hfhkk joined #perl6
14:27 pmurias joined #perl6
14:27 ZoffixW Man, I'm always cursed with awful, annoying bugs when making New Years bots -_- Right now my timeout magically changes into a different value and I can't find where or why :/
14:28 leont AlexDaniel: yes, thanks!
14:28 hfhkk hi
14:28 ZoffixW hi
14:28 Jonis joined #perl6
14:28 AlexDaniel leont: the question that was discussed multiple times is how to turn andthen into an operator
14:28 AlexDaniel leont: because ‘andthen’ is a bit too long to type
14:29 ZoffixW That reminds me of Dude Where's My Car movie :P
14:29 AlexDaniel leont: I don't remember any solution to this, maybe once we have proper macros it will become possible…
14:29 AlexDaniel hmm
14:29 AlexDaniel m: sub foo { return Any }; foo() orthen .say
14:29 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ojzdt_4ZYu␤Bogus statement␤at /tmp/Ojzdt_4ZYu:1␤------> 3sub foo { return Any }; foo() o7⏏5rthen .say␤    expecting any of:␤        whitespace␤»
14:29 leont «return $!exit-status andthen .exitcode orelse Int» looks not that bad (though it could be shorter), lets see if it works too
14:30 skyl4rk in perl5 I could achieve runtime reloading of a module by deleting it from %INC, and require it again, is there something like that for 6?
14:30 AlexDaniel there's no orthen, then why not call it just ‘then’ ? :)
14:30 Skarsnik skyl4rk, it's similar, but I am not sure how you do it with the new repo api x)
14:30 AlexDaniel m: sub foo { return False }; foo() andthen .say
14:30 camelia rakudo-moar e458a2: OUTPUT«False␤»
14:30 AlexDaniel m: sub foo { return True }; foo() andthen .say
14:30 camelia rakudo-moar e458a2: OUTPUT«True␤»
14:32 lnx joined #perl6
14:33 lizmat skyl4rk: why would you runtime reload a module ?
14:33 ZoffixW Do Instance objects have some sort of magic that would make them return a different value in math operations when executed in a Promise?
14:33 ZoffixW I'm hitting some sort of a Shrodinger's Bug :/
14:33 jnthn joined #perl6
14:33 lizmat ZoffixW: not aware of any such magic
14:33 perlpilot ZoffixW: that often happens with threads  :)
14:34 smash joined #perl6
14:34 pjscott joined #perl6
14:34 lizmat when you say "executed in a Promise", you mean a start {} block ?
14:34 perlpilot ZoffixW: maybe post the code somewhere so that more eyes can help find the bug?
14:34 Jonis joined #perl6
14:34 _mg_ joined #perl6
14:35 perlpilot (also we wouldn't have to ask questions such as lizmat's since the code would tell us :)
14:35 skyl4rk lizmat: plugin-based long-running service that I want to be able to update the plugins of, without having to restart the whole service and close/reopen all connections ...in my case it's an irc bot and just for fun
14:35 ZoffixW lizmat, almost. Here's the code. On the highlighted line, I only get positive values, but when line 11 is executed, I get a negative value: https://gist.github.com/zoffixznet/6f3add4b642dbf37eb45#file-test-p6-L9
14:36 skyl4rk I have one (pet project) written in perl (5) already, and consider rewriting it in perl6 to get my feet wet so to speak
14:37 ZoffixW Here's the output. You can see all the "Starting prev" lines have positives, and the last line in the output is from the Promise and it's a negative: https://gist.github.com/zoffixznet/e29f76f455575c363916
14:37 stmuk joined #perl6
14:38 ZoffixW skyl4rk, if you figure it out, I invite you to post the solution on Issues in https://github.com/zoffixznet/perl6-IRC-Client so I could add perhaps add that to core :)
14:38 psy_ joined #perl6
14:39 psy_ joined #perl6
14:40 skyl4rk will do
14:40 ZoffixW I think I know what my problem is
14:40 ZoffixW (and no, it's not alcoholism :))
14:42 dalek doc: 09b4ed9 | lizmat++ | doc/Type/IO.pod:
14:42 dalek doc: Elaborate on the bare dd
14:42 dalek doc: review: https://github.com/perl6/doc/commit/09b4ed9db3
14:42 RabidGravy skyl4rk, I wouldn't say it's *that* tricky if you're dealing with the names of plugins
14:43 ZoffixW m: my $c = 2; for |^2 { say "out:[$c]";  Promise.at(now+1).then: { say "in:[{4 - $c}]" }; $c += 42 }; sleep 3
14:43 camelia rakudo-moar e458a2: OUTPUT«out:[2]␤out:[44]␤in:[-82]␤in:[-82]␤»
14:43 ZoffixW I'm closing over on a value that is modified on next loop iteration and thus when the Promise executes, the value is different from the original loop iteration
14:43 ZoffixW s/value/variable/;
14:44 lizmat ZoffixW: you realise that Promise.at is in fact a wrapper around Promise.in with when - now ?
14:44 amoe joined #perl6
14:44 smash joined #perl6
14:44 ZoffixW lizmat, I do now! :)
14:44 lizmat perhaps you could better use a fixed value for now, and then use Promise.in ?
14:45 RabidGravy I'm not convinced I would rely on any particular order of execution there
14:47 ZoffixW That was just a sample :) In my actual program I'm setting up a bunch of Promises that fire when there's a New Year at location $x
14:48 leont andthen and orelse have lower precedence than return, that is a gotcha too…
14:48 RabidGravy I'd pass a Channel into the promises then have the value passed back to a main loop with that
14:49 timotimo return 1 andthen say "what"   -  reads kind of naturally in a way that'd explain return having a tighter precedence than andthen would
14:49 * leont still wants that defined-ternary
14:49 lizmat I've suggested ??? I think  :-)
14:49 * ZoffixW doesn't know about Channels
14:49 ZoffixW leont, then there's a consensus at least among 3 people :)
14:50 jnthn joined #perl6
14:50 Jonis joined #perl6
14:50 ZoffixW err, lizmat
14:50 ZoffixW ETOOMANYLS
14:50 skyl4rk heh
14:50 timotimo with?, with!
14:50 Skarsnik a defined operator that work like ! could be nice
14:51 lnx joined #perl6
14:51 Skarsnik like $stuff ? ~~ /regex/;
14:52 Skarsnik to replace $stuff.defined && $stuff ~~ /regex/;
14:52 ZoffixW Oh, so is this a bug?
14:52 ZoffixW m: my $x = 42; say $x.WHAT ~ ' '
14:52 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Int in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/VKveYHNLlT line 1␤ ␤»
14:53 RabidGravy It's kinda special
14:53 ZoffixW m: my $x = 42; say $x.WHAT.WHAT
14:53 camelia rakudo-moar e458a2: OUTPUT«(Int)␤»
14:53 RabidGravy it's a type object so y'know undefined
14:53 ZoffixW m: say "{Int}"
14:53 camelia rakudo-moar e458a2: OUTPUT«Use of uninitialized value of type Int in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/VwnyeIDfKd line 1␤␤»
14:53 ZoffixW Ah, k, never mind then :)
14:54 timotimo Skarsnik: you know about //= already, i guess?
14:54 perlpilot Skarsnik: maybe $stuff //~~ /regex/;  // already has the definedness connotation
14:54 timotimo no, that's no metaoperator
14:54 timotimo that //= works is because of the foo= metaop, not because of what // is
14:54 Skarsnik I don't know about // x)
14:55 RabidGravy my $x = 42; say $x.WHAT.^name ~ ' '
14:55 RabidGravy m: my $x = 42; say $x.WHAT.^name ~ ' '
14:55 camelia rakudo-moar e458a2: OUTPUT«Int ␤»
14:55 Skarsnik .WHAT does not like being ~ x)
14:55 RabidGravy yeah because it's a type object
14:55 perlpilot maybe we need a D meta-op.   $stuff D~~ /regex/;   $thing D. method
14:55 perlpilot (yuck)
14:58 jnthn joined #perl6
14:58 Jonis joined #perl6
14:58 smash joined #perl6
14:58 lnx joined #perl6
14:59 amoe joined #perl6
15:01 Zero_Dogg joined #perl6
15:01 Zero_Dogg joined #perl6
15:06 integral joined #perl6
15:07 lnx joined #perl6
15:09 Rotwang joined #perl6
15:11 sprocket joined #perl6
15:11 stmuk joined #perl6
15:12 ZoffixW How do I include methods in regexes?
15:12 ZoffixW m: class Foo { has $.bar = 'foo';  }; my $foo = Foo.new; say 'foo bar' ~~ /$foo.bar/
15:12 camelia rakudo-moar e458a2: OUTPUT«Nil␤»
15:12 ZoffixW m: class Foo { has $.bar = 'foo';  }; my $foo = Foo.new; say 'foo bar' ~~ /"{$foo.bar}"/
15:12 camelia rakudo-moar e458a2: OUTPUT«「foo」␤»
15:12 ZoffixW Is this the way? Feels dirty
15:15 RabidGravy if you define a "regex foo " I believe you can pass in arguments somehow
15:15 RabidGravy but that seems fine
15:16 ab6tract interpolation feels like the right fit to me, tbh
15:17 ab6tract anyway, i'm off! have a happy new year #perl6!
15:17 RabidGravy have fun
15:17 ab6tract you too :)
15:19 dalek DBIish: e7eb49f | (Sylvain Colinet)++ | / (2 files):
15:19 dalek DBIish: Add a Array to PG array string helper method
15:19 dalek DBIish: review: https://github.com/perl6/DBIish/commit/e7eb49f2d0
15:20 ZoffixW Why is it NIl?
15:20 ZoffixW m: 'hny Toronto' ~~ /^ \s* 'hny' (\s+ $<loc>=.+)?/; say $/<loc>
15:20 camelia rakudo-moar e458a2: OUTPUT«Nil␤»
15:20 ZoffixW m: 'hny Toronto' ~~ /^ \s* 'hny' (\s+ $<loc>=.+)?/; say "$/<loc> $0"
15:20 camelia rakudo-moar e458a2: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/0gjlEiVDvZ line 1␤  Toronto␤»
15:20 Skarsnik to annoy you?
15:20 ZoffixW It's working! :)
15:20 hankache joined #perl6
15:21 integral joined #perl6
15:21 integral joined #perl6
15:22 Rotwang joined #perl6
15:22 Jonis joined #perl6
15:22 ZoffixW m: 'hny Toronto' ~~ /^ \s* 'hny' \s+ ($<loc>=.+)/; say $<loc>
15:22 camelia rakudo-moar e458a2: OUTPUT«Nil␤»
15:22 ZoffixW m: 'hny Toronto' ~~ /^ \s* 'hny' \s+ $<loc>=.+)/; say $<loc>
15:22 camelia rakudo-moar e458a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AvGxfV27eP␤Unable to parse regex; couldn't find final '/'␤at /tmp/AvGxfV27eP:1␤------> 3y Toronto' ~~ /^ \s* 'hny' \s+ $<loc>=.+7⏏5)/; say $<loc>␤    expecting any of:␤        infix stopper␤»
15:23 ZoffixW crap. Well, the second one without the parens works
15:23 amoe joined #perl6
15:23 hankache anyone has any idea how to circumvent the panda issue ?
15:23 smash joined #perl6
15:24 ZoffixW Fix the bug? XD
15:24 lnx joined #perl6
15:24 hankache ZiffuxW I don't know how :(
15:24 hankache ZoffixW**
15:24 ZoffixW Ziffux -_- I had my name misspelled, but never quite in that way
15:24 hankache hahahaha
15:25 harrison_ joined #perl6
15:25 lizmat afk for an hour or so
15:27 ZoffixW hankache, well, the --force on panda I built about 24 hours ago works fine. So I'd start by going through recent commits and look at changes. This one seems to be doing something with the force: https://github.com/tadzik/panda/commit/3e79949739941e18718e0e42c4fd384c1f8d9f94
15:27 stmuk joined #perl6
15:27 loren panda doesn't work well..
15:27 integral joined #perl6
15:27 jnthn joined #perl6
15:27 pjscott joined #perl6
15:27 hankache the --force is not with me these days
15:27 ZoffixW Errors like these are really annoying 'cause you don't know which module it's triggered in. I wonder if it's easy to improve that https://gist.github.com/zoffixznet/82cffa1a2e42d4d62d0f
15:28 raiph joined #perl6
15:28 xinming_ joined #perl6
15:28 ZoffixW Hm. And it's an await call. So I can potentially have 1,000,000 lines of code to try to find that error at :(
15:29 Skarsnik Now that I write a bunch of patch/code every where. Let see if the original code that need it work now x)
15:30 Skarsnik Could be worst. you don't get a backtrace at compile time x)
15:31 hankache say i don't want to use panda. what are my alternatives?
15:32 ZoffixW ugh "Too many positionals passed; expected 0 arguments but got 1"... no idea where. Is it possible to get more information from a broken... um... whatever IO::Socket::Async returns ^_^
15:32 virtualsue joined #perl6
15:33 leont threads tend to ruin the backtraces on such exceptions
15:33 leont I tend to put CATCH { warn .backtrace } in my start{} blocks, to be able to debug things
15:34 ZoffixW Well, as far as Awesome Errors go, this is least awesome :(
15:34 ZoffixW k. gonna try that
15:35 loren Error message sometimes mess ..
15:35 Skarsnik I love this: my %hash = $selectstory_req.row(:hash); my Story $story = Story.new(|%hash); x)
15:36 ZoffixW *sniffs*
15:36 ZoffixW Smells like sarcasm in here.
15:37 awwaiid .seen radiak
15:37 yoleaux I haven't seen radiak around.
15:37 awwaiid .seen raydiak
15:37 yoleaux I saw raydiak 22 Dec 2015 08:02Z in #perl6: <raydiak> nine++ : that seems to have fixed it, I guess it was just something to do with recent changes and trying to rakudobrew over a rather old version...thanks for the help though :)
15:37 hankache ZoffixW can i install an older panda> the one pre-the commit related to force ?
15:37 loren panda will check rakudo version, seem like
15:37 ZoffixW hankache, no idea
15:39 jnthn joined #perl6
15:39 Jonis joined #perl6
15:39 lnx joined #perl6
15:39 ZoffixW yey, leont++ Three CATCHes later, I finally have some useful debug info :)
15:41 dalek DBIish: 44925b4 | (Sylvain Colinet)++ | lib/DBDish/Pg/StatementHandle.pm6:
15:41 dalek DBIish: Typo
15:41 dalek DBIish: review: https://github.com/perl6/DBIish/commit/44925b4a4f
15:42 cdg joined #perl6
15:43 bitmap joined #perl6
15:43 xinming joined #perl6
15:43 ZoffixW m: say DateTime.now + 42
15:43 camelia rakudo-moar e458a2: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/XRPAVIobyK line 1␤␤»
15:43 ZoffixW m: say now + 42
15:43 camelia rakudo-moar e458a2: OUTPUT«Instant:1451576689.138346␤»
15:43 ZoffixW IMO, math operations on DateTime could use .Instant to coercee it
15:44 ZoffixW m: say DateTime.now + DateTime.now
15:44 camelia rakudo-moar e458a2: OUTPUT«Cannot call Numeric(DateTime: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/NBF0h9v0ZV line 1␤␤»
15:46 jnthn joined #perl6
15:46 Jonis joined #perl6
15:46 lnx joined #perl6
15:47 pjscott joined #perl6
15:47 ZoffixW m: sub infix:<+> (DateTime $a, Numeric $b) { $a.Instant + 42 }; say DateTime.new: DateTime.now + 42;
15:47 camelia rakudo-moar e458a2: OUTPUT«Type check failed in binding $a; expected DateTime but got Instant␤  in sub infix:<+> at /tmp/PW1nLC9zSt line 1␤  in sub infix:<+> at /tmp/PW1nLC9zSt line 1␤  in block <unit> at /tmp/PW1nLC9zSt line 1␤␤»
15:47 ZoffixW orly
15:48 ZoffixW m: say DateTime.now.WHAT
15:48 camelia rakudo-moar e458a2: OUTPUT«(DateTime)␤»
15:48 ZoffixW Ah. Need a multi in there
15:48 Rotwang joined #perl6
15:48 Skarsnik I still have a leak in xml :(
15:49 pierre-vigier joined #perl6
15:50 integral joined #perl6
15:50 bitmap joined #perl6
15:50 void1 joined #perl6
15:50 Skarsnik this is annoying, my process will probably not end because of that x)
15:50 amoe joined #perl6
15:50 timotimo if the leaked memory is not in GC managed heap parts, it'll be no problem to just swap all that stuff out to disk ...
15:51 timotimo if it is, however, every major gc will run over it :(
15:51 smash joined #perl6
15:51 stmuk joined #perl6
15:51 timotimo repeatedly
15:51 timotimo over and over and over again
15:51 Skarsnik Still no way to access some GC info? like memory used x)
15:52 timotimo the profiler gives you a bit of info, but i'd not be against having a dedicated memory profiler or something
15:52 timotimo BBIAB
15:54 brrt joined #perl6
15:56 _Vi joined #perl6
15:58 spider-mario joined #perl6
15:59 nanis joined #perl6
16:00 _Vi Is Perl6 expected to start up much slower than Perl5? 1.5 seconds for trivial script bring startup slowness to Clojure's level.
16:01 Arrowhead joined #perl6
16:02 leont Sadly, at this stage it is rather slow to start up
16:02 leont People are working on this
16:03 pjscott joined #perl6
16:04 perlpilot _Vi: Keep in mind that Perl 5 has been around roughly three times as long as Rakudo and as such, had lots of optimization.
16:04 nexysno_ joined #perl6
16:06 _Vi perlpilot, So this slowness is not by design and expected to go away in a couple of years?
16:06 perlpilot _Vi: correct.
16:06 Skarsnik it should not be that slow for small stuff. do you use lot of modules?
16:07 _Vi Now Perl5 is useful as, for example, more powerful sed  (perl -pe 's/.../.../'). Perl6 does not look suiting, although the same command line works.
16:07 _Vi echo qqq | time perl6 -pe 's/qqq/www/'  -> 1.49user 0.11system 0:01.67elapsed 95%CPU
16:07 ZoffixW _Vi, to some extent, yes. Keep in mind that mere perl6 -e '' is akin to loading Moose in Perl 5. Do that and you'll notice a comparable (if not worse) load time
16:07 pjscott joined #perl6
16:07 perlpilot _Vi: I've used P6 for command-line stuff and it's just fine.  Typically *I'm* the speed bottle-neck when it comes to a command-line processing pipeline  :)
16:08 _Vi (looking up what is Moose)
16:08 lnx joined #perl6
16:08 ZoffixW _Vi, my personal opinion is Perl 6 is not the "tool for command line stuff". It's for large programs
16:08 Rotwang joined #perl6
16:08 smash joined #perl6
16:08 stmuk joined #perl6
16:08 _Vi For large programs I typically switch to Python and friends.
16:08 ZoffixW _Vi, it's an object system comparable to what Perl 6 has built-in: https://metacpan.org/pod/Moose
16:08 Jonis joined #perl6
16:08 amoe joined #perl6
16:08 ZoffixW _Vi, yeah. We intend to change that :P
16:09 * ZoffixW sounds the battle cry
16:09 Skarsnik I used etheir perl or C++/Qt for writing stuff x)
16:09 * hankache reporting for duty
16:09 _Vi So Perl6 is not intented to completely replace Perl5, not aiming for it's "king of quick&dirty ad-hoc text parsing and recombination"?
16:09 * hankache where is the snake?
16:09 pjscott joined #perl6
16:10 perlpilot _Vi: it's not intending to "replace" anything.  Perl 6 intends to be the best it can at the things it excels at :)
16:10 Skarsnik ZoffixW, can you quickly cook a module to query the memory usage from /proc/stat? I am lazy lol
16:10 ZoffixW _Vi, no, Perl 6 is a new language that stuck with Perl in the name for historic reasons. Perl 5 is developed by different set of people and is making yearly releases, so there's no plan to replace anything
16:11 perlpilot _Vi: if that means that people reach for P6 instead of P5 (or python, ruby, php, C, clojure, Scala, c++, Java, etc.), ... so be it.
16:11 ZoffixW Skarsnik, I'm busy hacking my stupid New Years bot lol
16:11 _Vi For example, Python 3 is intended to replace Python 2.
16:11 dds_intix joined #perl6
16:11 ZoffixW _Vi, yeah, it's different with Perl 6
16:11 Ulti _Vi its more like the difference between C# and C
16:11 jnthn joined #perl6
16:11 pjscott joined #perl6
16:11 ZoffixW _Vi, you can call it Rakudo and get an accurate picture of what's replacing what :)
16:12 integral joined #perl6
16:12 integral joined #perl6
16:12 Begi joined #perl6
16:12 perlpilot _Vi: btw, Python 3 may have the intent to replace Python 2, but it's been out for how long?  What's the adoption rate?  Last I looked it wasn't all that swift.
16:12 brrt Tux: i'm using python csv right now. apparantly, 'foo,bar' is *not* a sufficient quoting to not split by the ,
16:12 _Vi Most of my Perl programs start as a sed or awk command lines (outgrown oneliner phase)...
16:12 nanis On an ancient laptop running Windows6, I get timethis perl6 -e "q[hello].say" in 0.272 seconds versus  timethis "perl -MMoose -E ""say 'hello'"" in 0.529 with a warm file cache.
16:13 ZoffixW Do we have articles on the whole Name Issue so we don't have to explain the same thing?
16:13 nanis That is slower than plain perl, but fast enough.
16:13 Ulti nanis: yeah the cache is the important part there
16:13 nanis s/Windows6/Windows10/
16:13 Ulti first run of Perl 6 in a while is always 1s extra
16:14 nanis Sure, but most of the time, "the first run of perl6" does not happen that often.
16:14 Ulti ZoffixW perl6.org says it in the first sentences right?
16:14 nanis There is room for improvement, but perl6 is not useless as a command line tool.
16:14 huf * * * * * perl6 -e1
16:14 perlpilot nanis: well said.
16:14 Ulti oh not so much
16:14 huf keep that cache warm :)
16:15 perlpilot huf: heh
16:15 ZoffixW Ulti, not really. It says Perl 5 is still a thing, not why Perl 6 has 'Perl' in its name
16:15 Ulti instead Camelia talks about herself in the third person like a crazy bug
16:15 perlpilot Ulti: it's because she spent her larval stage as a camel and didn't talk at all then.
16:15 gfldex ZoffixW: the difference between perl 5 and perl 6 should go into /language/faq
16:15 Ulti heh
16:16 pjscott joined #perl6
16:16 leont Why does Test.pm have a diag function, but not a (renamed) equivalent of note()?
16:16 Ulti can we gets some 3D CSS on Camelia so she flaps her wings occasionally?
16:16 leont diag is something to be very much discouraged :-/
16:16 ZoffixW gfldex, hm?
16:16 leont In fact, when supporting only one it's probably better to support only note's functionality
16:16 perlpilot leont: dunno.  I guess no one ever needed/wanted it yet.
16:17 gfldex ZoffixW: it's a frequently asked question, isn't it?
16:17 leont perlpilot: more likely, it's a case of copying mistakes from p5 land without asking :-/
16:17 perlpilot maybe.
16:17 Ulti ZoffixW: http://www.michaelbromley.co.uk/experiments/css-3d-butterfly/
16:17 Skarsnik damn getting a deb unstable vm take me more time than expected
16:18 Begi Ulti++ : it will be cool !
16:18 leont diag is terrible from a usability point of view (right in the middle of the harness' formatted output on the terminal), you kind of only want to use it if you're really desperate to shout to the end user
16:19 nanis Skarsnik, unless you have a specific need for a specific distro, I find ArchLinux is the fastest to get up and running in my experience with Macs and Windows.
16:19 Arrowhead Is there a workaround for the unusable panda at the moment?
16:19 Zero_Dogg left #perl6
16:19 pierre-vigier joined #perl6
16:19 ZoffixW Arrowhead, fixing the bug :)
16:19 ZoffixW Ulti, neat
16:20 Arrowhead ZoffixW: that's bugs, plural.
16:20 nanis Arrowhead where can I find out about the panda problem.
16:21 Arrowhead nanis: https://github.com/tadzik/panda/issues or just starting with a fresh rakudo, then panda, then try installing Linenoise for example.
16:21 autarch is there an agreed-on namespace for MetaModel extensions?
16:21 autarch and if not would MetaX:: be appropriate?
16:22 ZoffixW MetaX:: sounds good to me
16:22 Skarsnik kde is still broken on debian unstable, damn
16:24 nanis Arrowhead: I'll check the issues, but just ran `panda install Linenoise` with my post-Christmas clone, and worked ... so maybe I should just stick with that for a while.
16:24 esh joined #perl6
16:24 skyl4rk rakudo: say @*INC[0];
16:24 camelia rakudo-moar e458a2: OUTPUT«Dynamic variable @*INC not found␤  in block <unit> at /tmp/tmpfile line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/tmpfile line 1␤␤»
16:24 Skarsnik You want to look at $*REPO
16:25 Skarsnik @INC is not here anymore
16:25 perlpilot Hmm.  why is it $*REPO instead of @*REPO?
16:25 Skarsnik but I am not sure if precomp will not get in the way of reloading a file
16:26 Skarsnik Because it's a more complete class? (or I maybe type it wrong)
16:26 ZoffixW m: say $*REPO.WHAT # that's why
16:26 camelia rakudo-moar e458a2: OUTPUT«(Installation)␤»
16:26 ZoffixW It's not a mere rename, but a giant overhaul
16:26 perlpilot you can always say "no precompilation" to make sure precomp isn't an issue
16:26 perlpilot ZoffixW: yeah, that's something I need to read up on I guess.  I didn't keep up with the changes very well.
16:27 ZoffixW I wouldn't be surprised if it weren't documented yet
16:29 perlpilot It's certainly not in the synopses anywhere.
16:29 ZoffixW There's a gist somewhere by jnthn that describes the design
16:29 Skarsnik m: say "It's nine fault"
16:29 camelia rakudo-moar e458a2: OUTPUT«It's nine fault␤»
16:29 perlpilot (though @?INC still is)
16:30 smash joined #perl6
16:30 stmuk joined #perl6
16:30 lnx joined #perl6
16:30 ZoffixW The specs are outdated. Currently the roast is "the spec"
16:30 Jonis joined #perl6
16:30 Rotwang joined #perl6
16:30 Skarsnik I though I removed @INC x)
16:30 jnthn joined #perl6
16:30 amoe joined #perl6
16:31 Arrowhead Ok, I see a hint of what's going on with the panda options. The panda in panda/bin/panda works, the installed one doesn't
16:31 mst does somebody want to summarise what's gone wrong?
16:32 mst it'll be a few minutes before the lemsip kicks in and I'm capable of tearing CompUnitRepo to bits to help but I can start reading at least
16:32 Skarsnik IT4S BROKEN PLZ FIX
16:32 Skarsnik no?
16:32 ZoffixW mst, 24hrs ago, this was the only issue: https://github.com/tadzik/panda/issues/274 and in the past 24hours this occured: https://github.com/tadzik/panda/issues/278
16:33 mst Skarsnik: http://trout.me.uk/vaguecat.jpg
16:33 perlpilot heh
16:33 jdv79 y'all are really "working" on nye?
16:33 webstrand joined #perl6
16:33 ZoffixW mst, and summary is (a) panda needs to skip already installed modules instead of erroring out and aborting the install; and (b) seems like --force (and possibly other options) got broken in the past 24hours
16:33 zakharyas joined #perl6
16:34 mst jdv79: I have plans for perl6 that will involve my being able to write a module installer I don't hate
16:34 ZoffixW mst++
16:34 jdv79 but tonight?
16:34 mst obviously the best way to learn everything required to do that is to keep volunteering to debug the existing stuff
16:34 Arrowhead The hint for (b) is that there's a difference between the panda script in the repo and the one that gets installed, or perhaps the communication between the two.
16:34 jdv79 i think alot of us agree with that generally though
16:34 mst dude. I've hacked on ExtUtils::MakeMaker for fun. you may be misunderstanding how this grade of masochism works.
16:34 RabidGravy is everyone absolutely sure that this hasn't had some bizarre effect? https://github.com/tadzik/panda/commit/8c6838f069bc0ff2db25e482c51aa7acaec645cb I'm skeptical but it's the only recent change
16:35 jdv79 hmm, ok.
16:35 jdv79 sounds mildly disturbing
16:35 mst perlpilot: $*REPO is basically a linked list ish thing, there's a gist from jnthn somewhere
16:36 lucasb joined #perl6
16:36 ZoffixW RabidGravy, I'm not. In fact, I mentioned that commit earlier
16:36 perlpilot aye, I'm reading it now.
16:36 mst good, cuz I don't remember the URL. share with the class please?
16:36 perlpilot https://gist.github.com/jnthn/47a42b2e86e7e552b2e2
16:37 ZoffixW We need a factoid bot...
16:37 webstrand Is there any way to install modules by specific version? I note that Panda's project.json specifies versions for some of its dependencies, but I don't see any mechanism for identifying a specific version of a module.
16:37 ZoffixW If only someone was working on IRC bot stuff.... like right this second....
16:38 jdv79 webstrand: probably not yet
16:38 RabidGravy webstrand, no.  The storage doesn't allow for it
16:38 mst 'the storage' ?
16:38 RabidGravy "github HEAD"
16:39 jdv79 thats the src
16:39 RabidGravy er yes
16:39 lucasb most people are not versioning their modules on github, right?
16:39 jdv79 cur should be able to doit by my skimmings
16:39 mst lucasb: not that I can see
16:39 mst though that's pretty much a good thing from my POV
16:40 jdv79 that scheme is not yet defined afaik
16:40 mst since S11 is ... not something I really want to have to support all of
16:40 jdv79 use cpan for that:)
16:40 webstrand RabidGravy: Do you know if the mechanism has been specified (such as git tags)? Or is that still undecided?
16:40 * Skarsnik don't want to version stuff in DBIish x)
16:40 dalek ecosystem: 7dfeaff | (Zoffix Znet)++ | META.list:
16:40 dalek ecosystem: Add IRC::Client::Plugin::HNY to ecosystem
16:40 dalek ecosystem:
16:40 dalek ecosystem: Plugin for New Year's IRC parties: https://github.com/zoffixznet/perl6-IRC-Client-Plugin-HNY
16:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7dfeaff52d
16:40 RabidGravy lucasb, I do but the META.list still points to HEAD
16:40 Skarsnik DBIish is an exemple of making versionning a nightmare probably
16:41 jdv79 btw, ranguard pushed a first set of eco to cpan
16:41 Skarsnik the *base* role could have a version, while the driver another
16:41 mst yes, with intentionally low version numbers
16:41 RabidGravy webstrand, I think the current mechanism will go away at some point
16:43 Skarsnik Wow apt has a sexy progress bar. why apt-get does not have it lol
16:43 RabidGravy if it was one of the modules where the author is doing so, you could go to github and get the tagged source and install manually
16:43 Skarsnik versionning will happen with tool doing it for the author
16:43 HNYBot joined #perl6
16:43 RabidGravy all of mine have been so tagged since July
16:43 HNYBot Next New Year is in 16 minutes and 20 seconds in Cambodia, Christmas Island, Indonesia, Laos, Mongolia, Russia, Thailand, and Vietnam
16:43 ZoffixW You don't mind if I test out my first real Perl 6 program in here, do you? :)
16:43 ZoffixW HNYBot, hny Toronto
16:43 Skarsnik like myawesometool tag version
16:44 ZoffixW :(
16:44 Skarsnik and it does all the git/cpan voodo
16:44 RabidGravy I thought Christmas Island was in the +14 timezone
16:44 mst Skarsnik: that's called Dist::Zilla
16:44 ZoffixW RabidGravy, is it? It might be a bug :)
16:44 ugexe nine: tony-o did, and jnthn mentioned being fine with it. then waited for lizmat to try to outline the design she had in mind in a gist. "hopes lizmat, FROGGS, and tony-o will find a way to collaborate on getitng us something nice. :)" I believe you made a comment about not taking much to be a top 3 expert in that area in the same conversation. In any case it was not just an offer as I bug tested his working
16:44 yoleaux 09:21Z <nine> ugexe: can you also tell me how to implement your "should not install a module that fails to precompile" rule?
16:44 yoleaux 09:24Z <nine> ugexe: :ver<*> doesn't look like a good idea. For one because you ask for version '*' (a string). But apart from that it seems to be doing here what you intended (tested with Inline::Python:ver<*> and Inline::Python:ver(v0.1))
16:44 ugexe code (handling most everything in the gist) soon after.
16:44 yoleaux 09:27Z <nine> ugexe: what exactly did tony-o offer to whom? I'm genuinly curious. Also what do you mean by "then boilerplate was merged"?
16:44 ugexe as far as how to not install a module that fails to precompile i imagine you can just uninstall a module that fails to precompile if :force is not used. when precompilation was handled as a step separate from installation it was as simple as not doing the install if precomp failed. the way it stands it creates problems for everything that depends on it, and a package manager can't choose an alternative because
16:44 ugexe there are no controls/hooks for know if it failed
16:44 mst but every time I mention it in here people start ranting about how that's overcomplicated and shouldn't exist because there's no reason to have versions or something
16:44 RabidGravy no I may be just confused
16:45 ZoffixW RabidGravy, in my data it's "'offset' => '7',"
16:45 RabidGravy I don't think we'll worry
16:46 RabidGravy mst, ignore them versions are important
16:46 mst ugexe: which code are we talking about here?
16:46 Skarsnik version are importing in important module
16:46 ugexe mst: compunit
16:46 Skarsnik *important
16:47 mst ugexe: right, I've been discussing design with nine for that, where do I look for the stuff you're working on?
16:48 pdcawley_ joined #perl6
16:49 ugexe mst: thats from 4 months ago
16:49 mst ugexe: oh, right, fair enough
16:50 mst sorry. trying to avoid missing what's going on
16:50 mst since the CUR code is current a beatuifully elegant theoretically brilliant jumblefsck, and I want to try and help make it as brilliant practically as it clearly should be once we de-fsck it :)
16:51 TimToady .oO(I don't like half of you half as well as you deserve...)
16:51 RabidGravy mst++
16:51 * flussence has a gut feeling that we should've made one to throw away here, but CUR's part of the specs and spectests now
16:52 lucasb can I share something funny I just found? If you have vim patch 7.4.1005, you can now type the command ":smile" :)
16:52 mst flussence: that's entirely possible, but since I didn't start looking properly until after it was too late to do that, I'm not considering the possibility
16:52 jdv79 flussence: not very.
16:52 mst since if that's true, I should also have turned up months ago to help with that
16:52 mst and I'd rather focus on what's there now than guilt tripping ourselves :D
16:52 dfarrell joined #perl6
16:52 jdv79 it might end up a throw away yet
16:53 amoe joined #perl6
16:53 flussence jdv79: the API's gotta stick, though
16:53 perlpilot flussence: deprecation is still a thing we can do.
16:53 jdv79 only so far as 6.c
16:53 jdv79 :)
16:53 integral joined #perl6
16:53 perlpilot better to get the pain out of the way sooner than later for CUR stuff
16:54 Jonis joined #perl6
16:54 dfarrell hey folks, I'm having real trouble getting Perl6 working on Windows. I've opened a few issues about it for rakudobrew ... but in the meantime is there any chance a new .msi of Rakudo Star will be released soon? The current version is from November
16:54 RabidGravy I'm sure mst is actually mellowing into a pragmatic person, he seemed like a wild idealist when I first met him ;-)
16:55 jnthn joined #perl6
16:55 Rotwang joined #perl6
16:55 smash joined #perl6
16:55 jdv79 dfarrell: it is still " the holidays"
16:55 * flussence wants to just shove installed things into an sqlite blob instead of all the messing around with sha1 filenames, but that idea's beyond a certain insanity threshold...
16:55 ugexe jdv79: does your instance of metacpan have any of the dists available to download?
16:55 stmuk joined #perl6
16:55 jdv79 all
16:56 perlpilot flussence: me too.  I've thought that for a few years now, but never got the gumption to implement it.
16:56 jdv79 just not what ranguard did yet
16:56 dfarrell jdv79: yeah I'd like to write a "Perl 6 is out, here's how to get it" article, but I cannot get it for Windows ...
16:56 atweiden joined #perl6
16:56 flussence Arrowhead: currently staring at a red triangle on X11, I just had to s/glfw3/glfw/ to make the library load :)
16:57 Arrowhead flussence: great. I just fixed that, but on my Ubuntu vm I get a segfault.
16:57 lucasb flussence: I liked this sqlite idea! I think it should be something to pursue...
16:57 mst flussence: speaking as an operations person, "if you do that, you're carrying the pager"
16:57 jdv79 for now, ugexe, prepend port 5000 to the download_url
16:57 Skarsnik someone should write blob support in NC then x)
16:57 jdv79 ill make that uri abs to work soon.  dorry
16:57 flussence mst: that's why I'm not doing it and dismissing it as too insane :)
16:57 perlpilot flussence: and what mst said is *why* I never got the gumption to implement it :)
16:57 webstrand Are all perl6 modules guaranteed to be in git repositories right now? If so you could use git log to search through the commits touching the META6.json's version field
16:57 ugexe jdv79: i dont want to use ranguards because it would mean changing the author search deal or url creation
16:58 ugexe but thanks, i must have mis-absoluteified the download_url before
16:58 mst webstrand: if there even is one. META6 appears to have neither a proper spec nor a spec version field in it
16:58 mst that's going to need replacing as well
16:58 ugexe meta6 is specced in s22
16:59 Jonis joined #perl6
16:59 jdv79 yeah.  like i said unfortunately im mostly traveling for a few weeks so just checking in.  no hacking.
16:59 mst S22 is a nice artist's impression of what a sketch might look somewaht like
16:59 ugexe although not a proper meta-spec=6 deal
16:59 Skarsnik meta6 is lacking stuff
16:59 mst it's not a spec
16:59 mst http://p3rl.org/CPAN::Meta::Spec is a spec
16:59 integral joined #perl6
16:59 integral joined #perl6
16:59 jdv79 yeah.  s22 is outdated and just a suggestion in my mind.
16:59 mst it has versions and actual specification of things and everything
17:00 ugexe jdv79: ah. fwiw its down :(
17:00 jdv79 yes.  i would like to move towards that.
17:00 RabidGravy yeah, the meta should be versioned
17:00 flussence let's stick a 0 on it now, because we really need a 1
17:01 jdv79 which is why i want to be able to cpan6::meta::spec...
17:01 rindolf joined #perl6
17:01 cdg joined #perl6
17:01 RabidGravy infact it should be versioned 0 right now so there aren't problems later
17:01 flussence anyone want to mess with S22 to do that, or should I?
17:02 atweiden joined #perl6
17:02 atweiden joined #perl6
17:02 webstrand mst: even if the META6 isn't specified, perl6/ecosystem seems to have an ad-hoc specification which requires some kind of `info` json document, many of which have some version field
17:03 ugexe thats the version of the module, not the meta spec used
17:03 pierre-vigier joined #perl6
17:03 webstrand ugexe: I'm looking for the version of the module, not the spec
17:03 RabidGravy yeah, there should be a meta-version or some such
17:03 jdv79 no its up.  port 5001.  sorry
17:04 RabidGravy webstrand, then the version field
17:04 RabidGravy it is specified as mandatory
17:04 Skarsnik I would want to be able to write https://gist.github.com/Skarsnik/83bb883378bbf2b21b82 in my meta x)
17:04 ZoffixW joined #perl6
17:05 nexysno_ joined #perl6
17:05 ugexe jdv79: sorry i meant search is down: http://hack.p6c.org:5001/v0/release/_search?q=distribution:DBIish (404), and port 4500 gives connection refused for elasticsearch module
17:05 Skarsnik even if it's mostly iformational
17:05 ZoffixW Well, this sucks :/ My bot seems to freeze up when connecting to Freenode almost right away :/ Even though it works locally
17:05 rindolf jdv79: hi, sup?
17:05 * mst sighs
17:05 ugexe port 5000^
17:05 * mst broke ssh
17:05 RabidGravy for better or for worse most things fudge over a missing version
17:05 rindolf Happy New Year, everyone!
17:05 TimToady maybe we should assign A.timestamp as a version if they omit it
17:06 ZoffixW That's a good idea
17:06 mst right, moar rebuild running
17:06 mst then I'll throw panda in
17:06 mst then try and repro
17:07 jdv79 flussence: i think the spec should lag the impl wrt s22 so not sure why update it quite yet.
17:07 ugexe with something like '0' or * though when someone 'use XXX:ver<1..*>' the timestamp of an older release could be chosen as newer than a later, actually newer release no?
17:07 sprocket joined #perl6
17:07 RabidGravy rindolf, happy new year (didn't realise you were *that* east or did I just not notice what the time was )
17:08 gfldex m: sub f() { state $a = 'bad'; BEGIN { $a = 'good' }; $a }; put f;
17:08 camelia rakudo-moar e458a2: OUTPUT«bad␤»
17:08 rindolf RabidGravy: it's not 1 January here yet.
17:08 gfldex should $a be good?
17:08 rindolf RabidGravy: I live in Tel Aviv, Israel.
17:08 RabidGravy ah okay, just checking
17:08 perlpilot rindolf: yeah, you're only UTC +0200, yes?
17:08 rindolf RabidGravy: it's 19:08 here.
17:08 RabidGravy rindolf, I know everything ;0
17:08 rindolf perlpilot: that or UTC +0300
17:08 TimToady gfldex: no, state variable are initialized at clone time, and BEGIN is before that
17:09 rindolf RabidGravy: well, tell me the proof for Goldbach's Conjecture.
17:09 RabidGravy :-p
17:09 gfldex TimToady: is there another way to do that without a global variable?
17:09 TimToady well, actually, state vars are initialized at 'once' time, which is by definition after clone time
17:10 cdg joined #perl6
17:10 dalek specs: 7a09880 | (Anthony Parsons)++ | S22-package-format.pod:
17:10 dalek specs: Make an allowance for future META6 versioning
17:10 dalek specs:
17:10 dalek specs: This doesn't break any existing code. I promise!
17:10 dalek specs: review: https://github.com/perl6/specs/commit/7a09880494
17:11 jdv79 my current thinking is to adopt the p5 meta stuff amd adjust for p6isms.
17:11 gfldex TimToady: and should rakudo not complain inside the BEGIN because $a isn't declared?
17:11 perlpilot gfldex: but it was declared
17:12 RabidGravy flussence++
17:12 rindolf RabidGravy: maybe you're Ceiling Cat.
17:12 flussence my current thinking is .oO( why the heck does META6 have a key for support phone number? )
17:12 ugexe that would be nice, as im willing to bet more p6isms could find their way to p5
17:12 mst rindolf: please don't bring creepy into here.
17:12 perlpilot gfldex: the moment rakudo parses "state $a", $a is declared and lexically available
17:12 gfldex does the container $a exists or does it write some wrong to one of my ramz?
17:12 TimToady m: sub f() { state $a; BEGIN { $a = 'good' }; $a }; put f;
17:12 camelia rakudo-moar e458a2: OUTPUT«good␤»
17:12 rindolf mst: now what did I do?
17:13 TimToady if you omit the bad initialization, it'll init with the static version
17:13 jdv79 but ive only briefly irced with xdg so far and wont be able to dig in til mid jan at earliest
17:13 nige1 joined #perl6
17:13 integral joined #perl6
17:13 mst rindolf: referencing a meme involving masturbating is hardly on topic for a programming channel.
17:13 RabidGravy flussence, the language around the "support" is somewhat had wavey
17:13 stmuk joined #perl6
17:13 jdv79 flussence: "v0" is likely wrong
17:13 RabidGravy hand wavey
17:13 smash joined #perl6
17:13 lnx joined #perl6
17:13 jdv79 "0"
17:13 Rotwang_ joined #perl6
17:13 mst flussence: right now, we're going to basically have yo treat 'no version' as 'prehistoric, no idea what it is'
17:13 amoe joined #perl6
17:13 rindolf mst: OK, sorry.
17:13 mst *to
17:14 mst flussence: same will go for CUR formats on disk
17:14 flussence jdv79: I do say in the sentence right before that "quoted Version literal" :)
17:14 jnthn joined #perl6
17:14 Jonis joined #perl6
17:14 perlpilot gfldex: If you want to be crazy verbose, you could do ...
17:14 jdv79 but thats wrong, no?
17:14 edehont joined #perl6
17:14 perlpilot m: sub f() { state $a = "bad"; once $a = "good" ;  $a; }; put f
17:14 camelia rakudo-moar e458a2: OUTPUT«good␤»
17:14 jdv79 version in string form dumps the v
17:15 flussence agh, yeah you're right. fixing
17:15 pierre-vigier joined #perl6
17:15 jdv79 anyway.  happy new years!  i am outta here for the evening.
17:16 TimToady m: say Version.new('A.' ~ time) cmp v0.0.0
17:16 camelia rakudo-moar e458a2: OUTPUT«Less␤»
17:16 rindolf jdv79: bye.
17:16 ZoffixW Found a fatal flaw in my IRC::Client that I have no idea how to resolve -_- By default xchat is in /charset IRC mode and if I say, say, 'Juáre', my bot dies with "Unhandled exception: Malformed UTF-8", but if I switch my client to /charset utf8, then it lives.
17:17 RabidGravy mst, like http I think we should just treat 0 as prehistoric and accepr anything that works right now
17:17 * ZoffixW starts to suspect NOT coding on New Years would make it more pleasurable -_-
17:17 pierre-vigier joined #perl6
17:17 flussence ZoffixW: crazy idea, try utf8-c8?
17:18 ugexe ZoffixW: if you are using a socket/proc and not using :bin then it will gladly try to encoding invalid utf8 as utf8 and fail
17:18 Skarsnik unicode string look nice when never dealing with the oustide word x)
17:18 ZoffixW flussence, X-chat tells me "Unknown charset: utf8-c8"
17:18 Skarsnik ZoffixW, if your code
17:18 ZoffixW ugexe, oh, I'm not using :bin anywhere
17:18 ugexe i use :bin for everything and decode it myself (for procs and sockets)
17:19 * flussence vaguely remembers something insane about how de-facto irc charsets work
17:19 skyl4rk what about trying to catch the exception?
17:19 Skarsnik it's not like ascii?
17:19 skyl4rk it's pretty much undefined
17:19 ugexe it should be an nqp error so probably not fun to catch
17:19 skyl4rk iirc
17:19 ZoffixW skyl4rk, well, that's not a solution if my bot will ignore all default Xchat users :P
17:20 skyl4rk except that {} is considered uppercase [] or vice versa
17:20 mst ZoffixW: if you need to be able to handle misencoded data, I think 'decode yourself as a separate stage' is going to be the only way
17:20 amoe joined #perl6
17:20 smash joined #perl6
17:20 mst ZoffixW: once you've trapped the exception on the decode, you can pick what to do
17:20 mst ZoffixW: I would suggest, IRC being IRC, "smash it into seven bit ASCII with a handy regular expression and then decode what's left"
17:20 Rotwang joined #perl6
17:21 lnx joined #perl6
17:21 ZoffixW :o
17:21 pierre-vigier joined #perl6
17:21 mst you're welcome to try something more clever than that but I'm betting "smash it into seven bit ASCII and decode the pieces" will have to be your final fallback no matter what
17:21 dalek specs: 60cf346 | (Anthony Parsons)++ | S22-package-format.pod:
17:21 dalek specs: Stringy versions shouldn't be /^v/, jdv79++
17:21 dalek specs: review: https://github.com/perl6/specs/commit/60cf346f64
17:22 integral joined #perl6
17:22 integral joined #perl6
17:22 flussence (first thing v1 needs to define: the same thing for the package version)
17:22 Arrowhead flussence: What os/distro/version are you on? I get strange segfaults under Ubuntu 15.10 in a VM.
17:22 flussence Arrowhead: gentoo, 64-bit. It might be failing because you're asking for OpenGL 3.3...
17:23 SwellJoe joined #perl6
17:23 Arrowhead it's currently failing when registereing the keyboard callback...
17:23 Arrowhead "say" debugging is the new printf debugging.
17:24 Arrowhead thanks. I think I'll go and scratch my own itch for a while.
17:24 lizmat m: my $a = 42; dd $a
17:24 camelia rakudo-moar e458a2: OUTPUT«Int $a = 42␤»
17:25 lizmat Arrowhead: ^^^  perhaps slightly more advanced than say
17:25 lizmat Arrowhead: and one character less to type
17:25 RabidGravy right
17:26 Arrowhead lizmat: in this case it was for finding where the segfault occurs...
17:26 lizmat ah, ok  :)   carry on then  :-)
17:26 Skarsnik there is a perl6-gdb-m if it work for you
17:26 RabidGravy two things right now,  is "meta6" confirmed as the version field name in the META6? And are we going to deprecate "v0.0.0" in the JSON representation of versions?
17:27 Arrowhead Skarsnik: not at the moment, because I didn't install Star and panda is aaargh.
17:27 ZoffixW :o flussence $str.decode: 'utf8-c8'; gives me something.... strange and evil.... look like an error in moar "free(): invalid next size (normal): 0x0ca32840" and a giant backtrace
17:27 pierre-vigier joined #perl6
17:27 ZoffixW This: https://gist.github.com/zoffixznet/989e28031095623cce9f
17:27 flussence ZoffixW: looks like the segfault |Tux| showed earlier... it should go away if the string you're decoding starts with valid utf-8
17:28 mst augh
17:28 [Tux] .oO( unlikely )
17:28 Rotwang joined #perl6
17:28 flussence RabidGravy: there's nothing to deprecate there, because it wasn't specced in the first place :D
17:28 Jonis joined #perl6
17:28 stmuk joined #perl6
17:28 mst lizmat: please remember to check master before merging PRs, panda history has no-op merge commits :)
17:28 RabidGravy flussence, well there are modules in the ecosystem that use
17:29 RabidGravy er, that are using "v" strings
17:29 jnthn joined #perl6
17:29 RabidGravy and I need to know as I am going to update Test::META to handle all this
17:29 flussence no need to tell me, I'm guilty of mixing both...
17:30 Skarsnik for me version is a no-op field xD
17:30 RabidGravy right but it may not be in the future
17:30 mst ok, so, running panda out of a checkout is just 'perl6 -Ilib bin/pands ...' ?
17:31 flussence and just in the repos I have *local clones* of, I see a few «"version": "*"» lines
17:31 cdg joined #perl6
17:31 RabidGravy yeah, the spec mentions that but you can't make a version from it
17:31 RabidGravy m: say Version.new('*')
17:31 camelia rakudo-moar e458a2: OUTPUT«v*␤»
17:31 mst flussence: is that for dependencies?
17:31 flussence mst: you probably want to -I the things at the top of bootstrap.pl too
17:31 flussence mst: nope, actual package versions...
17:32 ugexe Distribution normalized version to ver
17:32 lizmat dinner&
17:32 mst flussence: er. eh?
17:32 gfldex i squeezed a wee blog post into the old year https://gfldex.wordpress.com/2015/12/31/coloured-error-messages-with-rakudo-and-without-windows/
17:32 flussence JSON::Tiny's meta has a version of "*"
17:32 mst gah. I'm stupid. I shouldn't've installed panda
17:33 mst where's the 'delete it agaibn, I'm an idoot switch' *hunts*
17:33 RabidGravy I have a feeling that  Version.new('*') should do something special to the object (i.e. match any) but I'm not clever enough to work out what at the moment
17:33 mst there's no nuke-panda command
17:33 mst of course there's no nuke-panda command
17:33 RabidGravy there's no nuke-korea either
17:34 * mst recompiles a whole moar instead
17:34 Rotwang joined #perl6
17:34 mst I so stoopid.
17:34 smash joined #perl6
17:34 ugexe rm -rf /home/foo/.rakudobrew/moar-nom/install/share/perl6/site/
17:34 amoe joined #perl6
17:34 RabidGravy that's an option
17:34 mst wiping the entire moar-nom install workewd
17:34 jnthn joined #perl6
17:34 mst I shall use a smaller hammer next time :)
17:34 Jonis joined #perl6
17:34 lnx joined #perl6
17:35 cdg joined #perl6
17:35 RabidGravy mst, those silversmiths hammers are really good for the job
17:36 pederindi joined #perl6
17:36 ZoffixW Bah... "Unknown string encoding: 'iso-8859-15'"
17:37 ZoffixW Is there an easy way to get all valid decodings .decode understands?
17:37 mst UTSL?
17:37 ugexe my $decoded = try { $str.decode("some-encoding") } || $str.decode('latin-1')
17:37 ZoffixW What's that?
17:37 dalek tablets: b821e40 | (Herbert Breunung)++ | docs/appendix-a-index.txt:
17:37 dalek tablets: some format fixes
17:37 dalek tablets: review: https://github.com/perl6/tablets/commit/b821e40ba8
17:37 lichtkind joined #perl6
17:38 leont Use The Source Luke
17:38 ZoffixW I said ease :P
17:38 ZoffixW *easy
17:38 Skarsnik and document it x)
17:38 pi1 joined #perl6
17:38 leont It can't be worse than p5's Encode.pm ;-)
17:38 mst from my POV, that usually *is* the easy way
17:38 ZoffixW w00t latin-1 worked ugexe++
17:39 Skarsnik oh yeah latin-1
17:39 ZoffixW My bot doesn't die anymore ^_^
17:39 nemsys joined #perl6
17:39 Skarsnik qt work with latin-1/utf8/ascii
17:39 leont IRC is lovely in not specifying an encoding :-/
17:39 mst IRC predates anybody realising they needed to care
17:39 ZoffixW :D
17:40 flussence iirc, "IRC encoding" is "utf-8 if it's valid, latin-1 if it isn't"
17:40 Skarsnik I think you need something to detect the encoding with irc
17:40 Skarsnik or yes, that xD
17:40 flussence I think either xchat or irssi's docs say something about it...
17:40 ZoffixW Man, bot still freezes up when connecting to Freenode :/ I wonder if it's some Rakudo thing that changed, because I connected like this before without any issues :(
17:40 ugexe latin-1 wont fail with invalid latin-1 encoding
17:40 ZoffixW oh, sweet
17:41 ugexe like .unpack('A*')
17:41 mst ZoffixW: hmmm. /w 64
17:41 mst gah
17:42 ZoffixW mst, one word. http://xchat.org/
17:42 ZoffixW :)
17:42 mst I'd really rather not
17:42 * [Coke] wonders why 'no precompilation' compiles, but 'use precompilation' does not
17:43 * ugexe wishes there was a way to do `-M"no precompilation"`
17:43 rindolf ZoffixW: XChat has gone unmaintained. HexChat is an active fork of it.
17:44 ZoffixW rindolf, really?
17:44 rindolf ZoffixW: yes.
17:44 ZoffixW It's still begging me for cash on Windows
17:44 ZoffixW Too bad I don't like the name...
17:44 rindolf ZoffixW: which name?
17:45 ZoffixW HexChat
17:45 rindolf ZoffixW: well, I've ran into much worse names than that.
17:45 rindolf ZoffixW: and you don't have to like the name to use it.
17:46 pjscott joined #perl6
17:46 rindolf ZoffixW: HexChat has a gratis and non-nagware version for Windows, too.
17:46 atweiden flussence: figured out how to install system wide p6 modules without panda, e.g. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=perl6-json-tiny
17:46 dalek rakudo/nom: 6612747 | TimToady++ | src/core/Range.pm:
17:46 dalek rakudo/nom: force empty range to sum to 0
17:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6612747124
17:47 sprocket joined #perl6
17:47 AndyDee joined #perl6
17:47 dalek roast: dffb5e9 | TimToady++ | S03-operators/range-int.t:
17:47 dalek roast: test that null range sums to 0
17:47 dalek roast: review: https://github.com/perl6/roast/commit/dffb5e9548
17:47 atweiden uses https://github.com/atweiden/alacryd
17:48 pi1 joined #perl6
17:48 TimToady I don't see that anyone actually filed that as a bug
17:48 TimToady folks, you shouldn't really rely on my backlogging skills to avoid dropping bugs on the floor
17:49 integral joined #perl6
17:49 integral joined #perl6
17:49 amoe joined #perl6
17:50 TimToady 'sides, fixing bugs slows down my backlogging, waaah!
17:50 lucasb ok, after some time playing with P6, I feel confident to start submitting bugreports :)
17:51 khw joined #perl6
17:51 TimToady lucasb++
17:51 lucasb It took a while to start feeling confident :)
17:51 TimToady well, if you're not confident, you just have to have a thick skin about rejects :)
17:52 _nadim joined #perl6
17:52 mst lucasb: "I'm not sure if this is a bug or not" reports are still useful
17:53 pierre-vigier joined #perl6
17:53 ZoffixW Oh, it's likely my IRC Grammar that's freezin gup
17:53 _nadim Good evening
17:53 ZoffixW Afternoon
17:53 stmuk joined #perl6
17:53 rindolf ZoffixW: there may be security problems and other serious bugs lurking in the old XChat codebase , so you really should no longer use it.
17:54 rindolf _nadim: evening.
17:54 ZoffixW There are many things on my box I should no longer be using and xchat is the least worrisome :)
17:54 _nadim special "Hi" to both of you
17:54 TimToady maybe rt needs a gentler word for "reject".  "Sorry, your bug report has intentionally been allowed to through the cracks."
17:54 TimToady *to fall
17:54 _nadim rindolf: thanks for the test earlier, I'll try to add it to the ecosystem today
17:55 rindolf ZoffixW: really like what?
17:55 amoe joined #perl6
17:55 TimToady Frontlogging also slows down my backlogging, waaah!
17:55 * rindolf prepares his cracking toolbox to pwn ZoffixW's box. ;-)
17:55 nexysno_ joined #perl6
17:56 Skarsnik gah i still hate this 0E0 thing in DBIS
17:56 rindolf _nadim: you're welcome .
17:56 _nadim a question about the ecosystem. The page  says "Ensure you have a provides section that lists all the files with correct filenames" is that all the .pm, .t, .pl, ...?
17:56 ZoffixW _nadim, just the .pm
17:56 Skarsnik the file installed
17:56 TimToady what about the files with incorrect filenames?
17:56 ugexe and .pl get installed if they are in bin
17:57 Jonis joined #perl6
17:57 smash joined #perl6
17:57 dalek ecosystem: 7e9eb37 | (Zoffix Znet)++ | README.md:
17:57 dalek ecosystem: Reword what needs to be in `provides`
17:57 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/7e9eb37ec2
17:57 ZoffixW TimToady, they don't get installed.
17:57 _nadim Ok,  if the module uses other modules that are not public, my guess is that they too have to be listed, right?
17:58 _nadim ugexe: thanks
17:58 ZoffixW _nadim, yes
17:58 nexysno_ joined #perl6
17:58 Rotwang joined #perl6
17:58 ugexe _nadim: you dont put .pl in provides. i meant "the file installed" is not technically correct
17:58 pjscott joined #perl6
17:59 _nadim a question about the version handling, and I hope I am done, how does the git version and the version in the Meta file relate. not at all i guess, but then what happens if there is a new commit, will that version be installed?
17:59 RabidGravy I think anything in 'bin' gets installed by panda irrespective of the suffix
18:00 RabidGravy which is right as far as I'm concerned
18:00 Skarsnik ZoffixW, I should write a Discord -> IRC stuff to user your NY plugin xD
18:00 ugexe but his question uses .pl as an example
18:00 pjscott joined #perl6
18:00 rindolf Skarsnik: what is Discord in this context?
18:00 ZoffixW Skarsnik, what's Discord?
18:00 Skarsnik _nadim, I think panda always try to install the version on the git
18:01 Skarsnik something like Slack
18:01 Skarsnik a Text Chat/Voice solution
18:01 rindolf Skarsnik: ah.
18:01 mst right now, pretty sure panda just installs git master HEAD of everything
18:02 RabidGravy mst, it installs whatever the META.info points at
18:02 mst META.info ?
18:02 Skarsnik on perl6/ecosytem
18:02 mst right
18:02 _nadim Skarsnik: that's too bad. it forces one to have another brand to develop. would be much nicer if a tag/commit, listed in the Meta file was used.
18:03 ugexe my local zef does --no-checkout and uses the extract phase to checkout different branches
18:03 _nadim RabidGravy: and how does one point to a commit in the meta file?
18:03 RabidGravy whatever's in the META.list in the ecosystem. which is a META6 file so whatever that points at as the source
18:03 ZoffixW Hm. Found my problem. All the stuff starts with '[server...' is a new 'whenever $!sock.Supply :bin' run, which gets broken up And my Grammar freezes up on those partial commands -_-  https://gist.github.com/zoffixznet/8b078c8d743daa9e3c2e
18:03 Skarsnik we should do a FAQ somewhere. "How module version work?" "It's mostly ignored for now"
18:04 RabidGravy _nadim, a tag, you mean a tag
18:04 ugexe _nadim: for source-url just put the path to whatever commit
18:05 ZoffixW Specifically, this line gets partial content from the server :S https://github.com/zoffixznet/perl6-IRC-Client/blob/master/lib/IRC/Client.pm6#L33
18:05 RabidGravy but yeah, the uri in the meta,list and the source-url in the meta file don't have to point to head
18:06 _nadim a path to a commit? I admit that i don't know how that works. Andhow does one put the commit in a file that is itself under git?
18:06 RabidGravy not a commit
18:06 RabidGravy a tag
18:07 _nadim ok
18:07 stmuk joined #perl6
18:07 Skarsnik ZoffixW, there is no .line on async sock? x)
18:07 RabidGravy so you tag "the current state" of your repository
18:09 lnx joined #perl6
18:09 rindolf _nadim: why do you have a leading underscore?
18:09 RabidGravy so say https://raw.githubusercontent.com/jonathanstowe/p6-Sys-Utmp/v0.0.7/META.info
18:09 Jonis joined #perl6
18:09 jnthn joined #perl6
18:09 amoe joined #perl6
18:09 _nadim RabidGravy:++
18:09 Rotwang joined #perl6
18:09 _nadim rindolf: underscore in what?
18:09 rindolf _nadim: in your nickname.
18:10 RabidGravy and if I was being strictly correct would have the 0.0.7 in the source-url
18:10 ZoffixW RabidGravy, do you update ecosystem META.list on each release?
18:11 ZoffixW Are tags movable? I'm thinking of creating something like 'latest' tag, and just moving it for each release.
18:11 RabidGravy ZoffixW, nah the smart money would be on having a realease tag that poiinted at the version
18:12 flussence ZoffixW: they are, but that doesn't mean it's a good idea :)
18:13 RabidGravy yeah, tags are moveable, for most parts it would be bad form but you tag with the version and then tag that with "release"
18:14 _nadim ZoffixW: yes tags can be moved
18:14 _nadim rindolf: it seems so
18:15 _nadim but why?
18:15 _nadim rindolf: it seems that I am banned on ##linux with my nick
18:15 RabidGravy flussence, it depends on the meaning of the tag whether it's a good idea or not, a specific version tag not so good, but "latest" for sure
18:16 RabidGravy you made an over simplified rule for yourself :)
18:16 Rotwang joined #perl6
18:18 flussence RabidGravy: you're right, though the same can be done by using separate "stable"/"dev" branches and slightly-careful merges
18:18 ZoffixW w00t... fixed my bot fix with a quick and broken hax :)
18:19 Jonis joined #perl6
18:19 smash joined #perl6
18:19 Skarsnik pg error are quite nice
18:20 rindolf ZoffixW: great!
18:20 TimToady 3774 hax0rs++
18:20 rindolf Skarsnik: PostgreSQL?
18:20 Skarsnik Yes
18:20 dj_goku m: sprintf("0x%s", 10.base(16) == 10
18:20 camelia rakudo-moar 661274: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mV8I3RZQm9␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/mV8I3RZQm9:1␤------> 3sprintf("0x%s", 10.base(16) == 107⏏5<EOL>␤»
18:20 TimToady or however you spell that
18:20 dj_goku m: sprintf("0x%s", 10.base(16)) == 10
18:20 camelia rakudo-moar 661274: OUTPUT«WARNINGS for /tmp/hc3IpCGDlh:␤Useless use of "==" in expression "sprintf(\"0x%s\", 10.base(16)) == 10" in sink context (line 1)␤»
18:21 dj_goku m: sprintf("0x%s", 10.base(16))
18:21 camelia rakudo-moar 661274: ( no output )
18:21 ZoffixW TimToady, wat? :)
18:21 dj_goku m: say sprintf("0x%s", 10.base(16))
18:21 camelia rakudo-moar 661274: OUTPUT«0xA␤»
18:21 dj_goku is that the best way to convert an Int to a Hex?
18:21 Skarsnik m: printf("%d, %d", 1)
18:21 camelia rakudo-moar 661274: OUTPUT«Your printf-style directives specify 2 arguments, but 1 argument was supplied␤␤»
18:21 ZoffixW m: 16::(42)
18:21 camelia rakudo-moar 661274: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7LB2tBh6Xs␤Confused␤at /tmp/7LB2tBh6Xs:1␤------> 16:7⏏5:(42)␤    expecting any of:␤        colon pair␤»
18:21 Skarsnik m: printf("hello", 1)
18:22 camelia rakudo-moar 661274: OUTPUT«Your printf-style directives specify 0 arguments, but 1 argument was supplied␤␤»
18:22 integral joined #perl6
18:22 integral joined #perl6
18:22 rindolf Skarsnik: I see.
18:22 ZoffixW m: say ::16(42)
18:22 camelia rakudo-moar 661274: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yJCwb4wmOM␤Two terms in a row␤at /tmp/yJCwb4wmOM:1␤------> 3say ::7⏏16(42)␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        state…»
18:22 TimToady 1337 h4x0r++  I mean
18:22 ZoffixW dj_goku, there was something akin to that ^
18:22 dj_goku hehe ok. :D
18:22 * dj_goku searches
18:22 * ZoffixW tries to recall the module where they used that
18:22 Skarsnik should the printf error display the BT?
18:22 dalek specs/meta-v1: fd1245c | (Anthony Parsons)++ | S22-package-format.pod:
18:22 dalek specs/meta-v1: Speculatively make versions agree on a format
18:22 dalek specs/meta-v1:
18:22 dalek specs/meta-v1: Nothing in META6.json makes it explicit whether the "v" is required, optional or
18:22 dalek specs/meta-v1: forbidden, so for now let's default to the form that requires less typing and
18:22 dalek specs/meta-v1: can sanely be passed to Version.new.
18:22 dalek specs/meta-v1: review: https://github.com/perl6/specs/commit/fd1245cc0e
18:23 flussence ^please complain about anything you don't like :)
18:23 Skarsnik I don't like it
18:23 ugexe printf is nqpnqp
18:23 TimToady I don't like complaining.
18:23 dj_goku m: say :16(10)
18:23 camelia rakudo-moar 661274: OUTPUT«This call only converts base-16 strings to numbers; value 10 is of type Int, so cannot be converted!␤(If you really wanted to convert 10 to a base-16 string, use 10.base(16) instead.)␤  in block <unit> at /tmp/01x4A7VHSg line 1␤␤»
18:24 masak m: say :16("42")
18:24 camelia rakudo-moar 661274: OUTPUT«66␤»
18:24 dj_goku m: say :16('10')
18:24 camelia rakudo-moar 661274: OUTPUT«16␤»
18:24 ZoffixW Thanks, masak++
18:24 dj_goku m: say :16('A')
18:24 camelia rakudo-moar 661274: OUTPUT«10␤»
18:25 dj_goku m: say :16('A').Str
18:25 camelia rakudo-moar 661274: OUTPUT«10␤»
18:25 addison joined #perl6
18:26 * flussence can't imagine that first change being a point of contention, but I've got other ideas people *will* complain about for this... hence doing it on a branch :)
18:27 mst hrmf, --installed list is working fine in a checkout
18:27 Skarsnik the spec should be Test::META x)
18:27 dj_goku thanks!
18:27 FROGGS joined #perl6
18:27 dj_goku I found that answer here: https://irclog.perlgeek.de/perl6/2015-06-26
18:27 dj_goku searching. :D
18:27 * mst pokes it with a stick
18:27 dj_goku right as masak said something.
18:27 mst I love it when I can repro a bug against installed code but not a checkout
18:28 cygx joined #perl6
18:28 cygx o/
18:28 mst ey up
18:28 jameslenz joined #perl6
18:28 cygx hack to manually load precompiled modules: https://gist.github.com/cygx/9f843fa4e1f1e13a5f9d
18:28 ZoffixW (slow ssh connection)--
18:29 ZoffixW aha
18:29 integral joined #perl6
18:29 flussence mst: RAKUDO_MODULE_DEBUG=1 might be handy to show if it's loading the right thing
18:29 mst flussence: yeah, I'm getting a bit lost here
18:29 ZoffixW Recall the MERGE SYMBOL errors from Linenoise yesterday? I found a way to 100% repro that
18:29 mst also just had to phone my old ISP and point out they'd apparently failed at cancelling my account when I moved house over a year ago
18:30 mst happily the woman in the call centre seems to've really enjoyed having somebody not shouting at her ;)
18:30 mst w 65
18:30 itaipu joined #perl6
18:30 ZoffixW mst, xchat! :)
18:30 mst ZoffixW: I'd still be reliant on typo-able keyboard commands
18:30 mst also it doesn't run under dtach :P
18:30 ZoffixW :P
18:31 TimToady mst: you're very good at not shouting at people, from time to time :)
18:33 ZoffixW Ugh.
18:33 Skarsnik no complain about NC today. it's weird :)
18:34 ZoffixW Well, my findings on the merge symbol stuff is: have Module.pm in two different locations that are both included with use lib <...>; and have `constant` in them. The merge error is the error merging those constants. I dunno if it's exactly the same issue as linenoise, but error looks similar
18:34 ZoffixW oohhh
18:35 ZoffixW Crap. You don't even need use lib <...> :S Right now my code fails to run because I'm getting that error after doing; panda install IRC::Client; and then later git cloning the repo and doing panda --force install .
18:35 cdg_ joined #perl6
18:36 ZoffixW *sigh*
18:36 Skarsnik anobody against removing http://doc.perl6.org/language/nativecall#MySQL from the doc (and all the zavolaj ref) ?
18:37 ZoffixW Skarsnik, what's wrong with it?
18:37 firstdayonthejob joined #perl6
18:37 ZoffixW Seems like it's the major portion of 'EXAMPLES' section
18:38 Skarsnik well the mysql example link to minidbi x)
18:38 flussence that looks ancient, you might want to change it to point to https://github.com/rakudo/rakudo/tree/nom/t/04-nativecall
18:39 Skarsnik maybe point to something less complex than DBI, like GD?
18:39 Skarsnik DBIish is not that "readable"
18:41 nanis joined #perl6
18:41 Skarsnik Erf
18:41 ZoffixW Something of note: our install instructions on http://perl6.org/downloads/ fetch 2015.12 moar, but latest panda
18:42 ZoffixW firstdayonthejob, first day on the job and you're already slacking off? How terrible! :)
18:42 Skarsnik is native('user32') I wonder if that still work x)
18:43 Skarsnik it end in user32.dll probably
18:43 ZoffixW Oh man. I just nuked everything because I wanted to fix the global error, but I forgot that panda is currently broken >_<
18:43 ZoffixW My plans to have an awesome Perl 6 IRC party bot failed
18:44 flussence panda HEAD broken? Use 4862f32c405d, mine's at that and it works fine.
18:44 FROGGS joined #perl6
18:44 ZoffixW I've no idea how to do that
18:44 flussence git checkout 4862f3 should work
18:44 mst git clone git@github.com:tadiz/panda.git
18:44 mst git checkout 4862f3; perl6 bootstrap.pl
18:44 ZoffixW All I know how to do is run rakudobrew build-panda
18:44 mst should work
18:45 ZoffixW mst++ thanks
18:45 mst rakduobrew build-panda runs basically that
18:45 * mst stares
18:45 mst bootstrap.pl just re-installed the deps
18:45 mst even though I already installed Shell::Command etc. to my rekuaod
18:45 mst *rakudo
18:45 pierre-vigier joined #perl6
18:45 mst how ... fascinating
18:46 TimToady .tell leont I'd use something like: .return with $!exit-status.status;
18:46 yoleaux TimToady: I'll pass your message to leont.
18:46 flussence «} elsif ($arg eq 'build-panda') { my $panda_ver = shift;» -- I guess `rakudobrew build-panda 4862f3` would work too...
18:46 regreg joined #perl6
18:46 pi1 joined #perl6
18:47 flussence never used it myself, caveat lector
18:47 ZoffixW I got "Already on 'master'" with that and abourter
18:48 mst ok, now I'm really confused
18:48 mst site/bin/panda --installed list
18:48 mst ignores the --installed
18:48 mst perl6 -Ilib bin/pands --installed list
18:48 mst handles it fine
18:48 mst I am ... a little confused about how to figure out why
18:49 flussence I'm gonna guess site/bin/panda is one of those wrapper scripts CompUnit installs, and that that's buggy.
18:50 mst oooh, yes, it is
18:50 mst at which point *that* is probably what's losing the ARGV
18:50 mst AHA
18:50 mst the wrapper is
18:50 mst sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
18:50 _Vi joined #perl6
18:51 mst but does
18:51 mst run($*EXECUTABLE-NAME, @binaries[0].hash.<files><bin/panda>, @*ARGS)
18:51 mst which I guess passes the *@ but not the *%
18:51 mst should that be %*ARGS, @*ARGS ?
18:52 mst nope. ok, where does the *% end up?
18:52 ZoffixW @*ARGVS is @ARGV
18:52 ZoffixW I think the MAIN sig is just there for options validation
18:52 mst oh
18:52 cygx @*ARGS likely includes the flags
18:53 flussence I think the *@ and *% are just there so unknown stuff doesn't trip the wrapper up, @*ARGS should contain everything either way
18:53 flussence should.
18:53 mst right
18:53 Arrowhead joined #perl6
18:53 [Coke] What's the purpose of "I ran into a problem while trying to set up REPL completions:
18:53 [Coke] Continuing without tab completions"
18:53 flussence that's just not-telling you Linenoise is missing
18:54 [Coke] so let's make it tell us that Linenoise is missing.
18:54 flussence yes please!
18:54 TimToady well, but what if it actually failed setting up readline?
18:55 flussence that's src/Perl6/Compiler.nqp:196, for anyone with a commit bit
18:55 mst that looks like the error message should've been there after the :
18:55 TimToady overspecific errors are just as bad as underspecific
18:55 mst which would presumably either be 'Linenoise missing' or 'readline went boom'
18:56 mst yeah, bingo, @*ARGS doesn't have --installed
18:56 RabidGravy "unable to find a command history library"
18:56 * cygx is tempted to add the error message `readline went boom`
18:56 skids joined #perl6
18:56 Arrowhead and don't optimize for the "found a history library but it went boom" case.
18:57 autarch is it possible to intercept direct attribute access by hooking into the meta model somehow?
18:57 flussence looks like @*ARGS is the same as *@, and *% disappears off into space...
18:58 mst right
18:58 HNYBot joined #perl6
18:58 HNYBot Next New Year is in 1 minute and 44 seconds in French Southern Territories [Port-aux-Français], Kazakhstan [Aqtöbe], Maldives [Malé], Pakistan [Faisalabad Gujranwala Hyderabad Islamabad Karachi Lahore Multan Peshawar Quetta Rawalpindi], Russia [Chelyabinsk Yekaterinburg], Tajikistan [Dushanbe Khujand], Turkmenistan [Ashkabad Turkmenabat], and Uzbekistan [Namangan Tashkent]
18:58 * mst fiddles some more
18:58 flussence ZoffixW++
18:58 mst argh, and if I name *%extra
18:58 ZoffixW joined #perl6
18:58 mst I get { installed => True }
18:58 mst deeply unsure what the fix for this would be
18:59 ZoffixW HNYBot, hny Toronto
18:59 HNYBot New Year in Toronto, ON, Canada will happen in 10 hours and 55 seconds
18:59 ZoffixW HNYBot, hny Tel Aviv
18:59 HNYBot New Year in Tel Aviv-Yafo, Israel will happen in 3 hours and 48 seconds
18:59 ZoffixW She's alive \o/
18:59 autarch hmm, maybe I don't need to intercept attr access
18:59 cygx .oO( where's the mad laughter? )
18:59 HNYBot Next New Year is in 30 minutes in Afghanistan [Kabul Kandahar Mazari Sharif]
18:59 HNYBot Happy New Year to French Southern Territories [Port-aux-Français], Kazakhstan [Aqtöbe], Maldives [Malé], Pakistan [Faisalabad Gujranwala Hyderabad Islamabad Karachi Lahore Multan Peshawar Quetta Rawalpindi], Russia [Chelyabinsk Yekaterinburg], Tajikistan [Dushanbe Khujand], Turkmenistan [Ashkabad Turkmenabat], and Uzbekistan [Namangan Tashkent]
18:59 ZoffixW muuUAHAHAHAA
19:00 cygx better
19:00 RabidGravy autarch, bind a Proxy perhaps?
19:00 masak ZoffixW: Perl 6 based?
19:00 autarch RabidGravy: ah, that might work too - but I might have a simpler option available
19:00 ZoffixW masak, not just "based", everything is Perl 6.. from scratch with IO::Socket::Async :) https://github.com/zoffixznet/perl6-IRC-Client-Plugin-HNY
19:00 flussence for the convenience of the audience: we're trying to make sense of «sub MAIN(:$foo, :$bar, *@_, *%_) { dd @_, %_, @*ARGS }»
19:01 masak ZoffixW++!
19:01 ZoffixW I had to churn out half a dozen modules for it to happen tho lol
19:01 masak ZoffixW++ # that deserves two karmas
19:01 ZoffixW \o/
19:01 mst flussence: and notable
19:01 mst perl6 -e 'say @*ARGS' --meep foo bar # [--meep foo bar]
19:01 mst perl6 -e 'sub MAIN(*@, *%) { say @*ARGS }' --meep foo bar # [ foo bar ]
19:01 mst that difference is what's eating the panda options as we pass through the site/bin/panda shim
19:02 RabidGravy ZoffixW, I hope you've ecosystemed them :)
19:02 ZoffixW Time to relocate the bot to where the party's at :) #freenode-newyears
19:02 ZoffixW RabidGravy, yup, all of 'em
19:02 masak mst: looks like a clear bug.
19:02 flussence oh, so the magic &MAIN handling is eating the *% stuff out of @*ARGS. right.
19:02 RabidGravy groovy
19:02 masak mst: shall you rakudobug it, or shall I?
19:03 addison joined #perl6
19:03 flussence I'm not sure what's going on there, src/core/Main.pm only touches a copy of @*ARGS
19:03 cygx $ perl6 -e 'sub MAIN(*@, *%) { say @*ARGS }' --meep foo bar # [--meep foo bar] with 2015.11-792-g98a9c6e
19:04 mst This is Rakudo version 2015.12-63-ge458a20
19:06 masak ZoffixW: make sure to tell them it's a Perl 6 bot ;)
19:06 lucasb those script wrappers are the best option to handle things? someone could argue that starting *one* instance of rakudo is slow, but with these wrapper scripts, it's starting *two* instances.
19:06 flussence Main.pm hasn't changed since that 2015.11
19:06 ZoffixW masak, that was the plan from the start :)
19:06 integral joined #perl6
19:06 integral joined #perl6
19:06 mst flussence: wondering if 4c1f815 is it
19:06 RabidGravy yeah it's fine in a plain 2015.12
19:07 mst flussence: wait, what version do youy have?
19:07 flussence ...an out of date one! one sec
19:07 mst flussence: wait, I want to know which
19:07 flussence yeah, that wasn't in the git I had
19:07 mst ghetto bisection via users
19:07 flussence my ORIG_HEAD is 446a3ca324052080ac9edaa9010bc6bbe7b6fe05
19:07 mst right, so if yours is broken, it's not the commit you don't even have ;)
19:07 flussence no no, I'm getting mixed up
19:08 flussence the perl6 I'm *running* is fresh, the git clone I had lying around to read the code from was stale
19:08 bartolin_ .tell brrt I built rakudo HEAD using your libuv-1.8 branch on Debian 7 and FreeBSD 10.2 (both amd64). all tests for nqp and rakudo passed -- as well as "make stresstest"
19:08 yoleaux bartolin_: I'll pass your message to brrt.
19:08 flussence so ignore everything I said about Main.pm not changing, it has in the past 5 days
19:09 virtualsue i've put an opbot on irc.perl.org/#perl6 on the offchance that it might be useful in reducing some of the traffic in here eventually
19:09 mst virtualsue: gimme a shout if you need oper assist for anything
19:09 itaipu joined #perl6
19:09 virtualsue genehack sorted it
19:10 autarch I note that the metamodel classes don't have any way of removing methods or attributes - is this intentional?
19:10 lostinfog joined #perl6
19:11 virtualsue i don't have any great hopes for the channel, but it was already sitting there in a generally moribund state
19:11 mst virtualsue: ah, yeah, I forget we gave the SoC Review Board O-lines, they're mostly chocolate fireguards :D
19:11 virtualsue fine for my purposes
19:11 mst yep. I'm just offering backup if required
19:11 flussence autarch: it's probably intentional, there's no sane way to remove things from a class when it might already be in use somewhere else
19:11 virtualsue cheers
19:11 mst masak: not yet, cos I think I spotted the commit :)
19:12 autarch any thoughts on how to implement lazily built attributes? I was trying to remove the attribute and replace it with a method that got the value from a different (newly made) attribute that would be populated when the method was called
19:12 * cygx wanders off to do some celebrating
19:12 cygx happy debugging o/
19:13 autarch I could try replacing the attribute with a Proxy, but I'm not sure how I'd get access to the object that contains the attribute in that case
19:14 flussence autarch: maybe you can do that via the attribute's MOP at runtime?
19:14 mst wasn't there a 'does lazy' trait or something?
19:15 autarch flussence: I don't see how - the Attribute class doesn't have any methods for getting that information - heck there isn't even a way to get an Attribute's package!
19:15 RabidGravy autarch, mostly you don't you'd close over a lexical in the Proxy
19:15 autarch mst: I think it was removed
19:15 autarch RabidGravy: close over what lexical? the whole point it to be able to call a method on the underlying object to generate the value
19:15 mst autarch: right, but presumably the implementation would help
19:15 RabidGravy oh
19:15 mst autarch: as in, find it and steal it
19:15 autarch so if I write self!foo it calls self!build-foo under the hood
19:15 autarch mst: good point
19:16 mst bah, no, wasn't that one
19:16 mst wait, no
19:16 mst offs
19:17 sprocket joined #perl6
19:17 mst rakudobrew built me a *moar* of an old rev, I think
19:17 Juerd Speaking of irc.perl.org... Any chance of that ever supporting IPv6? :|
19:17 flussence m: my class Foo { has $.bar = Proxy.new(FETCH => { self.WHICH }, STORE => { }) }; Foo.new.bar.say
19:17 camelia rakudo-moar 661274: OUTPUT«Foo|43825904␤»
19:17 flussence m: my class Foo { has $.bar = Proxy.new(FETCH => { self.WHICH }, STORE => { }) }; Foo.bar.say; Foo.new.bar.say
19:17 camelia rakudo-moar 661274: OUTPUT«Invocant requires an instance of type Foo, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/ww9gQEjpRS line 1␤␤»
19:17 mst Juerd: we did for a while, then the ipv6 providers kept crashing, so we turned it off
19:17 mst Juerd: in another year or two we'll try it again and see if the internet works yet
19:18 flussence autarch: ^ self is defined inside the Proxy, that might be useful to know
19:18 autarch flussence: is self the Proxy object though?
19:18 flussence well, says Foo|<numbers> there so I don't think so...
19:18 Juerd mst: Ah, still no native IPv6 on whatever's hosting it? :|
19:19 autarch flussence: ok, then this is super duper easy, I htink
19:19 mst Juerd: not most of the nodes, no
19:19 Juerd mst: That is, from "IPv6 provider" I think you're referring to tunnel providers
19:19 autarch I can't find the old core lazy implementation - searching for "lazy" in the logs is not that useful since lazy is always referring to lazy lists and such
19:19 mst Juerd: yes. a lot of the servers have been in service over half a decade
19:20 mst right, let's see if my attempt at reversing the patch works
19:20 Juerd mst: Not really relevant. IPv6 has been usable and stable for much more than a decade on all OSes, it's just a matter of having it available on the network.
19:20 * flussence has found the ipv6 internet kinda flaky in practice, even if I do go to pains to get my half-dozen nodes on it properly configured...
19:21 Juerd That is, for simple things like TCP sockets. It hasn't really been usable with automatic DNS configuration and such.
19:21 mst Juerd: well, if you think you can do better, we've always been open to having somebody link in an IPv6 node
19:21 Juerd flussence: That's interesting. My experience has been surprisingly painless.
19:21 mst otherwise you'll have to wait until our various sysadmins can get round to it
19:22 Juerd mst: Although I do think I could do it better, I'm not really prepared to maintain an IRC server. I'd be happy to provide a virtual Debian box for it though.
19:22 llfourn joined #perl6
19:22 flussence Juerd: sometimes a router 5 hops away just vanishes for hours on end :(
19:22 mst we're not short of systems, and VMs don't cut it
19:22 Juerd mst: Ack
19:24 mst augh
19:24 mst I don't even know if my attempt at a fix went in
19:24 mst masak: is that offer to file a bug still open?
19:24 mst I think I'm a bit out of my depth here
19:24 RabidGravy I remember a reference implementation of of ipv6 that worked being available on windows in like '97
19:24 mst and by 'a bit' I mean "HALP HALP SHARKS"
19:26 mst or somebody could tell me which FM to R and I'll write it up myself
19:26 * flussence has a v6 setup held together entirely with twine, chewing gum and blind faith. I can ssh to my phone without port forwarding though, so that's fun
19:26 * mst can't find a perlbug equivalent and is therefore confoos
19:27 flussence mst: rakudo's stuff is on RT for whatever reasons. mailto:rakudobug@perl.org
19:27 mst flussence: so's perl5's
19:27 mst flussence: but you still use perlbug
19:27 mst flussence: and the reason is because everything else is even worse than RT
19:28 pi1 joined #perl6
19:28 skids .oO(maybe a ticket system could be the perl6 "killer app")
19:29 RabidGravy mailing list manager ;-)
19:29 autarch next question - is it possible to see if an attribute was _set_ - even if it was set to an undefined value?
19:29 moritz skids: my experience with ticket systems is that you can't get them right
19:29 flussence .oO( no language is production-ready until someone's written an issue tracker in it and it's been pwned )
19:29 moritz skids: a ticket system includes at least an email client, which itself is already a very nasty task to do
19:30 Arrowhead joined #perl6
19:30 moritz skids: and then you have to deal with all sorts of..., let's call it "questionable" input from diverse MUAs, have to structure your tickets, map workflows etc. No fun to develop.
19:31 skids moritz: never said it wouldn't be work :-)
19:32 moritz I remember a fun bug in the OTRS email parser. Some clients would send headers as unencoded Latin1, and in order to parse that, OTRS would try to decode the headers with the content encoding of the body
19:32 * mst cursses self, rebuilds everything
19:32 moritz which works fine for ASCII-compatible encodings, but produces hilarious mojibake for UTF-7 encoded emails
19:33 mst OTRS is ... special
19:33 RabidGravy that's another thing I've yet to make, a simple workflow/state machine thingy
19:33 mst I'd actually rather use mantis
19:33 moritz and yes, we received UTF-7 encoded mails in a production setting
19:33 moritz mst: aye, but all bug trackers face some of the same challenges
19:34 mst moritz: oh, sure, just OTRS is particularly terrible
19:35 moritz mst: my experience with RT isn't much better, TBH (though I only know the rt.perl.org and rt.cpan.org instances)
19:35 RabidGravy remedy, just saying
19:35 mst I dunno, for internal use I've always had a heavily configured RT
19:35 moritz anyway, I think a bug tracker is a system where you can sink countless hours of work for relatively little glory
19:36 mst for large scale issue trackers I've only really used RT, bugzilla, and github
19:36 mst and of the three I hate RT slightly less
19:36 moritz there are niches that are much less saturated where Perl 6 could shine
19:37 moritz like devops tools; a service deployment tool that does dependency tracking for example. Such things are very hard to find right now
19:37 moritz or a continuous deployment system that doesn't suck at propagating meta data
19:37 RabidGravy and something nicer than buildbot
19:38 mst This is Rakudo version 2015.12-64-g6612747
19:38 * mst is confused
19:39 * masak submits rakudobug
19:39 mst masak: still trying to test a patch. not sure I've got things wrong.
19:39 skids well, I guess targeting apps that only developers use *could* work considering devlopers are the main target audience, but...
19:41 RabidGravy I'm about half way to having all the bits for the radio station application which I intended a year ago
19:42 mst masak: gimme the bug URL once you have it? (having realised it's just 'email RT' I could've done it, sorry, wasn't sure)
19:42 mst so, if I have a clean rakudobrew and I patch something
19:43 mst can I just re-run 'make install' in the rakudo checkout?
19:44 ZoffixW I believe so
19:44 RabidGravy if any shim updating needs too be done it won't happen but yeah
19:44 mst I'll be making a one line fix to Main.pm
19:44 ZoffixW mst, oh, without --prefix or something ,it'll just "install" into the same dir as where you're running it or somethijng
19:47 CoconutCrab joined #perl6
19:47 moritz ZoffixW: if that's a rakudo that has already been configured with a prefix, "make install" will install into the same dir as before
19:47 mst moritz: right, so, I got confused
19:47 mst wiped my entire rakudbrew setup
19:47 mst after 'build moar' finishes
19:47 mst I was going to make a one line tweak to src/core/Main.pm
19:47 mst then 'make install' to see if it works
19:47 ZoffixW moritz, ah
19:47 mst does that seem like a sane approach?
19:48 moritz sorry, I have too little experience with post-curli rakudo
19:49 skids You'd have to commit the tweak under git_reference/rakudo or it won't get used by rakudobrew, FWIW.
19:49 mst ah
19:50 mst lemme see if that works
19:53 mst no
19:53 mst I suck
19:53 mst masak: bug id?
19:54 mst hrm. is there a good way to turn { installed => True } back into (--installed) ?
19:54 mst I'm wondering if the current behaviour is good and the shim chaining is buggered
19:54 ZoffixW This is why I hate RT (spam): https://rt.perl.org/Ticket/Display.html?id=127109
19:55 mst ZoffixW: you realise that's not a problem with RT, right?
19:55 mst and that, actually, one of the reasons we've stuck with RT is that our current setup filters out more spam than you want to think about
19:55 ZoffixW That's the problem with taking tickets via email
19:55 ZoffixW And since RT allows that, it's the problem with RT
19:56 * perlpilot notes that 99.99999% of the perl6 tickets arrived via email
19:56 mst the fact I can't take tickets via email is one of the things I hate about github
19:56 mst it increases the barrier to entry for new contributors
19:56 mst this is bad
19:57 Arrowhead joined #perl6
19:58 skids Hrm, well, I've always hated email for ticket purposes, but it's a matter of taste.
19:58 mst being able to fire an email to 'bugs-Foo-Bar@rt.cpan.org'
19:58 mst is a hugely useful affordance
19:58 tadzik not having to create an account is another
19:58 yoleaux 00:21Z <_nadim> tadzik: could we get an uninstall verb in Panda
19:58 mst if you don't like email, I've no problem with you signing up for an account and submitting that way
19:59 tadzik _nadim: it's kind of on the roadmap
19:59 tadzik for the last 5 years or so though :)
19:59 mst tadzik: so, everything caught fire but it's rakudo's fault, not panda's
19:59 tadzik now we actually need for CUR to support it
19:59 tadzik mst: phew, typical :P
19:59 lizmat tadzik: indeed, that's why I still need to reinterprete zefram's mails  :-(
19:59 autarch are "is" trait modifier on Attributes called before the attribute is attached to a class?
19:59 mst tadzik: rakudo's shims are eating options
19:59 tadzik rakudo's shims?
19:59 mst tadzik: so 'panda --force install' becaomes 'panda install'
19:59 mst the site/bin/panda
19:59 lizmat autarch: very likely so
20:00 tadzik ouch
20:00 lizmat because the trait is run as soon as it is encountered
20:00 autarch lizmat: is there any way to add a hook to be called after they're attached?
20:00 mst masak's rakduobugged it
20:00 tadzik masak++
20:00 lizmat autarch: in the main line of the class maybe ?
20:00 autarch lizmat: that somewhat defeats the point of what I'm try to write
20:00 perlpilot autarch: there is a COMPOSE phaser that might be useful to you (if it's implemented)
20:01 lizmat COMPOSE is NYI
20:01 mst I think
20:01 mst I can't even find the queue
20:01 lizmat as it didn't seem much to add to running code in the mainline of a class
20:01 mst lizmat: hey, you merged a commit from Tux
20:01 lizmat did I?  when ?
20:01 mst lizmat: Only initialize @*ARGS in MAIN_HELPER, Tux++
20:01 autarch perlpilot: that only runs for role application anywya, so it doesn't help
20:01 mst Dec 31 12:28
20:01 mst that seem's to've messed things up
20:01 lizmat ah, no, Tux pointed out the problem
20:02 mst perl6 -e 'sub MAIN (*@, *%) { say @*ARGS }' --foo bar baz
20:02 mst now gives you only [bar baz]
20:02 perlpilot autarch: you could introspect at INIT or CHECK time, maybe?
20:02 mst instead of [--foo bar baz]
20:02 autarch I don't see how it's possible to write an "is lazy" trait for attributes - I get an attribute that's not attached to a class - I can't _change_ it because it's immutable, I can't get at the thing it's about to be attached to ...
20:02 mst so the site/bin/panda etc. shims are eating all options passed to the script invocation
20:02 mst so 'panda --force install Foo' is now becoming 'panda install Foo'
20:02 mst thereby causing much unhappy
20:02 lizmat mst: double checking my commit
20:02 mst I -think- that commit is the problem, looking at how you now init @*ARGS -after- ripping the options off the front
20:03 mst but then I got completely lost trying to test this theory
20:04 awwaiid "only onlystar-protos can be merged" can someone give me an example of what that means?
20:04 awwaiid onlystar is maybe a function body with just "{ * }" ?
20:05 flussence awwaiid: if you have multi subs, and a proto sub for them that isn't just that, boom
20:05 mst lizmat: did that make any sort of sense?
20:05 awwaiid this is when trying to import (export) multi subs from several modules
20:05 lizmat mst: you may have a point,
20:05 lizmat if I created a problem, it wasn't caught by spectests  :-(
20:05 autarch perlpilot: CHECK causes all sorts of weirdness if I try to use it
20:05 mst lizmat: I'm not 100% sure if that's not a bugfix though, and the shims should have *%opts instead of just *% and then re-flatten them for the 'run'
20:05 autarch this seems like it should be an easy thing to implement, it's a bit frustrating
20:06 mst lizmat: I guess the spectests don't cover the shims passing options, it's something you could very easily miss testing
20:06 mst lizmat: I'm not even sure if the new behaviour is wrong, just that the shims relied on the old behaviour
20:06 mst still getting up to speed on how all the parts fit together
20:07 lizmat did the panda problem start yesterday already ?
20:09 autarch is the meta model not really done? it seems like it doesn't have any of the pieces it would need to be extensible yet
20:09 mst lizmat: https://github.com/tadzik/panda/issues/278 was the report
20:09 mst lizmat: 4h ago according to github
20:10 mst beyond that, I know nothing, my attempts to bisect backwards resulted in my getting completely and utterly confused and realising I need to read the rakudobrew sources some more, and the INSTALL docs for eveyrthing some more, and ...
20:10 skids autarch: It's done as far as needed to support whatever jnthn wants to show off  :-)
20:10 RabidGravy yeah, I was worried that the patch I made to fix installdeps yesterday screwed it but I can't see any way it could
20:10 autarch skids: I guess what I'm asking is are there plans to make it extensible?
20:10 mst a vanilla 2015.12 definitely emits the full set of args in @*ARGS
20:10 mst somebody confirmed that for me
20:10 autarch because right now I can't do the types of things I can do with Moose in p5, which is sad
20:11 lizmat ok, lemme bisect a bit of my own :-)
20:11 RabidGravy autarch you can apply roles to the meta objects
20:11 autarch RabidGravy: really, how?
20:11 RabidGravy which is how about half the traits work
20:11 autarch specifically, how do I do that with an attribute?
20:11 RabidGravy let me find an example
20:11 autarch RabidGravy: that would be great!
20:11 skids autarch: yes and the guts are already well in place, just worked examples have only come from wizards capable of saying "oh, I guess we are still missing this tiny part" and adding it while workig the example.
20:12 autarch skids: I might be able to do that - I certainly know how this stuff works in Moose well enough
20:12 perlpilot autarch: multi trait_mod:<is>(Attribute $a,  :$lazy) { ... }   # probably like this
20:12 autarch perlpilot: yes, that's _exactly_ what I wrote, but the $a is immutable and not attached to a package, making it basically impossible to do anything useful with it
20:12 mst lizmat: didn't you have a lazy trait proto a while back?
20:12 RabidGravy autarch, https://github.com/jonathanstowe/JSON-Name/blob/master/lib/JSON/Name.pm very simple example
20:13 skids autarch: you might find the jnthn/oo-actors module source code worth a read.
20:13 lizmat mst: yes, but that was decided against
20:13 mst lizmat: right, but I was wondering if autarch could see the implementation for inspiratio^Wtheft purposes
20:13 mst ISTR it was decided against having in core, not decided against being possible at all, right?
20:13 RabidGravy more complicated examples are available
20:14 lizmat mst: 34788bfd4bcdfaba78f8eab4f removed it
20:14 * autarch looks
20:15 autarch aha, I didn't realize how that compose method would work
20:15 RabidGravy yeah, you can over-ride the compose method and then nextsame
20:16 autarch that basically clears everything up, I think
20:16 Skarsnik the XML::from-file is really bad lol
20:16 perlpilot autarch: btw, when you figure all this stuff out, it could sure use some documentation or even just a blog post with some examples explained  :)
20:16 autarch heh
20:16 RabidGravy I've gone another one that does something rather odd with compose
20:17 autarch perlpilot: yeah, the fact that the extension mechanism is undocumented (or implicitly documented?) makes things a bit frustrating
20:18 RabidGravy autarch, here's one that dicks around with the compose of an attribute https://github.com/jonathanstowe/Object-Permission/blob/master/lib/Object/Permission.pm
20:18 skids One of the reasons might be not wanting to set everything in stone quite yet.
20:20 RabidGravy I think the meta model is documented to some extent, it's just not explicitly stated you can dick around with it weird ways
20:22 mst well, it's a metamodel, that's basically what it's *for*
20:22 RabidGravy yeah, I know that, you know that, other people need encouraging ;-)
20:23 llfourn joined #perl6
20:23 autarch no, other people need documentation
20:23 autarch at least I'm sufficiently encouraged, I just need to know how stuff works
20:23 mst RabidGravy: autarch's been a moose core hacker for years, largely in order to support the 'weird ways' he wanted to work for extensions he was writing
20:24 mst he's not scared, just having trouble getting started :)
20:24 RabidGravy to be honest I just look at the source, find which bits can be altered to influence what parts and try it out
20:24 autarch in fact, I wrote the first version of the thing that made Moose extensible in a not-just-a-toy way so that you could combine extensions
20:25 rickbike joined #perl6
20:26 integral joined #perl6
20:26 integral joined #perl6
20:26 autarch fortunately someone else came along and fixed a lot of the bugs ;)
20:26 lizmat ok, it's not my original CatHandle commit
20:27 RabidGravy but yeah, an "extending the metamodel doc" would be good
20:27 RabidGravy there's a lot of stuff that is not documented in anyway at all (except in some way in the design docs)
20:27 skids autarch: There is rakudo/docs/metamodel.pod in case you haven't noticed it, not that it is thorough.  Probably a good place to plop whatever you learn.
20:28 autarch skids: yeah, there's stuff in there not on the doc site that makes this make more sense
20:28 awwaiid flussence: OOHHHHHH!!!! the proto itself. So in rakudo:src/core/control.pm we define EVAL as a proto with a full body and {*} in there. when I do "use Inline::Python" I get an exported EVAL. When I then do "use Inline::Ruby" I get a _second_ exported EVAL, and Rakudo tries to merge. I guess it is at that point it wants the body of the CORE::EVAL proto sub to be only {*} ?
20:28 ggoebel7 joined #perl6
20:28 perlpilot RabidGravy: Look at https://github.com/jnthn/oo-actors/blob/master/lib/OO/Actors.pm#L48   How do you know what to put in there?  (I just try stuff until it doesn't break  :)
20:28 autarch the docs site has no mention of the $attr.compose method, for example, which is pretty key to extending attributes
20:28 mst lizmat: 4c1f815c0 or d083043 seem like the likeliest to me
20:29 mst lizmat: were I a betting man, I'd bet on the former
20:29 autarch I was getting really worried that this was a nearly RO metamodel, which would have been devastating
20:30 mst lizmat: 99% sure it wasn't like this when you merged my work in 79bffb9b
20:30 awwaiid flussence: I guess it's kinda funny that the first one works, since the first one doesn't get merged since the built-in EVAL is in like CORE:: or something
20:31 RabidGravy perlpilot I think that bit flows from what it's about to do, it's the piece at line 65 that needs documenting properly :)
20:31 lizmat it's not the one before 4c1f815c0793a5bc470
20:31 awwaiid it would be great to be able to inject my new multi sub EVAL entries into CORE::
20:31 autarch alright, I'm getting stuck on the fact that the $attr passed to my trait_mod:<is> sub is immutable. When the execution hits "$attr does IsLazy" I get "Cannot modify an immutable Any"
20:31 awwaiid though I guess that wouldn't be very lexical
20:32 RabidGravy autarch, you must have something funny in the signature of the trait sub
20:32 mst lizmat: I still think it's 'assinging @*ARGS after MAIN_HELPER ate all the options'
20:32 lizmat it's 4c1f815c0793a5bc470
20:32 autarch RabidGravy: multi sub trait_mod:<is> (Attribute:D $attr, :$lazy) is export {
20:32 mst lizmat: ha! my first guess WAS right
20:32 mst I am ... pleasantly surprised :D
20:33 autarch I tried adding "is rw" after $attr but then the signature is wrong and doesn't match the multi so my trait isn't seen at all
20:33 lizmat mst: testing a fix
20:33 RabidGravy no, it shouldn't need that
20:33 mst lizmat: I'm not sure reverting the change is right though, I kinda think the shims should likely be passing not-my-option-options through from a *%extra
20:33 lizmat I'm not sure now @*ARGS needs assigning
20:34 autarch oh wait, I think I know the problem
20:34 autarch yup, I'm dumb - I was setting $attr.builder but "has $.builder" wasn't declared as rw
20:34 addison joined #perl6
20:34 autarch FWIW it'd be really nice if it didn't have to be rw and I could set this when I write "$attr does IsLazy( builder => $builder )" or something like that
20:34 mst lizmat: the shims currently start with 'shift @*ARGV is $name;' etc.
20:35 mst argh @*ARGS
20:35 mst I guess leaving it completely alone is going to be better
20:35 lizmat mst: removing the assignment, seems to fix it... now spectesting
20:35 lizmat ack in 5 mins
20:35 lizmat *back
20:35 autarch that error message is definitely LTA
20:36 mst LTA?
20:36 awwaiid Less Than Awesome
20:36 RabidGravy autarch, you can parameterise the trait
20:36 autarch RabidGravy: yeah, that seems wrong though
20:36 RabidGravy role even
20:36 autarch mst: my new favorite acronym
20:37 awwaiid Maybe I need ot get rid of the proto sub EVAL to do what I want. I was hoping to not have to touch Rakudo :)
20:37 mst ah, "suboptimal" for hipsters :P
20:37 awwaiid mst: yeah
20:37 RabidGravy I've got something that basicall p[passes the values from the trait strait to the role as parameters
20:40 BenGoldberg joined #perl6
20:40 integral joined #perl6
20:41 dalek rakudo/nom: 2ae0dfa | lizmat++ | src/core/Main.pm:
20:41 dalek rakudo/nom: Don't eat named parameters, mst++
20:41 dalek rakudo/nom:
20:41 dalek rakudo/nom: This should enable --force on panda again
20:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2ae0dfaba6
20:42 lizmat mst: could you verify this fixes things ?
20:42 * mst kicks off 'build moar'
20:42 mst looks like it should, if I understand what's going on
20:42 autarch https://rt.perl.org/Ticket/Display.html?id=127110 is why I was getting so turned around
20:42 autarch or part of why, at least
20:43 mst yow. yeah, I can see that
20:44 mst though I guess the issue is that if the exception is because of -user- error, you want the 'has' declaration as the report line
20:45 autarch yeah, I can see why it might have ended up the way it did, but it's just so confusing
20:45 autarch if it had the variable name in there I might have made sense of it even with the wrong line #
20:45 mst I wonder if ideally you'd report -both- locations
20:45 mst it's not the 'wrong' line number, that's the thing
20:45 autarch that would work
20:45 RabidGravy autarch, yeah there's another really yuck one iif you refer an unknown type in a trait
20:45 skids A Failure might be able to do so.
20:45 mst if you changed which one, for many users of traits it would now be 'wrong'
20:45 mst which is why I think 'both'
20:46 autarch mst: maybe it just need a full call stack?
20:46 mst then we'd get into the whether to make that optional argument
20:46 mst I ... somebody else can go there, but I'm not going to
20:47 autarch I added a comment reflecting what we just discussed
20:47 lizmat autarch: you are aware of --ll-exception  ?
20:47 mst autarch: nice summary
20:48 integral joined #perl6
20:48 integral joined #perl6
20:48 awwaiid Do we want EVAL "...", :lang<Foo> to always try to load Inline::Foo?
20:48 autarch lizmat: I am now - but that wouldn't have helped here - I actually needed a stack trace through code I'd written, not through rakudo or moar
20:48 lizmat autarch: ah, ok
20:48 RabidGravy ah this one https://rt.perl.org/Ticket/Display.html?id=125662
20:48 lizmat "use trace" may also help
20:49 lizmat autarch: ^^^
20:49 awwaiid mmm. nevermind, that is probably too far for now.
20:49 mst lizmat: victory!
20:49 autarch lizmat: nope, doesn't help
20:50 autarch I assume there's some sort of special casing for errors during trait appiication interfering here
20:50 RabidGravy it's also when they happen that has a bearing
20:51 RabidGravy it's closer to parsing time than run time
20:52 mst lizmat: right, updated the tickets telling people they should be ok now
20:52 mst lizmat++
20:52 lizmat BTW, I think it is fixed properly now, isn't it ?
20:52 lizmat I mean, now that @*ARGS and $*ARGFILES are lazy, we should be fine
20:53 mst lizmat: the 'fixed properly' comment was on a different ticket where they were using --force as a workaround and you'd broken their workaround
20:53 Arrowhead joined #perl6
20:53 lizmat ah, ack, ok  :-)   *phew*  :-)
20:53 mst lizmat: by 'fixed properly' I mean fixing the actual bug that you broke their workaround for :D
20:53 lizmat gotcha
20:53 mst but they'd linked across to the ticket for -this- bug
20:54 ZoffixWin joined #perl6
20:54 ZoffixWin joined #perl6
20:54 mst so I figured I'd put the 'try this' on both
20:54 mst to make sure everybody was back up and running ASAP
20:54 lichtkind hugs lizmat
20:54 mst the other one is a panda bug/misfeature
20:57 itaipu joined #perl6
20:58 autarch how does pass by reference vs pass by value work in p6?
20:59 SwellJoe joined #perl6
20:59 lizmat autarch: everything is pass by reference in p6, really
21:00 lizmat or pass by object, if you will
21:00 TimToady but 'is rw' and 'is raw' mean you want a reference, and without those doing something destructive is erroneous
21:01 TimToady so the optimizer is allowed to optimize to copy in that case
21:02 integral joined #perl6
21:02 integral joined #perl6
21:02 TimToady likelier to beneficial for small things than larger things
21:03 TimToady as with many bits of Perl 6, the important thing is what you're promising you don't care about, not what the actual implementation does
21:03 RabidGravy :)
21:04 mst I do like 'is copy' for making a sub arg explicitly rw-inside
21:04 Arrowhead joined #perl6
21:07 sprocket joined #perl6
21:07 autarch on  scale of 1 to infinity, how wrong is it to wrap a class's BUILDALL as part of attribute composition?
21:07 mst yes
21:07 FROGGS joined #perl6
21:07 ZoffixWin mst++
21:09 RabidGravy on the Westbrook-Thompson scale it's about Keith Moon
21:09 lizmat autarch: couldn't you handle this with a BUILD method ?
21:09 autarch lizmat: well, the class that contains the lazy attribute might or might not already have a BUILD, right?
21:10 RabidGravy do the BUILD and nextsame
21:10 lizmat autarch: but if it has a BUILD, it wan't call the BUILDALL, or does it ?
21:10 lizmat confused now
21:11 autarch not as confused as I am ;)
21:11 * skids thought BUILDs were automatically called *by* BUILDALL.
21:11 * ZoffixWin is currently hacking their HNY bot using pico, from Windows via Putty connected to a Debian box XD
21:12 masak mst: I'm... rakudobugging it now. sorry for the delay.
21:13 masak mst: I'll get you the RT id ASAP
21:13 Rotwang joined #perl6
21:14 lizmat ah, yes... my confusion stems from many classes in core calling BUILD directly from new
21:14 lizmat although one could argue, they shouldn't be called BUILD then  :-)
21:14 mst masak: lizmat already fixed it
21:15 autarch I'm trying to figure out a couple things - 1. How can I tell if an attribute was explicitly set during object construction, including set an undefined value? ... 2. How can I intercept reading of "has $!foo" style attributes since they don't go through method dispatch?
21:15 mst masak: turns out I was right about which commit, amazingly
21:15 masak \o/
21:15 masak ok, then I'll stand down rakudobuggin
21:15 masak g
21:15 masak lizmat++
21:15 autarch it seems like #2 could be done by setting the object to a proxy which closes over the object and calls the builder the first time it's accessed, then replaces itself (the proxy) inside the object with the actual value so the proxy doesn't need to be called repeatedly
21:16 autarch which is, I guess, okay, but that brings me back to #1
21:16 dj_goku is there a way to split by NUL (0x00) for a string?
21:17 * dj_goku is kind of fuzzy from all the caffeine.
21:17 lizmat m: dd "a\0b\0c".split("\0")   # dj_goku
21:17 camelia rakudo-moar 2ae0df: OUTPUT«("a", "b", "c")␤»
21:18 skids autarch: RT#125437 (especially the IRC log linked there) might play in on #1.  There's some dust yet to settle around attribute initialization (also WRT roles).
21:18 RabidGravy though I'm thinking if you've got a null in actual data you probably wanted a Buf
21:18 dj_goku lizmat: ugh. so I did this: .split('\0') lol :(
21:19 dj_goku lizmat: thanks!
21:20 autarch I think the metamodel could probably use some stuff around attributes for hooking into the getting and setting of attributes (not of their accessors)
21:20 autarch that would make what I'm doing trivial
21:21 RabidGravy yeah, I'm with you on that
21:22 llfourn joined #perl6
21:23 perlpilot I can only think of hokey things right now
21:23 perlpilot involving has $.attr = SomeSentinel;  and BUILD for instance
21:23 autarch perlpilot: that's _exactly_ what I'm trying to implement right now ;)
21:23 autarch except I'm wrapping BUILDALL because I don't want to interfere with existing BUILD submethods
21:24 skids autarch: well, attributes are meant to be optimized to just offset lookups for most classes, so that mechanism would have to be dissolvable when not needed.
21:25 RabidGravy or DIY reprs could help
21:25 perlpilot yeah, but that's a whole other bag of worms I think
21:25 perlpilot (also sub-documented AFAIK)
21:27 zwu joined #perl6
21:28 * masak is a bit surprised to discover the Edument course toolchain being praised on p6u
21:28 masak I mean, that's flattering, of course... :)
21:28 zwu Hi, what is the :D in the parameter types Str:D, Str:D:, List:D, I saw a lot of them in the class Str, List etc.
21:28 masak ...but I've used it for years now and I'd like to replace it with something better (in Perl 6)
21:28 ZoffixWin Well... So far I mentioned 2 or 3 times in #freenode-newyears that my HNY bot is written in Perl 6 and no one started foaming from the mouth :) That's good news
21:28 perlpilot zwu: "defined"  i.e. not a type object
21:28 ZoffixWin zwu, "defined"
21:28 masak ZoffixWin: depends how you see it :) they should foam with anticipation!
21:29 zwu thanks.
21:29 ZoffixWin m: multi foo ($x:D) { say "defined!" }; multi foo ($x:U) { say "bruh, where's the arg?" }; foo 42; my $x; foo $x;
21:29 camelia rakudo-moar 2ae0df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dr_i1wFcXk␤Invalid typename 'D' in parameter declaration.␤at /tmp/dr_i1wFcXk:1␤------> 3multi foo ($x:D7⏏5) { say "defined!" }; multi foo ($x:U) {␤»
21:29 masak m: sub foo(Int:D $i) { say "yep" }; foo(42); foo(Int) # zwu: like this
21:29 camelia rakudo-moar 2ae0df: OUTPUT«yep␤Parameter '$i' requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub foo at /tmp/nYMif_ttBY line 1␤  in block <unit> at /tmp/nYMif_ttBY line 1␤␤»
21:29 perlpilot zwu:  See S12:1626
21:29 hobbs zwu: it's a very happy Str.
21:29 ZoffixWin m: multi foo (Int:D $x) { say "defined!" }; multi foo (Int:U $x) { say "bruh, where's the arg?" }; foo 42; my $x; foo $x;
21:29 camelia rakudo-moar 2ae0df: OUTPUT«defined!␤Cannot call foo(Any); none of these signatures match:␤    (Int:D $x)␤    (Int:U $x)␤  in block <unit> at /tmp/iH8acoaXYE line 1␤␤»
21:29 ZoffixWin oh, sod off
21:30 masak ZoffixWin: $x is not Int
21:30 ZoffixWin masak, the second time two people asked for the sauce
21:30 ZoffixWin masak, and I showed.
21:30 masak m: multi foo (Int:D $x) { say "defined!" }; multi foo (Int:U $x) { say "bruh, where's the arg?" }; foo 42; my Int $x; foo $x;
21:30 camelia rakudo-moar 2ae0df: OUTPUT«defined!␤bruh, where's the arg?␤»
21:30 ZoffixWin masak, but last year there were some "zomfg! people still use Perl ROFLCOPTER!" when I had a Perl 5 HNY bot
21:30 awwaiid what does the signature for binding to a C varargs external look like?
21:30 ZoffixWin masak, thanks. I'm too wasted to code methinks :P
21:31 masak you're welcome
21:31 perlpilot awwaiid: I dunno if NativeCall does varargs yet.
21:31 * lizmat started hitting the perlsecco, so will refrain from saying sensible things for the rest of the day
21:32 perlpilot lizmat: happy new year!  :)
21:32 perlpilot lizmat: give wendy a hug from #perl6 :)
21:32 lizmat perlpilot: will do!
21:32 Skarsnik I love type indirection: %fundtypes{%qualtypes{%pointertypes{$f.type-id}}}
21:33 FROGGS joined #perl6
21:33 Skarsnik NC as vararg code
21:33 Skarsnik but no idea if it work
21:33 Skarsnik maybe check at cygx C module
21:33 lizmat perlpilot: hug delivered...
21:33 * lizmat hugs #perl6! back
21:33 lizmat (as instructed by woolfy)
21:34 zwu In using regexes, I found the matched variables $0, $1 will be overwrote in multiple states, though the purpose I want is something like if $content ~~ /something/ {  $a = $0 ~~ /new test/ ?? result_a !! result_b; # now the $0, $1 are changed to the above states }
21:35 perlpilot zwu: If you care about the contents of $0, $1, etc. you want to stick them in your own lexicals.
21:36 perlpilot zwu: or ... perhaps you just need to restructure your code so that you aren't overwriting them by performing another pattern match
21:36 flussence or use something like if $content.match(/something/) -> $m { ... }
21:37 zwu I realized that and before entering another match, I use a variable my @m = $/.list to save them.
21:38 perlpilot flussence++ (I keep forgetting that we can do that now :)
21:38 * perlpilot still suffers from a little P5-think every now and then
21:39 Skarsnik if people interest in my wip on an attempt to extract/generate NC stuff from a C header : https://gist.github.com/Skarsnik/fd901dd8d26399fe4226
21:40 skids m: "aa" ~~ /(a)(a)/; $1.say; my $f := $/; $0 ~~ /(a)/; $1.say; $/ := $f; $1.say; # should that work?
21:40 camelia rakudo-moar 2ae0df: OUTPUT«「a」␤Nil␤Nil␤»
21:41 ZoffixWin skids, probably not. The $/ bound to $f gets reset on the second regex, which is why it's a Nil on the second capture
21:42 RabidGravy lizmat, I've been refraining saying sensible things for the rest of the year since februray
21:42 lizmat RabidGravy: that doesn't make sense, so it does
21:42 nexysno_ joined #perl6
21:43 skids ZoffixWin: doh.  Right you are.
21:43 perlpilot m:  "aa" ~~ /(a)(a)/; $1.say; my $f = $/; $0 ~~ /(a)/; $1.say; $/  = $f; $1.say;  # works with no binding though  :)
21:43 camelia rakudo-moar 2ae0df: OUTPUT«「a」␤Nil␤「a」␤»
21:45 perlpilot Skarsnik: do you use a C parser, or a custom parser that only cares about certain things?
21:45 Skarsnik I use gccxml x)
21:46 Skarsnik all my attemps at using tool that use clang.. fail
21:46 skids ZoffixWin is obviously still not too far over the Balmer Curve
21:46 ZoffixWin :P
21:48 RabidGravy I abandoned tring to use C::Parser again yesterday
21:48 Skarsnik Yes
21:48 Skarsnik I look at it: "No precomp" -> nop
21:48 perlpilot Well ... whatever works I guess.  Skarsnik++
21:48 Skarsnik I need to take a break to rethink how I gather type
21:49 zwu @flussence,  thanks, that is much clear, will use yours if $content.match(/something/) -> $m { ... }
21:49 RabidGravy I sent some PR to fix it but it just couldn't handle what I threw at it
21:50 perlpilot zwu: I would probably use 'with' rather than 'if' there (but I don't know the full code, so ... maybe)
21:51 nexysno_ joined #perl6
21:51 Skarsnik there is 5 ways for type x)
21:52 zwu please put an example using with
21:52 raiph joined #perl6
21:53 perlpilot zwu: just s/if/with/ in your code.  It checks for definedness rather than truthness (which I don't think matters in this case)
21:53 perlpilot except that it reads better :)
21:53 RabidGravy I always forget with
21:54 zwu I think it reads better too
21:54 zwu like the with
21:55 perlpilot "without" is the one that really gets forgotten I bet
21:56 masak we got with/without as an analogue for if statements -- but what about while/until loops? :) same question with repeat while/until.
21:57 lizmat $sigil = '\\' without '@$%&'.index($sigil);   # from core
21:57 lizmat I guess that would be better with .contains, actually
21:57 lizmat $sigil = '\\' unless '@$%&'.contains($sigil);
21:59 Rheum101 joined #perl6
21:59 lizmat also with/without topicalizes
21:59 lizmat .return with $value  # return value if defined
22:00 perlpilot masak: whiled/untild  :>
22:00 Arrowhead joined #perl6
22:02 yqt joined #perl6
22:02 zwu is there a sub or method for string for is_digits as it is in python, since it is used lot of times?
22:03 lizmat m: say try { "abc".Numeric }
22:03 camelia rakudo-moar 2ae0df: OUTPUT«Nil␤»
22:03 lizmat m: say try { "42".Numeric }
22:03 camelia rakudo-moar 2ae0df: OUTPUT«42␤»
22:03 Skarsnik checking for a failure does not feel right x)
22:04 masak m: say try { "Inf".Numeric }
22:04 camelia rakudo-moar 2ae0df: OUTPUT«Inf␤»
22:04 masak Skarsnik: was about to say
22:04 lizmat m: say "Numeric" with try { "abc".Numeric }
22:04 camelia rakudo-moar 2ae0df: ( no output )
22:04 lizmat m: say "Numeric" with try { "42".Numeric }
22:04 camelia rakudo-moar 2ae0df: OUTPUT«Numeric␤»
22:04 masak zwu: I think the ideal would be to try to parse it against some appropriate rule in the Perl 6 grammar. but that grammar is not exposed in userland yet :/
22:05 masak (in Rakudo)
22:05 Skarsnik m: Str.^find_method(/num/);
22:05 camelia rakudo-moar 2ae0df: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that)  in any find_method at gen/moar/m-Metamodel.nqp line 1076␤Regex object coerced to string (please use .gist or .perl to do that)  in any find_method at gen/moar/m-Metamodel.nqp line 108…»
22:05 zwu I wrote a code about string to int, $str_or_int = $s ~~ /^ \d+ $$/ ?? @s.Int !! $s
22:05 Skarsnik m: say Str.^find_method("*num*");
22:05 camelia rakudo-moar 2ae0df: OUTPUT«(Mu)␤»
22:05 Skarsnik m: say Str.^find_method("*Num*");
22:05 camelia rakudo-moar 2ae0df: OUTPUT«(Mu)␤»
22:05 Skarsnik m: say Str.^find_method("Num");
22:05 camelia rakudo-moar 2ae0df: OUTPUT«Num␤»
22:06 Skarsnik find_method does not take a regex?
22:06 Skarsnik m: say Str.^find_method(<*Num*>);
22:06 camelia rakudo-moar 2ae0df: OUTPUT«(Mu)␤»
22:06 Skarsnik m: say Str.^find_method(<.*Num.*>);
22:06 camelia rakudo-moar 2ae0df: OUTPUT«(Mu)␤»
22:07 zwu the purpose is to get Int object from string if it can be converted, so that I can compare them by number in stead of by string.
22:08 Skarsnik m: say "123".^can('Int');
22:08 camelia rakudo-moar 2ae0df: OUTPUT«(Int Int)␤»
22:08 Skarsnik m: say "123s".^can('Int');
22:08 camelia rakudo-moar 2ae0df: OUTPUT«(Int Int)␤»
22:10 zwu ^can('Int') is what I want, thanks.
22:10 ZoffixWin m: say "blarg".^can('Int');
22:10 camelia rakudo-moar 2ae0df: OUTPUT«(Int Int)␤»
22:10 ZoffixWin zwu, ^ are you sure?
22:11 Skarsnik not really
22:11 zwu sorry, not sure,
22:11 gfldex m: my (Int $i1, Int $i2); try { $i1 = "123".Int; $i2 = "abc".Int  }; dd $i1, $i2
22:11 camelia rakudo-moar 2ae0df: OUTPUT«Int $i1 = 123␤Int $i2 = Int␤»
22:11 ZoffixWin m: say try "42".Int or say "not isdigits"
22:11 camelia rakudo-moar 2ae0df: OUTPUT«42␤»
22:11 RabidGravy zwu, a more idiomatic approach might be to just try and convert it with a try
22:11 zwu tried say "123".^can("Int") returns (Int, Int)
22:11 ZoffixWin m: say try "42ss".Int or say "not isdigits"
22:11 camelia rakudo-moar 2ae0df: OUTPUT«Nil␤»
22:12 ZoffixWin zwu, ^
22:12 Skarsnik having to use try is dumb
22:12 ZoffixWin m: say "42ss" ~~ /^\d+$/
22:12 camelia rakudo-moar 2ae0df: OUTPUT«Nil␤»
22:12 Skarsnik there should be something else x)
22:12 ZoffixWin zwu, ^ another way
22:12 gfldex m: my $i1 = "abc".?Int; my $i2 = "123".?Int; dd $i1, $i2;
22:12 camelia rakudo-moar 2ae0df: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5abc' (indicated by ⏏)␤  in block <unit> at /tmp/Fy13Q2AP8F line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Fy13Q2AP8F line 1␤␤»
22:13 gfldex m: sub f (Int(Str) $i) { say $i }; f('123'); f('abc');
22:13 camelia rakudo-moar 2ae0df: OUTPUT«123␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5abc' (indicated by ⏏)␤  in sub f at /tmp/2RLolZge47 line 1␤  in block <unit> at /tmp/2RLolZge47 line 1␤␤Actually thrown at:␤  in sub f at /tmp…»
22:13 Skarsnik typedef does not sound like fun x)
22:14 gfldex m: multi f (Int(Str) $i) { say $i }; multi f (Str $s) { say $s }; f('123'); f('abc');
22:14 camelia rakudo-moar 2ae0df: OUTPUT«Ambiguous call to 'f'; these signatures all match:␤:(Str $i)␤:(Str $s)␤  in block <unit> at /tmp/AQvnTqx2a9 line 1␤␤»
22:14 RabidGravy m: if try "abc".Int { say "int" } else { say "other" }
22:14 camelia rakudo-moar 2ae0df: OUTPUT«other␤»
22:15 perlpilot good night everyone!  Happy New Year!
22:15 * perlpilot *poof*
22:15 RabidGravy or a multi
22:15 gfldex converting Str to Int is dangerous so handling exception sounds right. It may be slow tho.
22:16 masak "only use exceptions for exceptional circumstances"
22:16 masak this is not a try-it-and-fail kind of situation. it's an "is this valid?" situation
22:16 Rheum101 m: say "hi"
22:16 camelia rakudo-moar 2ae0df: OUTPUT«hi␤»
22:17 gfldex so a multi with where * ~~ /^\d+$/
22:17 masak gfldex: or define it as a subtype.
22:17 gfldex frankly, if you end up with a number in a Str you likely did something wrong in the first place
22:17 Skarsnik still there should be something more direct than a regex x)
22:17 RabidGravy it's a "try it and if that doesn't work out try something else" situation
22:18 Skarsnik gfldex, DBIish 'old' method only give you Str
22:18 zwu this is the piece of code $str_or_int = $s ~~ /^ \d+ $$/ ?? @s.Int !! $s, but want to have a better way than the regex
22:18 Skarsnik and I have a webservice that give me id has string (because they are big)
22:19 gfldex Skarsnik: your input validation should also do the convertion in that case
22:19 Skarsnik @s.Int is a typo? x)
22:20 zwu it's a type, should be $str_or_int = $s ~~ /^ \d+ $$/ ?? $s.Int !! $s
22:20 Skarsnik gfldex, and then how to have a direct way to check if the Str is a number aside using a dumb regex? x)
22:20 sprocket joined #perl6
22:21 Skarsnik m: my $a = +"1abc"; say $a;
22:21 camelia rakudo-moar 2ae0df: OUTPUT«Cannot convert string to number: trailing characters after number in '1⏏5abc' (indicated by ⏏)␤  in block <unit> at /tmp/dU9kzi8qjY line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/dU9kzi8qjY line 1␤␤»
22:21 AlexDaniel TimToady: I thought that I will report it tomorrow if nobody fixes it
22:22 AlexDaniel but yeah, sometimes bug mentions are just forgotten. That's pretty sad
22:22 gfldex zwu: i disagree, the type is Str and stays a type until you converted it _taking_unicode_into_account_
22:23 gfldex s/a type/that type/
22:23 dalek rakudo-star-daily: b64da31 | coke++ | log/ (9 files):
22:23 dalek rakudo-star-daily: today (automated commit)
22:23 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/b64da31c8e
22:23 RabidGravy I think some people think that the magic bug fairies fix stuff if the mention here
22:23 Skarsnik hm, what about IntStr ?
22:23 llfourn joined #perl6
22:23 AlexDaniel RabidGravy: well, that's what happened today :)
22:24 gfldex we may call them arabic numbers, the arabs disagree, call them hindu numbers and write them differently
22:24 BenGoldberg joined #perl6
22:24 zwu A union of Int and Str to IntStr something is over skill
22:25 Skarsnik It's a Perl 6 type, but I don't remeber it use x)
22:25 gfldex m: say "۱۲۳۴۵۶۷۸۹".Int;
22:25 camelia rakudo-moar 2ae0df: OUTPUT«123456789␤»
22:25 gfldex TimToady++
22:25 ZoffixWin m: "42".WHAT.say
22:25 camelia rakudo-moar 2ae0df: OUTPUT«(Str)␤»
22:25 zwu Support I have a version class represent the major.minor.micro, most of time they are in the number, but sometime there may be words instead of the number,
22:25 ZoffixWin m: "42s".WHAT.say
22:25 camelia rakudo-moar 2ae0df: OUTPUT«(Str)␤»
22:25 ZoffixWin Hm
22:25 zwu but when they are in number, I want to sort them correctly by the number.
22:26 Skarsnik There is a Version class x)
22:26 gfldex zwu: don't do that. Instead let me find the link for you
22:26 RabidGravy m: my $a = IntStr.new(10, "foo");   say +$a; say ~$a;
22:26 camelia rakudo-moar 2ae0df: OUTPUT«10␤foo␤»
22:26 AlexDaniel m: say [*] 1000 .. 0
22:26 camelia rakudo-moar 2ae0df: OUTPUT«1␤»
22:26 Skarsnik m: say v1.2.alpha
22:26 camelia rakudo-moar 2ae0df: OUTPUT«v1.2.alpha␤»
22:26 AlexDaniel TimToady: ↑ 1? Why 1?
22:26 gfldex zwu: see http://rosettacode.org/wiki/Natural_sorting#Perl_6
22:26 zwu the version string most time likes 4.1.2, but sometime 4.1.d
22:27 flussence m: say 10 .. 0
22:27 camelia rakudo-moar 2ae0df: OUTPUT«10..0␤»