erezsh

Joined 17 years ago

Karma
327
Submissions
233
Member since
May 18
Skilled Programmer

My blog: http://blog.erezsh.com/

My github: https://github.com/erezsh

View on Hacker News

Recent submissions

Comment · 20 days ago
Default view can't play House of the Rising Sun because there's no E.

5/7 stars.

Comment · 20 days ago
I think he just used nuance as a polite way to say meandering.

Personally I really wish authors would pack their 'nuance' into well-sectioned areas, maybe even collapsible (we have the technology!). I shouldn't have to skim several paragraphs just to understand the core of the argument.

Arguably, it's not a big problem if you already love the author and hang on to their every word. But as someone who is often just trying to get the gist of the idea, I find the rationalist writing style really tiresome.

Comment · 3 months ago
framework is too 90s
Comment · 3 months ago
Thank you for framing my laziness as being a daredevil
Comment · 7 months ago
Seriously, all these armchair "experts" are missing very obvious truths -

1) Every authority figure is telling the Iranian people to stay inside and wait.

2) Revolutions don't happen overnight, the same way that businesses don't succeed overnight, even though from far away it might seem that way.

3) Official Israeli statements estimate it could take up to a year after the war is over for a successful overthrow, even if everything is going according to plan.

The truth is there's a lot of people who want this war to fail, because it will align with their political convictions and hopes.

Comment · 8 months ago
You're just showing your ignorance. The Nazis killed the majority of their victims as soon as they arrived in the camp. They kept 20%-30%, mostly men who could work, to be used as slaves for their military industry, and they eliminated everyone else. They developed gassing especially in order to speed up the killing and make it more economical.

It was a genocide because they tried to eliminate a specific ethnic group, for no other reason than its ethnicity.

You should go learn more about the subject, if it interests you so much.

Comment · 8 months ago
That's like me saying you're a murderer, but you just haven't killed anyone yet because you're afraid of going to jail. Maybe it's true, but it's a bit of a silly argument, isn't it? In western society, we judge people based on their actions.
Comment · 8 months ago
It's because you're deeply ignorant about the subject. Anyone can think ridiculous thoughts in complete ignorance.

Try reading a history book about the holocaust, or even just WW2, and you'll see just how ridiculous you sound.

Comment · 8 months ago
It's a ridiculous argument. The Nazis went through a LOT of effort and resources to gather Jews from all the corners of Europe, and even more effort into exterminating them as fast as they could, within the logistical and economic constraints of fighting a 3 front war.

There's no comparison at all to the ease with which Israel could just drop a couple of bombs on Gaza, had it decided to do so.

Comment · 9 months ago
And only civilians, instead of half of them being armed and trained militants.
Comment · 1 year ago
Because my hate for pytest is ardent and dear to my heart, I will try to explain.

I wrote a very simple function:

  def test_whatever():
    a = range(10)
    b = (10 / x for x in a)
    c = list(b)
When I run it with normal Python, this is the exception:

    Traceback (most recent call last):
      File "test_test.py", line 10, in <module>
        test_whatever()
      File "test_test.py", line 6, in test_whatever
        c = list(b)
            ^^^^^^^
      File "test_test.py", line 5, in <genexpr>
        b = (10 / x for x in a)
             ~~~^~~
    ZeroDivisionError: division by zero

It's compact and simple to understand. It pinpoints the exact location of the error, and I easily scan the text to find the function call-stack.

Now here's the pytest error:

    ___________________________________ test_whatever ___________________________________

        def test_whatever():
            a = range(10)
            b = (10 / x for x in a)
    >       c = list(b)

    test_test.py:6:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    .0 = <range_iterator object at 0x107695e90>

    >   b = (10 / x for x in a)
    E   ZeroDivisionError: division by zero

    test_test.py:5: ZeroDivisionError

It doesn't pinpoint the error, it adds code lines that might be irrelevant, and extra information I don't care about.

I will say using `--tb=short` fixes most of it, at least in this example, and sometimes it's even preferable, because it's shorter. But it still doesn't pinpoint the error like normal Python exceptions do.

Comment · 1 year ago
It's awesome! Well done!
Comment · 1 year ago
I like the promise, and it looks nice. But I'm not sure what are the selling points.

- pytest already works with assert. Why brag about something that is already commonplace?

- It could help if your docs explained the alternative to using fixtures. I assume it would be done by re-using givens, but you could make it clearer what is the preferred way to do it, and what is gained, or lost, but doing it that way.

- Can you explain how your diff is better than the pytest diff? (I'm asking as someone who hates the pytest diff)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton