🦋 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:02 reportable6 left 00:04 reportable6 joined 00:14 DarthGandalf left 00:35 DarthGandalf joined 01:10 RandalSchwartz left 02:10 benchable6 left, nativecallable6 left, notable6 left, coverable6 left, reportable6 left, quotable6 left, unicodable6 left, releasable6 left, shareable6 left, linkable6 left, committable6 left, squashable6 left, bisectable6 left, sourceable6 left, statisfiable6 left, evalable6 left, greppable6 left, tellable6 left, bloatable6 left 02:11 sourceable6 joined, benchable6 joined, nativecallable6 joined 02:12 bloatable6 joined, shareable6 joined, linkable6 joined, reportable6 joined, squashable6 joined, tellable6 joined, bisectable6 joined 02:13 evalable6 joined, unicodable6 joined, releasable6 joined, statisfiable6 joined, coverable6 joined, quotable6 joined, greppable6 joined, committable6 joined 02:14 notable6 joined
lucs When I do 「▸ rakubrew available」, some versions are prefixed with 'D', what does it mean? 02:16
02:53 frost joined 02:58 MasterDuke left 03:58 committable6 left, bloatable6 left, bisectable6 left, unicodable6 left, quotable6 left, evalable6 left, notable6 left, coverable6 left, shareable6 left, benchable6 left, greppable6 left 03:59 committable6 joined, shareable6 joined, greppable6 joined, quotable6 joined 04:00 benchable6 joined 04:01 bisectable6 joined, unicodable6 joined, coverable6 joined, evalable6 joined, notable6 joined, bloatable6 joined 05:01 notable6 left, evalable6 left, bloatable6 left, unicodable6 left, quotable6 left, nativecallable6 left, linkable6 left, greppable6 left, coverable6 left, releasable6 left, tellable6 left, committable6 left, sourceable6 left, shareable6 left, reportable6 left, statisfiable6 left, bisectable6 left, squashable6 left, benchable6 left 05:02 releasable6 joined, nativecallable6 joined, reportable6 joined, benchable6 joined, unicodable6 joined, notable6 joined, sourceable6 joined 05:03 statisfiable6 joined, evalable6 joined, tellable6 joined, quotable6 joined 05:04 greppable6 joined, committable6 joined, linkable6 joined, bloatable6 joined, coverable6 joined, bisectable6 joined, shareable6 joined, squashable6 joined 05:10 andinus` is now known as andinus 05:14 Kaiepi left 05:33 Kaiepi joined 05:38 Kaiepi left 05:43 Kaiepi joined 05:51 Kaiepi left 05:53 Kaiepi joined 05:58 Kaiepi left 06:00 Kaiepi joined 06:02 reportable6 left 06:05 reportable6 joined 06:14 Tirifto left 06:23 Kaiepi left, Kaipi joined 06:30 Kaipi left, Kaiepi joined 06:31 Eddward_ left 06:47 Kaiepi left 06:53 Kaiepi joined
pony can you include regexes, rules, and tokens from one grammar into another? (to avoid having very large ones)? 07:01
e.g. include number grammar in calculator grammar in compiler grammar :) 07:03
japhb Inheritance works; grammars are classes 07:04
moon-child m: my token x { h }; grammar G { token TOP { <x> } }; grammar H { token TOP { <x> } }
camelia ( no output )
japhb And as moon-child points out, lexical scope works too. :-)
pony COOL 07:06
cool (sorry caps)
m: grammar A { TOP { 'a' } }; grammar B is A { TOP { <A::TOP> } }; say B.parse('a') 07:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
TOP used at line 1
pony m: grammar A { TOP { 'a' } }; grammar B is A { token TOP { <A::TOP> } }; say B.parse('a') 07:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
TOP used at line 1
pony m: grammar A { token TOP { 'a' } }; grammar B is A { token TOP { <A::TOP> } }; say B.parse('a')
camelia ï½¢aï½£
A::TOP => ï½¢aï½£
07:21 Sgeo left 07:44 patrickb joined
patrickb lucs: Re `rakubrew list-availiable`. The "D" marks versions for which a precompiled archive is available. This means you can use `rakubrew download` to set up such a version, which is an aweful lot faster than `rakubrew build`. I just noticed, that the docs over on rakubrew.org are stale in that respect. Will update this evening. 07:49
tellable6 2021-07-14T19:40:56Z #raku <melezhik> patrickb: just a thoughts ... ))
hey patrickb, you have a message: gist.github.com/0d7a53c265b37a86ad...49d4294a16
hey patrickb, you have a message: gist.github.com/001b4e7872d54f3131...e7ddec8acb
2021-07-14T19:47:46Z #raku <melezhik> patrickb: avoiding AND emperical constructions -> avoiding ANY emperical constructions
hey patrickb, you have a message: gist.github.com/e02f10f78b3a701e31...3b60dee1f9
patrickb lucs: Also, did you know you can do `rakubrew help list-available`? 07:58
07:59 Kaiepi left 08:00 Kaiepi joined 08:39 Kaipi joined 08:40 Kaiepi left
Geth doc: mykhal++ created pull request #3915:
fix Python (dict key string) syntax
08:42
doc: ba3bbf749e | (Michal Bozon)++ (committed by Juan Julián Merelo Guervós) | doc/Language/py-nutshell.pod6
fix Python (dict key string) syntax

was wrong Python syntax, or, dict() definition in fact tried to use (non-existent) variables instead of string literals
08:58
linkable6 Link: docs.raku.org/language/py-nutshell
09:20 ufobat_ joined 10:20 linkable6 left, evalable6 left, linkable6 joined 10:22 evalable6 joined 10:26 ufobat_ left
Xliff moon-child: Thanks for that 10:28
10:29 Xliff left 10:30 Xliff joined
lucs patrickb: Ah, thanks for the 'D' explanation, and also for reminding me that command line help is available (I happened to be looking at the web page, and didn't think about doing a 'help'). 11:11
11:26 sono left 11:32 dogbert17 joined 11:33 MasterDuke joined 12:02 reportable6 left, guifa joined 12:03 reportable6 joined
mykhal oh duck, raku makes you butter(fly) 12:19
mykhal would have more doc fixes, but doesn't want to cause Geth commit report flood 12:20
12:37 guifa left
mykhal s/(\w+)\(\w+\)/($1)$2/ 12:39
Altreus it is quite a verbose report isn't it
mykhal Altreus: may be subjective, I'm here for few days. I mind more that I don't know yet why my regex is incorrect in raku, it's something with escaped \( 's 12:47
.. ok, missing additional () pair :/ sorry 12:48
MasterDuke mykhal: geth report floods are welcome, because that means things are getting better 12:55
Geth doc: mykhal++ created pull request #3916:
operator doc: (value, syntax) error fix
13:01
13:05 MasterDuke left 13:06 MasterDuke joined
[Coke] weird. I have two scripts that use 'use lib '../foo'; use MY::MODULE' - one works, the second says No such method 'CALL-ME' for invocant of type 'Str' 13:40
... and it used to work. wtf.
13:41 Eddward_ joined
[Coke] weird. rm -rf ../foo/.precomp - now it works. 13:42
(on windows, using git bash)
13:47 patrickb left 13:48 patrickb joined 13:51 patrickb left 13:52 patrickb joined 13:53 patrickb left 13:54 patrickb joined 13:55 patrickb left 13:56 patrickb joined 13:57 patrickb left 13:58 patrickb joined 14:02 patrickb left, patrickb joined 14:06 abraxxa left 14:14 Tirifto joined 14:16 patrickb left 14:17 frost left, patrickb joined, MasterDuke77 joined 14:18 MasterDuke left 14:20 Sgeo joined, dogbert11 joined, dogbert17 left 14:23 patrickb left, patrickb joined 14:24 melezhik joined
melezhik . 14:24
[Coke] -bash: .: filename argument required 14:26
14:26 Xliff left 14:27 Xliff joined, abraxxa joined
[Coke] m: e.IO.IO 14:27
camelia ( no output )
[Coke] sensibly chuckles.
14:32 patrickb left, patrickb joined 14:34 patrickb left, patrickb joined 14:38 patrickb left 14:39 patrickb joined
mykhal m: $*PERL.compiler 14:41
camelia ( no output )
14:43 patrickb left, patrickb joined 14:45 Juerd joined
Xliff Is there a write-up on how to dynamically create a class and add it to a compunit? 14:45
Is this possible in current Raku, or would this need RakuAST? 14:46
14:49 patrickb left
moritz what do you mean by "add it to a compunit"? 14:49
Xliff Wouldn' 14:50
14:50 patrickb joined
Xliff I would want to have the dynamically created class become a part of the compunit it is defined in. 14:50
Or could I just assign that class to a constant, couldn't I?
moritz yes 14:51
14:51 cbk joined
Xliff moritz: So how do I go about creating a class type? 14:51
And then creating the constant that goes with it 14:52
moritz see docs.raku.org/type/Metamodel::ClassHOW if you want to create a class 14:53
call new_type to create the class
add_method to add methods
etc
in the end, call compose
Xliff OK. 14:54
moritz and assing it to a constant just constant MyClass = do { code that generates the class goes here }
and have the class be the last expression
or
Xliff Yes, but the constants are also created dynamically.
Which means their names are going to come from a string
And I want it to behave as if they were statically defined. 14:55
moritz then you probably need to add them to the symbol table
Xliff Which means no sigil.
moritz not with the "constant" declarator
Xliff Is there another way?
moritz why do you want another way?
Xliff Can I dynamically create a sigil-less identifier and package that with a compunit?
moritz ::{$name} = 42 14:56
Xliff So I want to dynamically create "myType" from data. And then use it in code like "my myType $a .= new"
moritz that's how I understood your question 14:57
Xliff OK. Thanks. I appreciate the advice. I just need that last piece, I think.
moritz the thing is, the code that wants to use myType needs to know myType at *its* compile time
so you could have at the top of the usage a "use TypeGenerator;"
and that uses and compiles TypeGenerator, which could dynamically generate the types 14:58
(the nesting of run time and compile time can be confusing at times)
Xliff Actually, I was hoping I could create these at BEGIN time, serialize them in .precomp, then use them like regular types at runtime.
moritz that might work as well 14:59
Xliff All of the data required to create these types exists at compile time.
I just don't want to have to break them down and create them by hand, if possible.
moritz caveat: all my meta model hacking days are years in the past, so stuff might have changed (but probably not for the worse :D) 15:00
Xliff Take this for example. I have this exemplar class as: "class DialogClassPart is repr<CStruct> is export { has XtPointer $.extension; }"
lucs patrickb: As documented, I placed in .zshrc the ï½¢eval "$(/shome/lucs/rakubrew/bin/rakubrew init Zsh)"ï½£ line, but unfortunately, .zshrc is not sourced when a shell is launched from a script, so in that case, the PATH is not adjusted and raku is not found. 15:01
Xliff However there are more distinct classes that look exactly the same, just with a different name.
So there's: GripClassPart, ListClassPart, MenuButtonClassPart, PannerClassPart, etc...
lucs patrickb: Any special reason that line wouldn't be better placed in .zshenv?
15:01 Juerd left
Xliff All with the same definition. 15:01
lucs (Appears to work when it's there.)
Xliff Is there a way I can create all of those classes from the first one via nqp or meta programming? 15:02
15:03 Juerd joined
melezhik how can I refer to `#` in regexp by code? 15:04
moritz Xliff: I have too little up-to-date experience to tell
melezhik: I don't understand the question
melezhik I want to say `"# hello" ~~ /'#'/` but I can't use `#` in regexp literally 15:05
Xliff moritz: OK, fair enough. Still, your advice has been invaluable. Have any idea who else I should ask?
moritz m: say '# hello' ~~ /'#'/
camelia ( no output )
patrickb lucs: I'm not that familiar with zsh and when which of those files is sourced. rakubrew is fine with being initialized multiple times. So it doesn't hurt to put it in a script that is potentially sourced more than once.
moritz melezhik: the bot seems to be b0rked, /'#'/ seems to work just fine for me 15:06
melezhik I'd like to have an equivalent regexp detention without `#` sign
moritz \c[NUMBER SIGN] ?
\c[NUMBER SIGN] ? 15:07
melezhik yeah, something like that, thanks!
patrickb IIRC The docs now say to use .bashrc instead of .bash_profile for the same reason. (I think .bashrc is called on every new (sub)shell, while .bash_profile is called less often. Or something along those lines.)
lucs: So .zshenv is called more often than .zshrc? 15:08
15:08 Juerd left 15:10 patrickb left, patrickb joined
lucs It's called when a script shells out, contrary to .zshrc. 15:12
patrickb lucs: Ah, so it might actually make sense to add it to both?
have to leave for a bit...
15:13 patrickb left
lucs patrickb: I believe having it only in .zshenv is sufficient (like perlbrew does), but I'm not sure how to test it adequately. 15:15
tellable6 lucs, I'll pass your message to patrickb
Xliff moritz: TMTOWTDI -- I used this to solve the use case I mentioned to you... 15:16
grep ClassPart Structs.pm6 | grep has | cut -d\ \-f2 | sort | uniq | raku -ne 'print "class { $*IN.lines[0].chomp } is repr<CStruct> is export \{\n has XtPointer \$.extension;\n\}\n\n"'
15:20 lucasb joined 15:23 lucasb left 15:26 patrickb joined
lucs patrickb: From my notes: gist.github.com/lucs/c321819d1cc12...a63b6cf0d0 15:30
patrickb lucs: OK. So .zshenv seems like the file to aim for. 15:32
tellable6 2021-07-15T15:15:35Z #raku <lucs> patrickb: I believe having it only in .zshenv is sufficient (like perlbrew does), but I'm not sure how to test it adequately.
lucs Yeah, pretty sure that's the ticket.
15:33 Juerd joined 15:34 stoned75 left 16:16 phogg left, squashable6 left 16:17 Juerd left 16:18 squashable6 joined, Juerd joined
Geth rakubrew.org: 763db71315 | (Patrick Böker)++ | 2 files
Provide instructions for how to work around MacOS' security limitations

