skysight-inc/HackerNews huggingface dataset:
> why is "open file" throwing an exception when file doesn't exist but "find substring" returns -1 when substring doesn't exist?

Well, first, there's more to it than that. "Open file" will throw an exception when you open the file to read and it doesn't exist. If you open the file to write and it doesn't exist, you won't get an exception because that's expected behavior. Instead, the file will be automatically created behind the scenes. The complementary scenario, where you're opening a file to write and the file already exists, is more likely to be a bug.

Exceptions have semantic qualities and depend on what you're trying to do. Trying to read a file that doesn't exist is obviously an error state because it is inherently impossible to do. The same goes for detecting the location of a substring within a string that doesn't contain it. But examining a string to see whether it contains a particular substring has no such problem. You can always test a string for the inclusion of some other string. So the judgment of whether "find substring" should throw an exception or not depends on whether you think the question being asked when someone invokes "find substring" is "is substring in there?" (answer of "no" is not exceptional) or "I know substring is in there; where is it?" (answer of "it isn't in there, you doofus" is exceptional). Both questions are common; this isn't really a call the language should be making.

The same problem is more frequently discussed in the context of hash tables. If I look up a key in a hash table and I get a null value, is that because there is no value stored for that key, or is it because null is the value stored for that key? People would like accessing the table to be convenient while distinguishing these two cases, and python doesn't allow that. You can choose from some different behaviors:

table[key] # Absence of the key is exceptional.

table.get(key) # Absence of the key will yield None...
# but this is indistinguishable from
# a key with the stored value None.

key in table # This directly tests whether key is
# present, but won't tell you the stored value.

The true solution is for lookups to return multiple values, one to tell you whether the key was present and the other to tell you what its value was, if anything. But this is rare[1] because people don't want to handle multiple return values from every hash lookup.

But you can store any value, even null, in a hash table -- that's their thing. Finding substrings doesn't have this problem; a legal result must be a valid index into the string. We can solve the how-do-we-want-the-hash-table-to-behave problem perfectly by returning an invalid index when the substring isn't present, and... that's what we do.

[1] Common Lisp addresses this by allowing functions to return multiple values (distinct from a single value with multiple subvalues) -- it's possible to treat the return value of a multiple-valued function as a single value, in which case you get only the first value. This is great for the hash table example, but in general it makes this easier while making it much more annoying to handle the multiple values when you do want them all.
> How about a correlation between IQ and race. It seems that no one will touch the subject out of fear the it would end their career.

Uh, this has been and continues to be extensively studied (along with other correlates of each, causal mechanisms, etc.), so the “no one will touch it” claim is rather firmly empirically refuted.
Do you write unit tests? Do you care about coverage of your tests? Serious question.
"...climate science is complicated by the fact that it is overwhelmingly political."

We shouldn't use science to inform policy?
> How do you solve the "won't read my emails" problem ?

Nobody but a handful of very vocal HN posters care about this. In the marketplace this isn’t a problem.

At the end of the day, you have to trust your data in somebody else’s hands. Unless your print your own circuit boards, make your own CPUs and write your own operating system, you cannot escape trusting a third party.
Delta Airplane Dumps Jet Fuel on Los Angeles Schools
Having worked in loss prevention for more than one company, I've only seen cuts to that budget occur in one of two ways: departments working themselves out of a job by solving the root cause, or vendors absorbing enough counter-party risk to make in-house anti-fraud programs a net negative. I can't imagine any decision-maker outsourcing LP without simultaneously outsourcing risk, because it would not only be a bad idea - but would be nearly pointless in even the best potential outcome.
There was more to it. It had something zen-like, because his voice from the shadow also said snidely 'Not like that, i can hear how you are holding it wrong!' , and instructed me to hold/bend my wrist this and that way. And my arm, elbow, shoulder, body. He masterfully knew the kinematics of hammering and could apply that to teaching you in an almost eerie way.

While being drunken...and out of sight...
In such a world, it is not standards that win. It is the predominant browser that wins.

Are you old enough to remember the "best viewed with Netscape" badges that were everywhere in the 90s?
> Every result ever has pointed that all races and genders are equally "intelligent" and well-suited to the same tasks.

This isn’t true. Ashkenazi Jews and East Asians have higher IQ scores than whites. Male and female scores on IQ tests are identical by construction. They have different scores on the component sub tests.

http://www1.udel.edu/educ/gottfredson/reprints/1997mainstrea...

Mainstream Science on Intelligence: An Editorial With 52 Signatories, History, and Bibliography

Since the publication of “The Bell Curve,” many commentators have offered opinions about human intelligence that misstate cur- rent scientific evidence. Some conclusions dismissed in the media as discredited are ac- tually firmly supported.
This statement outlines conclusions re- garded as mainstream among researchers on intelligence, in particular, on the nature, ori- gins, and practical consequences of individu- al and group differences in intelligence. Its aim is to promote more reasoned discussion of the vexing phenomenon that the research has revealed in recent decades. The follow- ing conclusions are fully described in the major textbooks, professional journals and encyclopedias in intelligence.
I was there for his Oktane talk and was just thinking about it yesterday. I was hacking on Solid, and recalled Sir Tim’s talk, then Frank’s. Two days before I attended Oktane I had spoken at my father’s memorial service. Frank’s comments on the importance of family were incredibly poignant. I found him to be credible and prescient on many fronts; his intelligence was obvious and his understanding of cybersecurity was deep and nuanced. It’s definitely among the top talks I’ve ever heard at a conference. Huge props to Okta for having him, and getting me there. It was a great gift to have a reprieve from grieving, and to take in all things identity. Especially from a man that has tried on so many.
But evo psych isn't a valid scientific field; there's no way to go back and conduct experiments to validate hypotheses. It's a bunch of nonsense just-so stories that appeal to people's existing biases. It's horoscopes-and-crystals-woo dressed up in the language of science.
There must be more to this
This is a story about my life so far and why I want to change things.

I'm a Father of two with a regular 9-5 job. My daily routine is not unique in anyway. Wake up, head over to the gym, shower, head back home, get the kids ready for school and leave the house for work. Standard right?

My Wife on the other hand works 9-5 but often the shifts are 12+ hours because of deadlines, constraints, priorities. This has really begun to bother me. I see my wife tired, mentally exhausted and almost like she's been defeated.

Our children need mom and dad, want to play, explore and laugh with us. But, sometimes it's hard to muster the energy when work has taken its toll on you all day. How unfair is that for the kids? They expect our love, attention and company, it's so hard when they don't get that time or emotional support.
This really has been eating away at me for sometime.

I keep hearing about work life balance but in our case work seems to control the pendulum weighing down on the work side of things more often than not.

So it got me thinking… Why are we subjecting ourselves to this? Why can't we create and achieve financial freedom? I am not referring to getting rich but replace our salaries over time so we can be there for our kids. The time we have is so limited I really want to spend more of it as a family. This has motivated me to really push on, evev when things aren't easy.

I'm not sure where this will lead me, but I'm determined to make this work. Coming up with ideas, validating those ideas, and making something to solve my own and others problems. I'm not sure what they will be or look like, but I'd like to program it myself and work with my wife to provide value to those who seek it.

This post is my initial stamp and will serve as a reminder and keep me motivated to continue on with this this task. I hope this has inspired others to act as we can only control our destiny if we act for it.
Superb! Congrats
> What's the use about a study on _correlation_ between these two things?

Understanding correlation is the first step to understanding causation, and a statistically significant correlation, by definition, implies that it is unlikely that there is not a causal relationship, though the cause may not be directly between the two studied variables.

> You could also have a study on correlation between IQ and poverty, IQ and access to education...

You could and you do. Or (to pick a real example that came up near the top, by recency, of a Google Scholar search for race and IQ) of the correlations between IQ, sex, and maternal obesity, controlling for (among other factors), race differences in IQ, which requires first having studied the correlation between race and IQ.

> Maybe no one is picking up the subject because it would be a waste of time?

Maybe the story that no one is picking up the subject is just a lie easily refuted by searching Google Scholar.
Sounds similar to monday.
Something CK2-like ("sim RPG"?) had already been my hypothetical mobile game concept long before I even discovered (and immediately fell for) CK2: Macromanaging a player character that is basically just another NPC existing in a few layers of abstracted off-screen simulation, a slightly interactive story generator. Highly hypothetical of course, no way I'd ever make it a reality.

For example a pirate game would have a detailed social sim of the crew, an "FTL level" sim of the ship in combat, a "Sid M. Pirates" level sim of ship to ship combat (that is all NPC off-screen when the player character isn't in command of a ship) and a sim of baroque-era Caribbean economy. A low level sailor would just manage relationships and balance focus between categories like following orders, initiative, camaraderie, bravado and risk avoidance (each influencing how he fares in the off-screen social and "FTL combat" simulations), peppered with the occasional decision set-piece, whereas a pirate-king might decide on resource allocation and strategic city upgrades (but still not micro-manage anything but relations). The tactical level would be a much more interactive (if the PC happens to be in command) series of decisions, but still do exclusively fast-forward-to-pause timing. ("free form turns", imho mobile games should be as passive as a book whenever you put down the phone)

The pattern could be applied to anything that has a somewhat limited set of characters for the social layer (the CK2 courtier population might still be a bit heavy for mobile...) and involves separable tactical and strategic layers. The original idea came from the question of how one could do a WW2 air combat sim on mobile that is deeper than Sid M. Ace Patrol but unlike IL-2 still without a dexterity factor. The player would balance focus between e.g. spotting, engine operation and navigation when on mission but not in combat and during engagement between aiming, evading, energy conservation, situational awareness and so on (plus a series of decision points that might be seconds or minutes apart depending on situation). The social layer might involve storytelling decisions like choosing to "accidentally" miss an emergency scramble after a night of heavy stress relief or flying under the influence.

With a bottomless fantasy budget, this kind of game would come with full 3D modeling for illustrating every sim layer, but only ever show a single frame at each interaction, representing the state of the simulation (which is actually closer to board-game abstraction than to 3D physics) in a semi-randomized way. Reasoning: animations quickly get old no matter how good they are and single frames can be doused in nice-looking postprocessing that would cause unsightly artifacts if animated. An endless pool of informative flavor illustrations, not the usual showing-off of GPU power and production effort.
Then I'd rather believe that you don't keep memories from dreaming because emotions and dreaming are "done" by the same part of our bodies.
Rancher Labs has been absolutely killing it lately.
K3s, Rio, and now a lightweight container-management binary.

Two months ago, I did not know what Kubernetes was exactly, or how containerization worked. Some of the team from the Rancher slack answered a few basic questions I had, and I attended a 2-hour Kubernetes webinar by them, which was also cool. Now I have a suite of half a dozen services running on a cloud k8s cluster in production.

Overall these guys are rockstars, I cannot wait until I can use k3s as a drop-in replacement for Microk8s for local dev (currently has a few bugs).

Holistic Rancher stack, k3s + k3c locally, bootstrap a cloud cluster with Rancher, manage deployments with Rio
> Also, GNU grep is not antifragile. I learned that when I upgraded my PCRE to a new major version and suddenly grep failed. grep is used by configure scripts, so without a working grep you can't compile a new grep. To me that is the very opposite of antifragility.

Bootstrapping is a very common problem with basic tools.
One Librarian Tried to Squash “Goodnight Moon”
While I agree with the general premise that we shouldn't rush to assign blame for individual events to climate change, the rest of the article seems to be trying to say the current fires can't be attributed to climate change as effects aren't expected until 2040. But that seems to be based upon a single study/analysis.

I can also cherry pick: "Australia. Observational data suggest that fire weather extremes are already becoming more frequent and intense (Dowdy, 2018; Head et al. , 2014)" [https://sciencebrief.org/briefs/wildfires] Noting that the _very same paragraph_ also references the Abatzoglou study.

In any case, the author seems to be frequently banging this same drum: https://www.desmogblog.com/roger-pielke-jr
https://skepticalscience.com/Roger_Pielke_Jr_blog.htm
It immediately runs a script from a site in a bash instance. The script could do anything like exploit some zero day like shellshock or other vulnerability. They would prefer the user read the script first. Most people won't read it either way, but if people don't just pipe it to bash other people will feel like it is more secure. If the script is served over http then there are also ways of replacing it by some mechanisms without you knowing as well which can add danger.
So really, the problem is more that the horizontal scroll bar is hidden by default.
Ad tech doesn’t a priori have the right to do whatever they dream up. We can choose to fight it with both legal and technical means.
On Windows Server 2016 and newer it stays enabled even with an “alternate product.”

https://docs.microsoft.com/en-us/windows/security/threat-pro...

> In Windows Server 2016, Windows Defender AV will not disable itself if you are running another antivirus product.
I set up a VPN after installing pihole on my rpi, so that I could get the benefits away from home as well.
Oh here comes the racist brigade to yell down moral proclamation upon the unwashed masses.

You know what, who cares if Watson was a flaming racist? He has done more than almost any other person to save the lives of millions of Africans but he makes one opinion about intelligence and hes slagged off and completely discredited?

Cancel culture has been in science a lot longer than people know.
Companies operating legally under governments, are much more transparent to states (any state, not just the one they exist under) than other states are, because they interact through markets rather than through handshake deals. Amazon and Google have "public APIs" that they get all their chips through, and the NSA can see the "API calls." :)

On the other hand, this is exactly the reason that entities that do operate through handshake deals with no visible economic activity—organized crime and the zaibatsu/chaebol type of conglomerate—tend to be considered imminent threats to states. They're opaque to logistical analysis! (Not that your average mob boss would have any inherent reason to commit treason against the United States, but other nations might be rather motivated to give them extrinsic reasons.)

For this reason, even "benign" domestic crime syndicates or conglomerates will have their intelligence opacity hacked through with the application of good old-fashioned HUMINT.
Doing a search for canihazip shows IP: 40.77.167.67 in the blurb. Which is the same as bing.

I'll guess it's a similar deal to duckduckgo where much of the crawling is outsourced to bing.
imho, Equifax should not exist moving forward. They have breached the trust of keeping private data safe and secure.

As an American that had data exposed, I do not want any service from them. I want ALL of my data they have on me to be deleted. They cant be trusted. I will take their $$, but I'd rather have all my data removed. Is this an option?
How much of East African marathon dominance is for similar reasons to the cricket dominance of former British colonies?
Wow this is such an accomplishment and a testament to a healthy culture of encouragement. Congratulations to you and best of luck on your future endeavors!!
Yes, so the primary test, "Does this triangle cover this pixel" is the same between rasterization and ray-tracing. So the fundamental difference is the outer loop.

Rasterization goes for each triangle, which pixels does this intersect, whereas for ray-tracing it's for each pixel which triangles does this intersect.

Clearly, this allows us to build lookup data structures over the inner loop. So back of the hand ray-tracing becomes more efficient when you have more triangles than pixels (give or take an order of magnitude or so due to algorithmic differences)

So, the complexity of real-time content development has slowed due to multiple of reasons, not the least of which being that rasterization (especially modern GPU rasterization with quad based shading) is poorly suited to scenes where polygons approach pixels in coverage. And more importantly, we've hit the polygon density where we appear to be getting better visual quality gains by spending cycles on improved shading rather than more polygons.

Then add in the transition to 4K and we get a much larger pile of pixels once again changing the math all over again.

I don't know what this means for the future. I suspect we won't see much increase in scene complexity until we get to the cliff where ray-tracing is then viable, then I imagine scene complexity for real-time scenes will make a big jump.

Keep in mind, what you read is with offline CGI in mind. And we've already hit that tipping point for offline rendering. Even the last major rasterization hold-out (PRMAN) has switched to path-tracing even primary rays. It's just that real-time rendering is a bit of a different beast.
thank you and thank you also for the referral, I was kinda committed to this company I'm now, but maybe we can be co-workers in the future
Star Wars Episode IX: Duel of the Fates Script Leaked
Good point actually, but that almost (?) two decades wide gap between mainstream gameboy mobile playing and the iPhone was quite an opportunity to drop the habit. Well, there was Nokia snake.
Running untrusted code without even looking at the code first. For all you know, the script asks for root access, and if granted, installs a rootkit, and if not, deletes all the files in your home directory.

Random scripts from the internet should always at least be casually reviewed. Posting something like this just encourages people to trust random scripts on the internet, which is going to end poorly eventually.
Yeah! But the work worth doing is never easy, nor fast to get done. Not the best attitude to have Barry!
What do you class as part time? 4 day weeks should be a lot easier to get, you can get a 5 day then ask to move down. Below 4 days probably gets a lot harder. You might want a non-technical client and freelance for them. Pay might be crap though.
> there's no way to go back and conduct experiments to validate hypotheses.

That's not required to do science. The notion one must be able to go back in time to prove evolution is absurd. Evolution happens, that's a fact. No system in the body, including the brain, is untouched by its processes and consequences.
> Every result ever has pointed that all races and genders are equally "intelligent" and well-suited to the same tasks.

Really? The strongest rebuttals I ever saw boiled down to "it has not yet been conclusively proven impossible that all races are equally intelligent". Large meta-analyses certainly always find correlation, this one goes a long way towards showing there is causation as well: https://doi.org/10.1111%2Fj.1467-9280.2006.01803.x
For constant-surveillance companies like Facebook, a good way to justify the data collection would be to add automated systems to detect such problems. They already have algorithms in place for suicide prevention, it would be easy to increase coverage to stuff like seizure, heart attacks, and other problems that may correlate with long usage of computers. Even simple heuristics such as sudden keyboard depression and subsequent inquiry dialogs that are missed could help. Of course, ML on webcam vis-à-vis cats accidentally walking across keyboard would help to rule out false positives.
Yeah that’s how many personal repos work. I assume you don’t use Node.js or Go or Python where most nontrivial dependencies often come from non-corporate third parties.
Applies to life too, but easier said than done.
كلمات اغنية اعيش الوحدي معن المجروح
Hey I got downvoted on the “Google Play” store security exploit thing below. Anyone have an answer as to why dozens of reviews on there make the same comment as well within the last few weeks?

Keep in mind there is an official HackerNews plug-in for filebeats that can stream comments live to Elasticsearch. You can find these clusters online streaming in the very comments we make now to alert groups of down voters to smother you. Something to think about / use Binary Edge and the query “elasticsearch.docs:>100000” to find the really big clusters. No password at all fully exposed and there are 7,600 of those online worldwide now.
Also, the author could have gotten feedback from other people (users of the API or other developers) on earlier versions of the API that improved the current version. Being able to write complex code is a useful skill, but so is the ability to collaborate with others on larger projects.
This blog post is unhinged nonsense. Is that your defense?

https://en.wikipedia.org/wiki/Luboš_Motl

> Since 2006, Motl's has focused less on fundamental physics research and instead on controversial questions in other, related fields. In these related fields, Motl is regarded as something of a crackpot.