Skip to content

Commit a41b9f4

Browse files
committed
adventuring on december the 9
1 parent fe110e7 commit a41b9f4

8 files changed

Lines changed: 185 additions & 33 deletions

File tree

content-org/garden/december-adventure.org

Lines changed: 88 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ project or a few, work on them, and log your progress.
1212

1313
I've taken the liberty of retroactively logging the days I missed.
1414

15-
#+toc: headlines 1
15+
#+ATTR_HTML: :class calendar-table
16+
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
17+
|----+----+----+----+----+----+----|
18+
| | [[december 1][01]] | [[december 2 - 3][02]] | [[december 2 - 3][03]] | [[december 4][04]] | [[december 5][05]] | [[december 6][06]] |
19+
| [[december 7][07]] | [[december 8][08]] | [[december 9][09]] | 10 | 11 | 12 | 13 |
20+
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21+
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
22+
| 28 | 29 | 30 | 31 | | | |
1623

1724
* december 1
1825
Traveling back from Tokyo. I'm not very good at getting things done on the
@@ -39,16 +46,23 @@ on hyperlink.
3946
Edit, added later: here's a smallified version of the image I edited.
4047

4148
#+ATTR_HTML: :alt a mirror self-portrait taken by handheld camera in a hotel room
42-
[[file:../../public/ox-hugo/japan-2025-self-portrait-dithered.jpg]]
49+
[[file:images/december-adventure-2025/japan-2025-self-portrait-dithered.jpg]]
4350

4451
This was produced with
4552
#+begin_src sh
4653
magick in.jpg -dither FloydSteinberg -colors 16 -resize 15% out.jpg
4754
#+end_src
4855
The original file was 6280x4160, at around 2.6mb, but I haven't bothered
49-
checking into the repository. The image above has been scaled down
56+
checking it into the repository. The image above has been scaled down
5057
significantly, and with 16 colors comes in at around 82kb.
5158

59+
The tricky thing with =ox-hugo= (I write my website in org-mode in emacs) is that
60+
I sometimes produce images in the org-file directory instead of the hugo assets
61+
directory (say when writing python code to generate images). These generated
62+
images need to be copied over to the hugo directory. In cases like static
63+
pre-selected images, though, I can just throw them into the hugo directory to
64+
begin with.
65+
5266
* december 5
5367
Did a practice JLPT N3 test, what with the exam looming on the 7th. I had been
5468
low-key pretty stressed about the exam, given that I hadn't really studied the
@@ -103,6 +117,11 @@ about their extreme space-filling blockiness when compared to the gentle
103117
hieroglyphic curves of seal script or the varied visual rhythm of contemporary
104118
regular script.
105119

120+
See, for example, this image I found on [[https://robundo.com/robundo/column/archives/268][Robundo Publishing's blog]]:
121+
122+
#+ATTR_HTML: :alt a manual showing correspondences between kakuji and other scripts
123+
[[file:/images/december-adventure-2025/robundo_kakuji_22_d.jpg]]
124+
106125
It seems that there aren't too many examples of kakuji readily available on the
107126
web. In particular, there's no complete font (say, for the jōyō kanji) that I
108127
know of. There are about 200 or so examples that I've found images of. I'm
@@ -134,7 +153,6 @@ On radical-based decomposition of Chinese characters:
134153
Radical Packing Language]]
135154

136155
* december 8
137-
** more on kakuji and seal scripts
138156
Continuing the thread from yesterday, I thought it might be a good exercise to
139157
start by translating the book's description of kakuji. It's definitely above my
140158
pay grade, but I'll do my best to translate it in-line (I tend to use the
@@ -201,8 +219,8 @@ This passage (which unfortunately seems to be all the book has on kakuji)
201219
suggests looking also at the nine-fold seal script. Here are some resources I
202220
have found:
203221
- a collection of [[https://commons.wikimedia.org/wiki/Category:Calligraphy_manuals_including_nine-fold_seal_script][images]] of calligraphy manuals including nine-fold seal script
204-
- a [[https://babelstone.co.uk/Blog/2012/10/khitan-seals.html][site]] with some images of the Khitan seals and a table of potential correspondences with
205-
standard character forms
222+
- a [[https://babelstone.co.uk/Blog/2012/10/khitan-seals.html][site]] with some images of the Khitan seals and a table of potential
223+
correspondences with standard character forms
206224
- some helpful [[https://digitalorientalist.com/2025/02/25/digital-resources-for-reading-japanese-seals/][notes]] on resources for reading Japanese seals
207225
- slightly off-topic, but [[https://en.wikipedia.org/wiki/Kufic#Square_Kufic][square Kufic script]] is an Arabic doppelganger!
208226
I'm sure there are a lot more resources in Chinese, but unfortunately my
@@ -211,3 +229,67 @@ Mandarin is still super basic.
211229
I was hoping to start looking at some of the available kakuji, breaking down
212230
radical shapes, and writing some code, but I got a little too interested in seal
213231
scripts and the translation was tough, so I'll leave that for tomorrow.
232+
233+
* december 9
234+
235+
Before I fell asleep last night I was doodling kanji, trying to get a concrete
236+
sense of how kakuji are designed. As the passage above points out, kakuji are
237+
designed after seal script, so building an intuition of how the contemporary
238+
glyphs correspond to seal script glyphs is probably a good place to start. As
239+
I do that, though, I think it'd be fun to draw out some kakuji as well!
240+
241+
So... let's make a kakuji editor! Doodling is all well and good, but it'd be
242+
nice to have a little purpose-built glyph editor. I've recently been trying to
243+
learn a bit of C using =raylib=, and this is as good of a learning project as any.
244+
245+
The basic idea is a simple grid-based editor where you can paint in valid
246+
kakuji. I haven't yet worked out exactly what I mean by valid (we'll narrow the
247+
definition down as we go), but for now notice that kakuji must be space-filling
248+
and be composed entirely of vertical and horizontal strokes.
249+
#+ATTR_HTML: :alt an example of kakuji using diagonal lines
250+
[[file:/images/december-adventure-2025/black-silk-4625.jpg]]
251+
By space-filling, I
252+
mean that every grid element must have at least some ink in it. The second rule
253+
is actually my own -- there are examples on Black Silk's crest list that have
254+
diagonal strokes (see the image to the left). I'm happy to ignore such cases for
255+
now. This particular example, incidentally, is no longer used: 總 is listed as
256+
the pre-simplified form of 総 in Wikipedia's [[https://en.wikipedia.org/wiki/List_of_j%C5%8Dy%C5%8D_kanji][list of jōyō kanji]], and means whole
257+
or total.
258+
259+
After tinkering for a bit, I got some of the =raylib= boilerplate out of the way
260+
and ended up with a very preliminary little clickable grid-based editor:
261+
262+
#+ATTR_HTML: :alt a dinky editor for filling in black squares in a grid with red ink
263+
[[file:/images/december-adventure-2025/raylib_grid_r.jpg]]
264+
265+
To get a bit of a drawing feel, it'd obviously be nice to click and drag,
266+
brush-like, to draw contiguous blocks of ink. Frustratingly, I seem to be
267+
running into an issue with how =raylib= interprets my mouse's position when I
268+
drag. Maybe it's due to my tiling window manager, or maybe it's due to some kind
269+
of X/Wayland incompatibility, but as soon as I drag my mouse, =raylib= reports
270+
that my mouse is a solid 50 pixels above where it actually is, until I release
271+
the left button and move my mouse a bit. It doesn't seem to be an error in my
272+
code -- I was able to reproduce this in the little program I was writing a month
273+
ago to learn the basics of =raylib=.
274+
275+
Alas, I've already wasted most of my night trying to debug this, so I'll leave
276+
it here for now. I suppose I can return to this and swap to keyboard controls,
277+
though it definitely won't feel as smooth. Then finally onto the interesting
278+
part: understanding the patterns behind the gaps in ink and the radical shapes!
279+
280+
* future adventures?
281+
282+
Thought I'd collect the little project ideas that tend to pop into my head when
283+
working on code.
284+
- write up some notes on the basics of how C programs are compiled and linked,
285+
as well as the platform-dependent aspects. /inspired by:/ me realizing I have no
286+
idea what I'm doing when I'm putting together a Makefile or working on a
287+
C project on my mac when traveling
288+
- learn and write a toy program in assembly! and/or forth! and/or uxntal! if I
289+
can get the kakuji editor working, it might be a good second program to port
290+
over. /inspired by:/ [[https://100r.co][100r]], learning more about how memory and caches works
291+
- exploring moving away from org/ox-hugo for static site generation. /inspired
292+
by:/ as much as I love being able to use org-babel to write and run code from
293+
directly inside my posts, losing control over the final export is annoying.
294+
maybe I could just post-process the generated html? or rather, use tools that
295+
hugo exposes to do so?

content/garden/december-adventure.md

Lines changed: 90 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title = "december adventure 2025"
33
author = ["Nilay Kumar"]
44
date = 2025-12-08T00:00:00-05:00
5-
lastmod = 2025-12-08T22:51:20-05:00
5+
lastmod = 2025-12-09T21:11:58-05:00
66
tags = ["december-adventure", "code", "japanese", "chinese", "calligraphy", "photography"]
77
draft = false
88
progress = "in-progress"
@@ -15,20 +15,17 @@ project or a few, work on them, and log your progress.
1515

1616
I've taken the liberty of retroactively logging the days I missed.
1717

18-
<div class="ox-hugo-toc toc">
18+
<div class="ox-hugo-table calendar-table">
1919

20-
<div class="heading">Table of Contents</div>
21-
22-
- [december 1](#december-1)
23-
- [december 2 - 3](#december-2-3)
24-
- [december 4](#december-4)
25-
- [december 5](#december-5)
26-
- [december 6](#december-6)
27-
- [december 7](#december-7)
28-
- [december 8](#december-8)
20+
||||||||
21+
|------------------|------------------|--------------------|--------------------|------------------|------------------|------------------|
22+
| | [01](#december-1) | [02](#december-2-3) | [03](#december-2-3) | [04](#december-4) | [05](#december-5) | [06](#december-6) |
23+
| [07](#december-7) | [08](#december-8) | [09](#december-9) | 10 | 11 | 12 | 13 |
24+
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
25+
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
26+
| 28 | 29 | 30 | 31 | | | |
2927

3028
</div>
31-
<!--endtoc-->
3229

3330

3431
## december 1 {#december-1}
@@ -60,7 +57,7 @@ on hyperlink.
6057

6158
Edit, added later: here's a smallified version of the image I edited.
6259

63-
{{< figure src="/ox-hugo/japan-2025-self-portrait-dithered.jpg" alt="a mirror self-portrait taken by handheld camera in a hotel room" >}}
60+
{{< figure src="images/december-adventure-2025/japan-2025-self-portrait-dithered.jpg" alt="a mirror self-portrait taken by handheld camera in a hotel room" >}}
6461

6562
This was produced with
6663

@@ -69,9 +66,16 @@ magick in.jpg -dither FloydSteinberg -colors 16 -resize 15% out.jpg
6966
```
7067

7168
The original file was 6280x4160, at around 2.6mb, but I haven't bothered
72-
checking into the repository. The image above has been scaled down
69+
checking it into the repository. The image above has been scaled down
7370
significantly, and with 16 colors comes in at around 82kb.
7471

72+
The tricky thing with `ox-hugo` (I write my website in org-mode in emacs) is that
73+
I sometimes produce images in the org-file directory instead of the hugo assets
74+
directory (say when writing python code to generate images). These generated
75+
images need to be copied over to the hugo directory. In cases like static
76+
pre-selected images, though, I can just throw them into the hugo directory to
77+
begin with.
78+
7579

7680
## december 5 {#december-5}
7781

@@ -134,6 +138,10 @@ about their extreme space-filling blockiness when compared to the gentle
134138
hieroglyphic curves of seal script or the varied visual rhythm of contemporary
135139
regular script.
136140

141+
See, for example, this image I found on [Robundo Publishing's blog](https://robundo.com/robundo/column/archives/268):
142+
143+
{{< figure src="/images/december-adventure-2025/robundo_kakuji_22_d.jpg" alt="a manual showing correspondences between kakuji and other scripts" >}}
144+
137145
It seems that there aren't too many examples of kakuji readily available on the
138146
web. In particular, there's no complete font (say, for the jōyō kanji) that I
139147
know of. There are about 200 or so examples that I've found images of. I'm
@@ -169,9 +177,6 @@ On radical-based decomposition of Chinese characters:
169177

170178
## december 8 {#december-8}
171179

172-
173-
### more on kakuji and seal scripts {#more-on-kakuji-and-seal-scripts}
174-
175180
Continuing the thread from yesterday, I thought it might be a good exercise to
176181
start by translating the book's description of kakuji. It's definitely above my
177182
pay grade, but I'll do my best to translate it in-line (I tend to use the
@@ -241,8 +246,8 @@ suggests looking also at the nine-fold seal script. Here are some resources I
241246
have found:
242247

243248
- a collection of [images](https://commons.wikimedia.org/wiki/Category:Calligraphy_manuals_including_nine-fold_seal_script) of calligraphy manuals including nine-fold seal script
244-
- a [site](https://babelstone.co.uk/Blog/2012/10/khitan-seals.html) with some images of the Khitan seals and a table of potential correspondences with
245-
standard character forms
249+
- a [site](https://babelstone.co.uk/Blog/2012/10/khitan-seals.html) with some images of the Khitan seals and a table of potential
250+
correspondences with standard character forms
246251
- some helpful [notes](https://digitalorientalist.com/2025/02/25/digital-resources-for-reading-japanese-seals/) on resources for reading Japanese seals
247252
- slightly off-topic, but [square Kufic script](https://en.wikipedia.org/wiki/Kufic#Square_Kufic) is an Arabic doppelganger!
248253

@@ -252,3 +257,69 @@ Mandarin is still super basic.
252257
I was hoping to start looking at some of the available kakuji, breaking down
253258
radical shapes, and writing some code, but I got a little too interested in seal
254259
scripts and the translation was tough, so I'll leave that for tomorrow.
260+
261+
262+
## december 9 {#december-9}
263+
264+
Before I fell asleep last night I was doodling kanji, trying to get a concrete
265+
sense of how kakuji are designed. As the passage above points out, kakuji are
266+
designed after seal script, so building an intuition of how the contemporary
267+
glyphs correspond to seal script glyphs is probably a good place to start. As
268+
I do that, though, I think it'd be fun to draw out some kakuji as well!
269+
270+
So... let's make a kakuji editor! Doodling is all well and good, but it'd be
271+
nice to have a little purpose-built glyph editor. I've recently been trying to
272+
learn a bit of C using `raylib`, and this is as good of a learning project as any.
273+
274+
The basic idea is a simple grid-based editor where you can paint in valid
275+
kakuji. I haven't yet worked out exactly what I mean by valid (we'll narrow the
276+
definition down as we go), but for now notice that kakuji must be space-filling
277+
and be composed entirely of vertical and horizontal strokes.
278+
279+
![an example of kakuji using diagonal lines](/images/december-adventure-2025/black-silk-4625.jpg)
280+
By space-filling, I
281+
mean that every grid element must have at least some ink in it. The second rule
282+
is actually my own -- there are examples on Black Silk's crest list that have
283+
diagonal strokes (see the image to the left). I'm happy to ignore such cases for
284+
now. This particular example, incidentally, is no longer used: 總 is listed as
285+
the pre-simplified form of 総 in Wikipedia's [list of jōyō kanji](https://en.wikipedia.org/wiki/List_of_j%C5%8Dy%C5%8D_kanji), and means whole
286+
or total.
287+
288+
After tinkering for a bit, I got some of the `raylib` boilerplate out of the way
289+
and ended up with a very preliminary little clickable grid-based editor:
290+
291+
{{< figure src="/images/december-adventure-2025/raylib_grid_r.jpg" alt="a dinky editor for filling in black squares in a grid with red ink" >}}
292+
293+
To get a bit of a drawing feel, it'd obviously be nice to click and drag,
294+
brush-like, to draw contiguous blocks of ink. Frustratingly, I seem to be
295+
running into an issue with how `raylib` interprets my mouse's position when I
296+
drag. Maybe it's due to my tiling window manager, or maybe it's due to some kind
297+
of X/Wayland incompatibility, but as soon as I drag my mouse, `raylib` reports
298+
that my mouse is a solid 50 pixels above where it actually is, until I release
299+
the left button and move my mouse a bit. It doesn't seem to be an error in my
300+
code -- I was able to reproduce this in the little program I was writing a month
301+
ago to learn the basics of `raylib`.
302+
303+
Alas, I've already wasted most of my night trying to debug this, so I'll leave
304+
it here for now. I suppose I can return to this and swap to keyboard controls,
305+
though it definitely won't feel as smooth. Then finally onto the interesting
306+
part: understanding the patterns behind the gaps in ink and the radical shapes!
307+
308+
309+
## future adventures? {#future-adventures}
310+
311+
Thought I'd collect the little project ideas that tend to pop into my head when
312+
working on code.
313+
314+
- write up some notes on the basics of how C programs are compiled and linked,
315+
as well as the platform-dependent aspects. _inspired by:_ me realizing I have no
316+
idea what I'm doing when I'm putting together a Makefile or working on a
317+
C project on my mac when traveling
318+
- learn and write a toy program in assembly! and/or forth! and/or uxntal! if I
319+
can get the kakuji editor working, it might be a good second program to port
320+
over. _inspired by:_ [100r](https://100r.co), learning more about how memory and caches works
321+
- exploring moving away from org/ox-hugo for static site generation. _inspired
322+
by:_ as much as I love being able to use org-babel to write and run code from
323+
directly inside my posts, losing control over the final export is annoying.
324+
maybe I could just post-process the generated html? or rather, use tools that
325+
hugo exposes to do so?

static/css/stylesheet.css

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,15 @@ figure.pic>img {
127127
}
128128

129129
img {
130-
width: 90%;
130+
/* width: 90%; */
131131
border: 1px solid var(--link-color-alt);
132132
background-color: var(--text-color);
133133
}
134134

135+
p > img {
136+
float: left;
137+
margin: 5px 10px;
138+
}
135139

136140
a, a:visited, a:hover { color: var(--link-color-alt); }
137141

@@ -417,13 +421,8 @@ div#alltags {
417421

418422
div#tags a, div#alltags a, div#taglist a { text-decoration: none; }
419423

420-
div#content.garden .ox-hugo-toc .heading {
421-
display: none;
422-
}
423-
424-
div#content.garden .ox-hugo-toc ul {
425-
padding: 0;
426-
list-style: none;
424+
div#content.garden div.calendar-table td {
425+
padding: 1em;
427426
}
428427

429428
div#content.garden a[href]:not(:where(
3.62 KB
Loading
82.3 KB
Loading
10.8 KB
Loading
72.8 KB
Loading
92.5 KB
Loading

0 commit comments

Comments
 (0)