I don't think it's currently using async generators (have yet to read the linked article), but I suspect this new language feature may lead to some improvements!
907 karma · joined July 27, 2015
I don't think it's currently using async generators (have yet to read the linked article), but I suspect this new language feature may lead to some improvements!
That's essentially what a Linux container is: a process (that can fork) with its own shlib. If you have lots of processes that don't need to be isolated from each other and can share the same shlib, then no, you don't need this mechanism.
yarn global add ember-cli/ember-cliOn the other end of the spectrum, you have a family of five that makes too much money to qualify for a subsidy. They live in a red state that didn't expand Medicaid, uses the federally-managed exchange, and suffers from a lack of competition because there's only one insurer on that exchange. An HDHP for the family would cost $1,300/mo, which they can't afford, so they pay the penalty and go without insurance. They vote Republican because as they see it the government is forcing them to buy something they can't afford, and they want it to be better... or at least go back to the way it was.
A lot of people and families had plans and doctors they liked before the ACA was passed, and one of two things happened:
1. because year-over-year premium increases are regulated by the government per the ACA, insurers were forced to make their plans more efficient by reducing the size of their networks in one way or another. This meant that a lot of people lost access to their doctors and had to find another, often having to travel further and/or wait longer to see their new doctor.
2. they had terrible insurance before the ACA was passed, but didn't realize it. Perhaps they had unreasonably high deductibles, or access to few essential services, or ridiculously low lifetime limits, or punitive coinsurance rates, or... Perhaps they'd refuse to cover something because it was a "preexisting condition." Perhaps they'd drop you mid-treatment, making it impossible to get further treatment without going into severe debt. This insurance wouldn't have been much use to anyone in the event of cancer, or a heart attack, or a broken leg, but they were paying the premiums anyway, and it sure helped them feel insured. ACA made all of these practices illegal, or at least put some controls on them to ensure a baseline quality of insurance. These plans went away or became as expensive as other plans.
These people vote Republican because from their point of view ACA took away their plans and their doctors, and Obama had stupidly promised them that wouldn't happen. They had it good, or so they thought, and it was taken away from them.
Everyone else is experiencing rising deductibles and premiums with no end in sight. What most people fail to realize is that deductibles and premiums would be rising with or without ACA—as they were before the passage of ACA—at a greater rate! ACA bent the curve, so they're still increasing, but less so. Yes, your insurance cost $300/mo last year, and it costs $400/mo this year, but how much would it cost if ACA hadn't been passed seven years ago? Would you even be able to get insurance? Do you or a family member have a preexisting condition? Our minds aren't wired to think like this, though... all we see is a higher bill and want someone to blame, so we vote Republican.
I could go on. ACA did a lot, but it didn't do enough to encourage competition and control costs. Clearly. A public option and "death panels" would have helped a lot, but of course these were dropped to encourage bipartisan support for the bill... which it didn't get. Oh well.
I held JS at arm's length for way too long, trying to use it without actually learning it. I finally grew tired of being illiterate and read "You Don't Know JavaScript" by Kyle Simpson[0] and it was eye-opening. The preface[1] really spoke to me and I suspect it will speak to many others like me. I only wish I'd read it two years ago.
0. https://github.com/getify/You-Dont-Know-JS
1. https://github.com/getify/You-Dont-Know-JS/blob/master/prefa...
<ESC> k cw zcat <ESC> A <SPACE> | <SPACE> less <CR>
Very natural for any Vi user: go up a "line", change the first word, then append.I had the same experience (started Rubying in late 2015). I had much more success with RubyMonk, Metaprogramming Ruby 2, and some other "Ruby for Perl hackers" blog posts and such.
> 2. it doesn't, internal session class does and IMO most apps do not need expire claim.
If you're generating a token to send to an SPA or native app, you can't rely on any other expiration mechanism. It needs to be embedded in the token or stored server-side in a database-backed session or what have you.
> 3. Just put issuer/issued_at/whatever in your object
You're missing the point that these features would require additional SLOC to verify the "claims."
> 4. I suggest to look at messageverifier and do your own (and use sha256 hmac). Why? Lets consider 50 lines of code not "maintaining your crypto fork" but merely helpers.
By this logic, ruby-jwt isn't crypto, just helpers. It seems to be frowned upon simply because it includes additional features some people may not need, and those features and alternative signing methods require more SLOC than your presumed "optimal" implementation. Do you see no value in a flexible, reusable library?
> 5. JWT has more LOC inside, say header payload is just useless. I believe having OpenSSL::HMAC helpers is better and simple enough to not do it wrong
How can critics justify the position that people should write their own OpenSSL::HMAC helpers because they can't correctly call the JWT helpers?
* Use SameSite cookies (unfortunately, not yet supported by all browsers)
* Don't accept application/x-www-form-urlencoded, multipart/form-data, or text/plain at your endpoints, or
* Use CSRF tokens if you need to accept server-side rendered HTML forms
* Transport: how the session ID or token is shipped between clients and servers (authorization header, cookie headers, or payload).
* Storage: how the session ID or token is stored on clients (cookies, localStorage, sessionStorage, or in memory).
* Statefulness: whether to use a stateless token (with or without a revocation list) or a stateful, server-side session.
* Encryption and/or signing
* Structure/standardization
Examples:
* JWT generates structured, stateless tokens that are signed—and optionally encrypted (JWE)—with the implementor's choice of algorithm. The tokens can be transported and stored by any mechanisms.
* Rack::Session::Cookie (in Ruby) generates unstructured, stateless tokens that are signed—not encrypted—with HMAC. The tokens are transported and stored as cookies.
* Rack::Session::Pool (also in Ruby) maintains an in-memory store of unstructured, stateful sessions. Unsigned and unencrypted session IDs are transported and stored as cookies.
The point being that you can really mix and match. You can even send a session ID in a header and store it as a non-HttpOnly-cookie on the client. Anything goes!
* It doesn't support expiry as a claim; you have to check it against the current time manually, and factor in leeway if you want that. Because no one ever screwed up a timestamp check.
* It doesn't support any other verifiable claims, for that matter, so if you want to add e.g. issuer and issued-at, you'll have to do so manually.
* If you're not writing a Rails app, you have to pull in ActiveSupport... or copy code, as you suggest, which seems bad for other reasons. Surely maintaining your own crypto fork is almost as bad as writing your own crypto in the first place?
* To the best of my knowledge, ruby-jwt has not suffered either of the two JWT vulnerabilities discussed in this thread.
Finally, why is this "simple":
@verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256')
cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now])
But this is "bad": payload = { sub: @user.id, exp: Time.now.to_i + 1_209_600 }
cookies[:remember_me] = JWT.encode(payload, 's3Krit', 'HS256')
They seem fairly equivalent to me?Here's what I've never understood about this approach: the browser can send many requests at the same time, over the same (HTTP/2) or different (HTTP/1.1) connections. If, say, six requests hit your backend at the same time, all with the same refresh and security tokens, with four more queued up on the user-agent, and the security token is expired, how do you know:
1. that all ten requests are valid,
2. to revoke the security token once,
3. to generate one new security token,
4. to mark the refresh token as used,
5. to generate one new refresh token?
Is it as simple as granting some leeway on how long the tokens can be used after they expire/are revoked? Do you have some way of serializing requests on the client to prevent this from happening? Or do you assign all ten requests the same "batch" ID and tie them together on the backend somehow? Do you do a preflight request to refresh the security token if it's expired?
NPM is non-deterministic and doesn't have lockfiles, so it's a bit of a stretch to say it's on par with Bundler.
Yarn solves both those problems for JavaScript projects, and it's much faster.
I find I'm actually more successful at counting calories on this schedule. I think it's easier for me to completely abstain during the fasting period, and I'm less tempted to snack with lunch and dinner so close together. I've been planning and allocating my calories like I never have before, even though I've tried many carb- and calorie-counting schemes in the past.
I'm also toying around with taking a little MCT oil in the morning to help with cravings and mental focus and give me a little keto boost. It's unclear to me whether or not this defeats the purpose of the fast. Many people seem to think it's fine ("fat fasting") and maybe even a good idea, but I'm not yet convinced one way or the other.
I have a hietal hernia[0] that causes reflux and dyspepsia (trouble swallowing) and mimics these heart symptoms: shortness of breath, arrhythmia, chest pain, and tachycardia. A ketogenic diet helps, as does an OTC PPI[1] (e.g. Prilosec, Nexium). You might consider getting scoped to see if you have one as well (or just take a PPI for two weeks and see if it helps).
I've had arrhythmia since I was a teenager. Some of it is sinus (i.e. pressure on my vascular system caused by breathing) and some of it is not[2]. I've found that taking a daily multivitamin helps considerably, as does a diet rich in magnesium and potassium (occasionally supplemented), so I must have some deficiencies. I can't take too much pseudoephedrine (and try to avoid it completely after a particularly scary episode). Regular exercise helps as well. If I start to freak out about a particularly bad spell of arrhythmia and/or palpitations, I tell myself to eat an apple or a banana and go for a walk.
Alcohol and caffeine wreak havoc on all of the above, so I can't drink like I did in my 20s, and I try to limit myself to one pot of coffee per day. ;-)
> "your EKG is normal and you're fat"
If I had a nickel for every time I've heard that...
If you have bacterial endocarditis[3], that could explain why a low-carb diet is helpful: lower blood sugar -> less fuel for bacteria -> reduced heart valve inflammation. Maybe.
I have something else going on right now that I don't understand: waking up at night with back pain under my right shoulder blade, anxiety, and arrhythmia. I went to the hospital after the third incident and the EKG, blood work, chest X-ray, CT scan, etc. didn't reveal anything. I suspect it's stress-related and either an ulcer or bacterial endocarditis, so I need to get those looked at by specialists. I also had a clot in my leg last year for which I needed six months of blood thinners, so I wonder if that's related...
Getting old sucks.
0. https://en.wikipedia.org/wiki/Hiatus_hernia
1. https://en.wikipedia.org/wiki/Proton-pump_inhibitor
2. https://en.wikipedia.org/wiki/Premature_ventricular_contract...
"[H]ad I been in Congress at the time of the invasion, I would have cast a vote in opposition." — Donald Trump at an education event on 8-Sep-2016[0]
Considering that the vote was on 11-Oct-2002, and we have audio of Trump expressing hesitant, wishy-washy support for the war on 11-Sep-2002, that is almost certainly not true.
0. https://www.usnews.com/news/politics/articles/2016-09-10/ap-...
That's a lie, and one he's repeated often. Wishy-washy, hesitant support for a thing is not the same as being totally against a thing. His assertion that he was in opposition to it from the very beginning is a deliberate, egregious misrepresentation of his past views intended to convey authority on a subject that he simply does not possess.
I'll update the wording of my initial point to be more clear, since you have my original wording quoted here for posterity.
0. https://www.washingtonpost.com/news/the-fix/wp/2016/09/07/th...
How about:
* Lying about his past opposition to the Iraq war
* Lying about Russia only hacking the DNC (they hacked the RNC too, or at least tried to, but didn't release anything)
* Lying about the size of the crowd at his inauguration
* Lying about his "historic" electoral win (it wasn't)
* Lying about the election being rigged against him (before the election)
* Lying about the state of African American communities
* Lying about inner-city crime rates
* Lying about Obama and Clinton literally "founding" ISIS
* Lying about Ted Cruz's father being involved in the JFK assassination
* Lying about his charitable donations and activities
* Lying about his inability to release his tax returns because of an ongoing IRS audit
* Lying about his association with David Duke and the white national movement
* Lying about his history and relationship with Vladimir Putin
That's just a taste. I could go on.