🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
00:00 jgaz left, reportable6 left 00:01 reportable6 joined, jgaz joined
nemokosch if you wouldn't have expected it then all hope is lost, pretty much 00:03
there are like 5 people who dare to touch code like that, you included
MasterDuke eh. i've never claimed to have a truly deep understanding of things. i sort of operate on the principle that wild experimentation can get you far when test coverage is decent 00:06
with a new change i've just managed to make it not any faster, but wrong 00:07
i once was scared to even try touching compilers, etc. but then i realized they're just code. and i can modify code 00:08
nemokosch either way, you are among the very few people who are managing with a pretty thankless job so... thank you, I guess 00:09
everybody who commits to MoarVM should be compensated at this point tbh
MasterDuke i mean i wouldn't say no. but i do find it fun regardless 00:10
nemokosch John Benediktsson is also one of a kind, for sure... I don't know how he even knows NQP, like is it possible that somebody starts writing compiler code in a highly unfamiliar language only going by common sense... 00:13
MasterDuke but that's kind of what i mean. there's nothing terribly "compiler" specific about that code. it's just an implementation of an algorithm for generating combinations 00:35
nemokosch yeah but even nqp ops are kind of underdocumented 00:37
MasterDuke sure, it's not quite as simple as the pseudo-code in a wikipedia article, but it's not as specific as assembly for one particular architecture
nemokosch besides the language not being very pleasant to work with, and having no API reference
MasterDuke sure, i'm not saying my 6 year old is going to be submitting PRs on her first day programming. but it's not beyond the ability of anybody who's interested and is willing to spend *some* non-zero amount of time figuring out what's going on 00:39
i mean the business rules that the "average" programmer implements in some corporate codebase are *very* likely more byzantine, less regular, and worse documented than raku 00:41
nemokosch Raku sure, and in general the core library is readable at the very least 00:42
MasterDuke but they have the time (usually ~8h/day) and incentive (a paycheck) to figure things out
nemokosch but the same couldn't be said about NQP, and that shows by the number of people involved
NQP is actually kind of a read-only language at this point 00:43
MasterDuke but it's not because the code they're figuring out is any less complicated
so it's not a matter of ability
nemokosch I don't know. At my previous workplace, I had to read disproportionally more code than to write it. And at my current workplace, frankly the design is better and I receive much more help 00:44
MasterDuke now that's not to completely trivialize the endeavor. you do have to spend some time. but i'm just saying it's not a task that *requires* some next-level programmer just to make *any* progress 00:45
nemokosch even Ada code can be written when it has a clear design and you can ask for help when you are completely lost how the pieces are put together
I think it does require a nontrivial level of cope, besides the incentives that you mentioned 00:47
MasterDuke we're more hampered by geographical (and therefore timezone) distance among the participants than most workplaces
which is just exacerbated by the fact that most people don't have 8h/day. so the hours they do have are less likely to overlap with everybody else 00:48
nemokosch the incentive is at least as surprising for a complete outsider; however, being used to working compilers might help coping with the mere discomfort of something unfamiliar and barely accessible
I mean, you are like the living example. You have more experience with it than the vast majority of us, and you are getting clueless results 00:49
If I were to be honest, I definitely wouldn't have the patience or motivation for that 00:50
MasterDuke sure. i'm not saying this work is trivial. it's just -- from personl experience -- less *exotic* than i thought before i did in fact dip my toes in 00:51
and someone ironically, the very first reason i got involved was because the combination() implementation back in ~2016 was even slower. generating the source code for the necessary number of nested loops and EVAL()ing it was faster 00:52
my first module did in fact do just that 00:53
thankfully that was quickly made obsolete 00:57
nemokosch "but at what cost" 01:00
what desperately dropped, I think, is the accessability and maintenance of lower layers of Raku execution 01:01
especially the bytecode VMs
elcaro FWIW, I don't get paid to code, not even part of my job, I picked it up as a hobby... Yet I wrote a few combinatoric sequence generators in NQP looking at the nqp.ops doc
which back then was probably less documented.
nemokosch you are the exception, though, not the rule 01:02
elcaro NQP isn't really that hard to pick up, it's like a lisp (and about as readable... but I don't find lisps very readable either)
(Rich coming from the guy who like J)
nemokosch I wished I could just pick it up but all I see is files in a random structure with no explanation whatsoever 01:04
I remember that there was a "documentation" file with the disclaimer that it's outdated, also not too encouraging
I guess it could work but is it so wrong that I would rather explore it the way Rakudo core can be explored?
for which I would need to at least know the architecture 01:05
best case somebody will dig out a presentation from 10 years ago
it's really just not actively taken care of
01:07 [Coke] left
and frankly, I'm kind of making excuses, right? I wish it was well-maintained enough that I didn't have to even worry about it, but it isn't. 01:08
vrurg is thinking about all that old days explorers and scientists and all the docs they had back then... ;) 01:13
nemokosch must be the nostalgia to the old days that the very few people maintaining Raku-related tools document so little 01:14
and invest so little into getting others involved
it was probably way easier to find explorers and scientists when the motto was "let's redesign our favorite scripting language, one of the biggest on the market" 01:16
vrurg My note was about Columbus, Marko Polo, Copernicus, and so on. Speaking of "not getting others involved" – well, as everybody has a job which barely pays for working on the compiler itself, we have to chose priorities. 01:17
nemokosch wouldn't the same thing apply even more for people who have no "sunk cost" in Raku development? 01:18
vrurg what do you mean by that? 01:20
nemokosch that there are no people in the outer world lurking around with no jobs or infinite money, only waiting to learn and rebuild Raku 01:21
the risks and effort of investment is only higher 01:22
vrurg Anyway, speaking of the docs for the core, etc. I didn't follow the discussion here, but my own path to the compiler started with me wanting to get lazy attribute initialization. Step by step, I started with Metamodel::ClassHOW sources. Sure thing, it takes a lot of time at the beginning to add debug prints, compile, test run. Often times – grep for something. But I'm not sure that any docs could substitute this experience. 01:23
The only reasoning I had: I like the language.
nemokosch it's really great what some people are capable of surely 01:24
but all in all, people like you are rare, and it almost seems like they are only getting more rare 01:25
maybe it's because they have their own particular interests and build stuff like Factor, in this example with Mr Benediktsson 01:26
vrurg Oh, that's the point. At the beginning I was as much afraid of getting into the guts of a compiler as MasterDuke was or as you, probably, are now. But, as I said: baby steps.
nemokosch I also never wanted to get involved in the development and honestly, I can probably tackle a couple of things in the core if need be but it's more a "power user" knowledge, and even that with huge holes with regards to stuff I don't use, like OO 01:28
I guess there are several people like that, and this is why I think the Rakudo core isn't that much "endangered". However, the VMs are 01:29
very few regular contributors, a huge pile of PRs that will probably never get merged 01:32
and this is MoarVM, JS is rather a myth and JVM is in coma since the unfortunate fate of Kaiepi 01:33
01:36 hythm76 left
MasterDuke yeah, that was sad. and pmurias kind of dropped out after getting an industry job. i was pretty excited for the truffle possibilities 02:02
02:36 linkable6 left, evalable6 left, linkable6 joined 02:39 evalable6 joined
vrurg .tell ab5tract I mislead you a bit by forgetting that S ~~ R case is about RakuAST. This is clearly about src/Raku/ast/expressions.rakumod, IMPL-SMARTMATCH-QAST. 02:44
tellable6 vrurg, I'll pass your message to ab5tract
Geth rakudo: MasterDuke17++ created pull request #5361:
Un-nqpify *.combinations() without slowing it down
04:14
04:46 evalable6 left, linkable6 left 04:47 linkable6 joined, evalable6 joined 05:14 ugexe left 06:00 reportable6 left 06:01 reportable6 joined 08:23 sena_kun joined 09:23 committable6 left, tellable6 left, reportable6 left, nativecallable6 left, releasable6 left, sourceable6 left, benchable6 left, bloatable6 left, squashable6 left, unicodable6 left, quotable6 left, notable6 left, coverable6 left, shareable6 left, evalable6 left, statisfiable6 left, linkable6 left, greppable6 left, bisectable6 left 09:24 linkable6 joined, unicodable6 joined, quotable6 joined, committable6 joined 09:25 squashable6 joined, sourceable6 joined, bisectable6 joined, coverable6 joined, evalable6 joined, bloatable6 joined, reportable6 joined, shareable6 joined, nativecallable6 joined 09:26 statisfiable6 joined, notable6 joined, tellable6 joined, greppable6 joined, releasable6 joined, benchable6 joined 09:58 sena_kun left
ab5tract thanks vrurg! 10:04
tellable6 2023-08-26T02:44:30Z #raku-dev <vrurg> ab5tract I mislead you a bit by forgetting that S ~~ R case is about RakuAST. This is clearly about src/Raku/ast/expressions.rakumod, IMPL-SMARTMATCH-QAST.
ab5tract vrurg, not sure that it is actually related to the expressions code though... T.ACCEPTS(S) fails, implying that the call is made correctly, it's that some other little switch did not get flipped somewhere 10:24
my first instinct is that something is not toggled properly during role setup in package.rakumod 10:25
small nit: some of the Raku/ast files are plural, most are singular
pinging the elusive Mr. nine to see if he has any thoughts 10:26
(on S ~~ R)
I may have fixed it.. looking for regressions now 10:48
meh, the fix currently causes 7 tests to fail :/ 11:04
lizmat: we were up to 937, right? :) 11:05
just double checking that what I have locally for base matches
hmm, according to the rakudoweekly post, I should have 938 :( 11:12
lizmat 938 actually 11:14
ab5tract Always great to have a discrepancy between my base and yours, lizmat ;) 11:17
lizmat well, for a while nine was always 3 ahead of me :-)
ab5tract hehe
lizmat so maybe we're actually at 941 :-) 11:18
nemokosch it would be practical to take the output and upload it as a gist, for example
ab5tract lizmat: I also love to figure out a fix only for it to break things lol 11:19
lizmat gist.github.com/lizmat/e31c97b1be1...7489f575b9
nemokosch thanks 11:20
let's see how many I get 🧐 11:21
11:23 evalable6 left, linkable6 left 11:24 evalable6 joined, linkable6 joined
ab5tract lizmat: t/spec/S32-io/IO-Socket-Async.t <-- passes on your box, not on mine 11:39
here's a quick script I wrote to help in the analysis: gist.github.com/ab5tract/c68a615da...e6ce9e41c5 11:42
lizmat I just use diff -u :-)
ab5tract :) 11:43
that certainly works. I just love how easy it is to write up a raku script that can perform the same task 11:44
lizmat ab5tract++ 11:45
ab5tract looks like my (improved) fix for the role inheritence doesn't add any new passing tests :( 11:46
I always have that secret hope that I might fix something that affects a large number of test cases
nemokosch that's not necessarily the fault of your fix; maybe it's an indicator of a missing test 11:47
ab5tract nemokosch: indeed, that test seems to fail for me in base too :/
oh, nvm. I get what you are saying
nemokosch if you indeed fixed something, then in an ideal world there should be a test that confirms that it was wrong previously 11:48
ab5tract m: role R {}; role S does R {}; say S ~~ R 11:54
camelia True
nemokosch hm, is this related to that issue recently? 11:55
it's 937 for me as well 11:58
ab5tract nemokosch: I was hoping fixing github.com/rakudo/rakudo/issues/5353 would fix github.com/rakudo/rakudo/issues/5317 in RakuAST 11:59
no such luck, however. issue seems to be somewhere on the other side of the compiler 12:00
12:00 reportable6 left
ab5tract is it the same file which fails? IO-Socket-Async.t ? 12:00
nemokosch oh yeah, I was thinking of that "does chaining" issue
12:00 reportable6 joined
ab5tract ah, I haven't seen that one 12:01
nemokosch no, it's something else, first I just checked if it's that one
I meant 5317 too 🙂
> t/spec/S28-named-variables/init-instant.t ......................... ok 12:05
> t/spec/S28-named-variables/init-instant.t (Wstat: 256 Tests: 3 Failed: 1) > Failed test: 3 > Non-zero exit status: 1
lizmat I'm on MacOS, maybe that has something to do with it? 12:06
nemokosch this sounds like a test that can be environment sensitive
I'm on Ubuntu 20.04 in WSL2 12:07
lizmat and that test file passes without RakuAST in that environment ? 12:08
nemokosch I can just run it with a vanilla raku call, right? 12:09
lizmat yup
nemokosch it passes... but actually, it passes with the local rakudo-m as well 12:11
so either the test harness or the scheduling of the tests, I guess
ah no sorry, big stupid happened 12:14
rakudo-m still pointed at the installed instance 12:15
but regardless... ./rakudo-m -Ilib t/spec/S28-named-variables/init-instant.t also passes
ab5tract that's curious indeed 12:38
is there an easy way to maintain fudging but still run against a single spec test file?
lizmat run the file with the .rakudo.moar extension ? 12:41
ab5tract hmm.. ok 12:44
I was hoping for a make target or something :) 12:45
lizmat make t/spec/foo/bar.t should also work
that will re-apply the fudging, which is something you may or may not want?
ab5tract that's exactly what I want, thanks! 12:47
Geth rakudo/main: c9eb59535b | (Elizabeth Mattijsen)++ | 3 files
Make sure OperatorProperties are set on new 6.e operators
12:53
13:00 linkable6 left, evalable6 left 13:01 evalable6 joined
Geth rakudo/main: e7df63a4a8 | (Elizabeth Mattijsen)++ | 4 files
RakuAST: refactor OperatorProperties internals

  - reduce to only a single class with methods
  - reduce number of methods
  - be smarter about hash re-usage
  - add support for 6.e operators and circumfix ops
  - handle search in a single helper method
