skysight-inc/HackerNews huggingface dataset:
Hi, I'm a Redux maintainer. FWIW, there's apparently a ton of ways to handle typing Redux with TS (and that's even reflected in the discussion for the PR that added that page [0]). A large part of it seems to revolve around whether or not you're trying to apply action types to `dispatch` to limit what actions can be dispatched.

I'm comfortable with TS at a general level (declaring interfaces for API types, reducers, and React component props), but a lot of folks seem to go crazy trying to get 100% type coverage. I personally aim for more of an "80%" sweet spot for typing - trying to trade off overall benefit with not trying to tie myself in knots adding ridiculous type declarations.

I actually just wrote a tutorial page for Redux Starter Kit that shows how to use it with TS and `useDispatch` [1], but had someone point out that one of the examples I was using for thunks was losing a bit of type safety [2]. This stuff is hard :)

[0] https://github.com/reduxjs/redux/pull/3201

[1] https://redux-starter-kit.js.org/tutorials/advanced-tutorial

[2] https://github.com/markerikson/rsk-github-issues-example/pul...
> ReasonML is also just Javascript in the end

It's not, it's a mere syntax rewriter for OCaml. OCaml has default native target, bytecode target, and two JS transpilers.
Ahh, thank you. :)
Hmm ... I have never though about the masks and just assumed they would cover the nose "automatically" and I would maybe do the same thing.

Which such small masks, people probably believe they are doing something wrong when they are not tight against the skin (like a gas mask or scuba mask) and then puts them over the mouth where they fit tightly.

The mask people probably have experience with are scuba mask or gas masks and they both need to fit tightly.
Inflation would be very welcome right now. Zero interest-rate policy (ZIRP) seems to be the new normal, and I believe its largely due to increasing wealth inequality which is creating deflationary pressures in our economy (the wealthy can only consume so much, most of their money goes into savings).

Also hyperinflation seems very unlikely with the amounts being discussed. Under an ideal UBI. Existing welfare programs would get replaced with the UBI, so that would have a neutral impact on the economy (and if UBI eliminates the welfare trap it could actually be a positive for the economy). The UBI would be a net benefit for those that are currently severely under-employed or unemployed but don't qualify for any welfare programs. But the UBI amounts proposed are fairly small, so would likely only result in a very small increase in demand for food and housing. And we have more than enough food surplus, and plenty of housing surplus in poorer areas of the country that this seems like a non-issue.

[1] https://en.wikipedia.org/wiki/Zero_interest-rate_policy
Actually, you missed my point. I was not talking about the article's author, I was talking about the Chinese developer who "fixed" the code, that triggered the entire avalanche in the code repository.
Xkcd Forums Been Hacked
Primary source is at the top of HN:

https://news.ycombinator.com/item?id=20876248

https://brave.com/google-gdpr-workaround/

Good to see wider coverage though!
I suspect that GP was riffing on typical responses from a therapist chat-bot.

https://en.wikipedia.org/wiki/ELIZA
Advertisers aren't going to pay more than the traffic is worth. If 1/2 of your advertising is going to people who would never be interested in the product and you can cut that group out you're willing to pay approximately 2x as much. If all users were equally of interest to all advertisers this wouldn't matter, but that's very much not the case.

Imagine you're a publisher, and your audience can be divided as 50% coffee drinkers and 50% tea drinkers. Without tracking, you have advertisers each paying you $X to run site-wide ads, while with tracking you can get closer to $2X because the coffee sellers target only the coffee drinkers and the same with tea.

(Disclosure: I work for Google on ads, speaking for myself)
Thank you for the informative and thorough explanation!
Thanks. Another stupid question: how can two index funds have different returns? Are they following different indexes?
Same. Didn't save the code; wish I had just so I could see if I got a better execution time than his 1439 second example.

Amusingly, my rationale was much like the author's; I freakin' hate Sudoku. So the fact it's such an obvious candidate to have an automated solver for meant I wrote one (it was also an excuse to do something more meaningful than the intro to CS exercises that class had me doing).
That's exactly what I'm aiming. A tool to empower small, focused teams to create, measure and gather feedback in small loops. ShipIT now has different MVPs to test different hypothesis, but for the moment the "Suggestions" feature seems to be the one that I'm going for. And, it's the one that I use in my day to day work.

Let me know if you have any questions!
Thanks for the reply.
Fede.
Avoiding detection of the use of AWS compromised credentials
I’m quite sure this is a response to https://news.ycombinator.com/item?id=20874470 submitted earlier today. I don’t believe there was any malicious intent there, but it’s yet another safety issue in C that anybody tells me they are aware of, that it would never happen to them and that memory safety issues are things that only happen to other less experienced programmers.

