Motivated by @csepp , I wrote a haiku in haku. I even added a new keyword 俳句 ("haiku").



The actual haiku is


tera ha kara
hasu ha saiteta
atsui natsu

an empty temple
the lotus was blooming
hot summer

All the rest is needed to make it a valid haku program. When you run it, it prints


giragira taiyou
terasaretai yo

which is more poetry ^_^

· · Web · 2 · 4 · 3

@wim_v12e ASTONISHING!!! 🎇 🎶 😃 🎆

@Eidon 🙇 thank you very much! Adding a new keyword is of course a trifle. And real haiku don't have commas. But I still like that you can do this in my little language 😃

@wim_v12e Your language is a BLAST! I hope to have soon the opportunity to play with It! Also, if you would agree, I would create a Grundgestalt with your Haiku *and* Raku's output! I would then share with you the source of course, and if you'd like the idea we could... play with it XD

@Eidon I like the idea very much! How would you incorporate the text into your Grundgestalt?

@wim_v12e Great 😃 !
I would proceed like I did for the few waka's of the Ogura Hyakunin Isshu that I experimented with: I would feed the kanji into my "Grundgestaller" program. It is all very much serendipitous: the kanji encoding are read in byte-by-byte; the bytes are normalized and then interpreted as cards in the game that I simulate. The cards owned by the "players" and those on the "table" are then converted into notes. And then one plays with the obtained MIDIs 😆


@wim_v12e You get music like the one here:, which is not very interesting to be honest. But what I'd like to try is to feed my code with various Raku inputs and outputs, and try to get something nicer by assembling elements together.

I had a blog describing some of my experiments, though posts are in Italian -- sorry


@wim_v12e Does it still sound interesting to you? If so, I would proceed and feed into my "Grundgestalter" your Haiku and Raku's output, and share the resulting midi with you!


@Eidon You say Raku, I assume you mean Haku?

How are the bytes normalised? By reducing them to a smaller number with a modulo?

I would like to think a bit about the conversion of the Japanese text to numbers, because I feel taking the unicode bytes is very random. There are many other ways to relate kanji and kana to numbers. Of course they are all essentially random, but maybe a little less random? For example, I could take the kana reading and use the position in the iroha as the encoding,

@wim_v12e Yes, my apologies, I meant Haku...
Normalization: Yes, via a modulo
Kana-to-number: yes, great idea to use the position in the Iroha!
Thanks for your interest Wim
Have a great day!

@Eidon Great! So what is the range to which you reduce? If it is based on an ordinary playing card deck it has 52 cards, is that the range?

@Eidon Let me know what you need from me as input data for your composition

@wim_v12e Thank you Wim! If possible, I'd need a few Haku inputs; their outputs; and some encodings into digits or even letters: the romaji reading, the kana reading + their position in the iroha (as you kindly suggested); any others that would come to your mind. Then I will take those encodings and feed them in my "Grundgestalter" code. Thank you very much!

@Eidon I have been looking a the "iroha encoding", and I have a way to encode all 120 kana into the 47 iroha values. Is 47 a suitable range for you? Should it start at 0 or 1?


The haiku:


In hiragana:


The iroha-encoding:

[35 22 3 14 22 / 3 47 3 37 1 35 16 / 36 19 1 21 19]

The output of the haku program:


In hiragana:


The iroha-encoding:

[38 22 38 22 16 1 15 24 / 35 22 37 17 16 1 15]

@Eidon There are 110 hiragana "syllabograms", but the iroha only has 47 characters. The mapping is quite simple:
- ignore diacritics, as they are a modern addition: ば,ぱ becomes は etc
- small kana are written as large ones, as there was no difference: きゅ becomes きゆ etc
- finally, ん becomes む as historically that is how it was.

@Eidon If these two short strings are not yet sufficient I'll do a few more.

@wim_v12e I love the haiku ! (and the program around it is super cool too) @csepp
Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!