»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:01
bwisti joined
|
|||
Geth | doc: 2e71131a7d | (Will "Coke" Coleda)++ | 2 files Test examples in doc/language/testing.pod6 Part of #1387 |
00:13 | |
00:25
Hotkeys left
00:28
sjn left
00:29
sjn joined
00:30
nadim left
00:48
lookatme joined
|
|||
lookatme | morning | 00:48 | |
00:54
deep-book-gk joined
00:57
deep-book-gk left
00:58
bwisti left,
Cabanossi left
00:59
bwisti joined
01:01
Cabanossi joined
01:26
BenGoldberg joined
|
|||
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? | ||
30 Jul 2017 21:56Z <zengargoyle> jeromelanteri: or you could email me zengargoyle at gmail.com if my_pl6.yml is sensitive data.... | |||
Geth | doc: ceec98b52e | (Will "Coke" Coleda)++ | 2 files Test Perl 6 code in ruby nutshell doc. Found several issues in the P6 code. Part of #1387 |
01:29 | |
01:47
ilbot3 left
01:51
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:56
stmuk joined
01:59
stmuk_ left
|
|||
mspo | is there a way to print out the site dir's path? | 01:59 | |
[Coke] | the site? | 02:04 | |
02:06
lookatme left
|
|||
mspo | as in the part of the $*REPO.repo-chain | 02:09 | |
that is global | |||
[Coke] | m: say $*REPO.repo-chain[0].writeable-path.say | 02:14 | |
camelia | "/home/camelia/.perl6".IO True |
||
[Coke] | (one too many says) | 02:15 | |
m: .writeable-path.say for $*REPO.repo-chain | |||
camelia | "/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… |
||
mspo | m: say CompUnit::RepositoryRegistry.repository-for-name("site") | 02:16 | |
camelia | inst#/home/camelia/rakudo-m-inst-1/share/perl6/site | ||
mspo | that's what I wanted | ||
well sort of | 02:22 | ||
02:30
lookatme joined
|
|||
lookatme | ugexe, are you in around | 02:32 | |
mspo | I'm trying to install zef into a DESTDIR | 02:39 | |
and not just sed that repository-for-name("site") call :) | |||
02:45
joy joined
|
|||
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:46 | |
lookatme | let x = do if | 02:47 | |
m: my $x = do if 1 { 1 } else { 2 }; say $x; | |||
camelia | 1 | ||
lookatme | joy, ^^ | ||
joy | lookatme: thank you much | 02:48 | |
lookatme | welcome | 02:49 | |
joy | kind of like 'do' converts the statement into an expression | ||
by wrapping inside a block | |||
02:53
noganex joined
02:56
noganex_ left
03:08
pharv joined
03:20
R0b0t1 left
03:23
geekosaur left
03:25
geekosaur joined,
geekosaur left
03:27
geekosaur joined
03:28
geekosaur left
03:29
Cabanossi left,
jast left,
R0b0t1 joined,
jast joined
03:30
geekosaur joined,
Cabanossi joined
03:31
cibs joined
|
|||
jeromelanteri | what is the diference between associative hash and hash ? | 03:36 | |
03:37
R0b0t1 left
|
|||
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 | ||
jeromelanteri | and get error Type check failed | ||
geekosaur | and Hash %f doesn['t mean what you think | ||
"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 | ||
geekosaur | % already does what you want | ||
jeromelanteri | geekosaur, so... how do you just define a Hash ? | ||
or better... how do you said you want a Hash as argument ? instead of "associative Hash ? | 03:40 | ||
(define the constraint of argument...) | 03:41 | ||
geekosaur | do you really need to exclude other things that do Associative? | ||
jeromelanteri | geekosaur, i asked you what i would like to do | ||
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 | ||
type constraint | |||
m: my %hash = a => 1, b => 2; sub f(Hash $f) { say $f; }(%hash); | 03:43 | ||
camelia | {a => 1, b => 2} | ||
jeromelanteri | geekosaur, ok... so when i do my $string; f($string); sub f(Str $s is required) {} | ||
lookatme | jeromelanteri, ^^ | ||
geekosaur | m: sub f(Hash $f) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a) | ||
camelia | 3 | ||
jeromelanteri | it works... so i definitly not well understand what it mean. | ||
i try to make the logic link... | 03:44 | ||
lookatme | jeromelanteri, you can read the Signature document | ||
geekosaur | note $ instead of % | ||
`sometype %v` means an Associative whose values are of type sometype | |||
jeromelanteri | let me time to try to understand, it still confuse for me... there is two things who make me opposit sens | ||
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 ? | ||
geekosaur, why ? | 03:46 | ||
geekosaur | because generally you want to say the type of the thing stored in it | ||
jeromelanteri | geekosaur, sure it is confusing because it is not logic | ||
geekosaur | if you say Str %h, you mean a Hash containing Str | ||
jeromelanteri | geekosaur, sure... why not make things like: just add a char designed for that in front ? | ||
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! | ||
you are saying its *result* is a Str | |||
jeromelanteri | sure | ||
geekosaur | if you say Str @a, you mean an array OF Str | ||
jeromelanteri | like in C++ | ||
ho ok | |||
understand better | |||
i thank that: $x is a string | 03:48 | ||
lookatme | docs.perl6.org/type/Signature#Type_Constraints | ||
jeromelanteri | lookatme, i read it allready. | ||
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 | ||
then you access with $f<a> or whatever | |||
jeromelanteri | ok | ||
lookatme | It's an Perl6 way, anyway | ||
geekosaur | note $ instead of % | ||
er | |||
m: sub f(Hash $f) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a) | 03:49 | ||
camelia | 3 | ||
lookatme | have lunch now | ||
jeromelanteri | ok, so %x is not a hash ? | ||
geekosaur | it defaults to Hash | ||
jeromelanteri | lookatme, good lunch | ||
geekosaur | it could also be Set, Bag, Mix, or various other things that do the Associative role | ||
jeromelanteri | geekosaur, and it can be an other one loaded ? | ||
ok | |||
geekosaur, that make me understand better would be many examples in the doc... i have sometimes difficulties with words | 03:50 | ||
thank you | |||
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:51 | ||
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 | |
03:52
wamba joined
|
|||
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) | ||
geekosaur, yes | |||
03:53
wobray joined
|
|||
jeromelanteri | geekosaur, ok then... i resume: in my function, i have to define constraint like: Hash $x is required | 03:54 | |
03:54
wobray left
|
|||
jeromelanteri | then i can call f(%failed) ? | 03:54 | |
geekosaur | yes | ||
jeromelanteri | well, thank you (it makes me very strange by the way) | ||
geekosaur | m: sub f(Hash $f is required) { say $f<a> }; my %a = :3a, :2b, :5c; f(%a) | ||
camelia | 3 | ||
jeromelanteri | veru strange... | 03:55 | |
yes so sure, inside function, i use $ instead of % | |||
geekosaur | because you declared it with $, yes | 03:56 | |
jeromelanteri | and same when use loop for ? my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> %x {...} | 03:57 | |
or for @group -> $x {} | |||
? | 03:58 | ||
i try some test on perl6 editor... | |||
geekosaur | m: my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> %x { dd %x } | 04:01 | |
camelia | Hash % = {:a("b"), :b("c")} Hash % = {:a("d"), :b("nawak")} |
||
geekosaur | m: my @group =( {a=> "b", b=> "c"}, {a=>"d", b=> "nawak"}); for @group -> $x { dd $x } | ||
camelia | Hash $x = ${:a("b"), :b("c")} Hash $x = ${:a("d"), :b("nawak")} |
||
jeromelanteri | geekosaur, it works for together | ||
(crying) | |||
geekosaur | they both work; % is a bit more idiomatic | ||
there are subtle differences between the two but much of the time it doesn't matter | |||
jeromelanteri | so perl6 make interpretation for this situation... | 04:02 | |
(rakudo) | |||
geekosaur | in partiuclar using the % form lets you talk about the types of keys and values, but $ only lets you talk about the Hash | ||
which is what you ran into with the sub declaration | |||
jeromelanteri | yes | ||
04:02
skids left
|
|||
jeromelanteri | in which kind of situation it does matter ? | 04:03 | |
(an example ?) | |||
and same when use loop for ? my @group =( ${a=> "b", b=> "c"}, ${a=>"d", b=> "nawak"}); for @group -> %x {...} | 04:04 | ||
maybe ? | |||
geekosaur | same there, yes | ||
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 | ||
jeromelanteri | so here only -> $x shoudl works ? | ||
geekosaur | with % you get somewhat better type checking from the compiler | ||
jeromelanteri | ok | ||
geekosaur | and more ability to specify the types within the container | 04:06 | |
if you don't need that, you can use either one. | |||
jeromelanteri | what is the best practice convention to use ? | ||
geekosaur | but perl 6 is more likely to catch a mistake if you use the % | ||
jeromelanteri | sure | ||
so best practice is to go closer to the real content type | |||
(i think also interpretation time by rakudo is a loosing time) | 04:07 | ||
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 ? | ||
geekosaur | there can be, depending on how complex the function is | ||
jeromelanteri | ok | ||
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 | |
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 ... | |||
jeromelanteri | taht seems clear for me now | 04:10 | |
that | 04:11 | ||
thank you geekosaur | |||
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 | ||
priorities | |||
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 | ||
jeromelanteri | geekosaur, yes | ||
geekosaur | generally one uses classes for that. (sort of like C++, where a struct is just a class with all public members) | ||
jeromelanteri | ok | 04:14 | |
04:16
R0b0t1 joined
|
|||
jeromelanteri | geekosaur, actually, define function with Hash $failed or with %failed provide the same error of associative Hash and hash (${}) | 04:17 | |
geekosaur | can you put the actual code and full error on a pastebin somewhere? | 04:18 | |
jeromelanteri | geekosaur, yes | ||
gist.github.com/jerome-diver/93471...22fdc3ecd9 | 04:20 | ||
geekosaur | ok, the error says that it's not this file that is at fault | 04:22 | |
jeromelanteri | geekosaur, o f... yes... | ||
geekosaur | what is line 54 of check/Check.pm6? | 04:23 | |
jeromelanteri | geekosaur, that's ok, same problem was Hash %things instead of %things | 04:24 | |
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 | ||
jeromelanteri | by "associative", it is like "reference to" ? | 04:26 | |
no... it can also be referenced to an associative role | 04:27 | ||
it is a role | |||
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. | ||
there is also Positional, which is things like Array, List (read-only array), etc. that are indexed by position | |||
jeromelanteri | a kind of special reference with more meta inforamtion about the nature of reference ? | 04:28 | |
04:28
Cabanossi left
|
|||
geekosaur | something like that | 04:28 | |
jeromelanteri | ok. | ||
geekosaur | they can all be thought of as custom Hashes | ||
jeromelanteri | i think it ias the way for functionnal programmation (that is something nex for me) | 04:29 | |
new | |||
04:30
Cabanossi joined
04:33
mr-foobar left
04:38
mr-foobar joined
|
|||
lookatme | Anyway there some document explain this | 04:50 | |
In docs.perl6.org/type/Associative : The % sigil restricts variables to objects that do Associative. | 04:51 | ||
m: my %x := Set(1, 2, 3); say %x.WHAT; | |||
camelia | (Set) | ||
lookatme | m: my %x := 1; say %x.WHAT; | ||
camelia | Type check failed in binding; expected Associative but got Int (1) in block <unit> at <tmp> line 1 |
||
lookatme | I would be guess, the @ sigil restricts variable to objects that do Positional | 04:53 | |
and the $ is for every objects | |||
jeromelanteri, ^^ | |||
In signature, the type constraint, for % and @ is a little different from $ | 04:55 | ||
jeromelanteri | ok... thank you. what is := vs = ? | ||
lookatme, my turn to go at lunch now.. | 04:56 | ||
lookatme | OK, good lunch | ||
05:00
mint_ joined
|
|||
mint_ | hi | 05:00 | |
05:01
mint_ left
05:02
link_k joined
|
|||
lookatme | hi :??? | 05:02 | |
link_k | hi | ||
somebody cares for giving me a quick intro to perl? | 05:03 | ||
i give gratitude back | |||
05:09
xtreak joined
05:11
pharv left
05:17
GK1wmSU joined
|
|||
lookatme | learnxinyminutes.com/docs/perl6/ link_k | 05:19 | |
like this ? | |||
05:20
GK1wmSU left
05:31
_GK1wmSU joined
|
|||
link_k | lookatme, it seems like that link shows me the grammar of perl. i was curious to know about the philosophy, mentality of perl.. | 05:32 | |
does it makes sense? | |||
05:33
_GK1wmSU left
05:34
konsolebox left
|
|||
geekosaur | philosophy is best gleaned from the apocalypses etc. design,perl6.org | 05:34 | |
(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:35 | ||
05:39
BenGoldberg left
05:47
konsolebox joined
05:54
xtreak left,
xtreak joined
05:55
zakame joined,
xtreak left
05:56
xtreak joined,
konsolebox left
06:00
wamba left
06:02
lowbro joined,
lowbro left,
lowbro joined
06:04
zakame left
06:11
nadim joined
06:27
nadim left
06:37
rindolf joined
06:40
tzekid joined
06:41
darutoko joined
06:43
Cabanossi left
06:45
Cabanossi joined
06:46
zakame joined
06:50
robertle left
06:54
nadim joined
07:00
faraco joined
|
|||
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 :/ | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: hello used at line 1. Did you mean 'shell'? |
||
07:02
link_k left
|
|||
faraco | m: my @foo = <cow dog>; my ($moo, $woof) = @foo; say $moo ~ " " ~ $woof | 07:03 | |
camelia | cow dog | ||
07:04
espadrine joined
07:05
jonas1 joined
07:12
wamba joined
07:16
jast left
07:17
jast joined
07:29
faraco is now known as __defparse
07:45
zakharyas joined
07:46
wamba left
|
|||
lookatme | :/ | 07:47 | |
07:50
__defparse left
|
|||
AlexWithFootgun | ? :) | 08:04 | |
08:06
dakkar joined
08:11
xtreak left
|
|||
lookatme | I create an app: github.com/araraloren/perl6-app-snippet | 08:11 | |
It is working when I run with `perl6 -Ilib ./bin/snippet` | 08:12 | ||
But when install with zef | |||
It failed with: Circular module loading detected trying to precompile | |||
08:13
rindolf left
|
|||
lookatme | Anyone can give me a hand . :) | 08:13 | |
08:14
xtreak joined
|
|||
lookatme | Appreciate for the help. | 08:14 | |
08:18
vendethiel- joined,
zakame left
08:19
ChoHag joined,
vendethiel left
08:21
zakame joined
|
|||
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:30 | |
lookatme | zengargoyle, add -Ilib | 08:31 | |
I mean run it without not install | |||
perl6 -Ilib ./bin/snippet | |||
zengargoyle, you install it ? not have exception ? What's your zef version | 08:32 | ||
zengargoyle | i believe it looks mostly the same. | ||
zef:ver<0.1.26>:auth<github:ugexe>:api<> | 08:33 | ||
lookatme | zef info zef | 08:34 | |
zengargoyle | ^^ 0.1.26 | ||
lookatme | In perl6-app-snippet directory, is `perl6 -Ilib ./bin/snippet` working fine? | 08:35 | |
Hmm, it will print Usage | |||
zengargoyle | gist.github.com/080979ef2f763e6d7b...a3243a502f | 08:36 | |
lookatme | Yeah, it is working | 08:37 | |
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 | |
for various definiton of OK :) | |||
lookatme | OK, I update my zef first | ||
zengargoyle | and maybe dependencies? i didn't have many of the dependencies already installed. | ||
lookatme | I install all dependencies, maybe I should update them ? | 08:39 | |
08:40
nadim left,
nadim_ joined
08:44
Cabanossi left
|
|||
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:44 | |
08:45
Cabanossi joined
|
|||
lookatme | buggable: depend | 08:47 | |
:| | 08:48 | ||
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 | |
08:50
araujo joined
|
|||
zengargoyle | seems with CUR that could be like magical and go all the way down the dependency tree. | 08:50 | |
lookatme | zengargoyle, It also throw an exception : gist.github.com/araraloren/c36fd27...03ef3e4a94 | 08:51 | |
s/also/still/ | |||
08:52
robertle joined
08:53
bjz joined
|
|||
lookatme | That file which precompile failed is Interface/C.pm6 | 08:54 | |
zengargoyle | `ZEF_PLUGIN_DEBUG=1 zef --debug install .` | ||
for more information that somebody might find useful. | 08:55 | ||
08:56
wamba joined
|
|||
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:56 | |
lookatme | gist.github.com/araraloren/c36fd27...03ef3e4a94 | 08:58 | |
I manual install from source: This is Rakudo version 2017.07 built on MoarVM version 2017.07 | 08:59 | ||
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 | ||
ugexe, are you in around ?? :) | 09:02 | ||
09:04
twee joined
|
|||
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:07 | |
lookatme | It should be our $*d, I think? | 09:10 | |
or guess . | |||
09:12
twee left
09:14
robertle left,
robertle joined,
Cabanossi left
09:15
Cabanossi joined
09:17
rindolf joined,
gregf_ joined
|
|||
nadim_ | I tried that too :) | 09:20 | |
09:21
vendethiel joined
|
|||
nadim_ | 'my' also worked fine in a simpler example | 09:21 | |
09:23
vendethiel- left
|
|||
lookatme | m: module A { my $*d = 0; }; import A; say ::.keys.grep("\$*d") | 09:24 | |
camelia | () | ||
lookatme | m: module A { our $*d = 0; }; import A; say ::.keys.grep("\$*d") | ||
camelia | () | ||
lookatme | m: module A { our $*d is export = 0; }; import A; say ::.keys.grep("\$*d") | ||
camelia | ($*d) | ||
lookatme | IDK.. | ||
09:25
cpage_ joined
09:34
bjz left,
lookatme left
09:36
xtreak left,
xtreak joined
|
|||
zengargoyle | m: sub foo { say $OUTER::x }; my $x = "foo"; foo(); | 09:38 | |
camelia | foo | ||
zengargoyle | m: sub foo { say $UNIT::x }; my $x = "foo"; foo(); | 09:39 | |
camelia | foo | ||
09:40
xtreak left
09:43
Cabanossi left
09:45
nadim_ left,
Cabanossi joined
09:47
ufobat joined
|
|||
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:48 | |
09:54
nadim_ joined,
mr-fooba_ joined
09:55
mr-foobar left
|
|||
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 | |
nopaste.linux-dev.org/?1160213 | |||
timotimo | yeah, that's a compiler explosion that shouldn't happen | 10:00 | |
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 | |
10:01
vendethiel- joined
|
|||
nadim_ | I'll report the explosion too | 10:01 | |
10:03
vendethiel left
|
|||
timotimo | strange, it should Just Work | 10:04 | |
anyway, it's surprising but the space after the A is to blame, i believe | |||
the code expects if there's something after the module name that there has to be an expression | 10:05 | ||
but it can be an empty arglist, too | |||
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 | |||
nadim_ | Good to know that it is analysed before I even finished reporting it ;) | 10:06 | |
timotimo | will be fixed in a minute | 10:07 | |
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 | |||
nadim_ | that's fast 3 mn form finding an error, rporting it, analysing it, to fixing it. | 10:08 | |
timotimo | Undeclared routine: | ||
xxx used at line 22 | |||
nadim_ | that would give me an incentive to build a new version. | ||
timotimo | that's what it does now | ||
nadim_ | sounds much better | ||
timotimo++ | 10:09 | ||
timotimo | committed | ||
nadim_ | timotimo: I'd appreciate some help on the $*var error I reported above | ||
timotimo | github.com/rakudo/rakudo/commit/3e078d4d47 | ||
yep, can i already download the code off of github? | 10:10 | ||
10:11
xtreak joined
|
|||
nadim_ | It's compiling here | 10:11 | |
timotimo | the $*var related code | ||
nadim_ | let me fix a branch for you | ||
10:15
rindolf left
|
|||
nadim_ | timotimo: Meh! fixed in the latest rakudo | 10:20 | |
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:21 | ||
timotimo | oh | 10:22 | |
still, i wonder how that happened | |||
dynamic variables are a very important part of the compiler itself | |||
if they are broken in some way, the compiler would completely fall apart | 10:23 | ||
nadim_ | I can still upload the branch | ||
the version I had before was 136 commit behind | |||
10:26
zakame left
10:28
zakame joined
10:34
vendethiel joined
10:35
vendethiel- left
10:39
TEttinger left
|
|||
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" | 10:58 | |
11:01
kerframil joined,
jast left
|
|||
nadim_ | reported it to the module's github too | 11:02 | |
11:02
jast joined
11:03
andrzejku joined
11:04
andrzejku_ left
11:09
zakharyas left
|
|||
timotimo | it breaks in the same way for me | 11:20 | |
11:26
nattefrost joined
11:27
bjz joined
11:29
ggoebel left
|
|||
nadim_ | thank you. do you know if J Stowe is here and what nick he has? | 11:34 | |
lizmat | rabidgravy | 11:35 | |
timotimo | he's been away from the community for a while now and i miss him :S | ||
11:35
zakame left
11:36
bloatable6 left
|
|||
timotimo | iiuc he was put off by how module- and license-related stuff was handled? | 11:36 | |
nadim_ | that's a pity | 11:39 | |
11:41
zakame joined
11:44
Cabanossi left
11:45
Cabanossi joined
11:46
rindolf joined
|
|||
El_Che | I didn't know that :( | 11:54 | |
I see twitter post from him once in a while | |||
timotimo | right, i see his tweets, too | 11:55 | |
Geth | doc: 39a460a30d | (Will "Coke" Coleda)++ | doc/Language/rb-nutshell.pod6 missing =end directive |
11:59 | |
11:59
Matthew[m] left
12:00
mienaikage left,
wictory[m] left,
tyil[m] left,
ilmari[m] left,
tadzik left,
M-Illandan left,
CIAvash[m] left
12:01
xui_nya[m] left,
mack[m] left,
unclechu left
|
|||
nadim_ | Maybe we should just tell him he is missed and we would like to see him back. | 12:02 | |
El_Che | send him a phisical card from tpcia | 12:03 | |
ilmari | he works down the hall from me, actually | ||
12:04
rindolf left
12:09
ChoHag left
12:10
faraco joined
|
|||
faraco | m: say "hi"x32 | 12:11 | |
camelia | 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 … |
||
faraco | m: say "hi"*32 | 12:12 | |
camelia | 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 |
||
faraco | m: sub cat_a_string (Str $input --> Str) { return "$input" ~ "z"; } say cat_a_string("world"); | 12:15 | |
camelia | 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 … |
||
faraco | sub cat_a_string (Str:D --> Str) { return $x ~ "z"; } say cat_a_string "heh" | 12:23 | |
m: sub cat_a_string (Str:D --> Str) { return $x ~ "z"; } say cat_a_string "heh" | |||
camelia | 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" |
||
faraco | m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z"; } say cat_a_string "heh" | 12:24 | |
camelia | 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… |
||
faraco | m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z" } say cat_a_string "heh" | ||
camelia | 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
|
|||
faraco | m: sub cat_a_string (Str:D $x --> Str) { return $x ~ "z" }; say cat_a_string "heh" | 12:25 | |
camelia | hehz | ||
12:27
zakame left
|
|||
faraco | hmm, does rakudo lang by default type checked even if you not declaring the data type of the variables? | 12:27 | |
lizmat | faraco: type checks *always* happen | 12:29 | |
if you don't specify a type, the default is Any | |||
12:29
bjz_ joined
|
|||
lizmat | (in most case) | 12:29 | |
*s | |||
faraco | oh...well, I learnt something new today. | ||
thanks | 12:30 | ||
araraloren | I create an app: github.com/araraloren/perl6-app-snippet | 12:31 | |
12:31
bjz left
|
|||
araraloren | There some problem when I use zef install it | 12:31 | |
The exception: gist.github.com/araraloren/c36fd27...03ef3e4a94 | |||
Anyone have suggestion ? :/ | 12:41 | ||
moritz | araraloren: have you run Test::META over your meta files? | 12:42 | |
12:43
konsolebox joined
|
|||
araraloren | No | 12:45 | |
moritz | try that first please | ||
12:46
sufrostico joined
|
|||
faraco | m: my @pets = <cat dog rabbit>; say map { "I got $_ as pet at home" }, @pets; | 12:46 | |
camelia | (I got cat as pet at home I got dog as pet at home I got rabbit as pet at home) | ||
faraco | m: my @pets = <10 20 30>; say map { $_ * 2 }, @pets; | 12:47 | |
camelia | (20 40 60) | ||
faraco | I see that in 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. | ||
araraloren | I copy the test here: github.com/jonathanstowe/Test-META/#synopsis | ||
faraco | oh yeah, let me try with method style. | ||
araraloren | It's no problem, moritz | ||
[Coke] | Note that there are method examples in the "routine map" section, fwiw. | 12:49 | |
faraco | oh nevermind then | ||
thanks | |||
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
|
|||
[Coke] | the docs could also use review, no doubt. :) | 12:55 | |
12:56
rindolf joined
|
|||
[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. | 12:58 | |
12:58
xtreak left
12:59
Cabanossi left
13:01
Cabanossi joined,
mcmillhj joined
13:04
ggoebel joined
13:10
zakharyas joined
13:15
andrzejku_ joined
13:17
andrzejku left
13:20
andrzejku joined,
andrzejku_ left
|
|||
faraco | [Coke]: you mean like this? - my &add = -> $n, $m { $n + $m }; # Perl 6 addition function | 13:26 | |
13:26
nicq20 joined
|
|||
faraco | I'm thinking on trying | 13:26 | |
m: my &add = sub ($n, $m) { $n + $m }; say &add(2, 3); | |||
camelia | 5 | ||
faraco | not sure if that idiomatic Perl 6 | ||
or, Rakudo language :P | 13:27 | ||
13:27
skids joined
|
|||
jnthn | It's a long way to write my &add = &infix:<+> | 13:28 | |
Which is a long way to write my &add = &[+] | 13:29 | ||
mspo | can somoeone help me figure out what this means? Serialization Error: missing static code ref for closure 'BUILD' | 13:31 | |
13:33
andrzejku_ joined
13:34
andrzejku left
|
|||
[Coke] | there's a huge difference between "idiomatic" and "can't compile" | 13:34 | |
er, "not idiomatic". | |||
I just made sure what was there was at least compilable. bare minimum. | |||
faraco | oh, I thought you idiomatic by " the examples of Perl 6 had leftover ruby-isms that hadn't been converted" | 13:35 | |
meant* | |||
[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:36 | |
faraco | I see | 13:37 | |
13:40
zakame joined
|
|||
araraloren | jnthn, do you have time help me figure out my module problem ? | 13:41 | |
13:44
popov_ joined
13:46
rindolf left
13:48
jaldhar_ left
13:49
jaldhar_ joined
13:51
itaipu joined
|
|||
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:52 | |
araraloren | jnthn, but why it is working when I run "perl6 -Ilib ./bin/snippet" in project directory | 13:53 | |
nadim_ | ilmari: then go tell him in person please. I did write a little messaage in the bug report I added this morning. | 13:54 | |
13:54
wamba left
|
|||
timotimo | araraloren: have you considered that one env var that gives you module loading debug output? | 13:55 | |
araraloren | timotimo, such as ? | 13:56 | |
you mean I make some debug output in my module ? | |||
13:56
cdg joined
13:58
Cabanossi left
|
|||
timotimo | no | 13:58 | |
set RAKUDO_MODULE_DEBUG to a non-zero value | 13:59 | ||
in the environment | |||
14:00
Cabanossi joined
14:01
LeCamarade left
14:02
LeCamarade joined
|
|||
araraloren | ok | 14:06 | |
timotimo, thanks | |||
14:06
rindolf joined
|
|||
Geth | doc: 9125507a4c | (Elizabeth Mattijsen)++ | doc/Language/control.pod6 Fix spello, spotted by brian d foy++ |
14:09 | |
14:11
ChoHag joined
|
|||
araraloren | timotimo, too many debug output. What should I pay attention to ? | 14:11 | |
14:17
Aaronepower joined,
khw joined
14:21
itaipu left
14:29
itaipu joined
|
|||
araraloren | I found the problem, thanks jnthn timotimo and zengargoyle | 14:29 | |
I make a mistake of module file name in provides of META. | 14:30 | ||
14:37
tadzik joined
14:49
itaipu left,
itaipu joined
14:52
xtreak joined,
jaldhar_ left,
jaldhar joined
14:58
sufrostico left
14:59
bjz_ left
15:01
sufrostico joined
15:02
Matthew[m] joined,
mack[m] joined,
ilmari[m] joined,
M-Illandan joined,
tyil[m] joined,
CIAvash[m] joined,
unclechu joined,
wictory[m] joined,
mienaikage joined,
xui_nya[m] joined
15:04
lowbro left,
Skarsnik joined
|
|||
Skarsnik | Hello | 15:05 | |
araraloren | Skarsnik, hi | ||
faraco | hi | 15:06 | |
15:11
sufrostico left
|
|||
ingy | how do I determine if an object is an instance of a user defined class? | 15:15 | |
moritz | $obj ~~ TheClass | ||
or are you talking about *any* user-defined class? | |||
then the answer is: we intentionally don't make a strict distinction between built-in and user-defined classes | 15:16 | ||
ingy | *any* | ||
how do I determine if a value is a class? | |||
moritz | as opposed to a role? or an instance? or what are you interested in? | 15:17 | |
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 | ||
camelia | False True True |
||
moritz | hm, that probably considers Positional a class due to auto-punning | ||
15:23
epony left
15:24
epony joined
15:27
zakharyas left,
sufrostico joined
|
|||
ingy | thanks | 15:29 | |
15:30
faraco left
15:31
MasterDuke joined
|
|||
ingy | that seems a little... uh, not so elegant. | 15:36 | |
but I guess it's not a common need | 15:38 | ||
Geth | ecosystem: c8c50062b9 | loren++ (committed using GitHub Web editor) | META.list add App::snippet an app run C/C++ or other language snippet code |
15:39 | |
araraloren | :) | 15:40 | |
15:40
popov_ left
|
|||
ingy | m: say Perl6::Metamodel::ClassHOW.^methods | 15:43 | |
camelia | Could not find symbol '&ClassHOW' in block <unit> at <tmp> line 1 |
||
ingy | m: use Perl6::Metamodel::ClassHOW; say Perl6::Metamodel::ClassHOW.^methods | 15:44 | |
camelia | ===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… |
||
ingy | m: say Metamodel::ClassHOW.^methods | ||
camelia | (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,
faraco left,
faraco joined,
eliasr joined
|
|||
ingy | locally that give me: No such method 'gist' for invocant of type 'NQPRoutine' | 15:47 | |
This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda | 15:48 | ||
araraloren | m: say 1.HOW; say 1.HOW.^methods; | 15:50 | |
camelia | 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… |
||
ingy | araraloren: I get same error here with that | 15:52 | |
araraloren | ingy, what error ? | 15:54 | |
such as Perl6::Metamodel::HOW is an implementation class of Perl6. | |||
15:54
jonas1 left
|
|||
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' | ||
araraloren | What are you running ? | 15:55 | |
the code | |||
ingy | say 1.HOW; say 1.HOW.^methods; | ||
evalable6 | Perl6::Metamodel::ClassHOW.new (archetypes new new_type add_fallback compose roles role_ty… |
||
ingy, Full output: gist.github.com/cc34a4cadb725eedd4...7ba0f9c44d | |||
araraloren | What's your perl6 version ? | ||
perl6 -v | |||
ingy | 11:48:04 ingy | This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda | 15:56 | |
its all 10 lines up | |||
araraloren | The last version is 2017.07 | 15:57 | |
ingy, you can update your rakudo version, follow this : github.com/nxadm/rakudo-pkg/releases | |||
15:58
MasterDuke left
|
|||
ingy | I'll turn it off and back on again | 15:58 | |
15:58
xtreak left
|
|||
araraloren | I gotta sleep now | 15:59 | |
you can ask other people, bye | |||
15:59
araraloren left
16:03
faraco left
16:04
perlpilot joined
16:14
wamba joined,
cdg_ joined
16:16
cdg left
|
|||
[Coke] | mst: any idea where to report that strawberryperl.com is missing? (looks like DNS vanished) | 16:16 | |
(oh, maybe tpf slack) | 16:17 | ||
mst | might be worth a try | ||
also ask #p5p on irc.perl.org | 16:18 | ||
16:19
robertle left
16:24
wamba left,
wamba joined
16:27
faraco joined
|
|||
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:28 | |
here is my code - pastebin.com/BuXvUKN3 | 16:30 | ||
I have similar script in Perl 5 working just fine, and I launched the program with perl6 -Ilib script.p6 | 16:31 | ||
but it doesn't work. | |||
ilmari | faraco: did you install Pong.pm into the right perl5's @INC? | 16:32 | |
use lib:from<Perl5> 'lib'; | |||
if it's in ./lib/ | |||
faraco | I thought calling perl6 -Ilib is sufficient for that. | ||
ilmari | no, that only affects perl6's module path | ||
faraco | ah, I see. Thanks for the explanation. :) | 16:33 | |
ilmari++ | |||
ilmari | see the fourth example under github.com/niner/Inline-Perl5#load...l-5-module | ||
faraco | I should read the doc carefully next time. | ||
16:51
dwimmy joined
|
|||
dwimmy | How do search the logs of this channel? Tried site search on Google but without success. | 16:52 | |
16:54
nadim_ left
|
|||
faraco | irclog.perlgeek.de/perl6/ | 16:54 | |
how about that? | |||
dwimmy | Correction, site search failed on colabti.org/irclogger/irclogger_logs/perl6 | 16:55 | |
But works on irclog.perlgeek.de. Thanks for the tip!! | 16:56 | ||
faraco | np :) | 16:57 | |
16:59
majensen joined
17:03
majensen left
17:06
robertle joined,
CacoS joined
17:21
brimonk joined
17:22
kerframil left
|
|||
[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:26 | |
moritz | m: my @a = a => 1, b => 2; for @a -> (:$key, :$value) { say "$key=$value" } | 17:28 | |
camelia | a=1 b=2 |
||
moritz | [Coke]: ^^ | ||
[Coke] | ah, have to use the actual attribute names. Danke. | 17:31 | |
17:35
raschipi joined,
dakkar left
|
|||
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 | Type check failed in binding to parameter '<anon>'; expected Positional but got Pair (:a(1)) in block <unit> at <tmp> line 1 |
||
17:45
dwimmy left
17:51
nadim_ joined
|
|||
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? | ||
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
itaipu left
|
|||
perlpilot | zengargoyle: github.com/perl6/ecosystem/blob/ma....list#L253 :-) | 17:52 | |
faraco | m: say <hello cat> | 17:55 | |
camelia | (hello cat) | ||
faraco | m: say <hello cat>.comb | 17:56 | |
camelia | (h e l l o c a t) | ||
faraco | m: say.words.comb | ||
camelia | 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 --… |
||
faraco | m: say <hello cat>.words.comb | ||
camelia | (h e l l o c a t) | ||
17:58
faraco left,
itaipu joined
|
|||
b2gills | m: my @a = a => 1, b => 2; for @a -> (:key($l), :value($r)) { say "$l=$r" } | 18:00 | |
camelia | a=1 b=2 |
||
perlpilot | ah. I think I knew that at some point, but totally forgot. | 18:01 | |
b2gills | unfortunately doesn't work with :key(\k) | ||
18:03
cdg_ left,
raschipi left
18:04
TEttinger joined
18:05
k-man left
18:06
itaipu left
18:16
mcmillhj left
18:17
mcmillhj joined
18:22
ChoHag left
18:27
st_elmo joined
18:32
https_GK1wmSU joined
18:33
setty1 joined,
k-man joined,
https_GK1wmSU left
|
|||
AlexWithFootgun | m: my @a = a => 1, b => 2; for @a».kv -> ($l, $r) { say "$l=$r" } | 18:49 | |
camelia | a=1 b=2 |
||
AlexWithFootgun | this is a little bit shorter I guess? | ||
it is also faster, for some reason | 18:50 | ||
quite noticeably | 18:52 | ||
m: my @a = a => 1, b => 2; for @a».kv { say "$^l=$^r" } | 18:53 | ||
camelia | a 1=b 2 | ||
AlexWithFootgun | oops | 18:54 | |
wrong :) | |||
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 | 0.1267656 | ||
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 | ||
camelia | 0.8706918 | ||
Skarsnik | xD | ||
AlexWithFootgun | m: my @a = a => 1, b => 2; { for @a -> (:key($l), :value($r)) { my $x = "$l=$r" } } for ^99999; say now - BEGIN now | ||
camelia | 9.18430289 | ||
AlexWithFootgun | I mean… well… :) | ||
AlexWithFootgun AlexDaniel | 18:57 | ||
oops | |||
18:57
AlexWithFootgun is now known as AlexDaniel
19:03
cdg joined,
vendethiel left
19:05
Skarsnik is now known as SkarsnikWithAFoo,
SkarsnikWithAFoo is now known as SkarWithAFooGun,
SkarWithAFooGun is now known as Skarsnik
19:08
cdg left,
robertle left
|
|||
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: pastebin.ubuntu.com/25215145/ | 19:10 | |
mspo | related to the github outage? | 19:16 | |
El_Che | mspo: I saw github was having trouble | 19:17 | |
19:20
sufrostico left
19:27
darutoko left
19:44
Cabanossi left
19:46
Cabanossi joined
|
|||
ugexe | you can also refresh the github.com page and have it work some times | 19:54 | |
19:55
ChoHag joined
|
|||
El_Che | looking at there status graphs it was a pretty big downtime | 19:59 | |
20:04
itaipu joined,
cdg joined
|
|||
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 | ||
but i wouldnt think it would have caused your problem | 20:06 | ||
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? | ||
El_Che | ^-------- interested by that as well | 20:08 | |
ugexe | there is no rakudo-default location for installed modules. zef chooses from CompUnit::RepositoryRegistry.repository-for-name('site' or 'home') | 20:09 | |
20:09
cdg left
|
|||
zengargoyle | because araraloren had a circular dependency problem last night that i did not get when i installed the code. | 20:09 | |
ugexe | they were also using -Ilib i believe | 20:10 | |
20:10
nicq20 left
|
|||
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:10 | |
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') ) | ||
zengargoyle | thanks, i'll try --dry sometime. | 20:12 | |
20:15
itaipu left
|
|||
ugexe | their problem was their meta file was incorrect | 20:17 | |
zengargoyle | then why did it work when i did it? | ||
that's my big question. | |||
ugexe | because you probably did not have any cruft from that module already installed | 20:18 | |
20:18
lichtkind joined
|
|||
zengargoyle | heh, i guess that's close enough to different versions of things already installed. to make sense to me. :) | 20:19 | |
20:19
tardisx left
|
|||
zengargoyle | i almost recommended nuking ~/.perl6 and trying again... | 20:20 | |
ugexe | yes, ~/.perl6 has been problematic as of late | 20:21 | |
20:23
tardisx joined
|
|||
zengargoyle | and i did the permissions thing and use site.... | 20:23 | |
20:23
itaipu joined
|
|||
zengargoyle | so you can have multiple versions of modules installed, but what about the scripts that get put into somewhere/bin? | 20:24 | |
20:24
bstamour joined
|
|||
zengargoyle | are we just stuck with the latest one installed... | 20:24 | |
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:25 | |
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. :) | ||
ugexe | which is usually ~/.perl6 | ||
zengargoyle | i thought it was just putting the raw .pl file there. | ||
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 | |
while before upgrading the correct version was getting picked (so probably didn't even realize such an old zef was installed) | |||
this issue is addressed in #1125 | 20:28 | ||
20:28
itaipu left
20:29
ufobat left
|
|||
zengargoyle | thanks for the explaining. :) | 20:31 | |
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:33 | ||
or to have a 01-versions.t that dumps out a list. it's really nice for the "works for me" troubleshooting. | 20:35 | ||
20:35
cdg joined
|
|||
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 | ||
since nothing else should be installed in that instance | 20:37 | ||
zengargoyle | excellent idea! | ||
20:39
CacoS left
20:44
tzekid left
|
|||
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) | ||
Skarsnik | I am curious, why zef replaced panda? | 20:47 | |
nadim_ | m say (1, 2, 3, 4).map: { $_ == 2 ?? Nil !! $_} ; | 20:48 | |
m: say (1, 2, 3, 4).map: { $_ == 2 ?? Nil !! $_} ; | |||
camelia | (1 Nil 3 4) | ||
nadim_ | m: say (1, 2, 3, 4).map: { $_ == 2 ?? () !! $_} ; | ||
camelia | (1 () 3 4) | ||
nadim_ | m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $_} ; | 20:49 | |
camelia | (1 3 4) | ||
moritz | Skarsnik: zef has the huge advantage that it's maintained | ||
I'm sure there are other reasons :-) | |||
nadim_ | m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! ($_,3)} ; | 20:50 | |
camelia | (1 3 3 3 4 3) | ||
nadim_ | m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! [$_,3]} ; | ||
camelia | (1 3 3 3 4 3) | ||
zengargoyle | zef supports install-to locations... | ||
nadim_ | m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $[$_,3]} ; | ||
camelia | ([1 3] [3 3] [4 3]) | ||
nadim_ | m: say (1, 2, 3, 4).flatmap: { $_ == 2 ?? () !! $($_,3)} ; | ||
camelia | ((1 3) (3 3) (4 3)) | ||
20:51
nattefrost left
|
|||
zengargoyle doesn't really remember enough about pands anymore ... | 20:52 | ||
20:52
mcsnolte joined
|
|||
ingy | m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo; say $h.gist; say $o.gist' | 20:56 | |
camelia | 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 … |
||
ingy | m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo; say $h.gist; say $o.gist | ||
camelia | x => 1 y => 2 |
||
20:57
Skarsnik left
|
|||
ingy | how do I call this foo so that I get a hash and a Nil? | 20:57 | |
20:58
andrzejku__ joined
|
|||
ingy | why does that split my hash into 2 poirs? | 20:58 | |
21:02
andrzejku_ left
|
|||
geekosaur | it's destructuring | 21:03 | |
21:04
mtj_ joined
21:05
skids left
|
|||
geekosaur | docs.perl6.org/language/variables#...assignment | 21:05 | |
21:09
Zoffix joined
|
|||
ugexe | m: sub foo { return {x => 1, y => 2} }; my (%h, $o) = foo; say %h.gist; say $o.gist | 21:10 | |
camelia | {x => 1, y => 2} (Any) |
||
21:10
pharv joined
|
|||
Zoffix | That makes $o pointless | 21:11 | |
m: sub foo { return {x => 1, y => 2}, 42 }; my (%h, $o) = foo; say %h.gist; say $o.gist | 21:12 | ||
camelia | Odd number of elements found where hash initializer expected: Found 5 (implicit) elements: Last element seen: 42 in block <unit> at <tmp> line 1 |
||
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. | ||
if you use % it captures the whole hash, fi you use $ it destructures the hash | |||
21:12
raiph joined
|
|||
Zoffix | m: sub foo { return {x => 1, y => 2}, 42 }; my ($h, $o) = foo; say $h.gist; say $o.gist | 21:12 | |
camelia | {x => 1, y => 2} 42 |
||
tinita | Zoffix: $o might be pointless in this example, but not in the actual code | 21:13 | |
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 | ||
Zoffix: i see | |||
Zoffix: i thought you meant the original example | 21:16 | ||
Zoffix | nadim_: the Hash ~~ Hash thing has been fixed. | ||
Skarsnik: zef replaced panda because it had more features and panda had some limitations that weren't easy to fix. | 21:17 | ||
21:19
mcmillhj left
|
|||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/07/31/...r-smaller/ | 21:22 | |
21:24
jaldhar left
|
|||
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 | |
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
21:30
avalenn left,
rindolf left
|
|||
Zoffix | lizmat++ # good weekly | 21:30 | |
wow, so much new content :o hard to keep up. | 21:31 | ||
moritz | lizmat++ indeed | ||
lizmat | tell me about it :-) | ||
ingy | geekosaur: thanks. this kinda sucks when I have an api that wants 'return $hash-or-array, $optional-hash-of-options;' | 21:34 | |
seems like you need to return Nil for the 2nd arg if you don't want to return anything | |||
the first return value can be any object, so I can't really use %foo, %options | 21:35 | ||
and $foo, %options still deconstructs | |||
geekosaur | more precisely you probably want Any | 21:36 | |
instead of Nil | |||
(Nil will work but it's not so much "undef" as "quiet failure") | |||
or maybe Hash depending on how typed you're being | 21:37 | ||
this feels one-arg-rule-ish? | |||
21:37
dct joined
|
|||
ingy | I'd rather not put the burden on the returner. I wanted then to 'return $node, $options-hash' or just 'return $node' | 21:37 | |
is there a way to write 'my $thing, %options = $callback(...)' and not have it destructure the first arg? | 21:39 | ||
geekosaur | m: sub foo { return {x => 1, y => 2} }; my ($h, $o) = foo,; say $h.gist; say $o.gist | 21:40 | |
camelia | {x => 1, y => 2} (Any) |
||
geekosaur | note comma | ||
ingy | that works for me | 21:41 | |
geekosaur | this is from the thing about destructuring assignment I sent earlier | ||
21:41
Zoffix left
|
|||
gfldex | m: my &block := { state $n = 0; say $n++; last if $n > 3; }; (0..∞).map: &block | 21:41 | |
camelia | 0 1 2 3 |
||
gfldex | m: sub loop(&c){ (0..∞).map(&c) }; my &block := { state $n = 0; say $n++; last if $n > 3; }; loop(&block) | 21:45 | |
camelia | 0 1 2 3 |
||
gfldex | TIMTOWTL | 21:46 | |
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 | ||
geekosaur | ...to lose? | ||
gfldex | loop | ||
geekosaur | (yes, I figured) | ||
nadim_ | m: my Capture $:wc = (1, :n(1)) | 21:50 | |
camelia | 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)) |
||
nadim_ | m: my Capture $c = \(1, :n(2)) ; dd $c | 21:52 | |
camelia | Capture $c = \(1, :n(2)) | ||
nadim_ | m: my Capture $c = \|(1, :n(2)) ; dd $c | 21:53 | |
camelia | Capture $c = \((1, :n(2))) | ||
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:54 | |
lizmat | nadim_: can't really think of a fast way other than creating a separate list and hash yourself | 21:59 | |
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 | |
22:02
jaldhar joined
|
|||
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:02
pharv left
|
|||
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:05
cdg left
22:06
espadrine left
|
|||
lizmat | gfldex: the string is immutable, so what would ASSIGN-POS change ? | 22:06 | |
nadim_ | is there a way to do my(@pass, @miss) = @list.sorting_grep {conditions} ? where sorting grep returns two list/seq | 22:08 | |
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 | ||
name | |||
gfldex | lizmat: it doesn't make much sense but the OP didn't ask for something sensible | ||
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 | ||
m: my (@a, @b) := (1..10).classify: { $_ > 1 ?? 'a' !! 'b' }; say @a.perl; say @b.perl | |||
camelia | Too few positionals passed to '<unit>'; expected 2 arguments but got 0 in block <unit> at <tmp> line 1 |
||
22:10
wamba left
|
|||
gfldex | lizmat: maybe you could leave a note that it's left out intentional | 22:10 | |
geekosaur | nadim_, this is the same question as earlier, only in reverse | 22:11 | |
m: sub foo { return <a b>, <c d> }; my ($h, $o) = foo; say $h.gist; say $o.gist | |||
camelia | (a b) (c d) |
||
ugexe | m: my (:@a, :@b) := (1..10).classify: { $_ > 1 ?? 'a' !! 'b' }; say @a.perl; say @b.perl | 22:12 | |
camelia | [2, 3, 4, 5, 6, 7, 8, 9, 10] [1] |
||
gfldex | lizmat: and link to: docs.perl6.org/language/subscripts...bscripting | ||
nadim_ | my (:@a, :@b) := (1..10).classify: { $_ > 1 ?? '1' !! '2' }; say @a.perl; say @b.perl | 22:14 | |
lizmat | gfldex++ # added link | ||
nadim_ | what's the my :@a construct? | ||
ugexe | takes a named param 'a' | 22:16 | |
22:16
jast left
22:18
jast joined
|
|||
nadim_ | I see, clever | 22:19 | |
ugexe | m: perl.say for (1..10).classify: { $_ > 1 ?? "a" !! "b" } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: perl used at line 1 |
||
ugexe | m: .perl.say for (1..10).classify: { $_ > 1 ?? "a" !! "b" } | ||
camelia | :b($[1]) :a($[2, 3, 4, 5, 6, 7, 8, 9, 10]) |
||
joy | in a book on perl, i saw this method print(\s) { ... } , what does the \ before s do? | 22:21 | |
22:22
setty1 left
|
|||
gfldex | joy: see docs.perl6.org/language/variables#...riables%29 | 22:23 | |
joy | oh yes! thanks | ||
22:30
mcmillhj joined
22:35
mcmillhj left
22:37
kerframil joined
22:38
st_elmo left
|
|||
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. | ||
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:44
Cabanossi left
22:45
Cabanossi joined
22:46
mcmillhj joined
22:51
mcmillhj left
23:02
mcmillhj joined
23:07
mcmillhj left
23:09
BenGoldberg joined
23:13
Cabanossi left
|
|||
Geth | whateverable/master: 18 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ review: github.com/perl6/whateverable/comp...f23f6ce2b4 |
23:14 | |
AlexDaniel | 18 commits \o/ | ||
23:15
Cabanossi joined
|
|||
Geth | whateverable: 3891214543 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/quotable.t Tests for Quotable Issue #124 can now be closed. TODO-ed tests for #192 were also added. |
23:16 | |
23:16
https_GK1wmSU joined
23:18
mcmillhj joined
23:19
https_GK1wmSU left
23:23
mcmillhj left
23:25
bisectable6 left,
unicodable6 left,
benchable6 left,
committable6 left,
coverable6 left,
evalable6 left,
quotable6 left,
greppable6 left
|
|||
AlexDaniel | poof! | 23:25 | |
lizmat | oh noes! | ||
23:27
dct left
23:28
nicq20 joined
23:29
bisectable6 joined,
quotable6 joined,
committable6 joined,
evalable6 joined,
coverable6 joined,
ChanServ sets mode: +v bisectable6,
ChanServ sets mode: +v quotable6,
ChanServ sets mode: +v committable6,
ChanServ sets mode: +v evalable6,
ChanServ sets mode: +v coverable6,
greppable6 joined,
unicodable6 joined,
bloatable6 joined,
benchable6 joined,
ChanServ sets mode: +v greppable6,
ChanServ sets mode: +v unicodable6,
ChanServ sets mode: +v bloatable6,
ChanServ sets mode: +v benchable6,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6
23:34
mcmillhj joined,
nicq20 left
23:38
mcmillhj left
23:47
nadim_ left,
sivoais_ left
23:49
mcmillhj joined
23:51
sivoais joined
23:52
mcsnolte left
23:54
mcmillhj left
23:56
mcmillhj joined
|