diff options
Diffstat (limited to 'services')
5 files changed, 89 insertions, 87 deletions
diff --git a/services/blog/deno.jsonc b/services/blog/deno.jsonc index 55c2fc2e..d42fd765 100644 --- a/services/blog/deno.jsonc +++ b/services/blog/deno.jsonc @@ -1,14 +1,14 @@ { "imports": { "@djot/djot": "npm:@djot/djot@^0.3.2", - "@std/assert": "jsr:@std/assert@^1.0.12", - "@std/cli": "jsr:@std/cli@^1.0.15", - "@std/fs": "jsr:@std/fs@^1.0.15", - "@std/http": "jsr:@std/http@^1.0.13", - "@std/path": "jsr:@std/path@^1.0.8", - "@std/toml": "jsr:@std/toml@^1.0.3", + "@std/assert": "jsr:@std/assert@^1.0.13", + "@std/cli": "jsr:@std/cli@^1.0.20", + "@std/fs": "jsr:@std/fs@^1.0.19", + "@std/http": "jsr:@std/http@^1.0.19", + "@std/path": "jsr:@std/path@^1.1.1", + "@std/toml": "jsr:@std/toml@^1.0.8", "checksum/": "https://deno.land/x/checksum@1.4.0/", - "shiki": "npm:shiki@^3.2.1", + "shiki": "npm:shiki@^3.7.0", "zod/": "https://deno.land/x/zod@v3.24.2/", "myjsx/jsx-runtime": "./nuldoc-src/jsx/jsx-runtime.ts", "myjsx-types/jsx-runtime": "./nuldoc-src/jsx/types.d.ts", diff --git a/services/blog/deno.lock b/services/blog/deno.lock index f9eda6fb..ac2480ed 100644 --- a/services/blog/deno.lock +++ b/services/blog/deno.lock @@ -1,61 +1,63 @@ { - "version": "4", + "version": "5", "specifiers": { - "jsr:@std/assert@^1.0.12": "1.0.12", - "jsr:@std/cli@^1.0.12": "1.0.15", - "jsr:@std/cli@^1.0.15": "1.0.15", - "jsr:@std/collections@^1.0.10": "1.0.10", - "jsr:@std/encoding@^1.0.7": "1.0.8", - "jsr:@std/fmt@^1.0.5": "1.0.6", - "jsr:@std/fs@^1.0.15": "1.0.15", - "jsr:@std/html@^1.0.3": "1.0.3", - "jsr:@std/http@^1.0.13": "1.0.13", - "jsr:@std/internal@^1.0.6": "1.0.6", + "jsr:@std/assert@^1.0.13": "1.0.13", + "jsr:@std/cli@^1.0.20": "1.0.20", + "jsr:@std/collections@^1.1.1": "1.1.2", + "jsr:@std/encoding@^1.0.10": "1.0.10", + "jsr:@std/fmt@^1.0.8": "1.0.8", + "jsr:@std/fs@^1.0.19": "1.0.19", + "jsr:@std/html@^1.0.4": "1.0.4", + "jsr:@std/http@^1.0.19": "1.0.19", + "jsr:@std/internal@^1.0.6": "1.0.9", + "jsr:@std/internal@^1.0.9": "1.0.9", "jsr:@std/media-types@^1.1.0": "1.1.0", "jsr:@std/net@^1.0.4": "1.0.4", - "jsr:@std/path@^1.0.8": "1.0.8", - "jsr:@std/streams@^1.0.9": "1.0.9", - "jsr:@std/toml@^1.0.3": "1.0.3", + "jsr:@std/path@^1.1.1": "1.1.1", + "jsr:@std/streams@^1.0.10": "1.0.10", + "jsr:@std/toml@^1.0.8": "1.0.8", "npm:@djot/djot@~0.3.2": "0.3.2", - "npm:shiki@^3.2.1": "3.2.1" + "npm:shiki@^3.7.0": "3.7.0" }, "jsr": { - "@std/assert@1.0.12": { - "integrity": "08009f0926dda9cbd8bef3a35d3b6a4b964b0ab5c3e140a4e0351fbf34af5b9a", + "@std/assert@1.0.13": { + "integrity": "ae0d31e41919b12c656c742b22522c32fb26ed0cba32975cb0de2a273cb68b29", "dependencies": [ - "jsr:@std/internal" + "jsr:@std/internal@^1.0.6" ] }, "@std/cli@1.0.13": { "integrity": "5db2d95ab2dca3bca9fb6ad3c19908c314e93d6391c8b026725e4892d4615a69" }, - "@std/cli@1.0.15": { - "integrity": "e79ba3272ec710ca44d8342a7688e6288b0b88802703f3264184b52893d5e93f" + "@std/cli@1.0.20": { + "integrity": "a8c384a2c98cec6ec6a2055c273a916e2772485eb784af0db004c5ab8ba52333" }, - "@std/collections@1.0.10": { - "integrity": "903af106a3d92970d74e20f7ebff77d9658af9bef4403f1dc42a7801c0575899" + "@std/collections@1.1.2": { + "integrity": "f1685dd45c3ec27c39d0e8a642ccf810f391ec8a6cb5e7355926e6dacc64c43e" }, - "@std/encoding@1.0.8": { - "integrity": "a6c8f3f933ab1bed66244f435d1dc0fd23a888e07195532122ddc3d5f8f0e6b4" + "@std/encoding@1.0.10": { + "integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1" }, - "@std/fmt@1.0.6": { - "integrity": "a2c56a69a2369876ddb3ad6a500bb6501b5bad47bb3ea16bfb0c18974d2661fc" + "@std/fmt@1.0.8": { + "integrity": "71e1fc498787e4434d213647a6e43e794af4fd393ef8f52062246e06f7e372b7" }, - "@std/fs@1.0.15": { - "integrity": "c083fb479889d6440d768e498195c3fc499d426fbf9a6592f98f53884d1d3f41", + "@std/fs@1.0.19": { + "integrity": "051968c2b1eae4d2ea9f79a08a3845740ef6af10356aff43d3e2ef11ed09fb06", "dependencies": [ + "jsr:@std/internal@^1.0.9", "jsr:@std/path" ] }, - "@std/html@1.0.3": { - "integrity": "7a0ac35e050431fb49d44e61c8b8aac1ebd55937e0dc9ec6409aa4bab39a7988" + "@std/html@1.0.4": { + "integrity": "eff3497c08164e6ada49b7f81a28b5108087033823153d065e3f89467dd3d50e" }, - "@std/http@1.0.13": { - "integrity": "d29618b982f7ae44380111f7e5b43da59b15db64101198bb5f77100d44eb1e1e", + "@std/http@1.0.19": { + "integrity": "52128c8d00a1f0b20019f8b72376e7ef5f3133375b6f805b5bc89b9de2ad4686", "dependencies": [ - "jsr:@std/cli@^1.0.12", + "jsr:@std/cli", "jsr:@std/encoding", "jsr:@std/fmt", + "jsr:@std/fs", "jsr:@std/html", "jsr:@std/media-types", "jsr:@std/net", @@ -63,8 +65,8 @@ "jsr:@std/streams" ] }, - "@std/internal@1.0.6": { - "integrity": "9533b128f230f73bd209408bb07a4b12f8d4255ab2a4d22a1fd6d87304aca9a4" + "@std/internal@1.0.9": { + "integrity": "bdfb97f83e4db7a13e8faab26fb1958d1b80cc64366501af78a0aee151696eb8" }, "@std/media-types@1.1.0": { "integrity": "c9d093f0c05c3512932b330e3cc1fe1d627b301db33a4c2c2185c02471d6eaa4" @@ -72,14 +74,17 @@ "@std/net@1.0.4": { "integrity": "2f403b455ebbccf83d8a027d29c5a9e3a2452fea39bb2da7f2c04af09c8bc852" }, - "@std/path@1.0.8": { - "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" + "@std/path@1.1.1": { + "integrity": "fe00026bd3a7e6a27f73709b83c607798be40e20c81dde655ce34052fd82ec76", + "dependencies": [ + "jsr:@std/internal@^1.0.9" + ] }, - "@std/streams@1.0.9": { - "integrity": "a9d26b1988cdd7aa7b1f4b51e1c36c1557f3f252880fa6cc5b9f37078b1a5035" + "@std/streams@1.0.10": { + "integrity": "75c0b1431873cd0d8b3d679015220204d36d3c7420d93b60acfc379eb0dc30af" }, - "@std/toml@1.0.3": { - "integrity": "dd5c039860a312779ec19980be000d977ce8f56fadaa073d8f33632f21540ffb", + "@std/toml@1.0.8": { + "integrity": "eb8ae76b4cc1c6c13f2a91123675823adbec2380de75cd3748c628960d952164", "dependencies": [ "jsr:@std/collections" ] @@ -87,10 +92,11 @@ }, "npm": { "@djot/djot@0.3.2": { - "integrity": "sha512-joMKR24B8rxueyFiJbpZAqEiypjvOyzTxzkhyr0q5mM/sUBaOD3unna/9IxtOotFugViyYlkIRaiXg3xM//zxg==" + "integrity": "sha512-joMKR24B8rxueyFiJbpZAqEiypjvOyzTxzkhyr0q5mM/sUBaOD3unna/9IxtOotFugViyYlkIRaiXg3xM//zxg==", + "bin": true }, - "@shikijs/core@3.2.1": { - "integrity": "sha512-FhsdxMWYu/C11sFisEp7FMGBtX/OSSbnXZDMBhGuUDBNTdsoZlMSgQv5f90rwvzWAdWIW6VobD+G3IrazxA6dQ==", + "@shikijs/core@3.7.0": { + "integrity": "sha512-yilc0S9HvTPyahHpcum8eonYrQtmGTU0lbtwxhA6jHv4Bm1cAdlPFRCJX4AHebkCm75aKTjjRAW+DezqD1b/cg==", "dependencies": [ "@shikijs/types", "@shikijs/vscode-textmate", @@ -98,35 +104,35 @@ "hast-util-to-html" ] }, - "@shikijs/engine-javascript@3.2.1": { - "integrity": "sha512-eMdcUzN3FMQYxOmRf2rmU8frikzoSHbQDFH2hIuXsrMO+IBOCI9BeeRkCiBkcLDHeRKbOCtYMJK3D6U32ooU9Q==", + "@shikijs/engine-javascript@3.7.0": { + "integrity": "sha512-0t17s03Cbv+ZcUvv+y33GtX75WBLQELgNdVghnsdhTgU3hVcWcMsoP6Lb0nDTl95ZJfbP1mVMO0p3byVh3uuzA==", "dependencies": [ "@shikijs/types", "@shikijs/vscode-textmate", "oniguruma-to-es" ] }, - "@shikijs/engine-oniguruma@3.2.1": { - "integrity": "sha512-wZZAkayEn6qu2+YjenEoFqj0OyQI64EWsNR6/71d1EkG4sxEOFooowKivsWPpaWNBu3sxAG+zPz5kzBL/SsreQ==", + "@shikijs/engine-oniguruma@3.7.0": { + "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==", "dependencies": [ "@shikijs/types", "@shikijs/vscode-textmate" ] }, - "@shikijs/langs@3.2.1": { - "integrity": "sha512-If0iDHYRSGbihiA8+7uRsgb1er1Yj11pwpX1c6HLYnizDsKAw5iaT3JXj5ZpaimXSWky/IhxTm7C6nkiYVym+A==", + "@shikijs/langs@3.7.0": { + "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==", "dependencies": [ "@shikijs/types" ] }, - "@shikijs/themes@3.2.1": { - "integrity": "sha512-k5DKJUT8IldBvAm8WcrDT5+7GA7se6lLksR+2E3SvyqGTyFMzU2F9Gb7rmD+t+Pga1MKrYFxDIeyWjMZWM6uBQ==", + "@shikijs/themes@3.7.0": { + "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==", "dependencies": [ "@shikijs/types" ] }, - "@shikijs/types@3.2.1": { - "integrity": "sha512-/NTWAk4KE2M8uac0RhOsIhYQf4pdU0OywQuYDGIGAJ6Mjunxl2cGiuLkvu4HLCMn+OTTLRWkjZITp+aYJv60yA==", + "@shikijs/types@3.7.0": { + "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==", "dependencies": [ "@shikijs/vscode-textmate", "@types/hast" @@ -174,9 +180,6 @@ "dequal" ] }, - "emoji-regex-xs@1.0.0": { - "integrity": "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==" - }, "hast-util-to-html@9.0.5": { "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", "dependencies": [ @@ -240,20 +243,19 @@ "micromark-util-types@2.0.2": { "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==" }, - "oniguruma-parser@0.5.4": { - "integrity": "sha512-yNxcQ8sKvURiTwP0mV6bLQCYE7NKfKRRWunhbZnXgxSmB1OXa1lHrN3o4DZd+0Si0kU5blidK7BcROO8qv5TZA==" + "oniguruma-parser@0.12.1": { + "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==" }, - "oniguruma-to-es@4.1.0": { - "integrity": "sha512-SNwG909cSLo4vPyyPbU/VJkEc9WOXqu2ycBlfd1UCXLqk1IijcQktSBb2yRQ2UFPsDhpkaf+C1dtT3PkLK/yWA==", + "oniguruma-to-es@4.3.3": { + "integrity": "sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==", "dependencies": [ - "emoji-regex-xs", "oniguruma-parser", "regex", "regex-recursion" ] }, - "property-information@7.0.0": { - "integrity": "sha512-7D/qOz/+Y4X/rzSB6jKxKUsQnphO046ei8qxG59mtM3RG3DHgTK81HrxrmoDVINJb8NKT5ZsRbwHvQ6B68Iyhg==" + "property-information@7.1.0": { + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==" }, "regex-recursion@6.0.2": { "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", @@ -270,8 +272,8 @@ "regex-utilities" ] }, - "shiki@3.2.1": { - "integrity": "sha512-VML/2o1/KGYkEf/stJJ+s9Ypn7jUKQPomGLGYso4JJFMFxVDyPNsjsI3MB3KLjlMOeH44gyaPdXC6rik2WXvUQ==", + "shiki@3.7.0": { + "integrity": "sha512-ZcI4UT9n6N2pDuM2n3Jbk0sR4Swzq43nLPgS/4h0E3B/NrFn2HKElrDtceSf8Zx/OWYOo7G1SAtBLypCp+YXqg==", "dependencies": [ "@shikijs/core", "@shikijs/engine-javascript", @@ -547,14 +549,14 @@ }, "workspace": { "dependencies": [ - "jsr:@std/assert@^1.0.12", - "jsr:@std/cli@^1.0.15", - "jsr:@std/fs@^1.0.15", - "jsr:@std/http@^1.0.13", - "jsr:@std/path@^1.0.8", - "jsr:@std/toml@^1.0.3", + "jsr:@std/assert@^1.0.13", + "jsr:@std/cli@^1.0.20", + "jsr:@std/fs@^1.0.19", + "jsr:@std/http@^1.0.19", + "jsr:@std/path@^1.1.1", + "jsr:@std/toml@^1.0.8", "npm:@djot/djot@~0.3.2", - "npm:shiki@^3.2.1" + "npm:shiki@^3.7.0" ] } } diff --git a/services/blog/public/posts/2022-04-09/phperkaigi-2022-tokens/index.html b/services/blog/public/posts/2022-04-09/phperkaigi-2022-tokens/index.html index caa68793..9d913221 100644 --- a/services/blog/public/posts/2022-04-09/phperkaigi-2022-tokens/index.html +++ b/services/blog/public/posts/2022-04-09/phperkaigi-2022-tokens/index.html @@ -584,7 +584,7 @@ <span class="line"><span style="color:#005CC5">0x010FC21</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1FAD6B5</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1151151</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x010FC21</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F294A7</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F295B7</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1FAD6B5</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F294A7</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F295B7</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F8C63F</span><span style="color:#24292E">,</span></span> <span class="line"><span style="color:#005CC5">0x1F8C631</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1FAD6B5</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x17AD6BD</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x17AD6BD</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F8C63F</span><span style="color:#24292E">, </span><span style="color:#005CC5">0x1F295B7</span><span style="color:#24292E">,</span></span> <span class="line"><span style="color:#24292E">];</span></span> -<span class="line"><span style="color:#24292E">$t </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> null</span><span style="color:#D73A49">.</span><span style="color:#005CC5">false</span><span style="color:#24292E">; </span><span style="color:#D73A49">for</span><span style="color:#24292E"> ($i </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> 0</span><span style="color:#24292E">; $i </span><span style="color:#D73A49"><=</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">(</span><span style="color:#005CC5">__LINE__</span><span style="color:#D73A49">-</span><span style="color:#005CC5">035</span><span style="color:#24292E">,</span><span style="color:#005CC5">6</span><span style="color:#24292E">); </span><span style="color:#D73A49">++</span><span style="color:#24292E">$i) </span><span style="color:#D73A49">if</span><span style="color:#24292E"> (</span><span style="color:#D73A49">!</span><span style="color:#005CC5">isset</span><span style="color:#24292E">($xs[$i])) </span><span style="color:#D73A49">break</span><span style="color:#24292E">; </span><span style="color:#D73A49">else</span></span> +<span class="line"><span style="color:#24292E">$t </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> null</span><span style="color:#D73A49">.</span><span style="color:#005CC5">false</span><span style="color:#24292E">; </span><span style="color:#D73A49">for</span><span style="color:#24292E"> ($i </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> 0</span><span style="color:#24292E">; $i </span><span style="color:#D73A49"><=</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">(</span><span style="color:#005CC5">__LINE__</span><span style="color:#D73A49">-</span><span style="color:#005CC5">035</span><span style="color:#24292E">,</span><span style="color:#005CC5">6</span><span style="color:#24292E">); </span><span style="color:#D73A49">++</span><span style="color:#24292E">$i) </span><span style="color:#D73A49">if</span><span style="color:#24292E"> (</span><span style="color:#D73A49">!</span><span style="color:#005CC5">isset</span><span style="color:#24292E">($xs[$i])) </span><span style="color:#D73A49">break</span><span style="color:#24292E">; </span><span style="color:#D73A49">else</span></span> <span class="line"><span style="color:#24292E">$t </span><span style="color:#D73A49">.=</span><span style="color:#005CC5"> implode</span><span style="color:#24292E">(</span><span style="color:#032F62">"</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">, </span><span style="color:#005CC5">str_split</span><span style="color:#24292E">(</span><span style="color:#005CC5">str_replace</span><span style="color:#24292E">([</span><span style="color:#032F62">'0'</span><span style="color:#24292E">,</span><span style="color:#032F62">'1'</span><span style="color:#24292E">], [</span><span style="color:#032F62">' '</span><span style="color:#24292E">,</span><span style="color:#032F62">'##'</span><span style="color:#24292E">], </span><span style="color:#005CC5">sprintf</span><span style="color:#24292E">(</span><span style="color:#005CC5">chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">37</span><span style="color:#24292E">) </span><span style="color:#D73A49">.</span><span style="color:#032F62"> '025b'</span><span style="color:#24292E">, $xs[$i])), </span><span style="color:#005CC5">012</span><span style="color:#24292E">)) </span><span style="color:#D73A49">.</span><span style="color:#032F62"> "</span><span style="color:#005CC5">\n\n</span><span style="color:#032F62">"</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#24292E">$ws </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> array_map</span><span style="color:#24292E">(</span><span style="color:#D73A49">fn</span><span style="color:#24292E">($w) => </span><span style="color:#005CC5">implode</span><span style="color:#24292E">(</span><span style="color:#032F62">', '</span><span style="color:#24292E">, $w), </span><span style="color:#005CC5">array_chunk</span><span style="color:#24292E">(</span><span style="color:#005CC5">array_map</span><span style="color:#24292E">(</span><span style="color:#D73A49">fn</span><span style="color:#24292E">($x) => </span><span style="color:#005CC5">sprintf</span><span style="color:#24292E">(</span><span style="color:#032F62">'0x'</span><span style="color:#D73A49"> .</span><span style="color:#005CC5"> chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">37</span><span style="color:#24292E">) </span><span style="color:#D73A49">.</span><span style="color:#032F62"> '07X'</span><span style="color:#24292E">, $x), $xs), </span><span style="color:#005CC5">10</span><span style="color:#24292E">));</span></span> <span class="line"><span style="color:#005CC5">printf</span><span style="color:#24292E">($s, $t, </span><span style="color:#005CC5">str_rot13</span><span style="color:#24292E">(</span><span style="color:#032F62">"<<<'D'</span><span style="color:#005CC5">\n</span><span style="color:#032F62">{</span><span style="color:#24292E">$s</span><span style="color:#032F62">}</span><span style="color:#005CC5">\n</span><span style="color:#032F62">D"</span><span style="color:#24292E">), </span><span style="color:#005CC5">implode</span><span style="color:#24292E">(</span><span style="color:#032F62">",</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">, $ws));</span></span></code></pre> diff --git a/services/blog/public/posts/2024-12-04/cohackpp-report/index.html b/services/blog/public/posts/2024-12-04/cohackpp-report/index.html index 50c2312a..232c9cae 100644 --- a/services/blog/public/posts/2024-12-04/cohackpp-report/index.html +++ b/services/blog/public/posts/2024-12-04/cohackpp-report/index.html @@ -275,7 +275,7 @@ <span class="line"><span style="color:#032F62">ARcGDgccgQEXBg0IHIEBGAYMBx2BARgHCggdgQEZCAYKHYEBGhcdgQEbFh2BARwVHYEBHgsBBh6BASAG</span></span> <span class="line"><span style="color:#032F62">BAYegQEpBh+BASkGH4EBKAYggQEnByCBASYHIYEBJQcigQEkCCKBASIJI4EBIAokgQEeCyWBARwLJ4EB</span></span> <span class="line"><span style="color:#032F62">GQ0ogQEWDiqBARcMK4EBGAktgQEZBTCBARoCMoEBToEBToEBToEBToEBToEBToHQ'</span><span style="color:#24292E">,];</span></span> -<span class="line"><span style="color:#24292E">$m</span><span style="color:#D73A49">=</span><span style="color:#032F62">""</span><span style="color:#24292E">;</span><span style="color:#D73A49">for</span><span style="color:#24292E">($k</span><span style="color:#D73A49">=</span><span style="color:#005CC5">0</span><span style="color:#24292E">;$k</span><span style="color:#D73A49"><</span><span style="color:#005CC5">min</span><span style="color:#24292E">(</span><span style="color:#005CC5">13</span><span style="color:#24292E">,</span><span style="color:#6F42C1">intdiv</span><span style="color:#24292E">(</span><span style="color:#005CC5">__LINE__</span><span style="color:#D73A49">-</span><span style="color:#005CC5">119</span><span style="color:#24292E">,</span><span style="color:#005CC5">80</span><span style="color:#24292E">)</span><span style="color:#D73A49">+</span><span style="color:#005CC5">1</span><span style="color:#24292E">);$k</span><span style="color:#D73A49">++</span><span style="color:#24292E">){$C</span><span style="color:#D73A49">=</span><span style="color:#005CC5">str_replace</span><span style="color:#24292E">(</span><span style="color:#032F62">"</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">,</span><span style="color:#032F62">""</span><span style="color:#24292E">,</span></span> +<span class="line"><span style="color:#24292E">$m</span><span style="color:#D73A49">=</span><span style="color:#032F62">""</span><span style="color:#24292E">;</span><span style="color:#D73A49">for</span><span style="color:#24292E">($k</span><span style="color:#D73A49">=</span><span style="color:#005CC5">0</span><span style="color:#24292E">;$k</span><span style="color:#D73A49"><</span><span style="color:#005CC5">min</span><span style="color:#24292E">(</span><span style="color:#005CC5">13</span><span style="color:#24292E">,</span><span style="color:#005CC5">intdiv</span><span style="color:#24292E">(</span><span style="color:#005CC5">__LINE__</span><span style="color:#D73A49">-</span><span style="color:#005CC5">119</span><span style="color:#24292E">,</span><span style="color:#005CC5">80</span><span style="color:#24292E">)</span><span style="color:#D73A49">+</span><span style="color:#005CC5">1</span><span style="color:#24292E">);$k</span><span style="color:#D73A49">++</span><span style="color:#24292E">){$C</span><span style="color:#D73A49">=</span><span style="color:#005CC5">str_replace</span><span style="color:#24292E">(</span><span style="color:#032F62">"</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">,</span><span style="color:#032F62">""</span><span style="color:#24292E">,</span></span> <span class="line"><span style="color:#24292E">$c[$k]);$f</span><span style="color:#D73A49">=!</span><span style="color:#005CC5">0</span><span style="color:#24292E">;</span><span style="color:#D73A49">foreach</span><span style="color:#24292E">(</span><span style="color:#005CC5">str_split</span><span style="color:#24292E">(</span><span style="color:#005CC5">base64_decode</span><span style="color:#24292E">($C))</span><span style="color:#D73A49">as</span><span style="color:#24292E">$l){$L</span><span style="color:#D73A49">=</span><span style="color:#005CC5">ord</span><span style="color:#24292E">($l);$m</span><span style="color:#D73A49">.=</span><span style="color:#005CC5">str_repeat</span></span> <span class="line"><span style="color:#24292E">($f</span><span style="color:#D73A49">?</span><span style="color:#032F62">"#"</span><span style="color:#D73A49">:</span><span style="color:#005CC5">chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">32</span><span style="color:#24292E">),$L</span><span style="color:#D73A49">&</span><span style="color:#005CC5">127</span><span style="color:#24292E">);$f</span><span style="color:#D73A49">=!</span><span style="color:#24292E">$f;</span><span style="color:#D73A49">if</span><span style="color:#24292E">($L</span><span style="color:#D73A49">&</span><span style="color:#005CC5">128</span><span style="color:#24292E">){$m</span><span style="color:#D73A49">.=</span><span style="color:#032F62">"</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">;$f</span><span style="color:#D73A49">=!</span><span style="color:#005CC5">0</span><span style="color:#24292E">;</span><span style="color:#D73A49">continue</span><span style="color:#24292E">;}}}</span><span style="color:#005CC5">print</span><span style="color:#24292E">(</span></span> <span class="line"><span style="color:#005CC5">str_replace</span><span style="color:#24292E">([</span><span style="color:#005CC5">chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">96</span><span style="color:#24292E">),</span><span style="color:#005CC5">chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">37</span><span style="color:#24292E">),</span><span style="color:#005CC5">chr</span><span style="color:#24292E">(</span><span style="color:#005CC5">64</span><span style="color:#24292E">)],[</span><span style="color:#005CC5">implode</span><span style="color:#24292E">(</span><span style="color:#032F62">"</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">,</span><span style="color:#005CC5">array_map</span><span style="color:#24292E">(</span><span style="color:#D73A49">fn</span><span style="color:#24292E">($C)=></span><span style="color:#032F62">"'"</span><span style="color:#D73A49">.</span><span style="color:#005CC5">trim</span><span style="color:#24292E">(</span></span> diff --git a/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html b/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html index e7cd5282..15d0aa00 100644 --- a/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html +++ b/services/blog/public/posts/2025-01-08/phperkaigi-2023-tokens-q1/index.html @@ -309,7 +309,7 @@ <span class="line"><span style="color:#24292E"> $cs[$y</span><span style="color:#D73A49">*</span><span style="color:#24292E">$w </span><span style="color:#D73A49">+</span><span style="color:#24292E"> $x] </span><span style="color:#D73A49">=</span><span style="color:#24292E"> ($x</span><span style="color:#D73A49">*</span><span style="color:#24292E">$y </span><span style="color:#D73A49">===</span><span style="color:#005CC5"> 0</span><span style="color:#D73A49"> ||</span><span style="color:#24292E"> $x </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $w</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#D73A49"> ||</span><span style="color:#24292E"> $y </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $h</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span></span> <span class="line"><span style="color:#D73A49"> ?</span><span style="color:#005CC5"> 0</span></span> <span class="line"><span style="color:#D73A49"> :</span><span style="color:#24292E"> $b[</span><span style="color:#005CC5">122</span><span style="color:#D73A49">+</span><span style="color:#24292E">($y</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span><span style="color:#D73A49">*</span><span style="color:#24292E">($w</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span><span style="color:#D73A49">+</span><span style="color:#24292E">$x</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">];</span></span> -<span class="line"><span style="color:#24292E">$i </span><span style="color:#D73A49">=</span><span style="color:#6F42C1"> stream_isatty</span><span style="color:#24292E">(</span><span style="color:#005CC5">STDIN</span><span style="color:#24292E">)</span></span> +<span class="line"><span style="color:#24292E">$i </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> stream_isatty</span><span style="color:#24292E">(</span><span style="color:#005CC5">STDIN</span><span style="color:#24292E">)</span></span> <span class="line"><span style="color:#D73A49"> ?</span><span style="color:#24292E"> []</span></span> <span class="line"><span style="color:#D73A49"> :</span><span style="color:#005CC5"> array_map</span><span style="color:#24292E">(</span><span style="color:#005CC5">ord</span><span style="color:#24292E">(</span><span style="color:#D73A49">...</span><span style="color:#24292E">), </span><span style="color:#005CC5">str_split</span><span style="color:#24292E">(</span><span style="color:#005CC5">trim</span><span style="color:#24292E">((</span><span style="color:#D73A49">string</span><span style="color:#24292E">) </span><span style="color:#005CC5">fgets</span><span style="color:#24292E">(</span><span style="color:#005CC5">STDIN</span><span style="color:#24292E">))));</span></span> <span class="line"><span style="color:#24292E">$m </span><span style="color:#D73A49">=</span><span style="color:#24292E"> [];</span></span> @@ -326,7 +326,7 @@ <span class="line"><span style="color:#005CC5"> echo</span><span style="color:#032F62"> "infinite loop detected</span><span style="color:#005CC5">\n</span><span style="color:#032F62">"</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#D73A49"> break</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#24292E"> $c1 </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $cs[$pc];</span></span> -<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#24292E"> (</span><span style="color:#005CC5">6</span><span style="color:#D73A49"> +</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">($c1</span><span style="color:#D73A49">-</span><span style="color:#005CC5">2</span><span style="color:#24292E">, </span><span style="color:#005CC5">3</span><span style="color:#24292E">) </span><span style="color:#D73A49">-</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">($c0</span><span style="color:#D73A49">-</span><span style="color:#005CC5">2</span><span style="color:#24292E">, </span><span style="color:#005CC5">3</span><span style="color:#24292E">)) </span><span style="color:#D73A49">%</span><span style="color:#005CC5"> 6</span><span style="color:#24292E">;</span></span> +<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#24292E"> (</span><span style="color:#005CC5">6</span><span style="color:#D73A49"> +</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">($c1</span><span style="color:#D73A49">-</span><span style="color:#005CC5">2</span><span style="color:#24292E">, </span><span style="color:#005CC5">3</span><span style="color:#24292E">) </span><span style="color:#D73A49">-</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">($c0</span><span style="color:#D73A49">-</span><span style="color:#005CC5">2</span><span style="color:#24292E">, </span><span style="color:#005CC5">3</span><span style="color:#24292E">)) </span><span style="color:#D73A49">%</span><span style="color:#005CC5"> 6</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#24292E"> $x </span><span style="color:#D73A49">=</span><span style="color:#24292E"> (</span><span style="color:#005CC5">3</span><span style="color:#D73A49"> +</span><span style="color:#24292E"> $c1</span><span style="color:#D73A49">%</span><span style="color:#005CC5">3</span><span style="color:#D73A49"> -</span><span style="color:#24292E"> $c0</span><span style="color:#D73A49">%</span><span style="color:#005CC5">3</span><span style="color:#24292E">) </span><span style="color:#D73A49">%</span><span style="color:#005CC5"> 3</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#D73A49"> match</span><span style="color:#24292E"> (($c0 </span><span style="color:#D73A49">!==</span><span style="color:#005CC5"> 1</span><span style="color:#24292E">) </span><span style="color:#D73A49">*</span><span style="color:#24292E"> ($c1 </span><span style="color:#D73A49">!==</span><span style="color:#005CC5"> 1</span><span style="color:#24292E">) </span><span style="color:#D73A49">*</span><span style="color:#24292E"> ($y</span><span style="color:#D73A49">*</span><span style="color:#005CC5">3</span><span style="color:#D73A49"> +</span><span style="color:#24292E"> $x)) {</span></span> <span class="line"><span style="color:#005CC5"> 1</span><span style="color:#D73A49"> =></span><span style="color:#24292E"> $m[] </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $b,</span></span> @@ -354,7 +354,7 @@ <span class="line"><span style="color:#24292E"> $v </span><span style="color:#D73A49">=</span><span style="color:#24292E"> [];</span></span> <span class="line"><span style="color:#D73A49"> if</span><span style="color:#24292E"> ($c1 </span><span style="color:#D73A49">===</span><span style="color:#005CC5"> 1</span><span style="color:#24292E">) {</span></span> <span class="line"><span style="color:#24292E"> $x </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $pc </span><span style="color:#D73A49">%</span><span style="color:#24292E"> $w;</span></span> -<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">($pc, $w);</span></span> +<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">($pc, $w);</span></span> <span class="line"><span style="color:#24292E"> $e </span><span style="color:#D73A49">=</span><span style="color:#24292E"> [($y</span><span style="color:#D73A49">+</span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span><span style="color:#D73A49">*</span><span style="color:#24292E">$w</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">, ($h</span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">)</span><span style="color:#D73A49">*</span><span style="color:#24292E">$w</span><span style="color:#D73A49">+</span><span style="color:#24292E">$x, $y</span><span style="color:#D73A49">*</span><span style="color:#24292E">$w, $x][$dp];</span></span> <span class="line"><span style="color:#24292E"> $z </span><span style="color:#D73A49">=</span><span style="color:#24292E"> [</span><span style="color:#005CC5">1</span><span style="color:#24292E">, $w, </span><span style="color:#D73A49">-</span><span style="color:#005CC5">1</span><span style="color:#24292E">, </span><span style="color:#D73A49">-</span><span style="color:#24292E">$w][$dp];</span></span> <span class="line"><span style="color:#D73A49"> for</span><span style="color:#24292E"> ($ep </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $pc; $ep </span><span style="color:#D73A49">!==</span><span style="color:#24292E"> $e; $ep </span><span style="color:#D73A49">+=</span><span style="color:#24292E"> $z)</span></span> @@ -372,9 +372,9 @@ <span class="line"><span style="color:#D73A49"> if</span><span style="color:#24292E"> (</span><span style="color:#005CC5">isset</span><span style="color:#24292E">($v[$qp])) </span><span style="color:#D73A49">continue</span><span style="color:#24292E">;</span></span> <span class="line"><span style="color:#24292E"> $q[] </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $qp;</span></span> <span class="line"><span style="color:#24292E"> $qx </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $qp </span><span style="color:#D73A49">%</span><span style="color:#24292E"> $w;</span></span> -<span class="line"><span style="color:#24292E"> $qy </span><span style="color:#D73A49">=</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">($qp, $w);</span></span> +<span class="line"><span style="color:#24292E"> $qy </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">($qp, $w);</span></span> <span class="line"><span style="color:#24292E"> $x </span><span style="color:#D73A49">=</span><span style="color:#24292E"> $ep </span><span style="color:#D73A49">%</span><span style="color:#24292E"> $w;</span></span> -<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#6F42C1"> intdiv</span><span style="color:#24292E">($ep, $w);</span></span> +<span class="line"><span style="color:#24292E"> $y </span><span style="color:#D73A49">=</span><span style="color:#005CC5"> intdiv</span><span style="color:#24292E">($ep, $w);</span></span> <span class="line"><span style="color:#D73A49"> if</span><span style="color:#24292E"> (</span></span> <span class="line"><span style="color:#24292E"> ($dp </span><span style="color:#D73A49">===</span><span style="color:#005CC5"> 0</span><span style="color:#D73A49"> &&</span><span style="color:#24292E"> ($x </span><span style="color:#D73A49"><</span><span style="color:#24292E"> $qx </span><span style="color:#D73A49">||</span><span style="color:#24292E"> ($x </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $qx </span><span style="color:#D73A49">&&</span><span style="color:#24292E"> ($y</span><span style="color:#D73A49"><=></span><span style="color:#24292E">$qy) </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $cc)))</span></span> <span class="line"><span style="color:#D73A49"> ||</span><span style="color:#24292E"> ($dp </span><span style="color:#D73A49">===</span><span style="color:#005CC5"> 1</span><span style="color:#D73A49"> &&</span><span style="color:#24292E"> ($y </span><span style="color:#D73A49"><</span><span style="color:#24292E"> $qy </span><span style="color:#D73A49">||</span><span style="color:#24292E"> ($y </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $qy </span><span style="color:#D73A49">&&</span><span style="color:#24292E"> ($qx</span><span style="color:#D73A49"><=></span><span style="color:#24292E">$x) </span><span style="color:#D73A49">===</span><span style="color:#24292E"> $cc)))</span></span> |
