@MichaReiser @jfmengels@charliermarsh - The map keyed by node kinds used to store rules is internally implemented using a vector for constant-time lookups (using the node kind as an index). Memory usage could potentially be optimized further here by using a sparse format like CSR ...
@MichaReiser @jfmengels@charliermarsh 2 interesting performance tricks here:
- Rules are completely stateless, meaning once you peel off the whole trait / type system facade, their in-memory representation boils down to a single function pointer
@MichaReiser @jfmengels@charliermarsh - The syntax tree is traversed for each Phase, each visitor receives enter and leave events for each node
- Visitors either emit Queryables straight away (AST / Control Flow visitors), or build up data structures to be used in later phases (Semantic visitor)
@MichaReiser @jfmengels@charliermarsh One important addition to this was in https://t.co/TFh6SvNxXf, this PR introduced another indirection level so the general outline of how this works is:
- Rules declare interest in Queryables
- Queryable types register the Visitors that can emit them to specific Phases
(1/2)
@tolmasky@sebmck The playground is entirely run locally using this WASM bundle of our Workspace API https://t.co/ONLusfhytZ, but it only provides a debug string representation of the syntax tree since we don't have a way to directly bring our Rust syntax node objects into JS yet
@sebmck@devongovett We have an experimental JS API available on npm (at https://t.co/asiRz33B1t), we don't openly advertise it yet as we're still exploring a few options for the "backend" (loading a WASM bundle / connecting to the Rome daemon server / calling the CLI and having it output JSON)
@epenser@naldir7@MisterFlech J'aurais même tendance à dire l'inverse, on a bien vu avec YouTube ou Twitch ou personne se posait vraiment la question du droit d'auteur jusqu'à ce que les ayants droits y regardent de plus près, et que les créateurs se fassent rétroactivement claim leurs contenus
@MisterAwesan@sebmck Since Rust doesn't have a stable ABI plugins would have to be implemented as C dynamic libraries, but many Rust data structures can't safely cross an FFI boundary. And there's also the issue of sandboxing since "loading untrusted DLLs from npm" is a security nightmare
As part of our analyzer works, you can now see the rendered Control Flow Graph from our playground!
Jump on our playground and have fun with it! https://t.co/TZWVDhYisf
J'ai l'impression que One Piece Odyssey (le jeu) c'est un peu comme Zelda (le jeu) sauf qu'au lieu de jouer Zelda (le gars en vert avec son chapeau) tu joue One Piece (le gars en rouge avec son chapeau)