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

Damn those ageists specifically refusing to hire 50 year old black guys and 50 year old hispanic guys!!!


Does the field of AI safety apply here?

Here is a legitimate case of people using artificial intelligence to facilitate murder... and people are mad it didn't comply?


I wonder if the new stdlib logger is featured enough to get rid of logrus/zerolog.


I'm wondering the same. Anyone already played for some time with the pkg?


There’s been an emphasis in slog on Handler composition over directly implementing a ton of features. Personally I love it - there are things I’ve needed, that slog can do, that few other loggers make easy/possible.

Zerolog will still be relevant for raw performance (slog is close to zap on perf - doesn’t win benchmarks, doesn’t look out of place either), fewer really need it but some really do.


I've been using it for a few weeks now. Overall pretty happy with it. Has good default API, and can be basically arbitrarily extended as needed. We even have a custom handler implementation that allows us to assert on specific logs being emitted in our stress/fuzz testing.


For #3 you can also use errgroup from sync/errgroup. It's a nice recent addition to the stdlib.

For #4 wrapping your errors creates pretty and logical error messages for free. It should be done in most cases.


It looks like sync/errgroup is a proposal, but not in the standard library (not yet, at any rate): https://github.com/golang/go/issues/57534


Oh that's right. I imported it via golang.org/x/sync/errgroup


Even the author of errgroup does not want errgroup to enter the stdlib for the reasons he mentions:

There are two significant problems with the API:

An errgroup.WithContext today cancels the Context when its Wait method returns, which makes it easier to avoid leaking resources but somewhat prone to bugs involving accidental reuse of the Context after the call to Wait.

The need to call Wait in order to free resources makes errgroup.WithContext unfortunately still somewhat prone to leaks. If you start a bunch of goroutines and then encounter an error while setting up another one, it's easy to accidentally leak all of the goroutines started so far — along with their associated Context — by writing


How can clicking an HTML element root my iPhone?



When someone talks about unspecified iPhones in the year 2023, they are probably not talking about iPhone 4 or older.


If those links are accurate, JailBreakMe hasn't been an issue for over a decade.


This medium article seems silly, just add custom metrics to your app for what was fetched from cache vs DB. And label the metric by route/query/pattern. To control costs, don't tick the metric for every single request, instead accumulate locally and post to metrics API every X minutes.


That didn't exist back then. Adding logging all over the application would increase costs while losing a significant amount of money.

The problem is that Google had no problem billing for a metric that they didn't expose to the user and didn't provide tools to debug properly.


1. No it would not be expensive. Writing metrics is literally free: https://cloud.google.com/stackdriver/pricing . If metrics didn't exist yet then log 1/1000 requests to control the log volume and find the pattern from the averages.

2. It isn't up to google to tell you if you are querying against the cache or the DB. It's your code. You should know. Just tick something when you use the Redis/BQ/GCS/SQL client.

This task is so easy I would assign it to a junior engineer and expect code changes done in one day!


1. Logs are not free. Stackdriver was not an option back then.

2. If the phone company charges me extra they tell me which numbers I called. Here a cache miss started happening. Only in production with no tooling available (at the time) to determine why this was happening. A single number of "data read" was all the information given. Not even the table name... That means you end up looking for a needle in a haystack.

I'm guessing you work for Google because your attitude seems similar. No they don't *have* to provide that service which is exactly why they suck. A service oriented company would make the *effort* to provide a user with this information. Especially a paying user at gold level.


> accumulate locally

Is that an option in AppEngine? The memcache docs seem to indicate the free tier has undocumented eviction policies.


You have to implement that with your own code but it isn't much more than a dict/map and a timestamp for last update.


Same-ish problem, though. You wouldn't know for sure the instance will run again...your dict/map data can be dropped. I don't see any sort of instance timeout callback where you could guard against that.


I think it's negligible. The only metrics you lose are on rare scaledowns and they are averaged out anyways. GCP likes to keep instances idle for a long time.


This article seems silly, just add custom metrics to your app for what was fetched from cache vs DB. And label the metric by route/query/pattern. To control costs, don't tick the metric for every single request, instead accumulate locally and post to metrics API every X minutes.


Cloud is not difficult, they just charge too much per API request.


Putting a network in the middle of your system, and making everything go through API requests (or RPC shudders) is almost never a good idea. If you have planet scale systems and the budget to hire enough bright engineers and still turn record breaking profits, sure. If not, you're just draining value from your bottom line to the vendor's


Because Adderall is 100% pure speed. A handful of Adderalls is more fun than a bag of cocaine (which is going to be more like 5% purity and adulterated with god knows what).


Don't talk out of your ass. Cocaine comes with a much, much bigger euphoric rush than even methamphetamine, which has a much bigger rush than amphetamine. If your coke is less fun than some focus enhancement, it's because somebody sold you a gram of baking powder.

Basically all stimulants can be categorized by a level of euphoric rush, and a level of focus they provide. Caffeine sucks at both, methamphetamine rocks at both, cocaine's good for a body rush but isn't very good for focus, and amphetamine comes with relatively little euphoria for a methamphetamine-comparable level of focus.


This is especially hilarious as I, a person with ADHD, am basically on speed whenever I loose access to Adderall. I would strongly encourage you to gain a better understanding of ADHD and other neurodivergent forms before continuing to speak on the topic.


>A handful of Adderalls is more fun than a bag of cocaine

Yeah, this is fear mongering; and I doubt any abuse you are seeing is actually happening on any sort of scale. To imply adderall is more fun than Cocaine/Cocaethylene is a completely strange assertion given cocaine's continued and greater penetration despite the fact it's a highly controlled schedule 2 drug. If you could have more fun with adderall, why would you spend more money on cocaine?


> given cocaine's continued and greater penetration despite the fact it's a highly controlled schedule 2 drug.

Not to take the wind out of your sails but adderall is also schedule II.


> Not to take the wind out of your sails but adderall is also schedule II.

OP was correct, cocaine is much more highly controlled despite sharing the same legal category. It’s only used in certain surgical procedures. You can’t get a prescription for it.


Maybe if you stop taking Adderall for fun you won't need to compare it to your bags of cocaine.


I take one pill a day, not a handful. Please stop this.


Mobility scooters can also be abused for a good time


Hang on Tay, we're coming to get you too!


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

Search: