🦋 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.
00:02 _ed left, reportable6 left 00:05 reportable6 joined
tbrowder yo, does anyone have a practical use for raku routine 'round'? 00:50
if i were king, i would change it to round a number to x decimal places. 00:51
perl POSIX round also seems not very useful 00:52
japhb tbrowder: I use it every so often. I like the way it works, actually, because I often need to have routines that work in either base-1000 or base-1024/ 00:59
Or want to graph something and round to the step size of exactly one row on the screen. 01:00
tbrowder the posix round, or raku round?
japhb Raku
Essentially, I often want to round to multiples of an arbitrary Rat, for which it works well. 01:01
tbrowder hm, can you show an example? i don't grok the ones in the docs 01:02
01:02 xinming_ is now known as xinming
japhb tbrowder: First couple routines in github.com/japhb/Terminal-QuickCha...Pieces.pm6 would be one 01:05
tbrowder i think i get it, but it seems like the routine should be called 'scale' instead of 'round', just saying... 01:21
when creating charts i'm used to 'scaling' all values by a factor based on the largest value, not rounding them. 01:26
hm, i see the difference in yr use, and i'll have to play with it a bit. and study docs some more 01:32
japhb: thanks for the help
02:02 linkable6 left, evalable6 left 02:05 linkable6 joined, evalable6 joined
japhb tbrowder: No worries 02:14
03:05 linkable6 left, evalable6 left 03:08 evalable6 joined, linkable6 joined 03:44 _ed joined 03:49 _ed left 03:53 RandalSchwartz left 04:08 ttubrian left 04:34 frost joined 05:21 Eddward_ left 06:02 reportable6 left 06:03 reportable6 joined 06:41 Doc_Holliwood left 06:45 Doc_Holliwood joined 06:57 ufobat joined 07:27 abraxxa joined 07:32 abraxxa left 07:33 abraxxa joined 07:41 Sgeo left
nine Seems like we regressed t/08-performance/99-misc.t: Failed test 'hypered .grep .is-prime is not hugely slower than plain grep' 07:51
07:52 dakkar joined
nine vrurg: you have worked on .hyper recently, haven't you? 07:52
07:58 discord-raku-bot left 08:00 discord-raku-bot joined 08:02 discord-raku-bot left, discord-raku-bot joined 08:05 discord-raku-bot left, discord-raku-bot joined
gfldex bridge test 08:05
lizmat weekly: perlweekly.com/archive/518.html 08:10
notable6 lizmat, Noted! (weekly)
08:13 discord-raku-bot left 08:16 discord-raku-bot joined
gfldex bridge test 08:17
lizmat In the US, that phrase would make me nervous, if I would be on a bridge :-)
gfldex Did you imagine a crowd of ppl junking around on a bridge? 08:19
lizmat yeah, pretty much :-) 08:25
www.youtube.com/watch?v=XggxeuFDaDU 08:26
gfldex Come on! For just $6M it was a true bargain! 08:29
08:35 tyil left 08:47 discord-raku-bot left 08:48 discord-raku-bot joined, discord-raku-bot left 08:50 discord-raku-bot joined 08:51 discord-raku-bot left, discord-raku-bot joined
gfldex reverse bridge test 08:51
This 08:52
is
08:52 discord-raku-bot left 08:53 discord-raku-bot joined
does this loop? 08:53
gfldex Seams not so!
gfldex This is now a 2-way bridge. 08:54
09:42 aaxwsed joined 09:43 aaxwsed left
lizmat gfldex++ # for a non-undulating bridge 10:11
10:30 Doc_Holliwood left 10:32 _ed joined 10:36 _ed left
lizmat PSA: the Rakudo Weekly News will appear tomorrow 11:14
afk& 11:15
12:01 frost left 12:02 reportable6 left 12:05 frost joined, reportable6 joined 12:59 RandalSchwartz joined 13:05 _ed joined 13:08 rassoc joined
rassoc m: say i ** 3 13:08
camelia -0-1i
rassoc sweet, fixed in a more recent release 13:09
13:10 _ed left 13:26 _ed joined 13:40 _ed left 13:41 Sgeo joined, _ed joined 13:48 _ed left 13:50 _ed joined 13:55 _ed left 13:59 Eddward_ joined 14:04 slu left 14:39 patrickb joined 14:45 sgrs left, oodani joined
oodani hi! i'm trying to set up rakudo on a macos 11.4 system right now. installing rakudo with `brew install rakudo` works and gives me the compiler itself, but i don't have a line editor, and running `zef install Readline` as recommended led me to realise i don't have the zef command at all. what's the recommended way to add zef to a homebrew-managed rakudo? is it supposed to be included in the rakudo homebrew formula? i noticed that the precompiled builds at 14:50
rakudo.org/downloads *do* include zef, which suggests the homebrew formula probably should too
El_Che oodani: git is probably the easiest way in the short term 14:51
oodani aha, gave the commands at the top of github.com/ugexe/zef a shot. it looks like it installed into /usr/local/share/perl6/site/bin, which isn't already on my path, but that's easy enough to fix for now c: 14:55
aaand now i have a line editor! yay! 14:57
cool, thank you c: in the long run the homebrew formula probably should include zef? but this workaround is cool for the time being
15:04 _ed joined 15:09 monkey_ joined 15:10 _ed left
nine vrurg: disregard that about t/08-performance/99-misc.t. I had some MoarVM debug options enabled without noticing 15:12
rassoc oodani: you can also `brew install rlwrap` and define an alias `raku="rlwrap raku"` 15:19
that's what i am doing atm
15:19 ufobat left
oodani oh yeah, rlwrap would also work! i was thinking ahead and figured i'd probably need zef for doing other things though ;) 15:20
15:21 patrickb left
El_Che `raku="rlwrap raku"` 15:28
that sounds bad
alias reval="rlwrap raku" 15:29
maybe
tonyo oodani: github.com/Homebrew/homebrew-core/.../rakudo.rb <- this is the brew file for rakudo 15:30
did you install rakudo-star or rakudo ?
rakudo-star contains zef, rakudo is the bare bones 15:32
El_Che 9/10 is rakudo star not what I want. What's needed is maybe a brew formula for zef 15:33
I don't use macos enough to have the energy to create that 15:34
rassoc "that sounds bad" -- how so? no problems so far 15:35
15:35 _ed joined
El_Che most of the rime raku is not an interactive program 15:36
you don't want to use rlwrap in non interactive programs
rassoc as said, no problems so far, even with non-interactive programs 15:37
tonyo i never want rakudo star either but i always manually install zef too
El_Che rassoc: my suggestion is use another alias for the rlwrapper raku 15:38
like rakue
for raku eval
rassoc example of what might not work? 15:39
El_Che raku foo.pl 15:40
raku foo.raku
(old habbits :) )
rassoc i say it again: no problem so far. that works just fine
El_Che ok, just keep it in your mind if you have a problem :) 15:41
rassoc sure
15:43 _ed left
tbrowder tonyo: is fez reliable enough now to replace cpan? 15:44
tonyo i think so, the only bug reports i have outstanding are related to (specifically) openBSD tar and it's not a blocker just an annoyance. 15:46
i'd say yes. i can get some stats on downloaded modules (one sec)
15:49 _ed joined 15:53 rassoc left 15:57 _ed left 15:58 rassoc joined
tonyo as of a few days ago, there's been around 6k downloads of modules 16:04
the logs only go back to april 16:05
16:37 melezhik joined
melezhik . 16:37
16:38 _ed joined, dakkar left 16:43 _ed left 16:45 _ed joined
[Coke] is pleasantly surprised to find a recent rakudo on macports. 16:50
16:51 monkey_ left, _ed left 16:54 Eddward_ left
tbrowder tonyo: thanks. i just upgraded Fez, and also got a key to reset my password. i'll be trying a new module with it today. 16:54
16:56 Eddward_ joined, Eddward_ left 17:00 abraxxa left 17:18 abraxxa joined
tonyo tbrowder: as always, let me know if you have any issues 17:30
tbrowder i just filed two on yr repo 17:31
17:33 Doc_Holliwood joined
tbrowder tonyo: one confusion, will the auth id be ":auth<zef:name>" or ":auth<fez:name>"? 17:34
tonyo zef:name
tbrowder and is the "name" case insensitive like cpan? 17:35
tonyo it is not 17:36
i'll add a -q flag to meta so you can retrieve your meta info from fez. fez doesn't actually manage your META json for your pkg, the meta info fez has is only available to raku land so you can have profile info like on cpan 17:37
if you change your email address in fez, it doesn't muck around with your uploaded modules to change their METAs 17:38
tbrowder: what does this question mean? `What are the valid author-defining keys?` 17:39
tbrowder not very good wording for sure, but mainly stuff about how fez account data are used and applied as you've been telling me about. the auth requirements (zef:case-sensitive), etc. 17:43
so we have to manually ensure the META6 auth data are correct for zef? even though it's not changed by fez. 17:45
tonyo gotcha
fez has a command `checkbuild` that you can run that should make you reasonably sure your meta is OK for both zef and fez uploading 17:46
tbrowder i hope skaji releases his fez-compatible soon. japhb has been looking for him--hope he is okay 17:47
.seen skaji
tellable6 tbrowder, I saw skaji 2021-04-17T12:47:58Z in #raku: <skaji_> lizmat: Thanks. I'm not in a hurry. It can wait.
tbrowder ok, the checkbuild i assumed was look only, but i'm ocd sometimes. oh, well, i'm ready to take the plunge 17:51
i see a possible problem when using checkbuild. 17:55
japhb oh?
tbrowder using a module created with mi6 fez reported the zef missing on auth 17:56
i changed to zef in both Meta and the rakumod file 17:57
japhb That's kinda odd, if you've changed it in both places
tbrowder ok, next checkbuild fez reported name mismatch (upper case vs lower case registered) 17:58
i changed to lower case in Meta but left upper case in rakumod but zef didn't complain. 17:59
japhb tbrowder: Oh, I remembered something that may be useful to you, I dunno. My releaser script for MUGS: github.com/Raku-MUGS/MUGS-Core/blo...er.rakumod
Ah, gotcha
tbrowder so fez doesn't use auth data in the module name? 18:00
how about version info? 18:01
tonyo: that was my concern--what data are definitive when we now have three ecosystems? 18:02
18:02 reportable6 left
japhb You log in with fez. (That's also true of CPAN, except that lots of people have their CPAN auth in a file.) 18:03
tbrowder for raku, not counting japhb's others
japhb My others?
tbrowder at a quick glance yr prog handles multiple ecosystems, i assumed there were others 18:04
18:05 reportable6 joined
japhb But generally speaking, for great justice, fez login should equal META auth (with a leading zef: prepended) should equal rakumod auth (exact match for META auth) 18:05
tbrowder yes, but checkbuild doesn't see that yet
japhb tbrowder: Ah. Really it's mostly to save me some work until fez-compatible mi6 is out 18:06
tbrowder: PR time? :-)
tbrowder i'm not smart enough for fez or mi6 PRs--there be dragons 18:07
let me try an mi6 check with my auth changes... 18:08
tonyo tbrowder: give me a moment, i have meetings for the next few hours and can answer more in depth afterwards 18:11
18:13 simcop2387 left, perlbot left
tbrowder ok, i'll try to take good notes 18:14
18:20 perlbot joined 18:22 simcop2387 joined 18:27 rassoc left 18:30 RandalSchwartz left
tonyo fez uses the auth data in the META for the full module name, it doesn't use what you put in `fez meta`. fez does verify that the META and your username match when you upload, eg if you force upload a module with auth zef:XYZ and you're using zef:tbrowder's key then fez won't index. when you run `fez checkbuild` it should tell you whether the meta matches, when you run `fez upload` it'll run a checkbuild 18:37
_against_ the created tar.gz. if you're using git and your git supports `archive` then you may end up with whatever is in the META committed to the repo and not what you see when you `cat META`.
fez is the only eco that forces your username and `auth:` in your meta to match. on cpan i can uploading anything and spoof your auth info to make it look like you made the module. 18:39
18:53 _ed joined 18:58 _ed left 19:13 ufobat joined 19:26 slu joined 19:27 Altai-man joined 19:30 Altai-man left 19:39 _ed joined 19:43 nirnam joined 20:11 ufobat left 20:26 monkey_ joined 20:43 _ed left 20:49 RandalSchwartz joined
nirnam I'm surprised that '→' didn't work as '->' for for by default 21:09
tbrowder tonyo: my module is ready to publish...bon voyage... 21:10
leont nirnam: yeah, I ran into that as well recently 21:14
21:14 _ed joined
tbrowder it reports it's uploaded, but i got an error message about version number problems... 21:15
japhb tbrowder: did you use '*' in your version? That's a no-no ...
nirnam leont: pretty sure → can work as -> by just line of raku
leont You can't really add it as an extension, I think it would have to go into the main grammar 21:16
tbrowder no, just what mi6 provided: 0.0.1
leont It's not merely an operator, it's actual syntax
japhb tbrowder: Huh, what was your error? 21:18
tbrowder unfortunately i didn't capture it. 21:20
21:20 _ed left
tbrowder it looks like i will have to manually increase the version info, 21:20
for the next release, is that correct? 21:21
21:22 monkey_ left
tbrowder also, fez did not update the Changes file as mi6 does. that kind of info needs to be in the Fez README 21:23
21:24 Sgeo_ joined 21:28 chronon joined, Sgeo left
tbrowder huzzah! new module 'Modf' shows up on the modules list and it links to the repo ok 21:29
21:31 chronon left 21:32 chronon joined
moon-child you can't use ⇒ for => either 21:38
nirnam → ⇒ in vim write the same way as -> => just begin <C-K> too 21:40
moon-child ?
nirnam vim?
moon-child oic
I use compose for ⇒ and apl keymap for → 21:41
nirnam oh, just saying in vim there are basically same thing
would be nice to have apl keymap as second layer tho, there're so many unicode commonly use in math in there 21:42
J programming took a hard left and make it ascii to me it just make it more confusing 21:43
moon-child m: say [<a b>, <c d>].map(&infix:«=>»∘&slip).Hash 22:42
camelia {a => b, c => d}
moon-child is there a more concise way to do ^^?
(turn a list of kv pairs into a hash) 22:43
Juerd m: Hash.new(@kv) 22:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@kv' is not declared. Did you mean '&kv'?
at <tmp>:1
------> 3Hash.new(7⏏5@kv)
Juerd m: my @kv = [<a b>, <c d>]; Hash.new(@kv)
camelia ( no output )
Juerd meh.
Oh, duh
22:59 Sgeo_ left, Sgeo joined
Juerd Hash.new: @kv.map: { [=>] @$_ } is the cleanest I can come up with but I think we're missing something really obvious. 23:08
hash @kv.map: { [=>] @$_ } is slightly shorter 23:09
But the map/reduce/@ is fugly.
moon-child m: say hash [<a b>, <c d>].map(&slip)
camelia {a => b, c => d}
Juerd Doable
moon-child ehh 23:10
tacit is better than explicit, but map(&slip) just feels wrong
23:36 tejr left 23:42 tejr joined
nirnam what the raku equivalent to perl <<~ operator? 23:54
23:56 andinus` joined, dg left 23:57 andinus left, dg joined, Ulti left 23:58 Ulti joined