🦋 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.
Geth_ ecosystem/bbkr-patch-1: 5b74a410cf | (Pawel Pabian)++ (committed using GitHub Web editor) | META.list
Added HomoGlypher - tool for handling similarly looking characters in strings.
00:43
ecosystem: bbkr++ created pull request #477:
Added HomoGlypher - tool for handling similarly looking characters in strings
00:44
Xliff m: use NativeCall; BEGIN my $bit_type := uint64; class A is repr<CStruct> { has $bit_type $.a }; A.new( a => 42 ); A.gist.say 06:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3class A is repr<CStruct> { has $bit_type7⏏5 $.a }; A.new( a => 42 ); A.gist.say
expecting any of:
infix
infix stopper
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a }; A.new( a => 42 ); A.gist.say
camelia (A)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a }; A.new( a => 42 ); A.a.say
camelia Cannot look up attributes in a A type object
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a }; A.new( a => 42 ); A.new.gist.say
camelia A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$!a) {}; }; A.new( a => 42 ); A.new.gist.say 06:06
camelia Cannot unbox a type object (Any) to int.
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { $!a = $a }; }; A.new( a => 42 ); A.new.gist.say
camelia Cannot unbox a type object (Any) to int.
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a }; }; A.new( a => 42 ); A.new.gist.say 06:07
camelia 42
(Any)
A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a }; }; A.new(); A.new.gist.say
camelia (Any)
(Any)
A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a }; }; A.new( a => 42); A.new.gist.say
camelia 42
(Any)
A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a }; $!a = $a }; A.new( a => 42 ); A.new.gist.say 06:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable $!a used where no 'self' is available
at <tmp>:1
------> 3a; submethod BUILD (:$a) { say $a }; $!a7⏏5 = $a }; A.new( a => 42 ); A.new.gist.sa
»
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a; $!a = $a }; A.new( a => 42 ); A.new.gist.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3= $a }; A.new( a => 42 ); A.new.gist.say7⏏5<EOL>
expecting any of:
statement end
statement modifier
statement modifier loo…
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a; $!a = $a }; }; A.new( a => 42 ); A.new.gist.say
camelia 42
Cannot unbox a type object (Any) to int.
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1

(Any)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a; }; }; A.new( a => 42 ); A.new.gist.say
camelia 42
(Any)
A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$a) { say $a if $a.defined }; }; A.new( a => 42 ); A.new.gist.say 06:09
camelia 42
A.new(a => 0)
Xliff m: use NativeCall; BEGIN constant bitType := uint64; class A is repr<CStruct> { has bitType $.a; submethod BUILD (:$!a) {}; }; A.new( a => 42 ).gist.say
camelia A.new(a => 42)
Geth_ ecosystem: 5b74a410cf | (Pawel Pabian)++ (committed using GitHub Web editor) | META.list
Added HomoGlypher - tool for handling similarly looking characters in strings.
06:47
ecosystem: f34a860868 | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
Merge pull request #477 from perl6/bbkr-patch-1

Added HomoGlypher - tool for handling similarly looking characters in strings
Geth_ doc: f788c9dedc | (JJ Merelo)++ | doc/Language/terms.pod6
Merges code and deindents

Since there's no difference now after 6.d. Refs #2632. Also eliminates a reference to 6.d.PREVIEW refs #2687
08:12
doc: 1d223c2fc5 | (JJ Merelo)++ | doc/Type/Complex.pod6
Fixes example

And also adds example of fixed complex exponentiation, refs #2632
Geth_ advent: nige123++ created pull request #46:
Update schedule
08:47
Geth_ advent: 885757425d | (Nigel Hamilton)++ (committed using GitHub Web editor) | raku-advent-2020/schedule
Update schedule
09:04
advent: 0b650f611e | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2020/schedule
Merge pull request #46 from nige123/patch-4

