Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-03-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:01 Ben_Goldberg joined #perl6
00:03 BenGoldberg s: &trait_mod:<handles>, :(Attribute:D, $thunk);
00:03 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
00:03 yoleaux 01:31 EST <sammers> BenGoldberg: thanks, I will take a look into %CALLER
00:03 BenGoldberg s: &trait_mod:<handles>, :(Attribute:D, $thunk)
00:03 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Sub, Signature); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:04 BenGoldberg s: &trait_mod:<handles>, (Attribute, Any)
00:04 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Sub, List); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
00:04 BenGoldberg s: &trait_mod:<handles>, \(Attribute, Any)
00:04 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Could not find candidate that can do \(Attribute, Any)␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤  in block <unit> at -e line 6␤␤
00:04 BenGoldberg s: &trait_mod:<handles>, \(Attribute, Pair)
00:04 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Could not find candidate that can do \(Attribute, Pair)␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤  in block <unit> at -e line 6␤␤
00:05 simcop2387 joined #perl6
00:05 araraloren joined #perl6
00:05 Geth ¦ doc: e75855c412 | (Will "Coke" Coleda)++ | doc/Type/Signature.pod6
00:05 Geth ¦ doc: remove trailing whitespace
00:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e75855c412
00:05 Geth ¦ doc: d70c7eb92e | (Will "Coke" Coleda)++ | doc/Language/operators.pod6
00:05 Geth ¦ doc: fix typos
00:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d70c7eb92e
00:05 Geth ¦ doc: e63d2e1662 | (Will "Coke" Coleda)++ | doc/Type/Signature.pod6
00:05 Geth ¦ doc: Avoid duped sub names
00:05 Geth ¦ doc:
00:05 Geth ¦ doc: pass compilation test
00:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e63d2e1662
00:06 mcmillhj joined #perl6
00:09 BenGoldberg s: &trait_mod:<handles>, \(Attribute.new, sub { ... })
00:09 SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
00:09 BenGoldberg s: &trait_mod:<handles>, \(Attribute.new, &foo)
00:09 SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤    foo used at line 6␤␤
00:09 BenGoldberg s: &trait_mod:<handles>, \(Attribute.new, &say)
00:09 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Required named parameter 'name' not passed␤  in block <unit> at -e line 6␤␤
00:16 IOninja s: &trait_mod:<handles>
00:16 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/11ee2fe/src/core/traits.pm#L359
00:18 pyrimidine joined #perl6
00:22 BenGoldberg m: class A { method foo() { "A" } }; class B { has A $.a handles * }; say B.new(a => A.new).^methods;
00:22 camelia rakudo-moar 11ee2f: OUTPUT: «(a)␤»
00:22 * BenGoldberg was being too specific, wasn't he ;)
00:22 evalable6 joined #perl6
00:24 dct joined #perl6
00:25 cyphase joined #perl6
00:26 mcmillhj joined #perl6
00:26 Geth ¦ doc: bd7a64a207 | (Tom Browder)++ | doc/Type/Str.pod6
00:26 Geth ¦ doc: correct spelling
00:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bd7a64a207
00:30 BenGoldberg m: class A { method foo() { "A" } }; class B { has A $.a handles * }; say B.new(a => A.new).^find_method("foo");
00:30 camelia rakudo-moar 11ee2f: OUTPUT: «-> $self, |c is raw { #`(Block|75700104) ... }␤»
00:38 Geth ¦ whateverable: bbede988f6 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 13 files
00:38 Geth ¦ whateverable: Lots of refactoring and other code mangling
00:38 Geth ¦ whateverable:
00:38 Geth ¦ whateverable: This commit introduces some functional changes and some minor code
00:38 Geth ¦ whateverable: style tweaks.
00:38 Geth ¦ whateverable:
00:38 Geth ¦ whateverable: Issues resolved: #32 #34 #48 #49 #50 #67 #70 #88 #95 #102 #103 #105
00:38 Geth ¦ whateverable:
00:38 Geth ¦ whateverable: <…commit message has 28 more lines…>
00:38 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/bbede988f6
00:43 * elaADnlxie wonders how many emails were sent by github
00:43 mcmillhj joined #perl6
00:44 bjz joined #perl6
00:49 kurahaupo joined #perl6
00:53 IOninja :O
00:53 IOninja * :o
00:53 IOninja Well, I know how many I got... 0
00:54 elaADnlxie 153 people didn't unwatch the repo yet, so…
00:54 elaADnlxie m: say 12 × 153 × 2
00:54 camelia rakudo-moar 11ee2f: OUTPUT: «3672␤»
00:55 IOninja elaADnlxie++
00:56 IOninja I could use some of that hacking juice you're sipping on tonight :)
00:56 IOninja Yeah, but I never receive any email from GitHub...
00:56 IOninja Is receiving it the default?
00:56 elaADnlxie I think so
00:56 elaADnlxie when you press the watch button
00:57 elaADnlxie though when you create a new repo in perl6 org, all members are subscribed automatically
01:00 elaADnlxie IOninja: well, most of these changes were done during my rides in a bus (usually in a standing position, because people will only start to care about me when I get old…), not tonight :)
01:09 IOninja Standing position?...
01:09 IOninja Now I'm unsure whether to be more or less impressed...
01:10 mcmillhj joined #perl6
01:11 elaADnlxie yea, I push the laptop with my palms against the lower part of my belly
01:11 elaADnlxie this way I can type with both hands and still hold the laptop
01:11 IOninja 0.o
01:12 elaADnlxie oh yeah, skills you learn because using the public transport for ≈40 minute (one way) rides every day :)
01:14 IOninja I travel the same amount, but even were I sitting it'd be uncomfortable to type because the laptop would be sliding down my lap...
01:15 IOninja I can't even picture what typing while standing on a bus looks like :D
01:15 elaADnlxie I'll try to get a picture one day
01:17 IOninja :)
01:18 llfourn m: my @a; @a[@a.elems] := "foo" # any better way to bind the last elem of array?
01:18 camelia rakudo-moar 11ee2f: ( no output )
01:18 llfourn or rather bind to the index after the last element
01:19 elaADnlxie .last ?
01:19 elaADnlxie .tail?
01:19 elaADnlxie ah…
01:20 elaADnlxie yea, that's not writable
01:20 elaADnlxie *-1 is not going to work also…
01:20 llfourn yep :\
01:21 IOninja How come you need to bind?
01:22 llfourn I want to have an array of pointers to scalar variables essentially
01:22 IOninja m: my @a; @a[+@a] := "foo"; say @a
01:22 camelia rakudo-moar 11ee2f: OUTPUT: «[foo]␤»
01:22 IOninja m: my @a; .[+$_] := "foo" with @a; say @a
01:22 camelia rakudo-moar 11ee2f: OUTPUT: «[foo]␤»
01:23 llfourn mm +@a
01:24 llfourn Maybe I can do what I want another way. Just checking to see if there was some way of raw pushing containers.
01:26 mcmillhj joined #perl6
01:28 IOninja llfourn: does it have to be an Array (as opposed to, say, a List)?
01:29 IOninja m: my $a = "meow"; my $b = "foo"; my @a := $a, $b; @a[0] = 42; @a[1] = "foooooos"; dd [ $a, $b ]
01:29 camelia rakudo-moar 11ee2f: OUTPUT: «[42, "foooooos"]␤»
01:29 llfourn yes, this is a mutable array of variable containers :P
01:29 IOninja ok :)
01:31 IOninja m: my $a = "meow"; my $b = "foo"; sub infix:<♥> (\a, +b) is assoc('list') { a[+a] := $_ for b }; my @a; @a♥$a♥$b; @a[0] = 42; @a[1] = "foooooos"; dd [ $a, $b ]
01:31 camelia rakudo-moar 11ee2f: OUTPUT: «[42, "foooooos"]␤»
01:31 IOninja hehe :)
01:32 IOninja Love solves everything!
01:34 llfourn nice <3
01:42 elaADnlxie IOninja: no. Proof: https://github.com/Love
01:43 BenGoldberg Clearly, love needs love.
01:43 IOninja elaADnlxie++ hah
01:43 BenGoldberg Not to mention, love cannot solve the halting problem.
01:45 * BenGoldberg thinks that's because love is eternal, and as a result, the halting problem is outside of it's problem domain.
01:47 mcmillhj joined #perl6
01:47 elaADnlxie excuses, excuses…
01:55 pyrimidine joined #perl6
02:19 kalkin- joined #perl6
02:19 BenGoldberg m: my $foo = 32; dd callframe(0)
02:19 camelia rakudo-moar 11ee2f: OUTPUT: «CallFrame.new(annotations => {:file("<tmp>"), :line("1")}, my => {"!UNIT_MARKER" => !UNIT_MARKER, "\$!" => Nil, "\$/" => Nil, "\$=finish" => Mu, "\$=pod" => [], "\$?PACKAGE" => GLOBAL, "\$_" => Any, "\$foo" => 32, "\$¢" => Nil, "::?PACKAGE" => GLOBAL, :…»
02:20 BenGoldberg m: my \foo = 32; dd callframe(0)
02:20 camelia rakudo-moar 11ee2f: OUTPUT: «CallFrame.new(annotations => {:file("<tmp>"), :line("1")}, my => {"!UNIT_MARKER" => !UNIT_MARKER, "\$!" => Nil, "\$/" => Nil, "\$=finish" => Mu, "\$=pod" => [], "\$?PACKAGE" => GLOBAL, "\$_" => Any, "\$¢" => Nil, "::?PACKAGE" => GLOBAL, :EXPORT(EXPORT),…»
02:20 BenGoldberg m: my $foo = 32; dd callframe(0).my
02:20 camelia rakudo-moar 11ee2f: OUTPUT: «{"!UNIT_MARKER" => !UNIT_MARKER, "\$!" => Nil, "\$/" => Nil, "\$=finish" => Mu, "\$=pod" => [], "\$?PACKAGE" => GLOBAL, "\$_" => Any, "\$foo" => 32, "\$¢" => Nil, "::?PACKAGE" => GLOBAL, :EXPORT(EXPORT), :GLOBALish(GLOBAL)}␤»
02:20 BenGoldberg m: my \foo = 32; dd callframe(0).my
02:20 camelia rakudo-moar 11ee2f: OUTPUT: «{"!UNIT_MARKER" => !UNIT_MARKER, "\$!" => Nil, "\$/" => Nil, "\$=finish" => Mu, "\$=pod" => [], "\$?PACKAGE" => GLOBAL, "\$_" => Any, "\$¢" => Nil, "::?PACKAGE" => GLOBAL, :EXPORT(EXPORT), :GLOBALish(GLOBAL), :foo(Mu)}␤»
02:22 BenGoldberg I kinda sort understand why, in the \foo example, it shows up in the hash as :foo(Mu) ... but it's a bit annoying in a way, too.
02:25 * BenGoldberg wonders why there is a class named '!UNIT_MARKER'.  Is it named that purely to make it hard to fiddle with?
02:29 MasterDuke it's some sort of magic, but gets the name '!CORE_MARKER' if compiling rakudo
02:37 BenGoldberg m: my \foo = 32; say callframe(0).my.grep: /foo/
02:37 camelia rakudo-moar 11ee2f: OUTPUT: «(foo => 32)␤»
02:37 * BenGoldberg wonders where the Mu went.
02:48 BenGoldberg Does anyone know if there's any difference between calling .^methods on a class object vs an instance of the same?
02:48 BenGoldberg Str.^methods vs "foo".^methods?
02:51 elaADnlxie m: say ("foo" but role { method pewpew {} }).^methods
02:51 camelia rakudo-moar 11ee2f: OUTPUT: «(pewpew subst word-by-word tc perl comb ends-with ACCEPTS samespace wordcase indent Numeric index trim-trailing trans codes ord Str split pred ords lc fc NFC indices chars Stringy trim-leading NFD rindex samemark trim NFKC WHY gist starts-with tclc subst…»
02:51 elaADnlxie BenGoldberg: do you count this as an instance of the same? ;)
02:51 BenGoldberg No, because:
02:52 BenGoldberg m: say ("foo" but role { method pewpew {} }).WHAT
02:52 camelia rakudo-moar 11ee2f: OUTPUT: «(Str+{<anon|30686304>})␤»
02:52 BenGoldberg m: say ("foo" but role { method pewpew {} }).WHAT === Str
02:52 camelia rakudo-moar 11ee2f: OUTPUT: «False␤»
02:53 elaADnlxie m: say ("foo" but role { method pewpew {} }).WHAT ~~ Str
02:53 camelia rakudo-moar 11ee2f: OUTPUT: «True␤»
02:55 llfourn m: my $i = 2; $_ = "    foo"; s/^\s ** $i//; .say # any way to quantify with a var?
02:55 camelia rakudo-moar 11ee2f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Quantifier quantifies nothing␤at <tmp>:1␤------> 3my $i = 2; $_ = "    foo"; s/^\s **7⏏5 $i//; .say # any way to quantify with a␤»
02:55 elaADnlxie m: my $i = 2; $_ = "    foo"; s/^\s ** {$i}//; .say
02:55 camelia rakudo-moar 11ee2f: OUTPUT: «  foo␤»
02:56 llfourn thx nice one
02:57 cdg joined #perl6
03:15 astj joined #perl6
03:18 noganex_ joined #perl6
03:33 pyrimidi_ joined #perl6
03:34 Todd joined #perl6
03:34 Todd need help with zef
03:34 yoleaux 2 Mar 2017 09:33Z <IOninja> Todd: Inline::Perl5 is a Perl 6 module; you install it with `zef install Inline::Perl5` not cpan; it doesn't create "inline" files on your filesystem but installs precompiled units in CUR, so check it's installed with `perl6 -MInline::Perl5`, not grepping your system for files
03:35 jeffythedragonsl joined #perl6
03:35 Todd cd Inline-Perl5
03:35 Todd zef install .
03:35 Todd ... Can't locate ExtUtils/Embed.pm in @INC
03:35 Todd What next?
03:36 dj_goku Todd: why not just do: zef install Inline::Perl5 ?
03:36 evalable6 joined #perl6
03:36 unicodable6 joined #perl6
03:36 committable6 joined #perl6
03:36 bisectable6 joined #perl6
03:36 benchable6 joined #perl6
03:36 statisfiable6 joined #perl6
03:37 Todd Too many errors
03:37 Todd What I did was: git clone https://github.com/niner/Inline-Perl5.git
03:37 dj_goku really I just installed it fine.
03:37 Todd hen I cd's into the directory
03:37 dj_goku what version of perl6 are you on?
03:38 dj_goku perl6 -v
03:38 Todd # rpm -qa rak\*
03:38 Todd rakudo-star-0.0.2016.11-1.fc25.x86_64
03:38 Todd # perl6 --version
03:38 Todd This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c.
03:38 dj_goku have you tried upgrading?
03:39 dj_goku Todd: I would recommend: https://github.com/tadzik/rakudobrew
03:39 Todd dnf upgrade rakudo-star  and there is a new one!  Installing right now
03:40 Todd # rpm -qa rak\*
03:40 Todd rakudo-star-0.0.2017.01-1.fc25.x86_64
03:40 wamba joined #perl6
03:40 Todd I am re-zef'ing
03:41 Todd Can't locate ExtUtils/Embed.pm in @INC
03:41 Todd no symptom change.  Rats.  What now?
03:41 MasterDuke do you have that Perl 5 module installed?
03:42 Todd no.  installing right now
03:43 MasterDuke doesn't redhat break up perl5 into two packages? core one that's almost entirely useless and another one you need to get a functional perl 5?
03:43 Todd rezeffing
03:44 Todd ===> Testing [FAIL]: LibraryMake:ver('1.0.0'):auth('github:retupmoca') Aborting due to test failure: LibraryMake:ver('1.0.0'):auth('github:retupmoca') (use --force to override)
03:44 Todd Should I use --force?
03:46 Todd uh oh.  I have to leave for 30 minutes to handle a family matter.  I will leave channel open.  Thank yo all for hte help so far.  Little by little!
03:48 jeffythedragonsl joined #perl6
03:49 jeffythedragonsl Hey
03:49 dj_goku MasterDuke: no idea, but this is one reason why I use perlbrew to also install perl5 so I don't have to depend on the system perl.
03:49 jeffythedragonsl So I saw the grant to work on IO... and was wondering how hard it is to get one
03:52 jeffythedragonsl joined #perl6
03:52 MasterDuke dj_goku: i don't use perl5 much on my home machine, so i've been fine just using whatever arch provides
03:53 dj_goku ahh, I haven't needed to in awhile either, but really like I can use perl/rakudo(brew) to install in my home directory
03:54 MasterDuke jeffythedragonsl: samcv has a grant proposal she's going to make this month, her and IOninja are the two most recent people to apply for Perl 6 stuff i believe
03:55 jeffythedragonsl I mean who do they give grants to
03:56 jeffythedragonsl How do they decide what needs to be done
03:57 MasterDuke that i don't know. but i think lizmat is on the grant board. and [Coke] is also involved somehow. i guess ask them?
03:58 jeffythedragonsl I don't think I have the time or knowledge to be any big help, other than writing new scripts in p6
04:00 jeffythedragonsl But that is all very interesting
04:04 MasterDuke i can't speak to time, but i don't think you don't need all that much knowledge to start contributing
04:06 elaADnlxie don't they have some problem with the lack of money right now?
04:07 elaADnlxie anyway, here's a WAT
04:07 elaADnlxie m: my regex meh($t) { xy }; say 'xy' ~~ /^ <meh(42)> $/
04:07 camelia rakudo-moar 11ee2f: OUTPUT: «「xy」␤ meh => 「xy」␤»
04:07 elaADnlxie m: my regex meh($t) { xy }; say 'ab' ~~ /^ <meh(42)> $/
04:07 camelia rakudo-moar 11ee2f: OUTPUT: «Nil␤»
04:07 elaADnlxie m: my regex meh($t) { .. }; say 'xy' ~~ /^ <meh(42)> $/
04:07 camelia rakudo-moar 11ee2f: OUTPUT: «「xy」␤ meh => 「xy」␤»
04:07 elaADnlxie m: my regex meh($t) { .. }; say 'xyz' ~~ /^ <meh(42)> $/
04:07 camelia rakudo-moar 11ee2f: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤  in regex meh at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:08 elaADnlxie WAT?
04:09 MasterDuke elaADnlxie: it depends on having a parameter in the signature
04:09 MasterDuke m: my regex meh() { .. }; say 'xyz' ~~ /^ <meh()> $/
04:09 camelia rakudo-moar 11ee2f: OUTPUT: «Nil␤»
04:10 elaADnlxie I'll rakudobug this before I go to bed, I guess… but I find this hard to explain
04:12 bjz joined #perl6
04:23 Todd I am back.  I am trying --force to see what happens
04:25 Todd perl6 -MInline::Perl5
04:25 Todd gave me somethign weird
04:25 Todd You may want to `zef install Readline` or `zef install Linenoise` or use rlwrap for a line editor
04:26 elaADnlxie OK, RT #130910
04:26 elaADnlxie night
04:30 ZzZombo joined #perl6
04:30 ZzZombo joined #perl6
04:30 dj_goku Todd: did you look at rakudobrew by chance?
04:30 Todd would someone throw a "perl -e -MInline::Perl5 'do something in perl 5'" for me to test if --force worked?
04:33 dj_goku Todd: I would recommend using rakudobrew vs your os package manager: https://github.com/tadzik/rakudobrew
04:34 Todd I am looking at http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Source-Rakudobrew
04:34 Todd that the best place?
04:34 dj_goku did you not see the link I posted?
04:34 dj_goku https://github.com/tadzik/rakudobrew
04:35 Todd yes I missed that.  What will rakudobrew do for me?
04:36 dj_goku Todd: hopefully circumvent all the problems you are currently having.
04:36 dj_goku :D
04:36 Todd by?
04:37 dj_goku no using your os package manager? or OSes perl?
04:37 dj_goku not using*
04:40 Todd on other packages where I have had to do that, such as Wine-Staging, it wa a total pain in the *** to hunt down and find all the OS's packages.  The "rom-e" missing some things and leaves others in tact.  So yo wind up with fractons of one versinos conflicting with the new version you install manually (make install", especially since the manual method always uses different paths (/opt vs /usr/bin vs /usr/share/bin) that it can be a bit of
04:40 Todd So, unless force to, I have to stick with the OS's package manager (dnf).
04:41 dj_goku Todd: rakudobrew is self-contained to ~/.rakudobrew you delete that directory and you no longer have rakudobrew
04:41 Todd Oh I made a lot of typos in that, i hope everyone can still understand it
04:42 dj_goku I have no experience with redhat so either you try rakudobrew and I can help or you are on your own and hopefully someone else here can help you.
04:44 Todd I think I still don't understand how it works
04:46 dj_goku Todd: you clone rakudobrew repo, you export the PATH, run the command rakudobrew init, then you run rakudobrew build moar to install moarvm then you run, rakudobrew build-zef, then you'll run zef install Inline::Perl6
04:46 dj_goku just follow the installation instructions on the rakudobrew page
04:47 dj_goku Todd: after all that you have perl6 moarvm and you can start playing with perl6 instead of trying to figure out your operating system.
04:48 Todd implementing suggestin right now
04:50 Todd It is running.  I thing INline ihas already been installed.  "perl6 -c" is no longer throwing errors on it
04:50 Todd rakudobrew build moar
04:51 Todd Configuration FAIL.
04:51 Todd # rakudobrew build-zef rakudobrew: No version set.
04:51 dj_goku can you post the log to a pastebin?
04:54 Todd how do I do that?
04:54 dj_goku http://pastebin.com
04:57 Cabanoss- joined #perl6
04:57 Todd I just ran the test from https://github.com/niner/Inline-Perl5
04:58 dj_goku so did you get rakudobrew installed?
04:58 Todd And although it could not conenct to the database, it did show that the Inline module was working.  So for now, I am happy.
05:02 Ben_Goldberg joined #perl6
05:08 eroux joined #perl6
05:09 Todd use Inline::Perl5;
05:09 Todd use Term::ANSIColor:from<Perl5>;
05:10 Todd print ( Term::ANSIColor::RED ~ "Red\n" );
05:10 Todd Could not find symbol '&RED'
05:10 Todd How do I use the Constant from Perl5 here?
05:15 cdg joined #perl6
05:20 samcv well there is a Terminal::ANSIColor plugin native perl 6
05:20 samcv not sure about constants
05:21 Todd Acutally, I was looking for a demonstration for my keepers file of how to use inline
05:22 samcv ah
05:24 Todd This worked:
05:24 Todd use Inline::Perl5; my $i = Inline::Perl5.new; print ( $i.call( 'Term::ANSIColor::RED' ) ~ "Red\n" ~ $i.call( 'Term::ANSIColor::RESET' ) );
05:24 pyrimidine joined #perl6
05:28 Todd Still not understanding why
05:28 Todd use Term::ANSIColor:from<Perl5>;
05:28 agentzh joined #perl6
05:28 Todd doesn't work
05:34 Todd signing out for the night, I hope.  Thank you all for the help!
05:44 jsoo joined #perl6
05:58 ZzZombo m: use Inline::Perl5;use Term::ANSIColor:from<Perl5>;say Term::ANSIColor::RED ~ 'NYA';
05:58 camelia rakudo-moar 11ee2f: OUTPUT: «5===SORRY!5=== Error while compiling /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inline::Perl5)␤An exception occurred while evaluating a constant␤at /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inl…»
05:59 ZzZombo m: use Inline::Perl5;use Term::ANSIColor:from<Perl5>;say Term::ANSIColor::RED,'NYA';
05:59 camelia rakudo-moar 11ee2f: OUTPUT: «5===SORRY!5=== Error while compiling /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inline::Perl5)␤An exception occurred while evaluating a constant␤at /home/camelia/site#sources/FC133D3E7EC3B0CBE238C296893894C9AB745A05 (Inl…»
06:00 rurban joined #perl6
06:05 bjz_ joined #perl6
06:06 TimToady probably needs Term::ANSIColor::Red() up there
06:15 astj joined #perl6
06:26 geekosaur joined #perl6
06:29 moritz good morning
06:30 sjn good *, moritz & #perl6 :)
06:42 masak morning
06:42 masak it's time to name another type of joke. naming suggestions welcome.
06:42 masak I will provide two examples of the type of joke:
06:42 masak "Never let your sense of morals prevent you from doing what’s right." -- Isaac Asimov
06:43 masak "Never let school get in the way of getting a good education." -- (who?)
06:46 masak feels like the latter would be Mark Twain or Ambrose Bierce
06:49 masak wow, Rob Pike got the question on a /. AMA 'Given the nature of current operating systems and applications, do you think the idea of "one tool doing one job well" has been abandoned?'
06:50 masak and he replied 'Those days are dead and gone and the eulogy was delivered by Perl.'
06:55 jeek Those days are dead and gone and the eulogy was delivered by Perl.
06:55 jeek Rob Pike (2004) in interview at slashdot.com, Oct 18 2004
06:55 masak yep
06:55 masak haven't thought of it that way, that Perl killed off the "one tool for one job" idea
06:56 masak I wonder if Emacs could be said to have done the same thing?
07:06 mcmillhj joined #perl6
07:16 samcv morning/night/etc everyone
07:17 darutoko joined #perl6
07:19 Woodi_ hallo #perl6 :)
07:20 rurban joined #perl6
07:20 samcv hi Woodi_
07:22 mcmillhj joined #perl6
07:23 Woodi_ re one tool - one job and Perl: there is some truth in this but also such simplicity is irreplecable. just rality work that way, we sometimes need small hammer and sometimes pnumatic press
07:23 Woodi_ that's why multituls didn't replaced specialized tools :)
07:25 TimToady well, Perl was intended to be more like a machine shop anyway
07:25 Woodi_ *multitools. but having such device all the time on you is great time saver :)  also almoust any answer can work in 80% of cases... just in ~5% you create mortal enemy for yourself :)
07:29 Woodi_ btw. we live in Unix parts replacement times :) systemd, C under attack...
07:29 Woodi_ Perl6 ? ;)
07:29 cibs joined #perl6
07:30 CIAvash joined #perl6
07:37 nine moritz: not yet
07:38 robertle joined #perl6
07:39 Woodi_ masak: "never good jokes" ? ;)  problem is that morals can be ill-formed or what's-right be disinformed...
07:43 nine moritz: though experience with Perl 5's Inline::Python shows that it'd be relatively simple to add. The differences on the C side are quite limited.
07:44 TimToady masak: maybe something like 'territory map' jokes, where the funny comes "the territory is not the territory, because you forgot that your territory is just a map'
07:46 LeCamarade joined #perl6
07:49 rindolf joined #perl6
07:50 RabidGravy joined #perl6
07:51 TimToady so they're re-map-mapping or map-remapping jokes, if you want a self-referential meta definition :)
07:51 TimToady or maybe just 'remapping' jokes for short
07:53 TimToady both in the sense of re-installing the map to the territory, and also in the sense of changing the denotations to the connotations of the words involved
07:53 sjn masak: maybe "system vs. reality" jokes?
07:53 TimToady *changing the mapping of the
07:53 sjn or plan vs. reality, if one thinks of the military
07:55 TimToady that's kind of what I was getting at, with the addition that the system has to be moved from being perceived as accurate to faulty
07:55 sjn yep. :)
07:56 TimToady and part of the funniness comes from doing the redefinition retroactively
07:57 * sjn thinks about that joke where a military vessel harshly orders a lighthouse to move away from it's course :)
07:57 TimToady so they're really in the category of garden path sentences
07:57 TimToady or, to use a self-descriptive phrase, they're garden pathological. :)
08:04 mcmillhj joined #perl6
08:13 RabidGravy boo!
08:16 dha joined #perl6
08:22 RabidGravy there isn't any way to parameterise a class definition like "class Foo[something] { ... }" is there?
08:23 RabidGravy the grammar seems to suggest not
08:26 RabidGravy there's no particular technical reason why I want to do it, it's more an aesthetic thing
08:26 Woodi_ RabidGravy: what "something" caould be ? a type ?
08:27 Woodi_ *could
08:28 RabidGravy a type (or types in my actual case,) but anything that you can have with a parameterised role for example
08:30 llfourn joined #perl6
08:40 Woodi_ m: use MONKEY-SEE-NO-EVAL; sub c(Str $s) { my $t = 'class Foo { has TMPL $!f }';$t ~~ s/TMPL/$s/; say $t; return EVAL $t }; c("Int");
08:40 camelia rakudo-moar 11ee2f: OUTPUT: «class Foo { has Int $!f }␤»
08:41 mcmillhj joined #perl6
08:44 RabidGravy :-\
08:44 bjz joined #perl6
08:46 jiang joined #perl6
08:47 cibs joined #perl6
08:48 Woodi_ RabidGravy: I bet slang doing what you want will be doing such evals :)
08:56 Todd joined #perl6
08:57 Todd Hi All,  question on Inline::Perl5's "run" feature.  how do I get my Perl 6 variable inside of a "run"?
08:57 RabidGravy you know that the TODO list is going out of control when you look at your browser tabs, wonder why you have some open, and remember the code you started implementing something
08:58 Todd #!/usr/bin/perl6
08:58 Todd use Inline::Perl5;
08:58 Todd my $p6str = "string from Perl 6";
08:58 Todd my $perl5 = Inline::Perl5.new();
08:58 Todd $perl5.run(' print $p6str . "\n\n"; ');
08:59 Todd $p6str prit out empty
08:59 RabidGravy well yes
08:59 RabidGravy the simplest way would be to interpolate
09:00 Todd What does that mean?
09:00 RabidGravy $perl5.run(qq{ print $p6str . "\n\n";}');
09:00 Todd here is the example I was looking at: https://gist.github.com/araraloren/b33529c8e2b353888e2c10236d9b6c7c
09:00 Todd I will try the qq{}
09:01 RabidGravy (other alternative quoting mechanisms are available)
09:01 Todd Number found where operator expected at (eval 7) line 1, near "Perl 6" (Do you need to predeclare Perl?)
09:02 Todd qq{} did not work.
09:02 RabidGravy yes it did
09:03 RabidGravy you just need more double quotes
09:03 RabidGravy that is a perl 5 error
09:04 Todd where?
09:04 RabidGravy $perl5.run(qq{ print "$p6str \n\n";}')
09:04 Todd $perl5.run(qq{ print $p6str . "\n\n"; });
09:04 araraloren '' not support interpolate
09:04 RabidGravy yes
09:05 RabidGravy the value of $p6str needs to be quoted
09:05 Todd $perl5.run(qq{ print "$p6str\n\n"; });
09:05 araraloren m: my $p6str = "123"; "print $p6str \n\n".say
09:05 camelia rakudo-moar 11ee2f: OUTPUT: «print 123 ␤␤␤»
09:06 Todd worked.  I get it.  It thinks $p6str is a function  if I don't
09:06 araraloren m: my $p6str = "123"; 'print $p6str \n\n'.say; qq{print "$p6str\n\n"}.say
09:06 camelia rakudo-moar 11ee2f: OUTPUT: «print $p6str \n\n␤print "123␤␤"␤»
09:06 FROGGS joined #perl6
09:07 Todd thank you!!!
09:08 araraloren maybe you should refer this, http://learnxinyminutes.com/docs/perl6/
09:09 Todd I have that one.  Thank you!
09:09 cyphase joined #perl6
09:10 cyphase joined #perl6
09:12 Todd Got another Inline::Perl5 question
09:12 Todd #!/usr/bin/perl6
09:13 Todd use Inline::Perl5; use Term::ANSIColor:from<Perl5>;
09:13 Todd my $Red   = Term::ANSIColor.RED; my $Reset = Term::ANSIColor.RESET;
09:13 Todd print ( $Red ~ "--Red--" ~ $Reset ~ "\n\n" );
09:14 dha joined #perl6
09:14 Todd the print out is indeed red, but it prints out the words "Term::ANSIColor" as well as accepting the color command. Same thing on reset too
09:16 Todd Term::ANSIColor--Red--Term::ANSIColor
09:17 Todd it is red up to and including the second set of --
09:25 Todd that learn in minutes is sweet!
09:26 n1ce joined #perl6
09:30 pyrimidine joined #perl6
09:44 RabidGravy Todd, for reference there is actually a Perl 6 Term::ANSIColor (and a Terminal::ANSIColor - what's all that about?)
09:44 Actualeyes joined #perl6
09:47 * RabidGravy has another go at making a binding to poll(2) work
09:47 Todd Oh I do know and use it a lot.  What I am doing is creating a sample program showing several different ways of doing Inline::perl5 for my internal use.  The idea is to be able to reference it when I forget how to use it
09:47 RabidGravy right
09:47 Todd I was basically looking for things I knew where Perl 5 only
09:49 bjz joined #perl6
09:49 Todd This is all leading up to me writing a sub to collect up two log fiels, place them into a tar ball, then attach them to an eMail with Perl 5's eMail::Simple
09:50 Todd No such critter exist for Perl6 yet
09:51 Todd I will probably hammer away using Inline::Perl5's "run" module with qq{}
09:51 timotimo but why?
09:52 Todd And, believe me, I'd rather be done with Perl 5 for good.  the @_ metod of pasing variables to subs drives me nuts.  I is like a high level language suddenly decided to inject some assembly code.  I am writing in a High level language for a reason!
09:57 timotimo but still, why use "run"?
09:58 Todd because I can code the whole thing in p5 inside the run.  Take a look over at https://gist.github.com/araraloren/b33529c8e2b353888e2c10236d9b6c7c
09:59 RabidGravy there is an Email::Simple for Perl 6
09:59 Todd lines 86 to 156
09:59 RabidGravy it may need some love but it definitely exists
10:00 Todd It doesn't take attachments at this time .  Sniffle!
10:00 Todd And I am not up to MIME::Base64
10:00 RabidGravy well it's open source and everything, I'm sure it can be fixed to do that
10:01 Todd I am no wher near capable of doing that, so i have to rely on the kindness of other fars better than I
10:01 Todd and Inline::Perl5   Sniffle!
10:02 araraloren joined #perl6
10:09 parv joined #perl6
10:09 Todd Got to call it a night.  Thank you all for the help!
10:10 RabidGravy anyone got a clue as to why https://gist.github.com/jonathanstowe/98ea5173f14e87a3a097c7738bd79577 segfaults?  Total mystery to me,  everything seems to be the right size
10:10 Todd I posted the last question over on the mailing list if anyone figures out the answer
10:11 timotimo what actually happens when we have "is rw" on a CArray parameter?
10:12 RabidGravy dunno, but that doesn't actually make any difference
10:12 timotimo OK
10:12 RabidGravy the poll call writes into the structs in the array
10:13 RabidGravy so in theory it should set revents
10:13 RabidGravy but it seems to mangle the array
10:13 timotimo it's crashing while it's trying to get an int value out of a CStruct
10:13 RabidGravy yes
10:15 timotimo need a less optimized moar
10:15 mawkish_ joined #perl6
10:15 RabidGravy the array element is defined (and is a PollFD) after the call but it broken
10:16 timotimo wait
10:16 timotimo what does poll expect the array to look like?
10:17 RabidGravy oh yes
10:17 RabidGravy it's a flat array isn't it, not an array of pointers
10:17 RabidGravy boo
10:17 timotimo NativeCall doesn't have flat arrays yet
10:18 timotimo not without doing magic with nativecast
10:18 RabidGravy yeah, this is me being stupid and reading the C signature wrong
10:21 RabidGravy didn't sortiz do something around this?
10:22 timotimo we have a module, yeah
10:24 RabidGravy https://github.com/salortiz/NativeHelpers-Blob/blob/master/lib/NativeHelpers/CStruct.pm6 ?
10:25 timotimo i think that's the one
10:30 Actualeyes joined #perl6
10:36 cyphase joined #perl6
10:37 llfourn joined #perl6
10:38 RabidGravy wahay!
10:38 RabidGravy IT LIVES!
10:42 obfusk joined #perl6
10:44 RabidGravy there https://gist.github.com/jonathanstowe/98ea5173f14e87a3a097c7738bd79577
10:44 timotimo mhm
10:48 sjn \o
10:49 sjn quick question: how does one introspect slangs? (e.g. the quoting sub-language, to find out which characters can be used to quote stuff)?
10:50 timotimo there's no unified API for that purpose, i don't think?
10:51 llfourn the only thing you could do is ask it what methods it has in it
10:51 sjn Well, TimToady's example used $?LANG.grammar.^methods
10:51 sjn but that was for methods in general
10:52 llfourn (where's this example?)
10:52 sjn something similar for quoting constructs would be brillint
10:52 sjn llfourn: ah, I asked this question here a few days ago
10:52 llfourn oh ok. I thought there might be some blog post on what's happening in slangs.
10:53 IOninja .tell Todd what sort of perl5 you got installed? ExtUtils::Embed was part of it since 5.003007, so it's very strange it can't find it. FWIW, I never had problems with perlbrewed one `\curl -L https://install.perlbrew.pl | bash; echo 'source ~/perl5/perlbrew/etc/bashrc' >> ~/.bashrc; perlbrew install perl-stable -Duseshrplib -Dusemultiplicity; perlbrew switch perl-stable; perlbrew install-cpanm`
10:53 yoleaux IOninja: I'll pass your message to Todd.
10:55 geekosaur joined #perl6
10:55 sjn m: $/.Str.say when /^ < pre in post circum> fix ":sym" <( .* / for  $?LANG.grammar.^methods».name
10:55 camelia rakudo-moar 2a57bf: OUTPUT: «<lambda>␤<STATEMENT_LIST( )>␤<( )>␤<[ ]>␤<ang>␤«<< >>»␤<« »>␤<{ }>␤<i>␤<++>␤<-->␤<++>␤<-->␤<ⁿ>␤«->»␤<**>␤<+>␤<~~>␤<~>␤<->␤<−>␤<??>␤<?>␤<!>␤<|>␤<+^>␤<~^>␤<?^>␤<^^>␤<^>␤<*>␤<×>␤</>…»
10:55 sjn llfourn: ^
10:56 IOninja .tell dj_goku by default rakudobrew uses whatever random dev commit happened to be HEAD and has several quirks (such as having to run rehash to after install of binaries). Recommending it over properly tested and prepared releases to anyone who walks by is probably not a good idea.
10:56 yoleaux IOninja: I'll pass your message to dj_goku.
10:56 llfourn sjn: heh nice
10:57 domidumont joined #perl6
11:00 IOninja .tell jeffythedragonsl RE how hard is it to get a grant: the process involves community feedback and committee voting, with two major questions: (1) is the work needs doing; and (2) can this person do it well. They don't charge you for applying, so you can always try, but IMO your chances of succeeding dramatically increase if you can point at a pile of commits you've already contributed, to show what your
11:00 yoleaux IOninja: I'll pass your message to jeffythedragonsl.
11:00 Sound joined #perl6
11:00 IOninja work looks like.
11:00 ZzZombo_ joined #perl6
11:01 ZzZombo_ joined #perl6
11:01 laouji joined #perl6
11:01 IOninja .tell jeffythedragonsl work looks like.
11:01 yoleaux IOninja: I'll pass your message to jeffythedragonsl.
11:03 ZzZombo_ joined #perl6
11:03 ZzZombo_ joined #perl6
11:03 IOninja I came up with "Recommended Practices" tidbit while sleeping, if anyone's keeping track of them: always use sigils with your constants
11:04 domidumont joined #perl6
11:04 IOninja Because there's an abiguity between constants and sub calls that don't use parens and constants win.
11:04 IOninja m: sub foo { say "hi" }; foo
11:04 camelia rakudo-moar 2a57bf: OUTPUT: «hi␤»
11:04 IOninja ^ normal working code;
11:04 IOninja m: constant foo = 'lulz fail'; sub foo { say "hi" }; foo
11:04 camelia rakudo-moar 2a57bf: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant value foo in sink context (line 1)␤»
11:04 pmurias joined #perl6
11:04 IOninja ^ some sigiless constant that made way into your code
11:04 IOninja And broke it
11:05 IOninja m: constant $foo = 'lulz fail'; sub foo { say $foo }; foo
11:05 camelia rakudo-moar 2a57bf: OUTPUT: «lulz fail␤»
11:05 IOninja All's well
11:06 llfourn Agreed. Keep 'em comin'.
11:07 RabidGravy yeah, at the very least don't export sigil-less constants :)
11:09 IOninja Not good enough, unless you also `my` them.
11:09 IOninja echo 'constant foo = "luls fail"' > Foo.pm6; perl6 -I. -MFoo -e 'sub foo { say "hi" }; foo'
11:09 IOninja Conflict ^
11:10 llfourn yeah I noticed that the other day
11:10 IOninja Well, I guess you can also avoid it by using a `module` or `class`... so yeah.
11:10 llfourn constants go into GLOBAL?
11:11 llfourn m: constant $foo = "bar"; say GLOBAL::.keys
11:11 camelia rakudo-moar 2a57bf: OUTPUT: «($foo)␤»
11:11 llfourn :\ I'd rather that weren't the case.
11:11 IOninja No, constants are just `our` by default and since there's no package to put them in in that file, the package they use is GLOBAL
11:11 IOninja It's not as scary as it looks at the first sight :)
11:12 RabidGravy m: class Foo { constant foo = "hshs"; }; say foo
11:12 camelia rakudo-moar 2a57bf: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    foo used at line 1␤␤»
11:12 IOninja Right.
11:12 llfourn m: unit module Foo; constant foo = "bar"; note GLOBAL::.keys
11:12 camelia rakudo-moar 2a57bf: OUTPUT: «(Foo)␤»
11:13 llfourn another reason to use 'module'
11:20 IOninja m: my \foo = 'lulz fail'; sub foo { say "hi" }; foo
11:20 camelia rakudo-moar 2a57bf: OUTPUT: «WARNINGS for <tmp>:␤Useless use of foo symbol in sink context (line 1)␤»
11:20 IOninja Well, I guess it's a useless tidbit, 'cause we also got these things -_-
11:21 IOninja And the lesson would be to use parentheses with subs, but I won't accept it...
11:21 IOninja DEATH TO PARENS!
11:21 ZzZombo_ joined #perl6
11:21 ZzZombo joined #perl6
11:24 RabidGravy dunno, some places a sub invocation with no arguments is clearer to me with parens
11:25 IOninja Heathen!
11:26 RabidGravy :-p
11:27 RabidGravy right now to turn this poll() malarkey into something that returns a supply that emits whenever the handle is ready
11:27 RabidGravy AND THEN MY PLANS FOR WORLD DOMINATION WILL BE COMPLETE
11:29 jnthn RabidGravy: That sounds oddly like something I was doing this week :)
11:29 RabidGravy do tell, maybe I don't have to write this after all :)
11:30 jnthn Still a WIP but https://github.com/jnthn/p6-ssh-libssh
11:31 jnthn I run the event loop on a single thread, and then stick a Promise/Supply API in front of it that hides all the evil away :)
11:35 RabidGravy I *think* my use is somewhat simpler, that is turning a pg-notifies into a Supply
11:35 timotimo mhhh postgres
11:35 jnthn I don't know the pg API well enough to speculate...but hopefully :-)
11:36 jnthn The libssh binding hasn't been too bad so far
11:36 jnthn I'd kinda like to add the server parts in
11:36 jnthn Primarily so I can have self-enclosed tests.
11:37 timotimo suddenly a ssh server that can be used from perl6
11:37 RabidGravy https://github.com/jonathanstowe/DBIishX-PGNotify/blob/master/lib/DBIishX/PGNotify.pm - but I was having a senior moment with poll the other day
11:37 jnthn timotimo: Yeah, I'm not quite sure what the applications of an SSH server written in Perl 6 would be :P
11:38 jnthn A client, OTOH, is rather useful :)
11:38 timotimo maybe it's easier than building a server on top of openssl :)
11:39 RabidGravy in the past I've used SSH as an IPC transport, having a server cuts out a whole layer of process
11:39 timotimo yeah, though the more processes you have the more fine-grained your failures can be
11:39 jnthn RabidGravy: Hmm, interesting. So it might be worthwhile :)
11:39 timotimo whether that is a good or bad thing is up to you of course
11:40 jnthn (Beyond for the testing angle)
11:42 llfourn m: my @a= 1..3; @a.map: { note $++ }; @a.map: { { note $++; } } # extra curlies clears state variables?
11:42 camelia rakudo-moar 2a57bf: OUTPUT: «0␤1␤2␤0␤0␤0␤»
11:42 RabidGravy (somewhere I've got some utterly crack-induced code which did remote method calls by sending Storable blobs over ssh)
11:43 Actualeyes joined #perl6
11:45 IOninja llfourn: something like that. Basically if it weren't like that, then things like, say,  sub foo { for ^10 { say $++ } }; would keep incrementing even between calls to &foo
11:45 sjn o/ jnthn
11:46 sjn jnthn: maybe you can help? I'm trying to find out if it's possible to extract which quoting constructs are legal, through introspection :)
11:47 IOninja m: for ^5 { say $++; for ^3 { say "[" ~ $++ ~ "]" } }
11:47 camelia rakudo-moar 2a57bf: OUTPUT: «0␤[0]␤[1]␤[2]␤1␤[0]␤[1]␤[2]␤2␤[0]␤[1]␤[2]␤3␤[0]␤[1]␤[2]␤4␤[0]␤[1]␤[2]␤»
11:47 * sjn just looked at the git blame list, and see that TimToady is the right person to ask
11:48 IOninja sjn: I'd say no.
11:48 llfourn IOninja: Thanks :)
11:48 IOninja sjn: just looking at a small subset of single and double quotes, they're all kinda hard-coded: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3674-L3682
11:49 sjn yeah, I'm looking at the same spot
11:49 RabidGravy Lawks a mercy : https://gist.github.com/jonathanstowe/06f510654a5d0b35962ff5f56a62c75a - I don't know what I was on at the time
11:50 IOninja And all the adverbial quoters are done by mixing in roles
11:50 sjn isn't it possible to get the actual code/match/regex/whatever from the token itself?
11:50 * IOninja tries to find it in src/Perl6
11:51 IOninja It's here and surrounding areas: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L5023
11:52 IOninja During parsing adverbs are read and then it assembles role combination that can parse the quoting construct.
11:52 timotimo sjn: you can grab the code object, sure, but it's opaque
11:54 IOninja m: say q ⁣look mah, no quoters!⁣
11:54 camelia rakudo-moar 3bf734: OUTPUT: «look mah, no quoters!␤»
11:54 * IOninja giggles
11:56 timotimo what character is that?
11:56 IOninja Character? There is no character!: )
11:56 timotimo u:  ⁣
11:56 unicodable6 timotimo, U+2063 INVISIBLE SEPARATOR [Cf] (⁣)
11:56 timotimo m)
11:56 IOninja aww
11:57 timotimo what fun
12:02 timotimo "I’m very excited to announce that today I’m open-sourcing a tool I’ve been working on for several months at Google. It’s called Bloaty McBloatface, and it lets you explore what’s taking up space in your .o, .a, .so, and executable binary files."
12:02 pyrimidine joined #perl6
12:03 RabidGravy :)
12:05 RabidGravy ZZ
12:05 timotimo please press ctrl-c to exit vim.
12:08 RabidGravy :)
12:10 RabidGravy jnthn, on a completely un-related note what was your envisioned end state for Net::Stomp::Server?  A fully functional server or a toolkit from which one could be made?
12:12 jnthn RabidGravy: More the latter; something that gives you a supply of incoming connections, requests, etc. and lets you specify supplies of notifications which can be sent
12:12 jnthn RabidGravy: Basically, enough that you can write a really simple in-memory message queue in terms of it without much effort
12:13 RabidGravy okay, pretty much what I thought then :)
12:13 laouji joined #perl6
12:13 sena_kun joined #perl6
12:14 RabidGravy may have a poke at it later as I have been thinking about the messaging thing recently
12:14 RabidGravy while I consider whether I can be arsed making the IBM MQ binding (which is more work than I anticipated :)
12:15 jnthn sjn: fwiw, there's plans to regularize the open/close quotes aspect to be Unicode property based: https://design.perl6.org/v6d.html#Formal_Rules_for_Defining_Matched_Delimiters%2FBrackets
12:15 RabidGravy unless of course someone has an implementation of CStructs with shaped array members down the back of the sofa
12:19 zakharyas joined #perl6
12:20 jnthn Not me, I'm afraid
12:20 AJ_ joined #perl6
12:20 * jnthn missed CStructs with callbacks in this week...
12:21 AJ_ hello
12:21 * jnthn wanders off for luch
12:21 jnthn lunch, even :)
12:22 wamba joined #perl6
12:23 sjn jnthn: ah, cool!
12:23 timotimo interesting. bloaty attributes the majority of our memory taken to a compunit "None". perhaps that's 3rdparty stuff that might not have been compiled -g?
12:23 sjn but with "plans", I really shouldn't hold my breath then. :-|
12:24 timotimo interesting, it also outputs one line with "[None]" after each .c that comes from 3rdparty
12:24 timotimo [None] is at 78.6% VM size, and 89.9% file size
12:25 timotimo then comes [Other] which is 11% VM, 5.2% file
12:25 timotimo and then interp.c which is 2.9% vm, 1.4% file
12:26 IOninja AJ_: \o
12:27 AJ_ \o
12:27 lep-delete joined #perl6
12:32 ZzZombo_ joined #perl6
12:36 cdg joined #perl6
12:38 vendethiel joined #perl6
12:39 * IOninja spots a bug in perl6.fail :(
12:40 IOninja Security bug :(
12:40 lucasb joined #perl6
12:42 IOninja or maybe with RT's API :/
12:43 timotimo uh oh
12:44 lucasb if the problem is in RT, then it's even more serious :)
12:45 IOninja I guess I should hunt down right now :)
12:46 lukaramu joined #perl6
12:49 titsuki joined #perl6
12:50 MasterDuke timotimo: i would have guessed that the unicode db would be a decent %
12:50 perlawhirl joined #perl6
12:51 perlawhirl hi perlers
12:52 perlawhirl how are we all?
12:52 IOninja reat
12:52 sjn rekt?
12:52 sjn :)
12:53 sjn perlawhirl: ALL IS WELL
12:53 sjn :D
12:53 perlawhirl so I wrote a few blog posts... i don't blog. I think about it, but I don't. but i started playing with matplotlib via perl6 and inline::python
12:53 perlawhirl the process has been interesting enough for me to write something down... appreciate thoughts
12:53 perlawhirl http://www.0racle.info/articles/matplotlib_in_p6_intro
12:54 sena_kun I've found a duplicate bug in RT, should I report it here?
12:55 MasterDuke perlawhirl: "fist few diagrams"
12:55 perlawhirl FIST!
12:56 perlawhirl ty... fixed
12:57 lucasb sena_kun: which ones?
12:57 sjn Is there a way to to list all Unicode characters that have certain properties?
12:58 sena_kun lucasb, https://rt.perl.org/Public/Bug/Display.html?id=125817#ticket-history and https://rt.perl.org/Public/Bug/Display.html?id=130913#ticket-history seems to report the same cases.
12:58 sena_kun though the old one should be expanded with info about "0x" numbers to be complete
12:59 MasterDuke perlawhirl: "headed of to"
12:59 MasterDuke u: help
12:59 unicodable6 MasterDuke, Just type any unicode character or part of a character name. Alternatively, you can also provide a code snippet. # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Unicodable
12:59 MasterDuke sjn: ^^^
12:59 lucasb sena_kun: yes, duplicates. some RT admin should merge them
13:00 lucasb interesting that chr() with large numbers changed behavior a few times
13:00 IOninja merged
13:00 MasterDuke u: { .uniprop eq 'Nd' }
13:00 Actualeyes joined #perl6
13:00 sena_kun IOninja++
13:00 perlawhirl MasterDuke: Thanks
13:01 unicodable6 MasterDuke, U+0030 DIGIT ZERO [Nd] (0)
13:01 unicodable6 MasterDuke, U+0031 DIGIT ONE [Nd] (1)
13:01 unicodable6 MasterDuke, 580 characters in total: https://gist.github.com/dde3de180647b3997653c0504618e379
13:01 MasterDuke sjn: ^^^
13:02 MasterDuke perlawhirl: "sink my teeth in", i would say "into", but that may be a US vs AU thing
13:04 perlawhirl MasterDuke: No that's a sleep vs lack-of-sleep thing :D
13:05 perlawhirl MasterDuke: truth be told, I've already written parts 3 and 4, but clearly need to proof read them a bit more.
13:06 perlawhirl thanks again for your grammarly assistance
13:16 laouji joined #perl6
13:16 MasterDuke perlawhirl: welcome. i was interested, having played around with matplotlib, Perl 5's Chart::Gnuplot, and then Perl 6's SVG::Plot for the *ables. but that little experimentation being the complete extent of my charting/plotting experience
13:18 pyrimidine joined #perl6
13:19 moritz SVG::Plot is really basic
13:23 BenGoldberg joined #perl6
13:28 laouji joined #perl6
13:30 RabidGravy riginal exception:
13:30 RabidGravy Tried to read() on a socket from outside its originating thread
13:30 RabidGravy which is kinda special as there ain't no socket in sight
13:32 IOninja Found the bug. It was in perl6.fail's RT module that stored the UserAgent in an attribute and re-used it for all requests and by default it keeps the cookies. So if someone logged in, that UA got the RT login cookie set. Now, even if another user specified bogus password, the RT end point use for credentials validation (which isn't a proper page; just "view ticket #1" sort of page) notices the cookie and
13:32 IOninja clears the user as already logged in under whatever user logged in last.
13:32 IOninja Man.
13:32 IOninja Good thing this wasn't a nuclear plant -_-
13:33 lukaramu_ joined #perl6
13:36 IOninja Not that logged in users can do anything more than mark tickets and commits as reviewed for release ATM :)
13:38 moritz ... then somebody would have been able to mark tickets and commits reviewed for a nuclear power plant :-)
13:55 BenGoldberg I've got a question about NativeCall:
13:56 pyrimidine joined #perl6
13:57 BenGoldberg There's a C API function which wants to take a callback function, it's proto is something like void registercb(int (*usercb)(char **important, void *userdata), void *userdata);
13:57 BenGoldberg When usercb is called, important will be a NULL terminated array of strings.
13:58 ZzZombo joined #perl6
13:58 ZzZombo joined #perl6
13:59 domidumont joined #perl6
13:59 BenGoldberg Should I expect sub registercb( &callback (Str @important, Pointer), Pointer ) is native(...) {}; to "just work" ?
14:01 BenGoldberg (Pretend I had the appropriate --> int32 in there)
14:01 BenGoldberg I'm looking through the docs, and I'm confused ;)
14:05 ZzZombo_ joined #perl6
14:05 ZzZombo_ joined #perl6
14:06 * BenGoldberg thinks that NativeCall's docs should be split into *at least* two pages...
14:06 pyrimidine joined #perl6
14:15 eroux joined #perl6
14:15 cibs joined #perl6
14:15 BenGoldberg Also, after I call the C API's unregistercb(), how do I tell NativeCall that the C library is done with the &callback, so that perl might eventually GC it?
14:16 RabidGravy BenGoldberg, you'd need to make that CArray[Str] $important
14:16 BenGoldberg Ok, that I can do.
14:18 RabidGravy it is managed by Perl 6 it will be GCd when it would normally be
14:21 RabidGravy the opposite thing is what you have to worry about, that is that it doesn't get GCd before the C library is done with it
14:22 DrForr joined #perl6
14:31 llfourn joined #perl6
14:38 pyrimidine joined #perl6
14:54 labster joined #perl6
14:57 mawkish_ joined #perl6
14:59 bwisti joined #perl6
15:01 mawkish_ joined #perl6
15:06 skids joined #perl6
15:09 Geth ¦ perl6.org: c452dec5f8 | Cale++ | source/community/index.html
15:09 Geth ¦ perl6.org: add link to most wanted and bug tracker blog post
15:09 Geth ¦ perl6.org:
15:09 Geth ¦ perl6.org: Also beef up the "write about your experience section"
15:09 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/c452dec5f8
15:14 cale2 joined #perl6
15:16 sjn MasterDuke: ah.
15:16 sjn oops
15:16 sjn #fail
15:21 nowan joined #perl6
15:22 RabidGravy so I can't get the poll to work in a useful way in the general case but it works like a charm for the pg notifications
15:41 IndexMe joined #perl6
15:43 RabidGravy DBIishX::PGNotify is such an ugly name though
15:43 laouji joined #perl6
15:44 IOninja .oO( Pg::Notify )
15:47 RabidGravy yeah, true, it only *uses* DBIish rather than extending it
15:48 Geth ¦ doc: hankache++ created pull request #1232: Add Pod tutorial
15:48 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1232
15:49 llfourn joined #perl6
15:50 hankache joined #perl6
15:51 hankache hello #perl6
15:51 hankache What do you think of https://github.com/perl6/doc/pull/1232
15:53 hankache I distilled S26
15:54 hankache Merge it if you like it.
15:55 hankache ciao
15:56 Actualeyes left #perl6
15:58 elaADnlxie joined #perl6
16:03 zakharyas joined #perl6
16:03 laouji joined #perl6
16:08 Geth ¦ doc: febff7c355 | Cale++ | doc/Type/Pod/Block.pod6
16:08 Geth ¦ doc: Fix links for subclasses table
16:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/febff7c355
16:12 sena_kun cale2, I'm not agree with ^. The original issue is https://github.com/perl6/doc/issues/759 and should be fixed from the root.
16:13 cale2 sena_kun: oh shoot... did I break the table then?
16:14 cale2 I actually thought, before I pushed that, maybe we should just get rid of that table? The type graph is helpful enough. The table is sort of redundant
16:14 sena_kun cale2, I don't think(it is already broken), but I'd rather revert it if you're okay with it. If you want proper links in tables, Pod::To::Html is ready for some love, I think.
16:15 IOninja fwiw those perl6.party articles about tickets are a bit out of date. These days perl6.fail is much more useful than the web app they're talking about.
16:15 cale2 sena_kun: can you revert it? I don't know how
16:15 timotimo .tell BenGoldberg currently callbacks passed to C always leak until the process ends, because we have no way of figuring out what C-land does with it. it wants to have some kind of API for sure at some point. just ... how?
16:15 yoleaux timotimo: I'll pass your message to BenGoldberg.
16:15 IOninja Clone the repo. Type "git revert febff7c355" git push
16:15 IOninja Clone the repo. Type "git revert febff7c355", then git push
16:16 sena_kun cale2, I'll do it.
16:16 sena_kun And I think that the table is still useful.
16:17 cale2 IOninja: Your blog posts are helpful for onboarding people still. Unless it's so out of date that it's no longer relevant. https://perl6.fail/ Looks great
16:17 cale2 sena_kun: thank you
16:19 Geth ¦ doc: 5ba57ef4df | Altai-man++ | doc/Type/Pod/Block.pod6
16:19 Geth ¦ doc: Revert "Fix links for subclasses table"
16:19 Geth ¦ doc:
16:19 Geth ¦ doc: This reverts commit febff7c355fa9f7c824a03d513881894adc88cd4.
16:19 Geth ¦ doc:
16:19 Geth ¦ doc: This is not a valid solution.
16:19 Geth ¦ doc:
16:19 Geth ¦ doc: See https://github.com/perl6/doc/issues/759 as an original issue and https://irclog.perlgeek.de/perl6/2017-03-04#i_14205280 as conversation about reverting
16:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5ba57ef4df
16:20 sena_kun done. cale2, sorry for the inconvenience.
16:21 pyrimidine joined #perl6
16:21 cale2 How should I go about creating new pages in docs?
16:22 cale2 Nothing special is needed? Just create a Declarator.pod6 file in the types/Pod/Block/ folder?
16:22 sena_kun cale2, you can just create *.pod6 file in appropriate directory, I guess.
16:22 sena_kun cale2, yes.
16:22 sena_kun cale2, wait a minute...
16:22 ufobat joined #perl6
16:22 sena_kun cale2, https://github.com/perl6/doc/blob/master/CONTRIBUTING.md#documenting-types - :)
16:24 sena_kun cale2, don't forget about "Testing examples" section of this document too.
16:24 cale2 ok
16:25 cale2 ah. homebrew is broken on my macbook, so most of my contributions are not exactly kosher lol
16:25 cale2 I program perl6 using small samples in glot.io haha
16:27 timotimo for simpler things camelia and many of the *ables will also take a link to a github gist
16:27 agentzh joined #perl6
16:27 cale2 IOninja: what is the relationship between https://perl6.fail/ and github issues? Is https://perl6.fail/ for test coverage AND compiler bugs?
16:28 timotimo the coverage on perl6.fail is just there because "why buy another domain name?"
16:28 cale2 so rakudo uses that domain instead of using github issues. But the ROAST uses github issues
16:29 timotimo no, rakudo uses rt.perl.org, it's just that perl6.fail is a nicer interface to rt than rt is
16:30 cale2 timotimo: that's what I meant. So if someone wants to contribute to rakudo, they wouldn't first look at github issues, they would look at https://perl6.fail/
16:30 timotimo sounds about right
16:30 cale2 But if someone wants to contribute to test coverage, they should be directed to github and NOT https://perl6.fail/
16:30 timotimo not necessarily
16:31 timotimo https://perl6.fail/t/TESTNEEDED  -  there is this
16:31 IOninja cale2: what gihub issues? what test coverage?
16:31 IOninja timotimo: coverage is on https://perl6.WTF because why not buy another domain :)
16:32 IOninja cale2: perl6.fail shows all open tickets on RT. That's it
16:32 timotimo oh!
16:32 timotimo btw, jnthn made a very good suggestion on how to make the line numbers more sensible
16:33 pyrimidine joined #perl6
16:33 cale2 That's a lot of zeros. Is that right?
16:33 timotimo nah, it's broken
16:34 cale2 I'm asking about this stuff because I updated the community page with links to help ramp people up, but I think I linked the wrong thing. https://github.com/perl6/perl6.org/commit/c452dec5f88edbc1692ce90a701ea2bea8836588
16:35 cale2 linked a blog post that may be out of date
16:39 timotimo gotta be AFK for a bit
16:47 agentzh joined #perl6
16:48 Botocide joined #perl6
16:49 Botocide http://localhost:3000/7̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈
16:49 IOninja hmmm
16:49 mst ah, it fixed itself
16:49 IOninja mst: that was me :)
16:49 IOninja m: my $x = "7" ~ "\x[308]" x 2000
16:49 camelia rakudo-moar 3bf734: OUTPUT: «Too many codepoints (2001) in grapheme␤  in block <unit> at <tmp> line 1␤␤»
16:49 mst oh, right, I assumed spammer rather than fuckup ;)
16:50 IOninja ^ I noticed this is now the case
16:50 IOninja So I wanted to see if our Perl 6 bots would crap out if they see too many combiners. But I guess telnet doesn't send stuff right
16:50 llfourn joined #perl6
16:51 IOninja m: try my $x = "7" ~ "\x[308]" x 2000
16:51 camelia rakudo-moar 3bf734: ( no output )
16:51 ufobat .seen zostay
16:51 yoleaux I saw zostay 11 Dec 2016 18:10Z in #perl6: <zostay> No. Hard to find time and when I do I keep running into obscure async bugs
16:51 IOninja So basically, we should decode all outsider data in a `try` block.
16:51 IOninja hm
16:52 elaADnlxie hm
16:52 ufobat did zostay actually create a ticket for his async bugs? i think he was struggeling with the tests here: https://github.com/zostay/HTTP-Request-Supply
16:53 bwisti joined #perl6
16:54 khw joined #perl6
16:55 zostay I've haven't done much Perl 6 lately. Too busy with other things recently.
16:55 yoleaux 19 Feb 2017 12:15Z <ufobat> zostay: what is the status of your HTTP-Request-Supply? i'd really love to have it on modules.perl6.org so we can have a async http p6w server
16:56 ufobat i see :) hope you find some time soon :)
16:57 ufobat unfortunatelly i cant help with the asnyc stuff, i have no clue about that kind of black magic :D
16:57 zostay The async bugs or just lack of understandable diagnostic messages was pretty discouraging and I haven't really tried to get back to it
16:58 drrho joined #perl6
16:58 zostay I don't know how much that's improved in the last few months, but from what I read in p6w seems like it should be at least a bit better
16:58 ufobat but your tests in the http:.request::supply are still failing, the are in wrong order, i assume?
17:06 BenGoldberg joined #perl6
17:07 Ben_Goldberg joined #perl6
17:10 Geth ¦ ecosystem: 7ojo++ created pull request #302: Add Git::Simple to ecosystem
17:10 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/302
17:12 agentzh joined #perl6
17:13 tojo joined #perl6
17:17 Geth ¦ ecosystem: cc81439bdf | (Jarkko Haapalainen)++ | META.list
17:17 Geth ¦ ecosystem: Add Git::Simple to ecosystem
17:17 Geth ¦ ecosystem:
17:17 Geth ¦ ecosystem: See https://github.com/7ojo/perl6-git-simple
17:17 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/cc81439bdf
17:17 Geth ¦ ecosystem: c5d3757d1e | Altai-man++ | META.list
17:17 Geth ¦ ecosystem: Merge pull request #302 from 7ojo/patch-1
17:17 Geth ¦ ecosystem:
17:17 Geth ¦ ecosystem: Add Git::Simple to ecosystem
17:17 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/c5d3757d1e
17:19 zostay Order is the basic problem of async
17:22 IOninja heh, so the ton of combiners didn't knock down the bots, but apparently killed the bidirectional copy/paste between my VM and host OS :S
17:23 timotimo wat :)
17:23 IOninja Yeah, can't copy-paste anything anymore.
17:28 IOninja .tell SmokeMachine FWIW, when you're adding fixups to PRs, you can do `git commit --amend` to add them and then `git push -f` to force-push them (force-pushing to your fork or separate branch is OK, but never do it to master). This way history stays clean when the PR gets merged.
17:28 yoleaux IOninja: I'll pass your message to SmokeMachine.
17:29 IOninja I guess that's my fault for not choosing the 'Squash' option when merging -_-
17:48 SmokeMachine IOninja: ok, I'm sorry
17:48 yoleaux 17:28Z <IOninja> SmokeMachine: FWIW, when you're adding fixups to PRs, you can do `git commit --amend` to add them and then `git push -f` to force-push them (force-pushing to your fork or separate branch is OK, but never do it to master). This way history stays clean when the PR gets merged.
17:49 pyrimidine joined #perl6
17:49 llfourn joined #perl6
17:51 b2gills .tell Todd the latest version of Perl 5 has subroutine signatures similar to that of Perl 6
17:51 yoleaux b2gills: I'll pass your message to Todd.
17:51 laouji joined #perl6
17:52 geekosaur iirc they are on rhel, "latest version of Perl 5" is problematic
17:52 geekosaur uh, actually centos7
17:52 geekosaur anyway, ancient everything
17:53 geekosaur except rh keeps pissing off its enterprise customers by insisting on hotpatching systemd to close-to-latest
17:54 geekosaur (not sure how many enterprise customers they even have left; there's been a veritable flood of them switching to SuSE)
17:59 b2gills m: #`( perlawhirl ) my @a = 1..10; say @a»²
17:59 camelia rakudo-moar 3bf734: OUTPUT: «[1 4 9 16 25 36 49 64 81 100]␤»
18:00 stmuk lose your data with btrfs on suse or suffer systemd :)
18:01 mst geekosaur: the rule for RHELL has been "build your own perl" since 5.8.x
18:02 mst geekosaur: basically since the point where they deployed a patch to work around a bug in Class::DBI that made DBIx::Class 30x slower
18:02 IOninja m: say {$++²} … 100
18:02 camelia rakudo-moar 3bf734: OUTPUT: «(0 1 4 9 16 25 36 49 64 81 100)␤»
18:02 mst (took me two years and getting a pumpking to yell at them to get that fixed)
18:03 geekosaur mst, yes, I know, but Todd_ has been fairly insistent on only using stuff from the package manager :/
18:03 mst sucks to be him then, I guess
18:04 mst I should build rpms or something
18:05 BenGoldberg m: sub foo(--> int) {3}; say foo.WHAT;
18:05 yoleaux 11:15 EST <timotimo> BenGoldberg: currently callbacks passed to C always leak until the process ends, because we have no way of figuring out what C-land does with it. it wants to have some kind of API for sure at some point. just ... how?
18:05 camelia rakudo-moar 3bf734: OUTPUT: «(Int)␤»
18:07 * geekosaur 's answer is to bail from rhel/centos like everyone else; if you have a trainwreck in progress like rh does, the answer is not to replace the caboose with another engine and keep plowing forward...
18:07 pyrimidine joined #perl6
18:08 b2gills m: sub foo(--> int) {3}; multi bar (Int --> 'class'){}; multi bar (int --> 'native'){}; say bar foo
18:08 camelia rakudo-moar 3bf734: OUTPUT: «class␤»
18:09 b2gills m: sub foo(--> int) {3}; multi bar (Int --> 'class'){}; multi bar (int --> 'native'){}; say bar my int $ = 3
18:09 camelia rakudo-moar 3bf734: OUTPUT: «native␤»
18:09 b2gills m: sub foo(--> int) {3}; multi bar (Int --> 'class'){}; multi bar (int --> 'native'){}; say bar my int $ = foo
18:09 camelia rakudo-moar 3bf734: OUTPUT: «native␤»
18:12 BenGoldberg timotimo, The obvious solution is to advise users to declare callback arguments as Pointer, and provide a subroutine: native_wrap_cb( Callable , Signature ), whose return object has .Pointer and .dispose.
18:12 IOninja PSA: If you implement a feature, document it. Or least open an Issue on docs repo. No point in implementing stuff if users don't know about it.
18:30 BenGoldberg Another possibility would be to add something like 'sub quicksort(...) is native(...) is callback-disposing;' which would tell NativeCall that as soon as the top-level native subroutine (quicksort in this example) returns, then any callbacks passed to it will no longer be used in C-land.
18:35 IOninja Wonder what the fastest way to count the number of times a particular char occurs.
18:35 elaADnlxie NeuralAnomaly: status
18:35 NeuralAnomaly elaADnlxie, [✘] Next release will be in 1 week and 6 days. Since last release, there are 29 new still-open tickets (1 unreviewed and 0 blockers) and 1 unreviewed commits. See http://perl6.fail/release/stats for details
18:42 IOninja m: for ^1000_000 { $ = +'foo.bar.ber.bez'.comb: '.' }; say now - INIT now
18:42 camelia rakudo-moar c2db93: OUTPUT: «12.08750489␤»
18:42 IOninja m: use nqp; sub count($s) { my int $c = 0; my int $pos = 0; nqp::while(nqp::isge_i(0, ($c = nqp::index($s, '.', $pos))), ($c = nqp::add_i($c, 1))); $c }; for ^1000_000 { $ = count 'foo.bar.ber.bez' }; say now - INIT now
18:42 camelia rakudo-moar c2db93: OUTPUT: «0.7614110␤»
18:42 espadrine joined #perl6
18:42 IOninja m: say 12.08750/0.7614110
18:42 camelia rakudo-moar c2db93: OUTPUT: «15.8751318␤»
18:43 naxieAlDle joined #perl6
18:46 IOninja m: use nqp; sub count($s) { my int $c = 0; my int $pos = -1; nqp::while(nqp::isge_i(($pos = nqp::index($s, '.', ($pos = nqp::add_i($pos,1)))), 0), ($c = nqp::add_i($c, 1))); $c }; for ^1000_000 { $ = count 'foo.bar.ber.bez' }; say now - INIT now
18:46 camelia rakudo-moar c2db93: OUTPUT: «0.98162135␤»
18:50 llfourn joined #perl6
19:12 khw joined #perl6
19:22 ifim joined #perl6
19:29 timotimo BenGoldberg: but that's so much more work
19:30 timotimo BenGoldberg: in perl6 you can always just put your pointy blocks directly into the arg list
19:30 timotimo now you'd have to put it in together with a declaration :(
19:31 BenGoldberg Well, if you had an 'is callback-disposing' solution, you could still put point blocks directly into the arg list.
19:33 BenGoldberg You only need a declaration for situations when you are doing library_func_register_cb(sub {...}), and (only god knows how much later) library_func_register_uncb()
19:33 BenGoldberg Err, unregister_cb
19:34 BenGoldberg . o O (Sorry, we're all out of uncallbacks.)
19:36 geekosaur I would be tempted to do the opposite
19:36 geekosaur is foreign-persist(sub)
19:36 BenGoldberg I'm presently writing a perl6 plugin for hexchat, and one *super* commonly used thing is going to be $hook = Hook.command("custom_command_name", sub {...}), where the user can, if they want, do $hook.unhook, which removes that custom command.
19:37 geekosaur or for that matter pointers that aren't part of the result type
19:37 naxieAlDle goddamn emacs, stop eating my cpu
19:38 geekosaur emacs had a transporter accident too?
19:39 BenGoldberg It's probably gc-ing.
19:39 naxieAlDle joined #perl6
19:40 naxieAlDle well, it happened after I tried using perl6-mode with Grammar.nqp
19:40 BenGoldberg Maybe you need an nqp mode?
19:41 BenGoldberg Several of the other script language plugins (perl5, python) provide a way to unload and reload individual scripts.  I'd be unhappy if unloading a perl6 script merely undid the hooks, but left everything loaded in the interpreter.
19:47 IOninja Can a couple of people give me an example of a file extension?
19:47 agentzh joined #perl6
19:47 IOninja Just extension
19:47 BenGoldberg .exe, .txt, .jpg, .jpeg, ....
19:48 IOninja And someone else?
19:48 IOninja (second person :))
19:48 BenGoldberg Maybe 'sub blah(....) is native is persistant-callbacks(&manager(&free_er)' ... without the persistant-callbacks, the native callbacks are freed immediately.  With it, the &manager function is called every time NativeCall makes a callback, and it receives a closure (&free_er) which, when called, tells nativecall to free up the C side of things.
19:49 laouji joined #perl6
19:49 IOninja naxieAlDle: yo, give me some examples of file extensions. Just extensions, no filenames.
19:50 naxieAlDle IOninja: .sv .hpp .docx .pm6
19:50 IOninja Thanks :)
19:50 naxieAlDle IOninja: how many do you need? :)
19:50 IOninja That's all. Wanted to see whether people naturally include the leading dot when talking just about extension :)
19:52 llfourn joined #perl6
19:52 BenGoldberg That's not a fair manner of doing a survey.
19:52 BenGoldberg He might have added the dot just because I included it.
19:52 IOninja Hehehe
19:53 IOninja It's not. But it's good enough ;)
19:53 BenGoldberg You should have asked people to /msg you instead of saying it on the channel.
19:53 IOninja meh
19:54 BenGoldberg Try asking over on #perl
19:54 naxieAlDle oh
19:54 naxieAlDle BenGoldberg: actually, I haven't even seen it
19:54 timotimo BenGoldberg: if there's an "unregister" function, you'll need to have stored the exact code object in some variable anyway
19:54 timotimo otherwise you'll run into trouble
19:54 naxieAlDle but my brain could've picked it up automatically, that's true
19:55 andrzejku joined #perl6
19:55 geekosaur IOninja, most of us do (because an extension doesn't *always* have a dot; a few things use _ or others)
19:56 geekosaur it's fairly rare but happens just often enough that we include the leader
19:57 BenGoldberg timotimo, C language users of the api get back a hexchat_hook_t* from any of the various hexchat_hook_<foo> functions; calling hexchat_unhook(thehookpointer) unregisters the callback.
19:57 geekosaur also there's a de facto convention that "jpg" without the leader means the type/format, not the extension
19:57 timotimo OK, but on the perl6 side i don't think we have a way to say "the callback related to this pointer needs to be cleared"
19:58 IOninja geekosaur: what's this about using `_` for extensions?
19:59 geekosaur like I said, it's very rare, but you will occasionally encounter it. like using _d to indicate a directory of additional files for a config (instead of the .d convention that came from solaris; _d was more of an AT&T thing there)
20:00 IOninja Ah
20:01 geekosaur I've also seen _s but I can't recall what it deoted
20:01 geekosaur *denoted
20:04 BenGoldberg I seem to recall some editor (was it emacs) making a back up of a file with a ~ attached to it's name.
20:05 naxieAlDle and also #files# for unsaved stuff, yes
20:09 savasten joined #perl6
20:11 naxieAlDle hm, this test doesn't achieve anything, right? https://github.com/perl6/roast/blob/master/S06-operator-overloading/infix.t#L6
20:12 IOninja mhm, better use something weirder for the operator...
20:13 naxieAlDle ok I'll change it
20:17 BenGoldberg There's already a unicode operator in that test, ©
20:17 Damianz joined #perl6
20:29 naxieAlDle pft, no, not going to change it
20:29 naxieAlDle there's already a test for ©, and there are some tests for actual operator overloading
20:29 naxieAlDle so this particular one is useless I guess…
20:30 TEttinger joined #perl6
20:31 labster joined #perl6
20:31 zakharyas joined #perl6
20:32 bjz joined #perl6
20:32 lizmat .
20:33 BenGoldberg m: dd [gather take 5];
20:33 camelia rakudo-moar c2db93: OUTPUT: «[5]␤»
20:33 * BenGoldberg wonders if that will always produce an array, and never get super clever and make something lazy.
20:34 naxieAlDle m: dd [lazy gather take 5];
20:34 camelia rakudo-moar c2db93: OUTPUT: «(5, Any, Any, Any, Any, Any, Any, Any, Any, Any... lazy list)␤»
20:35 lizmat BenGoldberg: it's similar to 1 element slices: you always get a List there as well
20:35 naxieAlDle ok I changed my mind :P
20:35 lizmat m: my @a = ^10; dd @a[4]; dd @a[(4,)]
20:35 camelia rakudo-moar c2db93: OUTPUT: «Int @a = 4␤(4,)␤»
20:37 * sjn reads Zef source code
20:37 sjn It's quite pleasant :)
20:39 jm_ joined #perl6
20:40 BenGoldberg m: enum Foo (qw,zero one,);  say Foo.pick(*)
20:40 camelia rakudo-moar c2db93: OUTPUT: «(one zero)␤»
20:40 BenGoldberg m: enum Foo (qw,zero one,);  say Foo.enum
20:40 camelia rakudo-moar c2db93: OUTPUT: «No such method 'enum' for invocant of type 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
20:40 BenGoldberg m: enum Foo (qw,zero one,);  say Foo.enums
20:40 camelia rakudo-moar c2db93: OUTPUT: «Map.new((:one(1),:zero(0)))␤»
20:40 BenGoldberg m: enum Foo (qw,zero one,);  say Foo::zero
20:40 camelia rakudo-moar c2db93: OUTPUT: «zero␤»
20:41 BenGoldberg m: enum Foo (qw,zero one,);  say Foo::("zero")
20:41 camelia rakudo-moar c2db93: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Combination of indirect name lookup and call not supported␤at <tmp>:1␤------> 3m Foo (qw,zero one,);  say Foo::("zero")7⏏5<EOL>␤    expecting any of:␤        argument list␤»
20:41 naxieAlDle BenGoldberg: what are you trying to do? :)
20:41 BenGoldberg I'd like the same list as .pick(*) is giving, but without it randomizing the oder.
20:41 BenGoldberg s/oder/order/
20:42 BenGoldberg I suppose I could sort them ....
20:42 naxieAlDle no-no, there was a thing, mmm
20:43 naxieAlDle m: enum Foo (qw,zero one,); say Foo.^enum_value_list
20:43 camelia rakudo-moar c2db93: OUTPUT: «(zero one)␤»
20:44 BenGoldberg naxieAlDle++
20:44 naxieAlDle BenGoldberg: do note that this is not specced
20:45 naxieAlDle but that's what Enums use internally for .pick
20:46 BenGoldberg I see, it's over in meta-class-land, for some silly reason...
20:48 naxieAlDle BenGoldberg: I guess it would make sense to add a method that will expose this thing
20:48 naxieAlDle that's not the first time I see somebody asking for this, and I needed it myself
20:49 jm_ left #perl6
20:49 BenGoldberg https://irclog.perlgeek.de/perl6/2016-05-20#i_12518778 for example ;)
20:50 irobotnot joined #perl6
20:51 irobotnot p6: say 3;
20:51 camelia rakudo-moar 20fa14: OUTPUT: «3␤»
20:51 naxieAlDle m: say ‘hello world!’
20:51 camelia rakudo-moar 20fa14: OUTPUT: «hello world!␤»
20:52 synopsebot6 joined #perl6
20:52 irobotnot p6: [1..100].hyper.map({ $_ +1 }).list.say;
20:52 camelia rakudo-moar 20fa14: OUTPUT: «(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
20:52 IOninja m: say ⅓
20:52 camelia rakudo-moar 20fa14: OUTPUT: «0.333333␤»
20:52 BenGoldberg m: enum Foo (qw,zero one,); say ::("Foo").::;
20:52 camelia rakudo-moar 20fa14: OUTPUT: «===SORRY!===␤MVMArray: Can't pop from an empty array␤»
20:52 IOninja known issue
20:52 SmokeMachine what's the easiest way do "require A::B::*"? I mean: if is there A::B::C, A::B::D and A::B::E, I'd like to require all 3... how could I do that?
20:53 irobotnot p6: [1..100].race.map({ $_ +1 }).list.say;
20:53 camelia rakudo-moar 20fa14: OUTPUT: «(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
20:53 IOninja SmokeMachine: for dir("A/B") { require .&Str }  # I'm guessing...
20:53 IOninja irobotnot: FWIW, you can also /msg camelia to eval in private
20:54 irobotnot IOninja: thx
20:54 IOninja irobotnot: also, default batch size for race/hyper is 64... you may wanna use something smaller
20:54 IOninja with :batch(20) for example
20:54 SmokeMachine IOninja: but if A::B::Z, by example, was installed by another dist, it won't be found, right?
20:54 BenGoldberg m: enum Foo (qw,zero one,); dd ::("Foo")::zero
20:54 camelia rakudo-moar 20fa14: OUTPUT: «Foo::zero␤»
20:55 BenGoldberg m: enum Foo (qw,zero one,); dd ::("Foo")::.keys
20:55 camelia rakudo-moar 20fa14: OUTPUT: «()␤»
20:55 IOninja m: sleep 1 for ^4 .race: :batch; say now - INIT now
20:55 BenGoldberg m: enum Foo (qw,zero one,); dd ::Foo::.keys
20:55 camelia rakudo-moar 20fa14: OUTPUT: «1.00515620␤»
20:55 camelia rakudo-moar 20fa14: OUTPUT: «("one", "zero").Seq␤»
20:55 llfourn joined #perl6
20:55 IOninja SmokeMachine: errr, just .Str not .&Str
20:56 irobotnot IOninja: cool. I was copy-pasting from a sample
20:56 IOninja SmokeMachine: and don't know
20:56 SmokeMachine IOninja: Im trying to do some kind of "plugin system"...
20:56 IOninja irobotnot: there's a lightning talk on .race and other things, if you're interested: https://perl6.party/post/Perl-6-What-Programming-In-The-Future-Is-Like
20:57 IOninja SmokeMachine: oh, yeah, what I said won't work for installed stuff. Never mind :)
20:57 irobotnot IOninja: thx. will check it out. just started with p6
20:57 SmokeMachine any other suggestion?
20:58 IOninja SmokeMachine: dig in https://github.com/rakudo/rakudo/tree/nom/src/core/CompUnit trying to find a method for it (I... *think*... it was added). Or ask nine / ugexe about it
20:58 IOninja You probaly want to query what's installed and grep for things that have prefix whatever.
20:59 SmokeMachine thanks!
21:01 buggable joined #perl6
21:03 bbkr_ joined #perl6
21:04 cdg_ joined #perl6
21:04 Gruber joined #perl6
21:04 naxieAlDle oh…
21:05 naxieAlDle m: say True ⁇ True ?? 5 !! 10 ‼ 42
21:05 camelia rakudo-moar 20fa14: OUTPUT: «5␤»
21:05 IOninja oh⁇
21:05 naxieAlDle m: say True ⁇ False ?? 5 !! 10 ‼ 42
21:05 camelia rakudo-moar 20fa14: OUTPUT: «10␤»
21:05 IOninja hahahaha
21:05 naxieAlDle m: say True ⁇ 42 ‼ False ?? 5 !! 10
21:05 camelia rakudo-moar 20fa14: OUTPUT: «42␤»
21:05 naxieAlDle m: say False ⁇ 42 ‼ False ?? 5 !! 10
21:05 camelia rakudo-moar 20fa14: OUTPUT: «10␤»
21:06 naxieAlDle m: say False ⁇ 42 ‼ True ?? 5 !! 10
21:06 camelia rakudo-moar 20fa14: OUTPUT: «5␤»
21:06 naxieAlDle IOninja: coincidence? I don't think so :P
21:06 IOninja naxieAlDle: coincidence with what?
21:07 IOninja My using ⁇ It was. I'd type it faster if I didn't reboot my VM today and xmodmap were running
21:07 Kaffe_ joined #perl6
21:07 naxieAlDle I'm impressed :)
21:07 naxieAlDle it would take me 3 seconds just to read the thing :P
21:07 IOninja What thing?
21:08 naxieAlDle my message
21:08 IOninja Which message?
21:08 simcop2387_ joined #perl6
21:08 * IOninja doesn't get it
21:09 IOninja But... I laughed because for a second I thought you were showing a case where using, say, `!!` instead of `‼` in a mix of ??⁇!!‼ produced different results.
21:09 naxieAlDle ah no, I just realized there are no tests for it
21:10 IOninja There are
21:10 naxieAlDle but it should work as expected
21:10 IOninja Well, there are tests for ⁇‼ I mean
21:10 naxieAlDle https://github.com/perl6/roast/issues/248
21:11 naxieAlDle not a big deal anyway
21:11 IOninja I'll write those just for fun right now
21:13 simcop2387 joined #perl6
21:14 nowan_ joined #perl6
21:14 IOninja Actually, never mind. I need to do other things...
21:16 nightfrog joined #perl6
21:17 naxieAlDle IOninja: like work on IO stuff? :P
21:17 naxieAlDle .oO( what “stuff”? )
21:17 cdg joined #perl6
21:18 ufobat joined #perl6
21:18 drrho joined #perl6
21:18 cibs joined #perl6
21:18 cyphase joined #perl6
21:18 kalkin- joined #perl6
21:18 ChoHag joined #perl6
21:19 IOninja naxieAlDle: yeah
21:19 IOninja Though I did find a minor bug:
21:19 IOninja m: say 0 ⁇ 1 ?? 2 ⁇ 3 ?? 4 !! 5 ‼ 6 !! 7 !! 8
21:19 camelia rakudo-moar b59739: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Your !! was gobbled by the expression in the middle; please parenthesize␤at <tmp>:1␤------> 3say 0 ⁇ 1 ?? 2 ⁇ 3 ?? 4 !! 5 ‼ 6 !! 77⏏5 !! 8␤    expecting any of:␤        infix␤        …»
21:19 IOninja It wasn't !! that was gobbled, but ‼
21:20 IOninja And well, not really gobbled either....
21:20 IOninja I just used !! instead of ‼
21:21 IOninja See all this unicode stuff causes problems. Now it's spreading to other exceptions and makes their content somewhat nonsensical, even though in the past it made sense.
21:21 naxieAlDle OK OK I'll focus on finding bugs in texas operators :PPP
21:21 IOninja :)
21:22 SCHAAP137 joined #perl6
21:26 cog_ joined #perl6
21:28 Geth ¦ ecosystem: acaa154111 | (Jonathan Stowe)++ | META.list
21:28 Geth ¦ ecosystem: Add Pg::Notify
21:28 Geth ¦ ecosystem:
21:28 Geth ¦ ecosystem: https://github.com/jonathanstowe/Pg-Notify
21:28 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/acaa154111
21:30 RabidGravy there, once I got poll(0 working twas a snap :)
21:33 nebuchadnezzar joined #perl6
21:33 SmokeMachine Yes, I didn't write tests mixing ⁇‼ and ??!!... :(
21:35 naxieAlDle s: {}, 'gist'
21:35 SourceBaby naxieAlDle, Ehhh... I'm too scared to run that code.
21:35 SmokeMachine IOninja: so, was that a bug?
21:35 naxieAlDle s: &abs, 'gist'
21:35 SourceBaby naxieAlDle, Sauce is at https://github.com/rakudo/rakudo/blob/b597398/src/core/Mu.pm#L510
21:35 naxieAlDle s: &infix:<+>, 'gist'
21:35 SourceBaby naxieAlDle, Sauce is at https://github.com/rakudo/rakudo/blob/b597398/src/core/Mu.pm#L510
21:36 IOninja s: Supplier.new.Supply, 'tap'
21:36 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/b597398/src/core/Supply.pm#L77
21:36 IOninja FWIW, I see no `on-closing` taken by that routine, so perhaps the docs ( https://docs.perl6.org/type/Tap ) are wrong. That's https://rt.perl.org/Ticket/Display.html?id=130920
21:36 IOninja SmokeMachine: what was a bug?
21:37 SmokeMachine m: say 0 ⁇ 1 ?? 2 ⁇ 3 ?? 4 !! 5 ‼ 6 !! 7 !! 8 # IOninja, this
21:37 camelia rakudo-moar b59739: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Your !! was gobbled by the expression in the middle; please parenthesize␤at <tmp>:1␤------> 3say 0 ⁇ 1 ?? 2 ⁇ 3 ?? 4 !! 5 ‼ 6 !! 77⏏5 !! 8 # IOninja, this␤    expecting any of:␤        …»
21:37 IOninja Yes, the error is incorrect.
21:38 IOninja And this is exactly why I'm anti-adding-Uncode stuff. It's hard to forsee these distant effects.
21:38 IOninja And then you add all these conditionals all over the codebase to handle something that'll be used by minority of users.
21:38 * naxieAlDle is already using it
21:42 PerlJam joined #perl6
21:42 ugexe If you want to use CUR for a plugin system then write a CUR that subclasses CURI and loads all modules it can find when its initiated
21:43 ugexe But it would be easier to not do that and just use CUR.installed() to find what you want
21:43 IOninja It doesn't have a list of all the installed modules?
21:44 ugexe https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L572
21:44 IOninja Ah
21:44 IOninja m: CompUnit::Repository::Installation.installed.say
21:44 camelia rakudo-moar b59739: OUTPUT: «Cannot look up attributes in a CompUnit::Repository::Installation type object␤  in block <unit> at <tmp> line 1␤␤»
21:44 IOninja m: CompUnit::Repository::Installation.new.installed.say
21:44 avuserow joined #perl6
21:44 camelia rakudo-moar b59739: OUTPUT: «Parameter '$prefix' requires an instance of type Str, but a type object was passed.  Did you forget a .new?␤  in block <unit> at <tmp> line 1␤␤»
21:44 ugexe need a specific instance
21:45 IOninja m: $*REPO.installed.say
21:45 ugexe m: say $*REPO.repo-chain[0].installed
21:45 camelia rakudo-moar b59739: OUTPUT: «Nil␤»
21:45 camelia rakudo-moar b59739: OUTPUT: «Nil␤»
21:45 ugexe m: say $*REPO.repo-chain.map(*.?installed)
21:45 camelia rakudo-moar b59739: OUTPUT: «(Nil (CompUnit::Repository::Installation::InstalledDistribution.new(prefix => "/home/camelia/rakudo-m-inst-2/share/perl6/site".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia")))) () (CompUnit::Repository::Installation::InstalledDistribution.new(prefix => "…»
21:46 RabidGravy which suggests to me that something should be required earlier
21:46 ugexe such a plugin system would limit you to CURI, so no -Iwhatever
21:47 ugexe this is why zef just does not use a custom plugin CUR and just does regular old dynamic load
21:48 ugexe i have a module (not in ecosystem) called CUR::Lib which is just like CURI but without the sha1 file names which would help solve this though
21:48 ugexe but precompile doesn't work with it unless its built with the rest of rakudo source
21:50 IOninja m: say $*REPO.repo-chain.map(*.?installed).grep({$_ !=== Nil}).flat».meta».<name>
21:50 camelia rakudo-moar b59739: OUTPUT: «(Inline::Perl5 CORE)␤»
21:56 llfourn joined #perl6
21:57 RabidGravy the tricky bit for pluggable things is that we don't store interesting enough metadata about the modules
21:58 rindolf joined #perl6
22:00 ugexe you have all metadata available through CompUnit.distribution.meta
22:00 ugexe so you just have to get to that
22:01 ugexe again just for CURI
22:01 RabidGravy yes that's the stuff that isn't interesting enough
22:02 Possum joined #perl6
22:02 kyan joined #perl6
22:02 samcv joined #perl6
22:02 eater joined #perl6
22:02 Hotkeys joined #perl6
22:02 jkva_ joined #perl6
22:02 dj_goku joined #perl6
22:04 RabidGravy infact as far as I can tell it doesn't even store everything in the META file
22:05 RabidGravy which I guess could be fixed
22:12 RabidGravy I'm thinking of something like the values in the "provides" being either the Str path or an object with a "path" and optional keys, like an array[str] "implements" that could be used by pluggable loaders
22:12 BenGoldberg s: &callframe
22:12 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/b597398/src/core/CallFrame.pm#L51
22:16 RabidGravy ugexe, with zef can one influence what repo does the installing?
22:17 RabidGravy say I had a plogin system that needed the addional data, could I use a CUR that actually stored that?
22:21 ugexe you can get the path of everything as well
22:22 ugexe CompUnit.distribution.content("lib/My/Module.pm").path
22:22 ugexe introspec .meta<provides><My::Module> for the lib/MyModule.pm
22:23 RabidGravy right, but it still doesn't tell me whether some module implements some interface that I am interested in for a plugin
22:24 RabidGravy so some additional metadata is required, which isn't cyrrently stored
22:24 ugexe i imagine you would technically use the `emulates` field of meta6.json for that
22:24 RabidGravy so I guess the answer in no
22:24 RabidGravy but I don't think that is stored
22:25 ugexe everything is stored i believe
22:25 RabidGravy Hmm
22:27 ugexe --install-to will use whatever repo it points at to call .install(...) on. So if its CompUnit::Repository::Installable it should be compatible
22:27 ugexe your CUR would be identified with a short id, so it would be like --install-to=plugins#my/plugins
22:32 RabidGravy Ooh it does indeed store everything
22:33 RabidGravy sorry I was under the impression it didn't
22:35 RabidGravy something weird going on with the files (it seems to have all the files in the CURI) but hey
22:43 BenGoldberg m: sub foo(-->Int) {return "0"}; say foo;
22:43 camelia rakudo-moar e114d5: OUTPUT: «Type check failed for return value; expected Int but got Str ("0")␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:43 BenGoldberg m: sub foo(-->Int) {return "0"};
22:43 camelia rakudo-moar e114d5: ( no output )
22:44 Voldenet joined #perl6
22:44 Voldenet joined #perl6
22:44 BenGoldberg Any chance that, some time in the future, return types will be checked at compile time?
22:45 geekosaur I think stuff like that is ... not yet planned but intended?
22:46 BenGoldberg Ok.
22:48 dct joined #perl6
22:48 BenGoldberg m: enum Nums (qw,zero one two,); sub foo(-->Int) { two }; say foo;
22:48 camelia rakudo-moar e114d5: OUTPUT: «two␤»
22:48 naxieAlDle yes
22:49 naxieAlDle I mean, the last snippet looks fine
22:49 geekosaur there's a lot of type inference and optimization that could be done but isn't currently being considered or worked on; we're still fixing the basics as it is
22:49 naxieAlDle though I wonder… what if it is a non-int Enum?
22:49 BenGoldberg m: enum Nums (qw,zero one two,); my int $maybe = two; say $maybe;
22:49 camelia rakudo-moar e114d5: OUTPUT: «2␤»
22:50 naxieAlDle BenGoldberg: maybe you'll also like this one
22:50 naxieAlDle m: sub foo(-->Int) { True }; say foo;
22:50 camelia rakudo-moar e114d5: OUTPUT: «True␤»
22:50 BenGoldberg m: enum StrEnum (map { $_ => $_ }, qw,apples oranges bananananas,); say apples
22:50 camelia rakudo-moar e114d5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    apples used at line 1␤␤»
22:50 geekosaur m: say so True ~~ Int
22:50 camelia rakudo-moar e114d5: OUTPUT: «True␤»
22:51 BenGoldberg m: enum StrEnum (map { $_ => $_ }, qw,apples oranges bananananas,);
22:51 camelia rakudo-moar e114d5: ( no output )
22:51 BenGoldberg m: enum StrEnum (map { $_ => $_ }, qw,apples oranges bananananas,);  say StrEnum.pick(*)
22:51 camelia rakudo-moar e114d5: OUTPUT: «(oranges   oranges apples  apples bananananas      bananananas)␤»
22:51 BenGoldberg m: enum StrEnum (map { $_ => $_ }, qw,apples oranges bananananas,);  dd StrEnum.pick(*)
22:51 camelia rakudo-moar e114d5: OUTPUT: «(StrEnum::apples   apples, StrEnum::oranges        oranges, StrEnum::bananananas   bananananas).Seq␤»
22:51 BenGoldberg wft?
22:51 geekosaur pairs stringify with a separating tab
22:52 BenGoldberg m: enum StrEnum (map { $_ => $_ }, qw,apples oranges bananananas,);  dd StrEnum.pick ~~ Int
22:52 camelia rakudo-moar e114d5: OUTPUT: «Bool::True␤»
22:53 BenGoldberg naxieAlDle, Looks like there can not exist any non-int enum.
22:53 naxieAlDle m: enum E (A => 4.2, B => 6.9); say E.enums
22:53 camelia rakudo-moar e114d5: OUTPUT: «Map.new((:A(4.2),:B(6.9)))␤»
22:54 BenGoldberg m: say Bool ~~ Int; # this is why you can return True from a sub declared to return Int.
22:54 camelia rakudo-moar e114d5: OUTPUT: «True␤»
22:54 bjz joined #perl6
22:54 BenGoldberg m: enum E (A => 4.2, B => 6.9); sub foo(-->Int) { A };
22:54 camelia rakudo-moar e114d5: ( no output )
22:54 BenGoldberg m: enum E (A => 4.2, B => 6.9); sub foo(-->Int) { A }; foo();
22:54 camelia rakudo-moar e114d5: OUTPUT: «Type check failed for return value; expected Int but got E (E::A)␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:54 BenGoldberg Huh.
22:54 naxieAlDle ok, it DWIMs
22:55 BenGoldberg So num enums are allowed, but not strs.
22:55 naxieAlDle m: enum E (A => ‘why’, B => ‘not’); say A; say B
22:55 camelia rakudo-moar e114d5: OUTPUT: «why␤not␤»
22:55 BenGoldberg Why was my map not working?
22:56 BenGoldberg m: enum F (apple => 'apple', banana => 'banana', berrie => 'berry'); say apple
22:56 camelia rakudo-moar e114d5: OUTPUT: «apple␤»
22:56 naxieAlDle m: enum F (apple => 'blapple', banana => 'banana', berrie => 'berry'); say apple
22:56 camelia rakudo-moar e114d5: OUTPUT: «blapple␤»
22:57 BenGoldberg oh..kay.  Why was my map not dwimming, then?
22:58 llfourn joined #perl6
23:25 bjz joined #perl6
23:46 llfourn joined #perl6
23:53 titsuki joined #perl6

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

Perl 6 | Reference Documentation | Rakudo