🦋 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:08 johnjohn101 joined
tbrowder pheix: thnx, that's my vote also 00:39
tellable6 tbrowder, I'll pass your message to pheix
01:11 tellable6 left, evalable6 left 01:14 tellable6 joined, evalable6 joined 01:22 sena_kun left 01:24 Tirifto left 01:37 sena_kun joined 01:49 kalkin- joined 01:50 Xliff left 01:53 kalkin left 02:05 mahmudov left 02:35 johnjohn101 left 02:39 johnjohn101 joined 02:47 vrurg_ joined 02:48 vrurg left 03:01 wamba joined 03:17 guifa2 joined 03:23 sena_kun left 03:38 sena_kun joined
cpan-raku New module released to CPAN! Sparrow6 (0.0.11) by 03MELEZHIK 03:50
04:07 guifa2 left 04:21 guifa2 joined 04:26 guifa2 left 04:29 guifa2 joined 04:37 guifa2 left 04:53 ZzZombo_ joined 04:56 ZzZombo left 04:57 ZzZombo__ joined, ZzZombo__ is now known as ZzZombo 04:59 ZzZombo_ left 05:09 RobRaku joined 05:17 wamba left 05:22 sena_kun left 05:38 sena_kun joined 05:49 johnjohn101 left 05:58 Kaiepi left 05:59 Kaiepi joined 06:04 Kaiepi left 06:05 Kaiepi joined 06:18 Kaiepi left, Kaiepi joined 06:20 Kaiepi left 06:21 Kaiepi joined 06:57 RobRaku left 06:59 RobRaku joined 07:20 cpan-raku left 07:21 cpan-raku joined, cpan-raku left, cpan-raku joined 07:23 sena_kun left 07:39 sena_kun joined 08:32 rindolf joined 08:37 xinming_ joined 08:40 xinming left 09:18 sena_kun left 09:33 sena_kun joined 09:40 mahmudov joined 10:03 RobRaku left 10:16 RobRaku joined 10:30 holyghost left, holyghost joined 10:34 veesh left 10:38 pilne left 11:04 kalkin- left 11:12 kalkin- joined 11:22 eir0 is now known as eiro 11:23 sena_kun left 11:36 RobRaku left 11:38 wamba joined, sena_kun joined 11:47 kensanata joined 12:17 pheix joined 12:21 RobRaku joined 12:44 kensanata left 12:45 sena_kun left 12:49 chloekek joined 12:53 wamba left 12:57 pheix left 12:58 mahmudov left
xinming_ SmokeMachine: ping 13:03
!seen SmokeMachine
SmokeMachine xinming_: pong 13:05
xinming_ SmokeMachine: Is multi column relationship implemented in 0.1? 13:08
SmokeMachine Never tried... bu I think it should work 13:10
xinming_: ^^ 13:11
13:11 sena_kun joined 13:12 RobRaku left
xinming_ SmokeMachine: Do we have example for this? 13:13
Also, something like model A { has B @.many is column{ :references{B.a-id} } }; model B { has A $.a is column{ :references{A.id} }; }; $a-row.many.^create: ... 13:17
the $a-row.many.^create doesn't work yet, now I use something like, $a-row.WHAT.of.^create: ...
hmm, sorry, 2 months of no writing code, the code is not correct. just the ideas 13:20
13:22 sena_kun left 13:23 chloekek left 13:24 chloekek joined 13:37 sena_kun joined 14:10 mahmudov joined 14:19 Kaeipi joined 14:20 Kaiepi left 14:23 Kaeipi left 14:24 Kaiepi joined 14:29 lucasb joined
cpan-raku New module released to CPAN! Gnome::GObject (0.15.7) by 03MARTIMM 14:32
SmokeMachine xinming_: www.irccloud.com/pastebin/6VwUjDE5/ 14:35
14:44 vrurg joined 14:46 vrurg_ left 14:50 AlexDaniel left, vrurg_ joined 14:52 vrurg left 15:22 sena_kun left
cpan-raku New module released to CPAN! WebService::AWS::S3 (0.0.3) by 03BDUGGAN 15:33
15:36 chloekek left 15:38 sena_kun joined 15:46 RobRaku joined 16:12 mahmudov left 16:14 mahmudov joined 16:20 mahmudov left 16:22 mahmudov joined 16:25 mahmudov left 16:27 mahmudov joined 16:44 zeylos left 16:46 zeylos joined 16:49 kensanata joined 16:54 wamba joined, Kaiepi left 16:55 Doc_Holliwood joined 16:58 Kaiepi joined 16:59 RobRaku left, zeylos left
cpan-raku New module released to CPAN! CSS (0.0.2) by 03WARRINGD 17:19
17:24 sena_kun left 17:32 kensanata left 17:33 kensanata joined 17:38 gabiruh joined 17:39 holyghost left, holyghost joined, sena_kun joined 17:42 zeylos joined 18:02 finanalyst joined 18:20 vividsnow joined 18:24 pilne joined 18:25 Doc_Holliwood left 18:28 lucasb left 18:30 finanalyst left 18:31 kensanata left 18:42 Poohman joined
Poohman hello all 18:43
Is there any simple ways to use prompt and ensure the only the correct type is entered 18:44
sena_kun while not check-validness(prompt('Insert a value: ')) { say "Too bad!" }? 18:47
Poohman Hi sena_kun - let me read about check-validness 18:51
18:51 jmerelo joined
jmerelo Hi 18:52
tellable6 2019-12-23T19:35:01Z #raku <kalkin-> 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
2019-12-23T20:13:46Z #raku <Kaiepi> jmerelo, i'll get the post scheduled
2019-12-23T20:18:56Z #raku <Kaiepi> jmerelo, oh mb didn't see the emails
jmerelo .tell kalkin- we all need more magic :-)
tellable6 jmerelo, I'll pass your message to kalkin
Poohman do we get to specify the type
jmerelo .tell Kaiepi OK :-)
tellable6 jmerelo, I'll pass your message to Kaiepi
jmerelo I've just published a closing post for this year's advent calendar rakuadventcalendar.wordpress.com/
We've had around 8000 visits, which is quite good. 18:53
During this month, the old Advent Calendar at perl6advent.wordpress.com had 2k visits
Also, this time last year the old AC gathered 16k visits 18:54
Still, not bad for the first time ever, new URL, no incoming search engine queries or links...
But if you don't mind, I'm going to make some changes for next year.
Main change will be that there will be no slots assigned from scratch, the editor (me or whoever) will assign the publishing slots as they are available. 18:55
Also, I'd like to have all, or most, articles available by Dec 1st. 18:56
lizmat seems a fair goal :-)
jmerelo Which I also did this year but, well, I didn't have mine ready and it was assigned for the 6th, so, well...
Anyway, I think that not assigning a day and giving the same deadline for everyone will allow for easier scheduling. 18:57
Nobody that was not an author did notice, but there was a fair amount of rescheduling in the background so that there would be an article ready every day
Also, tbrowder had to write an extra article, for which I'm quite grateful. 18:58
I will also ask everyone to send me an email (one that people actually read) or any other way of contacting, like matrix or telegram, so that I can start to ask for articles by the middle of August 18:59
is
I meant, ish.
Anyway, thanks a lot to everyone who's written an article this year or any of the others. 19:00
You can still edit it, categorize it, add the 2019 tag and maybe fix something if you so want. 19:01
Linking the official documentation will be specially helpful
We also need help with the CSS edition. Tom Browder also paid for the premium site, so it will be really helpful if we make it seem really nice. 19:02
Since tbrowder paid, we also have a free domain we can use.
Changing it in the middle of the season seemed a bit confusing, but we can do it now.
Please send suggestions to tbrowder
Poohman m: say "test" 19:03
camelia test
jmerelo .tell tbrowder what about simply raku-advent-calendar.org for a domain?
tellable6 jmerelo, I'll pass your message to tbrowder
19:04 Doc_Holliwood joined
Poohman m: my $line = 12; if ($line.Numeric.does(Numeric)) {my $amt = $line} else {say "Wrong input"} 19:07
camelia ( no output )
Poohman m: my $line = "Twelve"; if ($line.Numeric.does(Numeric)) {my $amt = $line} else {say "Wrong input"}
camelia Wrong input 19:08
lizmat raku-advent-calendar.blog # JJ ?? 19:09
.org is becoming suspect
jmerelo lizmat: ah, right, I forgot that. Please tell tbrowder
lizmat .tell tbrowder perhaps raku-advent-calendar.blog ?
tellable6 lizmat, I'll pass your message to tbrowder
Geth_ advent: d4643bdf0a | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | raku-advent-2020/schedule
Changing the call for articles

