🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
Geth ¦ doc: coke self-assigned Convert 1-file docs to epub with TOC github.com/Raku/doc/issues/1981 02:59
Geth ecosystem: e1d9cd98d2 | (Elizabeth Mattijsen)++ | META.list
Freeze Test::Builder

While it is being moved to the zef ecosystem
11:09
kueppo HI everyone, I'm new to Raku, I was wondering if there's any roadmap on how to read the Raku doc because whenever I decide to read a section of it, the examples they use uses many unknown features and at sometimes I'm kinda stuck. 11:33
sorry for the stupid question. 11:34
lizmat kueppo: that's not a stupid question 11:39
is there a particular language you're coming from ? 11:40
kueppo from perl, I've been using perl for 1 years now 11:41
lizmat perhaps this can be helpful then: docs.raku.org/language/5to6-nutshell
kueppo but they are a lot of new features in raku that are somehow confusing
thanks for the links 11:42
lizmat probably from docs.raku.org/language/5to6-nutshell#Syntax onwards
kueppo question 11:44
I would like to learn the basics of this val:key<value> I'm seeing them on variables, subroutines, class, literals, operators  etc and they are all confusing.
Nemokosch what is this?
kueppo val:key<value>, they called it pair literals and they sometimes appear in complex identifier. 11:45
and even on objects 11:46
like this Mu:D
lizmat well, everybody wants the colon :-) 11:47
kueppo yeah, X) 11:48
lizmat in the context of Mu:D, the :D indicates a "must be defined" constraint on the type (Mu), and is sometimes also called a "type smiley" 11:51
other type smileys are :U (for must *not* be defined, or "undefined") and :_ (don't care, which is when you want to be explicit about not caring) 11:52
Nemokosch the type smiley is cute
lizmat foo<bar> is basically sugar coating for foo => "bar"
kueppo got it, thanks alot :) lizmat
Nemokosch I get :key<value> but what is that "val" in front of it?
lizmat oops, :foo<bar> of course :-) 11:54
kueppo that was a mistake, I was confusing :key<value> with complex identifiers.
lizmat well, you can haz it as an identifier
Nemokosch the colon pairs
lizmat e.g. infix ops are just subroutines with funny names:
Nemokosch infix:<+> 11:55
lizmat the "+" in "42 + 666" is just a sub called "infix:<+>"
m: say infix:<+>(42,66) # same as 42 + 666
camelia 108
lizmat m: say infix:<+>(42,66) # same as 42 + 66
camelia 108
kueppo now I see  :O 11:56
Nemokosch m: dd &infix:<+>.WHAT 11:56
camelia Sub+{is-pure}+{Precedence}
lizmat the "is pure" is a hint for the optimizer, that the return value of any combination of arguments, is always the same 11:57
aka 1 + 1 is *always* 2
kueppo another question: the fact that everybody wants the colon is somehow confusing so I would like to get the underlying concept behind this colon thing.
lizmat the Precedence part is the precedence level that the operator has during parsing 11:58
Nemokosch is pure was new for me
lizmat kueppo: perhaps github.com/Raku/CCR/blob/main/Rema...roscopy.md is a good read
kueppo thanks again lizmat 11:59
lizmat I think there was also an advent post with more about the colon 12:00
Nemokosch oh yeah, it can be used for named function parameters as well 12:01
"can be" or this is the one way named function parameters are defined? 12:02
because I only know the one with the colon
lizmat well, the other is the fat arrow syntax
foo => 42
Nemokosch yes, when passing the argument 12:03
but what about at the definition?
lizmat ah, you mean as a parameter? then the colon syntax is the only one, yes 12:04
Nemokosch sub foo($positonal-arg, :$named-arg) {} 12:06
sth like this
lizmat yeah, the :$foo syntax is the only way that I know of :-) 12:09
lizmat apart from somehow building a Signature object yourself and that somehow using that, but that gets into AST / RakuAST territory 12:09
Nemokosch gotcha 12:11
lizmat clickbaits rakudoweekly.blog/2022/05/23/2022-21-math-like/ 12:57
Geth ecosystem: 5cd09db821 | (Elizabeth Mattijsen)++ | META.list
Freeze Pod::TreeWalker

While it is being moved to the zef ecosystem
16:36
ecosystem: b604673852 | (Elizabeth Mattijsen)++ | META.list
Remove Subsets::IO

It now lives in the zef ecosystem
16:38
Geth ecosystem: 1e917445db | (Elizabeth Mattijsen)++ | META.list
Freeze Date::WorkdayCalendar

While it is being moved to the zef ecosystem
18:53
Nemokosch hi 23:05
any idea why
my @hexa-chars <== sort <== (|('a'..'f'), |<o l i s t>); 23:06
parses as an open multiline string