skysight-inc/HackerNews huggingface dataset:
> It's insane that there's no way to pass an array of values into a parameterised query for that use case.

Maybe I'm misunderstanding you, but assuming $params is an array in the following code, isn't this passing an array into a parameterized query for that use case? (Edited to note this is literally an example from the PHP documentation, and not one of the squiffy comments.)

$place_holders = implode(',', array_fill(0, count($params), '?'));
$sth = $dbh->prepare("SELECT id, name FROM contacts WHERE id IN ($place_holders)");
$sth->execute($params);

In Python, using MySQLdb, I believe this would be something like

place_holders = ','.join(['%s'] * len(params))
cursor.execute("DELETE FROM foo.bar WHERE baz IN (%s)" % place_holders,
tuple(params))

Which, while more succinct, seems to be functionally exactly the same thing. I don't see what PHP is doing that's "worse" here offhand.

One could argue, "Yes, but a Python programmer would use SQLAlchemy," which is probably true, but then you need to let the PHP programmer use Doctrine or Eloquent.
That's what I mean though: these features are not really ideal for traffic that isn't flowing smoothly. Rush hour with a lane closed is a scenario where the driver should be fully aware & in control. Behavior is often unpredictable in such cases with tightly spaced cars and frustrated drivers.
From the fact sheet I found it’s mostly making sure the OS is configured for sleep by default and a minimum 80+ gold rated PSU if you have a 600W+ unit.

Knowing Dell, it’s probably the power supply not meeting 80+ gold efficiency.

EDIT: I guess there’s max allowed power during ACPI S3 state as well. 10.3W max for a system <32GB of RAM. That’s pretty rough, given even good quality DDR4 is going to need ~1.5W per DIMM during S3. But given base models of these systems will almost exclusively use 2 DIMM’s that still leaves 7W to idle with, tough but manageable.

Not that it matters - nobody should be buying any of Dell’s Alienware desktops. The chassis provides terrible airflow and the components inside will thermal throttle like crazy.
FYI that youtube video on the landing page is from 2012
If you haven’t tried it already, Compiler Explorer (https://godbolt.org/) is a great way to “cheat” at learning reverse engineering. Why? Because you can control what the C code looks like, and it’ll show you the assembly to compare. Eventually you’ll get a feel for how compilers generate code for various operations.
> continued reporting and was eventually cleared

Comparing these two cases is not as simple as that. Risen refused to name sources for his book and did so till the end.

The only reason it didn't go further, and he didn't go to jail, was because of an arbitrary decision further up the chain that was already publicly signaled ahead of the hearing [0]

Assagne is spending time in jail right now, for years he was in a self-imposed jail over fabricated accusations, with the US actively violating his rights in every way they could, down to violation the client-attorney privilege.

Nothing out of the US signals that he will get a fair trail, everything suggests he would most likely be made out as a an political example, as he has been and currently is.

[0] https://www.politico.com/blogs/under-the-radar/2014/10/holde...
We should reduce crime in our cities and end homelessness so our cities are appealing places to live.

As a conservative minded urbanist, it is disheartening to see people leave cities because many american cities are descending into chaos and many people are not as dedicated to urban living as I am.

Frankly if it weren't for my absolute hatred of car commiting, I would probably follow them. The suburbs offer a superior quality of life other than proximity of conveniences. That is all at this point. Covid destroyed culture. Homelessness and crime destroyed a true sense of community and shared ownership of public property.
if you're already going down this route why not just be direct. I assume most unvaccinated people right now are younger, so just give them 100 bucks cash on hand if they get vaccinated

at least you're not funneling it through these marketing agencies then
You think California spent months with 1/2 the population without power at a time?
Microsoft Defender is pretty legit
And yet I pay $.55/kWH at peak times to PG&E. Ugh.
Enforcing basic property rights is a good start. “I’m sorry sir or madam, but this is some of the most expensive real estate in the entire world, and you may not just pitch a tent here on the sidewalk. If you refuse to remove yourself then we will remove you.”As you say, this is not a total solution to the larger problem, but it’s a start.

Any difficult problem needs to be broken down into pieces and analyzed piece by piece, and I posit that this is the clear and obvious part of any serious solution. Logically, I can only see two other possibilities.

1) We solve homelessness and criminality once and for all, such that nobody would even attempt to pitch a tent on property that isn’t theirs without permission, or else would willingly remove themselves once their error were pointed out to them. I hold that this is impossible, and though we should always strive for perfection, we must recognize and account for our limitations.

