HNHacker News
TopNewBestAskShowJobs

nanis

3,002 karma · joined December 13, 2014

Submissions/comments/upvotes are not endorsements. Opinions my own; they do not represent current, past, or future employers/clients etc.
submissionscomments
nanis··on $1 Microcontrollers (2017)

    <script type='application/ld+json' class='yoast-schema-graph
     ... 
    "datePublished":"2017-07-17T01:31:05-05:00",
    "dateModified":"2017-11-18T18:07:56-06:00"}]}
nanis··on Why I Like Java (2014)
The author is MJD. He is, among other things, the author of one of the best functional programming books[1].

> I was a professional Java programmer for three years (in a different organization), and I have meant for some time to write up my thoughts about it. I am often very bitter and sarcastic, and I willingly admit that I am relentlessly negative and disagreeable, so it can be hard to tell when I am in earnest about liking something. I once tried to write a complimentary article about Blosxom, which has generated my blog since 2006, and I completely failed; people thought I was being critical, and I had to write a followup article to clarify, and people still thought I was dissing Blosxom. Because this article about Java might be confused with sarcastic criticism, I must state clearly that everything in this article about Java is in earnest, and should be taken at face value. Including:

> I really like Java

> ...

> So yes, I enjoyed programming in Java, and being relieved of the responsibility for producing a quality product. It was pleasant to not have to worry about whether I was doing a good job, or whether I might be writing something hard to understand or to maintain. The code was ridiculously verbose, of course, but that was not my fault. It was all out of my hands.

[1]: https://hop.perl.plover.com/

nanis··on What Every Programmer Absolutely, Positively Needs To Know About Encodings (2011)
> This is an outcome of the historic process which gave us modern Unicode.

That historic process does not preclude introducing two extra codepoints to at least allow for the possibility of correctly encoding the upper case of "ı" and the lower case of "İ".

nanis··on What Every Programmer Absolutely, Positively Needs To Know About Encodings (2011)
> Exactly. Unicode’s “job” is to provide a code point for every letter

And in this case Unicode fails catastrophically by not providing codepoints for the uppercase of "ı" and the lowercase of "İ" while potentially allowing for ethnically sensitive renderings of shit.

nanis··on What Every Programmer Absolutely, Positively Needs To Know About Encodings (2011)
That is baloney ... The fact is Unicode could have provided extra codepoints so that at the least the possibility of correctly processing a mainly French document that includes passages in Turkish at least existed.

The current state of affairs categorically rules that out it contrary to the situation with any other language.

nanis··on What Every Programmer Absolutely, Positively Needs To Know About Encodings (2011)
> "one code point in unicode does not necessarily map to one character on the screen."

Also, importantly, some characters are not represented at all. For example, there is no codepoint or combination of characters that distinguishes a capital Turkish dotless I from its identical looking but conceptually different sibling the Latin capital I. Similarly for capital Turkish dotted İ.

I find it extremely weird that two codepoints couldn't have been spared, yet we have gradations of skin tone in emoji. One can use composition to deal with the round-trip from i -> İ -> i (within a closed ecosystem), but even that fails when it comes to ı -> I -> ı.

A case in point are the product pages for my friend's book on Amazon. Compare "Sınır Ötesi" to "Sinir Ötesi". The former means "beyond borders" whereas the latter means "exceedingly irritating".

Yet, because there is no unambiguous representation of the Turkish I's, the rendering makes an assumption on the basis of the domain. Note that all other non-US ASCII letters involved are rendered correctly.

\c[PERSON FROWNING, ZERO WIDTH JOINER, PROGRAMMER]

[tr]: https://www.amazon.com.tr/Gezging%C3%B6z-S%C4%B1n%C4%B1r-T%C...

[us]: https://www.amazon.com/Gezging%C3%B6z-Sinir-T%C3%BCrkiye-Mir...

nanis··on Retrospective and technical details on the recent Firefox outage
> If you read the whole post, ... (and so you could avoid the issue by turning off telemetry)

Speaking of reading the whole post:

