🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022.
00:01 Maylay left 00:07 reportable6 left 00:08 reportable6 joined 00:12 tejr left 00:20 tejr joined 00:23 Maylay joined 00:39 Maylay left 00:40 thundergnat joined 00:43 Maylay joined 00:46 sftp joined 00:50 thundergnat left 01:02 vasko left 01:07 Maylay left 01:16 sftp_ joined 01:17 sftp left, sftp_ is now known as sftp 01:19 Maylay joined 01:36 sftp left 01:56 sftp joined 02:26 Maylay left 02:34 sftp_ joined 02:35 sftp left, sftp_ is now known as sftp 02:44 pierrot left 02:46 pierrot joined 03:11 ed joined 03:35 Maylay joined 03:43 tejr left 03:45 Sankalp- joined, Sankalp left, Sankalp- is now known as Sankalp 04:17 Maylay left 04:18 Maylay joined
xinming releasable6: status 04:51
releasable6 xinming, Next release in ≈1 day and ≈14 hours. 1 blocker. 0 out of 67 commits logged (⚠ 89 warnings)
xinming, Details: gist.github.com/e99fd407cfcea9f446...52ca72a060
05:40 Kaipei joined 05:44 Kaiepi left 05:53 Kaipii joined 05:56 Kaipei left 06:01 djerius_ left 06:03 djerius joined 06:07 reportable6 left, Sgeo left 06:10 reportable6 joined
tonyo my toml module also has a grammar in the repo 06:14
06:52 Maylay left 07:00 Maylay joined 07:20 Kaipii is now known as Kaiepi, sena_kun joined 07:51 dakkar joined 08:10 sena_kun left 08:11 sena_kun joined 08:27 destroycomputer- left 08:29 destroycomputers joined 08:43 mexen joined 09:00 sienet_ja_LSD[m] left 09:02 Maylay left 09:06 Maylay joined 09:11 lichtkind_ joined
jjatria tonyo: which one? TOML? I thought that was written in NQP, not with a grammar 10:27
10:45 evalable6 left, linkable6 left 10:47 linkable6 joined, evalable6 joined 10:57 Maylay left 11:04 Maylay joined 11:11 Maylay left 11:29 n00bn00b joined 11:46 Maylay joined 12:02 Maylay left 12:07 reportable6 left 12:08 reportable6 joined 12:22 Maylay joined 12:49 tejr joined 13:04 tejr left 13:06 tejr joined 13:19 n00bn00b left 14:19 Maylay left 14:24 Maylay joined 14:42 andm joined 14:50 monkey_ joined 14:54 [Coke] joined
[Coke] . 14:54
15:19 lichtkind_ left 15:28 lichtkind joined
[Coke] m: dd (90..100).one 15:40
camelia one(90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100)
[Coke] it is very convenient, but should dd be showing junction guts?
m: say (90..100).one; #ok, not just dd 15:41
camelia one(90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100)
Voldenet m: say (1..*).one 15:43
as expected
camelia (timeout) 15:44
15:44 younder joined
younder Is anyone working on LSP support for Raku? 15:50
moritz_ what is LSP? 15:52
dutchie language server protocol 15:53
the idea is to solve the m×n problem for languages/editors
younder Language ervert protokol is developed by Microsoft to better allow interaction between the editor and the  compiler. Things like getting compile errors highligted. Mocst of this works in Comma, but it should also work in other editors like Visual Studio Code or EMACS. 15:54
moritz_ github.com/azawawi/app-perl6langserver last committed 4 years ago 16:00
younder thx, though it looks a bit stale.. 16:02
Nemokosch Someone got a working plugin for VSC iirc 16:10
16:30 monkey_ left 16:32 dakkar left 16:49 perlbot left 16:51 simcop2387 left
patrickb There is also github.com/bscan/RakuNavigator 17:01
Last change 2022-06-04 17:02
17:10 monkey_ joined
tonyo jjatria: there's also a 1.0 compliant toml grammar in there 17:41
i rewrote in nqp because the grammar was so slow as to be unusable on large files
github.com/tony-o/raku-toml/blob/b...ar.rakumod 17:43
there's an Actions.rakumod in that same dir in that commit
dunno if rakuast would speed it up or not, kind of out of the loop on that development 17:44
18:08 reportable6 left, reportable6 joined 18:16 hexology joined 18:26 ab5tract joined 18:27 [Coke] left 18:30 [Coke] joined
leont Is there some way to just configure fez once, so I don't have to deal with logging in again? 18:39
18:41 monkey_ left 18:47 monkey_ joined
japhb leont: You have to log in monthly, IIRC. It's probably a security measure, to reduce the chance that someone will get hold of old login tokens and impersonate you. 18:50
leont Sounds hateful 18:51
japhb is used to it from corporate systems
Google required a fresh login every 20 hours. 18:52
Which, BTW, is hell of annoying if you are in a pager rotation and thus can get woken up 21 hours after you last logged in ...
leont Yeah, I've seen it in such places too. Especially annoying if you have to re-login multiple devices -_- 18:53
japhb One of my tech leads would habitually log in every time he came back to his desk, just on the principle that if everything fell apart, he wanted that token to last as long as it could. 18:54
leont Frankly I consider it security theather
japhb At one point, someone transfered into a peer team of mine from Google [X], and he had weird extra security devices attached to his laptop and was like "Yeah, normal Google isn't sufficiently paranoid for the [X] folk." 18:56
I was a little surprised they let him keep the [X] laptop when he transfered, actually. 18:57
leont The threat model doesn't really make sense. I much prefer a ssh-style setup where even leaking the keyfiles doesn't automatically compromise the security of the system (because they're encrypted) 19:02
19:11 nort left 19:12 Maylay left 19:15 nort joined 19:20 Maylay joined
ab5tract Considering that I was able to create a fez representation of a module without any kind of authentication that I owned the module, it does seem a bit like security theater 19:20
not sure how such authentication would be performed, mind you 19:21
just that it seems important to register any modules you own on fez before someone else does
19:21 ab5tract left
ugexe at some point the p6c ecosystem will be turned off and you won't be able to have that happen. although note if it was in the fez ecosystem already it would get chosen over the identical auth in p6c 19:31
github.com/Raku/problem-solving/bl...6c-cpan.md 19:33
19:49 euandreh joined 19:55 simcop2387 joined
jjatria But that's not really how auth works. Even if you released Foo:auth<zef:ab5tract> I can release Foo:auth<zef:jjatria> and there's no name conflict, and there's no current way to make it so Foo:auth<cpan:ab5tract> points to some "authoritative" version on zef (although I think there was some proposed META field that would do something like that?) 19:56
20:00 perlbot joined
tonyo japhb: i can put in an update to refresh the token expiry time to refresh when used 20:37
need to think more on the side effects of that though
.tell ab5tract `Considering that I was able to create a fez representation of a module without any kind of authentication that I owned the module` - what does this mean? 20:38
tellable6 tonyo, I'll pass your message to ab5tract
tonyo jjatria: i think the goal is eventually to turn off p6c and have people use stuff like `use Foo:<zef:jjatria>` rather than the open ended `use Foo` 20:40
`use Foo` leads to less predictable behavior
20:43 euandreh left
ugexe jjatria: if you use untrusted ecosystems then yes anything is possible 20:47
basically module authors dont get to say where you get to download some given identity, which hard couples systems to actual implementation of whatever ecosystems (which may disappear one day). instead you should configure e.g. zef to use trusted ecosystems (disable p6c/cpan for example) until such a time where that can be the default 20:50
at its most basic level a trusted ecosystem is one that can and does enforce namespace rules 20:52
Nemokosch `use Foo:<zef:jjatria>` looks rather ugly, on the other hand, predictable or not 21:01
if this is the cost of modules with the same name that it's rather not worth it...
if this is the cost of modules with the same name then it's rather not worth it...
ugexe then don't install other versions of Foo 21:14
name your module Foo::JJAtria or whatever 21:15
its really no different
the production-ness of the adverbs stands regardless of auth if for no other reason than pinning versions 21:17
so if you want to avoid adverbs you already have thrown caution to the wind 21:18
21:18 andm left 21:26 lichtkind left
Nemokosch again, if the cost is that you will end up with mandatory longer names with metadata in them, it would have been just better if there was no name collision allowed in the first place; that's all my point 21:32
ugexe and what we've been saying is once untrusted ecosystems are no longer default enabled then there won't be name collision 21:51
21:53 sena_kun left
ugexe if we want the shortest names possible though we should disallow multiple versions too 21:54
no more installing version 1 and version 2 of some thing
because then people have to `use Foo:ver<1>` and `use Foo:ver<2>` 21:55
22:04 monkey_ left
jjatria ugexe: my examples were not using an untrusted ecosystem, unless you consider zef to also be "untrusted" 22:22
ugexe if you only use the fez ecosystem, the only trusted ecosystem atm, then i dont understand your complaint
jjatria I'm not the one complaining 22:23
22:23 sena_kun joined
jjatria All I'm saying is that ab5tract's suggestion of "register your modules on zef before somebody else does" won't make a difference 22:24
ugexe yeah that is correct 22:26
jjatria That said, I'm not sure what you mean by "once untrusted ecosystems are no longer default enabled then there won't be name collision", unless you consider the auth (and version?) to be part of the name 22:28
22:28 sena_kun left
jjatria Because even when only zef (fez?) is around, `use Foo` will still be ambiguous if both `zef:a` and `zef:b` have released a `Foo` module 22:29
ugexe yes, you have to be aware of raku environment. if zef is only installing from trusted sources then i doesn't matter if those are ambiguous 22:30
however it would still be best practice to use them (ver, auth, etc) regardless 22:31
jjatria Still not sure I quite get what you mean. I'm thinking of a point where zef only ever installs from zef. Or what do you mean by "trusted sources" there?
22:33 younder left
ugexe yeah sorry i mispoke, i was thinking collisions with identical identities in different ecosystems 22:36
jjatria > "name your module Foo::JJAtria or whatever, it really is no different" Except that `zef:notjjatria` can also release Foo::JJAtria, but only `zef:jjatria` can release `Foo:auth<zef:jjatria>`
Now I feel strange being used as the example :P
guifa_ So one thing is you need to think historically 22:45
Perl had CPAN, which enforced only one module with any given name 22:46
(and actually, once you first published a module in Foo::Bar namespace, you OWNED the Foo::Bar:: subnamespace. The Foo:: namespace too if no one had published in it before)
And it could cause problems when you'd have ecosystem rot, for instance. Imagine I had Intl::Format::DateTime. I stopped updating it. Someone wanted to create a drop in replacement. BEst they could do is make l12n::Format::DateTime, or i18n::Format::DateTime or Intl::Fmt::DateTime 22:47
jjatria This might have been discussed before, but maybe there should be an opt-in way to make bare `use` statements (without adverbs) a compile time error if the resolution is ambiguous? 22:48
Or maybe warn?
guifa_ Would be super easy as a slang ha 22:50
tonyo i'd reckon the best way is just forcing the META6 to be specific and the loader to reference that 22:52
jjatria As in, forcing adverbs in the `depends` section of the meta? And in that case, which adverbs are you thinking of? `auth` only? Or `ver`, `api`, and friends? 22:56
Also: "forcing the loader to reference that" -> how would this look? 22:57
ugexe it cant really work since a single distribution could depend on multiple versions 23:00
tonyo then the loader should complain if the loading statement is not specific enough 23:01
jjatria ^ That I can get behind. A warning at least would be welcome methinks 23:02
tonyo which is a minor inconvenience given that use case
jjatria Anyway, bedtime for me 👋
23:03 habere-et-disper joined
ugexe considering that "updating" a module means just installing a newer version of it, warning on ambigious use would be extremely annoying 23:03
tonyo the loader'd have to be aware of the META at load time, and if you have in your meta `depends: [ "Foo:auth<zef:xxxx>"` then when you `use Foo` you should be reasonably sure you're getting `Foo:auth<zef:xxxx>`
habere-et-disper m: sqrt(2) 23:05
camelia WARNINGS for <tmp>:
Useless use of "sqrt(2)" in expression "sqrt(2)" in sink context (line 1)
habere-et-disper m: sqrt: 2
camelia WARNINGS for <tmp>:
Useless use of constant integer 2 in sink context (line 1)
habere-et-disper m: sqrt(2).say 23:06
camelia 1.4142135623730951
ugexe depends parsing is also pretty convoluted, such that parsing it to load modules would probably be less than awesome
habere-et-disper m: sqrt: 2 andthen .say
camelia 2
tonyo it'd be a time suck but still ideal 23:07
there must be some tradeoff but not sure what
habere-et-disper What is happening with `sqrt: 2` versus sqrt(2)
23:08 [Coke]_ joined 23:09 [Coke] left
ugexe the code already bends over backwards to not have to parse meta data on load. it could serialize it on install to a more fast format. but even still, handling a) one-of / optional depends and b) declarative logic depends seem nothing short of inefficient no matter what 23:10
github.com/ugexe/zef/blob/7c46ca2d....t#L52-L64
like i dont see how that can be fast 23:11
tonyo i don't either 23:13
23:22 Kaiepi left 23:23 Kaiepi joined
guifa_ habere-et-disper so two things 23:31
sqrt: 2 is just a label with the int 2
so sqrt: 2 andthen .say is equivalent to
LABEL: 2 andthen .say 23:32
which is to say it's just `2 andthen .say`. `andthen` checks the truthy value of the previous expression (2 is truthy), and topicalizes it ($_ = 2)
(in other words `if temp $_ = 2 { .say }`) 23:34
now, for method calls, the colon syntax is just a way to get rid of parentheses 23:35
`$foo.bar(5)` is the same as `$foo.bar: 5`, is the same as `bar $foo: 5`
23:40 mtj left, Sgeo joined 23:41 mtj joined
habere-et-disper guifa_ Thank you. I was looking to loose the parentheses, but it looks like I can't with sqrt? I take it doesn't have a method call. 23:52
guifa_ you can just lose parentheses entirely 23:57
`sqrt 2` is the same as `sqrt(2)`, assuming there is nothing following it
(well, very low precedence stuff like andthen would actually be okay)
m: sqrt 2 andthen .say 23:58
camelia 1.4142135623730951
guifa_ m: say sqrt 2
camelia 1.4142135623730951
habere-et-disper guifa_ Thank you again, rather helpful. :) 23:59