The Shoebox. A place for lil' apps to live in peace and harmony.

This app generates sentences out of candy hearts for fun and profit. It features such classics as “be mine” and “my hero” as well as modern favorites like “fax me” and “in a fog.” Once in awhile, you’ll stumble across something remarkably coherent.


Speak now or forever hold your peace:

Kevin Conner
February 19, 2008

After downloading this, open hearts.rb and edit $base_path. Otherwise you will generate no love, only errors.

Candy Hearts
February 19, 2008

ur kind heat wave sun shine to you & me … let’s kiss :)

Kevin Conner
February 19, 2008

Before I learned Shoes, I also made a version of this in JavaScript: http://cultspace.org/etc/hearts/hearts.html

Jesse
February 21, 2008

A tip to anyone who wants to use “base_path”, um, er, don’t use “base_path”. :)

Just use relative addressing, like: image “images/heart14.png”

Notice there is no / at the start of that? I’m pretty sure, on all platforms, shoes starts looking in the script’s path first.

Or maybe that’s only because I’ve associated .rb with shoes on my system? I double click a script and it runs. This is on Windows. Ah well.

I’ve callously rewritten a version of your code and shymakything’ed it, uploaded that. win.

kevinc
February 21, 2008

Great and thank you! Your .shy works fine for me on OS X as well. However when I edit version 1 and make it a relative path as I believe you did, it gives me such an error as “no such file images/heart31.png”. As you say, this is probably a Windows vs. OS X thing. I also get an error if I run shoes from the terminal, bun that error has paths relative to the shoes executable in /Applications/Shoes.app/...

So what about having the .rb’s path in /Applications/Shoes.app be the working folder for Shoes.app()? I could rtfm but if somebody knows, let’s get the word out.

Jesse
February 21, 2008

If you are running shoes from the terminal, and then asking shoes to find the rb file for you, that also could be the trouble.

Try adding shoes to your environment path, and then run “shoes xyz.rb” from within the folder of the rb? maybe that will work. :)

kevinc
February 21, 2008

That is actually what I did.. /Applications/Shoes.app/Contents/MacOS/ is in my path. I type “shoes hearts.rb” and it comes up, but since OS X is running the application it forces the working folder, and relative paths still fail.

omygawshkenas
February 21, 2008

Relative paths on OSX have always been a headache. _why explained that they will work with Shys, but good luck getting them to work with regular ruby apps. I looked through the source for a while, and couldn’t find a way to do it. So base_path in the raw app, and relative in the shy seems to be the way to go until Shoes gets an update.

kevinc
February 22, 2008

ok, thanks! good to know somebody has their eye on it.

Baptiste
March 17, 2008

Cool let’s kiss nice girl :)

Kyle
June 2, 2008

I love you Beth


How do I use this?