>> users who disabled Telemetry would see this problem resolved even though the problem is not related to Telemetry functionality itself and could have been triggered otherwise.

This does not make sense to me:

>> Without the header, the request was determined by the Necko code to be complete,

This is written as if it makes sense to treat a request as "complete" when it's missing a content length header. Huh?!

nanis··on Noblesse Oblige
It seems to me that the poster views this belief favorably. For that, I will ponder how well the poor lived under the "nobles". At least, during the feudal times the offer of protection from the feuding lords and sharing of the chateau's cellars during lean times meant something.

This quotation from the article

> In ethical discussion, the term is sometimes[citation needed] used to summarize a moral economy wherein privilege must be balanced by duty towards those who lack such privilege or who cannot perform such duty. Recently, it has been used to refer to public responsibilities of the rich, famous and powerful, notably to provide good examples of behaviour or exceed minimal standards of decency.

lays bare the naivete of people who in these days think it is better to solicit the sympathies of our betters.

At it's core, "one must share one's bounty with the rest of the group" or "the group provides implicit insurance to other members of the group" only "work" among small groups of relative equals who can monitor each other.

Delegation of monitoring, distance between the helper and recipient, and the ability to get by without effort in complicated social insurance schemes destroy everything about small group members' ability to mutually insure each other with a foundation of trust.

Is it because the phenomenon of such complicated social insurance schemes leading to shrinking total resources and formation of a permanent group of recipients has become visible that people who think redistribution is the solution to all problems are now trying to cast it as something the very few very rich ought to follow in the footsteps of feudal lords?

Or is it a way to formalize the relationship whereby a bazillionaire can ensure loyal support so long as the lifestyles of journalists and activists are well supported?

nanis··on Nonparametric Confidence Intervals
This is a well-reasoned exercise about constructing confidence intervals for the population rating for a product from individual ratings observed thus far. It doesn't do well with bi-modal (e.g. 100 `1` ratings and 100 `5` ratings) but then I don't think most methods do. Arguably, the confidence interval in that case ought to cover the entire range of values.

Apart from that, this is one of that rare breed of Stats related posts that correctly describes the concept of a confidence interval/set. I do not know why it was flagged. It should not have been.

nanis··on Show HN: Simple Wordle solver in command line in Python
My cheat script will not help with refactoring your code, but note that with a helper data structure, you do not need multiple passes over the guess to mark each letter in one of three states. Write down the process in human language first, then write the code to do the thing instead of immediately diving into the code and rearranging it until it produces the desired result.

These exercises are great at improving your intuition and aptitude for refactoring code in a way that makes it more maintainable, easier to read and reason about.

nanis··on Show HN: Simple Wordle solver in command line in Python
Correction: I thought this was script to solve Wordle puzzles, so I provided a cheat helper below. At first blush, I thought the idea was for the human to feed this script information back from Wordle so it could improve its guesses. Sigh

Also, you really need better names for your methods and variables, starting with this bit here: https://github.com/KevinXuxuxu/wordle_machine/blob/64a8534ad...

As you think about a better way to name those, you will realize it is possible to do this in a much less convoluted way.

Hmmm, I have been using this Perl script:

    #!/usr/bin/env perl

    use strict;
    use warnings;

    use feature 'say';

    my @words = grep # Add conditions below 
        !/^[A-Z]/,
        grep length == 5,
        map split, do { local $/; <> };

    say for @words
Invoke it from the command line with your word list. I've been lazy, so I use `./wg /usr/share/dict/words` which means way more options than a more tailored word list would give which means I am only cheating a little. So, for example, I type "amber" as my first move and I am told "e" is in the wrong spot and none of the other letters match, I update the selection using that information:

    my @words = grep # Add conditions below
        !/^...e/  &&
         /e/      &&
        !/[ambr]/ &&
        !/^[A-Z]/,
        grep length == 5,
        map split, do { local $/; <> };
