News for hackers. Stuff that matters.

blossoms

Dead link
Re:Diagnostic page for Google.com on Friday January 23, 2015 @10:59AM (#8935459)
Re:The Pirate Bay is online, waving a pirate flag on Monday December 22, 2014 @11:39PM (#8786785)
My ISP is seemingly blocking that site. I can access it from my DO VPS, though.
Re:Anti-Patterns in Python Programming on Wednesday July 09, 2014 @10:08AM (#8009666)
NB a tuple of one item only requires a trailing comma, and a tuple of zero items is represented as ()
Re:Anti-Patterns in Python Programming on Wednesday July 09, 2014 @10:06AM (#8009660)
I don't mean to be pedantic, but a list (I am assuming df is a list) requires an int.

(That sentence I wrote about using hashable types need not apply, sorry!)

If you ran that code, you would get this error:

    TypeError: list indices must be integers, not list
Re:Anti-Patterns in Python Programming on Wednesday July 09, 2014 @09:57AM (#8009618)

    alist = [foo(word) for word in words if word.startswith('a')]
    alist = map(foo, filter(lambda word: word.startswith('a'), words))
Which reads better?
Re:Tor Project Sued on Wednesday July 09, 2014 @07:47AM (#8009116)
Afaik Apple's switching power supplies support the specifications you described (for example, see Mac Mini's tech specs https://www.apple.com/mac-mini/specs.html -- 50-60Hz 100-240v AC).

Not to mention Apple sells region-specialized units just like every other major computer retailer.

Re:Tor Project Sued on Wednesday July 09, 2014 @07:22AM (#8009046)
Anybody have a link to the document? It's behind a paywall?
Re:Tor Project Sued on Wednesday July 09, 2014 @07:03AM (#8008989)
Any internet website can be attacked this same way.
Re:Copying stdin to stdout in Java on Wednesday March 26, 2014 @09:07AM (#7473046)
>Your Python code is just wrong.

Could you elaborate? I want to understand how to fix it.

EDIT: I really want to know what is wrong with my code. It works. Is it a stylistic concern?

    $ dd bs=1m count=10 if=/dev/random of=randomdata
    10+0 records in
    10+0 records out
    10485760 bytes transferred in 0.878533 secs (11935535 bytes/sec)
    $ python stdin_to_stdout.py < randomdata | cmp - randomdata
    $ echo $?
    0
EDIT2: I think I know how you came to the conclusion my code is wrong. Perhaps next time you should read the __entire__ post. Thank you.
Re:Copying stdin to stdout in Java on Wednesday March 26, 2014 @08:44AM (#7472963)
That mangles binary data.

    $ printf 'binarydata'|awk '{ print }'|hexdump -C
    00000000  62 69 6e 61 72 79 64 61  74 61 0a                 |binarydata.|
    0000000b
Re:Copying stdin to stdout in Java on Wednesday March 26, 2014 @08:42AM (#7472954)
There are some comments on the Gist claiming Python or Ruby is a one liner. My response: https://gist.github.com/kosta/9777932/#comment-1199293
Re:Google's robots.txt on Saturday February 22, 2014 @11:59PM (#7284993)
Re:Google's robots.txt on Saturday February 22, 2014 @11:06PM (#7284876)
Unrelated but it looks like www.aol.com's robots.txt is served as text/html http://www.aol.com/robots.txt

Is this a common mistake?

Re:Show HN: Anyone with kids? Plan their summer schedule on Wednesday February 12, 2014 @12:11AM (#7222629)
I respect your work, but I must say this: "You are terrible."

Why you might ask? Well ask any kid who has been forced off to Bible Camp or some other humiliating childhood summer activity.

Keep up the great work!

http://clojurescriptkoans.com/#higher-order-functions/10 got me good. Why is it one needs to use `(count a) (count b)` instead of just `a b` like worked when comparing string lengths in a previous ClojureScript Koan?
Re:Why Putting SSH On Another Port is a Good Idea on Saturday October 26, 2013 @07:07PM (#6619826)
After pondering this article, I think the only reason to run SSH on a different port is to prevent zero day ssh authentication bypasses, which I don't think is a decent reason -- I'll eat my hat when this happens again.
Re:A negative captcha on Monday September 30, 2013 @12:33AM (#6467808)
This is a cool idea but I am skeptical of how effective it is long-term. If I am understanding the design correctly this method comparable to simply changing the name attributes on input tags. It'll take awhile for spammers to catch on though I believe this negative captcha's effectiveness will decrease dramatically with adoption.