Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-22

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:14 MadcapJake What does this mean: Failed to find '/home/jrusso/github/p6-myhtml/lib/.precomp/E209A​C19296648C23F32E1304703960AEA5185DD.1458962489.13​42/26/26D86617AD0FBBC7DA429739A89F6D15AFBB9B34' while trying to do '.modified'
00:18 * ZoffixWin has no idea
00:18 ZoffixWin What code generates that error?
00:21 MadcapJake perl6 -c on my module files
00:22 MadcapJake or using my module inside a REPL
00:28 ZoffixWin That's not code :D
00:28 * ZoffixWin may be too drunk to be helpful tho.
00:29 ZoffixWin I'm just curious in what context .modified is called in....
00:31 kerframil joined #perl6
00:37 grassass joined #perl6
00:52 kurahaupo joined #perl6
00:56 ZoffixWin Oh damn. Bitching on the Internet actually is productive sometimes: https://twitter.com/arlendot​io/status/723310959255785472
00:57 ZoffixWin Wonder what I can do with a 20-core/98304MB-RAM box for a few hours...
01:15 ugexe my guess is .modified is used to get the file modification time to decide if a precomp can be invalidated
01:24 adu joined #perl6
01:25 ugexe MadcapJake: RAKUDO_MODULE_DEBUG=1 should at least show you which module getting precomp'd causes that
01:27 molaf joined #perl6
01:28 BenGoldberg joined #perl6
01:29 uruwi joined #perl6
01:52 johndau joined #perl6
01:58 vendethiel joined #perl6
02:14 Herby_ joined #perl6
02:14 Herby_ o/
02:14 ZoffixWin \o
02:17 MadcapJake ugexe: thanks, I did figure out which file through that debug var and it looks like it was failing when trying to load the precomp'd file.  So I deleted the .precomp dir and it works fine now.  strange!
02:32 noganex_ joined #perl6
02:43 xiaomiao joined #perl6
02:48 johndau joined #perl6
02:54 tomboy64 joined #perl6
02:59 astj joined #perl6
03:04 El_Che joined #perl6
03:12 jeek joined #perl6
03:12 jeek joined #perl6
03:13 jeek joined #perl6
03:15 jeek joined #perl6
03:15 aries_liuxueyang joined #perl6
03:15 jeek joined #perl6
03:17 jeek joined #perl6
03:23 sue_ joined #perl6
03:23 mattp_ joined #perl6
03:31 mtj_ joined #perl6
03:35 au joined #perl6
03:35 sunnavy_ joined #perl6
03:35 petercommand joined #perl6
03:37 orcudy joined #perl6
03:38 orcudy Why does this re match "/home//"?  RE: m/^\/home\/[^\\]/
03:39 orcudy I want it to match anything but '\' at the end.
03:40 kaare_ joined #perl6
03:42 johndau joined #perl6
03:43 agentzh joined #perl6
03:45 perlawhirl joined #perl6
03:45 kerframil why wouldn't it? the final character of the string you are testing is '/', not '\'
03:46 perlawhirl orcudy: character classes now use a different syntax: <-[ ... ]>
03:46 perlawhirl m: 「/home//」 ~~ /^\/home\/<-[^\\]>/
03:46 camelia rakudo-moar 463e75: ( no output )
03:46 perlawhirl m: say  「/home//」 ~~ /^\/home\/<-[^\\]>/
03:46 camelia rakudo-moar 463e75: OUTPUT«「/home//」␤»
03:46 perlawhirl <[ ... ]> is a normal char class & <-[ ... ]> is a negated char class
03:47 perlawhirl oops... that ^ is not even needed in there anymore
03:47 perlawhirl m: say  「/home//」 ~~ /^\/home\/<-[\\]>/
03:47 camelia rakudo-moar 463e75: OUTPUT«「/home//」␤»
03:47 perlawhirl or if you don't like to backspace your backspaces... you can quote them instead
03:47 perlawhirl m: say  「/home//」 ~~ /^\/home\/<-['\']>/
03:47 camelia rakudo-moar 463e75: OUTPUT«「/home//」␤»
03:48 ZoffixWin m: say  「/home//」 ~~ m{^ '/home/' <-[\\]>}
03:48 camelia rakudo-moar 463e75: OUTPUT«「/home//」␤»
03:49 ZoffixWin orcudy, it matches because '/' fits the "anything but '\' at the end" you said you wished to match
03:49 johndau joined #perl6
03:50 * perlawhirl thinks he meant "doesn't"
03:50 orcudy kerframil: damnit...you are right. I want '/' not '\'. Thanks for the look
03:50 perlawhirl ah
03:50 ZoffixWin \o/
03:51 dalek doc: d004984 | (Tom Browder)++ | doc/Language/testing.pod:
03:51 dalek doc: add note about Test being a core module; add example of a user-entered tolerance for numeric testing
03:51 dalek doc: review: https://github.com/perl6/doc/commit/d004984272
03:51 dalek doc: dad4e1d | (Tom Browder)++ | doc/Language/testing.pod:
03:51 dalek doc: correct module terminology; correct 'is-approx' second arg name
03:51 dalek doc: review: https://github.com/perl6/doc/commit/dad4e1daa7
03:51 dalek doc: 4304b00 | (Tom Browder)++ | doc/Language/traps.pod:
03:51 dalek doc: correct spelling
03:51 dalek doc: review: https://github.com/perl6/doc/commit/4304b00f28
03:51 dalek doc: 9c98089 | (Tom Browder)++ | / (18 files):
03:51 dalek doc: Merge remote-tracking branch 'upstream/master'
03:51 dalek doc: review: https://github.com/perl6/doc/commit/9c98089abd
03:51 dalek doc: 6a9a553 | (Tom Browder)++ | doc/Language/testing.pod:
03:51 dalek doc: try to improve second form of the is-approx test; correct spelling
03:51 dalek doc: review: https://github.com/perl6/doc/commit/6a9a553ae4
03:51 dalek doc: f0bdcca | (Tom Browder)++ | doc/Language/testing.pod:
03:51 dalek doc: add missing word
03:51 dalek doc: review: https://github.com/perl6/doc/commit/f0bdcca0d0
03:51 dalek doc: 3c3dbc4 | (Tom Browder)++ | doc/Language/t (2 files):
03:51 dalek doc: Merge pull request #452 from tbrowder/master
03:51 dalek doc:
03:51 dalek doc: add example of a user-entered tolerance; emphasize Test is a core module
03:51 dalek doc: review: https://github.com/perl6/doc/commit/3c3dbc403b
03:51 ZoffixWin weeeee
03:51 agentzh joined #perl6
03:52 azawawi joined #perl6
03:52 azawawi hi
03:52 azawawi .seen RabidGravy
03:52 yoleaux I saw RabidGravy 21 Apr 2016 21:46Z in #perl6: <RabidGravy> I considered making it a module but wasn't motivated sufficiently
03:52 azawawi .tell RabidGravy Please take a look at https://github.com/jonathan​stowe/JSON-Marshal/issues/3
03:52 yoleaux azawawi: I'll pass your message to RabidGravy.
03:53 nige1 joined #perl6
03:54 MadcapJake what am I supposed to do with this error: Native call expected return type with CPointer representation, but got a CStruct
03:54 MadcapJake I want it to return a CStruct, I gave it a CStruct repr class as a returns type
04:02 azawawi MadcapJake: hi. Please share code?
04:06 MadcapJake sub myhtml_create() returns MyHTML is native('myhtml') is export { * }
04:06 MadcapJake the MyHTML type is a repr<CStruct>
04:07 azawawi github?
04:08 BenGoldberg If you don't declare any members of MyHTML, then, as a workaround, you can probably just change the repr of MyHTML to CPointer.
04:08 azawawi https://github.com/MadcapJake/p6-MyHTML?
04:09 MadcapJake BenGoldberg: well I do (not sure if really needed to or not though
04:09 MadcapJake azawawi: yep that's it
04:09 Cabanossi joined #perl6
04:11 MadcapJake the nativecall subs are in Raw.pm6
04:11 cpage_ joined #perl6
04:11 cpage_ joined #perl6
04:13 BenGoldberg In Raw.pm6, I see: sub myhtml_create() returns Pointer is native('myhtml') is export { * }
04:13 BenGoldberg Change 'Pointer' there to MyHTML, and you're golden ;)
04:15 azawawi MadcapJake: installing myhtml :)
04:15 MadcapJake check again, I'm getting this error with it as MyHTML
04:16 MadcapJake (I just quickly pushed my commits as you two were checking it out xD
04:16 azawawi MadcapJake: does it have a deb package?
04:16 MadcapJake azawawi: I don't believe so, it's quite new.  Was no trouble to build on ubuntu for me though
04:16 BenGoldberg I'm not even checking it out, just looking at the source through the web.
04:17 MadcapJake BenGoldberg: right, I mean that if you look at GH, it will show MyHTML there now :)
04:17 BenGoldberg Yup, indeed it (now) does.  After I pressed control-R, of course ;)
04:17 zacts joined #perl6
04:18 MadcapJake heh, strange though, why does it need a CPointer? I don't really follow the meaning of the error
04:18 MadcapJake oh I think I figured it out
04:19 MadcapJake nope! lol
04:28 azawawi MadcapJake: im still there... working on it :)
04:37 MadcapJake thanks! I think it's L13 in Tree.pm6
04:38 azawawi got it :)
04:39 azawawi switch to returns Pointer[MyHTML]
04:39 azawawi and change it also in init to Pointer[MyHTML]
04:39 azawawi myhtml_t* => Pointer[MyHTML]
04:40 azawawi myhtml_t => MyHTML
04:41 azawawi MadcapJake: does it work for you now?
04:43 MadcapJake I thought CStruct was already a Pointer to a struct
04:44 azawawi http://doc.perl6.org/language/nativecall#Structs
04:47 MadcapJake hm not really clear on that but if it works it works!
04:47 MadcapJake thanks azawawi!
04:48 azawawi hehe
04:48 azawawi that's my moto
04:48 [Coke] so, if folks have trouble donating, yes, let's find someone who can help fix the issues so we can get more people donating.
04:49 [Coke] https://donate.perlfoundation.org/donate.html seems to have a big paypal button
04:49 azawawi MadcapJake: mind you... myhtml_t seems not a struct btw
04:50 ufobat joined #perl6
04:51 ufobat good moring
04:51 [Coke] there is also https://secure.donor.com/pf012/give (why one isn't referenced on the other, can't say)
04:53 azawawi MadcapJake: nope... it is a struct
04:53 azawawi ufobat: good morning :)
04:53 MadcapJake yeah it is
04:53 MadcapJake but actually the Pointer trick isn't working
04:54 azawawi MadcapJake: think of it, do you need the information inside the struct?
04:54 MadcapJake and now (for some reason) my Raw interface isn't working either! 😭
04:54 astj joined #perl6
04:54 MadcapJake no i don't actually
04:54 azawawi MadcapJake: then give it Pointer :)
04:55 azawawi MadcapJake: think of it as 'this' or 'self'
04:55 azawawi MadcapJake: since they do not have object state, they use pointers/structs
04:56 azawawi MadcapJake: if in doubt, use https://github.com/Skarsnik/gptrixie :)
04:56 jeek joined #perl6
04:57 azawawi morning nap mode in 5 seconds :)
04:57 * azawawi cya
04:58 MadcapJake so many different voices on how to do nativecall :P
04:59 MadcapJake but it turns out I really didn't need all these CStruct reprs
05:01 MadcapJake .tell azawawi thanks for the help! MyHTML's api was designed to be just a  bunch of functions so it really does work well with just CPointers.  I think I made the switch to structs incorrectly to try and solve a bug.
05:01 yoleaux MadcapJake: I'll pass your message to azawawi.
05:11 _notbenh joined #perl6
05:13 cpage_ joined #perl6
05:16 john51 joined #perl6
05:16 zhmylove_ joined #perl6
05:38 jjido joined #perl6
05:39 CIAvash joined #perl6
05:45 johndau joined #perl6
05:47 johndau joined #perl6
05:50 johndau joined #perl6
05:51 johndau joined #perl6
05:55 _mg_ joined #perl6
05:57 xinming_ joined #perl6
06:00 MadcapJake AT-POS isn't working for some reason
06:00 MadcapJake anyone got any ideas :P
06:01 psch m: class A { method AT-POS($pos) { "foo" } }; say A.new[1]
06:01 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:01 psch looks worky from here..? :)
06:01 MadcapJake lol
06:02 MadcapJake I have @collection[0] and I've implemented AT-POS inside the class, but for some reason it's returning the @collection and just skips the subscript completely
06:02 MadcapJake I have a simple say inside the method and it's never called
06:03 xinming joined #perl6
06:03 psch i don't have any context, but if @collections contains objects with an overwritten AT-POS, you have to index twice
06:03 psch m: class A { method AT-POS($pos) { "foo" } }; say A.new[1]
06:03 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:03 psch m: class A { method AT-POS($pos) { "foo" } }; my @a = A.new; say @a[0][1]
06:03 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:04 MadcapJake ohhhh I wanted it to store directly in @collection, I could use := then right?
06:04 psch m: class A { method AT-POS($pos) { "foo" } }; my @a := A.new; say @a[0][1]
06:04 camelia rakudo-moar 463e75: OUTPUT«Type check failed in binding; expected Positional but got A (A.new)␤  in block <unit> at /tmp/_wJB42lm7k line 1␤␤»
06:04 psch MadcapJake: maybe you just want to use $ or sigilless :)
06:04 MadcapJake that would work you just need the Positional role
06:05 vendethiel joined #perl6
06:05 MadcapJake m: class A does Positional { method AT-POS($pos) { "foo" } }; my @a := A.new; say @a[0]
06:05 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:05 psch well, if the interface works out reasonable
06:05 MadcapJake psch: thanks so much!
06:06 MadcapJake I want users to be able to do the regular stuff they expect when using this module (I wish that it didn't require := but it's better than $ or sigilless IMO )
06:07 psch i think you're setting yourself up for a FAQ there
06:07 psch i mean, afaiu your modules interface requires some return value to be bound instead of assigned
06:08 psch that's a FAQ right there :)
06:09 agentzh joined #perl6
06:09 agentzh joined #perl6
06:09 MadcapJake yeah I was just thinking that but it's a list of values so I'll need a FAQ either way: "you gotta assign to scalar or sigilless" or "you gotta bind to array rather than assign"
06:10 psch that's the perils with overloading core ops i think
06:10 mtj_ joined #perl6
06:10 au joined #perl6
06:11 MadcapJake yeah and the perils of wrapping C libraries :)
06:11 psch heh, maybe that too, yeah :)
06:11 sunnavy_ joined #perl6
06:11 MadcapJake Now I'm getting a strange error: I have a module HTML::MyHTML::Node, I've use'd it inside another module and I am getting: "Could not find symbol '&Node'" for some reason
06:12 sortiz m: class A does Positional { method AT-POS($pos) { "foo" } }; my @a is A; say @a[0];  # Other form, without bind.
06:12 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:13 psch sortiz++
06:13 MadcapJake sortiz: but how would you handle instantiation with `is`?
06:13 psch that could give a neat SYNOPSIS
06:14 psch oh, but inheritance of an instance, yeah
06:14 khagan joined #perl6
06:14 psch m: class A does Positional { method AT-POS($pos) { "foo" } }; my @a is A.new; say @a[0];
06:14 camelia rakudo-moar 463e75: OUTPUT«foo␤»
06:14 psch well, works vOv
06:14 MadcapJake haha that's slick
06:15 sortiz m: class A does Positional {submethod BUILD { say "hi"} ; method AT-POS($pos) { "foo" } }; my @a is A; say @a[1];
06:15 camelia rakudo-moar 463e75: OUTPUT«hi␤foo␤»
06:15 psch sortiz: right, but new might need args
06:15 psch or BUILD for that matter, in MadcapJakes case probably anyway
06:15 sortiz So, new is valid.
06:16 MadcapJake thinking on this and actually `is` won't work because the user doesn't actually need to import the class, it's all done via the method of the user-facing class (actually method of an attribute of the user-facing class :)
06:19 petercommand joined #perl6
06:19 azawawi joined #perl6
06:19 azawawi .
06:19 yoleaux 05:01Z <MadcapJake> azawawi: thanks for the help! MyHTML's api was designed to be just a  bunch of functions so it really does work well with just CPointers.  I think I made the switch to structs incorrectly to try and solve a bug.
06:19 azawawi MadcapJake: thx :)
06:21 MadcapJake azawawi: no, thank *you*! :)
06:21 MadcapJake I gotta get some sleep though, see ya!
06:21 * MadcapJake heads to bed
06:21 azawawi im back from my morning nap :)
06:21 azawawi perl6 is truly 24/7 :)
06:22 * sortiz heads to bed too.
06:22 * azawawi is tidying http://perl6.org/whatever/
06:24 johndau joined #perl6
06:26 jjido joined #perl6
06:26 johndau joined #perl6
06:30 firstdayonthejob joined #perl6
06:39 ugexe joined #perl6
06:47 leont_ joined #perl6
06:51 rurban joined #perl6
06:51 dolmen joined #perl6
06:52 domidumont joined #perl6
06:52 khagan joined #perl6
06:57 moritz jnthn++ # blog
06:57 domidumont joined #perl6
07:01 johndau joined #perl6
07:12 bitmap joined #perl6
07:13 khagan joined #perl6
07:13 brrt joined #perl6
07:18 masak "All complex software systems evolve from simple systems."
07:18 masak ...I agree, but [citation needed] :P
07:20 cpage_ joined #perl6
07:21 wamba joined #perl6
07:24 masak (morning, #perl6)
07:24 masak Perl 6 day today! \o/
07:24 ufobat what is wrong with the signature of my first f - multi sub f($scalar){say "scalar" }; multi sub f(Int :$a, :$c){say "c"}; multi sub f(Int :$a, Str :$t, *@p){say "t"}; f( t => "a", "bar");
07:24 ufobat morning masak
07:25 ufobat i assumed the 3rd f would be used, but is is the first one. i wanted to have a f with a single argument
07:25 johndau joined #perl6
07:25 masak ufobat: you don't have any positionals in the latter two...?
07:26 ufobat huh? i do?
07:26 masak m: multi f($x) { say $x }; multi f(*@a) { say @a.elems }; f "OH HAI"
07:26 camelia rakudo-moar 463e75: OUTPUT«OH HAI␤»
07:26 masak rock beats scissors; actual positionals beat slurpy
07:27 masak (I simplified your example to make this more clear)
07:27 ufobat but i invoke f with t=>"a", something
07:28 ufobat so its a positional and something slurpy
07:28 masak your reply is so confusing to me that I need to ask if you are familiar with the terminology...
07:28 masak t => "a" is not a positional, it's a named
07:29 ufobat aye! sorry, i am probably still asleep :(
07:29 ugexe joined #perl6
07:29 ufobat i mean
07:29 masak your latter two multis contain only nameds and nameds+slurpy, respectively
07:29 ufobat i invoked f with a named t=> 'a', and then something slurpy
07:29 masak my original point (positionals beat slurpy) still stands
07:29 masak how do you mean "invoked... with something slurpy"?
07:29 masak what does that mean to you?
07:30 ufobat like in f(Str :$t, *@foo)
07:30 masak m: sub f(*@things) { say @things.perl }; my @stuff = 1, 2, 3; f(|@stuff)
07:30 camelia rakudo-moar 463e75: OUTPUT«[1, 2, 3]␤»
07:30 masak ufobat: that's how you do it
07:30 masak not with * on the caller side
07:31 ufobat i assumed when i invoke f(t => 'something', ....) it should match this signature
07:31 masak third thing: nameds are optional by default
07:31 masak so you *probably* want :$a! and similar
07:32 masak otherwise, they might more often than you expect
07:32 masak might match*
07:33 RabidGravy joined #perl6
07:33 ufobat okay! so a multi sub f(Str :$t!, *@p){};  multi sub($something){}; f(t => 'bar', 'anything'); ?
07:35 masak aye
07:35 masak and I'd recommend putting the nameds last in the call, unless you have a really good reason to break that convention
07:39 ufobat my first example still doesn't work
07:39 ufobat m: multi sub f($scalar) {say "scalar" };multi sub f(Int :$a, :$c!){say "c"};multi sub f(Int :$a, Str :$t!, *@p){say "t"};f(t => "a", "bar");
07:39 camelia rakudo-moar 463e75: OUTPUT«Unexpected named parameter 't' passed␤  in sub f at /tmp/x0jHHYuD00 line 1␤  in block <unit> at /tmp/x0jHHYuD00 line 1␤␤»
07:44 Timbus_ lotta noise in your example. maybe shrink it down to:
07:44 Timbus_ m: multi f($s){say "scalar"}; multi f(Str :$t!, *@p){say "t"};  f(t => 1, 2);
07:44 camelia rakudo-moar 463e75: OUTPUT«Unexpected named parameter 't' passed␤  in sub f at /tmp/qLvIlhv3LR line 1␤  in block <unit> at /tmp/qLvIlhv3LR line 1␤␤»
07:45 zakharyas joined #perl6
07:47 masak ufobat: what Timbus++ said. when in doubt, make a smaller example that doesn't work.
07:48 masak ufobat: and as already said, in dispatch, positionals trump a slurpy
07:48 brrt joined #perl6
07:48 masak though it's not clear to me... why the required named doesn't make the dispatch prefer the second candidate there.
07:49 masak hm.
07:49 Timbus_ m: multi f($s){say "scalar"}; multi f(Str :$t!, *@p){say "t"};  f(t => 1, 2, 3);
07:49 camelia rakudo-moar 463e75: OUTPUT«Cannot call f(Int, Int, Int); none of these signatures match:␤    ($s)␤    (Str :$t!, *@p)␤  in block <unit> at /tmp/nCA_XU6i21 line 1␤␤»
07:49 Timbus_ oh
07:49 Timbus_ m: multi f($s){say "scalar"}; multi f(Str :$t!, *@p){say "t"};  f(t => '1', 2, 3);
07:49 camelia rakudo-moar 463e75: OUTPUT«t␤»
07:50 Timbus_ k
07:50 masak m: multi f($s){say "scalar"}; multi f(Str :$t!, *@p){say "t"};  f(t => '1', 2)
07:50 camelia rakudo-moar 463e75: OUTPUT«Unexpected named parameter 't' passed␤  in sub f at /tmp/saPF9AcYYY line 1␤  in block <unit> at /tmp/saPF9AcYYY line 1␤␤»
07:50 ufobat i had a typo in my simple example and i thought it worked, sorry
07:50 masak in this case, it *could* call the second one, but doesn't.
07:51 Timbus_ yeah, not very awesome
07:51 masak ufobat: this is why small examples are important ;)
07:51 grondilu joined #perl6
07:51 masak I think I'd need jnthn++'s second opinion to be able to declare it a rakudobug...
07:51 masak or someone else who feels good enough at multi dispatch
07:53 abraxxa joined #perl6
07:56 * ufobat is feeling ashamed for being confused a lot right now..
07:56 johndau joined #perl6
07:57 masak no need to feel ashamed :)
07:57 masak I'm confused, and proud of it! :P
08:03 araujo joined #perl6
08:04 ufobat :-) i made coffee for everyone to get less confused
08:04 Upasaka joined #perl6
08:05 masak cheers
08:06 * masak sips some tieguanyin
08:09 Relsak joined #perl6
08:14 sno joined #perl6
08:15 darutoko joined #perl6
08:18 masak jnthn++ indeed # https://6guts.wordpress.com/20​16/04/21/framing-the-problem/
08:18 masak jnthn: if I understand correctly, the track you're on makes escape analysis a tad more urgent to have soon?
08:23 abraxxa joined #perl6
08:27 masak 1286 new-and-open perl6-queue RT tickets. I think that's a record.
08:28 * masak .oO( or is it "new-or-open" ) ;)
08:28 ufobat one of the 1286 is mine ;)
08:32 abraxxa joined #perl6
08:39 g4 joined #perl6
08:44 johndau joined #perl6
08:46 perlawhirl joined #perl6
08:46 rindolf joined #perl6
08:54 mtj_ joined #perl6
08:55 lizmat joined #perl6
08:59 kurahaupo joined #perl6
09:12 agentzh joined #perl6
09:13 dolmen joined #perl6
09:15 Juerd joined #perl6
09:16 leont_ The spectest suite is an interesting testcase for my harness
09:19 sunnavy_ joined #perl6
09:19 mtj_ joined #perl6
09:19 au joined #perl6
09:19 petercommand joined #perl6
09:20 bioexpress joined #perl6
09:21 bioexpress Hello! Some perl6 routines have underscores in its name ans some have hyphens in its name. Are these (_ vs - ) arbitrary choices or is there a system behind?
09:21 Juerd joined #perl6
09:22 RabidGravy yes
09:22 yoleaux 03:52Z <azawawi> RabidGravy: Please take a look at https://github.com/jonathan​stowe/JSON-Marshal/issues/3
09:23 mimosinnet joined #perl6
09:25 Xliff MadcapJake, CStruct -> Pointer.... I guess if it works.
09:25 * Xliff wonders if that might solve his problems with libxqilla…
09:25 RabidGravy .tell azawawi it's "wont fix" the reasons it may break things include panda installing an old version of JSON::Fast, panda not understanding versioned depencies and "something screwed up with the resolution of modules"
09:25 yoleaux RabidGravy: I'll pass your message to azawawi.
09:26 abraxxa joined #perl6
09:26 RabidGravy .tell azawawi I tested everything with the version using JSON::Fast (having upgraded JSON::Fast) and all okay
09:26 yoleaux RabidGravy: I'll pass your message to azawawi.
09:30 RabidGravy bioexpress, specifically the underscore names are typically limited to the Meta classes and other internal thingies
09:30 RabidGravy so e.g.   Attribute.has_accessor
09:33 abraxxa1 joined #perl6
09:34 bioexpress RabidGravy thx!
09:42 abraxxa joined #perl6
10:02 dolmen joined #perl6
10:03 leont_ joined #perl6
10:06 bitmap joined #perl6
10:17 donaldh joined #perl6
10:28 jnthn masak: Well, it's interesting. :) For the immediate case, with frames, we'll actually be assuming no escape and re-writing the world if escape happens, rather than trying to do up-front analysis.
10:28 tomboy64 is this the right channel to ask questions about rakudo's build system?
10:28 moritz tomboy64: this or #p6dev
10:28 * tomboy64 shrugs well, let's try here
10:28 jnthn masak: But in a way I'm kinda paving some of the way for EA
10:29 jnthn masak: I've figured that we need to be able to un-EA too as part of deopt
10:29 jnthn masak: In a handwavy way (formalism welcome :P) in Moar, most optimizations you perform need to have a corresponding deoptimization.
10:29 jnthn masak: So it's kinda a lens I guess :)
10:30 tomboy64 i'm wondering about perl6's includes, comprising the same sha1 and tinymt that moarvm wants. just moarvm tries (heuristically determined) system ones before falling back to bundled whereas perl6 just tries hardcoded system paths
10:30 tomboy64 in particular, where are the sha1 and tinymt implementations supposed to come from?
10:31 ugexe joined #perl6
10:31 ocbtec joined #perl6
10:32 khagan joined #perl6
10:34 moritz tomboy64: see MoarVMs Configure.pl; it looks for sha1 in /usr/include/sha
10:34 moritz tomboy64: there seems to be no way to use a system tinymt installation
10:35 tomboy64 moritz: i mean from which package. I am currently rebuilding the gentoo package of rakudo and locate sha1.h gives about a dozen packages owning one.
10:36 donaldh joined #perl6
10:36 masak jnthn: I'll have to think about that.
10:36 zakharyas1 joined #perl6
10:36 masak jnthn: but -- to a first approximation -- isn't undoing an escape analysis simply assuming it escapes, 'cus everything's conservatively assumed to escape by default until you analyze it?
10:39 moritz tomboy64: well, look for one that installs in /usr/include/sha
10:40 moritz I don't know any gentoo; on Debian I'd do apt-file search /usr/include/sha
10:40 jnthn The sha-1 code is such a small dependency that, unless there are packaging rules otherwise, I'd just go with the bundled version.
10:40 jnthn Debian is fussy on such things. Dunno about Gentoo.
10:41 moritz jnthn: but that sounds too pragmatic :-)
10:41 tomboy64 for gentoo the rule is, if it's already available in some other package, use that other package
10:41 jnthn Yeah, that's why I don't work on build/packaging. :P
10:41 tomboy64 that applies even to java :p
10:41 jnthn GC bugs are actually less stress :P
10:41 tomboy64 (which npq also supplies, ugh)
10:42 jnthn masak: You're not thinking crazy enough ;)
10:42 jnthn masak: Deopt happens when we've already been running optimized code and realize in the middle of it that the world changed under us.
10:43 ufobat jnthn, do you have an oppinion on the signature thing, is it a bug?
10:43 jnthn masak: At which point we switch back to the interpreted code, and have to undo transforms beyond the code
10:43 jnthn masak: So, if we did inlining, we have to do uninlining
10:43 jnthn masak: If we allocated stuff on the stack for EA, we have to migrate it to the heap and re-write pointers to it
10:43 tomboy64 moritz: re tinymt, tools/build/Makefile-Moar.in has -I$(PREFIX)/include/tinymt hardcoded
10:44 jnthn etc.
10:44 jnthn ufobat: Link? :)
10:44 masak *nod*
10:44 lizmat jnthn: EA ?
10:44 masak jnthn: but -- unless you have *layers* of escape analysis being done on the same patch of code -- wouldn't what I asked still hold true?
10:44 masak lizmat: escape analysis
10:44 lizmat thanks!
10:44 masak lizmat: seemingly the key to a lot of cool optimizations
10:45 tomboy64 is that file there to facilitate building another moar? or to use the already installed moarvm?
10:45 masak because if you can *prove* something never leaves a certain area of code, you can put it on the stack instead of the heap, or even ditch unused parts of a bigger object etc
10:46 masak you can turn some loop variables to native as a free service to the user
10:46 masak etc etc
10:46 masak ...but it's hard, because it's tied to control flow *and* parameter passing *and* objects referencing each other...
10:46 ufobat jnthn, https://gist.github.com/ufobat/d​aa97cd5dc9815c0ee4d1bb4cdc8837e
10:47 moritz tomboy64: the Makefile is used to build MoarVM, if that's your question
10:47 tomboy64 moritz: okay, then how do i utilize my (already installed) moarvm?
10:48 jnthn masak: Well, yes, you're assuming that it escapes, but I more meant undoing it isn't just undoing an assumption, it's dealing with all the consequences now it doesn't hold :)
10:50 jnthn ufobat: No, named parameters don't play into multi-dispatch (except required ones, and only then as tie-breakers, not in the primary dispatch)
10:50 jnthn ufobat: Described in S06.
10:51 ufobat what a pity :( thanks! :)
10:51 tomboy64 hmm. from the back of my head, @ signifies arrays, % signifies hashes, $hash{'identifier'} is used to identify hash members, but what's used to identify array members?
10:52 lizmat tomboy64: @a[0]
10:52 ilmari tomboy64: %hash{'foo'} in perl6 (sigils are invariant)
10:52 ilmari unlike perl5
10:53 tomboy64 invariant?
10:53 lizmat also %hash<foo> shorter way to say %hash{'foo'}
10:53 tadzik m: [Any, 5, Any].grep(*).perl.say; [Any, 5, Any].grep({$_}).perl.say;
10:53 camelia rakudo-moar 9f9f0b: OUTPUT«(Any, 5, Any).Seq␤(5,).Seq␤»
10:54 tadzik why the difference?
10:54 tomboy64 lizmat: this Configure.pl seems to be perl5
10:54 lizmat ah, then: $a[0]
10:55 tomboy64 not seeing anything of that here. i guess those arrays are just used for looping then.
10:58 tadzik m: [Any, 5, Any].grep(?*).perl.say;
10:58 camelia rakudo-moar 9f9f0b: OUTPUT«(5,).Seq␤»
10:59 lizmat m: sub a($a) { dd $a }; a(*)
10:59 camelia rakudo-moar 9f9f0b: OUTPUT«Whatever $a = *␤»
10:59 lizmat m: sub a($a) { dd $a }; a(?*)
10:59 camelia rakudo-moar 9f9f0b: OUTPUT«WhateverCode $a = { ... }␤»
11:02 arnsholt Oooh, new 6guts post! \o/
11:04 arnsholt jnthn: "They most certainly don’t always just go away at the point of return." I see what you did there =p
11:06 jnthn ;)
11:07 masak jnthn: re "dealing with consequences" -- ah, fair enough. so if the EA allowed us to do scalar replacement, we now have to scalar un-replace. etc.
11:08 jnthn masak: Right :)
11:16 pmurias joined #perl6
11:16 aindilis joined #perl6
11:17 pmurias is such a segfault to be expected? http://paste.debian.net/440223
11:18 jnthn "Doesn't segfault if not commented out" is enough negations to break my brain :P
11:18 jnthn pmurias: No, shouldn't SEGV
11:20 arnsholt jnthn: First sentence of the last paragraph in the blog post: "Beyond that, there was nothing for it besides diving it, ..." doing it, perhaps?
11:20 pmurias it's a NullPointerException on the jvm
11:20 jnthn *diving in
11:21 arnsholt Oh right, that makes sense too =D
11:21 pmurias jnthn: I'll try to figure out/fix that
11:21 jnthn pmurias: Thanks
11:22 jnthn pmurias: The JVM code is in many places a straight translit of the MoarVM code :)
11:24 perlawhirl joined #perl6
11:26 llfourn m: class C { has Cool:D @.a }; C.new( a => Nil).a[0].elems.say # Bug?
11:26 camelia rakudo-moar 9f9f0b: OUTPUT«1␤»
11:27 llfourn m: class C { has Cool:D @.a }; C.new( a => Nil).a[0].perl.say # Bug?
11:27 camelia rakudo-moar 9f9f0b: OUTPUT«Cool:D␤»
11:27 llfourn m: my Cool:D @a = Nil; say @a # golf
11:27 camelia rakudo-moar 9f9f0b: OUTPUT«[(Cool:D)]␤»
11:28 perlawhirl m: say my @a = Nil; say @a.elems
11:28 camelia rakudo-moar 9f9f0b: OUTPUT«[(Any)]␤1␤»
11:28 llfourn I think that one makes sense
11:28 llfourn but if it's Any:D @a it shouldn't work
11:29 llfourn m: my @a = Any; say @a;
11:29 camelia rakudo-moar 9f9f0b: OUTPUT«[(Any)]␤»
11:29 pmurias joined #perl6
11:29 jnthn m: my Any @a = Nil
11:29 camelia rakudo-moar 9f9f0b: ( no output )
11:29 perlawhirl m: say my Any:D @a = Nil
11:29 camelia rakudo-moar 9f9f0b: OUTPUT«[(Any:D)]␤»
11:29 jnthn Nil means "assign, setting back to the default"
11:30 llfourn m: my Any:D @a = Any:D; say @a
11:30 camelia rakudo-moar 9f9f0b: OUTPUT«Type check failed in assignment to @a; expected Any:D but got Any:D␤  in block <unit> at /tmp/jQ7LzoOZC1 line 1␤␤»
11:30 jnthn m: my @x is default(42) = Nil; say @x
11:30 camelia rakudo-moar 9f9f0b: OUTPUT«[42]␤»
11:30 llfourn jnthn: right but the default for Any:D can't be Any:D
11:30 llfourn because Any:D is not :D
11:30 jnthn Ah, I see
11:30 jnthn eww
11:30 llfourn m: say Any:D ~~ Any:D
11:30 camelia rakudo-moar 9f9f0b: OUTPUT«False␤»
11:31 perlawhirl m: say my Any:D $a = Nil # this works as expected
11:31 camelia rakudo-moar 9f9f0b: OUTPUT«(Any:D)␤»
11:31 perlawhirl hrm... i get nothing in repl
11:31 llfourn that should be an error as well imo
11:36 jnthn arnsholt: Fixed, thanks :)
11:36 llfourn RT #127958
11:36 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127958
11:42 wamba joined #perl6
11:49 pmurias jnthn: made a pull request for fix the segfault
11:54 ely-se joined #perl6
11:56 tadzik ugexe: ping
11:57 tadzik or maybe nvm :)
12:04 smls joined #perl6
12:15 smls m: my $s = supply { await do for 1..5 { start { emit 42 } } };  $s.wait
12:15 camelia rakudo-moar cc4dd7: OUTPUT«===SORRY!===␤emit without supply or react␤»
12:15 smls ^^ What is the correct way to feed a supply from multiple worker threads?
12:17 jnthn smls: Use a Supplier instead and emit into that
12:17 jnthn lunch &
12:17 smls thanks
12:23 colomon joined #perl6
12:25 pierre_ joined #perl6
12:26 pierre_ Hi
12:27 pierre_ # Missing serialize REPR function for REPR SCRef
12:28 pierre_ is that error talking to someone? i'm trying to recompile a module that was compilng previously (can't remember what version so)
12:28 pierre_ i jsut build moar vm with rakudo-brew, and now i get that :(
12:29 tomboy64 joined #perl6
12:30 Ulti my tests have popped up from 1.95s to 2.21s in the last couple of days, no idea why
12:32 pierre_ For me, last time i compiled my module was 2 months ago
12:32 pierre_ https://github.com/pierre-vigier/Perl6-Math-Matrix
12:32 pierre_ just wanted to check a few things, but i can't pass the test anymore, and the code did not change
12:35 azawawi joined #perl6
12:35 azawawi hi
12:35 yoleaux 09:25Z <RabidGravy> azawawi: it's "wont fix" the reasons it may break things include panda installing an old version of JSON::Fast, panda not understanding versioned depencies and "something screwed up with the resolution of modules"
12:35 yoleaux 09:26Z <RabidGravy> azawawi: I tested everything with the version using JSON::Fast (having upgraded JSON::Fast) and all okay
12:35 azawawi RabidGravy: ping
12:36 smls pierre_: I tried installing yout module with panda, and get the same error.
12:36 smls So it's not something specific to your machine...
12:36 smls I guess you'd have to golf it to find out what pice of code causes it, and then submit a rakudobug...
12:36 pierre_ hum, i'll probably comment all the code and uncomment piece by piece
12:37 masak today's mini-challenge, taken from a discussion on #python the other day: https://gist.github.com/masak/e​e99cbb7054e436658d85c264db7d00f
12:37 pierre_ thanks, i'll try to isolate the issue
12:37 masak in this mini-challenge, points will definitely be given for originality and clever (as in "that's a neat way to implement it") solutions
12:39 jast not that mini AFAICT
12:40 masak haven't implemented it, but I'd say around 30 LoC
12:40 jast never mind, forgot that parentheses are not allowed
12:40 masak right
12:40 masak parentheses would only add unnecessary complexity to the problem, IMO
12:40 jast agreed
12:40 masak the restriction on ^ is there for the same reason
12:41 jast I feel slightly tempted to write a golf solution
12:42 ely-se joined #perl6
12:42 masak go for it :)
12:42 azawawi .tell RabidGravy so basically depending on JSON::Fast does not install a newer version. panda install Test::META will fail because JSON::Marshall expects a newer JSON::Fast 0.4 than the older 0.3 that is installed with panda
12:42 yoleaux azawawi: I'll pass your message to RabidGravy.
12:42 jast OTOH I'm at work and while nobody minds me spending a few minutes on IRC, there are limits...
12:43 tomboy64 joined #perl6
12:43 adu joined #perl6
12:48 masak :)
12:48 masak maybe later?
12:52 kurahaupo joined #perl6
13:01 * [Coke] is on board with this talk of coffee from a while back.
13:07 pmurias .tell azawawi re Pointer[MyHTML] docs.perl6.org is wrong
13:07 yoleaux pmurias: I'll pass your message to azawawi.
13:08 MadcapJake pmurias: hmm?
13:08 pmurias MadcapJake: there is a bug in the docs
13:09 masak I'm going for a walk. when I come back I might whip up a solution to the mini-challenge
13:09 masak hoping somebody beats me to it, of course ;)
13:10 pmurias MadcapJake: the CStruct repr represents a "pointer to a struct", so there is no need to wrap it in a Pointer
13:11 MadcapJake pmurias: I thought so, I was having issues where I was getting an error like "expected CStruct but got Pointer" and when I would switch to Pointer[MyHTML] it would say "expected Pointer but got CStruct"
13:12 tadzik leont: do you mind if I open you an issue on TAP::Harness with a list of modules that prove handles fine but prove6 doesn't?
13:13 MadcapJake I think it's really LTA that the error says "expected return type" when really it seems to be talking about arguments (at least that's what I've noticed)
13:14 huf joined #perl6
13:15 pierre_ joined #perl6
13:25 huf joined #perl6
13:28 pmurias jnthn: would it be ok if in nqp I marked all the stuff from the outer_ctx that's stuffed in into .symbol with a :from_outer?
13:29 skids joined #perl6
13:29 pmurias jnthn: so I could distinguish what's actually declared in the outermost block and what's just taken from the setting
13:29 jnthn pmurias: I thought we already distinguished those?
13:29 jnthn pmurias: unit is outermost block, unit_outer is stuff from setting?
13:31 pmurias SET_BLOCK_OUTER_CTX just flattens all the outer ctx things into the symtable
13:31 smls joined #perl6
13:32 jnthn Sure but that still isn't the actual block used for the outer scope of the program itself?
13:32 jnthn Or at least, it's not in Rakudo...maybe different in NQP?
13:32 * pmurias checks how things are in Rakudo
13:34 kerframil joined #perl6
13:36 RabidGravy azawawi, exactly
13:36 yoleaux 12:42Z <azawawi> RabidGravy: so basically depending on JSON::Fast does not install a newer version. panda install Test::META will fail because JSON::Marshall expects a newer JSON::Fast 0.4 than the older 0.3 that is installed with panda
13:36 RabidGravy and panda is unable to understand versioned dependencies
13:40 cdg joined #perl6
13:41 pmurias jnthn: it doesn't seem to be the case in nqp
13:42 pmurias jnthn: should I just make them separate in nqp?
13:42 vytas joined #perl6
13:44 jnthn pmurias: I'd prefer that to labeling them all, yeah
13:49 smls masak: In your mini-challenge, the inputs can basically only be Polynomials, right?
13:51 tadzik RabidGravy: well, META.info doesn't store them, does it?
13:51 tadzik or can it
13:52 tadzik in either case, wait a few more days :)
13:52 tadzik with 0 as a possible value for few
13:53 RabidGravy the spec suggests that it can be a "use specification" i.e. "JSON::Fast:ver<v0.4..*>"
13:53 RabidGravy but upgrading panda's JSON::Fast would be good
13:55 * tadzik notes down
13:58 leont_ My test harness makes rakudo segfault when using parallel use, and sigabort after a long time during serial use
13:59 RabidGravy good man!
14:01 dolmen joined #perl6
14:03 tomboy64 joined #perl6
14:03 perlpilot joined #perl6
14:14 luiz_lha joined #perl6
14:16 tharkun joined #perl6
14:17 khw joined #perl6
14:21 |Tux| joined #perl6
14:21 pierre_ For the problem i was refering ealier
14:21 pierre_ here is a gist
14:21 pierre_ https://gist.github.com/pierre-vigi​er/cd9f17d71e3f75960993b46454228f68
14:22 pierre_ basically, i have a trait that add a method to a class if applied to an attribute
14:22 pierre_ it's working well
14:23 pierre_ however, if i try to 'use' a class that uses that trait, i have a strange error
14:23 pierre_ Missing serialize REPR function for REPR SCRef
14:23 tadzik leont_: do you mind if I open you an issue on TAP::Harness with a list of modules that prove handles fine but prove6 doesn't?
14:24 leont_ Currently I'm still having issues with subtests, I disabled them entirely in my rakudo branch for now, I expect any modules using subtests to similarly run into such issues
14:30 RabidGravy pierre, I think I've seen that before, I don't think it has been reported to RT though
14:30 RabidGravy so please report
14:31 RabidGravy in the meantime sticking "no precompilation;" in the top of the file containing the role will fix
14:33 pierre_ Indeed, it's working
14:33 pierre_ thanks, to report the bug, should i link to the gist?
14:34 leont_ (But by all means go ahead and file an issue)
14:34 pierre_ yep, i will file an issue
14:34 timotimo something seems to be wrong with hack
14:34 RabidGravy pierre_, I would copy the entire gist in RT to be honest
14:34 timotimo collect isn't refreshing and i can't start new commands in my existing bash session
14:35 RabidGravy out of swap, /var or /tmp ?
14:43 timotimo difficult to say; as i can't look at stuff :)
14:44 pierre_ https://rt.perl.org/Ticket/Display.html?id=127959
14:44 RabidGravy yeah, as soon as I typed it I thought I was being stupid
14:44 pierre_ done, thank you for the help
14:44 tadzik leont_: I encountered quite a bit of test ordering warnings
14:45 leont_ Synchronous or asynchronous?
14:45 bartolin timotimo: do commands like ps or top work?
14:45 leont_ Asynchronous I've also seen them, and I haven't quite figured them out yet
14:46 tadzik leont_: the default :)
14:46 ptolemarch joined #perl6
14:46 timotimo i'll be able to tell you when i can get back on the server via ssh, bartolin
14:47 tadzik leont_: also, this https://gist.github.com/tadzik/c​e500f0f8a1b334f7ceb75dabf9547b1 allowed me to override the Harness' output
14:47 timotimo nope. hack seems far gone again
14:47 timotimo i suppose i'll reboot it
14:47 bartolin timotimo: oh, sorry. I thought you had a running screen session
14:47 bartolin timotimo++
14:47 leont_ tadzik: right, I already know what's going on, moment
14:47 timotimo i *was* running a tmux session
14:47 timotimo but then i got disconnected
14:47 timotimo can anybody verify that hack is down?
14:48 timotimo usually you'd see a bunch of quits from people who have their irc sessions hosted on hack
14:48 bartolin timotimo: it's not down
14:48 leont_ tadzik: can you try my no-subtest branch?
14:48 timotimo i can't connect to it.
14:49 tadzik yeah, if I don't accidentally nuke my entire toolchain again...
14:49 bartolin timotimo: but I get a prompt for my password when I try to connect.
14:49 bartolin anyway, please reboot it.
14:50 bartolin we had that situation before (unable to login, load increasing, unable to spawn new shells etc.)
14:50 bartolin iirc moritz rebooted hack in all those cases
14:50 timotimo well, i get the host key bubble bath, too
14:54 timotimo i will flip the switch unless someone says "no".
14:54 timotimo OK.
14:55 bioexpress joined #perl6
14:56 timotimo did it work? i don't see a difference
14:58 bioexpress Hello, is it possible to specify the minimum version of a module in the "depends" section of a META6.json file?
14:58 timotimo not at the moment, bioexpress
14:59 bioexpress thx
15:01 pierre_ joined #perl6
15:03 timotimo reboot wouldn't work, so i force-reset it
15:07 marcusramberg joined #perl6
15:08 marcusramberg Listening to Damian talk about concurrency in Oslo, and I tried one of his examples, but it seems to crash perl6 when you try to run it for some iterations - https://gist.github.com/marcusrambe​rg/f789306f4f580c6cf1270ca12a333391
15:08 timotimo virt-manager is saying "running", but i can't connect for a graphical console and the cpu usage graphs for both host and client have flatlined
15:08 marcusramberg gives me [1]    33874 abort      perl6 channel.p6
15:11 bartolin timotimo: how did you force-reset it? from the command line?
15:11 RabidGravy marcusramberg, so it does
15:11 timotimo i use virt-manager, because i have no clue about the commandline
15:12 timotimo but i'm using it via x11 forwarding because i didn't yet put my ssh key of my laptop on there yet
15:12 lizmat marcusramberg: crash confirmed  :-(
15:12 ajoe joined #perl6
15:12 marcusramberg :-/
15:13 bartolin but you have a root login for the hypervisor? could you try "virsh list" there?
15:13 lizmat marcusramberg: the good news is that it fails consistently after a fixed number of iterations
15:13 perlpilot marcusramberg: Did Damian actually run it ?
15:13 marcusramberg perlpilot: only once
15:13 RabidGravy lizmat, marcusramberg it appears to be associated with garbage collection looking at the backtrace
15:13 timotimo "hack running"
15:13 lizmat marcusramberg: and that number actually differs with different settings of MVM_SPESH_DISABLE and --optimize
15:13 perlpilot marcusramberg: do you happen to know what rakudo version he was using?
15:14 perlpilot timotimo: oh ... good point.
15:14 lizmat if I add an "nqp::force_gc" to the sleep_sort sub, it doesn't fail
15:15 bartolin timotimo: hmm. probably 'virsh shutdown <domain-id>' has no effect?
15:15 marcusramberg perlpilot: no. he's still talking :)
15:15 smls masak: Here's a boring long-ish solution to your mini-challenge: https://gist.github.com/smls/0c​d4988c8895f18d95df9cf8d9a9f640
15:15 lizmat RabidGravy: so indeed GC related
15:15 perlpilot marcusramberg: well ask him about it!  See if he admits to shenanigans  ;)
15:15 pmurias joined #perl6
15:17 bartolin timotimo: if so, I think 'virsh destroy hack' is the next step ("Immediately terminate the domain domain-id")
15:17 timotimo i'm running the shutdown
15:17 timotimo it seems to block
15:18 bartolin yeah, would have worked from virt-manager otherwise
15:18 timotimo so i ought to ctrl-c it and run destroy instead?
15:18 lizmat marcusramberg: care to submit a rakudobug ?
15:18 marcusramberg lizmat: I can try
15:19 lizmat copy this discussion to an email and send it to rakudobug@perl.org
15:19 timotimo OK, i managed to destroy it.
15:19 lizmat timotimo++
15:19 lizmat :-)
15:19 bartolin timotimo: :-) and now 'virsh start hack'?
15:19 timotimo i'll start it, yeah
15:20 timotimo "started"
15:20 bartolin ping works. timotimo++
15:20 dalek joined #perl6
15:20 synopsebot6 joined #perl6
15:20 timotimo cool.
15:20 perlpilot hello bots
15:21 timotimo yeha, it's up
15:21 timotimo now i know perfectly well how to deal with this the next time around
15:21 timotimo and i can now do it from my laptop, too
15:23 tadzik leont_: https://gist.github.com/tadzik/1​dd4d72bd6374502e1e43f668dd5a31c that's on no-subtest, so the issue is still there
15:23 timotimo i saw a bunch of messages a la "blah hung for more than 120 seconds" and "echo something into some file in /sys to disable this message"
15:23 timotimo the first one mentioned "vdasomethingsomething"
15:23 timotimo i couldn't take a screenshot, unfortunately
15:23 timotimo seems like the virtual hard drive asploded somehow
15:23 timotimo and that caused all manner of programs to start hanging, unkillable I/O wait probably
15:24 bartolin timotimo: that was the kind of problem I suspected for a long time (virtual disk system not available)
15:24 leont_ :-/
15:24 timotimo mhm
15:26 bartolin timotimo: I think it would be good to enable remote logging (since logs obviously could not be written once the disk is not available)
15:27 timotimo aye. what kind of solution do you suggest? journald has probably got something built-in
15:27 bartolin (maybe there is something to learn from log messages in such a situation)
15:27 dolmen joined #perl6
15:27 [Coke] joined #perl6
15:27 timotimo it's just important that the program that sends the logs doesn't ever try to do disk i/o :)
15:27 * bartolin has never touched journald before
15:32 * [Coke] wonders how to fix irssi so that it actually reconnects to everything on restart instead of leaving half his windows blank with no indication of what channel they were on.
15:32 bartolin timotimo: are there log messages about that "hung for more than 120 seconds" thing on the hypervisor?
15:32 [Coke] Or; is there a better text based irc client I could be using?
15:33 * [Coke] tries "/layout save" followed by "save"
15:33 andrewalker [Coke]: weechat is pretty good. I was using irssi and recently switched.
15:33 timotimo no, but an error message about "invalid partition" from pretty much every single file system driver on the planet
15:34 japhb joined #perl6
15:35 timotimo AFK for a bit
15:37 leont_ tadzik: part of it may be invalid tap Test.pm doesn't correctly escape #, I have a commit in my rakudo branch for that…
15:37 tadzik should that kind of thing still be happening? :o
15:38 lizmat leont_: link for Test.pm fix?
15:38 lizmat I could update that now ?
15:39 leont_ https://github.com/rakudo/rakudo/pull/578/com​mits/cc447606c6ad5e195ae960c4027825f9c1b8dce0
15:39 tadzik wtf's that even mean >:(
15:40 leont_ (or https://github.com/rakudo/rakudo/commit/cc44​7606c6ad5e195ae960c4027825f9c1b8dce0.patch)
15:41 leont_ Seems I was wrong, it's escaping the backslash that'd break in this case
15:42 leont_ (but same fix)
15:43 tadzik hmm, so this conflict occurs when loading Shell::Command apparently
15:43 tadzik https://gist.github.com/tadzik/b​84bf7062ed35f310cb288f8d607858a
15:45 masak joined #perl6
15:46 perlpilot Random Test.pm question:  now that we have ≅, should Test.pm use that for is-approx?  (and why do we still have both is_approx and is-approx?)
15:46 masak smls: almost. I don't think x^-7 qualifies for a polynomial
15:47 lizmat perlpilot: to answer the latter question: because they have different interfaces ?
15:47 masak smls: ...and, glancing at your solution, I don't think it takes X^-1 into account ;)
15:48 masak (but it looks quite fine otherwise)
15:51 tadzik nine: ping
15:51 zakharyas joined #perl6
15:53 * ufobat wonders what tadzik thinks about my changes in bailador... https://github.com/ufobat/Bailador/bl​ob/master/t/09-OO-nested-routes.t#L30
15:55 masak smls: urm. thinking of integration; never mind my comment about X^-1 -- your solution looks fine :)
15:55 astj joined #perl6
15:56 ufobat masak, did you make any progress with your SSE?
15:57 tadzik ufobat: I recognize some of this syntax :P
15:57 ufobat ha :)
15:59 sjoshi joined #perl6
16:00 tadzik ufobat: I see a lot work being done on this, and I'm very happy to see it too :)
16:00 lizmat leont_: your patch causes some spectest breakage, investigating
16:01 perlpilot joined #perl6
16:02 leont_ Interesting
16:02 nightfrog joined #perl6
16:05 ufobat tadzik, i am happy you like it :)
16:08 smls masak: :)
16:11 lizmat leont_: 1. it wasn't handling the case if there was no $desc well
16:11 leont_ Ah, I see
16:12 lizmat 2. somehow the output of a passing TODO test is now different
16:13 gtodd joined #perl6
16:13 gtodd /j perl6
16:13 gtodd /j #perl6
16:14 gtodd oh
16:14 tadzik you're already here, welcome! :)
16:14 gtodd "perl6 ... you're already there"
16:18 djbkd joined #perl6
16:18 [particle] joined #perl6
16:18 mohae joined #perl6
16:19 aindilis` joined #perl6
16:23 uruwi joined #perl6
16:23 * gtodd holds breath for mystery meditation on from-loop()
16:24 gtodd http://docs.perl6.org/routine/from-loop  ...
16:25 M-matthew joined #perl6
16:26 ugexe thinking of Supply.from-list might help
16:26 M-tadzik joined #perl6
16:27 gtodd Seq.from-loop(&stuff)
16:27 gtodd ok
16:27 gtodd thanks
16:27 gtodd Supply.from-list
16:29 ugexe m: my $s = Supply.from-list: gather for 1..3 { take $_ }; $s.tap({.say}); # from a loop
16:29 camelia rakudo-moar 3ebf31: OUTPUT«1␤2␤3␤»
16:31 gtodd yeah .... no equally easy docs for Seq.from-loop()
16:33 sjoshi joined #perl6
16:36 japhb joined #perl6
16:36 cdg joined #perl6
16:37 kaare_ joined #perl6
16:40 ugexe m: my &cond = sub { state $x += 1; $x > 3 ?? False !! True; }; my $s = Seq.from-loop: { $++ }, &cond; say $_ for @$s
16:40 camelia rakudo-moar 3ebf31: OUTPUT«0␤1␤2␤»
16:44 gtodd camelia ... autoadd that to docs :-)
16:48 gtodd it's the : {} bit of   Seq.from-loop: { }
16:48 gtodd that I did not understand
16:49 timotimo that's short for "the rest of the line is arguments to this method"
16:49 timotimo so the from-loop gets a single code block as its first argument
16:50 ugexe m: my &body = sub { $++; }; my &cond = sub { state $x += 1; $x > 3 ?? False !! True; }; my $s = Seq.from-loop: &body, &cond; say $_ for @$s; # this matches the docs better
16:50 camelia rakudo-moar 3ebf31: OUTPUT«0␤1␤2␤»
16:50 gtodd I kept getting an error:
16:50 gtodd oh can''t see it now
16:50 smls gtodd:   .method: ...;   is the same as   .method(...);
16:50 RabidGravy it appears that from-loop isn't tested for explicitly, isn't documented and is only used once in the source, perhaps it's better to just ignore it until it goes away ;-)
16:51 gtodd the error mentioned a missing block or a final }
16:51 gtodd which I guess meant the .from-loop needed more than I say giving it
16:53 gtodd my $s = Seq.from-loop: { $++ } ;  say  @$s[0..2] ;  # with no &cond :-D
16:54 gtodd many docs need examples ... but we can't put examples *everywhere* can we?
16:54 ugexe i dont see why not
16:56 gtodd oh goodie :)
16:56 tadzik leont_: so, how does https://gist.github.com/tadzik/c​e500f0f8a1b334f7ceb75dabf9547b1 look to you?
16:57 leont_ Yeah that looks sensible
16:57 hankache joined #perl6
16:59 firstdayonthejob joined #perl6
16:59 tadzik it also seems like your TAP::Harness broke after you patch to rakudo got merged :o
16:59 tadzik do you want a PR for that?
17:00 tadzik (I'll just send one)
17:02 japhb joined #perl6
17:03 kaare__ joined #perl6
17:03 leont_ the no-subtest branch is broken knowingly, it's a workaround not a fix (though I gues I should make those tests todo)
17:10 hankache joined #perl6
17:12 rurban joined #perl6
17:13 ruoso joined #perl6
17:14 dalek ecosystem: 4757836 | tadzik++ | META.list:
17:14 dalek ecosystem: Add Module::Toolkit
17:14 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/47578367c1
17:15 tadzik the above includes redpanda, Probably The Fastest Module Installer In Existence :)
17:15 sivoais joined #perl6
17:15 jercos joined #perl6
17:16 TimToady joined #perl6
17:16 aindilis` joined #perl6
17:20 webmind joined #perl6
17:20 Amnez777 joined #perl6
17:22 rindolf joined #perl6
17:23 _mg_ joined #perl6
17:25 pecastro joined #perl6
17:25 domidumont joined #perl6
17:29 RabidGravy next time someone asks about editors here is some real science on the subject https://pavelfatin.com/typing-with-pleasure/
17:36 sjoshi joined #perl6
17:36 brrt joined #perl6
17:49 sno joined #perl6
17:49 smls masak: Slightly condensed version with stricter parsing: https://gist.github.com/smls/0c​d4988c8895f18d95df9cf8d9a9f640
17:53 masak smls: if you're aiming for golf, I think you can get away with a lot less machinery using an actions class
17:54 masak `rule TOP  { <term>* % <addsub> }` -- smls: does your program DTRT with an empty input? seems '' as the input string shouldn't count as 0, but as an illegal input
17:55 masak (though I didn't state that in the task description, it's probably more in line with people's expectations of polynomials)
17:55 smls It treats the empty string as a polynomial with no terms :P
17:56 smls <term>+  should fix that
17:56 masak right
17:56 masak I really dig the `|| next` expression ;)
17:57 smls :)
17:58 dalek doc: a4bf58e | (Jan-Olof Hendig)++ | doc/Type/Array.pod:
17:58 dalek doc: Added examples to append and prepend. An error in the unshift example was also fixed.
17:58 dalek doc: review: https://github.com/perl6/doc/commit/a4bf58e1bd
18:01 masak smls: it's an interesting consideration whether we expect the input to have at most one term for each integer power of X
18:02 masak (and if we don't, whether we sum them before the output stage)
18:02 smls Right
18:03 masak I think summing (and ordering) (and omitting vanishing terms) is a reasonable thing to do
18:04 masak if we *don't* do that, however, then we can basically start emitting output in the action methods as soon as we match a term
18:05 smls True
18:05 masak if we do do that, seemsme a MixHash would be a good data structure to use
18:05 ely-se joined #perl6
18:05 smls except that if the match fails later on, you've printed partial output.
18:06 masak (mapping from Int exponents to Rat factors)
18:06 masak smls: ok, so collect output in an accumulator but print it at the end
18:06 masak s/factors/coefficients/
18:17 uruwi joined #perl6
18:17 sillytime left #perl6
18:21 Jonis joined #perl6
18:29 FROGGS joined #perl6
18:32 bartolin timotimo: turns out, we already have remote logging for hack (log messages are sent to www.p6c.org). unfortunately www has only received about 20 additional messages (which are not found on hack) -- and after that was silence. those log messages were not helpful at all
18:41 cpage_ joined #perl6
18:41 jjido joined #perl6
18:43 sergot joined #perl6
18:46 as joined #perl6
18:46 timotimo darn :(
18:47 crono joined #perl6
18:47 crono hows development going?
18:47 bartolin I googled a lot (again) and found this bug report which sounds somehow similiar: https://bugs.debian.org/cgi-​bin/bugreport.cgi?bug=803036
18:48 bartolin do you know if the hypervisor runs with Debian 8 as well?
18:50 bartolin but apart from that I have no clue what kind of problem we have on hack :-/
18:50 timotimo how do i easily figure ou tthe debian release a system is running?
18:51 timotimo ah, it's jessie
18:51 bartolin timotimo: /etc/debian_version
18:51 MadcapJake I am using a class, H::M::Node and in the file I'm using it in I am getting "Could not find symbol '&Node'
18:52 timotimo you probably have to spell it H::M::Node if it's defined like that in the module you're use-ing
18:52 MadcapJake I am.
18:52 timotimo you spell it like that?
18:53 timotimo then perhaps you have to spell it "Node" instead? :D
18:53 smls MadcapJake: Same issue as this?  https://rt.perl.org/Ticket/Display.html?id=126426
18:53 * timotimo doesn't make modules often enough to know this all by heart
18:53 bartolin well Jessie comes with qemu 2.1 and some problems related to IO hangs are fixed with 2.4 according to the bug report above.
18:53 kerframil joined #perl6
18:53 MadcapJake smls: the error is different but it seems similar
18:53 bartolin there is a backport for qemu 2.5 for jessie: https://packages.debian.org/jessie-backports/qemu
18:54 MadcapJake smls: I'm also using .new on it
18:54 bartolin but I'm not sure if it makes sense to try an upgrade.
18:54 MadcapJake but actually wait, I'm not definied it twice
18:54 MadcapJake defining*
18:56 MadcapJake btw Atom users: file-icons package now has built-in Perl 6 icon :)
18:58 ChristopherBotto joined #perl6
18:59 ChristopherBotto Hello everyone!
18:59 ChristopherBotto m: my @letters = <A B C>; say 'A' ~~ @letters;
18:59 camelia rakudo-moar 0b8e08: OUTPUT«False␤»
19:00 psch joined #perl6
19:01 ChristopherBotto m: my @letters = <A B C>; say @letters ~~ /A/;
19:01 camelia rakudo-moar 0b8e08: OUTPUT«「A」␤»
19:02 ChristopherBotto say @letters ~~ /\w/;
19:02 ChristopherBotto m: my @letters = <A B C>; say @letters ~~ /\w/;
19:02 camelia rakudo-moar 0b8e08: OUTPUT«「A」␤»
19:02 ChristopherBotto m: my @letters = <A B C>; say @letters;
19:02 camelia rakudo-moar 0b8e08: OUTPUT«[A B C]␤»
19:03 ChristopherBotto m: my @letters = <A B C>; say 'A' eq any(@letters);
19:03 camelia rakudo-moar 0b8e08: OUTPUT«any(True, False, False)␤»
19:06 cpage_ joined #perl6
19:07 _mg_ joined #perl6
19:10 ifim joined #perl6
19:10 dalek infrastructure-doc: 4274a30 | usev6++ | hosts/hack.p6c.org.pod:
19:10 dalek infrastructure-doc: Document remote logging for hack
19:10 dalek infrastructure-doc: review: https://github.com/perl6/infras​tructure-doc/commit/4274a3051d
19:19 sjoshi joined #perl6
19:27 brrt joined #perl6
19:38 TEttinger joined #perl6
19:42 chandwer joined #perl6
19:45 perlpilot chandwer: btw, as you're doing P6 things, if you get stuck or have a question, this is a good place to ask for help.
20:08 MadcapJake is it normal behavior that if you place the least restrictive multi first it can block other multi signatures from getting checked?
20:11 jnthn MadcapJake: Depends. A purely nominal dispatch doesn't care about order. But if there are multiple best matches from that, then we consider tie-breakers in code order.
20:12 jnthn multi f(Cool) { }; multi f(Int) { }; f(42) # will always called the Int one, regardless of order
20:12 jnthn multi f($ where Cool) { }; multi f($ where Int) { }; f(42) # you'll get the first one, since both are equally good modulo tie-breakers, and the first matches so we take it
20:18 sortiz joined #perl6
20:22 sortiz \o #perl6
20:26 masak m: my @letters = <A B C>; say so 'A' eq any(@letters)
20:26 camelia rakudo-moar 0b8e08: OUTPUT«True␤»
20:26 masak ChristopherBotto: ^^
20:26 masak m: my @letters = <A B C>; say so 'A' ~~ any(@letters)
20:26 camelia rakudo-moar 0b8e08: OUTPUT«True␤»
20:27 ChristopherBotto masak: Thanks so much!
20:28 masak m: my @letters = <A B C>; say 'A' ∈ @letters
20:28 camelia rakudo-moar 0b8e08: OUTPUT«True␤»
20:29 masak m: .<A B C> = True xx * given my %letters; say %letters<A> :exists
20:29 camelia rakudo-moar 0b8e08: OUTPUT«True␤»
20:30 masak m: given % { .<A B C> = True xx *; say .<A> :exists }
20:30 camelia rakudo-moar 0b8e08: OUTPUT«True␤»
20:32 brrt joined #perl6
20:36 rurban joined #perl6
20:43 nine_ tadzik: pong
20:48 gtodd why is there a dot at the start of <A B C>?
20:48 Juerd gtodd: .foo is short for $_.foo
20:48 Juerd gtodd: .<foo bar> is short for $_.<foo bar>
20:48 gtodd is that the shorthand form of something
20:48 gtodd yeah ok
20:49 Juerd gtodd: $_ is the default variable that given binds to
20:49 Juerd Oh, and $_.<foo bar> in turn is short for $_.{'foo', 'bar'}
20:49 grondilu only when the parser expects a term though.  Since you can put spaces before a method call.
20:50 grondilu m: say (my %)                .<foo bar>
20:50 camelia rakudo-moar 0b8e08: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dlJoLObheC␤Malformed postfix call (only alphabetic methods may be detached)␤at /tmp/dlJoLObheC:1␤------> 3say (my %)                .7⏏5<foo bar>␤»
20:50 Juerd grondilu: Actually, it's a bit simpler than that, IIRC: "." either takes no whitespace, or on both sides.
20:50 gtodd I always though $_ was already short ... of course in perl5 you can omit it lots of times :-)   but with perl6 implict topic ( $_  ) doesn't work unless you do the bind ... e.g. .say etcc
20:50 Juerd grondilu: If you have whitespace only on the left, it's just the regular $_ shorthand.
20:51 grondilu oh yeah I meay have confused with .somthing at the beginning of a line.
20:51 Juerd gtodd: $_ is ugly imho, I try to only use it when it is implied.
20:51 Juerd grondilu: That's not different
20:52 grondilu Juerd: I may just be talking non-sense.  Please ignore.
20:52 Juerd gtodd: So I'd definitely write "given $bar { .foo }", but never "given $bar -> $_ { $_.bar }"
20:52 Juerd If I type the variable name, I'll give it a meaningful name instead.
20:52 psch S/// is the only thing that ever made me want to assign to $_, fwiw
20:52 grondilu If you have to write $_.foo, you're doing something wrong.
20:53 psch and i'm including given there
20:53 psch like, < .&[+](3) given 5 > is cute, but not the intuitive way to write.  on the other hand, S/// really only works in < $val = S/// given $foo >
20:54 psch (obviously S/// has a meaningful pattern and substitution expression in the example, it's just omitted for brevity :) )
20:54 gtodd given $bar -> $baz{ $baz.bar }"
20:55 psch ...i'd probably do $bar.bar there instead
20:58 psch well, otoh, for is excluded because it's too magic vOv
20:59 sortiz And don't forget the other topicalizers: 'with', 'without', 'andthen', et.al.
21:00 sortiz "with $bar { .foo }" is clearer that "if $bar.defined { $bar.foo }" imo
21:01 psch yeah, i agree there
21:01 psch i was probably a bit hasty with my statement :/
21:02 gtodd m:  .<A B C> = True xx * given my %letters; dd %letters;
21:02 camelia rakudo-moar 0b8e08: OUTPUT«Hash %letters = {:A, :B, :C}␤»
21:03 gtodd m:  .<A B C> = True xx * given my %letters; %letters;
21:03 camelia rakudo-moar 0b8e08: OUTPUT«WARNINGS for /tmp/S_lw01t6Rn:␤Useless use of %letters in sink context (line 1)␤»
21:03 gtodd m:  .<A B C> = True xx * given my %letters; say %letters;
21:03 camelia rakudo-moar 0b8e08: OUTPUT«{A => True, B => True, C => True}␤»
21:03 gtodd m:  .<A B C> = True xx 2 given my %letters; say %letters;
21:03 camelia rakudo-moar 0b8e08: OUTPUT«{A => True, B => True, C => (Any)}␤»
21:03 psch gtodd++
21:04 psch m: .<A B C> >>=>> True given my %h; dd %h # this looks parsing error ish
21:04 camelia rakudo-moar 0b8e08: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kOEgj3L0nF␤Missing << or >>␤at /tmp/kOEgj3L0nF:1␤------> 3.<A B C> >>=>7⏏5> True given my %h; dd %h # this looks p␤    expecting any of:␤        infix␤        infix stopper␤»
21:04 gtodd what is   C => (Any)  there?
21:04 psch 'cause i'd expect "list assignment is too diffy" or something
21:04 psch gtodd: 'cause you're only replicating True twice
21:05 psch so you're assigning a three element list of which the third element isn't defined by you to the hash slice <A B C>
21:05 gtodd yeah ... I just would've thought:    C => something else
21:05 gtodd errm "undef" :-D
21:05 psch m: say Any.defined
21:05 camelia rakudo-moar 0b8e08: OUTPUT«False␤»
21:05 psch gtodd: perl6 doesn't have "undef" as such, it has type objects instead
21:05 gtodd hehe
21:05 skink joined #perl6
21:05 gtodd yeah ... but but ... :)
21:06 psch well, depending on your point of view Nil might be undef
21:06 skink Happy Friday, #perl6
21:06 gtodd yes
21:06 psch o/ skink
21:06 sortiz o/ skink
21:06 psch although Nil is more like the sub form of perl5 undef as value type... :)
21:06 masak o/ skink
21:06 skink o/
21:06 psch (maybe not "value type" but "value"..?  i think my theory is running a bit thin here... :) )
21:06 gtodd I love perl5 types :)
21:07 gtodd "types"
21:08 psch masak: can i have your take on the >>=>> bit above?
21:09 psch m: .<A B C> »=» True given my %h; dd %h # actually, never mind
21:09 camelia rakudo-moar 0b8e08: OUTPUT«Hash %h = {:A, :B, :C}␤»
21:09 psch there's just some parsing hiccup
21:10 * psch goes to bug that
21:11 _28_ria joined #perl6
21:13 _28_ria joined #perl6
21:14 psch ...moments like these do make me feel competent, somewhat
21:14 psch i mean "Texas hyper doesn't parse correctly in topicalized quoteword associative index" is not really a "doesn't know computers"-person sentence... :)
21:14 _28_ria joined #perl6
21:14 * psch better goes to bed, in any case o/
21:14 sortiz m: my $f = Failure.new("bum"); without $f { say .defined, .DEFINITE } # psch, to think about Perl6 "undef" values
21:14 camelia rakudo-moar 0b8e08: OUTPUT«FalseTrue␤»
21:15 masak psch: my take is that `=` is so special it's not surprising me all that much that it doesn't work ;)
21:15 psch sortiz: i thought .DEFINITE cares more about the container?
21:15 masak psch: people like to imagine `=` is an ordinary operator, but truth is it gets special-cased all over the place
21:15 psch masak: well, it *does* work with guillemets
21:15 masak a weaker soul might name it "macroish"
21:16 masak psch: oh, that's curious
21:16 psch masak: i'm pretty sure the dottyop throws the angle bracket counter of track somehow
21:16 psch ...because that's all the data i have :)
21:17 psch well, it's submitted as #127965
21:17 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127965
21:17 psch anyway, yeah, i'm out for the night o/
21:18 masak 'night, psch
21:35 grondilu m: role A[Int $n] { has @.a[$n] }; say class :: does A[3] {}.new(:a(my @ = rand xx 3));
21:35 camelia rakudo-moar 0b8e08: OUTPUT«Type check failed in binding shape; expected Any but got VMNull (?)␤  in code  at /tmp/YtSe95ghJ1 line 1␤  in block <unit> at /tmp/YtSe95ghJ1 line 1␤␤»
21:36 grondilu first time I see a mention of VMNull
21:36 Herby_ joined #perl6
21:36 Herby_ Afternoon, everyone!
21:36 Herby_ \o
21:41 skink Hey Herby_
21:42 cpage_ joined #perl6
21:43 dalek doc: a7976f1 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
21:43 dalek doc: clean up table so columns are clearly defined
21:43 dalek doc: review: https://github.com/perl6/doc/commit/a7976f1350
21:43 dalek doc: 5de332b | (Tom Browder)++ | doc/Type/ (2 files):
21:43 dalek doc: merge
21:43 dalek doc: review: https://github.com/perl6/doc/commit/5de332bc75
21:43 dalek doc: d41a3e8 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
21:43 dalek doc: Merge pull request #455 from tbrowder/master
21:43 dalek doc:
21:43 dalek doc: table clean up
21:43 dalek doc: review: https://github.com/perl6/doc/commit/d41a3e8585
21:47 grondilu m: my num @.x;
21:47 camelia rakudo-moar 0b8e08: OUTPUT«Potential difficulties:␤    Useless generation of accessor method in mainline␤    at /tmp/111gqnGLQ6:1␤    ------> 3my num 7⏏5@.x;␤»
21:47 grondilu m: my num @x;
21:47 camelia rakudo-moar 0b8e08: ( no output )
21:47 grondilu m: my num @x[10];
21:47 camelia rakudo-moar 0b8e08: ( no output )
21:47 grondilu m: my num @x[my $ = 10];
21:47 camelia rakudo-moar 0b8e08: ( no output )
21:48 tadzik nine: I have since discovered the cause of the fuckup, or at least I think so :)
21:48 grondilu m: my $n = 10; my num @x[my $n];
21:48 camelia rakudo-moar 0b8e08: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $n␤    at /tmp/Np2As4Tpgs:1␤    ------> 3my $n = 10; my num @x[my $n7⏏5];␤»
21:48 grondilu m: my $n = 10; my num @x[$n];
21:48 camelia rakudo-moar 0b8e08: ( no output )
21:48 grondilu oh I can do that?
21:51 masak grondilu: I'm a little bit surprised you can.
21:51 masak grondilu: I just checked S09, and S09 is pretty clear that the form of declaration is "compile-time" and for declaring a "fixed-size array"
21:52 masak it's can't be a compile-time declaration if we're using a runtime value, and it can't be fixed-size if it's a variable
21:55 jjido joined #perl6
21:55 masak m: for 1, 5, 10 -> $n { my num @x[$n]; say @x.elems }
21:55 camelia rakudo-moar 0b8e08: OUTPUT«1␤5␤10␤»
21:55 lizmat joined #perl6
21:56 leont_ joined #perl6
21:57 masak then again, this *is* Perl 6. and Perl 6 doesn't like to forbid you to do things that you think might be useful
21:58 cpage_ joined #perl6
22:06 supernovus joined #perl6
22:07 sortiz masak, I'm still surprised that I can declare "lexical" *and* "package scoped" 'my $Foo::Bar::x'   :-)
22:08 supernovus Quick question, I'm trying to fix a bunch of bugs in the Flower library, and I've come across a conundrum. For most things, the 'is rw' isn't needed anymore, and in fact spits out a lovely "Parameter '$blah' expected a writable container, but got XML::Element value" message. So I removed all of the 'is rw' and now most things work, except one method which literally replaces the passed in XML element with a different value. How do I
22:08 yoleaux 29 Dec 2015 16:37Z <hankache> supernovus: can kindly check the PR on https://github.com/supernovus/template6 It adds "use MONKEY-SEE-NO-EVAL" in order for EVAL to work
22:09 timotimo oh, cool you're checking in, supernovus :)
22:09 supernovus I was going through my e-mail, and found a bug report that I hadn't gotten around to fixing, and I have the library almost working except for this one particular hiccup. :-)
22:10 MadcapJake supernovus: you need `is rw` to write to something from outside the routine.
22:10 timotimo if you pass a literal into a function that has "is rw", it'll complain, but if it's a variable, it'll likely work
22:11 polyfloyd joined #perl6
22:11 timotimo and for replacing a value that comes in with something else, you will need "is rw", definitely
22:11 timotimo if the values passed in are instances of some class, "is rw" isn't needed to change attributes on those instances, fwiw
22:11 MadcapJake Yeah it's gotta be a container, right?
22:11 timotimo that's the most common thing you'd do
22:11 timotimo aye
22:12 supernovus For 99% of the methods in this library, removing 'is rw' worked perfectly, as the methods don't actually change the variable, they just change properties on the object instance. In this one case, it reads an property from the object, uses it to look up a different value, and replaces the original $xml object with the new object.
22:14 timotimo right, that soudns exactly like what you'd want "is rw" for
22:14 supernovus Yeah, except that now it complains that the XML object is not a container. How do I create a container?
22:14 supernovus It's really been a long time since I've been active in the Perl 6 world. I'm way behind on things. :(
22:15 MadcapJake Are you binding XML::Element objects to scalars or assigning them?
22:15 timotimo my $foo = XML::Object.new(); XML::MutatingThing($foo)
22:16 dolmen joined #perl6
22:17 MadcapJake Is your work up on github, supernovus ?
22:17 supernovus timotimo: Yes, looking at the code, it creates each XML::Element object using the .new() constructor, then passes it through the parser to process any TAL statements.
22:17 supernovus Yeah, I'll commit the current work to the point I've gotten it to.
22:17 Timbus_ but are you storing it. like in a container
22:18 MadcapJake = creates containers and := binds directly to values
22:19 timotimo if it doesn't go through a variable, it b0rks
22:20 supernovus The Flower source is here: https://github.com/supernovus/flower  it quite possibly needs a full overhaul. I'll check out the XML library to see if the problem lies in it.
22:22 supernovus Everything appears to use = instead of := so I'm not sure what's going on. I'm going to try updating my Rakudo. It may be horridly out of date.
22:23 MadcapJake Where's that particularly troublesome routine?
22:23 supernovus https://github.com/supernovus/flower/b​lob/master/lib/Flower/TAL/TAL.pm6#L72
22:24 timotimo where is it used from?
22:24 timotimo where does that blow up?
22:25 MadcapJake Shouldn't s/$.tales/$!tales/ ?
22:26 timotimo it has $.tales, so it'd be fine
22:26 sufrostico joined #perl6
22:29 supernovus Hmm, tracking backwards, a few places look like they need the 'is rw' trait because of that darn replacement feature.
22:29 timotimo i've searched for "parse-replace" and the only hit i got was for the definition
22:29 timotimo so does nothing ever call that anywhere?
22:29 timotimo how can it blow up, then ...
22:29 supernovus It gets called from https://github.com/supernovus/flow​er/blob/master/lib/Flower.pm6#L184
22:30 timotimo you may want to use "is raw" instead of "is rw" and manually check if it's a writable container for that specific path
22:30 timotimo is raw is a bit similar to is rw, but it won't error out when it doesn't get a writable container
22:33 timotimo you may find .VAR interesting for this
22:33 timotimo m: sub test-it($foo is raw) { try say $foo.VAR }; test-it("hello"); test-it(my $var = "goodbye")
22:33 camelia rakudo-moar 0b8e08: OUTPUT«hello␤"goodbye"␤»
22:33 dalek doc: 3217c8f | (Tom Browder)++ | doc/Language/unicode_texas.pod:
22:33 dalek doc: having trouble adding unicode symbol for e in first column--using ascii e instead--need someone to fix it
22:33 dalek doc: review: https://github.com/perl6/doc/commit/3217c8fbe4
22:33 dalek doc: dea1490 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
22:33 dalek doc: Merge pull request #456 from tbrowder/master
22:33 dalek doc:
22:33 dalek doc: using ascii 'e' for unicode symbol for 'e' in first column
22:33 dalek doc: review: https://github.com/perl6/doc/commit/dea14900fa
22:34 timotimo m: sub test-it($foo is raw) { try say $foo.VAR.perl }; test-it("hello"); test-it(my $var = "goodbye")
22:34 camelia rakudo-moar 0b8e08: OUTPUT«"hello"␤Str.new␤»
22:34 timotimo m: sub test-it($foo is raw) { try say $foo.VAR.WHAT }; test-it("hello"); test-it(my $var = "goodbye")
22:34 camelia rakudo-moar 0b8e08: OUTPUT«(Str)␤(Scalar)␤»
22:34 timotimo that's better
22:41 supernovus I've got it working much better now. I have a few bugs to work out yet. How do I force recompilation of precompiled libraries?
22:44 supernovus Looks like most of the failing tests now have to do with whitespace issues, and the use of any() in some of the tests.
22:47 jolts joined #perl6
22:47 Timbus_ i -think- what you want is actually.. 'is raw' in your dispatcher, but 'is rw' in all of the methods where you are replacing the contents unconditionally?
22:48 TimToady .tell psch #127965 is not a bug because LTM and one-pass parsing
22:48 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127965
22:48 yoleaux TimToady: I'll pass your message to psch.
22:48 Timbus_ otherwise you should be inspecting every raw object to see if it is actually a container..
22:51 supernovus Timbus_: Thanks. I changed all the parse-* methods to use 'is rw' and only kept 'is raw' on the dispatcher methods in Flower.pm6 itself.
22:52 timotimo Timbus_: oh, of course! just using "is rw" for the method that replaces things will automatically give you the error check
22:52 timotimo though you may want to wrap that in a try/catch to give a better error message that points to the underlying problem :)
22:53 Timbus_ yea
22:53 supernovus It's not like Flower is a very widely used template engine, but because it's listed as a dependency of the Web::Template library, it's been breaking things for people using that.
22:54 timotimo i'm heading to bed
22:55 timotimo gnite!
22:55 supernovus Is there a 'recommends' option in the META.info yet?
22:55 supernovus Good night timotimo, thanks for the help!
22:55 timotimo you're very welcome :)
22:59 supernovus Even if there isn't a 'recommends' feature, I could remove Template6, Flower, Template::Mojo, and HTML::Template from the list of dependencies from Web::Template, and just update the README to say you'll need to install the template engine you want to use. Then I can worry about getting Flower fixed up a bit slower as I doubt many people (if any) are using it.
23:01 ifim` joined #perl6
23:02 smls TimToady: While you're deciding if things are a bug or not, can you take a look at #127872 ?
23:02 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127872
23:02 supernovus Looks like Template6 isn't working properly under the newest Rakudo either. Sigh. I've really let these libraries get outdated.
23:04 kid51 joined #perl6
23:05 supernovus Never mind. Because of precompilation, I can't just remove the template engines from Web::Template's dependencies as it's class files require them. Argh.
23:05 masak supernovus: 'recommends' whiffs of overdesign to me. either something is a dependency, or it isn't.
23:05 masak what's a conforming client going to do with 'recommends' information? look at the installed modules and nod in contentment?
23:06 cpage_ joined #perl6
23:06 supernovus I was thinking like .deb packages, where it just says, "you may also want package 'blah'" but yeah, it doesn't work in this case, as without the individual template engines, the class files can't be compiled.
23:07 * masak rests his case
23:16 supernovus Wait, Template6 is working fine. It's just Flower that is broken. I'm going to temporarily remove Flower from Web::Template until I can get it working again.
23:20 supernovus Okay, done. Web::Template and anything depending on it (Web::App::MVC and Web::App::Ballet) should be installable again with no Flower dependency.
23:21 masak TimToady: in `my @x[$n]`, should Perl 6 (a) allow $n to be a dynamic/runtime value, or (b) require it to be static/compile-time?
23:21 masak if (a), are there any consequences/warnings that tell the user that they're using a static construct in a dynamic way?
23:22 ifim`` joined #perl6
23:27 supernovus Well, I'm going to have to run. Have a great day/night everyone. I hope to fix up some of my long neglected libraries at some point when I'm not completely overloaded with work! :-)
23:28 _28_ria joined #perl6
23:30 TimToady smls: looks like a bug to me
23:31 TimToady masak: the warning is that it will run slower :)
23:32 masak TimToady: in other words, no rakudobug. got it, ta.
23:33 masak I think in our case the challenge'll be to make it run faster in the static case ;)
23:33 TimToady it tends to fall out of type specialization et al.
23:34 TimToady but you can declare $n as a constant to proved more kloo
23:34 TimToady *provide
23:34 masak aye, 'course
23:34 masak but Rakudo needs to pick up on that
23:38 masak TimToady: I don't mean to tug your attention too much, but did you have time to ponder http://irclog.perlgeek.de/p​6dev/2016-04-22#i_12376718 ?
23:40 TimToady don't have a strong opinion yet
23:40 masak ok, tha's goodenuf for now
23:41 masak with the enum spec especially, I've known *not* rushing you to lead to a good end result ;)
23:42 cdg joined #perl6
23:53 dalek doc: e7fab01 | (Tom Browder)++ | doc/Language/unicode_texas.pod:
23:53 dalek doc: put ascii commas in correct place for lists > 2 elements
23:53 dalek doc: review: https://github.com/perl6/doc/commit/e7fab01b8a
23:53 dalek doc: 23e0e6b | (Tom Browder)++ | doc/Language/unicode_texas.pod:
23:53 dalek doc: Merge pull request #457 from tbrowder/master
23:53 dalek doc:
23:53 dalek doc: put ascii commas in correct place for lists > 2 elements
23:53 dalek doc: review: https://github.com/perl6/doc/commit/23e0e6b1cb
23:56 maddingue joined #perl6

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

Perl 6 | Reference Documentation | Rakudo