I must only know the cream of the crop of C programmers /s
Regarding programming paradigms, at least one very important consequence of the completeness theorem is that first-order logic can be used as a formal basis for computation.

This is because you can model what a Turing machine does via predicates in first-order logic, describing a relation between states of the machine.

The completeness theorem tells us that every semantic consequence of a first-order theory (with a well-orderable language) can be derived syntactically. This means that to derive results of the computation, we only have to systematically search for proofs. Due to the completeness theorem, we know that we won't miss anything (i.e., a result of the computation) that is actually the case.

An immediate application is an important programming paradigm called logic programming. See for example Prolog, Mercury, and other languages that are based on this idea.
We are also free to point out the obvious nonsense that is extrapolating the axioms of arithmetic, on which the theorem depends, to whatever we want them to.
Ask HN: How can I comply with GDPR as a solo founder?
I am based in the USA, and am hard at work on building services for my company. My goal is to launch and have customers by the end of the year.

While I 100% support GDPR, I do not know anyone within the EU who could act as a Data Protection Officer or EU representative for privacy concerns. I am funding myself at this point, and don't really want to shell out hundreds of dollars to some law firm just because they have an address within the EU. Outside the EU, I plan to handle support concerns on my own (for the time being).

What are my options here? My initial thought is that I will just have to prevent those living in the EU from using my service, which is unfortunate.
What Is Shamir Backup?
C implicitly changes among numeric types without requiring any conversion operator.

Parameter passing works much like assignment. Just like you can assign an int value to an unsigned int variable, you can pass an int argument to an unsigned int parameter.

There is free conversion among char, int, long, and the floating-point types. For instance int x = 1.0 is valid.

Many of these converisons have implementation-defined behavior if the value doesn't fit into the range of the destination type. Assigning a long long to a char where the value does not fit, for instance.

In an integer-floating conversion or vice versa, if the value does not fit, the behavior is undefined. No diagnostic required. E.g. the program can die with a "floating point exception", or just putter along with a random incorrect value.

The conversion rules themselves are implementation-specific because the sizes and ranges of the type vary, as well as certain details like whether plain char is signed or not.

For instance, if int and long have the same range (e.g. both are 32 bits wide), then converting any value between them is well-defined. If they don't (e.g. 16 bit int, 32 bit long), then converting long to int can truncate.

Some things can be counted upon: signed char will convert to short without loss; short to int, int to long, long to long long. Also float to double.
I'm not sure how fees are unchecked. Active management fees have fallen quite a bit over the past 5+ years. A lot of mediocre managers have gone out of business and many more probably will as well. Additionally, new fund launches are near all-time lows.
My Honor 7 has been doing that for 3 years, Android 6.

It's called a pre shared key for a reason.
That sounds like the sort of decision made as time to meet the launch deadline ran low, with the intention of circling back and fixing it over time. The result is that the text and imagery does get bigger and easier to read but it's not yet optimal.

I have no insight into their dev process but this theory can make sense based on my experience working in the industry.
The correct fix is to change the type of the argument to allocatebufs to size_t. Casts are a code smell, and often the best way to fix these warnings is to work your way backward through the code fixing up the types to something more appropriate. Ideally you'd reach the point where someone could induce a negative value, but in any event simply changing the argument type would have sufficed to safeguard the limit check.

That said, the latest release of glibc would have failed on a negative expression promoted to unsigned:

> Memory allocation functions malloc, calloc, realloc, reallocarray, valloc, pvalloc, memalign, and posix_memalign fail now with total object size larger than PTRDIFF_MAX. This is to avoid potential undefined behavior with pointer subtraction within the allocated object, where results might overflow the ptrdiff_t type.

https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html

The new glibc behavior doesn't help with the multiplication overflow, though, as it could have wrapped to a positive value (notwithstanding the fact that such wrapping is undefined). Which is why if I saw code like this I would've worked my way back to all the call sites to understand why the argument to allocatebufs wasn't size_t to begin with. Maybe they were C++ programmers--for decades "best practice" in C++ was to use int for the size of objects.

Arithmetic overflow leading to potential buffer overflow is still a problem even in languages like Rust. Nobody should ever add an integer cast somewhere without having done their due diligence. Which is why stricter arithmetic type checking can sometimes be a double-edged sword--too many people will add an explicit cast and move on.
In the late 90's I worked for an email server software company. Since then, almost 20 years now, I've been running my own mail server. I wouldn't say it is hard so much as a PITA and very time consuming. I spend quite a bit of time reviewing logs making sure that my server has not gotten hacked or compromised in some new way.

Over the years, a new exploit type comes along, like backscatter, that I then have to figure out how to secure my server against. And I'm also very proactive at reviewing logs and banning IP's against the constant barrage of probing. I must spend a few hours a week dealing with the mail server.

And then there are periodic "someone isn't getting my mail" problems that I have to track down, where Yahoo or pacbell.net or some other large mail system decides that my server is insecure for some reason, despite not being on any DNS RBLs (which are also sometimes a problem for no good reason).

If it weren't for the fact that I have so much more flexibility and ease-of-use on my own mail server for setting up many domains and multiple email addresses, I would move everything to a provider and not manage it myself.
Can't you just offer a DNS service that does that?
Not my monkey, not my circus.

Here's a way to avoid having to deal with restrictions on the funds raised from people: become a regular company that sells a product.
This looks interesting, as I don't need "conversation-level" ASR, I'd just need it to work with a limited grammar.

But I'm unsure of what Snips actually is - I had a look at the website, but I don't know if this is OSS, commercial software, a library or what?
I love it how with the Z3Py solver you just write down a few constraints (rows, columns, 3x3 boxes and the given values) and you immediately get an answer.

[0] https://ericpony.github.io/z3py-tutorial/guide-examples.htm

[1] https://yurichev.com/writings/SAT_SMT_by_example.pdf
This cnet article is really light on technical details. The feature described appears to be the Push Pages flow, documented in this Brave research article:

https://brave.com/google-gdpr-workaround/

Given that the CNET article is so light on details, I'm tempted to consider it as a duplicate of this more direct post, which has a lively discussion:

https://news.ycombinator.com/item?id=20876248
I'll try to find some English sources.

Arrest of social worker:

http://www.thestandard.com.hk/breaking-news.php?id=134091&si...

https://www.hongkongfp.com/2019/09/02/catastrophe-hong-kong-...

I might be misremembering the likelihood of being convicted with "riot", but from what I can remember, several people were convicted with riot in the 2016 unrest; they were later acquitted several years later through costly appeals.

Let's see how many gets convicted this time.
Content farms thrive by children's content on YouTube. Something similar could never exist on other curated platforms like TV just as a matter of scale. A content farm can put out 100 ten minute videos of the same type just by swapping out some assets and keywords. At least one of those will get somewhat popular. This is even more devious with MCNs where multiple channels group up but revenue goes to a single entity. If YouTube flags a single channel, it doesn't hurt the entire MCN so you can get around the spam filters that YouTube almost certainly has in place.
AWS is only selling you infrastructure as a service, not a turnkey solution. It's up to you to combine and coordinate these services into a solution that delivers the capabilities (including backup, recovery and fault tolerance) appropriate to your needs. So while you don't need to hire a team to take care of backups and redundancy, you do need to provision and configure what is required so that their team can.
Is it really? If Alice tells Bob she has diabetes and Bob tells Charlie, is Bob in violation of GDPR?
Ask HN: How to Commercialize “Internal” Products?
Hi,
I have been in a technical leadership role with a product (15yrs old) for 9+ yrs. I'm presently leading ~10 devs and report to a B level manager. We don't have clear mgmt and engg leadership tracks, so I fill in a lot of shoes currently.

Over the yrs there have been always interest from research group to commercialize our product. Our owner always thought that it was too customized for our environment and didn't think it could be productized. Recently executive mgmt has decided on commercializing it. Owner isn't interested in this and think that it has very little chance of success(given the avg success of start ups being pretty low). So, the mgmt has decided to spun off a different subsidiary.

The owner wants us to play no part in the new subsidiary. He thinks the new product will be a different fork and existing product as a enhanced (ahem heavily customized) version.
None of us can move to new subsidiary, only my manager has been moved over there.

Now I'm tasked with completely managing this team more of mgmt and less of technical leadership role). The team feels let down and think that the product could have been bootstrapped internally with the same team. It would have given a opportunity for us to learn new tech and possibly grow in career of the product were to be successful.

- What is a successful strategy in commercializing internal products like this?

- If you are an C-level executive, have made these kinds of decisions? What is the basis of it? When would you choose a different team ( beside technical skill)?

- If you are in my position, how do you work with fellow members who feel let down morally? And the product owner.

- Should I explore better alternatives of technical leadership roles like architect/staff engineer elsewhere? Suggestions?
WireGuard has also been extensively studied, and more than one academic paper has been written validating it.
Ah, somehow I missed that one. Thanks.

An interesting question to be honest. I'd somehow expect any prosecution to be far too complex for the parties to enjoy court.

Sure, you excluded yourself but then went to the casino after all. Did you do that because addiction caused you to misjudge the risks? Did you go there with the intention of defrauding the casino when you lost money? (Gambling establishments that fail to prevent self-excluded customers will have to refund their losses. And if they do that only after regulators get involved, there will be fines on top.)

Proving the nature of intent for that kind of violation could be very messy indeed.
This is 1st-order logic so it's a bit more complicated, though you're on the right track (what you stated is the completeness theorem for propositional logic, not first-order logic).

Rather than boolean values for the variables, you need to enumerate all possible...

* Ambient universes where the language is interpreted

* Values (taken from the ambient universe) for the constant symbols

* Sets-of-tuples-of-values (from the ambient universe) for the predicate symbols

* Functions-from-tuples-of-values-to-values (from the ambient universe) for the function symbols
I wonder if a slightly higher level explanation might help. If any real mathemeticians are around, please correct me if I'm inaccurate.

An alphabet is a set of symbols. Symbols can be combined by the operation of concatenation to form strings. Strings either satisfy a property of being a syntactically valid or not. Let those strings that satisfy the property of syntactic validity be called sentences. The set of all sentences that are syntactically valid is called a language.

I think the trick to understanding this particular theorem of Gödel is to know that in such formal systems there is a difference between semantic consequence (which is about truth) and syntactic consequence (which is about proof).

A sentence is provable if it is derivable from other sentences of the language by applying certain syntactic transformation rules (inference rules) to them. On the other hand, a sentence of the language is logically valid if it is true under all possible interpretations (sorting out what this means is what model theory does for you.)

If every sentence that is provable is logically valid then the system has the property of soundness. If every sentence that is logically valid is provable then the system has the property of completeness.

The systems are designed so that we only need to do this syntatic manipulation, much like algebra, to produce proofs, but we always have a map giving us the meaning of any given sentence. This is in fact what "formal" means in this context: that in proofs we're only looking at the form (syntax) of the sentences and not the interpretation/meaning (semantics) of any of the sentences.

To re-iterate: Something can be true but not provable, i.e. in any incomplete system. Something can be provable but not true, i.e. in an unsound system. If everything that can be proven is true, then the system is sound. If everything that is true can be proven, then the system is complete.

First-order logic is sound and complete.

Now when a system is extended with artihmetic, then due to Gödel numbering, it is suddenly capable of a form self-reference. This allows a system to state metatheorems about itself. If it can do this, then it is necessarily incomplete. In particular, it cannot prove its own consistency.
Are you going to wait for evidence that feeding garbage to your kids is bad for them before stopping it?
Why are so many people that paranoid. No one is gonna destroy your life because they saw your ads
"Don't worry about being evil"
Contrary to popular belief, performance is always a factor.

Every cycle your app wastes is a cycle another app can't use. It's a fraction of a watt that adds up over time, draining batteries faster, drawing electricity from the power grid and burning carbon fuels.

Each individual cycle may be cheap, but when we have a culture of development that doesn't respect performance, the waste adds up and has a real impact on the world. Just like all other resources, in aggregate, waste is harmful.

Even on the spectrum of "developer productivity", you have to seriously consider if the operational cost of needing beefier servers to run slow-language-X is less than the operational cost of hiring fast-language-Y developers.

I doubt anyone has done a serious study of the issue. Say C++ is 15x faster than Python. You might be able to say that a C++ dev is 2x the cost of a Python dev. Is the ratio of development cost to server cost more than 7.5x? What about other languages that aren't quite so fast, but aren't quite so expensive? You might find that C# is 10x faster than Python, but devs are only 1.25x the cost. Now your ratio of dev cost to server cost needs to be at least 8x to come ahead.

And honestly, good developers are expensive, no matter what language they're working in. Choosing a programming language to be able to optimize for cheap developers could be optimizing for bad developers who can't create the features you need. They might be half the price, but can they get the job done--after all the reworks and defect fixes and other learning curves--in less than 2x the time? I've never seen a programming language on its own have that kind of impact on development.

The point is not that "Language X is universally better than language Y". My point is more that "some languages are so incredibly wasteful that you seriously have to start considering whether or not you're saving money".
Secure context for webservers on LANs: a hack
I wouldn't want my kids exposed to this stuff. I don't want them to learn this as desirable behavior.
Respectable news organizations have traditionally at least played lip service to keeping their journalists/editors separate from their business/advertising people, such that the journalists are free to publish articles that run contrary to the business interests of the paper. (Example:
https://www.nytimes.com/editorial-standards/ethical-journali...)

Of course, Wired is not a respectable publication, and this just goes to show that.
Archives of “Electronic Soundmaker and Computer Music” Magazine (1983-85)