2) We keep the status quo, where vagrants are not forcibly removed and instead are allowed to live dispersed throughout the city.

If I’m missing another possibility here, then somebody please point it out to me. Note that I’m purposefully leaving out any discussion of where those that are forced to leave should go, which admittedly must be a part of any solution but is not the part that I’m interested in for now. Additionally I accept that there is plenty to debate regarding precisely how enforced removal should be carried out; for the sake of discussion, let’s assume that everyone should be given fair warning and a chance to leave at their own accord, and violent force should be kept strictly to what’s minimally necessary to enforce the rules.

Am I wrong to think that enforced removal is necessary to any serious solution? And if so, can somebody explain to me why I’ve never heard of a “progressive” solution that grants this point and incorporates it into its plan?
To be fair, they also have to pay for blowing people up in natural gas explosions too.
I think small Toyota trucks are drifting towards some kind collectors status.
A few years ago I sold a gen 1 Tacoma for nearly double what I paid, only because someone tipped me off that the price was high for that model on Craigslist.

Small, lightweight pickups are no longer being manufactured. And Toyota’s are ridiculously reliable. My old truck still ran like new with nothing but regular oil changes and a one-time replacement of the spark plugs.
Society is collapsing because of the idle power consumption of laptops?
It typically takes 10 times as long as your content to write a lecture, and according to [1] it takes about 12 hours to produce a minute of video.

The algorithm also likes 2 videos per week.

2 videos * 12 hours work/minute_video * 10 minute_video / video --> 240 hours/week to keep the algorithm happy.

The algorithm is greedy, and is making videos worse.

[1] - https://www.lumavox.com/how-long-does-it-take-to-produce-a-m...
Securing Your Development Environment
Salesman said "it's a family size freezer!" ... I says, "not unless you chop them up first."
Finance guys tend to be able to afford to have the right people to be sure of that on hand; they also are specifically in the business of cost-benefit analysis.

I have no insight or information this; but sometimes you can throw money at a problem to make it go away, and that's literally the best deal open to you. If custom fab solves a problem more cheaply than the 25 senior software engineers it would otherwise take, then custom fab it is.
The issue is idle power draw, so it’s more like banning a Ford F150 that cannot be turned off when it’s not being driven.

Imagine if your neighbor got a car that just sat in the driveway with its engine running 24 hours per day.
I think the first half of your comment is a pointless semantic debate. The Autopilot system has driven billions of miles. Those miles obviously all aren't equally relevant. The older miles lose value as the hardware or software changes. However those miles don't all become worthless anytime there is any software update.

>My assumption is that OTA updates won't be allowed once this stuff starts requiring certification.

It is unclear whether this would actually be safer or not. I am reminded of how both Tesla[1] and Toyota[2] had similar software problems with their antilock brakes. Both companies had a software fix relatively quickly. Tesla deployed the fix immediately to cars through OTA updates. Toyota issued a voluntary recall meaning its cars wouldn't be updated to the fixed software for months, years, or potentially ever.

[1] - https://money.cnn.com/2018/05/30/technology/consumer-reports...

[2] - http://www.cnn.com/2010/BUSINESS/02/09/japan.prius.recall/in...
If I had fifty teachers during my time in public school I'd be surprised if five of them would have been smart enough to teach such a course. None of those taught grade school.
> This is an achievement to be proud of.

I mean I'm all for reducing power consumption, but is having a mild climate an achievement to be proud of? I'd guess that California's main population centers have fewer degree days away from 72 F than any other state in the country. By default, you'd expect their power consumption to be the very lowest.

