Hacker News new | past | comments | ask | show | jobs | submit login
Long distance relationship? Perl can help. (code.google.com)
86 points by mayank on Dec 29, 2010 | hide | past | favorite | 20 comments



My favorite example of Perl helping a relationship: http://hop.perl.plover.com/cover.html

"I wish all my programs achieved their design goals so spectacularly."


1. The Kayak dev key is here:

  http://www.kayak.com/labs/api/search/developerkey.html
2. Using your email as a perl string requires a \ in front of @

3. I had to install many packages before the Perl script ran on a basic EC2 Linux instance:

  sudo yum install gcc perl-CPAN perl-libwww-perl expat-devel gnuplot
4. Before installing the CPAN packages he mentions:

  sudo perl -MCPAN -e 'install Digest::SHA'
  sudo perl -MCPAN -e 'install Test::More'
  sudo perl -MCPAN -e 'install XML::Parser'
You may have to do additional debugging and install other CPAN packages.

5. Install the CPAN packages he mentions

6.

  nohup perl SerenDaemon.pl > errors.txt 2> exceptions.txt < /dev/null &


Hi everyone, thanks for the great feedback. As the author of the program, I have taken down Serendipity out of courtesy to Kayak.com after receiving an email (very nice, I might add) about the costs incurred by continuously running searches. Please back off your search frequencies if you are using the script. Thanks!


Hello, I've checked out Serendipity earlier today and wanted to download it when I get back home. But now it's too late.

Would it be possible that you send me the source via mail (my email address is in my profile)? Of course I'll take care not to overload the service.

Thanks!


Just got an email from them for too much API usage. :(


This is very cool. Does anyone know whether Kayak is OK with this sort of scraping? (translation: will this break if it gets popular?)


It's not scraping, it's using Kayak's API: http://www.kayak.com/labs/api/search/


Answer to the translation: yes :(


Slightly off-topic, but forcing me to download an image preview when I could quite as easily view it in my browser drives me insane, now I have a file I don't want that I didn't expect and have to delete it! Silly.


That's a browser issue. My browser asks if I want to download, or if I want to view internally (and if so, what mime type; to which I replied image/png).

Don't blame your poor configuration on the author of web pages. Ultimately clients should control the web experience, not servers.


It's how Google code handles files in SVN, rather than a browser issue. They specifically set the content-type header to binary, rather than image.

I would hate it if my browser asked me what to do every time I load an image.


It doesn't ask if the headers are correct. But in the 0.001% of time when they are wrong, it asks, and saves you from the complaint that the OP made.


This is a really great project! I can think of two things would make it better, but both are beyond your control.

1. Use Hipmunk's (nonexistent at the moment) API and show the least agonizing flight of each day.

2. Somehow include Southwest's flights and prices (which nobody else has, AFAIK)


Cool, thanks. Just installed this and it works great. Do you know a good way to send SMS programmatically (as you mention)?


I've used clickatell (which costs money) to do this. The API is fairly simple, they're pretty stable and they can send to most places in the world.


A crude way would be to send an email to #@carrier.tld (e.g. 1234567890@verizon.net) and it will be converted to SMS by the carrier.


I agree, that's the easiest crude way to do it. The only problem will be is if you're trying to make an app where people supply their numbers in order to get an SMS, because you don't know the carrier. To get around that, afaik, there is:

1. [hard to implement, and costs money, easy for the user] integrate with an sms gateway. Here is a comparison of two: http://dcwilkie.wordpress.com/2010/11/12/sms-gateway-compari...

2. [easy(er) to implement, free, hard(er) for the user, hacky] Have the user sms a user id (or some identifier) to an email address, you read that email, and associate the identifier with the "from" field, and send sms's to that email.


An even easier way: send the email to that number on ALL carriers. Only 1 of them will have that number, and they will deliver it; the others will just drop it (or bounce it, so use a return address that can ignore the bounces).


Twilio.


Related: see the cheapest flight to each of your Facebook friends. http://apps.facebook.com/milehighflyer/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: