TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Write an Internet search engine with 200 lines of Ruby code

35 pointsby nickbabout 16 years ago

4 comments

sqsabout 16 years ago
Web search only becomes interesting when you scale it up. At small scale it's just fetching pages and tying together library code, which is fine but not particularly interesting or educational. Once you scale up, though, it involves tons of complicated and fascinating topics (math, distributed systems, compression, networking, query planning, databases, etc.). You also start having to make trade-offs among features, which is often a good sign that a problem is complex enough to be worthy of your time.
henningabout 16 years ago
Did he really need to engage in monkeypatching even in this small example?<p>Do you really pollute a class as fundamental as String as cavalierly as in this code?
评论 #520524 未加载
评论 #520701 未加载
dhotsonabout 16 years ago
It's actually not that difficult to write a text database from scratch (without libraries like Lucene). Most text databases are based on inverted indexes at their core. Implementing basic boolean operators turns out to be pretty easy to implement as well.<p>It's one of the exercises I like to do when learning a new language. I'd recommend giving it a shot if you haven't tried it before.
aaronblohowiakabout 16 years ago
Or, you could use Y! Boss in 3.<p><a href="http://github.com/jpignata/bossman-gem/tree/master" rel="nofollow">http://github.com/jpignata/bossman-gem/tree/master</a><p>However, this is a good first toe-in-the-water for people who want to get more into ruby and web-crawling.