HNHacker News
TopNewBestAskShowJobs

pierrebai

1,310 karma · joined October 13, 2011

submissionscomments
pierrebai··on How Hong Kong became a police state
Funding police is not having a police state. Having police abuse power over visible minorities is bad, but is not a police state.

It is not a police state because: - You can learn about these issues. - You can protest against these issues. - Media reports about these issues. - You can choose which media to listen to. - All medias are not state-controlled. - Media that complain about state abuse don't get shut down. - You can publicly talk and write about what you want. - You can get elected while protesting against these issues. - The internet is not state-controlled. - I could go on and on.

I'm tired of people equating China, Russia and western democracies. Imperfection is not tyranny.

pierrebai··on Supreme Court limits EPA’s power to cut emissions
Just read the dissenting opinions. That you chose not to, clearly, is a choice you made to avoid confronting differing viewpoints.

Also, consistently and repeatedly asking others to research for you is an easy debating tactic used frequently to bury inconvenient facts behind a barrage of requests.

pierrebai··on Things I wish everyone knew about Git (Part I)
> My second question is, if the underlying model is so f*cking elegant, how did it lead to such a confusing interface?

This is the consequence of elegance. Elegance at one level usually is characterized by being very data-agnostic, very workflow-agnostic, etc. This leads to anything built on top of it to be so generic its unusable or at least very awkward.

Pretty much everyone who works with git daily has a set of script to do the actual day-to-day work. The git command is too awful to use otherwise.

pierrebai··on Things I wish everyone knew about Git (Part I)
The problem is that your rebuttal isn't one: you are not addressing any of the points made. And those points are important precisely because branches are not a range of commits which is why they are cumbersome to work with.
pierrebai··on Don’t mock what you don’t own
What the blog completely passes over is that now you'd need to write tests for the DockerRegistryClient... which would be 90% of what he complains about in the first version!

I mean sure, if you break down a problem into three layers instead of one, then the top layer testing will be three times cleaner... but you'll write three times as much code and three times as many tests, one for each layer.

The end-result might be better layered code, but it takes time to write, and time to test and, the not-so-little downside of "clean" code layers that is often never discussed and tossed aside, you need to read and understand three layers of code to know what is really going on instead of one.

It is worth it when your layers are getting large and heavy, but for three-lines-of-code thing like this... is it really worth it?

pierrebai··on Attempting to create an aesthetic global line breaking algorithm
Note that the author's algorithm allow lines wider than the target. (He does not hide this fact.) If you allowed the other algorithm this wiggle room (which basically is making the box wider) they'd also probably find better layout...

For example the first place the algorithms diverges is exactly on such a wider line.

pierrebai··on Everything Is Broken: Shipping Rust-Minidump at Mozilla
If the follow-up post does not make it to HN front page, I'll have a hole in my life.
pierrebai··on The State of Stablecoin Risks
I'm sure you have a lengthy citation of truckers being sent to the Hague for crimes against humanity...
pierrebai··on The FBI tried to ambush my source
The press and government are two distinct powers. All that you listed, FBI, attorney, Congress, are all part of the government, which is the one which controls and directs what the NSA does.

Leaking to the press is not a bug. Seeking maximum distance from what you denounce is sane. You have the same problems in the private sector, where you are directed to voice your complain to HR.

Secrecy is a poison.

pierrebai··on Dragonflydb – A modern replacement for Redis and Memcached
I dunno... I took a look at a single file and found:

        static constexpr unsigned NUM_SLOTS = Policy::kSlotNum;
        static constexpr unsigned BUCKET_CNT = Policy::kBucketNum;
        static constexpr unsigned STASH_BUCKET_NUM = Policy::kStashBucketNum;
NUM_, _CNT, _NUM, three different prefix/suffix for what seems to me like the same concept. That just tickled my inner nit-picker.
pierrebai··on Grothendieck's Approach to Equality [pdf]
That's not the point. The point was it was true for R[1/g] but not for D(g), so you cannot substitute, so you cannot claim that f and g are equal.

As someone totally outside of the maths field, it seems to me that the definition of equality needs a context. You can't say that two things are equal without specifying the larger context in which you are claiming the equality.

pierrebai··on A New World Health Organization Report Once Again Proves Sweden Right
From somewhere else [1]:

    "If you think that lockdowns, travel bans, and mask mandates were the right approach, then you probably see Sweden as failure. Unlike almost every other wealthy nation, it held off doing those things. And the result was a much higher death rate than its neighbors Norway and Denmark. Approximately 13,000 Swedes have died since the beginning of the pandemic — half of them in nursing homes. In comparison, only about 700 Norwegians have died of COVID-19."
In that same article, it says Sweden "strategy surrounded physical distancing, limiting large gatherings, and staying home while you’re sick."

IOW, pick your facts, pick your facts! You can have any opinion if you pick your facts.

[1] https://www.kcrw.com/news/shows/press-play-with-madeleine-br...

pierrebai··on A New World Health Organization Report Once Again Proves Sweden Right
Weird analysis.

I mean, if you believe the analysis, then what you must conclude is that lock-down, isolation and masks cause more COVID mortality? Since this seems hard to believe, then the conclusion is that Sweden performance must be unrelated, surely?

pierrebai··on I fixed my broken monitor with a hair dryer
I had a computer that could only be booted with a hair dryer. I did not disassemble any parts, so I never got to know which exact part was failing, but a good 5-10 minutes of pre-heating with the dryer allowed it to boot.
pierrebai··on Will Hare replace C? Or Rust? Or Zig? Or anything else?
Not being perfect does not translate to not being better. Being safe by default and having compiler-enforced safety as a top design choice is great.

Rust is better.

It's very much human nature to trace the line in the sand juuuuuust right behind one's heels though, depicting everyone behind as bad and everyone ahead as zealots.

pierrebai··on Will Hare replace C? Or Rust? Or Zig? Or anything else?
So, the case is that the formatting string fits into memory, the data being formatted fits in memory but the output formatted text does not?

This seems like an extremely rare case, which is itself a subset of the very rare case that you are formatting something that can be arbitrarily large. Oh, and the programmer must somehow have overlook this and not written it formatted output to output in reasonably-sized chunks.

Meanwhile, having back-and-forth between the formatter and I/O means the formatter must correctly handles all the I/O problems and corner cases: disk full, disconnect, transient failures, ... not even going into that for some of them, you might want the caller to decide the outcome, which is easy when you split formatting and I/O, but hard when the formatting performs the I/O.

I think this is a case that it may sounds superior to mix both, but it is actually buying next to nothing but both complicates matters and probably hides or ignores real issues.

pierrebai··on The Golden Egg Circus
In the late 80s', as a teenager, I received an offer from a doctor about improving a program that I had written. I turned down the offer. I wondered what would have happened if I picked it up instead.

In the early 90s', on a whim, for my first vacations as professional, I decided to go to NY. I stayed in a mostly derelict building in Harlem. There I met my future wife.

So many inflection points in our lives.

pierrebai··on Be careful with that thing, it's a confidential coffee maker
How does an over-heated pot of glass and plastic catch fire? If coffee-making machine are fire hazard, most homes in the world must be regularly burning.

Given that the overwhelming evidence, for example the fact that no house has burned in a large radius around my home, I'd say your and IBM's assessment is wildly off-target.

pierrebai··on Slack’s Incident on 2-22-22
Sometimes new roll-out causes outage, sometimes, roll-out are delayed due to the overall system architecture. Reading the post-mortem, I could not help but be reminded of this issue as described here: https://www.youtube.com/watch?v=y8OnoxKotPQ
pierrebai··on Changing std:sort at Google’s scale and beyond
In the first example of problematic calls to nth_element, there is another bug: if the container contains nothing, it will call nth_element with begin(), begin() - 1, ...

Also, typo: "compare functions much comply" -> "compare functions must comply"

pierrebai··on The physicalization of metamathematics and the implications for its foundations
The tricky bit is that "simplest" has no formal definition. Here Wolfram claims to simplicity is having the least number of axiom, even if that axiom is very complicated.

Unfortunately, that is a perversion of the idea of axiom. An axiom should be as simple as it can be and ideally self-evident. Being self-evident is a strong requirement because axioms are not proven but accepted as true.

Clearly, no-one would say that Wolfram's axiom is self-evident. As a matter of fact, even Wolfram does not find it self-evident: that it is equivalent and sufficient as a basis needed to be proven, via proving it can generate all other set of axioms.

Basically, once a field has matured enough and we found a simple set of axioms, one can come up with a new set. All set of axioms must encode the same information, so you can either have multiple simple one or a single complex one. The quantity of information that is encoded must be constant.

So having a single axiom is not simpler, except by the very naive measurement of count.

pierrebai··on Auto accidents and “isolation and disruption”
I found it weird that the article states things without any single data point, study or proof. They say media got it wrong, they claim the increased death are due to street design without any clue where they got that conclusion from. I'm weary of this, because sometimes people want to push agendas.
pierrebai··on Demystifying NaN for the Working Programmer
NaN is a cancer. The choice that NaN == Nan being false is just wrong. Every type, every variable can have multiple reason for being invalid. Yet, no other type has ever chosen to make invalid values not being equal to themselves.

