🦋 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.
zacts hello, are there any good books for learning raku? 02:11
I see this: docs.raku.org/language.html 02:12
but I don't see anything like modern perl for raku
the docs.raku.org seem to contain mainly topic references, at least as I'm skimming it now
timotimo zacts: you can have a look at perl6book.com 02:44
lucs Hmm... Not sure why "Learning Perl 6" is in the "I'm a novice" section. 02:47
Even non-novices should enjoy that book's approach. 02:48
s/is in the/is only in the/ 02:52
zacts timotimo: thanks 02:58
timotimo lucs: i do think the page has a github repo, probably under moritz' user account 03:00
an issue could be raised there 03:01
gotta go, seeya!
moritz lucs: the target audience of "Learning Perl 6" is novices 05:32
it explains loops, strings, arrays, variables and all those other concepts that experienced programmers find very boring
or course, experienced programmers can get joy out of it too, but that's very secondary 05:35
Geth doc: bc05f269ed | (Stoned Elipot)++ | doc/Type/Associative.pod6
Fix link to parameterized roles
06:25
doc: ef494fb6f6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Associative.pod6
Merge pull request #3399 from Raku/fix-link-param-roles

Fix link to parameterized roles
linkable6 Link: docs.raku.org/type/Associative
Guest73926 Is -i option still not a thing as described in rosettacode.org/wiki/Globally_repl...files#Raku ? 08:34
m: say 1 ~~ Mu 08:37
camelia True
MasterDuke Guest73926: correct 08:38
Guest73926 thanks MasterDuke 08:40
MasterDuke Dwarf: i'm a little surprised the .map didn't work(but i haven't used grammars much), but why are you mapping anyway? your grammar explicitly only has one <dice>. if you change TOP to have <dice>+ then the rest of your program works 08:43
Dwarf Hm 08:53
That makes sense
moritz points out that dice is already a plural :D 09:19
dakkar diceseseseses 09:25
lizmat weekly: sumankhanal.netlify.app/post/raku/count_dna/ 09:41
notable6 lizmat, Noted! (weekly)
lizmat weekly: news.perlfoundation.org/post/jonathan-2020-04 09:44
notable6 lizmat, Noted! (weekly)
tbrowder moritz: yr next book should be "the joy of raku" 10:21
moritz tbrowder: I'm not the right person for that :D 11:02
moritz I'm currently working on redoing "Perl 6 Fundamentals" as "Raku Fundamentals" 11:12
lizmat moritz++ 11:13
tbrowder moritz: when do expect the book to be out? 12:27
*you
moritz Q4 2020 12:29
moritz very distracted by work, family, covid-19 isolation and mood swings 12:30
[Coke] moritz++ 12:42
cpan-raku New module released to CPAN! Fasta (0.0.1) by 03ELIZABETH 13:03
[Coke] is there a URL that lets me see that module? 13:10
(like, on metacpan?)
(also can't see it on modules.raku.org) 13:11
timotimo [Coke]:well, modules.raku.org doesn't update immediately 13:22
lizmat [Coke]: github.com/lizmat/Fasta 13:23
Geth doc: 02cc7e06de | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/classtut.pod6
remove outdated slang phrase, make more pedantic
13:24
linkable6 Link: docs.raku.org/language/classtut
tbrowder lizmat++, bio folks must be watching that 13:26
timotimo lizmat: i wonder if splitting on > instead of \n can be faster; a little post-processing to deal with labels that have a > inside them as well maybe 13:27
or split on \n> and handle the very beginning differently
lizmat I understand these files can be large, so I'd like to do it line by line 13:30
lizmat I'll wait for someone to actually use it and having performance issues :-) 13:31
elcaro when for-looping over an iterable assigned to a scalar, is there any semantic/performace differences between `for $x<>`, `for $x[]`, and `for $x.list` ? 13:36
jnthn for $x<> is a simple removal of the Scalar container, so the most direct; .list will cause storage of elements if it's a Seq, which may be undesirable if wanting laziness. 13:47
cpan-raku New module released to CPAN! Fasta (0.0.2) by 03ELIZABETH 14:20
lizmat [Coke]: its on modules.raku.org now: modules.raku.org/dist/Fasta:cpan:ELIZABETH 14:21
well, 0.01, .02 adds a "sequences" method to create the actual string
[Coke] lizmat++ 14:31
jdv79 any general differences between ubuntu and apline that would cause a nativecall to behave differently? 15:48
well, i guess i should c it up to compare. maybe its not raku related. 15:49
melezhik jdv79: if it affects a Raku module?
sena_kun jdv79, alpine uses musl and ubuntu uses glibc? 16:12
mst yep 16:13
jdv79 huh, that's bizarre and i'm an idiot. not null terminating a CArray doesn't break on ubuntu but on alpine its randomly "failing" 16:21
jdv79 cool and duh 16:22
jnthn Probably just "luck" in having zeroed memory given to you. I suspect ASAN and valgrind would point it out on either library 16:23
jdv79 that makes sense, thanks 16:27
jjmerelo Hej 16:28
jjmerelo What would you say is the equivalent of the __name__ == __main__ in Python in Raku? 16:28
jjmerelo Best I could come up with is to compare $*PROGRAM to file name 16:29
dakkar in p5 I've used `!defined caller`
jdv79 just curious - why would you want to do that? 16:30
iirc in python its how they flip a file from action like a module or like a program or something.
*acting 16:31
jjmerelo same reason as in python
Load a program to test whatever is defined there without starting the actual main part of the program.
I'm using Cro::HTTP::Test to test a microservice which can be also run independently 16:32
guifa2 For POD, is there any way to link to code objects (classes, methods, or even blocks)? I'm 99.9% sure the answer is no as links only go to other POD documents or URIs, but I feel like it might be a fairly useful thing to do. 16:35
jjmerelo guifa2 there was an ad-hoc way of doing it, but it was obliterated in 2018 16:38
guifa2 Ah. I ask because there are sort of two separate POD annotations — the one that flows with the document, and the one that attaches to classes/methods/etc. It seems like it would be good to be able to link to content of either 16:39
jjmerelo guifa2 can you clarify that? 16:46
jjmerelo Pods and comments are the same in Raku, they are part of the documentation "braid". So if you intersperse declarator blocks with POD blocks, they will both be parsed by the compiler 16:47
dakkar maybe he means the bits you can get via `.WHY` 16:51
guifa2 dakkar correct 16:57
dakkar guifa2: so you'd like to L<#subname> or L<#classname>
guifa2_ the .WHY is functionally different, in that it's not really a parallel document that happens to be interleaved with the code, but it's actually literally attached to a single code entity 16:59
s/.WHY/.WHY-style annotations 17:00
dakkar declarator blocks also appear in the $=pod array 17:01
guifa2_ they do — and have a WHEREFORE method, that other pod elements don't 17:08
dakkar correct 17:09
now, I see some problems
the pod6 documentation says that L<> can link to a *section*
but declarator blocks are not (I think) sections
also, they don't get names
so, improvement: have them get the name of the thing they're documenting 17:10
then, make them link targets
we probably don't need namespacing
guifa2_: I think this needs a bug report 17:11
guifa2_ It possibly needs a bit more, possible a raku problem solving issue — for example, if you do a class with methods, and attach declarator pod to all of them, they are presented as top-level pod elements. That feels....off, I mean, you *can* say $=pod[2].WHEREFORE.package 17:16
to try to figure out that in rendering it might need to be nestled inside of a class 17:17
guifa2_ But I can't think of how to figure out handling a class within a class — classes don't have equivalent .package methods that I can see 17:18
Geth doc: dc3b549c6e | (Tom Browder)++ (committed using GitHub Web editor) | doc/Type/independent-routines.pod6
add missing space
17:19
linkable6 Link: docs.raku.org/type/independent-routines
poohman hello all, 20:35
lizmat poohman o/
poohman do we have a character class for real numbers (with decimal points) in regex or should it done manually 20:36
Hi lizmat
poohman be done manually, I meant 20:37
lizmat I think you need to do that manually, but others like moritz would know for sure
poohman ok let me try to do that 20:38
thanks
timotimo a character class "for real numbers" would allow numbers like 000...1 or 0.1.2.3 or 9999.9.9.9999 20:45
Marcool hi all, is there anything special other than what's in the docs to know about using the "resources" part of a META6.json with zef on macOS? docs.raku.org/language/variables#i...FRESOURCES 20:53
I just get Nil back from trying to find my resource…
Geth doc/fix-link-label: 587f82d893 | (Stoned Elipot)++ | doc/Type/Associative.pod6
Correct pasto in link label
20:57
doc: stoned++ created pull request #3401:
Correct pasto in link label
cpan-raku New module released to CPAN! Fasta (0.0.3) by 03ELIZABETH 21:19
lizmat 9.5x faster for counting bases, but cheating with nqp 21:21
Geth doc: 587f82d893 | (Stoned Elipot)++ | doc/Type/Associative.pod6
Correct pasto in link label
doc: 167ccf1f87 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | doc/Type/Associative.pod6
Merge pull request #3401 from Raku/fix-link-label

Correct pasto in link label
linkable6 Link: docs.raku.org/type/Associative
poohman in case all the data members in my class are private, then i will not have a default constructor for the class. Then will new() work? 21:55
poohman m: class A {has $!a;method entry($b) {$!a=$b;method show(){say $!a}};my A $c; $c.entry(10);$c.show(); 21:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3y $!a}};my A $c; $c.entry(10);$c.show();7⏏5<EOL>
poohman m: class A {has $!a;method entry($b) {$!a=$b;}method show(){say $!a}};my A $c; $c.entry(10);$c.show();
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ss A {has $!a;method entry($b) {$!a=$b;}7⏏5method show(){say $!a}};my A $c; $c.entr
expecting any of:
poohman m: class A {has $!a;method entry($b){$!a=$b;}method show(){say $!a}};my A $c; $c.entry(10);$c.show(); 21:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ass A {has $!a;method entry($b){$!a=$b;}7⏏5method show(){say $!a}};my A $c; $c.entr
expecting any of:
poohman m: class A {has $!a;method entry($b){$!a=$b;};method show(){say $!a};};my A $c; $c.entry(10);$c.show(); 21:58
camelia Cannot look up attributes in a A type object
in method entry at <tmp> line 1
in block <unit> at <tmp> line 1
poohman m: class A {has $!a;method entry($b){$!a=$b;};method show(){say $!a};};my A $c= A.new(); $c.entry(10);$c.show();
camelia 10
poohman sorry had some trouble in my repl 21:59
guifa2_ pooman: the default constructor will work, so long as you don't have "is required" 22:05
m: class Foo { has $!bar }; say Foo.new;
camelia Foo.new 22:06
guifa2_ m: class Foo { has $!bar is required }; say Foo.new;
camelia The attribute '$!bar' is required, but you did not provide a value for it.
in block <unit> at <tmp> line 1
guifa2_ (but in the first case, $!bar will remain undefined and may or may not be useful) 22:07
melezhik RakuDist now could run module test for multiple rakudo version in one click - repo.westus.cloudapp.azure.com/rakudist2/ 22:09
cc :AlexDaniel`
AlexDaniel` melezhik: where's 2015.12 ? 22:10
AlexDaniel` also can you remove the ones that have point releases? That is, no reason to list 2020.05 if there's 2020.05.1, just list 2020.05.1 only 22:11
AlexDaniel` 6c: say $*PERL.compiler.version 22:20
* 6c: say $*PERL
ugh
committable6 AlexDaniel`, gist.github.com/f57c1703958a69ed69...54562ab691
AlexDaniel` 6c: say $*PERL
committable6 AlexDaniel`, gist.github.com/6c20d357c5f7fc7056...59de94507d
melezhik :AlexDaniel` is it better now?
AlexDaniel` Altai-man_: interesting! See gist.github.com/Whateverable/f57c1...54562ab691 22:21
tellable6 AlexDaniel`, I'll pass your message to Altai-man_
AlexDaniel` Altai-man_:
tellable6 AlexDaniel`, I'll pass your message to Altai-man_
AlexDaniel` Altai-man_: basically, I think 2020.02.1 was botched a bit. The VERSION wasn't set correctly, for some reason 22:22
tellable6 AlexDaniel`, I'll pass your message to Altai-man_
AlexDaniel` Altai-man_: 2020.05.1 is fine though 22:23
tellable6 AlexDaniel`, I'll pass your message to Altai-man_
AlexDaniel` melezhik: yes, but there's still 2020.05
melezhik fixed
AlexDaniel` also, 2019.07.01 should be 2019.07.1 (not .01 but .1) 22:24
I don't know if it makes a difference but maybe it makes sense to be more precise
melezhik yeah, it's internally is converted into sha's but I'll fix it 22:25
AlexDaniel` that's really great I think, let's see if others find it useful
melezhik yeah, thank you 22:26
AlexDaniel` weekly: Ever wondered if your module works on older rakudo versions? Well, now you can test it with a few clicks: repo.westus.cloudapp.azure.com/rakudist2/
notable6 AlexDaniel`, Noted! (weekly)
AlexDaniel` melezhik: can you add 2018.10 to the list? That was the last release supporting 6.c so maybe it is significant 22:27
melezhik yeah. will do it later 22:28
melezhik need to go 22:28
AlexDaniel` also maybe 2016.12 (debian oldstable) and 2017.12 so that there's at least one per year :) 22:29
OK so it doesn't work for 2015.12… 22:33
looking at the output, it seems like zef itself doesn't support 2015.12?
what's the oldest version it does support then? 22:34
AlexDaniel` anyway I just jumped in briefly to answer melezhik, won't be looking at it deeper now so I hope somebody else does 22:35
Geth doc: tbrowder++ created pull request #3402:
Add more details of routine sprintf and its format string and *@args
22:39
AlexDaniel` weekly: ↑ this was weeklied before, but now there's a much more user friendly list that you can shift-select and test your module on all versions with just one request 22:49
notable6 AlexDaniel`, Noted! (weekly)
poohman guifa - thanks 22:57