13:01
lizmat afk&
13:02 linkable6 joined 13:08 ugexe joined 13:32 sena_kun joined
ab5tract ok, so it turns out that most of the role tests aren't being run due to errors related to the dotty infix operator 13:46
13:57 ugexe left 14:05 ugexe joined
Geth rakudo: ab5tract++ created pull request #5363:
RakuAST: Fix role inheritence not working
14:09
ab5tract now I'm trying to fix the .= syntax issues: "No such method 'expression' for invocant of type 'RakuAST::Initializer::CallAssign'" 14:39
is there a way to toggle RAKUDO_RAKUAST=1 for camelia? 14:48
anyway, here's the failure case: role R { has $.n }; class C does R { has R $.r .= new(:$!n) }; my C $c .= new(:n(1)); dd $c 14:49
MasterDuke m: run $*RAKU, "-e", "q{say q|hi|}" 14:53
camelia hi
The spawned command 'Raku' exited unsuccessfully (exit code: 1, signal: 0)
in block <unit> at <tmp> line 1
MasterDuke might be able to use ^^^ to inject RAKUDO_RAKUAST=1 into the env 14:54
m: %*ENV<RAKUDO_RAKUAST> = 1; run $*RAKU, "-e", "q{say q|hi|}"
camelia hi
The spawned command 'Raku' exited unsuccessfully (exit code: 1, signal: 0)
in block <unit> at <tmp> line 1
14:55
nemokosch m: shell Q<RAKUDO_RAKUAST=1 raku --target=ast -e 'say "HELLO"'> 14:58
oops
let's give it a shot still
14:59 NemokoschKiwi joined
NemokoschKiwi m: shell Q<RAKUDO_RAKUAST=1 raku --target=ast -e 'say "HELLO"'> 14:59
camelia - QAST::CompUnit :W<?> :UNIT<?> :CAN_LOWER_TOPIC<?>
[pre_deserialize]
- QAST::Stmt
- QAST::Stmt
- QAST::Op(loadbytecode)
- QAST::VM
[moar]
- QAST::SVal(ModuleLoader.moarvm)
NemokoschKiwi apparently the native `raku` is too old 15:00
m: shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE --target=ast -e 'say "HELLO"'> 15:01
camelia CompUnit 𝄞 -e:1 ⎡say \"HELLO\"⎤
StatementList 𝄞 -e:1 ⎡say \"HELLO\"⎤
Statement::Expression ⚓▪𝄞 -e:1 ⎡say \"HELLO\"⎤
Call::Name ⎡say \"HELLO\"⎤
Name ⎡say⎤
ArgList ⎡\"HELLO\"⎤…
NemokoschKiwi okay nice
$*EXECUTABLE is the one 15:02
15:02 NemokoschKiwi left
MasterDuke ha, right 15:02
ab5tract m: shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e 'role R { has $.n }; class C does R { has R $.r .= new(:$!n) }; my C $c .= new(:n(1)); dd $c'> 15:12
camelia ===SORRY!=== Error while compiling <tmp>
Variable $.n used where no 'self' is available
at <tmp>:1
------> UAST=1 $*EXECUTABLE -e 'role R { has $.n⏏ }; class C does R { has R $.r .= new(:$
expecting any of:
postfix…
ab5tract different error here 15:13
nemokosch yeah here the scalar adverb didn't scale well 15:21
MasterDuke m: %*ENV<RAKUDO_RAKUAST> = 1; run $*EXECUTABLE, "--target=ast", "-e", ""
camelia CompUnit 𝄞 -e:1 ⎡⎤
StatementList 𝄞 -e:1 ⎡⎤
VarDeclaration::Implicit::Doc::Pod
VarDeclaration::Implicit::Doc::Data
VarDeclaration::Implicit::Doc::Finish
VarDeclaration::Implicit::Doc::Rakudoc
15:22 NemokoschKiwi joined
MasterDuke lizmat: any idea why those ^^^ `VarDeclaration::Implicit::Doc::*` are showing up? 15:22
NemokoschKiwi m: my $content = 'role R { has $.n }; class C does R { has R $.r .= new(:$!n) }; my C $c .= new(:n(1)); dd $c'; shell Q:scalar<RAKUDO_RAKUAST=1 $*EXECUTABLE -e '$content'> 15:23
camelia ===SORRY!===
No such method 'expression' for invocant of type
'RakuAST::Initializer::CallAssign'
The spawned command 'RAKUDO_RAKUAST=1 /home/camelia/rakudo-m-inst-2/bin/perl6-m -e 'role R { has $.n }; class C does R { has R $.r .= new(:$!n) }; m…
NemokoschKiwi ab5tract: better yet?
15:25 NemokoschKiwi left
ab5tract perfect :) 15:26
MasterDuke: I believe they exist because they have to in order to mirror previous behavior WRT to pod6 15:27
nemokosch oh yeah, if the environment variable can be set and run respects it, that's probably a more readable way... 15:34
16:07 codesections joined
lizmat ab5tract MasterDuke indeed... they're basically $=pod, $=data and $=finish 16:12
Geth rakudo: mrjbq7++ created pull request #5364:
make .permutations about 10% faster
16:39
17:07 evalable6 left 17:10 evalable6 joined
Geth rakudo/main: e41e823cdd | (John Benediktsson)++ (committed using GitHub Web editor) | src/core.c/Rakudo/Iterator.pm6
Make .permutations about 20% faster
17:20
rakudo/main: ec2076759b | (Elizabeth Mattijsen)++ | src/core.c/Rakudo/Iterator.pm6
Remove unused attribute

And some cosmetics
17:36
18:00 reportable6 left 18:01 reportable6 joined 18:33 MasterDuke left 21:22 linkable6 left, evalable6 left 21:25 linkable6 joined, evalable6 joined 22:07 sena_kun left 22:08 jgaz left 23:08 evalable6 left, linkable6 left, linkable6 joined 23:09 evalable6 joined