🦋 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:02 Kaiepi left 00:03 Kaiepi joined, Actualeyes left 00:07 guifa2 left 00:11 guifa2 joined 00:37 Kaiepi left, Kaeipi joined 00:40 sena_kun joined 00:41 Altai-man_ left 00:42 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 00:57 hungrydonkey joined 00:59 Kaeipi left 01:00 Kaeipi joined 01:08 Kaeipi left 01:09 Kaiepi joined 01:11 guifa2 left, guifa2 joined 01:13 rbtca is now known as rbt 01:16 rbt is now known as rbtca 01:17 guifa2 left, rbtca left, rbtca joined 01:20 rbtca left, rbtca joined 01:21 hungrydonkey left 01:23 Kaiepi left, Kaiepi joined 01:24 rbtca is now known as rbt 01:25 hungrydonkey joined, aborazmeh joined, aborazmeh left, aborazmeh joined, rbt is now known as rbtca 01:33 hungrydonkey left 01:34 aborazmeh left 01:47 hungrydonkey joined 01:54 kst joined 02:11 guifa2 joined, rbtca left, rbtca joined 02:13 caterfxo left 02:21 poohman joined 02:35 hungrydonkey left 02:37 hungrydonkey joined 02:39 Altai-man_ joined 02:42 sena_kun left 03:30 poohman left 03:51 MasterDuke left 03:54 poohman joined 03:57 pilne left, poohman left 04:01 Kaiepi left 04:02 Kaiepi joined 04:27 Actualeyes joined 04:32 molaf joined 04:40 sena_kun joined 04:42 Altai-man_ left
Demos[m] What;s the difference between a parameter Mu ::Type and Mu:U $type? 04:43
04:57 lichtkind joined 05:02 sauvin joined
guifa2 Mu ::Type captures the type of the object, regardless of whether it's defined or not 05:33
Mu:U $type requires you to pass an undefined object
m: sub foo(Mu ::Type) { say Type}; foo 2; foo Int; 05:34
camelia (Int)
guifa2 m: sub foo(Mu:U $type) { say $type }; foo Int; foo 2 05:35
camelia (Int)
Parameter '$type' of routine 'foo' must be a type object of type 'Mu', not an object instance of type 'Int'. Did you forget a 'multi'?
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 Mu is implied though, since it's the root class. You can just use foo(::Type) and foo(:U $type)
Also, since the ::Type is a type capture proper, you can then use it in the signature: 05:36
m: sub foo(::Type, Type:D $a) { say "$a is a defined ", Type }; foo 2, 4; foo 'a', 4 05:38
camelia 4 is a defined (Int)
Type check failed in binding to parameter '$a'; expected Str but got Int (4)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 Demos[m]: ^^ hope that helps. Note that in both cases, you can s/Mu/Foo and require the type to be a subclass of Foo or to be of role Foo. And lastly, when you say foo(::T, T $a, T $b), it's really short hand for foo(::T $, T $a, T $b), which might help make the distinction of what's going on clearer 05:42
05:43 Kaiepi left, Kaiepi joined 05:45 xelxebar left 05:47 xelxebar joined
Demos[m] hmm I had trouble with method foo(SomeType ::Type --> Type:D) 05:49
05:49 colomon left
Demos[m] return typecheck always failed 05:49
does ::T $ just say that the variable has scalar context?
sorry .... there are a lot of symbols and lots of ways to arrange them 05:50
Demos[m] sent a long message: < matrix.org/_matrix/media/r0/downlo...dcAOCEOYkg > 05:51
05:59 colomon joined
Demos[m] I wish comma had a "what the heck is this" button :D 05:59
06:15 andrzejku joined 06:39 Altai-man_ joined 06:41 sena_kun left 06:44 vrurg_ joined 06:48 vrurg left 06:53 imcsk8 left 06:55 imcsk8 joined 07:16 hungrydonkey left 07:24 hungrydonkey joined
Geth_ doc: 90f8d3b6aa | (Ben Davies)++ | 4 files
Document Metamodel::DefiniteHOW
doc: f5f3265ea4 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 4 files
Merge pull request #3318 from Kaiepi/metamodel-definitehow

