🦋 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.
falsifian deoac: docs.raku.org/type/Int.html ; search for "brackets" 00:43
I think that sentence should say "square brackets" or just "brackets" instead of "angle brackets" 00:44
Well that was easy. Just clicked the "edit" button on the docs page and github.com/Raku/doc/pull/4297 00:48
Nemokosch all three bracket types are possible 01:11
also, it doesn't seem like it's quite the same as .join.Int.base 01:13
m: dd :10[1,22,3]; dd [1,22,3].join.Int.base(10)
Raku eval 323 "1223"
Xliff m: use NativeCall; my $a = CArray[Pointer].allocate(1); $a.say 01:57
camelia NativeCall::Types::CArray[NativeCall::Types::Pointer].new
tellable6 2023-04-26T19:29:24Z #raku-dev <vrurg> Xliff you seem to be the one behind parallel pre-compiling. Can you tell if there is a way to limit the maximum number of rakudo processes involved?
Xliff m: use NativeCall; my $a = CArray[Str].allocate(1); $a.say
camelia chars requires a concrete string, but got null
in method allocate at /home/camelia/rakudo-m-inst-2/share/perl6/core/sources/5702F1B98AFF04C12BC993882BF8EB20423C1146 (NativeCall::Types) line 219
in block <unit> at <tmp> line 1
Xliff Given that the later is the same as the former... is this a bug? 01:58
.tell vrurg I was the one behind the initial implementation, but the one that made it into main is nine's.
tellable6 Xliff, I'll pass your message to vrurg
Xliff .tell vrurg To my knowledge, the only way to limit the number of jobs is logic left at the application level. 01:59
tellable6 Xliff, I'll pass your message to vrurg
Xliff .tell vrurg See my parallel compilation runner, here - github.com/Xliff/p6-GtkPlus/blob/m...d.pl6#L124 02:01
tellable6 Xliff, I'll pass your message to vrurg
Xliff Well, here's the workaround for now... 02:18
m: use NativeCall; my $a = CArray[Pointer].allocate(1); $a = nativecast(CArray[Str], $a); $a.say
camelia NativeCall::Types::CArray[Str].new
grondilu yet another reason I hate version management: github.com/grondilu/libdigest-raku/issues/37 06:27
oh it seems this user has been spamming on this topic: github.com/perl6/perl6-pod-to-bigpage/issues/37 06:30
Voldenet git tag -a 1.0 commit 08:11
it's a bit annoying that not always tags are fetched with repo, but overall it's a nice feature 08:12
patrickb Voldenet: AFAIK tags *are* fetched by default. But they aren't pushed by default. They need to be pushed explicitly, just like branches. 08:36
Voldenet I don't remember details where I had to include tags explicitly, but I bet it was something related to submodules 08:43
aru_ Hi, is there a way to make zef install all dependencies listed in meta6.json? Let's say I take someone else's sources and want to start hacking on it 15:27
Nemokosch > zef install . --deps-only 15:29
aru_ oh, right for some reason I had the idea the thing to install had to be a package name 15:31
awesome, thank you 15:32
tonyo . 15:33
lonewolf-dev hi. Is raku a interpeted language? Or is it compiled? Or is it just-in-time compiled like how julia and javascript work? 16:35
El_Che /msg lizmat github.com/nxadm/rakudo-pkg/action...4822278930 wordt gebuild atm, hopelijk geen showstoppers 16:41
oops
lizmat gotcha
El_Che everyone: github.com/nxadm/rakudo-pkg/action...4822278930 is being build atm, hopefully no showstoppers 16:42
(nothing secret there :) )
El_Che returns to assembling ikea stuff and cursing in Swedish
lizmat lonewolf-dev define compiled?
El_Che: Føck! 16:43
lizmat lonewolf-dev: Raku compiles to bytecode that can optionally be stored, and then run again 16:43
lonewolf-dev It runs on MOARVM/java virtual machine. Confusing.
lonewolf-dev oke. thanks for info. 16:43
lizmat it either runs on MoarVM *or* JVM
El_Che their engineers are taking the piss: a little screw machine the released is called Fixa
lonewolf-dev I'm learning perl at the moment. Is perl still worth learning? How much different is perl and raku? 16:45
Perl 7 is set to be released this year... 16:46
No more "use strict"; Use warnings;
meme
El_Che lonewolf-dev: I have never regretted my perl knowledge 16:47
lonewolf-dev Is perl regex (PCRE) the same as raku regex? 16:48
El_Che no
raku's take is nicer and clearer, more powerful. Perl's, on the other hand, is universal
lonewolf-dev Can we just not agree on a standard. Its confusing having to relearn multiple regex implementations. 16:49
How fast is raku compared to other similar new languages like go-lang and rust? Sorry for bombarting you with questions... 16:50
Will companys adopt it in the future? 16:51
lizmat raku is slower than go-lang and rust 16:54
yes
El_Che the languages you mentioned are pretty much the fastest around besides C/C++ 16:55
lonewolf-dev so would be similar in speed to something like a jvm language like java - kotlin?
without bloated classes that java has. 16:56
El_Che more akin to perl/ruby/python at the moment, but with the potention of the jvm like speed
(the jvm is very fast, just memory hungry)
*potential
lonewolf-dev okey. thanks. 16:57
El_Che (being a VM-based language)
it has better concurrency than perl/python/ruby
so if you're in that use case, it may be a good candidate for your application
lonewolf-dev raku is not Globar interpeter locked.
*global
GIL 16:58
El_Che nor is perl
lonewolf-dev Is perl not GIL locked?
i tought it was?
python and ruby is..
gil locked.
El_Che the problem with perl is that threads are heavy, and the concurrency syntax cumbersom
lizmat Raku has no GIL
El_Che perl neither iirc 16:59
lizmat perl threads are basically a simulated fork() for Windows
El_Che one interpreter per thread, pretty much iirc
hence: heavy
lonewolf-dev Im using arch linux.
not windows
So is that a problem on linux machines? 17:00
like ubuntu/arch?
El_Che in perl, you pretty much fork for do concurrent stuff
there are threads, but they are not fun
but people on #perl (althoiough I am there too), can give you more informed insights 17:01
(and lizmat being somewhat of a threading expert :) )
lonewolf-dev one thread spawn one extra intepreter? is that correct?
lizmat yes, in a way it's the worst of both worlds 17:02
at least fork() will give you shared memory at the OS levek
*level
El_Che you loose copy on write with threads iirc 17:03
lizmat yes, because each interpreter *copies* all of its variables / bytecode / etc 17:05
aru_ I'm having a little trouble inspecting things in the repl. Let's say I have Encoding::Decoder::Builtin obtain by calling Encoding::Registry.find('utf-8').decoder() , how do I find out what methods it has available? 17:40
from some example I know I can do $decoder.add-bytes(...), but I can't seem to find any docs around where add-bytes comes from 17:45
Nemokosch you can ask the metamodel about things like this - for example, here you can call .^methods on your class/object 17:49
lizmat $decoder.^methods.map(*.name)
aru_ oh, neat 17:52
aru_ I was probably looking for something like pry in ruby, but this will do 18:02
lizmat aru_: there is a "repl" sub that you can call anywhere in your code 18:05
sub a($a) { repl }; a 42' 18:06
Type 'exit' to leave
[0] > say $a
42
p6steve 0/ 19:28
i'm wondering if there's a way to connect a Supply on one physical / virtual machine to a Supply on another - maybe a module? 19:29
Voldenet > react whenever IO::Socket::Async.listen(0, 8080) -> $c { whenever $c.Supply { .say }} 19:44
> react whenever IO::Socket::Async.connect(<127.0.0.1>, 8080) -> $c { whenever Supply.interval(1) { $c.write("something".encode) }}
so… there is a way 19:45
i think theres modules for mqtt and zmq if you need something powerful, but I've never needed anything above tcp 19:51
El_Che profilers.t is failing a lot 19:54
p6steve voldenet: that's really cool - thanks! 20:12
i hereby nominate default "standard" ports for raku as 3461 (Supply) and 3463 (Channel) since they appear to be unoccupied ... en.wikipedia.org/wiki/List_of_TCP_...rt_numbers ... maybe helpful if we all use the same 20:39