HNHacker News
TopNewBestAskShowJobs

petdog

114 karma · joined February 20, 2007

submissionscomments
petdog··on The Problem with Palm Oil
I contribute to https://www.coolearth.org/ which seems to be one of the best options following this approach
petdog··on How Google Code Search Worked
This is a really great tool. If it could take the first .csearchindex going up the tree as the current index (somewhat like git does with .git dirs), it could easily top rgrep/ack for searching into projects. (just add line numbers and some match coloring)
petdog··on Help me out by taking this spatial ability test
I found all of them very easy except "question 6", at which I'm still failing hard to visualize the difference, and is the only one I got wrong. (I had to choose a random one)
petdog··on I have Crohn's, an incurable digestive disease, and built Crohnology
Well, I can tell you that eating beans (pretty much required for a vegan?) and cabbage hurts like hell. In fact anything that is a little too gassy. Eating a lot less tomatoes helps too. Milk is annoying, but not cheese, and especially not yogurt. I think yogurt actually helps you. I have no problem with meat, except when it's too bloody.
petdog··on Boot a linux kernel right inside your browser.

    ~ # cat over.c
    main () {
            int i = 0x00ffffff;
            while (i > 0) i--;
    }
    ~ # tcc over.c -o out
    ~ # time ./out
    real    0m 13.58s
    user    0m 13.57s
    sys     0m 0.01s
I love this stuff.
petdog··on Concepts The Emacs Newbie Should Master
M-x ansi-term does colors, too
petdog··on Peter Tattam created Trumpet Winsock and got very little: Let's set things right
He should do a reddit AMA
petdog··on Benchmarking Go and Python Web servers
My experience with siege is that it actually measures siege's terrible performance.
petdog··on How to strip JPEG metadata in Ubuntu
jpegoptim --strip-all, also optimizes for size without degrading quality.
petdog··on New Twitter Has Become Browser Poison
Now, maybe I'm to blame here, using the nightly build of chromium, but webkit is a walking memory leak. Just for a comparison, I have the same amount of tabs on firefox and chromium and firefox is using 500mb of ram, while chromium is using 3.5 GIGABYTES. And I'm not even using it much. But really, the problem is easily reproducible. Just open whatever webkit based browser you want, and keep reloading the same moderately big page. Ram goes up, never to return. That works with a trivial program that embeds webkit via gtk, too. Or you can just look at the commits on webkit: a couple of leaks fixes every week.
petdog··on Flirting Social Network Likealittle Hits 20M Pageviews In 6 Weeks
Awww, I had the same idea last year, while taking the daily train, but I never really believed in it. Actually I was also hoping to have iphones regularly advertise the owner's page on which to anonymously comment.
petdog··on Decline of the Tornado Web Server - What happened?
It looks like you forgot to call the function in 'simple_catch'. Interestingly, if you do, manual_with_catch will actually be faster in the failing case. (A try:fn() finally: return True beats everything else in the failing case)
petdog··on After A Four Year Run, Firefox Is No Longer The Top Browser On TechCrunch
>For what? I don't know.

Full text indexing of your history: press C-h and search.

petdog··on Lisp has too many parentheses...
Except that I find myself adding tons of parens to my haskell to be able to read it. Lisp may have spoiled me.
petdog··on Cool stuff you can do with netcat
Poor man's skype:

sender

    arecord -f cd -c 2 | lame -b128 - - | netcat -u your-ip 6881 | mpg123 -
receiver

   arecord -f cd -c 2 | lame -b128 - - | netcat -u -l 6881 | mpg123 -
petdog··on Python Patterns - An Optimization Anecdote
Actually, map is still faster:

    In [24]: timeit ''.join(map(chr, ll))
    100000 loops, best of 3: 3.91 us per loop

    In [25]: timeit ''.join([chr(i) for i in ll])
    100000 loops, best of 3: 5.85 us per loop

    In [26]: timeit ''.join(chr(i) for i in ll)
    100000 loops, best of 3: 7.79 us per loop
petdog··on Ask HN: How do you secure yourself on public WiFi?
Other than ssh tunneling, I tried http://vyprvpn.com when it was offered together with giganews, and it was pretty fast, if a bit costly.
petdog··on Minecraftwiki serving more traffic than Stackoverflow with 4 servers (and PHP)
Could you expand on the tuning of tcp slow start? Are you referring to net.ipv4.tcp_slow_start_after_idle?
petdog··on What different sorting algorithms sound like
Anything. The The The This all change contents desk. fridge. loose makes me my my of on over page. something. sort strewn this to want words
petdog··on I created a bookmarking service you can love.
>That said, if you're indexing EVERYTHING I browse to, I think this is actually a really killer app.

Google chrome has full text search over your history. And yes, I love it.

petdog··on Hidden features of Python
So by "hidden features" they mean "can be found in the first pages of any tutorial"

(Ok, I didn't know about re.DEBUG)

EDIT: I'm not claiming this link is worthless. But I'd call it "great features of python" or simply "features of python"

petdog··on Hidden features of Python
Seriously? You must enjoy your O(n^2).
petdog··on It’s Faster Because It’s C
> there was an interesting test that was run many years ago

Source? I'd really like to read about it.

petdog··on Reddit needs help
> /r/pics? /r/askreddit? /r/iama?

What? /r/iama is one of the best things that happened to reddit. Sure, most of the submissions are shit, but some are golden.

> What does reddit offer me that I can't get elsewhere

The community. Most of the value is in the comments.

---

About usenet, you could try http://www.astraweb.com/

I bought the once-off 180gb plan. Text isn't even counted. It's going to last me years.

petdog··on Programming is an easy way to procrastinate
I like how this is a mantra that is repeated half a dozen times every two submissions.
petdog··on Lenovo: Apple is losing out in China
Yeah. In other news, thinkpads are the best laptops ever.

(not sarcasm. There's a need for some lenovo fanboys, too.)

petdog··on Dropbox is hiring a Web Engineer
It's not broken at all, and not in any way peculiar to javascript.

    >>> map(apply, [lambda:i for i in range(5)])
    
    [4, 4, 4, 4, 4]

    * (mapcar 'funcall (loop for i from 0 to 5 collect (lambda () i)))

    (6 6 6 6 6 6)
It's just that the looping constructs don't introduce a new binding, but modify the existing one.

    >>> map(apply, [lambda j=i:j for i in range(5)])
    
    [0, 1, 2, 3, 4]

    * (mapcar 'funcall (loop for i from 0 to 5 collect (let ((j i)) (lambda () j))))
    
    (0 1 2 3 4 5)
petdog··on Google agrees to buy ITA Software for $700 million
Some funded sbcl work would be good.
petdog··on How to take a screenshot
import does just that, if you drop the "-window root" argument
petdog··on Save My Life - help a fellow HN'er
> However, electrophoresis can only sort them by weight.

> To check for allergy to a specific allergen, [...] Repeat for every allergen.

Hah! If only we could run a binary search.

Page 1 of 2Next →