🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
[Coke] .ask jj can we close doc#3644 - rakudoc is out there and installable, and we've not been called p6doc for ages. 00:00
tellable6 [Coke], I haven't seen jj around, did you mean cj?
Geth Raku-Steering-Council/main: f19dc50ade | (Elizabeth Mattijsen)++ | announcements/20210624.md
24 June 2021 update on Raku Steering Council status
10:24
lizmat aka: github.com/Raku/Raku-Steering-Coun...0210624.md
gfldex Discrod bridge test. 11:33
lizmat
.oO( don't let lightning strike! )
11:35
gfldex Discrod bridge test.
:-/ still ends up in the wrong Discord server. 11:36
lizmat meh
Altreus definitely not an API::Discord problem ... probably maybe
gfldex Discrod bridge test. (Or I start crying!) 11:40
OK, It helps to kill the right process. What a relief!
You lot need to be civil now, the young folk over on Discord can hear what you say! 11:41
lizmat welcome Discord folks! 11:42
Altreus So we still haven't entirely resolved the issue where the heartbeat stops but there is no disconnection 11:45
jnthn helped us out and we thought it was gone
But there appears to be some sort of edge case where, eventually, it just stops receiving events
more bots = more data
maybe we'll figure it out
gfldex I have a PR up to start cleaning up debugging. I would like to have a build in web server to be able to dig around in data structures at runtime. 11:47
Altreus kane showed me a PR last night but I'd already given up and gone to bed 11:51
I'm hoping to have the time and energy to actually do my stream tonight and I might as well start with that
kawaii_ someone said my name 11:52
Altreus na 11:53
nobody here
kawaii_ gfldex: your PR goes a long way to helping us clean up the log output which has been on our list of things for a while now, but the number of things you chose to hide from the output is a little heavy handed imo, such as hiding when disconnects and reconnects happen - which seems like something a bot developer would want a record of without having debug logging active 11:57
for sure though the heartbeats themselves should be hidden away :) 11:58
Altreus yeah those things are still on because see above, but having a simple switch to turn it off seems good 11:59
kawaii_ an internal webserver when debug mode is on sounds handy though 12:01
but we shouldn't clutter this channel with discussion about our module :P
gfldex It's very easy to switch them on. Once you do you can .wrap the two functions and do some filtering. 12:07
Altreus jnthn suggested using Log::Timeline but I've not managed to construct sufficient understanding 12:13
melezhik . 15:13
Altreus , 15:25
_ed ; 15:33
tbrowder howdy 16:11
m: my $a=1.02e-4; say $a.Real 16:12
camelia 0.000102
tbrowder m: my $a=1.02e-5; say $a.Real 16:15
camelia 1.02e-05
tbrowder is there any way to coerce $a above into showing more than 6 decimal places without a formatting object? 16:16
m: my $a=0.0000007 16:17
camelia ( no output )
tbrowder m: my $a=0.0000007; say $a 16:18
camelia 0.0000007
tbrowder m: my $a=7e-7; say $a 16:19
camelia 7e-07
tbrowder m: my $a=7e-7; say $a.Real 16:20
camelia 7e-07
tbrowder the answer: 16:26
m: my $a=1.02e-8; say $a.base(10,*); 16:27
camelia 0.00000001
tbrowder hm, not the answer...lost the last 2 digits 16:28
tbrowder m: say pi.base(10,*) 16:29
camelia 3.14159265
tbrowder m: say pi.base(10,50):0; 16:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say pi.base(10,50):7⏏050;
expecting any of:
colon pair
tbrowder m: say pi.base(10,20); 16:31
camelia 3.14159265358979311600
tbrowder m: my $a=1.02e-9; say $a.base(10,20) 16:32
camelia 0.00000000102000000000
moon-child tbrowder: somebody hacked something with MONKEY-TYPING, I think; it was in a github issue somewhere 16:37
tbrowder thnx, i'll check irc logs 16:38
moon-child m: use MONKEY-TYPING; augment class Num { multi method gist(Num:D: --> Str) { self.base(10, 20); } }; say 1.02e-6;
camelia 0.00000102000000000000
tbrowder ok, thnx! 16:54
moon-child (aside: it occurs to me that you can use monkey typing to implement typeclasses properly) 16:57
(hmm, no, not properly. You could have name conflicts. I don't think there's a way around that)
littlebenlittle[ How do you properly dispatch to an inherited method? Is it something like `class A { method f() { 0 } }; class B is A { method f() { self.A::f() + 1 } }` 17:18
gfldex m: class A { method m { say 'A' } }; class B is A { method m { self.A::m() } }; B.new.m; 17:21
camelia A
guifa yup .Parent::method() <-- must use parenthetical too IIRC 17:22
littlebenlittle[ Hm, okay then I need to dig deeper. Thanks
moon-child easier, more general solution: 17:24
m: class A { method m { say 'A' } }; class B is A { method m { callwith } }; B.new.m;
camelia A
Od1n hello 19:20
gfldex lolibloggedalittle: gfldex.wordpress.com/2021/06/24/typed-filters/ 19:49
m: say „Hello Od1n!“; 19:50
camelia Hello Od1n!
raydiak gfldex++ I like your blog 21:02
(even though every time I look at it I can't stop staring at the extra space character in the title)
tbrowder hi, need some expert help for creating a test 21:43
i have a string list of method names for numbers and want to add them to a () something like this: 21:45
($value).$method <== i want this to execute as (value.method) 21:48
or (value).method
MasterDuke $value."$method" 21:49
raydiak need the parens too for that form 21:50
tbrowder thnx...will report back soon
raydiak m: my $m = 'say'; 'foo'."$m"() # the calling parens, I mean. parens around the invocant in your question are optional if I understand what you're asking correctly 21:52
camelia foo
tbrowder yes, and i'm getting close, but not quit there yet. in yr example i want to do this 21:59
:m (1.25).Int 22:00
ugexe m: say (1.25)."Int"()
camelia 1
tbrowder yes 22:01
m: my $val = 1.25; say $val."Int"() 22:02
camelia 1
moon-child note also that if it doesn't have to be a string, you can just 22:06
m: my $method = Int; say 1.25.$method
camelia 1
tbrowder ok, let me try another... 22:10
m: class f {method foo {say 1}}; my $f = f.new; my $meth = foo; say $f.$meth 22:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
ugexe my $meth = "foo"
tbrowder m: class f {method foo {say 1}}; my $f = f.new; my $m = "foo"; say $f.$meth 22:15
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$meth' is not declared
at <tmp>:1
------> 3}; my $f = f.new; my $m = "foo"; say $f.7⏏5$meth
moon-child m: class F {}; my method foo { say 1 }; my $meth = &foo; say F.new.$meth; 22:16
camelia 1
True
moon-child err, that should be
m: class F {}; my method foo(F:) { say 1 }; my $meth = &foo; say F.new.$meth;
camelia 1
True
raydiak m: class f {our method foo {say 1}}; my $f = f.new; my $meth = f::<&foo>; say $f.$meth # or our-scope the method inside the package 22:17
camelia 1
True
moon-child oh yea that's definitely better
tbrowder m: class f {method foo {say 1}} ; my $f = f.new; my $meth = "foo"; say $f.$meth 22:19
camelia No such method 'CALL-ME' for invocant of type 'Str'
in block <unit> at <tmp> line 1
moon-child whelp, byee 22:20
raydiak big split... 22:22
big split... 22:23
raydiak m: class f {method foo {say 1}}; my $f = f.new; my $meth = "foo"; say $f."$meth"() # if you use strings, you still have to do it with the quotes and the parens 22:23
raydiak oh right, bots aren't back yet 22:23
camelia 1
True
22:23
raydiak heh, thanks camelia++ :) 22:24
tbrowder ok, got it working in my test, lets see if i can demo...slowly now... 22:29
tbrowder m: class f is Num { method foo {self.Int}}; my $f = f.new(1.25); my $meth = "foo"; say $f."$meth"() 22:34
camelia 1
tbrowder MasterDuke: thnx
raydiak: thnx
ugexe: thnx
moon-child: thnx 22:35
weird stuff, but Raku can do anything!!!
moon-child anything can do anything! Welcome to turing equivalence :)
raydiak for some value of "anything". I like the Raku version of that a lot more than, say, Brainfuck... 22:37
moon-child watch for my raku implementation written in brainfuck 22:38
raydiak I'll let my grandchildren know to keep an eye on your progress :D 22:39