Please @tbrowder and @nige123 check that next year we are not going to have fixed slots; the editor will schedule them when they are ready, and they will need to be ready by midnight December 1st 2020.
19:10
advent: 273918329b | (JJ Merelo)++ | 2 files
Markdownizes
19:12
advent: 4dab55630f | (JJ Merelo)++ | 2 files
Changes to real name
jmerelo releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. There are no known blockers. 0 out of 300 commits logged
jmerelo, Details: gist.github.com/4575ef3b90d381976d...c7e0f5343a
19:19 Tirifto joined 19:23 sena_kun left 19:24 chloekek joined 19:26 sauvin left 19:38 sena_kun joined, jmerelo left
Poohman m: my $line = "2019-12-26"; Date.new($line).does(Date); 19:46
camelia ( no output )
Poohman m: my $line = "Test"; Date.new($line).does(Date);
camelia Invalid Date string 'Test'; use yyyy-mm-dd instead
in block <unit> at <tmp> line 1
19:46 RobRaku joined
Poohman m: my $line = "2019-12-26"; Date.new($line); 19:47
camelia ( no output )
Poohman m: my $line = "Test"; Str.new($line).does(Str);
camelia Default constructor for 'Str' only takes named arguments
in block <unit> at <tmp> line 1
chloekek Really nice that you can put overloads of MAIN in different source files. 19:51
lizmat Poohman: what is wrong with: 19:52
dd Date.new('2019-12-26')
evalable6 Date.new(2019,12,26)
lizmat m: my $line = "2019-12-26"; say Date.new($line); 19:53
camelia 2019-12-26
Poohman Hi Lizmat, im trying to map all my members to one sanitising function which will make sure the user input matches my member types 19:54
lizmat that could mean many things :-) 19:55
Poohman The condition i have been using till now is $line.Str.does(Str) or $line.Numeric.does(Numeric)
lizmat so you want to see if something is a Str or Numeric ? 19:56
Poohman Str, Numeric, Date etc - based on the type of my member
lizmat $line ~~ Str ?? 19:57
Poohman ok let me make some checks to see if I can make that work with Date as well 19:59
as simple as that? thanks
chloekek Got a nice commit hash: ffffff1 20:05
lizmat
.oO( wtfffff1 )
chloekek What a lucky number to be allocated to Raku code. 20:07
Is it possible to enable rakudo profiling using an environment variable instead of a command-line argument? 20:30
I have various bash scripts wrapping my program (to set other environment variables, such as PERL6LIB and PATH), so shoving in that extra command-line argument before the Raku source file name would be inconvenient. 20:31
lizmat perhaps github.com/perl6/nqp/blob/master/d...artprofile is what you're looking for 20:33
but there is no env variable atm
20:38 dakkar joined
dakkar p6: my Positional $x=Array.new; # ok, nothing specal 20:38
camelia ( no output )
dakkar p6: my Positional[Str] $x=Array[Str].new; # ok, this works 20:39
camelia ( no output )
dakkar p6: my Positional[Str:D] $x=Array[Str:D].new; # uh?
camelia Type check failed in assignment to $x; expected Positional[Str:D] but got Array[Str:D] (Array[Str:D].new())
in block <unit> at <tmp> line 1
dakkar is that some bootstrapping special case? should that work?
chloekek lizmat: Thanks! MoarVM::Profiler class also seems relevant. 20:40
lizmat yeah, that still needs a lot of work, though :-) 20:41
dakkar even stranger: 20:44
p6: Array[Str:D] ~~ Positional # ok
camelia ( no output )
dakkar p6: Array[Str:D] ~~ Positional[Str] # ok, covariant
camelia ( no output )
chloekek lizmat: also seems like generating HTML is tricker with manually invoking these routines.
dakkar p6: Array[Str:D] ~~ Positional[Str:D] # uh?
camelia ( no output )
chloekek lizmat: I’ll just insert the flag.
dakkar p6: say Array[Str:D] ~~ Positional # ok
camelia True
dakkar p6: say Array[Str:D] ~~ Positional[Str] # ok, covariant 20:45
camelia True
dakkar p6: say Array[Str:D] ~~ Positional[Str:D] # uh?
camelia False
lizmat chloekek: yeah, that seems to be the easiest way to shave that yak
dakkar lizmat: do you have any insight on my strange type mis-match? 20:46
cpan-raku New module released to CPAN! Sparrowdo::Chef::Client (0.1.0) by 03MELEZHIK
lizmat dakkar: alas, no
dakkar I'll have to wait for some other raku-expert, then ☺ 20:47
lizmat yeah, jnthn comes to mind 20:49
dakkar I *think* it's a bug, but those bits are declared in BOOTSTRAP and that's a bit too obscure for me 20:54
lizmat it's obscure for a lot of people :-( 20:57
dakkar is it even possible to declare a parametric class type? 21:01
lizmat yes, by adding a ^parameterize method ? 21:02
21:02 RobRaku left
lizmat see how object / typed Hashes are implemented 21:02
chloekek … and running into github.com/perl6/nqp/issues/567 again :') 21:05
chloekek is going to look into fixing that 21:06
21:06 RobRaku joined
lizmat ++chloekek 21:07
dakkar lizmat: I can't find any mention of `parameterize` in the documentation… 21:09
lizmat well, that warrants a doc ticket then
lemme see if I can create a gist 21:10
dakkar I found a method by that name in ParametricRoleHOW
(the source)
lizmat m: class A { method ^parameterize(|c) { dd c } }; A[Int].new
camelia \(A, Int)
lizmat m: class A { method ^parameterize(|c) { dd c } }; A[1,2,3,4].new 21:11
camelia \(A, 1, 2, 3, 4)
dakkar ok, so ::A has a metaclass that's not ClassHOW, but a subclass of it with a redefined / extra method?
lizmat dakkar: it is supposed to return the mixed in type, according to the given parameters (and your logic) 21:12
yeah, that's basically what the 'method ^foo() { }' does, as I understand it
m: class A { method ^parameterize(|c) { dd c } }; dd A[1,2,3,4].new 21:14
camelia \(A, 1, 2, 3, 4)
Nil
dakkar role Foo[::X] { }; class Bar { method ^parameterize(Any:U $type, *@) { return Bar but Foo[$type] } }; dd Bar[Str].new; 21:17
evalable6 Bar+{Foo[Bar]}.new
dakkar role Foo[::X] { }; class Bar { method ^parameterize(Any:U $type, *@) { return Bar but Foo[$type] } }; dd Bar[Str] ~~ Foo[Str];
evalable6 Bool::False
dakkar uh?
21:17 cpan-raku left
Poohman m: my $line = "2019-12-26"; Str.new($line); 21:17
camelia Default constructor for 'Str' only takes named arguments
in block <unit> at <tmp> line 1
Poohman m: my $line = "2019-12-26"; Date.new($line); 21:18
camelia ( no output )
lizmat Poohman: m: is NOT a REPL, you need to e.g. 'say' it
m: my $line = "2019-12-26"; say Date.new($line);
camelia 2019-12-26 21:19
21:19 cpan-raku joined, cpan-raku left, cpan-raku joined
lizmat m: my $line = "2019-12-26"; dd Date.new($line); # or use 'dd', which may give clearer output 21:19
camelia Date.new(2019,12,26)
Poohman Ok Lizmat, but why does Str.new($line) not work - conversely what does the error regarding named arguments mean? 21:20
lizmat first of all, using Str.new to create a string, is really a lot of writing 21:21
in Raku one usually uses the prefix ~ for that
m: dd ~42
camelia "42"
lizmat in Raku, when you create a class, it's "new" method will only accept named parameters
m: class A { has $.foo = 42 }; dd A.new( foo => 666 ) 21:22
camelia A.new(foo => 666)
lizmat m: class A { has $.foo = 42 }; dd A.new( 666 )
camelia Default constructor for 'A' only takes named arguments
in block <unit> at <tmp> line 1
21:22 sena_kun left
lizmat Poohman: if you really want to create strings the hard way, you could do it like this: 21:23
m: dd Str.new(value => 42)
camelia "42"
21:23 wildtrees joined 21:24 wildtrees left 21:25 wildtrees joined
Poohman Thanks 21:26
21:27 wildtrees left 21:28 wildtrees joined 21:38 sena_kun joined
dakkar lizmat: github.com/rakudo/rakudo/issues/3383 at least it's recorded 21:42
also github.com/Raku/doc/issues/3132 21:52
21:52 veesh joined
dakkar and with this, I've raku'd enough for tonight ☺ 21:53
21:53 dakkar left 22:08 RobRaku left 22:38 chloekek left 22:44 Xliff joined
Xliff o/ 22:44
Merry Day-After-XMas, #raku! 22:45
El_Che 4 years and 1 day anniversary 22:46
tellable6 2019-12-17T20:53:04Z #raku-dev <patrickb> El_Che The rakudo-pkg releases are missing the files in rakudo-repo/tools/binary-release/Linux.
hey El_Che, you have a message: gist.github.com/410216f79e32f3d693...ea06e66ec2
22:46 wamba left 22:49 rindolf left, chloekek joined
Xliff El_Che: Really? Nice! 22:50
El_Che releasable6: status
releasable6 El_Che, Next release will happen when it's ready. There are no known blockers. 0 out of 300 commits logged
El_Che, Details: gist.github.com/cd4b9756959f434921...8dcbd4d322
chloekek Last release of 2019? 22:54
Or first release of 2020? :þ 22:55
23:04 Kaeipi joined, Kaiepi left
Xliff m: 'þ'.uniname.say 23:07
camelia LATIN SMALL LETTER THORN
Xliff Oh I need to Compose that...
m: 'þ'.chr.fmt('%x').say
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5þ' (indicated by ⏏)
in block <unit> at <tmp> line 1
Xliff m: 'þ'.ord.fmt('%x').say
camelia fe
Xliff 23:08
\o/
chloekek++
chloekek Ever since enabling the compose key I’ve been using that smiley. 23:14
Xliff The Compose key rules!
chloekek Also added rules for 「」 ([[ and ]]) for Raku string literals.
Xliff Ooh!
Those are good Texas Alt choices. 23:15
chloekek And I can type ‘’ outside of my editor now too.
Xliff chloekek: How good are you with the MOP?
chloekek 0% good. 23:16
Xliff Heh. OK.
No worries.
I'm just trying to figure out why some MOP code I wrote isn't getting executed.
chloekek I want to learn though.
Post the code. 23:17
Xliff github.com/Xliff/Method-Also/blob/...so.pm6#L38
Trying to make aliases work in roles. Classes are working just fine. Just roles are not.
Particularly where a role defines a proto.
Oh ... wanna see something semi-neat? 23:18
chloekek Sure.
Xliff github.com/Xliff/p6-GtkPlus/blob/m...-build.pl6 23:19
I have 1284 compunits in that project.
If I run through the optimized build list here: github.com/Xliff/p6-GtkPlus/blob/m.../BuildList 23:20
It takes around 3200 seconds to compile.
Using that first script I can get that down to 1400 seconds.
chloekek Build in parallel.
Xliff :)
chloekek I’m using Cro and it also takes a long time to build. 23:21
Like five seconds.
Xliff Ooh! What are you using Cro for?
ppft! 5 seconds? I'll take that any day.
chloekek I have a SQLite database with Raku archive metadata and I have a web app that searches it with Cro::HTTP. 23:22
Xliff I've got several single compunits that take around 30 seconds to precompile.
SQLite? Interesting.
Have you checked the performance of that against something like MySQL? 23:23
chloekek I have not used MySQL. I am very familiar with PostgreSQL. SQLite is easier to set up.
23:23 sena_kun left
chloekek I could switch to PostgreSQL but I don’t need it for this project. 23:23
Xliff Ah. I have worked with both MySQL and SQLite3.
Sounds like a cool project. Is there a repo? 23:24
I want to write a web framework based on Cro::WebApp. Just don't know what to put into it... 23:25
I think I have a way to add scope limited routes to the main object. 23:26
Think: extensibility
23:36 sena_kun joined 23:41 chloekek left 23:44 sena_kun left