| 15:19 |
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. |
| 15:24 |
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 |
| 15:25 |
billymg |
url should end with '#select' http://alethepedia.com/Africa/?b=The%20negro&e=interior#select |
| 15:25 |
billymg |
since these are manually constructed urls you have to append that manually as well |
| 15:25 |
thimbronion |
billymg: ah ok didn't know, thanks! |
| 15:25 |
billymg |
thimbronion: yeah, sadly no documentation... yet |
| 15:32 |
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 |
| 15:32 |
billymg |
and if real, what the angle is |
| 15:33 |
thimbronion |
http://alethepedia.com/Africa/?b=Another%20peculiar&e=shelter#select |
| 15:35 |
thimbronion |
Come to think of it idk what his source is here: https://twitter.com/nic__carter/status/1406236023592529924 |
| 15:36 |
thimbronion |
But interesting take |
| |
~ 1 hours 19 minutes ~ |
| 16:55 |
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)/ |
| 16:56 |
billymg |
thimbronion: the parentheses? |
| 16:57 |
thimbronion |
billymg: I suspect, but not sure why. |
| 16:58 |
billymg |
thimbronion: hmm, urls get cleaned when added via the web UI. i'm guessing you're not doing that though when bulk importing |
| 16:58 |
billymg |
thimbronion: are you importing directly into mysql? |
| 16:58 |
thimbronion |
billymg: yes |
| 16:59 |
thimbronion |
But not importing urls, just titles |
| 16:59 |
billymg |
do you know where/when the urls get created? |
| 17:00 |
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. |
| 17:01 |
billymg |
yeah, those look much nicer |
| 17:01 |
billymg |
but i'm wondering how the urls get created at all, if the pages are added to mysql directly |
| 17:02 |
thimbronion |
For exanple in search results: http://alethepedia.com/?s=Plato |
| 17:06 |
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 |
| 17:06 |
billymg |
when pages are added through the normal plumbing the titles pass through this before becoming url slugs |
| 17:07 |
thimbronion |
billymg: ty I will check this out! |
| 17:12 |
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 |
| 17:13 |
thimbronion |
The search code is monolithic btw. I haven't seen a function this long since I was an intern. |
| 17:14 |
billymg |
thimbronion: the code is such a mess |
| 17:15 |
billymg |
for my own sanity i want to run the whole codebase through a linter and publish the results in a single patch |
| 17:15 |
billymg |
not that would fix any of the bad patterns, but at least would make it more readable |
| 17:16 |
* |
thimbronion slurps down spitoon |
| 17:16 |
billymg |
thimbronion: what would you think about running the whole thing through a linter |
| 17:16 |
billymg |
? |
| 17:17 |
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 |
| 17:18 |
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() |
| 17:19 |
billymg |
thimbronion: right, it would be of zero help in actually improving the code |
| 17:19 |
thimbronion |
Needs to be broken into 10s of properly named submodules. |
| 17:20 |
thimbronion |
In multiple files |
| 17:20 |
billymg |
thimbronion: yes |
| 17:23 |
billymg |
thimbronion: i haven't really looked at the latest heathen wp but i imagine the code is much cleaner / easier to read |
| 17:25 |
billymg |
lol https://github.com/WordPress/WordPress |
| 17:26 |
billymg |
"WordPress, Git-ified. This repository is just a mirror of the WordPress subversion repository." |
| 17:29 |
thimbronion |
At first glance doesn't look much better |
| 17:33 |
billymg |
yeah, i guess it doesn't. and at least 10x the bloat |
| |
~ 4 hours 36 minutes ~ |
| 22:10 |
billymg |
thimbronion: http://paste.deedbot.org/?id=J5AT |