🦋 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.
Geth doc/master: 31 commits pushed by Altai-man++, Coke++, (Will Coleda)++
review: github.com/Raku/doc/compare/53319f...615eef403b
00:57
saint- I want to be able to have a character to be any character except for a double line-break, The idea is to like make a paragraph as a single token www.toptal.com/developers/hastebin...vimofib.pl 01:01
saint- Figured it out! 01:56
Is there a way to limit the "depth" of the print out of a match?
[Coke] You could print out the specific components you're interested in. 01:57
saint- So, for example I'd like to print all the matches except for like my single letter tokens 01:58
drakonis hm, there's no pattern matching in raku, is there?
saint- I'm using the grammar match thing
It's awesome, just is a bit hard to read out when it prints every character too 01:59
I'm sorry, I'm actually using the parse method 02:02
drakonis multiple dispatch isn't quite the same, is it? 02:03
[Coke] no.. pattern.. matching ? 02:07
saint- How would I print all of a certain token from a match? 02:09
[Coke] do you have a small example showing the match you'd like to only print part of?
saint- Sure one sec 02:10
[Coke] m: my $a = "this is fun" ~~ /$<verb>='is'/; dd $a<verb>
camelia Match.new(:orig("this is fun"), :from(2), :pos(4)) 02:10
saint- This is the end of the output www.toptal.com/developers/hastebin...facone.php
[Coke] m: my $a = "this is fun" ~~ /$<verb>='is'/; dd ~$a<verb> 02:11
camelia "is"
saint- And I just want to print refBlock s
drakonis [Coke]: rosettacode.org/wiki/Pattern_matching#OCaml
saint- www.toptal.com/developers/hastebin...equkat.xml
This is my code
drakonis multiple dispatch is mostly like pattern matching i guess? 02:12
saint- disregard the .hash in the $match.hash part, I was just testing that out
[Coke] drakonis: rosettacode.org/wiki/Pattern_matching#Raku ? 02:13
drakonis yes i saw that
its done with multiple dispatch
saint- $match<refBlock> isn't working for me 02:14
$match<block> does though 02:15
But once again it prints everything recursively basically 02:16
drakonis funny, ocaml can do something like multiple dispatch too
pattern matching is amazing.
[Coke] drakonis: do you have a pointer to a definition for pattern matching? that page mentions algebraic data types and then says you can do pattern matching on them, but doesn't define it. 02:18
drakonis does wikipedia serve as a pointer?
[Coke] I assume this is part of formal computer science theory that my comp sys background skimped on
drakonis or ocaml's docs
ocaml.org/manual/patterns.html
[Coke] the wikipedia page seemed VERY generic. 02:19
drakonis www.haskell.org/tutorial/patterns.html
[Coke] and the ocaml seems much more specific. reading...
drakonis haskell's explanation also goes in depth
but the syntax for pattern matching is uglier than ocaml's 02:20
[Coke] those are very dense.
drakonis however it looks a lot more like raku's syntax
[Coke] so I am not the one who is going to answer your question tonight, sorry. :)
cheers!
drakonis since it lets you do pattern matching through multiple definitions of the same function 02:21
cheers.
no problem.
raku doesnt seem to have guards for making complex pattern matching possible 02:22
like a tree of matches
or maybe it does, through constraints? 02:23
saint- Based on this code www.toptal.com/developers/hastebin...igojiq.xml do you know how I would print out all refBlock matches only? 02:24
drakonis okay so you actually can do something like guards with signatures 02:25
how nice.
its a lot better than julia's 02:26
it'd be quite nice if raku could successfully enter the scientific computations space 02:27
andinus how is '**' faster than multiplying in a loop? -- paste.debian.net/plainh/faf95e3e 04:48
Nemokosch What you were doing isn't just multiplying in a loop though 07:05
But reducing an array
Who knows what memory operations happen in that time or how the reducing step is invoked
andinus changing that to paste.debian.net/plainh/4a452e5c -- loop still seems to be slower 08:31
how can i look at '**' implementation? 08:32
MasterDuke github.com/rakudo/rakudo/blob/mast...#L382-L394 08:51
and github.com/MoarVM/MoarVM/blob/mast...#L613-L673 and github.com/MoarVM/MoarVM/blob/mast...#L715-L734 08:52
so for large numbers libtommath might have some better algorithm than just repeated multiplication. but `$x * $x` is faster than `$x ** 2` 08:54
lizmat MasterDuke: I wonder whether an infix:<**>(Int,2) candidate would make sense 09:02
MasterDuke yeah. iirc prior to new-disp literal candidates slowed the others down too much, but i think that's better now 09:04
also, i still plan to clean up github.com/rakudo/rakudo/pull/4320 09:05
MasterDuke yeah. so adding a multi for literal 2 makes `** 2` faster, but `** 3` slower 09:11
m: my $a; my $s = now; $a = $_ ** 2 for ^10_000_000; say now - $s; say $a;
camelia 3.846028098
99999980000001
MasterDuke m: multi infix:<**>(Int:D $a, 2) { $a * $a }; my $a; my $s = now; $a = $_ ** 2 for ^10_000_000; say now - $s; say $a;
camelia 3.063476915
99999980000001
MasterDuke m: my $a; my $s = now; $a = $_ ** 3 for ^10_000_000; say now - $s; say $a; 09:12
camelia 3.96146164
999999700000029999999
MasterDuke m: multi infix:<**>(Int:D $a, 2) { $a * $a }; my $a; my $s = now; $a = $_ ** 3 for ^10_000_000; say now - $s; say $a;
camelia 6.508001321
999999700000029999999
lizmat yeah
MasterDuke maybe it's best to just handle it in the optimizer 09:18
i actually thought i had done something like that, but i don't see anything. maybe i was experimenting at the same time as i was playing around with that PR 09:23
Geth ecosystem: d2511be8d2 | (Lucien Grondin)++ (committed using GitHub Web editor) | META.list
Add PBKDF2 to ecosystem

