aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
aienos.com / om / site / seo.om
| 1 | note All machine surfaces derive from the same saved registry and just-emitted HTML. |
| 2 | |
| 3 | fn ss_quote value view uchar * to void |
| 4 | sr_raw ssquote |
| 5 | for i ulong len value |
| 6 | c = get value i |
| 7 | if eq c 34 |
| 8 | sr_raw ssqesc |
| 9 | else |
| 10 | if eq c 92 |
| 11 | sr_raw ssbesc |
| 12 | else |
| 13 | if eq c 10 |
| 14 | sr_raw ssnesc |
| 15 | else |
| 16 | if eq c 13 |
| 17 | sr_raw ssresc |
| 18 | else |
| 19 | if eq c 9 |
| 20 | sr_raw sstesc |
| 21 | else |
| 22 | ss_literal part value i 1 |
| 23 | end |
| 24 | end |
| 25 | end |
| 26 | end |
| 27 | end |
| 28 | end |
| 29 | sr_raw ssquote |
| 30 | end |
| 31 | |
| 32 | fn ss_qfield row ulong col ulong to void |
| 33 | buf = new uchar 4096 0 |
| 34 | n = st_field row col buf |
| 35 | ss_quote part buf 0 n |
| 36 | end |
| 37 | |
| 38 | fn ss_node node ulong to void |
| 39 | buf = new uchar 4096 0 |
| 40 | n = sj_string node buf |
| 41 | sr_raw part buf 0 n |
| 42 | end |
| 43 | |
| 44 | fn ss_url row ulong to void |
| 45 | sr_raw shhost |
| 46 | st_emit row 0 false |
| 47 | end |
| 48 | |
| 49 | fn ss_mdpath row ulong dst edit uchar * to ulong |
| 50 | n = st_field row 0 dst |
| 51 | if st_match row 0 stroot |
| 52 | ret st_append dst ssmdidx n |
| 53 | end |
| 54 | ret st_append dst ssmd sub n 1 |
| 55 | end |
| 56 | |
| 57 | fn ss_link row ulong to void |
| 58 | sr_raw ssdash |
| 59 | sr_raw ssopen |
| 60 | st_emit row 1 false |
| 61 | sr_raw ssmid |
| 62 | st_emit row 0 false |
| 63 | sr_raw ssclose |
| 64 | sr_raw sscolon |
| 65 | st_emit row 2 false |
| 66 | sr_raw ssnl |
| 67 | end |
| 68 | |
| 69 | fn ss_group area view uchar * to void |
| 70 | sr_raw SS0001 |
| 71 | sr_raw area |
| 72 | sr_raw ssnn |
| 73 | for i ulong get stcount 0 |
| 74 | if st_match i 3 area |
| 75 | ss_link i |
| 76 | end |
| 77 | end |
| 78 | end |
| 79 | |
| 80 | fn ss_groups to void |
| 81 | ss_group stsi |
| 82 | ss_group SS0002 |
| 83 | ss_group SS0003 |
| 84 | ss_group SS0004 |
| 85 | ss_group SS0005 |
| 86 | ss_group SS0006 |
| 87 | end |
| 88 | |
| 89 | fn ss_sitemap_md to void |
| 90 | sr_raw SS0007 |
| 91 | ss_groups |
| 92 | sr_raw SS0009 |
| 93 | end |
| 94 | |
| 95 | fn ss_mirror row ulong to void |
| 96 | src = new uchar 8192 0 |
| 97 | route = new uchar 1024 0 |
| 98 | mirror = new uchar 1024 0 |
| 99 | aliasbuf = new uchar 1024 0 |
| 100 | n = st_html_path row route |
| 101 | sn = st_path part route 0 n src |
| 102 | mn = ss_mdpath row mirror |
| 103 | st_open part mirror 0 mn |
| 104 | sr_raw SS0010 |
| 105 | ss_qfield row 1 |
| 106 | sr_raw SS0011 |
| 107 | ss_qfield row 2 |
| 108 | sr_raw SS0012 |
| 109 | ss_modified row |
| 110 | sr_raw SS0013 |
| 111 | ss_url row |
| 112 | sr_raw SS0014 |
| 113 | sh_markdown part src 0 sn row |
| 114 | sr_raw SS0015 |
| 115 | for i ulong get stcount 0 |
| 116 | ss_link i |
| 117 | end |
| 118 | sr_close |
| 119 | an = st_field row 0 aliasbuf |
| 120 | an = st_append aliasbuf ssmdidx an |
| 121 | if not sr_equal part mirror 0 mn part aliasbuf 0 an |
| 122 | sn = st_path part mirror 0 mn src |
| 123 | st_copy part src 0 sn part aliasbuf 0 an |
| 124 | end |
| 125 | end |
| 126 | |
| 127 | fn ss_xml to void |
| 128 | sr_raw SS0024 |
| 129 | for i ulong get stcount 0 |
| 130 | sr_raw SS0025 |
| 131 | ss_url i |
| 132 | sr_raw SS0026 |
| 133 | ss_modified i |
| 134 | sr_raw SS0027 |
| 135 | sr_raw SS0028 |
| 136 | end |
| 137 | sr_raw SS0029 |
| 138 | end |
| 139 | |
| 140 | fn ss_head_row row ulong to void |
| 141 | buf = new uchar 4096 0 |
| 142 | sg_graph row |
| 143 | ss_route_assets row |
| 144 | ss_head_extra row |
| 145 | if or st_match row 6 sspaper st_match row 6 ssart |
| 146 | sr_raw SS0030 |
| 147 | st_emit row 7 true |
| 148 | sr_raw SS0031 |
| 149 | end |
| 150 | n = st_field row 9 buf |
| 151 | if gt n 0 |
| 152 | sr_raw SS0032 |
| 153 | sr_esc part buf 0 n |
| 154 | sr_raw SS0033 |
| 155 | end |
| 156 | if st_match row 4 sthtml |
| 157 | n = st_field row 5 buf |
| 158 | sh_load part buf 0 n |
| 159 | h = sh_find shhead 0 |
| 160 | sh_extra 0 h |
| 161 | end |
| 162 | end |
| 163 | |
| 164 | fn sc_extrahead route view uchar * to void |
| 165 | for i ulong get stcount 0 |
| 166 | if st_match i 0 route |
| 167 | ss_head_row i |
| 168 | ret |
| 169 | end |
| 170 | end |
| 171 | end |
| 172 | |
| 173 | fn ss_state to void |
| 174 | sr_raw SS0040 |
| 175 | root = sj_load SS0034 |
| 176 | arr = sj_find root SS0035 |
| 177 | node = sj_first arr |
| 178 | while ne node 0 bound 1024 |
| 179 | sr_raw ssdash |
| 180 | ss_node sj_find node SS0036 |
| 181 | sr_raw sscolon |
| 182 | ss_node sj_find node SS0037 |
| 183 | sr_raw sscolon |
| 184 | ss_node sj_find node SS0038 |
| 185 | sr_raw ssspace |
| 186 | receipt = sj_find node SS0039 |
| 187 | if eq sj_kind receipt 3 |
| 188 | ss_node receipt |
| 189 | end |
| 190 | sr_raw ssnl |
| 191 | node = sj_next node |
| 192 | end |
| 193 | ss_research_state |
| 194 | end |
| 195 | |
| 196 | fn ss_research_state to void |
| 197 | root = sj_load SS0041 |
| 198 | node = sj_find root SS0042 |
| 199 | sr_raw SS0047 |
| 200 | ss_node sj_find node SS0043 |
| 201 | sr_raw ssspace |
| 202 | ss_node sj_find node SS0044 |
| 203 | sr_raw ssspace |
| 204 | ss_node sj_find node SS0045 |
| 205 | sr_raw ssspace |
| 206 | ss_node sj_find node SS0046 |
| 207 | sr_raw ssnn |
| 208 | end |
| 209 | |
| 210 | fn ss_data_links to void |
| 211 | sr_raw SS0048 |
| 212 | root = sj_load ssfields |
| 213 | node = sj_first root |
| 214 | while ne node 0 bound 1024 |
| 215 | sr_raw ssdash |
| 216 | sr_raw ssopen |
| 217 | ss_node sj_find node SS0049 |
| 218 | sr_raw ssmid |
| 219 | ss_node sj_find node SS0049 |
| 220 | sr_raw ssclose |
| 221 | sr_raw sscolon |
| 222 | ss_node sj_find node SS0050 |
| 223 | sr_raw SS0052 |
| 224 | ss_node sj_find node SS0051 |
| 225 | sr_raw ssnl |
| 226 | node = sj_next node |
| 227 | end |
| 228 | end |
| 229 | |
| 230 | fn ss_llms_txt to void |
| 231 | sr_raw SS0053 |
| 232 | ss_state |
| 233 | ss_groups |
| 234 | ss_data_links |
| 235 | sr_raw SS0054 |
| 236 | end |
| 237 | |
| 238 | fn ss_full_txt to void |
| 239 | buf = new uchar 1024 0 |
| 240 | src = new uchar 8192 0 |
| 241 | sr_raw SS0055 |
| 242 | for i ulong get stcount 0 |
| 243 | sr_raw SS0056 |
| 244 | st_emit i 1 false |
| 245 | sr_raw SS0057 |
| 246 | ss_url i |
| 247 | sr_raw SS0058 |
| 248 | st_emit i 7 false |
| 249 | sr_raw SS0059 |
| 250 | ss_modified i |
| 251 | sr_raw SS0059d |
| 252 | n = st_html_path i buf |
| 253 | sn = st_path part buf 0 n src |
| 254 | sh_markdown part src 0 sn i |
| 255 | end |
| 256 | end |
| 257 | |
| 258 | fn ss_feed_entry row ulong to void |
| 259 | sr_raw SS0060 |
| 260 | st_emit row 1 true |
| 261 | sr_raw SS0061 |
| 262 | ss_url row |
| 263 | sr_raw SS0062 |
| 264 | ss_url row |
| 265 | sr_raw SS0063 |
| 266 | st_emit row 7 true |
| 267 | sr_raw SS0064 |
| 268 | ss_modified row |
| 269 | sr_raw SS0065 |
| 270 | st_emit row 2 true |
| 271 | sr_raw SS0066 |
| 272 | if st_match row 6 sspaper |
| 273 | sr_raw SS0067 |
| 274 | else |
| 275 | sr_raw SS0068 |
| 276 | end |
| 277 | sr_raw SS0069 |
| 278 | end |
| 279 | |
| 280 | fn ss_feed_xml to void |
| 281 | sr_raw SS0070 |
| 282 | st_stamp |
| 283 | sr_raw SS0071 |
| 284 | ss_feed_sorted |
| 285 | sr_raw SS0072 |
| 286 | end |
| 287 | |
| 288 | fn ss_newer a ulong b ulong to bool |
| 289 | pa = get stoff add mul a STFIELDS 7 |
| 290 | pb = get stoff add mul b STFIELDS 7 |
| 291 | for i ulong 10 |
| 292 | ca = get stpool add pa i |
| 293 | cb = get stpool add pb i |
| 294 | if ne ca cb |
| 295 | ret gt ca cb |
| 296 | end |
| 297 | end |
| 298 | ret lt a b |
| 299 | end |
| 300 | |
| 301 | fn ss_feed_sorted to void |
| 302 | seen = new uchar 128 0 |
| 303 | for i ulong get stcount 0 |
| 304 | best = get stcount 0 |
| 305 | for j ulong get stcount 0 |
| 306 | if eq get seen j 0 |
| 307 | if or st_match j 6 sspaper st_match j 6 ssart |
| 308 | if eq best get stcount 0 |
| 309 | best = j |
| 310 | else |
| 311 | if ss_newer j best |
| 312 | best = j |
| 313 | end |
| 314 | end |
| 315 | end |
| 316 | end |
| 317 | end |
| 318 | if eq best get stcount 0 |
| 319 | break |
| 320 | end |
| 321 | put seen best 1 |
| 322 | ss_feed_entry best |
| 323 | end |
| 324 | end |
| 325 | |
| 326 | fn ss_data_index to void |
| 327 | sr_raw SS0073 |
| 328 | st_stamp |
| 329 | sr_raw SS0074 |
| 330 | sr_file ssfields |
| 331 | sr_raw SS0075 |
| 332 | end |
| 333 | |
| 334 | fn ss_profiles to void |
| 335 | sr_raw SS0076 |
| 336 | end |
| 337 | |
| 338 | fn ss_not_found to void |
| 339 | sc_begin SS0077 SS0078 |
| 340 | sc_route SS0079 stsi |
| 341 | sr_raw SS0080 |
| 342 | sc_end |
| 343 | end |
| 344 | |
| 345 | note Old addresses forward to the new one, as main's seo::REDIRECTS: /allen/ became /aien/. |
| 346 | note /js/redirect.js keeps any ?query and #hash; the refresh is the no-script path. A stub is not a page. |
| 347 | text ssredir "allen/index.html" |
| 348 | text ssredirh "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"dark\"><title>Moved to /aien/ | AienOS</title><meta name=\"description\" content=\"This page moved to /aien/.\"><link rel=\"canonical\" href=\"https://www.aienos.com/aien/\"><meta name=\"robots\" content=\"noindex\"><meta http-equiv=\"refresh\" content=\"0; url=/aien/\"><script src=\"/js/redirect.js\" data-to=\"/aien/\"></script></head><body><p class=\"quiet-utility\"><a href=\"/\">Aien home</a> <a class=\"x-link\" href=\"https://x.com/drakestapleton\">Follow me on X</a></p><main id=\"main-content\"><p>This page moved to <a href=\"/aien/\">aienos.com/aien/</a>.</p></main><footer><p class=\"aien-reach-foot\"><a href=\"https://x.com/drakestapleton\">X @drakestapleton</a> <a href=\"mailto:drake@aienos.com\">drake@aienos.com</a> <a href=\"/contact/\">Contact</a></p></footer></body></html>\n" |
| 349 | |
| 350 | fn ss_redirects to void |
| 351 | st_open ssredir |
| 352 | sr_raw ssredirh |
| 353 | sr_close |
| 354 | end |
| 355 | |
| 356 | fn ss_humans_txt to void |
| 357 | sr_raw SS0081 |
| 358 | st_stamp |
| 359 | sr_raw ssnl |
| 360 | end |
| 361 | |
| 362 | fn ss_surfaces to void |
| 363 | st_open ssmap |
| 364 | ss_xml |
| 365 | sr_close |
| 366 | st_open ssmapmd |
| 367 | ss_sitemap_md |
| 368 | sr_close |
| 369 | st_open ssllms |
| 370 | ss_llms_txt |
| 371 | sr_close |
| 372 | st_open ssfull |
| 373 | ss_full_txt |
| 374 | sr_close |
| 375 | st_open ssfeed |
| 376 | ss_feed_xml |
| 377 | sr_close |
| 378 | st_open ssnow |
| 379 | sp_now_json |
| 380 | sr_close |
| 381 | st_open ssnowfd |
| 382 | sp_now_feed |
| 383 | sr_close |
| 384 | st_open ssdata |
| 385 | ss_data_index |
| 386 | sr_close |
| 387 | st_open ssrobots |
| 388 | ss_robots_txt |
| 389 | sr_close |
| 390 | st_open sshumans |
| 391 | ss_humans_txt |
| 392 | sr_close |
| 393 | st_open ss404 |
| 394 | ss_not_found |
| 395 | sr_close |
| 396 | ss_redirects |
| 397 | for i ulong get stcount 0 |
| 398 | ss_mirror i |
| 399 | end |
| 400 | si_required_data |
| 401 | si_expected |
| 402 | sx_inventory |
| 403 | end |
| 404 | |
| 405 | fn ss_robots_txt to void |
| 406 | sr_raw SS0082 |
| 407 | end |
| 408 | |
| 409 | fn ss_literal value view uchar * to void |
| 410 | c = get value 0 |
| 411 | if lt c 32 |
| 412 | trap 10 |
| 413 | end |
| 414 | if eq c 60 |
| 415 | sr_raw ssltesc |
| 416 | else |
| 417 | sr_raw value |
| 418 | end |
| 419 | end |