summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/content/posts
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/content/posts')
-rw-r--r--vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj1
-rw-r--r--vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj1
-rw-r--r--vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj1
-rw-r--r--vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj5
-rw-r--r--vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj3
-rw-r--r--vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj3
6 files changed, 13 insertions, 1 deletions
diff --git a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj b/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj
index 4c73580c..653b7dcd 100644
--- a/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj
+++ b/vhosts/blog/content/posts/2021-10-02/ruby-detect-running-implementation.dj
@@ -65,6 +65,7 @@ CRuby) については執筆時現在 (2020/12/8) も `'ruby'`
[mruby 該当部分のソース](https://github.com/mruby/mruby/blob/ed29d74bfd95362eaeb946fcf7e865d80346b62b/include/mruby/version.h#L32-L35) より引用:
+{filename="version.h"}
```c
/*
* Ruby engine.
diff --git a/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj b/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj
index 7d8616fc..82d6d9cc 100644
--- a/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj
+++ b/vhosts/blog/content/posts/2021-10-02/ruby-then-keyword-and-case-in.dj
@@ -143,6 +143,7 @@ Ruby の場合、プログラマーが書きやすいよう改行でもって `t
https://github.com/ruby/ruby/blob/221ca0f8281d39f0dfdfe13b2448875384bbf735/parse.y#L3961-L3986
+{filename="parse.y"}
```yacc
p_case_body : keyword_in
{
diff --git a/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj b/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj
index 212cd3d6..9fa61d56 100644
--- a/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj
+++ b/vhosts/blog/content/posts/2021-10-02/rust-where-are-primitive-types-from.dj
@@ -96,6 +96,7 @@ rustc_resolve/src/lib.rs: table.insert(sym::i128, Int(IntTy::I128));
`rustc_resolve`
というのはいかにも名前解決を担いそうなクレート名である。該当箇所を見てみる。
+{filename="rustc_resolve/src/lib.rs"}
```rust
/// Interns the names of the primitive types.
///
diff --git a/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj b/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj
index 37af679a..a97337d0 100644
--- a/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj
+++ b/vhosts/blog/content/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre.dj
@@ -53,6 +53,7 @@ vim と neovim のソースコードを調査した。
https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L85-L86
+{filename="src/autocmd.c"}
```c
{"BufAdd", EVENT_BUFADD},
{"BufCreate", EVENT_BUFADD},
@@ -60,6 +61,7 @@ https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/aut
https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L95-L97
+{filename="src/autocmd.c"}
```c
{"BufRead", EVENT_BUFREADPOST},
{"BufReadCmd", EVENT_BUFREADCMD},
@@ -68,6 +70,7 @@ https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/aut
https://github.com/vim/vim/blob/8e6be34338f13a6a625f19bcef82019c9adc65f2/src/autocmd.c#L103-L105
+{filename="src/autocmd.c"}
```c
{"BufWrite", EVENT_BUFWRITEPRE},
{"BufWritePost", EVENT_BUFWRITEPOST},
@@ -82,6 +85,7 @@ neovim の場合でも同様のマッピングが定義されているが、こ
https://github.com/neovim/neovim/blob/71d4f5851f068eeb432af34850dddda8cc1c71e3/src/nvim/auevents.lua#L119-L124
+{filename="src/nvim/auevents.lua"}
```lua
aliases = {
BufCreate = 'BufAdd',
@@ -94,6 +98,7 @@ aliases = {
ところで、上では取り上げなかった `FileEncoding` だが、これは
`:help FileEncoding` にしっかりと書いてある。
+{filename=":help FileEncoding"}
```
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
diff --git a/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj b/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj
index e0fe0279..39565833 100644
--- a/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj
+++ b/vhosts/blog/content/posts/2022-04-09/phperkaigi-2022-tokens.dj
@@ -32,6 +32,7 @@ remark = "2問目、3問目の解説を追加、1問目に加筆"
ソースコードはこちら。実行には PHP 8.1 以上が必要なので注意。
+{filename="brainf_ck.php"}
```php
<?php
@@ -246,6 +247,7 @@ Z コンビネータとして知られるものを使った (`$z`)。
ソースコードはこちら。実行には PHP 8.0 以上が必要なので注意。
+{filename="riddle.php"}
```php
<?php
@@ -402,6 +404,7 @@ echo "N = $n\n";
ソースコードはこちら。
+{filename="toquine.php"}
```php
<?php
diff --git a/vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj b/vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj
index 0f74de70..f6cd2ec2 100644
--- a/vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj
+++ b/vhosts/blog/content/posts/2023-10-02/compile-php-runtime-to-wasm.dj
@@ -42,6 +42,7 @@ remark = "fflush() の前に改行の出力が必要だった理由と正しい
先にこの記事のゴールを示しておく。これから示す手順のとおりに進めると、次のようなコードが動くようになる。
このコードはこのあと使うので、`index.mjs` の名前で保存しておくこと。
+{filename="index.mjs"}
```javascript
import { readFile } from 'node:fs/promises';
import PHPWasm from './php-wasm.mjs'
@@ -291,7 +292,7 @@ ENTRYPOINT ["node", "index.mjs"]
`Dockerfile`、`php-wasm.c`、`index.mjs` を用意したら、Docker コンテナをビルドして実行する。
-```dockerfile
+```
$ docker build -t php-wasm .
$ echo 'echo "Hello, World!", PHP_EOL;' | docker run --rm -i php-wasm
Hello, World!