🦋 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: softmoth++ created pull request #491:
Template::Mustache moving to CPAN
00:53
Geth doc: Prince213++ created pull request #3367:
Meaningless entry in Glossary
03:39
Geth ¦ problem-solving: JJ assigned to jnthn Issue Should Rakudo fail at compile time if it's possible? github.com/Raku/problem-solving/issues/191 06:30
ecosystem: 5d3b56513b | (Tim Siegel)++ (committed using GitHub Web editor) | META.list
Template::Mustache moving to CPAN
06:32
ecosystem: 27c726b5c0 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #491 from softmoth/patch-1

Template::Mustache moving to CPAN
Geth doc/master: 4 commits pushed by (Sizhe Zhao)++, (Juan Julián Merelo Guervós)++ 07:25
SmokeMachine Will RakuAST be a target? I mean: will it be possible to instead of run a code, to get its RakuAST? 07:34
Geth doc: Prince213++ created pull request #3368:
Change .perl to .raku, ref #3309
08:03
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
El_Che I have an answer ready to ask the person to reopen this ticket in the rakudo/star repo instead, but I think it would be a lot nicer if you could transfer the ticket instead? (I don't have access to rakudo/star to do that): github.com/rakudo/rakudo/issues/3671 08:23
more userfriendly 08:25
andrzejku hello 09:12
I want to ask you whethever that's a good idea to use raku as oneliner on embedded device but compile it using toolchain as it is on it by default and run it thorough usb? 09:14
or maybe it is not possible at all
Altreus Don't know if it's really optimised for low-resource devices 09:19
andrzejku Altreus, shit you are perl spy :D 09:22
tadzik :o 09:28
I think Altreus is right, if you wanna run rakudo on devices with little resources you're gonna have a bad time 09:29
andrzejku tadzik, i will try perl 09:40
Altreus I have my fingers in many pies 09:59
AlexDaniel notable6: CLA 10:18
notable6 AlexDaniel, 1 note: gist.github.com/3df2c1236cedbb0e2b...1110c189a3
AlexDaniel El_Che: ↑ can you do this, please?
El_Che: nowadays the turnaround time is pretty short
cyg07 p6:say 3; 10:22
evalable6 3
timotimo could fork nqp and give it a bunch of sugar and useful classes and subs
that ought to have a lower resource impact
MasterDuke Xliff: looks like the fastest is something like `my Buf $b = <...>; my $ca = CArray[uint8].allocate($b.elems); @$ca = @$b` 10:50
tellable6 MasterDuke, I'll pass your message to Xliff
El_Che AlexDaniel: ok, will do 11:07
Geth doc/method-perl-to-raku: b9a5f40f4f | (Stoned Elipot)++ | 7 files
Change .perl to .raku in examples, ref #3309
12:13
doc: stoned++ created pull request #3369:
Change .perl to .raku in examples, ref #3309
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
Geth doc/master: 7 commits pushed by (Sizhe Zhao)++ 12:21
Geth doc: b9a5f40f4f | (Stoned Elipot)++ | 7 files
Change .perl to .raku in examples, ref #3309
12:24
doc: a7dfb8abb1 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 7 files
Merge pull request #3369 from Raku/method-perl-to-raku

Change .perl to .raku in examples, ref #3309
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
Geth doc/rework-makefile: 4b10d09362 | (Stoned Elipot)++ | Makefile
Clean up/improve Makefile

  - remove broken targets: 'bigpage', 'epub'
  - make 'html' target working again
  - update 'help' target "text"
  - remove now unneeded targets: 'clean-build', 'remove-build'
  - introduce 'clean-cache' target
... (10 more lines)
13:03
doc: stoned++ created pull request #3370:
Clean up/improve Makefile
jdv79 MasterDuke: upgrading didn't help. i'll have more time in a bit to dig more though. 13:04
MasterDuke huh. i'll probably be afk for a little while, but should be back later 13:05
konvertex Playing around with raku for the first time, wondering whether the mem usage is expected to drop over the coming releases (2020.01, atm) just as performance improves each version. 90mb+ (res) for 'puts "foo"' is four times more than chubby sbcl. :( 13:23
sena_kun konvertex, it is expected (we cannot promise, but there are steps taken in this direction). 13:27
konvertex That's good to hear. Say, is part of that work scheduled for the upcoming release or expected to land much later? 13:32
sena_kun konvertex, it is a question hard to answer. There are various things affecting memory usage, small and big. More so, it is really hard to predict how much one or another change would affect both performance and/or mem usage. I would not expect the next release to be 10x times better than the previous one, but people are working on that as well. 13:36
s/on that/in this direction/ 13:39
konvertex Alright, will patiently wait and see what the devs are cooking up. Thanks! 13:41
lizmat konvertex: if you have specific issues that bar you from using Raku, it would help if you could submit an issue for that 13:44
konvertex: sometimes (well, less often nowadays), it can be fixed rather easily, as it was previously overlooked
konvertex Well, as a language learner, the excessive mem usage, atleast compared to p5, ruby, scheme, lisp and such, is pretty much the only thing that has jumped at me yet. 13:49
lizmat konvertex 14:16
do you do a lot with strings?
because strings internally are 32bits / codepoint afaik
so that could be one source of memory bloat
AlexDaniel lizmat: are they? I thought there was something to keep them 8-bit unless there are any unicodey chars 14:18
lizmat well, a newline will make it unicodey
jnthn Yes, there's multiple representations.
lizmat jnthn: right? 14:18
AlexDaniel lizmat: why would a newline be any special 14:20
on unix that is
lizmat because it is a synthetic in Raku
jdv79 what is "{ ... }"? 14:21
AlexDaniel jdv79: a block
jdv79 teh ... i mean
AlexDaniel lizmat: \n should be just \n, it'd be weird if it was any different
jdv79 i think that is somehow involved in the moarvm panic i'm experiencing 14:22
lizmat ok, I meant \r\n 14:23
m: say "\r\n".chars
camelia 1
AlexDaniel lizmat: and that also doesn't look any different to me 14:24
m: dd "\r\n"
camelia "\r\n"
AlexDaniel ah, it keeps it as \r\n
okay, then yeah, then this particular one is different :)
lizmat because it's a synthetic
jdv79 ah, yada yada - forgot 14:27
konvertex lizmat: nope, no hardcore string processing as of yet. Just some basic fizzbuzzy three-liners while going through the official nutshell docs to get a feel for the language. 14:33
lizmat 86M for raku -e '' seems to be the current state of affairs indeed 14:41
AlexDaniel konvertex: maybe code-golf.io/ to practice fizzbuzzy one-liners :)
lizmat m: use snapper 14:42
camelia Telemetry Report of Process #31366 (2020-05-07T14:42:09Z)
Number of Snapshots: 2
Initial/Final Size: 94860 / 95668 Kbytes
Total Time: 0.01 seconds
Total CPU Usage: 0.02 seconds
Supervisor thread ran the whole time

wallclo…
AlexDaniel e: use snapper
lizmat hmmm... that's a lot more that I see on MacOS:Initial/Final Size: 85260 / 85608 Kbytes
evalable6 Telemetry Report of Process #15517 (2020-05-07T…
AlexDaniel, Full output: gist.github.com/4f3876fecf727955af...2f65abb551
lizmat 368M ?? 14:43
AlexDaniel lizmat: yeah!
timotimo i get 77.8k
megs*
AlexDaniel lizmat: that's actually closer to what I see normally…
lizmat that's... weird
timotimo Initial/Final Size: 92656 / 93488 Kbytes 14:44
lizmat I would expect *some* difference, but a factor of 5 difference 14:44
jnthn What are these numbers, though?
lizmat RSS I think
jnthn Do they include, for example, mmap'd things that are shared?
timotimo snapper outputs 93488 and time reports 100808maxresident
konvertex 20mb shared.
AlexDaniel e: use snapper; use Telemetry; say T<max-rss> }
evalable6 (exit code 1) 04===SORRY!04=== Er…
AlexDaniel, Full output: gist.github.com/1a4c3b9f777b497b88...d1af09682d
AlexDaniel e: use snapper; use Telemetry; say T<max-rss>
evalable6 372744
Telemetry Report of Process #17670 (2020…
AlexDaniel, Full output: gist.github.com/c0790740bb23fe7fab...f39563d743
AlexDaniel e: say T<max-rss> 14:45
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/CsfTmSBcTF
Undeclared name:
T used at line 1
lizmat e: use Telemetry: say T<max-rss>
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/5Md6_PYyWE
Confused
at /tmp/5Md6_PYyWE:1
------> 03use Telemetry08⏏04: say T<max-rss>
AlexDaniel e: use Telemetry; say T<max-rss>
evalable6 379884
AlexDaniel m: use Telemetry; say T<max-rss>
camelia 89756
AlexDaniel hmmmmmmmmm
konvertex The 2019.03 in the fedora-30 repos gives me 180mb. So the situation is getting much better it seems.
tadzik I get "Maximum resident set size (kbytes): 81480" on Raku 2020.02, amd64 14:46
AlexDaniel lizmat: if I had to guess I'd say it's humongous .perl6 directory affecting it or something like that 14:46
AlexDaniel e: use BlahBlahBlah 14:47
evalable6 (exit code 1) 04===SORRY!04=== Er…
AlexDaniel, Full output: gist.github.com/54bf127270a88ccbb0...56de87926b
AlexDaniel nope, doesn't seem to be it 14:48
well then I don't know 14:49
lizmat e: use nqp; my int @a; nqp::getrusage(@a); dd @a[4] 14:51
evalable6 379968
lizmat ok, that's *without* loading any modules 14:52
m: use nqp; my int @a; nqp::getrusage(@a); dd @a[4]
camelia 83176
lizmat on MacOS I get: 77840
(MacOS reports that in bytes, so it needed a / 1024) 14:53
AlexDaniel e: use nqp; my int @a; nqp::getrusage(@a); dd @a[4] 14:56
evalable6 380008
AlexDaniel e: uptime
evalable6 AlexDaniel, 3 days, 5 hours, 12 minutes, and 29 seconds, 418.15625MiB maxrss. This is Rakudo version 2020.02.1-395-g2c9168b9a built on MoarVM version 2020.02.1-162-g3d8ff61e2 implementing Raku 6.d.
AlexDaniel committable6: HEAD use nqp; my int @a; nqp::getrusage(@a); dd @a[4]
committable6 AlexDaniel, ¦HEAD(de173a1): «345960␤»
AlexDaniel committable6: uptime
committable6 AlexDaniel, 3 days, 5 hours, 12 minutes, and 57 seconds, 384.414063MiB maxrss. This is Rakudo version 2020.02.1-395-g2c9168b9a built on MoarVM version 2020.02.1-162-g3d8ff61e2 implementing Raku 6.d.
AlexDaniel so we're seeing the memory usage of the bot itself? x) 14:57
should be even lower here
bisectable6: old=HEAD^,new=HEAD use nqp; my int @a; nqp::getrusage(@a); dd @a[4] 14:58
bisectable6 AlexDaniel, On both starting points (old=HEAD^ new=de173a1) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: «280424␤»
AlexDaniel bisectable6: uptime
bisectable6 AlexDaniel, 3 days, 5 hours, 14 minutes, and 20 seconds, 321.144531MiB maxrss. This is Rakudo version 2020.02.1-395-g2c9168b9a built on MoarVM version 2020.02.1-162-g3d8ff61e2 implementing Raku 6.d.
AlexDaniel yeah?
Geth doc/link-mod-snapper: 49697ff48a | (Stoned Elipot)++ | doc/Type/Telemetry.pod6
Fix link to snapper module
15:22
doc: stoned++ created pull request #3371:
Fix link to snapper module
15:23
Geth doc: 49697ff48a | (Stoned Elipot)++ | doc/Type/Telemetry.pod6
Fix link to snapper module
15:27
doc: 458282fe55 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Type/Telemetry.pod6
Merge pull request #3371 from Raku/link-mod-snapper

Fix link to snapper module
linkable6 Link: docs.raku.org/type/Telemetry
[Coke] don't think I've seen an idle kick before 15:35
Geth doc: 4b10d09362 | (Stoned Elipot)++ | Makefile
Clean up/improve Makefile

  - remove broken targets: 'bigpage', 'epub'
  - make 'html' target working again
  - update 'help' target "text"
  - remove now unneeded targets: 'clean-build', 'remove-build'
  - introduce 'clean-cache' target
... (10 more lines)
15:43
doc: f0bd244b57 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | Makefile
Merge pull request #3370 from Raku/rework-makefile

Clean up/improve Makefile
AlexDaniel [Coke]: that's a matrix user, so possibly specific to the matrix↔freenode bridge 15:47
it's still… weird 15:48
awwaiid is actualy active and recently submitted a ticket somewhere, IIRC
ctilmes_ MasterDuke: re making a CArray[uint8] from a Buf, since they are kind of the same thing, couldn't you just cheat and say nativecast(CArray[uint8], $buf);? You would have to be careful to hold the reference to avoid GC, but it could be faster for a huge Blob, right? 16:12
MasterDuke: and be careful not to read past the end of the array 16:13
MasterDuke ctilmes_: huh, didn't think of that. i don't actually know anything about NativeCall, i was just playing around with his question 16:14
MasterDuke hm. you can't nativecast in a loop? 16:18
m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b; for ^20_000 { $b = nativecast(CArray[uint8], $a) }; say $b.tail(4) 16:19
camelia Don't know how many elements a C array returned from a library
in method elems at /home/camelia/rakudo-m-inst-1/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 223
in method list at /home/camelia/raku…
MasterDuke m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b = nativecast(CArray[uint8], $a); say $b.tail(4)
camelia Don't know how many elements a C array returned from a library
in method elems at /home/camelia/rakudo-m-inst-1/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 223
in method list at /home/camelia/raku…
MasterDuke oh, it's the tail
m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b = nativecast(CArray[uint8], $a); say $b; say now - INIT now 16:20
camelia NativeCall::Types::CArray[uint8].new
0.0208762
16:20
MasterDuke m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b; for ^20_000 { $b = nativecast(CArray[uint8], $a); }; say $b
camelia NativeCall::Types::CArray[uint8].new
MasterDuke m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b; for ^20_000 { $b = nativecast(CArray[uint8], $a); }; say $b; say now - INIT now 16:21
camelia NativeCall::Types::CArray[uint8].new
0.118233
MasterDuke m: use NativeCall; my Buf $a .= new((^32).pick xx 256); my $b; for ^20_000 { $b = CArray[uint8].allocate(256); @$b = @$a }; say $b; say now - INIT now
camelia NativeCall::Types::CArray[uint8].new
3.86199688
melezhik how can I make zef not to load index from github? it keeps updating cpan mirror: raw.githubusercontent.com/ugexe/Pe...cpan1.json
melezhik even though I say `--/update --/depends` 16:22
AlexDaniel melezhik: github.com/Raku/Blin/blob/7d81839a...#L130-L151 16:23
MasterDuke Xliff: another option thanks to ctilmes_. `my Buf $a .= new((^32).pick xx 256); my $b = nativecast(CArray[uint8], $a);`. "You would have to be careful to hold the reference to avoid GC and be careful not to read past the end of the array" 16:24
tellable6 MasterDuke, I'll pass your message to Xliff
melezhik AlexDaniel: now sure what sould I do in terms of zef configuration ? 16:25
how can I alter zef config?
Geth doc/editorconfig: c98bca76e7 | (Stoned Elipot)++ | .editorconfig
Add EditorConfig file

ref [EditorConfig](editorconfig.org/) followup or may help #3349 #3280 ;-)
16:26
doc: stoned++ created pull request #3372:
Add EditorConfig file
16:27
AlexDaniel melezhik: hmm, I'm pretty sure that code snippet does exactly what you want
that is to turn auto-update feature off 16:28
AlexDaniel I don't know why --/update doesn't do it 16:28
melezhik yeah, will try, thanks
guifa2 o/ 16:59
jjmerelo Hey, guifa2 17:15
El_Che AlexDaniel: sent
AlexDaniel El_Che: huh? We already received it and sent you an invite to the org 17:16
El_Che ok, I just said 'I sent it' :)
melezhik yes, I finally "stole" a config from my machine and changed it, disabling autoupdate and the just `--config-path=...` 17:22
cc AlexDaniel:
AlexDaniel cool! 17:25
Geth ¦ problem-solving: JJ assigned to jnthn Issue Should raku --doc get a pager? github.com/Raku/problem-solving/issues/192 17:46
¦ doc: AlexDaniel unassigned from jnthn Issue Should raku --doc get a pager? github.com/Raku/doc/issues/3373 17:57
Geth doc/type-map-pasto: e513fe2de6 | (Stoned Elipot)++ | doc/Type/Map.pod6
Fix pasto in example comment

while here use "common" output style
18:02
doc: stoned++ created pull request #3374:
Fix pasto in example comment
18:03
suman p6: sub factorial(Int $x) { if $x < 0 { die "Cannot have factorial of negative number!" } elsif $x = 0 || $x = 1 { return 1 } else { return $x*factorial($x-1) }}put factorial(9); 18:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3{ return $x*factorial($x-1) }}7⏏5put factorial(9);
expecting any of:
infix
infix …
suman What is wrong with this function glot.io/snippets/fn7iyu5krr 18:05
MasterDuke suman: '=' should be '==' 18:09
suman MasterDuke Thank you. Worked ! 18:13
How can I test if a number is Int or Rat or Num? 18:14
AlexDaniel m: my $x; say $x ~~ $_ for (Int, Rat, Num) 18:15
camelia False
False
False
AlexDaniel m: my $x = 42; say $x ~~ $_ for (Int, Rat, Num)
camelia True
False
False
AlexDaniel m: my $x = 42.5; say $x ~~ $_ for (Int, Rat, Num)
camelia False
True
False
AlexDaniel m: my $x = 42.5e0; say $x ~~ $_ for (Int, Rat, Num)
camelia False
False
True
AlexDaniel m: my $x = 42.5e0; say $x.^name
camelia Num
AlexDaniel m: my $x = 42.5e0; say $x.WHAT
camelia (Num)
AlexDaniel m: my $x = 42.5e0; dd $x 18:16
camelia Num $x = 42.5e0
suman m: Num(3)
camelia ( no output )
suman m: is.Num(3)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
is used at line 1
AlexDaniel m: say Num(3)
camelia 3
AlexDaniel m: dd Num(3) 18:17
camelia 3e0
AlexDaniel hmm
timotimo what is it? 18:18
AlexDaniel timotimo: it's a Num
timotimo i see that :D
AlexDaniel :D 18:18
Geth doc: e513fe2de6 | (Stoned Elipot)++ | doc/Type/Map.pod6
Fix pasto in example comment

while here use "common" output style
18:19
doc: 41d64b7194 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Map.pod6
Merge pull request #3374 from Raku/type-map-pasto

Fix pasto in example comment
linkable6 Link: docs.raku.org/type/Map
AlexDaniel sourceable6: Num(42) 18:29
sourceable6 AlexDaniel, No idea, boss. Can you give me a Code object?
timotimo sourceable6: 42.Num 18:30
sourceable6 timotimo, github.com/rakudo/rakudo/blob/de17...nt.pm6#L62
timotimo m: class Bloop { method Num { say "hi" } }; Num(Bloop.new); Bloop.new.Num
camelia hi
hi
AlexDaniel okay 18:31
so can I do for example 18:32
m: say perl(42)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
perl used at line 1
AlexDaniel no such sub
m: class perl {}; say perl(42)
camelia 42
AlexDaniel m: class perl {}; say perl(1/3)
camelia <1/3>
timotimo yeah, only if a type by that name exists
suman is.Int, is.Num, is.Rat would be better to test in if-else statements 18:34
AlexDaniel so declaring a class automatically declares a sub that calls a method? :)
timotimo no
AlexDaniel m: given 42 { when Int { say ‘it's an int!’ }; when Num { say ‘it's a Num!’ } }
camelia it's an int!
AlexDaniel suman: ↑
timotimo it's actually calling the Num object
i think the fallback mechanism that is also used to invoke instances does this 18:35
check the $invoke_forwarder BOOTSTRAP.nqp in rakudo 18:37
MasterDuke m: my $x = 42.5; say $x ~~ Int | Rat | Num # AlexDaniel why not this way? 19:20
camelia True
AlexDaniel MasterDuke: sure, I just thought the idea was to differentiate between these 19:42
Geth doc/hash-assign-link: 4e8b446a8b | (Stoned Elipot)++ | doc/Type/Map.pod6
Fix reference to hash assignment documentation
19:50
doc: stoned++ created pull request #3375:
Fix reference to hash assignment documentation
19:51
Geth doc/hash-assign-link: aead46fcd2 | (Stoned Elipot)++ | doc/Type/Map.pod6
Remove an extraneous comma
20:28
doc/hash-assign-link: 5873887ed6 | (Stoned Elipot)++ | doc/Type/Map.pod6
Reformat for 72 columns
AlexDaniel timotimo: github.com/rakudo/rakudo/issues/3674 21:26
timotimo why would you do that? :D :D :D 21:26
timotimo s/perl6/raku/ ;) ;) 21:27
AlexDaniel timotimo: I submitted a bug report because I noticed that it is slower 21:28
x)
AlexDaniel timotimo: and yeah, fixed, that's the first time I use `raku` shebang though 21:32
I kinda forgot that `raku` is already available
Geth doc: 87e2726c9b | Coke++ | 7 files
track .perl > .raku

  ... except in the perl method example itself, where it's ok
For #3309
21:35
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
Geth doc/code-block-raku: 6a0e048c35 | (Stoned Elipot)++ | 2 files
Process Pod code block with lang:<raku>
21:49
doc: stoned++ created pull request #3376:
Process Pod code block with lang:<raku>
21:50
doc: 4df76887ab | Coke++ | 12 files
track .perl > .raku

  ... except in the perl method example itself, where it's ok
For #3309
21:53
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
Geth ecosystem/matiaslina-patch-1: c355c7b2b3 | (Matias Linares)++ (committed using GitHub Web editor) | META.list
Matrix::Client moved to CPAN
23:37
ecosystem: matiaslina++ created pull request #492:
Matrix::Client moved to CPAN
23:40