🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:02
daemon left
00:15
bdju left
00:16
bdju joined
00:19
Cabanossi left
00:22
hungrydonkey left
00:29
Cabanossi joined
00:47
xinming left,
aborazmeh left
00:48
xinming joined
00:59
MasterDuke left
01:01
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:13
softmoth left
01:31
sftp joined
01:46
sftp left,
sftp joined
01:58
ensamvarg_ joined
01:59
poohman joined
02:03
softmoth joined
02:05
Manifest0 left
02:06
Manifest0 joined
02:13
Doc_Holliwood left
02:25
softmoth_ joined
02:27
softmoth left
02:29
poohman left
02:31
Cabanossi left
02:32
aborazmeh left
02:36
seance left,
seance joined
02:39
Cabanossi joined
02:42
aborazmeh joined,
aborazmeh left,
aborazmeh joined
02:43
melezhik left
02:49
aborazmeh left
03:07
xinming left
03:08
xinming joined
03:49
rindolf joined
04:49
coverable6 left,
bisectable6 left,
unicodable6 left,
quotable6 left,
reportable6 left,
evalable6 left,
releasable6 left,
nativecallable6 left,
shareable6 left,
sourceable6 left,
squashable6 left,
greppable6 left,
linkable6 left,
committable6 left,
notable6 left,
bloatable6 left,
statisfiable6 left,
benchable6 left,
tellable6 left
04:50
greppable6 joined,
unicodable6 joined,
notable6 joined,
statisfiable6 joined,
benchable6 joined,
linkable6 joined
04:51
evalable6 joined,
tellable6 joined
04:52
bisectable6 joined,
releasable6 joined,
committable6 joined,
bloatable6 joined,
reportable6 joined,
quotable6 joined,
nativecallable6 joined,
squashable6 joined,
sourceable6 joined,
shareable6 joined,
coverable6 joined
05:02
softmoth__ joined,
softmoth__ is now known as softmoth
05:05
softmoth_ left
05:45
softmoth left
05:47
xinming left
05:48
xinming joined
05:54
mniip joined
05:55
Doc_Holliwood joined
06:13
xinming left
06:14
xinming joined
06:20
rindolf left
|
|||
Geth_ | doc: 0b4f443b71 | (Stoned Elipot)++ | util/xt-recent.sh Do not use a local(?) git alias while here simplify pipeline |
06:26 | |
doc: 582a3a7133 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | util/xt-recent.sh Merge pull request #3328 from Raku/xt-recent Do not use a local(?) git alias |
|||
doc: 0b5ba69307 | (Stoned Elipot)++ | doc/Type/Compiler.pod6 Add Compiler.backend() |
06:28 | ||
doc: 047691220d | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Compiler.pod6 Merge pull request #3324 from Raku/comp-backend Add Compiler.backend() Thanks, but please refer to the corresponding issue in the future. |
|||
linkable6 | Link: docs.raku.org/type/Compiler | ||
doc: 9d04f32134 | (Stoned Elipot)++ | 2 files Document Str.index ignorecase/ignoremark while here: - Str.index is a method: adjust section heading and use it in examples - revisit Cool.index description |
06:31 | ||
doc: c020fecec2 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files Merge pull request #3329 from Raku/str-index-i_m Document Str.index ignorecase/ignoremark Please also ref to existing issues (and mark as solved when accepted). I'll do these last two. |
|||
06:34
xinming left
06:35
hungrydonkey joined
06:36
xinming joined
06:44
xinming left
06:46
xinming joined
06:48
rindolf joined
06:53
seance left
07:04
Sgeo_ joined
07:08
Sgeo__ left
07:09
xinming left
07:10
xinming joined
07:15
MasterDuke joined
07:23
pecastro joined
|
|||
Geth_ | doc/str-starts-ends-i_m: f06f3847cf | (Stoned Elipot)++ | doc/Type/Str.pod6 Document Str's .starts-with and .ends-with ignorecase/ignoremark Refs #3229 |
07:33 | |
doc: stoned++ created pull request #3331: Document Str's .starts-with and .ends-with ignorecase/ignoremark |
|||
07:34
sjm_uk joined
07:38
sena_kun joined
07:48
k-man__ joined
07:49
k-man_ left
07:52
xinming left,
xinming joined
07:58
stoned75 left
08:11
stoned75 joined
08:16
pecastro left
08:31
Redfoxmoon left
08:37
Redfoxmoon joined
08:39
Altai-man_ joined
08:42
sena_kun left
08:49
Redfoxmoon left,
Redfoxmoon joined
08:59
chloekek joined
09:03
rindolf left
09:05
rindolf joined
09:06
hungrydonkey left
09:07
Benett joined
09:10
hungrydonkey joined
09:23
Sgeo__ joined
09:26
Sgeo_ left
|
|||
Geth_ | doc/str-contains-i_m: caf425b428 | (Stoned Elipot)++ | doc/Type/Str.pod6 Document Str.contains ignorecase/ignoremark Refs #3229 While here note that Str.contains' Regex support is also available since Rakudo version 2020.02. |
09:26 | |
doc: stoned++ created pull request #3332: Document Str.contains ignorecase/ignoremark |
09:27 | ||
doc: f06f3847cf | (Stoned Elipot)++ | doc/Type/Str.pod6 Document Str's .starts-with and .ends-with ignorecase/ignoremark Refs #3229 |
09:30 | ||
linkable6 | Link: docs.raku.org/type/Str | ||
Geth_ | doc: c799e9f0e8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Str.pod6 Merge pull request #3331 from Raku/str-starts-ends-i_m Document Str's .starts-with and .ends-with ignorecase/ignoremark |
||
linkable6 | DOC#3229 [open]: github.com/Raku/doc/issues/3229 [docs][new] Changes and additions for 2020.02 | ||
09:35
rbt left,
rbt joined
09:42
sjm_uk left
09:43
sjm_uk joined
|
|||
chloekek | Oh I’m so confused again by containers. | 10:05 | |
p6: my %h = a => '1,2,3'; %h<a> .= split(',').Array; for %h<a> { .say } | 10:06 | ||
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
chloekek | p6: my %h = a => '1,2,3'; %h<a> .= split(',').Array; for %h<a>[] { .say } | ||
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
chloekek | p6: my %h = a => '1,2,3'; %h<a> .= split(',').Array; for @(%h<a>) { .say } | ||
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
chloekek | p6: my %h = a => '1,2,3'; %h<a> .= split(',').cache; for %h<a>[] { .say } | ||
camelia | 1 2 3 |
||
chloekek | p6: my %h = a => '1,2,3'; %h<a> .= split(',').cache; for %h<a> { .say } | ||
camelia | (1 2 3) | ||
chloekek | p6: my %h = a => '1,2,3'; %h<a> .= split(',').cache; for %h<a>[] { .say } | 10:07 | |
camelia | 1 2 3 |
||
chloekek | It doesn’t work on my machine. | 10:08 | |
If I bind instead of .= then it works, as usual. | 10:09 | ||
Silly me made the mistake of assigning instead of binding and was bitten. | 10:10 | ||
If you never introduce containers then you never get problems caused by containers. 👌 | 10:13 | ||
10:40
sena_kun joined
10:42
Altai-man_ left
10:43
hungryd83 joined
10:47
hungrydonkey left
|
|||
AlexDaniel | chloekek: oh… I think it's .= that is causing your problem | 10:49 | |
p6: my %h = a => '1,2,3'; %h<a> = %h<a>.split(',').Array; for %h<a> { .say } | |||
camelia | [1 2 3] | ||
AlexDaniel | chloekek: I think it does (%h<a> .= split(',')).Array | ||
another way to do it would be, ummm | 10:50 | ||
p6: my %h = a => '1,2,3'; %h<a> .= split(',') .= Array; for %h<a> { .say } | |||
camelia | [1 2 3] | ||
chloekek | lol | ||
AlexDaniel | greppable6: \.=.*\. | 10:51 | |
greppable6 | AlexDaniel, 662 lines, 160 modules: gist.github.com/0851b5a011e5500c92...236453f3a4 | ||
AlexDaniel | lizmat: are you sure that this does what you think? :) github.com/moritz/perl6-all-module...s.pm6#L335 | 10:52 | |
github.com/moritz/perl6-all-module...id.pm#L398 | |||
m: my @indices = <a b c d a c d>; @indices .= sort.unique; say @indices | 10:53 | ||
camelia | [a a b c c d d] | ||
AlexDaniel | hah | ||
chloekek | Compiler should probably give an error or at least a warning. | ||
AlexDaniel | yeah, it's a construct that is visually ambiguous | ||
or deceptive I should say | |||
chloekek | This is not your average trap. :þ | 10:54 | |
lizmat | m: my @a = <a b c d>; @a .= sort.List; dd @a | ||
camelia | Array @a = ["a", "b", "c", "d"] | ||
lizmat | m: my @a = <a b b c c c d d d d>; @a .= sort.unique; dd @a | ||
camelia | Array @a = ["a", "b", "b", "c", "c", "c", "d", "d", "d", "d"] | ||
lizmat | yup, that's probably not what was intended :-) | 10:55 | |
AlexDaniel | chloekek: can you file two tickets? One for the docs so that it can be documented as a trap, another for rakudo/rakudo so that we can make it issue a warning or something | ||
chloekek | On it! | 10:56 | |
AlexDaniel | doesn't look like a very common trap, although I remember doing it multiple times in my own code… | 10:58 | |
lizmat | m: my @a = <a b b c c c d d d d>; @a .= sort .= unique; dd @a | 11:03 | |
camelia | Array @a = ["a", "b", "c", "d"] | ||
lizmat | I wonder how much magic it would be considered to have the above codegenned automatically | ||
chloekek | AlexDaniel: github.com/rakudo/rakudo/issues/3621 | 11:04 | |
11:04
natrys joined
|
|||
lizmat | chloekek++ | 11:06 | |
chloekek | Maybe .= should be looser than . | 11:07 | |
AlexDaniel | thanks | ||
chloekek | Just like += is looser than . | ||
AlexDaniel | m: my @indices = <a b c d a c d>; @indices .= sort . unique; say @indices | 11:09 | |
camelia | [a a b c c d d] | ||
AlexDaniel | m: my @indices = <a b c d a c d>; @indices [.]= sort.unique; say @indices | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> 3 @indices = <a b c d a c d>; @indices [.7⏏5]= sort.unique; say @indices |
||
AlexDaniel | m: my $x = 5; $x [+]= 2; say $x | 11:10 | |
camelia | 7 | ||
AlexDaniel | chloekek: it looks like an operator but the fake is coming through x) | ||
11:26
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:35
hungryd83 left,
hungrydonkey joined
11:38
lgtaube left
|
|||
chloekek | So this works: ==> map ({ %^a<meta-tags> .= split(',') .= grep(?*) .= cache; %^a }) | 11:43 | |
cpan-raku | New module released to CPAN! List::MoreUtils (0.0.7) by 03ELIZABETH | 11:44 | |
chloekek | And it works even without zen slice, for some reason: for %archive<meta-tags> { … } | ||
AlexDaniel | chloekek: what about using .eager | 11:45 | |
instead of .cache | 11:46 | ||
chloekek | I still don’t understand the difference between list, cache and eager. | ||
AlexDaniel | no idea | ||
chloekek | Or how .lazy works, how can a postfix method call turn something lazy? | ||
AlexDaniel | you can also do .List | ||
chloekek | I’d like to just assign it to my @ because I know what that does when given a Seq. | 11:47 | |
But that’s not pleasant with .= :) | |||
AlexDaniel | chloekek: I don't even know the difference between a List and a Seq, so… | 11:49 | |
chloekek: because a list can be lazy, I think? And a Seq can be cached? So they're the same? What? I don't know. | |||
chloekek | Seq can be iterated once, List as many times as you want | 11:50 | |
So List necessarily remembers produced elements | |||
If you call .cache on a Seq, then it returns a List, and the same List every time. | |||
I guess if you call .list instead of .cache it will create a new List. | |||
AlexDaniel | m: my $foo = <a b c>.split(‘ ’); say WHAT $foo; say $foo; say $foo | 11:51 | |
camelia | (Seq) (a b c) (a b c) |
||
AlexDaniel | didn't I just iterate a seq twice? | ||
chloekek | Maybe you can /shrug | 11:52 | |
AlexDaniel | chloekek: no, .list won't necessarily return a list, but .List should (although it sometimes doesn't?) | ||
chloekek | p6: my $foo = 'a b c'.split(' ').grep(?*); say $foo; say $foo | ||
camelia | (a b c) (a b c) |
||
chloekek | What does <a b c>.split(' ') mean? | ||
p6: say <a b c>.split(' ').raku | 11:53 | ||
camelia | ("a", "b", "c").Seq | ||
AlexDaniel | oh I mean't ‘’ instead of < > whoops | ||
but it's the same I think | |||
because it'll probably stringify a list first | |||
chloekek | p6: my $foo = 'a b c'.split(' ') but role { method list { die } }; say $foo | 11:54 | |
camelia | (a b c) | ||
chloekek | p6: my $foo = 'a b c'.split(' ') but role { method cache { die } }; say $foo | ||
camelia | Died in method cache at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
AlexDaniel | much like .contains on a list used to return what you didn't mean by stringifying first | ||
chloekek | .gist calls .cache hence | ||
p6: my $foo := 'a b c'.split(' '); for $foo { }; for $foo { } | |||
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
chloekek | So say works because it calls .cache, but for doesn't because it directly iterates the Seq. | ||
AlexDaniel | okay so you can't iterate it unless something automatically calls .cache on it | ||
more than once that is | 11:55 | ||
chloekek | p6: my $foo := 'a b c'.split(' '); $foo.cache; for $foo { } | ||
camelia | ( no output ) | ||
chloekek | p6: my $foo := 'a b c'.split(' '); $foo.cache; for $foo { }; for $foo { } | ||
camelia | ( no output ) | ||
AlexDaniel | so why do we have lazy lists instead of just using cached seqs? | 11:57 | |
chloekek | Seqs aren't Positional. | ||
AlexDaniel | I mean, sure, because it uses something something for the implementation, but the user-facing stuff is rather confusing | ||
m: my $foo := 'a b c'.split(' '); say $foo[1]; say $foo[0] | 11:58 | ||
camelia | b a |
||
AlexDaniel | looks positional to me? | ||
chloekek | p6: my @foo := 'a b c'.split(' ') | 11:59 | |
camelia | Type check failed in binding; expected Positional but got Seq ($(("a", "b", "c").Seq)) in block <unit> at <tmp> line 1 |
||
chloekek | It implements AT-POS but it does not do Positional | ||
AlexDaniel | p6: my @foo := 'a b c'.split(' ').list | 12:00 | |
camelia | ( no output ) | ||
AlexDaniel | p6: my @foo := 'a b c'.split(' ').list; dd @foo | ||
camelia | ("a", "b", "c") | ||
AlexDaniel | p6: my @foo := 'a b c'.split(' ').list; say WHAT @foo | ||
camelia | (List) | ||
AlexDaniel | p6: my @foo := 'a b c'.split(' ').cache; dd @foo | 12:01 | |
camelia | ("a", "b", "c") | ||
AlexDaniel | p6: dd 'a b c'.split(' ').cache | ||
camelia | ("a", "b", "c") | ||
AlexDaniel | p6: my $x = 'a b c'.split(' '); say $x[0]; dd $x | ||
camelia | a Seq $x = $(("a", "b", "c").Seq) |
||
AlexDaniel | p6: my $x = 'a b c'.split(' '); $x.cache; dd $x | 12:02 | |
camelia | Seq $x = $(("a", "b", "c").Seq) | ||
lizmat | PositionalBindFailover | ||
chloekek | Seq is a wrapper around Iterator and a list, apparently. | 12:03 | |
p6: .say for Seq.^attributes | |||
camelia | Iterator $!iter Mu $!list |
||
AlexDaniel | chloekek: so .cache returns a List, but actually the Seq itself becomes cached. So you can do just $x.cache; and there's no need to assign it | ||
chloekek: which is why `$foo .= .grep().cache;` works | 12:04 | ||
chloekek | Yes PositionalBindFailover.cache assigns to $!list. | ||
.list uses $!list, or creates a new one if $!list is not set. | |||
AlexDaniel | m: my $foo := ‘a b c’.split(‘ ’); $foo.cache; say WHAT $foo; .say for $foo.list; .say for $foo.list | ||
camelia | (Seq) a b c a b c |
||
AlexDaniel | m: my $foo := ‘a b c’.split(‘ ’); $foo .= cache; say WHAT $foo; .say for $foo.list; .say for $foo.list | ||
camelia | Cannot modify an immutable Seq ((a b c)) in block <unit> at <tmp> line 1 |
||
chloekek | .list and .cache are identical, except that .cache sets $!list the first time. | ||
AlexDaniel | m: my $foo = ‘a b c’.split(‘ ’); $foo .= cache; say WHAT $foo; .say for $foo.list; .say for $foo.list | ||
camelia | (List) a b c a b c |
||
AlexDaniel | m: my $foo = ‘a b c’.split(‘ ’); $foo.cache; say WHAT $foo; .say for $foo.list; .say for $foo.list | 12:05 | |
camelia | (Seq) a b c a b c |
||
chloekek | p6: my $foo := 'a b c'.split(' '); $foo.list; say $foo | ||
camelia | The iterator of this Seq is already in use/consumed by another Seq (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block <unit> at <tmp> line 1 |
||
AlexDaniel | sourceable6: a b c’.split(‘ ’).cache() | ||
sourceable6 | AlexDaniel, No idea, boss. Can you give me a Code object? Output: gist.github.com/de941db8bad242ce67...823fdb80c6 | ||
AlexDaniel | sourceable6: ‘a b c’.split(‘ ’).cache() | ||
sourceable6 | AlexDaniel, github.com/rakudo/rakudo/blob/d8f2...ce.pm6#L24 | ||
chloekek | I suggest looking at the implementation: Seq.pm6 and Sequence.pm6. | ||
This made clear to me what happens. | |||
And how .cache, .list and .iterator work. | 12:06 | ||
AlexDaniel: Nevermind, I do need the zen slice. | 12:11 | ||
AlexDaniel | chloekek: why do you *need* the zen slice? :) | 12:12 | |
chloekek | %archive<meta-tags> is a scalar container containing a list. | 12:13 | |
for %archive<meta-tags> will loop only once. | |||
for %archive<meta-tags>[] will actually loop. | |||
AlexDaniel | what about `for %archive<meta-tags>.list` ? | 12:14 | |
chloekek | That works too. | ||
AlexDaniel | oh, [] doesn't cache | ||
chloekek | %archive<meta-tags> is already a list. | 12:15 | |
It’s just wrapped in a scalar container. | |||
AlexDaniel | but [*] does. Interesting | ||
chloekek | p6: my %a = meta-tags => 'a,b,c'; %a<meta-tags> .= split(',') .= cache; for %a<meta-tags> { .raku.put } | 12:16 | |
camelia | $("a", "b", "c") | ||
chloekek | p6: my %a = meta-tags => 'a,b,c'; %a<meta-tags> .= split(',') .= cache; for %a<meta-tags>[] { .raku.put } | ||
camelia | "a" "b" "c" |
||
AlexDaniel | TIL [] | 12:17 | |
synthmeat | (sorry for interrupting) is there a way to get, for a grapheme's .fc, a list of graphemes comparison would return true? | ||
AlexDaniel | synthmeat: you mean like reverse-search for what foldcase resolves to? | 12:18 | |
synthmeat | yes | ||
AlexDaniel | synthmeat: I think you'll need to make a lookup table for that yourself | 12:19 | |
synthmeat | but it's in there somewhere already! | 12:20 | |
AlexDaniel | synthmeat: I don't know if that thing is viable in general, does unicode have any rules for multichar .fc conversions? Like can two characters .fc to a single one in some conditions? | ||
synthmeat | yes | ||
ß and ss | |||
12:20
chloekek left
|
|||
AlexDaniel | synthmeat: where? We only know how to .fc a string, we don't know how to go backwards | 12:20 | |
12:21
chloekek joined
|
|||
AlexDaniel | synthmeat: when you .fc both strings we just compare if they're the same | 12:21 | |
I mean, technically you do the comparison :) | |||
jnthn | Indeed, I believe the mappings are only stored in the direction needed to implement .fc | ||
AlexDaniel | samcv: ↑ | ||
chloekek | I don’t understand why array and hash elements are containerized. | ||
It’s certainly not needed for mutation: | |||
p6: my @x = 1,; @x[0] := 2; @x[0] := 3; say @xs | 12:22 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '@xs' is not declared at <tmp>:1 ------> 3my @x = 1,; @x[0] := 2; @x[0] := 3; say 7⏏5@xs |
||
chloekek | p6: my @x = 1,; @x[0] := 2; @x[0] := 3; say @x | ||
camelia | [3] | ||
chloekek | p6: my @x = 1,; @x[0] := 2; @x[0] := (1,2,3); say @x.raku | 12:23 | |
camelia | [(1, 2, 3),] | ||
jnthn | How else would you assign to them? | ||
chloekek | Overload the []= and {}= operators. | 12:24 | |
That's what Ruby does, and it does not suffer from the for %h<k> issue. | |||
12:25
aindilis left
|
|||
jnthn | That only handles the case where the assignment appears literally like that, not all of the more indirect cases | 12:25 | |
For example, @a[$i]++ is postfix:<++>(@a[$i]), where the operator takes the argument `is rw` and assigns the successor into it. | 12:27 | ||
chloekek | I guess I’ll just write Raku::Critic and have it complain about using hash elements in for loops without zen slice. | ||
12:28
aindilis joined
|
|||
AlexDaniel | chloekek: yeah, I really want Raku::Critic. Maybe jnthn++'s work will help with that | 12:30 | |
cuz the language is definitely not foolproof enough for the fool I am :) | |||
synthmeat: it's not hard to implement that, but it takes a few seconds to build the table: perl6 -e 'my %fc-reverse-lookup; for 0..0x10FFFF { %fc-reverse-lookup{.chr.fc}.push: .chr }; say ‘Done!’; for lines() { say %fc-reverse-lookup{.fc} }' | 12:33 | ||
synthmeat | oh, nice! /me tries to play with it | 12:36 | |
AlexDaniel | Here's the table of things that resolve to multiple characters: gist.github.com/AlexDaniel/81f64e4...40c226aee4 | 12:37 | |
hah non-ascii version of the ff operator ff | 12:38 | ||
I'm kidding, of course | |||
12:39
Altai-man_ joined
12:42
sena_kun left
|
|||
AlexDaniel | unidump: 流流流流 | 12:44 | |
unicodable6 | AlexDaniel, gist.github.com/4cb3f934c6bc1809b4...51d0a2d39a | ||
12:46
aborazmeh left
12:47
aindilis left
|
|||
chloekek | p6: say ::('Str').raku; | 12:57 | |
camelia | Str | ||
chloekek | p6: say ::($_).raku given 'Str'; | ||
camelia | Str | ||
13:06
aborazmeh joined,
aborazmeh left,
aborazmeh joined
13:10
rbt left
13:11
rbt joined
|
|||
Doc_Holliwood | m: multi foo($x) { $x.say }; foo(123) | 13:31 | |
camelia | 123 | ||
Doc_Holliwood | m: multi foo($x) { $x.say }; foo.WHAT.say | 13:32 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling foo() will never work with any of these multi signatures: ($x) at <tmp>:1 ------> 3multi foo($x) { $x.say }; 7⏏5foo.WHAT.say |
||
Doc_Holliwood | m: multi foo($x) { $x.say }; (&foo).WHAT.say | ||
camelia | (Sub) | ||
Doc_Holliwood | m: multi foo($x) { $x.say }; (foo).WHAT.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling foo() will never work with any of these multi signatures: ($x) at <tmp>:1 ------> 3multi foo($x) { $x.say }; (7⏏5foo).WHAT.say |
||
Doc_Holliwood | m: foo($x) { $x.say }; (&foo).WHAT.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$x' is not declared at <tmp>:1 ------> 3foo(7⏏5$x) { $x.say }; (&foo).WHAT.say |
||
Doc_Holliwood | so, you can omit the "sub" when you use "multi"? | 13:33 | |
m: class Foo { multi foo($x) { $x.say }; }; Foo.new.foo(123) | 13:34 | ||
camelia | No such method 'foo' for invocant of type 'Foo' in block <unit> at <tmp> line 1 |
||
Doc_Holliwood | m: class Foo { multi sub foo($x) { $x.say }; }; Foo.new.foo(123) | ||
camelia | No such method 'foo' for invocant of type 'Foo' in block <unit> at <tmp> line 1 |
||
Doc_Holliwood | interesting | ||
MasterDuke | yeah. think it is mentioned in the docs somewhere | 13:36 | |
AlexDaniel | and I can never remember if it defaults to multi sub or multi method | 13:41 | |
chloekek | proto and multi default to sub. | 13:43 | |
13:46
k-man__ left
13:51
k-man__ joined
13:54
Redfoxmoon left,
Redfoxmoon joined
13:58
melezhik joined
14:01
melezhik40 joined,
melezhik40 is now known as melezhik2,
redable joined,
redable left
14:02
redable joined,
mowcat joined,
redable left
14:03
melezhik left
14:05
abraxxa joined
14:06
Redfoxmoon left,
Redfoxmoon joined
14:10
abraxxa left,
abraxxa joined,
aborazmeh left
14:11
molaf joined
|
|||
El_Che | jnthn: comma does intellij to crash when open projects, also non raku projects: gist.github.com/nxadm/6e1de81afbd9...2fc4b17b3a | 14:15 | |
jnthn: an upgrade to the freshly releases Intellij 2020.1, Linux amd64, Ubuntu 19.10 | 14:16 | ||
14:16
mowcat left
|
|||
El_Che | jnthn: comma community 2020.01.0 plugin | 14:18 | |
14:20
lucasb joined
|
|||
Altai-man_ | El_Che, do you just report it or was expecting it to work? | 14:21 | |
El_Che | Altai-man_: I don't understand the question | ||
Altai-man_ | sorry, my grammar... | ||
El_Che, are you saying "Just FYI, this isn't working" or "I installed new idea and the plugin doesn't work!"? | |||
2020.01 is very fresh and we don't support iet yet, 2019.03 is the latest supported version, I think. | 14:22 | ||
s/iet/it/ | |||
El_Che | both | ||
I just reinstalled the plugin. It does not work, but it does not crash other languages | |||
kind of a headup that 2020.01 is out and many will upgrade | 14:23 | ||
Altai-man_ | >NoClassDefFoundError: com/intellij/ide/util/projectWizard/SourcePathsBuilder | ||
El_Che, next release will probably support it, though still no idea. Thanks for reporting. | 14:24 | ||
El_Che | OK, I reinstalled and enabled. It crashes other projects. | 14:25 | |
(other == other langs) | 14:26 | ||
Altai-man_ | Alas, it won't work regardless of what you do. | ||
El_Che | plugin do have some sort of supported versions, I think. Maybe for the feature it's good be a good idea to mark the plugin as such. If I recall correctly you get warned at upgrade time if the plugins are incompatible | 14:27 | |
Altai-man_: I heard there were some problems with signing on MacOS? | 14:30 | ||
Altai-man_ | Yes, but during migration to 2019.03 we don't used deprecated API, which is why I am disappointed but not surprised they broke things by removing parts not marked as deprecated. | 14:31 | |
El_Che, AFAIK, they were resolved and latest release is available on macos. | |||
melezhik2 | chloekek: how can I install locally built Raku nix package? - gist.github.com/melezhik/48fd3ea8a...cc4c2e0de9 | 14:32 | |
nix-env -iA Test-Mock | |||
error: attribute 'Test-Mock' in selection path 'Test-Mock' not found | 14:33 | ||
looks like | |||
nix-env -f . -iA Test-Mock | |||
woks fine | |||
now the question is, how can use this raku module? | 14:34 | ||
chloekek | I have no idea, I never use nix-env. | ||
melezhik2 | perl6 -MTest::Mork | ||
through an error | |||
14:34
cpan-raku left
|
|||
melezhik2 | throw | 14:34 | |
chloekek | I think nix-env defaults to looking up on nixpkgs. | ||
lizmat | ,.oO( Test::Mindy ) | ||
chloekek | Try nix-env -f default.nix -iA Test-Mock | ||
melezhik2 | gist.github.com/melezhik/48fd3ea8a...nt-3252512 | ||
like I said "nix-env -f . -iA Test-Mock" works as well, now how can I test that module is successfully used by raku? | 14:35 | ||
now I am using my system installed rakudo, which is probably wrong | 14:36 | ||
14:36
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
chloekek | I never use imperative installation commands, but what you can do is: PERL6LIB=$(< /nix/store/14p68llhai20xh2673pk2gq5cacccycy-Test-Mock/PERL6LIB) perl6 -MTest::Mock | 14:36 | |
melezhik2 | ahh , it's ok, but how do you use those modules on your system? don't you alter PERL6LIV every time? | 14:37 | |
chloekek | Ideally you would be able to do this: nix-shell -p 'rakuWithPackages (p: [ p.Test-Mock ])' --run perl6, like you can do with Python and Perl, but this is not yet implemented. | ||
melezhik2 | it's impossible (-; | ||
chloekek | I use them by building the programs that depend on them with Nix as well. | 14:38 | |
If a Raku distribution has a bin directory, then each file in there will end up in PATH if you install it. | |||
Libraries by themselves are not useful outside of programs that depend on them. Except for the case of REPLs, but I don’t use REPLs either, so I never got to implement that. | |||
melezhik2 | I am not concerned with PATH , it seems no problem with it in nix | 14:39 | |
I am talking about PERL6LIB | |||
chloekek | I don’t think nix-env -i can arbitrarily adjust environment variables such as PERL6LIB. | ||
melezhik2 | you're right, it does not | ||
this is why I am asking | |||
El_Che | Altai-man_: Just discovered Jetbrains Toolbox that lets you rollback intellij versions | ||
melezhik2 | looks like the only option in nix-shell/ nix run | 14:40 | |
chloekek | So if you want to have a REPL with a Raku package in scope, you must build a REPL that has it in scope. | ||
melezhik2 | to test Nix raku distribtutions | ||
chloekek | Which you can do. I can write an example for that. | ||
melezhik2 | yeah | ||
it's abit trickier then I'd expected ;-) | |||
14:41
sena_kun joined
|
|||
melezhik2 | error: undefined variable 'rakuWithPackages' at (string):1:94 | 14:41 | |
when I run "nix-shell -p 'rakuWithPackages (p: [ p.Test-Mock ])' --run perl6" | |||
and btw, should I install nix rakudo? | 14:42 | ||
14:42
Altai-man_ left
14:43
hungryd85 joined,
hungrydonkey left
|
|||
chloekek | Yes, I just said I still have to implement that. | 14:48 | |
Which I have now done! | |||
melezhik2 | sure | ||
chloekek | You can now write this with the latest raku-nix: nix-shell -p '(import ./. {}).rakuWithPackages (p: [ p.Test-Mock ])' --run 'perl6 -MTest::Mock' | ||
As well as this: nix-build -E '(import ./. {}).rakuWithPackages (p: [ p.Test-Mock ])' && result/bin/perl6 -MTest::Mock | 14:49 | ||
melezhik2 | btw, I wonder why not just `nix run -c "raku -MTest-Mock -e 1"` ? | ||
chloekek | nix run only sets PATH. | ||
melezhik2 | ah, ok | 14:50 | |
I guessed that | |||
an error after your last commit - gist.github.com/melezhik/48fd3ea8a...nt-3252530 | |||
chloekek | Put (import ./. {}). before rakuPackages | 14:51 | |
14:51
MasterDuke left
|
|||
melezhik2 | yeah. it works now, though I don't understand (-: the meaning of the construction | 14:53 | |
gist.github.com/melezhik/48fd3ea8a...nt-3252539 | |||
:-) | |||
chloekek | So the way it works is: | 14:54 | |
14:54
Doc_Holliwood left
|
|||
chloekek | When you build a Raku package with rakuPackage, it creates an output directory that has the precompiled MoarVM bytecode in it, in the directory format that Rakudo uses to import precompiled modules. As well as a file PERL6LIB that lists all the dependencies. | 14:54 | |
14:55
guifa2 joined
|
|||
guifa2 | o/ | 14:55 | |
chloekek | What rakuWithPackages does is: it generates a Bash script that forwards all arguments to perl6, after setting PERL6LIB to the concatenated contents of the PERL6LIB files in each output directory of each package you give it. | ||
You can see this if you do: nix-build -E '(import ./. {}).rakuWithPackages (p: [ p.Test-Mock ])' && cat result/bin/perl6 | 14:58 | ||
Wrapping programs to set environment variables is such a common operation in Nix that it has a function makeWrapper that does exactly this. rakuWithPackages calls makeWrapper. | 15:04 | ||
15:05
abraxxa left
15:06
hungryd85 left,
abraxxa joined
15:08
hungrydonkey joined
|
|||
melezhik2 | thanks. I need time to understand all of that, so far look like - "nix-shell -p '(import ./. {}). rakuWithPackages (p: [ p.Test-Mock ])' --run "perl6 -MTest::Mock2 -e 1"" is what I was looking for | 15:08 | |
15:08
chloekek left
|
|||
melezhik2 | btw what p.Test-Mock does? | 15:09 | |
> As well as a file PERL6LIB that lists all the dependencies. | 15:10 | ||
yeah makes a sene now | |||
sense | |||
15:12
k-man__ left
15:13
k-man joined
15:17
aindilis joined
15:18
k-man left
|
|||
melezhik2 | chloekek: by testing Raku nix modules installation, do you mean just simple `raku -M$module` or you're thinking about `zef test $module` | 15:19 | |
tellable6 | melezhik2, I'll pass your message to chloekek | ||
melezhik2 | the last is probably harder bearing in mind the nature of nix based installs | ||
15:20
guifa2 left
15:22
k-man joined
15:26
stoned75 left
15:30
melezhik2 left
15:32
MasterDuke joined
|
|||
samcv | synthmeat, I don't think it's allowed to .fc from 2 characters down to 1. Only to go from 1 to 2 | 15:36 | |
15:37
stoned75 joined
|
|||
El_Che | Hi, for a cli app, for command mode, do you also see it as: ./prog action sub-action --param-for-sub --param-for-sub=foo? | 15:38 | |
that's what I mostly see, e.g. docker | 15:39 | ||
15:39
softmoth joined
15:42
guifa2 joined
15:48
chloekek joined
|
|||
chloekek | melezhik: Yeah there is currently no infrastructure in raku-nix for running tests. | 15:48 | |
tellable6 | chloekek, I'll pass your message to melezhik2 | ||
chloekek | melezhik: Building and importing the modules seems like a good first step. | ||
tellable6 | chloekek, I'll pass your message to melezhik2 | ||
15:51
melezhik joined
|
|||
melezhik | chloekek: "Building and importing the modules seems like a good first step" - good | 15:52 | |
tellable6 | 2020-04-13T15:48:19Z #raku <chloekek> melezhik: Yeah there is currently no infrastructure in raku-nix for running tests. | ||
2020-04-13T15:48:33Z #raku <chloekek> melezhik: Building and importing the modules seems like a good first step. | |||
melezhik | I guess I am choosing between 2 options how can I assist here | 15:53 | |
1) bringing nix modules build/import logic to RakuDist - think about a new "OS" supported | |||
2) writing some Sparrow plugins/DSL so one can reuse those ones in their test scripts | 15:54 | ||
which one is preferable , chloekek: ? | 15:55 | ||
16:03
chloekek left
16:06
abraxxa left
16:08
abraxxa joined
16:22
Doc_Holliwood joined
16:27
hungrydonkey left
16:39
Altai-man_ joined
|
|||
cpan-raku | New module released to CPAN! Gcrypt (0.1) by 03CTILMES | 16:40 | |
16:42
sena_kun left
16:47
aindilis left
16:52
softmoth left,
softmoth joined
16:53
knowles joined
16:54
shlomif joined
16:55
softmoth left
16:57
rindolf left,
shlomif is now known as rindolf
17:03
softmoth joined,
knowles left
17:09
caterfxo left
|
|||
Geth_ | doc/str-substr-eq-i_m: a77eccfea4 | (Stoned Elipot)++ | 2 files Document Str.substr-eq ignorecase/ignoremark Refs #3229 |
17:24 | |
17:24
caterfxo joined
|
|||
Geth_ | doc: stoned++ created pull request #3334: Document Str.substr-eq ignorecase/ignoremark |
17:25 | |
17:30
caterfxo left
17:31
caterfxo joined
17:41
rbt left
17:42
rbt joined
17:43
pmurias joined,
guifa2 left
17:46
melezhik left
17:51
Cabanossi left
|
|||
Geth_ | doc: a77eccfea4 | (Stoned Elipot)++ | 2 files Document Str.substr-eq ignorecase/ignoremark Refs #3229 |
17:51 | |
doc: 8deaff588c | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files Merge pull request #3334 from Raku/str-substr-eq-i_m Document Str.substr-eq ignorecase/ignoremark |
|||
linkable6 | DOC#3229 [open]: github.com/Raku/doc/issues/3229 [docs][new] Changes and additions for 2020.02 | ||
cpan-raku | New module released to CPAN! Gcrypt (0.2) by 03CTILMES | 17:58 | |
18:01
aindilis joined
18:04
Cabanossi joined
18:10
rbt left
18:11
rbt joined
18:12
sauvin left
18:22
sjm_uk left
18:28
pmurias left
18:39
ensamvarg_ left
18:40
sena_kun joined
18:42
Altai-man_ left
18:43
mowcat joined
|
|||
Doc_Holliwood | m: role R { method foo() { say "!" } }; use MONKEY-TYPING; augment List does R; | 18:45 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed augment (found type followed by trait; did you forget a variable in between?) at <tmp>:1 ------> 3!" } }; use MONKEY-TYPING; augment List 7⏏5does R; |
||
Doc_Holliwood | m: role R { method foo() { say "!" } }; use MONKEY-TYPING; augment class List does R; | 18:46 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Too late for unit-scoped class definition; Please use the block form. at <tmp>:1 ------> 3ONKEY-TYPING; augment class List does R;7⏏5<EOL> |
||
Doc_Holliwood | m: role R { method foo() { say "!" } }; use MONKEY-TYPING; augment class List does R {}; | ||
camelia | ( no output ) | 18:47 | |
Doc_Holliwood | m: role R { method foo() { say "!" } }; use MONKEY-TYPING; augment class List does R {}; (1,2).foo | ||
camelia | ! | ||
Doc_Holliwood | noice | ||
18:54
caterfxo left,
stoned75 left
19:01
chloekek joined
19:18
abraxxa left
19:25
stoned75 joined
|
|||
lizmat | and another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/04/13/2020-...-surprise/ | 19:25 | |
19:27
pmurias joined
19:30
rindolf left
|
|||
sena_kun | downforeveryoneorjustme.com/perlfoundation.org says www.perlfoundation.org/grant-ideas.html is down | 19:31 | |
19:35
softmoth left
|
|||
lizmat | works for me now | 19:35 | |
jnthn | very punny, lizmat++ :) | 19:37 | |
19:39
caterfxo joined
|
|||
[Coke] | grant-ideas.html is the wrong link. | 19:39 | |
grants.perlfoundation.org/ is better. | 19:40 | ||
We haven't put in a redirect yet. Will see if I can make weebly do that later. | |||
sena_kun | oh, this one works, [Coke]++ | ||
19:40
sjm_uk joined
|
|||
sena_kun | lizmat, I think weekly should use the new one as well. | 19:40 | |
lizmat | link updated | 19:41 | |
sena_kun | lizmat++ | 19:42 | |
bartolin_ | lizmat++ # weekly | 19:45 | |
19:53
Grauwolf left
19:54
sjm_uk left
20:00
guifa2 joined
|
|||
MasterDuke | lizmat++ | 20:03 | |
guifa2 | lizmat++ | 20:07 | |
lizmat | argh, I just realized I forgot something in this weeks Weekly :-( sorry guifa | 20:09 | |
guifa2 | lizmat: no problem! I'm still getting caught up with $day-job and $get-phd-paper-in-hand-work so I haven't advanced as quickly on that front as I'd've liked | ||
So by the time people read the proposal next week, there may even be a semi-experimental module ready | 20:10 | ||
lizmat | weekly: grammar proposal by guifa gist.github.com/alabamenhu/2fec7a8...4a2ae2f04d | ||
notable6 | lizmat, Noted! (weekly) | ||
guifa2 really can't wait to have this semester off of his shoulder so he can dive fully into Intl::, so much work there to get done, especially given everything I've learned over the past few months | 20:17 | ||
chloekek | Is it possible to force line buffering on stdout? | ||
tellable6 | 2020-04-13T15:19:09Z #raku <melezhik2> chloekek: by testing Raku nix modules installation, do you mean just simple `raku -M$module` or you're thinking about `zef test $module` | ||
20:21
stoned75 left
|
|||
chloekek | I can set $*OUT.out-buffer = 0 but that completely disables buffering. | 20:21 | |
MasterDuke | chloekek: docs.raku.org/type/IO::Handle#method_open has some info | ||
maybe something with the TTY settings would do what you want | 20:22 | ||
chloekek | My stdout is not a TTY, it’s a pipe. | ||
I think line buffering is just not a thing at the moment. | |||
20:39
Altai-man_ joined
|
|||
chloekek | p6: say %*ENV; say %(|%*ENV, A => 'B'); | 20:40 | |
camelia | {DBUS_SESSION_BUS_ADDRESS => unix:path=/run/user/1017/bus, HOME => /home/camelia, LC_CTYPE => en_US.UTF-8, LOGNAME => evalbot, MAIL => /var/mail/evalbot, PATH => /usr/bin:/bin:/usr/sbin:/sbin, SHELL => /bin/bash, SUDO_COMMAND => /home/camelia/rakudo-m… | ||
20:40
stoned75 joined
|
|||
chloekek | p6: say %(|%*ENV, A => 'B'); | 20:40 | |
camelia | {A => B, DBUS_SESSION_BUS_ADDRESS => unix:path=/run/user/1017/bus, HOME => /home/camelia, LC_CTYPE => en_US.UTF-8, LOGNAME => evalbot, MAIL => /var/mail/evalbot, PATH => /usr/bin:/bin:/usr/sbin:/sbin, SHELL => /bin/bash, SUDO_COMMAND => /home/camelia/… | ||
20:42
sena_kun left
|
|||
chloekek | My goodness, it didn’t work because I wrote my %*ENV = %(|%*ENV, ...);. | 20:43 | |
20:48
MasterDuke left
|
|||
guifa2 's eyes are hurting from that %(|%* . Was that perl? ;-) | 20:50 | ||
lizmat | chloekek: I don't think line buffering is a thing atm | ||
chloekek | lizmat: I thought so | 20:52 | |
synthmeat | wait, wait, wait. PAST -> QAST -> RakuAST? seriously? no RAST? | 20:53 | |
tobs | m: my %h = a => 'b'; %h »//«= %(A => 'B', a => 'z'); say %h | ||
camelia | {A => B, a => b} | ||
lizmat | no, no RASTaman Vibration | ||
20:54
Kaeipi left,
Kaeipi joined
|
|||
chloekek | guifa2: (|~«. is my favorite sequence of symbols in my code so far. ({ !$++ || .[1] ne comes close. | 20:58 | |
20:58
caterfxo left
|
|||
lizmat | in my opinion, $++ is nice for oneliners, but shouldn't be used in any code that lives elsewhere | 20:59 | |
chloekek | I like how much you can get done without any letters. :) | 21:01 | |
21:01
MasterDuke joined
|
|||
Geth_ | doc/str-indices-i_m: 1fbe42f257 | (Stoned Elipot)++ | 2 files Document Str.indices ignorecase/ignoremark Refs #3229 |
21:02 | |
lizmat | chloekek: you think you like that now :-) | ||
tobs | m: my %h = a => 'b'; %h »R//«= %(A => 'B', a => 'z'); say %h # doh, this one will overwrite instead of preserve pairs on the LHS | ||
camelia | {A => B, a => z} | ||
Geth_ | doc: stoned++ created pull request #3335: Document Str.indices ignorecase/ignoremark |
||
tobs | »R//«= is not half bad either IMHO :-) | ||
chloekek | lizmat: Be sufficiently proud of your obscure one-lines that you don’t forget them. | ||
[Coke] | autarch++ just fixed the redirect in the weebly source, so both links go to the same place now. | 21:03 | |
(for grant ideas) | |||
lizmat | chloekek: but will other people recognize them ? | ||
chloekek | Every unknown is an opportunity to learn. | 21:04 | |
AlexDaniel | or an opportunity to hate | ||
x) | |||
21:10
Hexeratops joined
21:20
Black_Ribbon joined
21:25
chloekek left
21:29
Altai-man_ left
21:38
simcop2387 left
21:39
gdonald left,
simcop2387 joined
21:40
Grauwolf joined,
Grauwolf left,
Grauwolf joined
21:41
gdonald joined
21:44
rbt left
21:45
rbt joined
21:46
m0ltar joined
21:49
aborazmeh joined,
aborazmeh left,
aborazmeh joined
22:00
lucasb left
22:03
natrys left
22:32
_jrjsmrtn joined
22:33
__jrjsmrtn__ left
22:45
cognominal joined
22:46
cognomin_ left
23:11
rbt left,
rbt joined
23:25
ensamvarg_ joined
23:27
mowcat left
|
|||
cpan-raku | New module released to CPAN! Gcrypt (0.4) by 03CTILMES | 23:36 | |
23:55
softmoth joined,
rbt left
23:58
guifa2 left
|