Document Metamodel::DefiniteHOW
07:33 rindolf joined, abraxxa joined 07:37 abraxxa left 07:38 abraxxa joined 07:48 MasterDuke joined, hungrydonkey left 07:54 aborazmeh joined, aborazmeh left, aborazmeh joined 07:56 hungrydonkey joined 08:02 lichtkind left
cpan-raku New module released to CPAN! Gnome::Gtk3 ( by 03MARTIMM 08:14
08:17 chloekek joined
chloekek p6: sub f(:@xs) { say @xs }; f(xs => <a>); 08:17
camelia Type check failed in binding to parameter '@xs'; expected Positional but got Str ("a")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
chloekek p6: sub f(:@xs) { say @xs }; f(:xs<a>);
camelia Type check failed in binding to parameter '@xs'; expected Positional but got Str ("a")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
chloekek p6: sub f(:@xs) { say @xs }; f(xs => «a»); 08:18
camelia Type check failed in binding to parameter '@xs'; expected Positional but got Str ("a")
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
MasterDuke p6: sub f(:@xs) { say @xs }; f(xs => ("a",)); 08:24
camelia (a)
08:39 rbtca left 08:40 rbtca joined, sena_kun joined 08:41 natrys joined, Altai-man_ left 08:53 ensamvarg joined 09:10 Actualeyes left 09:11 Actualeyes joined
Geth_ doc: 203673a138 | (Ben Davies)++ | doc/Type/Metamodel/DefiniteHOW.pod6
Correct an example's output in the Metamodel::DefiniteHOW docs
linkable6 Link: docs.raku.org/type/Metamodel::DefiniteHOW
09:33 aborazmeh left 10:06 Skarsnik joined
Skarsnik Hello. is there a place to write test for... the Test module? x) 10:07
lizmat in the rakudo repository I guess ? 10:11
I think there are some tests for the Test module there already
10:13 aborazmeh joined, aborazmeh left, aborazmeh joined 10:19 expon joined
Skarsnik hm t/01-sanity/99-test-basic.t look like this is the place x) 10:19
expon i wrote a silly little sequence to make a list of before/after padding, but it doesn't terminate: (0;n), -> [$b,$a] {($b+1;$a-1)} … (n;0) 10:27
it does seem to smartmatch though, so i'm not sure why it's not terminating
10:29 hungrydonkey left 10:39 Altai-man_ joined 10:42 sena_kun left
lizmat expon: could you make an issue with an example of the code that doesn't do what you want? 10:42
expon lizmat: i can do that later sure, but the code above should be a decent example for any n > 0, as i think it should terminate logically :p 10:43
the raku github issues i assume? been a while
lizmat yes, please 10:44
it will help tremendously if people can just copy/paste to see the (wrong) result and not have to reason about it up front
expon i understand 10:45
lizmat ++expon
chloekek When people put "version": "*" in their META6.json, what does that mean? 10:50
How is it to be compared against other versions?
p6: say '*'.Version <=> '1.2.3'.Version 10:51
camelia Less
chloekek p6: say '*'.Version <=> '0'.Version 10:52
camelia Less
chloekek p6: say '*'.Version «cmp« ('*', '0', '1.2.3')».Version 10:53
camelia (Same Less Less)
chloekek So it seems to be less than all other versions.
* is asciibetically less than 0, so that’s convenient. 10:58
10:58 Black_Ribbon left
expon lizmat: done, #3612, hope that's appropriate 11:00
i have to run in a few seconds so apologies i haven't done any debugging or written more detail
lizmat expon++ 11:01
stay safe!
expon i just wear my perl6 tshirt and everyone stays away from me ☺
lizmat :-)
andrzejku hello people how raku is doing? 11:30
11:37 Success joined 11:42 abraxxa left
lizmat andrzejku: pretty good, not bad, I can't complain 11:43
.oO( sorry about the John Prine reference )
11:45 rindolf left 11:47 abraxxa joined
andrzejku fine, I plan one day to back to perl6 11:49
11:51 abraxxa1 joined
lizmat andrzejku: eh, it's called raku now... going back to perl6 is eh... not looking forward 11:52
11:52 abraxxa left 11:53 rindolf joined 11:55 abraxxa1 left 11:56 abraxxa joined
Success i forget but i thought i saw where you could add custom infixes; in this case it would be equally effective for a builtin 'or' or 'xor' sorry i didn't thoroughly read the dox recently 11:59
maybe im just looking for token thanks yall 12:00
12:00 abraxxa left 12:02 aborazmeh left
cpan-raku New module released to CPAN! Gnome::Gtk3::Glade ( by 03MARTIMM 12:07
12:09 pecastro joined
Skarsnik tricky, how I test if a test fail as a success; lives-ok { is ... } obviously generated a failed test xD 12:25
Success you wot m8
12:25 mowcat joined 12:28 Xliff left 12:30 stoned75 left 12:40 sena_kun joined 12:41 tadzik left 12:42 Altai-man_ left, rbtca left, rbtca joined 12:43 caterfxo joined 12:44 tadzik joined
cpan-raku New module released to CPAN! Excel::Text::Template (0.0.1) by 03TBROWDER 13:09
13:10 mowcat left 13:15 pilne joined
Skarsnik lizmat, Chaning stuff in Test is a bit like NC, since it's probably not part of the spec, you never know how far you want to change stuff. kinda annoying IMO (especially NC) 13:16
13:20 andrzejku left 14:02 lucasb joined 14:03 stoned75 joined, pilne left 14:05 pilne joined 14:08 pilne left 14:11 pilne joined 14:22 stoned75 left 14:28 vike left 14:33 [Sno] left 14:35 [Sno] joined 14:39 Altai-man_ joined 14:40 gordonfish left 14:41 sena_kun left 14:44 gordonfish joined 14:59 xinming_ joined 15:01 xinming left 15:11 xinming_ left 15:13 xinming_ joined 15:21 wamba joined 15:23 Success left, Success joined 15:25 wamba left 15:26 wamba joined 15:34 molaf left 15:42 chloekek left 15:44 stoned75 joined 15:48 wamba left 15:51 Success left, Success joined 15:54 xinming_ left, xinming_ joined 15:57 lichtkind joined 16:04 wamba joined 16:08 xinming_ left, stoned75 left 16:09 xinming_ joined 16:11 cpan-raku left 16:13 cpan-raku joined, cpan-raku left, cpan-raku joined, chloekek joined 16:18 wamba left 16:20 wamba joined 16:27 stoned75 joined 16:28 wamba left 16:29 wamba joined 16:40 sena_kun joined 16:42 Altai-man_ left 16:46 rbtca left, xinming_ left, rbtca joined, xinming_ joined 17:05 guifa2 left 17:09 dwarring left
chloekek I found that Cro::HTTP has a very large startup time, including the library causes the app to take several seconds to launch. Are there alternative HTTP server libraries? 17:14
17:15 xinming_ left 17:17 xinming_ joined 17:21 Tirifto joined 17:23 cognominal joined 17:27 cognomin_ left 17:30 Hexeratops joined 17:34 MasterDuke left
[Coke] I'm not aware of any that have similar scope or support 17:35
modules.raku.org/search/?q=http - there is, e.g. HTTP::Server::Tiny 17:36
17:37 MasterDuke joined 17:38 wamba left 17:41 guifa2 joined
guifa2 Demos[m]: It does seem that a captured type can't be used for a type check, that feels buggy 17:44
chloekek [Coke]: I wonder how tricky it would be to use a PSGI server with Inline::Perl5. 17:45
Probably breaks horribly with preforking.
guifa2 m: sub foo(::T $bar, --> T) { $bar }; foo 5;
camelia Died with X::TypeCheck::Return
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
guifa2 m: sub foo(::T $bar, --> T) { say "$bar is a {T}"; $bar }; foo 5; 17:46
camelia Use of uninitialized value of type Int in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
5 is a
in sub foo at <tmp> line 1
Died with X::TypeCheck::Return
in sub foo at <tmp> li…
guifa2 m: sub foo(::T $bar, --> T) { say "$bar is a ", T; $bar }; foo 5; 17:47
camelia 5 is a (Int)
Died with X::TypeCheck::Return
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
17:47 kybr left, Alchemy joined 17:48 kybr joined 17:49 daemon left, Alchemy is now known as daemon 17:52 guifa2 left 17:56 wamba joined
chloekek [Coke]: I’ll use CGI for now, can swap it out later. :) 17:58
CGI is suuuuuuper easy.
Just make sure you don’t accidentally write to stdout anywhere lmao. Luckily can just my $*OUT := $*ERR;
17:59 matiaslina left, wildtrees[m] left, BlackChaosNL[m] left, awwaiid left, benkolera left, APic left, tobs left, ssm left 18:01 dwarring joined
El_Che it's the startup time important? 18:03
18:03 wildtrees[m] joined, matiaslina joined, benkolera joined, awwaiid joined, BlackChaosNL[m] joined, APic joined, tobs joined, ssm joined
chloekek It’s annoying when developing and changing stuff, having to wait ten seconds before I can test something. 18:04
El_Che for developing, ok
chloekek In production it’s also annoying due to downtime, but this can be fixed by keeping the old version running and switching port numbers in the reverse proxy configuration. 18:05
El_Che container that are only reachable once the health check passes 18:06
that's what we doe with java stuff
18:07 Success left, Success joined
El_Che when developing I mostly run the applicable tests, this limits wainiting time (in general, not only raku) 18:09
chloekek Yeah I’m editing mustache templates and css
I should probably set up something for loading them dynamically
18:10 mowcat joined, stoned75 left
Geth_ doc: 920e3853ba | (JJ Merelo)++ | p6doc.iml
Changes Comma configuration
doc: d4939578c5 | (JJ Merelo)++ | 2 files
IO::Path filetests do not cache results refs #2632
doc: dd62c55f65 | (JJ Merelo)++ | doc/Language/regexes.pod6
Warning about old word boundary markers in regexes #2632
linkable6 DOC#2632 [open]: github.com/Raku/doc/issues/2632 [Hacktoberfest][RFE][big][docs][good first issue][help wanted][new][⚠ Top Priority ⚠] Checklist for 6.d
Link: docs.raku.org/language/regexes
doc: e3550209e6 | (Ben Davies)++ | doc/Type/Attribute.pod6
Mention :D types in the documentation for the "is required" trait
doc: 56d61192cd | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Attribute.pod6
Merge pull request #3301 from Kaiepi/is-required-smileys

