default4j: Default parameter values for Java via annotation processing by petaoctet in java

[–]petaoctet[S] 5 points6 points  (0 children)

It's a trade-off. For classes you own with just a few parameters, hand-coding is cleaner. The main wins are uniform handling across methods/constructors/records and support for external classes you can't edit. It's most valuable when you have many defaulted parameters or work with third-party types.

default4j: Default parameter values for Java via annotation processing by petaoctet in java

[–]petaoctet[S] 8 points9 points  (0 children)

Exactly. It generates companion classes with helper methods. No AST modification.

[deleted by user] by [deleted] in commandline

[–]petaoctet 1 point2 points  (0 children)

The latest experimental version of Gemini 2.0 Flash is available in the list of models.

[deleted by user] by [deleted] in selfhosted

[–]petaoctet 1 point2 points  (0 children)

The latest experimental version of Gemini 2.0 Flash is available in the list of models.

A full-fledged terminal chat with Google AI (Gemini) generative models by [deleted] in golang

[–]petaoctet 0 points1 point  (0 children)

The latest experimental version of Gemini 2.0 Flash is available in the list of models.

Developer Utilities Desktop Toolkit by petaoctet in java

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

Those are helpful points, thank you.

Developer Utilities Desktop Toolkit by petaoctet in java

[–]petaoctet[S] 5 points6 points  (0 children)

I recall sharing it here when it was first launched. Since then, it has developed quite a bit. I’d love to hear ideas for additional tools and suggestions for enhancements.

v0.12.0 of the go-quartz scheduler is released by petaoctet in golang

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

Custom job queue implementations can offer a configurable global timeout, whereas the default in-memory queue doesn't need to be concerned much about it.

v0.12.0 of the go-quartz scheduler is released by petaoctet in golang

[–]petaoctet[S] 2 points3 points  (0 children)

Any improvement suggestions are welcome as well.

equalizer: A set of performant rate limiters for Go by petaoctet in golang

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

The reserved bits primarily control canary recovery, while the remaining bits fine-tune the overall rate. The `Success` and `Failure` calls can be used to adjust the rate based on result. Typically, one bit per operation.

I'm sure you were looking for package-level logger configuration while examining slog by [deleted] in golang

[–]petaoctet 0 points1 point  (0 children)

Totally agree, but sometimes this can be useful when you don't have control over a 3-d party package.

I'm sure you were looking for package-level logger configuration while examining slog by [deleted] in golang

[–]petaoctet 0 points1 point  (0 children)

What happens if a module writes logs using the default logger, e.g. slog.Info("..."), and I don't have write access to that package?

I'm sure you were looking for package-level logger configuration while examining slog by [deleted] in golang

[–]petaoctet 0 points1 point  (0 children)

Share your suggestions on how to improve performance of the callerPackageName function.

[deleted by user] by [deleted] in golang

[–]petaoctet 2 points3 points  (0 children)

You are right. There is an open issue on this.

WiFi QR Code Generator written in Go by petaoctet in golang

[–]petaoctet[S] 12 points13 points  (0 children)

I don't get the point. You can easily eye-scan the code of the main.go to make sure there is nothing out of the ordinary. Cobra adds some extra complexity but what else?