<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ruby on Yang's Blog</title><link>https://blog.yangtheman.com/tags/ruby/</link><description>Recent content in Ruby on Yang's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Yang Chung</copyright><lastBuildDate>Tue, 17 Jan 2012 07:24:21 +0000</lastBuildDate><atom:link href="https://blog.yangtheman.com/tags/ruby/index.xml" rel="self" type="application/rss+xml"/><item><title>How to install KidsRuby on Mac OS X and Ubuntu</title><link>https://blog.yangtheman.com/2012/01/17/how-to-install-kids-ruby-on-mac-os-x-and-ubuntu/</link><pubDate>Tue, 17 Jan 2012 07:24:21 +0000</pubDate><guid>https://blog.yangtheman.com/2012/01/17/how-to-install-kids-ruby-on-mac-os-x-and-ubuntu/</guid><description/></item><item><title>Fresh installation of Ruby, Rails, Git, RubyGems, and Postgresql 8.x</title><link>https://blog.yangtheman.com/2011/11/18/resources-for-fresh-installation-of-git-rubygems-postgresql-8-x-and-ruby-on-rails/</link><pubDate>Fri, 18 Nov 2011 09:53:34 +0000</pubDate><guid>https://blog.yangtheman.com/2011/11/18/resources-for-fresh-installation-of-git-rubygems-postgresql-8-x-and-ruby-on-rails/</guid><description/></item><item><title>Path of enlightenment to Ruby</title><link>https://blog.yangtheman.com/2010/02/22/path-of-enlightenment-to-ruby/</link><pubDate>Tue, 23 Feb 2010 06:39:02 +0000</pubDate><guid>https://blog.yangtheman.com/2010/02/22/path-of-enlightenment-to-ruby/</guid><description/></item><item><title>My answer to text-dynamo</title><link>https://blog.yangtheman.com/2010/02/22/my-naswer-to/</link><pubDate>Tue, 23 Feb 2010 05:09:37 +0000</pubDate><guid>https://blog.yangtheman.com/2010/02/22/my-naswer-to/</guid><description>&lt;p&gt;As an exercise to practice Ruby, you can try to compete a random text generator using an underlying Markov chain model. The codes in the following github account are incomplete. You are supposed to fill in or create methods that will create randomly generated texts given seed texts.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/eandrejko/text-dynamo" target="_blank" rel="noreferrer"&gt;http://github.com/eandrejko/text-dynamo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Markov chain is like a state machine, but the key is the what causes state transition only depends on the current state. In this case, how do you determine probability of selecting which word next? It&amp;rsquo;s quite simple. You go through the seed text and count frequency of next words, and that determines the frequency. For example, &amp;ldquo;am&amp;rdquo; is likely to folllow &amp;ldquo;I&amp;rdquo; most frequently. Next might be &amp;ldquo;do&amp;rdquo; or other verbs.&lt;/p&gt;</description></item></channel></rss>