šŸ¦‹ 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:01 frost-lab joined 00:14 Doc_Holliwood left
moon-child m: say [+] 1024..* 00:16
camelia Inf
timotimo m: .say for [\+] 1024..* 00:20
camelia (timeout)1024
2049
3075
4102
5130
6159
7189
8220
9252
10285
11319
12354
13390
14427
15465
16504
17544
18585
19627
20670
21714
22759
23805
24852
25900
26949
27999
29050
30102
31155
32209
332ā€¦
00:29 mowcat left
jmou hi! i am just learning raku. wondering if anyone can explain ~~ with Match objects 00:41
m: 'a' ~~ /(.)/; say 'b' ~~ $0
camelia ļ½¢aļ½£
jmou m: 'a' ~~ /(.)/; say 'b' ~~ ~$0
camelia False
timotimo sourceable6: Match.new(), ACCEPTS
sourceable6 timotimo, No idea, boss. Can you give me a Code object? Output: 04===SORRY!04=== Error while compiling /tmp/QoacIMGixrā¤Undeclared name:ā¤ ACCEPTS used at line 1ā¤ā¤
timotimo sourceable6: Match.new(), "ACCEPTS"
sourceable6 timotimo, No idea, boss. Can you give me a Code object?
jmou Match doesn't seem to have ACCEPTS, so wondering why it returns a truthy in the first example? 00:42
AlexDaniel` sourceable6: Match.new().ACCEPTS 00:44
sourceable6 AlexDaniel`, github.com/rakudo/rakudo/blob/4b6b...Mu.pm6#L20
AlexDaniel` timotimo: why overthink it :)
timotimo haha, ok
AlexDaniel` sourceable6: Match.new().ACCEPTS(ā€˜fooā€™)
sourceable6 AlexDaniel`, github.com/rakudo/rakudo/blob/4b6b...h.pm6#L238
00:44 lucasb left
jmou ah so it does have ACCEPTS... 00:46
timotimo is it docced at all? 00:47
jmou is there an intuition for why a Match object should return itself in ~~ ?
mmm i don't think so... docs.raku.org/routine/ACCEPTS
found the commit for Match.ACCEPTS *hmm* github.com/rakudo/rakudo/commit/b4...3fa5a94776 00:53
01:04 Tirifto left
timotimo it's probably for when you have something that does a match on the RHS on ~~ 01:25
like a $blan ~~ m/foo/ would do that
jmou ah i can see that. i suppose you could also write $blah ~~ /foo/ to not use a Match on the RHS 01:30
but it makes sense
02:00 rindolf joined
timotimo coverage data from the tests should be able to tell us what tests that it does that, and then we'd also have the right spot in the design documents to look 02:07
02:33 defaultxr left 02:39 defaultxr joined
xinming Can we do multi dispatch on whenever? 03:04
timotimo not sure how exactly you mean that
xinming Something like, react { whenever $supply -> ('a') { ... }; whenever $supply -> ('b') { ... } }; 03:05
timotimo you can use multile `when` inside of a `whenever` since it sets `$_`
xinming got it, thanks
timotimo you could do that with .grep on supplies, but then you won't have "if a more specific rule matched, don't match any of the others" semantics like given/when or multi-dispatch haev 03:06
xinming timotimo: Thanks, Will use `when` approach 03:09
m: my $s = supply { emit(("X", "a")); emit(("Y", "b")) }; react { whenever $s { when (my $t, "a") { $t.say }; when ($t, "b") { "b".say } } } 03:17
camelia (Any)
b
xinming timotimo: Is it possible to do assignment to var too?
Just like multi dispatch, the var is also assigned.
timotimo m: given ("X", "a") { when :(my $t, "a") { say $t }; say "hmm" } 03:19
camelia 5===SORRY!5=== Error while compiling <tmp>
Invalid typename 'my' in parameter declaration.
at <tmp>:1
------> 3given ("X", "a") { when :(my7ā5 $t, "a") { say $t }; say "hmm" }
timotimo m: given ("X", "a") { when :($t, "a") { say $t }; say "hmm" }
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3iven ("X", "a") { when :($t, "a") { say 7ā5$t }; say "hmm" }
timotimo m: given ("X", "a") { when :(*, "a") -> $t, "a" { say $t }; say "hmm" }
camelia ===SORRY!===
Internal error: find_var_decl could not find $_
timotimo haha, oops
that's not great
xinming :You find a bug
OUTPUT: Ā«===SORRY!===ā¤Internal error: find_var_decl could not find $_ā¤Ā» 03:20
03:20 frost-lab left 03:24 cpan-raku left 03:44 cpan-raku joined, cpan-raku left, cpan-raku joined 04:16 leont left 04:51 ribasushi left 04:54 japhb left, japhb joined, wmoxam left, wmoxam joined 04:55 ribasushi joined 05:08 eater left 05:09 eater joined 05:11 warriors joined 05:12 rjbs left, rjbs joined 05:28 a6502 left, a6502 joined 05:33 TheOneWhoSighs joined 05:36 TheOneWhoSighs left 06:36 nativecallable6 left, unicodable6 left, tellable6 left, notable6 left, sourceable6 left, squashable6 left, evalable6 left, bisectable6 left, benchable6 left, bloatable6 left, coverable6 left 06:37 bisectable6 joined, unicodable6 joined 06:38 notable6 joined, evalable6 joined, bloatable6 joined, benchable6 joined, nativecallable6 joined 06:39 squashable6 joined, sourceable6 joined, coverable6 joined 06:40 tellable6 joined 07:29 moony left 07:30 silug left, moony joined 07:37 wbn left
notandinus what is the recommended config module? 07:45
star distribution included toml and yaml, should i go with those or simple ini? 07:46
07:49 silug joined
moon-child notandinus: I would go with toml. Yaml is really annoying, and toml is basically formalised ini 07:50
07:50 squashable6 left 07:51 squashable6 joined
notandinus moon-child: i see, toml looks good. i'll use that, thanks. 07:57
also do you have links to a good guide to read before creating a backup system for personal use? i'll just define profiles (list of files) & tar them. 07:58
moon-child noooo don't do that 08:01
use zfs
make snapshots 08:02
notandinus oh, i use obsd so no zfs 08:04
moon-child :/
I probably would use openbsd if it had zfs
notandinus is this a very bad idea? i've been taking daily backups of some files, i've put it in cron
seems to work fine, alsoit sync all files to other devices, very simple tar + gpg backup 08:05
what is recommended directory structure for a raku program? 08:09
08:10 Doc_Holliwood joined, parabolize left 08:53 Altai-man joined 09:10 sena_kun joined 09:11 Altai-man left 09:19 sjm_uk joined 09:30 squashable6 left 09:31 squashable6 joined 09:48 wamba joined
epony merry OpenBSD Xmas! 09:49
notandinus what is the equivalent of strftime (Perl) in Raku? 10:08
sena_kun notandinus, docs.raku.org/type/Dateish#method_formatter <- ? 10:20
10:24 aborazmeh joined, aborazmeh left, aborazmeh joined 10:25 wbn joined 10:41 warriors left 10:54 aborazmeh left 10:56 Black_Ribbon left 10:57 sno joined 11:02 Doc_Holliwood left 11:14 Sgeo left 11:26 jferrero joined 11:41 dotdotdot left 12:01 dotdotdot joined 12:14 anx joined
anx p6: say 3 12:15
camelia 3
anx Long back while i coded in perl, there was perl6 under development, also called parrot at the time. Is it renamed to Raku ? 12:18
tyil anx: yes 12:19
tellable6 2020-12-23T16:37:42Z #raku <melezhik> tyil Hi Patrick! Could you please comment on this? github.com/melezhik/sparky/pull/2#...-750376484 , thanks
anx Thanks for response tyil 12:20
lizmat anx: also, Parrot is no more, Raku currently runs on MoarVM, JVM and Javascript 12:21
anx ok, I would like to know more about raku. I will browse the website, thanks lizmat 12:22
notandinus sena_kun: i see, thanks 12:26
how do i do something like: " my @t = all elements of @set_a which are not present in @set_b" ? 12:27
i'm currently iterating over @set_a and pushing unless @set_b āˆ‹ $ 12:29
sena_kun m: my $a = set(1, 2, 3); my $b = set(2); say $a (-) $b; 12:32
camelia Set(1 3)
sena_kun notandinus, there is a set difference operator
notandinus, docs.raku.org/language/operators#i..._%E2%88%96
12:35 leont joined
notandinus sena_kun: ah isee, thanks, that's nice 12:36
12:51 ensamvarg195 joined 12:52 ensamvarg195 left 12:54 ensamvarg195 joined 12:55 ensamvarg195 left 12:57 ensamvarg195 joined 13:09 Altai-man joined 13:11 sena_kun left 13:31 zln joined 13:37 anx left
notandinus how do i convert a set to a list? 13:37
i performed the set difference on 2 lists and it returned a set, i want to convert that to a list
grondilu m: say <foo bar>.Set.List 13:40
camelia (bar => True foo => True)
grondilu m: say <foo bar>.Set.List.keys
camelia (0 1)
grondilu :/
m: say <foo bar>.Set.List>>.keys
camelia ((foo) (bar))
grondilu m: say <foo bar>.Set.keys 13:41
camelia (foo bar)
grondilu ^probably like this
notandinus i see, thanks , its mentioned in docs/type/Set
just read that
13:55 lucasb joined 14:24 thdrmz joined 15:24 squashable6 left, coverable6 left, benchable6 left, notable6 left, sourceable6 left, tellable6 left, bloatable6 left, unicodable6 left, quotable6 left, nativecallable6 left, bisectable6 left, evalable6 left, greppable6 left, shareable6 left, statisfiable6 left, releasable6 left, linkable6 left, committable6 left, benchable6 joined, linkable6 joined 15:25 nativecallable6 joined, greppable6 joined, sourceable6 joined, statisfiable6 joined, unicodable6 joined, evalable6 joined, coverable6 joined, bisectable6 joined 15:26 notable6 joined, tellable6 joined, squashable6 joined, releasable6 joined, bloatable6 joined, quotable6 joined, committable6 joined, shareable6 joined 15:44 parabolize joined 15:46 leont left 16:14 _jrjsmrtn joined, __jrjsmrtn__ left 16:38 thdrmz left 17:05 brtastic joined 17:10 sena_kun joined 17:11 Altai-man left
xinming m: $_ = <a b>; when my ($a, $b) { .say; } 17:22
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
xinming Is this a bug?
17:51 thdrmz joined
grondilu sourceable6: when 18:08
sourceable6 grondilu, No idea, boss. Can you give me a Code object? Output: 04===SORRY!04=== Error while compiling /tmp/sWHcp8vnOhā¤Whitespace required after keyword 'when'ā¤at /tmp/sWHcp8vnOh:1ā¤------> 03when08ā04<EOL>ā¤
grondilu m: when
camelia 5===SORRY!5=== Error while compiling <tmp>
Whitespace required after keyword 'when'
at <tmp>:1
------> 3when7ā5<EOL>
grondilu had no idea 'when' was a keyword
m: given <a b> { when my $a { .say } } 18:09
camelia (a b)
grondilu m: given <a b> { when my ($a, $b) { .say } } 18:10
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
grondilu m: given "foo" { when my ($a, $b) { .say } }
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
grondilu m: given "foo" { when my ($, $) { .say } }
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
grondilu m: given "foo" { when my $ { .say } }
camelia foo
grondilu looks like a bug indeed, though the semantic is dubious 18:11
m: given "foo" { when my $ { .say }; default { say "bar" } }
camelia foo
grondilu m: given "foo" { when my $ = 0 { .say }; default { say "bar" } }
camelia bar
18:21 cpan-raku left 18:22 cpan-raku joined, cpan-raku left, cpan-raku joined 19:00 warriors joined 19:02 thdrmz left 19:04 thdrmz joined 19:22 Sgeo joined 19:27 thdrmz left, thdrmz1 joined 19:30 thdrmz1 is now known as thdrmz, Doc_Holliwood joined 19:38 brtastic left 19:41 agentzh left, agentzh joined, agentzh left, agentzh joined 19:56 melezhik joined
melezhik there is a Sparky feature request - SCM polling VS web hooks discussion, join if you can - github.com/melezhik/sparky/issues/3 19:56
20:01 pecastro left 20:02 pecastro joined 20:09 melezhik left 20:39 tejr left 20:40 tejr joined, tejr left 20:45 tejr joined 20:47 sjm_uk left 21:09 Altai-man joined 21:11 sena_kun left 21:36 rindolf left 21:39 n1n3fly joined, wamba left 21:43 Tirifto joined 22:24 Doc_Holliwood left 22:37 brtastic joined 22:44 n1n3fly left 22:53 brtastic left
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/12/25/coercive-files/ 23:00
23:15 Altai-man left 23:31 jmchael left 23:43 jmchael joined