🦋 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:04 Doc_Holliwood left 00:28 thundergnat left 00:40 parv left 01:15 kvw_5_ joined 01:18 kvw_5 left 01:42 mowcat left 01:58 defaultxr left 02:01 defaultxr joined 02:05 asymptotically left, asymptotically joined, Doc_Holliwood joined 02:15 Sgeo left, Sgeo joined 02:18 Doc_Holliwood left 02:19 Doc_Holliwood joined 02:23 Doc_Holliwood left 02:28 neshpion joined 02:50 abraxxa left 02:52 abraxxa joined 03:32 aborazmeh joined 04:00 ilogger2 joined 04:30 mahafyi joined 04:36 aborazmeh joined 04:58 abraxxa joined 05:01 abraxxa left 05:03 abraxxa joined, sno joined 05:08 aborazmeh left 05:10 aluaces joined 05:15 jmerelo joined 05:58 jmcgnh joined 06:07 abraxxa left 06:11 wamba joined, abraxxa joined 06:24 mahafyi left 06:30 sno left 06:31 sno joined, domidumont joined 06:36 mithaldu_ joined, peteretep joined, Grinnz joined, spycrab0 joined, kawaii joined 06:37 zostay joined 07:01 dpk joined, parv joined 07:07 abraxxa left 07:08 abraxxa joined 07:23 rindolf joined 07:32 pecastro joined
andinus i have an array ((yes, 0), (no, 1), (apples, 0), (test, 10)) -- in such format & i only want to loop over those whose [1] is greater than 0 07:35
currently i'm just doing for @ar -> ($t, $frequency) { next if $freq == 0}
is there a better way to do this? i was thinking something like .map(*.[1] > 0) 07:36
07:42 Geth joined
lizmat .grep 07:43
for @ar.grep(*[1] > 0)
this also feels like you'd maybe want a Bag 07:44
07:50 dakkar joined
andinus ah, yeah grep is what i wanted 07:52
i'll checkout bag
moon-child honestly grep is a really bad name 07:53
lizmat yup
andinus also i'm performing some operations on a string twice, should i just store it in a var instead? it'll be very short lived
$file.Str.split('.password-store/').tail.split('.gpg').first; -- this is the operation
lizmat andinus: do you worry about performance or about development time ? 07:54
andinus i dont care about performance
lizmat then don't worry about doing something twice if it makes sense to you
andinus but is it good practice to do it twice?
lizmat well, good practice is DRY: Don't Repeat Yourself :-) 07:55
andinus iirc when i looked at raku reports lots of shortlived vars slowed it down or something
lizmat which reports ?
andinus raku --report thing 07:56
oh i mean profile
moon-child really? That's interesting
compilers usually love lots of short-lived vars
makes register allocation a doozie 07:57
andinus i wrote a bit here - andinus.nand.sh/aoc/2020/day-11/#orge284bbb
hmm maybe i'm misremembering it
i'll run the profile again then on this script 07:58
^ over there i was declaring an array lots of times, changing it to a state variable improved the performance 07:59
moon-child oh, yeah, that'll be slow
because you have to allocate space for it
andinus woudlnt the same apply to lots of short lived vars? 08:00
08:00 dpk left
moon-child depends on how big they are 08:01
and if escape analysis lets you put them on the stack
08:01 dpk joined
andinus i see, in my case they'll be less than ~15chars 08:02
08:03 aborazmeh joined
andinus i think i'll just create a var, looks neater 08:03
08:10 sena_kun joined 08:16 donaldh joined 08:44 aborazmeh left 09:47 evalable6 joined, linkable6 joined 10:36 natrys joined 10:42 aborazmeh joined 10:43 xelxebar joined
sena_kun codesections, ping? 11:02
11:08 parv left 11:16 aluaces left 11:48 brtastic joined 11:56 abraxxa left 11:58 brtastic1 joined 11:59 brtastic left, brtastic1 is now known as brtastic 12:00 abraxxa joined 12:04 aborazmeh left
codesections sena_kun: hey 12:07
sena_kun codesections, hi. How busy are you lately to look at the CLI regression ticket? We have it as a release blocker, so if not a solution, I'd be happy to see at least under your control as you know better how should the revert go if we resort to it. 12:08
Oops, sorry. 12:11
*to see at least _a revert_ under you control
codesections this is github.com/rakudo/rakudo/issues/4278, I guess? Oh, I didn't see that I'd been marked as the assignee; I had taken a look before and thought that I/we decided the issue was upstream of that code. But I can dig a bit more 12:13
from the issue: "My best guess is that there's some setup/prep/pre-req sig/cap steps that are not being done" 12:14
sena_kun codesections, yes, this ticket. Well, even if the upstream is arguably bogus, I'd still prefer us not to break it.
codesections That's also my best guess, which means the bug likely comes from code I don't know well. But I'll take a look 12:15
sena_kun So either it is a patch to make it work again or a revert with an introduced deprecation warning on how to do it.
codesections, thank you very much for your efforts!
codesections yes, agreed, not breaking things there is the goal for sure
What's the timeline for the next release? 12:16
sena_kun releasable6, status
releasable6 sena_kun, Next release in ≈3 days and ≈6 hours. 2 blockers. 0 out of 174 commits logged (⚠ 1 warnings)
sena_kun, Details: gist.github.com/fb14089a4478c57be9...bd3c991a08
sena_kun codesections, sorry, I assumed you know about the ticket and just busy. :( 12:17
codesections I had seen it/been part of the conversation. I just moved on when we concluded it wasn't my code, and missed that I'd been assigned. My 12:18
*my bad
12:18 aborazmeh joined
sena_kun No problem as long as we can conclude to some solution. :) 12:19
12:25 aborazmeh left 12:56 abraxxa left 12:57 abraxxa joined 13:04 mowcat joined 13:11 jmerelo left 13:24 defaultxr joined 13:27 mowcat left
ugexe I don’t think we concluded there was anything wrong with the code, and I believe Leon said he was having second thoughts on his original comment 13:30
13:36 aluaces joined
ugexe colabti.org/irclogger/irclogger_lo...04-11#l249 13:37
codesections ugexe: yeah, I didn't think there was anything wrong with the calling code. (Well, not _wrong_, anyway -- I wouldn't personally be comfortable with a default argument that calls Date.today in the parameter constructor, but I admit it's valid code). I do think, however, that the true cause of the issue is likely to be in depths of Bootstrap where I haven't yet ventured and where I may not be able to find it. But, even if I can't 13:59
the root bug creating the Mu, I should at least be able to handle an absent value without throwing an exception
jdv79 it has nothing to do with Date per se 14:06
colabti.org/irclogger/irclogger_lo...04-10#l403
codesections jdv79++ Thanks for that link; it provides a helpful second test case. But yeah, I didn't really think it was Date-specific 14:10
14:11 wamba left 14:21 Sgeo joined 14:26 wamba joined 14:32 aborazmeh joined 14:48 linkable6 left 14:50 linkable6 joined
codesections Ok, I have a PR for the issue that "fixes" it in the most simplistic way possible -- with try blocks around the two statements that were throwing. The semantics of that actually work OK; it's treating those values as non-required, which is right (because they have default args). But I still think there's a deeper pre-existing bug in Bootstrap that was causing those values to be Mu when they shouldn't have been 14:51
14:57 parabolize joined
jdv79 what would be pointing towards a bug in bootstrap? iirc the new code is running a where block without the requisite setup. 15:04
like fetching a default value, doing a corercion, and probably other stuff that the "bind" code does before running a where block 15:06
sena_kun codesections++ 15:07
15:11 aborazmeh left
codesections jdv79: maybe there isn't a bug in the bootstrap code, then -- as I said, I don't know that code well, so maybe it's working as intended. I just meant that the introspection code in Main.pm6 throws when the same introspection code doesn't throw in island 15:15
s/island/userland code/ 15:16
jdv79 cute fix
codesections when I said "most simplistic way possible", I meant it :) 15:17
jdv79 i'm pretty sure that's my fault. sorry about that. i could have golfed it better as ugexe did - colabti.org/irclogger/irclogger_lo...03-30#l295 15:21
anyway, thanks. $work&
15:25 softmoth joined 15:51 brtastic left 16:05 domidumont left 16:07 jmerelo joined 16:11 aborazmeh joined 16:36 dakkar left 16:38 wamba left 16:39 aborazmeh left 17:08 abraxxa left 17:10 abraxxa joined 17:13 aluaces left, wamba joined, mowcat joined 17:37 aluaces joined 17:40 maggotbrain joined 17:42 abraxxa1 joined 18:10 jmerelo left 18:13 Xliff joined 18:20 abraxxa1 is now known as abraxxa-home, MasterDuke joined 18:31 domidumont joined 18:32 softmoth left 18:34 asymptotically joined 18:48 aborazmeh joined 18:53 aborazmeh left, aborazmeh_ joined 18:57 squashable6 joined 18:58 webstrand joined 19:01 redhands joined, asymptotically left 19:04 neshpion joined 19:06 brtastic joined 19:14 aborazmeh_ left 19:17 dwarring joined 19:19 abraxxa left 19:20 abraxxa joined 19:26 lucasb joined 19:30 MasterDuke left
El_Che weekly: www.nntp.perl.org/group/perl.perl5...59867.html (perl 6 reference, ed. note: this B. Estrade sounds like a troll to me) 19:40
notable6 El_Che, Noted! (weekly)
El_Che Not more than a few months passed 19:41
after perl6 was renamed to Raku, that the "perl 7" initiative. Why? This
was done either out of ignorance or purposefully to kick the perl
community when it was down.
<sigh>
Grinnz fwiw, I don't believe he was purposely trolling, just underinformed and enthusiastic 19:43
19:44 mowcat left
El_Che Grinnz: "NEVER, EVER consider a major version change EVER, EVER, EVER AGAIN; it inviting cancer" 19:45
the gay/gal may be underinformed and over-enthousiatic but (s)he has a latent talent for trolling 19:46
Grinnz yeah, very evocative statements
quick backpedaling when responded to though
tonyo there are some decent points in that hog slop, though likely accidental. 19:48
19:49 dataangel joined
El_Che in a "room full of monkey with typewrites and a perl program"type of way :) 19:51
19:52 aborazmeh joined
ugexe B Estrade is not a troll. I work with them. 19:53
El_Che good to know, better to assume the best of people 19:54
20:05 domidumont left 20:06 domidumont joined, domidumont left, Black_Ribbon joined 20:10 dwarring left
codesections since you know them, I'll 100% accept that they're not trolling. But in that case, I find their arguments baffling. As someone who was never part of the Perl community, I thought they were upset with us for having the name Perl6 for so long because it was blocking their upgrade path. Now that we're out of the way, why *wouldn't* they bump the version? JS, Ruby, and C++ have all had several version bumps in that time 20:14
20:15 natrys left
codesections I mean, I don't really care what they do either way. I'm just unsure what their issue with Raku was, if they didn't even _want_ to go to a new major version 20:15
tonyo they want to go to a new version and they're going with p7 20:17
codesections yeah, I know. Sorry, my choice of pronouns was unclear 20:18
El_Che codesections: I don't think the person in question is very representative of the perl community
codesections fair
I guess I'm wanting to treat "angry Perl programmers" as a cohesive group and expecting that group to have coherent positions -- which is obviously absurd of me to do; they can all be disgruntled about different things without needing to agree with each other or anything 20:20
El_Che well the perl 6 thing is gone, some people may hold a grudge, but itś mostly in the past 20:22
Grinnz codesections: we certainly are (all disgruntled about different things) :)
codesections :)
20:24 abraxxa left 20:26 abraxxa joined 20:27 aborazmeh left 20:59 parv joined 21:15 pmurias joined
guifa pmurias: not sure if you saw it, but someone was asking about Raku on JS over on reddit 21:16
I gave a very meh answer, but did direct them your way 21:17
pmurias guifa: just saw it, I don't follow the raku reddit anymore, mostly looking at the Raku community from time to time for old times sake 21:19
21:32 brtastic left
pmurias answered the question 21:35
I kind of got burned out with the rakudo.js (at the end was mostly doing it just to finish the grant so the whole thing wouldn't be failure) so I'm not that motivated to work on the *mountain* of work needed to get it to perform efficently 21:37
codesections pmurias++ I hope I didn't sound too snarky in my Redit comment re: the size -- I was surprised at how big it was, but I was even more surprised at how well it worked. I hadn't realized that it was far enough along to be actually usable 21:38
If someone wanted to pick up the project of Raku-on-the-frontend again, do you have a sense of whether it would make more sense to target a JS runtime vs a WASM one? 21:40
guifa pmurias: I mean, based on what I saw with the Java one, there are extreme limitations on what can be expected. And Java and that JS library are far more mature than Raku and Rakudo.js. But Java on JS was still crazy slow 21:41
pmurias codesections: it's a common question 21:42
compiling MoarVM to WASM seems like a relatively easy way to get a pretty slow but functional rakudo in the browser 21:43
going to JS seems to be like a ton of more work but something that could get better results 21:44
moon-child in js it's _possible_ for the browser to devirtualize method calls
codesections interesting -- that is *not* the answer I was expecting! 21:45
moon-child but js only has single dispatch
so idk how useful that is in practice
codesections I was expecting WASM to be the more-work-but-higher-theoretical-perf option
moon-child www.usenix.org/system/files/atc19-jangda.pdf 21:46
codesections yeah, I've seen things like that before (though not that one in particular, which I've bookmarked to read later, thanks) 21:50
21:51 rba_ joined 21:52 rba_ is now known as rba
codesections And v8 is impressively fast. But so much of its speed comes from jit targeted very much at the sort of JS people actually write (i.e. mostly monomorphic), so I wasn't sure how much that'd help Raku 21:52
21:56 aluaces left, MasterDuke joined 21:57 rindolf left 22:05 pmurias left 22:26 abraxxa-home left 22:39 softmoth joined
codesections m: my Bool $b = True; $b--; say $b # I hadn't realized that this worked. Handy 22:42
camelia False
guifa Definitely not a default enum behavior, interesting 22:45
codesections on the other hand, it almost seems like you should be able to shorten $b = !$b like you can shorten $a = $a + 5 22:47
but $b != means something else :) 22:48
summerisle moon-child: RE single dispatch in JS, the way I see JS transpilation working is via modeling the MOP and treating method calls sort of like a message. So the JS representation of an object would have one "true" method, that is called whenever any method is called. Of course, this would be difficult to call from other JS, and like you said - tranlation to JS is not straightforward. 22:52
moon-child summerisle: if you do that then I think you give up any hope of devirtualization 22:55
codesections: how's that different from just $b = False, though?
codesections moon-child: $b-- you mean? It's not, really, other than being an expression rather than a statement and being shorter 22:57
if I have a sub with the signature sub f($req, Str $opt?) {...} and later it's called with f($a, $b), what value can I put in $b to have it act like I called f with one argument? 23:14
(I was thinking Empty did that, but that passes a slip)
ugexe Str 23:16
well no i doubt thats what you want heh
[Coke] Nil? 23:22
23:23 wamba left
ugexe 'Str' works to just fill the parameter with an undefined value. but it wouldn't like disappear if you did &f.assuming(1,Str).assuming("mystring") 23:23
codesections yeah, and it also won't cause a default argument to get used 23:30
23:31 abraxxa left
ugexe just need //= in signatures 23:33
need to implement^ 23:34
23:34 abraxxa joined
codesections "implement" as in that's a planned/spec'ed/agreed on bit of syntax? Or just something that'd be nice? 23:35
23:36 lucasb left 23:37 b2gills joined 23:46 pecastro left