skysight-inc/HackerNews huggingface dataset:
@ring.memcache(client, expire=60)
def get_url(url):
return requests.get(url).content

can be written:

def get_url(url):
return requests.get(url).content

get_url = ring.memcache(client, expire=60)(get_url)

Decorators are just syntactic sugar for that pattern.

You are then welcome to instantiate your ring.memcache object and bind it were it pleases you.

I would have provided a different API though:

cache = pymemcache.client.Client(('127.0.0.1', 11211))

@cache.lru(expire=60) # wrapper of ring.cache(client)
def get_url(url):
return requests.get(url).content

And accepted the alternative:

cache = pymemcache.client.Client(conf_factory)

def get_url(url):
return requests.get(url).content

get_url = cache.wraps.lru(get_url, expire=60)

It's better to not expect all people to know about the details of decorators just to use your API, and a factory is a nice hook to have anyway: it say where the code for that dynamic configuration should be and code as documentation is the best doc.

Also a patch() context manager would be nice for temporary caching:

with cache.patch('module.lru', expire=60):
get_url()

But it's hard to do in a thread safe way to compromised would have to be made.
You have the writings of people 500 years ago who could write. That was not that common.
I don't see why you couldn't have a fossil fuel lobbyist as a dictator, or even as a dictatorial appointment motivated by the same reasons that got the current EPA head appointed.
Who exactly is buying meat from China also? From my time in Vietnam the locals I knew shunned Chinese meat imports and recommended not buying it even though it was slightly cheaper, many simply don't trust it and there was a few scandals.
> If a developer - regardless of age, lets not get into age discrimination here - finds CVS a roadblock to working on OpenBSD, they are simply not a good developer.

While we're at it, if a developer finds ed (the standard text editor) a roadblock to working on OpenBSD, they are simply not a good developer.

Why is somebody "not a good developer" if they don't want to work with tools which are an insult to the priorities and humanity of the user†, for no good reason, when they could go to Linux and have 99% of what's good about OpenBSD, without the cult of GCC 4.2-justifying, CVS masochists?

I love OpenBSD, but the self-defeating goober decisions clearly reduce the number of people willing to become the experts needed to push the project forward. So much of OpenBSD is user-friendly, as long as that user reads the manual; but CVS is among the most user-hostile version control systems any living developer remembers using, and even if you know exactly what you're doing CVS is still an inconvenience because of centralization, and because of the amount of clerical work required to get it to operate properly.

† In the context of a world full of spectacular alternatives; obviously this doesn't apply to a time when CVS was a cut above.
Literally every Google website tries to get me to download Chrome whenever I use firefox or ie. Every. Single. Time.

2 attempts from Microsoft... not so bad.
Having a whitelist of tested browsers you officially support is understandable.

Having a blacklist of tested browsers you know to be so incompatible that the site is unusable for them would be even better.

But the optimal course would be that if a browser is not on your whitelist, you show a warning but allow the user to decide to give it a try nevertheless and have an option to go back to the degraded but more compatible legacy version of the site.

I understand building your intranet tool to only work in a small range of handpicked browsers or devices. But we're talking about a public video platform by a multi-billion dollar company with billions (well, 1.9 bn last I heard) of monthly active users.
I grew up in San Diego. I have seen a very encouraging amount of solar deployment on houses there. But there is still a massive potential for more residential solar.

When I visited my brother in Ft. Worth I saw almost no residential solar. I also noticed that there was a massive supply of wind blowing around the neighborhood.

Is it really not feasible to harness solar and wind better? Maybe it requires moving to a more distributed system with suburbia becoming much less dependant on the power companies.

To me you just really need to be sure it's not feasible to do it with solar and wind before you get too serious about reviving the nuclear power industry.
I work 8 hour days. But we have fairly flexible policy and I work at a company where nobody cares, as long as your pull-requests keep comming and you respond on slack :P Everybody just knows that for me, that won't happen friday-sunday.

Negotiation looked like this:

