thimbronion: So China invents gun powder, uses it fore fireworks and making loud sounds to scare the enemy. Builds the world's largest navy, decomissions it. Captures Bitcoin mining, dismantles industry. They're really their own worst enemy.
thimbronion: billymg: should the text selection code jump to the the highlighted text? Not doing that for me here: http://alethepedia.com/Africa/?b=The%20negro&e=interior
billymg: url should end with '#select' http://alethepedia.com/Africa/?b=The%20negro&e=interior#select
billymg: since these are manually constructed urls you have to append that manually as well
thimbronion: billymg: ah ok didn't know, thanks!
billymg: thimbronion: yeah, sadly no documentation... yet
billymg: thimbronion: i've seen the reports about 'china bans mining', as with everything these days it's impossible for me to tell whether real or psyop
billymg: and if real, what the angle is
thimbronion: Come to think of it idk what his source is here: https://twitter.com/nic__carter/status/1406236023592529924
thimbronion: But interesting take
thimbronion: billymg: another issue I'm running into is that somehow something about titles like this is messing up permalinks: http://alethepedia.com/Plato-(Philosopher)/
billymg: thimbronion: the parentheses?
thimbronion: billymg: I suspect, but not sure why.
billymg: thimbronion: hmm, urls get cleaned when added via the web UI. i'm guessing you're not doing that though when bulk importing
billymg: thimbronion: are you importing directly into mysql?
thimbronion: billymg: yes
thimbronion: But not importing urls, just titles
billymg: do you know where/when the urls get created?
thimbronion: I don't. There are settings in wordpress to determine whether to generate id based or title based links. I currently have it set to generate title based links.
billymg: yeah, those look much nicer
billymg: but i'm wondering how the urls get created at all, if the pages are added to mysql directly
thimbronion: For exanple in search results: http://alethepedia.com/?s=Plato
billymg: i found the method, perhaps you can write a script that bulk updates them in mysql. look for 'sanitize_title' in wp-includes/formatting.php
billymg: when pages are added through the normal plumbing the titles pass through this before becoming url slugs
thimbronion: billymg: ty I will check this out!
billymg: thimbronion: looking closer 'sanitize_title' is more of a wrapper function around 'sanitize_title_with_dashes', the latter doesn't contain any other mp-wp plumbing so could easily be copy/pasted into another script
thimbronion: The search code is monolithic btw. I haven't seen a function this long since I was an intern.
billymg: thimbronion: the code is such a mess
billymg: for my own sanity i want to run the whole codebase through a linter and publish the results in a single patch
billymg: not that would fix any of the bad patterns, but at least would make it more readable
thimbronion slurps down spitoon
billymg: thimbronion: what would you think about running the whole thing through a linter
billymg: ?
billymg: one concern is how does one audit to make sure i didn't slip in any boobytraps, seeing as how nearly every line will be modified
thimbronion: I'm not sure how much that would help me. I just don't see how I'm every gonna grasp a function that is hundreds of lines long like get_posts()
billymg: thimbronion: right, it would be of zero help in actually improving the code
thimbronion: Needs to be broken into 10s of properly named submodules.
thimbronion: In multiple files
billymg: thimbronion: yes
billymg: thimbronion: i haven't really looked at the latest heathen wp but i imagine the code is much cleaner / easier to read
billymg: "WordPress, Git-ified. This repository is just a mirror of the WordPress subversion repository."
thimbronion: At first glance doesn't look much better
billymg: yeah, i guess it doesn't. and at least 10x the bloat
billymg: thimbronion: http://paste.deedbot.org/?id=J5AT