🦋 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.
codesections moon-child: "more concise"? But that's *two* characters... are you asking if there's a way to do that in just one character? :D 01:51
moon-child codesections: yeah 02:35
moon-child or zero characters; imagine if /x/ matched partial strings and \x\ matched full strings 02:35
or even something less visually cluttered: e.g. X:/foo/ instead of /^foo$/, makes it more clear what's actually being matched
tonyo that arguably makes it less clear what's being matched since ^ and $ are both anchors 02:51
moritz python has re.match for matching the whole string, and re.search for unanchored searches 08:23
moritz (or maybe re.match only anchors at the start? not sure) 08:23
tyil for grammars we have .parse and .subparse 08:24
moritz in raku land you can also m:pos(0)/.../ to anchor at the start
andinus i have rakudo star 20.10 installed, do i just have to install it again to upgrade to the latest release? 11:10
i'm compiling it from source
El_Che what OS? 11:13
MasterDuke was star updated? 11:14
andinus i'm on openbsd 11:16
MasterDuke: yes star was updated to 2021.02 11:17
El_Che: on openbsd
El_Che andinus: I don't use star, but as far as I know, it will recompile for a new release
MasterDuke oh good, i hadn't realized that
andinus yeah i know but i was wondering if i should uninstall the old star and install the new one or is there a upgrade script?
MasterDuke: ah, it was announced on perl6-users list 11:19
MasterDuke a pull and rebuild should be sufficient 11:21
andinus i see, thanks 11:22
tyil andinus: just download the newest tarball and run `./bin/rstar install` again, yes :> 11:49
andinus thanks! i'll try installing it tonight 12:36
so i'm doing oop things for the first time. i defined a class called Puzzle and set @.grids variable, user passes it to me.
there is a @.start-points array, it contains the starting points of the puzzle 12:37
the points are marked in the puzzle itself with a '*'
i would prefer that its parsed and @.start-points it set by itself when i invoke Puzzle.new 12:38
how do i achieve this? or is there a better way?
tyil andinus: I think a question like this would be a better fit for StackOverflow, if you use it 12:39
then you can include the code you have so far, and which specific part of the code you want help with
MasterDuke sounds like something that might get done in a TWEAK()
andinus i see, i'll post it there 12:40
MasterDuke: i see, i'll check that out
andinus is there an equivalent for .chop that removes chars from the start? 13:01
lizmat .substr(#charstochopfromstart) 13:02
m: say "foobar".substr(3)
camelia bar
andinus ah right
lizmat m: say "foobar".substr(0,*-3) # alternate syntax for chop 13:03
camelia foo
andinus MasterDuke: thanks, looks like BUILD is what i wanted
lizmat andinus: we're thinking on de-emphasizing BUILD for TWEAK in the documentation
please be sure you need BUILD, and not TWEAK :-)
andinus i see, i need to set a variable from the given data only if that variable is not passed by the user 13:04
lizmat aha! 13:05
andinus whats the differece b/w BUILD and TWEAK?
lizmat then you don't need BUILD or TWEAK at all
m: class A { has $.foo = 42 }; dd A.new
camelia A.new(foo => 42)
andinus i have
andinus m: class A { has $.foo; has $.bar; } 13:06
camelia ( no output )
andinus foo must be passed by the user and bar is foo*2
if bar is not passed then i set it to foo*2, if passed then i dont tweak it 13:07
lizmat m: class A { has $.foo; has $.bar = $.foo * 2 }; dd A.new(foo => 42) 13:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Virtual method call $.foo may not be used on partially constructed object (maybe you mean $!foo for direct attribute access here?)
at <tmp>:1
------> 3class A { has $.foo; has $.bar = $.foo7⏏5 …
lizmat m: class A { has $.foo; has $.bar = $!foo * 2 }; dd A.new(foo => 42)
camelia A.new(foo => 42, bar => 84)
lizmat afk for while&
andinus oh i see 13:09
what does & after "afk for while" mean?
MasterDuke just a reference to backgrounding a process on the command line 13:10
andinus i see, btw i'm sorry i should've provided the actual code from the start 13:12
i'm trying to do this: paste.debian.net/hidden/37bf5357/ 13:13
that @puzzle should be @!grids ^
codesections I was actually wondering about the & symbol too. I got the CLI reference, but does it add any extra meaning? (that is, does "afk&" mean anything different than "afk"?) 13:14
It's not a usage that I've seen in other IRC channels
andinus i think i this question on mastodon earlier this week
s/this/saw this/ 13:15
& thing
codesections andinus: probably because I asked this question on mastodon earlier this week :) 13:16
MasterDuke i don't think there's any extra meaning meant by adding the & 13:17
codesections that's kind of what I figured. It just seemed unlike us to type 4 chars where 3 will do!
MasterDuke but for a joke/nerdy reference, there's no limit to what someone will do 13:21
tadzik I always see it as "I'm going into the background" 13:22
though it's a bit reduntant in the context of "afk" :)
El_Che and no one of you verbal yakshavers had problems with the "for while" redundance? :) 13:39
codesections El_Che: I think you'll find that what we were doing was more "verbal bikeshedding" than "verbal yakshaving" :D 15:35
El_Che haha 15:37
PimDaniel Hi! 16:17
How do i autoflush $*OUT?
andinus do i not need to put "unit module Foo::Bar" if the file follows the standard directory hiearchy? i.e Foo/Bar.rakumod 16:24
andinus i mean it works as expected even without it but is it recommmended? 16:29
i'm specifying those in META6.json
PimDaniel It seams that there are no autoflush. 16:30
\o 16:31
Now i want to address a method inside his own class : Is &self.mythod the right way? 16:32
PimDaniel Ok what's next ? 16:34
andinus m: my $t = "*hi"; $t .= match("*").replace-with(""); say $t; 16:35
camelia 「*」
andinus why doesn't that work the same as this:
my $t = "*hi"; $t = $t.match("*").replace-with(""); say $t;
evalable6 hi
jmerelo PimDaniel: not so easy. Can be done, however. 16:44
PimDaniel jemerelo: thank's , what about => sub { self.my_method() } ? 16:53
Xliff Just crossed 500,000 lines of code in my Raku projects. 17:09
docs.google.com/spreadsheets/d/1M3...sp=sharing
cetjs2 jmerelo, hello, is organization approved to gsoc? 17:14
jmerelo cetjs2: we will know in 6 days 17:24
.tell Xliff congrats!
tellable6 jmerelo, I'll pass your message to Xliff
cetjs2 jmerelo, ok)
andinus m: my @t = (1,2), (2,3); say so (1,2) (elem) @t; 17:25
camelia False
andinus why doesn't this work ^ ?
m: my @t = (1,2), (2,3); say so @t[0] (elem) @t; 17:27
camelia True
andinus while this works ^
m: my @t = (1,2), (2,3); say so (1,2) ~~ @t[0];
camelia True
jmerelo andinus: IIRC set uses object equality, that is, being exactly the same object. 17:31
andinus i see 17:33
jmerelo m: say (1,2) === (1,2)
camelia False
andinus m: my @t = <h i>; say so "h" (elem) @t;
camelia True
jmerelo andinus: ^^^
andinus ^ this works though
m: say "h" === "h"
camelia True
andinus why does it say True for "h" and not for (1,2) ? 17:34
jmerelo m: my @t = $(1,2), $(2,3); say so $(1,2) ∈ @t
camelia False
jmerelo m: say $(1,2) === $(1,2) 17:35
camelia False
jmerelo m: say [1,2] === [1,2]
camelia False
jmerelo andinus: not going to work with non-scalar values, I'm afraid... 17:35
andinus i see 17:36
cetjs2 jmerelo, is new ideas added, right? 17:58
jmerelo cetjs2: IIRC, a new one was added for the Raku Pull Request Club. It was merged after the deadline. 18:01
BTW, you can still add ideas to that repo while the application is being considered perl-foundation-outreach.github.io...21-ideas/, or support as mentor any othe existing ideas 18:02
Attending now a webinar for Season of Docs, where Google supports technical writers for different organizations. Will try to apply too.
jmerelo ... which was hacked 18:09
brtastic do I need something specific for raku REPL to allow me to use up arrow for last command? 18:19
jmerelo brtastic: zef install Readline 18:20
brtastic worked, thanks jmerelo++ 18:21
jmerelo brtastic: sure :-) 18:24
cetjs2 jmerelo, also interested idea github.com/perl-foundation-outreac...support.md 18:31
PimDaniel Hi again! 18:36
Not sure some understood my question early this afternoon. 18:37
Except jemerelo perhaps.
I'm trying to address a method from his inner instance : self. : i have events keys into an hash { events => {(KEY_UP) => &self.write_up , ... } } , but it does NOT work :( 18:40
I could do it for a sub but not a method. 18:41
jmerelo .tell PimDaniel as said above, it's complicated. I'm trying to see if I find it in StackOverflow 18:55
tellable6 jmerelo, I'll pass your message to PimDaniel
jmerelo .tell PimDaniel re: pointer to a method, here you go stackoverflow.com/questions/514635...t-it-right 18:56
tellable6 jmerelo, I'll pass your message to PimDaniel
PimDaniel thank's jeremo. I'm not sure if i understood the code but it seams that the bind_method is built from outside the class. I need it from inside. And why is it so hard to do things that every langages can do in 2 lines? 19:42
tellable6 2021-03-03T18:55:28Z #raku <jmerelo> PimDaniel as said above, it's complicated. I'm trying to see if I find it in StackOverflow
2021-03-03T18:56:11Z #raku <jmerelo> PimDaniel re: pointer to a method, here you go stackoverflow.com/questions/514635...t-it-right
Geth problem-solving/solution-250: c67d55f7a9 | Altai-man++ | solutions/documentation/search-categories.md
Provide a solution document for github.com/Raku/problem-solving/issues/250

  "Documentation search categories are not standartized"
Fixes github.com/Raku/problem-solving/issues/250
22:02
vrurg Yes, they did it at last! 23:25
japhb For uploading to fez, if you're uploading on behalf of an org (instead of just as yourself doing personal modules), how can you indicate that? Should I just create additional fez accounts for each GitHub org I want to represent? But then how do others in my org take over the release pumpkin?