They: so we would like to hire you,what salary would you have in mind?

Me: I'd rather you tell me, but I would especially be open, if I could have only 4 day work-week

They, after some back and forth: ok, we would give you X

Me: To clarify, X for a 4 day workweek? That sounds good!

Them: Ehm, we meant for full week, but no problem with 80% X for 4 day workweek

Me: ah, let me think it through

Them: we can make it 85% X for 4 day workweek, if that would make it better

Me: ok, will let you know ... by friday?
Let's all remember that the first client-side scripting language was Tcl (inside ViolaWWW).

http://www.viola.org/viola/vw/brief.html

> (If this were rendering on ViolaWWW, the button could actually be live on this document page!)

Loss of functionality well before JavaScript. ;)
Even if nothing comes from LENR, there were other interesting (probably not nuclear) things going on that have since been ignored because of the scientific taboo. The quintessential electrolysis experiment wasn't entirely inert, supposedly, even if nothing nuclear was happening.

Google could stumble into something very profitable.
Said by Churchill, Eton vs Harrow.
Right after the admission scandal broke, I saw a Cal Tech grad point out that it probably wasn't a coincidence that none of the parents tried to get their kids into Cal Tech, given its deserved reputation for making students work hard.

Which data point confirms your observation that this varies widely by school and there are hard programs out there.
Feature flags are a good example. One developer A enable a feature and deploy its version on integation.

Two days after, developer B deploys its version, but isn't aware that A deployed with the new feature enabled, so the feature is disabled with its deployment on integration.

Ideally, developers should use a centralized configuration management to no suppress each other configs.
That's why we use Jenkins or the Atlassian suite for example. But it's heavy to install and maintain sometimes.
It's also not hard to imagine that he will enjoy complete impunity.
IIS handles all this out of the box for me. I just bind the host name to the site in question. It sounds like maybe this isn’t something that other web servers do, which is surprising. The whole point of the operation is to seamlessly run 30 odd websites on one dev machine without needing to fiddle with port numbers or anything else.
Not sure if popular, but Librem One is very promising.
"But I’m making the case that grade inflation doesn’t need to stop, the dependency on higher education does. Grade inflation is a symptom, as is every other non-merit based operation of it."

This is a good point and I agree with you. Thanks for your insight.
I saw that, which would make me consider it, however, Pandoc supports LaTeX embedded in Markdown, which has been a nice combo.
I suspect that's true but also raises an interesting question: how much effort should Google be expected to expend supporting other browsers? Not testing / optimizing in anything other than Chrome has lead to numerous issues in the past which were not deliberate sabotage but it feels like there's something dodgy about negligence which aligns with business goals, too, just as there was when Microsoft didn't support anything but IE or consistently broke things like MSDN on non-IE browsers.
Oh man, what a mess! The UA string mentions almost every browser except the one it actually is...

I understand the reasons, but I think it might be time for a big "reset", and for browsers to stop lying about who they are.
I think Brian means that he was against moving to advertising, and Mark was for it.
You sure? Think about the kingdoms that existed in say what's now Tanzania, before the some guys from Oman showed up (and some guys from Portugal, and maybe a few earlier too)... they certainly seem to have vanished from the map.
> But even if you did, you still haven't resolved the issue: you can't make a call to a different domain without access-control headers, unless it's the same domain

> you can't load mypage.com and then fetch from www.mypage.com, even if you resolve www.mypage.com to 127.0.0.1 the browser won't let you do it

In this part you’re confusing what a rebinding attack is: by serving a DNS response with a short TTL an attacker is able to associate two different IPs to the same query, thus it'd be mypage.com and mypage.com (not www.mypage.com).. bypassing the same origin restrictions of the browsers.

https://capec.mitre.org/data/definitions/275.html
> So not only do Americans get to wait twice as long, but they have to pay for it as well? You have to pay for ambulances? Why is this not politicized more?

Americans have come to accept many things about how their country functions as just normal, and they don't realize it can be, and is, so much better in other parts of the world.

