🦋 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:00 xelxebar left, xelxebar joined 00:02 melezhik joined 00:09 melezhik left 00:35 guifa2 left 00:42 mowcat joined, guifa2 joined 00:51 guifa2 left 01:03 sena_kun joined 01:05 Altai-man_ left 01:06 aborazmeh joined, aborazmeh left, aborazmeh joined 01:10 Kaiepi joined 01:27 AlexDaniel joined, AlexDaniel left, AlexDaniel joined
[Coke] m: dd List.new 01:28
01:28 molaf left
camelia () 01:28
[Coke] m: dd Array.new 01:29
camelia Array element = []
[Coke] m: dd Str.new
camelia ""
[Coke] m: dd List
camelia List
[Coke] m: use nqp; dd nqp::hlllist
camelia ()
[Coke] m: use nqp; dd nqp::hllhash
camelia Hash element = {}
01:33 cognomin_ joined 01:37 cognominal left 01:40 aborazmeh left, molaf joined 01:50 cpup left 01:52 farcas1982regreg joined 01:57 cpup joined 02:06 Manifest0 left, Manifest0 joined 02:10 melezhik joined, melezhik left 02:18 melezhik joined 02:26 aborazmeh joined, aborazmeh left, aborazmeh joined 02:29 xxpor joined
melezhik chloekek: I made a proposal on possible usage of Sparrow in CRAI provision/deployment. Appreciate your feedback. github.com/chloekek/crai/issues/24 02:54
tellable6 melezhik, I'll pass your message to chloekek
02:56 melezhik left 02:57 mowcat left 03:02 Altai-man_ joined 03:05 sena_kun left 03:12 aborazmeh left 03:14 pilne left 03:18 cpan-raku left 03:24 cpan-raku joined, cpan-raku left, cpan-raku joined 04:02 caterfxo left 04:11 molaf left 04:22 hungrydonkey joined 04:23 Doc_Holliwood joined
hungrydonkey Hello everyone, I just started to learn raku. How to get the nth character of a string ? Like : my $str = "Hello Raku", I want to get the third character of $str. How can I do it? 04:35
moritz hungrydonkey: with substr 04:49
m: my $str = "Hello Raku"; say $str.substr(2, 1)
camelia l
moritz (the 2 because raku starts counting at 0) 04:50
and 1 for the numbers of characters you want to extract
hungrydonkey Oh, that's cool! Thank you, Moritz. 04:54
05:03 sena_kun joined 05:04 [Coke] joined, [Coke] left, [Coke] joined 05:05 Altai-man_ left 05:34 sauvin joined 05:55 hungrydonkey left 06:02 p6steve joined 06:03 guifa2 joined 06:04 sjm_uk joined 06:07 p6steve left 06:29 Doc_Holliwood left 06:38 lichtkind joined 06:42 rindolf joined 06:43 andrzejku joined 06:51 stoned75 joined 07:00 p6steve joined 07:02 Altai-man_ joined 07:05 sena_kun left 07:06 hungrydonkey joined 07:13 vike joined 07:18 dakkar joined 07:57 p6steve left 08:16 pecastro joined 08:24 p6steve joined 08:29 p6steve left 08:36 ismustachio joined
Geth doc: 5acc3f5a70 | (Patrick Böker)++ (committed using GitHub Web editor) | doc/Language/concurrency.pod6
Replace a "Perl" with "Raku"
linkable6 Link: docs.raku.org/language/concurrency
08:42 rindolf left 08:51 rindolf joined
Altreus I feel like I keep asking this but I keep confusing myself so I hope you'll forgive me - does 'done' act like 'return' inasmuch as the following statements won't be run? 08:53
08:59 p6steve joined
ismustachio @Altreus from docs: Within a Supply block, it will indicate the supply will no longer emit anything. See also documentation on method done. 09:03
09:03 sena_kun joined, p6steve left
sena_kun Altreus, yes 09:05
m: start react supply { say 42; done; say 42; }; sleep 1;
camelia ( no output )
09:05 Altai-man_ left
sena_kun erm 09:05
m: await start react supply { say 42; done; say 42; }
camelia ( no output )
sena_kun erm
m: react whenever supply { say 42; done; say 42; } 09:06
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block (whitespace needed before curlies taken as a hash subscript?)
at <tmp>:1
------> 3henever supply { say 42; done; say 42; }7⏏5<EOL>
expecting any of:
block or poin…
sena_kun ok, morning, you got me
m: react whenever Supply.interval(1) { say $_; done; say 42; } 09:09
camelia 0
sena_kun Altreus, ^
09:11 daxim left 09:18 daxim joined
Altreus nice thank :) 09:18
09:20 MasterDuke left 09:36 p6steve joined 09:40 p6steve left 09:42 Sgeo joined 09:47 Black_Ribbon left
Altreus Does there exist a module that will trace all method calls? Perhaps one that I can filter to certain namespaces? 10:00
tadzik hmm, I seem to recall Devel::Trace being a builtin pragma... 10:01
I seem to remember wrong though
jnthn Altreus: modules.raku.org/dist/Trait::Traced:cpan:KAIEPI maybe 10:02
Though if you're trying to understand concurrent stuff I tend to use modules.raku.org/dist/Log::Timeline:cpan:JNTHN
Hm, the status info on that page is actually out of date
Altreus splendid! 10:03
jnthn (the upcoming stuff upcame)
Altreus Forever grateful for the work of people more knowledgeable than I
which always seems to be either lizmat or jnthn
but ok
I love the idea of a role that traces 10:05
now I can add it to the websocket and see what happens
Kaiepi Trait::Traced traces all method calls to a type when applied to one, one the condition that they exist in its method tables somewhere
jnthn Well, Trait::Traced isn't lizmat or I, but Kaiepi++ :) 10:06
lizmat indeed!
Altreus Indeed Kaiepi++ 10:07
Kaiepi :)
jnthn Log::Timeline I guess I'm guilty for though :)
Altreus DO droplets are kind of clunky huh
should probably not do this sort of heavy debugging on one of them 10:08
dakkar re: Log::Timeline, be aware of github.com/jnthn/p6-log-timeline/issues/8
Altreus also I love but 10:10
don't say that out loud 10:11
Ah, suddenly the difference between "trait" and "role" is driven home to me 10:14
10:18 lichtkind_ joined 10:20 lichtkind left
Altreus If I put «is traced» on Cro::WebSocket::Client I get «Serialization Error: missing static code ref for closure '' (gen/moar/World.nqp:2594) 10:21
from the «use Cro::WebSocket::Client» line in my code
Kaiepi yeah that's a bug in the current release
Altreus :<
Kaiepi the fix for it i have atm depends on the next release of rakudo 10:22
Altreus I'm editing the websocket code - I'll just stick more print debugging in :D
Determined to find this problem!
jnthn tries to remember if he already put timeline probes into Cro::WebSocket or not... 10:23
Altreus unsure how to recognise them
10:24 squashable6 left
Kaiepi there is a way you can trace any method call on a type similarly to how Trait::Traced does without the module, just it's a bit annoying to write 10:25
gimme a sec
10:25 squashable6 joined, Doc_Holliwood joined 10:31 Ekho left
Altreus I'm not yet sure what traces I want anyway :D 10:40
Currently I have a note before and after many many lines in my own code
trying to figure out which bit is running and which bit is hanging 10:41
Kaiepi Altreus, this should trace all method calls to methods a type declares fpaste.scsys.co.uk/588661 10:42
in a way that works with older releases
Altreus *paw*
Kaiepi the only reason Trait::Traced itself doesn't do something like this in the current release is because it doesn't work (yet) with multi methods 10:43
Altreus does it have to be a trait? I mean since it composes an anonymous role, can I just make it nonymous and compose it on the object?
Kaiepi you can do it like that if you want 10:44
Altreus i try 10:45
gonna wait for the thing to fail before I restart it with this 10:48
10:48 chloekek joined
Kaiepi btw, how were you using Trait::Traced to get that serialization error? 10:49
chloekek .
tellable6 2020-04-22T02:54:59Z #raku <melezhik> chloekek: I made a proposal on possible usage of Sparrow in CRAI provision/deployment. Appreciate your feedback. github.com/chloekek/crai/issues/24
10:53 chloekek left, hungrydonkey left 10:55 wbn joined 10:58 Ekho joined 11:02 Altai-man_ joined 11:05 sena_kun left 11:07 hungrydonkey joined 11:11 woolfy joined, rbt left, woolfy left 11:12 rbt joined 11:18 caterfxo joined 11:24 Doc_Holliwood left 11:25 dakkar left 11:26 dakkar joined 11:37 p6steve joined 11:41 p6steve left 11:42 hungrydonkey left
Altreus Kaiepi: I cloned cro-websocket and just bunged it in the source 11:51
class Cro::WebSocket::Client is traced { 11:52
then used raku -I to use it :)
Kaiepi ah, that's probably fixed with the upcoming release, but it could use some tests 11:54
11:56 p6steve joined
Altreus :) 11:59
12:05 MasterDuke joined 12:08 stoned75 left 12:22 aborazmeh joined, aborazmeh left, aborazmeh joined 12:24 rbt left 12:25 rbt joined 12:30 rbt left 12:40 rbt joined 12:48 aborazmeh left 12:50 sena_kun joined 12:51 Altai-man_ left 12:53 mowcat joined, melezhik joined 12:54 andrzejku left 12:55 Doc_Holliwood joined, melezhik left 12:57 cognominal joined 13:00 cognomin_ left
Kaiepi yep, precomp seems to get handled ok 13:08
13:28 pilne joined 13:33 mowcat left, molaf joined 13:35 Doc_Holliwood left 14:08 dg joined 14:16 andrzejku joined 14:17 MasterDuke left 14:22 AlexDaniel left 14:32 molaf left 14:35 MasterDuke joined 14:46 xelxebar left 14:48 Doc_Holliwood joined 14:49 Altai-man_ joined 14:51 sena_kun left 14:58 melezhik36 joined, melezhik36 is now known as melezhik2 14:59 xelxebar joined 15:04 lucasb joined 15:07 stoned75 joined 15:11 natrys joined
Altreus hrm I think I need to do a sort of pointer-to-pointer thing except with supplies 15:19
15:19 dotdotdot joined
Altreus Is there an idiom I can steal so I don't have to figure it out for myself? 15:19
Basically I need to be able to recreate this supply without anything that was tapping it noticing that it stopped github.com/shuppet/p6-api-discord/...n.pm6#L108 15:20
(Cos I might be required to reconnect, which I am doing by creating a new websocket) 15:21
dakkar possibly stupid idea: wrap the real Supply in your own Supply-like class, delegate most behaviour, then switch the real Supply inside when you need to 15:23
timotimo i haven't looked, but it kind of sounds like you want a Supplier that you .emit stuff into from where you get messages from your websockets 15:26
m: my $output = Supplier.new; my $events = $output.Supply; start react whenever $events { say "event: $_" }; react whenever Supply.from-list(^3) { $output.emit("first: $_") }; react whenever Supply.from-list(5..8) { $output.emit("second: $_") }; sleep 0.5 15:27
camelia event: first: 0
event: first: 1
event: first: 2
event: second: 5
event: second: 6
event: second: 7
event: second: 8
timotimo Altreus: what do you think? 15:28
15:30 ellipsis joined, dotdotdot left
Altreus Yeah, I started to think that maybe instead of setting it to a supply {} I use a Supplier that I can just call emit on 15:35
But then I thought hang on, didn't I have that? 15:36
I refactored it not to :o maybe this is why it was like that
I'm gonna try it
turns out it was only 3 lines 15:38
timotimo there's also migrate, if that's the right name
where you push a supply of supplies and it'll always take items from the last supply it got
Altreus hmm 15:41
15:42 stoned75 left
Altreus oh I see! 15:43
So I can just emit the supply I currently have and call migrate on the supply 15:44
lemme try
15:47 stoned75 joined 15:48 chloekek joined
Altreus Ah, but I emit the first supply before anything starts tapping it, and therefore migrate isn't called 15:49
So nothing happens
Hrm I expect it to do something but it doesn't 15:52
annoyingly I've elected to hack at an http clone of my repo so I can't just push my changes :)
I have $!messages-supplier.emit: supply { note "Starting message supply" ... } but I don't get the note 15:53
I think that pattern is more complex than just start react whenever { ... $!messages.emit } 15:55
15:55 molaf joined 15:57 molaf_ joined 16:00 softmoth joined, molaf left
Altreus I think I have a bad design here 16:02
I've conflated supply and react
~ sort of
I think when I turned it into a supply I ignored the fact that it was really a react where *one* of the outcomes *happened* to be to emit the data 16:03
Same way a map is not a foreach
16:07 AlexDaniel joined, AlexDaniel left, AlexDaniel joined 16:11 rbt left, rbt joined
melezhik2 Hi chloekek: did you happen to see my Sparrow suggestion for CRAI? 16:18
in nutshell I trying to see if imperative, traditional CM tool could be fit for CRAI provision/cm/deploy 16:19
Geth doc/makefile-cleanup: 8a1c78ea4c | (Stoned Elipot)++ | Makefile
remove references to removed make targets