Update schedule
chloekek . 09:24
Xliff chleokek: ,
Don't mind me. I'm sleepless...and not in Seattle! 09:25
chloekek p6: use europe; say 1,2 + 3,4;
camelia ===SORRY!===
Could not find europe at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/share/per…
chloekek Hmm, no comma for decimal point. But I can write my string literals in Dutch! 09:26
p6: say „Hallo, wereld!“
camelia Hallo, wereld!
Xliff Try doing that in C#
Progress is slow...but at least it is progress. 09:27
chloekek I once wrote a C# parser in Haskell and I called the parsing function parseC# because you can put # at the end of an identifier.
Xliff Until you can do C♯ ... it's a crude imitator. 09:28
chloekek p6: sub parse-C♯ { }
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub parse-C7⏏5♯ { }
expecting any of:
new name to be defined
Xliff *gasp* 09:29
I'm shocked!
Xliff m: parse-C# { } 09:29
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
parse-C used at line 1
Xliff m: parse-C♯ { }
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3parse-C7⏏5♯ { }
expecting any of:
infix
infix stopper
statement end
statement modifier
statement mod…
chloekek p6: sub postfix:<♯>($x) { $x }; sub parse-C { 123 }; say parse-C♯
camelia 123
Xliff Not marked as a letter or a number in the parser. 09:30
m: parse-Cα { }
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
parse-Cα used at line 1
chloekek It’s a musical symbol.
Xliff m: sub parse-Cα { }
camelia ( no output )
chloekek Alpha is a letter so it is allowed.
Xliff Yes. That was what I was getting at.
chloekek I think musical symbols are in the category Math Symbol 09:31
Xliff Yeah. OK. That's why it wouldn't work.
chloekek Some are in Other Symbol it seems.
Lol there is QUARTER NOTE but also MUSICAL SYMBOL QUARTER NOTE 09:32
p6: say ‘♩’ eq ‘𝅘𝅥’
camelia False
Xliff Aannd....back to more sleepless I go. 09:34
Xliff I have to wake up for work in 4 hours. :( 09:34
chloekek p6: .say for (0 .. 0x10FFFF).map(*.chr).grep(*.uniname.starts-with(‘MUSICAL SYMBOL ’)) 09:36
camelia 𝄀
𝄁
𝄂
𝄃
𝄄
𝄅
𝄆
𝄇
𝄈
𝄉
𝄊
𝄋
𝄌
𝄍
𝄎
𝄏
𝄐
𝄑
𝄒
𝄓
𝄔
𝄕
𝄖
𝄗
𝄘
𝄙
𝄚
𝄛
𝄜
𝄝
𝄞
𝄟
𝄠
𝄡
𝄢
𝄣…
chloekek p6: say (0 .. 0x10FFFF).map(*.chr).grep(*.uniname.starts-with(‘MUSICAL SYMBOL ’)).elems 09:38
camelia 231
lizmat afk& 09:40
cpan-raku New module released to CPAN! Crypt::SodiumPasswordHash (0.0.1) by 03JSTOWE 10:01
chloekek Where is the parser for nqp? 10:04
moritz in the nqp repo, src/NQP/Grammar.nqp 10:06
chloekek Ah cool. Thanks. 10:10
cpan-raku New module released to CPAN! Crypt::AnyPasswordHash (0.0.3) by 03JSTOWE 10:16
lizmat PSA: the last Rakudo Weekly of 2019 will be published tomorrow morning 12:13
chloekek p6: BEGIN { f; }; sub f { } 12:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
f used at line 1
chloekek p6: sub f { }; BEGIN { f; } 12:37
camelia ( no output )
chloekek p6: sub f { g; }; sub g { } 12:38
camelia ( no output )
chloekek p6: sub f { g; };
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
g used at line 1
chloekek This is interesting; compiling a subroutine definition sees subroutines defined later.
BEGIN obviously cannot. What would happen if g were an infix operator instead? 12:40
That seems to work as well. Then, how is precedence done? Are subroutine bodies not parsed immediately?
Oh, actually it doesn’t work with infix operators. 12:41
cpan-raku New module released to CPAN! Method::Also (0.0.5) by 03ELIZABETH 12:55
New module released to CPAN! RedX::HashedPassword (0.0.4) by 03JSTOWE 13:03
leont Does the «token element:<foo>» syntax have a particular name? 13:21
chloekek leont: assuming you mean token element:sym<foo>, they’re called proto regexes in the manual. 13:56
cpan-raku New module released to CPAN! Crypt::AnyPasswordHash (0.0.4) by 03JSTOWE 14:35
cpan-raku New module released to CPAN! MeCab (0.0.17) by 03TITSUKI 15:36
New module released to CPAN! MeCab (0.0.16) by 03TITSUKI
cpan-raku New module released to CPAN! Algorithm::LibSVM (0.0.11) by 03TITSUKI 15:59
cpan-raku New module released to CPAN! Chart::Gnuplot (0.0.16) by 03TITSUKI 16:07
cpan-raku New module released to CPAN! Random::Choice (0.0.7) by 03TITSUKI 16:14
chloekek Is it possible for a grammar/regex to modify the input string at some point during parsing, so that a different string will be used to continue parsing? 18:19
e.g. ‘foo’ ‘(’ <expr> ’)’ { my $new-string = EVAL $<expr>; <.continue-with($new-string ~ $current-remainder)> } 18:22
rindolf chloekek: hi - no idea here 18:24
kalkin- m: say "1".succ; say "¹".succ; say "⒈".succ 18:25
camelia 2
¹
kalkin- why it does not work with ¹ & ⒈? 18:26
[Coke] ¹ is only a superscript where it makes sense. 18:28
er.
only a *power*
m: say 1 eq ¹ 18:29
camelia True
[Coke] m: say 1 === ¹
camelia True
[Coke] m: say 1 =:= ¹
camelia True
kalkin- ok, but the second one is a 1 with dot, this should be incremented
[Coke] m: say 1 == ¹ # oops, not eq!
camelia True
[Coke] m: dd ⒈ 18:30
camelia 1
[Coke] m: say ⒈ === 1
kalkin- m: say ("⒈".ord +1).chr
camelia True
[Coke] yup, that seems buggy.
I misread your question, btw. :) 18:31
might fall out of digit vs. number handling.
but at first glance, seems suprising.
kalkin- so once again, is it a bug or a feature? Should I open a github issue for that? 18:57
jmerelo say "⒈ ".uniprops 18:59
evalable6 (No Zs)
tellable6 2019-12-22T14:47:23Z #raku <tbrowder> jmerelo i can't tell if my advent post is scheduled properly--the bloody calendar display seems to have changed on me! please help!
hey jmerelo, you have a message: gist.github.com/df277fb78c251e4b0b...aea4d33e45
jmerelo say "1".uniprops
evalable6 (Nd)
jmerelo say "⒈ ".uniprops
evalable6 (No Zs)
jmerelo say "¹".uniprops 19:00
evalable6 (No)
jmerelo kalkin-: different unicode properties. I would say that's a feature.
kalkin-: surprisingly enough, digits and numbers are not exactly the same 19:01
kalkin- say "a".succ; say "①"succ
m: say "a".succ; say "①"succ
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say "a".succ; say "①"7⏏5succ
expecting any of:
infix
infix stopper
postfix
statement end
statem…
jmerelo .tell chloekek that's amazing. I'll check it out (I saw it on twitter, too)
tellable6 jmerelo, I'll pass your message to chloekek
jmerelo .tell tbrowder I'll check
tellable6 jmerelo, I'll pass your message to tbrowder
kalkin- m: say "a".succ; say "①"succ;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say "a".succ; say "①"7⏏5succ;
expecting any of:
infix
infix stopper
postfix
statement end
state…
kalkin- m: say "a".succ; say "①".succ;
camelia b
jmerelo .tell tbrowder it's been published anyway, so we're good.
tellable6 jmerelo, I'll pass your message to tbrowder
kalkin- m: say "①".uniprops 19:02
camelia (No)
kalkin- jmerelo: according to your theory ① should not work
jmerelo kalkin-: it's a number
that means you can't join it with other "Nos" to create numbers with several digits. 19:03
kalkin- m: say "¹".uniprops; say "¹".succ
camelia (No)
¹
jmerelo And you can compare it numerically
say 1 == ¹
evalable6 True
jmerelo But it's not exactly the same
say 1 === ¹
kalkin- but "¹" is also a No and succ doesn't work on it
evalable6 True
jmerelo Ah, OK. I didn't know that was the precise issue. 19:04
Might be a bug, but I'd look at the set of properties before
kalkin- to sum it up: why is 1, ¹, ⒈ and ① all handled differently? 19:05
jmerelo: what set properties do you mean?
jmerelo Well, 1 is Nd, and the rest are No, for starters. But your point is that succ works in all of them but ¹ 19:06
Also, ⒈ is actually a combination of two codepoints. It might evaluate dynamically to 1, but again, it's not the same.
kalkin- and ⒈ is also not supported 19:07
DIGIT ONE FULL STOP (if you don't see it clearly)
jmerelo uniprop just returns the general category, but it might have more categories. 19:08
Unicode is a whole world.
kalkin- so shall i open a GitHub issue? 19:10
jmerelo And No needn't have a successor, I think. It might have, but then...
kalkin-: it will always help clarify any ambiguity, of course, in case there's one 19:11
And f*ck
There's nothing scheduled for today.
.seen kaiepi 19:13
tellable6 jmerelo, I saw kaiepi 2019-12-22T11:05:09Z in #raku: <Kaiepi> i was expecting it to work like assigning to `my Int:D @foo` would if i hadn't already assigned anything to it
kalkin- jmerelo: k, thank you 19:14
kalkin- done 19:24
kalkin- .tell jmerelo the succ & pred stuff is magic. so I guess i need to do a PR which turns the MORE MAGIC switch on this ranges 19:35
tellable6 kalkin-, I'll pass your message to jmerelo
lizmat kalkin-: indeed :-) 19:38
kalkin-: you probably want to look at github.com/rakudo/rakudo/blob/mast...INC_DEC.p6 19:39
kalkin- lizmat: nice, thanks! now i know what to extend 19:40
m: say "🂤".succ; 19:41
camelia 🂤
kalkin- the question is how wild can i go? :)
cards? domino? majong? chess pieces? 19:42
they all have an internal order
lizmat anything with an internal order is ok to me... 19:50
as has been said: this is really magic :-)
kalkin- xahlee.info/comp/unicode_circled_numbers.html ← Xah Lee has a good list of circled stuff
also do I need to add roast tests for that? 19:51
I would assume the behavior of Str.succ & Str.pred are part of the language definition 19:52
lizmat yes, I think there should be tests, I think there are, actually 19:53
lizmat not too many, apparently :-( 19:55
Kaiepi oh it's the 23rd 20:13
.tell jmerelo, i'll get the post scheduled
tellable6 Kaiepi, I'll pass your message to jmerelo
kalkin- Reading S26 I figured out that if you want to have trailing declarator block on a sub you have to define it like this: sub f() #= Trailing comment ␤ {} 20:18
Kaiepi .tell jmerelo, oh mb didn't see the emails 20:18
tellable6 Kaiepi, I'll pass your message to jmerelo
kalkin- Ohh and leading/trailing pod on vars is broken. if there is a sub before the var, it declares the sub a multi and displays the variable pod as belonging to the sub. The var is lost… 20:21
chloekek Would be fun to write a COBOL parser with grammar. 20:28
tellable6 2019-12-23T19:01:36Z #raku <jmerelo> chloekek that's amazing. I'll check it out (I saw it on twitter, too)
lizmat chloekek: go for it :-) 20:29
chloekek It has some fun parsing rules regarding line continuations.
And of course the 7..72 columns limit. 20:30
xkr47 chloekek, use Inline::COBOL; # :-D 21:57
cpan-raku New module released to CPAN! CSS::Selector::To::XPath (0.0.6) by 03WARRINGD 22:24
tbrowder kalkin: did you see reference to the "tree-sitter" streaming gramar parser mentioned i think by AlexDaniel a few weeks ago? 23:45
tellable6 2019-12-23T19:01:43Z #raku <jmerelo> tbrowder I'll check
2019-12-23T19:01:59Z #raku <jmerelo> tbrowder it's been published anyway, so we're good.
tbrowder *grammar
i was thinking that we might try to design a pod parser from scratch without regard (or minimum regard) to any previous grammar in the ambient code. then see if we can fit it back in either as a slang or just a rewrite of the current pod grammar. 23:50