Friday, September 26, 2008
Thursday, September 18, 2008
Radio Song
Kingston, New York-based Coheed And Cambria's "A Favor House Atlantic" from their 2003 album "In Keeping Secrets of Silent Earth: 3" on the Columbia and Equal Vision labels. Video.
Wednesday, September 17, 2008
Guerrila Knitting
I had no idea it existed.
Other videos I'm watching:
http://events.ccc.de/congress/2007/Conference_Recordings/index.html
Other videos I'm watching:
http://events.ccc.de/congress/2007/Conference_Recordings/index.html
When You Educate A Girl, You Educate A Community
Heard this quote on a radio interview of Three Cups of Tea author Greg Mortenson:
"When you educate a man, you educate an individual but when you educate a woman, you educate a community."
-- Dr J.K. Aggrey, the late Ghanaian educationist and nationalist.
"When you educate a man, you educate an individual but when you educate a woman, you educate a community."
-- Dr J.K. Aggrey, the late Ghanaian educationist and nationalist.
Radio Songs
Heard in the past week or two:
Venice, California-based Suicidal Tendencies' "Join the Army" from their 1987 album "Join the Army" on the Caroline label. Audio. The second half picks up a bit--I swear I heard a cover of this song.
Montreal, Quebec-based The Arcade Fire's "Rebellion (Lies)" from their 2004 album Funeral on the Merge label. Video.
Manchester, England-based Oasis' "The Shock of the Lightning" from their forthcoming 2008 album "Dig Out Your Soul" on the Big Brother label. Video. This song teaches people "Love is a time machine" which makes it all right--physics for the masses.
Venice, California-based Suicidal Tendencies' "Join the Army" from their 1987 album "Join the Army" on the Caroline label. Audio. The second half picks up a bit--I swear I heard a cover of this song.
Montreal, Quebec-based The Arcade Fire's "Rebellion (Lies)" from their 2004 album Funeral on the Merge label. Video.
Manchester, England-based Oasis' "The Shock of the Lightning" from their forthcoming 2008 album "Dig Out Your Soul" on the Big Brother label. Video. This song teaches people "Love is a time machine" which makes it all right--physics for the masses.
Monday, September 15, 2008
ALSA Restart
ALSA failed this evening. Fixed it this way:
- lsof | grep pcm
- kill -9 any processes returned
- restarted ALSA: sudo /etc/init.d/alsa-utils restart
- Didn't work--quit Firefox, then ps -ef | grep firefox
- kill -9 the firefox process
- restarted ALSA: sudo /etc/init.d/alsa-utils restart
- Sound returns--yippee
Sunday, September 14, 2008
Wish List
Pong Clock: http://hackaday.com/2008/09/14/pong-clock/
Kill-A-Watt: http://www.thinkgeek.com/homeoffice/gear/7657/
LED Binary clock: http://www.thinkgeek.com/homeoffice/lights/59e0/
Kill-A-Watt: http://www.thinkgeek.com/homeoffice/gear/7657/
LED Binary clock: http://www.thinkgeek.com/homeoffice/lights/59e0/
Monday, September 08, 2008
Emacs and Soap
"All the world needs is Emacs and a bar of soap."
--Linux User's Group of Davis message.
--Linux User's Group of Davis message.
Saturday, September 06, 2008
Asian Pears Warmed In Late-Summer Sunshine
A sugary-sweet late-afternoon California dessert from our backyard tree.
Monday, September 01, 2008
Downgrading Windows Vista to XP
A laptop purchase made in 2007 appears to have contained a pirated version of Windows Vista. Happily, Dawn purchased a copy of Windows XP last year through her community college for $25.
Downgrading took a bit of effort. We used David Karp's advice (http://www.pcmag.com/print_article2/0,1217,a%253D226950,00.asp) to reset the Administrator password and fix the master boot record. XP's recovery console didn't recognize the Vista Administrator password though--to fix this we used ElderGeeks' advice on how to edit the registry to bypass the setting (http://www.computing.net/answers/windows-xp/admin-password-in-recovery-console/156682.html).
Windows is dead, long live Windows.
Posting this from my KUbuntu install.
Downgrading took a bit of effort. We used David Karp's advice (http://www.pcmag.com/print_article2/0,1217,a%253D226950,00.asp) to reset the Administrator password and fix the master boot record. XP's recovery console didn't recognize the Vista Administrator password though--to fix this we used ElderGeeks' advice on how to edit the registry to bypass the setting (http://www.computing.net/answers/windows-xp/admin-password-in-recovery-console/156682.html).
Windows is dead, long live Windows.
Posting this from my KUbuntu install.
Monday Development Log
Monday:
- ToString() goals: 1) Implement call signature "sprintf(stdout, "%s\n", a_class.ToString());" 2) Deallocate returned char * within the object implementing ToString()--the caller doesn't have to worry about deallocating the returned char *. 3) Reduce memory bloat and handle arbitrary string lengths. 4) No streams (Google prohibits C++ streams (except for logging)). 5) If possible, avoid declaring extra class member variables.
- There ain't no such thing as a free lunch in C++, however. Deallocation occurs two ways--first, when variables declared on the stack go out-of-scope; and second, when variables declared on the heap get freed. The callee, in this case, deallocates the memory. The callee can deallocate the memory in these ways: 1) new within ToString(), delete within the object destructor, 2) statically declare within ToString(), deallocate at end of run-time, and 3) automatically declare within ToString(), deallocate when variable goes out-of-scope. The last choice fails because automatic allocations get reclaimed on the stack immediately when the callee returns. The first choice requires maintenance of a pointer to the new'd memory. The second choice requires a compile-time allocation of memory.
- Of the options, the first choice allows unlimited flexibility at the cost of additional overhead, while the second choice eliminates the overhead but requires a compile-time allocation of memory.
- Estonian Arvo Pärt's "Spiegel im spiegel", from his album Alina. "Spiegel im spiegel" (from Wikipedia): "can mean both "mirror in the mirror" as well as "mirrors in the mirror", referring to the infinity of images produced by parallel plane mirrors."
Sunday, August 31, 2008
Sunday Development Log
Sunday:
- Neat: http://www.google.com/codesearch
- SymbolStorage maps Word Tokens to Identifiers.
- Flex maps strings to Word Tokens.
- Bison parses Word Tokens using a LALR engine.
- A way to convert "a_class.ToString().c_str()" to "a_class.ToString()" for use in sprintf()--statically allocate a fixed character buffer within ToString() and return a pointer to it. No memory management, no extra class member variables, no repeat allocation. The only catch--this technique only works for predictable string lengths. For example, sprintf()'ing an integer into a string--2^64 fits into a null-terminated string of 21 bytes.
Unrestricted string lengths necessitate dynamic memory allocation.
Google prohibits C++ streams (except for logging), which seems to rule out std::string--I haven't seen or thought of a way other than std::ostringstream.
Monday, August 25, 2008
Sunday, August 24, 2008
Hacker Test
A treasure trove of stuff I want to learn about:
http://linuxshellaccount.blogspot.com/2008/08/hacker-test-more-linux-and-unix-humor.html
http://linuxshellaccount.blogspot.com/2008/08/hacker-test-more-linux-and-unix-humor.html
Saturday, August 23, 2008
Sunday Development Log
Sunday:
- Jia Peng Fang's "Winter River"
- Began implementation of classes Expression, Node, and Identifier.
- object.ToString().c_str() it is--failed to find a clean way to implement ToString() without new/malloc.
Monday, August 18, 2008
Monday Development Log
Monday:
- C++ introduced references in 1983 (C lacks references--instead, C uses pointers to implement pass-by-reference).
- Compiling class SymbolStorage--on Tuesday I'll begin testing it thoroughly.
- const_cast
removes or adds the const label to a variable.
Sunday, August 17, 2008
Sunday Development
Sunday:
- Google's C++ style guide demands fprintf() over streams. Current inconsistency results in code like this: (*a_sibling_iterator).first->ToString().c_str()--Token.ToString() returns std::string.
- Kasper Peeters' Tree(std::pair) might work as a syntax tree container class, but as a symbol storage container it fails to offer key-based retrieval through std::find(), even if nodes contain container std::pair. On a secondary note, it also seems to fail to support equality functor assignment at the time of declaration.
- Researching the Standard Template Library's Associative Containers for alternatives--std::map tests out acceptably.
- Schwarz Stein's "Rise To Heaven" from their album "New Vogue Children"
Saturday, August 16, 2008
Saturday Development
Saturday, picking up after six days off:
- Implementing class SymbolStorage with Kasper Peeters' Tree project.
- Researched Standard Template Library class (STL) std::pair (/usr/include/c++/4.2.3/bits/string) to hold Token/Identifier pairs.
- Installed VIM
- Annihilator's "Crystal Ann" from the album "Double Live Annihilation"
Sunday, August 10, 2008
Sunday Development Log
Sunday:
- 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).
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.
Subscribe to:
Posts (Atom)