Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> More concretely- what's an easy non-web task that Ruby (as you suggest learning) is great at that PHP can't handle just as easily? Not trolling here, I'm genuinely curious.

Is there a decent analog for Nokogiri? I stopped paying attention to PHP 6 years ago so I don't know, but a friend of mine needed to do some webscraping today and learned Ruby and then built his script in 5 minutes.

I checked the IRC timestamps between his "it's done installing" and his "hey, look what it outputted". It was seriously 5 minutes. He then went on to do something a touch more complicated (scraping multiple pages and a trivial analysis/report of the results) and that couldn't have been more than another 30 minutes.

(ETA: I don't know if you'd consider webscraping to be non-web. I guess we could swap it out for a bunch of XML files since that's basically the same task.)



PHP has cone a long way in 6 years. Here's a really good PHP web scraper that looks comparable to Nokogiri: https://github.com/fabpot/Goutte




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

Search: