February 2023

S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728    

Style Credit

Expand Cut Tags

No cut tags
Tuesday, October 2nd, 2007 01:47 pm
Can't decide where to eat? (and you're in the USA, I presume)? Grab the Wheel of Lunch and give it a spin!

I will not publicly admit that I have a shellscript to do the same thing. If I did have such a script, its database would be populated only with restaurants I happened to like, all near my current place of work, and I would be about half way through implementing "attributes" such as "quick" or "inexpensive" -- but only if I had such a script. Of course I don't. Only a computer geek type of person would have such a thing.
Tuesday, October 2nd, 2007 09:08 pm (UTC)
I have been directed to skip lunch. Yay, the decision has been made!
Tuesday, October 2nd, 2007 09:41 pm (UTC)
I bet the combination of "invite one more" (before being given a restaurant) followed by "skip lunch" is a popular one!
Tuesday, October 2nd, 2007 10:24 pm (UTC)
well, it's a darn good thing that you're not such a computer geek type person!

*off to spin the wheel myself* YAY! i got Waffle House!
Tuesday, October 2nd, 2007 11:01 pm (UTC)
It's too bad that you don't have such a script.

It's really too bad that that script isn't someplace that people could get a copy.
Tuesday, October 2nd, 2007 11:22 pm (UTC)
Yeah, it sure is. It's a darn shame the script doesn't look anything like this. (Check out the /bin/date args available on your OS.)


#!/bin/csh -f

######################################
# Enumerate the potential food choices
######################################

echo "Amarin Thai on Castro" >> /tmp/cj.food.txt
echo "Amici's Pizza on Castro" >> /tmp/cj.food.txt
echo "Armadillo Willy's" >> /tmp/cj.food.txt


##########################################
# Pick a random number, spit out that line
##########################################

# Replace "%s" with %N" on RHEL3 machines.
# %s is seconds since the epoch; %N is nanoseconds and makes a better
# randomizer. (However, it seems always to report an even microsecond.)

# setenv OSVER `head -1 /etc/redhat-release | cut -d ' ' -f 5`
# echo $OSVER

# if ($OSVER == "WS") then
setenv RANDOM_NUM `/bin/date +%N`
setenv RANDOM_NUM `expr $RANDOM_NUM / 1000`
# else setenv RANDOM_NUM `/bin/date +%s`
# endif
# echo $RANDOM_NUM

setenv NUM_LINES `cat /tmp/cj.food.txt | wc -l`
setenv PICK_LINE `expr $RANDOM_NUM % $NUM_LINES`
setenv PICK_LINE `expr $PICK_LINE + 1`
# echo $PICK_LINE

head -n $PICK_LINE /tmp/cj.food.txt | tail -n 1


rm /tmp/cj.food.txt

Tuesday, October 2nd, 2007 11:23 pm (UTC)
Aw man, I never get Waffle House! My zip code is defective.
Tuesday, October 2nd, 2007 11:30 pm (UTC)
Heh. It wants me to go to a restaurant that closed about a year ago :).

It has some great restaurants for my zip code, however.

(You *GEEK*!)
Tuesday, October 2nd, 2007 11:55 pm (UTC)
Yeah, there are some slight problems. The display gets weird if you want something unusual, too (try 94087 dinner or 94087 saravana, and yeah, they misspelled saravanaa).

No, wait, see, I'd be a geek if I had that script. ;)
Wednesday, October 3rd, 2007 01:39 am (UTC)
i refrained from ever saying "move to ohio!" when you were feeling out places to move to, knowing that we don't fit a lot of your main criteria. however, i'd like to amend that and say "Move to Ohio!! we have Waffle House!!" ;-)

sadly, there are only about four other choices on my Wheel of Food, and not very veg-friendly choices. but i'm having fun spinning the wheel and cheering it on.
Wednesday, October 3rd, 2007 05:33 am (UTC)
If you had such a script, then this icon would be appropriate. But since you don't, it's wholly out of place.
Wednesday, October 3rd, 2007 03:52 pm (UTC)
Heh. I worked on an excel macro (I needed to do that at work, so I was learning) driven off of a front page with restaurant names and weightings a while ago, but I figured I needed the weightings (so that the really expensive ones would show up less often, as well as the ones that I'm in the mood for less) but I got disgusted at my inability to figure out reasonable weightings and don't know what happened to that project.
Wednesday, October 3rd, 2007 04:25 pm (UTC)
I came up with a very simple weighting system for the shellscript I, uh, certainly would never spend work time fooling with. Nearby, cheap restaurants can be listed multiple times, while farther away and expensive ones get listed only once. Then the "random" pick can choose some places more often.
Wednesday, October 3rd, 2007 04:26 pm (UTC)
What is it about geeks and inability to decide where to have lunch? At my previous company we all used to stand around muttering "I don't know, where do YOU want to eat?" for about ten minutes, which is how long it took us to default to Thai Spoons yet again.
Wednesday, October 3rd, 2007 04:28 pm (UTC)
Waffle House is worth a road trip every so often. We even did that once. Phoenix, Arizona has the closest one.
Wednesday, October 3rd, 2007 08:10 pm (UTC)
Back in college, after Star Trek ended on Sunday afternoons, a group of 8-16 people would form up to try and figure out where to go to dinner. I know you can imagine exactly how well that went. Vegetarians, limited drivers, blah, blah, blah.

When I first encountered "Pizza Dictator" with the Frisch gaming group, I thought it was the most brilliant application of game theory I'd ever seen. If you are not familiar with this algorithm, maybe we can get [livejournal.com profile] joedecker to explain it. He has more experience with it than I do.
Wednesday, October 3rd, 2007 08:32 pm (UTC)
If it's the algorithm Joe once explained to me, I love it. Could really suck for one vegetarian in a group of ten carnivores, but otherwise, it's fabulous!
Wednesday, October 3rd, 2007 11:37 pm (UTC)
now you're just trying to get us hot :)
Wednesday, October 3rd, 2007 11:39 pm (UTC)
A PSYCHOLOGICAL TIP

Whenever you're called on to make up your mind,
and you're hampered by not having any,
the best way to solve the dilemma, you'll find,
is simply by spinning a penny.
No -- not so that chance shall decide the affair
while you're passively standing there moping;
but the moment the penny is up in the air,
you suddenly know what you're hoping.

-- Piet Hein
Thursday, October 4th, 2007 12:06 am (UTC)
I admit it would work on me too -- mainly because there are comments in it. Anyone who writes comments gets a thumbs up from me. Years of being a contractor will do that to a person. :-)
Thursday, October 4th, 2007 12:06 am (UTC)
[livejournal.com profile] lkeele does this too, but I hadn't heard the Piet Hein bit!

Whenever you're called on to make up your mind,
and you're hampered by not having any,


That's definitely my usual problem. By the time I need food I don't have a mind at all.
Thursday, October 4th, 2007 12:11 am (UTC)
*makes a mental note to write more comments* :)
Thursday, October 4th, 2007 12:22 am (UTC)
Now THAT'S geek flirting! ;-) ;-)
Thursday, October 4th, 2007 12:24 am (UTC)
ideally, geek flirting would have used /* rather than * :)
Thursday, October 4th, 2007 12:54 am (UTC)
or # or // or even ;

:-)
Thursday, October 4th, 2007 12:59 am (UTC)
# no comment :)
Thursday, October 4th, 2007 02:21 pm (UTC)
Fun. Now what I need is a wheel that has a list of the ingredients I already have in my refrigerator, and tells me what to make out of them, especially since I ate out at restaurants three times yesterday, and I'm in quite a hobbit-hole mood today.
Thursday, October 4th, 2007 02:29 pm (UTC)
It is quite possible that I came by this particular decision procedure through the poem, and quite probable that I first came by the poem thanks to [livejournal.com profile] hitchhiker's lovely poetry list.

Now that I've incorporated the decision procedure into my daily life, it's about time I memorized the poem.
Thursday, October 4th, 2007 03:17 pm (UTC)
There IS a web site like that, but I can't for the life of me remember what it's called. You type in a pile of ingredients and it comes up with what you can make from them - usually fritatta :)
Friday, October 12th, 2007 06:27 pm (UTC)
Now what I need is a wheel that has a list of the ingredients I already have in my refrigerator, and tells me what to make out of them

Found it!!

http://www.cookingbynumbers.com/frames.html