Pointers can be invalid. They can be invalid for any number of reason. Lack of memory, object not found, etc. No one ever suggest that null should not equal null.

File handle can be invalid. They can be invalid for any number of reasons: file not found, access denied, file server is offline. No one has ever made invalid handles not being equal to themselves.

The justification for NaN not being equal to themselves is just bonk.

pierrebai··on Show HN: I made a web game called Almost Pong
Ever heard of Arkanoid[1] ? Your changes maps pretty much to what the bonus pills did in Arkanoid. Some possibility in Arkanoid that you did not mention in your version:

   - Makeing the paddle wider or narrower
   - Multi-ball
   - Capturing / releasing the ball when it hits the paddle.
   - Destructive ball (pass through walls)
   - Extra life
[1] https://www.classicgame.com/Arkanoid
pierrebai··on The Dubai Debt Trap
Does the USA:

1) Arrest you without telling you why? 2) Give you no access to a lawyer? 3) Give you no access to translation? 4) Have a debt system in prison, forcing to pay with money you don't have? 5) Retroactively apply laws? 6) Extend imprisonment indefinitely on made-up charges? 7) Ruled by a monarchy?

All the things you list boil down to pointing out the US system is imperfect, not that the system is bad by its very nature and design. UAE cannot be fixed without changing its ruling and legal system. The US can be fixed by improving its existing systems to make them more fair.

Also, the reason you point the failing of the US systems is because media is reporting on those failures. Not foreign media, local ones.

pierrebai··on How UTF-8 Works
No software decodes data by reading a stream byte-by-byte. Like I said in a previous comment, decoding 4 bytes using SIMD is possible and probably the best way to go. Furthermore, to actually decode, you need bit twiddling anyway, so you do need to do byte-processing. Finally, the inner loop of detecting character boundary is simpler: the UTF-8 scheme, due to the variable-length prefixes, requires to detect the first non-1 bits. It is probably written with a switch/case in C, vs two bit tests in my scheme. I'm not convinced the UTF-8 ends-up with a faster loop.
pierrebai··on How UTF-8 Works
How often are stream truncated at the start? In my career, I've seen plenty of end truncation, but start truncation never happens. Or, to be more precise, it only happens if previous decoding is already borked. If a previous decoding read too much data, then even UTF-8 is borked. You could be decoding UTF-8 from the bits of any follow-up data.

Even for pure text data, if a previous field was over-read (the only plausible way to have start-truncation), then you probably are decoding incorrect data from then on.

IOW, this upside is both ludicrously improbable and much more damning to the decoding than simply be able to skip a character.

pierrebai··on How UTF-8 Works
"instantaneously" in the sense of first having to read the first byte to know how many bytes to read. So it's a two-step process. Given the current maximum length and SIMD, detecting the end-byte of my scheme is easily parallelizable for up to 4 bytes, which conveniently goes to 24 bits, enough for all current unicode code points, so there is no waiting for termination. Furthermore, to decode a UTF-8 characters needs bits extraction and shifting of all bytes, so there is no practical gain of not looking at every byte. It actually makes the decoding loop more complex.

Also, the human readability sounds fishy. Humans are really bad at decoding high-order bits. For example can you tell the length of a UTF-8 sequence that would begin with 0xEC at a glance? With my scheme, either the high bit is not set (0x7F or less), which is easy to see you only need to compare the first digit to 7. Or the high bit is set and the high nibble is less than 0xC, meaning there is another byte, also easy to see, you compare the first digit to C.

The quote also implicitly mis-characterized the fact that in my scheme an incorrect character would also not be decoded if interrupted since it would lack the terminating flag (No byte > 0xC0).

pierrebai··on Nerdle = Like Wordle but with Equations
That's because there are fewer letters. In wordle, ignoring the fact that the word need to exists, you could make 5 guesses with 5 new letters each time and still not quite exhausting the letter space. With the math one, in two guesses you can figure out the digits.

Also, I play wordle in the hardest mode, which forces you to always reuse known letters, which makes it a lot harder. (I also playu in a clone with an extended vocabulary here: https://www.arachnoid.com/wordgame/index.html)

pierrebai··on Nerdle = Like Wordle but with Equations
I get the same feeling as everyone. There is no point in the game because even a single digit wrong is no clue at all. In my 1st and only attempt, I entered 1 + 2+ 8 = 11 and both pluses, the 2 the 1 and the 8 were right, with only the 2 in the wrong position. And yet that gave zero clue to what the other number was... and it turned out to be another 8, which made finding the solution really luck-based.
← PreviousPage 4 of 15Next →