Friday, March 31, 2006

The Return of the Shangri-La Diet

About a year ago, I tried Seth Robert's sugar-water diet. I called it the "Sweetwater Diet"; the essence is that you drink sugar (fructose was recommened) dissolved in water as an appetite suppressant. It didn't really work for me at the time. There was a strong initial effect, but it wore off and I found myself gaining weight despite (or because of?) all the sugar water. I dropped the diet after a month. As of today, a year later, I weigh 15 pounds more than this time last year. It's not quite as bad as that sounds because I have more muscle than I did then - I credit Maya for that - but not all the gain is muscle. I'm at a local maximum and I want it to stay a local maximum, all downhill from here.

Seth Roberts' book is finally out and he calls his protocol The Shangri-La Diet. There are more options (Sucrose is fine now! Extra-light olive oil works too!) and much clearer instructions. Armed with the new information, I can see a few things I did "wrong" before so it's worth another try. Current glen-weight: 191. We shall see...

Monday, March 27, 2006

Ruby is Fun!

It's like writing NewtonScript again, only better. Object oriented, clean syntax, and it's really easy to string useful method calls together as if building up a UNIX shell incantation with pipes. I've only learned a little of the syntax and already I often find I can guess what operator might work to do whatever operation I need next. Just ask yourself what would be the most natural Ruby way to do that, and sure enough that's the way it's done. Plus, irb reminds me of the glorious Newton Inspector - it is so gosh-darned easy to try everything out in small chunks and look at your data structures as you go along! Wheeeeee!

I was once asked in an interview to write a program to reverse the order of the words in a string. The algorithmic insight is that if you have a "reverse" operation you can apply it to the whole string, then to each individual word which is now in the correct place. But in C you still need some scaffolding to do that. In Ruby? Not so much. Any job like that is an obvious one-liner. It can probably be done shorter than this, but here's the first incantation I came up with:

str.reverse.split.map{|o| o.reverse+" "}.join

That says take the string "str", reverse the characters, split the result into an array of strings (the default separator is whitespace so I don't need to specify that), reverse each object in the array and add a space on the end (returning the modified array), join the array of small strings back into one big string, and return that result. Toss in a print statement and you're done.

Oh, wait. We're supposed to take lines from standard input. Okay:

#!/usr/local/bin/ruby
ARGF.each {|line|
puts line.reverse.split.map{|o| o.reverse+" " }.join
}


Are we having fun yet?

UPDATE: "reverse" operates on arrays so there's no need to do TWO reverses; I can just split the string into an array, reverse the items in the array, and rejoin to output the string. Also, I can have join put the spaces back in. Thus, this works:

puts str.split.reverse.join(" ")

if str="Now is the time.", that outputs "time. the is Now".

Monday, March 20, 2006

Flying Spaghetti Monster Hymn #1


I am a born-again Pastafarian. Flying Spaghetti Monsterism is a true religion, a fine religion, a soothing answer to all life's big questions, and an excellent excuse to wear my pirate regalia, and yet...there was still a void in my life. A lack. Something was missing in FSM, something other religions have, something of great importance that prevented me from fully appreciating the way of the Flying Spaghetti Monster. Finally I realized: music! FSMism had no liturgical music. No hymns, no songs!

I had to write some.

And now I have. As far as I know, this is the first available hymn for the Church of the Flying Spaghetti Monster. It may be performed either in full chorus or as a traditional call-response. The text is as follows:

Flying Spaghetti Monster Hymn #1

Who created the heaven and earth?
Flying Spaghetti Monster.
Who created the mountain and the midget?
Flying Spaghetti Monster.
Have you been touched by His Noodly Appendage?
Ramen.

(c) 2006 Glen Raphael
(Free to use for non-commercial purposes)


FSM Hymn #1 -- AAC (514k)
FSM Hymn #1 -- MP3 (594k)
(as performed by the Glen Raphael Chorus)

UPDATE:
While you're here, check out Tim DuBay's flash guide to Pastafarianism.

Sunday, March 12, 2006

Warhol Was Right!


My 15 minutes of fame may still be going strong. There's interest now from television news programs. The phrase "early fitness game enthusiast" may yet be part of my obituary. I'll be like the "where's the beef" lady, famous for one silly thing that caught the national fancy.

Now that I'm on a rocket to wordwide fame and fortune - well, fame, anyway - I'll be sure to remember the little people. Let's see, there's Doc, Sneezy, Bashful, Grumpy, Happy...

Nope, guess I still can't remember them after all. Oh, well!

Thursday, March 09, 2006

Abstract Love Song

Both musical and funny! Here's a generic post-breakup love song. The refrain includes "repetition of the title of the song". My favorite part is when the chorus breaks off into lines like "modulation and I hold a high nooooooooote...." Title of the Song (mp3).

(ht: patri)

Monday, March 06, 2006

Most Amazing Ukelele Playing You Will Ever See

...is here.

Wednesday, March 01, 2006

Numerically Unchallenged!




You Passed 8th Grade Math



Congratulations, you got 10/10 correct!

What's Your Future Shock Level?

Here's a piece on future shock levels.
A Shock Level measures the high-tech concepts you can contemplate without being impressed, frightened, blindly enthusiastic - without exhibiting future shock. Shock Level Zero or SL0, for example, is modern technology and the modern-day world, SL1 is virtual reality or an ecommerce-based economy, SL2 is interstellar travel, medical immortality or genetic engineering, SL3 is nanotech or human-equivalent AI, and SL4 is the Singularity.
I am at SL3, which means I'm comfortable with the concepts of "nanotechnology, human-equivalent AI, minor intelligence enhancement, uploading, total body revision, intergalactic exploration." This is the level inhabited by "extropians and transhumanists."

How about you?

(ht: Jacqueline Passey)

Performancing