Skip to content

Rough Book

random musings

Menu
  • About Me
  • Contact
  • Projects
    • bAdkOde
    • CherryBlossom
    • FXCalendar
    • Sulekha
Menu

CherryBlossom

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:

i can hear the birds
caressed by warmth of the sun
dreaming of summer

dreaming that I am
contemplating in rainfall
about all my loss

freezing, desolate.
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

returning rainfall
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!

Pages: 1 2 3

10 thoughts on “CherryBlossom”

  1. TheMoonMaster says:
    March 14, 2010 at 8:17 pm

    This really is amazing. Now I can express myself AND make beautiful code all in one. Great work.

    Reply
  2. vivin says:
    March 14, 2010 at 8:31 pm

    @TheMoonMaster
    Thanks! That was the idea 😉 heh!

    Reply
  3. Pingback: uberVU - social comments
  4. Tushar Dadlani says:
    May 28, 2010 at 11:57 am

    This is really cool!! BrainF**k was pretty much a disaster.

    Reply
  5. vivin says:
    May 29, 2010 at 12:13 pm

    @Tushar Dadlani
    Haha, thanks! Yeah I think that the intent with Brainfuck!

    Reply
  6. anon says:
    June 14, 2010 at 3:23 pm

    Saw your shameless plug on SO 🙂

    This is so cool! I wish I had come up with something like this. I love it.

    Reply
  7. vivin says:
    June 14, 2010 at 3:30 pm

    @anon
    Thank you! 😀 It was definitely during some moments of boredom (and probably a little insanity) that I came up with this.

    Reply
  8. A says:
    August 26, 2010 at 1:21 pm

    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?

    Reply
  9. vivin says:
    September 3, 2010 at 8:12 am

    @A
    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.

    GetOpt::Mixed
    Term::ReadKey
    Lingua::EN::Syllable

    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 🙂

    Reply
  10. Pingback: Let’s Get Brainfucked! | Cyber Crud

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • February 2023
  • April 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • June 2017
  • March 2017
  • November 2016
  • August 2016
  • July 2016
  • June 2016
  • February 2016
  • August 2015
  • July 2014
  • June 2014
  • March 2014
  • December 2013
  • November 2013
  • September 2013
  • July 2013
  • June 2013
  • March 2013
  • February 2013
  • January 2013
  • October 2012
  • July 2012
  • June 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • July 2011
  • June 2011
  • May 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • August 2008
  • March 2008
  • February 2008
  • November 2007
  • July 2007
  • June 2007
  • May 2007
  • March 2007
  • December 2006
  • October 2006
  • September 2006
  • August 2006
  • June 2006
  • April 2006
  • March 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • February 2005
  • October 2004
  • September 2004
  • August 2004
  • July 2004
  • June 2004
  • May 2004
  • April 2004
  • March 2004
  • February 2004
  • January 2004
  • December 2003
  • November 2003
  • October 2003
  • September 2003
  • July 2003
  • June 2003
  • May 2003
  • March 2003
  • February 2003
  • January 2003
  • December 2002
  • November 2002
  • October 2002
  • September 2002
  • August 2002
  • July 2002
  • June 2002
  • May 2002
  • April 2002
  • February 2002
  • September 2001
  • August 2001
  • April 2001
  • March 2001
  • February 2001
  • January 2001
  • December 2000
  • November 2000
  • October 2000
  • August 2000
  • July 2000
  • June 2000
  • May 2000
  • March 2000
  • January 2000
  • December 1999
  • November 1999
  • October 1999
  • September 1999
©2023 Rough Book | Built using WordPress and Responsive Blogily theme by Superb
All original content on these pages is fingerprinted and certified by Digiprove