🦋 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:07 lucasb left 00:25 sena_kun left 00:33 pmurias left 00:48 xinming_ left 00:49 xinming_ joined 01:21 Voldenet joined, Voldenet left, Voldenet joined 01:39 wildtrees left 01:52 hythm joined 02:30 squashable6 joined
Geth ecosystem: hythm7++ created pull request #473:
Add Grid to p6c
02:36 gdonald_ joined, gdonald_ left 03:06 ZzZombo_ joined 03:08 ZzZombo_ is now known as ZzZombo
japhb .tell ab6tract Oh, you know, the usual -- super busy and not enough time for fun hacking. :-P 03:34
tellable6 japhb, I'll pass your message to ab6tract 03:35
04:13 squashable6 left, KotH joined 04:15 squashable6 joined 04:38 angelds joined 04:55 Xliff left 05:17 angelds left 05:18 angelds joined 05:21 stoned75 left 05:38 rindolf joined 05:39 angelds left 05:40 angelds joined 05:44 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 05:47 angelds left, angelds joined 05:52 angelds left, jaldhar_ joined 05:54 hythm left 05:56 robertle left 05:58 jaldhar_ left, jaldhar_ joined 06:01 colomon joined 06:03 lgtaube joined 06:05 ZzZombo left 06:10 lgtaube left 06:23 ZzZombo joined, lgtaube joined 06:26 lucs left 06:38 ZzZombo_ joined 06:40 ZzZombo left, ZzZombo_ is now known as ZzZombo 06:50 jaldhar_ left, jaldhar_ joined 06:58 jaldhar_ left, jaldhar_ joined 07:00 jaldhar_ left, jaldhar_ joined 07:02 maettu left, jaldhar_ left, jaldhar_ joined 07:04 jaldhar_ left, jaldhar_ joined 07:06 jaldhar_ left, jaldhar_ joined 07:09 maettu joined 07:10 jaldhar_ left, jaldhar_ joined 07:14 jaldhar_ left, jaldhar_ joined, kensanata joined 07:16 jaldhar_ left, jaldhar_ joined 07:18 jaldhar_ left, jaldhar_ joined 07:20 jaldhar_ left, jaldhar_ joined 07:22 jaldhar_ left, jaldhar_ joined 07:30 jaldhar_ left, jaldhar_ joined 07:31 wamba joined 07:32 jaldhar_ left, jaldhar_ joined 07:34 jaldhar_ left, jaldhar_ joined 07:36 jaldhar_ left, jaldhar_ joined 07:38 jaldhar_ left, jaldhar_ joined 07:42 jaldhar_ left, jaldhar_ joined 07:46 jaldhar_ left, jaldhar_ joined 07:49 abraxxa joined 07:50 jaldhar_ left, jaldhar_ joined 07:52 jaldhar_ left, jaldhar_ joined 07:54 jaldhar_ left, jaldhar_ joined 07:58 jaldhar_ left, jaldhar_ joined 08:02 jaldhar_ left, mid_home left, jaldhar_ joined 08:04 jaldhar_ left, jaldhar_ joined 08:06 jaldhar_ left, jaldhar_ joined 08:08 jaldhar_ left, jaldhar_ joined 08:10 jaldhar_ left
Geth ecosystem: 9d92f2fee5 | (Haytham Elganiny)++ | META.list
Add Grid to p6c
ecosystem: 88d05a7bd6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #473 from hythm7/master

Add Grid to p6c thanks!
08:10 jaldhar_ joined 08:11 cpan-raku left 08:16 jaldhar_ left, jaldhar_ joined 08:17 cpan-raku joined, cpan-raku left, cpan-raku joined 08:18 jaldhar_ left, jaldhar_ joined 08:20 jaldhar_ left, jaldhar_ joined 08:22 jaldhar_ left, jaldhar_ joined 08:24 jaldhar_ left, jaldhar_ joined 08:26 jaldhar_ left, jaldhar_ joined 08:28 jaldhar_ left, jaldhar_ joined 08:30 jaldhar_ left, jaldhar_ joined 08:32 jaldhar_ left, jaldhar_ joined 08:36 jaldhar_ left, jaldhar_ joined 08:38 jaldhar_ left, jaldhar_ joined 08:40 jaldhar_ left, jaldhar_ joined 08:42 jaldhar_ left, jaldhar_ joined 08:43 abraxxa left, abraxxa joined 08:44 jaldhar_ left, jaldhar_ joined 08:48 wamba left, jaldhar_ left, jaldhar_ joined 08:49 sena_kun joined 08:50 jaldhar_ left, jaldhar_ joined 08:56 jaldhar_ left, abraxxa left, jaldhar_ joined, abraxxa joined 08:58 jaldhar_ left, jaldhar_ joined 08:59 abraxxa left 09:01 robertle joined 09:02 jaldhar_ left, jaldhar_ joined 09:04 jaldhar_ left, jaldhar_ joined 09:06 jaldhar_ left, jaldhar_ joined 09:08 abraxxa joined, Altai-man_ joined 09:11 sena_kun left 09:12 jaldhar_ left, jaldhar_ joined 09:14 jaldhar_ left, jaldhar_ joined 09:18 jaldhar_ left, jaldhar_ joined 09:20 jaldhar_ left, jaldhar_ joined 09:22 jaldhar_ left, jaldhar_ joined 09:24 jaldhar_ left, jaldhar_ joined 09:26 jaldhar_ left, jaldhar_ joined 09:28 jaldhar_ left, jaldhar_ joined 09:30 jaldhar_ left, jaldhar_ joined 09:32 jaldhar_ left, jaldhar_ joined 09:34 jaldhar_ left, jaldhar_ joined 09:35 wamba joined 09:36 jaldhar_ left, abraxxa left, jaldhar_ joined, abraxxa joined 09:37 wamba left 09:38 wamba1 joined, jaldhar_ left, jaldhar_ joined 09:42 wamba1 left 09:52 wamba1 joined 09:54 jaldhar_ left, jaldhar_ joined 09:56 jaldhar_ left, jaldhar_ joined 09:58 wamba1 left 10:02 finanalyst joined 10:04 jaldhar_ left, jaldhar_ joined 10:08 jaldhar_ left, jaldhar_ joined 10:10 jaldhar_ left, jaldhar_ joined 10:12 jaldhar_ left, squashable6 left, jaldhar_ joined, squashable6 joined 10:14 jaldhar_ left, jaldhar_ joined 10:16 jaldhar_ left, jaldhar_ joined 10:18 jaldhar_ left, jaldhar_ joined 10:20 jaldhar_ left, jaldhar_ joined 10:22 jaldhar_ left, jaldhar_ joined 10:24 jaldhar_ left, jaldhar_ joined 10:26 jaldhar_ left, jaldhar_ joined 10:28 jaldhar_ left, jaldhar_ joined 10:30 jaldhar_ left, jaldhar_ joined 10:32 jaldhar_ left, jaldhar_ joined 10:40 jaldhar_ left, jaldhar_ joined 10:43 wamba joined 10:46 jaldhar_ left, jaldhar_ joined 10:47 wamba left 10:52 jaldhar_ left, jaldhar_ joined 10:55 abraxxa left, abraxxa joined 10:57 wamba joined 11:08 abraxxa left, abraxxa joined 11:10 sena_kun joined 11:11 Altai-man_ left 11:24 jaldhar_ left, jaldhar_ joined 11:30 Kaeipi joined 11:31 Kaiepi left
tbrowder \o 11:36
g'day #raku, question if you please: 11:37
given a tree class, the user inserts a key. if dup keys are not allowed, how to respond. two ways: be silent, or give a reply 11:40
use is something this if i want to be silent: $tree.insert: key 11:41
11:41 angelds joined
Ulti tbrowder: I would expect an exception if its related to the behaviour of the data structure 11:41
jnthn One other approach I've seen used in collection libraries is to use a boolean to indicate if something was actually inserted, which is testable if one cares, but easily ignored otherwise.
tbrowder or if i want to pass a response: my $resp = $tree.insert: dupkey
jnthn The trouble for a general tree class is that there's no generally good answer, though; it all depends on its application. 11:42
Inserting a duplicate might be totally harmless (and the deduplication provided by the tree is welcome) or a sign of a problem. 11:43
tbrowder jnthn: that's the approach i want but how do i avoid useless sink warning?
i could as you say set a flag on each insertion 11:44
11:44 jaldhar_ left
jnthn Booleans don't give a useless sink warning? 11:44
11:44 jaldhar_ joined
jnthn m: class Tree { method insert() { False } }; Tree.insert; 11:44
camelia ( no output )
Ulti typically on insert I kind of expect the actual item to be returned or something nullish
tbrowder no, i was thinking about a return to caller
11:46 jaldhar_ left, jaldhar_ joined
tbrowder ok, i was naively thinking of returning say -1 11:46
so false would be great, caller wouldn't have to check if he didn't care 11:47
Ulti: thnx 11:48
jnthn: thnx
jnthn: i filed issue with comma, not working for me on deb buster 11:49
Ulti is there a reason not to return the item or Nil? this allows for larger expressions
tbrowder Ulti: i'm considering allowing various options for the user, and how to implement them 11:50
you know, feature creep! 11:51
Ulti can I recommend not doing that
from at least my own experience :3
tbrowder yep, but i year for attention ;-) 11:52
Ulti or perhaps consider doing it as implementing types of some role which is your more abstract basic functionality thats agreed upon
tbrowder *yearn
yes, i have considered the role and thinking about best way to do it 11:53
11:54 jaldhar_ left, jaldhar_ joined
tbrowder then considering how to package it, but the nits i'm asking here i don't think are good for role def 11:55
i'm thing e.g. role for basic binary tree, then different varieties use that as base 11:56
red-black, avl, etc.
Ulti it would be kind of nice if there was a built in tree type and thats what actions/grammars were dealing with a special case of as the action pattern for sort of mapping over a tree is generic 11:57
tbrowder think jnthn would consider new raku built-ins! 11:59
log2 would be handy 12:00
lizmat do we know who controls the @rakuorg Twitter handle ? 12:01
tbrowder not i 12:02
12:09 joule joined 12:11 wamba left 12:15 jaldhar_ left 12:22 abraxxa left, abraxxa joined 12:31 wamba joined
moritz I changed @perl6org to @raku_news now 12:34
12:45 mensvaga joined 12:56 angelds left 12:57 angelds joined
[Coke] .seen pawel 13:07
tellable6 [Coke], I haven't seen pawel around, did you mean pwilk?
[Coke] .seen pmurias 13:08
tellable6 [Coke], I saw pmurias 2019-11-18T09:29:46Z in #raku: <pmurias> [Coke]: hi
13:09 Altai-man_ joined 13:11 sena_kun left
[Coke] .ask pmurias - if I find a bug in perl6-js running on npm, should I report on rakudo on github? 13:14
tellable6 [Coke], I'll pass your message to pmurias
13:16 wamba left 13:23 angelds left 13:34 robertle left 13:36 robertle joined 13:40 lucs joined, lucs left 14:23 scimon joined 14:27 lucs joined 14:28 lucs left, pmurias joined 14:29 lucs joined 14:31 lucasb joined
pmurias [Coke]: seems resonable, the JVM backend seems to have a JVM tag on those so maybe the rakudo.js ones should have a JS tag 14:31
tellable6 2019-11-19T13:14:28Z #raku <[Coke]> pmurias - if I find a bug in perl6-js running on npm, should I report on rakudo on github?
MitarashiDango[m Silly thing I did today: Put "X" in an enum which broke my attempts to .new exceptions 🤦 14:35
[Coke] pmurias: (e.g. it doesn't work with App::Uni)
Otherwise, the npm install seems painless.
14:35 lucs left, lucs joined
[Coke] when I'm running the test harness, can you see the results in the browser somewhere? I did run_all_tests, and while it's progressing, I'm not seeing any thing past some build output at the moment. 14:37
14:37 xinming_ left
[Coke] ah, no looks like it was building everything first. 14:38
pmurias [Coke]: it's writing the test output to output/*.tap files 14:39
14:39 xinming_ joined 14:43 lucs left, lucs joined 14:44 lucs left, lucs joined, Altai-man_ is now known as sena_kun
pmurias [Coke]: I haven't used the node.js side rakudo.js a lot but I'll investigate what App::Uni needs 14:45
[Coke] pmurias: It was just the module I had lying around to test the "perl6-js" executable. 14:58
14:58 squashable6 left 15:00 squashable6 joined
[Coke] how long did it take you to run "run_all_tests" ? 15:02
I ended up killing it and just running a few tests one at a time.
15:08 Altai-man_ joined 15:11 sena_kun left
pmurias [Coke]: I don't remember the exact number of ours right know, I run it over night. 15:19
[Coke]: it takes such a long time because every test files ends up bundled with the entire rakudo.js and then loaded into a freshly opened chrome tab
[Coke]: it's a very inefficent way of running the test suit but with others I was sometimes having random Chrome crushes due to loading a huge js file for a bazillion test files so I did it that way 15:23
[Coke] Sounds good. 15:24
Team - anyone else here try out rakudo.js? Getting some community feedback would definitely help pmurias here. 15:25
I did have fun with the in-browser sandbox.
15:36 vrurg_ joined, vrurg_ left, abraxxa left, abraxxa joined, vrurg_ joined 15:46 abraxxa left, abraxxa joined
pmurias I will be grateful for rakudo.js feedback 15:49
I'll be afk in a few minutes, but I'll backlog and answer all question etc. later today or tommorow morning
15:56 finanalyst left 15:57 abraxxa left, cpan-raku left, abraxxa joined 16:00 cpan-raku joined, cpan-raku left, cpan-raku joined 16:05 abraxxa left, abraxxa joined 16:06 xinming_ left, pmurias left 16:08 xinming_ joined, robertle left, ZzZombo left
SmokeMachine I’ve tryed that a few time ago… I liked a lot… I’ve wrote a module for it… and a small application with that module… it was extremally fun! :) 16:10
github.com/FCO/MemoizedDOM 16:11
and this was the small application: fco.github.io/MemoizedDOM/todo6.html
this is the code for it: github.com/FCO/MemoizedDOM/blob/ma...do/todo.p6 16:13
16:26 ZzZombo joined 16:28 joule left 16:30 kensanata left 16:32 joule joined
[Coke] nifty math article: www.theatlantic.com/science/archiv...ry/602128/ 16:46
16:47 xinming_ left, xinming_ joined
[Coke] to sum up: physicists find a way to calculate eigenvectors from eigenvalues. (I've not had to touch either of those things since about 1991, so this may not be as nifty as it sounds.0 16:48
17:00 joule left 17:04 robertle joined 17:06 lgtaube left 17:11 Altai-man_ left
El_Che Should we ping mst about the channel forward? 17:13
tobs [Coke]: that's amazing. I'm gonna have a word with the profs here that tell students that "linear algebra is done" :D
17:18 scimon left 17:19 wildtrees joined
cj El_Che: I wouldn't hesitate to do it. He seems happy to be of service. 17:28
El_Che lizmat, AlexDaniel: is it ok for you to see if we can start fwd the channel or are we waitning for something in particular? 17:39
[Coke]: are you the channel owner?
[Coke] on IRC? nope. 17:45
AlexDaniel El_Che: so, the forwarding was discussed at the start of the whole thing 17:49
El_Che: mst adviced against it, although I'm not convinced by the justification
case in point: mst themselves have not reconfigured their client to join #raku 17:50
El_Che lol 17:57
Do you remember what was the reason for not fwding?
AlexDaniel El_Che: something about people not reconfiguring their client and permanently relying on the forward 18:00
and somehow forwards are not meant to be permanent
18:01 lgtaube joined
Geth ecosystem: hythm7++ created pull request #474:
Add new module Z
18:15 chloekek_ joined
guifa .tell pmurias: I will definitely start looking at rakudo.js soon for my big project 18:39
tellable6 guifa, I'll pass your message to pmurias
19:06 robertle left
guifa So in CLDR everything using camelCase. Should I prefer references that way for ease of porting, or convert them to kebab-case for raku-ness? 19:10
guifa just threw up a poll on FB 19:33
wildtrees how could I join ('A'..'Z') and ('a'..'z') ? 19:37
~ seems to work 19:41
hmm ~ is not totally doing what I want :( 19:42
Manifest0 Hi! Shouldn't the variable $<> have the same behaviour on Str.subst and on str ~~ s/// ? 19:46
tobs wildtrees: ~ is string concatenation. If you want to join them as lists: 19:48
m: my @a = |('A' .. 'Z'), |('a' .. 'z'); say @a 19:49
camelia [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z]
19:49 joule joined
tobs m: my @a = flat ('A' .. 'Z'), ('a' .. 'z'); say @a 19:49
camelia [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z]
tobs i.e. just use a comma and flatten the result (otherwise you will have a list containing two elements of type Range). 19:50
19:50 finanalyst joined 19:51 stoned75 joined
Manifest0 p6: my $a="aabaaaabaaba"; say $a.subst(/([b])/, " $<> ", :g); $a ~~ s:g/([b])/ $<> /; say $a 19:52
camelia Use of Nil in string context
aa aaaa aa a
aa b aaaa b aa b a
in block <unit> at <tmp> line 1
discord6 <theangryepicbanana> m: say ([~] "A".."Z") ~ ([~] "a".."z") 19:53
evalable6 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
discord6 <theangryepicbanana> yay
<theangryepicbanana> wildtrees: is that what you wanted? 19:54
wildtrees I think flat is working for my purposes discord6 19:55
discord6 <theangryepicbanana> ok
<theangryepicbanana> btw I'm on the discord bridge
<theangryepicbanana> so I'm theangryepicbanana
wildtrees yea I just figured that out!
tobs Manifest0: I'm not even sure what $<> should be, or if it is the same thing in both contexts 19:56
It could either be the anonymous state variable $ but deconted, or a lookup of the empty key in $/ ...? 19:57
Manifest0 well the documentation on the subst method says: There is an in-place syntactic variant of subst spelled s/matcher/replacement/ and with adverb following the s or inside the matcher.
i'm assuming it should behave the same on both cases 19:58
i was trying to do the equivalent to s/(b)/ $& /g; on p5, but with the subst method 20:02
tobs ah, I think I get it.
wildtrees m: (|('a'..'z'),|('A'..'Z')).pick(8).join.say 20:04
camelia AXagULdi
wildtrees whats the | do there?
tobs It apparently is in both cases a zen slice over $/, so pretty much $&, but in the method call version, you're interpolating it into an argument before calling subst, so it hasn't matched yet.
s/// is apparently lazier with the substitution string. 20:06
m: my $a="aabaaaabaaba"; say $a.subst(/([b])/, { " $<> " }, :g); 20:07
camelia aa b aaaa b aa b a
tobs you can make the method work lazily by passing a code block instead of the bare string 20:08
Manifest0 tobs: Nice :-) I didn't though about that 20:09
20:49 joule left
tobs wildtrees: the bar constructs a Slip of its argument. It takes the Range object you apply it to and makes it *slip* into an outer list. So you get one long list containing the elements of both ranges, instead of a two-element list containing just two Range objects. Raku does not auto-flatten like Perl and in cases where that behaviour is needed, | works. 21:14
see docs.perl6.org/language/operators#prefix_| for specifics 21:15
wildtrees is there a way I can flat a list of lists of list of lists etc... just one level? 21:17
flat seems to flatten all levels down to a single level 21:18
tobs wildtrees: I think you could map the list of lists through *.Slip. That makes a new list into which the contained list will now slip: 21:22
m: my @a = ['1', [['2', ['3'], ['4', '5']], '6'], '7']; say @a; @a .= map: *.Slip; say @a 21:23
camelia [1 [[2 [3] [4 5]] 6] 7]
[1 [2 [3] [4 5]] 6 7]
21:23 Kaeipi left
wildtrees whats .= ? like += but using a method? 21:25
21:25 Kaiepi joined
tobs (where, if you're new to Raku but proficient in Perl, that `@a .= map: *.Slip` is roughly `@a = map { $_.Slip }, @a` which is equivalent Raku but closer to Perl) 21:25
wildtrees: you got it, exactly 21:26
wildtrees whats the *. doing? is it like $_ at all? 21:27
21:28 Xliff joined
tobs yes, *.Slip is like { $_.Slip } but you don't have to write the braces. See docs.perl6.org/type/Whatever 21:29
Xliff Can you use Cro::HTTP::Client to make AJAX requests? If so, can someone give an example?
tobs afk
21:38 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 21:51 chloekek_ left 22:18 pmurias joined
wildtrees are operators like == objects in raku? 22:24
lizmat yes, everything is an object
m: dd &infix:<==>
camelia Sub+{is-pure}+{Precedence} infix:<==> = proto sub infix:<==> ($?, $?, *%) {*}
lizmat m: dd &infix:<==>.WHAT 22:25
camelia Sub+{is-pure}+{Precedence}
lizmat afk again&
pmurias SmokeMachine: thanks for feedback 22:27
tellable6 2019-11-19T18:39:12Z #raku <guifa> pmurias: I will definitely start looking at rakudo.js soon for my big project
tobs wow, dd is thorough 22:30
SmokeMachine pmurias: :)
22:45 finanalyst left
tbrowder .tell jmerelo gist of draft advent article is available, see yr github issue for the comment with it 23:21
tellable6 tbrowder, I'll pass your message to jmerelo
23:50 lucasb left 23:53 pmurias left