Fixes #34
16:21
rakubrew.org: b12b294f33 | (Patrick Böker)++ | Containerfile
Bump Raku to 2021.04
rakubrew.org: e9eda7412a | (Patrick Böker)++ | resources/homepage.md.tmpl
Add/update the documentation for `home` and `list-available`
16:23 stoned75 joined 16:24 MasterDuke77 left
patrickb vrurg: Can you confirm, that putting the rakubrew initialization in `.zshenv` makes more sense compared to the current `.zshrc`? 16:26
16:31 Juerd left
Geth App-Rakubrew: dc2b6b9bd2 | (Patrick Böker)++ | 2 files
By suggesting to add the hook to `.zshenv` instead of `.zshrc`.

It seems as `.zshenv` is available even in scripts, while
  `.zshrc` things are unavailable to scripts.
See web.archive.org/web/20210226033246...zshrc-etc/
16:38
16:43 stoned75 left 17:12 jess left 17:15 Juerd joined 17:32 MasterDuke joined 17:50 patrickb left 17:54 cbk left 17:56 patrickb joined 18:02 reportable6 left 18:04 reportable6 joined 18:11 MasterDuke left 18:12 cbk joined 18:16 MasterDuke joined 18:19 cbk left 18:20 cbk joined 18:30 cbk left 18:32 cbk joined
Geth doc: bbb7c27854 | (Michal Bozon)++ (committed by Juan Julián Merelo Guervós) | doc/Language/operators.pod6
operator doc: (value, syntax) error fix
18:37
doc: 76e29aa76c | (Michal Bozon)++ (committed by Juan Julián Merelo Guervós) | doc/Language/operators.pod6
.. fixed excesive space
linkable6 Link: docs.raku.org/language/operators
18:47 cbk left, cbk joined 18:57 notna joined 18:58 linkable6 left, linkable6 joined
mykhal one can wonder if infix methodop can be done, stackoverflow.com/q/68399295 19:05
19:27 squashable6 left, squashable6 joined
Geth Raku-Steering-Council/main: d6e69053a3 | (Elizabeth Mattijsen)++ | README.md
Add current members to README
19:30
Raku-Steering-Council/main: c854b84113 | (Elizabeth Mattijsen)++ | README.md
Oops, fixed copy-pasto

