🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:00
reportable6 left,
reportable6 joined
00:08
rf joined
00:13
Xliff_ joined
|
|||
Xliff_ | m: my @a[2; 2]; @a[1;0] = 1; @a.gist.say; | 00:13 | |
camelia | [[(Any) (Any)] [1 (Any)]] |
||
Xliff_ | Is there a way I can define a multidim array as a reference? | 00:14 | |
00:14
[Coke] left
|
|||
Xliff_ | m: my $a = [ [1, 0], [0, 1] ]; $a[1;0.gist.say | 00:15 | |
camelia | ===SORRY!=== Error while compiling <tmp> Unable to parse expression in subscript; couldn't find final ']' (corresponding starter was at line 1) at <tmp>:1 ------> $a = [ [1, 0], [0, 1] ]; $a[1;0.gist.say⏏<EOL> expecting any … |
||
Xliff_ | m: my $a = [ [1, 0], [0, 1] ]; $a[1;0].gist.say | ||
camelia | 0 | ||
Xliff_ | m: my $a = [ [1, 0], [0, 1] ]; $a[1;1].gist.say | ||
camelia | 1 | ||
Xliff_ | m: my $a = [2;2]; $a.gist.say | 00:16 | |
camelia | [2 2] | ||
Xliff_ | m: my $a = @[2;2]; $a.gist.say | ||
camelia | [2 2] | ||
Xliff_ | m: my $a = [0 xx 2] xx 2; $a.gist.say | 00:20 | |
camelia | ([0 0] [0 0]) | ||
Xliff_ | m: my $a = [0 xx 2] xx 2; $a.gist.say; $a[1;1] = 1; $a.gist.say | ||
camelia | ([0 0] [0 0]) ([0 0] [0 1]) |
||
Xliff_ | I guess that'll do. | ||
guifa_ | What do you mean by "as a reference"? you mean setting an initial value? | 00:21 | |
What do you mean by "as a reference"? you mean setting an initial value? | 00:22 | ||
m: my @a[2;2] is default(0); say @a | |||
camelia | ===SORRY!=== Error while compiling <tmp> is default on shaped Array not yet implemented. Sorry. at <tmp>:1 ------> my @a[2;2] is default(0)⏏; say @a expecting any of: constraint |
||
guifa_ | err I guess that's NYI haha | ||
Xliff_ | guifa: Yes, you can do that, but if I wanted a distinct array each time I entered that block, that wouldn't work. | 00:28 | |
m: my %h; sub a { my @a[2; 2]; @a[1;1] = $++; %h{$++} = @a }; a; a; %h.gist.say; | 00:30 | ||
camelia | {0 => [[(Any) (Any)] [(Any) 0]], 1 => [[(Any) (Any)] [(Any) 1]]} |
||
Xliff_ | m: my %h; sub a { my @a[2; 2]; @a[1;1] = $++; %h{$++} = @a }; a; %h{0}[0; 1] = 0; a; %h.gist.say; | 00:31 | |
camelia | {0 => [[(Any) 0] [(Any) 0]], 1 => [[(Any) (Any)] [(Any) 1]]} |
||
Xliff_ | m: my %h; sub a { my @a[2; 2]; @a[1;1] = $++; %h{$++} = @a }; a; %h{0}[0; 1] = 0; a; %h.gist.say; %h{0}.WHERE.say; %h{1}.WHERE.say | 00:32 | |
camelia | {0 => [[(Any) 0] [(Any) 0]], 1 => [[(Any) (Any)] [(Any) 1]]} 5915594278688 5915594343376 |
||
Xliff_ | m: my %h; sub a { my @a[2; 2]; @a[1;1] = $++; %h{$++} := @a }; a; %h{0}[0; 1] = 0; a; %h.gist.say; %h{0}.WHERE.say; %h{1}.WHERE.say | ||
camelia | {0 => [[(Any) 0] [(Any) 0]], 1 => [[(Any) (Any)] [(Any) 1]]} 4283405733504 4283405794952 |
||
Xliff_ | Huh! Maybe not. | ||
guifa_ | Just updated Polyglot::Regexen on fez | 00:38 | |
Massively improved support for ECMA262 | |||
and best of all.....it uses RakuAST :D :D :D | |||
still need to push the code to Github | 00:39 | ||
01:14
evalable6 left,
linkable6 left
01:15
evalable6 joined
01:16
razetime joined
01:17
linkable6 joined
01:30
MasterDuke joined
02:04
gfldex left
02:06
gfldex joined
02:44
teatwo left
02:46
teatime joined
02:58
teatime left,
rypervenche joined,
teatime joined
03:01
guifa_ left
|
|||
antononcube | @guifa "Just updated Polyglot::Regexen on fez" -- Cannot install it! 😢 | 03:20 | |
@guifa 4 tests out 12 failed : " # Failed test 'Exactly some number'" , " Failed test 'Frugal exactly some number'" , etc. | 03:21 | ||
@guifa Sorry to be a the bearer of bad news... | |||
03:25
rf left
03:33
poohman joined
03:35
poohman left,
poohman joined
|
|||
poohman | hello all, lets say I have a function sub test(@a, %b, %c){....}. Is there a way to say my $test_modified=test(@a=>@an_array), so that I can use $test_modified(%b,%c)? | 03:39 | |
I basically want to pass one argument before hand | 03:42 | ||
04:24
razetime left
04:45
razetime joined
04:59
razetime left
05:44
poohman left
05:45
siavash joined
06:00
reportable6 left
06:03
reportable6 joined
06:44
jpn joined
06:59
merp left
|
|||
siavash | .tell poohman `my &test_modified = &test.assuming: @a;` | 07:00 | |
tellable6 | siavash, I'll pass your message to poohman | ||
07:03
merp joined
07:08
jpn left
07:20
jpn joined
07:22
siavash is now known as CIAvash
07:52
sena_kun joined
07:59
Sgeo left
08:02
dakkar joined
08:13
teatwo joined
08:15
teatwo left,
teatwo joined
08:16
teatime left
08:49
ab5tract joined
09:11
silug left
09:13
abraxxa-home joined
09:18
abraxxa-home left
09:20
abraxxa-home joined
09:31
sena_kun left
|
|||
guifa | anton: update Rakudo, lizmat pushed an update to deparsing frugal indicators :-) | 09:52 | |
09:59
ab5tract left
|
|||
guifa | unicode.org/reports/tr18/ <-- interesting. we support half of this | 10:26 | |
nemokosch | which half? ^^ | 10:28 | |
guifa | union intersection | ||
Can basically do set/symetric difference by using & between two separate char class <[a..f+> & <[d..h]>, but to allow the nesting syntax they propose we'd have to ban [ + - ∖ ⊖ as literals which would be a breaking change | 10:30 | ||
or actually | 10:32 | ||
no | 10:33 | ||
<([a..c]+[d..f])⊖[c..e]> | 10:34 | ||
we could parentheses like that and that wouldn't be breaking at all | |||
because they're currently invalid there | |||
antononcube | @guifa I can install “Polyglot::Regexen” on/in/with moar-blead? | 10:37 | |
10:41
abraxxa-home left
|
|||
nemokosch | you could do a "triple" | 10:41 | |
rakubrew triple | |||
builds Rakudo, MoarVM and NQP from HEAD | |||
(by default) | |||
guifa | I've not used moar-blead. I just do the perl Configure.pl, make, make install on a freshly checked out version of rakudo from github. No need to update MoarVM, just Rakudo | ||
guifa is off to $day-job | 10:42 | ||
10:50
jpn left
10:59
jpn joined
11:48
jpn left
12:00
reportable6 left
12:02
reportable6 joined
12:20
CIAvash left
12:22
jgaz left,
jgaz_ joined
12:25
[Coke] joined
12:36
ab5tract joined
12:57
ab5tract left
13:04
jpn joined
13:22
poohman joined
13:26
gugod left
13:28
gugod joined
13:29
ab5tract joined
|
|||
nemokosch | m/[ \' ( .*?) \' ]+/; $0.join(Q/'/) | 13:48 | |
I think this is all it takes to process a Pascal-style string literal | 13:49 | ||
Anyway, I think this is the simplest quoting structure without forbidden content | 13:50 | ||
13:59
Xliff left
14:00
Xliff_ left,
abraxxa-home joined
14:10
jpn left
|
|||
antononcube | @librasteve Well, in my most recent post I (mis-)used "Physics::Unit". As you explained, "Physics::Measure" should have been used. | 14:13 | |
14:14
jpn joined
14:25
abraxxa-home left
14:31
samcv left
14:32
samcv joined
15:12
ab5tract left
16:12
linkable6 left,
evalable6 left
16:14
evalable6 joined,
linkable6 joined
16:18
razetime joined
16:35
dakkar left
16:41
jpn left
|
|||
librasteve | @antononcube - I will read and comment there then | 16:45 | |
16:45
jpn joined
|
|||
antononcube | I made both a Jupyter and a Mathematica notebooks from the Markdown of that post — I will upload them soon. So, proper use of “Physics::Measure” would appear there. | 16:51 | |
16:55
jpn left
16:58
jpn joined
17:00
silug joined
17:30
poohman left
17:48
sena_kun joined
17:52
razetime left
18:00
reportable6 left
18:02
reportable6 joined
18:47
jpn left
19:12
jpn joined
19:16
jpn left
19:52
jjido joined
20:02
Ven_de_Thiel joined
20:08
jpn joined
20:12
notna joined,
jpn left
20:14
tea3po joined
20:17
notna left
20:18
teatwo left
20:24
tea3po left
20:25
tea3po joined
20:29
jjido left
20:48
jpn joined
21:07
jpn left
21:10
jpn joined
21:50
jpn left
22:19
sena_kun left
22:43
Sgeo joined
22:44
Ven_de_Thiel left
23:08
jpn joined
23:14
jpn left
|