News for hackers. Stuff that matters.

petdog

Re:The Problem with Palm Oil on Wednesday February 19, 2020 @07:49PM (#22371772)
I contribute to https://www.coolearth.org/ which seems to be one of the best options following this approach
Re:How Google Code Search Worked on Friday January 20, 2012 @06:18PM (#3491711)
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)
Re:Help me out by taking this spatial ability test on Wednesday November 02, 2011 @02:24PM (#3188210)
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)
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.
Re:Boot a linux kernel right inside your browser. on Tuesday May 17, 2011 @09:19AM (#2556248)

    ~ # 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.
Re:Concepts The Emacs Newbie Should Master on Thursday April 14, 2011 @11:54AM (#2447276)
M-x ansi-term does colors, too
He should do a reddit AMA
Re:Benchmarking Go and Python Web servers on Wednesday February 23, 2011 @03:44PM (#2255727)
My experience with siege is that it actually measures siege's terrible performance.
Re:How to strip JPEG metadata in Ubuntu on Monday February 07, 2011 @05:01AM (#2188384)
jpegoptim --strip-all, also optimizes for size without degrading quality.
Re:New Twitter Has Become Browser Poison on Monday January 17, 2011 @07:33PM (#2114041)
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.
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.
Re:Decline of the Tornado Web Server - What happened? on Friday December 10, 2010 @05:38PM (#1993474)
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)
>For what? I don't know.

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

Re:Lisp has too many parentheses... on Tuesday November 09, 2010 @05:30AM (#1886030)
Except that I find myself adding tons of parens to my haskell to be able to read it. Lisp may have spoiled me.
Re:Cool stuff you can do with netcat on Friday November 05, 2010 @01:31PM (#1874061)
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 -
Re:Python Patterns - An Optimization Anecdote on Tuesday November 02, 2010 @09:18AM (#1860275)
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
Re:Ask HN: How do you secure yourself on public WiFi? on Monday October 25, 2010 @12:25PM (#1830432)
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.
Could you expand on the tuning of tcp slow start? Are you referring to net.ipv4.tcp_slow_start_after_idle?
Re:What different sorting algorithms sound like on Thursday August 19, 2010 @04:30AM (#1616822)
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
Re:I created a bookmarking service you can love. on Saturday July 17, 2010 @08:12PM (#1524917)
>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.

Re:Hidden features of Python on Wednesday July 14, 2010 @10:17AM (#1514606)
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"

Re:Hidden features of Python on Wednesday July 14, 2010 @10:05AM (#1514576)
Seriously? You must enjoy your O(n^2).
Re:It’s Faster Because It’s C on Tuesday July 13, 2010 @02:50PM (#1512332)
> there was an interesting test that was run many years ago

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

Re:Reddit needs help on Saturday July 10, 2010 @05:35AM (#1503427)
> /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.

Re:Programming is an easy way to procrastinate on Monday July 05, 2010 @05:02AM (#1487763)
I like how this is a mantra that is repeated half a dozen times every two submissions.
Re:Lenovo: Apple is losing out in China on Monday July 05, 2010 @04:56AM (#1487752)
Yeah. In other news, thinkpads are the best laptops ever.

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

Re:Dropbox is hiring a Web Engineer on Friday July 02, 2010 @06:46PM (#1482631)
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)
Re:Google agrees to buy ITA Software for $700 million on Thursday July 01, 2010 @07:25PM (#1479616)
Some funded sbcl work would be good.
Re:How to take a screenshot on Saturday June 05, 2010 @04:20AM (#1406629)
import does just that, if you drop the "-window root" argument
Re:Save My Life - help a fellow HN'er on Thursday June 03, 2010 @06:11AM (#1400887)
> 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.

Older »