Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 bwisti joined #perl6
00:13 Geth ¦ doc: 2e71131a7d | (Will "Coke" Coleda)++ | 2 files
00:13 Geth ¦ doc: Test examples in doc/language/testing.pod6
00:13 Geth ¦ doc:
00:13 Geth ¦ doc: Part of #1387
00:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2e71131a7d
00:29 sjn joined #perl6
00:48 lookatme joined #perl6
00:48 lookatme morning
00:54 deep-book-gk joined #perl6
00:57 deep-book-gk left #perl6
00:59 bwisti joined #perl6
01:01 Cabanossi joined #perl6
01:26 BenGoldberg joined #perl6
01:27 jeromelanteri zengargoyle, no problem... by the way, the application create it and you can put what ever you want inside who respect the structure
01:27 yoleaux 30 Jul 2017 21:51Z <zengargoyle> jeromelanteri: could you add an example my_pl6.yml file to your repo?
01:27 yoleaux 30 Jul 2017 21:56Z <zengargoyle> jeromelanteri: or you could email me zengargoyle at gmail.com if my_pl6.yml is sensitive data....
01:29 Geth ¦ doc: ceec98b52e | (Will "Coke" Coleda)++ | 2 files
01:29 Geth ¦ doc: Test Perl 6 code in ruby nutshell doc.
01:29 Geth ¦ doc:
01:29 Geth ¦ doc: Found several issues in the P6 code.
01:29 Geth ¦ doc:
01:29 Geth ¦ doc: Part of #1387
01:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ceec98b52e
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:56 stmuk joined #perl6
01:59 mspo is there a way to print out the site dir's path?
02:04 [Coke] the site?
02:09 mspo as in the part of the $*REPO.repo-chain
02:09 mspo that is global
02:14 [Coke] m: say $*REPO.repo-chain[0].writeable-path.say
02:14 camelia rakudo-moar a256c2: OUTPUT: «"/home/camelia/.perl6".IO?True?»
02:15 [Coke] (one too many says)
02:15 [Coke] m: .writeable-path.say for $*REPO.repo-chain
02:15 camelia rakudo-moar a256c2: OUTPUT: «"/home/camelia/.perl6".IO?"/home/camelia/rakudo-m-inst-1/share/perl6/site".IO?"/home/camelia/rakudo-m-inst-1/share/perl6/vendor".IO?"/home/camelia/rakudo-m-inst-1/share/perl6".IO?No such method 'writeable-path' for invocant of type 'CompUnit::Rep…»
02:16 mspo m: say CompUnit::RepositoryRegistry.repository-for-name("site")
02:16 camelia rakudo-moar a256c2: OUTPUT: «inst#/home/camelia/rakudo-m-inst-1/share/perl6/site?»
02:16 mspo that's what I wanted
02:22 mspo well sort of
02:30 lookatme joined #perl6
02:32 lookatme ugexe, are you in around
02:39 mspo I'm trying to install zef into a DESTDIR
02:39 mspo and not just sed that repository-for-name("site") call :)
02:45 joy joined #perl6
02:46 joy hello, i have a small question , can the value returned by an 'if' be assinged? something like let x = if var<1 { 1} else { 2};
02:47 lookatme let x = do if
02:47 lookatme m: my $x = do if 1 { 1 } else { 2 }; say $x;
02:47 camelia rakudo-moar a256c2: OUTPUT: «1?»
02:47 lookatme joy, ^^
02:48 joy lookatme: thank you much
02:49 lookatme welcome
02:49 joy kind of like 'do' converts the statement into an expression
02:49 joy by wrapping inside a block
02:53 noganex joined #perl6
03:08 pharv joined #perl6
03:25 geekosaur joined #perl6
03:27 geekosaur joined #perl6
03:29 R0b0t1 joined #perl6
03:29 jast joined #perl6
03:30 geekosaur joined #perl6
03:30 Cabanossi joined #perl6
03:31 cibs joined #perl6
03:36 jeromelanteri what is the diference between associative hash and hash ?
03:38 jeromelanteri because, i do: my %failed; then call function f(%failed); who has been defined like: sub f(Hash %f is required) { }
03:38 geekosaur that sounds a bit confused. Associative is a role; Hash is an implementation of it
03:38 jeromelanteri and get error Type check failed
03:38 geekosaur and Hash %f doesn['t mean what you think
03:39 geekosaur "Hash %f" means an Associative whose values are Hashes
03:39 jeromelanteri geekosaur, ok but i not understand, i do define a Hash, then pass it in arg for a function who ask for a Hash... and it faile due to wrong type
03:39 geekosaur % already does what you want
03:39 jeromelanteri geekosaur, so... how do you just define a Hash ?
03:40 jeromelanteri or better... how do you said you want a Hash as argument ? instead of "associative Hash ?
03:41 jeromelanteri (define the constraint of argument...)
03:41 geekosaur do you really need to exclude other things that do Associative?
03:41 jeromelanteri geekosaur, i asked you what i would like to do
03:42 geekosaur again, Associative is a role. Hash is one class that does that role. *Every* Hash is Associative. % expresses the Associative role.
03:42 lookatme "Hash" before %f is a constraint
03:42 lookatme type constraint
03:43 lookatme m: my %hash = a => 1, b => 2; sub f(Hash $f) { say $f; }(%hash);
03:43 camelia rakudo-moar a256c2: OUTPUT: «{a => 1, b => 2}?»
03:43 jeromelanteri geekosaur, ok... so when i do my $string; f($string); sub f(Str $s is required) {}
03:43 lookatme jeromelanteri, ^^
03:43 geekosaur m: sub f(Hash $f) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a)
03:43 camelia rakudo-moar a256c2: OUTPUT: «3?»
03:43 jeromelanteri it works... so i definitly not well understand what it mean.
03:44 jeromelanteri i try to make the logic link...
03:44 lookatme jeromelanteri, you can read the Signature document
03:44 geekosaur note $ instead of %
03:44 geekosaur `sometype %v` means an Associative whose values are of type sometype
03:44 jeromelanteri let me time to try to understand, it still confuse for me... there is two things who make me opposit sens
03:45 geekosaur this is confusing, the types of Associatives and Positionals don't work like the types of Scalars
03:45 jeromelanteri geekosaur, well... when you define a function or method, you doesn't ask for a constraint byt pass Type in front ?
03:46 jeromelanteri geekosaur, why ?
03:46 geekosaur because generally you want to say the type of the thing stored in it
03:46 jeromelanteri geekosaur, sure it is confusing because it is not logic
03:46 geekosaur if you say Str %h, you mean a Hash containing Str
03:46 jeromelanteri geekosaur, sure... why not make things like: just add a char designed for that in front ?
03:47 jeromelanteri geekosaur, ok
03:47 geekosaur think about it, if you define a function Str sub foo() you are not saying the function itself is a Str!
03:47 geekosaur you are saying its *result* is a Str
03:47 jeromelanteri sure
03:47 geekosaur if you say Str @a, you mean an array OF Str
03:47 jeromelanteri like in C++
03:47 jeromelanteri ho ok
03:47 jeromelanteri understand better
03:48 jeromelanteri i thank that: $x is a string
03:48 lookatme https://docs.perl6.org/type/Signature#Type_Constraints
03:48 jeromelanteri lookatme, i read it allready.
03:48 geekosaur so if you absolutely need Hash and not just Associative (things that are indexed the way hashes are), you need to declare it as a scalar: Hash $f
03:48 geekosaur then you access with $f<a> or whatever
03:48 jeromelanteri ok
03:48 lookatme It's an Perl6 way, anyway
03:48 geekosaur note $ instead of %
03:48 geekosaur er
03:49 geekosaur m: sub f(Hash $f) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a)
03:49 camelia rakudo-moar a256c2: OUTPUT: «3?»
03:49 lookatme have lunch now
03:49 jeromelanteri ok, so %x is not a hash ?
03:49 geekosaur it defaults to Hash
03:49 jeromelanteri lookatme, good lunch
03:49 geekosaur it could also be Set, Bag, Mix, or various other things that do the Associative role
03:49 jeromelanteri geekosaur, and it can be an other one loaded ?
03:49 jeromelanteri ok
03:50 jeromelanteri geekosaur, that make me understand better would be many examples in the doc... i have sometimes difficulties with words
03:50 jeromelanteri thank you
03:51 jeromelanteri i also buy a perl6 book... but inside, it said things like: "this example doesn't works... but..." ok then... why writing this example ?
03:52 geekosaur because the only perl 6 books currently available are from the mid 2000s and talk about features that were expected to be added at some point. perl 6 was still in early development at the time
03:52 wamba joined #perl6
03:52 geekosaur and perl 6 has changed a bit since then, so most of those books are a bit questionable
03:52 jeromelanteri think perl6... (the title)
03:52 jeromelanteri geekosaur, yes
03:53 wobray joined #perl6
03:54 jeromelanteri geekosaur, ok then... i resume: in my function, i have to define constraint like: Hash $x is required
03:54 jeromelanteri then i can call f(%failed) ?
03:54 geekosaur yes
03:54 jeromelanteri well, thank you (it makes me very strange by the way)
03:54 geekosaur m: sub f(Hash $f is required) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a)
03:54 camelia rakudo-moar a256c2: OUTPUT: «3?»
03:55 jeromelanteri veru strange...
03:55 jeromelanteri yes so sure, inside function, i use $ instead of %
03:56 geekosaur because you declared it with $, yes
03:57 jeromelanteri and same when use loop for ? my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> %x {...}
03:57 jeromelanteri or for @group -> $x {}
03:58 jeromelanteri ?
03:58 jeromelanteri i try some test on perl6 editor...
04:01 geekosaur m: my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> %x { dd %x }
04:01 camelia rakudo-moar a256c2: OUTPUT: «Hash % = {:a("b"), :b("c")}?Hash % = {:a("d"), :b("nawak")}?»
04:01 geekosaur m: my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> $x { dd $x }
04:01 camelia rakudo-moar a256c2: OUTPUT: «Hash $x = ${:a("b"), :b("c")}?Hash $x = ${:a("d"), :b("nawak")}?»
04:01 jeromelanteri geekosaur, it works for together
04:01 jeromelanteri (crying)
04:01 geekosaur they both work; % is a bit more idiomatic
04:01 geekosaur there are subtle differences between the two but much of the time it doesn't matter
04:02 jeromelanteri so perl6 make interpretation for this situation...
04:02 jeromelanteri (rakudo)
04:02 geekosaur in partiuclar using the % form lets you talk about the types of keys and values, but $ only lets you talk about the Hash
04:02 geekosaur which is what you ran into with the sub declaration
04:02 jeromelanteri yes
04:03 jeromelanteri in which kind of situation it does matter ?
04:03 jeromelanteri (an example ?)
04:04 jeromelanteri and same when use loop for ? my @group =( ${a=> "b", b=> "c"}, ${a=>"d", b=> "nawak"}); for @group -> %x {...}
04:04 jeromelanteri maybe ?
04:04 geekosaur same there, yes
04:05 jeromelanteri but the $ in front of { said it is a scalar...
04:05 geekosaur a scalar container can hold an Array or a Hash or a Set or any other object
04:05 jeromelanteri so here only -> $x shoudl works ?
04:05 geekosaur with % you get somewhat better type checking from the compiler
04:05 jeromelanteri ok
04:06 geekosaur and more ability to specify the types within the container
04:06 geekosaur if you don't need that, you can use either one.
04:06 jeromelanteri what is the best practice convention to use ?
04:06 geekosaur but perl 6 is more likely to catch a mistake if you use the %
04:06 jeromelanteri sure
04:06 jeromelanteri so best practice is to go closer to the real content type
04:07 jeromelanteri (i think also interpretation time by rakudo is a loosing time)
04:08 geekosaur we went for correctness first; speed is what's being worked on now
04:08 jeromelanteri then by the way, inside a private function, normally, there is no reason to make a constraint ?
04:08 geekosaur there can be, depending on how complex the function is
04:08 jeromelanteri ok
04:09 geekosaur again, the more information you give it about what you expect (for example, if you say $x then itcan be literally anything; if you say %x then it *must* have an Associative role) the better the error messages for mistakes will be
04:09 geekosaur and, sometimes, the faster the result will run because it doesn't have to allow for the possibility that your $x might be sometimes a Hash and sometimes an Array and ...
04:10 jeromelanteri taht seems clear for me now
04:11 jeromelanteri that
04:11 jeromelanteri thank you geekosaur
04:12 jeromelanteri also... i see that there is priories when define a function arguments... default values has to be last ones (same in C++) and required constraint not first ones...
04:12 jeromelanteri priorities
04:13 jeromelanteri is it possible to create something like "struct" with perl6 also ?
04:13 geekosaur yes. because if you make the first parameter optional and the second normal, what does foo(1) mean? could be you meant 1 as the optional first and Any as the second, or that you left off the first and 1 is the second
04:13 jeromelanteri geekosaur, yes
04:13 geekosaur generally one uses classes for that. (sort of like C++, where a struct is just a class with all public members)
04:14 jeromelanteri ok
04:16 R0b0t1 joined #perl6
04:17 jeromelanteri geekosaur, actually, define function with Hash $failed or with %failed provide the same error of associative Hash and hash (${})
04:18 geekosaur can you put the actual code and full error on a pastebin somewhere?
04:18 jeromelanteri geekosaur, yes
04:20 jeromelanteri https://gist.github.com/jerome-diver/934717a282b12c6030829d22fdc3ecd9
04:22 geekosaur ok, the error says that it's not this file that is at fault
04:22 jeromelanteri geekosaur, o f... yes...
04:23 geekosaur what is line 54 of check/Check.pm6?
04:24 jeromelanteri geekosaur, that's ok, same problem was Hash %things instead of %things
04:25 jeromelanteri fix
04:25 geekosaur also: the meaning of that Assdociative[Hash] thing is that it is checking something related to the role Associative, and the thing doing the Associative role is a Hash
04:26 jeromelanteri by "associative", it is like "reference to" ?
04:27 jeromelanteri no... it can also be referenced to an associative role
04:27 jeromelanteri it is a role
04:27 geekosaur Associative means things that are indexed by keys, like Hash, Set (which is *just* keys, Bag (like Set but it also stores the number of times the key is present), etc.
04:27 geekosaur there is also Positional, which is things like Array, List (read-only array), etc. that are indexed by position
04:28 jeromelanteri a kind of special reference with more meta inforamtion about the nature of reference ?
04:28 geekosaur something like that
04:28 jeromelanteri ok.
04:28 geekosaur they can all be thought of as custom Hashes
04:29 jeromelanteri i think it ias the way for functionnal programmation (that is something nex for me)
04:29 jeromelanteri new
04:30 Cabanossi joined #perl6
04:38 mr-foobar joined #perl6
04:50 lookatme Anyway there some document explain this
04:51 lookatme In https://docs.perl6.org/type/Associative :  The % sigil restricts variables to objects that do Associative.
04:51 lookatme m: my %x := Set(1, 2, 3); say %x.WHAT;
04:51 camelia rakudo-moar a256c2: OUTPUT: «(Set)?»
04:51 lookatme m: my %x := 1; say %x.WHAT;
04:51 camelia rakudo-moar a256c2: OUTPUT: «Type check failed in binding; expected Associative but got Int (1)?  in block <unit> at <tmp> line 1??»
04:53 lookatme I would be guess, the @ sigil restricts variable to objects that do Positional
04:53 lookatme and the $ is for every objects
04:53 lookatme jeromelanteri, ^^
04:55 lookatme In signature, the type constraint, for % and @ is a little different from $
04:55 jeromelanteri ok... thank you. what is := vs = ?
04:56 jeromelanteri lookatme, my turn to go at lunch now..
04:56 lookatme OK, good lunch
05:00 mint_ joined #perl6
05:00 mint_ hi
05:02 link_k joined #perl6
05:02 lookatme hi :???
05:09 xtreak joined #perl6
05:17 GK1wmSU joined #perl6
05:19 lookatme https://learnxinyminutes.com/docs/perl6/ link_k
05:19 lookatme like this ?
05:20 GK1wmSU left #perl6
05:31 _GK1wmSU joined #perl6
05:33 _GK1wmSU left #perl6
05:34 geekosaur philosophy is best gleaned from the apocalypses etc. https://design,perl6.org
05:35 geekosaur (note that the synopses, which were the original draft specifications, are now out of date, as are many of the examples in the apocalypses and exegeses)
05:47 konsolebox joined #perl6
05:54 xtreak joined #perl6
05:55 zakame joined #perl6
05:56 xtreak joined #perl6
06:02 lowbro joined #perl6
06:02 lowbro joined #perl6
06:11 nadim joined #perl6
06:37 rindolf joined #perl6
06:40 tzekid joined #perl6
06:41 darutoko joined #perl6
06:45 Cabanossi joined #perl6
06:46 zakame joined #perl6
06:54 nadim joined #perl6
07:00 faraco joined #perl6
07:00 faraco m: say hello
07:00 yoleaux 26 Jul 2017 17:07Z <Zoffix> faraco: so the .sum test description is not too wrong. Indeed Range.sum produces an Int for non-Int endpoint, but only if it can; (1.1 .. 10.0).sum gives a Rat :/
07:00 camelia rakudo-moar a256c2: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    hello used at line 1. Did you mean 'shell'???»
07:03 faraco m: my @foo = <cow dog>; my ($moo, $woof) = @foo; say $moo ~ " " ~ $woof
07:03 camelia rakudo-moar a256c2: OUTPUT: «cow dog?»
07:04 espadrine joined #perl6
07:05 jonas1 joined #perl6
07:12 wamba joined #perl6
07:17 jast joined #perl6
07:45 zakharyas joined #perl6
07:47 lookatme :/
08:04 AlexWithFootgun ? :)
08:06 dakkar joined #perl6
08:11 lookatme I create an app: https://github.com/araraloren/perl6-app-snippet
08:12 lookatme It is working when I run with `perl6 -Ilib ./bin/snippet`
08:12 lookatme But when install with zef
08:12 lookatme It failed with: Circular module loading detected trying to precompile
08:13 lookatme Anyone can give me a hand . :)
08:14 xtreak joined #perl6
08:14 lookatme Appreciate for the help.
08:18 vendethiel- joined #perl6
08:19 ChoHag joined #perl6
08:21 zakame joined #perl6
08:30 zengargoyle lookatme: when i do `zef install .` and then `perl6 ./bin/snippet` i don't seen any errors about circular.  i get errors because of bad command line arguments since i don't know what it's supposed to do.
08:31 lookatme zengargoyle, add -Ilib
08:31 lookatme I mean run it without not install
08:31 lookatme perl6 -Ilib ./bin/snippet
08:32 lookatme zengargoyle, you install it ? not have exception ? What's your zef version
08:32 zengargoyle i believe it looks mostly the same.
08:33 zengargoyle zef:ver<0.1.26>:auth<github:ugexe>:api<>
08:34 lookatme zef info zef
08:34 zengargoyle ^^ 0.1.26
08:35 lookatme In perl6-app-snippet directory, is `perl6 -Ilib ./bin/snippet` working fine?
08:35 lookatme Hmm, it will print Usage
08:36 zengargoyle https://gist.github.com/080979ef2f763e6d7bed1fa3243a502f
08:37 lookatme Yeah, it is working
08:38 zengargoyle doing perl6 -Ilib ./bin/snippet  (or -I. since you have a META6.json) or using the zef installed version from .../site/bin/snippet all seem ok by me.
08:38 zengargoyle for various definiton of OK :)
08:38 lookatme OK, I update my zef first
08:38 zengargoyle and maybe dependencies?  i didn't have many of the dependencies already installed.
08:39 lookatme I install all dependencies, maybe I should update them ?
08:40 nadim_ joined #perl6
08:44 zengargoyle i wonder if there is a tool that for an installed module/dist shows the dependencies and versions the precomp'd bits are using.
08:45 Cabanossi joined #perl6
08:47 lookatme buggable: depend
08:48 lookatme :|
08:50 zengargoyle some perl5 modules would have a t/02-versions.t that would just print out all dependencies and the version installed.  handy for the "are you using the same stuff i'm using?" questions.
08:50 araujo joined #perl6
08:50 zengargoyle seems with CUR that could be like magical and go all the way down the dependency tree.
08:51 lookatme zengargoyle, It also throw an exception : https://gist.github.com/araraloren/c36fd277dc185628605ff103ef3e4a94
08:51 lookatme s/also/still/
08:52 robertle joined #perl6
08:53 bjz joined #perl6
08:54 lookatme That file which precompile failed is Interface/C.pm6
08:54 zengargoyle `ZEF_PLUGIN_DEBUG=1 zef --debug install .`
08:55 zengargoyle for more information that somebody might find useful.
08:56 wamba joined #perl6
08:56 zengargoyle i'm on This is Rakudo version 2017.07-54-g640641876 built on MoarVM version 2017.07-15-g0729f841 but i don't know if that matters at all.
08:58 lookatme https://gist.github.com/araraloren/c36fd277dc185628605ff103ef3e4a94
08:59 lookatme I manual install from source: This is Rakudo version 2017.07 built on MoarVM version 2017.07
09:01 zengargoyle yeah, i'm guessing this is a ugexe question.  or somebody else who greally knows the CUR/precomp stuff and can make a better guess.
09:01 lookatme Hmm
09:02 lookatme ugexe, are you in around ?? :)
09:04 twee joined #perl6
09:07 nadim_ geekosaur: hi, I tried the $*var way of passing data to a Block, it worked just fine in a simple example but when put in the code like this: my $*d = 0 ; $block(100)  then I get this error: Dynamic variable $*d not found in block <unit> at where I defined the block which is a separate test file.
09:10 lookatme It should be our $*d, I think?
09:10 lookatme or guess .
09:14 robertle joined #perl6
09:15 Cabanossi joined #perl6
09:17 rindolf joined #perl6
09:17 gregf_ joined #perl6
09:20 nadim_ I tried that too :)
09:21 vendethiel joined #perl6
09:21 nadim_ 'my' also worked fine in a simpler example
09:24 lookatme m: module A { my $*d = 0; }; import A; say ::.keys.grep("\$*d")
09:24 camelia rakudo-moar a256c2: OUTPUT: «()?»
09:24 lookatme m: module A { our $*d = 0; }; import A; say ::.keys.grep("\$*d")
09:24 camelia rakudo-moar a256c2: OUTPUT: «()?»
09:24 lookatme m: module A { our $*d is export = 0; }; import A; say ::.keys.grep("\$*d")
09:24 camelia rakudo-moar a256c2: OUTPUT: «($*d)?»
09:24 lookatme IDK..
09:25 cpage_ joined #perl6
09:36 xtreak joined #perl6
09:38 zengargoyle m: sub foo { say $OUTER::x }; my $x = "foo"; foo();
09:38 camelia rakudo-moar a256c2: OUTPUT: «foo?»
09:39 zengargoyle m: sub foo { say $UNIT::x }; my $x = "foo"; foo();
09:39 camelia rakudo-moar a256c2: OUTPUT: «foo?»
09:45 Cabanossi joined #perl6
09:47 ufobat joined #perl6
09:48 ufobat hey :) i've got a question regarding prove6 from Tap::Harness. prove from perl5 can handle several -Ipath, prove6 not, isn't that a "bug"
09:54 nadim_ joined #perl6
09:54 mr-fooba_ joined #perl6
09:56 nadim_ my code here may be completely crappy but the error is not helpful at all. Should I report this error, in the hope it helps get a better error message, or just forget about it completely
09:56 nadim_ https://nopaste.linux-dev.org/?1160213
10:00 timotimo yeah, that's a compiler explosion that shouldn't happen
10:01 nadim_ timotimo: : hi, I tried the $*var way of passing data to a Block, it worked just fine in a simple example but when put in the code like this: my $*d = 0 ; $block(100)  then I get this error: Dynamic variable $*d not found in block <unit> at where I defined the block which is a separate test file.
10:01 vendethiel- joined #perl6
10:01 nadim_ I'll report the explosion too
10:04 timotimo strange, it should Just Work
10:04 timotimo anyway, it's surprising but the space after the A is to blame, i believe
10:05 timotimo the code expects if there's something after the module name that there has to be an expression
10:05 timotimo but it can be an empty arglist, too
10:05 timotimo so it just reaches into the arglist to pick out the EXPR result, but the rule for arglist never even called EXPR in the first place
10:06 nadim_ Good to know that it is analysed before I even finished reporting it ;)
10:07 timotimo will be fixed in a minute
10:07 timotimo it only ever reaches into the EXPR to tell the rest of the compiler that it shouldn't complain about "useless use of blah in void context" anyway
10:08 nadim_ that's fast 3 mn form finding an error, rporting it, analysing it, to fixing it.
10:08 timotimo Undeclared routine:
10:08 timotimo xxx used at line 22
10:08 nadim_ that would give me an incentive to build a new version.
10:08 timotimo that's what it does now
10:08 nadim_ sounds much better
10:09 nadim_ timotimo++
10:09 timotimo committed
10:09 nadim_ timotimo: I'd appreciate some help on the $*var error I reported above
10:09 timotimo https://github.com/rakudo/rakudo/commit/3e078d4d47
10:10 timotimo yep, can i already download the code off of github?
10:11 xtreak joined #perl6
10:11 nadim_ It's compiling here
10:11 timotimo the $*var related code
10:11 nadim_ let me fix a branch for you
10:20 nadim_ timotimo: Meh! fixed in the latest rakudo
10:21 nadim_ this is the second error I find in two week that is fixed in the latest, I can only say "Good work and sorry my rporting is too late"
10:22 timotimo oh
10:22 timotimo still, i wonder how that happened
10:22 timotimo dynamic variables are a very important part of the compiler itself
10:23 timotimo if they are broken in some way, the compiler would completely fall apart
10:23 nadim_ I can still upload the branch
10:23 nadim_ the version I had before was 136 commit behind
10:28 zakame joined #perl6
10:34 vendethiel joined #perl6
10:58 nadim_ timotimo: since you have the latest running, Does Test::Meta work for you? It used to but now dies with ===SORRY=== Could not find META6:ver<0.0.4..*>  and the latest commit (9 days) says "Fix version matcher"
11:01 kerframil joined #perl6
11:02 nadim_ reported it to the module's github too
11:02 jast joined #perl6
11:03 andrzejku joined #perl6
11:20 timotimo it breaks in the same way for me
11:26 nattefrost joined #perl6
11:27 bjz joined #perl6
11:34 nadim_ thank you. do you know if J Stowe is here and what nick he has?
11:35 lizmat rabidgravy
11:35 timotimo he's been away from the community for a while now and i miss him :S
11:36 timotimo iiuc he was put off by how module- and license-related stuff was handled?
11:39 nadim_ that's a pity
11:41 zakame joined #perl6
11:45 Cabanossi joined #perl6
11:46 rindolf joined #perl6
11:54 El_Che I didn't know that :(
11:54 El_Che I see twitter post from him once in a while
11:55 timotimo right, i see his tweets, too
11:59 Geth ¦ doc: 39a460a30d | (Will "Coke" Coleda)++ | doc/Language/rb-nutshell.pod6
11:59 Geth ¦ doc: missing =end directive
11:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/39a460a30d
12:02 nadim_ Maybe we should just tell him he is missed and we would like to see him back.
12:03 El_Che send him a phisical card from tpcia
12:03 ilmari he works down the hall from me, actually
12:10 faraco joined #perl6
12:11 faraco m: say "hi"x32
12:11 camelia rakudo-moar a7d2ad: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3say "hi"7?5x32?    expecting any of:?        infix?        infix stopper?        postfix?        statement end?        statement modifier?    …»
12:12 faraco m: say "hi"*32
12:12 camelia rakudo-moar a7d2ad: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3?5hi' (indicated by ?)?  in block <unit> at <tmp> line 1??»
12:15 faraco m: sub cat_a_string (Str $input --> Str) { return "$input" ~ "z"; } say cat_a_string("world");
12:15 camelia rakudo-moar a7d2ad: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3nput --> Str) { return "$input" ~ "z"; }7?5 say cat_a_string("world");?    expecting any of:?        infix?       …»
12:23 faraco sub cat_a_string (Str:D --> Str) { return $x ~ "z"; } say cat_a_string "heh"
12:23 faraco m: sub cat_a_string (Str:D --> Str) { return $x ~ "z"; } say cat_a_string "heh"
12:23 camelia rakudo-moar a7d2ad: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Variable '$x' is not declared?at <tmp>:1?------> 3b cat_a_string (Str:D --> Str) { return 7?5$x ~ "z"; } say cat_a_string "heh"?»
12:24 faraco m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z"; } say cat_a_string "heh"
12:24 camelia rakudo-moar a7d2ad: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3 (Str:D $x --> Str) { return $x ~ "z"; }7?5 say cat_a_string "heh"?    expecting any of:?        infix?        inf…»
12:24 faraco m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z" } say cat_a_string "heh"
12:24 camelia rakudo-moar a7d2ad: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3g (Str:D $x --> Str) { return $x ~ "z" }7?5 say cat_a_string "heh"?    expecting any of:?        infix?        inf…»
12:24 araraloren joined #perl6
12:25 faraco m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z" }; say cat_a_string "heh"
12:25 camelia rakudo-moar a7d2ad: OUTPUT: «hehz?»
12:27 faraco hmm, does rakudo lang by default type checked even if you not declaring the data type of the variables?
12:29 lizmat faraco: type checks *always* happen
12:29 lizmat if you don't specify a type, the default is Any
12:29 bjz_ joined #perl6
12:29 lizmat (in most case)
12:29 lizmat *s
12:29 faraco oh...well, I learnt something new today.
12:30 faraco thanks
12:31 araraloren I create an app: https://github.com/araraloren/perl6-app-snippet
12:31 araraloren There some problem when I use zef install it
12:31 araraloren The exception: https://gist.github.com/araraloren/c36fd277dc185628605ff103ef3e4a94
12:41 araraloren Anyone have suggestion ? :/
12:42 moritz araraloren: have you run Test::META over your meta files?
12:43 konsolebox joined #perl6
12:45 araraloren No
12:45 moritz try that first please
12:46 sufrostico joined #perl6
12:46 faraco m: my @pets = <cat dog rabbit>; say map { "I got $_ as pet at home" }, @pets;
12:46 camelia rakudo-moar a7d2ad: OUTPUT: «(I got cat as pet at home I got dog as pet at home I got rabbit as pet at home)?»
12:47 faraco m: my @pets = <10 20 30>; say map { $_ * 2  }, @pets;
12:47 camelia rakudo-moar a7d2ad: OUTPUT: «(20 40 60)?»
12:48 faraco I see that in https://docs.perl6.org/routine/map#class_Any doesn't have any (even one) examples. Can I use above as the method example?
12:48 [Coke] faraco: neither of those are using methods.
12:48 araraloren I copy the test here: https://github.com/jonathanstowe/Test-META/#synopsis
12:48 faraco oh yeah, let me try with method style.
12:48 araraloren It's no problem, moritz
12:49 [Coke] Note that there are method examples in the "routine map" section, fwiw.
12:49 faraco oh nevermind then
12:49 faraco thanks
12:50 araraloren moritz, and it was ok when I run "perl6 -Ilib ./bin/snippet" under the project directory
12:50 faraco oh wap, there is example just below it. I should read the doc more carefully.
12:51 sftp joined #perl6
12:55 [Coke] the docs could also use review, no doubt. :)
12:56 rindolf joined #perl6
12:58 [Coke] btw, when making the ruby -> perl 6 doc go through the examples tester, found several of the examples of Perl 6 had leftover ruby-isms that hadn't been converted, as well as some claims about what P6 could do that failed to even compile.
13:01 Cabanossi joined #perl6
13:01 mcmillhj joined #perl6
13:04 ggoebel joined #perl6
13:10 zakharyas joined #perl6
13:15 andrzejku_ joined #perl6
13:20 andrzejku joined #perl6
13:26 faraco [Coke]: you mean like this? -  my &add = -> $n, $m { $n + $m }; # Perl 6 addition function
13:26 nicq20 joined #perl6
13:26 faraco I'm thinking on trying
13:26 faraco m: my &add = sub ($n, $m) { $n + $m }; say &add(2, 3);
13:26 camelia rakudo-moar 148ba7: OUTPUT: «5?»
13:26 faraco not sure if that idiomatic Perl 6
13:27 faraco or, Rakudo language :P
13:27 skids joined #perl6
13:28 jnthn It's a long way to write my &add = &infix:<+>
13:29 jnthn Which is a long way to write my &add = &[+]
13:31 mspo can somoeone help me figure out what this means? Serialization Error: missing static code ref for closure 'BUILD'
13:33 andrzejku_ joined #perl6
13:34 [Coke] there's a huge difference between "idiomatic" and "can't compile"
13:34 [Coke] er, "not idiomatic".
13:34 [Coke] I just made sure what was there was at least compilable. bare minimum.
13:35 faraco oh, I thought you idiomatic by " the examples of Perl 6 had leftover ruby-isms that hadn't been converted"
13:35 faraco meant*
13:36 [Coke] I mean literal ruby syntax that would never work, like class Person\n#guts of class\n#end . o O (not using the {} to delimit the class def)
13:37 faraco I see
13:40 zakame joined #perl6
13:41 araraloren jnthn, do you have time help me figure out my module problem ?
13:44 popov_ joined #perl6
13:49 jaldhar_ joined #perl6
13:51 itaipu joined #perl6
13:52 jnthn araraloren: Not much, but circular module loading means there's a `use` in one module that eventually leads to a `use` of the original module
13:53 araraloren jnthn, but why it is working when I run "perl6 -Ilib ./bin/snippet" in project directory
13:54 nadim_ ilmari: then go tell him in person please. I did write a little messaage in the bug report I added this morning.
13:55 timotimo araraloren: have you considered that one env var that gives you module loading debug output?
13:56 araraloren timotimo, such as ?
13:56 araraloren you mean I make some debug output in my module ?
13:56 cdg joined #perl6
13:58 timotimo no
13:59 timotimo set RAKUDO_MODULE_DEBUG to a non-zero value
13:59 timotimo in the environment
14:00 Cabanossi joined #perl6
14:02 LeCamarade joined #perl6
14:06 araraloren ok
14:06 araraloren timotimo, thanks
14:06 rindolf joined #perl6
14:09 Geth ¦ doc: 9125507a4c | (Elizabeth Mattijsen)++ | doc/Language/control.pod6
14:09 Geth ¦ doc: Fix spello, spotted by brian d foy++
14:09 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9125507a4c
14:11 ChoHag joined #perl6
14:11 araraloren timotimo, too many debug output. What should I pay attention to  ?
14:17 Aaronepower joined #perl6
14:17 khw joined #perl6
14:29 itaipu joined #perl6
14:29 araraloren I found the problem, thanks jnthn timotimo and zengargoyle
14:30 araraloren I make a mistake of module file name in provides of META.
14:37 tadzik joined #perl6
14:49 itaipu joined #perl6
14:52 xtreak joined #perl6
14:52 jaldhar joined #perl6
15:01 sufrostico joined #perl6
15:02 Matthew[m] joined #perl6
15:02 mack[m] joined #perl6
15:02 ilmari[m] joined #perl6
15:02 M-Illandan joined #perl6
15:02 tyil[m] joined #perl6
15:02 CIAvash[m] joined #perl6
15:02 unclechu joined #perl6
15:02 wictory[m] joined #perl6
15:02 mienaikage joined #perl6
15:02 xui_nya[m] joined #perl6
15:04 Skarsnik joined #perl6
15:05 Skarsnik Hello
15:05 araraloren Skarsnik, hi
15:06 faraco hi
15:15 ingy how do I determine if an object is an instance of a user defined class?
15:15 moritz $obj ~~ TheClass
15:15 moritz or are you talking about *any* user-defined class?
15:16 moritz then the answer is: we intentionally don't make a strict distinction between built-in and user-defined classes
15:16 ingy *any*
15:16 ingy how do I determine if a value is a class?
15:17 moritz as opposed to a role? or an instance? or what are you interested in?
15:18 ingy class Foo {}; my $c = Foo; say $c ~~ Class;
15:18 moritz m: sub is-class(Mu $x) { not $x.defined && $x.HOW ~~ Metamodel::ClassHOW }; say is-class($_) for 1, Int, Positional
15:18 camelia rakudo-moar fb5db5: OUTPUT: «False?True?True?»
15:18 moritz hm, that probably considers Positional a class due to auto-punning
15:24 epony joined #perl6
15:27 sufrostico joined #perl6
15:29 ingy thanks
15:31 MasterDuke joined #perl6
15:36 ingy that seems a little... uh, not so elegant.
15:38 ingy but I guess it's not a common need
15:39 Geth ¦ ecosystem: c8c50062b9 | loren++ (committed using GitHub Web editor) | META.list
15:39 Geth ¦ ecosystem: add App::snippet
15:39 Geth ¦ ecosystem:
15:39 Geth ¦ ecosystem: an app run C/C++ or other language snippet code
15:39 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/c8c50062b9
15:40 araraloren :)
15:43 ingy m: say Perl6::Metamodel::ClassHOW.^methods
15:43 camelia rakudo-moar 413b71: OUTPUT: «Could not find symbol '&ClassHOW'?  in block <unit> at <tmp> line 1??»
15:44 ingy m: use Perl6::Metamodel::ClassHOW; say Perl6::Metamodel::ClassHOW.^methods
15:44 camelia rakudo-moar 413b71: OUTPUT: «===SORRY!===?Could not find Perl6::Metamodel::ClassHOW at line 1 in:?    /home/camelia/.perl6?    /home/camelia/rakudo-m-inst-2/share/perl6/site?    /home/camelia/rakudo-m-inst-2/share/perl6/vendor?    /home/camelia/rakudo-m-inst-2/share/perl6…»
15:44 ingy m: say Metamodel::ClassHOW.^methods
15:44 camelia rakudo-moar 413b71: OUTPUT: «(archetypes new new_type add_fallback compose roles role_typecheck_list concretization is_composed setup_junction_fallback find_method_fallback has_fallbacks submethod_table private_method_table invocation_attr_name parents cache_get setup_mixin_cache mu…»
15:46 faraco joined #perl6
15:46 faraco joined #perl6
15:46 eliasr joined #perl6
15:47 ingy locally that give me: No such method 'gist' for invocant of type 'NQPRoutine'
15:48 ingy This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
15:50 araraloren m: say 1.HOW; say 1.HOW.^methods;
15:50 camelia rakudo-moar 413b71: OUTPUT: «Perl6::Metamodel::ClassHOW.new?(archetypes new new_type add_fallback compose roles role_typecheck_list concretization is_composed setup_junction_fallback find_method_fallback has_fallbacks submethod_table private_method_table invocation_attr_name paren…»
15:52 ingy araraloren: I get same error here with that
15:54 araraloren ingy, what error ?
15:54 araraloren such as Perl6::Metamodel::HOW is an implementation class of Perl6.
15:54 araraloren You can not found document in docs.perl6.org.
15:54 ingy 11:47:12             ingy | locally that give me: No such method 'gist' for invocant of type 'NQPRoutine'
15:55 araraloren What are you running ?
15:55 araraloren the code
15:55 ingy say 1.HOW; say 1.HOW.^methods;
15:55 evalable6 ingy, rakudo-moar fbdbe6fb5: OUTPUT: «Perl6::Metamodel::ClassHOW.new?(archetypes new new_type add_fallback compose roles role_ty…»
15:55 evalable6 ingy, Full output: https://gist.github.com/cc34a4cadb725eedd4df4a7ba0f9c44d
15:55 araraloren What's your perl6 version  ?
15:55 araraloren perl6 -v
15:56 ingy 11:48:04             ingy | This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
15:56 ingy its all 10 lines up
15:57 araraloren The last version is 2017.07
15:57 araraloren ingy, you can update your rakudo version, follow this : https://github.com/nxadm/rakudo-pkg/releases
15:58 ingy I'll turn it off and back on again
15:59 araraloren I gotta sleep now
15:59 araraloren you can ask other people, bye
16:04 perlpilot joined #perl6
16:14 wamba joined #perl6
16:14 cdg_ joined #perl6
16:16 [Coke] mst: any idea where to report that strawberryperl.com is missing? (looks like DNS vanished)
16:17 [Coke] (oh, maybe tpf slack)
16:17 mst might be worth a try
16:18 mst also ask #p5p on irc.perl.org
16:24 wamba joined #perl6
16:27 faraco joined #perl6
16:28 faraco hi, I'm trying to use Inline::Perl5 with a local module. I tried using use lib 'lib', but it says 'cannot locate Pong.pm'. Why it doesn't detect my local module?
16:30 faraco here is my code - https://pastebin.com/BuXvUKN3
16:31 faraco I have similar script in Perl 5 working just fine, and I launched the program with perl6 -Ilib script.p6
16:31 faraco but it doesn't work.
16:32 ilmari faraco: did you install Pong.pm into the right perl5's @INC?
16:32 ilmari use lib:from<Perl5> 'lib';
16:32 ilmari if it's in ./lib/
16:32 faraco I thought calling perl6 -Ilib is sufficient for that.
16:32 ilmari no, that only affects perl6's module path
16:33 faraco ah, I see. Thanks for the explanation. :)
16:33 faraco ilmari++
16:33 ilmari see the fourth example under https://github.com/niner/Inline-Perl5#load-a-perl-5-module
16:33 faraco I should read the doc carefully next time.
16:51 dwimmy joined #perl6
16:52 dwimmy How do search the logs of this channel?  Tried site search on Google but without success.
16:54 faraco https://irclog.perlgeek.de/perl6/
16:54 faraco how about that?
16:55 dwimmy Correction, site search failed on colabti.org/irclogger/irclogger_logs/perl6
16:56 dwimmy But works on irclog.perlgeek.de.  Thanks for the tip!!
16:57 faraco np :)
16:59 majensen joined #perl6
17:06 robertle joined #perl6
17:06 CacoS joined #perl6
17:21 brimonk joined #perl6
17:26 [Coke] if I have an array of Pairs, is there a for loop subsignature I can construct that will separate out the key/value ?
17:28 moritz m: my @a = a => 1, b => 2; for @a -> (:$key, :$value) { say "$key=$value" }
17:28 camelia rakudo-moar 7fdbb4: OUTPUT: «a=1?b=2?»
17:28 moritz [Coke]:  ^^
17:31 [Coke] ah, have to use the actual attribute names. Danke.
17:35 raschipi joined #perl6
17:42 moritz m: my @a = a => 1, b => 2; for @a -> [$key, :$value] { say "$key=$value" } # don't think that works, but worth checking
17:42 camelia rakudo-moar 7fdbb4: OUTPUT: «Type check failed in binding to parameter '<anon>'; expected Positional but got Pair (:a(1))?  in block <unit> at <tmp> line 1??»
17:51 nadim_ joined #perl6
17:51 perlpilot It would be interesting if there was a way to alias them to some other name.  something like  for @a -> (:$k(key), :$v(value)) { ... }
17:51 yoleaux 29 Jul 2017 02:20Z <zengargoyle> perlpilot: are you still maintaining Git::Wrapper?
17:51 perlpilot Not that useful here, but with other classes it might be (especially coupled with *% so that you don't have to specify *all* the attrs)
17:52 perlpilot zengargoyle: https://github.com/perl6/ecosystem/blob/master/META.list#L253   :-)
17:55 faraco m: say <hello cat>
17:55 camelia rakudo-moar 7fdbb4: OUTPUT: «(hello cat)?»
17:56 faraco m: say <hello cat>.comb
17:56 camelia rakudo-moar 7fdbb4: OUTPUT: «(h e l l o   c a t)?»
17:56 faraco m: say.words.comb
17:56 camelia rakudo-moar 7fdbb4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun?at <tmp>:1?--…»
17:56 faraco m: say <hello cat>.words.comb
17:56 camelia rakudo-moar 7fdbb4: OUTPUT: «(h e l l o   c a t)?»
17:58 itaipu joined #perl6
18:00 b2gills m: my @a = a => 1, b => 2; for @a -> (:key($l), :value($r)) { say "$l=$r" }
18:00 camelia rakudo-moar 7fdbb4: OUTPUT: «a=1?b=2?»
18:01 perlpilot ah.  I think I knew that at some point, but totally forgot.
18:01 b2gills unfortunately doesn't work with :key(\k)
18:04 TEttinger joined #perl6
18:17 mcmillhj joined #perl6
18:27 st_elmo joined #perl6
18:32 https_GK1wmSU joined #perl6
18:33 setty1 joined #perl6
18:33 k-man joined #perl6
18:49 AlexWithFootgun m: my @a = a => 1, b => 2; for @a».kv -> ($l, $r) { say "$l=$r" }
18:49 camelia rakudo-moar 7fdbb4: OUTPUT: «a=1?b=2?»
18:49 AlexWithFootgun this is a little bit shorter I guess?
18:50 AlexWithFootgun it is also faster, for some reason
18:52 AlexWithFootgun quite noticeably
18:53 AlexWithFootgun m: my @a = a => 1, b => 2; for @a».kv { say "$^l=$^r" }
18:53 camelia rakudo-moar 7fdbb4: OUTPUT: «a 1=b 2?»
18:54 AlexWithFootgun oops
18:54 AlexWithFootgun wrong :)
18:55 AlexWithFootgun m: my @a = a => 1, b => 2; { for @a { my $l = .key; my $r = .value; my $x = "$l=$r" } } for ^9999; say now - BEGIN now
18:55 camelia rakudo-moar 7fdbb4: OUTPUT: «0.1267656?»
18:55 AlexWithFootgun m: my @a = a => 1, b => 2; { for @a { my $l = .key; my $r = .value; my $x = "$l=$r" } } for ^99999; say now - BEGIN now
18:55 camelia rakudo-moar 7fdbb4: OUTPUT: «0.8706918?»
18:55 Skarsnik xD
18:55 AlexWithFootgun m: my @a = a => 1, b => 2; { for @a -> (:key($l), :value($r)) { my $x = "$l=$r" } } for ^99999; say now - BEGIN now
18:55 camelia rakudo-moar 7fdbb4: OUTPUT: «9.18430289?»
18:55 AlexWithFootgun I mean… well… :)
18:57 * AlexWithFootgun AlexDaniel
18:57 AlexWithFootgun oops
19:03 cdg joined #perl6
19:10 El_Che is someone having trouble with zef? I wonder if it's related with the github problems. THe weird thing is that can manually clone the modules. While zef dies on fetch: https://pastebin.ubuntu.com/25215145/
19:16 mspo related to the github outage?
19:17 El_Che mspo: I saw github was having trouble
19:46 Cabanossi joined #perl6
19:54 ugexe you can also refresh the github.com page and have it work some times
19:55 ChoHag joined #perl6
19:59 El_Che looking at there status graphs it was a pretty big downtime
20:04 itaipu joined #perl6
20:04 cdg joined #perl6
20:05 El_Che (solution to my zef problem doesn't seem to be a fetch problem. rm -rf ~/.perl6/* and reinstalling zef did the trick)
20:05 ugexe i fixed a bug with the git backend in the last update fwiw
20:06 ugexe but i wouldnt think it would have caused your problem
20:07 El_Che ugexe: is $*REPO the canonical way to get the default dir where modules are installed by default?
20:07 zengargoyle ugexe: does zef have an option that could take a module/dist (either being installed or already installed)  and dump out the full dependency chain with ver/auth/api that will be/was used?
20:08 El_Che ^-------- interested by that as well
20:09 ugexe there is no rakudo-default location for installed modules. zef chooses from CompUnit::RepositoryRegistry.repository-for-name('site' or 'home')
20:09 zengargoyle because araraloren had a circular dependency problem last night that i did not get when i installed the code.
20:10 ugexe they were also using -Ilib i believe
20:10 zengargoyle i'm imagining that because i didn't have the dependecies installed allready, i got newer ones then he had on his system.
20:11 ugexe all you can do is `zef install ... --dry` and look at the output
20:11 El_Che ugexe: I am playing a little with bundles of modules (a full module tree for a program), I was thinking of putting that in a bundler specific dir in $*REPO (which seems to be the same as CompUnit::RepositoryRegistry.repository-for-name('home') )
20:12 zengargoyle thanks, i'll try --dry sometime.
20:17 ugexe their problem was their meta file was incorrect
20:17 zengargoyle then why did it work when i did it?
20:17 zengargoyle that's my big question.
20:18 ugexe because you probably did not have any cruft from that module already installed
20:18 lichtkind joined #perl6
20:19 zengargoyle heh, i guess that's close enough to different versions of things already installed. to make sense to me. :)
20:20 zengargoyle i almost recommended nuking ~/.perl6 and trying again...
20:21 ugexe yes, ~/.perl6 has been problematic as of late
20:23 tardisx joined #perl6
20:23 zengargoyle and i did the permissions thing and use site....
20:23 itaipu joined #perl6
20:24 zengargoyle so you can have multiple versions of modules installed, but what about the scripts that get put into somewhere/bin?
20:24 bstamour joined #perl6
20:24 zengargoyle are we just stuck with the latest one installed...
20:25 ugexe a bin wrapper gets installed that is intended to let you pick (although its a bad idea since it steals --name --auth --ver for your script)
20:26 ugexe otherwise the *newest* is supposed to be picked (although atm its the newest *in whatever repo it finds it in first*)
20:26 zengargoyle ah, can't say i've ever looked at what's in that script. :)
20:26 ugexe which is usually ~/.perl6
20:26 zengargoyle i thought it was just putting the raw .pl file there.
20:27 ugexe hence recent reports of people updating zef but still getting bogus behavior from `zef install ...` - its still using some old version from before 2017.06/7
20:27 ugexe while before upgrading the correct version was getting picked (so probably didn't even realize such an old zef was installed)
20:28 ugexe this issue is addressed in #1125
20:31 zengargoyle thanks for the explaining. :)
20:33 zengargoyle i still want something that lets me start with just depends A::B, C::D and test and generate A::B:ver<0.1>:auth<foo>:api<> C::D:ver<4>:auth<bar>:api<1> that can go back into META6
20:35 zengargoyle or to have a 01-versions.t that dumps out a list.  it's really nice for the "works for me" troubleshooting.
20:35 cdg joined #perl6
20:36 * zengargoyle wonders if maybe there's already a Test::something that does that...
20:36 ugexe i liek to use `zef list --installed` in travis-ci for that
20:37 ugexe since nothing else should be installed in that instance
20:37 zengargoyle excellent idea!
20:46 nadim_ can I not retun a value in a map? say I don't want anything returned for even numbers. or do i have to grep before or after?
20:46 ugexe that reminds me, i forgot you can do `zef list cached` (to list whats in the cache)
20:47 Skarsnik I am curious, why zef replaced panda?
20:48 nadim_ m say (1, 2, 3, 4).map: { $_ == 2 ?? Nil !! $_} ;
20:48 nadim_ m: say (1, 2, 3, 4).map: { $_ == 2 ?? Nil !! $_} ;
20:48 camelia rakudo-moar 7fdbb4: OUTPUT: «(1 Nil 3 4)?»
20:48 nadim_ m: say (1, 2, 3, 4).map: { $_ == 2 ?? () !! $_} ;
20:48 camelia rakudo-moar 7fdbb4: OUTPUT: «(1 () 3 4)?»
20:49 nadim_ m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $_} ;
20:49 camelia rakudo-moar 7fdbb4: OUTPUT: «(1 3 4)?»
20:49 moritz Skarsnik: zef has the huge advantage that it's maintained
20:49 moritz I'm sure there are other reasons :-)
20:50 nadim_ m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! ($_,3)} ;
20:50 camelia rakudo-moar 7fdbb4: OUTPUT: «(1 3 3 3 4 3)?»
20:50 nadim_ m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! [$_,3]} ;
20:50 camelia rakudo-moar 7fdbb4: OUTPUT: «(1 3 3 3 4 3)?»
20:50 zengargoyle zef supports install-to locations...
20:50 nadim_ m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $[$_,3]} ;
20:50 camelia rakudo-moar 7fdbb4: OUTPUT: «([1 3] [3 3] [4 3])?»
20:50 nadim_ m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $($_,3)} ;
20:50 camelia rakudo-moar 7fdbb4: OUTPUT: «((1 3) (3 3) (4 3))?»
20:52 * zengargoyle doesn't really remember enough about pands anymore ...
20:52 mcsnolte joined #perl6
20:56 ingy m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo; say $h.gist; say $o.gist'
20:56 camelia rakudo-moar 7fdbb4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3($h, $o) = foo; say $h.gist; say $o.gist7?5'?    expecting any of:?        infix?        infix stopper?        postfix?        statement end?   …»
20:56 ingy m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo; say $h.gist; say $o.gist
20:56 camelia rakudo-moar 7fdbb4: OUTPUT: «x => 1?y => 2?»
20:57 ingy how do I call this foo so that I get a hash and a Nil?
20:58 andrzejku__ joined #perl6
20:58 ingy why does that split my hash into 2 poirs?
21:03 geekosaur it's destructuring
21:04 mtj_ joined #perl6
21:05 geekosaur https://docs.perl6.org/language/variables#index-entry-destructuring_assignment
21:09 Zoffix joined #perl6
21:10 ugexe m: sub foo { return {x => 1, y => 2} }; my (%h, $o) = foo; say %h.gist; say $o.gist
21:10 camelia rakudo-moar 7fdbb4: OUTPUT: «{x => 1, y => 2}?(Any)?»
21:10 pharv joined #perl6
21:11 Zoffix That makes $o pointless
21:12 Zoffix m: sub foo { return {x => 1, y => 2}, 42 }; my (%h, $o) = foo; say %h.gist; say $o.gist
21:12 camelia rakudo-moar 7fdbb4: OUTPUT: «Odd number of elements found where hash initializer expected:?Found 5 (implicit) elements:?Last element seen: 42?  in block <unit> at <tmp> line 1??»
21:12 geekosaur ingy, if you check irc logs from about, hm, 14 or 15 hours ago, you'll find where I was explaining the difference between $ and % sigil behavior to jeromelanteri. this is related.
21:12 geekosaur if you use % it captures the whole hash, fi you use $ it destructures the hash
21:12 raiph joined #perl6
21:12 Zoffix m: sub foo { return {x => 1, y => 2}, 42 }; my ($h, $o) = foo; say $h.gist; say $o.gist
21:12 camelia rakudo-moar 7fdbb4: OUTPUT: «{x => 1, y => 2}?42?»
21:13 tinita Zoffix: $o might be pointless in this example, but not in the actual code
21:14 Zoffix tinita: ? hash gets all the values, so it's pointless in that code.
21:14 tinita instead of calling foo, you would call $some-object.foo, and some return only {...}, some might return an additional elememnt
21:14 tinita Zoffix: i see
21:16 tinita Zoffix: i thought you meant the original example
21:16 Zoffix nadim_: the Hash ~~ Hash thing has been fixed.
21:17 Zoffix Skarsnik: zef replaced panda because it had more features and panda had some limitations that weren't easy to fix.
21:22 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/07/31/2017-31-moar-smaller/
21:24 Zoffix ingy: I don't know about "destructuring" people call it. I understand my (...) = ... as simply list assignment. Your Hash.list gives individual pairs which is what you get. You can also use binding, in which case the LHS functions just like signature of a routine (though there are some buggy/NYI bits still), while RHS is a capture. So you could write `sub foo { return {x => 1, y => 2} }; my ($b?, *%o) := foo;
21:24 Zoffix dd [%o, $b]` and %o will be the hash. Unsure of a good way to handle both cases (when $o is given too), without modifying the `return` line
21:27 avalenn joined #perl6
21:30 Zoffix lizmat++ # good weekly
21:31 Zoffix wow, so much new content :o hard to keep up.
21:31 moritz lizmat++ indeed
21:31 lizmat tell me about it :-)
21:34 ingy geekosaur: thanks. this kinda sucks when I have an api that wants 'return $hash-or-array, $optional-hash-of-options;'
21:34 ingy seems like you need to return Nil for the 2nd arg if you don't want to return anything
21:35 ingy the first return value can be any object, so I can't really use %foo, %options
21:35 ingy and $foo, %options still deconstructs
21:36 geekosaur more precisely you probably want Any
21:36 geekosaur instead of Nil
21:36 geekosaur (Nil will work but it's not so much "undef" as "quiet failure")
21:37 geekosaur or maybe Hash depending on how typed you're being
21:37 geekosaur this feels one-arg-rule-ish?
21:37 dct joined #perl6
21:37 ingy I'd rather not put the burden on the returner. I wanted then to 'return $node, $options-hash' or just 'return $node'
21:39 ingy is there a way to write 'my $thing, %options = $callback(...)' and not have it destructure the first arg?
21:40 geekosaur m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo,; say $h.gist; say $o.gist
21:40 camelia rakudo-moar 7fdbb4: OUTPUT: «{x => 1, y => 2}?(Any)?»
21:40 geekosaur note comma
21:41 ingy that works for me
21:41 geekosaur this is from the thing about destructuring assignment I sent earlier
21:41 Zoffix left #perl6
21:41 gfldex m: my &block := { state $n = 0; say $n++; last if $n > 3; }; (0..?).map: &block
21:41 camelia rakudo-moar 7fdbb4: OUTPUT: «0?1?2?3?»
21:45 gfldex m: sub loop(&c){ (0..?).map(&c) }; my &block := { state $n = 0; say $n++; last if $n > 3; }; loop(&block)
21:45 camelia rakudo-moar 7fdbb4: OUTPUT: «0?1?2?3?»
21:46 gfldex TIMTOWTL
21:49 ingy there's more than one way to trick lisp?
21:49 ugexe i like to use the form `state $n += 1 andthen {last if $_ > 3};` if i have to use an explicit state var
21:49 geekosaur ...to lose?
21:49 gfldex loop
21:49 geekosaur (yes, I figured)
21:50 nadim_ m: my  Capture $:wc = (1, :n(1))
21:50 camelia rakudo-moar 7fdbb4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Cannot use placeholder parameter $:wc outside of a sub or block?at <tmp>:1?------> 3my  Capture $:wc7?5 = (1, :n(1))?»
21:52 nadim_ m: my Capture $c = \(1, :n(2)) ; dd $c
21:52 camelia rakudo-moar 7fdbb4: OUTPUT: «Capture $c = \(1, :n(2))?»
21:53 nadim_ m: my Capture $c = \|(1, :n(2)) ; dd $c
21:53 camelia rakudo-moar 7fdbb4: OUTPUT: «Capture $c = \((1, :n(2)))?»
21:54 nadim_ arff! I have a list with value and Pairs, if I try to make a Capture out of it, everything ends up in the Captures's list, ie: the Paires are not named parameters, so I can't use the capture. how does one make a capture out of a list that contains Pairs?
21:59 lizmat nadim_: can't really think of a fast way other than creating a separate list and hash yourself
22:02 nadim_ lizmat: thanksd, that's a bit of a pain. I have tests with multiple arguments that I have in a list, wanted to make a capture to call a method
22:02 jaldhar joined #perl6
22:02 nadim_ it's a pain but works whenn the number of arguments is fixed but I have not found a way for variable arguments
22:02 lizmat I could see a Capture.new-from-iterable existing
22:03 gfldex lizmat: your answer on stackoverflow is incomplete, you need to overload ASSIGN-POS as well
22:03 nadim_ lizmat: I think that would be very useful
22:06 lizmat gfldex: the string is immutable, so what would ASSIGN-POS change ?
22:08 nadim_ is there a way to do my(@pass, @miss) = @list.sorting_grep {conditions} ? where sorting grep returns two list/seq
22:09 gfldex lizmat: it would create a new Str with the char (and following chars) at $pos replaced with the given substring
22:09 nadim_ there is I think but I don't remember the mane
22:09 nadim_ name
22:09 gfldex lizmat: it doesn't make much sense but the OP didn't ask for something sensible
22:10 lizmat gfldex: going to leave it as an exercise to the reader
22:10 ugexe my (@a, @b) := (1..10).classify: { $_ > 1 ?? 'a' !! 'b' }; say @a.perl; say @b.perl
22:10 ugexe m: my (@a, @b) := (1..10).classify: { $_ > 1 ?? 'a' !! 'b' }; say @a.perl; say @b.perl
22:10 camelia rakudo-moar 7fdbb4: OUTPUT: «Too few positionals passed to '<unit>'; expected 2 arguments but got 0?  in block <unit> at <tmp> line 1??»
22:10 gfldex lizmat: maybe you could leave a note that it's left out intentional
22:11 geekosaur nadim_, this is the same question as earlier, only in reverse
22:11 geekosaur m: sub foo { return <a b>, <c d> }; my ($h, $o) = foo; say $h.gist; say $o.gist
22:11 camelia rakudo-moar 7fdbb4: OUTPUT: «(a b)?(c d)?»
22:12 ugexe m: my (:@a, :@b) := (1..10).classify: { $_ > 1 ?? 'a' !! 'b' }; say @a.perl; say @b.perl
22:12 camelia rakudo-moar 7fdbb4: OUTPUT: «[2, 3, 4, 5, 6, 7, 8, 9, 10]?[1]?»
22:12 gfldex lizmat: and link to: https://docs.perl6.org/language/subscripts#Methods_to_implement_for_positional_subscripting
22:14 nadim_ my (:@a, :@b) := (1..10).classify: { $_ > 1 ?? '1' !! '2' }; say @a.perl; say @b.perl
22:14 lizmat gfldex++  # added link
22:14 nadim_ what's the my :@a construct?
22:16 ugexe takes a named param 'a'
22:18 jast joined #perl6
22:19 nadim_ I see, clever
22:19 ugexe m: perl.say for (1..10).classify: { $_ > 1 ?? "a" !! "b" }
22:19 camelia rakudo-moar 7fdbb4: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    perl used at line 1??»
22:19 ugexe m: .perl.say for (1..10).classify: { $_ > 1 ?? "a" !! "b" }
22:19 camelia rakudo-moar 7fdbb4: OUTPUT: «:b($[1])?:a($[2, 3, 4, 5, 6, 7, 8, 9, 10])?»
22:21 joy in a book on perl, i saw this method print(\s) { ... } , what does the \ before s do?
22:23 gfldex joy: see https://docs.perl6.org/language/variables#index-entry-%5C_%28sigilless_variables%29
22:23 joy oh yes! thanks
22:30 mcmillhj joined #perl6
22:37 kerframil joined #perl6
22:43 zengargoyle .tell jeromelanteri nicqrocks applied the pull-requests and Git::Wraper:ver<0.0.8> fixes the precomp thing.  you don't *have* to use your own patched copy anymore.
22:43 yoleaux zengargoyle: I'll pass your message to jeromelanteri.
22:44 zengargoyle .tell jeromelanteri and perlpilot confirms that the nicqrocks fork that's in the ecosystem is the one that should be used.
22:44 yoleaux zengargoyle: I'll pass your message to jeromelanteri.
22:45 Cabanossi joined #perl6
22:46 mcmillhj joined #perl6
23:02 mcmillhj joined #perl6
23:09 BenGoldberg joined #perl6
23:14 Geth ¦ whateverable/master: 18 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++
23:14 Geth ¦ whateverable/master: review: https://github.com/perl6/whateverable/compare/0301ef4bd2...f23f6ce2b4
23:14 AlexDaniel 18 commits \o/
23:15 Cabanossi joined #perl6
23:16 Geth ¦ whateverable: 3891214543 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/quotable.t
23:16 Geth ¦ whateverable: Tests for Quotable
23:16 Geth ¦ whateverable:
23:16 Geth ¦ whateverable: Issue #124 can now be closed. TODO-ed tests for #192 were also added.
23:16 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/3891214543
23:16 https_GK1wmSU joined #perl6
23:18 mcmillhj joined #perl6
23:19 https_GK1wmSU left #perl6
23:25 AlexDaniel poof!
23:25 lizmat oh noes!
23:28 nicq20 joined #perl6
23:29 bisectable6 joined #perl6
23:29 quotable6 joined #perl6
23:29 committable6 joined #perl6
23:29 evalable6 joined #perl6
23:29 coverable6 joined #perl6
23:29 greppable6 joined #perl6
23:29 unicodable6 joined #perl6
23:29 bloatable6 joined #perl6
23:29 benchable6 joined #perl6
23:29 statisfiable6 joined #perl6
23:34 mcmillhj joined #perl6
23:34 nicq20 left #perl6
23:49 mcmillhj joined #perl6
23:51 sivoais joined #perl6
23:56 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo