🦋 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.
00:00 sjaveed joined 00:54 dmc00 joined 00:58 Grinnz left 00:59 zostay left, zostay joined, Grinnz joined 01:11 molaf left 01:13 ThaEwat left, suzusime[m] left, unclechu left, renormalist left, phogg left 01:19 __jrjsmrtn__ joined 01:21 _jrjsmrtn left 01:22 molaf joined 01:33 hungrydonkey joined 01:38 hungryd19 joined 01:39 hungrydonkey left 02:03 hungryd19 left 02:04 Manifest0 left 02:06 Manifest0 joined
xinming_ timotimo: Yea, I do think it's recursion, I just don't know Red enough to track this issue. 02:26
02:59 aborazmeh left 03:08 BenGoldberg left
AlexDaniel timotimo: well, the difference between gmp and libtommath is actually rather small, sure we can win some % but nothing crazy 03:10
timotimo: but what I am interested in seeing is using gmp's rational numbers, if that's possible
m: my $x = 1; for ^10_000_000 { $x += 2 }; say $x; say now - INIT now
camelia 20000001
AlexDaniel m: my $x = 1.5; for ^10_000_000 { $x += 2 }; say $x; say now - INIT now
camelia 20000001.5
AlexDaniel my understanding is that these will become roughly the same 03:11
now, yes, of course it will turn raku-ish implementation into a call to the vm, which is unfortunate in some sense 03:12
most of rakudo isn't written in raku anyway, so doesn't really matter IMO 03:13
04:08 evalable6 left, linkable6 left 04:10 linkable6 joined, evalable6 joined 04:41 aborazmeh joined, aborazmeh left, aborazmeh joined 04:52 frot-lab joined 04:55 sjaveed left 04:57 sjaveed joined 04:59 sjaveed left, sjaveed joined 05:13 frot-lab left 05:21 frot-lab joined
xinming_ How do we add break point in source code, so raku-debug can be triggered please? 05:24
parabolize xinming_: I've been away a while and I'm having trouble finding anything called raku-debug. There is a builtin Backtrace: docs.raku.org/type/Backtrace 05:42
05:45 ex_nihilo left 05:58 BenGoldberg joined
xinming_ parabolize: Thanks 06:25
06:27 frot-lab is now known as hungrydonkey 06:32 BenGoldberg left 06:48 aluaces joined 06:56 skids left 07:04 SmokeMachine left 07:22 SmokeMachine joined 07:29 sena_kun joined 07:30 k-man left 07:43 kylese joined 08:26 xelxebar left, xelxebar joined
hungrydonkey m: say 0.99.base(2) 08:26
camelia 0.11111101
hungrydonkey m: say 0b101001 08:27
camelia 41
hungrydonkey m: say 0b1001.11
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> 3say 0b1001.7⏏0511
hungrydonkey m: say (0.99.base(2)).base(10)
camelia No such method 'base' for invocant of type 'Str'. Did you mean any of
these: 'asec', 'Bag', 'Date', 'hash'?
in block <unit> at <tmp> line 1
08:27 k-man joined
hungrydonkey I can convert decimal(0.99) to binary(0.11111101), but how can I convert binary(0.11111101) to decimal? 08:31
Is there a way to express a decimal as a binary literal? 08:34
08:35 ThaEwat joined, suzusime[m] joined, unclechu joined, phogg joined 08:54 molaf left
kylese hungrydonkey, I not sure ... but ... may be :2(((.99).base(2))) ? 08:56
hungrydonkey kylese Yeah, it works. 09:08
@kyl 09:09
kylese hungrydonkey, your are welcome 09:10
09:24 BenGoldberg joined 09:33 Black_Ribbon left 09:40 Altai-man joined 09:43 sena_kun left 09:45 Sgeo left 09:57 BenGoldberg left 10:11 timeless left, leont joined, timeless joined 10:16 k-man_ joined 10:18 k-man left 10:24 k-man__ joined 10:25 k-man_ left 10:28 wamba joined 10:29 wamba left, k-man__ left 10:32 caasih left 10:34 caasih joined 10:35 k-man__ joined
tbrowder g'day Raku brothers and sisters. i hope there is peace in the valley today! 10:54
10:58 mowcat joined
tbrowder docs are a little fuzzy on routine 'clone'. does a clone of an existing class object provide an exact copy of its attributes? 11:05
m: class F{has @.f is rw = 1,2;}; my $a = F.new; my $b = $a.clone; say $a.gist; say $b.gist 11:08
camelia F.new(f => [1, 2])
F.new(f => [1, 2])
tbrowder m: class F{has @.f is rw};my $a = F.new;$a.f.push(1); my $b = $a.clone; say $b.gist 11:12
camelia F.new(f => [1])
tbrowder m: class F{has %.f};my $a = F.new;$a.f<z> = 10; my $b = $a.clone; say $b.gist 11:14
camelia F.new(f => {:z(10)})
Altai-man tbrowder, there are number of exceptions (like for Array or Match), but for basically everything else that is derived from Mu `clone` is shallow.
Or so the docs say, at least.
tbrowder that's my point: docs, as in many cases, doesn't start with the defs, it starts with weird exceptions and caveats. 11:16
is a hash an array?
in perl yes, but i thought in raku it's not quite the same 11:18
but i assume a class object with other class objects as attributes need their own clone methods. 11:19
so it looks 11:20
disregard, pls 11:21
safest for complex classes is to have their own clone methods 11:22
but good to know both @ and % with "value" types clone nicely. 11:23
probably why i can assign one @ or % to another without a problem 11:24
m: class F{@.f is rw;}; my @a[0] = F.new; @a[0].f.push(6); my @b = @a; say @b.gist; @b = @a.clone; say @b.gist 11:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable @.f used where no 'self' is available
at <tmp>:1
------> 3class F{@.f7⏏5 is rw;}; my @a[0] = F.new; @a[0].f.push
expecting any of:
tbrowder m: class F{has @.f}; 11:29
camelia ( no output )
tbrowder m: class F{has @.f is rw}; my @a[0] = F.new; @a[0].f.push(6); my @b = @a; say @b.gist; @b = @a.clone; say @b.gist 11:32
camelia Illegal dimension in shape: 0. All dimensions must be integers bigger than 0
in block <unit> at <tmp> line 1
tbrowder arg! going to my own host for a while... 11:33
well, i was able to successfully clone an array of class objects with each having value arrays, so cloning actually looks quite reliable so far 11:49
11:49 k-man joined 11:51 k-man__ left
tbrowder well OOPS. cloning is not what i want. it appears to be equivalent to binding, at least for class objects. so $b := $a and whatever i do to $b also changes $a. i just want a copy of $a's state at some point and don't want to affect $a at all when i modify $b 12:06
back to my module's drawing board... 12:07
shameless plug follows: 12:24
i have been working on a Raku spreadsheet solution for (1) reading spreadsheets of various popular formats (csv, ods, xsl, xslx), (2) writing the data out as either csv or xlsx, (3) xlsx output will have the format of either an input xlsx template or programmatic input by a text input file of some yet-to-be determined format(s). 12:31
if that would scratch anyone's itch, i would appreciate feedback on the project. 12:33
at the moment i'm calling the module "Spreadsheets" 12:34
12:38 stoned75 joined, molaf joined
tbrowder of course you will be able to use 2x2 arrays of data from any other source you use to generate it. the csv input is one way to do that. 12:43
i mean MxN not 2x2 12:46
codesections I don't have an immediate need for that module, but I'd be happy to take a look at the code – it sounds interesting 12:47
12:49 BenGoldberg joined 12:57 rindolf joined
Geth doc/seq-new: 5fcd836c5c | (Stoned Elipot)++ | doc/Type/Seq.pod6
Fix typo
doc/master: 4 commits pushed by (Stoned Elipot)++ 13:00
13:09 mowcat left 13:23 BenGoldberg left 13:41 sena_kun joined 13:43 Altai-man left
tbrowder @ 13:44
codesections: thnx, the module is at <github.com/tbrowder/Spreadsheets>. the real working code at the moment is the file "dev/dump-fils.raku" 13:48
13:50 hungrydonkey left, wamba joined
xinming_ SmokeMachine: I'm trying to narrow down that bug, Seems pretty close 13:50
13:50 BenGoldberg joined 14:02 Kaiepi joined
Geth doc: 4e5c63b19f | (Stoned Elipot)++ | doc/Type/Cool.pod6
no need to link to self
linkable6 Link: docs.raku.org/type/Cool
14:14 aborazmeh left, aborazmeh joined, aborazmeh left, aborazmeh joined
xinming_ IIRC, there is a feature which allows people to supress output of block of code in raku, What is that please? 14:19
14:20 k-man left
xinming_ quitely 14:20
codesections I was about to say that, but afaik that just suppresses warnings, not all output 14:21
xinming_ codesections: Yea, doesn't supress $*ERR.say
Hmm, the Yea means "No" in English, Sorry, Chinglish :-) 14:23
14:24 dogbert17 joined 14:32 k-man joined
xinming_ SmokeMachine: termbin.com/yras <--- This is the farthest I can get, It might be caused by lazy initialization of Red::Column. The recursion happens in the code `func filter` in grep method of ResultSeq.pm6 14:35
14:36 woodi joined
xinming_ hmm, actually, in Red/PrepareCode.pm6 the line `my $ret = func type;` caused the recursion 14:37
[Coke] You can provide an override to $*ERR that captures all the output and discards it if you need. 14:39
something like github.com/Raku/roast/blob/master/...ngle.t#L26 14:41
El_Che ok, new release I hear
no dot releases after?
xinming_ [Coke]: Thanks 14:43
14:44 kylese left
[Coke] wonders if it would be useful to put that into a module and add a keyword. 14:46
.oO( silently )
El_Che building the new release, hoping for no build failures :) 14:56
xinming_ I just now upgraded. 14:59
SmokeMachine: This bug is also in latest rakudo. 15:00
15:11 BenGoldberg left 15:12 BenGoldberg joined 15:16 stoned75 left 15:20 guifa left 15:23 aluaces left, stoned75 joined
Geth doc: 75a5c04f4a | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Seq.pod6
mention the sequence operator

while here document the various way to build a Seq at the start of the document.
doc: cfcdc0c511 | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | doc/Type/Seq.pod6
Fix typo
linkable6 Link: docs.raku.org/type/Seq
ecosystem/master: 4 commits pushed by (Haytham Elganiny)++, (Juan Julián Merelo Guervós)++ 15:37
xinming_ SmokeMachine: BTW, I just found, that when we add use Red:api<2> on top of the M file, It worked fine. Hope my discovery can help you pinpoint the bug ;-) 16:14
16:23 cooper joined
SmokeMachine xinming_: Thank you very much for your help, I still hadn't time to look at that... :( do you think that could be related to it? github.com/FCO/Red/issues/100 16:24
16:25 wamba left
xinming_ SmokeMachine: Yea, I think that's the bug, But the strange thing is, When we access the column once within .grep({ }); everything will be fine again 16:29
16:34 wamba joined 16:51 aborazmeh left
Geth ecosystem: hythm7++ created pull request #544:
Add Pakku::Meta and Pakku::RecMan::Client
17:14 aluaces joined
timotimo xinming_: if you have a bit extra time, you could try getting a stack trace at a random point where it's been growing too much 17:19
xinming_: you can use rakudo-gdb-m (if you've got a gdb, that is) and just ctrl-c when you've noticed it started growing (i guess almost immediately?)
hopefully you have a moarvm with debug symbols, in that case you can look in "bt" for a "tc=0x..." and then "call MVM_dump_backtrace(0x...)" 17:20
17:23 wamba left 17:24 wamba joined
SmokeMachine xinming_: I think I couldn't reproduce: usercontent.irccloud-cdn.com/file/.../image.png 17:28
xinming_: let me update my rakudo
17:34 wamba left 17:40 Altai-man joined 17:43 sena_kun left 17:49 sjaveed left, sjaveed joined 17:50 wamba joined 17:54 sjaveed left 17:56 sjaveed joined
Geth ecosystem: 91be16881e | (Haytham Elganiny)++ | META.list
Add Pakku::Meta
ecosystem: 21c840dd74 | (Haytham Elganiny)++ | META.list
Add Pakku::RecMan::Client
ecosystem: 23fa6f87df | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #544 from hythm7/master

Add Pakku::Meta and Pakku::RecMan::Client
codesections weekly: www.codesections.com/blog/raku-manifesto/ 18:09
notable6 codesections, Noted! (weekly)
lizmat reads 18:10
18:11 Sgeo joined 18:16 ezzieyguywuf joined
El_Che weekly: lizmat, linux pkgs are being built now, so ready for the weekly 18:21
notable6 El_Che, Noted! (weekly)
lizmat El_Che++
El_Che Altai-man++ and everyone++: no fails this time 18:23
Altai-man \o/ 18:41
El_Che++ patrickb++ for fixes and tests 18:42
Altai-man closes github.com/rakudo/rakudo/issues/3824
El_Che oh certainly
he has been a rock fixing quite a lot of building stuff
18:45 rir joined
El_Che ok, pkgs released. Thx Altai-man and devs! 18:47
tbrowder codesections: great post! 18:51
codesections Thanks :) 18:53
tbrowder but i wish raku had a prettifier for the docs
codesections What would you like it to do?
tbrowder i'm all in on timtoady but, for new ppl, some easier syntax might be helpful. 18:55
but yr post highlights exactly why i've thought from my first raku contact it's the best lang for intro to noob programmers 18:57
timotimo github.com/timo/rakudo-appimage/re...ag/2020.09 - anybody want to try 2020.09 as AppImage? 19:00
notable6: weekly github.com/timo/rakudo-appimage/re...ag/2020.09
notable6 timotimo, Noted! (weekly)
19:02 xelxebar left, xelxebar joined
El_Che codesections: what is the difference between your Raku manifesto and a Perl one? 19:32
(or Ruby for that matter)
(devil's advocate and all that) 19:33
codesections El_Che: That's a good question. The _true_ answer is that I don't really know – I've hardly written any Ruby, and I've basically never written Perl 19:36
I _think_ of Ruby as more of an "easy to learn" vs "rewarding mastery" language, but that might not be right 19:37
MasterDuke timotimo: works for me 19:38
El_Che ruby is pretty much perl with a better OO system
Grinnz and less sysadmin-ness
El_Che anyway, my point is that it's pretty much what Perl has been selling for decades 19:41
I am sure Grinnz agress :) 19:42
codesections Well, when I get to "powerful code over unsurprising code", I'll talk a bit about operator overloading/custom operators. My understanding is that the support for both in Perl and Ruby is somewhat limited, which holds them back on "powerful code", at least in my book
Grinnz they're similar ideas sure, i don't think that's a bad thing to share with perl though ;) 19:43
codesections But, yeah, in general I wouldn't think that Ruby or Perl's _goals_ are all that different from Raku's (I just think we get closer to achieving those goals, imo)
El_Che Peboth ruby and perl support operator overloading, although it's easier in raku
Grinnz perl does not support custom operators at all, so that is one thing
El_Che codesections: there are goals and there are justifications for warts :) 19:44
19:44 aindilis left, cpan-raku left
El_Che Grinnz: really? 19:45
codesections In contrast, go, rust, java, typescript, and (sort of) python seem to have pretty different goals – I think that, even if we all had perfect execution, we'd want to make really different tradeoffs 19:46
Grinnz people have come up with hacks to kind of do it, but nothing that i would call "support"
El_Che www.foo.be/docs/tpj/issues/vol4_3/...-0012.html <-- 1999
Grinnz overloading yes
you can't invent new operators
(symbolic ones anyway)
El_Che thatś the second part of codesections point
Grinnz also, overloading is primarily intended to extend the existing behavior of an operator to work with objects; when you use it to do more custom stuff it wasn't intended for, you sort of lose the warranty 19:47
not that there aren't prominent modules that do this *cough IO::All* 19:48
19:49 cpan-raku joined, cpan-raku left, cpan-raku joined
Altai-man 2c: I am not really convinced Raku is "just perl but with custom ops" even when playing Devil's advocate. There were decades between designing one and another and if you ask me, Raku has a lot of stuff (regexps-grammars, MOP, huffmanization, concurrency to name a few) that are baked in. Technically, you can do most of those things in other languages, but that would be trying to make a ferrari out of a tracktor. Technically you can tune it to some degree 19:50
and it will be kinda sorta, but this won't be "native" feature like Raku has.
Grinnz just the whole parser itself is very much better designed and extensible, yes
operators would just be one demonstration of this
Altai-man I mean, the snipped one can write in 50 lines in Go and be like WOW CONCURRENCY CHANNELS SO COOL can be written in 50 or something characters in Raku. Technically both have concurrency, but it's almost like Raku takes it to 11. 19:51
s/snipped/snippet/ 19:52
codesections Altai-man: yeah, even without knowing Perl, I wouldn't say Raku is "just Perl with custom ops". The interesting question – and one I don't know enough about Perl to answer – is whether Perl and Raku are *aiming* at the same place, and Raku just gets there better (imo). Or are they aiming at different goals?
Grinnz i don't think there's one answer to that, both languages have many goals
codesections True, of course :) 19:53
Grinnz and some goals one or the other clearly finds more important
Altai-man codesections, never wrote anything in perl, and I'd probably break heart for a lot of people if I start to say what I think about this whole story, so no comments. :) 19:54
El_Che back
like codesections suggests: what it aims to be and not how good it delivers 19:55
Altai-man: the baked-in stuff helps with the readibility stuff by --ironically-- providing a single way to do it instead of non-core modules or ad hoc code 19:56
timotimo i tried to do a bit of bash scripting recently and was annoyed by the magical variables it has; i'm glad raku got rid of most of the sigil + symbol variables in favor of variables with names in them 19:57
El_Che "3. Powerful code over unsurprising code" can be still readable code 19:58
and good names help
codesections El_Che: yeah, agreed. I think Raku can be _very_ readable. But part of the question is "readable to whom"? Maximizing for readability in the first 5 minutes someone spends on a project is different from maximizing for readability after someone has grokked the style/idioms that code uses 20:00
El_Che yeah, but surprising code can be painful 20:01
stoned75 does GLOBAL.^find_method() can find a sub ? 20:04
moritz no 20:05
a sub is not a method
references to subs are usually stored in lexical scopes
stoned75 ah of course! 20:06
moritz m: sub f() { }; say ::('&f')
camelia &f
stoned75 thanks!
moritz my pleasure
m: say CORE::('&floor)'
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in indirect name; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3say CORE::('&floor)'7⏏5<EOL>
moritz m: say CORE::('&floor')
camelia Sub+{is-pure}.new
20:09 rindolf left
stoned75 hum... sub symbols are in CORE but sub objects are in GLOBAL ? Do I make sense ? 20:16
Geth ecosystem: hythm7++ created pull request #545:
Add Pakku::RecMan
20:29 smotchkkiss joined
Geth doc: fb7604e844 | (Stoned Elipot)++ | doc/Type/Metamodel/MROBasedMethodDispatch.pod6
linkable6 Link: docs.raku.org/type/Metamodel::MROB...odDispatch
Geth doc/core-is-std-raku: 773fecd631 | (Stoned Elipot)++ | doc/Language/packages.pod6
Perl -> Raku
doc: stoned++ created pull request #3654:
Perl -> Raku
20:59 aindilis joined 21:01 ggoebel__ left
Geth doc: 773fecd631 | (Stoned Elipot)++ | doc/Language/packages.pod6
Perl -> Raku
doc: 9176a7afb9 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/packages.pod6
Merge pull request #3654 from Raku/core-is-std-raku

Perl -> Raku
linkable6 Link: docs.raku.org/language/packages
21:09 mark[m]1 left
JJAtria[m] firefox 21:09
tellable6 2020-09-26T07:01:43Z #raku <jmerelo> jjatria it's the first time I've seen a META6.json like this gitlab.com/jjatria/raku-termbox/-/...META6.json Where did you find the specs for that?
2020-09-26T07:21:28Z #raku <jmerelo> jjatria forget my previous question.
21:09 wamba left
JJAtria[m] Oops, not a search bar I guess :P 21:09
21:20 Altai-man left 21:21 smotchkkiss left 21:23 smotchkkiss joined 21:26 stoned75 left 21:30 smotchkkiss left 21:34 codesections left 21:50 stoned75 joined 21:51 skids joined
parabolize m: say .signature for &floor.candidates 21:55
camelia ($a)
(Numeric $a)
(num $a --> num)
22:06 vike left 22:15 aluaces left 22:18 ^Sauvin^ is now known as Sauvin 22:20 leont left
tbrowder hi, i just left the San Franciso Perl's Raku Study Group's weekly Zoom session and was pleased to see Bruce Gray there as well as Bill Michels and our host Joe Brenner. if interested, checkout the invitations on the perl6 users mailing list. it was almost like a perl conf (but only virtual beer). mtg time is 2100 europe time so you night owls might enjoy it. 22:43
i understand codesections usually hangs out there, too 22:44
it was my first time and i plan to attend more often 22:46
22:47 ex_nihilo joined 23:04 dominix joined
dominix hi everyone 23:05
tbrowder hey
dominix is a there a dockerfile for raku a bit more up to date than dockerhub ?
I am on clear Linux and docker seems the only way to go, but on dockerhub rakudo-star is 2020.01 23:06
tbrowder don't know for sure. tony-o used to have a "nightly that was updated nightly
dominix thanks for pointing me at raku 2020.09 on docker (I don't care to reinstall all modules) 23:07
tbrowder but i haven't used it since leaving travis
dominix ware is that ?
tbrowder i'm changing to using mi6 to manage my module and github-actions seem to work with it well. 23:08
23:08 stoned75 left
tbrowder i'm working on using it but with my own docker image of choice and so i could use tony-o's again. 23:09
or my own maybe. i'm just starting to realize how cool docker is. 23:11
hm, i don't remember recommending raku on docker...i go formrakudo-pkg 23:14
23:15 stoned75 joined
tbrowder *use rakudo-pkg 23:15
dominix: why do you use clear linux? 23:26
23:31 MilkmanDan left 23:32 MilkmanDan joined 23:42 ggoebel joined 23:44 codesections joined