nanis··on Dordle, a Wordle Variant
I have to say it lacks the immediate clarity of the original. I found both the layout and what happens with the keyboard under the game boards confusing. Also, please explain what the rules are :-)
nanis··on How will the correction in the stock market impact startup fundraising?
Why do you think the stock market indexes are crashing as inflationary expectations are being entrenched?
nanis··on Google Camera randomly changes some QR code URLs on Android 12
The comment to which I was replying said "the end of the URL". Adding the period at the end of the domain name is not the same as adding it at the end of the URL. I responded to what was actually said.
nanis··on Google Camera randomly changes some QR code URLs on Android 12
> Technically speaking, adding a period at the end of a URL is valid in that it implicitly exists for all URLs in the context of DNS.

I think your are confusing the role of a trailing dot in the DNS[1] system with the role of a host element in a URI[2].

So, technically speaking, adding a period at the end of a URL is really not OK because `https://example.com/index.html` and `https://example.com/index.html.` are different resources. (note that HN's URL linking logic omits the trailing dot.)

I can understand if you think there should be no difference between `https://example.com/` and `https://example.com./` and that is legitimate per the RFC:

> The rightmost domain label of a fully qualified domain name in DNS may be followed by a single "." and should be if it is necessary to distinguish between the complete domain name and some local domain.

but there is no reason to expect that adding a period at the end of any old URI is going to work.

[1]: https://serverfault.com/a/18122

[2]: https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2

nanis··on How will the correction in the stock market impact startup fundraising?
Apart from the stock market, you have to take into account the persistent inflationary environment that is being created.

Inflation shortens horizons. The usually impatient early investor becomes more impatient as the uncertainty surrounding the value of a dollar that might be earned years hence becomes greater and greater. Therefore, people's appetites for projects that might pay off in 10 years fall in favor of projects that might pay in five. Their appetites for a five for a five year horizon fall in favor of projects that might pay off in three. And, those fall behind projects that might pay off in a year which fall out of favor in as people seek something that will pay off this quarter.

So, if you are working on something that will pay off immediately, you're good.

nanis··on No amount of alcohol is good for the heart, says World Heart Federation
> Such empty discourse absent of falsifiable statements is more damaging to our society than a glass of wine ever could be.

Hear, hear.

    Ah, make the most of what we yet may spend,
    Before we too into the Dust Descend;
    Dust into Dust, and under Dust, to lie,
    Sans Wine, sans Song, sans Singer and—sans End!
The textbook I used when I was teaching "Economics of Regulation"[1] emphasizes the fact that trying to drive individual risks to zero (acting, in the process, as if there is never a cost to trying to reduce risk) is a fool's errand.

Viscusi's "Pricing Lives"[2] is a great work. "VSL (value of a statistical life) is the risk-reward trade-off that people make about their health when considering risky job choices." Once you understand that, you understand how one ought to reason about whether one policy is better than another. Once you understand that, you come to the realization that the actual policies implemented bear no resemblance to the policies that ought to have been implemented in light of a rational cost-benefit calculation.

[1]: https://mitpress.mit.edu/books/economics-regulation-and-anti...

[2]: https://press.princeton.edu/books/paperback/9780691208596/pr...

nanis··on Roblox October Outage Postmortem
> 50th percentile

I would normally not call this out, but it is repeated so often in the text that it is jarring. Just call it "median" as it is everywhere else, please.

On the other hand, I must commend the author(s) for not using "based off of" :-)

Great write-up, otherwise.

nanis··on Medical masks increase facial attractiveness more than other face coverings
It seems early commenters missed the point of me posting a link to the original story. :-)

It ought to lay bare how a survey that says "people who think we should wear masks all the time think masks are better than other face coverings" translates into press releases and media stories.

nanis··on We need a greener way to die(2019)
No, thank you. "We" don't need it. But, ideologues who want to lose all connection to the past and tradition need one more lever to pull it seems.
nanis··on Ctcctcggcgggcacgtag is unique to both SARS-CoV-2 and Moderna's 2015/2016 patents
> How are you calculating those odds?

I truly have no idea what the answer is, but as someone well versed in economics, econometrics,and statistics, to me the relevant odds are not about independent coin tosses etc. I would like to know P(A|B) where:

