00:59:25 -!- indigaz24 is now known as indigaz2 01:13:27 New branch created: pull/4839 (5 commits) 13https://github.com/crawl/crawl/pull/4839 01:13:28 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-973-g92453859ad: create vite projects for lobby and game clients 10(5 days ago, 21 files, 2567+ 0-) 13https://github.com/crawl/crawl/commit/92453859ada7 01:13:28 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-974-g5a19c1acc7: Move static JavaScript to src folders for bundling 10(7 minutes ago, 42 files, 47+ 260-) 13https://github.com/crawl/crawl/commit/5a19c1acc7c1 01:13:28 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-975-gc6cee007cb: Build JavaScript bundles and run a linting and formatting pass 10(4 minutes ago, 64 files, 19810+ 14932-) 13https://github.com/crawl/crawl/commit/c6cee007cb8a 01:13:28 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-976-g166225f175: Update workflows for JavaScript bundling 10(4 minutes ago, 3 files, 21+ 2-) 13https://github.com/crawl/crawl/commit/166225f17588 01:13:28 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-977-g75af50a02b: Add bundled css to ignore path 10(2 minutes ago, 1 file, 1+ 0-) 13https://github.com/crawl/crawl/commit/75af50a02b6e 01:21:04 <06m​umra> (It's not quite ready. Just wanted to check that CI and Makefile changes are working. I'm just getting ASCIIPhilia's container up for testing and I still need to make some documentation edits) 03:31:56 Experimental (bcrawl) branch on underhound.eu updated to: 0.23-a0-5261-gd9800d219b 04:28:58 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-978-g760015d766: Fix makefile to run npm install and build only as necessary 10(23 seconds ago, 7 files, 37+ 2374-) 13https://github.com/crawl/crawl/commit/760015d76624 04:43:50 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-979-g9726a5d929: Remove erroneously created lockfile 10(50 seconds ago, 1 file, 0+ 1459-) 13https://github.com/crawl/crawl/commit/9726a5d92995 04:43:50 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-980-gbc46f14001: Checkwhite 10(8 seconds ago, 4 files, 29+ 29-) 13https://github.com/crawl/crawl/commit/bc46f14001d8 04:50:14 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-981-g57287b65f1: Move lint step out of the Python linting 10(45 seconds ago, 2 files, 10+ 4-) 13https://github.com/crawl/crawl/commit/57287b65f1b9 05:09:52 Unstable branch on crawl.akrasiac.org updated to: 0.34-a0-972-ga42d9e8 (34) 05:44:19 <12g​e0ff> @mumra, this is epic! 06:13:13 <06m​umra> Thanks! Most of the syntax improvement was automated by biome, once i sorted out the imports/exports manually. Aside from improved developer experience, a tangible improvement should be faster load times since the bundle is smaller over the wire and a single request is usually better than multiple ones (not claiming that it's going to be significant enough for most users to notice, but still) 06:15:33 <06m​umra> Hmm, though i really should emit sourcemaps as debugging in the browser will be rather obfuscated now 06:21:16 <12g​e0ff> Apparently loading trunk requires 43 browser requests for all the resources. But they all are gonna be bundled into a single file? 06:25:19 <06m​umra> Yep all the js gets bundled 06:26:03 <06m​umra> You end up with two js files; one for the lobby, then one for the specific game version once you start a game 06:28:16 <06m​umra> I could bundle two of the css files together, but this way there were issues unloading it when you exit the game, it's probably possible to solve but a lot of work for a frankly not huge improvement 06:34:42 <06m​umra> I think it's also probably the case there is some memory leakage going on every time you leave a game and join another one (currently, even with requirejs, as unloading a module is not going to magically know how to clean up global handlers) but i didn't do anything about it yet 06:48:22 <06m​umra> Ugh. I think there is actually no way around having the problem to a certain extent. Once a script is executed, the functions stay in memory forever. We probably need to just do a full page load when you go into a game instead of loading the modules dynamically 08:17:26 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-982-gf58e03b13a: unbrace, fix some lints, clean up contribs 10(56 seconds ago, 11 files, 11+ 2614-) 13https://github.com/crawl/crawl/commit/f58e03b13ae9 08:54:39 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-983-ga7724a8876: Fix the rest of the lint issues 10(39 seconds ago, 6 files, 16+ 454-) 13https://github.com/crawl/crawl/commit/a7724a8876aa 09:08:31 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-973-gebbfed10ce: Create Vite projects for lobby and game clients 10(5 days ago, 21 files, 2567+ 0-) 13https://github.com/crawl/crawl/commit/ebbfed10ce87 09:08:31 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-974-ge2bb4dc2b5: Move static JavaScript to /src folders for bundling 10(8 hours ago, 42 files, 47+ 260-) 13https://github.com/crawl/crawl/commit/e2bb4dc2b526 09:08:31 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-975-g114aafc41a: Build JavaScript bundles and run a linting and formatting pass 10(8 hours ago, 63 files, 18352+ 14932-) 13https://github.com/crawl/crawl/commit/114aafc41ab2 09:08:31 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-976-gd3d2f5c6e2: Update workflows for JavaScript bundling 10(8 hours ago, 8 files, 56+ 2368-) 13https://github.com/crawl/crawl/commit/d3d2f5c6e2f5 09:08:31 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-977-geee4cc3595: Fix various linting issues and some cleanup 10(4 hours ago, 19 files, 56+ 3097-) 13https://github.com/crawl/crawl/commit/eee4cc3595f4 09:20:30 <06m​umra> @gammafunk So I'm realising that, past this change, servers will need nodejs installed in order to be able to build webtiles. Aside from this, the npm package installation and the bundling are invoked automatically from the Makefile. It just needs npm to be present, which is installed as part of node 09:25:19 <06m​umra> So I'm just wondering how problematic this is for server admins. Node is generally installed thru its own package repositories; the versions in official package sources tend to be fairly ancient. On ubuntu for instance this is apt-get update apt-get install -y curl gnupg curl -sL https://deb.nodesource.com/setup_22.x | bash - apt-get install nodejs So it varies a bit depending on the distribution. Possibly some servers will already 09:25:19 have it installed - but maybe at a fairly old version, which may or may not work. Node 22 is recommend as this it the current LTS version 09:26:43 <09g​ammafunk> it's probably a surmountable challenge. The biggest concern I'd have would be CAO. It's something I would need to look into; much like how we had to install a local python, we might need to install a local npm there 09:27:14 <09g​ammafunk> Other servers would certainly have npm available as a debian package (afaik all official servers are debian-based, not sure if they're all ubuntu, but either way) 09:30:56 <09g​ammafunk> out of curiosity, what is that curl step setting up, exactly, given that the immediate next action is to install the nodejs package 09:31:39 <09g​ammafunk> requiring curl in order to source a web script is not something we'd do, that's a fairly minor point 09:32:09 <09g​ammafunk> probably most servers do have curl installed, but if the only reason for doing so is to get that shell script, we'd just use wget instead (all servers have wget) 09:32:29 <09g​ammafunk> not sure about gnupg, but obviously that's an available package on all systems 09:32:39 <09g​ammafunk> there is a question too about whether any of this must go into the chroot 09:32:54 <09g​ammafunk> from what I can tell, these are all build requirements and not runtime requirements 09:33:31 <09g​ammafunk> so they don't need to go into the chroot, but if that's in fact not true, it adds another minor complication. On most servers one can chroot in and just install any required runtime package 09:40:25 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-978-gb1884bf454: Don't build bundles twice and be more Windows-friendly 10(58 seconds ago, 5 files, 1995+ 82-) 13https://github.com/crawl/crawl/commit/b1884bf45454 09:41:00 <06m​umra> it's adding a package source 09:41:11 <06m​umra> otherwise you'll get an ancient version from offical debian repositories 09:48:57 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-978-g0eb80cc10f: Don't build bundles twice and be more Windows-friendly 10(35 seconds ago, 5 files, 1995+ 82-) 13https://github.com/crawl/crawl/commit/0eb80cc10fe6 09:50:54 <06m​umra> Yes this is only for building the static js bundles. Once built they are just served up as normal by the webserver 09:57:02 <06m​umra> @gammafunk @asciiphilia Now .. I must be doing something wrong. Trying to run ASCIIPhilia's container ... I have all the binaries from other versions downloaded and installed, I'm able to build my version inside the container (by altering the crawl-git.conf to point at my branch). But when I docker-compose up per the instructions, everything runs but webtiles just ... stops 09:57:18 <06m​umra> https://cdn.discordapp.com/attachments/747522859361894521/1429513752440737792/image.png?ex=68f669ed&is=68f5186d&hm=d0d2be3c08b9137dba3de8449045068f79148dfadb3fbaf4980c44e062fb2e36& 09:58:18 <06m​umra> Other stuff is working, like I can play the game thru terminal on port 8022. Webtiles just won't start (and this was also true just building from master, it's nothing to do with any of my changes) 10:10:48 <06m​umra> @asciiphilia Unfortunately ... these changes will mess with DWEM, as requirejs will no longer be used for trunk, so you'd have to hook into things a different way. Please let me know if there's another way to provide a hook for this. 10:58:06 New branch created: modernjs (7 commits) 13https://github.com/crawl/crawl/tree/modernjs 10:58:09 03mumra02 07[modernjs] * 0.34-a0-973-gebbfed10ce: Create Vite projects for lobby and game clients 10(5 days ago, 21 files, 2567+ 0-) 13https://github.com/crawl/crawl/commit/ebbfed10ce87 10:58:09 03mumra02 07[modernjs] * 0.34-a0-974-ge2bb4dc2b5: Move static JavaScript to /src folders for bundling 10(10 hours ago, 42 files, 47+ 260-) 13https://github.com/crawl/crawl/commit/e2bb4dc2b526 10:58:09 03mumra02 07[modernjs] * 0.34-a0-975-g114aafc41a: Build JavaScript bundles and run a linting and formatting pass 10(10 hours ago, 63 files, 18352+ 14932-) 13https://github.com/crawl/crawl/commit/114aafc41ab2 10:58:09 03mumra02 07[modernjs] * 0.34-a0-976-gd3d2f5c6e2: Update workflows for JavaScript bundling 10(10 hours ago, 8 files, 56+ 2368-) 13https://github.com/crawl/crawl/commit/d3d2f5c6e2f5 10:58:09 03mumra02 07[modernjs] * 0.34-a0-977-geee4cc3595: Fix various linting issues and some cleanup 10(6 hours ago, 19 files, 56+ 3097-) 13https://github.com/crawl/crawl/commit/eee4cc3595f4 10:58:09 03mumra02 07[modernjs] * 0.34-a0-978-g0eb80cc10f: Don't build bundles twice and be more Windows-friendly 10(70 minutes ago, 5 files, 1995+ 82-) 13https://github.com/crawl/crawl/commit/0eb80cc10fe6 10:58:09 03mumra02 07[modernjs] * 0.34-a0-979-g69d4e4fc5c: Simplify root and add sourcemaps 10(7 minutes ago, 4 files, 10+ 13-) 13https://github.com/crawl/crawl/commit/69d4e4fc5ceb 11:14:26 04Build failed for 08modernjs @ 69d4e4fc 06https://github.com/crawl/crawl/actions/runs/18634040902 11:25:03 <09g​ammafunk> ascii might have a quick answer, but I can try it myself later this evening. I've only used advil's container and haven't tried ascii's. 11:25:26 <09g​ammafunk> Hopefully it doesn't require me testing actually in WSL, since I'm not sure I have a license for a recent version of Windows.... 12:39:06 <06m​umra> i'm trying advil's container now (i had to push to a branch of main crawl repo rather than building from a fork, it didn't seem to like that) 12:46:16 <06m​umra> having issues there as well ("chroot not initialized; skipping container startup.") 12:46:56 <06m​umra> i am wondering if wsl is the issue here, it has a slightly funky networking setup, although for most purposes should be an identical environment, that is the point of containers after all 12:50:13 <06m​umra> ah ... i think the issue may be that wsl doesn't allow running containers in privileged mode, which seems to be required for setting up chroot 12:51:51 <06m​umra> now i recall running into this issue before as it also makes it impossible to run systemd services 12:57:02 <09g​ammafunk> Right i was worried about that for advil's container 12:58:13 -!- indigaz23 is now known as indigaz2 13:00:39 <06m​umra> it's probably the same issue on asciiphilia's 13:02:07 <09g​ammafunk> Well it shouldn't be 13:02:21 <09g​ammafunk> Because ascii's doesn't use cnhroot 13:02:39 <09g​ammafunk> It's a more conventional container setup 13:03:28 <09g​ammafunk> Something specifically about the chroot requires priv. mode iirc 13:03:57 <09g​ammafunk> Like the device files and mounts in chroot or something 13:07:43 <09g​ammafunk> If worst comes to worst I can make a separate test webtiles on cdi probably 13:21:44 03Implojin02 07* 0.34-a0-973-g00c038fbf2: Fix CMD_AUTOFIRE (shift+tab) to check wall transparency 10(34 minutes ago, 1 file, 1+ 1-) 13https://github.com/crawl/crawl/commit/00c038fbf215 13:32:09 <06m​umra> Honestly for now I'm going to hack together a test without DGL, I can at least confirm if the new lobby code can load an old game client, just by copying in an old version of the static files and game.html 13:49:29 <09g​ammafunk> ok, sounds good. I'll probably set up ascii's container myself (just on linux) to see if I can found out if there's something simple/weird as to why webtiles is stopping. But aside from possibly getting that container working, let me know if you need a more thorought test. Setting up a separate webtiles install for testing isn't too bad, but it'll take a bit of time 14:45:00 <06m​umra> @gammafunk Yep I think I've got it working now with my crude test. Wasn't immediately working but was fairly easy to fix (just patching things so the require environment behaves as expected to a legacy consumer) 14:45:45 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-979-g69d4e4fc5c: Simplify root and add sourcemaps 10(4 hours ago, 4 files, 10+ 13-) 13https://github.com/crawl/crawl/commit/69d4e4fc5ceb 14:45:45 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-980-gb491d9ced8: lobby fix require, and formatting 10(8 minutes ago, 3 files, 31+ 22-) 13https://github.com/crawl/crawl/commit/b491d9ced83f 14:45:45 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-981-g0ac0aa36b8: fix biome formatting in game 10(3 minutes ago, 16 files, 228+ 250-) 13https://github.com/crawl/crawl/commit/0ac0aa36b85a 14:47:12 <06m​umra> At this point the only way I can test further would be to set up DGL myself in WSL rather than trying to use a container (if it works) 14:48:33 <06m​umra> But if you're able to set anything up that would be amazing. I'm sure there will be some small snags to figure out still 15:15:37 <09g​ammafunk> looking at one of those diffs: js $("#crt").html("Sadly, your browser does not support WebSockets.

