00:59:26 -!- indigaz24 is now known as indigaz2 01:10:39 <12a​sciiphilia> I thought we would maintain compatibility by completely removing RequireJS. I haven’t had a chance to properly read the PR yet. DWEM works by hooking into RequireJS’s loading process, dynamically parsing scripts through AST analysis, and injecting specific code snippets into the desired patching context. This is because it was designed to create a plugin structure that can continuously adapt to code that updates in real time, 01:10:40 like the trunk. Would it be possible for the mainline code to support this kind of functionality? It feels rather hacky to me. In any case, once the new WebTile JavaScript part stops using RequireJS, hooking will no longer be possible, and with things like bundling being introduced, it seems that the increased encapsulation will make it difficult to rebuild this kind of mechanism. I’ll likely receive a lot of questions about why the broken DWEM 01:10:40 features can’t be used anymore, but I don’t have enough time to handle all those issues and migrate everything to the new code structure. Porting my code structure to the mainline would mean losing some of the custom server functionality I need, and I won’t be able to port everything anyway. I also don’t have enough time for that work. At least for me, this is shaping up to be a maintenance nightmare. 01:14:17 <12a​sciiphilia> Since DWEM is a third-party project, I have no intention of pressuring the main development direction with this. I just wanted to explain that this is the situation on my end. 01:18:27 <06m​umra> > I thought we would maintain compatibility by completely removing RequireJS. Not quite sure what you mean here -- the old versions still expect requirejs to be present in order for them to both load their own scripts as well as injecting the client/comm/key_conversion modules which are necessary for interaction with the server. This means the API of those three components (which are what it seems you are largely hooking into with DWEM) 01:18:27 will remain unchanged. (And even if we wanted to significantly restructure them, we'd still have to provide a compatibility wrapper for legacy versions) 01:20:40 <06m​umra> It definitely sounds like the AST method will potentially fail once it tries to look at minified code; although, given that none of the public exports of the core modules have actually changed, I am wondering how necessary this was in the first place? And what additional hooks we might have to expose so you can do what you need to do without having to do something so hacky? 🙂 01:24:47 <06m​umra> I've just been having a bit of a look through most of the modules in your DWEM repository. It seems like for the most part there's nothing terribly complicated going on in most of them (unless I've missed some really thorny detail that necessitates doing things that a public interface can't provide) 01:26:07 <06m​umra> In some cases (in particular, the Advanced RC Editor, and the advanced chat) I'm wondering if you would perhaps consider raising a PR to get these into master? Something that will be a LOT easier with the modernised js stack. 01:26:24 <06m​umra> The RC editor particularly just seems like a welcome improvement 01:27:18 <12a​sciiphilia> _define = define define(moduleArray, moduleFunc) { ast = ast_library.parse(moduleFunc.toString()) location = ast.findCodeLocation(condition) addCustomCode(ast, location, customCode.toString()) _define(moduleArray, eval(ast.toCode())) } This is sudo-code of DWEM core patch logic 01:29:38 <12a​sciiphilia> Once a module is loaded using the import statement, it cannot be interfered with. 01:34:46 <12a​sciiphilia> I thought the translation was incorrect. I understood it as if you were trying to implement an entirely new loader by removing requirejs altogether. (In the previous version, I thought it wasn’t about selectively loading with requirejs, but about loading everything using something completely new.) 01:38:01 <12a​sciiphilia> Currently, the object exported (returned) by the webtile module only includes what’s necessary for the webtile itself. However, the internal variables used by DWEM go far beyond that scope. We need access to many internal variables that are not exposed outside the module. But I’m not sure if exposing variables that aren’t otherwise used, just for the sake of external hooks, is the right approach from a design pattern 01:38:02 perspective. 01:39:20 <06m​umra> Yes that's correct 01:41:28 <06m​umra> Basically new versions will be loaded just by inserting a single