🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
00:03 reportable6 left, reportable6 joined 00:17 Kaiepi left 00:18 Kaiepi joined 00:27 simcop2387 left, simcop2387 joined, perlbot joined 00:49 lgtaube left 01:17 holly left 01:35 linkable6 joined 02:17 lgtaube joined 02:48 cbk__ joined 03:38 frost joined 04:38 greppable6 left, tellable6 left, evalable6 left, committable6 left, squashable6 left, coverable6 left, linkable6 left, bisectable6 left, shareable6 left, notable6 left, benchable6 left, sourceable6 left, quotable6 left, statisfiable6 left, nativecallable6 left, bloatable6 left, releasable6 left, reportable6 left, unicodable6 left, releasable6 joined, bisectable6 joined 04:39 squashable6 joined 04:40 greppable6 joined, statisfiable6 joined 04:41 benchable6 joined, quotable6 joined 05:12 Doc_Holliwood joined 05:31 dogbert11 left 05:35 dogbert17 joined 05:39 coverable6 joined 05:40 bloatable6 joined 05:41 evalable6 joined, reportable6 joined, notable6 joined 05:42 linkable6 joined, shareable6 joined 05:43 sourceable6 joined, tellable6 joined 05:44 unicodable6 joined, nativecallable6 joined 05:49 committable6 joined 05:55 Xliff joined
Xliff o 05:56
Who maintains the Atom plugin for Raku?
06:02 reportable6 left 06:04 reportable6 joined 06:54 abraxxa joined 06:59 abraxxa left, p6steve left 07:00 p6steve joined, abraxxa joined 07:26 Shaeto joined 07:29 Doc_Holliwood left 07:43 dakkar joined 07:46 stoned75 left 08:02 dolmen joined 08:04 stoned75 joined 08:07 Sgeo left 08:08 Kaiepi left, Kaipi joined 08:36 dolmen left 08:37 dolmen joined 09:40 Kaipi left, Kaipi joined
lizmat clickbaits rakudoweekly.blog/2021/05/31/2021-...r-the-bus/ 10:26
10:28 sena_kun joined 10:29 sena_kun left, sena_kun joined 10:33 dolmen left 10:50 patrickb joined 11:28 morayj joined 11:34 dolmen joined, dolmen left 11:41 morayj left 11:50 holly joined 11:54 morayj joined 12:02 reportable6 left 12:03 reportable6 joined 12:04 abraxxa left 12:06 sono left, abraxxa joined 12:11 abraxxa left 12:12 abraxxa joined
stoned75 ~ 12:16
oops
12:18 Doc_Holliwood joined 13:14 dogbert11 joined 13:15 dogbert11 left, dogbert11 joined 13:16 dogbert17 left 13:23 jberkel joined 13:26 Od1n joined
Od1n hello 13:26
jberkel hi, i'm trying to write a simple regex but it's already failing. I want to match a single hash (#) sign: my regex hash { \# }; => Malformed regex 13:28
does hash need to be escaped in some other way? 13:29
Altreus quote it 13:32
Juerd It works with '#' but shouldn't \# work too? 13:33
Altreus that's one for the grown ups 13:34
I just know non-alnum strings need quoting
jberkel docs.raku.org/language/regexes mentions: / \# /; # matches the hash metacharacter literally 13:35
so i assumed that's the way to do it
it looks like the # is interpreted as end of line comment, leaving a single \ 13:37
13:43 dakkar left
Altreus ah, regex foo { ... } doesn't trigger the same parsing rules as / ... / then I guess 13:46
Shaeto what does meat *@ and *% in parameters definition ? 13:50
tyil[m] Shaeto: docs.raku.org/type/Signature#index...y_argument 13:52
jberkel ok, it works with quoting, so i'm already a bit further. thanks 13:54
Shaeto single * or double ** or + is slurpy :( or my god
ty
13:56 dakkar joined 14:11 Doc_Holliwood left 14:19 Doc_Holliwood joined 14:29 frost left 14:30 jberkel left, SmokeMachine left, SmokeMachine joined 14:38 morayj left 14:40 p6steve left 14:42 p6steve joined 14:44 Sgeo joined 14:45 Od1n left 14:46 p6steve left 14:55 p6steve joined 14:59 Doc_Holliwood left 15:02 Doc_Holliwood joined 15:08 Kaipi left 15:11 Kaipi joined 15:16 jmcgnh left 15:19 masak_ joined 15:21 jmcgnh joined
holly github.com/theholyghost2/Solstice should be more compilable except for SDL2::Raw system. I will debug some more later on 15:24
Solstice is an old NES game, see google images or something 15:25
It's easy to RPG elements now 15:26
s/to/to add
15:32 stoned75 left 15:44 eseyman joined
lizmat m: react whenever supply emit "hello" { .say } # a roundabout way of saying "hello" :-) 16:02
camelia hello
16:05 stoned75 joined
moritz how async of you :D 16:05
holly ok, Solstice compiles :-) 16:21
now to coerce it
I want it in the ecosystem later on 16:22
lizmat holly: would be nice if it had tests before you put it in the ecosystem :-) 16:26
holly sure, I'll paint a Solstice-o-matic :-) 16:27
tests are for after debugging the game
it's more or less difficult to test
but I'll see what I can do 16:28
Later on I'll make an adventure game out of it 16:29
from back in the day, problem is I'm not too good at graphics 16:30
16:32 stoned75 left
holly Maybe we can make one with us designing the storyline 16:32
PRs or something 16:33
16:36 dakkar left
holly anyway, SFY 16:37
17:04 patrickb left 17:06 patrickb joined 17:14 guer joined 17:19 guifa joined
guifa o/ 17:19
holly hi 17:20
17:24 jmcgnh left, SmokeMachine left, sourceable6 left, shareable6 left, linkable6 left, notable6 left, evalable6 left, bloatable6 left, coverable6 left, peteretep left, kawaii_ left, kevin1 left, ComplYue[m] left, silug left, camelia left, guer left, codesect` joined, kawaii_ joined, daxim joined, sourceable6 joined, linkable6 joined, bloatable6 joined, shareable6 joined, evalable6 joined, notable6 joined, coverable6 joined, cognominal joined, silug joined, samebchase joined, charsbar joined, peteretep joined, kevin1 joined, guer joined 17:25 SmokeMachine joined, moon-child joined 17:27 codesect` left 17:28 guer left, jmcgnh joined 17:30 guer joined 17:31 codesections joined 17:36 p6steve left 17:44 dogbert11 left, dogbert11 joined 17:45 dogbert11 left 17:46 ComplYue[m] joined 17:47 dogbert11 joined 17:53 p6steve joined 18:03 reportable6 left
Xliff Good morning. 18:04
How hard would this be to implement?
Heredoc quoting construct is q:to/END/ right? 18:05
18:05 reportable6 joined
Xliff WVCards, markup their ilk are becoming more popular and they include their own ending delimiter? 18:05
So why not a heredoc that has the ending inclusive so one can do.... 18:06
q:TO/END:VCARD/?
Would this be better served on problem-solving?
codesections I kind of like that. Proposed syntax: q:thru/VCARD/ 18:07
but yeah, I think that'd probably need a problem-solving issue, since it'd be a new language feature 18:08
holly maybe use delimiter problem solving
e.g. theorem prover
codesections Would it only work for a delimiter that is the only thing on its line? Or any line-terminal delimiter? 18:10
Xliff codesections: Only thing on its line.
I will move to problem-solving. Thanks!
codesections++ # Better syntax 18:11
Done. 18:17
github.com/Raku/problem-solving/issues/282
codesections Anyone interested in a Birds of a Feather session at the Perl & Raku conf? www.reddit.com/r/rakulang/comments...raku_conf/ 18:29
19:05 linkable6 left, evalable6 left, evalable6 joined 19:06 stoned75 joined 19:07 linkable6 joined 19:12 stoned75 left
guifa Xliff++ that sounds like a pretty nice proposal 19:17
I don't think it would be too hard, it's probably just setting a boolean during parsing and then adjusting the cut off point for the string somewhere along the way 19:18
(although it's crossing language boundaries, so that may complicate it a bit but not too badly)
Xliff guifa: I don't think it will be too hard to implement. I am just seeking thoughts on the matter, so if you can comment on the issue, I'd appreciate it. 19:21
guifa Xliff: will do. your stray space actually causd jnthn to make a really good point (although he didn't expound on it) 19:25
The location of END in a normal q:to/END/ lets the parser know how many spaces on each line to strip out 19:26
since it's on its own line, that doesn't really cause any issues at all. But for, e.g., an XML end tag that may be on the same line as one or more other tags, it's not clear how to apply the indent-stripping functionality 19:27
lizmat guifa: the end string needs to be the only thing apart from whitespace, no> 19:28
?
guifa in a traditional heredoc yeah. 19:29
codesections Yeah, I asked about that ^^^ and Xliff confirmed that would still be true in this proposal
guifa err whoa, I totally missed that, apologies
codesections But yeah, absent that it'd get ... tricky 19:30
(That'd be nice in many use cases, but much harder to implement)
guifa I guess you could always allow for an extra modifier, but that does complicate it more. Like q:thru:4indent/</xml>/; 19:31
(and so I'd probably not recommend it ha) 19:32
19:36 stoned75 joined 19:43 tejr joined, tejr left 19:44 Shaeto left
leont still has some conference driven development to do for conf next week 19:44
codesections I wonder how many values have been used in "$_ driven development" 19:48
19:50 colomon joined
holly YARH :-) 19:50
colomon o/
Having a really weird show-stopper problem in my Raku script. I have a class which "has %.files". When I try to look at %.files, Raku hangs. Hoping this rings a bell for someone... 19:56
gfldex codesections: I'm still waiting for "QA driven development". 19:57
lizmat colomon: how do you "look" ?
colomon lizmat -- pretty much any way I've tried fails. For sure dd %.files 19:58
lizmat could you do a dd %!files ?
colomon oh! That does work. 19:59
Tried it earlier, but still hung because I had another %.files later, and I didn't notice it ran further before hanging
Xliff codesections: LOL! That's a bug I just found in my code. Hah! 20:00
lizmat colomon: also realize that %.files is just short for self.files could that explain something ?
colomon ARGH 20:01
that's it -- idiot me also defined a files method, which of course calls itself
okay, I can fix this no problem. Thank you for helping me sort things out. 20:02
holly so %!, %. problem
Xliff Class Attribute doesn't have a .private ? Can I ask why? 20:03
So instead I have to do $attr.name.starts-with('$!') which seems LTA 20:04
colomon lizmat++
Xliff Actually, $attr.name.substr(1, 1) 20:05
Check that against '!'
lizmat attributes always have the private name, no?
20:06 patrickb left
Xliff lizmat: With '!' as a part of their sigil? 20:06
lizmat: Yes, but as part of the public API, I would rather have a method than a check on attribute name.
lizmat m: class A { has $.a }; dd A.^attributes.head.name
evalable6 "\$!a"
20:07 tejr joined
Xliff lizmat: Would a PR adding a .is-private be worthwhile? 20:07
japhb Xliff: You're wanting to know if there was an auto-generated accessor created for the attribute?
Xliff japhb: Sure. But also if its considered private! 20:08
:)
Consider: "$attr.name.substr(1, 1) eq '!';" vs "$attr.is-private" in code.
I would prefer the latter.
japhb But that first one is broken is what lizmat++ I think was trying to say.
Xliff Yeah. It was. 20:09
Moved on from that.
japhb All attributes are created with a ! twigil ... it's just a question of whether an accessor was generated.
Xliff japhb: OK. How would one check for an accessor?
20:10 tejr left
japhb But of course you can create your own accessor, so I think we have a similar problem to knowing if a sequence is infinite 20:10
lizmat m: class A { has $.a }; dd A.^attributes.head.has_accessor
evalable6 Bool::True
lizmat m: class A { has $!a }; dd A.^attributes.head.has_accessor
evalable6 Bool::False
Xliff m: class A { has $.a; has $!b }; A.^attributes.map( *.name ).sa
evalable6 (exit code 1) No such method 'sa' for invocant of type 'Seq'. Did you mean any of
these: 'isa', 'say', 'so'?
in block <unit> at /tmp/_gRyyg7081 line 1
Xliff m: class A { has $.a; has $!b }; A.^attributes.map( *.name ).gist.say
evalable6 ($!a $!b)
lizmat Xliff ^^
has_accessor is what you want
Xliff lizmat++
Thank you. 20:11
holly cool
lizmat++
lizmat m: class A { has $!a; method a() { "foo" } }; dd A.^attributes.head.has_accessor
evalable6 Bool::False
lizmat it really is the flag that indicates whether an accessor should be made automatically 20:12
Xliff m: class A { has $!a; method a { $!a } }; dd A.^attributes.head.has_accessor
evalable6 Bool::False
Xliff heh
lizmat m: class A { has $!a; method a() { "foo" } }; dd A.^attributes.head.has_accessor && !A.^find_method("a")
evalable6 Bool::False
lizmat m: class A { has $!a; method a() { "foo" } }; dd A.^find_method("a") 20:13
evalable6 Method a = method a (A: *%_) { #`(Method|94155151744592) ... }
lizmat m: class A { has $!a }; dd A.^find_method("a")
evalable6 Mu
lizmat Xliff: I guess you can do something with that to your liking ?
Xliff lizmat: No. .has_accessor is what I was looking for. Just checking for a gotcha. 20:14
20:17 camelia joined 20:18 japhb left 20:20 japhb joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/06/01/lo...e-quoting/ 20:23
20:26 colomon left
raydiak bisectable6: regex { \# } 20:26
bisectable6 raydiak, Will bisect the whole range automagically because no endpoints were provided, hang tight
raydiak, Output on all releases: gist.github.com/16efbe386bbb47055c...f00bc17a5f 20:27
raydiak, Nothing to bisect!
guifa thanks himself for providing lots of test files for Fluent. Makes tracking down issues in the Intl reorganization *much* easier 20:30
20:30 stoned75 left, stoned75_ joined
codesections gfldex: wow, I'd never thought of implementing bare strings like that. I can't decide if I love it, hate it, or both! 20:32
(er, nvm actually, I read that too quickly/got over-excited – I thought you meant something more by "bare strings". Still very cool, but not quite as wild as I first thought) 20:38
guifa codesections: that said, it would be not too difficult to implement a php-esque DSL starter 20:39
imaging doing <html> and </html> as the equivalent of “ and ”
But that could also interpolate variables AND then generate a non-Str object as the result (instead of a Str, though presumably would have a .Stringy method) 20:40
codesections You mean as a slang? 20:42
guifa Yup 20:43
The only issue I've had so far with my slangs is enabling handing control back to the other (Quote / Core / Regex) languages. I *think* I can figure that out but since the project I've been doing it with will rely heavily on RakuAST, I've not looked too far into it 20:45
Xliff Hrm. Looking at Perl6::Grammar, I may have to revise my opinion on implementation. 20:47
Even knowing the rule name, I can't see where I'd add q:thru...
Doc_Holliwood is there any writing on why we use @a[*-1] instead of @a[-1] like Perl does? 20:48
$a[-1] rather 20:50
gfldex Doc_Holliwood: I'm not sure if it is written down already. It's quite easy tho. *-1 is a WhateverCode what is a Callable. 20:51
Doc_Holliwood i know
Xliff Doc_Holliwood: Better written now as @a.tail
Doc_Holliwood i just wonder what's wrong with negative indexes?
gfldex It's easy to get wrong by simply typos/thinkos. 20:52
my $index = 10; say @a[$index-1]; # and here you forget to type $index
The result is valid code that will may even work for a 1 element list. 20:53
Raku can complain with out-of-bounds.
Doc_Holliwood m: say (.[0], .[1..*-2].pick(*), .[*-1])[*;*].join with 'AbcdefgH'.comb 20:54
camelia AfcgebdH
Doc_Holliwood neat trick there
Geth doc/allomorph: aa95971fd2 | (Stoned Elipot)++ | doc/Type/Allomorph.pod6
Document Allomorph class

ref #3653 #3888 #3346
20:55
doc/allomorph: 6bada45c2d | (Stoned Elipot)++ | 4 files
Adapt allomorph classes documentation for Allomorph class

  - Condense the introduction and link to the Allomorph class documentation
  - Remove documentation for methods inherited from the Allomorph class
  - While here document the === operator for the allomorph classes
Doc_Holliwood m: (.[0], .[1..^*-1].pick(*), .[*-1]).flat.join with 'AbcdefgH'.comb
camelia ( no output )
Doc_Holliwood m: say (.[0], .[1..^*-1].pick(*), .[*-1]).flat.join with 'AbcdefgH'.comb
camelia AbcdgefH
codesections Xliff: I thought I remember .tail and .[*-1] having subtly different semantics -- but I can't remember how
Doc_Holliwood m: say (.[0], .[1..^*-1].pick(*).[*-1]).flat.join with 'AbcdefgH'.comb 20:56
camelia Ag
Doc_Holliwood m: say (.[0], .[1..^*-1].pick(*), .[*-1]).flat.join with 'AbcdefgH'.comb
camelia AdfgbecH
Geth doc: stoned++ created pull request #3893:
Document Allomorph class and adjust documentation for ComplexStr, IntStr, NumStr and RatStr classes
Doc_Holliwood like in these ranges, the whatever looks out of place imho
20:57 raydiak joined
codesections (Maybe I'm just thinking of ) 20:58
m: my @a = (1, 2); dd @a[*-2 .. *]; dd @a.tail: 2 20:59
camelia (1, 2)
(1, 2).Seq
codesections but that doesn't apply to @a.tail()
20:59 guifa left, guifa joined
gfldex Doc_Holliwood: there where a lot of things that looked out of place to me when I started with the language. Getting used to stuff helps. :) 20:59
21:00 guifa left, guifa joined
Xliff Can you eval a QAST tree? 21:01
guifa can't seem to send regular messages for some reason
But /me work okay
er, maybe it's something weird in what I was typing out to Xliff
Anywyas, Xliff: I found where the quote modifiers are being done, but for the life of me I can't find the quote language's definition. In NQP it's defined directly in the grammar 21:02
Nevermind, I'm an idiot: github.com/rakudo/rakudo/blob/f83e....nqp#L5387 21:03
Xliff guifa: I'm ahead of you. I think it's here: github.com/rakudo/rakudo/blob/mast...r.nqp#L167 21:06
However I can't decipher that into a rule that parses the string "q:to"….
Trying to compile some test code into RakuAST and it is SLOW.
21:07 tejr joined
guifa I have to head out for the afternoon, but I'll take a look at it tommorrow and see if I can't figure out more (nuless you make some more progress) 21:07
21:09 sono joined
Xliff No worries. Thanks for your help, guifa++ 21:10
21:15 b2gills left 21:19 Doc_Holliwould joined 21:20 Doc_Holliwood left 21:21 dustinm` joined 21:30 muriloreis joined 21:33 Doc_Holliwould left 21:34 muriloreis left, guer left 21:40 abraxxa left 21:44 abraxxa joined 21:59 guer joined 22:12 Tirifto joined 22:30 cbk__ left 22:31 cbk joined 22:33 Tirifto left 22:38 guer left 22:55 guer joined 23:00 guer left
Xliff Is CALLER:: documented? 23:04
codesections Just with docs.raku.org/language/packages#in..._(package) afaik 23:05
23:11 dogbert17 joined 23:16 dogbert11 left 23:18 cbk left 23:28 dogbert17 left 23:29 dogbert11 joined 23:39 gfldex left
guifa Xliff: I'm going to guess you're running into one of the gotchas that I had with CALLER, perhaps. CALLER can only see stuff that's dynamic 23:42
23:45 gfldex joined
Xliff Um. Hah. Not really. Sorry to give you that impression. 23:46
23:46 b2gills joined
guifa Xliff: was worth a shot haha 23:49