This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:42 deoac left 01:31 jgaz joined
nemokosch For the same reason: it's an element of an array 02:02
02:24 tea3po joined 02:27 teatwo left 03:54 MasterDuke left 05:20 kjp left 05:23 kjp joined 06:54 wafflus joined
wafflus i'm messing aroud doing some perl6 regex does anyone know how to do this in perl6 \b\w{4,9}\b? I tried doing what i thought was the perl6 way but i got weird results 06:54
08:19 Wsun joined
lizmat wafflus: this channel is about the Raku Programming Language :-) 08:19
wafflus =L 08:20
lizmat word boundary: docs.raku.org/language/regexes#Word_boundary
quantifiers: docs.raku.org/language/regexes#Gen...*_min..max 08:21
wafflus i know what a word boundry and quantifier is i just wanted to compare my sollution and see if i was doing it wrong
but ty 08:22
thankyou anyways
lizmat "weird results" doesn't help in answering a question 08:23
if you provide a gist with what you did, and what you expected, then maybe someone will be able to provide an answer
wafflus well the point was to see what people came up with and see if it was different and then see if there sollution was different and had the same problems as mine and if it did i was going to post more ingo 08:25
i think i fixed it anyways :)
i think i have more problems learning the rules of raku than the rules of regex atm :P 08:28
CIAvash `«\w ** 4..9»` or `<|w> \w ** 4..9 <|w>` as lizmat's links explain. But I'm not sure word boundaries are doing anything here, since you're matching only word characters(\w) 08:45
Well Raku's regex is not compatible with regex of other programming languages, so you need to learn Raku's regex 08:46
wafflus ty i can see now there is a difference between <|w> and using <<>> <|w> seems to delete the last characters
i am learnuing but <|w> dnt seem to behave like \b
CIAvash can you give us an example? 08:50
wafflus maybe i misread but according to the mnaual To match any word boundary, use <|w> or <?wb> however they give different results 08:51
i can post the file i was testing on
perl6 -ne 'say $/ if $_ ~~ m/<|wb>\w ** 3..8 <|wb>/' filelocation 08:54
pastebin.com/gDjPaPAW
lizmat wafflus: OOC, which version of Raku are you using ? 08:55
wafflus This is Rakudo version 2019.11 built on MoarVM version 2019.11
implementing Perl 6.d.
08:56 Wsun left
lizmat wafflus: that's.... pretty old... you might want considering upgrading to at least 2023.04, 2023.05 if you're not on Windows 08:59
wafflus i'm on windows but that was from the wsl2 version inside windows
the windows one is Welcome to RakudoΓäó v2023.04. 09:00
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.04.
but as u can see the unicode does not work and i can't figure out how to get it to work
lizmat ah, it still thinks it's not on Windows then 09:01
wafflus any ideas what to do atm i have to go though wsl and rlwrap 09:02
lizmat ┬« is mojibake for ™
wafflus ah cool :) it does kind of make the output a little unreadable though
lizmat yeah, that's why it does (tm) on Windows 09:03
the fact that it doesn't, seems to indicate it thinks it's not on Windows
wafflus i tried both rakudostar and rakubrew both seem to have the same problem from what i remember
and btw i can't even input unicode i get diamonds with question marks in them 09:05
usign windows version that is
lizmat 5ab5traction5.bearblog.dev/fixing-...s-windows/
can be of use perhaps 09:06
wafflus ty tried chcp 65001 doesn't seem to work i'll guess i can try the registry version but that requires a restart 09:08
lizmat I guess I've run out of suggestions then :-(
wafflus np the linked page also seems to have more sollutions i can try 09:09
so you think the <|w> is a bug and not behaving correctly
?
anyways ty for your help it seems your a bit of a legend round here lizmat 09:11
around
lizmat so they say... :-) 09:12
and you're welcome!
wafflus always appreciate someone who at least tries to help i will try installing a different raku version see if it changes the word boundry strangness and i will also try those windows fixes 09:15
lizmat thanks, and please don't hesitate to make an issue if you think something's wrong 09:16
if there's not, then there's a good chance either the documentation is wrong or unclear, and need fixing
CIAvash You still didn't say what get from elsewhere and what you get with Raku's regex. Using your test file I get the same results 09:17
wafflus maybe i'm just cursed
sec i can post output 09:18
i'm just installing a diffrent version so i'm retesting it 09:19
ah it seems i made a typo CIAvash 09:25
i was uing <|wb> 09:26
if you use <wb> then you get efresher」 or [refreshe] 09:29
if you use <|wb> then you get efresher」 or [refreshe]
obviosully i made a mistake though still dont fully understand what is happening there 09:30
i'm guess they just count as some kind of blank regex 09:34
09:41 wafflus left
nemokosch You mean an assertion? 10:24
13:33 Tirifto joined 14:23 teatwo joined 14:24 teatwo left 14:25 teatwo joined 14:26 tea3po left 16:52 SmokeMachine left, SmokeMachine joined 19:22 deoac joined 20:53 saint- joined 21:54 deoac left