🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:12 cpan-raku left 00:14 cpan-raku joined, cpan-raku left, cpan-raku joined 00:25 ensamvarg3 left 00:28 wamba left 00:35 pecastro left 00:37 wamba joined 01:03 xinming left 01:04 xinming joined 01:13 sten37 joined 01:17 BenGoldberg joined 01:30 Xliff_ left 01:58 Util joined 02:01 wamba left 02:09 jmchael left 02:11 stoned75 joined 02:14 holli__ joined 02:17 Doc_Holliwould left
xinming How do we do early "return" of a block for react block ? 02:31
moon-child I believe 'next' works?
xinming Thanks, that worked. 02:37
02:41 ggoebel_ left 02:48 sten37 left
tbrowder codesections: yes i am 02:57
03:48 evalable6 left, linkable6 left, evalable6 joined 03:49 linkable6 joined 03:58 stoned75 left
samebchase- codesections: how did you get Raku syntax highlighting on your article? 04:19
04:24 grep0r joined 04:25 grep0r left
samebchase- My article is out! raku-advent.blog/2020/12/04/day-4-...-grammars/ 04:34
codesections samebchase-: I used the Acme-Advent-Highlighter: github.com/raku-community-modules/...ighlighter 04:47
(it worked well, though it did slightly mangle links with a ) in the URL) 04:49
Oh, and when pasting it in to WordPress, I initially missed the « ensuring you're editing in "HTML" and not "Visual" mode» step, which made everything break. But after I learned to read a bit better, it worked well :D 04:54
05:03 jnge joined, dataangel left, jnge left
samebchase- codesections: I'm too scared to mess with anything now, but next time I'll be sure to use this 05:06
05:51 kst left 06:11 skids left 06:15 BenGoldberg left 06:18 domidumont joined
Geth doc: fcb449ba2f | (Moray Jones)++ (committed by Juan Julián Merelo Guervós) | doc/Language/rb-nutshell.pod6
Changes BUILD to TWEAK in code example

Code example now works using TWEAK instead of BUILD.
Changes description to mentions TWEAK instead of BUILD too.
06:23
doc: 8041a648f4 | (Moray Jones)++ (committed by Juan Julián Merelo Guervós) | doc/Language/rb-nutshell.pod6
Changes twigil to public

There is no reason in this example to show a private attribute.
This clarifies that TWEAK can use $! to access attributes and that it's not a typo, without going into an explanation at this stage.
linkable6 Link: docs.raku.org/language/rb-nutshell
06:26 jmerelo joined 06:31 frost-lab joined
jmerelo Did you check out today's calendar entry? raku-advent.blog/2020/12/04/day-4-...-grammars/ lotsa grammars 06:31
tellable6 2020-12-03T20:32:46Z #raku <tbrowder> jmerelo: when you get a chance, please see if the links i have on build and tweak are satisfactory (the copy on wordpress)
jmerelo .tell tbrowder they're probably OK. Thanks! 06:32
tellable6 jmerelo, I'll pass your message to tbrowder
jmerelo There are still a few slots free by the end of the period, so if you've got an idea bouncing around in your head, please submit it 06:41
06:44 cfa left
jmerelo Also this is going to be the CFP for the Perl&Raku devroom codimd.opusvl.com/s/y8VhJaTby# Have your say before we publish it, and get your submissions ready! 06:44
07:21 jmerelo left 07:22 jmerelo joined 07:24 parabolize left 07:26 ufobat_ joined 07:45 wamba joined 07:50 sjm_uk joined 07:58 sena_kun joined 08:01 nige joined, nige left, nige joined 08:04 stoned75 joined 08:13 jmerelo left 08:17 Sgeo left, nige left, nige joined 08:20 abraxxa joined 08:22 nige left, nige joined 08:24 pecastro joined 08:26 abraxxa left, abraxxa joined 08:29 jmerelo joined 08:47 nige left, nige joined 08:52 nige left, nige joined 09:00 stoned75 left 09:02 nige left, nige joined
frost-lab p6: run 'date' 09:05
camelia Fri Dec 4 10:05:10 CET 2020
09:06 BenGoldberg joined, Altai-man joined 09:07 nige left, nige joined 09:09 sena_kun left 09:17 nige left, nige joined 09:22 nige left, nige joined 09:27 nige left, nige joined 09:32 nige left, nige joined
xinming Is there a way to debug the multi method dispatch ? 09:40
09:40 BenGoldberg left
xinming Now, I have written a script, and I found the multi method is not dispatched correctly. 09:40
09:43 stoned75 joined 09:53 patrickb joined 09:57 nige left, nige joined 10:02 nige left, nige joined
notandinus what's the difference between token and rule? 10:12
10:12 nige left, nige joined
moon-child rule can have whitespace around it 10:13
notandinus i dont understand, can you give an example? 10:14
oh nvm i found an example 10:16
moon-child basically a token is a single object, the equivalent of a word. This is like a number, a string, special char, &c
and a rule is a way to combine the two
notandinus :m docs.raku.org/language/grammars it was here
i see, makes sense, thanks
moon-child :)
10:17 nige left, nige joined
notandinus and can that single object have space in it? 10:17
moon-child only if you explicitly allow it 10:18
patrickb .tell tony-o If there is any think I can help you with wrt. a new ecosystem please do contact me! 10:20
tellable6 patrickb, I'll pass your message to tony-o
notandinus .tell andinus hi 10:23
tellable6 notandinus, I'll pass your message to andinus
notandinus .tell notandinus hi 10:24
tellable6 notandinus, I'll pass that message to your doctor
notandinus hi
oh i see, thanks tellable6
tellable6 notandinus, I'm happy to help!
notandinus going by this: docs.raku.org/language/grammars#Rules 10:32
isn't it the opposite of what raku says?
token is not ignoring the space, rule is ignoring it right?
for token to match the second case we'll have to specify the space, how is it ignoring it then? 10:33
10:33 cpage_ joined 10:36 cpage left, cpage_ is now known as cpage 10:39 Xliff joined 10:41 ggoebel_ joined 10:42 moray joined, moray is now known as morayj
Xliff m: my @a = gather for ^3 { my @a = (0, 1, 2); take |@a.flat }; @a.gist.say 10:51
camelia [(0 1 2) (0 1 2) (0 1 2)]
Xliff Is there a way to make that (0, 1, 2, 0, 1, 2, 0, 1, 2)?
10:51 kensanata joined
Geth ¦ doc: MorayJ assigned to hythm7 Issue Document the risk involved when using qqx github.com/Raku/doc/issues/3697 10:55
11:02 patrickb left 11:05 thundergnat joined
thundergnat m: my @a = gather for ^3 { my @a = (0, 1, 2); .take for @a }; @a.say 11:06
camelia [0 1 2 0 1 2 0 1 2]
Geth ¦ doc: MorayJ self-assigned Slip documentation give example result that doesn't mesh with current rakudo result github.com/Raku/doc/issues/3709
11:09 thundergnat left 11:14 morayj left 11:22 nige left, nige joined 11:26 Black_Ribbon left 11:27 nige left, nige joined 11:31 patrickb joined
Geth doc/ISSUE-3709: e5be448dc7 | (Moray Jones)++ | doc/Type/Slip.pod6
Fix slip example error
11:49
doc: MorayJ++ created pull request #3724:
Fix slip example error
11:51
11:52 ufobat__ joined 11:56 ufobat_ left 12:01 Xliff left 12:07 nige left, nige joined 12:12 nige left, nige joined 12:13 e is now known as demiurge
Geth ¦ doc: MorayJ self-assigned The whole explanation for the difference between block and closure is LTA github.com/Raku/doc/issues/3670 12:30
12:31 BenGoldberg joined 13:04 jmchael joined 13:05 BenGoldberg left, lucasb joined 13:08 sena_kun joined 13:09 Altai-man left 13:36 jmerelo left
ggoebel_ nonandinus: token R { pattern } is the same as regex R { :r pattern }; ...and rule R { pattern }; is the same as regex R { :r :s pattern }; See: docs.raku.org/language/regexes#Nam...ion_syntax 13:36
tokens don't backtrack. rules don't backtrack and treat whitespace as syntactically significant
13:42 xinming left 13:45 xinming joined 13:47 nige left, nige joined 13:52 nige left, nige joined 14:04 frost-lab left 14:14 wamba left 14:16 wamba joined
gfldex lolibloggedalittle: gfldex.wordpress.com/2020/12/04/bu...genstates/ 14:29
14:32 nige left, nige joined 14:34 skids joined 14:37 nige left, nige joined 14:43 ab5tract joined 14:47 nige left, nige joined 14:50 parabolize joined 14:52 nige left, nige joined 14:54 patrickb left 14:55 patrickb joined 15:09 hal99999 joined 15:12 Noisytoot left 15:13 Sgeo joined 15:14 Noisytoot joined 15:18 kensanata left
SmokeMachine is there any way of making a ./bin script read its version from the META6.json? 15:23
15:27 nige left, nige joined 15:37 nige left, nige joined
tyil $*PROGRAM.parent(2).add('META6.json').&from-json<version> 15:39
something like this?
15:41 ben_m joined
ben_m Is there a way to feed/chain into a reduction operator? i.e. instead of `[+] (1..10).map(10 + *)` something like `(1..10).map(10 + *) ==> [+] # does not work` 15:43
I know that .reduce exists, but sometimes that can be less elegant (`.reduce(* * *)` vs `[*]`)
15:53 wamba left 15:56 BenGoldberg joined 16:03 ab5tract left 16:06 __jrjsmrtn__ joined 16:07 _jrjsmrtn left 16:10 ab5tract joined 16:11 rindolf joined
raku-bridge <jesusthefrog> Can't you just call the reduction operator like a function? &[+](1..10).map(10 + *) 16:11
<jesusthefrog> I don't know what the precedence of that will be like (I did not test this) 16:12
16:21 nige left, nige joined, nige left, nige joined 16:28 wamba joined
ben_m Oh yeah, this works: (1..10).map(10 + *).&prefix:<[*]> 16:28
I think reduce might be clearer there 16:29
16:30 BenGoldberg left 16:31 ufobat__ left 16:32 nige left, nige joined 16:37 nige left, nige joined
SmokeMachine tyil: I was thinking more like we do with %?RESOURCES 16:38
16:50 wamba left 16:57 cpan-raku left, jmerelo joined, Xliff joined
jmerelo Get your talks ready for FOSDEM! news.perlfoundation.org/post/fosde...for-papers 16:59
16:59 stoned75 left
jmerelo This year is all online, so you can participate from anywhere in the world! 16:59
17:01 domidumont left 17:02 cpan-raku joined, cpan-raku left, cpan-raku joined 17:04 _4d47 joined, xinming left 17:06 xinming joined 17:07 Altai-man joined 17:09 sena_kun left 17:10 moray joined 17:11 moray is now known as morayj, stoned75 joined 17:12 codesections left
Geth doc/ISSUE-3670: 000ebc86b4 | (Moray Jones)++ | doc/Language/control.pod6
Removes references to closures in control flow document

  * Focuses document on control flow. Statements execute immediately
  * Why to use block statements that execute immediately
  * Clarify example and language of how blocks that need controlling are created.
