🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:00 reportable6 left 00:02 reportable6 joined 00:08 melezhik left
[Coke] rf: I am guessing it's agressively cached at the moment. 00:35
rf Yeah most likely, it's all good. I am about to make this typegraph look so good :D
[Coke]: Can you take a look at the PR and see if it looks good? I can also make it use the colors for the light theme as well. 00:56
01:04 xinming__ left 01:06 ispyhumanfly joined, xinming__ joined 01:16 ispyhumanfly left 01:29 sargassosea33 joined 01:33 sargassosea33 left 02:04 razetime joined 02:14 ispyhumanfly joined 02:17 jgaz left 02:23 ispyhumanfly left 02:30 nine left, m_athias left, ispyhumanfly joined, nine joined 02:31 m_athias joined 02:35 ispyhumanfly left
tonyo rf: zef is stricly on the install side, fez is on the distribute side. so, maybe fez can eventually provide hints to zef via META or some configuration file. that's a long time out if ever. fez started as a means to get dists into an ecosystem with strict auth checking. that ecosystem started as a means of mirroring tags from the META listing on github (the original ecosystem that panda was built 02:36
for).
CPAN came along and then we lost the very manual process of looking at author's metas in the META list (by the end that didn't happen much) when new people submitted PRs. i think the next iteration of fez takes over more than packaging and uploading.. doing more than a cursory once over of the META file, adding dependencies (lock files?), handling distribution to different ecosystems or an interface
to do so, no more shelling out tar/pax/git commands for bundling, probably some level of automation (thinking of yarn in this regard, just `fez <some command>` being made available via META/config settings), automated static docs, and probably more things along those lines 02:37
ziprecruiter uses perl in production, i wrote all of the raley's POS log ETL to SAP HANA in perl5 too 02:39
and then some of their statistics scripts are all written in p5 02:40
02:56 ispyhumanfly joined 03:10 ispyhumanfly left
rf tonyo: Do you work for ziprecruiter still? 03:21
03:21 rf left 03:22 heartburn left 03:23 heartburn joined 03:24 ispyhumanfly joined 03:28 Kernspin joined, ispyhumanfly left
tonyo i don't 03:35
i work for a place called tatari in python mainly. before that i worked for a failed startup and godaddy before that
(in go for the startup and then on a perl to python conversion and C for godaddy) 03:36
before that statistics and data modelling, and before that on the fixed wing fast bois (military jets) 03:37
04:23 kybr left, kybr joined 04:49 jmcgnh left 04:50 jmcgnh joined 05:04 Homer_Simpson left 05:18 ispyhumanfly joined 05:26 ispyhumanfly left 05:40 ispyhumanfly joined 05:44 ispyhumanfly left 05:46 cfa left 05:52 codesections left 05:56 ispyhumanfly joined 06:00 reportable6 left, reportable6 joined 06:01 ispyhumanfly left 07:01 linkable6 left, evalable6 left 07:02 linkable6 joined 07:04 evalable6 joined 07:06 ispyhumanfly joined 07:13 ispyhumanfly left 07:32 codesections joined 07:38 heartburn left, epony joined 07:45 ispyhumanfly joined 07:46 heartburn joined 07:49 ispyhumanfly left 08:00 hackyhacker joined 08:04 ircuser left 08:18 razetime left 08:29 sarna left 08:35 razetime joined 08:59 sarna joined 09:12 dakkar joined 09:16 ispyhumanfly joined 09:20 ispyhumanfly left 09:49 codesections left 09:52 abraxxa joined 09:54 ab5tract joined 09:56 abraxxa left 09:57 abraxxa joined 10:01 sena_kun joined 10:15 linkable6 left, jpn joined 10:16 Geth left, Geth joined 10:17 linkable6 joined 10:24 sena_kun left 10:29 codesections joined 10:39 MoC joined 10:46 ispyhumanfly joined, hackyhacker left 10:53 lichtkind joined 10:56 linkable6 left 10:58 linkable6 joined 10:59 ispyhumanfly left 11:18 ispyhumanfly joined 11:23 ispyhumanfly left
abraxxa Just saw 'Perl 6' listed at msgpack.org 11:24
and no Raku
Nemokosch first, it would be good to see if Data::MessagePack works reasonably well 11:32
first, it would be good to see if Data::MessagePack works reasonably well 11:33
because if it doesn't, maybe it's for the better that Raku "doesn't show up" 😅
11:35 ispyhumanfly joined
the author seems barely available and the module installation is broken - should there be an unbroken raku-community-modules version? 11:35
(I don't really want to adopt it personally because I have no clues about msgpack) 11:36
(but I'm willing to knock the issues and PR's down, given enough context)
11:39 ispyhumanfly left 11:46 abraxxa left 11:52 ispyhumanfly joined 11:57 ispyhumanfly left 12:00 reportable6 left 12:02 reportable6 joined 12:19 sena_kun joined 12:25 phogg left, ab5tract left 12:37 nine left, m_athias left, nine joined, m_athias joined 13:08 ispyhumanfly joined 13:09 MoC left, MoC joined 13:11 Kernspin left, Kernspin joined 13:17 jpn left 13:18 MoC left 13:23 rf joined
rf Morning folks 13:24
13:25 razetime left
rf My Raku service with Humming-Bird is outperforming my natively compiled OCaml service what the heck 13:30
13:32 ab5tract joined
El_Che really? 13:33
impressive
rf Yeah this isn't really under heavy load though, maybe i'll have to do some simulations 13:36
El_Che nevertheless 13:38
it's a good place to start
sena_kun m: say 4321; 13:39
camelia 4321
sena_kun can camelia withstand sigsegvs?
rf Buterflies are pretty resilient 13:40
sena_kun m: say "AND JOIN $_" for 1...1000;
camelia AND JOIN 1
AND JOIN 2
AND JOIN 3
AND JOIN 4
AND JOIN 5
AND JOIN 6
AND JOIN 7
AND JOIN 8
AND JOIN 9
AND JOIN 10
AND JOIN 11
AND JOIN 12
AND JOIN 13
AND JOIN 14
AND JOIN 15
AND JOIN 16
AND JOIN 17
AND JOIN 18
AND JOIN…
sena_kun m: say "AND JOIN $_" for 1...1000;
camelia AND JOIN 1
AND JOIN 2
AND JOIN 3
AND JOIN 4
AND JOIN 5
AND JOIN 6
AND JOIN 7
AND JOIN 8
AND JOIN 9
AND JOIN 10
AND JOIN 11
AND JOIN 12
AND JOIN 13
AND JOIN 14
AND JOIN 15
AND JOIN 16
AND JOIN 17
AND JOIN 18
AND JOIN…
sena_kun m: say "AND JOIN $_" for 1...1000;
camelia AND JOIN 1
AND JOIN 2
AND JOIN 3
AND JOIN 4
AND JOIN 5
AND JOIN 6
AND JOIN 7
AND JOIN 8
AND JOIN 9
AND JOIN 10
AND JOIN 11
AND JOIN 12
AND JOIN 13
AND JOIN 14
AND JOIN 15
AND JOIN 16
AND JOIN 17
AND JOIN 18
AND JOIN…
sena_kun hmm
guess I need to try a more fresh rakudo
rf Did this sigsegv your machine? 13:44
13:44 NemokoschKiwi joined
sena_kun yes, but I had an older rakudo, like 2021 something, so will try with a fresh one 13:44
13:45 NemokoschKiwi left
Nemokosch El_Che: do you know/have something about Nix packages for Rakudo? 13:46
glot.io is apparently pulling language compilers/runtimes from Nix 13:47
rf Wondering how we feel about this for typegraphs on new doc site github.com/Raku/doc-website/pull/34 13:48
Nemokosch yeah just put it to the raku-doc channel as well 13:49
tbh the font is not my favorite but it's already better than it was, regarding the colors 13:50
sena_kun rf, I like it
Nemokosch it's not healthy if I just nag you into changing everything to my taste, lol 13:51
sena_kun yes, on 2022.12 the code is stable and also executes noticeably faster. :) 13:58
14:00 jpn joined
rf I wonder how much the postfix for notation costs in terms of performance 14:00
14:05 jpn left
sena_kun ? 14:13
it should behave exactly the same as plain for ... I hope
what 14:14
why is it like 10 times slower? 14:15
shouldn't it be a sugar?
oh no, lol 14:16
typed 1_500_00 instead of 1_500_000 in the prefix form, so it indeed was 10 times faster. XD
I believe it's a sugar, or it has to be if it's not, so the performance would be the same 14:17
Nemokosch oh didn't notice the look at first 14:22
tbh this looks like World/Actions stuff, RakuAST should probably bring a better way, my 2 cents 14:23
"better" as in more transparent
rf sena_kun: Lol yeah I was hoping it would be identical 14:24
Nemokosch is there something like .^can but for roles rather than classes? 14:30
is there something like .^can but for roles rather than classes? 14:31
sena_kun remind me if can is about calling a method or? 14:32
aha, I see 14:33
the best you can do is maybe grep on `^methods` 14:35
if you want multis, refer to the multis table 14:37
Nemokosch this is for pulling the candidate that would be invoked
maybe I should just pun the role in that case?
maybe I should just pun the role in that case? 14:38
sena_kun that's one option, yes
punning roles is heavy though, so it depends on the use-case you have 14:39
Nemokosch it's simply for inspection. I'm using CoreHackers::Sourcery and it broke down when the first argument of a method lookup was Positional itself 14:42
sena_kun then I'd pun
Nemokosch you know, I'm still a bit worried about this. Positional.isa(Cool) may be different from Positional.new.isa(Cool), in it? 14:47
Actually I'm not certain how the former works under the hood
ugexe m: role Foo { proto method bar(|) {*}; multi method bar($a) { }; multi method bar(:$a) { }; }; say Foo.new.^find_method("bar").candidates 14:52
camelia (bar bar)
Nemokosch m: role Foo { proto method bar(|) {*}; multi method bar($a) { }; multi method bar(:$a) { }; }; say Foo.bar(1) 14:56
does it run like an instance would? It did give Nil
There is some difference between roles and classes but maybe role type instances are like class type instances would? 14:57
15:02 jpn joined 15:05 sena_kun left 15:23 jgaz joined 15:31 cfa joined 15:41 sena_kun joined
cfa 👋 15:52
lizmat there is no such thing as an instantiated role 15:53
what happens is that if you try to instantiate a role, an anonymous class is created in which the role is consumed, and *that* is instantiated 15:54
this process is referred to as "role punning"
Nemokosch what happens if I don't try to instantiate it, just use it like a type object? 15:55
lizmat m: role A { }; dd A.^name
camelia "A"
lizmat m: role A { }; dd A.HOW.^name
camelia "Perl6::Metamodel::ParametricRoleGroupHOW"
lizmat you get a rold
*role :-) 15:56
Nemokosch for context: I'm trying to compare Positional ~~ Cool and Positional.isa(Cool)
lizmat roles are objects like everything in Raku
Nemokosch the former returns True but the False value of the latter seems more suitable
Voldenet `Positional ~~ Cool` is weird but 15:59
m: say (role :: {}) ~~ Cool
camelia True
Voldenet apparently all roles are pretty cool
cfa 🕶️ 16:00
lizmat this feels like some implementation detail seeping out 16:01
16:06 abraxxa joined
Nemokosch yes to all of the messages 😄 16:08
github.com/rakudo/rakudo/commit/00...070b30077f 16:09
probably this makes them Cool - they "pretend to be Cool"
Voldenet according to docs.raku.org/routine/ACCEPTS#(Mu)...od_ACCEPTS this should probably return False 16:10
since roles are (Mu) 16:11
m: sub use-cool($c) { $c ~~ Cool ?? $c.abs !! -1 }; for (role :: {}, role :: {}.new, "", 42) { CATCH { default { ";/".say } }; $_.&use-cool.say } 16:12
camelia ;/
-1
0
42
16:12 abraxxa left 16:13 abraxxa joined
Nemokosch I was thinking if smartmatching should rather use .^isa 16:18
on types, that is
tonyo where can i read about rakuast? 16:20
regarding progress 16:21
16:22 razetime joined 16:23 abraxxa left
lizmat closest thing is the #raku-dev channel and the weekly atm 16:25
tonyo ty lizmat 16:29
Voldenet the above makes me wonder whether there exists something like "Type" type 16:31
Nemokosch maybe in the metamodel? 16:33
tonyo Voldenet: in what sense? 16:35
Voldenet so that `sub use-type($t) { $t ~~ Type }; use-type(Any) eqv True; use-type("whatever") eqv False` 16:37
and `my Any $x; use-type($x) eqv True`, because $x has Type assigned to in by default 16:38
s/to in/to it/
m: sub use-type($t) { $t ~~ Any:U }; say use-type(Any) eqv True; say use-type("whatever") eqv False 16:39
camelia True
True
Voldenet This makes sense as long as everyone uses :D on every type 16:40
16:41 Xliff left
tonyo m: "whatever".^mro.say 16:42
camelia ((Str) (Cool) (Any) (Mu))
16:48 jpn left
Voldenet Still, it would be nice to have something that would significate difference between `my $x; use-type($x)` and `use-type(Any)` 16:49
Nemokosch What is the difference?
16:50 jpn joined
Voldenet Currently none, but in the first case I've "forgotten" to assign a value, in the latter the type was passed :) 16:50
16:55 jpn left 16:57 jpn joined 17:02 jpn left
Nemokosch don't we end up with the usual "type objects as missing values" trauma, then? 17:03
I don't necessarily like that but IF we do accept that, the rest follows, no?
Voldenet not necessarily: Any ~~ Any:T, Any ~~ Any:U, (my $x) !~~ Any:T, (my $x) ~~ Any:U 17:12
tonyo i don't mind it too much considering sub sigs can spec :D or :U 17:13
17:13 Bocaneri joined
tonyo m: sub say-x(Int:D $x) { dd $x; }; say-x(50); say-x(Int); 17:13
camelia 50
Parameter '$x' of routine 'say-x' must be an object instance of type
'Int', not a type object of type 'Int'. Did you forget a '.new'?
in sub say-x at <tmp> line 1
in block <unit> at <tmp> line 1
17:13 Bocaneri is now known as Guest5836
Nemokosch oh this turned completely unreadable on discord... 17:14
Voldenet right, `Any ~~ Any:T, Any ~~ Any:U, (my $x) !~~ Any:T, (my $x) ~~ Any:U`
Nemokosch thank you
I'm not happy that there is both :T and :U, it's a permanent source of confusion in my opinion
Voldenet in any case, proper type parameter could be treated a bit differently than the default value 17:15
Nemokosch sometimes these two are distinguished on the level of syntax
17:16 Sauvin left 17:28 phogg joined 17:31 dakkar left 17:33 Guest5836 is now known as Sauvin 17:34 jpn joined 17:37 MoC joined 17:39 razetime left, phogg left, phogg joined 17:47 jpn_ joined 17:48 jpn left
tonyo rf: in what capacity are you interested in enhancing fez 17:49
17:54 jpn_ left 18:00 reportable6 left 18:02 reportable6 joined 18:17 jpn joined
rf tonyo: I'd like zef to validate META6.json files, and also provide better error messages when you run `zef test` 18:46
Nemokosch zef is not the same as fez, though 18:48
tonyo is the author of fez 18:49
ugexe why should zef validate META6.json files instead of an authoring tool? 18:52
in other words: why would an ecosystem allow distributions with invalid meta data?
it only needs to be validated by authoring related actions, so authoring tools would be more appropriate for that 18:53
authoring tools also have the advantage of not needing to be dependency free 18:55
18:59 jpn left
ugexe as for error messages... there isn't really anything zef can add to your test output. you can run `zef test . --debug` to get the full output, but I'm not sure what information it could add 19:00
otherwise the tests themselves need to be more helpful
there is also Test::META or some such that you can add to your own tests to validate your meta data, although again im not sure how fair it is to make all users who download your distribution to validate that file 19:02
i'd have a xt/validate-meta.rakutest that just has like `use Test::META; test-meta-or-whatever()` and invoke via `raku xt/validate-meta-rakutest` (in xt/ so regular users don't end up running it for no reason) 19:03
p6steve ugexe: thanks for you steer on Distribution::Builder:: ... I will look at these docs too ... does it make sense for me to make a simple Distribution::Builder::Rust or Distribution::Builder::Cargo (?) for cargo build 19:06
ugexe i'm not sure... thats a bit different because, unlike with the CMake one which keeps its file within the distribution (I think at least), installing with cargo will install files in other places such that uninstalling a module that used e.g. Distribution::Builder::Cargo wouldn't remove those files when uninstalled 19:12
19:14 jpn joined
ugexe so it could make sense, although i'm skeptical 19:15
rf: as far as META6 validation goes i made a prototype web service that validates via OpenAPI spec (such that other programs could consume that spec and validate with the same rules) - github.com/ugexe/Raku-App--OpenAPI...6Validator 19:16
although note it just validates a few basic things, its just a PoC
but i kind of like that idea because then the spec file can be maintained by the community, and anything with an OpenAPI library could validate it against the same rules as everyone else 19:17
on the other hand i dont know if OpenAPI is capable of expressing some of our more complex situations in an elegant way 19:18
rf Yeah sorry I got confused with zef and fez 19:19
lizmat zef is for download, fez is for upload :-) 19:23
19:27 jpn left
Nemokosch for fez, it sounds desirable to check the META6; I'd hope that would even improve the standardisation of the META6 file 19:28
p6steve well I am less knowledgeable about Rust/Cargo than about Raku/zef ;-), but I think that the story is that cargo build will download and place the dependencies/crates in my dan/src/Cargo.toml into somewhere like <user directory>/.cargo/registry. otherwise, the lib.so will go into dan/target/debug/ ... so would it be feasible, reasonable to have Distribution::Builder::Cargo warn that it will install 3rd party cargo 19:30
crates (with a y/N?) and then only rm rf dan on uninstall maybe?
19:30 jpn joined
rf .tell melezhik I added some native stuff to Distribution::Builder::Cmake if you want to test it with SparrowCI 19:33
tellable6 rf, I'll pass your message to melezhik
rf Is there an easy way to reduce over a binary operation? 19:54
Like @list.reduce(&+);
Obviously I could use sum in that example
lizmat not sure why that wouldn't work, they're infixes like any other ? 19:55
p6steve m: my @a=(1,2,3); [+] @a; .say;
m: say (1..4).reduce(&infix:<+>); 19:56
m: say [+] 1, 2, 3;
rf m: ([o] [-> $a { $a + 1 }, -> $a { $a + 1 }])(2).say; 19:58
camelia 4
rf Very nice
Nemokosch how did this work... 20:01
rf Monoids
If you have n functions that take the same type they return you can compose them all such that make a new function 20:03
hence [o]
20:06 MoC left
p6steve m: (o)(2).say; 20:11
omg
lizmat m: (o)(2).say
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
o used at line 1
lizmat m: [o](2).say
camelia Cannot resolve caller infix:<o>(Int:D); none of these signatures matches:
()
(&f)
(&f, &g --> Block:D)
in block <unit> at <tmp> line 1
tonyo m: [+] [1,2,3,4] 20:13
camelia Potential difficulties:
Useless use of [+] in sink context
at <tmp>:1
------> <BOL>⏏[+] [1,2,3,4]
tonyo m: say [+] [1,2,3,4]
camelia 10
p6steve m: (o)(2).say;
tonyo m: (o)(2).say
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
o used at line 1
rf m: ({ $^a + 100 } o { $^a + 12 })(10); 20:15
camelia ( no output )
rf m: ({ $^a + 100 } o { $^a + 12 })(10).say;
camelia 122
20:17 Kernspin left
rf m: ({ ({ $_ + 100})($^a) + 12 })(10).say 20:17
camelia 122
rf Equivalents
20:21 Kernspin joined
p6steve hehe 20:22
Nemokosch oh gotcha 20:28
lol
20:29 Kernspin left, Kernspin joined 20:40 jpn left
p6steve m: ({ ({ $^a + 100})($^a) + 12 })(10).say 21:00
(just reminding self that $^a is block specific) 21:01
21:13 melezhik joined
melezhik . 21:13
tellable6 2023-01-27T19:33:26Z #raku <rf> melezhik I added some native stuff to Distribution::Builder::Cmake if you want to test it with SparrowCI
melezhik tell rf: thanks , I rerun example build the same issue 21:14
rf: ^^ 21:15
rf Hmm, can you link build? 21:16
melezhik ci.sparrowhub.io/report/2784 21:19
I am not sure though if this uses the latest version of the module
> Installing: Distribution::Builder::Cmake:ver<0.0.4>:auth<zef:rawleyfowler> 21:20
This is what is says
Looks like this is the latest
And I merge you commits for example repo as well 21:21
tonyo wrote a little markdown docs generator for inline comments starting with #`(<|{|(|...)md 21:27
rf melezhik: Hmm I am wondering the C compiler on this image 21:35
21:37 melezhik left 21:45 melezhik joined
melezhik rf: packages.debian.org/sid/build-essential 21:48
If this is not enough which cli command tells the compiler version ? 21:49
rf go which cc
melezhik This is Debian
rf "which cc"
melezhik Ok
Will do
21:50 jpn joined
melezhik Actually also added gcc --version 21:51
Will see 21:52
21:54 melezhik left 21:55 jgaz left, jpn left 21:57 melezhik joined
melezhik rf: ci.sparrowhub.io/report/2786 21:57
rf Can you try adding clang to build install 21:59
Instead of GCC
21:59 melezhik_ joined, melezhik left
melezhik_ What should I do ? I mean install another dep package or what ? 21:59
apt-get install clang ? 22:00
rf Yes 22:01
22:01 jpn joined 22:02 jpn left 22:04 melezhik_ left 22:06 jpn joined 22:11 jpn left, jpn joined 22:12 jpn left
rf Hmm I wonder, melezhik: your server might be running arm? 22:15
22:21 jpn joined 22:42 cfa left 22:44 ab5tract left 22:48 ab5tract joined 22:54 squashable6 left 22:57 squashable6 joined 23:07 melezhik joined
melezhik rf - now clang is installed, but I am not sure it's used in build process - ci.sparrowhub.io/report/2789 23:07
23:09 sena_kun left
rf melezhik: What architecture is your server? 23:10
melezhik this is debian docker runs on hetzner VM
let me get the info 23:11
uname -a
Linux sparrow01 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux
rf Hmm not sure then 23:12
It builds fine on all 3 of my machines
melezhik yeah, I don't see in a build log that clang is picked 23:15
maybe I don't need to install build-essential?
just clang?
and ... which rakudo version you test against? 23:16
ugexe github.com/rakudo/rakudo/blob/f203...#L236-L256 23:20
thats where your error is happening fwiw
23:20 ab5tract left
ugexe i dunno what to make of it, but maybe someone else will 23:20
Nemokosch my take on Data::MessagePack github.com/pierre-vigier/Perl6-Dat.../issues/19 23:21
23:24 melezhik left
rf Hmm seems it only uses GCC 23:26
.tell melezhik It only seems to support G++, so that is fine. I am using latest Rakudo. 23:27
tellable6 rf, I'll pass your message to melezhik