- Reviewed the Google C++ Style Guide for formatting, naming, and comment considerations.
- Adiemus' "Adiemus" from their album "Songs of Sanctuary"
- Installed Valgrind suite of profiling and debugging.
- Installed kcachegrind which provides "visual support for the cachegrind skin of the memory analyzer Valgrind."
- Ludovico Einaudi's "Passagio" from his album "Le Onde"
- Implemented ToString() using std::ostringstream code from http://bytes.com/forum/thread62153.html
- Very cool: this mimics Java's "public final static" class feature: "newl_parser::parser::token::NUMBER". Namespace "newl_parser" contains class "parser" which contains public struct "token", the public struct containing enumerated type "yyTokenType" which (finally) contains all token types (for example, NUMBER, IDENTIFIER, ASSIGN).
Sunday, August 10, 2008
Sunday Development Log
Sunday:
Saturday, August 09, 2008
Saturday Development Log
Saturday:
- inifile-->newl_parser
- inifileLexer-->newl_lexer
- inifile_driver-->newl_driver
- nm views symbols of object files
- To remedy error "multiple definition of `yyFlexLexer::yywrap()'", remove option %noyywrap--then manually redefine "int yyFlexLexer::yywrap() { return 1; }" in file lexer.ll. Flex defines yyFlexLexer::yywrap() in both %.cc and %.hh--the linker encounters multiple declarations if two objects (lexer.o and driver.o, for example, if driver.cc includes lexer.hh).
- Bond's "Duel" from the album "Born"
- Arvo Pärt's "An den Wassern zu Babel", from the album "Arbos"
- Yann Tiersen's "Le Moulin" from the album "Le Fabuleux Destin d'Amelie Poulain"
- parse() handles both char * (filename) and std::istream (stdin) depending on the signature of the call.
- Max Richter's "Sarajevo" from his album "Memoryhouse"
- Completed fully object-oriented Flex+Bison simple calculator.
Friday, August 08, 2008
Friday Development
Friday:
- Implementing Jan's suggested Bison/Flex C++ implementation that I discovered last night. Download example.tar.gz failed to contain files referenced by the Makefile: validate.cc, update-individual-policy.cc, combine-multiple-policies.cc. Commented-out references to them (targets "validate", "update-individual-policy", "combine-multiple-policies", "validate.o", "update-individual-policy.o", and "combine-multiple-policies.o") and modified target all to read "all: scanner.o inifile.o parser.o dump.o". I also commented out "COPTS= -m64 -mcpu=ultrasparc". It compiles.
- Why don't GNU projects Bison and Flex figure out how to get compatible on C++ object implementation? It's really awful, in my opinion--it could be so much better.
- Eluvium's "After Nature" from their album "Copia"
- Ludovico Einaudi's "Primavera" from their album "Divenire."
- Pachobel's Canon in WTF
Thursday, August 07, 2008
Thursday Development Log
Thursday:
- "I now understand why the Bison C++ example uses Flex in C stdio mode: because getting it to operate using C++
is nigh-on impossible." Link: http://ioctl.org/jan/bison/
Wednesday, August 06, 2008
Wednesday Development Log
Wednesday:
- Refreshed my memory of the Bison manual's section on generating a C++ scanner: http://www.gnu.org/software/bison/manual/html_mono/bison.html#C_002b_002b-Language-Interface
- Referenced Google Style C++ Guide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Conditionals
Sunday, August 03, 2008
Sunday Development Log
Sunday:
With all this talk about nonrecursive make, one might get the wrong impression that I'm doing this solely to learn about it. In fact, I'm finishing up a summer project for my CSC-251 compiler class, which is why GNU Flex/Bison come into play.
- Finished reading the white paper "Recursive Make Considered Harmful"
- Consulted the Flex manual: http://flex.sourceforge.net/manual/
- Compiled small Flex program in anticipation of testing new non-recursive make harness.
- Discovered O'Reilly's online book "Managing Projects with GNU Make Managing Projects with GNU Make, Third Edition" at http://oreilly.com/catalog/9780596006105/book/index.csp , part of their Open Book Project.
- It seems the nonrecursive harness uses implicit compiles for all the C files it encounters.
- Getting my head wrapped around the targets and dependencies of the nonrecursive make harness.
- Successfully modified the nonrecursive make harness so it compiles GNU Flex code into a binary.
With all this talk about nonrecursive make, one might get the wrong impression that I'm doing this solely to learn about it. In fact, I'm finishing up a summer project for my CSC-251 compiler class, which is why GNU Flex/Bison come into play.
Saturday, August 02, 2008
Saturday Development Log
Application development represents a game of inches.
- Configured PDF viewing
- Installed and configured Subversion client kdesvn
- Installed IDE kdevelop--profiling and memory leak tools look promising. Will stick with Kate for now.
- Configured Konsole colors, font
- Added directory test and source file test/full-test.n.
- Added Makefile stubs in trunk using white-paper "Recursive Make Considered Harmful" (http://www.xs4all.nl/~evbergen/nonrecursive-make.html) as a guide.
- Installed Adobe Flash: sudo apt-get install flashplugin-nonfree
- Installed Amarok: sudo apt-get install amarok
- Installed g++: sudo apt-get install g++
- Installed dlocate: sudo apt-get install dlocate (initialize before using each time with sudo update-dlocatedb)
- Installed libldap2-dev: sudo apt-get install libldap2-dev (and in doing so learned the value of finding which packages contain header files via http://packages.debian.org/)
Steam Locomotive
It's hard to say how much this has enriched my life. Thanks to Brian Lavender for sharing it on SacLUG. Screen captures courtesy KSnapshot (very intuitive).
Installation: sudo apt-get install sl
Images
The default ("sl"):

Note: The default, it travels across the screen from right to left, with animated smoke and wheels.
"-a An accident seems to happen. You’ll feel pity for people who cry for help.":

Note: the same as the original except it shows two engineers saying "HelpHelp!".
"-l shows little one.":

"-F It flies.":

Note: the same as the original "sl" but it moves from the lower-right to the upper-left.
Brilliant. From the man page:
Installation: sudo apt-get install sl
Images
The default ("sl"):

Note: The default, it travels across the screen from right to left, with animated smoke and wheels.
"-a An accident seems to happen. You’ll feel pity for people who cry for help.":

Note: the same as the original except it shows two engineers saying "HelpHelp!".
"-l shows little one.":

"-F It flies.":

Note: the same as the original "sl" but it moves from the lower-right to the upper-left.
Brilliant. From the man page:
NAME
sl - display animations aimed to correct users who accidentally enter sl instead of ls.
SYNOPSIS
sl [ -alFe ]
DESCRIPTION
sl Displays animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive.
OPTIONS
-a An accident seems to happen. You’ll feel pity for people who cry for help.
-l shows little one.
-F It flies.
-e Allow interrupt by Ctrl+C.
SEE ALSO
ls(1)
BUGS
It rarely shows contents of current directory.
AUTHOR
sl was written by Toyoda Masashi. This manual page was written by Brian Ristuccia and
Kenshi Mutofor the Debian GNU/Linux system but may be used by others under the same license as sl itself.
Deleted My Task Manager
Playing with KUbuntu and I accidentally deleted my task manager. All the icons on the widget bar's task manager went away, and all the other widgets flowed left.
I re-added the task manager widget but it appeared on the extreme right, and there doesn't seem to be an easy way to rearrange them. :(
The solution: remove everything, then re-add every widget in the correct order.
A stiff penalty for an easy mistake.
I re-added the task manager widget but it appeared on the extreme right, and there doesn't seem to be an easy way to rearrange them. :(
The solution: remove everything, then re-add every widget in the correct order.
A stiff penalty for an easy mistake.
Linux PDF Issues
Firefox failed to load a PDF I typed into the address bar.
After a bit of trial and error, I discovered the PDF Download add-on, which makes it all simpler when one clicks a link.
I first downloaded FoxIt PDF reader for Linux (binary) and told Firefox to use that to open PDFs. Unfortunately, it opens the ReaderLinux binary, not the PDF. And once I associated the file type with the binary, the Linux Firefox fails to provide an easy way to disassociate itself from that.
The solution: edit file ~/.mozilla/firefox/profile.default/mimeTypes.rdf, and delete the XML sections dealing with ReaderLinux. Restart Firefox. The next time you attempt to open a PDF, Firefox will prompt the user again for what to do.
The final solution? Associating Okular (/usr/lib/kde4/bin/okular) with PDF file types instead works great. And PDF Download add-on works great too.
After a bit of trial and error, I discovered the PDF Download add-on, which makes it all simpler when one clicks a link.
I first downloaded FoxIt PDF reader for Linux (binary) and told Firefox to use that to open PDFs. Unfortunately, it opens the ReaderLinux binary, not the PDF. And once I associated the file type with the binary, the Linux Firefox fails to provide an easy way to disassociate itself from that.
The solution: edit file ~/.mozilla/firefox/profile.default/mimeTypes.rdf, and delete the XML sections dealing with ReaderLinux. Restart Firefox. The next time you attempt to open a PDF, Firefox will prompt the user again for what to do.
The final solution? Associating Okular (/usr/lib/kde4/bin/okular) with PDF file types instead works great. And PDF Download add-on works great too.
Friday, August 01, 2008
Late Night Subversion
Recording for future use:
- Create a Subversion repository: ubuntu:~/src/csc-251$ svnadmin create ///home/user/.subversion-repository
- Import the initial file hierarchy: ubuntu:~/src/csc-251$ svn import newlc file:///home/user/.subversion-repository/newlc -m "Initial import"
- Create a branch: ubuntu:~/src/csc-251$ svn copy file:///home/user/.subversion-repository/newlc/trunk file:///home/user/.subversion-repository/newlc/branches/my-branch
- Checkout the project: ubuntu:~/src/csc-251$ mkdir newlc && cd newlc && svn checkout file:///home/user/.subversion-repository/newlc/trunk && cd trunk
- ubuntu:~$ svnadmin create ///home/user/.subversion-repository
- ubuntu:~$ svnadmin create .subversion-repository
Under The Bridge
Walking home music today: Under the Bridge by RHCP:
Sometimes I feelIt's a great urban walking song. On my way to work on Wednesday, I noticed a man taking shelter under a bridge at Watt and Longview, which triggered this song in my head. Video.
Like I dont have a partner
Sometimes I feel
Like my only friend
Is the city I live in
The city of angels
Lonely as I am
Together we cry
I drive on her streets
cause shes my companion
I walk through her hills
cause she knows who I am
She sees my good deeds
And she kisses me windy
I never worry
Now that is a lie
I dont ever want to feel
Like I did that day
Take me to the place I love
Take me all the way
Its hard to believe
That theres nobody out there
Its hard to believe
That Im all alone
At least I have her love
The city she loves me
Lonely as I am
Together we cry
I dont ever want to feel
Like I did that day
Take me to the place I love
Take me all the way
Under the bridge downtown
Is where I drew some blood
Under the bridge downtown
I could not get enough
Under the bridge downtown
Forgot about my love
Under the bridge downtown
I gave my life away
Thursday, July 31, 2008
Sleep Debt
I read an article on Wednesday stating a simple experiment:
Starting on a Sunday, do not drink alcohol or caffeine; do not smoke; go to sleep about the same time every night; and get an uninterrupted seven to eight hours of sleep for the next six nights. Then, on Saturday morning, sleep in. See how long your body will let you sleep. If you sleep longer than you did during the week -- then you have a sleep debt. So you should consider getting more sleep each night to replenish that sleep debt.It sounds easy enough so I've decided to try it out starting on Sunday.
Energy Breakthrough
"Electricity-by-wire from a central source could be a thing of the past."
A breakthrough: http://web.mit.edu/newsoffice/2008/oxygen-0731.html
A breakthrough: http://web.mit.edu/newsoffice/2008/oxygen-0731.html
Wubi, Part Two
My first attempt using Wubi crashed and burned. I attempted to use the automatic updater to update a boatload of packages and it froze. I rebooted this evening to continue with programming, but ack, nothing loaded.
Tuesday, July 29, 2008
Ninja Moustache
Brilliant:

Via Wired: http://www.wired.com/culture/culturereviews/multimedia/2008/07/gallery_comiccon_10things
If you don't get it, it's a ninja with a moustache. If you still don't get it, you probably won't find much interest in Shawnimals: http://www.shawnimals.com/

Via Wired: http://www.wired.com/culture/culturereviews/multimedia/2008/07/gallery_comiccon_10things
If you don't get it, it's a ninja with a moustache. If you still don't get it, you probably won't find much interest in Shawnimals: http://www.shawnimals.com/
Monday, July 28, 2008
Bike Links
KDVS 90.3 featured Jean Jackman of Davis, CA and she recommended Adventure Cycle (http://www.adv-cycling.org) as a great bicycle tour company. They offer guided tour maps, including one a TransAmerica route: http://www.adventurecycling.org/routes/transamerica.cfm.
She also recommended the Davis Bike Club (http://www.davisbikeclub.org/) as a resource.
She also recommended the Davis Bike Club (http://www.davisbikeclub.org/) as a resource.
Sacramento Badminton

Dawn and I both like badminton:
- CSUS badminton club: http://www.geocities.com/Colosseum/Bleachers/2418/
- Folsom badminton club: http://sports.groups.yahoo.com/group/folsom_badminton/
- UC-Davis badminton club: http://www.ucdbadminton.com/
Dr. Patricia Chen
Dr. Patricia Chen took over as Dawn's primary care physician today.
The conversation went like this:
If everything goes as planned (and it seems reasonable to expect that it might) we will only have these SSRI/SNRI medications around until roughly the end of September.
I've found the human cost in extricating oneself from Effexor alarming. Dr. Chen argued Effexor works in some situations--for example, post-menopausal women. She mentioned it represents one of the most difficult anti-depressants to discontinue.
Even worse--paroxetine (Paxil), which exhibits many of the same problems as Effexor but for which Dr. Chen doesn't have a tested discontinuation plan. Since paroxetine represents an SSRI, using it in combination with fluoxetine (another SSRI) proves problematic. Dawn used Paxil for one year many years ago, then her doctor switched her to Effexor. So that represents one lucky break.
In my opinion, doctors exhibit reckless behavior by putting patients on SSRI/SNRI class medications without extensive knowledge of discontinuation effects and how to successfully manage them. Dr. Chen learned the hard way--doctors like our previous primary care physician of two years still don't know even after watching a patient like Dawn endure three exceedingly painful attempts at discontinuation.
Even more alarming--Dawn's far from alone. Google returns 424,000 hits for "effexor withdrawal". A sharp contrast exists between horror stories on the Internet and the level of awareness in the four out of five doctors we interacted over the last three months.
The conversation went like this:
*Dawn explains the ear pain and how she thinks it's an Effexor discontinuation symptom*We discussed Dawn's previous treatments under her previous primary-care physician, which involved quite a few looks of shock and silent groaning from Dr. Chen. She explained several things:
Dr. Chen: I agree with you
*Dawn chokes up with relief*
- Effexor, especially after being taken for nine years, deposits itself into the tissues and takes quite some time to get used up. Though it has a short half-life, when very small amounts get into the tissues it takes some time (six to eight weeks) before it's used up.
- The ear pain represents a discontinuation symptom Dr. Chen witnessed with other patients. The solution involves going back on a low dose of Effexor to get rid of the ear pain, then gradually introduce the SSRI fluoxetine (Prozac, Ladose) for about a month. Once the body accepts the fluoxetine, gradually eliminate the Effexor, then stay on fluoxetine until the body uses up all the Effexor in the tissues. Then taper off the fluoxetine gradually enough so no problems occur (that is, no ear pain).
- Dr. Chen made the same mistakes as our previous primary care physician. The difference--she took the initiative to follow-up with a psychiatrist and pursued information on effective best-practice treatments for tapering off Effexor. Our previous primary-care physician seemed to have such a high workload that he failed to make (have?) time to do this legwork.
- Dawn began taking the lowest dose of Effexor (37.5 mg) today and already feels reduced pain in her ears.
- Dr. Chen said that Dawn suffers from eustachian tube dysfunction, but that dysfunction does not account for the severe pain in her ears. Typically, eustachian tube dysfunction manifests itself as reduced hearing levels, echoes of one's voice, sort of like being underwater. I didn't ask her about our uneducated norepinephrine theory.
- If Dawn doesn't respond, Dr. Chen's more than willing to refer us to an ear-nose-throat specialist.
- Dr. Chen failed to have an explanation for why Effexor produces this discontinuation syndrome symptom--we don't think many people do know why it does this.
- We weren't sure why having Effexor sticking around in the tissues might cause the ear pain--wouldn't having bits of it in the tissues be a good thing in the case of discontinuation? Obviously not, but we're not sure why. There's probably a simple explanation for this.
- Dawn will finish out the course of prednisone--it might have minor side-effects but nothing serious.
If everything goes as planned (and it seems reasonable to expect that it might) we will only have these SSRI/SNRI medications around until roughly the end of September.
I've found the human cost in extricating oneself from Effexor alarming. Dr. Chen argued Effexor works in some situations--for example, post-menopausal women. She mentioned it represents one of the most difficult anti-depressants to discontinue.
Even worse--paroxetine (Paxil), which exhibits many of the same problems as Effexor but for which Dr. Chen doesn't have a tested discontinuation plan. Since paroxetine represents an SSRI, using it in combination with fluoxetine (another SSRI) proves problematic. Dawn used Paxil for one year many years ago, then her doctor switched her to Effexor. So that represents one lucky break.
In my opinion, doctors exhibit reckless behavior by putting patients on SSRI/SNRI class medications without extensive knowledge of discontinuation effects and how to successfully manage them. Dr. Chen learned the hard way--doctors like our previous primary care physician of two years still don't know even after watching a patient like Dawn endure three exceedingly painful attempts at discontinuation.
Even more alarming--Dawn's far from alone. Google returns 424,000 hits for "effexor withdrawal". A sharp contrast exists between horror stories on the Internet and the level of awareness in the four out of five doctors we interacted over the last three months.
Sunday, July 27, 2008
Eustachian Tube Dysfunction

Dawn's suffering from eustachian tube dysfunction right now. It's an awfully painful condition where the middle ear fills up because the eustacian tube closes due to inflammation (see above image).
A healthy eustachian tube (named for Eustachius) opens to equalize pressure in the middle ear. That popping feeling when you gain or lose altitude? That's the eustachian tube opening to equalize pressure in your ear. See this EarDoc advertisement for an explanation of what happens: http://youtube.com/watch?v=XdqrGaUF5EQ (I love the duck).
Dawn tapered off of the anti-depressant Effexor on Wednesday, July 16th and began experiencing symptoms on Thursday, July 17th, with the pain gradually increasing in severity. Dawn experiences the ear pressure pain each time she tapers off Effexor, this being the third time. It's not listed as a common side-effect on the Effexor patient information leaflet. Since she's experiencing considerable, chronic pain, we visited her primary care physician on Friday, July 25. He assured her there's no danger of rupturing of the eardrum and noticed a bulge in her right eardrum (where most of the pain occurs).
Since we don't have a good track record with her primary care physician, we're switching doctors immediately to a highly-rated female doctor closer to home, Dr. Patricia Chen. On Saturday, July 26, we visited Med7 and got another opinion. He prescribed prednisone, a steroidal decongestant, and recommended seeing an ear-nose-throat specialist if it didn't work.
Well, it's not really working, two days in--though seven days remain, the bulk of the prednisone is taken in the first three days. So, we're guessing that we'll have to see an ENT specialist as soon as we can.
Our latest theory here takes into consideration the fact that Effexor acts as an SNRI (seratonin-norepinephrin reuptake inhibitor) boosting the levels of norepinephrin in the body.
Since pseudo-epinephrine aids in reducing swelling, we theorize that increased levels of norepinephrine (adrenaline, basically) possibly aided with reduction of swelling in Dawn's ears (caused by allergies, most likely, the Central Valley being the allergy capital of the world), thus keeping the eustachian tubes open and draining/equalizing the pressure in her middle ear. This theory has the support of some empirical evidence--each time Dawn goes back on Effexor (even temporarily) the pain diminishes immediately. Dawn's a bit skeptical, since she felt even worse pain when she tapered the first time--she thinks it might be a possible side-effect.
We guess that once the boosted levels of norepinephrin disappear (as Dawn ceases taking the SNRI), the swelling increases, shutting the eustachian tubes, filling the middle ear with fluid and causing the painful pressure on the eardrum.
Thoughts? I'm pretty ignorant in this area but have been reading as much as I can. We may be completely off-base. The doctors we've talked to have no clue about the correlation between Effexor discontinuation and the ear pain though, so perhaps our opinions make at least a bit of sense.
If worse comes to worse, an ENT can perform a myringotomy--but obviously we're hoping it doesn't have to go that far. There seem to be some devices on the market (like the EarDoc, http://eardoc.info, and the EarPopper) but they're expensive and we're skeptical without knowing more. On Monday we make an appointment (hopefully for as soon as possible) with Dr. Chen. We're hoping that we can get an immediate referral to see an ENT specialist ASAP.
Dilbert Ultimate House
The Dilbert Ultimate House: http://www.unitedmedia.com/comics/dilbert/duh/tour.html
I first read about this in 2005. Coming back to it this past week, I begin drooling again at the thought of doing it for real.
Scott Adams also built the ultimate cube with IDEO: http://www.ideo.com/portfolio/re.asp?x=50099
(also: http://www.ideo.com/dilbert/)
I first read about this in 2005. Coming back to it this past week, I begin drooling again at the thought of doing it for real.
Scott Adams also built the ultimate cube with IDEO: http://www.ideo.com/portfolio/re.asp?x=50099
(also: http://www.ideo.com/dilbert/)
Saturday, July 26, 2008
Friday, July 25, 2008
Agence France-Presse Photo Feed
I'd love to have FlickrFan for Windows, but for now it's Mac-only. So I'm using Google Screensaver, which accepts RSS feed enclosures as a source for images.
FlickrFan feeds I subscribe to:
http://static.flickrfan.org/afp/rss.xml
And the AP photo feed:
http://static.flickrfan.org/ap/rss.xml
FlickrFan feeds I subscribe to:
http://static.flickrfan.org/afp/rss.xml
And the AP photo feed:
http://static.flickrfan.org/ap/rss.xml
Sunday, July 20, 2008
GRE Test Prep Baseline Score
Without any training, I scored a 620 Verbal (88th percentile) and 600 Quantitative (53rd percentile) on the GRE practice test 1.
Verbal words to review:
I've met my goal on the verbal (600, 85th percentile), but meeting the goal on the quantitative (750, 85th percentile) will take effort.
Verbal words to review:
- Spate: a sudden, almost overwhelming, outpouring: a spate of angry words.
- Provident: having or showing foresight; providing carefully for the future.
- Credulity: willingness to believe or trust too readily, esp. without proper or adequate evidence; gullibility.
- Boon: something to be thankful for; blessing; benefit.
- Inexorable: unyielding; unalterable: inexorable truth; inexorable justice.
- Confounding: To cause to become confused or perplexed
- Appropriate: to set apart, authorize, or legislate for some specific purpose or use
- Profligate: utterly and shamelessly immoral or dissipated; thoroughly dissolute.
- Myopic: unable or unwilling to act prudently; shortsighted.
- Rueful: feeling, showing, or expressing sorrow or pity; mournful; doleful: the rueful look on her face.
- Antithetical: directly opposed or contrasted; opposite.
- Evanescent: vanishing; fading away; fleeting.
- Gaffe: a social blunder; faux pas.
- Decorum: dignified propriety of behavior, speech, dress, etc.
- Dissuasion: persuading not to do or believe something; talking someone out of a belief or an intended course of action [ant: persuasion]
- Opportune: appropriate, favorable, or suitable: an opportune phrase for the occasion.
- Convenience: anything that saves or simplifies work, adds to one's ease or comfort, etc., as an appliance, utensil, or the like.
- Whet: to sharpen (a knife, tool, etc.) by grinding or friction.
- Ratios and recognizing trick questions regarding graphs
- If the initial answer seems obvious, it probably warrants additional attention. For example, x^2 is larger than x^3 with the constraint that 5x fall between 0 and 3.
- Systems of equations
- Double-check answers close to other possible choices.
- Trig review
I've met my goal on the verbal (600, 85th percentile), but meeting the goal on the quantitative (750, 85th percentile) will take effort.
Radio Song
On KDVS 90.3 Tuesday, July 8, at 7:22 AM:
Steve Waddell's The Creole Bells' "La Talle des Ronce" from their 2008 (release date early August) album "Cajun and Creole Traditional Music" on the Arhoolie label.
Audio (~82 minutes in)
Hey-ya!
Steve Waddell's The Creole Bells' "La Talle des Ronce" from their 2008 (release date early August) album "Cajun and Creole Traditional Music" on the Arhoolie label.
Audio (~82 minutes in)
Hey-ya!
Tuesday, July 15, 2008
Symbol Table Compiled
Tonight I successfully compiled the bare-bones symbol table. The symbol table of a compiler maps high-level words (tokens) in the source language to internal symbols.
I thought I compiled a test harness using the STL map last night but in reality I used std::map. g++ reports cryptic compile conflicts between the downloaded STL and std::map that seem like a namespace conflict. If I have time I plan to investigate--right now std::map meets my modest needs.
One more RHCP song to close out the night: http://youtube.com/watch?v=yuFI5KSPAt4
I thought I compiled a test harness using the STL map last night but in reality I used std::map. g++ reports cryptic compile conflicts between the downloaded STL and std::map that seem like a namespace conflict. If I have time I plan to investigate--right now std::map meets my modest needs.
One more RHCP song to close out the night: http://youtube.com/watch?v=yuFI5KSPAt4
Waialua Root Beer

Image credit: Flickr
Waialua root beer represents the latest root beer tasting. I found the smooth vanilla reminding me of cream soda. The Waialua Soda Works company also produces a Vanilla Cream Soda, so perhaps the root beer represents a foreshadowing of that beverage.
Worth a taste; personal preference will dictate whether to try a second buy--I didn't find the creaminess attractive enough for a repeat.
Link: http://www.waialuasodaworks.com
We hope to review more traditional root beers (read: non-high fructose corn syrup-based root beers) in the future, maybe one every week or so.
Fly Away On My Cell Phone
The Zephyr Song, a song for a mild, late California afternoon: http://www.youtube.com/watch?v=SH8_x590Mo8
Monday, July 14, 2008
Compiler Writing
I have the BOOST and STL libraries working on my KUbuntu install. Laying the foundation. I had hoped to have the symbol table class finished for my compiler this evening, but it will have to wait until Tuesday evening.
I look like...
A professional stand-up comic told me Sunday that I look like Jim Breuer.
I've also been told I look like Brendan Fraser, Mark Hamill, and Christopher Reeves.
Who do you look like?
I've also been told I look like Brendan Fraser, Mark Hamill, and Christopher Reeves.
Who do you look like?
Friday, July 11, 2008
Radio Song

Listening to 90.9 KXPR during this morning's commute, and heard:
Bernhard Henrik Crusell's "Introduction & Variations on a Swedish Drinking Song," conducted by Yan Pascal Tortelier, and featuring soloist Emma Johnson on clarinet. The 1993 album "Weber: Clarinet Concerto No. 1" on the Asv Living Era label features the song. Link to a snippet of the song.
Order the above image on a shirt.
Thursday, July 10, 2008
Second Grad School Hurdle, or, There's a Light At the End of the Tunnel
It turns out my undergrad computer science GPA in the CSUS core course equivalents doesn't reach the magic number of 3.25 that's needed to enroll in the grad school program and take the core grad school courses. So, this fall and next spring, I plan to take CSc 137, "Computer Organization" and CSc 130, "Data Structures and Algorithm Analysis," respectively, to get there.
This bumps my targeted grad school enrollment date out to Fall 2009--I'll get there, and I'll be stronger for it.
I think I have all the bugs worked out of the enrollment process now, and am feeling confident about the plan going forward. Dr. Cui Zhang, CSUS graduate coordinator, has helped a lot with the questions I've had.
This bumps my targeted grad school enrollment date out to Fall 2009--I'll get there, and I'll be stronger for it.
I think I have all the bugs worked out of the enrollment process now, and am feeling confident about the plan going forward. Dr. Cui Zhang, CSUS graduate coordinator, has helped a lot with the questions I've had.
Bears
The range of emotions:
- Cozy bear
- Care bear
- Bubbly bear
- Happy bear
- Tired bear
- Cranky bear
- Grumpy bear
Tuesday, July 08, 2008
It's All About the Benjamins
As a graduate student, I can expect to pay $1,383.00 for up to six credits of class-work per semester.
As an Open University student, I can expect to pay $480 for one three-credit class ($160/unit).
However, I can only take one more class as an Open University student and expect to apply it to my graduate degree, as they cap the number of credits at six. Thankfully, CSc 201 represents a three-unit class.
As an Open University student, I can expect to pay $480 for one three-credit class ($160/unit).
However, I can only take one more class as an Open University student and expect to apply it to my graduate degree, as they cap the number of credits at six. Thankfully, CSc 201 represents a three-unit class.
Hiccup in Graduate Planning
I met with Dr. Cui Zhang at CSUS on Monday afternoon and together we dusted off my transcript from the University of Wisconsin-Eau Claire. Dr. Zhang informed me that the CSUS Computer Science graduate program requires students to take a course in Computer Organization (CSc 137 or equivalent)--one of the few classes I did not take during my undergraduate career. She encouraged me to continue preparations for the October 1st application deadline, with the expectation of admission as a conditionally classified student.
This evening, I discovered that CSUS offers CSc 137 this fall, but it conflicts with normal business hours: Dr. Faroughi teaches it every Tuesday/Thursday from 9:00 AM--1:00 PM (class from 9:00 AM--10:15 AM, then lab from 10:30 AM--1:00 PM). So, I'll have to discuss the possibility of accomodating this class with my employer.
The Los Rios Community College District offers an equivalent, transferable course, CISP 315, "Introduction to Computer Architecture and Design," but only in the spring.
Dr. Zhang recommended taking up to two core graduate-level classes this fall (she shared most students take two out of financial efficiency):
This evening, I discovered that CSUS offers CSc 137 this fall, but it conflicts with normal business hours: Dr. Faroughi teaches it every Tuesday/Thursday from 9:00 AM--1:00 PM (class from 9:00 AM--10:15 AM, then lab from 10:30 AM--1:00 PM). So, I'll have to discuss the possibility of accomodating this class with my employer.
The Los Rios Community College District offers an equivalent, transferable course, CISP 315, "Introduction to Computer Architecture and Design," but only in the spring.
Dr. Zhang recommended taking up to two core graduate-level classes this fall (she shared most students take two out of financial efficiency):
- CSc 201: "Programming Language Principles" (C. Zhang, M/W, 5:30--6:45 PM)
- CSc 204: "Data Models for Database Management Systems" (B. Mitchell, T/Th, 4:00--5:15 PM)
- CSc 205: "Computer Systems Structure" (B. Arad, T/Th, 5:30--6:45 PM)
- CSc 206: "Algorithms and Paradigms" (C. Wang, M/W, 4:00--5:15 PM)
- CSc 209: "Research Methodology" (C. Zhang, T, 7:00--7:50 PM)
csc204 and csc205 Waiver Tests
==============================
For those of you who wish to get the core course csc204 and/or
csc205 waived, there are once/semester waiver tests for you
scheduled each semester about one week before school starts.
For Fall 2008, the two tests will be given on Monday Aug. 25,
2008 at noon in RVR-2018. Please mark your calendar if you wish
to waive csc204 and/or csc205 and I'll see you on Aug.25 at noon.
Saturday, July 05, 2008
University Professor Web Pages
This evening I browsed through the personal web sites of full-time faculty at the California State University at Sacramento (CSUS) and the University of California at Davis (UC-Davis).
As a first impression, the personal faculty web sites at both campuses scared the hell out of me.
The winners of best web sites, in my opinion:
What I liked: professional picture, clean layouts, pictures of the instructor with students
A point of irony: the CSUS department's 2006-2007 assessment report lists "Communication skills and interpersonal skills" as an essential skill on page two.
A second point of irony: UC-Davis has six people (other than Dr. Staadt and Dr. Ma) whose stated interests involve computer graphics, animation, or visualization: 1, 2, 3, 4, 5, 6--yet their web sites remain woefully primitive, in my opinion.
The serious takeaway: It's all-too-easy to mock people's weaknesses, and I hope this attempt at humor comes across as just that--these people are probably all outstanding in their fields (no pun intended), great people, and great instructors. Yet, if faculty fail to communicate clearly using the most widely available medium available to them, how can we inspire students to do so? This isn't a new phenomenon--the CS faculty web pages of my alma-mater haven't improved that much since I graduated in 2000 (even the resident computer animation expert).
As a first impression, the personal faculty web sites at both campuses scared the hell out of me.
The winners of best web sites, in my opinion:
- CSUS: Scott Gordon (http://gaia.ecs.csus.edu/~gordonvs/). Not only does the man have a 5.0 rating at RateMyProfessors.com, but he has a picture of himself at Pixar with Sulley and Mike from Monsters, Inc.. Nice.
- UC-Davis Computer Science Department: Dr. Kwan-Liu Ma's shining star atop the rubbage heap: (http://www.cs.ucdavis.edu/~ma/)
- UC-Davis Computer Engineering Department: Dr. Richard A. Kiehl's inspiration: http://www.ece.ucdavis.edu/~rakiehl/. Professional picture, great layout.
- Dr. "I'm above you in every way" Chong
- Please don't hurt me (from the UC-Davis Computer Engineering department)
- Dr. Charles "You're going to like the way you look; I guarantee it." Hunt (Men's Wearhouse)
- Dr. Demet "80's 4ever" Askoy (she has more current pictures--why not use them?)
- Dr. Matthew "bed hair" Bishop
- Dr. Bertram "don't make me use that giant laser-dish behind me" Ludäscher
- Dr. Phillip "don't get me started" Rogaway
- Dr. Zhendong "No, I expect you to die, Mr. Bond" Su
- Dr. Zhi Ding, http://www.ece.ucdavis.edu/~zding/
- Dr. Soheil Ghiasi, http://www.ece.ucdavis.edu/~soheil/
- Dr. Brian Kolner, http://www.leorg.ucdavis.edu/
- Dr. John Owens, http://www.ece.ucdavis.edu/~jowens/
- Dr. Qing Zhao, http://www.ece.ucdavis.edu/~qzhao/
- Dr. Nina Amenta, http://www.cs.ucdavis.edu/~amenta/
- Dr. Hao Chen, http://www.cs.ucdavis.edu/~hchen/
- Dr. Biswanath MukHerjee, http://networks.cs.ucdavis.edu/~mukherje/
- Dr. Oliver Staadt, http://graphics.cs.ucdavis.edu/~staadt/
- Dr. Du Zhang, http://gaia.ecs.csus.edu/~zhangd/
- Dr. Prem Devanbu, http://www.cs.ucdavis.edu/~devanbu/
- Dr. Matthew Farrens, http://american.cs.ucdavis.edu/ArchLabPersonnel/Farrens/homepage.html
What I liked: professional picture, clean layouts, pictures of the instructor with students
A point of irony: the CSUS department's 2006-2007 assessment report lists "Communication skills and interpersonal skills" as an essential skill on page two.
A second point of irony: UC-Davis has six people (other than Dr. Staadt and Dr. Ma) whose stated interests involve computer graphics, animation, or visualization: 1, 2, 3, 4, 5, 6--yet their web sites remain woefully primitive, in my opinion.
The serious takeaway: It's all-too-easy to mock people's weaknesses, and I hope this attempt at humor comes across as just that--these people are probably all outstanding in their fields (no pun intended), great people, and great instructors. Yet, if faculty fail to communicate clearly using the most widely available medium available to them, how can we inspire students to do so? This isn't a new phenomenon--the CS faculty web pages of my alma-mater haven't improved that much since I graduated in 2000 (even the resident computer animation expert).
CSUS Grad Courses Fall 2008
As a student taking graduate-level classes through the CSUS Open University program, I have these class options to choose from for Fall 2008 (assuming I can waive the prerequisite CSC 205 course--which requires fully classified status to take):
Two other classes that seem interesting:
PickAProf.com rocks--it lists the grades given by a prof. It doesn't seem as popular though, in terms of reviews, even though it started in 2000.
- CSC 239 (Chang W.). Advanced Operating Systems Principles and Design. (AVAILABLE FALL 2008; PRE: CSC-205)
- CSC 242 (Arad B.). Computer-Aided Systems Design and Verification. (AVAILABLE FALL 2008; PRE: CSC-205)
- CSC 255 (Ghansah I.). Computer Networks. (AVAILABLE FALL 2008; PRE: CSC-138)
- CSC 273 (Arad B.). Hierarchical Digital Design Methodology. (AVAILABLE FALL 2008; PRE: CSC-205)
- CSC 201. Programming Language Principles.
- CSC 204. Data Models for Database Management Systems.
- CSC 205. Computer Systems Structure.
- CSC 206. Algorithms and Paradigms
- CSC 209. Research Methodology
- CSC 233. Advanced Software Engineering Project Management.
- CSC 234. Software Verification and Validation.
- CSC 235. Software Architecture.
- CSC 252. Cryptography Theory and Practice.
- CSC 254. Network Security.
- CSC 280. Advanced Computer Architecture.
Two other classes that seem interesting:
- CSC 133. Computer Graphics
- CSC 165. Computer Game Architecture
PickAProf.com rocks--it lists the grades given by a prof. It doesn't seem as popular though, in terms of reviews, even though it started in 2000.
Teacher Ratings
How awful (I laughed, I cried):
"My will to study computer science has been completely destroyed."This evening I'm reviewing CSUS prof ratings and deciding which class to take for the fall semester--this comment popped out.
GRE
Gearing up to take the GRE before the October 1st (88 days) Sac State application deadline so I can get in for the Spring 2009 semester. Hopefully by 2011 I'll have my Masters degree.
Amby provides a slew of links: http://amby.com/GRE/.
Steps to reach my goal:
My thought at this point is: test early, test often to get a sense of where I'm at.
Amby provides a slew of links: http://amby.com/GRE/.
Steps to reach my goal:
- Meet with CSUS department representative and discuss whether I meet all outstanding requirements
- Achieve GRE scores of:
600 on the Verbal Reasoning (85th percentile)
750 on the Quantitative Reasoning (85th percentile)
5 on the Analytical Writing Score (96th percentile) - Complete and submit paperwork
My thought at this point is: test early, test often to get a sense of where I'm at.
Hikes
The attendant at Smog Busters shared several locations for hikes involving waterfalls in the Northern California area:
I asked him if he had hiked the Stevens Trail and he said no.
The Waterfalls West web site looks like a ripe place to host a wiki (ala http://wikitravel.com).
- Bassi Falls (Pollock Pines, El Dorado National Forest, El Dorado County)
- Feather Falls (Oroville, Feather Falls Scenic Area, Plumas National Forest, Butte County)--"Outside of Yosemite, this is maybe the best waterfall in California."
I asked him if he had hiked the Stevens Trail and he said no.
The Waterfalls West web site looks like a ripe place to host a wiki (ala http://wikitravel.com).
2008 Sacramento Japanese Film Festival
We missed the 2008 Sacramento Japanese Film Festival event due to pressure from finals week.
The list of movies screened that I hope to view at home in the future:
We both enjoyed the 2007 Sacramento Japanese Film Festival event
Article in the Sacramento Bee: http://www.sacbee.com/121/story/939671.html
The list of movies screened that I hope to view at home in the future:
We both enjoyed the 2007 Sacramento Japanese Film Festival event
Article in the Sacramento Bee: http://www.sacbee.com/121/story/939671.html
Friday, July 04, 2008
Radio Songs
Listening to KDVS 90.3 on my morning commute on Thursday, I heard this song at 7:30 AM:
Sri Lanka-based Fonseka's "Kapirigna" on the 1995 compilation album "The Secret Museum of Mankind, Volume One," on the Yazoo label. You can hear it around the 90-minute mark on the KDVS "Swamp Bass" stream here: http://www.kdvs.org/listen/m3u/show_id/446/date/2008-07-03. Reminds me of the Cajun/Zydeco exuberance.
Listening to KYDS 91.5 this evening I heard Kingston, NY-based Coheed and Cambria's "Delirium Trigger" from their 2002 album "The Second Stage Turbine Blade" on the Equal Vision and Defiance labels. Video.
Sri Lanka-based Fonseka's "Kapirigna" on the 1995 compilation album "The Secret Museum of Mankind, Volume One," on the Yazoo label. You can hear it around the 90-minute mark on the KDVS "Swamp Bass" stream here: http://www.kdvs.org/listen/m3u/show_id/446/date/2008-07-03. Reminds me of the Cajun/Zydeco exuberance.
Listening to KYDS 91.5 this evening I heard Kingston, NY-based Coheed and Cambria's "Delirium Trigger" from their 2002 album "The Second Stage Turbine Blade" on the Equal Vision and Defiance labels. Video.
Sunday, June 29, 2008
Supi Udupi
After the movie, we visited Udupi Indian Restaurant on Sunrise: http://www.vegguide.org/entry/3814. I ordered the deluxe dinner, which had a smattering of everything. Minimalistic interior, but outstanding staff and a wonderful feast.
Flight of the Red Balloon
I enjoyed the long takes of this film--some as long as eight minutes. All dialogue's improvised. So much of the movie takes place within Suzanne's (Juliette Binoche) apartment that by the end I felt very much at home there--it's a cozy, bohemian Parisian loft, with an abundance of books and scattered items. When Simon went to "have a go" on his Playstation, I wanted to know what game he played. The poster on the back of the door advertised "La Ballade de la Mister Punch", a tribute to the Punch and Judy puppet show. The movie seems as though it's from Song Fang's perspective--unjudging, attentive, thoughtful, cozy. Song adapts and becomes the calm in the middle of deteriorating relationships--Marc, the downstairs tenant, who hasn't paid rent in over a year; and Pierre, Simon and Louise's father who has abandoned his family to live in Montreal. The ending comes abruptly, amidst a teacher discussion in the Musée d’Orsay over Félix Vallotton’s 1899 painting of a child chasing a red ball, "Le Ballon." The movie fades away with the song "Tchin Tchin" (French for "cheers") by singer Camille. The movie also seems like it might document the view from Simon's perspective--adrift as he floats between school, home, the cafe where he plays pinball, and piano lessons. The home becomes a womb, but without Suzanne, it also seems somewhat empty. Suzanne comes and goes freely, in her words, "making everyone happy." The end of the film seems to document how much Simon's needs aren't getting met--Louise chooses to stay in Brussels to care for her great-grandfather, leaving Simon visibly upset (sleeping with his bear). Song, as the nanny, checks in to let him know she cares, but respects his grieving and lets him rest. Suzanne, slowly but successfully restoring order to the chaos left by Pierre's departure two years earlier, struggles to keep the threads of her family together. As I mentioned, the ending comes abruptly, leaving me wanting to see more--what happens next? The chemistry seems right for thsi family though--I suspect they turn out all right, between Suzanne's passion and Song's presence.
Even though we ate before watching this movie, I felt incredibly hungry watching it. Watching Song learn to make crepes, or Suzanne offer a biscuit, or Marc prepare vegetables, or a poured glass of wine--I couldn't wait to eat.
From left to right: ? (Chinese professor), Song Fang (Song), Louise Margolin (Louise), Juliette Binoche (Suzanne), Simon Iteanu (Simon), and Hippolyte Girardot (Marc).

New York Times review.
Village Voice review.
Below: I guess this is how they did it. I imagined elaborate wind machines, fishing line, and so forth.
Even though we ate before watching this movie, I felt incredibly hungry watching it. Watching Song learn to make crepes, or Suzanne offer a biscuit, or Marc prepare vegetables, or a poured glass of wine--I couldn't wait to eat.
From left to right: ? (Chinese professor), Song Fang (Song), Louise Margolin (Louise), Juliette Binoche (Suzanne), Simon Iteanu (Simon), and Hippolyte Girardot (Marc).

New York Times review.
Village Voice review.
Below: I guess this is how they did it. I imagined elaborate wind machines, fishing line, and so forth.
Thursday, June 26, 2008
Fire
The sun looked like this on the way home:

(note: not my pic, and not a pic of Sacramento)
Living in California's Central Valley means smoke from fires flows down into the "bowl" where we live from the foothills to the east, west, and north.
A few years ago, the fires produced enough ash that it looked like a light snow dusting for 24 hours.
A co-worker told me yesterday that about eight years ago, she saw the wind creating billows of smoke.
I can't smell the smoke unless I drive with the window down.
Nothing threatening or scary--a relatively minor side-effect of living in one of the safest places on earth (no hurricanes, no tsunamis, no earthquakes, minor chance of floods, no tornadoes, no snowfalls, and so forth).

(note: not my pic, and not a pic of Sacramento)
Living in California's Central Valley means smoke from fires flows down into the "bowl" where we live from the foothills to the east, west, and north.
A few years ago, the fires produced enough ash that it looked like a light snow dusting for 24 hours.
A co-worker told me yesterday that about eight years ago, she saw the wind creating billows of smoke.
I can't smell the smoke unless I drive with the window down.
Nothing threatening or scary--a relatively minor side-effect of living in one of the safest places on earth (no hurricanes, no tsunamis, no earthquakes, minor chance of floods, no tornadoes, no snowfalls, and so forth).
Sunday, June 22, 2008
Radio Songs
Heard:
Franklin, Tennessee-based Paramore's "Misery Business" from their 2007 album "Riot!" on the Fueled By Ramen label.I also have a new radio station that I'm listening to in tandem with KYDS (91.5): KDVS, 90.3, out of Davis, CA.
Garry Schyman's "Praan" from the "Where the Hell is Matt?" video: http://www.vimeo.com/1211060
Friday, June 13, 2008
Picnics
Local parks:
- Arden Park (La Sierra Blvd)
- McKinley Park (Alhambra & H)
- William Land Park (Land Park Dr & Freeport Blvd)
- Maddox Park (Thor & Mission)
- Howe Park (Howe & Cottage)
- River Park (Carlson, across from Sac State)
- Arden Bar at the American River (End of Arden Way, East of Fair Oaks Blvd)
Sunday, June 08, 2008
Radio Songs
El Paso, TX-based Sparta's "Collapse" from their 2002 album "Wiretap Scars" on the Geffen Records label.
Lubbock, TX-native Joe Ely's "Slow You Down" from his 1993 album "Love and Danger" on the MCA Records label. From the May 31 recording of A Prairie Home Companion in Las Cruces, NM.
Lubbock, TX-native Joe Ely's "Slow You Down" from his 1993 album "Love and Danger" on the MCA Records label. From the May 31 recording of A Prairie Home Companion in Las Cruces, NM.
Homework, Sections 5.1 through 5.3
My solutions to the 2nd edition Dragon Book's Exercises for chapter five:
5.1.1 a, b, c: Investigating GraphViz as a solution to presenting trees
5.1.2: Extend the SDD of Fig. 5.4 to handle expressions as in Fig. 5.1:
5.2.1: What are all the topological sorts for the dependency graph of Fig. 5.7?
5.2.3: Suppose that we have a production A -> BCD. Each of the four nonterminals A, B, C, and D have two attributes: s is a synthesized attribute, and i is an inherited attribute. For each of the sets of rules below, tell whether (1) the rules are consistent with an S-attributed definition (2) the rules are consistent with an L-attributed definition, and (3) whether the rules are consistent with any evaluation order at all?
a) A.s = B.i + C.s
5.3.1: Below is a grammar for expressions involving operator + and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point.
5.1.1 a, b, c: Investigating GraphViz as a solution to presenting trees
5.1.2: Extend the SDD of Fig. 5.4 to handle expressions as in Fig. 5.1:
- L -> E N
- L.val = E.syn
- E -> F E'
- E.syn = E'.syn
- E'.inh = F.val
- E' -> + T Esubone'
- Esubone'.inh = E'.inh + T.syn
- E'.syn = Esubone'.syn
- T -> F T'
- T'.inh = F.val
- T.syn = T'.syn
- T' -> * F Tsubone'
- Tsubone'.inh = T'.inh * F.val
- T'.syn = Tsubone'.syn
- T' -> epsilon
- T'.syn = T'.inh
- E' -> epsilon
- E'.syn = E'.inh
- F -> digit
- F.val = digit.lexval
- F -> ( E )
- F.val = E.syn
- E -> T
- E.syn = T.syn
5.2.1: What are all the topological sorts for the dependency graph of Fig. 5.7?
- 1, 2, 3, 4, 5, 6, 7, 8, 9
- 1, 2, 3, 5, 4, 6, 7, 8, 9
- 1, 2, 4, 3, 5, 6, 7, 8, 9
- 1, 3, 2, 4, 5, 6, 7, 8, 9
- 1, 3, 2, 5, 4, 6, 7, 8, 9
- 1, 3, 5, 2, 4, 6, 7, 8, 9
- 2, 1, 3, 4, 5, 6, 7, 8, 9
- 2, 1, 3, 5, 4, 6, 7, 8, 9
- 2, 1, 4, 3, 5, 6, 7, 8, 9
- 2, 4, 1, 3, 5, 6, 7, 8, 9
5.2.3: Suppose that we have a production A -> BCD. Each of the four nonterminals A, B, C, and D have two attributes: s is a synthesized attribute, and i is an inherited attribute. For each of the sets of rules below, tell whether (1) the rules are consistent with an S-attributed definition (2) the rules are consistent with an L-attributed definition, and (3) whether the rules are consistent with any evaluation order at all?
a) A.s = B.i + C.s
- No--contains inherited attribute
- Yes--"From above or from the left"
- Yes--L-attributed so no cycles
- No--contains inherited attributes
- Yes--"From above or from the left"
- Yes--L-attributed so no cycles
- Yes--all attributes synthesized
- Yes--all attributes synthesized
- Yes--S- and L-attributed, so no cycles
- A.s = D.i
- B.i = A.s + C.s
- C.i = B.s
- D.i = B.i + C.i
- No--contains inherited attributes
- No--B.i uses A.s, which depends on D.i, which depends on B.i (cycle)
- No--Cycle implies no topological sorts (evaluation orders) using the rules
- S -> L . L | L
- L -> L B | B
- B -> 0 | 1
- S -> L . Lsubone
- L.inh = 0
- Lsubone.inh = -1
- S.val = L.syn + Lsubone.syn
- S -> L
- L.inh = 0
- S.val = L.syn
- L -> Lsubone B
- Lsubone.inh = L.inh + 1
- B.inh = L.inh
- L.syn = Lsubone.syn * B.syn
- L -> B
- L.syn = B.syn * 2^L.inh
- B -> 0 | 1
- B.syn = digit.lexval
- S -> L . Lsubone
- S.val = L.lhs + Lsubone.rhs
- S -> L
- S.val = L.lhs
- L -> Lsubone B
- L.lhs = Lsubone.lhs + (2^L.lhs_exponent * B.val)
- L.rhs = Lsubone.rhs + (2^L.rhs_exponent * B.val)
- L.lhs_exponent = Lsubone.lhs_exponent + 1
- L.rhs_exponent = Lsubone.rhs_exponent - 1
- L -> B
- L.lhs = 2^L.lhs_exponent * B.val
- L.rhs = 2^L.rhs_exponent * B.val
- L.lhs_exponent = 0
- L.rhs_exponent = -1
- B -> 0 | 1
- B.val = digit.lexval
5.3.1: Below is a grammar for expressions involving operator + and integer or floating-point operands. Floating-point numbers are distinguished by having a decimal point.
- E -> E + T | T
- T -> num . num | num
- E -> Esubone + T
- E.type = if (E.type == float || T.type == float) { E.type = float } else { E.type = integer }
- E -> T
- E.type = T.type
- T -> numsubone . numsubtwo
- T.type = float
- T -> num
- T.type = integer
- E -> Esubone + T
- E.val = Esubone.val || ',' || T.val || '+'
- E -> T
- E.val = T.val
- T -> numsubone . numsubtwo
- T.val = numsubone.val || '.' || numsubtwo.val
- T -> num
- T.val = intToFloat(num.val)
- S -> E
- E.iop = nil
- S.equation = E.equation
- E -> Esubone + T
- Esubone.iop = E.iop
- T.iop = E.iop
- E.equation = Esubone.equation || '+' || T.equation
- E.sop = '+'
- E -> T
- T.iop = E.iop
- E.equation = T.equation
- E.sop = T.sop
- T -> Tsubone * F
- Tsubone.iop = '*'
- F.iop = '*'
- T.equation = Tsubone.equation || '*' || F.equation
- T.sop = '*'
- T -> F
- F.iop = T.iop
- T.equation = F.equation
- T.sop = F.sop
- F -> char
- F.equation = char.lexval
- F.sop = nil
- F -> ( E )
- if (F.iop == '*' && E.sop == '+') { F.equation = '(' || E.equation || ')' } else { F.equation = E.equation }
- F.sop = nil
- S -> E
- S.d = E.d
- E -> T
- E.d = T.d
- E.val = T.val
- T -> F
- T.d = F.d
- T.val = F.val
- T -> Tsubone * F
- T.d = '(' || Tsubone.val || ") * (" || F.d || ") + (" || Tsubone.d || ") * (" || F.val || ')'
- T.val = Tsubone.val || '*' || F.val
- E -> Esubone + T
- E.d = '(' || Esubone.d || ") + (" || T.d || ')'
- E.val = Esubone.val || '+' || T.val
- F -> ( E )
- F.d = E.d
- F.val = '(' || E.val || ')'
- F -> char
- F.d = 1
- F.val = char.lexval
- F -> constant
- F.d = 0
- F.val = constant.lexval
Monday, June 02, 2008
Sunday, June 01, 2008
Turning the Wrong Way
I thought the nut on the p-trap under our bathroom sink turned lefty-loosey but it turns out it turns righty-loosey. How easy it is to turn when one goes in the right direction.
In other news, I've determined that the ceiling fans in our duplex (A Hunter model #21416 and a KDK model #D13YU) lack a hole made for oiling. The new Hunter fan makes a rhythmic ticking noise after about a day or so of high-speed operation, while the older KDK fan makes the same rhythmic ticking noise more consistently. My first thought--oil the bearings, per: http://www.ceiling-fans-n-more.com/ceiling-fan-oiling.php. Unfortunately, the manufacturer did not intend for customers to oil these fans, so I'm going to need some creativity to do so. It might also be a balancing issue...so who knows if I'll have time to figure it out in the coming weeks.
In other news, I've determined that the ceiling fans in our duplex (A Hunter model #21416 and a KDK model #D13YU) lack a hole made for oiling. The new Hunter fan makes a rhythmic ticking noise after about a day or so of high-speed operation, while the older KDK fan makes the same rhythmic ticking noise more consistently. My first thought--oil the bearings, per: http://www.ceiling-fans-n-more.com/ceiling-fan-oiling.php. Unfortunately, the manufacturer did not intend for customers to oil these fans, so I'm going to need some creativity to do so. It might also be a balancing issue...so who knows if I'll have time to figure it out in the coming weeks.
Saturday, May 31, 2008
Myopia, Astigmatism

General image depicting normal eye and abnormal curvature of an astigmatic eye
Results of my test on Wednesday from the CostCo Citrus Heights Pharmacy:
SRX (Spectacle Prescription)
O.D. (Oculus Dexter, my right eye):
- SPH: +0.25
- CYL: -1.00
- AXIS: 0.90
- ADD: n/a
- PRISM/BASE: n/a
- SPH: -0.50
- CYL: DS
- AXIS: n/a
- ADD: n/a
- PRISM/BASE: n/a
SPH means sphere--a positive number represents farsightedness and a negative number represents nearsightedness. Why? In a farsighted eye, the curve of the cornea is flatter than the curve of a normal cornea, so the correction involves "adding" to the farsighted eye to get it back to normal. In a nearsighted eye, the curve of the cornea extends farther than the curve of the normal cornea, so the correction involves "subtracting" from that curve to bring it back to a normal curvature. The point being to get the cornea back to focusing light on the retina like a normally curved cornea does. The larger the number (positive or negative) the larger the deviation from the normal curvature of the cornea, and the blurrier the vision.
CYL means cylinder, and represents the amount of power needed to correct a cornea with astigmatism (a cornea that's oval-shaped, which causes blurring (see the picture at the top), as opposed to a normal cornea that's symmetrically round like a basketball)--DS means no astigmatism. In my right eye, I need one dioptre of focusing power correction.
AXIS, for astigmatic eyes, represents a line passing through the middle of the oval-shaped cornea--in my case through the longer side. In my right eye, I need minus-one dioptre of correction along the 0-/180-degree axis (see the Wikipedia article for an explanation of why it's not "090" like the prescription says)--which means the longer side of the oval-shaped cornea in my cases lies on an imaginary line drawn between my two eyes (the 9 o'clock/3 o'clock positions). I believe reducing the focusing power of the longer part of the oval-shaped cornea helps the cornea focus in a more spherical manner.
20/20 vision means the ability to read a character 8.84 mm high at a distance of 20 feet.
Fushigi Yuugi

Dawn and I made a run through the 52 episode series over the past two months. Thoughts:
- Japanese voices > English voices
- After removing the intro song (~1:30m?), intro story recap (1m?), and outro (1:30m?), the shows seemed to average ~20 minutes.
- 52 episodes of watching Tamahome and Miaka push apart and come together: Tamahome rejects Miaka's declaration of love; Tamahome swallows Kotuko; Miaka can't become spoiled in her quest for the shinzaho; Nakago's assault of Miaka; Tamahome decides to cut off relations to lessen the pain later; Tamahome runs off when he learns he's a character in a book; Tamahome returns to the book; finally, reunited--whew.
- I appreciated Miaka's use of empathy to save Mitsukake's restless lover from the sickness demon--amazing to see it played out in an anime.
- Always, always, always, kill the bad guys when they're down and out. It cost them the life of Chiriko and the first shinzaho.
- "Here, I don't know how this item will help you, but I'm sure it will advance the plot in some unknown way in the near future." For example, Hotohori's holy sword.
- The show didn't pull many punches with taboos regarding sexuality, abuse, and violence.
- Tokyo really sucks at giant monster defense. It looked like they had planes in the air to dispatch nuclear warheads, but the show left that thought unresolved.
- Amiboshi's story arc casts an anti-war sentiment to the show, while Miaka's story arc casts a proactive peace through strength sentiment to the show. Sentiment winner in my opinion: Miaka; Amiboshi retreats into memory-less bliss while Miaka saves the day.
- Characters I wish the writers had included more in the action: Mitsukake, Chiriko--these two barely get screen time. It approaches parody watching Mitsukake continually fail to save those close to him, even though he can heal people to complete health "once per day." Chiriko, boy genius and mystical musician, wanders around with the team until he gets possessed--the writers allow him the glory of stabbing himself to death with a blunt top. *sigh*
- The handling of homosexuality in the show surprised me--Nuriko, after the shock wears off, becomes very endearing in the story, as she takes Miaka under her wing. Tatsuke's "I don't like girls" stance doesn't resonate so much, even though he sacrifices everything in hotheaded defense of Miaka.
Worth a watch, in my opinion.
Friday, May 30, 2008
Flea Combing
Sunday, May 25, 2008
Happy Towel Day

In memory of Douglas Adams: http://en.wikipedia.org/wiki/Towel_Day
I want to hang one of the above near my work desk. Link: http://www.royal-plus.de/dna/indexE.html
UPDATE:
Email from the artist, 2024-10-05: "We are unfortunately sold out. And there will be no new production of the towels. We will close the shop soon. So long, and thanks for all the fish, Kind regards, DON'T PANIC Towel Shop Uli Schuster"
I had emailed in August 2020 to inquire about ordering one, but unfortunately, "Unfortunately the US have stopped the parcel traffic from oversea, due Corona. So, I keep it on hold, and will let you know when shipping will be possible again. " Then I forgot. So only myself to blame! Will see if one becomes available second-hand.
CSUS Tea Ceremonies
We missed the last one due to finals week, but hopefully they'll have another one in the near future. Link: http://library.csus.edu/tearoom/. From the CSUS event release:
Japanese tea ceremony planned at Sacramento State
The next tea ceremonies for Sacramento State’s Sokiku Nakatani Tea Room and Garden are 10:30 a.m., 1 p.m. and 2:30 p.m., Wednesday, May 21; and 10 a.m. and 1 p.m., Thursday, May 22.
The Sokiku Nakatani Tea Room and Garden is located on the lower level of the University Library
Sacramento State is one of only a few campuses in the United States to have a tea room that allows students, faculty and members of the community the opportunity to experience the art of tea through traditional Japanese tea ceremonies. The Sokiku Nakatani Tea Room and Garden was made possible by a gift from an anonymous donor in honor of his mother.
“The practice of tea originated in China, was introduced to Japan in the 12th century by Zen monks and became a spiritual and aesthetic discipline that has had a profound impact on Japanese civilization,” says Sally Hitchcock, University Library outreach coordinator.
She says tea was used by the monks as a mild stimulant for clearing the mind during meditation and was valued for its medicinal qualities, then enjoyed by nobility for lavish functions. Eventually tea gatherings became common among all classes of people and thus the creation of rooms designed especially for such gatherings. Today the practice of tea is still a way for people to come together to find calmness and peace of mind.
“Since the room was dedicated in June 2007, we have held more than 20 tea ceremonies and have enjoyed hosting every age group from kindergarteners to retirees,” Hitchcock says.
For more information on tea room ceremonies, contact Hitchcock at (916) 278-5954. For media assistance, contact Sacramento State’s Public Affairs office at (916) 278-6156.
Saturday, May 17, 2008
L-Attributed, Top-Down-Parsable SDD Implementation of the McNaughton-Yamada-Thompson Algorithm
My solution to the 2nd edition Dragon Book's Exercise 5.2.6:
Implement the McNaughton-Yamada-Thompson algorithm, which converts a regular expression into a nondeterministic finite automaton (NFA), by an L-attributed SDD on a top-down parsable grammar. Assume that there is a token char representing any character, and that char.lexval is the character it represents. You may also assume the existence of a function new() that returns a new state, that is, a state never before returned by this function. Use any convenient notation to specify the transitions of the NFA.
Notes:
S -> E
Implement the McNaughton-Yamada-Thompson algorithm, which converts a regular expression into a nondeterministic finite automaton (NFA), by an L-attributed SDD on a top-down parsable grammar. Assume that there is a token char representing any character, and that char.lexval is the character it represents. You may also assume the existence of a function new() that returns a new state, that is, a state never before returned by this function. Use any convenient notation to specify the transitions of the NFA.
Notes:
- I use the characters '{' and '}' to delimit rules, and the rules end up taking the form "{ state-x -> symbol -> state-y } ... { ... }".
- The symbol "||" means concatenation.
- Concatenation ( T -> F Tsub1 ) represented a bit of confusion for me, since it "deletes" state Tsub1.Start from the automaton (the exercise doesn't allow for deletion). McNaughton-Yamada-Thompson write, "The accepting state of N(s) and the start state of N(t) are merged into a single state, with all the transitions in or out of either state."
My initial attempt, setting F.EndTransitions = F.EndTransitions || Tsub1.StartTransitions seems reasonable. Since state Tsub1.Start continues to exist, references to it in Tsub1.StartTransitions, Tsub1.InnerTransitions, or Tsub1.EndTransitions do not require modification.
Everything works because from F.End the automaton may remain in F, or transition to Tsub1. Once the automaton transitions to Tsub1, however, it never returns--no references in Tsub1 point to states in F. In practical terms, this means the automaton produced contains one extra state Tsub1.Start for every concatenation in the original regular expression. - Adding epsilon transitions to Start or End states requires retaining the existing StartTransitions or EndTransitions, respectively.
- A PDF of this solution produced via LaTeX can be found here.
S -> E
- S.Start = E.Start
- S.End = E.End
- S.StartTransitions = E.StartTransitions
- S.EndTransitions = E.EndTransitions
- S.InnerTransitions = E.InnerTransitions
- E.Start = T.Start
- E.End = T.End
- E.StartTransitions = T.StartTransitions
- E.EndTransitions = T.EndTransitions
- E.InnerTransitions = T.InnerTransitions
- E.Start = new()
- E.End = new()
- E.StartTransitions = "{ " || E.Start || " -> epsilon -> " || T.Start || " } { " || E.Start || " -> epsilon -> " || Esub1.Start || " }"
- E.EndTransitions = Nil
- T.EndTransitions = T.EndTransitions || "{ " || T.End || " -> epsilon -> " || E.End || " }
- Esub1.EndTransitions = Esub1.EndTransitions || "{ " || Esub1.End || " -> epsilon -> " || E.End || " }
- E.InnerTransitions = T.StartTransitions || T.InnerTransitions || T.EndTransitions || Esub1.StartTransitions || Esub1.InnerTransitions || Esub1.EndTransitions
- T.Start = F.Start
- T.End = F.End
- T.StartTransitions = F.StartTransitions
- T.EndTransitions = F.EndTransitions
- T.InnerTransitions = F.InnerTransitions
- T.Start = F.Start
- T.End = Tsub1.End
- T.StartTransitions = F.StartTransitions
- T.EndTransitions = Tsub1.EndTransitions
- F.EndTransitions = F.EndTransitions || Tsub1.StartTransitions
- T.InnerTransitions = F.InnerTransitions || F.EndTransitions || Tsub1.InnerTransitions
- F.Start = G.Start
- F.End = G.End
- F.StartTransitions = G.StartTransitions
- F.EndTransitions = G.EndTransitions
- F.InnerTransitions = .InnerTransitions
- F.Start = new()
- F.End = Fsub1.End
- F.StartTransitions = "{ " || F.Start || " -> epsilon -> " || G.Start || " } { " || F.Start || " -> epsilon -> " || Fsub1.Start || " }"
- F.EndTransitions = Fsub1.EndTransitions
- G.EndTransitions = G.EndTransitions || "{ " || G.End || " -> epsilon -> " || G.Start || " } { " || G.End || " -> epsilon -> " || Fsub1.Start || " }"
- F.InnerTransitions = G.StartTransitions || G.InnerTransitions || G.EndTransitions || Fsub1.StartTransitions || Fsub1.InnerTransitions
- G.Start = E.Start
- G.End = E.End
- G.StartTransitions = E.StartTransitions
- G.EndTransitions = E.EndTransitions
- G.InnerTransitions = E.InnerTransitions
- G.Start = Nil
- G.End = Nil
- G.StartTransitions = Nil
- G.EndTransitions = Nil
- G.InnerTransitions = Nil
- G.Start = new()
- G.End = new()
- G.StartTransitions = "{ " || G.Start || " -> " || char.lexval || " -> " || G.End || " }"
- G.EndTransitions = Nil
- G.InnerTransitions = Nil
Thursday, May 15, 2008
Upload Complete!!!

Laughed uncontrollably as I watched Jeff Goldblum in the movie Independence Day upload a virus into the alien mother ship's host--Jeff's PowerBook displays "Negotiating With Host", then "Online With Host" followed by the Apple beep, followed by tappity-tappity as he enters about ten lines of code in two seconds, then "Uploading Virus", then a cut to a cent-com operator reporting, "Sir, he's Uploading the Virus", then the cent-com commander reporting, "Eagle One, The Package Is Being Delivered", then cut back to Jeff's PowerBook reporting "Uploading...Upload Complete!!!", and finally Jeff turning to Will Smith and saying, "The Virus Is In."
High camp.
Video: http://youtube.com/watch?v=LQ2ILkiCORo
Monday, May 12, 2008
Saturday, May 10, 2008
Our Popular Restaurants
A list:
- Sunflower Natural Food Restaurant (Vegetarian/Vegan)
- Lido's (American)
- Shar-E Punjab (Indian)
- Opa-Opa (Greek)
- Addis Ababa (Ethiopian)
- Thai Cottage (umm...)
- Danielle's Creperie (French)
- Fox and Goose (UK)
- Hamburger Mary's (American)
- Udupi Cafe (India)
- Zelda's Gourmet Pizza (American)
- La Boheme (French)
- Carmelita's (Mexican-American)
- Crepe Escape (French)
- Rubicon Brewery (American)
- Jack's Urban Eats (American)
- Scott's Seafoood and Steaks (American)
- Silver Sake
- Pangaea Cafe (next to Vic's Ice Cream)
UPDATE, 2011-07-21:
Radio Songs
Courtesy SomaFM.com:
Brooklyn-based Pete and J's "Sweet Cecilia" from their album "Dressed For Conversation", available online. This song reminds me of Simon and Garfunkle.
Austin, Texas-based Voxtrot's "Missing Pieces" from their 2005 EP "Raised by Wolves" on the Cult Hero Records label.
San Francisco-based Finest Dearest's "Serious" from their EP "Pacemaker" available online.
Melbourne, Australia-based Augie March's "One Crowded Hour" from their 2006 album "Moo, You Bloody Choir" on the Sony BMG Australia label.
Brooklyn-based Pete and J's "Sweet Cecilia" from their album "Dressed For Conversation", available online. This song reminds me of Simon and Garfunkle.
Austin, Texas-based Voxtrot's "Missing Pieces" from their 2005 EP "Raised by Wolves" on the Cult Hero Records label.
San Francisco-based Finest Dearest's "Serious" from their EP "Pacemaker" available online.
Melbourne, Australia-based Augie March's "One Crowded Hour" from their 2006 album "Moo, You Bloody Choir" on the Sony BMG Australia label.
Friday, May 09, 2008
Wednesday, May 07, 2008
Better World Club
I'm a member of one of AAA's most environmentally aware clubs, the Northern and Central California Automobile Club (the CSAA, not named NCAA for obvious reasons).
For most of the same services, including towing, rental discounts, and maps-on-demand, the Better World Club also support mass-transit and the Clean Air act.
I haven't switched yet, but they have successfully planted the seed of the idea.
For most of the same services, including towing, rental discounts, and maps-on-demand, the Better World Club also support mass-transit and the Clean Air act.
I haven't switched yet, but they have successfully planted the seed of the idea.
Subscribe to:
Posts (Atom)


