🦋 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.
00:03 reportable6 left 00:04 reportable6 joined 00:53 evalable6 joined 00:55 linkable6 joined 00:58 gordonfish- joined 01:00 gordonfish left 01:15 swaggboi left, swaggboi joined 01:24 gordonfish- is now known as gordonfish 01:43 Eddward joined
Eddward m: 3**2 01:44
camelia WARNINGS for <tmp>:
Useless use of "**" in expression "3**2" in sink context (line 1)
Eddward m: day 3**2
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
day used at line 1. Did you mean 'say'?
Eddward m: say 3**2
camelia 9
Eddward m: say [1, {$_*2} ... 10]
camelia MoarVM panic: Memory allocation failed; could not allocate 1355392 bytes
Eddward m: say [1, { $_ * 2 } ... 10]
camelia MoarVM panic: Memory allocation failed; could not allocate 1355392 bytes
Eddward 5, { $_ * 2 } ... 40 01:45
m: say 5, { $_ * 2 } ... 40
camelia (5 10 20 40)
Eddward m: say [ 5, { $_ * 2 } ... 40 ]
camelia [5 10 20 40]
Eddward m: say [ 5, { $_ * 2 } ... 10 ]
camelia [5 10]
Eddward m: say [ 1, { ($_+1) * 2 } ... 10 ] 01:46
camelia [1 4 10]
Eddward m: say [ 1, { ($_+1) ** ($_+1) } ... 10 ]
camelia (timeout) 01:47
01:53 benchable6 joined
gfldex m: my &min-prime = -> $_, *%_ { .first(&is-prime, |%_) }; say min-prime [10..42], :end; 02:47
camelia 41
gfldex codesections: ^^^
02:52 keutoi joined 03:52 benchable6 left, nativecallable6 left, sourceable6 left, unicodable6 left, greppable6 left, shareable6 left, bloatable6 left, tellable6 left, coverable6 left, reportable6 left, quotable6 left, bisectable6 left, statisfiable6 left, notable6 left, evalable6 left, linkable6 left, committable6 left, releasable6 left, tellable6 joined 03:53 releasable6 joined, notable6 joined, benchable6 joined, greppable6 joined, bisectable6 joined 03:54 reportable6 joined 03:55 quotable6 joined, shareable6 joined
codesections gfldex, yeah, I know. Or even better with &first instead of .first:my &min-prime = -> |c {first(&is-prime, |c)}; say min-prime [10..42], :end 04:16
m: my &min-prime = -> |c {first(&is-prime, |c)}; say min-prime [10..42], :end
camelia 41
codesections but, still, that's not quite as nice as Whatever currying 04:17
(imo)
m: my &min-prime = &first ∘ ->|c {\(&is-prime, |c)}; say min-prime [10..42], :end # also works, and a bit clearer (again, imo) 04:19
camelia 41
04:53 statisfiable6 joined, committable6 joined, linkable6 joined 04:54 coverable6 joined 04:55 bloatable6 joined, sourceable6 joined 05:13 squashable6 joined 05:52 nativecallable6 joined 05:53 unicodable6 joined 05:55 evalable6 joined 06:03 reportable6 left 06:19 abraxxa-home joined 06:29 squashable6 left 06:42 Eddward left 07:34 Sgeo left 07:39 squashable6 joined 08:25 lizmat_ joined 08:26 RakuIRCLogger left, TempIRCLogger left, Geth left 08:28 lizmat left 09:05 reportable6 joined 09:08 holyghost joined 09:13 lizmat_ left, lizmat joined, RakuIRCLogger joined 09:14 Geth joined 09:15 TempIRCLogger joined 09:55 gcd joined 10:55 reportable6 left, sourceable6 left, evalable6 left, greppable6 left, coverable6 left, bisectable6 left, benchable6 left, bloatable6 left, releasable6 left, committable6 left, shareable6 left, tellable6 left, quotable6 left, linkable6 left, squashable6 left, unicodable6 left, statisfiable6 left, notable6 left, nativecallable6 left 10:56 shareable6 joined, notable6 joined, statisfiable6 joined 10:57 immediate joined, reportable6 joined, bisectable6 joined 10:58 quotable6 joined, committable6 joined, coverable6 joined
immediate I make typos and pass unwanted named arguments to methods. Because of `%_` I don't get errors as I would with a subroutine. I write `die "..." if %_` to the beginnings of each method. Is there a way I can automate this for each method defined in a class 11:08
11:20 immediate left 11:21 immediate joined 11:56 greppable6 joined, squashable6 joined, linkable6 joined 11:58 tellable6 joined, unicodable6 joined 12:02 reportable6 left 12:18 charsbar left 12:24 charsbar joined 12:28 Guest92 joined 12:30 Guest92 left 12:43 holyghost left, holyghost joined
gfldex immediate: raku.land/github:nxadm/StrictNamedArguments 12:47
immediate oh thanks a lot 12:49
holyghost immediate, as gfldex says, I only use them in my sub method BUILD. Didn't understand your question. 12:54
12:56 benchable6 joined, bloatable6 joined, releasable6 joined
holyghost I am on vacation tomorrow, I am going to make some AI agent system out of my module AI-Agent, probably client-serverwise 12:57
So you can send out intelligent agents from phone to phone for example
The sky's the limit :-)
So one just automates searches of agents on your phone and invites them etc without use input then you get e.g. mails/messages what others have of freeware or music (e.g. from your friends) etc 12:59
S/use/user/
The system should be fully automated
AI as if it were
phogg this works as expected: my $s = "<[ of ]>"; "foolish".match(/ ^ <$s> + /); but... 13:00
m: my $s = "of"; "foolish".match(/ ^ <[ <$s> ]> + /)
camelia ( no output )
holyghost I guess there's raku for android/iPhone/nokias. Needs e.g. a binary which can be run as a server or client
phogg where am I going wrong here? 13:01
MasterDuke you can't interpolate into character classes
phogg I noticed. Supposing I want to, how can I get around that? 13:02
I can dump my chars into a string "<[ $s ]>" first, but then they are not escaped properly
MasterDuke you'd have to build the regex and then EVAL it
phogg Makes sense. 13:03
13:04 reportable6 joined
Anton Antonov @holyghost I am using Raku to translate natural language specifications of computational workflows into executable code (mostly R and Mathematica, sometimes Raku and Python.) I assume I should be able to hook up that to the AI-Agent client-server idea you describe? 13:38
@holyghost Or maybe your AI-Agent framework is more "specialized", for some industry standard agents, say, from gaming? 13:40
holyghost It can be used for all of that, yes 13:41
OO and AI generally
OO <-> OOP
It was brought to me for making actor-objects in Scheme and LISP (without CLOS) 13:42
Anton Antonov @holyghost I looked into the AI-Agent GitHub repositories — I think more explanations and/or links are needed.(Sorry, if that seems too negative of a feedback…) 13:54
holyghost I will take care of it next week, I am going to do real AI agents with it then 13:56
Should be easy enough
13:57 sourceable6 joined
holyghost discord-raku-bot, take a look at : scsh.net/resources/sunterlib.html, there's the same things programmed in Scheme in some of the packages 13:58
Anton Antonov @holyghost Sounds good, thanks! 13:59
14:05 tejr left 14:06 tejr joined 14:14 immediate left
codesections m: my $s = "of"; say "foolish".match(/ ^ <{"<[ $s ]>"}> + /) 14:19
camelia ï½¢fooï½£ 14:20
codesections phogg ^^^ I think that might do what you want
see docs.raku.org/language/regexes#Reg...erpolation
14:21 immediate joined
Anton Antonov @codesections You might be interested to see this Raku package `ML::TriesWithFrequencies` : github.com/antononcube/Raku-ML-Tri...requencies . 14:22
phogg codesections: seems to work! 14:24
Anton Antonov @codesection This is a great read: news.perlfoundation.org/post/grant...s_for_raku 14:30
phogg codesections: it's not quite perfect, though. I still need to escape each char of $s to avoid breaking on e.g. $s = ']>'; Still nicer than EVAL. 14:31
14:31 immediate left
codesections phogg, good point. Here's a different approach with slightly different semantics: 14:41
m: my $s = "of]"; say "foolish".match(/ ^ @($s.comb) + /)
camelia ï½¢fooï½£
codesections It uses docs.raku.org/language/regexes#Quo...TM_matches and gets the same result in these cases, but technically expands to /^ [ o | f | ']' ]+ / 14:43
instead of /^ <[of\]]>+ /
phogg I don't think that matters 14:53
14:57 nativecallable6 joined 14:58 evalable6 joined 15:31 Tirifto left 15:33 Tirifto joined 16:33 quotable6 left, linkable6 left, coverable6 left, reportable6 left, squashable6 left, statisfiable6 left, committable6 left, shareable6 left, bisectable6 left, notable6 left, benchable6 left, tellable6 left, greppable6 left, unicodable6 left, sourceable6 left, nativecallable6 left, evalable6 left, bloatable6 left, releasable6 left, nativecallable6 joined, greppable6 joined, committable6 joined, benchable6 joined 16:34 squashable6 joined, tellable6 joined, releasable6 joined 16:35 statisfiable6 joined 16:36 bisectable6 joined 16:56 Sgeo joined 17:28 keutoi left 17:34 shareable6 joined 17:35 notable6 joined, coverable6 joined, linkable6 joined 17:44 eseyman left 17:46 holyghost left, holyghost joined, holyghost left 17:49 eseyman joined 18:35 evalable6 joined, quotable6 joined, unicodable6 joined 19:03 reportable6 joined 19:18 jjido joined 19:34 sourceable6 joined 19:45 justsomeguy joined 20:00 clarkema left, clarkema joined 20:01 abraxxa-home left 20:03 clarkema left, clarkema joined 21:22 evalable6 left, linkable6 left 21:24 evalable6 joined 21:28 swaggboi left 21:34 jjido left 21:42 swaggboi joined 22:06 holyghost joined 22:36 bloatable6 joined 22:37 holyghost left 22:49 slu left 23:09 justsomeguy left 23:24 linkable6 joined 23:28 guifa left