"); $("#crt").append("The following browsers can be used to run WebTiles: "); $("#crt").append( "
  • Chrome 6 and greater
  • " + "
  • Firefox 4 and 5, after enabling the " + "network.websocket.override-security-block setting in " + "about:config
  • Opera 11, after " + " 15:15:38 enabling WebSockets in opera:config#Enable%20WebSockets" + "
  • Safari 5
", I have to wonder what would happen if anyone actually tried browsers as old as chome 6 or firefox 4 15:15:44 <09g​ammafunk> not that this really matters 15:19:57 <06m​umra> i suspect that with the current bundler settings, they wouldn't even get as far as this message right now 😂 15:20:44 <06m​umra> i can configure the bundler to target an older version of ecmascript but there's some kind of limit to how far back it can go 15:21:27 <06m​umra> would be interesting to see some server stats to see what the older browser versions anyone is actually using are 15:41:01 Unstable branch on underhound.eu updated to: 0.34-a0-973-g00c038fbf2 (34) 15:42:09 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-982-gcf42fb58b7: remove unneccessary file specifiers from scripts 10(50 minutes ago, 1 file, 3+ 3-) 13https://github.com/crawl/crawl/commit/cf42fb58b70c 15:42:09 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-983-gaecfcb17d8: Fix Makefile running multiple copies of bundler in parallel 10(43 seconds ago, 1 file, 9+ 3-) 13https://github.com/crawl/crawl/commit/aecfcb17d8d1 15:45:21 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-983-gfecea1429f: Fix Makefile running multiple copies of bundler in parallel 10(31 seconds ago, 1 file, 9+ 3-) 13https://github.com/crawl/crawl/commit/fecea1429fe4 16:13:00 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-984-ge82aaa57a1: Make lint and format single pass 10(19 minutes ago, 3 files, 3419+ 3279-) 13https://github.com/crawl/crawl/commit/e82aaa57a12d 16:13:00 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-985-g02a4b9b169: handle globals in a less wasteful way (and fix menus) 10(40 seconds ago, 23 files, 55+ 70-) 13https://github.com/crawl/crawl/commit/02a4b9b169f7 16:55:29 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-986-g6da85d5961: Mention node.js dependency in webserver README 10(54 seconds ago, 1 file, 7+ 1-) 13https://github.com/crawl/crawl/commit/6da85d5961de 16:56:09 <06m​umra> Done, everything is working 100%, definitely no huge bugs to uncover 🙂 16:58:00 <06m​umra> Well, we will see how it runs on a real server. Theoretically we just need node.js installed on the servers and apart from that it should all just work fine on the next update 16:59:10 <06m​umra> Players will just need to refresh the page to load the new lobby scripts 17:00:39 <06m​umra> (I think technically it's possible to send a script over websockets that would refresh for the...) 17:02:22 <06m​umra> Obviously we won't want to merge this without some coordination with server admins and give them chance to install node.js, otherwise it'll break their builds until they do 17:06:48 <06m​umra> Down to 16 requests (instead of 61) to get into the game 17:07:41 <06m​umra> https://cdn.discordapp.com/attachments/747522859361894521/1429622064477900840/image.png?ex=68f6cecd&is=68f57d4d&hm=4e730d2705723167b342f4bdc6469746444094fbe158df40148464c60d36c17d& 17:08:14 <06m​umra> JavaScript is 289kb compressed instead of 356kb 17:10:16 <06m​umra> Not that 67kb is going to make a huge impact to anyone's day 🙂 17:11:43 it's a decent percentage of the full size, though. so either it is, or neither is 356kb 🙂 17:12:17 (especially given that these days even a plain-looking web page can load multiple megabytes of JS…) 17:17:55 (which is reminding me of back 5-10 years ago when someone decided to profile www.google.com and found out it was loading over 1GB) 17:25:14 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-987-g659142993c: Be consistent with window rather than globalThis 10(4 minutes ago, 2 files, 3+ 3-) 13https://github.com/crawl/crawl/commit/659142993c8d 17:25:14 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-988-g79ad10dd30: Alert the player if they are still on the old client 10(31 seconds ago, 1 file, 5+ 0-) 13https://github.com/crawl/crawl/commit/79ad10dd309b 17:27:30 <06m​umra> Yeah there's over 5mb of stuff when you include all the tiles 17:28:40 <06m​umra> However the reduced number of requests means the tiles can start downloading sooner, which could have a tangible impact particularly on slow connections 17:32:15 <06m​umra> (It unfortunately still seems to be the case that every single title image downloads before the game js or tiles will even start downloading. I thought we fixed this a while back?) 17:35:07 <06m​umra> (Oh. Actually that weirdly only happens when devtools is full screen. Something iffy there definitely. And in current webtiles, the tilesets all download before any of the JavaScript, but in the new version the game.js bundle starts first and will be in parallel to them. So I think overall there should be a noticeable improvement in load time.) 17:35:39 <09g​ammafunk> nodejs isn't even an available packages on cao, so we're going to have to do a local install for sure 17:37:07 <09g​ammafunk> I wonder if we should just use this prebuilt binary 17:40:03 <09g​ammafunk> hrm, looks like we can try to use this installer 17:40:18 <09g​ammafunk> nvm (a bash script) 17:40:56 <06m​umra> Throttling chrome to "Fast 4G" in devtools: load time on CDI is 8.78s, on the new version it's 6.46s, so that's actually an awesome improvement 17:41:11 <06m​umra> Yes, nvm is the best way 17:41:23 <06m​umra> That's what I've pointed at in the documentation 17:41:50 <09g​ammafunk> well, I'd probably like it installed in /usr/local/....maybe it's actually best to do a local user install for crawl-dev 17:41:58 <06m​umra> # Download and install nvm: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash # in lieu of restarting the shell \. "$HOME/.nvm/nvm.sh" # Download and install Node.js: nvm install 22 # Verify the Node.js version: node -v # Should print "v22.20.0". # Verify npm version: npm -v # Should print "10.9.3". 17:42:08 <09g​ammafunk> since this is only necessary for the build, right? 17:42:15 <06m​umra> yep 17:42:22 <09g​ammafunk> ok, that's probably what we'll do, then 17:43:37 <09g​ammafunk> I think that backslash before the . is wrong 17:43:42 <09g​ammafunk> it's just sourcing the script 17:44:03 <09g​ammafunk> well it's not wrong, per se, but it's unecessary (confused me at first) 17:44:41 I was wondering if something formatting/presenting it might need the backslash, but even so that'd be a bit weird 17:44:53 I think only regexes care, and that's clearly not a regex 17:45:20 <09g​ammafunk> yeah it actually works fine if you do escape it that way, of course 17:46:01 sure, from a shell's standpoint all the backslash would do is prevent running an alias with the same name 17:49:22 I suppose one could argue that that would be a good idea, since many people don't know about the "." builtin any more (if they do, it's more likely to be as bash's "source") 17:49:42 so it's conceivable that people *are* using it as a local alias 17:51:02 <09g​ammafunk> shell things are always so tricky that way 18:17:17 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-989-g85c8c80f3c: Tweak the logic for title images in webtiles 10(2 minutes ago, 1 file, 8+ 2-) 13https://github.com/crawl/crawl/commit/85c8c80f3c93 18:20:28 03WizardIke02 07* 0.34-a0-974-ga051f2b509: Fix console not showing the last message on windows 10(18 minutes ago, 1 file, 2+ 0-) 13https://github.com/crawl/crawl/commit/a051f2b509c8 18:30:00 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-990-g154315fc53: Fix an undefined variable 10(62 seconds ago, 1 file, 1+ 1-) 13https://github.com/crawl/crawl/commit/154315fc5341 18:34:15 03mumra02 07https://github.com/crawl/crawl/pull/4839 * 0.34-a0-991-gdc916728c3: Really select a random title image on every load 10(65 seconds ago, 1 file, 1+ 0-) 13https://github.com/crawl/crawl/commit/dc916728c3e7 19:00:06 <06m​umra> Well I figured out what's making the ghost dolls constantly randomise 19:00:10 <06m​umra> %git e6c66e347d84e232bc12bb5368e801c868aee4ca 19:00:11 <04C​erebot> Hellmonk {GitHub} * 0.34-a0-300-ge6c66e347d: Add support for conduct titles (#4634) (4 months ago, 10 files, 114+ 11-) https://github.com/crawl/crawl/commit/e6c66e347d84 19:00:58 <02D​arby> yeah the reason I haven't fixed it is that while I was able to technically make the problem go away, I didn't actually know why the solution worked 19:01:10 <02D​arby> and was hesitant to push a commit I didn't myself understand 19:01:35 <06m​umra> The i_ghost struct is used as seed data for the doll randomisation 19:02:05 <02D​arby> yeah, if you subtract the size of the string at the point that it's used, it will stop randomizing 19:02:34 <02D​arby> there's... probably a better way to go about that, though 19:02:46 <06m​umra> I think the problem is the size of the string type is longer than the stored string. So there's a load of random memory included in the hash 19:02:54 <02D​arby> makes sense 19:04:09 <06m​umra> I also fixed it by just using 16 bytes for the hash instead of sizeof(mon.i_ghost) 19:04:18 <02D​arby> yeah that sounds less hacky 19:04:58 <06m​umra> Well .. it still creates a problem down the line if anyone changed the struct again in some unexpected away 19:05:28 <06m​umra> at the very least there should be a comment by the struct saying that it has this side effect since it's very non-obvious 19:05:40 <09h​ellmonk> I sure as hell didn't know about it 19:05:55 <02D​arby> it is ancient kilobyte code 19:06:01 <06m​umra> there's probably a better way to build a seed explicitly from specific props 19:06:13 <09h​ellmonk> it sounds like something that made a lot of sense to do in 2008 19:06:14 <06m​umra> of course, i also question the fact that the doll is being recomputed every single frame 19:06:34 <06m​umra> regardless of how the seed is generated 19:06:52 <09h​ellmonk> clearly the solution is to store the tiledoll info in the ghost struct instead of generating it from the ghost struct 19:07:15 <06m​umra> well i assume that the ghost struct itself is getting recreated every frame as well 19:07:37 <06m​umra> hence why the string memory is randomised every time, causing the seed to shift 19:15:11 <06m​umra> (i think i prefer Darby's solution for a quick fix anyway, until someone has the time to implement storing the doll more permanently. the effect looks pretty horrible when it's happening. tbh just picking a random seed and storing that in the ghost struct would probably be better rather than basing the seed just on its properties...) 19:18:13 <06m​umra> hmm, the ghost's name is used in the seed as well and that doesn't have this randomisation problem; so i'm not sure why it's happening for title 19:29:03 <09g​ammafunk> welp, I have some bad news about node 22, at least in terms of the nvm binary: crawl-dev@crawl:~$ node -v node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by node) node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by node) node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.7' not found (required by node) node: 19:29:04 /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.16' not found 19:29:04 (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by 19:29:05 node) 19:34:29 <09g​ammafunk> everything I'm reading about compliing nodejs is not looking good unless we can get a newer installation of gcc on CAO 19:39:27 compiling gcc isn't too bad, if necessary 19:40:13 <09g​ammafunk> I'm just not sure what else we'd need in the toolchain to be updated 19:40:14 or at least wasn't last time I did it, granting that was 20 years ago 19:40:37 <09g​ammafunk> I think advil had a project to update the toolchain via a local install, or maybe that was something about the chroot 19:41:20 <06m​umra> What's the latest node version that's otherwise available from official package sources? 19:41:36 gcc tends to be good about not requiring too much, since you're supposed to be able to install it on systems with random vendor toolchains 19:41:52 <06m​umra> Because it certainly doesn't need to be 22, i'm just not sure what version will work 19:42:28 I think it itself has to be built with gcc, but you already have that so you should be okay (otherwise you'd have to go back to gcc 1.40 or thenabouts and work forward) 19:43:17 <09g​ammafunk> there's no nodejs package in this (ancient) debian release, so I'd have to just try older nodejs and see which work, probably 19:43:23 <06m​umra> i tested and the build works on node 18 (even though vite says it needs 20) 19:43:29 <09g​ammafunk> nvm installed without a hitch 19:43:42 it does use bison and flex, but if you're not modifying gcc itself you should be able to use the provided outputs instead of building those 19:44:13 <06m​umra> nvm is literally just a script that manages node versions for you 19:44:20 ^ 19:44:25 <09g​ammafunk> yes, I realize that 19:44:39 <09g​ammafunk> I'm saying that it was able to run and install node 19:44:43 <06m​umra> ah 19:44:58 <09g​ammafunk> so if I need to try another version, I can do that 19:45:08 <09g​ammafunk> although I'm not sure if 22 will override an older version it installs 19:45:14 <09g​ammafunk> so possibly I need to remove 22 with it first? 19:45:24 <06m​umra> nvm can juggle multiple versions 19:45:45 the whole point is managing multiple versions, and everything uses the version you set as active 19:45:50 <06m​umra> it's because if you're working on a few code bases you might need to switch version now and then, so you can keep a few versions installed 19:46:04 <09g​ammafunk> right I just need to know how to designate 20 19:46:19 <03i​mplojin> oh yeah i was looking at this ghost tile stuff the last time it came up, there are two monster_info::monster_info initializers there, one of them copies the title, one of them sets the title to an empty string, i was wondering about string size there affecting the seeding but i never got back to it 19:46:27 <06m​umra> `nvm use 20 19:46:38 <06m​umra> switches to the v20 you have installed 19:46:51 <09g​ammafunk> never mind, I just uninstalled 22 for now 19:47:01 <02D​arby> I'm taking earlier as a go-ahead to push the one-liner I had earlier and we can always change to a better fix later 19:48:22 <09g​ammafunk> no dice, I'm still getting errors about GLIBC, GLIBCXX, and CXXABI 19:48:24 <06m​umra> i think the problem is really the string shouldn't be in a struct, because it's not a known size 19:48:39 <09g​ammafunk> with 20, that is 19:48:50 <06m​umra> hmmm 19:49:09 <06m​umra> do you have docker on there? 19:49:12 <09g​ammafunk> hell no 19:49:27 <09g​ammafunk> docker didn't exist when this OS was installed, probably 19:49:38 03Darby02 07* 0.34-a0-975-ga32e351020: Fix player ghost tiles constantly re-randomising 10(9 minutes ago, 1 file, 2+ 1-) 13https://github.com/crawl/crawl/commit/a32e351020e2 19:49:40 <09g​ammafunk> !lg * cao 1 19:49:40 <04C​erebot> 1/5341700. Eidolos the Magician (L1 OMHW), slain by a gnoll (a flail of protection) on D:1 on 2006-12-02 23:47:10, with 20 points after 15 turns and 0:00:04. 19:49:44 <09g​ammafunk> not sure if it ever got a dist upgrade 19:49:54 <09g​ammafunk> from circa 2006, presumably (it might be older than that) 19:50:28 <06m​umra> there's another solution, we don't actually have to build these assets on the server. it's not like a binary. the build should produce the same output whatever system it's run on 19:50:57 <06m​umra> even if the minification is a bit different, it's still the same code, it'll still run the same in the browser 19:52:09 <06m​umra> you can download the static files from github artifacts for instance 19:55:00 <06m​umra> (having said that, i'm wondering whether the tiles will be correct when not built directly from the same output) 19:57:28 <12a​sciiphilia> If you are using wsl, try running it from a non-windows directory. If it's not working for some other reason, I don't think I can test it this week. 20:00:29 <06m​umra> @Darby I realised that string problem is not that it's random memory, but that when a string is in a struct what's actually stored is a pointer to the string data. So it's that pointer that will keep changing every time the struct is recreated (or maybe the string is being reassigned to empty string every frame, but each time it's a different location in memory). Anyway the fix works either way. (Although I would also add a comment on 20:00:29 the i_ghost struct mentioning that it's used as seed data for mcache_ghost, so in the future someone altering it again knows that the order and size of things are important) 20:00:54 <02D​arby> ah, makes sense 20:01:11 <06m​umra> It already is unfortunately, it's inside my home directory in the WSL filesystem 20:03:32 <12a​sciiphilia> What script did you use? 20:11:02 <06m​umra> i tried almost everything from the readme 20:11:29 <06m​umra> fast deploy, deploy with build, develop vs stable 20:11:44 <06m​umra> i got all the pre-built game binaries downloaded 20:11:57 <06m​umra> i got the build to run inside the container 20:12:10 <06m​umra> everything starts up but then the webtiles server just stops immediately 20:12:47 <06m​umra> no particular error, it just sort of gives up 🙂 20:18:01 <12a​sciiphilia> I'll test it when I have time, thanks for letting me know. 20:23:19 <12a​sciiphilia> I’d prefer not to move away from RequireJS. If the codebase hadn’t relied on RequireJS from the start, it might be a different story — but as it stands, many legacy parts depend on it as an old but essential framework. Changing it could introduce unforeseen issues. Replacing the script loader just for a slight performance gain through bundling doesn’t seem worth the trade-off. Of course, there may be other benefits, but 20:23:19 compatibility with older versions would make the project unnecessarily complex. We’d also need to build compatibility layers for older forks or builds, and I’m concerned about the potential problems that could arise from that. 20:23:28 <12a​sciiphilia> Of course, supporting third-party integrations isn’t really something mainstream developers would care about. But DWEM would likely break as well. I’m not sure if the mainstream branch would even allow hooks or commits for such changes, but in my case, I’d have to start everything over from scratch. 22:27:54 03Implojin02 07* 0.34-a0-976-g34f68e377c: Let autofight prioritize good stabs 10(10 weeks ago, 5 files, 37+ 8-) 13https://github.com/crawl/crawl/commit/34f68e377ccd 22:35:28 Unstable branch on crawl.develz.org updated to: 0.34-a0-975-ga32e351020 (34) 22:58:39 Windows builds of master branch on crawl.develz.org updated to: 0.34-a0-976-g34f68e377c 23:34:03 Unstable branch on cbro.berotato.org updated to: 0.34-a0-976-g34f68e377c (34) 23:49:05 <06m​umra> The changes in my PR already support older versions and forks -- if their game.html doesn't contain a specific marker, require js is provided for them with necessary dependencies defined so they can still load correctly. The client, comm and key_conversion objects are unchanged in terms of their external interfaces. It's not a hugely complicated compatibility layer. Obviously the point of this is much more than a simple increase in load 23:49:05 times (that's just a nice benefit). This is about moving to a modern bundling system along with linting which actually enables more forward progress (and contributions from other JavaScript developers) with a codebase that has stagnated. I see that even in your DWEM modules you have the luxury of using modern ECMAScript syntax like import/export and classes. This is about bringing the webtiles codebase into that same modern era, and enabling the 23:49:06 entire modern toolchain to make our developer experience less error prone and allow us to use modern tools and libraries. For instance, it would now be possible for someone to simply rewrite parts of the UI to use React, or to start converting the code to TypeScript. Just examples. As I say the objects like client and comm are still there (they are available globally now on window.DCSS). Perhaps if I can understand better exactly where your DWEM 23:49:06 modules are hooking in and the kind of things they need to do, we can find a way to provide similar hooks in the new framework. 23:55:36 Monster database of master branch on crawl.develz.org updated to: 0.34-a0-976-g34f68e377c 23:58:44 <06m​umra> I should note that the import/export module syntax was introduced in 2015, it's already 10 years old. DWEM was relying on a creaky, undocumented implementation detail of the webtiles framework, so it should be expected that this will be broken one day. But perhaps moving to a modern implementation of JavaScript will make it easier to improve the modularity of the system (for instance if we were able to export TypeScript typings for 23:58:44 integration points, it would be a huge win).