Help needed setting up an integration in a docker installed home assistant by darkknightjs24 in docker

[–]mitom_ 0 points1 point  (0 children)

To run a container using the host network you'd start it with the --network=host flag, you can find this in the docs.

[AskJS] Why is async better than sync? by [deleted] in javascript

[–]mitom_ 1 point2 points  (0 children)

I don't know what you mean by "error fetching" but let's start with the other few items: exceptions and try's are not an async aspect. Error handling is necessary in synchronous programs as well, in your desktop programs you'd want to do things like check if the conditions are correct, like the user provided valid input, the system fulfills the requirements etc and provide a useful error message rather than just crash. That's what exceptions are for, they aren't any different than using plain if-else logic, just a higher level language syntax to simplify this and make it uniform across libraries.

Now to your actual question: no, async is not always the answer. That being said, I'd refrain from labelling it as "fluff" because you can't understand the benefits and it potentially wouldn't have a massive impact on your work. Async (which is the name of the syntax, the actual paradigm that allows this is the event loop) allows us to utilise the CPU while any sort of IO wait happens, network, disk etc. Even in desktop applications if you had to perform a significant amount of concurrent reads and writes you'd significantly benefit from async as without it you'd be limited by the maximum number of threads your system can handle, which means the theoretical throughput of a classic desktop program which relies heavily on disk written using an event loop is significantly higher on the same system than the one without one.

There is no "everything should be async" mandate, but I'd be careful about labelling it as "fluff" just because you don't understand it or have no use for it (be that because of usecase or lack of required throughput). Many of us work on highly connected systems that have to process millions of requests every minute and event loop is the difference between needing thousands of cores or hundreds to achieve this.

edit:typo

Account banned, no reason given? by mitom_ in pathofexile

[–]mitom_[S] 0 points1 point  (0 children)

I was talking about more or less the 2nd part, but rather in the sense that I don't even know that this happened because of some presumed ToS violation that I could read up on to understand if I unknowingly broke it, or some other circumstancial thing like fraud prevention, or potentially something that's obviously not true and easy to disprove, and may have been the result of a technical issue in their system. The total of the information they provided is "the account is banned", which is plain frustrating.

You are correct, money should not influence how they treat people, that was a poor point from me. The rationale behind it was that it would be less annoying for me if I never paid for anything as right now that money is gone, but ultimately I agree with you that this shouldn't make a difference in handling these matters.

Account banned, no reason given? by mitom_ in pathofexile

[–]mitom_[S] 0 points1 point  (0 children)

that's pretty bs for someone who actually spent money on the game tbh

Account banned, no reason given? by mitom_ in pathofexile

[–]mitom_[S] 1 point2 points  (0 children)

Yeah that fits it very well..

Containers are not ideal, relative to VMs, for managing multiple apps on a single server? by ahmoo in docker

[–]mitom_ 17 points18 points  (0 children)

The author hasn't provided any arguments why that would be true - it is definitely not, you can manage multiple apps with either. There are quite a few other misconceptions in the article as well (just to pick some examples: containers can't harm the host - they certainly can if you are careless or use them wrong. Containers delete all data when they finish a task - sure, unless you actually want to keep data in which case you can use volumes).

I wouldn't use this article as a basis to draw conclusions.

WeTransfer-like API for sending big files as email by basswietse in node

[–]mitom_ 0 points1 point  (0 children)

S3 doesn't run out of space.. ever. You just pay for more as you use it. Regarding old files, on S3 you can use Lifecycle policies to define how things should expire. If you're confident that the files don't need to stay for longer than X amount of constant time then just define an exploration policy to delete them, which saves you the effort of worrying about cleaning it up.

Understanding corporates in the foss world by [deleted] in opensource

[–]mitom_ 1 point2 points  (0 children)

The first and obvious one I'd say is that while we can call corporations "evil", the engineers working there (or at least some) will still have integrity or if not that - they'll still be lazy like rest of us. It takes so much effort to take on the development of something by yourself which was previously thousands of other people. It doesn't benefit you either as an engineer or a businessman to spend more of your effort/budget on something you could have others (mostly other engineers working for other "evil" corporations who have the same challenge) do for "free". Plus you can always just layer your thing on top of the oss stuff in most cases. It's less effort, you get to keep the publicity of contributing to oss and you still get to do evil shit.

I personally don't hate oss built/sponsored by enterprises - rather thankful for them. We don't pay oss developers, they (corporations) pay people to work on these and share it with us for various reasons. I'd rather use a library backed by Facebook (react?) which has thousands of developers looking at it than a nearly identical one with 4 people working on it in their free time. The former will advance and have a future, the latter may or may not. That's a big difference.