Sorry, Daniel :-)
19:33
19:34 Geth left 19:35 Geth joined 20:16 cbk left 20:19 Xliff left, notna left 20:24 cbk joined 20:56 cbk left 20:57 linkable6 left 20:59 linkable6 joined 21:06 patrickb left 21:20 RandalSchwartz joined 22:20 committable6 left, greppable6 left, notable6 left, releasable6 left, bloatable6 left, tellable6 left, shareable6 left, sourceable6 left, benchable6 left, evalable6 left, statisfiable6 left, coverable6 left, bisectable6 left, linkable6 left, squashable6 left 22:21 quotable6 left, unicodable6 left, reportable6 left, nativecallable6 left, benchable6 joined, coverable6 joined, statisfiable6 joined, bisectable6 joined 22:22 squashable6 joined, greppable6 joined, notable6 joined, unicodable6 joined, bloatable6 joined, evalable6 joined 22:23 tellable6 joined, sourceable6 joined, releasable6 joined, quotable6 joined, linkable6 joined, reportable6 joined, nativecallable6 joined, shareable6 joined 22:24 committable6 joined
lucs Problem installing Inline::Perl5 : 22:31
gist.github.com/lucs/9fdbad93fcbc9...d62b5d5a17
[Coke] lucs: do you have perl5 installed? 22:34
lucs Yep
[Coke] if so: maybe it's too old. Or maybe you don't have the dev version installed if you installed it with a package.
lucs In the PATH
Um, I perlbrewed a 5.34.0.
[Coke] Did you: perlbrew install perl-stable -Duseshrplib ? 22:35
(ish)
lucs Installed with the -Duseshrplib, yes
[Coke] ok. That's all the help I have, sorry. :) 22:36
lucs Ok, thanks.
â–¸ $PERLBREW_ROOT/bin/perlbrew install perl-5.34.0 -Duseshrplib -Dusemultiplicity 22:37
And I installed a 2021.06 rakudo/moar. 22:41
(followed by a â–¸ rakubrew build-zef ) 22:44
22:46 phogg joined 23:46 linkable6 left, evalable6 left 23:47 linkable6 joined 23:48 evalable6 joined 23:52 jgaz joined