Mention :D types in the documentation for the "is required" trait
  (Missed this before, sorry)
linkable6 Link: docs.raku.org/type/Attribute
doc: 622a8c5901 | (Ben Davies)++ | doc/Type/Parameter.pod6
Document how `is raw` behaves with slurpy list parameters
doc: 828ca82032 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Parameter.pod6
Merge pull request #3279 from Kaiepi/slurpy-is-raw

Document how `is raw` behaves with slurpy list parameters
linkable6 Link: docs.raku.org/type/Parameter
cpan-raku New module released to CPAN! Red (0.1.6) by 03FCO 18:34
[Coke] should the *iml file be checked in? 18:36
18:38 wamba left 18:39 Altai-man_ joined
El_Che no 18:41
(if you're talking about intellij)
18:42 sena_kun left
El_Che I add it with idea/ to my .gitignore 18:43
18:46 AlexDani` joined 18:48 AlexDaniel left
[Coke] it's for comma, which I think is based on that. 18:59
Maybe a PR for Raku/doc is in order to remove it. 19:00
El_Che yes, Comma is intellij. It good to have these kind of things in .gitignore with *.sw? for vim 19:02
[Coke] I tend to prefer putting editor specific stuff locally rather than in the repo, but my opinion isn't that strong 19:08
19:12 Success left 19:13 Success joined 19:33 xinming_ left 19:34 xinming_ joined 19:47 k-man joined 19:48 k-man__ left
chloekek If you put it in the repo then as time approaches infinity, so will the number of .gitignore entries. 19:51
19:59 lucasb left, stoned75 joined
Demos[m] why do I loose the value of attributes initialized via "new" when I mixin a role? 20:02
20:12 Black_Ribbon joined 20:22 xinming_ left 20:23 xinming_ joined, vrurg_ is now known as vrurg 20:31 dwarring left
chloekek Demos[m]: can you give an example? 20:37
20:38 aborazmeh joined, aborazmeh left, aborazmeh joined 20:40 sena_kun joined 20:42 Altai-man_ left 20:45 caterfxo left 20:49 rbtca left, rbtca joined 20:56 Success left 20:57 Success joined 21:06 xinming_ left, xinming_ joined 21:09 stoned75 left, MasterDuke left 21:10 rbtca left, rbtca joined 21:11 Actualeyes left 21:16 rindolf left 21:17 cognomin_ joined 21:18 xinming_ left, xinming_ joined 21:19 Hexeratops left 21:20 cognominal left 21:24 molaf joined 21:27 chloekek left 21:43 natrys left, pilne_ joined, pilne left 21:55 aborazmeh left 22:03 holyghost left 22:06 xinming_ left 22:07 xinming_ joined 22:20 MasterDuke joined 22:31 __jrjsmrtn__ joined 22:32 _jrjsmrtn left, Success left 22:34 chloekek joined 22:36 pilne_ left 22:37 pilne joined 22:38 sena_kun left
chloekek p6: say 'كرم' 22:51
camelia كرم
chloekek Typing Arabic into the terminal is really weird because the cursor moves LTR whereas the text is rendered RTL 22:52
And editing text in the middle is basically unusable, there are probably terminals out there that do it better though 22:54
22:54 mowcat left 23:04 Success joined 23:07 lichtkind left 23:24 Tirifto left 23:33 hallobois joined, hallobois left 23:41 aborazmeh joined, aborazmeh left, aborazmeh joined 23:42 pecastro left