A: sequence of 30 nucleotides appears in a virus identified in nature

B: sequence appears in a patent application that predates discovery in nature

Seems to me that would involve a whole bunch of arithmetic, but that ought to be calculable using this database.

nanis··on I went back to using a ThinkPad from 2012
I did not know there was a name for this[1].

I am regularly using a T400 which started life as a Lenovo 3000 N100.[2]

Upgrades since then include a 2 TB SSD, 3.06 Ghz CPU, and WiFi.

I do enjoy tinkering, but I also like the keyboard :-)

[1]: https://en.wikipedia.org/wiki/Ship_of_Theseus

[2]: https://www.nu42.com/2016/12/another-one-bites-the-dust.html

nanis··on Universal Coronavirus Vaccines – An Urgent Need
This is significant for a few reasons: 1) Coronaviruses have been with us for a long time and will be with us for even longer and the notion of a "universal coronavirus vaccine" does not seem realistic at all (I am not so sure it is that desirable either); and 2) The claim that "Finally, we urgently need universal coronavirus vaccines" seems as vacuous as the claim that the vaccines were gajillion percent effective. As Cornell reports in a tiny footnote[1], the only reason they are discovering a lot of these cases is because of constant surveillance testing. Who knows what else would one discover if every day one got tested for every known infectious agent?

If a whole lot of people who test positive never get sick, does it matter that they tested positive?

Is it better to focus on treating people who get sick without killing them and not destroying the lives and livelihoods of others while accepting that we are all going to die of something?

[1]: https://covid.cornell.edu/testing/dashboard/

nanis··on AWS us-east-1 outage
> * Depending on the service one customer's experience is not the broad experience. Someone might be having a really bad day but 99.9% of the region is operating successfully, so there is no reason to update the overall status dashboard.

https://rachelbythebay.com/w/2019/07/15/giant/

nanis··on Turandot and the Deep Indo-European Roots of “Daughter” (2020)
See also https://en.wikipedia.org/wiki/Turan
nanis··on UK vaccine effectiveness doubtful due to serious inconsistencies in statistics
The fact that authorities have been including in the "unvaccinated" people who

* had their first shot and waiting for the second (three weeks)

* had their second shot less than two weeks prior

has been a sticking point to me since early summer.

We do not know how many of the "unvaccinated" were simply vaccinated people who were not considered "fully vaccinated" and that makes a difference.

CDC was presenting some information about breakthrough cases among the "fully vaccinated" but they stopped doing that. For previous data and snapshots of what they put up, see <https://www.covid2020.icu/vaccine-breakthrough/> and <https://github.com/nanis/covid19-breakthrough>.

nanis··on One way a builder culture can fail
Completely imaginary conversation ...

> Look Mr. C-level, I built this amazing tool. Look at the graphs it produces. It allows _the_ user to customize parameters, track new things, and basically makes unicorns excrete rainbows.

> OMG, I don't know the first thing about how computers work, but I love colorful pictures and unicorns. You are amazing. And, this is the first time you tried this stuff?

> Yes, but these jerks over there, they won't put it on the web! They say it is insecure, risks revealing confidential data to the whole world, and can be used to infiltrate the company network.

> But these are the best colorful pictures I've seen. Off with their heads!

nanis··on Lazygit: A simple terminal UI for Git commands
I tried (just like I tried a whole bunch of other things). I get this both in `cmd` and in `ConEmu` on Windows 10 Pro-64 bit (Version 10.0.19043.1387). After the crash, all the enhanced console functionality is gone.

    panic: '%' is not recognized as an internal or external command, operable program or batch file.

    goroutine 39 [running]:
    github.com/jesseduffield/lazygit/pkg/commands.(*BranchListBuilder).obtainBranches(0xc00039bef0, 0x1367340, 0x10000, 0x0)
    /home/runner/work/lazygit/lazygit/pkg/commands/loading_branches.go:43 +0x693
    github.com/jesseduffield/lazygit/pkg/commands.(*BranchListBuilder).Build(0xc0000dbef0, 0x11315f7, 0xc0000a4690, 0x1326e87)
    /home/runner/work/lazygit/lazygit/pkg/commands/loading_branches.go:103 +0x52
    github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshBranches(0xc0000b8000)
    /home/runner/work/lazygit/lazygit/pkg/gui/branches_panel.go:69 +0xc6
    github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshReflogCommitsConsideringStartup.func1()
    /home/runner/work/lazygit/lazygit/pkg/gui/commits_panel.go:69 +0x45
    github.com/jesseduffield/lazygit/pkg/utils.Safe.func1(0xb35af5, 0xc000055da0)
    /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:95 +0x2b
    github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0xc00039bfb8, 0x0, 0x0)
    /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:106 +0x67
    github.com/jesseduffield/lazygit/pkg/utils.Safe(0xc00008aa40)
    /home/runner/work/lazygit/lazygit/pkg/utils/utils.go:95 +0x50
    created by github.com/jesseduffield/lazygit/pkg/gui.(*Gui).refreshReflogCommitsConsideringStartup
    /home/runner/work/lazygit/lazygit/pkg/gui/commits_panel.go:67 +0xa9
Before the crash, the UI is drawn reaaaaallyyy slowly (my cmd window is 170 characters wide -- maybe that's why)

In any case, I prefer to stick with the command-line.

nanis··on Israel’s spy agency will track Omicron patients’ phones, at least thru Thursday
Thanks for pointing that out ... Here's the link I copied from the page:

https://www.nytimes.com/live/2021/11/29/world/omicron-varian...

I am not sure why but the submission URL is missing the last part.

Here's the content:

> The Israeli domestic intelligence agency has been granted temporary permission to access the phone data of people with confirmed cases of the Omicron coronavirus variant in order to trace who those people met recently. The agency was given similar powers during earlier waves of the pandemic.

> Using emergency legislation, the Israeli cabinet voted on Sunday to permit the spy agency, the Shin Bet, to track Omicron patients’ phones until the end of the day on Thursday — but not to access the phone records of people infected with other forms of the coronavirus.

> The Israeli Parliament is expected to vote this week on new legislation that would extend the permission by another two weeks, and allow it to be renewed every two weeks thereafter, a spokeswoman for the Israeli prime minister said.

> The government and its supporters said the decision was necessary to quickly identify potential virus carriers who need to be tested and quarantined, in order to curb the spread of the new variant.

> “We have indeed reached a point at which we do need a ‘Big Brother’ keeping track of where we go,” Limor Yehuda, a criminology professor, wrote on Monday in Maariv, a centrist newspaper.

> Critics said the move infringed civil liberties and contravened a Supreme Court decision last March. The court ruled then that the agency could use phone data in this way only to track people who had refused to comply with contact-tracing procedures.

> “No other democratic country has chosen to use its security service to track people,” Gil Gan-Mor, a rights lawyer, wrote in Maariv on Monday. The renewal of Shin Bet tracking was “a terrible, illegal decision,” he added.

> Critics of the step pointed to government data showing that, during an earlier wave of the pandemic, the overwhelming majority of coronavirus patients were located by human trackers, rather than through the Shin Bet monitoring program.

> Other parts of Israel’s response to the Omicron variant were shaped by the experience of a governmentwide coronavirus “war game” earlier in November. In that exercise, senior government officials, including Prime Minister Naftali Bennett, tested potential responses to a hypothetical new strain of the coronavirus.

> Keren Hajioff, a spokeswoman for Mr. Bennett, said that the participants realized during the latter stages of the drill that they should have closed borders far earlier in the exercise. “So those insights were taken into account when they made the decision to close Israel’s borders to foreign tourists” on Saturday night, soon after the discovery of the Omicron variant was reported, Ms. Hajioff said.

> — Patrick Kingsley

nanis··on Cantor was Wrong: debunking the infinite set hierarchy (2019)
Why? Are people with Ph.D.s not allowed to attempt humor on April Fools'?
← PreviousPage 3 of 34Next →