🦋 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:05 marcusr left 00:06 marcusr joined 00:33 a3f left
summerisle looks like the new file extensions are finally picked up on GH 00:35
guifa2 summerisle: even rakutest? 00:41
summerisle strangely not (it looks like), though that was included in the PR that added the extensions... 00:42
00:43 a3f joined
summerisle looks like it didn't add .rakutest 00:53
01:02 pecastro left
summerisle so it appears that the reason .rakutest is not included is some bureaucratic nonsense - github.com/github/linguist/pull/51...-739561686 01:03
essentially, while .rakumod and .raku are common enough, .rakutest isn't as common and therefore was not considered eligible to be associated 01:04
01:04 mowcat left
summerisle which is asinine, imo 01:04
01:04 mowcat joined
guifa2 summerisle: yeah that's what I remember it being left at when they first discussed it 01:07
01:07 mowcat left
guifa2 I need to remember to change my endings over 01:07
01:08 mowcat joined 01:15 Doc_Holliwood left, leont left 01:16 Doc_Holliwood joined 01:20 DarthGandalf left 01:40 DarthGandalf joined 02:16 Xliff left 02:18 mowcat left, mowcat joined 02:19 mowcat left 02:20 mowcat joined, mowcat left 02:21 mowcat joined 02:23 mowcat left, mowcat joined 02:29 mowcat left, mowcat joined 02:30 mowcat left 02:31 mowcat joined 02:34 mowcat left, mowcat joined 02:38 Kaiepi left, gnufr33dom joined 02:46 Doc_Holliwood left, kvw_5 joined 02:49 kvw_5_ left
xinming_ SmokeMachine: after the row is created via XX::Model.^create(...); We should rebuild the row by fetching data from db, otherwise, We'll have some column missing 03:08
and inconsistency
03:20 mowcat left 03:21 mowcat joined, mowcat left 03:22 mowcat joined 03:36 Kaiepi joined 03:38 wamba joined 03:46 mowcat left 03:48 JRaspass left 03:59 nevore joined 04:21 sortiz joined 04:37 nevore left 04:44 nevore joined 05:05 Sgeo left 05:07 DinoAllo left 05:34 afang joined, sjn left 05:35 afang left 05:36 xinming joined 05:38 rindolf joined 05:39 xinming_ left, wamba left, guifa2 left 05:40 sjn joined 05:57 nevore left 05:58 domidumont joined 06:04 nevore joined 06:13 nevore left 06:26 vike left 06:41 __jrjsmrtn__ joined 06:42 _jrjsmrtn left 06:45 vike joined 06:48 Sgeo joined 06:50 aindilis` joined 06:52 aindilis left 07:10 vike left 07:14 vike joined 07:18 neshpion left 07:34 sxmx left
SmokeMachine xinming: could you show me a example, please? 07:35
07:38 synthmeat left 07:39 synthmeat joined 07:45 marcusr left 07:46 marcusr joined, sxmx joined 07:59 wamba joined 08:04 parabolize left 08:10 pecastro joined 08:11 sxmx left, sxmx joined
sortiz g'night #raku 08:22
08:22 sortiz left 08:35 dakkar joined 08:36 Sgeo left 09:16 sena_kun left 09:18 sena_kun joined 09:19 marcusr left 09:21 marcusr joined 09:33 Doc_Holliwood joined 09:38 leont joined 09:53 brtastic joined 09:57 brtastic left 10:01 brtastic joined 10:04 brtastic left 10:06 brtastic joined 10:09 JRaspass joined 10:10 cooper left 10:11 cooper joined 10:14 gnufr33dom_ joined, asymptotically left, gnufr33dom left, asymptotically joined 10:16 gnufr33dom_ is now known as gnufr33dom
lizmat clickbaits rakudoweekly.blog/2021/02/22/2021-08-first-21/ 10:20
10:30 gnufr33dom left 10:31 wamba left 10:34 patrickbkr[m] joined, pony left 10:36 brtastic left 10:38 brtastic joined 10:45 linkable6 left 10:46 linkable6 joined 10:48 sno left 10:59 Black_Ribbon left 11:02 brtastic left 11:07 wamba joined 11:08 linkable6 left 11:10 linkable6 joined 11:24 aindilis` left 12:10 PimDaniel joined
PimDaniel Hi \o 12:10
Is : %!matching{$k}:delete unless $k ∈ $!left.keys; better than %!matching{$k}:delete unless $!left{$k}:exists? or the opposite? 12:11
I mean is ∈ better or worse than :exists in the case of a hash/Set/SetHash key? 12:13
12:14 marcusr left 12:16 marcusr joined
lizmat m: my %h = a => 42, b => 666; my $then = now; %h<a>:exists for ^100000; say now - $then 12:19
camelia 0.0376672
lizmat m: my %h = a => 42, b => 666; my $then = now; %h<a>:exists for ^1000000; say now - $then
camelia 0.29433666
lizmat m: my %h = a => 42, b => 666; my $then = now; "a" ∈ %h for ^1000000; say now - $then 12:20
camelia WARNINGS for <tmp>:
0.18279961
Useless use of "∈" in expression "\"a\" ∈ %h" in sink context (line 1)
lizmat m: my %h = a => 42, b => 666; my $then = now; my $b := "a" ∈ %h for ^1000000; say now - $then
camelia 0.1786981
lizmat m: my %h = a => 42, b => 666; my $then = now; my $b := %h<a>:exists for ^1000000; say now - $then
camelia 0.2896107
12:21 PimDaniel left
lizmat from performance point of view, ∈ is about 60% faster ? 12:21
12:21 PimDaniel joined
lizmat note that you can call ∈ on the hash directly, no need to call it on its keys 12:22
m: my %h = a => 42; dd %h<d>:delete; dd %h 12:23
camelia Any
Hash %h = {:a(42)}
lizmat note that deleting a key that does not exist, is *not* an offense :-)
so you don't actually need to check for existence before deletion
PimDaniel: you might want to check the log for the whole story :-) 12:24
PimDaniel Thank's Lizmat
I try to understand, so i'm reading what you wrote. My mind is very slow, sorry! 12:26
what is for ^100000 ? 0 .. 100000? 12:27
lizmat 0 .. 100000 - 1
the ^ means to exclude the endpoint
PimDaniel Ok ok!
lizmat so effectively it is 0 .. 99999 12:28
in comparisons it would just exclude the endpoint
m: say 99999.999 ~~ ^100000
camelia True
lizmat m: say 100000 ~~ ^100000
camelia False
PimDaniel It seams that ∈ is faster but haaa i cant't read anymore on the top. 12:30
lizmat colabti.org/irclogger/irclogger_lo...02-23#l135 12:31
PimDaniel Sure that my Irssi Linux Ascii chars app has a pagination key but i do not know yet which. 12:32
I'm trying to translate a python code hopcropft_and_karp_bipartite_graph matching algorithm to Raku. 12:33
I'll publish it and i'm sure many will propose optimizations. 12:34
lizmat ++PimDaniel
PimDaniel Don't be to optimistic : I'm null in maths. :( 12:35
*too optimistic 12:36
Thank's a lot Lise! 12:37
12:40 guifa2 joined 12:43 JRaspass left 12:47 PimDaniel left, JRaspass joined 12:51 JRaspass left 13:08 lizmat_ joined 13:13 lizmat_ is now known as lizmat
MasterDuke lizmat: i'm surprised ∈ is faster, not what i would have expected 13:22
13:23 lizmat_ joined 13:24 lizmat left 13:25 lizmat_ left, lizmat joined 13:26 mowcat joined
MasterDuke looks like it's just the overhead of going through `postcircumfix:<{ }>`, because calling EXISTS-KEY directly is even faster 13:33
m: my %h = a => 42, b => 666; my $then = now; my $b := %h.EXISTS-KEY("a") for ^1000000; say now - $then
camelia 0.02246
El_Che lo
13:44 lucasb joined 13:49 PimDaniel joined
PimDaniel Hi \o 13:49
Is there a way to debug seriously? 13:50
13:50 cgfbee left
PimDaniel I've a recursing method and and while(True) loop, i'm looping infinite into while True loop, i know why but i can't really understand. Thank's! 13:51
cetjs2 мяу
PimDaniel Of course my while(True) loop has last conditions. 13:52
El_Che PimDaniel: Comma has a debugger, but I haven 't used it
PimDaniel thank's El_Che. I installed Comma. Do you mean in non paying version? I see a part of debugging menus are greyed. 13:53
13:55 lizmat_ joined
PimDaniel Unfortunately i should have to commit my last version that worked before i replaced each :exists with ∈ :/ 13:57
13:58 lizmat left 13:59 ctilmes joined
PimDaniel But i'm quite sure this has nothing to do with this : probably more an random thing. 13:59
A random behavior. 14:00
ctilmes rakudo 2021.02 is now in alpine:edge. You can install with "apk add rakudo" (or "apk add zef" if you need that) -- let me know if anything is broken in it.
El_Che ctilmes: \o/ 14:01
PimDaniel Is it faster? :)))
El_Che edge? No, it's the dev branch 14:05
PimDaniel Ok but my question was a few ironic! Sorry! 14:06
El_Che your humour is edgy
(see wthat I did there? :) ) 14:07
14:08 Sgeo joined
PimDaniel Ok I'll never do it again. 14:11
El_Che no, do it whenever you like
PimDaniel back later 14:15
Thank you all for your help.
14:15 PimDaniel left 14:21 JRaspass joined, mowcat left
kawaii Hello :) I'm trying to replace spaces in a filename with hyphens, but apparently this is a null regex and not allowed? 14:45
www.irccloud.com/pastebin/geAbPBVH/
lizmat_ s/ ' ' / 14:47
whitespace in regexes are not significant in raku
alternately, you could write:
my $filename = $title.subst(' ',:g) 14:48
my $filename = $title.subst(' ','-',:g)
m: my $title = "foo bar baz"; my $filename = $title.subst(' ','-',:g); say $filename
camelia foo-bar-baz
kawaii lizmat_: thank you <3 14:49
14:49 lizmat_ is now known as lizmat 15:02 berber44 joined 15:09 wamba left 15:35 DiffieHellman left 15:36 DiffieHellman joined 15:43 mowcat joined 15:59 parabolize joined 16:04 wamba joined 16:12 elcaro left 16:13 elcaro joined 16:14 maggotbrain left 16:15 maggotbrain joined
tonyo vrurg_: i'll manually remove that package until i can get the dep chain you suggested done 16:43
vrurg_: actually, i don't see the 0.1.9xx you're referring to as indexed 16:51
17:02 abraxxa left 17:26 domidumont left 17:45 brtastic joined 17:51 guifa2 left 17:54 dakkar left, guifa2 joined 18:13 aluaces left 18:27 wamba left
guifa2 When things work beautifully, they work beautifully: 18:31
cetjs2 мяу
guifa2 m: say buf8.new(0 xx 4, 2 xx 2, 4 xx 2, 8 xx 4) 18:32
camelia Buf[uint8]:0x<00 00 00 00 02 02 04 04 08 08 08 08>
18:33 aborazmeh joined 18:41 aluaces joined 18:42 neshpion joined 19:06 xelxebar_ joined 19:07 xelxebar left 19:16 vrurg_ is now known as vrurg 19:30 kaiwulf joined 19:46 PimDaniel joined
PimDaniel Hi \o 19:46
May be i'm too late? 19:47
I'm just wondering what is a hash key type when you don't quote it.
summerisle like %hash<key>? 19:49
it's a string
or Str
i believe
MasterDuke a hash by default has key type Str
summerisle %hash{key} would look for key (without a container) 19:50
19:51 wamba joined
PimDaniel ok ok 19:52
Ok so this could explain my bug 19:53
cause the algorithm reverts keys and values, and make === or !=== on them, then type mismatch. I must look at where it fails. 19:54
Ok, bonne nuit à tous. 19:58
19:58 PimDaniel left 20:41 dg left 20:53 dg joined 20:54 ctilmes left 21:11 lucasb left 21:14 lucasb joined 21:26 Black_Ribbon joined 21:33 Geth left 21:54 tejr left 21:56 aborazmeh_ joined, aborazmeh left 21:57 tejr joined 22:23 rindolf left 22:30 phillid joined 22:31 Victorsueca joined, Victorsueca is now known as Guest32923, Guest43987 joined, Guest32923 left 22:32 phillid left, Guest43987 left 22:35 woodface joined, woodface left 22:42 DominianSY joined, DominianSY left 22:47 Doc_Holliwood left 22:48 eater joined, Bucciarati joined 22:49 ribasushi joined 22:54 Fady joined 22:55 cheapieEV joined, cheapieEV left
Fady hello ! 22:55
codesections hi :) 22:56
22:58 SWATAR joined, AtlasZX joined 22:59 SWATAR left 23:03 AtlasZX left 23:07 Fady left 23:10 aborazmeh_ left 23:19 wamba left
guifa2 kind of wishes he could do `use Foo::Bar::<A B C>` 23:30
guifa2 kind of wishes someone would say "oh, but you can! it's just $slightly-different-syntax" 23:31
23:38 dogbert11 left
elcaro so to be clear, would `use F::B::<A B C>;` be equiv to doing `use F::B::A; use F::B::B; use F::B::C;` ? 23:38
23:39 dogbert11 joined 23:40 brtastic left 23:42 dogbert17 joined
guifa2 elcaro: yeah 23:43
23:44 dogbert11 left
guifa2 Basically i'd expect it to work like doing either %modules{'Foo'; 'Bar'; <A B C>} or %modules<Foo><Bar><A B C> (if either of those were valid ways to access modules, of course) 23:44
elcaro yeah, it gets a bit weird with args. I guess they'd sent to all 3? `use F::B::<A B C> <X Y Z>` 23:45
I can't see it happening in core, but macro's might make it possible to create syntax that does what you want
23:46 dogbert2 joined
guifa2 Ah that's true, I didn't think about arguments 23:46
23:47 dogbert11 joined, dogbert11 left
guifa2 Right now I just have a section in one module that's got about a dozen uses, all with the same three-package prefix 23:47
23:48 dogbert17 left 23:49 dogbert11 joined
guifa2 Is there a better way to uniquely identify a type object other than .WHICH or .WHERE? Those aren't available at compile (e.g. during trait application) 23:50
elcaro Couldn't your front-end module's &EXPORT potentially take a list of args and export whole sub-modules into the callers namespace?
re: comp-time alternatives to .WHICH and .WHERE... i'm not sure 23:51
23:51 dogbert2 left
guifa2 elcaro: hmmm. This is all internal, so it feels weird writing a module to import modules within my module (lol), but I did just write a trait for save me typing for lazy loading the attributes so… maybe ^_^ 23:57