(The other states close to CA in consumption per capita have much worse climates, but their people live in denser urban centers and have smaller, likely more efficient dwellings.)
What if they were already sold but were just getting delivered?
There are some really great answers to my comment here! I'm delighted.

So here's the thing - I get the desired purpose of the role of centralizing GTM strategy. But in practice product managers are too far removed from the customer to be useful 80% of the time.

Basically I find that tactics that work for a given business should drive strategy more than vise-versa. This is a very unpopular opinion for sure.

In the end, messaging and positioning don't exist in a vacuum. The market responds to what it responds to. But because product marketers are too far removed from the stress of actually making messaging turn into revenue, they just don't have the skillset to be useful.

I wish product marketers could make positioning that actually works. But what happens is they make positioning that doesn't appeal to customers, and sales and demand gen pick up the slack and now have two jobs - to actually use messaging that gets results, and to make a middle manager happy with some data that helps them make useless reports upstream.
What kind of profilers are you using? If you can list a mapping between language and profiler name, that would be sweet
Yep. This is literally why these PCs cannot be shipped. Their idle/sleep consumes too much power.
Why would someone want this? If I need a database of devices in DNS I can just buy one domain and create subdomains for each device myself. It'll cost way less than $0.99/device/year.
On further reflection, I'm optimistic:

This nightmare scenario was proposed in https://en.m.wikipedia.org/wiki/Consumer_Broadband_and_Digit... for combatting piracy, and instead we have settled on a lesser evil of limited DRM to access Netflix. This permits torrenting, but torrenting is less prevalent now.

A carbon tax is inevitable, and will alleviate the concerns such as OP's.

Control over E2E encrypted messaging is an ongoing policy dispute. I don't have a good feel for how the pieces will land. A lesser evil solution might be to require warranted escrow for popular messaging clients. This permits two malicious actors communicating over unpopular platforms, but catches cases like threats/harassment on popular platforms.
Facebook's Tectonic Filesystem:Efficiency from Exascale
Further evidence of this is the fact that `<?= $foo ?>`, and the long-form `<?php echo $foo ?>`, don’t offer a way to easily HTML-encode the output; instead you have to use `htmlentities()`. Whereas ASP.NET has had `<%: foo %>` to encode output for almost 15 years now, and Razor defaults to encoding: they make it harder to render unrecoded output.
Bitcoin Is Key to Twitter's Future and Will Become Internet’s “Native Currency,”
> many small shops found they could compete by specialising in goods neglected by generalist department stores

So I wasn't completely wrong.
You probably waste more electricity running your dishwasher instead of by hand than running a laptop. If battery usage is a problem because of climate change, then tax carbon and you can decide to cut back or pay more on dish washing, food deliveries, big houses with huge heating cost and the like, and everyone who wants a cool laptop can spend their money (or carbon credits) on that. If that's what's bothersome, then regulate the problem, not try to micromanage people's hobbies - which brings illegitimacy to people who advocate for actual change, instead of scoring petty political points making it look like you're doing something by adding another useless regulation with a short shelf-life of relevancy.
who would attack a tomato
Not continuously, just intermittently for a few months of the year.
Ask HN: Offline Learning Resources for Children
I have an old 2007 iMac that I planned to set up in my 9yo son's room, but keep it offline. Are there any offline learning resources (general knowledge, programming, etc - especially interactive) that might be appropriate?

I assume there are offline versions of Wikipedia, but anything with content filtered? There are some serial killer pages on there that are pretty NSFL even for adults.
"recommended retail price of $0.99"

Am I getting cynical? Seems like no businesses are going to use this recommended price.
Some stuff I found interesting about number theory research
In the US, the financial industry has access to capital at an effective interest rate of 0%, they are rumored to be buying up real estate en masse, with the strategy of forcing everyone to become renters.

They've previously bought up a large portion of the mobile home parks and rapidly raised the rents on people who usually have no options to move.
Is there a map of where all these plants are located? Article points out one in Germany. Is Germany the only super polluter? Which country is most responsible?
Someone has to get started with saving the world, eh?
Address the dirtiest sources and the largest sinks, not the symbolic tiny sinks. Your laptop using 6 watts of idle power is not going to make a meaningful difference.
> We should reduce crime in our cities and end homelessness so our cities are appealing places to live.

The thing that would make my [Australian] city more appealing to live would be removing most of the cars from it. One of my big dislikes of inner city living is the noise, fumes and congestion from vehicles.
> about a quarter of all residential energy consumption is used on devices in idle power

That cannot possibly be true. I would love to know how they calculated that.

In New Zealand only about 20% of home electricity is used on electronics. And in the USA it appears to be even lower.

https://www.nzcompare.com/n/power/average-household-electric...

https://www.visualcapitalist.com/what-uses-the-most-energy-h...

Dryers, fridges, heating and lighting are the vast majority of power and they don't use much idle power.
Is watching a video considered "input"? And are these regulations enforced as default settings and do users have the ability to customize the settings? Or do they want the manufacturers to disable customization too?
>It’s our culture-wide moral failure

If Amazon vanished tomorrow, then there would no longer be a culture-wide moral failure?
I could see you point about restrictions on the young if there was no vaccine....but now placing the burden for other people's health on people who aren't vulnerable?

It seems a bit repressive.

It's simply up to the vulnerable populations to get the vaccine.
And the default docs and tutorials. If you look at Ruby on Rails. The way every tutorial will show makes it impossible to get an sql injection. Then as you gain more skill you will eventually find the function that lets you run a string query but no guide or tutorial shows you this so it is less likely you will use it without understanding.
In part, because the fixed infrastructure is built to serve peak demand, not average consumption. Bring down the peak (flatten the curve) and the rates will come down too.

Or, put differently, rates are high exactly because California per-capita usage is low -- fewer kWh across which to amortize costs.

Importantly, while California rates are relatively high, customer's bills are not -- because the customers use less electricity.
heh, i guess their fix to that is to just get rid of radars altogether.
I wonder what the breakdown of perpetrators is from adults vs peers. I believe the suit/lawyers in the U.S. were also looking for people who were abused by other children (probably mostly kids inappropriately "experimenting" with each other).

Perhaps there were thousands of adult perpetrators, but I find 12,000 to be an unimagineable number in this case.

I also wonder what the standard of proof was for claims.
That sounds like a pretty satisfying job. How'd you find it?
Do you not think it's in the best interest of Element Matrix Services to ship Dendrite? Presumably it would reduce their cost of operations significantly ...
Do they have professional drivers shuttling passengers around in tunnels? That's just kind of sad if that's really where they're at by now...
In developing countries at least it seems like it could be a really big deal. When a daily wage is $5 USD, making a domain $0.99 is much more friendly and encouraging, the difference of two days wages vs. a fifth of a day
tdeck, genetics is a statistical phenomena. Your parents being smart/strong/fast runner/good in music etc doesn't turn you into one of these instantly, but they're statistically correlated with you having similar abilities and traits.

How can you argue against this? Isn't this obvious? Isn't this what genetics is all about --- parents' genes being passed to offspring?

You're either blinded by your ideology... or maybe don't understand biology.
>Does it matter to you that these rules are trying to protect our civilization from dissolving in a heap of wildfires, floods, power outages, droughts, storms, etc? This stuff is not just hypothetical any more.

Half the issues you've listed are most certainly due to incompetence/mismanagement rather than PCs in CA/CO/HI/OR/VT using slightly more power. eg.

wildfires: Gov. Gavin Newsom cut the fire prevention budget by $150 million https://www.nbcbayarea.com/news/california/gov-newsom-overst...

power outages: failure on PG&E's part to trim trees https://www.kqed.org/news/11737336/judge-pge-paid-out-stock-...
This fact isn't in opposition to California's low energy consumption. It is one of the causes of California's low energy consumption. It is expensive to use power in Cali. This is a good thing, for the long term future of the environment. It would be better if using power stung a little everywhere, so people would make more considered choices about what to consume.
What distinguishes a workstation from a desktop?
Two's Complement Podcast
Proud of having a mild climate that doesn't require much heating or cooling?
Also, all states with humans living in them. If we're just gonna mention random facts.
You might want to edit your title to "Ask HN:"

In the UK you could ask for a company number and look it up at companies house (the registrar) but lookups for self employed people are very limited. Most countries have a registrar though.
Oh goodness that explains all the policies of post covid politicians.
Years ago I bought a tiny hockey puck sized computer to act as an internal web server. AFAIK there seemed to be no way for me to prevent it from going to sleep, I presume it was due to a similar regulation. This one from the EU. Had to throw the thing out.

I’m not looking forward to having to fight hardware / software locks on my computer that make it go to sleep all the time.
Yes, because of entropy.

edit: I don't understand why my comment is so controversial. We are all subject to the laws of thermodynamics. DNA, proteins, cells, and body structe is basically matter in low entropic state. Its interaction with the environment will inevitably lead damage or erosion of said structures, a basic process of entropy increasing in the system. Nobody is exempt from this process.
>IIRC, Subaru and other companies pass these simple emergency braking tests 100% of the time.

They do not pass 100% of the time unless you have a very narrow definition of "these simple emergency braking tests". No emergency braking system is foolproof.

>But its a well known fact that Tesla repeatedly fails at these simple tests,

You say this while at the same time the source you include has Tesla in the middle tier of results.

Either way, my point is not that Teslas are safe or that they perform well on this test. The point is that this test does not tell you whether a car being driven by Autopilot is safer than a human.
Given that I live in an area that's dark, I walk alone in the dark all the time. I'm just one of the lucky minority of people that manages to escape being ruled by unsubstantiated or irrational fear.
I had 7, deleted them. At least I won't miss this one.
Thanks. Looks like everyone knew about this since at least Jan 2018. Guess Dell didn't care to update their motherboards.
Concretely, what would you like to see done? Should the foundation be hit with a fine or a lawsuit for this bug? Would that improve the overall security stance of the public at large?
A Woman’s Intimate Record of Wyoming in the Early Twentieth Century
You have to be able to stop because they may stop for reasons other than illegal brake checking.
> In part, because the fixed infrastructure is built to serve peak demand, not average consumption.

Also, net metering and widespread consumer generation (largely solar) means that the fixed infrastructure costs are actually amortized not across the low total energy usage, but across a fraction of the total, already low, usage.
China.

https://www.ucsusa.org/resources/each-countrys-share-co2-emi...
Sure, I agree. Nobody said you don't need to be able to stop.
It would look like the world before Google Reader was killed. We'd all still be blogging and reading RSS feeds in a mostly distributed fashion.
That wasn't the point being made in the article - it was a standard "Trump administration bad, Obama administration good" smear which detracts from the actual argument.
This place has been an astonishingly good fit for me, yeah. I was laid off from my last job, and a friend passed along my resume at an opportune moment. That was twelve years ago, and I'm still here.

My group has a perpetually open posting and are always looking for people: https://rand.wd5.myworkdayjobs.com/en-US/External_Career_Sit...

[If the link doesn't work, go to rand.org, search jobs, then search for "research software engineer"]

EDIT: That link is to a specific posting. Our perpetual one is going back up any day now, once we get through the machinations.
Another way this could play out is some gov official decides to create the National Commission on App Stores (to solve the Apple and Google abuses), and then a bureaucrat comes later and just says every device must have and use an App Store, and we have the NCAS to ensure it’s fair, so why would you want anything else?
> You probably waste more electricity running your dishwasher instead of by hand than running a laptop.

Handwashing wastes energy compared to using a dishwasher, because it uses significantly more water that costs energy to purify.
I suspect it’s not quite right either, but two of those appliances (dryer, heating) are often powered by natural gas in the US (and on the East Coast, heating is done with “heating oil”).