I'm visiting after three years of going around Africa, and it's staggering to see how the USA functions and what people have accepted. (I've spent time in about 10 states so far this time around, East coast and West. I will hit another 20 or so this summer)
CORS is not enabled by default anywhere, I have few servers running right now on my laptop and the page can't see any of them, because all of them have CORS disabled

First thing you do when you enable CORS is to configure it to only respond to specific domains, so when you deploy to production you don't leave it open by accident.

BTW if you enable CORS as in 'simple usage' in the docs, chances are the
home page is a blank page and there will be nothing to be stolen
Choosing Ruby on Rails for Your Next Web Development Project
Investors are betting the Netflix of education can give kids what schools can’t
Robot folding towels after training in simulation using Deep RL
This was just following duterte's moves in sending trash back to their origin. More for show than anything
I was actually suggesting it could be on Microsoft's side, sending the old "Edge" UA instead of the new "Edg" one. But it could easily be a screwup in Google's UA detection treating the new version the same as the old one.

Big question for my idea is whether Edge's "use old UA for streaming sites" is a hardcoded list of a few sites like Netflix, or if it's something that might have flagged YouTube as being a video site that should get Old Edge agent by mistake.

EDIT - MS's useragent overrides are hardcoded to specific domains, so it wouldn't be identifying as Old Edge for YouTube unless someone at Microsoft manually set it to do that. Probably Google's fault for miscategorizing the new UA.

>One section of the JSON configuration file is called EdgeDomainActions and is a series of rules that specify what browser Microsoft Edge should impersonate when visiting a particular site. You can see the EdgeDomainActions config section below.

https://www.bleepingcomputer.com/news/microsoft/the-new-micr...
We also have too many "essential oils" and homeopathy from world-of-mouth. It cuts both ways.
Seems like a good example of https://tvtropes.org/pmwiki/pmwiki.php/Main/ReedRichardsIsUs... .

No one ever thought cheap energy might be helpful before a few years ago? It's still not useful outside of cars?
Also, I will say, some of the worst engineering I have ever seen has been on these allegedly superior engineers that work in AI and statistical analysis.

Maybe self reflection or hubris is the issue?
> pressuring professors to have a "C" average <-- i think this pressure is a far worse problem than grade inflation. Rather than aiming to get every student to the highest level, professors are pressured into using reverse-curving and other tactics (trick questions, ambiguous study guides) to artificially "deflate" students scores.

Depends on how you look at it. I went to a school that bell curved around a C for most core classes and most of the curving wasn't "deflating scores" but rather making the class hard enough that there was a wide distribution of scores which made identifying the people who understood the most material clear. Having everyone get A's may make you feel good, but then you are most likely holding people back as there is no way for them to work harder and stand out if it is so easy that everyone is getting A's. Also, that competitive environment tends to make everyone work harder so they learn more.

While I'm not saying there shouldn't be schools where it is easy to get A's and B's, I am 100% glad I went to one that pushed me as hard as they did as I learned a ton and I have gotten very good job offers since graduating.
> I honestly don't think either was the purpose. XHTML existed to make parsing easier.

That being the only goal would have resulted in a much simpler standard. Extension modules for example is completely orthogonal to that goal. I think that the standards themselves do a good job of describing what motivates them.

> The only things you couldn't do in XHTML 1.1 that you could do in HTML were having unclosed tags and using uppercase in tag names. That's it.

That's true, but ignores the opposite question—what you could do in XHTML that you could not in HTML.
I would suggest "The Meditations" by Marcus Aurelius. It might be a tough one to read, but the audible I listened to (there are a few of them) made it easier to consume.
Take the 18th Street stop. You actually can't get in or out of this station without using stairs AFAIK. There are other stations like this. Are you really using these stations if you're unable to walk a few blocks?

It's expensive in time and money to stop and start the trains. Also you need to maintain a station and employ people there.

If you want to provide for those with physical difficulties where walking 4 blocks is an issue, you support those people directly by, say, paying for their Ubers/cabs.

Are you American by any chance? I find Americans are more prone to this particular issue of not being able to make exceptions where necessary. People can't walk 4 blocks? Make everyone wait! Have more stops! Build more stations!

I mean this is exactly why Prop 13 in California was and is ridiculous. If we're really concerned about old people being forced out of their homes by rising property tax bills, why not just give them in particular a subsidized rate? Why do houses in Malibu and Beverly Hills need caps on property taxes because of some retired person in Bakersfield?
Yes, it definitely appears this way! I just know a bit about china and nearly nothing about india so i don't really comment :)
Yeah, I’ve done a bunch of program-style booklets in Latex (including some with side by side translations) and it’s really a nice environment for that sort of thing. It’s a bit tricky figuring out all the moving parts but, once you have, it’s straightforward to just drop the text in, edit it a bit, and print out something that looks professional.
Zdog: Round, flat, designer-friendly pseudo-3D engine for canvas and SVG
“what we call authoritarian” is rolling over protestors with tanks. That’s for starters.
I'm stipulating that we use a salt, so the (password+websitesUniqueSalt) equals a different hash each time.
New superconductivity record edges closer to room temperature
You can not mix a bunch of random crops in one field. This is such a HN comment.
Nice. There are a few bugs:

- Clicking multiple times in a box causes an unreadable mess

- If the code gets too long the "Please may I have some code" model disappears off the page, including the only way to close it ("Done" button). Clicking outside the model doesn't close it nor does the escape key.

- If you set rows or columns to -1 it generates a display artifact which remains indefinitely.

- "What does this project do?" model cannot be closed or read fully (outside page limits).

I'm on Chrome retail latest (74.0.3729.169) with 125% Windows DPI.
Here we don't usually grade on a curve (just move the mapping of points to grades a little), and a general observation seems to be that there usually is an overlap of two normal distributions - the ones that understood the material and the ones that didn't.
Surely this is the nail in the user-agent-sniffing coffin
I edited my comment to say closed.
Like the article said, in practice the WebAssembly can actually be faster, because it can use all the optimizations for the target machine.
I agree that two attempts isn't so bad. I think most users are upset because the notifications happened a lot more frequently in the past and using notifications from the OS for ads comes across as pretty slimy (because you only expect the OS to tell you when something important happens).
My favourite was ““replacement of "include()" with something like "i_might_be_partial_to()", ””
Drive works fine for me in Safari (other than using an unreasonable amount of CPU). It sure beats installing drive sync or whatever it is called.
Of course. But it's easy for many to unthinkingly look at public transit through the lens of efficiency for able-bodied riders and ignore those who are long-term or temporarily disabled in some manner.
I don't see what security we would be removing. I am for keeping SSL and server side hashing. I am just suggesting the addition of client side hashing also.
1. That was a period of super-high growth. Seeing positive change is one's life is one of the greatest contributors to happiness (one easy way to tap into this mechanism would be to have a terrible war that destroys everything, and then just have get their lives on track again).

2. Culture changed. In the past, people were told by society to not complain about their mental state, whereas now people are opened up almost to the point of being exhibitionistic. So, you cannot really compare reports from 50 years ago with today's numbers.
Ask HN: Other options beside Crashlytics for mobile crash analytics and reports?
The article specifically states that 7/11 was preventing various stores from not being open.

“We will let the owners (of franchise stores) make the final decision (on whether to shorten operating hours),” said Seven-Eleven Japan President Fumihiko Nagamatsu.

There is a 7/11 near the Sapporo Zoo that is closed early in the evening.
I don’t understand. Why would central planning be required to fix climate change? How about just charge greenhouse gas emitters so that there are no longer externalities?

I don’t see any reason to turn to central planning, unless one just uses that term to refer to any regulations involving the economy.
I wrote some code a while back to find and detect other devices on your network, although it no longer seems to work on safari: http://joevennix.com/lan-js/examples/dashboard.html

The fingerprinting db it used can be found in the repo: https://github.com/joevennix/lan-js/blob/master/src/db.js
They’ll just incinerate it, which is probably what they should have done in the first place. Companies in third world countries bidding unrealistically low for recycling contracts has made recycling seem more viable than it actually is.
Video Game Addiction Is Now an Official Mental Health Disorder
I think I'm starting to see why Google hasn't said anything about pricing:

> The tech giant believes that game developers will no longer be limited to computing and will be able to create games with "nearly unlimited resources". [1]

So the paradigm shift is that as a developer, your game simply consumes the amount of cloud resources that it requires to run, and nothing more. i.e. Stardew Valley is cheaper to run ("publish") than Red Dead Redemption.

So perhaps the idea is that the game publisher has to pay for the compute time and price the game accordingly.
My rough calculations give it 15 stops for 2420m in direction 1 (avg 160m), and 2235m in direction 2 (avg 148m).

Alas, it appears that route 631 has it beat - 1440m in direction 1 (avg 130m), 1751m in direction 2 (avg 134m)

(although, peculiarly, the information in TfL's bus route download doesn't match what you get from the web site when you look up 631.)
> The article itself acknowledges that the ratio of contractors to employees at Google isn't out of the ordinary for SV companies and my personal experience is that it isn't unusual for large companies outside of SV.

Just because it's common doesn't mean it's okay.
I don't mind a changing standard as long as two people can agree on exactly which version of the standard they're talking about and actually use that version.

I should be able to build my web app against an LTS version of the standard and expect it to behave identically in all future versions of all major browsers, until the EOL date of said version, no matter what changes they make in future versions. I want this for the same reason I want either CentOS or Ubuntu LTS, not Arch, on my production boxes.

Unfortunately, the whole HTML 5.1/5.2/5.3 business never quite caught on, and browsers don't support anything but the latest snapshot of whatever it is that they call a standard.
You may be underestimating the thought processes of conspiracy theorists.

Google have admitted to spending multiple millions over a number of years on a cold fusion team yet the team are still only publishing negative results? No one does that unless there are results they're not publishing...etc etc.
I suppose this is meant to be funny.
require constant vigilance

i.e., y’all need to vote.
Most likely a user-agent check to ensure compatibility. I don't assume any ill intent.

That being said, what does annoy me is that we've known for years that feature detection is preferable to user-agent detection, and I would kind of expect one of the biggest web development companies in the world to be following best practices.

This isn't my local pizza shop, Google engineers should know better. Have they already forgotten the dumb "best viewed in IE" banners that magically vanished as soon as the user-agent changed? Heck, even more recently the original version of Edge had to literally start lying to websites about its user-agent just so they would stop serving alternative IE hacks. Yeah it's easier in the short term to do browser-detection and whitelisting for rendering quirks and bugs -- it's just unreliable and error-prone over the long term, and hurts the overall web browser ecosystem.

Google should be setting an example for ordinary developers here, not encouraging hacky shortcuts. If Google isn't going to take the time to think about progressive enhancement from the very start of their experiments, who else is going to?
Haven't nuclear waste recycling and safety features gotten really good in the past few decades? I feel like not many people know just how little waste is created with modern recycling and just how safe nuclear is with modern safety features.

Seems like we need a positive PR campaign to help convince folks that nuclear is way better than fossil fuels. This could easily be bipartisan.
The people who agreed to buy it did so illegally. It's just that now, Malaysia is implementing a more robust and wholistic police action to enforce their mandates in that regard.

Sucks for us, but entirely within the rights of the government of Malaysia. If we have a problem with the scammers who took our money, then we're free to take that up in court with the scammers. But that has nothing to do with the government of Malaysia.
It does mention it at the very end. Either "Edge/18.18362" or "Edg/75.0.109.0"

But yes, user agents are terrible.
Perhaps the site has left for its afternoon tea?