17:16
17:16 stoned75 left
doc/ISSUE-3670: 7fedced1b1 | (Moray Jones)++ | doc/Language/control.pod6
Fixes broken link to /type/Block
17:17 ab5tract left
Geth doc: e44ee1fb1f | (Jan Krňávek)++ (committed by Juan Julián Merelo Guervós) | doc/Language/haskell-to-p6.pod6
Update haskell-to-p6.pod6

  `reduce` has not named parameter `with`.
In `[+] 0, |@numbers`, `@numbers` must be slipped.
17:22
linkable6 Link: docs.raku.org/language/haskell-to-p6
17:22 ab5tract joined
Geth doc: MorayJ++ created pull request #3725:
Remove closures discussion from control flow document
17:24
17:27 codesections joined 17:37 nige left, nige joined 17:42 nige left, nige joined 17:43 xinming left 17:44 xinming joined, stoned75 joined 17:53 defaultxr left
Geth advent: wimvanderbauwhede++ created pull request #78:
Split article into two
17:59
18:00 defaultxr joined 18:03 ab5tract left
Geth advent: 0aef938300 | (Wim Vanderbauwhede)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Split article into two

I split the article into two parts and addressed most of the comments from @jj and @nige123 . New gist links are in the file.
18:04
advent: 191b34ad04 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Merge pull request #78 from wimvanderbauwhede/patch-1

