🦋 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: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku
Set by lizmat on 21 April 2021.
00:04 Geth left 00:06 simcop2387 left, simcop2387_ joined 00:11 clarjon_1 is now known as clarjon1 00:54 simcop2387_ left, simcop2387_ joined, simcop2387_ is now known as simcop2387 00:55 neshpion left, neshpion joined 01:04 kvw_5 joined 01:08 kvw_5_ left 01:31 lucasb left 01:40 [Sno] left 01:41 [Sno] joined 01:46 [Sno] left 01:47 [Sno] joined 02:03 ggoebel left 02:44 ribasushi joined 03:38 kurahaupo_ joined 03:40 kurahaupo left 03:47 wamba joined 03:52 clarjon1 left 04:05 mahafyi joined 04:36 wamba left 04:42 [Sno] left 04:45 wingfold joined, wingfold_ left 04:48 [Sno] joined 04:51 kurahaupo_ left, kurahaupo joined 05:12 neshpion left 05:15 guifa2 left 05:19 [Sno] left 05:21 [Sno] joined, dataangel left 05:26 jmerelo joined 05:37 MasterDuke left 05:51 wamba joined 05:57 aindilis left 05:58 ufobat__ joined 05:59 wamba left 06:06 parabolize left 06:10 domidumont joined 06:28 grumble joined
El_Che Xliff: is your network faster than your disk? 06:31
tellable6 El_Che, I'll pass your message to Xliff
07:07 pecastro joined 07:18 mahafyi left 07:30 brtastic joined 07:40 Sgeo_ left 08:04 brtastic1 joined 08:05 brtastic left, brtastic1 is now known as brtastic, aborazmeh joined 08:22 abraxxa left, [Sno] left 08:23 [Sno] joined 08:24 abraxxa joined 08:30 sena_kun joined 08:36 wamba joined
lizmat :q 08:39
tellable6 2021-04-23T02:00:34Z #raku-dev <vrurg> lizmat gist.github.com/vrurg/a608e01a44e5...nt-3716606
08:47 |Sno| joined 08:50 [Sno] left 08:51 kurahaupo left 08:52 kurahaupo joined 08:56 Geth joined 09:05 abraxxa left 09:06 abraxxa joined, abraxxa left 09:22 rindolf joined 09:24 PimDaniel joined
PimDaniel \o 09:24
ça va?
How may i sort a hash by a part of his key? 09:25
My has has : these kind of keys : '33:A/B' , '9:Y/Q' '117:C/G' and i need to sort by the first number befor the ':'. 09:27
*My hash...
lizmat do they need to sort as number or as string ? I assume as number ? 09:28
PimDaniel Number 09:29
lizmat and are they always Int?
PimDaniel YES
lizmat %hash.sort: *.split(":").head.Int 09:30
%hash.sort: *.key.split(":").head.Int
PimDaniel From the lower to the bigger. They just can be many with the same number.
09:30 Geth left
brtastic m: sub (@arr) { @arr.push(5).say }((1, 2, 3)) 09:30
camelia Cannot call 'push' on an immutable 'List'
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
brtastic how do I make this argument into Array?
lizmat [1,2,3] 09:31
m: sub (@arr) { @arr.push(5).say }([1, 2, 3])
camelia [1 2 3 5]
brtastic without changing how it's called, I mean
lizmat m: sub (@arr is copy) { @arr.push(5).say }((1, 2, 3))
camelia [1 2 3 5]
brtastic ah cool
09:32 aborazmeh left
brtastic I also know this way: 09:32
m: sub (*@arr) { @arr.push(5).say }((1, 2, 3))
camelia [1 2 3 5]
brtastic is it any different?
PimDaniel This is to display hash and i must display the whole key. 09:33
lizmat brtastic: that's a slurpy hash, that would also work with any number of positional arguments
m: sub (@arr) { @arr.push(5).say }(1, 2, 3) 09:34
camelia Too many positionals passed; expected 1 argument but got 3
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat m: sub (*@arr) { @arr.push(5).say }(1, 2, 3)
camelia [1 2 3 5]
lizmat note the missing extra ( ) around (1,2,3)
brtastic ah right, I see
thanks lizmat++
lizmat but you appeared to want a list as a paramater, not just any number of parameters 09:35
PimDaniel I'd expect this kind of form : for %hash.sort(<condition>) -> $k { ...}
brtastic yes, I wanted to pass in a list as an object and make it into something mutable without declaring another variable
PimDaniel My question was not enought precise.
lizmat %hash.sort: *.key.split(":").head.Int -> (:$key) { # PimDaniel ?
brtasticL: then the "is copy" is your thing 09:36
PimDaniel I don't understand why -> (:$key) and *.key.split : you mean *.keys.split ? 09:38
lizmat m: my %h = a => 42; for %h -> (:$key, :$value) { dd $key, $value } # PimDaniel 09:39
camelia "a"
42
lizmat the (:$key, :$value) deconstructs the Pair from "for %h" 09:40
.sort takes a Callable: if that takes one parameter, it will do a Schwartzian Transform under the hood
PimDaniel Yess but why should we have a pair if we start with keys? 09:41
lizmat where do we start with keys ?
PimDaniel %hash.keys, no?
lizmat m: my %h = a => 42, b => 666; dd $_ for %h
camelia :a(42)
:b(666)
lizmat iterating over a hash gives you Pairs
m: my %h = a => 666, b => 42; for %h.sort( *.value.Int ) { dd $_ } 09:43
camelia :b(42)
:a(666)
PimDaniel keys function returns a list, no?
lizmat technically a Seq, yes
but I didn't use .keys in my examples ?
I used .key on the Pair
PimDaniel No, not you. 09:44
lizmat ah
PimDaniel Well this is what i wanted to use.
This is what i use now.
But not sorted. 09:45
Since/If we use .keys this is the same question as sorting a list , you are true, but i want to display the original keys into loop. 09:47
09:48 sftp joined
lizmat is unsure of who PimDaniel is talking to or what PimDaniel wants 09:51
09:57 PimDaniel left 10:00 PimDaniel joined 10:04 LizBot left
PimDaniel lizmat: Ok sorry! i'm not clear as usual: Your solution work when applied like this: i just wanted to sort keys by a part or the key : pastebin.com/RkepsC9T 10:04
10:04 LizBot joined, skaji_ joined
lizmat if you replace: 10:05
{$^a.split(':').head.Int <=> $^b.split(':').head.Int}
by:
{$^a.split(':').head.Int}
it will also work :-)
because *then* it does a Schwartzian Transform under the hood
and: 10:06
PimDaniel Okay thank you! I'll try it!
lizmat {$^a.split(':').head.Int}
can be written as:
*.split(':').head.Int
10:07 aborazmeh joined
PimDaniel lizmat : It works! thank you very mutch. 10:08
lizmat: I suppose the Schwartzian Transform reduces the sort function to the shortest equivalent? 10:13
lizmat it makes the comparisons cheaper by doing the extraction of the value only once for each value, instead of two times for each comparison 10:15
PimDaniel haaa, it's better though! 10:17
Merci à plus tard. 10:20
10:20 PimDaniel left 10:34 unicodable6 joined 10:43 solitario left
demostanis[m] MoarVM is signed by alexander.kiryuhin? Who's that> 10:47
lizmat sena_kun alias Altai-Man
trusted co-worker of Jonathan Worthington 10:48
demostanis[m] Oh ok, is there anything on the MoarVM website which says which key the binary is signed with? 10:49
lizmat not sure, you should probably ask that on #moarvm :-) 10:51
10:51 Kaiepi left 10:52 Kaiepi joined
demostanis[m] I still can't post in there with matrix 10:55
10:56 Kaiepi left 11:05 leah2 joined 11:06 natrys joined 11:09 lizmat is now known as lismat, lismat is now known as lizmat 11:14 |Sno| left 11:15 LizBot left, LizBot joined 11:19 |Sno| joined 11:26 |Sno| left, |Sno| joined 11:36 |Sno| left 11:37 |Sno| joined 11:43 |Sno| left 11:44 |Sno| joined 11:51 |Sno| left 11:52 |Sno| joined
andinus are spaces allowed in tags (META6.json) ? 12:04
lizmat feels like a bad idea to me 12:13
andinus one of my modules has a few tags with spaces, i uploaded it to PAUSE a few days ago but don't see it listed on modules.raku.org 12:14
could it be because of the spaces?
12:19 dogbert17 joined
lizmat what's the name ? 12:20
andinus orion : github.com/andinus/orion
12:21 dogbert11 left 12:23 dogbert11 joined
lizmat andinus: how did you make it known to the ecosystem that you're module is a part of it? 12:23
did you upload to PAUSE ? used fez ? I don't see it in the ecosystem repo either
andinus uploaded it to pause under Perl6 dir 12:24
file: $CPAN/authors/id/A/AN/ANDINUS/Perl6/orion-0.2.0.tar.gz
12:25 dogbert17 left
lizmat did you upload directly to that directory ? 12:26
andinus yes 12:27
lizmat hmmm... you didn't use a tool such as App::Mi6? 12:28
I think it may have somehow bypassed some checks
the storing in Perl6 sub directory should be handled by PAUSE
andinus no, i used the web portal 12:29
lizmat ok, this is a new module, perhaps it's easier to use "fez" to upload to the ecosystem
andinus i see, i've tried fez before but it ends with some git+tar not found error
lizmat ah... hmmm 12:30
andinus i havent reported this yet. its on openbsd, i have both git and tar in $PATH
lizmat since you do have a PAUSE login, then maybe App::Mi6 is something for yiou
it handles all of that stuff for you with "mi6 release"
andinus i see, i'll check it out, thanks
12:31 aborazmeh left
demostanis[m] <andinus "orion : github.com/andin"> Is this an app to decrypt and send all your passwords to some website? lol 12:36
andinus it doesn't send your password but just the first 5 chars of the hash of your password 12:39
demostanis[m] How would it know if your password has been compromised then?
andinus they return a list of all the hashes starting with those chars and we just check it locally 12:40
demostanis[m] smart 12:41
12:51 jmerelo left 12:53 PimDaniel joined 12:57 aborazmeh joined, wamba left 12:59 patrickb joined 13:01 brtastic left, brtastic joined 13:03 mahafyi joined
lizmat Question: should a module that reads log files made by the Colabti logger, be called Log::Colabti or Colabti::Log or ? 13:03
hmmm. I guess IRC::Log::Colabti 13:08
Juerd IMHO the whole public namespace hierarchy doesn't work anyway. Different people would answer this question differently and there's no official guidance. 13:13
lizmat true 13:14
I guess I'm more searching for the best SEO
Juerd Looking at the Perl modules on CPAN, there's decades worth of irregularities :)
lizmat IRC::Log::Colabti seems to fit that best, I thing
13:14 ggoebel joined
lizmat *think 13:14
Juerd For SEO anything you put in the NAME section will work, including the description 13:15
lizmat right :-) 13:16
13:17 wamba joined 13:20 PimDaniel left
masak good localtime, #raku 13:25
moritz \o masak, long time no see!
... which reminds me of a terrible pun 13:26
masak public namespace hierarchies are ultimately futile and inconsistent -- but maybe still a net good...?
moritz why is "dark" spelled with a "k"? because you cannnot "c" in the dark... :D
masak (directed at Juerd's comment above)
moritz: :D
moritz: indeed, 好久不见了 13:27
huh, that didn't roundtrip well.
El_Che Public namespaces do indeed sound like a Perl artifact 13:28
masak logs picked it up OK, though
El_Che: I was always fascinated by the Newspeak language's stance: "there is no global namespace, because global namespaces don't make sense" 13:29
never quite did find out how they pulled that off, though
moritz with a global numberspace? :-) 13:30
masak Joe Armstrong had this idea that if you normalized and hashed your code, you wouldn't need to name it at all. he never got around to realizing that idea, though
moritz: I think the topologists might be onto something. they'd suggest just having a global space 13:31
masak .oO( though if the space were pointed, they would have a point ) 13:32
moritz you can also have local spaces, then you just need routing that depends on the local enviornment
just like email in the early days, where (allegedly) you'd have to tell the servers the next hop, or maybe even all of them, to deliver that mail 13:33
masak I'd prefer it if spammers had to do it that way
El_Che masak: you'd get more personal spam that way 13:36
and we may buy stuff once in a while if they go that extra mile :)
masak moritz: in the past week or so, I've been trying to imagine designing Sokoban, but with all the interacting sprites in the game (player character, walls, floor tiles, boxes) being Hewitt actors or CSP processes 13:38
seems like a non sequitur perhaps, but I was reminded of that when you said "local sapces" and routing based on the local environment :) 13:42
spaces*
El_Che you plan to release it?
masak only if I get around to implementing it 13:43
El_Che lol
a mario clone is popular
masak I have an extremely high idea/execution ratio
El_Che you could use one and say it's Larry
It's a Larry
masak .oO( Super Wallio ) 13:44
El_Che Walluigi
and I didn't have to invent that one
en.wikipedia.org/wiki/Waluigi 13:45
masak I'm aware of Waluigi :)
Juerd: if you got to redesign the CPAN namespace hierarchy from scratch -- like, wave a magic wand and make everything in a certain way, including all the legacy and inconsistent stuff -- what would you do? 13:48
moritz I know the question wasn't direct at me, but the first thing I'd do is to get rid of the mismatch between LWP:: and libwww- 13:49
and maybe call it something starting with HTTP::Client 13:50
masak provocative/radical question: does it need names at all? (I guess, in the spirit of Joe Armstrong) 13:52
what if there was a good enough search engine, that took you to the right module, based on its description or something. not its name.
lizmat
.oO( who needs names if you have numbers )
404 for the win!
masak yes, like that, but in all seriousness
are the names necessary? 13:53
maybe they are more of a social thing...?
lizmat well, suppose wines would work that way
.... savouring a nice 4573562 right now!
masak I don't see why not
except less sentimental, perhaps
lizmat: clearly you don't love numbers as much as I do :D 13:54
I guess I can see the social/sentimental use of names
like, the name "Dancer" turns into kind of a meme or nodal point for people's interest 13:55
lizmat en.wikipedia.org/wiki/The_Prisoner # I'm a not a number!
masak lizmat: I actually watched the 60s series. weird, occasionally good.
lizmat yeah, too bad the ending was meh because the funding had dried up 13:56
masak lizmat: I groaned when he crashed the 60s supercomputer by inputing the question "why?"...
moritz writes down "lizmat is NaN"
masak lizmat: what do you mean, the ending was awesome :P
lizmat but which NaN ?
masak .oO( and once you identify which one, how will you know? ) 13:57
tadzik . o O ( do you want some bread? Yes, NaN bread please ) )
lizmat the ending was hacked together really, it was never intended to end at 17 episodes
masak tadzik! \o/
moritz the bread one 13:58
tadzik masak! \o/
moritz dammit, I wasn't fast enough
\o tadzik
tadzik moritz o/
masak we have to stop meeting like this.
moritz #perl6 reunion day? :D
masak or maybe meet like this more often
tadzik hm, I barely greet people because I always assume that we're just always there, even if we don't talk a lot :P 13:59
sjn moritz: looks like a #perl6 reunion day, yes :)
masak tadzik: actor-based sokoban, what do you think?
tadzik masak: only if it's tracking your eyes and the stones move by themselves when you're not looking
masak sjn! \o/
sjn masak! \o\ \o/ /o/ 14:00
masak tadzik: "boxes" :)
tadzik though there might be a geneva convention that forbids this
masak: I was thinking outside of the boxes :P
masak nowadays, if something is tracking your eyes, it would be to train a neural net for something
tadzik: ah, you iconoclast
tadzik I'd welcome someone reclaiming it and turning it into something fun rather than exploitative 14:01
masak wait, sokoban is exploitative?
masak .oO( won't someone think of the poor warehouse managers? )
moritz eye-tracking sokoban could be :D
masak .oO( sokoban as a metaphor for working at an amazon warehouse ) 14:02
moritz combined with micro transactions to make it more bearable
masak .oO( "my boss pushes me, I push these boxes. the boxes don't push anything." )
moritz: I didn't come here to have my game idea destroyed like this. 14:03
masak looks around for the "throw table" emoji
14:04 brtastic1 joined
moritz :tableflip: ? 14:04
masak ah, yes
moritz oh wait, this is neither rocketchat nor discord :D
14:04 brtastic left, brtastic1 is now known as brtastic
masak haha 14:04
don't worry, my neural software compensated
it's like when someone types out \infty 14:05
it kind of looks like a lazy eight to me, don't know how
tadzik masak: here, take this: (╯°□°)╯︵ ┻━┻ 14:06
moritz but one set in Computer Modern, right masak? :D
masak naturally.
masak softly breaks the fall of tadzik's table with his body
tadzik: ow. 14:07
tadzik . o O ( over here, mister president! ) 14:08
14:19 brtastic1 joined 14:21 brtastic1 left 14:24 |Sno| left 14:26 sno joined, Sgeo joined 14:35 ufobat_ joined 14:37 parabolize joined, ufobat__ left 15:03 sno left 15:06 sno joined 15:22 aborazmeh left 15:28 jmerelo joined 15:45 Merfont joined 15:57 brtastic left 16:25 Merfont left 16:27 Kaiepi joined 16:30 epony left 16:33 sno left 16:34 sno joined 16:42 sno left 16:45 sno joined 16:50 domidumont left 16:54 sno left 17:02 wamba left 17:06 epony joined 17:14 wamba joined, stoned75 joined
stoned75 commit: releases ('a' ^..^ 'f').list.say 17:14
committable6 stoned75, ¦releases (52 commits): «(b c d e)␤» 17:15
17:18 softmoth_ joined 17:22 Black_Ribbon joined 17:45 stoned75 left 17:53 softmoth_ left 18:06 jmerelo left 18:10 wamba left 18:19 wamba joined 18:44 vrurg left 18:47 ufobat_ left 18:51 vrurg joined 18:53 stoned75 joined 18:57 vrurg left 19:04 abraxxa joined 19:14 sftp left 19:18 wamba left 19:23 simcop2387 left, simcop2387 joined, simcop2387 left, simcop2387 joined 19:46 wamba joined 19:48 aborazmeh joined 19:54 sno joined
demostanis[m] How long does it take you guys to install Rakudo Star, compiling every component + modules? 19:56
El_Che (I can't answer because I don't use it) 19:59
20:06 aindilis joined 20:26 sno left 20:31 guifa2 joined 20:32 sno joined 20:40 sno left 20:41 sno joined, Kaiepi left 20:47 aborazmeh left, patrickb left, abraxxa left 20:51 sno left, Kaiepi joined 20:59 epony left, sno joined 21:00 clarjon1 joined 21:14 stoned75 left 21:28 vrurg joined 21:29 softmoth_ joined 21:30 MasterDuke joined 21:33 vrurg left 21:47 Kaiepi left 21:50 vrurg joined 21:52 Kaiepi joined 21:58 epony joined 22:02 sno left, Kaiepi left, Kaiepi joined 22:03 sno joined 22:04 natrys left 22:08 sno left 22:09 sno joined 22:13 dogbert17 joined, dogbert12 joined 22:16 dogbert11 left 22:18 dogbert17 left 22:19 mahafyi left 22:20 Kaiepi left, Kaiepi joined 22:28 rindolf left 22:42 wamba left 22:44 softmoth_ is now known as softmoth 22:48 dogbert17 joined 22:51 dogbert12 left 22:52 dogbert17 left, dogbert17 joined 22:59 dogbert11 joined 23:00 dogbert17 left 23:32 oneeggeach joined 23:36 aborazmeh joined
summerisle demostanis[m]: if it's any help (it probably isn't) it takes 2 minutes and 12 seconds to compile the rakudo distribution from Gentoo, this is with 56 threads on a 64 thread host. 23:38
23:47 swaggboi left 23:52 swaggboi joined, pecastro left