skysight-inc/HackerNews huggingface dataset:
It wasn't flagged, the user's account is shadow banned for an inexplicable reason. I vouched for the comment (though on my browser, it's still dead after a refresh; is vouch broken?).

(I looked at comment history, up until today, all they posted were links around WSJ paywalls, and only about four of those...five years ago.)
Same for youngs mental health
I tried it on Bob Martin's "Prime Factors" Kata solution, translated into Python:

def prime_factors(n: int):
primes = []
candidate = 2
while n > 1:
while n % candidate == 0:
primes.append(candidate)
n //= candidate
candidate += 1
return primes

It gave a decent initial unit test:

import unittest

class TestPrimeFactors(unittest.TestCase):
def test_prime_factors(self):
self.assertEqual(prime_factors(4), [2, 2])
self.assertEqual(prime_factors(9), [3, 3])
self.assertEqual(prime_factors(12), [2, 2, 3])
self.assertEqual(prime_factors(17), [17])
self.assertEqual(prime_factors(24), [2, 2, 2, 3])

if __name__ == '__main__':
unittest.main()

Well done! It generate cases with duplicates factors, which is the biggest likely mistake in this algorithm. (It's also possible to use "/" instead of "//", but that doesn't cause a failure until working with values above 2^53 or so, like 3^53.)

It's not done in Martin's one-test-per-test-case style, but that's fine - I prefer this more compact form.

I chose this Kata because it's very simple, and lets us examine what the generated test suite doesn't cover.

Like, there's no test for 1, 0, or negative number, which will return an empty list.

We can use hypothesis to help identify that case:

import math
from hypothesis import example, given, strategies as st

@given(st.integers())
def test_product(n):
factors = prime_factors(n)
assert math.prod(factors) == n

if __name__ == '__main__':
test_product()

reporting

assert math.prod(factors) == n
AssertionError
Falsifying example: test_product(
n=0,
)

With st.integers(min_value=2) we then find a performance issue. It tries to factor 5123983848966349269, but Martin's algorithm is extremely slow at computing [3, 7, 1049, 90631, 2566470031] because it must count to 2566470031, in Python, by ones.

The upper-bound was never specified in Martin's formulation of the Kata. It was written in Java using integers, so the Mersenne prime 2^31-1 is allowed, but even that will take a long time to compute.

Using a max_value of 1,000,000 has Hypothesis finish with no other reported problems.

I think all that's needed is an extra bounds check:

if not (2 <= n <= 1_000_000):
raise ValueError("out of range")

and corresponding test:

def test_bounds(self):
for n in (-1, 0, 1, 1_000_001):
with self.assertRaisesRegex(ValueError, "out of range"):
prime_factors(n)

Mutation testing (with mutmut) shows no further issues.

Again, well done on coming up with a good set of initial cases, automatically.
A few options.

1. Check the literature of who is eligible for the bonus. The bonus might get paid out for anyone who was employed as of a certain date.

2. Use this as a negotiation for a signing bonus. It's common to have some vest or bonus on the horizon. Asking to be made whole with a signing bonus is how this is handled. Just be aware that you'll probably be on the hook to pay it back if you leave your new company in under a year
Ask HN: What are typical web tech used for data science coaching websites?
Hi HN,

I have very little idea about web development so this might be a naive question. Often I visit coding and data science coaching platforms that are everywhere these days (e.g., codeacademy). I wonder what kind of web technologies drive these. Relatedly, if one wants to build such a website, what expertise are required?
It makes the authority safer from being criticized that they should have done something. That of course is the real purpose.
Reminds me of this clojure talk https://youtu.be/Mfsnlbd-4xQ
I suspect it just took them several years to do it. It's no small task!
Glad you got it figured out and solved! I hate it when doctors refuse to listen to you.
Hmm...This goes beyond what PBS space-time taught me about it :-) My understanding was we have more space (eg space is expanding) but the 'vacuum energy' is staying constant.. If I understand what you're saying, that statement depends on the time frame you measure against ?

edit: s/your/you're/
Yeah, I know there's workarounds, but it's a pain in the rear.

Currently I'm using Iceraven which is essentially just Firefox with about a thousand extensions enabled instead of 17.
It feels like an iceberg has been slowly turning over for the past 10 years, and is now flipping quickly.

Economic growth is now more correlated with carbon reduction than increase.

The useful work of preventing coal plants is over and we need to switch gears to get home appliances, ev cars, solar, wind and transmission out as quickly as possible. Environmental groups and common knowledge haven't caught up yet, but the fastest route to a low carbon future is a lot of factories producing ev cars, appliances, and batteries.

There are many zombie environmental groups that will continue to fight against anything humans try to change about the built environment, but over time the astonishingly good economics will move them to the side.

One of the nice thing is they don't really have much power other than stopping solar farms and stopping clean energy transmission. For 80% of the things we need to do, it's just people going to home depot.

And in many ways old school environmentalists are already losing the policy wars, the inflation reduction act is chock full of pro growth, pro abundance carbon reduction.

If you are looking for startup inspiration...

Super powerful battery augmented induction stove, hotter than gas:
https://www.treehugger.com/impulse-electric-cooktop-gets-a-b...

In window heat pump 80% more efficient at heating and cooling. Helps with the big ticket/renter problem for heat pumps.
https://www.gradientcomfort.com/

The coming abundance of energy...

Economic growth and solar:
https://mobile.twitter.com/Noahpinion/status/157068814444987...

Solar economics:
https://noahpinion.substack.com/p/why-im-so-excited-about-so...
Wondering about the calculation for stability, whether solar radiation pressure was factored in. Surely something of that scale would behave partly like a solar sail. If the center was off the sun by, say, half an AU it'd seem like gravitational effects would have to dominate, but what about if the center were off by only some small amount? There could be a threshold under which radiation pressure would dominate and tend to stabilize the ring.

But then I suppose even if that were the case, it'd only take a well aimed flare to put a wrench in that.
"A boy gassed you up"

I've never heard about this before. Seems like gen Z (gen alpha?) is increasingly tech illiterate and tech-dependent. Not ten years ago, most kids weren't given phones by their parents. I guess it would be impossible to graduate high school these days without a phone.
It was my understanding that it was basically built for people who work with 8k video. That's way outside my realm, so maybe someone else will add some details.
I can imagine that that's the argument they're coming from. So comparing and contrasting the situations isn't out of line.
I built a dactyl on a TAZ4. Barely had to sand anything. Few etsy shops around that will sell you the prints if you lack a printer.

Noticing a lot of used Advantage 2s on the market for cheap now that people are buying up the 360/pro.
I don't pretend to be a military expert, but I know who I'm betting on.
Related:

ChrysaLisp - https://news.ycombinator.com/item?id=25779930 - Jan 2021 (6 comments)

ChrysaLisp - https://news.ycombinator.com/item?id=22019594 - Jan 2020 (61 comments)

ChrysaLisp - https://news.ycombinator.com/item?id=18897817 - Jan 2019 (19 comments)

ChrysaLisp – A 64-bit Lisp OS with GUI - https://news.ycombinator.com/item?id=15466124 - Oct 2017 (121 comments)

Chris sometimes comments here:

https://news.ycombinator.com/threads?id=vygr

Also related:

The Taos Operating System (1991) - https://news.ycombinator.com/item?id=16727565 - April 2018 (9 comments)

TAOS Operating System - https://news.ycombinator.com/item?id=15527936 - Oct 2017 (21 comments)

The Taos Operating System (1991) - https://news.ycombinator.com/item?id=9806607 - June 2015 (93 comments)
What's wrong with them counting your solar as part of their conversion? Nothing wrong with you declining if the price isn't high enough, but if they're paying someone for solar power, whether it's an individual or a company, I think they should count that as part of their renewable portfolio.
How to vet an untrusted open-source project?
Sometimes you may want to use some software in your project, but the maintainer(s) may have some functional affiliation(s) that makes it difficult to use without significant security assessment effort.

Example here: GlobalProtect is VPN software from Palo Alto Networks, but the maintainer of this open source client is based in China. He may be a fine, upstanding person, the code may be pristine, but there's systemic risk that needs to be bought down.

What are your tools of choice to assess something like this?

https://github.com/yuezk/GlobalProtect-openconnect
Can confirm with Android phones and vr headsets that ADB access can definitely be affected by choice of cable. Talk about face palm, but it is what it us
> The centrifugal forces would tear our apart.

I'm not so sure about that. Consider slicing the ring into sections. If the ring is at the same radius and velocity of an object in orbit, then the slices will (mostly) stay put. They aren't going to fly off radially. So connecting them will not put undue stress on them.

I say mostly because they'll be tugs from the other planets, etc.
>I'd rather have something in between a laptop and a smartphone that is designed to be comfortable for carrying around in a small bag or pocket, but that also has a physical keyboard and is designed to be used productively for programming or writing for example.

Something like what? A small laptop is little more than a display attached to a thin keyboard. I'm not sure how you'd get something much smaller while retaining a physical keyboard and still being reasonably useable for programming.
C is barely statically typed. In an ML-family languge you can write pretty much the same code you'd write in Ruby, just it'll be typesafe.
You're referring to [this](https://www.researchgate.net/publication/3949367_The_evolved...)

Which was also really cool!

> As with Thompson's FPGA exploiting some subtle physical properties of the device, Layzell found that evolved circuits could rely on external factors. For example, whilst trying to evolve an oscillator Bird and Layzell discovered that evolution was using part of the circuit for a radio antenna, and picking up emissions from the environment [18]. Layzell also found that evolved circuits were sensitive to whether or not a soldering iron was plugged in (not even switched on) in another part of the room[19]. ...

However, OP was actually referring to an experiment by Dr Adrian Thompson which was different but also sort of similar. The FPGA evolved by Thompson ended up depending on parts of the circuit that were disconnected from the main circuit but still affected its operation. It probably relied on electromagnetic properties, so was sort of a radio, but it did not rely on the clock of a nearby computer.

[damninteresting.com did a really interesting writeup about this](https://www.damninteresting.com/on-the-origin-of-circuits/)

Both were really cool, unexpected behaviors of evolved hardware systems.
I wouldn't underestimate the hatred between nations in East Asia.

Japan was trying to wipe China off the map 80 years ago. China is upset still.
Functional Music Composition with Clojure
I'm going through the opposite situation, but hopefully my experience will help. English is my mother tongue, and I immigrated to Israel where the only people who consistently speak English are high-tech workers, cab drivers, and 1 out of every 4 police officers. Of those, only the high-tech workers are in any way fluent. I completed a six-month language program, but I still couldn't speak or even read more than basic signs with any confidence. After 2 years here, I moved from a job for English-speaking immigrants to a job in Hebrew where everyone understood English.

I started working on a few projects with one engineer who reads English but cannot speak it. In a matter of weeks, my Hebrew pronunciation, comprehension, and fluency went through the roof. Since then, I've been started making friends with people at stores near my house, making phone calls to solve things that could be solved with an online form (and Google Translate). I'm still nowhere near fluent, but I gained confidence from being forced to speak and write.

The main thing is, just be prepared to speak, not be understood entirely, and make mistakes. The other day, I accidentally told the clerk at a store near my house that I didn't need a bag because I had large cunts instead of large pockets. We laughed, I survived, and I'll never get those words confused again.
They don’t want it back! Like luxury cars, the market for $50k computers is shallow. No company is buying it.

So you need to find someone with a credit card willing to drop $10k on an old computer. Why would someone do that?

Hell, in my professional life I’ve purged devices with $5m of depreciated value because the replacement cost of a new thing was less than the operational cost of keeping the old thing running.
Member when Carly Fiorina shut down HPs calculator division because it wasn't PROFITABLE enough? Pepperidge Farms remembers. It's not enough you make a company profit, it depends on the quality of that profit to the stock to determine if you are worth keeping around. There are some seriously broken things about that and about our modern economy.
Nah, I just built this as a fun personal project.
But it's also UT-Austin's network. They should have some say in what traffic the allow on it.
China is incredibly vulnerable to a seaborn blockade itself. It’s navy is a bad joke next to the US and they are highly dependent on energy and food imports. Russia can weather sanctions because although its economy is a mess, it’s quite diversified and they produce their own food and energy. They can drop down to a stable subsistence mode.

China is almost entirely dependent on energy imports. On paper they’re also self sufficient in food, but that food production depends on massive fertiliser imports, and inputs of hydrocarbons to make fertilisers. If China was subject to the same sanctions as Russia, they’d be on their knees in a few months due to energy shortages. A year of it would tear China apart as food production would collapse. They have no stable subsistence level they can safely degrade to absent massive imports of survival commodities. The Chinese know this.
A preference is not personal data in itself. It must be linked to an identified or identifiable person in order to be so.

So in itself the functionality and storage of necessary flag falls outside of the GDPR.

Now, if for instance the flag is stored in the identified user's account then it becomes personal data but I think consent still isn't strictly required on the basis of legitimate interest (and frankly this is only a freaking flag for dark mode so about zero impact on privacy or anything else).
But then the problem is that Devs are checking their snazzy webpage on a top of the line Mac, thinking it runs great, meanwhile pcs around the world are being brought to their knees.

So I would say, maintain your old computer and the one before that as testing laptops, so you know what the plebs have to put up with.
> ban ________ television, newspapers, and every social network…

^ “advertiser supported”.

For the sake of argument, imagine if advertiser supported content was in fact banned in certain places. Don’t you think that non-advertiser supported models would quickly fill the gap?
But...

Nevermind.
Yes, we did receive validation in the early stages.

It's not necessarily "AI generated business advice".

It uses AI to filter through information and find the most helpful business tips from successful entrepreneurs.

I do appreciate you taking the time to comment, it truly means a lot to me.
This is a great point. But how about if the language would allow the programmer to specify what range of values is expected for function input/output?

Then a compiler could try to reason about the computation and decide that overflow does not happen if all values are within bounds, and just add checks at the function boundaries.
I'm probably reading this HN thread from a Pegasus-infected iPhone right now, and I have no way of knowing! The only commercial solution to detect Pegasus I know of is iMazing's Pegasus detection tool[0] which borrows techniques from Amnesty International's Mobile Verification Toolkit (MVT)[1] to detect Pegasus. Not sure how reliable it is though.

Anyway with something like Pegasus, all the forensic artifacts would be random and heavily mutated for each infected device, so it's not as easy as running a tool to detect its presence. Pegasus is known for doing anti-forensics under the hood.

[0] https://imazing.com/blog/detecting-pegasus-spyware-with-imaz...

[1] https://www.amnesty.org/en/latest/research/2021/07/forensic-...
I’m just happy they didn’t call it “a hack”.
Had they continued down that road, Apple would probably be as successful today as IBM's PC division.
When my company switched from accrued to unlimited PTO, the way they did it was to tell everyone that until their balance got down to zero, they needed to report their time off. So if you quit before you got your balance down to zero, you had it paid out, but most people probably just burned through their balance within a year or so and the liability was gone.
AI Chatbots, Ex-SpaceX Scientist Making Vegan Cheeses, and MIT OCW – Issue #2
I was writing a real-time multiplayer game a couple years ago.

The netcode was written so that players only send their inputs along with a timestamp (The "timestamp" actually being a frame counter). The server would then relay those inputs with the timestamp to other players. The client maintains snapshots of the game state and would then re-run the game logic from that timestamp given the new input.

I handled clients falling behind by making the server reject any inputs that were more than 500ms (Really, 30 frames) behind the current time. The server would send a message to the client that essentially said "You're lagging, here's the current frame counter and current state of the game"

Granted, this approach really only worked for my game because the entire game state could be squished to ~300 bytes. But it had the added benefit that it prevented players from cheating using a lag switch. They couldn't have a malicious client that sat and listened to what other players were doing and then send a bunch of back-dated inputs to put itself in an advantageous position.
In this week's issue of DeepTech VC (DTVC), we cover the implications of OpenAI's ChatGPT on universities, an ex-SpaceX scientist making vegan cheeses, and Massachusetts Institute of Technology (MIT) OCW's impact on a group of Turkish medical students.

DTVC is a weekly publication dedicated to sharing information about deep technology investments, deals, headlines, reports, and much more. Sounds interesting? Subscribe for free below and follow the LinkedIn page for regular updates.

Have a fab week ahead!
> crabs-in-a-bucket mentality perspective

Ref:

> Crab mentality, also known as crab theory,[1][2] crabs in a bucket (also barrel, basket, or pot) mentality, or the crab-bucket effect, is a way of thinking best described by the phrase "if I can't have it, neither can you".[3]

> The metaphor is derived from anecdotal claims about the behavior of crabs when they are trapped in a bucket. While any one crab could easily escape,[4] the claim is its efforts will be undermined by others, ensuring the group's collective demise.[5][6][7]

> The analogous theory in human behavior is that members of a group will attempt to reduce the self-confidence of any member who achieves success beyond the others, out of envy, jealousy, resentment, spite, conspiracy, or competitive feelings, to halt their progress.[8][9][10][11] The same claims about behaviour are embodied in the phrase tall poppy syndrome.

* https://en.wikipedia.org/wiki/Crab_mentality

From the §See also:

> He observed a self-interested, family-centric society, which sacrificed the public good for the sake of nepotism and the immediate family. As an American, Banfield was witnessing what was to become infamous as the Southern Italian Mafias and a self-centered clan-system promoting the well-being of their inner group at the expense of the other ones. Banfield postulated that the backwardness of such a society could be explained "largely but not entirely" by "the inability of the villagers to act together for their common good or, indeed, for any end transcending the immediate, material interest of the nuclear family."[1]

* https://en.wikipedia.org/wiki/The_Moral_Basis_of_a_Backward_...
Bain Capital co-chairman to retire
Strictly, they replaced "Fair and Balanced" a few years back. Now they're going with “Most Watched, Most Trusted.”

Which has a kind of Orwellian air: "We're no longer fair or balanced, but we are the most trusted by the most people". But maybe that's just me.
Between eBay and PayPal fees, I believe it's been at least 13% for decades.
that's absolutely un-true in nearly every field, even CS ones.

I don't even get the premise.

Your best effort doesn't require more .... effort ?

What kind of work is it that you do? I'd love to join.

If sitting around idly at low-paying jobs watching paint dry wasn't an easier way to achieve a paycheck than the hard work that the employer would prefer you to do then it wouldn't be the world's most common trope.
You really don't. You need to test the business logic, but for the "plumbing" (which is often 90%+ of the code) often if you have a decent type system and use it effectively there's only one way to write it that would compile.
I don't totally understand that middle step "So why not search filters instead of products". It just means searching over the human-edited metadata instead of free-for-all free text fields that were scraped from who knows where?

When we get to the last step, of implementing bitmaps for filters, and then trying to optimize to deal with the RAM implications... why not just use Solr or ElasticSearch instead of reinventing the wheel? That's basically what lucene (which Solr and ES are built on) is doing, something like that implementation you came up with, but with lots of optimizations and tunings on top of the naive implementation.
This is pointless theater. The PRC already has the SF-86 forms for everyone with a security clearance, and our medical histories via health insurance hacks, etc
And if they round up and arrest political and religious dissidents, we should do the same? We can't lose the repression arms race to China, after all...

Firing a missile is an external action. This is not an external question, this is a question of domestic information policy. It's hypocritical for a nation championing free speech to have a restrictive domestic information policy.
Glad we can buy the book standalone without getting a membership to O'Reilly.
This is not surprising. I expect more shenanigans like this from Elon to come to light over next couple of years.
I think the opposition was huge too, but neither was evenly distributed.

The protests against the Iraq war were international in scope and generally regarded as the largest political demonstrations in history. https://en.wikipedia.org/wiki/Protests_against_the_Iraq_War
This seems high(?): for comparison, average power of French solar panels is 1.6GW (and a bit more for wind power).