hacker_news 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.3.0
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "hacker_news"
8
- s.version = "0.2.3"
7
+ s.name = %q{hacker_news}
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aleksandr Lossenko"]
12
- s.date = "2011-10-07"
13
- s.description = "Fetches newest 5 pages from Hacker News and returns convenient ruby objects"
14
- s.email = "aleksandr.lossenko@gmail.com"
12
+ s.date = %q{2011-10-07}
13
+ s.description = %q{Fetches newest 5 pages from Hacker News and returns convenient ruby objects}
14
+ s.email = %q{aleksandr.lossenko@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README",
@@ -28,17 +28,19 @@ Gem::Specification.new do |s|
28
28
  "VERSION",
29
29
  "hacker_news.gemspec",
30
30
  "lib/hacker_news.rb",
31
+ "lib/hacker_news/comment.rb",
31
32
  "lib/hacker_news/item.rb",
32
33
  "lib/hacker_news/scraper.rb",
34
+ "test/fixtures/comments.html",
33
35
  "test/fixtures/index.html",
34
36
  "test/helper.rb",
35
37
  "test/unit/test_scraper.rb"
36
38
  ]
37
- s.homepage = "http://github.com/egze/hacker_news"
39
+ s.homepage = %q{http://github.com/egze/hacker_news}
38
40
  s.licenses = ["MIT"]
39
41
  s.require_paths = ["lib"]
40
- s.rubygems_version = "1.8.10"
41
- s.summary = "Wrapper for Hacker News website"
42
+ s.rubygems_version = %q{1.6.2}
43
+ s.summary = %q{Wrapper for Hacker News website}
42
44
  s.test_files = [
43
45
  "test/helper.rb",
44
46
  "test/unit/test_scraper.rb"
@@ -1,5 +1,10 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ #$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'net/http'
1
5
  require 'open-uri'
2
6
  require 'nokogiri'
3
7
  require 'iconv'
8
+ require 'hacker_news/comment'
4
9
  require 'hacker_news/item'
5
10
  require 'hacker_news/scraper'
@@ -0,0 +1,42 @@
1
+ module HackerNews
2
+
3
+ class Comment
4
+
5
+ attr_accessor :item_id, :level, :html, :node, :children, :user, :created_at, :url
6
+
7
+ def initialize(item_id, node)
8
+ @item_id = item_id
9
+ @node = node
10
+ @user = node.css("span.comhead a")[0].text
11
+ @url = "http://news.ycombinator.com/" + node.css("span.comhead a")[1].attributes["href"].value
12
+ @created_at = node.css("span.comhead")[0].children[1].text.strip[0..-4] rescue nil
13
+ @html = node.css("span.comment font")[0].inner_html
14
+ @level = node.css('img[src="http://ycombinator.com/images/s.gif"]')[0].attributes["width"].value.to_i
15
+ @children = []
16
+ end
17
+
18
+ def comments
19
+ chidren = []
20
+ next_node = node.next
21
+ return chidren unless next_node
22
+ next_comment = next_node ? self.class.new(self.item_id, next_node) : nil
23
+ while next_node && next_comment && self.root_of?(next_comment) && self.parent_of?(next_comment)
24
+ children << next_comment
25
+
26
+ next_node = next_node.next
27
+ next_comment = next_node ? self.class.new(self.item_id, next_node) : nil
28
+ end
29
+ children
30
+ end
31
+
32
+ def root_of?(other_comment = nil)
33
+ other_comment && self.level < other_comment.level
34
+ end
35
+
36
+ def parent_of?(other_comment = nil)
37
+ other_comment && self.level + 40 == other_comment.level
38
+ end
39
+
40
+ end
41
+
42
+ end
@@ -2,7 +2,7 @@ module HackerNews
2
2
 
3
3
  class Item
4
4
 
5
- attr_accessor :id, :position, :points, :title, :url, :comments, :user, :created_at
5
+ attr_accessor :item_id, :position, :points, :title, :url, :comments_count, :user, :created_at
6
6
 
7
7
  def initialize(node, position)
8
8
  tr = node.parent.parent
@@ -14,13 +14,17 @@ module HackerNews
14
14
  @url = node[:href]
15
15
  @position = position
16
16
  @points = points_comments_td.css("span")[0].text.to_i rescue nil
17
- @id = points_comments_td.css("span")[0][:id].split("_")[1].to_i rescue nil
17
+ @item_id = points_comments_td.css("span")[0][:id].split("_")[1].to_i rescue nil
18
18
  @user = points_comments_td.css("a")[0].text.strip rescue nil
19
- @comments = points_comments_td.css("a")[1].text.to_i rescue nil
19
+ @comments_count = points_comments_td.css("a")[1].text.to_i rescue 0
20
20
  @created_at = points_comments_tr.text.match(/by [-\w]+ (.*) \|/)[1].strip rescue nil
21
21
  @created_at ||= points_comments_tr.text
22
22
  end
23
23
 
24
+ def comments
25
+ @comments ||= Scraper.comments(self.item_id)
26
+ end
27
+
24
28
  end
25
29
 
26
30
  end
@@ -23,6 +23,19 @@ module HackerNews
23
23
  result
24
24
  end
25
25
 
26
+ def self.comments(item_id)
27
+ response = Net::HTTP.start( "news.ycombinator.com", 80 ) do |http|
28
+ http.get("/item?id=#{item_id}", "User-Agent" => "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.3 (KHTML, like Gecko) Chrome/15.0.872.0 Safari/535.2").body
29
+ end
30
+ doc = Nokogiri::HTML(response)
31
+ comment_images = doc.css('img[src="http://ycombinator.com/images/s.gif"]').select {|c| c.attributes["width"].value == "0"}
32
+ top_level_comments = comment_images.inject([]) do |arr, comment_image|
33
+ comment = comment_image.parent.parent.parent.parent.parent
34
+ arr << Comment.new(item_id, comment) if comment && comment.css("span.comment font")[0]
35
+ arr
36
+ end
37
+ end
38
+
26
39
  end
27
40
 
28
41
  end
@@ -0,0 +1,135 @@
1
+ <html><head><link rel="stylesheet" type="text/css" href="http://ycombinator.com/news.css">
2
+ <link rel="shortcut icon" href="http://ycombinator.com/favicon.ico">
3
+ <script>
4
+ function byId(id) {
5
+ return document.getElementById(id);
6
+ }
7
+
8
+ function vote(node) {
9
+ var v = node.id.split(/_/); // {'up', '123'}
10
+ var item = v[1];
11
+
12
+ // hide arrows
13
+ byId('up_' + item).style.visibility = 'hidden';
14
+ byId('down_' + item).style.visibility = 'hidden';
15
+
16
+ // ping server
17
+ var ping = new Image();
18
+ ping.src = node.href;
19
+
20
+ return false; // cancel browser nav
21
+ } </script><title>Hacker News | VirtualBox is garbage</title></head><body><center><table border=0 cellpadding=0 cellspacing=0 width="85%" bgcolor=#f6f6ef><tr><td bgcolor=#ff6600><table border=0 cellpadding=0 cellspacing=0 width="100%" style="padding:2px"><tr><td style="width:18px;padding-right:4px"><a href="http://ycombinator.com"><img src="http://ycombinator.com/images/y18.gif" width=18 height=18 style="border:1px #ffffff solid;"></img></a></td><td style="line-height:12pt; height:10px;"><span class="pagetop"><b><a href="news">Hacker News</a></b><img src="http://ycombinator.com/images/s.gif" height=1 width=10><a href="newest">new</a> | <a href="newcomments">comments</a> | <a href="ask">ask</a> | <a href="jobs">jobs</a> | <a href="submit">submit</a></span></td><td style="text-align:right;padding-right:4px;"><span class="pagetop"><a href="/x?fnid=S6Yjhhez6J">login</a></span></td></tr></table></td></tr><tr style="height:10px"></tr><tr><td><table border=0><tr><td><center><a id=up_3083797 href="vote?for=3083797&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083797></span></center></td><td class="title"><a href="https://lkml.org/lkml/2011/10/6/317">VirtualBox is garbage</a><span class="comhead"> (lkml.org) </span></td></tr><tr><td colspan=1></td><td class="subtext"><span id=score_3083797>53 points</span> by <a href="user?id=hbrouwer">hbrouwer</a> 2 hours ago | <a href="item?id=3083797">49 comments</a></td></tr><tr style="height:10px"></tr><tr><td></td><td><form method=post action="/r"><input type=hidden name="fnid" value="rONYK6Z0HG"><textarea name="text" rows=6 cols=60></textarea><br><br>
22
+
23
+ <input type=submit value="add comment"></form></td></tr></table><br><br>
24
+ <table border=0><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084288 href="vote?for=3084288&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084288></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=tzury">tzury</a> 41 minutes ago | <a href="item?id=3084288">link</a></span></div><br>
25
+ <span class="comment"><font color=#000000>The content of the article which does not work for most of HN.<p><pre><code> Enter your search termsSubmit search formWeblkml.org
26
+ Date Thu, 6 Oct 2011 15:05:27 -0400
27
+ From Dave Jones &#60;&#62;
28
+ Subject RFC: virtualbox tainting.
29
+ The number of bug reports we get from people with virtualbox loaded are
30
+ truly astonishing. It's GPL, but sadly that doesn't mean it's good.
31
+ Nearly all of these bugs look like random corruption. (corrupt linked lists,
32
+ corrupt page tables, and just plain 'weird' crashes).
33
+
34
+ This diff adds tainting to the module loader to treat it as we do with stuff
35
+ from staging/ (crap). With this tainting in place, automatic bug filing tools
36
+ can opt out of automatically filing kernel bugs, and inform the user to file
37
+ bugs somewhere more appropriate.
38
+
39
+ Signed-off-by: Dave Jones &#60;davej@redhat.com&#62;
40
+
41
+ diff --git a/kernel/module.c b/kernel/module.c
42
+ index 04379f92..d26c9a3 100644
43
+ --- a/kernel/module.c
44
+ +++ b/kernel/module.c
45
+ @@ -2653,6 +2653,10 @@ static int check_module_license_and_versions(struct module *mod)
46
+ if (strcmp(mod-&#62;name, "ndiswrapper") == 0)
47
+ add_taint(TAINT_PROPRIETARY_MODULE);
48
+
49
+ + /* vbox is garbage. */
50
+ + if (strcmp(mod-&#62;name, "vboxdrv") == 0)
51
+ + add_taint(TAINT_CRAP);
52
+ +
53
+ /* driverloader was caught wrongly pretending to be under GPL */
54
+ if (strcmp(mod-&#62;name, "driverloader") == 0)
55
+ add_taint_module(mod, TAINT_PROPRIETARY_MODULE);</code></pre></font></span><p><font size=1><u><a href="reply?id=3084288&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083877 href="vote?for=3083877&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083877></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=Spyro7">Spyro7</a> 2 hours ago | <a href="item?id=3083877">link</a></span></div><br>
56
+
57
+ <span class="comment"><font color=#000000>The link in the parent is https, try this regular http link if you can't read the article:<p><a href="http://lkml.org/lkml/2011/10/6/317" rel="nofollow">http://lkml.org/lkml/2011/10/6/317</a></font></span><p><font size=1><u><a href="reply?id=3083877&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084030 href="vote?for=3084030&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084030></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=ch0wn">ch0wn</a> 1 hour ago | <a href="item?id=3084030">link</a></span></div><br>
58
+ <span class="comment"><font color=#000000>Or this if it still does not load: <a href="http://webcache.googleusercontent.com/search?q=cache:lkml.org/lkml/2011/10/6/317&#38;hl=en&#38;strip=1" rel="nofollow">http://webcache.googleusercontent.com/search?q=cache:lkml.or...</a></font></span><p><font size=1><u><a href="reply?id=3084030&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=80></td><td valign=top><center><a id=up_3084378 href="vote?for=3084378&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084378></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=Greg12x">Greg12x</a> 18 minutes ago | <a href="item?id=3084378">link</a></span></div><br>
59
+ <span class="comment"><font color=#000000>Thank you SIR!</font></span><p><font size=1><u><a href="reply?id=3084378&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084457 href="vote?for=3084457&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084457></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=johnbender">johnbender</a> 2 minutes ago | <a href="item?id=3084457">link</a></span></div><br>
60
+
61
+ <span class="comment"><font color=#000000>The project has some other notable issues that can be quite frustrating. Primary among them the performance of the shared folder file system with complex file structures (the reason why Vagrant uses NFS).</font></span><p><font size=1><u><a href="reply?id=3084457&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083888 href="vote?for=3083888&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083888></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=buster">buster</a> 2 hours ago | <a href="item?id=3083888">link</a></span></div><br>
62
+ <span class="comment"><font color=#000000>I recently switched from VMWare to Virtualbox because i was sick of finding patches for VMWare kernel modules everytime there is a new kernel version out.
63
+ I had some major bugs on VMWare too, usually. Either some keys stopped working (in the host system!) or the VM crashed completely..
64
+ I used Virtualbox only for a few hours but it didn't have any hickups so far.<p>Unfortunately i can't read the article either..</font></span><p><font size=1><u><a href="reply?id=3083888&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083914 href="vote?for=3083914&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083914></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=buster">buster</a> 2 hours ago | <a href="item?id=3083914">link</a></span></div><br>
65
+ <span class="comment"><font color=#000000>That's the mailinglist entry:<p><a href="http://pastebin.com/WiVPiMgp" rel="nofollow">http://pastebin.com/WiVPiMgp</a></font></span><p><font size=1><u><a href="reply?id=3083914&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083891 href="vote?for=3083891&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083891></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=wladimir">wladimir</a> 2 hours ago | <a href="item?id=3083891">link</a></span></div><br>
66
+
67
+ <span class="comment"><font color=#000000>Virtualbox works fine for me. Though I only use it to run Windows XP so I'm probably not a demanding customer, but calling it garbage is kind of over-the top. It's very useful for me for running some windows-only software that refuses to work in Wine, and to test my sw on windows without having to reboot...</font></span><p><font size=1><u><a href="reply?id=3083891&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084208 href="vote?for=3084208&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084208></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=lloeki">lloeki</a> 1 hour ago | <a href="item?id=3084208">link</a></span></div><br>
68
+ <span class="comment"><font color=#000000>Virtualbox works fine <i>for you</i> (And me too, apparently). But it visibly does not for many, as vboxdrv makes things crash in such volume that it spams bug reporting databases enough for someone to be pissed out enough by that fact to put together a patch containing creative names. Also enough (yet probably not vbox specific but it sure masks vboxdrv data) that Debian, Suse and RHEL took proactive measures to flag all out of tree modules.</font></span><p><font size=1><u><a href="reply?id=3084208&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084404 href="vote?for=3084404&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084404></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=wh-uws">wh-uws</a> 11 minutes ago | <a href="item?id=3084404">link</a></span></div><br>
69
+
70
+ <span class="comment"><font color=#000000>I run windows 7 <i>with Aero effects enabled</i><p>Virtualbox is wonderful. Does it have bugs and need work? Of course.<p>What software doesn't?</font></span><p><font size=1><u><a href="reply?id=3084404&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084002 href="vote?for=3084002&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084002></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=pwaring">pwaring</a> 1 hour ago | <a href="item?id=3084002">link</a></span></div><br>
71
+ <span class="comment"><font color=#000000>I agree, I run XP and Vista under Virtualbox for testing websites, plus Debian for when I want to guarantee a clean development environment. I've never had any problems, other than with some Windows games which can't detect the CD drive because they assume it will be at D:\</font></span><p><font size=1><u><a href="reply?id=3084002&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083897 href="vote?for=3083897&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083897></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=pwaring">pwaring</a> 2 hours ago | <a href="item?id=3083897">link</a></span></div><br>
72
+
73
+ <span class="comment"><font color=#000000>Potentially easier link to read, in terms of the threading:<p><a href="http://thread.gmane.org/gmane.linux.kernel/1200194" rel="nofollow">http://thread.gmane.org/gmane.linux.kernel/1200194</a></font></span><p><font size=1><u><a href="reply?id=3083897&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083885 href="vote?for=3083885&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083885></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=wccrawford">wccrawford</a> 2 hours ago | <a href="item?id=3083885">link</a></span></div><br>
74
+ <span class="comment"><font color=#000000>A slightly less caustic way of saying it would be to say that bug reports from things running on virtual box are garbage.</font></span><p><font size=1><u><a href="reply?id=3083885&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083928 href="vote?for=3083928&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083928></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=larrik">larrik</a> 2 hours ago | <a href="item?id=3083928">link</a></span></div><br>
75
+ <span class="comment"><font color=#000000>I read it as being that the hosts themselves are the ones generating garbage bug reports, rather than the virtualized OS's?<p>Otherwise, yours would be a much better title for this.</font></span><p><font size=1><u><a href="reply?id=3083928&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=80></td><td valign=top><center><img src="http://ycombinator.com/images/s.gif" height=1 width=14></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"></span></div><span class="comment">[deleted]</span></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=120></td><td valign=top><center><a id=up_3084156 href="vote?for=3084156&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084156></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=larrik">larrik</a> 1 hour ago | <a href="item?id=3084156">link</a></span></div><br>
76
+
77
+ <span class="comment"><font color=#000000>I thought vboxdrv, which is listed in the bug reports, is the host machine process??<p>I can certainly be wrong about this...</font></span><p><font size=1><u><a href="reply?id=3084156&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=160></td><td valign=top><center><a id=up_3084187 href="vote?for=3084187&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084187></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=sp332">sp332</a> 1 hour ago | <a href="item?id=3084187">link</a></span></div><br>
78
+ <span class="comment"><font color=#000000>Whoops, I guess you're right. Never mind.</font></span><p><font size=1><u><a href="reply?id=3084187&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083883 href="vote?for=3083883&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083883></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=Argorak">Argorak</a> 2 hours ago | <a href="item?id=3083883">link</a></span></div><br>
79
+ <span class="comment"><font color=#000000>Although I am a heavy VirtualBox-user (vagrant is just too good), I can relate to this.<p>The only reason why my machine ever panicks is exactly the one cited in this mail: vboxdrv.</font></span><p><font size=1><u><a href="reply?id=3083883&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084441 href="vote?for=3084441&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084441></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=drivingmenuts">drivingmenuts</a> 4 minutes ago | <a href="item?id=3084441">link</a></span></div><br>
80
+
81
+ <span class="comment"><font color=#000000>Works fine for me - there's aren't any other free options that I'm aware of, so I guess I'm kind of stuck with it.</font></span><p><font size=1><u><a href="reply?id=3084441&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084035 href="vote?for=3084035&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084035></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=bajsejohannes">bajsejohannes</a> 1 hour ago | <a href="item?id=3084035">link</a></span></div><br>
82
+ <span class="comment"><font color=#000000>VirtualBox is a fantastic piece of software. Just because it's not perfect, doesn't mean it's garbage. Far from it.</font></span><p><font size=1><u><a href="reply?id=3084035&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084305 href="vote?for=3084305&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084305></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=uxp">uxp</a> 33 minutes ago | <a href="item?id=3084305">link</a></span></div><br>
83
+ <span class="comment"><font color=#000000>The VirtualBox software (as in the UI, etc) is great, however this article/mail listing is discussing the 'vboxdrv' Linux kernel module, which is a source of a large number of bug reports to the Linux kernel project.</font></span><p><font size=1><u><a href="reply?id=3084305&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083937 href="vote?for=3083937&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083937></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=hippich">hippich</a> 1 hour ago | <a href="item?id=3083937">link</a></span></div><br>
84
+
85
+ <span class="comment"><font color=#000000>Google Cache: <a href="http://webcache.googleusercontent.com/search?q=cache:WThcCZIZus0J:lkml.org/lkml/2011/10/6/317+site:lkml.org/lkml/2011/10/6/317&#38;hl=en&#38;strip=1" rel="nofollow">http://webcache.googleusercontent.com/search?q=cache:WThcCZI...</a></font></span><p><font size=1><u><a href="reply?id=3083937&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084032 href="vote?for=3084032&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084032></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=hackermom">hackermom</a> 1 hour ago | <a href="item?id=3084032">link</a></span></div><br>
86
+ <span class="comment"><font color=#000000>Apart from VirtualBox being notably slower (and less complete in working D3D/OpenGL support) than f.e. Parallels Desktop, I can't say I've had any gripes or stability issues with it, barring a recent, short-lived bug that caused VBox to automatically power down an active VM as soon as it went idle. I've been using VBox on OS X for a bit over 2 years now, for development purposes related to Windows XP, OpenBSD, one or two Linux distributions, and even Haiku.</font></span><p><font size=1><u><a href="reply?id=3084032&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084087 href="vote?for=3084087&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084087></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=ohyes">ohyes</a> 1 hour ago | <a href="item?id=3084087">link</a></span></div><br>
87
+ <span class="comment"><font color=#000000>Not Garbage. Default configuration is not optimal, however.<p>I use it all the time on Windows XP to run Ubuntu.<p>Initially, I did have a few problems because I didn't have Ubuntu or Virtualbox configured correctly. Also, I wasn't using 'VBOXADDITIONS,' which actually are extremely useful and important.<p>Some quick googling fixed my problems, in any case and I don't have any problems with it anymore.</font></span><p><font size=1><u><a href="reply?id=3084087&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084290 href="vote?for=3084290&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084290></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=eropple">eropple</a> 40 minutes ago | <a href="item?id=3084290">link</a></span></div><br>
88
+
89
+ <span class="comment"><font color=#000000>Except that this is a common kernel panic cause <i>using Linux as a host machine</i>.</font></span><p><font size=1><u><a href="reply?id=3084290&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084303 href="vote?for=3084303&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084303></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=tm65atcolumbia">tm65atcolumbia</a> 34 minutes ago | <a href="item?id=3084303">link</a></span></div><br>
90
+ <span class="comment"><font color=#000000>I run my startup on a MBP with multiple VMs. It's been a love/hate affair with VirtualBox, but so far I manage to live with the shortcomings. Can't argue with free. Tried Parallel early on when truly frustrated, but found it doesn't add much over VBox to justify the price. Here are a few tips that I live by:<p>1. Obviously, never put critical data on a VM not matter how stable it seems. Definitely have Dropbox installed.<p>2. Make it a good habit to pause the VM before you pack up and go or switch to a different network. When turning it back on, disconnect the network interface then reconnect.<p>3. When the UI freezes, you can rescue on a Mac with AppleKey+F6 (or a few other Func keys) to another tty console. Login there and reboot. After you get the VM back, VBox likes it when you do a proper reboot before you resume working.<p>4. Take snapshot regularly, definitely right after you just checkin a major chunk of code!</font></span><p><font size=1><u><a href="reply?id=3084303&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083997 href="vote?for=3083997&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083997></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=garethsprice">garethsprice</a> 1 hour ago | <a href="item?id=3083997">link</a></span></div><br>
91
+
92
+ <span class="comment"><font color=#000000>Wonder if there's a selection bias here; VirtualBox may be less stable than native hardware or commercial VMs, but it's user base is also using VirtualBox for different scenarios than native users.<p>I know I use VirtualBox all the time to try out "risky" behaviors that often end in a crash, because I know I can just roll back if it doesn't work out.</font></span><p><font size=1><u><a href="reply?id=3083997&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084003 href="vote?for=3084003&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084003></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=singular">singular</a> 1 hour ago | <a href="item?id=3084003">link</a></span></div><br>
93
+ <span class="comment"><font color=#000000>I've had quite a few issues with it.<p>1. Copy + paste randomly breaks between host win32, client ubuntu32.<p>2. Random freezes every so often.<p>3. Seamless mode extremely unreliable, does not draw correctly.<p>4. Horrible issues with shared folders breaking io operations. I actually got a (trivial) patch into golang to work around this issue (!). This also completely breaks ido mode completions in emacs.<p>5. Occasionally shared folders get into an odd state and no files can be read from/written to them.<p>4 + 5 might be specific to the way I use shared folders though, as I access them via a dropbox folder sat in a truecrypt volume.</font></span><p><font size=1><u><a href="reply?id=3084003&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084222 href="vote?for=3084222&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084222></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=kijin">kijin</a> 57 minutes ago | <a href="item?id=3084222">link</a></span></div><br>
94
+
95
+ <span class="comment"><font color=#000000>I use VirtualBox to run Ubuntu 32-bit and various other Linux distros on Win7 64-bit. No Truecrypt or Dropbox is involved. I have similar occasional issues with shared folders.<p>Access denied randomly when trying to overwrite files. Files renamed in the host becoming inaccessible from the guest. NTFS symlinks in the host appearing as normal folders in the guest one day and as broken links the next day. Terribly slow I/O overall. I used to bookmark and keep track of several bug reports on the official bugtracker, but I gave up because nobody seemed to care.<p>The only reason I still use shared folders is because it's still slightly less painful than CIFS/Samba.</font></span><p><font size=1><u><a href="reply?id=3084222&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084229 href="vote?for=3084229&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084229></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=ronnier">ronnier</a> 55 minutes ago | <a href="item?id=3084229">link</a></span></div><br>
96
+ <span class="comment"><font color=#000000>It's an extremely complex piece of software that's free. I'm thankful to have it available and find it to work well.</font></span><p><font size=1><u><a href="reply?id=3084229&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083919 href="vote?for=3083919&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083919></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=patrickod">patrickod</a> 2 hours ago | <a href="item?id=3083919">link</a></span></div><br>
97
+ <span class="comment"><font color=#000000>I can't read the article at the moment as it seems the server has died but I can say that in my use of VirtualBox on OS X in the last 2 years I have yet to have a major crash. The majority of the time it has been used for very temporary staging environments in Debian and it's been perfect for this.</font></span><p><font size=1><u><a href="reply?id=3083919&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083879 href="vote?for=3083879&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083879></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=jfruh">jfruh</a> 2 hours ago | <a href="item?id=3083879">link</a></span></div><br>
98
+
99
+ <span class="comment"><font color=#000000>Has anyone managed to get Windows 8 running in VirtualBox on OS X? I've tried, keep getting errors.</font></span><p><font size=1><u><a href="reply?id=3083879&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083941 href="vote?for=3083941&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083941></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=robgough">robgough</a> 1 hour ago | <a href="item?id=3083941">link</a></span></div><br>
100
+ <span class="comment"><font color=#000000>Yup, worked for me. Have you ticked all the relevant options in the VM Settings?<p><pre><code> First stop in the System menu. Start with the Motherboard
101
+ sub-menu and check Enable IO APIC to improve performance
102
+ for your virtual machine. In the Processor sub-menu check
103
+ Enable PAE/NX (again, to boost performance). Finally under
104
+ the Acceleration sub-menu make sure both of the hardware
105
+ virtualization boxes are checked—VT-x/AMD-V and Nested
106
+ Paging, respectively.</code></pre>
107
+ - Taken from <a href="http://www.howtogeek.com/74515/how-to-test-drive-windows-8-in-virtualbox/" rel="nofollow">http://www.howtogeek.com/74515/how-to-test-drive-windows-8-i...</a> (which I know is a Windows guide, but check the same settings in OS X)</font></span><p><font size=1><u><a href="reply?id=3083941&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=80></td><td valign=top><center><a id=up_3084023 href="vote?for=3084023&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084023></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=jfruh">jfruh</a> 1 hour ago | <a href="item?id=3084023">link</a></span></div><br>
108
+
109
+ <span class="comment"><font color=#000000>Hadn't seen those, will give it a shot!</font></span><p><font size=1><u><a href="reply?id=3084023&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083887 href="vote?for=3083887&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083887></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=sp332">sp332</a> 2 hours ago | <a href="item?id=3083887">link</a></span></div><br>
110
+ <span class="comment"><font color=#000000>It works fairly well (a bit slow) on Win7. Have you followed these instructions? <a href="https://news.ycombinator.com/item?id=2995010" rel="nofollow">https://news.ycombinator.com/item?id=2995010</a></font></span><p><font size=1><u><a href="reply?id=3083887&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083836 href="vote?for=3083836&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083836></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=sp332">sp332</a> 2 hours ago | <a href="item?id=3083836">link</a></span></div><br>
111
+ <span class="comment"><font color=#000000>I can't remember the last time I saw a stock Ubuntu guest crash a VM process, but VirtualBox crashed 4 times in the last 2 days.</font></span><p><font size=1><u><a href="reply?id=3083836&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083841 href="vote?for=3083841&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083841></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=hbrouwer">hbrouwer</a> 2 hours ago | <a href="item?id=3083841">link</a></span></div><br>
112
+
113
+ <span class="comment"><font color=#000000>I think I managed to crash it about ten times last sunday, doing nothing but browsing the web on a VM.</font></span><p><font size=1><u><a href="reply?id=3083841&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=80></td><td valign=top><center><a id=up_3083886 href="vote?for=3083886&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083886></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=Freaky">Freaky</a> 2 hours ago | <a href="item?id=3083886">link</a></span></div><br>
114
+ <span class="comment"><font color=#000000>I can't remember the last time I crashed VirtualBox, browsing or not. Even with older 64-bit Flash. Only issue I recall is some snapshot breakage a while back.<p>Yay anecdotes.</font></span><p><font size=1><u><a href="reply?id=3083886&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=120></td><td valign=top><center><a id=up_3083988 href="vote?for=3083988&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083988></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=StavrosK">StavrosK</a> 1 hour ago | <a href="item?id=3083988">link</a></span></div><br>
115
+ <span class="comment"><font color=#000000>Seconded. It's never crashed for me, I love it.</font></span><p><font size=1><u><a href="reply?id=3083988&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=80></td><td valign=top><center><a id=up_3083875 href="vote?for=3083875&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083875></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=pbrumm">pbrumm</a> 2 hours ago | <a href="item?id=3083875">link</a></span></div><br>
116
+
117
+ <span class="comment"><font color=#000000>I had a lot of instability until I upgraded to a newer vm kernel.<p>I was on 2.6.38 fedora 64bit vm and it would crash once a day<p>now I am on 2.6.40 and it has been stable for 50 days</font></span><p><font size=1><u><a href="reply?id=3083875&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083859 href="vote?for=3083859&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083859></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=marcf">marcf</a> 2 hours ago | <a href="item?id=3083859">link</a></span></div><br>
118
+ <span class="comment"><font color=#000000>Yeah, VirtualBox crashes for me all the time. Does it have automatic error reporting to Oracle on why it is unstable? I would hope that these crashes are fixable.</font></span><p><font size=1><u><a href="reply?id=3083859&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3084224 href="vote?for=3084224&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084224></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=sarp">sarp</a> 56 minutes ago | <a href="item?id=3084224">link</a></span></div><br>
119
+ <span class="comment"><font color=#000000>I agree that VirtualBox has problems.I was running Ubuntu on Mac OS X using VirtualBox because it was free, however it kept crashing constantly and didn't shut down properly.<p>I bought Parallels instead, and I am happy so far</font></span><p><font size=1><u><a href="reply?id=3084224&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083901 href="vote?for=3083901&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083901></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=sunsu">sunsu</a> 2 hours ago | <a href="item?id=3083901">link</a></span></div><br>
120
+
121
+ <span class="comment"><font color=#000000>I only use it as a local development server running Ubuntu, but I've never had any problems with Virtualbox running on OSX or Win7.</font></span><p><font size=1><u><a href="reply?id=3083901&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083926 href="vote?for=3083926&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083926></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=WhatDoIKnow">WhatDoIKnow</a> 2 hours ago | <a href="item?id=3083926">link</a></span></div><br>
122
+ <span class="comment"><font color=#000000>I've used it for years on Ubuntu and Windows with almost no issues. This headline is garbage.</font></span><p><font size=1><u><a href="reply?id=3083926&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084040 href="vote?for=3084040&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084040></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=viraptor">viraptor</a> 1 hour ago | <a href="item?id=3084040">link</a></span></div><br>
123
+ <span class="comment"><font color=#000000>Not necessarily. You're presenting a data point only, while the poster of the patch marked the module CRAP for a specific reason - that module produced too many bug reports which are not relevant to the distributions since they originate in vboxdrv. From that perspective vboxdrv is garbage and people who deal with that problem agree.<p>Data point is as relevant as "I keep crossing on red light for years now and nothing bad happened".</font></span><p><font size=1><u><a href="reply?id=3084040&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084059 href="vote?for=3084059&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084059></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=lt">lt</a> 1 hour ago | <a href="item?id=3084059">link</a></span></div><br>
124
+
125
+ <span class="comment"><font color=#000000>These are kernel developers saying that the majority of crash reports they receive are caused by the virtual box driver.</font></span><p><font size=1><u><a href="reply?id=3084059&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3084243 href="vote?for=3084243&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3084243></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=develop7">develop7</a> 51 minutes ago | <a href="item?id=3084243">link</a></span></div><br>
126
+ <span class="comment"><font color=#5a5a5a>You're doing everything wrong. Literally everything.</font></span><p><font size=1><u><a href="reply?id=3084243&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=0></td><td valign=top><center><a id=up_3083862 href="vote?for=3083862&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083862></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=mrsebastian">mrsebastian</a> 2 hours ago | <a href="item?id=3083862">link</a></span></div><br>
127
+ <span class="comment"><font color=#000000>Aw, I think we killed the site :(<p>Has someone got a copy of the text?</font></span><p><font size=1><u><a href="reply?id=3083862&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083968 href="vote?for=3083968&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083968></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=andyn">andyn</a> 1 hour ago | <a href="item?id=3083968">link</a></span></div><br>
128
+
129
+ <span class="comment"><font color=#000000>Here's a cached copy from Google:<p><a href="http://webcache.googleusercontent.com/search?q=cache:http://lkml.org/lkml/2011/10/6/317&#38;strip=1" rel="nofollow">http://webcache.googleusercontent.com/search?q=cache:http://...</a></font></span><p><font size=1><u><a href="reply?id=3083968&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr><tr><td><table border=0><tr><td><img src="http://ycombinator.com/images/s.gif" height=1 width=40></td><td valign=top><center><a id=up_3083893 href="vote?for=3083893&dir=up&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37"><img src="http://ycombinator.com/images/grayarrow.gif" border=0 vspace=3 hspace=2></a><span id=down_3083893></span></center></td><td class="default"><div style="margin-top:2px; margin-bottom:-10px; "><span class="comhead"><a href="user?id=jsherer">jsherer</a> 2 hours ago | <a href="item?id=3083893">link</a></span></div><br>
130
+ <span class="comment"><font color=#000000>I wonder if he was hosting it on his VBox VM? :P</font></span><p><font size=1><u><a href="reply?id=3083893&whence=%69%74%65%6d%3f%69%64%3d%33%30%38%33%37%39%37">reply</a></u></font></td></tr></table></td></tr></table><br><br>
131
+ </td></tr><tr><td><img src="http://ycombinator.com/images/s.gif" height=10 width=0><table width="100%" cellspacing=0 cellpadding=1><tr><td bgcolor=#ff6600></td></tr></table><br>
132
+ <center><span class="yclinks"><a href="lists">Lists</a> | <a href="rss">RSS</a> | <a href="http://ycombinator.com/bookmarklet.html">Bookmarklet</a> | <a href="http://ycombinator.com/newsguidelines.html">Guidelines</a> | <a href="http://ycombinator.com/newsfaq.html">FAQ</a> | <a href="http://ycombinator.com/newsnews.html">News News</a> | <a href="item?id=363">Feature Requests</a> | <a href="http://ycombinator.com">Y Combinator</a> | <a href="http://ycombinator.com/apply.html">Apply</a> | <a href="http://ycombinator.com/lib.html">Library</a></span><br><br>
133
+
134
+ <form method=get action="http://www.hnsearch.com/search#request/all">Search: <input type=text name="q" value="" size=17></form><br>
135
+ </center></td></tr></table></center></body></html>
@@ -11,8 +11,8 @@ class TestScraper < Test::Unit::TestCase
11
11
  assert_equal "Show HN: My table of tools for startups [Google Docs]", first_article.title
12
12
  assert_equal 1, first_article.position
13
13
  assert_equal 117, first_article.points
14
- assert_equal 32, first_article.comments
15
- assert_equal 3081171, first_article.id
14
+ assert_equal 32, first_article.comments_count
15
+ assert_equal 3081171, first_article.item_id
16
16
  assert_equal "matthiaswh", first_article.user
17
17
  assert_equal "https://docs.google.com/spreadsheet/ccc?key=0AgdrTOOiB3BMdExDMXAtUmhrNnQwUXRjZHh1QVhzRHc&hl=en_US", first_article.url
18
18
  assert_equal "15 hours ago", first_article.created_at
@@ -22,11 +22,25 @@ class TestScraper < Test::Unit::TestCase
22
22
  assert_equal "PagerDuty (YC S10) is looking for some awesome devs", job_article.title
23
23
  assert_equal 19, job_article.position
24
24
  assert_equal nil, job_article.points
25
- assert_equal nil, job_article.comments
26
- assert_equal nil, job_article.id
25
+ assert_equal 0, job_article.comments_count
26
+ assert_equal nil, job_article.item_id
27
27
  assert_equal nil, job_article.user
28
28
  assert_equal "http://www.pagerduty.com/jobs/engineering/software-engineer", job_article.url
29
29
  assert_equal "12 hours ago", job_article.created_at
30
30
  end
31
31
 
32
+ def test_should_get_comments
33
+ FakeWeb.register_uri(:get, %r|http://news.ycombinator.com|, :body => File.read(File.dirname(__FILE__) + "/../fixtures/comments.html"))
34
+ comments = HackerNews::Scraper.comments(3083797)
35
+ assert_equal 26, comments.size
36
+ comment = comments[0]
37
+ assert_equal "tzury", comment.user
38
+ assert_equal "41 minutes ago", comment.created_at
39
+ assert_equal "http://news.ycombinator.com/item?id=3084288", comment.url
40
+ assert comment.html =~ /^The content/
41
+
42
+ comment = comments[1]
43
+ assert_equal 1, comment.comments.size
44
+ end
45
+
32
46
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hacker_news
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
8
  - 3
10
- version: 0.2.3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aleksandr Lossenko
@@ -15,10 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-07 00:00:00 Z
18
+ date: 2011-10-07 00:00:00 +02:00
19
+ default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ type: :runtime
23
+ requirement: &id001 !ruby/object:Gem::Requirement
22
24
  none: false
23
25
  requirements:
24
26
  - - ~>
@@ -30,11 +32,11 @@ dependencies:
30
32
  - 0
31
33
  version: 1.4.0
32
34
  name: nokogiri
35
+ version_requirements: *id001
33
36
  prerelease: false
34
- type: :runtime
35
- requirement: *id001
36
37
  - !ruby/object:Gem::Dependency
37
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ type: :runtime
39
+ requirement: &id002 !ruby/object:Gem::Requirement
38
40
  none: false
39
41
  requirements:
40
42
  - - ">="
@@ -44,11 +46,11 @@ dependencies:
44
46
  - 0
45
47
  version: "0"
46
48
  name: iconv
49
+ version_requirements: *id002
47
50
  prerelease: false
48
- type: :runtime
49
- requirement: *id002
50
51
  - !ruby/object:Gem::Dependency
51
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ type: :development
53
+ requirement: &id003 !ruby/object:Gem::Requirement
52
54
  none: false
53
55
  requirements:
54
56
  - - ~>
@@ -60,11 +62,11 @@ dependencies:
60
62
  - 0
61
63
  version: 1.0.0
62
64
  name: bundler
65
+ version_requirements: *id003
63
66
  prerelease: false
64
- type: :development
65
- requirement: *id003
66
67
  - !ruby/object:Gem::Dependency
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ type: :development
69
+ requirement: &id004 !ruby/object:Gem::Requirement
68
70
  none: false
69
71
  requirements:
70
72
  - - ~>
@@ -76,11 +78,11 @@ dependencies:
76
78
  - 2
77
79
  version: 1.5.2
78
80
  name: jeweler
81
+ version_requirements: *id004
79
82
  prerelease: false
80
- type: :development
81
- requirement: *id004
82
83
  - !ruby/object:Gem::Dependency
83
- version_requirements: &id005 !ruby/object:Gem::Requirement
84
+ type: :development
85
+ requirement: &id005 !ruby/object:Gem::Requirement
84
86
  none: false
85
87
  requirements:
86
88
  - - ">="
@@ -90,11 +92,11 @@ dependencies:
90
92
  - 0
91
93
  version: "0"
92
94
  name: rcov
95
+ version_requirements: *id005
93
96
  prerelease: false
94
- type: :development
95
- requirement: *id005
96
97
  - !ruby/object:Gem::Dependency
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
98
+ type: :development
99
+ requirement: &id006 !ruby/object:Gem::Requirement
98
100
  none: false
99
101
  requirements:
100
102
  - - ">="
@@ -104,9 +106,8 @@ dependencies:
104
106
  - 0
105
107
  version: "0"
106
108
  name: fakeweb
109
+ version_requirements: *id006
107
110
  prerelease: false
108
- type: :development
109
- requirement: *id006
110
111
  description: Fetches newest 5 pages from Hacker News and returns convenient ruby objects
111
112
  email: aleksandr.lossenko@gmail.com
112
113
  executables: []
@@ -128,11 +129,14 @@ files:
128
129
  - VERSION
129
130
  - hacker_news.gemspec
130
131
  - lib/hacker_news.rb
132
+ - lib/hacker_news/comment.rb
131
133
  - lib/hacker_news/item.rb
132
134
  - lib/hacker_news/scraper.rb
135
+ - test/fixtures/comments.html
133
136
  - test/fixtures/index.html
134
137
  - test/helper.rb
135
138
  - test/unit/test_scraper.rb
139
+ has_rdoc: true
136
140
  homepage: http://github.com/egze/hacker_news
137
141
  licenses:
138
142
  - MIT
@@ -162,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
166
  requirements: []
163
167
 
164
168
  rubyforge_project:
165
- rubygems_version: 1.8.10
169
+ rubygems_version: 1.6.2
166
170
  signing_key:
167
171
  specification_version: 3
168
172
  summary: Wrapper for Hacker News website