🦋 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. |
|||
ugexe | the example shown only makes sense when its literally just tweaking the value you are cloning. it does not make sense for almost any other code TWEAK might run | 00:01 | |
00:07
reportable6 left
|
|||
japhb | ugexe: Not sure about that. I use TWEAK in several cases to make sure that I cache some slow-to-compute values based on the public attributes at object creation time, to avoid any risk of concurrency races to compute it later. | 00:30 | |
*compute them | |||
ugexe | thats fine, why would you want TWEAK called again? | 00:32 | |
.clone would be copying the attributes after that heavy lifting has been done, so i dont see why you would want TWEAK to do anything | |||
japhb | ugexe: If one of the changed public attributes affected that computation. | 00:33 | |
ugexe | class Foo { has $.a; has $.b submethod TWEAK(:$!a, :$!b) { $!b = $!b * 100} }; Foo.new(a => 1).clone(a => 2) | 00:34 | |
japhb | Meaning, if my internal cache had been invalidated by an attribute override. | ||
ugexe | .clone should not be affecting $.b | ||
it should clone $.b over, not run TWEAK again | |||
although if you did want it to do so then thats a case for writing a custom clone method | |||
in general that does not seem ideal | 00:35 | ||
japhb | OIC. You're merging BUILD and TWEAK, I think. | ||
01:07
linkable6 left,
evalable6 left
01:35
frost joined
02:08
evalable6 joined
02:53
simcop2387 left,
perlbot left
03:04
simcop2387 joined
03:09
reportable6 joined
03:10
perlbot joined
|
|||
Xliff | How can I get a list of currently loaded compunits? | 04:08 | |
04:09
linkable6 joined
|
|||
Geth | Raku-Steering-Council/main: d35d096a68 | (Geoffrey Broadwell)++ | minutes/20220219.md Add RSC meeting minutes for 2022-02-19 |
04:44 | |
05:09
evalable6 left,
linkable6 left
05:35
frost left
05:52
jrjsmrtn left
05:56
jrjsmrtn joined
06:09
reportable6 left,
mexen joined
06:10
reportable6 joined
06:14
abraxxa-home joined
06:16
abraxxa-home left
06:24
abraxxa-home joined
07:08
jjido joined
07:10
evalable6 joined,
tejr left
07:11
tejr joined
07:33
Altai-man joined
07:35
Altai-man left
08:22
Sgeo left
08:25
abraxxa-home left
08:27
abraxxa joined,
ccntrq joined
08:31
abraxxa left
08:33
abraxxa joined
08:37
frost joined
08:41
abraxxa left
08:42
abraxxa joined
09:10
tejr left
09:11
tejr joined
09:17
dakkar joined
09:29
frost left
|
|||
CIAvash | Xliff: `$*REPO.repo-chain.map(|*.loaded).grep(&so)`? | 09:38 | |
Geth | doc/updated-ecosystem-faq: 52606e4027 | (Elizabeth Mattijsen)++ | doc/Language/faq.pod6 Update the ecosystem FAQ |
10:04 | |
doc: lizmat++ created pull request #4037: Update the ecosystem FAQ |
10:05 | ||
10:09
frost joined
10:20
lgtaube left
|
|||
Geth | doc/updated-modules-setup: 59eaa27b31 | (Elizabeth Mattijsen)++ | doc/Language/modules.pod6 Update modules setup for zef | fez |
10:25 | |
doc: lizmat++ created pull request #4038: Update modules setup for zef | fez |
|||
10:36
lgtaube joined,
jjido left
10:41
jjido joined
10:45
jjido left
|
|||
Nemokosch | Offtopic but is there something like qqx in Perl? | 10:56 | |
10:58
discord-raku-bot left
|
|||
CIAvash | As I mentioned in [problem-solving#317](github.com/Raku/problem-solving/issues/317) and other places, I don't understand why everyone wants to create and maintain their own project, when [problem-solving#158](github.com/Raku/problem-solving/issues/158) can solve and cover all those issues. It can be the main website, it can have a core blog, it can have an advent-blog, it can have an announcements section, it can have a community blog | 10:58 | |
where members of the community or others with relevant content can post their articles, maybe this can also be the place you revive or store old blog posts? it can be home to weekly blogs as well, for even different Raku implementations. It probably can be home to Documentation too, but that's another matter. Anyway I created my own website, maybe that's what people like to do, create their own things 😀 | |||
10:58
discord-raku-bot joined
|
|||
lizmat | CIAvash: good points... I had quite forgotten about that.... but the demo is not working (anymore) ? | 11:00 | |
11:01
Altai-man joined
|
|||
lizmat | also: I think more generally now that we can have a full Raku stack for websites, I have a slight preference for having the main website being a full stack Raku thing | 11:01 | |
dogfooding and all that :) | 11:02 | ||
El_Che | I think we miss oidc before we can speak of full stack | 11:06 | |
CIAvash | Updated the demo link, either I forgot to change it or something happened to the redirection. www.raku-lang.ir/en/ | 11:07 | |
Nemokosch: don't backticks and `qx` do that in Perl? If you mean variable interpolation | 11:11 | ||
Right now Raku can't do everything, so in some places you end up using external tools or well, creating them. A simple example is Raku syntax highlighter, do we have one written in Raku? | 11:14 | ||
Altai-man | CIAvash, nope. It depends on having a Raku parser written in Raku, but rakudo guts are not to be touched, Perl6::Parser is not active anymore. | 11:17 | |
There is a speculation the sitatuion can get better with introducing the RakuAST, as it opens a way to have something like "Parse the text and give me a stream of tokens" which then can be formatted and/or highlighted. | 11:18 | ||
*situation | |||
11:21
ccntrq1 joined
|
|||
Geth | doc: 743f394c93 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Language/faq.pod6 Update the ecosystem FAQ (#4037) |
11:22 | |
11:23
ccntrq left,
ccntrq1 is now known as ccntrq
12:07
reportable6 left
12:09
reportable6 joined
|
|||
lizmat | yes, I'd expect a Raku syntax highlighter in Raku to become available after RakuAST lands | 12:18 | |
CIAvash | But it won't highlight code of other languages used in POD; Chroma does 😀 | 12:24 | |
13:00
discord-raku-bot left,
discord-raku-bot joined
|
|||
Geth | problem-solving/sunsetting-p6c-cpan: 3de16a68c8 | (Elizabeth Mattijsen)++ | solutions/meta/sunsetting-p6c-cpan.md First stab at resolution document for #316 |
13:04 | |
problem-solving: lizmat++ created pull request #318: First stab at resolution document for #316 |
|||
13:10
linkable6 joined
13:15
jjido joined
13:39
frost left
14:08
morte_ joined
|
|||
Geth | doc: f68ed10ab1 | Coke++ | doc/Language/faq.pod6 whitespace |
14:14 | |
doc: 097fce4e4a | Coke++ | doc/Language/faq.pod6 typo |
|||
doc: 5a4ac27425 | Coke++ | xt/pws/words.pws new word |
|||
linkable6 | Link: docs.raku.org/language/faq | ||
14:16
yo joined
14:17
ggoebel joined
14:18
yo is now known as ayu
|
|||
Geth | ecosystem: 5d6d128964 | (Elizabeth Mattijsen)++ | META.list Remove modules from p6c that now live in zef Email::Simple, Net::IMAP, NET::SMTP, PSpec, Time::Duration::Parser, Web::Template |
14:18 | |
14:23
ayu left
|
|||
ggoebel | is it possible to create or use interpolation to generate a regular expression character class? I.e. something like... @filter = <d .. z>; "abadaba" ~~ /^ <[a .. z] - [{@filter}]>+ $/ | 14:30 | |
MasterDuke | nope, not without using EVAL to create the regex | 14:32 | |
lizmat clickbaits rakudoweekly.blog/2022/02/21/2022-...rly-co-op/ | 14:34 | ||
ggoebel | say I have an @dictionary and I'd like to filter out all words that match any letter in an array... what approach would you take? @filtered = @dict.grep({ ... }}? | 14:36 | |
lizmat | ggoebel: probably would put the letters in a Set or a hash, and then grep on non-existence in that Set or hash ? | 14:38 | |
s/non-// | |||
my %s is Set = @letters; @filtered = @dict.grep: { .comb.first: { %s{$_} { | 14:41 | ||
my %s is Set = @letters; @filtered = @dict.grep: { .comb.first: { %s{$_} } | |||
of the top of my head :-) | |||
or perhaps use Map::Match | 14:42 | ||
my %m is Map::Match = @dictionary.map: * => 1; @filtered = %m{@letters}.unique | 14:44 | ||
also off the top of my head | |||
my %m is Map::Match = @dictionary.map: * => 1; @filtered = %m{@letters}:k.unique | |||
you don't want just 1s | 14:45 | ||
ggoebel | m: my @filter = <e .. z>; say @filter.any ∉ "abadaba".comb.cache | 14:48 | |
camelia | any(True, True, True) | ||
ggoebel | my @filter = <d .. z>; say @filter.any ∉ "abadaba".comb.cache | ||
evalable6 | any(False, True, True) | ||
ggoebel | lizmat: thank you | 14:50 | |
m: my @filter = <d .. z>; if @filter.all ∉ "abadaba".comb.cache { "ok".say } else { "nok".say } | 14:57 | ||
camelia | nok | ||
ggoebel | m: my @filter = <e .. z>; if @filter.all ∉ "abadaba".comb.cache { "ok".say } else { "nok".say } | ||
camelia | ok | ||
15:03
discord-raku-bot left,
discord-raku-bot joined
|
|||
japhb | m: say <d .. z> | 15:04 | |
camelia | (d .. z) | ||
japhb | m: say <d .. z>.elems | ||
camelia | 3 | ||
japhb | Yeah, I was pretty sure that wasn't a range | 15:05 | |
The .. is being taken literally | |||
m: say ('d' .. 'z').elems # I'm guessing this is what you were looking for? | |||
camelia | 23 | ||
15:07
discord-raku-bot left,
discord-raku-bot joined
|
|||
guifa | ggoebel perhaps you could tool this for you in some way: | 15:23 | |
m: my token filter ($x) {.<?{~$¢ (elem) $x}>}; my @abc = 'a'..'z'; my @nope = 'm'..'z'; say 'b' ~~ /<filter: @abc (-) @nope>/; say 't' ~~ /<filter: @abc (-) @nope>/ | 15:25 | ||
camelia | ï½¢bï½£ filter => ï½¢bï½£ Nil |
||
guifa | the token <filter: ... > takes either a list or a set, so you can piece things together with standard set operators | 15:26 | |
15:29
Sgeo joined
15:39
Altai-man left
15:40
jjido left
|
|||
japhb | File::Directory::Tree tests chew RAM for anyone else? I stopped it at 40 GB or so | 15:58 | |
ggoebel | japhb: thanks | 16:00 | |
guifa: will try to wrap my head around that. thanks! | 16:01 | ||
japhb | Not many places you see someone actually use $¢ | ||
16:03
clarjon1 joined
|
|||
guifa | japhb I legit think that's the long string of non-alpha characters I've written in Raku | 16:05 | |
japhb | Use ∈ and you can make it even longer! ;-) | 16:06 | |
guifa | was litearlly already typing it out :-) | 16:07 | |
my token filter($_){.<?{~$¢∈$_}>}; | |||
:D :D :D :D | |||
japhb | Yep, hard to resist once you've gotten started, isn't it. It's like you gave yourself a challenge and immediately accepted. ;-) | 16:08 | |
APL: "Seems legit." | 16:11 | ||
guifa | Perl: *yawn* | ||
MasterDuke | japhb: can repro F::D::T eating ram. it's not the recent mimalloc bump, i still see it even with a moarvm compiled with --no-mimalloc | ||
guifa | still, that works pretty nice as a runtime character class, esp since it lets you use all of the normal set operators (so technically, even, a bit more powerful). Performance will be not as good though I'm sure, since I'd imagine character classes can optimize for ranges and this one can | 16:12 | |
MasterDuke | it's spinning in mktree somehow | 16:16 | |
spinning in github.com/labster/p6-file-directo....pm#L7-L10 | 16:18 | ||
guessing it's github.com/rakudo/rakudo/pull/4795 | 16:21 | ||
japhb | Good thinking | 16:24 | |
16:52
[Coke] left
16:56
jjido joined
16:58
[Coke] joined
17:00
mexen left
|
|||
Nemokosch | Hyper can be used with mutable operations, right? | 17:04 | |
moritz | yes | 17:06 | |
17:12
lichtkind joined
|
|||
Nemokosch | okay, thanks | 17:13 | |
17:14
Guest12 joined
|
|||
Guest12 | r: loop {Â await ^2 .map: { start { require ::("Test") } }Â } | 17:15 | |
camelia | Can't open perl script "/home/camelia/rakudo-j-inst/bin/eval-client.pl": No such file or directory | ||
An operation first awaited: in block <unit> at <tmp> line 1 Died with the exception: Failed to seek in filehandle: 22 in block at <tmp> line 1 |
|||
Nemokosch | one more: does the list assignment operator return the assigned list? | ||
guifa | Nemokosch: it does. | 17:17 | |
Guest12 | m: loop {Â await ^2 .map: { start { require ::("Test") } }Â } | ||
camelia | An operation first awaited: in block <unit> at <tmp> line 1 Died with the exception: Failed to seek in filehandle: 22 in block at <tmp> line 1 |
||
guifa | m: my @a; say @a = 1,2,3; | ||
camelia | [1 2 3] | ||
Nemokosch | cool, it seemed to work indeed | 17:20 | |
however, every solved thing spawns a new question 😅 | |||
> Potential difficulties: | |||
> Useless use of >>[&eli-value-fallback]>> in sink context | |||
can I somehow silence this? | |||
like, I know it's sink context, I use it for mutation | |||
nvm, found it | 17:22 | ||
the sink prefix | |||
17:23
abraxxa left
|
|||
uh oh... | 17:27 | ||
the assignment returns the very same array, right? not a copy | |||
that's a problem with a state variable | 17:28 | ||
17:30
jjido left
17:38
jjido joined,
dakkar left
|
|||
Geth | ecosystem: 795f2cd4d0 | (Elizabeth Mattijsen)++ | META.list Freeze File::Bundled While we move it to the zef ecosystem |
17:39 | |
17:44
morte_ left
17:48
morte_ joined
18:07
reportable6 left
18:08
reportable6 joined
|
|||
tonyo | the zef eco grows stronger | 18:08 | |
18:16
Guest12 left
|
|||
lizmat | :-) | 18:20 | |
Geth | ecosystem: 0d74ac92e3 | (Elizabeth Mattijsen)++ | META.list Remove Find::Bundled from the ecosystem The code still uses @*INC and as such has not functioned for at least 6 years. The functionality it provided, is now standard in Raku with the %?RESOURCES interface. So it is a wrong solution to a problem that no longer exists. The repo in raku-community-modules has been archived. |
18:39 | |
18:42
MasterDuke left
|
|||
Geth | ecosystem: f85adfe926 | (Elizabeth Mattijsen)++ | META.list Freeze JSON::JWT While we move it to the Raku ecosystem |
18:56 | |
18:58
euandreh left
19:01
euandreh joined
19:02
mexen joined
|
|||
[Coke] | when using --moar-option to rakudo configure, is it ok to use it multiple times? | 19:11 | |
19:12
morte_ left
|
|||
[Coke] | (apparently yes) | 19:12 | |
19:41
morte_ joined
19:44
Darkcoal joined
19:51
Darkcoal left
19:54
dextercd joined
20:01
MasterDuke joined
|
|||
tonyo | zef db is cutting over, might be a few minutes of login/upload problems | 20:26 | |
japhb | tonyo: cutting over from what to what? | 20:32 | |
tonyo | moving the db from aws to linode | ||
japhb | Ah | 20:37 | |
20:42
ccntrq left
20:56
Guest1838 joined
|
|||
tonyo | alright, fez should be back up | 21:00 | |
21:00
lichtkind_ joined
21:01
jjido left
21:03
lichtkind left,
jjido joined
21:04
ocomport left
21:05
lichtkind_ left
|
|||
Guest1838 | sorry, this got long: it suddenly popped into mind, "-Ofun", optimized for FUN! :)  as an operational newbie (albeit longtime 10,000-foot lurker) to raku, could someone point me to something that i could do for the community that would be 1) low barrier to entry, 2) useful, 3) would help me (gradually) ease myself into the | 21:06 | |
language/ecosystem/community, while also be useful for everyone? assuming i don't flake (like i'm sure many with a rush of enthusiasm ultimately do), my personal interest in raku is more in the "100-year language" sense, less in the "i have a TODO that i need to DO today" sense... i would love if humanity had a "lingua franca" in the | |||
computational realm, and the various contenders i am aware of for "total systems" are just... not inspiring to me, personally, for this or that reason... raku has great technology, but i think more importantly it has a wonderful community... polite, open, and *unrushed*... "rome wasn't built in a day" and all that | |||
tonyo | a pure raku gzip module would be nice | 21:07 | |
[Coke] | there's bug queues for rakudo/nqp/moarVM/docs which usually have some tag to indicate good tickets or first users... what sort of skills? programming? (what langs), QA, documentation... | 21:08 | |
japhb | Guest1838: You could ask lizmat if she would like help with her ecosystem update work, she's got like 100 modules left to convert (but may have gotten into an efficient groove already, I dunno) | 21:09 | |
Guest1838 | i love the idea of a gzip module (compression is interesting theoretically and practically, and having something that was streaming, concurrent, etc. would be neat), but that's beyond my ken ATM | 21:16 | |
in term of bug trackers, where are those? is rakudo.org/issue-trackers the canonical starting point? | |||
as for module conversion, that's probably not yet appropriate for me either, given that i really am not up to speed on the language proper | 21:17 | ||
[Coke] | it's a great place to start, sure! | ||
Guest1838 | sweet! | 21:18 | |
MasterDuke | well, i don't think the module conversion really requires any raku programming. i think it's mostly some git and shell commands and editing a json file | 21:20 | |
Guest1838 | ahhh, okay, i didn't know that... is there a page that talks about what it is/entails in more detail? | 21:21 | |
MasterDuke | i don't think so, you'd need to chat with lizmat | 21:24 | |
21:25
tonyo1 joined
21:37
ggoebel left
21:49
jjido left
21:54
tonyo left
21:55
tonyo1 is now known as tonyo
22:20
mexen left
22:38
jjido joined
22:55
dextercd left
22:57
morte_ left
|
|||
guifa | Guest1838 to be honest, if you take a simple module from another language and try to convert it, you'll learn a lot | 23:03 | |
You'll probably end up rewriting it all from scratch when you're done based on everything you learn, but having something practical as a goal is really useful | |||
What language are you coming from? | 23:04 | ||
lizmat | Guest1838: what also could be helpful is collecting and / or remastering blog posts in the CCR github.com/raku/CCR | 23:06 | |
23:16
djerius left
23:17
djerius joined
|