🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
guifa Ah I just found some samples of it online. 00:00
Yeah, that psuedo code will translate rather nicely in Raku
00:07 reportable6 left 00:09 reportable6 joined
Zgredu[m] That's great to hear. I tried Racket and Scheme for a while but the way they handled arrays was a bit too strange. Go was OK but a bit too opinionated and poor in some aspects. Ada was almost ideal if not for the fact that all implementations are not garbage collected and Oberon-2 has no compilers at all. Raku just seemed like a nice language when I went through the examples on Rosetta Code and compared it with others 00:10
Should I start with raku.guide/ or somewhere else?
00:11 dextercd left
guifa Raku is also nice in that if something isn't working how you like, it's fairly easy to craft something that does and use it 00:14
raku.guide is nice. also I think Laurent Rosenfeld has a book that dives into algorithms and such 00:15
Zgredu[m] "Think Perl 6: How to Think Like a Computer Scientist"? 00:16
guifa Yeah. ALthough actually I just glanced through it, it's no where near as deep dive as CLRS — Rosenfeld calls it a book for beginners so it teaches a lot more fundamental concepts that you probably already understand fairly well 00:17
like the next to the last chapter goes over quick sort :-)
00:37 perlbot left, simcop2387 left 00:39 simcop2387 joined 00:40 perlbot joined 00:46 Garbanzo__ joined 01:02 perlbot left, simcop2387 left 01:06 simcop2387 joined 01:07 perlbot joined 01:17 Garbanzo__ left 01:50 clarjon1 left 02:25 jmcgnh left 02:43 razetime joined 03:01 jmcgnh joined 03:02 nine left, m_athias left, nine joined, m_athias joined 03:17 frost joined 03:18 frost left 03:20 codesections left, codesections joined 03:21 a3r0 left, a3r0 joined, frost joined 03:22 Garbanzo__ joined 03:59 discord-raku-bot left, discord-raku-bot joined 04:33 swaggboi left 04:43 frost left 04:46 frost joined 05:01 swaggboi joined 05:31 frost left 05:33 frost joined
elcaro I just tried to do `@a.shift(2)`... seems like something that Raku might implement, but alas, no 05:38
I know about `splice`... just musing
06:07 reportable6 left 06:08 reportable6 joined 06:40 frost left 07:14 frost joined 08:00 Garbanzo__ left 08:04 andinus joined 08:39 frost left
lizmat elcaro: maybe @a.batch(2) ? 08:54
09:20 stoned75 left 09:21 stoned75 joined
leont Good * 09:32
patrickb is there some #raku-fosdem or so channel? 09:54
lizmat there's a #raku-conf channel
10:21 evalable6 left, linkable6 left, linkable6 joined 10:26 jjido joined 10:45 guifa left 10:55 Sgeo left
gfldex m: my @a = 1..10; say @a.shift xx 2; dd @a; 11:01
11:01 jjido left
camelia (1 2)
Array @a = [3, 4, 5, 6, 7, 8, 9, 10]
11:01
gfldex elcaro: ^^^
11:36 Darkcoal joined 12:10 reportable6 left 12:11 reportable6 joined 12:13 Darkcoal left 12:14 Darkcoal joined 12:18 stoned75 left 12:20 Darkcoal left 12:22 Darkcoal joined 12:24 evalable6 joined, stoned75 joined 13:19 sena_kun left 13:46 AAD8E0 joined 14:19 evalable6 left, bloatable6 left, linkable6 left, notable6 left, coverable6 left, quotable6 left, shareable6 left, tellable6 left, statisfiable6 left, reportable6 left, benchable6 left, unicodable6 left, committable6 left, releasable6 left, sourceable6 left, greppable6 left, nativecallable6 left, bisectable6 left, squashable6 left 14:20 bisectable6 joined, benchable6 joined, nativecallable6 joined 14:21 statisfiable6 joined, quotable6 joined 14:22 releasable6 joined
jdv codesections: you're zest thing seems neat. i did a almost not related thing a long time ago with just one op. github.com/jdv/p6-tolerance 14:36
iirc that was before the =~= was impl
'd
14:41 sena_kun joined 15:20 reportable6 joined 15:21 tellable6 joined, unicodable6 joined 15:22 evalable6 joined, greppable6 joined, shareable6 joined, bloatable6 joined, sourceable6 joined
andinus is there a better way to do "$var"() 15:51
m: my $x = "sum"; say "$x"(1, 2)
camelia No such method 'CALL-ME' for invocant of type 'Str'
in block <unit> at <tmp> line 1
MasterDuke m: my $x = "sum"; say ::("&" ~ $x)(1, 2)   # andinus 16:10
camelia 3
ugexe can also use &::($x) 16:11
16:12 timo left 16:13 razetime left
MasterDuke ugexe++ i was looking for that and tried pretty much every other placement of the '&' 16:15
16:20 coverable6 joined, squashable6 joined 16:22 notable6 joined
leont Is there a way to connect to a unix domain socket? 16:34
ugexe i thought IO::Socket::INET supported unix socks 16:37
leont I'm seeing that suggestion in the issue tracker now, but it has never been documented 16:40
Next question: does IO::Socket::Async support it, because that's what I actually need.
16:40 bobv joined 16:43 bobv left, bobv joined 16:44 bobv left 16:49 bobv joined 16:50 bobv left 16:52 dextercd joined
andinus m: put &::("sum")(1,2) 17:02
camelia 3
andinus m: put sum()
camelia 0
17:21 linkable6 joined 17:22 Darkcoal left 17:28 timo joined 17:36 bobv joined 17:37 bobv left 17:53 Skarsnik joined 17:56 Skarsnik__ joined, Skarsnik_ left 17:58 Skarsnik left 17:59 Skarsnik joined 18:01 Skarsnik__ left 18:08 reportable6 left 18:10 reportable6 joined 18:27 Skarsnik left 18:50 bobv joined 19:20 committable6 joined 19:22 jjido joined
leont Can anyone explain why this doesn't seem to work: my $a = Supplier.new; my $b = Supplier.new; $a.emit($b.Supply); $a.done; react { whenever $a.Supply { dd $_ } }' 19:34
ugexe based on where you are calling .done i would expect $a to be a Supplier::Preserving 19:36
leont Ah, yeah that makes sense 19:37
Yes that works wonderfully 19:38
ugexe also seems like maybe thats something docs.raku.org/type/Supply#method_migrate might be used for
19:39 bobv left 19:45 Sgeo joined
leont just got a basic but working asynchronous postgres client in raku working 19:45
japhb leont++ 19:49
20:15 abraxxa-home joined 20:25 colemanx left 20:45 Garbanzo__ joined 20:46 bobv joined 21:04 RakuIRCLogger__ joined 21:05 TempIRCLogger joined, lizmat_ joined 21:06 RakuIRCLogger left, lizmat left, TempIRCLogger__ left, Geth left 21:14 bobv left 22:14 benchable6 left, nativecallable6 left, linkable6 left, coverable6 left, reportable6 left, greppable6 left, quotable6 left, tellable6 left, unicodable6 left, evalable6 left, statisfiable6 left, bisectable6 left, shareable6 left, bloatable6 left, squashable6 left, notable6 left, releasable6 left, sourceable6 left, committable6 left, quotable6 joined 22:15 bloatable6 joined 22:16 greppable6 joined, notable6 joined, sourceable6 joined, reportable6 joined, bisectable6 joined, benchable6 joined 22:17 statisfiable6 joined, coverable6 joined 22:58 abraxxa-home left 23:07 RakuIRCLogger__ left 23:08 jjido left 23:15 shareable6 joined, squashable6 joined 23:16 tellable6 joined 23:17 committable6 joined
leont Anyone have a clue what's up if Supplier::Preserving.emit hangs? 23:18
It appears to hang when something starts listening to the Supply 23:24
I'm rather suspecting a deadlock 23:30
Voldenet code snippet would be nice, Supplier::Preserving.emit doesn't hang 23:32
m: my $s = Supplier::Preserving.new; start { sleep 1; $s.emit("boom"); $s.done }; react whenever $s { .say } 23:35
camelia boom
leont Well, it's in the middle of a big piece of code, I'm not entirely sure how to produce it 23:37
Voldenet though I agree, it's suspiciously easy to accidentally produce deadlocks with supplies 23:39
leont And now I can't install App::MoarVM::Debug, because I can't install Data::MessagePack, because that uses [email@hidden.address] url that github has deprecated -_- 23:41
ugexe it fetches for me still 23:43
leont pastebin.com/ikkaKLzg 23:45
ugexe what does it show with --debug
leont Nothing informative, just that it's fetching via Zef::Repository::Ecosystems<p6c> 23:47
ugexe ===> Fetching [OK]: Data::MessagePack:ver<0.1.2> to /Users/ugexe/.zef/tmp/1644104797.21486.6370.395852674107/Perl6-Data-MessagePack.git 23:48
`rm -rf ~/.zef` is the cargo culty thing to try
or `zef nuke RootDir` 23:49
leont Removing the zefdir didn't do anything 23:50
japhb I had to switch to [email@hidden.address] URLs because the https ones got deprecated .... 23:52
ugexe https ones arent deprecated
or at least not the most recent deprecation 23:53
japhb You can read with them, but not push with them.
ugexe should just be git:// that is affected 23:54
leont Then I don't know what issue I'm dealing with, and it's not giving me much information 23:55