Split article into two
18:09 _4d47 left 18:17 morayj left 18:21 domidumont joined 18:24 domidumont left 18:42 kst joined 18:43 aborazmeh joined, aborazmeh left, aborazmeh joined
JJAtria[m] jmerelo: I _think_ my WordPress ID is the same as the one on my GitHub account 18:49
18:51 aborazmeh left, ab5tract joined
jmerelo JJAtria[m]: let me check 18:51
JJAtria[m] I was frankly shocked to find out I even _had_ an account. What was past me thinking... :P 18:54
jmerelo You're good to go
Upload it as a draft, let me give it the final check and schedule it, please.
JJAtria[m] Will do! I should be able to do that after dinner tonight. Thanks! 18:55
18:55 jmerelo left 19:01 wamba joined
ben_m How would I use a regex from a module? Something like `module Foo { our regex bar { \w+ } }`. I tried /<Foo::bar>/ but I get No such method '!cursor_init' for invocant of type 'Foo' 19:08
19:14 sjm left 19:18 hal99999 left
codesections does anyone here have any thoughts about when it's better style to use `given` vs `when` vs `==> {…}()` to set the topic? 19:19
(I posted a more verbsose version of that question to the subreddit: www.reddit.com/r/rakulang/comments...red_way/?)
19:21 BenGoldberg joined 19:26 sjm joined 19:27 skids left, zacts joined
cpan-raku New module released to CPAN! Gnome::Glib (0.17.3) by 03MARTIMM 19:33
19:41 MasterDuke joined 19:42 sjm_uk left 19:45 hal99999 joined 19:55 BenGoldberg left 20:00 stoned75 left 20:07 abraxxa left 20:11 zacts left
codesections (False,).&is(True) # This test fails, but 20:13
(False,).&ok # passes
I understand *why* that is, but it just took me more time than it should have to realize what was going on when I made a change to how some tests were worded 20:15
20:16 kylese joined 20:28 rindolf left
codesections m: sub f($a) { $a // 0 + 1 }; say f(Nil) 20:31
camelia 1
codesections m: sub g(%h) {}; g(Nil) 20:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling g(Nil) will never work with declared signature (%h)
at <tmp>:1
------> 3sub g(%h) {}; 7⏏5g(Nil)
codesections is there a way to allow subs that take an Associative to accept Nil? ^^^^ 20:33
20:34 orinthe2 joined 20:35 orinthe left, orinthe2 is now known as orinthe
JJAtria[m] jmerelo: I've saved the post as a draft... I think. Let me know if you need me to do anything else! 20:41
tellable6 JJAtria[m], I'll pass your message to jmerelo 20:42
tyil a multi sub?
codesections tyil: oh, of course! Thanks 20:48
21:04 kensanata joined 21:05 Altai-man left 21:06 seanrobert joined 21:07 seanrobert left, seanrobert joined 21:09 RaycatWhoDat joined
RaycatWhoDat Hey. Had a question. I only have a cursory knowledge of grammars and how they work in Raku. If I wanted to make something that resembled a compiler, how would I go about that using Raku? I feel like doing something like that is definitely possible but I'm wondering if I'm just being naive... 21:11
tyil RaycatWhoDat: andrewshitov.com/2018/11/06/creati...th-perl-6/ 21:12
RaycatWhoDat I know compilers are hard work but I was thinking of just starting with a simple interpreter and starting to build on it from ther-
oh
how convenient
codesections :D much of the main Raku compiler uses grammars, too 21:13
21:13 seanrobert left
RaycatWhoDat mmhmm. I would just wonder how adding features would work with it. Like, if I wanted to add something as complex as pattern matching, does Raku make my life easier or harder? 21:14
codesections RaycatWhoDat: also, for examples of interpreters, seeexamples.p6c.dev/categories/interpreters.html 21:15
RaycatWhoDat Although, this whole effort is stemming from someone saying that Raku didn't have anything to offer in terms of compiler/interpreter design? 21:16
.*
codesections (though some of those are a bit old)
I'm not sure I know what they meant by that 21:17
RaycatWhoDat Same. They probably did the same thing people like doing: take a cursory glance at something with no real intention of learning and just wave it away 21:18
They're building a language that looks Haskell-esque with Elm, I think 21:19
21:19 ab5tract left 21:22 patrickb left 21:23 patrickb joined, Black_Ribbon joined 21:30 ab5tract joined 21:48 xinming left, xinming joined 21:57 RaycatWhoDat left 22:04 xinming left 22:05 xinming joined, guifa left 22:08 kylese left 22:31 kensanata left 22:46 BenGoldberg joined 23:03 hal99999 left 23:10 leont joined 23:13 patrickb left 23:19 dataangel joined 23:20 BenGoldberg left 23:25 BenGoldberg joined 23:27 dataange` joined 23:28 dataangel left, dataangel joined 23:29 dataangel left, dataange` left 23:30 dataangel joined 23:46 JustThisGuy joined
JustThisGuy Hi all! I have a couple of questions. I'm trying to do something like this: 23:49
say '"in quotes"' ~~ / '"' <-[ " ]> * '"'/;
evalable6 「"in quotes"」
JustThisGuy From docs.raku.org/language/regexes "Enumerated character classes and ranges"
But, I want more that one type of quote. Something like this, but this doesn't work: 23:50
token attribute_value { <quote> ([$<-quote>]) $<quote> };
token quote { <["']> };
I found this discussion which is also similar, but it didn't seem to go anywhere: github.com/Raku/problem-solving/issues/97. 23:51
Any answers or alternatives are appreciated!