Better HN
topnewbestaskshowjobs
Log inSign up

cocok

26 karma · joined Aug 2, 2024 (2y ago) · 25 submissions

Submissions

comment 2y ago · link · parent

> Is there any way to get push notifications instead of polling?

Push support has been there for a long time now. You can enable it on a per-folder basis, check in Manage folders.

comment 2y ago · link · parent

> Remember that big hot war in the 90s?

Ah, when the Servians shot down the invisible airplane, because they didn't see it. I remember :-)

comment 2y ago · link · parent

The teachers misspelled Serbia and Romania, but expect little American kids to know where these are.

comment 2y ago · link · parent

There are a couple of other worthy jokes in the text, BTW.

comment 2y ago · link · parent

For Firefox:

https://github.com/mozilla/video-bg-play

comment 2y ago · link · parent

filter-repo is the recommended way these days:

https://github.com/newren/git-filter-repo

comment 2y ago · link · parent

> Poland imports slightly more from Germany than it exports to it

Why do they import/export the same product between each other?

Honest question. In general, not just about Poland and Germany.

comment 2y ago · link · parent

I saw an asphalted road on the mountain ridge, along the E-3 hiking route, in a national reserve territory, with a EU funding sign saying that it was built "for the benefit of the local species".

The road leads to a chalet, and the only one who it benefits is the chalet's owner, making it easier for his drunkard customers to drive right to it on the weekends, with zero walking involved.

comment 2y ago · link · parent

The mass surveillance in question will likely lead not to an "everyone knows everyone" society like that in your story, but to a "the government and the big corporations know everyone" one.

comment 2y ago · link · parent

I don't know, quality of modern life degrades after 30 for many of us. After living with chronic diseases for a decade or two, I kinda envy the hunter-gatherers.

Die quickly at 30, with 10 children and some grandchildren even. Sounds like mission accomplished to me.

comment 2y ago · link · parent

I wouldn't say either is better "usually", it really depends on the situation.

If the next five words begin with the same prefix (happens to me), searching will be wasteful. Just spamming "w" is easier.

But when there's something really distinctive (often, punctuation) near the position I'm aiming for, I'll definitely use search.

That's one of the reasons I prefer BRE over ERE/PCRE when editing text interactively - I can search for punctuation in code without having to backslash-escape it.

comment 2y ago · link · parent

i programmed things for fun for months on end without having an internet connection. never had the need to share. occasionally I needed connection to download papers on the subject.

comment 2y ago · link · parent

NSA are not ready with the backdoor yet. Once done, NIST will include MRNG in the next standard.

comment 2y ago · link · parent

Feels like I'm reading this classic, but with cryptography examples.

https://www.tcl-lang.org/doc/scripting.html

comment 2y ago · link · parent

> You mean brought up to be Muslims. No one is born with religious beliefs or faith.

In Islam, it is common belief that all people are born Muslim, then their parents may choose to lead them away into another religion.

That's why for people who convert to Islam later in life (muallaf) it is sometimes said that they reverted.

> Every child is born with the fitrah, but his parents make him a Jew, Christian or a Zoroastrian. ~Al-Bukhari

comment 2y ago · link · parent

> My pet tinfoil-hat theory is that he decided that staying in a French prison is safer for him than being out in the open

People do that.

Recently, the Bulgarian drug lord nicknamed Brendo not only surrendered, but somehow bribed border control to let him in the country so he can show up directly in front of Sofia Central Prison, with a duffel bag, ready to be taken in. He wanted to skip the bureaucracy and go behind bars ASAP.

comment 2y ago · link · parent

"We all began as something else."

comment 2y ago · link · parent

I'm stealing this for all my future code reviews.

comment 2y ago · link · parent

Taking a gulp or two from the bottle should be enough of a differentiator, IMO.

Are there edible explosives?

comment 2y ago · link · parent

> Why would you ever do that? What's the point?

Performance, mostly. If you have to re-parse part of the code many times a second, in a text editor. For [pseudo]structural editing or syntax highlighting, for example.

comment 2y ago · link · parent

I stopped at 1.1 Notation. Full of arbitrary-looking decisions on which characters can be used for what.

It's 2024, and we still don't have a string notation that doesn't use the same character for opening and closing delimiter. If I start parsing from an arbitrary offset in the code, I can't say whether a double quote I read is the beginning of a string, or the end of one. I have to either resort to heuristics, or parse from the beginning of the file (at least once; and then cache offsets known to be outside a string). Something like "() would be nice. Still the familiar double quote, but the grouping is defined in a grammatically-superior way.

Also, still no identifiers that can start with a digit. Most of the mainstream languages have such complex grammars, probably requiring hand-coded parsers, but I can't have a "52cards" identifier. Is this really that hard compared to everything else?

Now, I'm self-taught and all. Maybe I'm missing something and the professors are right.

comment 2y ago · link · parent

> Why would a doctor not first test and treat the common things, rather than do an invasive procedure?

For the money he/she would get for doing the invasive procedure. This happens even in developed countries.

comment 2y ago · link · parent

Thanks a lot for taking the time to explain!

comment 2y ago · link · parent

Can anyone familiar with Go explain why not

  return sayThanks(thanksStr)
I've seen this "if err != nil" pattern before, but I can't help thinking that it's not necessary.

"return ret, nil" ignores err's value, which is nil anyway.

"return nil, err" ignores ret's value, but why? If the caller checks for err before doing anything with ret, it doesn't hurt having ret always passed up.

4 extra lines only to lose the value of ret in case of error.