Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-04

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:00 kyclark joined #perl6
00:01 kyclark Sorry, one more question. How do I print Unicode if I have something like “U+26FA"?
00:01 kyclark “say” just prints that literally.
00:02 timotimo you want either \x26fa or chr(0x26fa)
00:02 timotimo and of course there's also \c[SOME LETTER WITH SOME ACCENT OR SOMETHING]
00:06 AlexDaniel u: U+26FA
00:06 unicodable6 AlexDaniel, U+26FA TENT [So] (⛺)
00:06 mcmillhj joined #perl6
00:06 raiph m: put "\c[%]" # LTA error message; I thought it was complaining about the '\c'; plan to RT if not already RT'd
00:06 camelia rakudo-moar f4cbdb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3put "\c[7⏏5%]" # LTA error message; I thought it wa␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
00:07 AlexDaniel m: say “\c[TENT]”
00:07 camelia rakudo-moar f4cbdb: OUTPUT: «⛺␤»
00:07 AlexDaniel raiph: I don't think there's an RT for that
00:07 AlexDaniel raiph: mostly because it's hard for me to see any problem here :)
00:08 AlexDaniel but LTA is LTA, if you think that it is
00:09 raiph m: put "\c[U+26FA]" # I started with a guess ("I seem to recall a \c[...] thing; lemme try that")
00:09 camelia rakudo-moar f4cbdb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [U+26FA]␤at <tmp>:1␤------> 3put "\c[U+26FA7⏏5]" # I started with a guess ("I seem to ␤»
00:11 raiph One more time...
00:11 raiph m: put "\c[“U+26FA"]" # I started with a guess ("I seem to recall a \c[...] thing; lemme try that")
00:11 camelia rakudo-moar f4cbdb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3put "\c[7⏏5“U+26FA"]" # I started with a guess ("I ␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
00:13 raiph but yeah, too marginal, not RT worthy
00:13 raiph AlexDaniel: thx
00:13 AlexDaniel u: star
00:13 unicodable6 AlexDaniel, U+066D ARABIC FIVE POINTED STAR [Po] (٭)
00:13 unicodable6 AlexDaniel, U+06DE ARABIC START OF RUB EL HIZB [So] (۞)
00:13 unicodable6 AlexDaniel, 63 characters in total: https://gist.github.com/c14acb047bbb675d2235874aaccb2fc2
00:14 pierre_ joined #perl6
00:25 mcmillhj joined #perl6
00:26 Geth ¦ ecosystem: 49113f4144 | (Rob Hoelz)++ | META.list
00:26 Geth ¦ ecosystem: Remove Native::Resources from ecosystem
00:26 Geth ¦ ecosystem:
00:26 Geth ¦ ecosystem: It's deprecated
00:26 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/49113f4144
00:27 timotimo oooh hoelzro is here!
00:27 timotimo :)
00:31 hoelzro o/
00:31 hoelzro blame Zoffix and samcv for filing PRs against modules and forcing me to do work ;)
00:32 samcv clicking one button ;P :? heh
00:32 hoelzro haha, yes
00:32 hoelzro although I'm going to look into that Linenoise multibyte stuff this weekend
00:32 samcv oh that issue. yeah
00:33 samcv will love you so much if you get that working!
00:33 samcv that's the only reason Readline is better than the linenoise one, becuase of the utf-8 support
00:33 hoelzro I'll do what I can!
00:33 samcv and since it's in Star, you'll be a 🌟 if you can do it!
00:33 samcv thank you :)
00:33 hoelzro I started on it last April (ugh so long ago), but I decided "oh hey, maybe I'll just write a pure Perl line editor"
00:33 hoelzro that way lies madness
00:34 hoelzro and demotivation to work on Perl 6 stuff
00:34 samcv heh
00:35 timotimo hoelzro: we're putting a cflag into moarvm to make sure our linux-based devs don't break the msvc build, but stuff like LibraryMake will take the CFLAGS and run with 'em for any random code out there
00:35 timotimo we need a way to fix this
00:35 timotimo also, wanna kick the parrot code path out? :D
00:36 hoelzro "make sure our linux-based devs don't break the msvc build" - haha, that *never* happens...
00:36 hoelzro ;)
00:37 hoelzro timotimo: kick out as in remove it?
00:37 timotimo well, we have at least the one thing that keeps us from committing obviously broken stuff
00:37 timotimo yeah
00:37 timotimo we haven't had rakudo supporting parrot for a long while
00:37 hoelzro right
00:37 hoelzro I need to get back up to speed
00:37 hoelzro I've been thinking about contributing again
00:37 timotimo neato
00:39 samcv timotimo, why do will still not have Appveyor for MoarVM?
00:40 samcv need to bug jnthn to add/authorize it or what?
00:40 timotimo right, jnthn will have to push the magic button
00:41 mcmillhj joined #perl6
00:47 Cabanossi joined #perl6
00:50 zacts joined #perl6
00:51 Actualeyes joined #perl6
01:24 poohman joined #perl6
01:26 wigner joined #perl6
01:29 poohman_ joined #perl6
01:30 poohman_ m: say "test";
01:30 camelia rakudo-moar f4cbdb: OUTPUT: «test␤»
01:35 mcmillhj joined #perl6
01:47 poohman joined #perl6
01:47 poohman m: say " test";
01:47 camelia rakudo-moar f4cbdb: OUTPUT: « test␤»
01:47 pierre_ joined #perl6
01:49 ilbot3 joined #perl6
01:49 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:49 raschipi joined #perl6
01:58 AlexDaniel m: say ‘test test test!’
01:58 camelia rakudo-moar f4cbdb: OUTPUT: «test test test!␤»
02:00 skids m: my $a = "H"; say $a [R~]= "T"; $a.say; $a [R~]= "W"; $a.say
02:00 camelia rakudo-moar f4cbdb: OUTPUT: «Potential difficulties:␤    Useless use of [R~]= in sink context␤    at <tmp>:1␤    ------> 3 $a = "H"; say $a [R~]= "T"; $a.say; $a 7⏏5[R~]= "W"; $a.say␤TH␤TH␤WTH␤»
02:00 skids useless useless use. :)
02:01 * skids looks for prexisting RT.
02:14 * skids made RT#131251
02:14 raschipi #131251
02:14 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131251
02:16 BenGoldberg m: use experimental :macros; macro infix:<plus>($a, $b) { return quasi { {{{$a}}} + {{{$b}}} } }; say 2 plus 3;
02:16 camelia rakudo-moar f4cbdb: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 2 in sink context (line 1)␤Useless use of constant integer 3 in sink context (line 1)␤5␤»
02:17 BenGoldberg skids, Think it's related?
02:20 mcmillhj joined #perl6
02:23 lookatme joined #perl6
02:26 skids I'd be more inclined to think it has something to do with something not figuring out it's an assignment op, as it complains about the operator not operands.
02:27 skids (And probably macro "bugs" are premature given that whole area is likely  to be overhauled before making it out of experimental)
02:28 skids not that roast tests are ever premature.
02:39 labster joined #perl6
02:45 Eddward joined #perl6
02:45 Eddward Anyone seen an error like this when building star?  https://pastebin.com/BGmHhVfh
02:47 Eddward oh.  I'm an idiot.  Nevermind.
02:51 lookatme :)
02:52 mcmillhj joined #perl6
03:02 Cabanossi joined #perl6
03:03 cpage__ joined #perl6
03:03 john51 joined #perl6
03:04 bjz joined #perl6
03:04 jcallen_ joined #perl6
03:05 xfix_ joined #perl6
03:05 cpage___ joined #perl6
03:05 kentnl joined #perl6
03:06 ilmari_ joined #perl6
03:06 bonsaikitten joined #perl6
03:07 avalenn_ joined #perl6
03:07 Woodi_ joined #perl6
03:07 rblackwe joined #perl6
03:07 petercommand joined #perl6
03:07 mr-fooba_ joined #perl6
03:08 skids Mr. Meeseeks?
03:14 robertle joined #perl6
03:16 grondilu joined #perl6
03:17 lookatme joined #perl6
03:20 poohman_ joined #perl6
03:21 bjz joined #perl6
03:22 poohman__ joined #perl6
03:24 Actualeyes joined #perl6
03:31 Cabanossi joined #perl6
03:33 bjz joined #perl6
03:55 mcmillhj joined #perl6
03:56 dj_goku joined #perl6
03:56 dj_goku joined #perl6
03:59 aborazmeh joined #perl6
03:59 aborazmeh joined #perl6
04:27 wamba joined #perl6
04:40 curan joined #perl6
05:10 AlexDaniel joined #perl6
05:12 clkao joined #perl6
05:12 Spot__ joined #perl6
05:25 colomon joined #perl6
05:27 lowbro joined #perl6
05:27 lowbro joined #perl6
05:31 Cabanossi joined #perl6
05:35 ufobat joined #perl6
05:37 pierre_ joined #perl6
05:38 rindolf joined #perl6
05:41 xtreak joined #perl6
05:42 azawawi joined #perl6
05:42 azawawi Good morning
05:43 azawawi http://pasteboard.co/26lEVUa0L.png  # Perl 6 ASCii Art 3D Cube , Sine/Cosine waves and kitchen sink example in all-in-one screenshot :)
05:44 azawawi https://github.com/azawawi/perl6-terminal-caca/tree/master/examples # :)
05:44 azawawi Feedback welcomed
05:45 mcmillhj joined #perl6
05:47 titsuki joined #perl6
05:54 astj joined #perl6
05:59 raiph joined #perl6
06:04 raiph joined #perl6
06:13 CIAvash joined #perl6
06:23 raiph joined #perl6
06:27 raiph joined #perl6
06:27 wamba joined #perl6
06:29 lookatme m: sub f(*%args) { dd %args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
06:29 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
06:29 lookatme Why first call with `1 => 2, 3 => 4` failed ? --?
06:30 raiph joined #perl6
06:31 samcv lookatme, because (1 => 2, 3 => 4) is two pairs
06:31 Cabanossi joined #perl6
06:31 samcv m: say (1 => 2, 3 => 4).WHAT
06:31 camelia rakudo-moar f4cbdb: OUTPUT: «(List)␤»
06:32 samcv m: sub f(*%args) { dd *%args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
06:32 camelia rakudo-moar f4cbdb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    args used at line 1␤␤»
06:32 lookatme m: say (f => 5, z => 6).WHAT
06:32 camelia rakudo-moar f4cbdb: OUTPUT: «(List)␤»
06:32 poohman joined #perl6
06:32 samcv hmm see you have *%blah
06:32 mcmillhj joined #perl6
06:32 samcv m: sub f(*%args) { dd %args; }; try { f({1 => 2, 3 => 4}); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
06:32 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
06:33 samcv hmm sec lemme look closer
06:33 samcv at first thought you didn't use *%args
06:33 lookatme em
06:33 lookatme What should i use ?
06:35 lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(1 => 2); f(f => 5);
06:35 camelia rakudo-moar f4cbdb: OUTPUT: «(Pair)␤1 => 2␤Too few positionals passed; expected 1 argument but got 0␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
06:35 samcv hmm ok so that wasn't the reason but
06:36 samcv since  f(f => 5, z => 6) is a list of paris too
06:36 samcv gonna try something out hold on
06:37 lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(f => 5);
06:37 camelia rakudo-moar f4cbdb: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
06:38 lookatme But on my rakudo, it's work fine
06:38 lookatme This is Rakudo version 2017.03 built on MoarVM version 2017.03
06:39 lookatme Let me try again.
06:39 samcv m: my $b = f => 5, z => 6;
06:39 camelia rakudo-moar f4cbdb: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "z => 6" in sink context (lines 1, 1)␤»
06:39 samcv ok there is the problem lookatme
06:39 samcv m: my $b = 'f' => 5, 'z' => 6;
06:39 camelia rakudo-moar f4cbdb: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "=>" in expression "'z' => 6" in sink context (line 1)␤»
06:40 lookatme m: sub f(%arg) { say %arg.WHAT; dd %arg; }; f(1 => 5);
06:40 camelia rakudo-moar f4cbdb: OUTPUT: «(Pair)␤1 => 5␤»
06:40 samcv m: my $b = {'f' => 5, 'z' => 6};
06:40 camelia rakudo-moar f4cbdb: ( no output )
06:40 samcv sub f(*%args) { say %args; }; f(:what, :is, :this(4), :hi(10))
06:41 samcv m: sub f(*%args) { say %args; }; f(:what, :is, :this(4), :hi(10))
06:41 camelia rakudo-moar f4cbdb: OUTPUT: «{hi => 10, is => True, this => 4, what => True}␤»
06:41 samcv m: sub f(*%args) { dd %args; }; f(:what, :is, :this(4), :hi(10))
06:41 camelia rakudo-moar f4cbdb: OUTPUT: «{:hi(10), :is, :this(4), :what}␤»
06:42 samcv m: sub f(*%args) { dd %args; }; try { f |(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
06:42 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
06:42 lookatme m: dd \(f => 5); dd \(1 => 5);
06:42 camelia rakudo-moar f4cbdb: OUTPUT: «\(:f(5))␤\(1 => 5)␤»
06:43 lookatme What's difference from `:f(5)` and `1 => 5`
06:43 lookatme s/from/between/
06:45 samcv lookatme, well if you want to pass a list of pairs you should use *@array
06:45 samcv the *%blah is slurpy parameters not a slurpy list
06:46 samcv it suprised me a bit too this different functionality but it makes some sense. *%args is supposed to be parameters, and parameters are usually written :foo('bar') notation when you give it to a sub
06:46 samcv so it gives it as different args and not as a list
06:46 samcv if that makse sense
06:46 samcv this => 'that', foo => 'bar # is a List of pairs
06:46 samcv the other one is more than one argument
06:47 lookatme Em, When should I use *%args ?
06:47 samcv if you accept arguments
06:47 samcv that you want put in a hash
06:47 lookatme What argument ?
06:48 mcmillhj joined #perl6
06:48 samcv i use one in one of my modules lemme show you
06:48 samcv https://github.com/samcv/IRC-TextColor/blob/master/IRC/TextColor.pm6#L68-L76
06:49 samcv and see the pod comment above the function
06:50 samcv also lets you have any arguments you want
06:51 rindolf joined #perl6
06:51 lookatme So I call that fun like this `ircstyle('...', | %irc-styles)` ??
06:51 lookatme Is this right ?
06:52 samcv no
06:52 samcv well maybe you can i haven't tried
06:52 samcv but
06:52 samcv ircstyle('text', :bold, :green) # usually called like that
06:52 lookatme I think it's ok.
06:52 samcv which gives you %hash = 'bold' => True, 'green' => True
06:53 lookatme But I think `ircstyle('text', :bold, :green)` and `ircstyle('text', bold => True, green => True)` is equal ..
06:53 samcv bisectable6,  m: sub f(*%args) { dd %args; }; try { f(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6)
06:53 bisectable6 samcv, On both starting points (old=2015.12 new=f4cbdb6) the exit code is 0 and the output is identical as well
06:53 bisectable6 samcv, Output on both points: «FAIL!!␤{:f(5), :z(6)}»
06:54 lookatme Maybe I dont' get your point .
06:54 samcv hmm
06:54 samcv m: sub f(Str $s, *%args) { dd %args; }; try { f('string', 1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
06:54 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
06:55 poohman_ joined #perl6
06:55 samcv oh i get it!
06:55 lookatme I just expect `f(1 => 2, 3 => 4)` is working with that signature
06:55 samcv ok. here you go
06:55 samcv lookatme, you can't have arguments that are numbers!
06:55 samcv finally clicked in my mind
06:55 lookatme Oh ?why ..
06:56 samcv you can't have a variable named $8 or whatever
06:56 lookatme Em.
06:56 samcv sub f ( $8, $3) that's what it's like
06:56 samcv and you can't have that
06:56 samcv becuse it's passed as arguments to the function (passed as NAMED arguments)
06:56 samcv that is
06:57 samcv have you learned about named arguments lookatme ?
06:57 lookatme Yeah, I know that.
06:57 samcv m: sub f (:$foo, :$bar) { say $foo, say $bar}; f(:foo('hi'), :bar('no'))
06:57 camelia rakudo-moar f4cbdb: OUTPUT: «no␤hiTrue␤»
06:57 lookatme It can be write like name => value, :name(value)
06:58 samcv so the first thing in the pair is the name of the named argument
06:58 samcv it doesn't pass as an actual pair
06:58 lookatme Oh, I got it !
06:58 samcv yeah it confused me too for a while! hah
06:58 lookatme It's a big trap..
06:58 samcv heh
06:58 samcv well when you %*args it assumes they're all named
06:59 samcv since that's what it's for. if you did some other variable that wasn't named then you'd probably be fine
06:59 lookatme I use `%args` before, it all work fine, so I confused ...
06:59 samcv m: sub f ($a, $b) { dd $a; dd $b }; f(this=>'that', here=>'there')
06:59 camelia rakudo-moar f4cbdb: OUTPUT: «Too few positionals passed; expected 2 arguments but got 0␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
06:59 lookatme m: sub f(Str $s, *%args) { dd %args; }; try { f('string', |(1 => 2, 3 => 4)); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
06:59 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
07:00 samcv m: sub f ($a, $b) { dd $a; dd $b }; f((this=>'that'), (here=>'there'))
07:00 camelia rakudo-moar f4cbdb: OUTPUT: «Pair $a = :this("that")␤Pair $b = :here("there")␤»
07:01 samcv lookatme, with how many pairs?
07:01 lookatme m: sub f(Str $s, *%args) { dd %args; }; try { f('string', |(1 => 2), |(3 => 4)); CATCH { default { "FAIL!!".note; } } }; f('string', f => 5, z => 6)
07:01 camelia rakudo-moar f4cbdb: OUTPUT: «{"1" => 2, "3" => 4}␤{:f(5), :z(6)}␤»
07:01 samcv you can do this:
07:01 samcv m: sub f (%args) { dd %args}; f ({a => 'b', b=>'c'})
07:01 camelia rakudo-moar f4cbdb: OUTPUT: «Hash % = {:a("b"), :b("c")}␤»
07:01 Cabanossi joined #perl6
07:02 lookatme samcv, I just play with that
07:02 samcv yeah, use { } around the pairs so it acts as a hash
07:02 samcv in most cases you *don't* want *%hash. but *@args is pretty easy to use
07:02 samcv and just lets you use as many arguments you want
07:03 parv joined #perl6
07:03 samcv but yeah, be careful with lists of things vs arguments
07:03 samcv since f('a', 'b') is two arguments but f(('a','b')) is one etc
07:03 lookatme `|(1 => 2)` work fine.
07:03 samcv yeah it sems so
07:03 samcv i had tried to do that before but i guess i did it wrong :|
07:03 lookatme Em, should be careful..
07:04 samcv let me see what i did wrong
07:04 mcmillhj joined #perl6
07:04 samcv ah i did this:
07:04 samcv m:  sub f(*%args) { dd %args; }; try { f |(1 => 2, 3 => 4); CATCH { default { "FAIL!!".note; } } }; f(f => 5, z => 6);
07:04 camelia rakudo-moar f4cbdb: OUTPUT: «FAIL!!␤{:f(5), :z(6)}␤»
07:04 lookatme I use it for `method new`, so I can dont' care about what passed
07:04 samcv put the | in front of both
07:05 samcv lookatme, you are making a custom method new?
07:05 lookatme Em, you can do what you want in that custom new
07:05 samcv curious about your reasons. i've never had to do that myself. i've used TWEAK though, because it's a lot easier. and let perl 6 handle the args
07:05 samcv have you heard about TWEAK?
07:06 lookatme No.
07:06 samcv it's really nice!
07:06 samcv https://docs.perl6.org/language/objects#index-entry-TWEAK
07:06 dct joined #perl6
07:06 lookatme Oh, I will check that
07:06 samcv much safer because it doesn't override any perl6 constructor methods :)
07:06 samcv i think we got it like start of thsi year
07:07 samcv oh november of 2016 actually it was added
07:08 lookatme Is *rakudo* will pass all arguments to TWEAK ?
07:08 samcv uhm no
07:08 lookatme I mean you can initialize private attribute.
07:08 samcv so you setup your variables with 'has'
07:08 samcv and pass those to 'new'
07:08 samcv then in TWEAK you do what you want with those variables
07:09 samcv and "get the object ready" and do whatever work or initialize what variables you want
07:10 samcv if you make your own new you don't get the built in initialization of passed arguments -> private variables
07:10 samcv but you may/may not want that, i'm not sure what you're doing :-)
07:10 mcmillhj joined #perl6
07:11 lookatme Em, you are right
07:11 samcv i like to just pass them in with the default .new, and then do all the actions i need in TWEAK. though i haven't needed to have arbitrary arguments before
07:12 lookatme I should do something practice about `TWEAK`
07:12 samcv even if it doesn't fix this exact thing you're trying to do, it will surely be very useful in the future
07:12 lookatme Em, override new actually not a good idea.
07:13 lookatme Em, it could be
07:14 lookatme And, samcv thanks for your help.
07:14 samcv no problem!
07:19 lookatme samcv, Great, TWEAK received all named arguments
07:20 lookatme m: class H { submethod TWEAK(|c) { dd c; }; }; H.new(a => 3, b => 3, fa => 4);
07:20 camelia rakudo-moar f4cbdb: OUTPUT: «\(:a(3), :b(3), :fa(4))␤»
07:24 geekosaur joined #perl6
07:26 mcmillhj joined #perl6
07:28 labster joined #perl6
07:29 samcv oh it did :) good to know
07:29 samcv awesome! we both learned things :)
07:32 dakkar joined #perl6
07:32 domidumont joined #perl6
07:34 jonas1 joined #perl6
07:36 anton_p joined #perl6
07:38 domidumont joined #perl6
07:39 Actualeyes joined #perl6
07:42 mcmillhj joined #perl6
07:43 pierre_ joined #perl6
07:45 domidumont joined #perl6
07:46 Cabanossi joined #perl6
07:49 zakharyas joined #perl6
08:11 wamba joined #perl6
08:12 lookatme joined #perl6
08:15 bjz joined #perl6
08:17 mcmillhj joined #perl6
08:23 espadrine_ joined #perl6
08:24 lookatme joined #perl6
08:31 Cabanossi joined #perl6
08:32 espadrine joined #perl6
08:35 mcmillhj joined #perl6
08:43 xtreak joined #perl6
08:48 lowbro joined #perl6
09:01 robertle joined #perl6
09:05 xtreak joined #perl6
09:09 mcmillhj joined #perl6
09:10 colomon joined #perl6
09:13 clkao joined #perl6
09:21 Actualeyes joined #perl6
09:23 xtreak_ joined #perl6
09:45 poohman joined #perl6
09:46 pierre_ joined #perl6
09:48 wamba joined #perl6
09:51 geekosaur joined #perl6
09:58 Geth Swapped META.info → META6.json in 2 dists in https://github.com/perl6/ecosystem/commit/8a48a6381c
09:59 xtreak joined #perl6
10:01 xtreak joined #perl6
10:06 darutoko joined #perl6
10:20 itsame joined #perl6
10:28 MorayJ joined #perl6
10:31 Cabanossi joined #perl6
10:41 anton_p joined #perl6
11:00 bjz_ joined #perl6
11:06 poohman_ joined #perl6
11:39 bjz joined #perl6
11:42 xtreak joined #perl6
11:44 garas joined #perl6
11:44 xtreak joined #perl6
11:44 garas how does it works with zef? can it download any older version of a module?
11:44 garas where does one finds the list of versions?
11:49 garas not from the tags on github, apparently
11:57 araraloren joined #perl6
11:59 wamba joined #perl6
12:02 garas m: my $f; class B { has $!a; }; my $c= B.new: :$f; dd $c;  # What is this thing really doing?
12:02 camelia rakudo-moar 2fb687: OUTPUT: «B $c = B.new␤»
12:07 garas m: class B { has $a; }; my $c= B.new: "cest", "nimporte", "qua"; dd $c;
12:07 camelia rakudo-moar 2fb687: OUTPUT: «Default constructor for 'B' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»
12:07 garas m: class B { }; my $c= B.new: :a("cest"), :b("nimporte"), :c("qua"); dd $c;
12:07 camelia rakudo-moar 2fb687: OUTPUT: «B $c = B.new␤»
12:09 jnthn :$f just means :f($f)
12:10 jnthn The default new just passes the named arguments into the default construction process. That in turn makes them available to each class in the inheritance chain to use.
12:11 jnthn The default BUILD semantics are to see if there are any public attributes (those declared $.foo) and if there's an argument with name foo, then populate the attribute with that value.
12:12 jnthn Since your class doesn't declare any custom construction logic nor have any public attributes, then the named arguments being passed go unused.
12:12 brrt joined #perl6
12:13 brrt left #perl6
12:16 garas passing unuseful arguments seems like a really associal behaviour
12:17 garas the person which is trying to understand the code will try to figure out what in fact is nothing
12:20 g4 joined #perl6
12:20 g4 joined #perl6
12:22 jnthn Well, yes, I'm not sure why anybody would pass knowingly unused arguments. :-)
12:23 nadim joined #perl6
12:23 nadim morning, how does one say things on STDERR?
12:24 MasterDuke_ note() is one way
12:24 Woodi_ hi #perl6 :)
12:25 Woodi_ we don't use luajit anymore ? there is new version available. but cannot found it in 3rdparty/
12:25 nadim MasterDuke_: thanks
12:25 nadim Woodi_: yo!
12:25 Woodi_ hi nadim :)
12:27 MasterDuke_ Woodi_: i think MoarVM just uses a library from luajit, dynasm maybe?
12:28 jnthn Yes, dynasm
12:28 jnthn Which is a build time dependency rather than a runtime one
12:29 Woodi_ right, it's in
12:29 jnthn And I believe what we have is actually a dynasm fork
12:29 jnthn That adds dynamic register selection
12:30 Woodi_ just luajit changelog looked strange to me :) like: some strange bugs was fixed :)
12:30 pmurias joined #perl6
12:30 pmurias left #perl6
12:30 pmurias joined #perl6
12:30 jnthn Once a VM gets to a certain point, most of the bugs left to fix are strange ones :-)
12:30 jnthn 'cus the boring ones were already shaken out
12:31 Woodi_ jnthn: still cannot accept that, even it's pretty logical :)
12:31 nadim joined #perl6
12:32 Woodi_ "just start from Hallo World and proceed with caution" seems so simple :)
12:34 Woodi_ Dijkstra wrote two things: 1. programing is for smarter ppls; but also 2. abstraction should make things better understendable :)
12:35 raschipi joined #perl6
12:35 Woodi_ and gov's around the clock trying to craft more programmers ;)
12:37 [Coke] ff
12:46 ChoHag joined #perl6
12:49 pmurias jnthn: speaking of boring VM stuff have you seen my coerce_s_n PR? ;)
12:49 yoleaux 2 May 2017 16:10Z <Zoffix> pmurias: I was wrong. The .Str/.Stringy/.gist/.perl on Baggies is supposed to be ordered (RT#131244), but the fix will be in Rakudo, so I don't think any chances to JS backend to handle this are needed.
12:49 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131244
12:51 mcmillhj joined #perl6
12:53 jnthn pmurias: Saw it's there; didn't get chance to review it just yet :(
12:53 jnthn Will get to it shortly, I'm almost caught up with stuff :)
12:54 geekosaur joined #perl6
12:55 eater Woodi_: who is Dijkstra https://en.wikipedia.org/wiki/Dijkstra
12:56 eater found him .-.
12:59 MasterDuke_ nadim: also $*ERR.say()
13:00 Woodi_ eater: he is proverbial ultimate programmer :)
13:01 Woodi_ btw. it's crazy ! Knuth was designing algoritms on the beach ! ;)
13:01 araraloren oh, ultimate ..
13:02 pmurias Woodi_: wasn't he more of a computer scientist rather than a programmer?
13:03 eater ^
13:03 Woodi_ pmurias: IMO no. before MS Dos there was not many clean computer scientists
13:04 Woodi_ uh, *DOS :)
13:04 eater clean?
13:04 Woodi_ but i should not say about things older then me without proper history books :)
13:07 geekosaur joined #perl6
13:07 raschipi TimToady: Do you think? "There wasn't a clear distinction between Computer Scientists and Programmers before microcomputer programming environments"
13:09 raschipi Woodi_: Is my reformulation correct?
13:09 garas jnthn what is the rationale in not explicitly pass the parameters passed to the BUILDs of classes higher in hierarchy
13:09 garas ?
13:09 raschipi Woodi_: Because there was BASIC before MS-DOS
13:13 Woodi_ raschipi: if you want 0-1 answer pleas note, that I sayd "not many" :)  but for sure before PC's there was much less clean programmers becouse c.s. are usually programmers too.
13:14 Woodi_ btw. is it incredibly important I'm 100% correct with sentences ? :) tell me better wersion
13:14 raschipi Well, I didn't pretend my formulation wasn't fuzzy too.
13:16 timotimo huh. i'd say a computer scientist who programs is less clean than one who doesn't
13:16 timotimo though i would call it "pure", rather than "clean"
13:17 Woodi_ timotimo: it's the same
13:17 jnthn garas: I'm not sure I understand what you're asking; what would be explicitly passed where?
13:18 jnthn BUILD is called automatically by BUILDALL, which is the thing that calls BUILD/TWEAK methods from the top down
13:25 pat_js joined #perl6
13:26 garas m: class A { has $.a; }; class B is A { has $.b; }; my $i = B.new: :a(2); dd $i  # :a(2) is passed not explicitly to A
13:26 camelia rakudo-moar 2fb687: OUTPUT: «B $i = B.new(b => Any, a => 2)␤»
13:27 garas I'm used to C++, it is difficult to understand the logic behind all this
13:28 garas m: class A { has $.a; }; class B is A { has $.b; }; my $i = B.new: :c(3); dd $i  # :c(3) is just junk
13:28 camelia rakudo-moar 2fb687: OUTPUT: «B $i = B.new(b => Any, a => Any)␤»
13:28 skids joined #perl6
13:29 raschipi garas: https://docs.perl6.org/language/objects#index-entry-TWEAK
13:29 imcsk8 joined #perl6
13:30 garas Imagine I am a programmer, I open lib/B.pm and I search for a; I find nothing.. What am I supposed to do?
13:31 raschipi garas: imagine those were C structs instead of objects.
13:31 wamba m: say -2.polymod: 3, 3,
13:31 camelia rakudo-moar 2fb687: OUTPUT: «-3␤»
13:32 jnthn In general, methods in Perl 6 will happily accept and discard unrecognized named arguments.
13:32 raschipi You may find this architecture in poor taste, but P6 won't stop anyone from doing it.
13:32 wamba m: say -2.polymod: 3,
13:32 camelia rakudo-moar 2fb687: OUTPUT: «-2␤»
13:32 jnthn For the sake of allowing inheritance to be useful
13:32 wamba m: say -2.polymod: 3, 3, 3
13:32 camelia rakudo-moar 2fb687: OUTPUT: «-4␤»
13:32 jnthn (Presuming that many cases of inheritance will end up calling to to the base class using callsame() or similar)
13:33 garas jnthn raschipi : the problem, from the user point of view, is to understand where a given parameter will be useful
13:33 garas since they can end up anywhere in the hierarchy
13:34 raschipi That should be in the docs :)
13:35 jnthn Well, that's one argument. The other one is that if you specify it at the point of construction then you tightly couple the instantiation to the implementation structure.
13:35 jnthn Which would in turn frustrate refactoring later
13:35 jnthn Especially when wanting to pull parts of classes out in to roles, which is relatively common
13:36 timotimo really, perl6 should have taken the object model from hq9++, that way it'd be easiest for the user
13:38 raschipi Yes, HQ9++ objects just work.
13:40 nowan_ joined #perl6
13:41 timotimo no surprises when you have one of those
13:45 luiz_lha joined #perl6
13:45 MasterDuke_ i'd never heard of hq9+ before, i google it and find there's a Parrot implementation ( http://bschmalhofer.github.io/hq9plus/ )
13:48 pmurias garas: hopefully our IDE/editor support and/or doc tools will show you what uses a given named argument
13:51 garas Thanks, I understood how it works
13:53 itsame joined #perl6
13:53 dct joined #perl6
13:57 itsame joined #perl6
14:07 ChoHag_ joined #perl6
14:14 AlexDaniel joined #perl6
14:15 cdg joined #perl6
14:15 st_elmo joined #perl6
14:23 kurahaupo joined #perl6
14:24 itaipu joined #perl6
14:29 haxmeister joined #perl6
14:31 Cabanossi joined #perl6
14:32 AlexDaniel joined #perl6
14:39 bjz joined #perl6
14:39 kyclark joined #perl6
14:58 azawawi joined #perl6
14:58 azawawi hi :)
14:59 azawawi timotimo: ping
14:59 timotimo hey azawawi
14:59 azawawi timotimo: http://pasteboard.co/26lEVUa0L.png  # Perl 6 ASCii Art 3D Cube , Sine/Cosine waves and kitchen sink example in all-in-one screenshot :)
15:01 timotimo pretty cool
15:03 azawawi timotimo: need to figure out the bitmap dithering part. Found an interesting link https://github.com/algernon/cake-is-a-lie/blob/master/src/cake-is-a-lie.c
15:04 azawawi timotimo: imlib2 + libcaca
15:04 azawawi timotimo: any progress on libsixel?
15:05 timotimo no progress since we last spoke
15:06 raschipi azawawi: Did you get a rount tuit for Camelia?
15:07 Khisanth joined #perl6
15:08 moritz azawawi++
15:10 hoelzro joined #perl6
15:14 itaylor57 joined #perl6
15:16 azawawi raschipi: no i was actually busy eating grape leaves :)
15:17 azawawi moritz: thx
15:21 raschipi Something I always do with grape leaves is to infuse them into liqueur.
15:23 azawawi https://github.com/mrhdias/perl6-Imlib2/pulls  # Anyone know if the maintainer of this excellent library is active or not?
15:27 TreyHarris azawawi: you can go to the user's page to see a graph of activity. Looks like from https://github.com/mrhdias he's been inactive since late February.
15:27 TreyHarris s/late/mid
15:31 hoelzro ooc, how did I get banned from #perl6-release?
15:31 yqt joined #perl6
15:32 azawawi TreyHarris: thx
15:38 ZofBot joined #perl6
15:40 jaush joined #perl6
15:41 jaush hi.  i just downloaded "rakudo-star-2017.04.1-x86_64 (JIT).msi" - after installation, trying to run perl6.bat from cmd.exe, i get the error "The application was unable to start correctly (0xc000007b). Click OK to close the application."
15:42 jaush then, additional errors from the crash report - where do i sent those?  should i paste them here?  rakudo 2017.01 works without issue on this machine.
15:43 timotimo please use some on-line pasting service for the additional data
15:44 jaush certainly:  https://pastebin.com/chDjkpN3
15:45 timotimo wow, that is spectacularly unhelpful
15:45 jaush is that directed toward me?  what else would you like - i don't do windows native app programming
15:45 timotimo nah, it's a complaint about microsoft making all their stuff useless
15:46 jaush i'm not opposed to installing a debugger and running it under that if you can point me at some instructions
15:47 timotimo i don't do windows programming either :(
15:47 gfldex i will test it in a clean VM
15:48 timotimo there have been reports that strawberry perl has to be installed to satisfy some kind of dependency
15:48 timotimo but that supposedly comes with a "couldn't find blahblah.dll" message
15:48 timotimo not this appcrash thing
15:48 jnthn That error code looks vaguely familiar. A quick google suggests that it can indicate a 32-bit vs 64-bit mess-up (like a 64-bit executable tries to load a 32-bit DLL), which is probably where I've seen it from.
15:49 jnthn I should add "familiar from elsewhere", not "familiar from trying to use this MSI" :)
15:56 khw joined #perl6
16:01 Cabanossi joined #perl6
16:01 jaush fwiw, here's the crash when launched under windbg.exe (not 100% sure the command-line arguments have the same semantics as they do from the .bat):  https://pastebin.com/qJHxTT0D
16:02 jaush with the "Debug child processes also" option checked
16:04 jaush here's one where i actually hit "Go" on the debugger and get the same exception (i have no idea what i'm doing ;)):  https://pastebin.com/uqf39YvR
16:07 TreyHarris Is there an easy way to strip POD from example block code?
16:08 jaush if i rename C:\Program Files (x86)\GNU\GnuPG\pub\libgcc_s_sjlj-1.dll moar complains it doesn't exist, rather than crashing...
16:09 timotimo oh lord
16:09 timotimo so maybe installing strawberry perl will help, because then you'll also have a 64bit version of that?
16:17 mcmillhj joined #perl6
16:17 drrho_ joined #perl6
16:21 jaush 2017.01 worked fine - if 2017.04 added a new .dll dependency, shouldn't that be part of the installer/install process?
16:22 TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { say "inside"; if (.can('resumable') && .resumable) { .resume } }}; say "outside";
16:22 camelia rakudo-moar 2fb687: OUTPUT: «inside␤This representation (VMException) does not support associative access (for type BOOTException)␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:22 TreyHarris ^^ why? And how, then, can I do this check?
16:23 TreyHarris sorry
16:24 TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.can('resumable') && .resumable) { .resume } }}}; say "outside";
16:24 camelia rakudo-moar 2fb687: OUTPUT: «inside␤This representation (VMException) does not support associative access (for type BOOTException)␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:24 TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside";  .resume }}}; say "outside";
16:24 camelia rakudo-moar 2fb687: OUTPUT: «inside␤outside␤»
16:26 TreyHarris it *is* resumable... I just can't check whether it is in an exception. (At the REPL if I create but do not throw an X::TypeCheck::Binding::Parameter, I can check it. Just not inside a handler.)
16:27 TreyHarris Granted this is not a generally useful (or wise) thing to do, but it is useful for test cases.
16:28 Perl6Noob joined #perl6
16:29 Perl6Noob m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can("resumable")) { .resume } }}}; say "outside";
16:29 camelia rakudo-moar 2fb687: OUTPUT: «inside␤outside␤»
16:29 Perl6Noob That's just a bug with .resumable method
16:30 Perl6Noob https://github.com/rakudo/rakudo/blob/nom/src/core/Exception.pm#L75
16:30 ribasushi joined #perl6
16:31 Cabanossi joined #perl6
16:31 mcmillhj joined #perl6
16:31 Perl6Noob m: use nqp; try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { dd nqp::getattr(nqp::decont($_), Exception, '$!ex').^name}}};
16:31 camelia rakudo-moar 2fb687: OUTPUT: «"BOOTException"␤»
16:32 TreyHarris try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can('resumable') && .resumable) { .resume } }}}; say "outside";
16:32 TreyHarris m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { default { say "inside"; if (.^can('resumable') && .resumable) { .resume } }}}; say "outside";
16:32 camelia rakudo-moar 2fb687: OUTPUT: «inside␤This representation (VMException) does not support associative access (for type BOOTException)␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:32 jnthn Yowser, that resumable method looks like a fossil from the Parrot days
16:32 Perl6Noob m: use nqp; warn 42; CONTROL { default { dd nqp::getattr(nqp::decont($_), Exception, '$!ex').^name} }
16:32 camelia rakudo-moar 2fb687: OUTPUT: «"BOOTException"␤»
16:32 TreyHarris Perl6Noob: ^^ .^resumable would be incorrect.
16:33 Perl6Noob jnthn: what should it be?
16:33 jnthn Probably we should just toss it
16:33 Perl6Noob Ah
16:33 jnthn Well, there's not currently a way to ask
16:33 jnthn But resuming any old exeption is not likely to go well
16:33 Perl6Noob TreyHarris: $foo.^bar is just a shortcut for $foo.HOW.bar($foo) and .can is just an alias for .^can
16:34 jnthn Those thrown from a low level in the VM simply cannot be
16:34 jnthn And those that in theory can be at a high level aren't liable to do anything sensible :)
16:34 mst jnthn: suddenly reminded of my sysadmin girlfriend getting very angry when a developer asked her how to resume from jgdb
16:34 mst *kgdb
16:34 gfldex install of Rakudo on a clean win10 VM leads to this: https://s11.postimg.org/kqre91w83/Virtual_Box_Win10_04_05_2017_18_32_31.png
16:35 jnthn (Like, the code guarded by the exception throw is probably in most cases going to crash and burn really hard :-))
16:35 Perl6Noob gfldex: known and is fixed by installing Strawberry Perl. I believe stmuk was also working on an update to remove telemeh to prevent that error
16:35 TreyHarris Here's my issue: I've been trying to fix the docs for the FETCH/STORE confusion we were discussing yesterday. But I'm running into places where there are exceptions I can resume and ones I can't. I'd like to try to include only examples that can run start-to-completion, not with trailing lines that can never run. I don't intend to put this 'resumable' business into the docs example, but having it would
16:35 TreyHarris facilitate discovering what I can include in examples so they will run start-to-finish.
16:35 Perl6Noob jaush: yeah, it's a known glitch that new DLL is needed.
16:36 jaush Perl6Noob: for 2017.04?
16:36 TreyHarris s/never run/never run, unless the very failure to run to completion is being illustrated/
16:36 Perl6Noob jaush: yeah
16:37 jaush Perl6Noob: if known, then why was the installer released without the appropriate .dll?
16:37 TreyHarris Let me gist an example so you'll see.
16:37 Perl6Noob jaush: hehe, I meant it's known the release is busted. The bug wasn't identified in the pre-release testing, presumably because the test enviornment had Strawberry Perl already installed
16:38 Perl6Noob jaush: the fix is coming up ( per https://irclog.perlgeek.de/perl6-dev/2017-05-03#i_14527813 ). I don't see a tag in rakudo star, so presumably this hasn't been done yet.
16:38 Possum joined #perl6
16:39 clkao joined #perl6
16:40 wamba joined #perl6
16:40 stmuk foo
16:41 jaush Perl6Noob: well i'm not exactly chuffed - the first iteration of the 2017.04 .msi had a hardcoded path to the packager's homedir, then was removed from the website, and now the revision is still published, despite it being known that it has an error
16:41 Perl6Noob jaush: yeah, we should pitchfork the release manager :P
16:42 Perl6Noob jaush: but the entire 2017.04 release cycle has been a nightmare with many issues and we're currently reviewing and improving our procedures
16:42 Perl6Noob jaush: there's a post for it: https://perl6.party/post/The-Failure-Point-of-a-Release
16:43 jaush Perl6Noob: give us the option of a single statically-linked binary ;)
16:43 Perl6Noob Would be neat.
16:44 TreyHarris https://gist.github.com/a7001bf7f52cf64a6ade89e35a23a047
16:44 timotimo jaush: we didn't realize we added a dependency
16:45 timotimo we definitely didn't intend to add a dependency
16:45 Perl6Noob jnthn: there's a single 6.c-errata indirect test that'd block removal of .resumable. Should it be amended? https://github.com/perl6/roast/blob/master/S32-exceptions/misc.t#L795
16:45 stmuk I've a report R* doesn't build on Arm too :)
16:45 stmuk but looking at windows now
16:45 timotimo stmuk: crap, is that telemeh, too?
16:45 jnthn Perl6Noob: I think it can be, eys
16:45 jnthn *yes
16:46 Perl6Noob Cool.
16:46 stmuk timotimo: maybe or a dodgy gcc (which has been a problem in the past)
16:46 mcmillhj joined #perl6
16:46 stmuk at least I have an excuse to use my PI3 in a C64 case now :)
16:46 TreyHarris Is the argument that .resumable cannot be made to work, therefore it should be removed? Or that .resumable is a bad idea and should be removed? If the latter, how do I solve the problem in my gist above?
16:47 Perl6Noob TreyHarris: from what I understand, the argument is most exceptions can't be resumed anyway, so it'll be removed in about 5 minutes...
16:47 TreyHarris Then shouldn't .resume be removed as well?
16:47 stmuk how do I do ldd on windows?
16:48 jnthn TreyHarris: The only exceptions that should be resumed are types of exception that are documented as being sensible to resume, and only thrown in cases where it's sensible to resume them.
16:48 Perl6Noob TreyHarris: I think you can .resume warnings
16:48 jnthn No, if you toss .resume then warnings will be fatal :P
16:48 jnthn CX::Warn is one such exception, CX::Take is another
16:48 Perl6Noob m: warn "meow"; say "mew"; CONTROL { default { say "resuming"; .resume } }
16:48 camelia rakudo-moar 2fb687: OUTPUT: «resuming␤mew␤»
16:49 TreyHarris Why isn't .resumable useful, then?
16:49 jnthn Well, the problem is what is it going to mean?
16:50 jnthn There's a difference between "can this exception theoretically be resumed" (which we can know) or "can this exception be sensible resumed" (which, in general, we can't, but people could override it in their one Exception subclasses I guess)
16:50 jnthn *their own
16:52 TreyHarris That doesn't seem like an argument; you can override anything, and many possible overrides can be overridden in ways that require other overrides to have behavior that's liskov-consistent. (See many operator overrides.)
16:52 xtreak joined #perl6
16:53 TreyHarris Document that if you override in a way that changes resumability you need to override the return of .resumable too
16:55 robertle joined #perl6
16:55 awwaiid joined #perl6
16:55 Perl6Noob TreyHarris: to play the devil's advocate: .resumable isn't part of Perl 6 language, doesn't work, and isn't even documented, so it's strange for you to argue against its removal :P
16:56 Perl6Noob Where did you hear about it anyway?
16:56 jnthn To be clear, I'm not arguing against there being a resumable method *at all*, I'm saying there's no reason to keep the current one that only ever just dies rather than does something useful
16:56 jnthn And pointing out that the semantics of such a method are open to discussion
16:57 jnthn My feeling at the moment is that it should probably mean "is this exception intended to be resumed", and we make .resume actually first test .resumable
16:57 mst and if one can implement resumable in perl5 - see Worlogog::Incident - without VM help
16:57 mst maybe it's better trialed that way
16:57 jnthn Then we implement method resumable() { True } in CX::Warn, CX::Take, etc.
16:58 TreyHarris Perl6Noob: I got that weird associative error when I tried to '.can('resume')', initially thinking that's how to check for resumability', and because I couldn't get the name of the exception being thrown because control was out of my hands, I searched the rakudo source, and thus found resumable
16:58 jnthn mst: In Perl 6 it's a pretty soft feature in so far as exception handlers run in the dynamic context of the exception, so effectively it's just a return.
16:58 Perl6Noob m: try { die X::TypeCheck::Binding::Parameter.new(); CATCH { say "inside"; if (.can('resume') ) { .resume } }}; say "outside";
16:58 camelia rakudo-moar 2fb687: OUTPUT: «inside␤outside␤»
16:59 Perl6Noob TreyHarris: can you repro it? Because the associate exception is due to .resumable not .can('resume'), as far as I can see ATM
16:59 jnthn mst: The problem is that I keep seeing people try to resume arbitrary exceptions.
16:59 mst jnthn: sure. just, in perl5 we did it in user space, so maybe try that for a bit *then* consider pushing it into VM space, was my thought
16:59 mcmillhj joined #perl6
16:59 * mst shrugs
16:59 jnthn mst: It already is in VM space :)
16:59 jnthn We're using it for CX::Warn
16:59 mst yes. but ... oh never mind
16:59 mst you know what I was pointing at
17:01 TreyHarris Perl6Noob: ah, no, you're right. oh, I see from scrollback what I did: I tried .can('resume') on both resumable and un-resumable exceptions, saw it was defined for both, searched the docs for "resumable", found it mentioned as something you could interrogate but no examples, so then went to rakudo source.
17:02 TreyHarris (I was actually searching for the word "resumable" in the exception string, but I still haven't figured out where that comes from; it's not in the rakudo source AFAICT.)
17:03 jnthn Maybe the presence of .resume on every exception type, but that throws, is smelly and we should have a Resumable roll. Then .can('resume') actually woulda done the right thing. :)
17:03 jnthn (or that may throw)
17:04 jnthn And then we can have Resumable (perhaps Exception::Resumable is better huffmanized) as the thing to test against
17:04 jnthn Meaning `when Exception::Resumable { }` would work
17:04 jnthn Maybe X::Resumable is more appropriate given we have X::Comp as the role done by all compiler exceptions.
17:05 TreyHarris I just acked my entire perl6 tree and can't find the pattern 'not resumable'. So it must be in a file ack considers cruft or it's hiding somewhere clever or 'not' and 'resumable' are not in a single string literal....
17:06 TreyHarris jnthn: I like that. But can you tell me where the text rakudo is printing ("This exception is not resumable") comes from? It's driving me a bit batty a.t.m.
17:06 jnthn TreyHarris: I suspect that's a MoarVM error
17:06 moritz TreyHarris: in MoarVM, src/core/exceptions.c
17:06 TreyHarris ohhh, I have moarvm sibling to my perl6 tree. *sigh*
17:06 TreyHarris sorry.
17:07 jnthn So, my provisional suggestion would be: introduce role X::Resumable that carries the resume() method. Constrain it so it can only be used on subclasses of Exception. Make CX::Warn, CX::Take and CX::Emit do the role. Spectest, see what the fallout is, if any.
17:08 TreyHarris jnthn++ very elegant.
17:08 TreyHarris in the meantime, I'll just use Test and use eval-lives-ok to figure out my docfixes for Proxy.
17:09 xtreak_ joined #perl6
17:12 setty1 joined #perl6
17:16 Cabanossi joined #perl6
17:19 poohman joined #perl6
17:21 Perl6Noob Well great! I went to make a PR to remove Exception.resumable but some guy zoffixznet beat me to it!!
17:21 Perl6Noob THIS IS THE WORST DAY EVER!
17:23 poohman_ joined #perl6
17:26 poohman joined #perl6
17:30 Actualeyes joined #perl6
17:30 g0d355__ joined #perl6
17:39 geekosaur well, that answered ny question fo whether I'd recognize zoffix without the usual clue >.>
17:46 poohman joined #perl6
17:49 poohman_ joined #perl6
17:50 poohman_ joined #perl6
17:52 Zoffix joined #perl6
17:52 Zoffix Perl6Noo, too slow lulz!
17:53 Zoffix geekosaur: so what was the answer?
17:53 Zoffix What's the usual clue?
17:53 Zoffix perl6.party hostname?
17:54 Zoffix There ain't no party like a perl6.party \o/ /o/ |o| \o\ https://perl6.party/about
17:54 Zoffix left #perl6
17:55 azawawi raschipi: ping
17:56 geekosaur yep
17:56 poohman joined #perl6
17:56 azawawi raschipi: Per special request, Camelia in ASCii Art via Terminal::Caca http://pasteboard.co/2iPW0JLsy.png :)
17:57 poohman_ joined #perl6
17:58 Sound joined #perl6
17:58 colomon joined #perl6
17:59 Sound_ joined #perl6
18:01 Cabanossi joined #perl6
18:02 raschipi azawawi: Awesome.
18:06 azawawi raschipi: need to generalize the code a bit and then you can use any ppm file (maybe later other formats)
18:07 TreyHarris Where's camelia's source? Any chance it could stringify and output a trailing expression in sink context a la the REPL?
18:11 TreyHarris ah, it's perl6/evalbot
18:11 raschipi joined #perl6
18:19 Zoffix joined #perl6
18:19 Zoffix TreyHarris: no, we want it the way it currently is, so it complains about in-sink-context
18:21 TreyHarris Zoffix: ahh, makes sense.
18:27 labster joined #perl6
18:30 Sound_ joined #perl6
18:31 Cabanossi joined #perl6
18:33 Zoffix left #perl6
18:45 kyclark joined #perl6
19:07 ufobat joined #perl6
19:14 Actualeyes joined #perl6
19:24 raiph joined #perl6
19:27 perlpilot joined #perl6
19:27 raiph SO question: "Is it safe, to share an array between threads?" My answer: http://stackoverflow.com/a/43790809/1077672 Comments, good or bad, or a better answer, are more than welcome...
19:28 mscha joined #perl6
19:32 raiph .tell hoelzro mebbe https://irclog.perlgeek.de/perl6-release/2017-04-26
19:32 yoleaux raiph: I'll pass your message to hoelzro.
19:33 hoelzro ahhhh thanks raiph
19:33 yoleaux 19:32Z <raiph> hoelzro: mebbe https://irclog.perlgeek.de/perl6-release/2017-04-26
19:34 hoelzro I thought my IRC client was acting up again!
19:35 raiph :)
19:37 AlexDaniel joined #perl6
19:43 ChoHag joined #perl6
19:56 espadrine joined #perl6
19:58 stmuk http://pl6anet.org/drop/rakudo-star-2017.04.2-x86_64%20(JIT).msi
19:59 stmuk anyone able to test that on windows? (moving aside any strawberry perl directory
20:00 gfldex stmuk: I will in a clean VM.
20:02 stmuk great
20:03 gfldex stmuk: works
20:03 mcmillhj joined #perl6
20:04 stmuk Thank $diety
20:06 dct joined #perl6
20:07 kyclark joined #perl6
20:09 alphah No such method 'gist' for invocant of type 'NQPMu'. I get this error when trying to print hash property of an object. (The has is created from grammar match, there is token triggers that error, if  that token did not match I don't get the error)
20:10 alphah any hints can help me troubleshoot this issue? I can share the repo as well if needed.
20:13 lizmat NQPMu is a Mu value from NQP land.  This most likely means that the hash key you're trying to inspect, does not exist
20:14 mscha joined #perl6
20:14 mscha stmuk: works for me too
20:15 alphah lizmat: makes sense, probably the grammar does not match so the hash was not created at all.
20:16 gfldex stmuk: does the win64 installer run `zef update`?
20:16 raschipi The error is LTA, though.
20:16 Cabanossi joined #perl6
20:17 stmuk gfldex: I don't think it does .. it needs a lot more attention TBH
20:18 stmuk thanks testers
20:18 gfldex stmuk: to bad nobody likes windows :->
20:18 stmuk I haven't even paid for it :)
20:19 abraxxa joined #perl6
20:21 itaipu joined #perl6
20:21 gfldex stmuk: Test::META seams to be outdated (or buffy). As a result any module depending on it fails to install.
20:23 raschipi Nos the New version (10 S), won't be able to run our programs.
20:25 Geth ¦ perl6.org: 9f939b8163 | (Steve Mynott)++ | source/downloads/index.html
20:25 Geth ¦ perl6.org: doc current win64 version, mention possible ARM issues
20:25 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/9f939b8163
20:25 cdg joined #perl6
20:25 gfldex stmuk: it's Test::META itself
20:28 stmuk Star doesn't ship with Test::META
20:28 mcmillhj joined #perl6
20:28 gfldex given how many modules use it already it may make sense to add it
20:31 itaipu joined #perl6
20:38 TreyHarris eco: Test::META
20:38 TreyHarris oh, I thought there was a bot for that
20:44 mcmillhj joined #perl6
20:46 bjz joined #perl6
20:56 geekosaur buggable: eco Test::META
20:56 buggable geekosaur, Test::META 'Test a distributions META file': https://github.com/jonathanstowe/Test-META
20:56 Ven joined #perl6
20:57 TreyHarris I found it; I was confused b/c I thought you did 'zef install Test-META', not "zef install Test::META"
21:10 ingy how do I get a list of the files in a dir and then read them one at a time?
21:10 ingy when dir is a string pathname
21:11 alphah hi, I found the bug on my code regarding this error I posted earlier: No such method 'gist' for invocant of type 'NQPMu'. and thought to let you know about it:
21:11 jnthn ingy: Something like `for dir($dir-name) -> $file { my $content = $.slurp; ... }`
21:12 alphah as I mentioned that I get the bug when specific token match, this token is the only one I have defined as proto token {*}, I chnaged it to normal type to match only one value,, the error disappeared
21:12 mcmillhj joined #perl6
21:12 lizmat https://docs.perl6.org/routine/dir
21:13 TEttinger joined #perl6
21:15 TreyHarris ingy: ==jnthn except $file.slurp, or remove the '-> $file' and make it '.slurp'
21:17 jnthn oops, I meant $file.slurp
21:17 jnthn Sorry, tired :)
21:25 raiph thx everyone. awesome SO answers. :)
21:35 sivoais joined #perl6
21:46 imcsk8 joined #perl6
21:52 samcv alphah, can you show me the code that has the bug?
21:54 alphah samacv: sure, one second
21:55 Zoffix joined #perl6
21:55 alphah s/samacv/samcv/
21:55 Zoffix ingy: dir($your-dir).grep(*.r) { .slurp }   use .slurp: :bin if you want content in binary mode
21:56 Zoffix ingy: .grep(*.f & *.r)
22:01 Zoffix stupid junctions
22:01 alphah samcv: this is the repo,  Development branch), last commit fixed the issue in my code. https://github.com/alphah77/galaxy/tree/development   (I'll explain more below because I can't make a small program to show the bug, it will take a while I guess)
22:01 Zoffix ingy: third time's the charm, it's actually .grep({.r & .f}) to filter out just files and files you can read
22:03 alphah basically the error appears if I'm using .ast on a token defined with proto token {8}, ,,, if I changed the token to be "toek token-name { 'x86_64' } , it worked fine,
22:04 alphah samcv: I run the program as: "./bin/galaxy.p6 camelia-0.7-x86_64"   to get the error... "./bin/galaxy.p6 camelia-0.7" will not show the error because "token core" will not match....
22:05 Sound joined #perl6
22:05 samcv so this commit fixed the bug?
22:05 samcv https://github.com/alphah77/galaxy/commit/94780b41580df5e6da45001fb178a320ce4f04d8
22:05 kyclark joined #perl6
22:06 Sound_ joined #perl6
22:07 Zoffix left #perl6
22:07 alphah yes It fixed the bug, it's a workaround, but I'm still thinking that there is abug in token defined with "proto token { * }
22:08 samcv hmm none that i know of. so the proto token bug still exists in the most recent commit though?
22:08 samcv i the NQPMu error the same one caused by proto?
22:09 alphah sorry for the confusion Engilish is not my first language), no it's fixed in last commit ,, but I used work around, instead of calling .ast I directly called .Str on the tokens.
22:10 alphah and what I mean it's a bug,, because  (in my code) .ast worked on all token except the one defined with proto token { * }
22:10 samcv hmm i don't have /etc/galaxy/laws so i can't run it
22:10 samcv hm
22:11 alphah there bin/laws  in the code.... can run as bin/galaxy.p6 laws bin/laws camelia-0.7-x86_64
22:13 samcv ah ok no method gist for invocant NQPMu
22:13 samcv i see this
22:14 alphah yup. now if changed $<star-core> from proto token {*},, defintion to token <star-core { '-x86_64' }, the error will disappear
22:18 alphah https://github.com/alphah77/galaxy/blob/94780b41580df5e6da45001fb178a320ce4f04d8/lib/Laws.pm#L122
22:22 samcv yeah i'm looking
22:22 alphah Thanks
22:26 dct joined #perl6
22:31 Cabanossi joined #perl6
22:33 mcmillhj joined #perl6
22:36 asdfgh joined #perl6
22:38 samcv alphah, well i got it to print out $u.physics
22:39 samcv alphah, this is one commit back https://gist.github.com/samcv/f9fccd25fff5596ff1231a1bcf23efdb in development branch
22:39 samcv so star => core/tag/form are the ones that have the problem
22:41 stmuk joined #perl6
22:41 aindilis joined #perl6
22:42 skids joined #perl6
22:48 alphah_ joined #perl6
22:49 mcmillhj joined #perl6
22:50 alphah_ samcv: if i understand correctly, this means $<star-core> does not match and i need to review my grammar again?
22:50 samcv possibly
22:53 alphah_ Alright, thanks for your time.
22:53 itaipu joined #perl6
22:53 samcv lemme
22:57 mcmillhj joined #perl6
22:59 samcv alphah_, here's the code https://gist.github.com/5744ddcbb51cabd9e1f56bf6591a6d7b
23:00 samcv use this and that should help you debug it easier since you can see exactly which parts are not matching
23:00 alphah_ Checking....
23:04 alphah_ I will read about NQP more to get an idea... earlier i was using Grammar::Debugger to track regex, but after updated to latest when use Grammar::Debuger it crashes
23:05 samcv yeah
23:05 samcv alphah_, that file works for you righ?
23:05 samcv i just made a pull with the branch i'm working on
23:05 samcv i reverted that NQPMu commit and it has the code i showed you in the gist
23:06 alphah_ Will try a few im not at near compiter at the moment
23:06 samcv ah ok
23:06 alphah_ Nice
23:20 samcv but yeah it seems those tokens are just not matching i think
23:26 mcmillhj joined #perl6
23:31 Cabanossi joined #perl6
23:42 mcmillhj joined #perl6
23:58 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo