Hacker Newsnew | past | comments | ask | show | jobs | submit | gkc3's commentslogin

Would love to see an example of your monadic database abstraction


If you're familiar with Node.js promises, you already know how it works. I just pass a hollow "DB" object to my controllers that can perform queries and commands, but instead of returning data imperatively, I use JS-like "promises" to chain the next steps. On the "success" callback you have the result of queries. At the end I will just return this "chain of statements" that wasn't executed yet. I only really run everything at the "imperative" layer, within a database transaction.

  return DB.Query(...).ThenCommand(res => ...).ThenHttpSuccess(res => ...);
That's also similar to how Haskell IO works. If you desugar the "do" syntax, you get something like this. Of course I said "monadic" between quotes above because it doesn't follow the functor/monad laws, it's just a Fluent interface promise-thing tailor-made for that very small app.

A big issue is that this was in very small project. Promises are not exactly pretty, and the code is not the easiest to maintain if you don't know how they work, which is why I "cheated" on the Golang app. I think someone else smarter might be able to figure this problem out too, though :)


how is this related to health


"reproductive health"

Being able to get "abortion pills" is very much part of proper reproductive healthcare


How is it part of healthcare if nobody's health is threatened in 99% of cases? Do you consider steroids healthcare? What about something like plastic surgery?


Because being pregnant is actually pretty dangerous for women. It can be especially dangerous if you're in your mid-30's or older. And it's also really dangerous if you're not planning to become pregnant because babies remove essential nutrients from your body. Don't get me started on the risk of eclampsia, gestational diabetes, and post-partum depression. Babies also modify your immune system and may make you more susceptible to diseases. Delivery can be very risky too depending on the shape of your body, and some women have to undergo physically altering surgeries to deliver. Miscarriages can also kill women by causing them to bleed to death really quickly.

I think it's important to allow women to make decisions about pregnancy based on their perceived risk, rather than blithely dismissing the morning after pill as being akin to steroids.


> How is it part of healthcare if nobody's health is threatened in 99% of cases?

Far more than 1% of pregnancies carry health risks. Not only that women denied abortions are more likely to have complications during their pregnancy.

> Do you consider steroids healthcare?

Do you not? I've been given steroids for allergies, rashes, and muscle injuries.

> What about something like plastic surgery?

How is surgery anything but healthcare?


> Far more than 1% of pregnancies carry health risks.

Indeed; I'd put it at about 100%. Pregnancy is no joke.


Not hurt? What are you talking about.

Being forced to carry a pregnancy to term can cause bodily issues, psychological, and financial issues.

Or you know... just let a woman choose what they want to do with their body?

Plastic surgery is perfectly legal and you are fine to do it.

Steroids have shown averse and life threatening affects and really should only be prescribed.


Might be good to note as well that steroids are commonly prescribed for all kinds of ailments that people have, they're objectively healthcare as well.


Honestly that is one of those things that I did not know until recently.

Like I figured there was a legitimate reason they were prescribed, but I never actually knew first hand about. Now... my cats a small dose of steroids. The examples of people in this thread have been enlightening on that subject.

But unfortunately they do have a bad reputation. I mean if you hear steroids there is likely one image that comes to mind.


They are all similar in that they are disrupting natural bodily processes. I wouldn't call it "healthcare" when they are opposing the body. It is not very healthy for the baby in the womb.


"natural bodily processes" are disrupted all the time for the benefit of the individual.

I'd be interested in some scholarly sources regarding the efficacy of the information you're describing.


This. A remarkable amount of medical intervention is to externally moderate natural bodily processes that, if allowed to run to their conclusion, would disrupt the body to the point of destruction.

There's nothing special and privileged about "natural" processes; if there were we wouldn't need medicine at all.


When you're diagnosed with an easily-treated cancer, be sure to not be a hypocrite and refuse medical treatment for it, because that would be disrupting natural bodily processes.


> I wouldn't call it "healthcare" when they are opposing the body.

Come back and re-read this sentence if you ever get cancer.


> It is not very healthy for the baby in the womb.

Sucks to be a parasite I guess


Plastic surgery can save you if you have severe burn wounds or deformations that came out of an accident. So yes, plastic surgery is health care. Did you have other things in mind when listening these things?

Furthermore, 1% "health threat" is quite high of a percentage, don't you think?


Steroids are healthcare, and they are legitimately used for treatment of ailments.

Plastic Surgery is healthcare, as it can help treat mental disorders affected by body dysmorphia. Additionally, plastic surgery is much, much more common than you think and not always done for vanity. Even if it was, that's the individual's choice to have the procedure performed.

Do you have a source on that 99%? Most sources I'm seeing from a quick google search state that pregnancy is objectively dangerous for people that can get pregnant in many cases, much more than 1%


I consider steroids healthcare. They're used for rashes, chronic pain, low-testosterone treatment or testosterone hormone replacement.


Please don't be a sealion. If you don't agree with other views on the issue, just say so. But interrogating people is just annoying.


[flagged]


Oh so I guess we shouldn't consider vitamins and making sure the baby is fine reproductive health? The entire process falls under "reproductive health". Considering the process is very much still going on until that baby comes out... one way or another.

It is deeply depressing seeing comments like this on HN. But at least I feel better seeing the reaction.


I find it deeply depressing that people kill babies and that other people defend it. Different values.


This doesn't mean it is a good thing. There are literally 0 benefits of it and many negatives.


What does being a "fang dev" have to do with the quality of this terminal?


fang devs like to think that they are somehow superior to the rest of us. So they think mentioning that they work for a fang company gives their statements greater importance.


That’s not what I was getting at. I’m actually half retarded when it comes to dev. What I meant was that warp went above and beyond to accommodate organizational enforced security policies that were breaking warp for me.


Okay fair enough


That’s not an apology.


So more than any place I’ve ever worked, FANGs have large organizational policies that make using alternative terminals like this more difficult. Warp does a lot behind the scenes to do its magic. This was being broken by organizational policy enforced config on my dev box.

The warp team went above and beyond to work around those restrictions and configurations, and improved their product as a result.

I really liked that and it earned trust with me.

That’s all I meant. I should have been more clear.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: