<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Trilug on Og Maciel's Journal</title><link>https://omaciel.github.io/tags/trilug/</link><description>Recent content in Trilug on Og Maciel's Journal</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 14 Sep 2006 00:00:00 +0000</lastBuildDate><atom:link href="https://omaciel.github.io/tags/trilug/index.xml" rel="self" type="application/rss+xml"/><item><title>Overheard at the TriLUG meeting</title><link>https://omaciel.github.io/posts/overheard-at-the-trilug-meeting/</link><pubDate>Thu, 14 Sep 2006 00:00:00 +0000</pubDate><guid>https://omaciel.github.io/posts/overheard-at-the-trilug-meeting/</guid><description>&lt;p&gt;Interesting:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;evilaptop&lt;/strong&gt;: Dude, CHICKS DIG UNIX &lt;strong&gt;evilaptop&lt;/strong&gt;: Everyone knows
that &lt;strong&gt;evilaptop&lt;/strong&gt;: Right?? &lt;strong&gt;JasonF&lt;/strong&gt;: that&amp;rsquo;s almost as unattractive
as someone who scripts festival to sing &amp;ldquo;99 bottles of beer on the
wall&amp;rdquo; at a party&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Funny how a lot of the attendees were also chatting on #trilug! hehehe&lt;/p&gt;
&lt;p&gt;What??? You&amp;rsquo;re actually interested in how to do it??? Ok, ok&amp;hellip; The
source code was also provided! hehehehe&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;#!/usr/bin/python&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# 99 bottles of beer on the wall.&lt;/li&gt;
&lt;li&gt;# Inspired by (who&amp;rsquo;d of thunk) beer!&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;from os import popen&lt;/li&gt;
&lt;li&gt;from time import sleep&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;def printsay(sometext):&lt;/li&gt;
&lt;li&gt;print sometext&lt;/li&gt;
&lt;li&gt;voicehandle.write(&amp;quot;(SayText &amp;quot;&amp;quot;+sometext+&amp;quot;&amp;quot;)&amp;quot;)&lt;/li&gt;
&lt;li&gt;# Start talkin&amp;rsquo; you varmint!&lt;/li&gt;
&lt;li&gt;voicehandle.flush()&lt;/li&gt;
&lt;li&gt;# It&amp;rsquo;d be nice if festival would tell us when it&amp;rsquo;s done talking.&lt;/li&gt;
&lt;li&gt;sleep(3)&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# 2 bottles, 1 bottle, no bottles&lt;/li&gt;
&lt;li&gt;def pluralize(somenumber,sometext):&lt;/li&gt;
&lt;li&gt;if ( somenumber &amp;gt; 1 ):&lt;/li&gt;
&lt;li&gt;retval = str(somenumber)+&amp;quot; &amp;quot;+sometext+&amp;quot;s&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;if ( somenumber == 1):&lt;/li&gt;
&lt;li&gt;retval = str(somenumber)+&amp;quot; &amp;quot;+sometext&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;if ( somenumber == 0):&lt;/li&gt;
&lt;li&gt;retval = &amp;quot;No &amp;quot;+sometext+&amp;quot;s&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;return retval&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# Open up a pipe to festival so we don&amp;rsquo;t keep respawning&lt;/li&gt;
&lt;li&gt;voicehandle = popen(&amp;quot;festival&amp;quot;,&amp;quot;w&amp;quot;)&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# Start with 99 bottles&lt;/li&gt;
&lt;li&gt;num_bottles = 99&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# Do what now?&lt;/li&gt;
&lt;li&gt;refrain = &amp;quot;Take one down, pass it around.&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;# As long as there&amp;rsquo;s beer, we drink!&lt;/li&gt;
&lt;li&gt;while ( num_bottles &amp;gt; 0 ):&lt;/li&gt;
&lt;li&gt;printsay(pluralize(num_bottles,&amp;quot;bottle&amp;quot;)+&amp;quot; of beer on the
wall.&amp;quot;)&lt;/li&gt;
&lt;li&gt;printsay(pluralize(num_bottles,&amp;quot;bottle&amp;quot;)+&amp;quot; of beer.&amp;quot;)&lt;/li&gt;
&lt;li&gt;printsay(refrain)&lt;/li&gt;
&lt;li&gt;num_bottles = num_bottles - 1&lt;/li&gt;
&lt;li&gt;printsay(pluralize(num_bottles,&amp;quot;bottle&amp;quot;)+&amp;quot; of beer on the
wall.&amp;quot;)&lt;/li&gt;
&lt;li&gt;print &amp;quot;&amp;mdash;-&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;:Ã‚Â  Got to meet &lt;a href="https://launchpad.net/people/crimsun"&gt;Daniel T
Chen&lt;/a&gt; at the end of the
meeting.Ã‚Â  What a great guy!Ã‚Â  Hope to see him soon again!&lt;/p&gt;</description></item></channel></rss>