🦋 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:50 MasterDuke joined 05:25 [Coke]_ joined 05:27 [Coke] left 06:19 Voldenet left 06:20 Voldenet joined 07:32 sena_kun joined 08:00 sena_kun left
[Tux] Rakudo v2024.06-48-g3766ef2d4 (v6.d) on MoarVM 2024.06-14-gab56007b4
csv-ip5xs0.260 - 0.265
csv-ip5xs-201.124 - 1.131
csv-parser1.504 - 1.543
csv-test-xs-200.142 - 0.144
test1.849 - 1.902
test-t0.409 - 0.414
test-t --race0.272 - 0.272
test-t-204.878 - 4.913
test-t-20 --race1.247 - 1.265
08:52
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
That is pretty neat, isn't it?
5 2024-04-18 10:08:44 test-t 0.416 08:53
4 2024-07-16 10:51:43 test-t 0.414
3 2024-07-16 10:50:50 test-t 0.409
2 2024-07-10 09:44:21 test-t 0.407
1 2024-07-10 09:43:29 test-t 0.407
20240418 0.416❙20240716 0.414❙20240716 0.409❙20240710 0.407❙20240710 0.407❙
lizmat so RakuAST already has support for $.foo 12:14
but it codegens that directly to: self.foo.item
which looks really bad in .raku and deparsing
so I thought I'd create a wrapper class RakuAST::Var::Attribute::Public 12:15
which would store the name and create the AST to do self.foo.item
and then convert to QAST just for the self.foo.item logic 12:16
gist.github.com/lizmat/e6723770d2d...630c952ca4
.raku and deparsing are ok, but running the code fails with:
This element has not been resolved. Type: RakuAST::Term::Self 12:17
nine ab5tract what am I missing ?
12:50 vrurg left, vrurg joined 12:55 vrurg left 13:00 vrurg joined, vrurg left 13:01 vrurg joined
nine missing visit-children 13:07
13:07 vrurg left 13:08 vrurg joined
nine But is this really a good idea in the first place? On the one hand it does retain some more information in the AST which seems to be useful for deparse. On the other hand every other consumer of the AST will also need to know what this is and deal with it accordingly. 13:09
lizmat method visit-children(Code $visitor) {
$visitor($!expression);
}
??
nine yep
lizmat tried that before...lemme try that again 13:10
fwiw, not only deparsing, but making it simpler for ad-hoc tree building 13:11
*and* the potential to QAST a direct attribute access if the accessor is generated locally 13:12
"Cannot find method 'visit-children' on object of type BOOTStr"
that error confused the heck out of me
nine Btw. i don't see the need for the PERFORM-CHECK method 13:16
lizmat gist.github.com/lizmat/887e739c43d...a9699e9d83 13:17
so also no CheckTime ?
nine yep
line 80 of your diff 13:18
lizmat yes? 13:19
aaah.... ok
nine needs to be a RakuAST::Name
lizmat gotcha
nine In hindsight I should have pushed through the change to the RakuAST compiler that would add actual type checks for arguments. Would make debugging this kind of issue so much easier.
But it'd require us to be stricter with regards to NQP vs. Raku types 13:20
13:20 [Coke] joined
lizmat *phew* I knew it had to be something simple 13:22
13:22 [Coke]_ left
lizmat nine++ 13:25
Geth rakudo/main: 527b9788d9 | (Elizabeth Mattijsen)++ | 5 files
RakuAST: introduce ::Var::Attribute::Public

The syntax "$.foo" is generally thought of as accessing that attribute in a class, but it is really just "self.foo.item" and was as such codegenned in the Actions.
This has the disadvantage it not being able to be deparsed easily. ... (10 more lines)
14:03
lizmat it needed a few more tweaks, but there it is :-) 14:04
Geth rakudo/main: 3ab6c96b8d | (Elizabeth Mattijsen)++ | lib/RakuAST/Deparse/Highlight.rakumod
RakuAST: more things disallowed in safe mode highlighting

  - use nqp;
  - use MONKEY
  - use MONKEY-GUTS
Previously all pragmas were allowed.
14:10
rakudo/main: 509ee1b609 | (Elizabeth Mattijsen)++ | src/Raku/ast/type.rakumod
RakuAST: ::Type::Definedness.name method for convenience

So that we don't need to check whether a type is wrapped in a :D or :U type smiley to get its ::Name object
15:08
rakudo/main: 8a1380383f | (Elizabeth Mattijsen)++ | 3 files
RakuAST: properly check for pragmas in highlighting

Also default the color of pragmas to "green" as they are really something system dependent, just a types. This should set them apart from actual module loading "use" statements.
Add and adapt tests accordingly
15:10
15:14 MasterDuke left 17:15 [Coke] left, [Coke] joined 18:05 vrurg left, vrurg joined 18:08 sena_kun joined 19:17 finanalyst joined 20:00 JRaspass left, JRaspass joined 21:53 [Coke] left 21:56 [Coke] joined 22:06 sena_kun left 22:52 finanalyst left 23:06 camelia left 23:10 MasterDuke joined 23:31 sjn left, sjn joined