As far as the interpreter is concerned, it has two modes: strict and non-strict. In strict mode, the interpreter only recognizes the standard list of words (the words I listed earlier) and will halt if it encounters any unrecognized words. In non-strict mode, it will accept words that are not part of the standard list. There is a slight drawback here, however. I use the Lingua:EN::Syllable perl module to count syllables. It is accurate about 85% percent of the time. For words where the number of syllables aren't correct, I had to maintain an "exceptions" list. A way to get around this would be to use a more robust syllable-detection algorithm.
Writing code in CherryBlossom is not easy and it isn't meant to be! I have long felt that programming is more than a mere engineering effort; it is a creative and artistic effort as well. CherryBlossom combines the programmer and poet (into a poegrammer? progroet? I digress...) into one single entity that produces haikus that are not just creative and aesthetically-pleasing objects, but functional as well! Haikus and code go well together. Good code must have no distractions and must get to the heart of the matter. At the end of execution there must be closure. Similarly, a good haiku also has no distraction and does not stray from its subject matter. When one reads such a haiku one has a sense of peace and closure and feels that all is right in the world. Indeed, the uniting of program code and haiku is quite zen and the programmer/poet must be united with the problem that he or she is trying to solve.*
Here is another example for you to meditate and contemplate over:
caressed by warmth of the sun
dreaming of summer
dreaming that I am
contemplating in rainfall
about all my loss
lonely desert in winter
all is forgotten
autumn is ahead
the winter is returning.
and it conquers all.
how can the rainfall
so beautify the hillside
that was so barren
sings as it falls to the earth
and all is alive
Here's a link to the interpreter. It's written in perl and requires the Lingua::EN::Syllable module.
*Yes, this is all tongue-in-cheek!
10 thoughts on “CherryBlossom”
This really is amazing. Now I can express myself AND make beautiful code all in one. Great work.
Thanks! That was the idea 😉 heh!
This is really cool!! BrainF**k was pretty much a disaster.
Haha, thanks! Yeah I think that the intent with Brainfuck!
Saw your shameless plug on SO 🙂
This is so cool! I wish I had come up with something like this. I love it.
Thank you! 😀 It was definitely during some moments of boredom (and probably a little insanity) that I came up with this.
Hey, this is really interesting! I’m kind of new to programming, and I really want to try this out. Could you just explain how Im supposed to set up and run the interpreter?
You need to download Perl and install a few modules. If you’re on Ubuntu, Perl should already be installed. You can start up CPAN by typing “cpan” and then installing the following modules.
For Windows, there are some other options. You can install Strawberry Perl and use cpan to install the above modules.
You say that you’re new to programming; I would suggest not starting off with CherryBlossom. It is a Brainf*ck analog after all and Brainf*ck isn’t designed to be easy 🙂