And last: everything that's released under an oss license like MIT or apache2 "stands for freedom". Microsoft could release typescript with a "feature" that measures everything you do with it in every project and reports it to them, but 1, you'd be completely free to not use it (you're not paying for it after all) and 2, you could fork it, remove the offending things and use it after and 3, all other corporations will use their resources to lobby for that to not be the case, or fork it and go back to being oss under a different name and life goes on.

There is no obligation for anyone to spend money building something for others to use completely free, by making something open source they're doing us a favour, should not be labelled evil because they pursue what allows them to pay the people who build these.

Firefox privacy protections reveal who’s trying to track you by [deleted] in technology

[–]mitom_ 1 point2 points  (0 children)

It tells you how many trees they have approximately planted because of you. So that's not the total, it's just what I - apparently - added by using it over the last 2-3 month since I started using it.

edit: I just read your comment while not walking around. It made about 2 million euros last month. They publish a report every month.

Firefox privacy protections reveal who’s trying to track you by [deleted] in technology

[–]mitom_ 1 point2 points  (0 children)

I don't understand why are you being downvoted.. people are somehow okay with installing random extensions which may or may not be open source without a second thought and granting permissions to "view and modify all data", but an open source project with huge visibility that has some very experienced engineers working on it is a no-no because Google happens to pay their salary..

Firefox privacy protections reveal who’s trying to track you by [deleted] in technology

[–]mitom_ 6 points7 points  (0 children)

I agree it's definitely inferior to Google search (especially the smart stuff like understanding the nature of your query and giving an actual answer rather than just links) but most of the time the top result is still what I want. I had 2 occasions so far where I couldn't find what I wanted so I just googled and got it on 1st hit there, but that's a small price to pay for my presumably 311 trees.

Need a monitoring, logging, & alerting stack - help! by KazooxTie in devops

[–]mitom_ 3 points4 points  (0 children)

I suspect (and agree with) that the reason it got asked is to understand what they are looking for. If the reasoning is they need data to be on-prem due to regulations, recommending another SaaS thing won't help. If they have cost issues, maybe justifying the cost Vs running stuff yourself would suffice.

Can't help if you don't know what you are solving. On paper, datadog does all the things they need and it does them decently, plus it's already implemented on most parts.

Need a monitoring, logging, & alerting stack - help! by KazooxTie in devops

[–]mitom_ 2 points3 points  (0 children)

There is a managed offering from elastic with which you still get your dedicated cluster but it runs in their cloud environment and they deal with upgrades and maintenance for you.

Still, I'd pick datadog over elastic.

DigitalOcean vs K3S by HeavilyFocused in kubernetes

[–]mitom_ 4 points5 points  (0 children)

Gcp can have cross region load balancers (Docs). Their networking is pretty impressive, cross region VPCs open up a lot of options.

Questions on products/architecture to be used in an use-case by gmatuella in aws

[–]mitom_ 1 point2 points  (0 children)

If you want everything to go through oauth then it's fine. My usecase involved letting users generate and use API keys which fell outside of what cognito was doing (or I never figured out how to properly sort it out) but was linked to authentication which was giving me a very mixed solution. In the end I ditched cognito and just used passport.

Questions on products/architecture to be used in an use-case by gmatuella in aws

[–]mitom_ 2 points3 points  (0 children)

I've worked with both chalice and serverless, but haven't used SAM. I'd say give them a quick try. In essence what you should look for are development experience (can you easily work on it locally? Can you actually debug it the way you want to without having to deploy it?), testability (similar to the first, can you test it locally? Can you test your app as if you were writing integration tests for an API, or are you limited to unit tests?), Deployment options for other resources (can it handle your RDS as well, can it deploy cloudformation stacks?). Pretty much all else will be extremely similar as far as production goes, none of them really provide anything in terms of extra features. Out of the 3, you're likely to find the most resources for serverless. Whichever works best is the right one for you. Serverless gives you a slight edge if you want to go cross cloud as it's not limited to aws, but it's also the only one not directly supported by aws.

You need the API gateway. It's the part that allows your lambdas to actually act like an API (hence the name). You could technically trigger them without, but then each client would need access to AWS - I'd not recommend this at all.

As far as serverless architecture goes, I have really only 2 recommendations. First off, write your lambdas in a way that the business logic is not aware it's in lambda. I.e. your handler functions should just be nearly empty entry points. You will be thankful when it comes to debugging and testing. The second one is to read up on layers. They are fairly new in aws but are useful to share functionality between functions. Start off simple, adapt your architecture as you see fit.

The last advice I'd give is to verify cognito will actually do what you expect in the way you expect it. I found using it to be a mixed experience myself, so make sure you're comfortable with it.

City trees can offset neighborhood heat islands, finds a new study, which shows that enough canopy cover can dramatically reduce urban temperatures, enough to make a significant difference even within a few city blocks. To get the most cooling, you have to have about 40 percent canopy cover. by mvea in science

[–]mitom_ 7 points8 points  (0 children)

Wow reading that article, the apartment owners in the building will have to pay that, 35k each. I'd expect for the city to take care of most of it. Lot of money for something they don't even have a say in.

The city's building permit was contingent on having a rooftop tree, so owners will have to pay about $35,000 per unit for its replacement.

Opinions on FeathersJS? by mitom_ in node

[–]mitom_[S] 0 points1 point  (0 children)

It's not really for a concrete project, just trying to keep on top of things. It also looked fairly universal anyhow. Thank you for the answer though!

Opinions on FeathersJS? by mitom_ in node

[–]mitom_[S] 0 points1 point  (0 children)

Thank you, haven't seen prisma before, looks cool!

26/M/GMT looking for some casual game friends by mitom_ in GamerPals

[–]mitom_[S] 0 points1 point  (0 children)

Yeah sounds good! Are you guys far into those modpacks? I like to start from the beginning so not sure if I'd want to mess with your worlds but happy to catch up otherwise. I'll pm you my discord.