blossoms's comments

blossoms | 11 years ago | on: Anti-Patterns in Python Programming

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

blossoms | 11 years ago | on: Anti-Patterns in Python Programming

    alist = [foo(word) for word in words if word.startswith('a')]
    alist = map(foo, filter(lambda word: word.startswith('a'), words))
Which reads better?

blossoms | 11 years ago | on: Tor Project Sued

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.

blossoms | 12 years ago | on: Copying stdin to stdout in Java

>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.

blossoms | 12 years ago | on: Copying stdin to stdout in Java

That mangles binary data.

    $ printf 'binarydata'|awk '{ print }'|hexdump -C
    00000000  62 69 6e 61 72 79 64 61  74 61 0a                 |binarydata.|
    0000000b

blossoms | 12 years ago | on: Why Putting SSH On Another Port is a Good Idea

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.

blossoms | 12 years ago | on: A negative captcha

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.
page 1