Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-25

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:24 Actualeyes joined #perl6
00:33 pierre_ joined #perl6
00:58 aborazmeh joined #perl6
00:58 aborazmeh joined #perl6
01:04 AlexDaniel joined #perl6
01:08 xinming joined #perl6
01:10 jnthn So I finally took the time to write up a full answer on the mutator question. I'm glad, because it comes up every so often, and now I've got my answer to point to: https://6guts.wordpress.com/2016/11/25​/perl-6-is-biased-towards-mutators-bei​ng-really-simple-thats-a-good-thing/ :)
01:11 jnthn Also my browser doesn't seem to think spell checking is something it wants to do, and it's 2am, so something will have sneaked past me.
01:11 jnthn But I'm going to sleep now. :)
01:12 viki jnthn: night \o :)
01:13 xinming joined #perl6
01:17 jnthn 'night o/
01:21 xinming joined #perl6
01:24 viki jnthn++ great post :)
01:25 viki jnthn: the main thing I've learned is that if I repeat a bad idea often enough, you'll write great blogs on the topic ;)
01:26 xinming joined #perl6
01:27 samcv is there something i can use that is faster than JSON Tiny, (tried JSON fast but it will fail sometimes saving my hashes)
01:27 samcv for saving data from hash tables that hold strings
01:27 samcv doesn't have to be JSON at all
01:30 Eddward joined #perl6
01:32 viki So .perl then? :)
01:33 viki m: my %h = :42foo; :43bar; my $data = %h.perl; my %new-hash = $data.EVAL; say %new-hash
01:33 camelia rakudo-moar 64343d: OUTPUT«WARNINGS for <tmp>:␤Useless use of ":43bar" in sink context (line 1)␤{foo => 42}␤»
01:33 viki m: my %h = :42foo, :43bar; my $data = %h.perl; my %new-hash = $data.EVAL; say %new-hash
01:33 camelia rakudo-moar 64343d: OUTPUT«{bar => 43, foo => 42}␤»
01:37 Eddward Is there a short hand for assigning the same value to multiple keys in a hash?
01:39 MasterDuke m: my @a = <a b>; my %h; %h{@a} = 2 xx @a.elems; dd %h
01:39 camelia rakudo-moar 64343d: OUTPUT«Hash %h = {:a(2), :b(2)}␤»
01:40 Eddward rakudo:   my %p ; %p<a b c> = 1 xx *; %p.perl.say
01:40 camelia rakudo-moar 64343d: OUTPUT«{:a(1), :b(1), :c(1)}␤»
01:41 Eddward That works, thanks!
01:41 MasterDuke np
01:43 viki m: my %p = <a b c>.Bag; dd %p
01:43 camelia rakudo-moar 64343d: OUTPUT«Hash %p = {:a(1), :b(1), :c(1)}␤»
01:44 MasterDuke i really like xx *, hadn't thought of that
01:44 viki Yeah, neat
01:45 labster joined #perl6
01:45 Eddward I'm tweaking http://blogs.perl.org/users/ken_youens​-clark/2016/11/movie-file-reader.html
01:46 Eddward my %pause is default(.05);
01:46 Eddward %pause<! ? .> = .3 xx *;
01:46 Eddward %pause<, ;>   = .1 xx *;
01:46 Eddward :
01:46 Eddward sleep %pause{$_};
01:47 viki Eddward: but what about the default?
01:47 Eddward my %pause is default(.05);
01:47 viki doh
01:47 viki I need to go sleep :D
01:48 Eddward I've been testing with camelia.  I don't know if it actually works.
01:49 Eddward Is there a debian repository for current * releases?
01:50 viki No idea
01:50 MasterDuke not sure about a repo, but i believe El_Che makes packages
01:50 viki That's just for regular Rakudo. https://github.com/nxadm/rakudo-pkg/releases
01:50 Eddward cool
01:51 viki huggable: deb :is: CentOS and Debian Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
01:51 huggable viki, Added deb as CentOS and Debian Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
01:57 dalek doc: dc154aa | MasterDuke17++ | doc/Type/Hash.pod6:
01:57 synopsebot6 Link: http://doc.perl6.org/type/Hash
01:57 dalek doc: Add examples using slices
01:57 dalek doc: review: https://github.com/perl6/doc/commit/dc154aa814
01:58 MasterDuke Eddward++
02:25 kalkin-_ joined #perl6
02:27 pierre_ joined #perl6
02:37 rpburkholder joined #perl6
02:39 setty1_ joined #perl6
02:48 ugjka joined #perl6
02:52 eisen74 joined #perl6
03:01 pierre_ joined #perl6
03:02 BenGoldberg joined #perl6
03:06 xtreak joined #perl6
03:21 perlawhirl anybody awake
03:23 geekosaur not very
03:23 kalkin-_ half
03:24 Eddward turkey coma here
03:24 MasterDuke barely
03:24 perlawhirl how does 'perl6 --doc=Markdown' or perl6 --doc=HTML' work? does it just look for any module called 'Pod::To::Foo'
03:26 perlawhirl or are HTML and Markdown special cased?
03:28 MasterDuke perlawhirl: https://github.com/rakudo/rakudo/b​lob/nom/src/Perl6/Actions.nqp#L853
03:28 perlawhirl ahh, thanks
03:28 noganex_ joined #perl6
03:28 perlawhirl MasterDuke++
03:35 canopus joined #perl6
03:36 imcsk8_ joined #perl6
03:41 labster joined #perl6
03:41 perlawhirl can I access a modules $=pod from a script?
03:41 perlawhirl ie, from a separate file
03:41 geekosaur pretty sure you'd have to actually load the module
03:42 perlawhirl so say i have 'Foo.pm'. in another file, say 'foo.p6' I can 'use Foo;' but can I then access Foo.pm's $=pod from foo.p6?
03:48 PerlJam perlawhirl: I think you're Foo.pm would need a name to attach it to.  (i.e.  module Foo or package Foo or class Foo etc.)  Then you'd get at it with Foo.WHY
03:49 PerlJam s/you're/your/
03:50 ugexe run('perl6', '--doc', $path-to-code)
03:50 geekosaur it also looks like $=pod should have structure including module names, so it should be somewhere inside $=pod?
03:51 ugexe i guess you probably want the structured $=pod
03:51 geekosaur but I don't know offhand how that works
03:52 perlawhirl ugexe: yeah. it's just for some minor customer formatting of a module. i could always just add a cmdline option to my modul that spits out $=foo.perl, and eval it into my formatter
03:52 perlawhirl but i might be overthinking it
03:53 perlawhirl PerlJam: yep... my module is a class, so Foo.WHY works for me
03:53 perlawhirl thakns
03:53 perlawhirl erm thanks
03:55 perlawhirl hmm, maybe not. thanks anyways people... I can do what I want by writing a Pod::To::Foo module, but was just trying to be lazy :D
04:00 kyclark_ joined #perl6
04:02 ZzZombo I don't understand where am I supposed to look for trait docs, the syntax and whatnot?
04:05 PerlJam ZzZombo: https://docs.perl6.org/ search for "trait" perhaps
04:05 MasterDuke https://docs.perl6.org/type/Signat​ure#Parameter_Traits_and_Modifiers
04:06 PerlJam MasterDuke++
04:07 perlawhirl Unfortunately, i don't think all the traits are documented, at least not in the one plce
04:07 perlawhirl some are documented under Routine
04:07 perlawhirl https://docs.perl6.org/type/Routine
04:08 PerlJam There don't seem to be docs on how to make your own traits either
04:09 perlawhirl and also some under Variable (because, they are variable traits)
04:09 perlawhirl https://docs.perl6.org/type/Variable
04:10 PerlJam Don't forget Attribute too
04:10 perlawhirl Perljam: what do you want to do with a custom trait? could a Role serve your purpose?
04:11 perlawhirl PerlJam: yeah, maybe Language needs a new 'Traits' page
04:11 PerlJam I don't want to do anything with them at the moment, but making traits is a reasonable design alternative sometimes.
04:20 pierre_ joined #perl6
04:21 PerlJam Earlier today I translated some Perl 5 code that uses PDL to do some computations into Perl 6. Mostly it looks the same except that I used @foo instead of piddle $foo and there are many operators encased in «».  And I got to eliminate a routine because rotor() exists  :)
04:22 PerlJam If I would have had a routine that could fit a non-linear curve, I could have finished the translation
04:23 perlawhirl rotor is awesome... doing the same thing in languages that do not have a similar routing is typically very ugly
04:27 PerlJam yep.
04:28 PerlJam Actual line in the code: my @segs = @p.rotor($n => -($n / 2)); # 50% overlap
04:28 PerlJam :-)
04:29 perlawhirl nice.
04:38 pierre_ joined #perl6
04:52 kyclark_ joined #perl6
05:03 gfldex PerlJam: the ENODOC has been noted
05:10 TEttinger what does rotor do? I have seen it here a few times as part of code reductions
05:10 TEttinger the name isn't at all familiar
05:11 Cabanossi joined #perl6
05:12 PerlJam TEttinger: it lets you do sliding windows on a list with windows of different sizes (if you want) and different size gaps (if you want) between the windows.
05:12 PerlJam so you turn a single list of values into multiple lists of values, each list being your "window" into the original list
05:13 TEttinger oh yeah, that's handy. clojure has it, java oh hell no
05:13 PerlJam m: my @a = ^10; dd @a.rotor(3 => 2);
05:13 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2), (5, 6, 7)).Seq␤»
05:13 PerlJam m: my @a = ^10; dd @a.rotor(3 => 2, :partial);
05:13 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2), (5, 6, 7)).Seq␤»
05:14 PerlJam m: my @a = ^10; dd @a.rotor(4 => 2, :partial);
05:14 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2, 3), (6, 7, 8, 9)).Seq␤»
05:14 TEttinger so the 2 is the gap?
05:14 PerlJam yep
05:14 PerlJam and a negative gap allows for overlap
05:14 PerlJam m: my @a = ^10; dd @a.rotor(4 => -2);
05:14 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2, 3), (2, 3, 4, 5), (4, 5, 6, 7), (6, 7, 8, 9)).Seq␤»
05:16 PerlJam and I'm clearly tired as I can't think to demo the :partial   :)
05:16 PerlJam m: my @a = ^10; dd @a.rotor(3 => 1);
05:16 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2), (4, 5, 6)).Seq␤»
05:16 PerlJam m: my @a = ^10; dd @a.rotor(3 => 1, :partial);
05:16 camelia rakudo-moar 64343d: OUTPUT«((0, 1, 2), (4, 5, 6), (8, 9)).Seq␤»
05:16 PerlJam there
05:17 PerlJam it allows for windows that aren't "full" or a "partial window"
05:18 TEttinger clojure does something similar, it just expresses gap differently. (partition 3 5 (range 10)) ; returns ((0 1 2) (5 6 7))
05:18 TEttinger (partition 4 2 (range 10)) ; returns ((0 1 2 3) (2 3 4 5) (4 5 6 7) (6 7 8 9))
05:18 TEttinger it is, agreed, really useful
05:19 TEttinger partition-all is the :partial thing
05:20 TEttinger m: my @a = ^10; dd @a.rotor(4 => -4);
05:20 PerlJam can you give multiple different window/gap sizes with partition?
05:20 camelia rakudo-moar 64343d: OUTPUT«(timeout)»
05:20 PerlJam m: my @a = ^10; dd @a.rotor(1 => 2, 3 => 2);
05:20 camelia rakudo-moar 64343d: OUTPUT«((0,), (3, 4, 5), (8,)).Seq␤»
05:21 PerlJam m: my @a = ^20; dd @a.rotor(1 => 2, 3 => 2);
05:21 camelia rakudo-moar 64343d: OUTPUT«((0,), (3, 4, 5), (8,), (11, 12, 13), (16,)).Seq␤»
05:21 TEttinger in one call? not that I'm aware of. it's possible but would be tricky to implement
05:21 perlawhirl @rotar can also do things like this
05:21 TEttinger why the closing comma after (0,)
05:21 perlawhirl m: say (^12).rotor(3,2,1)
05:21 camelia rakudo-moar 64343d: OUTPUT«((0 1 2) (3 4) (5) (6 7 8) (9 10) (11))␤»
05:22 PerlJam TEttinger: because it's a one element list.
05:22 TEttinger ohhh
05:22 TEttinger that makes sense
05:24 TEttinger I do feel like there's some deeply good ideas in perl 6 that don't really have much chance to get discovered because the language itself is so massive and people may not try to learn the whole (still evolving) thing
05:27 TEttinger it's interesting. as I've learned more programming languages I've really started to return to ones that aren't "maximalist" designs, since I have a chance to actually understand the subtleties of a simpler language where I absolutely would not with Perl6 for years
05:27 PerlJam That's why it's important the people write books and blogs and such.   Different people coming from different points of view will highlight different aspects of the language.
05:28 PerlJam Perl 5 has the same problem even if it's on the order of an aleph-0 language and Perl 6 is an aleph-1  :-)
05:28 TEttinger better than a nun-NaN
05:29 TEttinger I don't know what an aleph-n is
05:30 TEttinger is it like a Kardashev civilization type?
05:30 TEttinger (very low numbers currently expected, very high numbers are only found in science fiction)
05:32 PerlJam https://en.wikipedia.org/wiki/Aleph_number
05:32 PerlJam similar I guess
05:35 pierre_ joined #perl6
05:36 perlawhirl I've never fully accepted the argument that a language is too big. I don't know all of perl 5 but I use it to great effect.
05:36 perlawhirl There's a lot of stuff in your kitched... but you don't need all of it to make an omelette
05:37 perlawhirl Perl 6 is big, but most people will use a fraction of, and everyone's fraction, tho it overlaps, is slightly different
05:37 PerlJam perlawhirl: exactly
05:40 PerlJam There are bits of Perl I've *never* used in the 24-ish years I've been programming in it.  There are bits I've tried to use, but they turned out to not be really useful  (reset is an example of the former and study (when it did something) an example of the latter)
05:41 PerlJam in a sense those things I've never used aren't really part of the language for me, though they may be for someone else
05:42 perlawhirl agreed. the language feature you've never used is integral to someone else
05:43 perlawhirl well... not integral to _someone_  :D ... i mean... is an integral feature _for_ them. my english isn't working today.
05:52 pierre_ joined #perl6
06:00 rurban joined #perl6
06:01 dayangkun joined #perl6
06:30 xtt joined #perl6
06:35 domidumont joined #perl6
06:36 rpburkholder joined #perl6
06:37 xtt2 joined #perl6
06:41 pierre_ joined #perl6
06:41 eisen74 joined #perl6
06:42 gfldex m: &trait_mod:<is>.WHAT.say
06:42 camelia rakudo-moar 64343d: OUTPUT«(Sub)␤»
06:48 zacts joined #perl6
06:53 RabidGravy joined #perl6
07:06 rurban joined #perl6
07:10 dalek doc: f06eaad | gfldex++ | doc/Type/Sub.pod6:
07:10 synopsebot6 Link: http://doc.perl6.org/type/Sub
07:10 dalek doc: doc trait_mod (yes, we totally forgot about that)
07:10 dalek doc: review: https://github.com/perl6/doc/commit/f06eaad085
07:11 gfldex PerlJam++ # for spotting the ENODOC
07:12 seatek joined #perl6
07:14 bjz joined #perl6
07:21 gfldex m: multi sub trait_mod:<is> (Sub $s, :$foo) is foo { say 'is foo called' }; sub bar {}; &trait_mod:<is>(&bar, :foo);
07:21 camelia rakudo-moar 64343d: OUTPUT«is foo called␤is foo called␤»
07:21 gfldex Perl 6 is fun :)
07:23 dalek doc: f383d01 | gfldex++ | doc/Type/Sub.pod6:
07:23 synopsebot6 Link: http://doc.perl6.org/type/Sub
07:23 dalek doc: show how to use traits at runtime
07:23 dalek doc: review: https://github.com/perl6/doc/commit/f383d01e26
07:31 dalek doc: f6140d8 | gfldex++ | doc/Language/ (2 files):
07:31 dalek doc: link to trait_mod
07:31 dalek doc: review: https://github.com/perl6/doc/commit/f6140d843b
07:31 pierre_ joined #perl6
07:32 ZzZombo gfldex++
07:32 ZzZombo thanks for that
07:36 gfldex ZzZombo: it's not complete. Traits are rather involved.
07:38 ZzZombo I know. And BTW, how do you pass more arguments? like "sub x is XYZ (param,:param2(val))"?
07:39 gfldex i don't think you can without changing the grammar
07:39 gfldex m: class A {}; multi sub trait_mod:<is>(Variable, :$foo){}; my $a is :foo(1, A => 1, 3) = A.new;
07:39 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid name␤at <tmp>:1␤------> 3it_mod:<is>(Variable, :$foo){}; my $a is7⏏5 :foo(1, A => 1, 3) = A.new;␤»
07:39 ZzZombo what do you mean then by "A single named argument defines the secondary name and may carry arguments when the trait is called"?
07:39 wamba joined #perl6
07:40 xiaomiao joined #perl6
07:40 gfldex m: class A {}; multi sub trait_mod:<is>(Variable, :$foo){}; my $a is foo(1, A => 1, 3) = A.new;
07:40 camelia rakudo-moar 64343d: ( no output )
07:40 gfldex the single argument can take a list and you can use a subsig to destructure it
07:41 gfldex (i think)
07:41 ZzZombo I see
07:43 gfldex m: class A {}; multi sub trait_mod:<is>(Variable, :$foo($first, Pait $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new;
07:43 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5===␤Shape declaration with () is reserved;␤  please use whitespace if you meant a subsignature for unpacking,␤  or use the :() form if you meant to add signature info to the function's type␤at <tmp>:1␤------> 3multi sub trait_mod:…»
07:43 gfldex m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pait $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new;
07:43 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'Pait' in parameter declaration. Did you mean 'Pair'?␤at <tmp>:1␤------> 3t_mod:<is>(Variable, :$foo ($first, Pait7⏏5 $pair, $last) ){}; my $a is foo(1, A =>␤»
07:43 gfldex m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo(1, A => 1, 3) = A.new;
07:43 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is foo' in a variable declaration.␤at <tmp>:1␤------> 3, $last) ){}; my $a is foo(1, A => 1, 3)7⏏5 = A.new;␤    expecting any of:␤        TypeObject␤        default…»
07:46 gfldex well, you can do the destructureing inside the trait ofc
07:48 psch m: multi sub trait_mod:<is>(Variable $, :$foo ($a, *@t)) { }; my $x is foo([1, 2, 3]) = 1
07:48 camelia rakudo-moar 64343d: ( no output )
07:49 psch m: sub f($a, Pair $p, $b) { }; f 1, a => 1, 2
07:49 camelia rakudo-moar 64343d: OUTPUT«Too few positionals passed; expected 3 arguments but got 2␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
07:49 psch gfldex: ^^^ the Pair you pass is a named
07:49 psch m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo(1, 'A' => 1, 3) = A.new;
07:49 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is foo' in a variable declaration.␤at <tmp>:1␤------> 3$last) ){}; my $a is foo(1, 'A' => 1, 3)7⏏5 = A.new;␤    expecting any of:␤        TypeObject␤        default…»
07:49 psch m: class A {}; multi sub trait_mod:<is>(Variable, :$foo ($first, Pair $pair, $last) ){}; my $a is foo([1, 'A' => 1, 3]) = A.new;
07:49 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is foo' in a variable declaration.␤at <tmp>:1␤------> 3ast) ){}; my $a is foo([1, 'A' => 1, 3])7⏏5 = A.new;␤    expecting any of:␤        TypeObject␤        default…»
07:49 psch ...although that doesn't seem to be the only problem :)
07:50 psch we probably want more detailed error message for "can't apply this trait" i suspect
07:50 psch *messages
07:50 psch m: sub f($a, Pair $p, $b) { }; f 1, 'a' => 1, 2
07:50 camelia rakudo-moar 64343d: ( no output )
07:53 Ven joined #perl6
07:55 Ven joined #perl6
07:57 psch m: multi trait_mod:<is>(Variable $a, :@foo) { }; my $x is foo[1,2,3,:1a] = 1 # vOv
07:57 camelia rakudo-moar 64343d: ( no output )
07:59 xtt joined #perl6
07:59 psch m: multi trait_mod:<is>(Variable $a, :@foo [$firstpos, *@restpos, :$firstnamed, *%restnameds]) { }; my $x is foo[1,2,3,:1a] = 1 # vOv
07:59 camelia rakudo-moar 64343d: ( no output )
07:59 psch m: multi trait_mod:<is>(Variable $a, :@foo [$firstpos, *@restpos, :$firstnamed, *%restnameds]) { }; my $x is foo[1,2,3] = 1 # vOv
07:59 camelia rakudo-moar 64343d: ( no output )
08:00 psch so, yeah, it can work, but "Can't use unknown trait" is, in some cases, not specific enough.  i'm pretty sure we should be able to figure out if we can't apply it because of an argument mismatch
08:05 psch ...maybe just add the invoking argument list to X::Trait::Unknown is enough
08:09 rurban joined #perl6
08:10 geekosaur joined #perl6
08:11 dayangkun joined #perl6
08:15 xtreak joined #perl6
08:18 pierre_ joined #perl6
08:21 xtt2 joined #perl6
08:24 mohae_ joined #perl6
08:25 zakharyas joined #perl6
08:28 dalek doc: 7588852 | gfldex++ | doc/Type/Sub.pod6:
08:28 synopsebot6 Link: http://doc.perl6.org/type/Sub
08:28 dalek doc: show how to call traits with multiple arguments
08:28 dalek doc: review: https://github.com/perl6/doc/commit/7588852ace
08:29 psch gfldex++ # docs \o/
08:32 Ven joined #perl6
08:33 domidumont joined #perl6
08:34 dayangkun joined #perl6
08:36 eisen74 joined #perl6
08:36 AlexDaniel joined #perl6
08:37 pierre_ joined #perl6
08:39 domidumont joined #perl6
08:44 g4 joined #perl6
08:57 bjz joined #perl6
09:01 labster joined #perl6
09:13 msdfsd joined #perl6
09:14 msdfsd Im thinking about joining the perl6 train
09:14 msdfsd can I make native executables from perl?
09:14 gfldex no and there is no way to make bundles yet either but that is a planned feature
09:15 psch well, r-j bundles are kinda sorta possible, but experimental at best
09:15 psch i'm not sure how well it works with included modules, in any case
09:17 msdfsd well
09:17 msdfsd here's to holding for perl7
09:17 msdfsd left #perl6
09:17 psch ...wow
09:18 xtreak joined #perl6
09:18 gfldex Perl
09:18 gfldex Perl 6 is meant to last for 100 years. So that could be a rather long wait for you.
09:19 psch they've already left... vOv
09:19 DrForr Another satisfied customer.
09:19 psch and i doubt they're reading the logs -- research doesn't seem to be a thing, considering we have like at least half a dozen tickets concerning that "binary deploy" thing
09:20 timotimo the problem clearly is that now that we've had the stable release of perl6, we can't add anything until perl7
09:20 timotimo that's how software works, isn't it?
09:20 psch exactly, everything is 1.0 forever
09:21 psch i mean, Perl 5 has been the same for 25 years too vOv
09:21 timotimo famous examples include windows version 2000.0, and google chrome version 54 million 2840.100
09:21 pierre_ joined #perl6
09:24 DrForr Why take the time to think when you can just Google an opinion and believe whatever the first link is?
09:25 psch honestly, i interpreted "joining the train" as "helping develop" at first anyway
09:26 gfldex i interpret "joining the train" as an empty phrase used by one who has nothing to say
09:27 psch right, that's probably more sensible.  along the lines of "i want to seem interested but only if you deliver literally everything i demand, and i fully know some demands aren't particularly reasonable" or something..?
09:28 andrzejku joined #perl6
09:30 gfldex my guess would be that the swiftly leaving fellow was send by his boss to check out this new Perl 6-thing he read about in a magazin
09:30 pierre_ joined #perl6
09:31 rindolf joined #perl6
09:33 DrForr Can't please 'em all.
09:39 El_Che DrForr: if someone could, it would be you :)
09:39 El_Che good day
09:41 DrForr Wow. Thanks.
09:41 BenGoldberg joined #perl6
09:42 DrForr Incidentally Perl6::Parser now passes 94% of its tests.
09:46 timotimo that's good news!
09:48 seatek i heard that perl7 will have trains...
09:49 timotimo i like trains.
09:49 DrForr Take a look at the test suite to see how much it already handles, I think it currently handles files up to 40-50 lines of somewhat dense code.
09:49 timotimo that's ... not very much :(
09:49 seatek that's why we need trains
09:50 chaon joined #perl6
09:50 DrForr Oh, it's not limited in size in the way you're implying.
09:51 DrForr That's just because RosettaCode samples top out at 50-60 lines, it's perfectly capable of thousands of lines.
09:51 timotimo OK :)
09:52 timotimo http://rosettacode.org/wiki/Snake#Perl_6
09:52 timotimo ^- quite simple code, though.
09:53 zakharyas1 joined #perl6
09:56 Ven joined #perl6
09:56 bjz joined #perl6
10:04 DrForr https://github.com/drforr/per​l6-Perl6-Parser/tree/master/t
10:05 DrForr Most of the existing issues are (1) comments and (2) contextualizer variables such as $[1].
10:06 timotimo mhm
10:06 DrForr Contextualizer is actually trivial, I was going to take care of it last night but got distracted.
10:21 pierre_ joined #perl6
10:26 perlawhirl joined #perl6
10:57 pierre_ joined #perl6
11:00 AlexDaniel joined #perl6
11:10 ugjka joined #perl6
11:13 gregf_ joined #perl6
11:13 * viki is watching Toronto Perl Mongers slowly imploding :(
11:14 viki One of the emails from organizers https://gist.github.com/zoffixznet​/c2ac5c6f2b8e62d982f17d2c00a01060
11:35 TEttinger it is toronto and it is probably snowing since it's roughly wintertime. this is a time of year when I'd expect a little less commute tolerance from people not close-by
11:35 TEttinger I can't recall the last time I've seen snow
11:36 viki heh
11:36 viki Snow wouldn't affect my commute :) And I don't think it's snowing proper yet
11:36 TEttinger is viki zoffix?
11:36 viki Who is Zoffix?
11:37 TEttinger gist is a bit of a giveaway
11:37 viki :)
11:38 TEttinger I wonder if there's some emoji IRC and Unicode could work together to support, that is the "Zoffix Synonym Indicator Emoji"
11:39 DrForr Who is Zoffix Galt?
11:40 TEttinger the lizard wizard vizier
11:43 wamba joined #perl6
11:46 Ven joined #perl6
11:52 bjz_ joined #perl6
11:53 viki .ask MasterDuke can you look at this ticket? IIRC we decided this was a DITHWIDT and wasn't worth a fix, right? https://rt.perl.org/Ticket/Display.html?id=128551
11:53 yoleaux viki: I'll pass your message to MasterDuke.
11:55 viki m: say %(:4̈a)
11:55 camelia rakudo-moar 64343d: OUTPUT«{a => 0}␤»
11:56 psch m: say <4̈>.perl
11:56 camelia rakudo-moar 64343d: OUTPUT«"4̈"␤»
11:56 psch m: say val("4̈").perl
11:56 camelia rakudo-moar 64343d: OUTPUT«"4̈"␤»
11:56 viki Oh, wait, that was for fancy-pants Unicode up in there.
11:57 viki .tell MasterDuke never mind, I now recall what you and TimToady were fixing. This seems to be a different bug that silently fails to do the right thing
11:57 yoleaux viki: I'll pass your message to MasterDuke.
11:59 MasterDuke viki: yeah, similar, but not exactly the same. the other ticket (can't remember the #) was about using 'No ' characters instead of 'Nd'. TimToady ruled against supporting (or specifically checking for) 'No'
11:59 yoleaux 11:53Z <viki> MasterDuke: can you look at this ticket? IIRC we decided this was a DITHWIDT and wasn't worth a fix, right? https://rt.perl.org/Ticket/Display.html?id=128551
11:59 yoleaux 11:57Z <viki> MasterDuke: never mind, I now recall what you and TimToady were fixing. This seems to be a different bug that silently fails to do the right thing
12:00 psch m: say :١a # this one i guess?
12:00 camelia rakudo-moar 64343d: OUTPUT«Unexpected named argument 'a' passed␤  in block <unit> at <tmp> line 1␤␤»
12:00 psch m: say (:١a) # this one i guess?
12:00 camelia rakudo-moar 64343d: OUTPUT«a => 1␤»
12:00 psch or support for it, probably
12:00 viki That's not a No :)
12:00 psch m: say uniprop("١")
12:01 camelia rakudo-moar 64343d: OUTPUT«Nd␤»
12:01 viki It's the outlier crop of numbers-that-aren't-digits
12:01 psch ahh, 'we decide to allow No instead Nd' is what MasterDuke was saying TimToady was saying..`?
12:01 psch +of
12:01 MasterDuke psch: the opposite
12:01 viki m: :⅒42
12:01 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3:7⏏5⅒42␤    expecting any of:␤        colon pair␤»
12:02 viki m: :⅒a
12:02 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3:7⏏5⅒a␤    expecting any of:␤        colon pair␤»
12:02 psch m: say uniprop "⅒"
12:02 camelia rakudo-moar 64343d: OUTPUT«No␤»
12:02 psch okay i'm bad at reading right now apparently vOv
12:03 MasterDuke 'Nd' is allowed. 'No' is not allowed, and TimToady also thought we shouldn't specifically check for them and give them their own error message
12:03 MasterDuke heh, 'No' makes things hard to parse. "No No is not allowed"
12:04 MasterDuke s/things/sentences
12:04 psch always these persky words with their meanings *shakes fist*
12:06 DrForr inb4 Buffalo buffalo buffalo ... :)
12:08 Ven joined #perl6
12:09 rindolf joined #perl6
12:12 Ven joined #perl6
12:20 kd_christoph joined #perl6
12:20 kd_christoph left #perl6
12:21 user9 joined #perl6
12:21 Ven joined #perl6
12:24 timotimo how do i figure out where in memory my executable is mapped? and especially how big the mapping is and where exactly it starts (and ends)
12:28 arnsholt Isn't that one of those things that modern OSes go out of theur way to make hard to figure out?
12:29 * DrForr mutters something about Rowhammer.
12:29 timotimo well, address layout randomization, sure
12:29 timotimo but i'd like to just concatenate some data to my binary and get at that data later on
12:29 timotimo or some other simple way to put data into an executable that hopefully doesn't involve running a full compiler
12:31 arnsholt I think there's a separate section in the executable format for that
12:31 arnsholt Googling seems to indicate that in ELF at least it's the rodata section
12:31 arnsholt I'm curious what you need this for though
12:32 timotimo *cough cough*
12:32 arnsholt Sekkrit projects? =)
12:32 timotimo i don't want to get people's hopes up
12:33 timotimo anyway, there's lots and lots of stuff that comes after .rodata in the binary i'm looking at right now
12:33 timotimo the last thing i can see is .symtab and .strtab (which seem to sit at the same offset)
12:34 rpburkholder joined #perl6
12:34 arnsholt At any rate, ELF stuff is where you're gonna be wanting to look
12:34 timotimo on linux at least
12:35 arnsholt Yeah
12:35 arnsholt OS X and Windows have different executable formats
12:35 perlawhirl hmm... who feels like helping me bikeshed a module name
12:36 perlawhirl I extended Pod::To::Markdown and used a little creative pod to create fenced code blocks
12:36 perlawhirl https://gist.github.com/0racle/e​092c62faddfe590215741579118c8b8
12:36 perlawhirl I have a module, but just questioning what a good name for it is... Pod::To::Markdown::SOMETHING
12:37 perlawhirl I'm already using this module to render the README.md for my Net::Netmask module... it's really nice to be able to have it automatically generated with code blocks
12:39 timotimo i don't want to have to write a custom ld script :\
12:48 arnsholt timotimo: For this kind of stuff, I'm afraid it's hard to get out of that
12:49 arnsholt And then you get to implement bindings to the right C functions/libraries to read the data back in =)
12:49 timotimo get what out of what?
12:49 arnsholt "Get out of" intended to mean "escape" in that case
12:53 arnsholt Or was it the second line you were wondering about?
12:53 timotimo i didn't understand the second line, either ;)
12:54 timotimo i might end up with just fopen on /proc/self/exe :\
12:54 timotimo also, we could totally have ABSOL P6 based on http://bulbapedia.bulbagarden.​net/wiki/Absol_(Pok%C3%A9mon)
12:54 timotimo (Almost But Still Only Like Perl6)
12:54 arnsholt Well, once you've stashed data somewhere in the executable, you presumably want to get it back out. There's probably a C library for that
12:55 timotimo if i had a section that goes at the exact end of my binary, i could just grab the address of that section and go nuts
13:14 cygx joined #perl6
13:15 cygx timotimo: there are sevral ways to embed binary data into executables, some more hacky than others
13:15 cygx but what do you mean by 'doesn't involve running a full compiler'
13:17 timotimo cygx: ideally, i'd have the program prepared to Deal With It, and then just use cat myprogram extradata > enhancedprogram
13:17 timotimo if you want to help me even more, how do i tell ld that i want it to make a .so file usable that i manually mmapped (or rather: that's Just Already There)
13:18 cygx well, with gcc, there's stuff like https://balau82.wordpress.com/2012/0​2/19/linking-a-binary-blob-with-gcc/
13:19 cygx personally, I've also just hot-patched a char[] of sufficient size that held a marker string
13:19 timotimo okay, but that's hardly a step up from turning my binary blob into a const char * ...
13:19 cygx then, you can append data to the executable and open the file from disk
13:19 timotimo i feared as much.
13:20 cygx on windows, the proper way to do it would involve resources
13:21 timotimo i don't know anything about that
13:21 timotimo but that also involves a compiler?
13:21 timotimo well ... linker
13:21 cygx yes
13:21 timotimo then i'll go with fopen on /proc/self/exe
13:22 timotimo do you have a tip for the .so thing?
13:22 timotimo i mean i could mmap it to a file descriptor, and tell dlopen to open /proc/self/fd/myfiledescriptor
13:22 araujo joined #perl6
13:23 viki m: https://gist.github.com/zoffixznet​/c90ebeb70ef0e31585f2acb4ceffce3f
13:23 camelia rakudo-moar 64343d: OUTPUT«True␤<anon|176537216>.new␤<anon|176537216>​.new␤<anon|176537216>.new␤<anon|176537216>.new␤<a​non|176537216>.new␤<anon|176537216>.new␤<anon|176​537216>.new␤<anon|176537216>.new␤<anon|176537216>​.new␤<anon|176537216>.new␤<anon|176537216>.ne…»
13:24 dalek doc: 86e56be | ZzZombo++ | doc/Type/Sub.pod6:
13:24 synopsebot6 Link: http://doc.perl6.org/type/Sub
13:24 dalek doc: Update Sub.pod6
13:24 dalek doc: review: https://github.com/perl6/doc/commit/86e56be1e3
13:24 viki Any idea why my push-all impl is broken? Line 50 is called like 200 times, when it should be just 4 times and the .elems gives 0, when it should give 5
13:25 moritz ZzZombo: could you please write a bit better commit messages? "Update Sub.pod6" doesn't tell me what you changed, or why
13:25 ZzZombo for such small changes?
13:26 psch "Fix typo" is still more meaningful than "Update $file"
13:26 moritz ZzZombo: sure. "Fix typo" isn't more to write either
13:26 ZzZombo I didn't write it
13:26 moritz then please do in future :-)
13:26 timotimo that's what github suggests
13:26 psch ah, web commit?
13:26 cygx timotimo: I don't think here's an official way to do such a thing
13:26 timotimo i think you're right
13:27 cygx it's possible, but you'll likely have to get your hands rather sirty, so to speak
13:27 cygx *dirty
13:27 cygx first google result: https://github.com/m1m1x/memdlopen
13:29 timotimo fantastic! only 500 lines of code!
13:31 timotimo that opens /proc/self/maps %)
13:32 timotimo i'll go with mmap + /proc/self/fd/*, then :)
13:32 timotimo this will be the worst proof of concept ever conceived, i'm sure
13:34 pierre_ joined #perl6
13:37 viki Any ideas?
13:37 viki Man, this 5-minute chunk of code is now taking 40minutes :(
13:38 viki What I don't get even more is if there's a bug that makes it go 200 iterations, but does it stop there and not go forever? :/
13:38 dudz evening
13:38 * dudz tips non existing hat
13:38 DrForr Afternoon. How go things?
13:39 dudz good thank you very much.
13:39 dudz waiting for my hair to dry and for my body to commence shutdown procedure then i can get some zed's
13:40 DrForr Good luck with that.
13:40 khw joined #perl6
13:40 dudz what's all the entire gang upto this fine <timezone> ?
13:41 viki Trying to make a fast flat.iterator.push-all
13:41 viki And failing miserably
13:41 chacalmaneiro joined #perl6
13:41 DrForr At work, finished with some blogs.perl.org stuff and moving on to other work.
13:41 chacalmaneiro test
13:41 viki chacalmaneiro: test successful
13:41 psch m: use Test; ok 1
13:41 camelia rakudo-moar 64343d: OUTPUT«ok 1 - ␤»
13:43 dudz push is not array related right?
13:43 psch m: say Array.^can('push')
13:43 camelia rakudo-moar 64343d: OUTPUT«(Method+{<anon|54735920>}.new push Method+{<anon|54735920>}.new)␤»
13:43 DrForr The first rule of Tautology club shall be "The initial rule of Tautology club shall be the rule that is observed when joining the club."
13:43 psch dudz: it is, but push-all isn't push, it's part of the Iterator/Iterable interface
13:44 wamba joined #perl6
13:44 Ven joined #perl6
13:44 dudz an iterator doesn't have to be a number does it?
13:45 viki dudz: an iterator knows how to produce a sequence of numbers.
13:45 viki dudz: and you can ask it for, say, one value and it'll produce it. The .push-all asks for all values and asks for them to be pushed into a target.
13:45 ZzZombo m: say Str.^lookup('Int')
13:45 camelia rakudo-moar 64343d: OUTPUT«Int␤»
13:45 ZzZombo m: say Str.^lookup('Int').perl
13:45 viki https://docs.perl6.org/type/Iterator
13:45 camelia rakudo-moar 64343d: OUTPUT«method Int (Str:D $: *%_) { #`(Method|50741328) ... }␤»
13:46 dudz checking
13:47 timotimo wow
13:47 timotimo src/core/bytecodedump.c:425:1: internal compiler error: in get_dynamic_type, at ipa-polymorphic-call.c:1665
13:47 dudz arh, iterate as in, to proceed through right, not just counting
13:48 dudz *question mark placed in the right place ^
13:48 jnthn timotimo: Uh, wow...
13:48 ZzZombo https://docs.perl6.org/routine/Int doesn't list Str as having Int().
13:48 ZzZombo Why?
13:49 viki ZzZombo: would it be listed under Str?
13:49 viki *wouldn't
13:49 dudz i'm due for a perl6 t-shirt once that project begins *optomistic
13:49 dudz *oreilly perl6 book
13:49 ZzZombo Str isn't here at all.
13:50 DrForr dudz: Party on! (I'm working with him on writing it.)
13:51 viki ZzZombo: then the asnswer is: no one added it
13:51 ZzZombo Uh, I thought it was autogenerated in some way, that assembled individual pieces together?
13:52 viki ZzZombo: well, yeah, but it's taken from documents written by humans. I think in this case the method is provided by Cool
13:52 dudz yeah i thought your nickname had some marketing to it DrForr :)
13:52 viki ZzZombo: so it'd be from Language/Type/Cool.pod6
13:52 DrForr Egads, I'm a brand?
13:52 dalek doc: e71be07 | ZzZombo++ | doc/Type/Metamodel/ClassHOW.pod6:
13:52 synopsebot6 Link: http://doc.perl6.org/type/Metamodel/ClassHOW
13:52 dalek doc: Typo
13:52 dalek doc: review: https://github.com/perl6/doc/commit/e71be0767f
13:53 dudz kinda, a well respected type, i wonder though, do you own suit's>
13:53 dudz *?
13:53 viki blurb on doc https://github.com/zoffixznet/perl6.party/b​lob/master/post/Perl-6-Core-Hacking-The-Ult​imate-Contributors-Guide.md#the-doc-content
13:54 timotimo src/core/bytecodedumpsterfire.c:666
13:54 dudz i'm on my way upto lader towards a suit
13:54 DrForr Yes. I use it at OSCON, but that's about it.
13:54 dudz for now i'm a polo shirt/nice trousers that could be ironed
13:55 dudz plus i'm a hair brusher and clean face shaver
13:56 viki m: dd IterationEnd
13:56 camelia rakudo-moar 64343d: OUTPUT«IterationEnd␤»
13:56 timotimo why exactly does the dependencies+deserialize frame of perl6.moar "loadbytecode" ModuleLoader.moarvm 5 times in a row? :)
13:56 viki m: https://gist.github.com/zoffixznet​/eee66dd3e56c4a509627ab80ec77f56c
13:56 camelia rakudo-moar 64343d: OUTPUT«True␤[["b"], ["c"], [IterationEnd], IterationEnd]␤»
13:56 dudz when i was growing up we would call it IT, but now they added an extra C, to make it ICT, the C i am still learning that i guess.
13:56 viki :o
13:57 DrForr I'm usually pretty casual; OSCON is an exception simply because others don't really focus on it.
13:57 viki Oh, my perl6 is too old to show InterationEnd
13:57 dudz figured it out viki ?
13:57 viki dudz: I think so, I was testing for Iteration end with nqp::istype() rather than nqp::eqaddr
13:58 dudz because the latter is used in your version?
13:59 viki I was using the wrong op.
13:59 viki 49 minutes wasted on a dumb typo :)
13:59 dudz :D
13:59 viki Yey Programming!
14:00 dudz it's good that you found it out though
14:00 dudz did yourself some troubleshooting and practiced some paitence, and done :)
14:00 viki I also cried a little.
14:00 dudz nice :)
14:02 Ven joined #perl6
14:02 domidumont joined #perl6
14:06 dudz i'm gonna go hangout in a horizontal position with my eye's closed for a bit, i'll be back after :)
14:06 viki \o
14:06 dudz *night perl6 community
14:06 dudz o/
14:08 timotimo gnite dudz
14:10 tbrowder ref:
14:12 ZzZombo what are the possible values for trait declarations? Beside 'is' and 'will'?
14:12 timotimo "will" isn't really a trait declaration. it has more to do with phasers
14:12 MasterDuke hides, does, will, of, returns, handles
14:13 tbrowder ref rakudo downloadable archives: is it worth my time to try to make it able to download and install zef as part of the package, i.e., will a PR be considered that enables that?
14:13 viki tbrowder: PR to which repo?
14:14 timotimo probably rakudo/star
14:14 ZzZombo and of course you can't make your own "keywords" (what is the name for those, again?) for declaration?
14:14 viki ZzZombo: I'm sure you can with slangs
14:15 ZzZombo I fear that would be a bit far-stretched for the task at han.
14:15 ZzZombo Unfortunate :(
14:15 ZzZombo hand*
14:16 psch the keyword for declarations is declarators, no?
14:16 viki Cool, there's pi users in here.
14:17 DrForr I have a Pi v3, haven't used it yet...
14:17 ChoHag joined #perl6
14:18 tbrowder viki: rakudo
14:18 tbrowder i tried rakudo star but gave up...
14:19 viki tbrowder: no, that PR won't be accepted. The repo already has a means to install any module you wish
14:19 tbrowder and how is that done?
14:19 MasterDuke tbrowder: someone is working on racoon (making tools/install-dist.pl a little more robust/feature filled i think)
14:20 jnthn timotimo: Pretty sure that you can write any trait_mod:<will> that you want; doesn't have to be about phasers
14:20 tbrowder can you name the branch?
14:21 timotimo fair enough
14:22 MasterDuke tbrowder: don't know, i think nine is the one working on it
14:22 timotimo it's called raccoon
14:22 timotimo so, how would a respectable person currently write out an unsigned 64bit integer to stdout or to a file?
14:23 MasterDuke anyway, off to go hit a little ball with metal sticks
14:23 timotimo good luck!
14:23 DrForr Don't lose it!
14:23 timotimo m: say 0xff_00_11_22_33_44_55_66_77.polymod(255)
14:23 camelia rakudo-moar 64343d: OUTPUT«(221 18446762986173038694)␤»
14:24 timotimo m: say 0xff_00_11_22_33_44_55_66_77.polymod(255 xx *)
14:24 camelia rakudo-moar 64343d: OUTPUT«(221 189 181 219 25 208 73 28 8 1)␤»
14:24 timotimo m: say 0xff_00_11_22_33_44_55_66_77.polymod(255 xx *).fmt("%x")
14:24 camelia rakudo-moar 64343d: OUTPUT«dd bd b5 db 19 d0 49 1c 8 1␤»
14:24 timotimo that's certainly not it
14:24 timotimo m: say 0xff_00_11_22_33_44_55_66_77.polymod(256 xx *).fmt("%x")
14:24 camelia rakudo-moar 64343d: OUTPUT«77 66 55 44 33 22 11 0 ff␤»
14:24 timotimo now ... do i actually write LE or BE :\
14:25 timotimo i'd rather use nativecast :|
14:26 viki tbrowder: git clone https://github.com/zoffixzne​t/perl6-CoreHackers-Sourcery CHS; ./perl6 tools/install-dist.pl CHS
14:26 viki tbrowder: and yeah, as was mentioned, that way is being improved.
14:27 timotimo oh, i can just print a Buf[uint64] %)
14:27 timotimo oh, i can't
14:27 tbrowder thanks
14:29 viki tbrowder: basically, you say you tried R* and gave up and now you wish to add an installer of 3rd-party software to Rakudo, when R* is meant to be that. The proper approach would be to fix whatever issues you had with R* and improve that distro rather than have some 3rd-party stuff in Rakudo and some 3rd-party stuff in R*
14:30 timotimo slurp doesn't have :bin, but .slurp-rest does?
14:31 viki s: '.'.IO, 'slurp'
14:31 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/bl​ob/64343d7/src/core/IO/Path.pm#L460
14:31 viki s: '.'.IO, 'slurp-rest'
14:31 SourceBaby viki, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
14:32 viki timotimo: they both do, from what I see
14:32 timotimo m: say slurp(:bin).perl
14:32 camelia rakudo-moar 64343d: OUTPUT«"Céad slán ag sléibhte maorga Chontae Dhún na nGall\nAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;\nNuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí\nI mo dhiaidh bhí gleanntáin ghlas’ Gha…»
14:32 timotimo that's a string
14:33 viki s: &slurp
14:33 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob/​64343d7/src/core/io_operators.pm#L140
14:33 psch m: say &slurp.candidates>>.signature
14:33 camelia rakudo-moar 64343d: OUTPUT«((IO::ArgFiles:D $io = { ... }, :$bin, :$enc = "utf8", |c is raw) (Cool:D $path, :$bin = Bool::False, :$enc = "utf8", |c is raw))␤»
14:33 psch m: say slurp(:bin).WHAT
14:33 camelia rakudo-moar 64343d: OUTPUT«(Str)␤»
14:33 viki m: $*ARGFILES.slurp(:bin).^name.say
14:33 camelia rakudo-moar 64343d: OUTPUT«Str␤»
14:34 viki s: $*ARGFILES, 'slurp'
14:34 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blob​/64343d7/src/core/IO/ArgFiles.pm#L124
14:34 viki well, there's ya problem
14:35 viki m: say dir
14:35 camelia rakudo-moar 64343d: OUTPUT«(".cpanm".IO ".local".IO ".npm".IO ".perl6".IO ".perlbrew".IO ".rcc".IO ".ssh".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".bash_history".IO ".bashrc".IO "mbox".IO ".lesshst".IO "evalbot.log".IO ".cpan".IO "dalek-…»
14:35 psch ah, not passing it on?
14:35 viki It's passing, but it's not excepting it
14:35 psch well, yes
14:35 viki m: "evalbot.log".IO.slurp(:bin).^name.say
14:35 camelia rakudo-moar 64343d: OUTPUT«Buf[uint8]␤»
14:36 viki *expecting
14:38 bstamour joined #perl6
14:39 cibs joined #perl6
14:41 viki So, is anyone fixing that already or am I clear to do it?
14:43 tbrowder viki: there are already issues on star addressing the problem--basically the problem of not being able to easily modify some of the variables such as DESTDIR-- looks like too much coupling with moarvm and nqp
14:43 viki Ah that, yeah
14:43 viki But those are present in Rakudo too :)
14:44 tbrowder gotta go--will look at racoon later
14:44 kyclark_ joined #perl6
14:46 ZzZombo m: class A { has $!stuff } say A.^attributes(:local).^name
14:46 camelia rakudo-moar 64343d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3class A { has $!stuff }7⏏5 say A.^attributes(:local).^name␤    expecting any of:␤        infix␤        infix stopper…»
14:46 ZzZombo m: class A { has $!stuff }; say A.^attributes(:local).^name
14:46 camelia rakudo-moar 64343d: OUTPUT«List␤»
14:47 * viki spectests the fix
14:49 ZzZombo m: say (1, 22/7, 42, 300).first: * > 5, :kv, :end;
14:49 camelia rakudo-moar 64343d: OUTPUT«(3 300)␤»
14:50 ZzZombo m: say (1, 22/7, 42, 300).first: * > 5, :p, :end;
14:50 camelia rakudo-moar 64343d: OUTPUT«3 => 300␤»
14:51 ZzZombo I'm not sure, but isn't 42 happens before 300 but > 5 as well?
14:51 ZzZombo doesn't* and is*
14:51 psch m: say (1, 2, 3, 4).first(:end)
14:51 camelia rakudo-moar fce1a2: OUTPUT«4␤»
14:51 psch m: say (1, 2, 3, 4).first()
14:51 camelia rakudo-moar fce1a2: OUTPUT«1␤»
14:51 ZzZombo fuck
14:51 ZzZombo I didn't mean to copy :end
14:51 ZzZombo dammit
14:59 viki m: my Blob[uint8] $x .= new: 1, 2, 3; my Blob[uint8] $y .= new: 4, 5, 6; my @blobs = $x, $y; dd [~] @blobs
14:59 camelia rakudo-moar fce1a2: OUTPUT«Blob[uint8].new(1,2,3,4,5,6)␤»
14:59 viki m: my Blob[uint8] $x .= new: 1, 2, 3; my Blob[uint8] $y .= new: 4, 5, 6; my @blobs = $x; dd [~] @blobs
14:59 camelia rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at <tmp> line 1␤␤»
14:59 viki :(
15:00 viki This is mildly annoying
15:01 psch m: say ~(my Blob[uint8] $ .= new: 1,2,3)
15:01 camelia rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at <tmp> line 1␤␤»
15:02 psch that's reduce being smart again apparently
15:03 viki Wouldn't it be calling infix ~ and not prefix?
15:03 viki s: &infix:<~>, \(my Blob[uint8] $x .= new: 1, 2, 3)
15:03 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/bl​ob/64343d7/src/core/Stringy.pm#L20
15:03 viki s: &infix:<~>, \((my Blob[uint8] $x .= new: 1, 2, 3), (my Blob[uint8] $x .= new: 1, 2, 3))
15:03 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/​blob/64343d7/src/core/Buf.pm#L669
15:03 psch well, there's no 1-ary infix:<~> that takes Blob
15:03 viki Right, seems there should be
15:03 psch is my actual guess
15:03 viki Just be unity
15:04 psch m: say (my Blob[uint8] $ .= new: 1,2,3).infix:<~>
15:04 camelia rakudo-moar fce1a2: OUTPUT«No such method 'infix:<~>' for invocant of type 'Blob[uint8]'␤  in block <unit> at <tmp> line 1␤␤»
15:04 ZzZombo m: class A { has $!stuff }; say A.perl
15:04 camelia rakudo-moar fce1a2: OUTPUT«A␤»
15:04 psch m: say (my Blob[uint8] $ .= new: 1,2,3).&infix:<~>
15:04 camelia rakudo-moar fce1a2: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at <tmp> line 1␤␤»
15:04 ZzZombo m: class A { has $!stuff }; say (A,1).perl
15:04 camelia rakudo-moar fce1a2: OUTPUT«(A, 1)␤»
15:05 domidumont joined #perl6
15:13 ZzZombo m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name ) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob')
15:13 camelia rakudo-moar fce1a2: OUTPUT«Type check failed for return value; expected A but got Str ("asd")␤  in method set_name at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:15 viki ZzZombo: FWIW, camelia can take /msg and there's also #zofbot where you can use her
15:15 ZzZombo nice
15:15 Ven joined #perl6
15:17 Ven_ joined #perl6
15:18 ZzZombo can I turn say $package.^attributes(:local) into names of attributes inline in ($m.name,$m,$package,$package.^​attributes(:local),$attr).perl?
15:18 ZzZombo -say
15:19 psch m: class A { has $.a }; say A.^attributes>>.^name
15:19 camelia rakudo-moar fce1a2: OUTPUT«List␤»
15:19 psch m: class A { has $.a }; say A.^attributes>>.name
15:19 camelia rakudo-moar fce1a2: OUTPUT«($!a)␤»
15:19 psch m: class A { has $.a, $!b, @.c }; say A.^attributes>>.name
15:19 camelia rakudo-moar fce1a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable $!b used where no 'self' is available␤at <tmp>:1␤------> 3class A { has $.a, $!b7⏏5, @.c }; say A.^attributes>>.name␤»
15:19 psch m: class A { has ($.a, $!b, @.c) }; say A.^attributes>>.name
15:19 camelia rakudo-moar fce1a2: OUTPUT«($!a $!b @!c)␤»
15:27 ZzZombo hey, the trim.chars constraint somebody here suggested earlier doesn't work.
15:27 ZzZombo method set_name(Str:D $name where .trim.chars)
15:27 ZzZombo m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name .trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob')
15:27 camelia rakudo-moar fce1a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3e='unnamed'; method set_name(Str:D $name7⏏5 .trim.chars) returns ::?CLASS:D { $!nam␤    expecting any of:␤        constraint␤»
15:28 ZzZombo m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where .trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob')
15:28 camelia rakudo-moar fce1a2: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Bob' (indicated by ⏏)␤  in method set_name at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in method set_name at <tmp> line…»
15:28 ZzZombo ^
15:28 viki ZzZombo: .trim.chars.so or *.trim.chars
15:28 ZzZombo m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where *.trim.chars) returns ::?CLASS:D { $!name=$name;return 'asd'; } }; say A.new.set_name('Bob')
15:28 camelia rakudo-moar fce1a2: OUTPUT«Type check failed for return value; expected A but got Str ("asd")␤  in method set_name at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:28 ZzZombo m: class A { has Str:D $!name='unnamed'; method set_name(Str:D $name where *.trim.chars) returns ::?CLASS:D { $!name=$name;return self } }; say A.new.set_name('Bob')
15:28 camelia rakudo-moar fce1a2: OUTPUT«A.new␤»
15:29 ZzZombo that * stuff is weird for sure
15:29 viki hm .so prolly won't work
15:29 viki ZzZombo: feel free to write it as { .trim.chars }
15:29 arnsholt ZzZombo: Less weird than you might think
15:29 arnsholt It's basically convenience notation for a closure
15:29 ZzZombo that does it even stand for?
15:30 psch "*.chars" is similar to "{ $_.chars }"
15:30 viki ZzZombo: `where` smartmatches. plain .trim.chars calls .trim.chars on $_ and returns a number, such a smartmatch will expect the argument be a number. *.trim.chars / { .trim.chars } makes it a smartmatch against a block instead
15:30 arnsholt So *.foo.bar is basically "-> $x { $x.foo.bar }" or alternatively "{ $^x.foo.bar }" (equivalent, using the ^ twigil)
15:30 ZzZombo so does just placing it somewhere implicitly creates one?
15:31 viki ZzZombo: not in all places, but basically yeah
15:31 viki m: say (* * *)(2, 5)
15:31 camelia rakudo-moar 77e9d4: OUTPUT«10␤»
15:31 viki m: say {$^a * $^b)(2, 5)
15:31 camelia rakudo-moar 77e9d4: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3say {$^a * $^b7⏏5)(2, 5)␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
15:31 viki m: say {$^a * $^b}(2, 5)
15:31 camelia rakudo-moar 77e9d4: OUTPUT«10␤»
15:32 ZzZombo how does it determine the borders for the closure?
15:32 arnsholt Basically, a each * will become a closure argument, whenever it is used where a term is expected; unless the * term is the entirety of the expression
15:32 arnsholt In the latter case, it becomes the special value Whatever
15:32 viki psch: you say similar.... what are the differences?
15:33 psch m: <abc def ghi>.map({ $_ ~~ /. ** 3/}).say
15:33 camelia rakudo-moar 77e9d4: OUTPUT«(「abc」 「def」 「ghi」)␤»
15:33 psch m: <abc def ghi>.map(* ~~ /. ** 3/).say
15:33 camelia rakudo-moar 77e9d4: OUTPUT«(「abc」 「def」 「ghi」)␤»
15:33 psch eh, something like that somewhere i think :/
15:33 psch viki: the difference, in the end, is that * builds a WhateverCode, while { } builds a Block
15:34 viki Ah
15:34 arnsholt Given that an expression involving * becomes a WhateverCode, not just a plain block, there's likely something different
15:34 psch viki: and well, if there's different types behind it it's probably because we want to distinquish them
15:34 arnsholt Not sure what though
15:35 psch m: <abc def ghi>.map(*.comb[*]).say # and, well, this kinda silly example
15:35 camelia rakudo-moar 77e9d4: OUTPUT«((a b c) (d e f) (g h i))␤»
15:35 psch m: <abc def ghi>.map({$_.comb[$_]}).say
15:35 camelia rakudo-moar 77e9d4: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5abc' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
15:35 psch mind, i'm aware that even if postcircumfix:<[ ]> wasn't Whatever-special it'd still be two arguments, while the topic usage is the same...
15:36 canopus joined #perl6
15:37 kyclark_ joined #perl6
15:37 ZzZombo that's enough Perl 6 for me today. CYA all.
15:38 viki \o
15:42 viki How can I test :enc<Latin-1> works on slurp?
15:42 viki or... well, any :enc
15:44 moritz you first write a temp file with a defined Blob
15:44 moritz and then slurp, and test that the result is as expected
15:44 viki hmm
15:45 viki m: Blob[uint8].new(<10 20 30>).decode.perl.say
15:45 camelia rakudo-moar 77e9d4: OUTPUT«"\n\x[14]\x[1e]"␤»
15:45 viki m: Blob[uint8].new(<10 20 30>).decode('Latin-1').perl.say
15:45 camelia rakudo-moar 77e9d4: OUTPUT«"\n\x[14]\x[1e]"␤»
15:45 viki What sort of a blob?
15:47 viki m: Blob[uint8].new(174).decode.perl.say
15:47 camelia rakudo-moar 77e9d4: OUTPUT«Malformed UTF-8 at line 1 col 1␤  in block <unit> at <tmp> line 1␤␤»
15:47 Ven joined #perl6
15:48 viki m: Blob[uint8].new(174).decode('Latin-1').perl.say
15:48 camelia rakudo-moar 77e9d4: OUTPUT«"®"␤»
15:48 viki Got it. Thanks
15:53 kurahaupo__ joined #perl6
16:19 sufrostico joined #perl6
16:26 kyclark_ joined #perl6
16:31 * viki kicks dalek
16:32 viki oh, I just had both IRC screens in #perl6 and not one in #perl6-dev
16:32 * viki unkicks dalek
16:39 kyclark_ joined #perl6
16:41 nine Very much worth reading: http://blog.aurynn.com/contempt-culture
16:43 psch the font for the italic bits looks really off here oO
16:43 psch ...in either browser too
16:44 psch not to mention that it's really exhausting to read with all of those there, hooray for devtools that let me easy adjust css \o/
16:44 ilmari it's using Qucikcsand Italic
16:45 ilmari which is the italic version of the one used for the headlines
16:48 psch i find the topic a really difficult though
16:49 psch because, honestly?  i actually do think there's a lot of things about php that are objectively bad
16:49 psch granted, they cleaned up with php7, and i'm at least partly resting on an opinion if formed during working with it about two years ago
16:50 psch s/ if f/ i f/
16:51 viki psch: isn't that how many folks that say Perl 6 sucks operate? They judge it based on some mailsender script they say in the '90s
16:52 viki huggable: php sucks :is: http://blog.aurynn.com/contempt-culture
16:52 huggable viki, Added php sucks as http://blog.aurynn.com/contempt-culture
16:52 viki s/say/saw/;
16:52 nine psch: the point is that telling people that the language they use and that makes them feel powerful is objectively bad has probably never attracted anyone to the alternatives you propose. Advertising cool things demonstrating features of your faviourite language however makes people curious.
16:52 psch viki: is it?  i worked with php 5.1x (iirc) for about 8 months, building a CRUD application for my then-employer
16:53 psch viki: i'm not going into #php (or wherever) and telling people they should do something else
16:54 psch nine: if that's the point, then i obviously missed it
16:55 nine psch: to be convinced by it, people have to draw a conclusion by themselves. I.e. show them how simple and powerful something in your language is and they will wish they had that when they have to excert much greater effort doing the same in their language.
16:55 nine psch: telling them their language is bad because X is so much more tedious than in another language just makes you a hater and one of "them" vs. "us".
16:56 psch nine: but that's absolutely not what i'm reading in that post.  the post, to me, is about "please everyone grow out of the inherit tribalism thing that humans have been doing for thousands of years"
16:56 psch which is a nice sentiment, but doesn't really help achieve that
16:56 huf so what is that blogpost saying? that there are no objectively bad langauges? or that pointing them out is useless?
16:56 viki wow, nine++ very nice article
16:57 huf or perhaps that objectively bad langauges got that way because their communities lacked people who knew how to make it better?
16:57 nine This part sums it up quite nicely: "It’s 2015, and I saw a presenter at a Python conference make fun of Java. How would that feel to people trying to move from Java into something else? I wouldn’t feel welcome, and I’d have learned that the idea that the Python community is welcoming wasn’t true."
16:59 nine Talking down on other languages doesn't help my cause (promoting Perl). It just makes me feel cool and elitist. Trouble is that an elite is by definition a rather small group.
16:59 skids joined #perl6
17:00 psch oh, i get that, there's lots of practical conclusions to be drawn from "humans like small groups but that alienates other humans and alienating others is bad"
17:00 huf and also that people dont actually use their brains much when picking technologies
17:00 psch i just don't find lots of inherit value in blog posts that state that
17:00 huf it's nearly pure feeling
17:00 psch anyway, this is getting to me a bit too much apparently, sorry :)
17:00 huf ... i suppose that happens in the brain too
17:00 * psch &
17:02 * viki hopes there aren't any logs of #css from a decade ago :)
17:02 * viki was elitist of the elite >:)
17:03 * viki is looking for a really fast way to determine if stuff matched by d contains any combiners :/
17:04 huf i moved from the usual teenage elitism straight to complete nihilist despair i think :)
17:05 * viki needs it in straight nqp too
17:13 Khisanth joined #perl6
17:15 viki No takers? :)
17:15 viki I wonder how insane it is to hardcode all Nd chars as a character class.
17:19 viki m: say "7\x[308]" ~~ /^ \d+ $/;
17:19 camelia rakudo-moar 15f51a: OUTPUT«「7̈」␤»
17:20 viki Maybe not very insane, because it's much faster than \d+ too
17:21 viki m: say "{.5811738 / .2907747}x faster"
17:21 camelia rakudo-moar 15f51a: OUTPUT«1.9987083x faster␤»
17:26 viki oh never mind, it's slower :(
17:26 khw joined #perl6
17:30 cdg joined #perl6
17:31 viki m: https://gist.github.com/zoffixznet​/9aea90bbb2a50721ffa65317678911f3
17:31 camelia rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\d'␤at <tmp>:14␤------> 3say "\7⏏5d+ way: {$dd}s";␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
17:31 viki m: https://gist.github.com/zoffixznet​/cfe033258d04b9ca24a7d68839b5ebe8
17:31 camelia rakudo-moar 15f51a: OUTPUT«\d+ way: -1.7459995s␤literal way: -1.5470691s␤diff: 0.113934925656422%␤»
17:32 viki m: https://gist.github.com/zoffixznet​/1372003873bc818e22ed523b88c575ac
17:32 camelia rakudo-moar 15f51a: OUTPUT«\d+ way: 1.6447186s␤literal way: 1.54817305s␤diff: 0.0587003202616372%␤»
17:37 viki damn, that's not even all the Nd chars...
17:37 viki Probably a good sign that the plan should be abandoned as it's hard to find bugs in
17:48 obfusk_ joined #perl6
17:51 zakharyas joined #perl6
18:01 wamba joined #perl6
18:08 ugexe zef can now take named options after positionals (`--force install Foo`, `install --force Foo` and `install Foo --force` all do the same thing) by moving all options to the front of @*ARGS. Anyone have any ideas for when that would not work as expected? (other than a module name starting with `-`)
18:09 timotimo when you have named options that optionally take an argument
18:09 timotimo or when you have named options that always take an argument and you forget to move the argument along
18:11 ugexe you mean using `--target xxx` vs `--target='xxx'`?
18:12 timotimo yes
18:14 ugexe hmm. any ideas? maybe take the original @*ARGS and turn `--target xxx` into `--target=xxx` before the naive reordering?
18:14 firstdayonthejob joined #perl6
18:14 ugexe er shit it wont be setup right until its reordered
18:14 timotimo fair enough. if you can tell when xxx belongs to target or not
18:15 japhb Does MAIN now allow named arguments to not have '=' between key and value?  Way back when, that was a hard requirement.
18:15 * japhb hasn't checked the code recently
18:16 ugexe japhb: you're right
18:45 AlexDaniel joined #perl6
18:46 setty1 joined #perl6
18:47 trnh joined #perl6
18:47 trnh joined #perl6
18:51 viki m: dd ^10 .map: {$^a + $^b}
18:51 camelia rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 17).Seq␤»
18:51 viki m: dd ^10 .map: -> ($a, $b) {$a + $b}
18:51 camelia rakudo-moar 15f51a: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at <tmp> line 1␤␤»
18:51 viki Kinda sucks that doesn't work. I was hoping to be able to handle uneven lists in my map
18:51 viki m: dd ^9 .map: {$^a + $^b}
18:51 camelia rakudo-moar 15f51a: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
18:52 jnthn dd ^10 .map: -> $a, $b {$a + $b}
18:52 jnthn m: dd ^10 .map: -> $a, $b {$a + $b}
18:52 camelia rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 17).Seq␤»
18:52 jnthn m: dd ^9 .map: -> $a, $b? {$a + $b}
18:52 camelia rakudo-moar 15f51a: OUTPUT«Cannot resolve caller infix:<+>(Int, Mu); none of these signatures match:␤    ($x = 0)␤    (\a, \b)␤    (Real \a, Real \b)␤    (Int:D \a, Int:D \b --> Int:D)␤    (int $a, int $b --> int)␤    (Num:D \a, Num:D \b)␤    (num $a, num $b --> num)…»
18:53 jnthn m: dd ^9 .map: -> $a, $b? {$a + ($b // 0)}
18:53 camelia rakudo-moar 15f51a: OUTPUT«(1, 5, 9, 13, 8).Seq␤»
18:53 viki Oh damn
18:53 viki jnthn++
18:53 jnthn The extra parens turns it into an unpack, which is probalby not what you meant :)
18:53 viki Yeah :)
18:55 timotimo masak: it looks like your latest tweet has its link b0rked by the em-dash in it
18:56 timotimo at least in my tweetdeck it ends up not clickable
18:56 timotimo not clickable in its entirety, i mean. just the beginning part
19:00 tailgate Is there more documentation to NQP than just what is in the github repo?
19:01 timotimo there's the internals workshop course by jnthn
19:01 timotimo it's pretty good
19:01 timotimo https://github.com/edumentab/r​akudo-and-nqp-internals-course
19:01 tailgate thanks
19:01 timotimo see the pdf file linked from the readme
19:01 tailgate ooh, this is really nice
19:10 labster joined #perl6
19:13 viki huggable: \d :is: Match \d without combiners: https://gist.github.com/zoffixznet/e0cc87​a1dfd6006ba169f08b651fb9a0#file-p6-p6-L3
19:13 huggable viki, Added \d as Match \d without combiners: https://gist.github.com/zoffixznet/e0cc87​a1dfd6006ba169f08b651fb9a0#file-p6-p6-L3
19:21 RabidGravy joined #perl6
19:25 Tonik joined #perl6
19:25 espadrine joined #perl6
19:35 domidumont joined #perl6
19:37 AlexDaniel Just in case anybody missed the appeare
19:37 AlexDaniel appearance of the new bot* :)
19:37 AlexDaniel u: 🦋
19:37 unicodable6 AlexDaniel, U+1F98B BUTTERFLY [So] (🦋)
19:37 AlexDaniel u: {.uniname.words == 13}
19:37 unicodable6 AlexDaniel, U+0753 ARABIC LETTER BEH WITH THREE DOTS POINTING UPWARDS BELOW AND TWO DOTS ABOVE [Lo] (ݓ)
19:37 unicodable6 AlexDaniel, U+FBF9 ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM [Lo] (ﯹ)
19:37 unicodable6 AlexDaniel, U+FBFA ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM [Lo] (ﯺ)
19:37 unicodable6 AlexDaniel, https://gist.github.com/b8e6​eb4b8ba7e67f5287ee5d46a17fb7
19:38 AlexDaniel u: {.uniname.words == 0}
19:38 unicodable6 AlexDaniel, U+0080  [Cc] (€)
19:38 unicodable6 AlexDaniel, U+0081  [Cc] ()
19:38 unicodable6 AlexDaniel, U+0084  [Cc] („)
19:38 unicodable6 AlexDaniel, U+0099  [Cc] (™)
19:38 jnthn u: {.uniname.contains('BEER')}
19:38 unicodable6 jnthn, U+1F37A BEER MUG [So] (🍺)
19:38 unicodable6 jnthn, U+1F37B CLINKING BEER MUGS [So] (🍻)
19:38 AlexDaniel you can just do this:
19:38 AlexDaniel u: beer
19:39 unicodable6 AlexDaniel, U+1F37B CLINKING BEER MUGS [So] (🍻)
19:39 unicodable6 AlexDaniel, U+1F37A BEER MUG [So] (🍺)
19:42 AlexDaniel viki: by the way… if I do $message.reply(…) rapidly, the messages are sometimes in a different order. Is it supposed to be this way?
19:43 AlexDaniel viki: for example, I had to add sleep(…) to get the expected result here: https://github.com/perl6/whatevera​ble/blob/master/Bisectable.p6#L240
19:43 viki I have the same issue with NeuralAnomaly
19:44 geekosaur irc doesn't guarantee delivery order; it could conceivably be reordered by the server for whatever reason
19:44 viki I... not sure if it's supposed to be that way... I kinda figured the async nature of IRC was the cause
19:45 AlexDaniel sooo… the messages are actuall ordered correctly on the IRC::Client side?
19:45 geekosaur especially if testing with freenode it's entirely possible that message relay between servers follows different paths for different messages because at the time one message is sent a particular link looks not busy
19:45 AlexDaniel y*
19:46 AlexDaniel viki: perhaps you can add a configurable $message-delay to IRC::Client then?
19:47 viki NeuralAnomaly: source
19:47 NeuralAnomaly viki, See: https://github.com/zoffixznet/na
19:47 geekosaur AlexDaniel, you could try adding an output to stdout or file along with the message send to verify they're ordered correctly in the client. but scrambled message order on IRC is quite normal in multi-server configurations like freenode
19:48 viki AlexDaniel: well, I have a sleep of 3 seconds here and they still come outta order: https://github.com/zoffixznet/na/blob​/master/lib/NA/Plugin/Release.pm6#L99
19:48 AlexDaniel huh
19:50 viki well... tentatively
19:51 AlexDaniel yeah, that sounded suspicious
19:51 AlexDaniel 3 second delay should be enough… normally
19:52 AlexDaniel I do understand that in some conditions it may not be so, but come on…
19:52 geekosaur I would think. even, shorter; pastes into a channel usually don't get reordered even at the beginning when the first few lines often get sent quickly (but with a short delay between)
19:57 viki Hm, well, here's the sequence of events: I send commands to a remote shell, awaiting each *write* to complete. Asynchronously, I receive their output and if it matches a pattern, I send a message to IRC. After I send the last command, I sleep for 3 seconds then send `exit` to remote shell and wait for my ssh Proc::Async to exit. I then print a message based on the exit code of Proc::Async.... Now the message
19:57 viki generated by the output of one of the commands I sent to remote shell somehow ends up AFTER the message that I send after shutting down ssh
19:58 viki Ahhh
19:58 viki The commands get written right away, but it takes them like an hour to run, so those 3second sleep does nothing at all.
20:00 AlexDaniel so just a tiny delay will fix it for most of the cases
20:00 viki And yeah, if you're using the same IRC::Client::Message.reply to send output, then it should be sequentially sent: https://github.com/zoffixznet/perl6-IRC-C​lient/blob/master/lib/IRC/Client.pm6#L328
20:01 viki (most likely the case is the same if you reply by returning from event handlers)
20:01 viki Filters tho, start a new promise, so there may be asynchrony there
20:02 viki kinda weird that they do :/ probaby should be redesigned
20:03 viki-telnet joined #perl6
20:04 viki-telnet 1
20:04 viki-telnet 2
20:04 viki-telnet 3
20:04 viki-telnet 4
20:04 viki Well, that was a copy-paste of a chunk of text into telnet session... Seems in order
20:04 viki So *shrug*
20:06 viki Do .prints to IO::Socket::Async get sent sequentially?
20:17 bjz joined #perl6
20:31 AlexDaniel viki: maybe not
20:32 timotimo you should probably either await, or .then
20:32 AlexDaniel viki: um, but you should probably try it several times
20:32 AlexDaniel because sometimes it is indeed in order
20:34 sufrostico joined #perl6
20:34 rindolf joined #perl6
20:36 RabidGravy If I have something like "class Foo { class Bar { } }" is there a part of composition of Foo where it gets to know of Bar, or do I have to grovel round in the stash somehow?
20:38 RabidGravy also related if I have to do some hack to find out about Bar, would it be completely composed at the time that Foo is composed?
20:39 timotimo just "is export" should do it
20:39 moritz a class gets composed right after the closing curly is parsed
20:39 viki m: use nqp; say nqp::sprintf("%f", 42e0)
20:39 camelia rakudo-moar 15f51a: OUTPUT«Directive f not applicable for type VMNull␤␤»
20:39 viki What does that mean?
20:40 timotimo somehow you got a null in there
20:40 viki hm
20:40 viki m: use nqp; my $a := nqp::list; nqp::push($a, 42e0); say nqp::sprintf("%f", $a)
20:40 camelia rakudo-moar 15f51a: OUTPUT«42.000000␤»
20:40 viki well, this works for me..
20:41 RabidGravy moritz, right so by the time the compose of Foo is called the Bar will be fully composed
20:42 timotimo well, nqp ops don't really support var args
20:42 timotimo so it makes sense that you've got to pass a list
20:43 moritz RabidGravy: yes
20:43 viki Noted.
20:44 RabidGravy cool, I'm toying with a hack where the classes form part of the definition of the outer one
20:46 timotimo https://loadaverage.org/group/perl - wow so much content
20:49 viki I have another question: are there any other equality operators besides iseq_n and eqaddr? I need to somehow differentiate between 0e0 and -0e0
20:50 viki nqp: nqp::say(nqp::iseq_n(0e0, -0e0));
20:50 camelia nqp-moarvm: OUTPUT«1␤»
20:50 viki nqp: nqp::say(nqp::eqaddr(0e0, 0e0));
20:50 camelia nqp-moarvm: OUTPUT«0␤»
20:50 timotimo we usually have special ops to ask for special floats
20:50 timotimo like isnan
20:51 viki don't see one for this case
20:51 * viki relocates
20:52 nowan joined #perl6
21:01 cdg joined #perl6
21:04 cdg joined #perl6
21:19 viki nqp: nqp::say(nqp::islt(nqp::atan2(-0e0, -1e0), 0))
21:19 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'islt'␤   at gen/moar/stage2/QAST.nqp:1596  (/home/camelia/rakudo-m-inst-2/shar​e/nqp/lib/QAST.moarvm:compile_op)␤ from gen/moar/stage2/QAST.nqp:5874  (/home/camelia/rakudo-m-inst-2/share​/nqp/lib/QAST.moarvm:compile_node)␤ …»
21:20 viki nqp: nqp::say(nqp::islt_n(nqp::atan2(-0e0, -1e0), 0e0))
21:20 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'atan2'␤   at gen/moar/stage2/QAST.nqp:1596  (/home/camelia/rakudo-m-inst-2/shar​e/nqp/lib/QAST.moarvm:compile_op)␤ from gen/moar/stage2/QAST.nqp:5874  (/home/camelia/rakudo-m-inst-2/share/​nqp/lib/QAST.moarvm:compile_node)␤…»
21:20 viki bah
21:20 viki man the docs need a bit of tweaking
21:20 viki nqp: nqp::say(nqp::islt_n(nqp::atan2_n(-0e0, -1e0), 0e0))
21:20 camelia nqp-moarvm: OUTPUT«1␤»
21:21 viki nqp: nqp::say(nqp::islt_n(nqp::atan2_n(0e0, -1e0), 0e0))
21:21 camelia nqp-moarvm: OUTPUT«0␤»
21:21 viki ehehe, hax :)
21:22 viki I guess I'll use that, with a XXX next to it
21:27 zakharyas joined #perl6
21:31 viki or learn to add an op to nqp... tho that sounds hard
21:33 timotimo not that hard
21:34 timotimo op goes in oplist.txt, run update_ops.p6, put an implementation into interp.c, add it to nqp's QASTCompilerMAST
21:35 timotimo on the JVM, you'd write a method into the SomethingSomethingOperationsFactory class and add a little description to QASTOperationsJAST or whatevr it's called
21:35 viki cool, I'll learn to do that then
21:52 Lucas_One left #perl6
21:57 TEttinger joined #perl6
22:12 bjz joined #perl6
22:12 MasterDuke viki: your prop-Nd-only token, is it different from <:Nd>?
22:13 timotimo yes
22:13 timotimo because when you create a synthetic from a :Nd and some combiner, the synthetic will end up being :Nd, too
22:15 MasterDuke huh, do combiners have a named property?
22:16 timotimo a what now?
22:17 AlexDaniel eval: my @x = <a b c d>; dd @x[Mu]
22:18 evalable6 AlexDaniel, rakudo-moar 15f51a5: OUTPUT«(exit code 1) Cannot resolve caller postcircumfix:<[ ]>(Array, Mu); none of these signatures m…»
22:18 evalable6 AlexDaniel, Full output: https://gist.github.com/deaf​9bc9734c2fe08a3c9e53daf19d07
22:18 AlexDaniel 65 suggestions, great!
22:18 MasterDuke like <:Nd> is digits
22:21 girafe joined #perl6
22:25 AlexDaniel m: my @x = <1 2 3>; my $z = -999999999999999999; say @x[$z]
22:25 camelia rakudo-moar 15f51a: OUTPUT«Index out of range. Is: -999999999999999999, should be in 0..Inf␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:25 AlexDaniel m: my @x = <1 2 3>; my $z = -9999999999999999999; say @x[$z]
22:25 camelia rakudo-moar 15f51a: OUTPUT«(Any)␤»
22:39 TimToady joined #perl6
22:40 nowan_ joined #perl6
22:41 timotimo food and movie time
23:01 kalkin- m: my @a = 'a' ... 'ﭏ'; say @a
23:01 kalkin- and it hangs
23:02 camelia rakudo-moar 15f51a: OUTPUT«(timeout)»
23:02 kalkin- m: my @a = 'a' .. 'ﭏ'; say @a # but this works "out"
23:02 camelia rakudo-moar 15f51a: OUTPUT«Error encoding UTF-8 string: could not encode codepoint 55296␤  in block <unit> at <tmp> line 1␤␤»
23:03 canopus joined #perl6
23:04 AlexDaniel what this kind of range actually does?
23:04 AlexDaniel is it this weird stringy thing that barely makes any sense?
23:05 kalkin- Well at least I expected it not to timeout, but actually I thought the range would represent all unicode chars for a to aleph
23:05 kalkin- Dunno, may be the second error is valid, but why did it timeout in the case of a lazy range?
23:06 viki It's not a lazy range, but a sequence operator.
23:06 viki m: say ("a" ... "ﭏ")
23:06 camelia rakudo-moar 15f51a: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ …»
23:07 viki m: say "ﭏ".ords
23:07 camelia rakudo-moar 15f51a: OUTPUT«(64335)␤»
23:07 kalkin- viki: ahh ok sequence :)
23:07 viki well, I'm sure it'll stop once it reached 64335
23:08 viki hm
23:08 espadrine I can see why this character might be annoying http://www.fileformat.info/inf​o/unicode/char/d800/index.htm
23:09 viki espadrine: huh?
23:09 viki espadrine: you need better font on your system :)
23:09 espadrine the error blames it on character 55296, aka U+D800
23:09 viki .u ﭏ
23:09 yoleaux U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ)
23:09 viki espadrine: oh that
23:10 viki m: print ("a" ... "z")[*-1]
23:10 camelia rakudo-moar 15f51a: OUTPUT«z»
23:11 viki s: &infix:<...>, \("a", "z")
23:11 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blo​b/15f51a5/src/core/operators.pm#L437
23:11 viki kalkin-: what were you trying to do anyway?
23:11 ircuse joined #perl6
23:11 kalkin- viki: nothing in particular, just experimenting
23:11 viki m: sink eager 'a', *.succ ... 'ﭏ'
23:12 camelia rakudo-moar 15f51a: OUTPUT«(timeout)»
23:12 viki Kinda embaraccing that I don't know what "a" ... "ﭏ" does
23:13 * viki recalls ranting on a ticket about the current behaviour being fine as is :)
23:13 vendethiel m: sink eager 'a'..'ﭏ'
23:13 camelia rakudo-moar 15f51a: ( no output )
23:13 vendethiel m: my @a = eager 'a'..'ﭏ'
23:13 camelia rakudo-moar 15f51a: ( no output )
23:13 TEttinger viki: maybe chosen because it's FB4F in unicode? (hex)
23:14 viki TEttinger: I don't follow... what's chosen?
23:15 TEttinger oh sorry, wasn't sure if the ... was unclear or the second unicode character was not shown
23:17 viki m: .say for "a" ... "ﭏ"
23:17 viki kalkin-: unless Unicode has a zillion backslashes, I think you may have found a bug
23:17 camelia rakudo-moar 15f51a: OUTPUT«(timeout)a␤b␤c␤d␤e␤f␤g␤h␤i␤j␤k␤l␤m␤n␤​o␤p␤q␤r␤s␤t␤u␤v␤w␤x␤y␤z␤{␤|␤}␤~␤␤€␤␤‚␤ƒ␤„␤…␤†␤‡␤ˆ␤‰␤Š␤‹␤Œ␤␤Ž␤␤␤‘␤’␤“␤”␤•␤–␤—␤˜…»
23:17 viki If I run the above, I see a backslash slip through every few seconds
23:19 viki m: .say for ("a" ... "ﭏ").grep: "̿
23:19 camelia rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus term␤at <tmp>:1␤------> 3.say for ("a" ... "ﭏ").grep:7⏏5 "̿␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        prefix␤        term␤»
23:19 viki m: .say for ("a" ... "ﭏ").grep: "̿"
23:19 camelia rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus term␤at <tmp>:1␤------> 3.say for ("a" ... "ﭏ").grep:7⏏5 "̿"␤    expecting any of:␤        argument list␤        infix␤        infix stopper␤        prefix␤        term␤»
23:19 viki m: .say for ("a" ... "ﭏ").grep:{ "̿"}
23:19 camelia rakudo-moar 15f51a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3.say for ("a" ... "ﭏ").grep:{7⏏5 "̿"}␤    expecting any of:␤        prefix␤        term␤»
23:19 viki (╯°□°)╯︵ ┻━┻
23:19 viki If I run the above, I see a backslash slip through every few seconds
23:19 viki wtf
23:20 viki sorry, my terminal glitched
23:22 AlexDaniel eval: .ord.say for "a" ... "ﭏ"
23:22 AlexDaniel ok that was a bad idea I guess
23:24 espadrine that's like coughing and having the house fall down…
23:24 evalable6 joined #perl6
23:25 viki perl6 -e '.say for ("a" ... "ﭏ")[^4000]' | sort | uniq | wc -l
23:25 viki 425
23:25 AlexDaniel yea
23:25 viki m: ("a" ... "ﭏ")[^4000].sort.unique.elems.say
23:25 camelia rakudo-moar 15f51a: OUTPUT«735␤»
23:26 viki s: "a", 'succ', \()
23:26 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/​blob/15f51a5/src/core/Str.pm#L270
23:26 psch uh, that Sequence end point looks really confusing here..?
23:26 AlexDaniel well, it's right to left…
23:26 psch oohh
23:27 viki psch: it's aleph one
23:27 psch nah, it's just aleph
23:27 viki *aleph
23:27 psch but the right to left makes more sense there :)
23:27 AlexDaniel u: m: ("a" ... "ﭏ")[^4000].sort.unique.elems.say
23:27 unicodable6 AlexDaniel, U+003A COLON [Po] (:)
23:27 unicodable6 AlexDaniel, U+006D LATIN SMALL LETTER M [Ll] (m)
23:27 unicodable6 AlexDaniel, U+0020 SPACE [Zs] ( )
23:27 unicodable6 AlexDaniel, https://gist.github.com/9f55​ace1c5f04bd26b8caa361754aa5c
23:28 psch i'm still not completely certains what's to come out of that
23:28 psch the RTL marker is right behind the first double quote?
23:29 AlexDaniel .u  "ﭏ"000]
23:29 yoleaux U+0022 QUOTATION MARK [Po] (")
23:29 yoleaux U+0030 DIGIT ZERO [Nd] (0)
23:29 yoleaux U+005D RIGHT SQUARE BRACKET [Pe] (])
23:29 viki .u ℵ
23:29 yoleaux U+2135 ALEF SYMBOL [Lo] (ℵ)
23:29 viki .u ℵ
23:29 yoleaux U+2135 ALEF SYMBOL [Lo] (ℵ)
23:29 AlexDaniel .u  ﭏ"0
23:29 yoleaux U+0022 QUOTATION MARK [Po] (")
23:29 yoleaux U+0030 DIGIT ZERO [Nd] (0)
23:29 yoleaux U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ)
23:29 viki .u "ﭏ")
23:30 yoleaux U+0022 QUOTATION MARK [Po] (")
23:30 yoleaux U+0029 RIGHT PARENTHESIS [Pe] ())
23:30 yoleaux U+FB4F HEBREW LIGATURE ALEF LAMED [Lo] (ﭏ)
23:30 psch yeah the U+2135 doesn't show here, but ﭏ does
23:30 psch ...lamed o.o
23:31 psch anyway, that just caught my curiousitiy.  i'll resign to probably-not-knowing, g'night o/
23:32 viki m: for ("a" ... "ﭏ")[^4000] { state $x = .ord; say "Got {.ord} but has $x before" if $x > .ord; $x = .ord }
23:32 camelia rakudo-moar 15f51a: OUTPUT«Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 before␤Got 768 but has 831 befo…»
23:32 viki m: say 768.base: 16; say 831.base: 16
23:32 camelia rakudo-moar 15f51a: OUTPUT«300␤33F␤»
23:32 viki m: "\x[300]\x[33F]".uninames.say
23:32 camelia rakudo-moar 15f51a: OUTPUT«(COMBINING GRAVE ACCENT COMBINING DOUBLE OVERLINE)␤»
23:32 viki m: "\x[300]".succ.uniname.say
23:32 camelia rakudo-moar 15f51a: OUTPUT«COMBINING GRAVE ACCENT␤»
23:33 viki kyclark: would you be able to rakudobug this? And include link to the chat: https://irclog.perlgeek.de/​perl6/2016-11-25#i_13630211
23:33 viki huggable: rakudobug
23:33 huggable viki, rakudobug@perl.org or use perl6 query on http://rt.perl.org ; see https://github.com/rakudo/rakudo/#reporting-bugs
23:33 viki ^ just email to that address (the site option is currently disabled)
23:40 wamba joined #perl6
23:47 viki oh heh, only now that I copy-pasted that code into my editor do I see the weirdness

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

Perl 6 | Reference Documentation | Rakudo