see github.com/grondilu/pbkdf2-raku.git
09:58
grondilu m: proto foo($, :$arg = "bar") {*}; multi foo(Str $x, :$arg) { say $arg }; multi foo(Int $x, :$arg) { say $arg }; foo(53) 10:17
camelia (Any)
grondilu can't I put default name parameters values in the proto?
m: proto foo($, :$arg = "bar") {*}; multi foo(Str $x, :$arg) { say $arg }; multi foo(Int $x) { say $arg }; foo(53) 10:20
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$arg' is not declared. Perhaps you forgot a 'sub' if this
was intended to be part of a signature?
at <tmp>:1
------> ) { say $arg }; multi foo(Int $x) { say ⏏$arg }; foo(53)
rir Linux source rakudo-star 2022.03 still has, in */etc/fetch_core.txt, the wrong versions for nqp, moarvm and rakudo. 13:55
gfldex grondilu: you can build a new capture in the protos body and use nextwith 15:41
Geth ¦ Documentable: coke assigned to antoniogamiz Issue Test failures github.com/Raku/Documentable/issues/160 17:57
[Coke] lizmat: looks like you're subscribed to all events coming from raku/nqp - can you add ticket notifications for that repo to IRC? 18:10
github.com/Raku/nqp/issues/633 18:11
looks like we get assignment notifications, but not creation 18:15
lizmat [Coke]: will look at that soon 19:01
tellable6 2022-04-16T17:44:17Z #raku-dev <AlexDaniel> lizmat I think tellable is back up (with all the messages, nothing was lost from what I can tell)
2022-04-16T17:44:48Z #raku-dev <AlexDaniel> lizmat there is a chance that it will redeliver some messages that were already delivered, but based on what I see it's all good
2022-04-16T17:45:24Z #raku-dev <AlexDaniel> lizmat btw now with IRC-logs we can make quotable work again, which is really cool
lizmat I don't even know what quotable6 is :-) 19:06
MasterDuke searches irc logs 19:17
quotable6: test-t-20 19:18
quotable6 MasterDuke, OK, working on it! This may take up to three minutes (4582161 messages to process)
MasterDuke, gist.github.com/c42e1844ad8671fb52...ad68eba12c
MasterDuke quotable6: 'test-t-20'
quotable6 MasterDuke, OK, working on it! This may take up to three minutes (4582161 messages to process)
MasterDuke, 390 messages (2017-10-26⌁2018-04-28): gist.github.com/397b3119e79b64f64f...faedab6237 19:19
Geth Raku-Steering-Council/main: b5084e5043 | (Geoffrey Broadwell)++ | minutes/20220402.md
Fix date copy pasta
19:20
melezhik . 22:56
tellable6 2022-03-09T22:50:00Z #raku <tonyo> melezhik: you could just use one already available, i have a cron doing nightlys for the past couple of years
2022-03-09T22:50:00Z #raku <tonyo> melezhik: hub.docker.com/repository/docker/t...do-nightly
2021-09-15T15:12:00Z #raku-dev <lizmat> .tell melezhik you might find this interesting: raku.land/zef:lizmat/Rakudo::Options
melezhik .tell SmokeMachine I see are trying to run Red under SparkyCI, if you see timeouts  failure - please bear with me, it seems, Sparky needs some improvement for long running builds 22:58
tellable6 melezhik, I'll pass your message to SmokeMachine
melezhik I will let you know once it's fixed
SmokeMachine . 23:01
melezhik SmokeMachine actually one build just came through - sparrowhub.io:2222/report/132 23:02
but again , if you see timeouts - please let me know or file bug to SparkyCI GH
thanks
SmokeMachine .tell melezhik I was just going to write to you :). Yes, thanks... 23:05
tellable6 SmokeMachine, I'll pass your message to melezhik
melezhik NP
SmokeMachine .tell melezhik it seems it's not being able to connect to PG... 23:06
tellable6 SmokeMachine, I'll pass your message to melezhik
SmokeMachine .tell melezhik sorry, it seems I misunderstood the message: `stderr: initdb: warning: enabling "trust" authentication for local connections` 23:10
tellable6 SmokeMachine, I'll pass your message to melezhik
SmokeMachine .tell melezhik I'm not finding what the error is on this log: sparrowhub.io:2222/report/132\ 23:11
tellable6 SmokeMachine, I'll pass your message to melezhik
SmokeMachine .tell melezhik the truth is I can't see it running the tests... 23:12
tellable6 SmokeMachine, I'll pass your message to melezhik