refs #2996
doc: stoned++ created pull request #3345:
remove references to removed make targets
melezhik2 I've got others idea of embedding Sparrow into Nix packages, so we could run Sparrow tasks Nix natively, :-) but that's another story ... I just started with something simple 16:23
16:24 vike left 16:26 lichtkind_ left 16:28 rbt left 16:29 rbt joined 16:37 dakkar left, ismustachio left 16:40 Doc_Holliwood left 16:47 andrzejku left 16:50 sena_kun joined 16:51 Altai-man_ left 17:11 sjm_uk left 17:14 titsuki joined 17:19 mowcat joined 17:25 thundergnat joined, thundergnat left
Geth doc: 8a1c78ea4c | (Stoned Elipot)++ | Makefile
remove references to removed make targets

refs #2996
doc: 3320a13642 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | Makefile
Merge pull request #3345 from Raku/makefile-cleanup

remove references to removed make targets
linkable6 DOC#2996 [open]: github.com/Raku/doc/issues/2996 [big][build][meta] Remove htmlify.p6
17:40 wildtrees joined 17:41 wildtrees left 17:43 wildtrees_ joined, wildtrees_ left 17:44 wildtrees_ joined 17:55 sjm_uk joined 17:56 andrzejku joined 18:00 vike joined, Doc_Holliwood joined 18:13 titsuki left 18:16 wildtrees_ left 18:26 sauvin left 18:49 Altai-man_ joined 18:51 sena_kun left
stoned75 :q 18:58
El_Che stoned75: there is no escape 19:00
19:02 sjm_uk left
stoned75 C-x-C-c 19:04
19:11 softmoth left, softmoth joined 19:15 rindolf left 19:19 melezhik2 left 19:21 melezhik joined 19:25 molaf_ left 19:31 patrickb joined 19:34 patrickb left, |Sno| left 19:35 [Sno] joined 19:38 chloekek left 19:41 [Sno] left 19:43 [Sno] joined 19:44 andrzejku left 19:48 farcas1982regreg left 19:49 k-man_ joined, k-man left
Manifest0 Is there a way to specify "dynamic" subsets? 19:59
For example i would like something like this "subset ($a+)n of Str where $a ~~ /\d/ $_.chars == $a"
20:01 Black_Ribbon joined
timotimo kind of like a parameterized subset? 20:10
Manifest0 yes. I would like then to do "my 29n $var;" or "my 10n $var='abcdefghij'" 20:13
timotimo ah, not exactly like that i think 20:15
Manifest0 and if set the var with a length higher than the number in the begining it would throw an error :-)
20:25 aborazmeh joined, aborazmeh left, aborazmeh joined 20:29 melezhik left 20:30 melezhik joined 20:31 leah2 joined
melezhik vrug: Test-Async test fails on rakudist , I know this is a an old problem, FYI - repo.westus.cloudapp.azure.com/raku...585441.txt 20:31
vrurg: Test-Async test fails on rakudist , I know this is a an old problem, FYI - repo.westus.cloudapp.azure.com/raku...585441.txt
vrurg melezhik: thanks, will look at it later today! 20:33
melezhik sure, NP
20:38 p6steve left 20:44 mowcat left, wamba joined 20:45 aborazmeh left, molaf joined, wamba left 20:49 squashable6 left 20:50 sena_kun joined, squashable6 joined 20:51 Altai-man_ left 20:54 p6steve joined 21:02 p6steve left 21:11 rbt left 21:12 rbt joined 21:18 squashable6 left, squashable6 joined 21:20 squashable6 left 21:21 squashable6 joined 21:39 natrys left 21:43 softmoth left 21:44 softmoth joined 21:45 mike_s joined
[Coke] Manifest0: I would write a sub that took a parameter and then do ... where my-check(param1) and where my-check(param2) 21:46
21:46 skyl4rk joined 21:49 MilkmanDan joined 21:52 natrys joined 22:06 softmoth left 22:07 molaf left 22:10 natrys left 22:29 pecastro left 22:34 cognomin_ joined 22:37 cognominal left, __jrjsmrtn__ joined 22:38 _jrjsmrtn left 22:49 Altai-man_ joined 22:51 sena_kun left
Demos[m] does IO::Path.open(:exclusive) ACTUALLLY fail if the file exists or just if another process has the file open? 22:54
22:59 pilne_ joined 23:00 pilne_ left 23:02 pilne left 23:11 aborazmeh joined, aborazmeh left, aborazmeh joined
vrurg .tell melezhik regarding the failing test – the actual test did not run. It was p6doc dependecy which failed to install. It probably should not happen. 23:16
tellable6 vrurg, I'll pass your message to melezhik
23:27 melezhik7 joined, melezhik7 is now known as melezhik2
melezhik2 vrurg: I know this is not the module's blame. but it is still an error, and it bound to be, this is an old bug with p6doc 23:28
tellable6 2020-04-22T23:16:56Z #raku <vrurg> melezhik regarding the failing test – the actual test did not run. It was p6doc dependecy which failed to install. It probably should not happen.
23:30 p6steve joined 23:34 p6steve left 23:47 melezhik2 left