🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
01:03 mort left 01:04 benchable6 left, bisectable6 left, coverable6 left 01:05 nativecallable6 left 01:06 synthmeat left, mst left 01:07 tib_ left, tib joined, nativecallable6 joined, coverable6 joined, benchable6 joined, bisectable6 joined, mst joined, destroycomputers joined 01:08 MasterDuke left 01:09 mort joined 01:13 jpn joined 01:18 synthmeat joined, jpn left 02:15 kylese left, kylese joined 02:54 Sgeo left, Sgeo_ joined
aruniecrisps so the reason i asked if you guys tried other languages is that my friend and i were talking about Raku, i'm currently interviewing and for the time being I'm going to be building a lot of stuff in Raku and posting it to my github page, and my friend basically said if you're gonna be talking about Raku I'd have to have a couple of selling points on Raku @librasteve 02:59
03:14 jpn joined 03:15 kylese left, kylese joined 03:20 jpn left 04:57 human-blip left 05:01 human-blip joined 05:25 jpn joined 05:30 jpn left 05:31 jpn joined
I'm running into a problem with this code: use v6.d; sub MAIN(Int :$port) { say "Start of LSP"; my $listen = IO::Socket::INET.new( :listen, :localhost<localhost>, :localport($port)); my $fh = "lsp-log.txt".IO.open: :a; $fh.print: "Start of LSP at port $port\n"; loop { my $conn = $listen.accept; try { 05:44
while my $buf = $conn.recv { "lsp-log.txt".IO.spurt: $buf; # $fh.put: "Request received\n"; # $fh.put: $buf; } } $conn.close; CATCH { default { "lsp-error.txt".IO.spurt: $_.payload } } } $fh.close; }
see whenever I run this, the problem is that the "lsp-log.txt".IO.spurt: $buf; works more consistently then the $fn.put commands below. for whatever reason, whether i use netcat to send messages to this server while it's running i'm not able to get $buf or "Request received" to consistently write to the file 05:46
and i've been wracking my brain trying to solve this 05:47
if anyone has any ideas as to what might be going on that would be great!
antononcube weekly: rakuforprediction.wordpress.com/20...interview/ 05:56
notable6 antononcube, Noted! (weekly)
05:58 jpn left 05:59 jpn joined 06:17 sdfgsdfg left 06:18 sdfgsdfg joined 06:19 bartolin left 07:04 CIAvash joined 07:12 jpn left 07:13 jpn joined 07:46 sena_kun joined 07:47 jpn left 08:13 CIAvash left 08:25 Sgeo_ left 08:29 teatime joined 08:43 merp joined 08:55 Heikki joined 08:56 Heikki is now known as HeikkiL
HeikkiL I am running Rakudo™ v2024.01 and get an error message that I think is an error. 09:00
Define a subroutine: sub htest (Hash %h) {say %h};
Create a hash: my %first; 09:01
Call: htest %first;
Error: Type check failed in binding to parameter '%h'; expected Associative[Hash] but got Hash ({})
How could the subroutine expect 'Associative[Hash]'?
09:02 dakkar joined 09:16 dead1 joined
gfldex HeikkiL: You are asking for a Hash of Hash. `%h` is a type check of against the role Associative, which a Hash satisfies. 09:20
A Hash of Hash is to narrow of a type to pass that test.
m: sub foo(Hash %h) { dd %h; }; my Hash %h; foo(%h); 09:22
camelia Hash %h = (my Hash %)
HeikkiL OK. Thanks everyone. This turned out to be a newby question. Looks like I have to read more about passing arguments to subroutines in raku! 09:31
09:34 jpn joined 10:10 sena_kun left 10:19 HeikkiL left 10:58 cm left 10:59 cm joined 13:27 jpn left 13:58 jpn joined
ab5tract HeikkiL It’s actually less about argument passing specifically than it is about how type declarations intersect with container types 14:11
m: my Str %h = %( :x(“y”) ); dd %h 14:16
camelia Str %h = (my Str % = :x("y"))
ab5tract m: my Str %h = %( :x ) 14:17
camelia Type check failed for an element of %h; expected Str but got Bool (Bool::True)
in block <unit> at <tmp> line 1
14:40 kjp left, snonux left, tadzik left, sivoais left, ACfromTX left, Ekho left, tbrowder_ left, leont left, xkr47 left, xkr47 joined, tbrowder_ joined, snonux joined, ACfromTX joined 14:41 leont joined, kjp joined, tadzik joined 14:43 tadzik left, tadzik joined 14:44 Ekho joined 14:50 sivoais joined 15:01 jpn left 15:10 hulk joined, kylese left 15:17 jpn joined 15:29 sdomi left 15:53 derpydoo joined 15:57 epony left 16:07 sdomi joined 16:49 vlad joined
Geth Raku-Steering-Council/main: 57e17f10d9 | (Elizabeth Mattijsen)++ | minutes/20240210.md
Add RSC meeting minutes for 2024-02-10
17:28
17:38 dakkar left
Geth ecosystem/main: a07f7957b7 | (Elizabeth Mattijsen)++ | META.list
Remove JSON::Hjson

It now lives in the zef ecosystem
17:40
tbrowder__ hi, i have a new module in work using multiple sub run calls in a single test file. the test works fine 17:52
bscan @aruniecrisps, if you're still dealing with this, I asked ChatGPT. It suggested adding $fh.flush; I tested it and that fix worked for me. chat.openai.com/share/1ee4bed7-6d9...71845065e5
tbrowder__ pls disredard my issue, running mi6 with the verbose option did the trick 17:53
18:42 sena_kun joined
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/02/12/2024-07-dr-raku/ 19:35
19:44 epony joined 20:01 jpn left 20:19 jpn joined 20:24 jpn left 21:41 jpn joined 22:00 merp left 22:06 kst left 22:15 sena_kun left 22:18 vlad left 23:14 jpn left 23:26 sftp left 23:27 kst joined 23:44 sftp joined 23:54 Sgeo joined