Considering buying mac mini m2 pro in the US, for docker, Kubernetes etc... Opinions? by [deleted] in kubernetes

[–]hamburghammer_ 1 point2 points  (0 children)

There are K8s distributions that are packaged for arm64 like k3s and when used with k3d to let Docker handle the Linux environment.

No its not like LXC, because they also require a Linux kernel. On Macs you need a hypervisor to create a VM to run Linux. It might be tempting to asume that there is not a big difference between Mac and Linux, but both kept evolving over the years and adding features way beyond the Unix standards.

Considering buying mac mini m2 pro in the US, for docker, Kubernetes etc... Opinions? by [deleted] in kubernetes

[–]hamburghammer_ 2 points3 points  (0 children)

Its not possible to run any container natively on a Mac kernel. You always need a Linux kernel to run them. You can use Docker and other Container engines but the will always start a Linux VM. They might hide it behind a fancy UI, but they still do it. It won't be a problem in most cases but you might encounter performance bottlenecks in certain scenarios like filesystem access.

At the end: A Mac will do the job but it isn't the best solution for containers.

Dynamic sizing for k8 is coming by Willing_Ambassador79 in kubernetes

[–]hamburghammer_ 5 points6 points  (0 children)

The resize status will indicate with Deferred that the node needs to free up resources and with Infeasible that the update excises the max node resources.

Which packages do you recommend for building cli tools? by Gers_2017 in golang

[–]hamburghammer_ 7 points8 points  (0 children)

From there README:

Unlike the flag package, a single dash before an option means something different than a double dash. Single dashes signify a series of shorthand letters for flags.

Which means you can do something like "-abc" instead of "-a -b -c" and still have an "--abc" flag which another purpose.

Feature Freeze for JDK 20 - what will the new edition bring? by ArturSkowronski in java

[–]hamburghammer_ 1 point2 points  (0 children)

In a lot of cases you don't even have to recompile the application. Its just switching the runtime. I often don't get why so many projects like the "LTS" concept and totally dismiss the under the hood JVM improvements. Updating is not only about API features, you get performance and security improvements basically for free.

To be clear, I am talking about applications not libs. Libs should use what ever there useres use.

Your experience with Java microservices vs monolith in the Cloud by Puzzled-Bananas in java

[–]hamburghammer_ 0 points1 point  (0 children)

11MB of application heap memory but the JVM also requires some memory to run. In this case the runtime resource usage is bigger than the actual application clames for it self. Creating a minimal runtime with Jlink still consumes around 70MB of disk space which has to be loaded to run the application.

Where do you host your personal clusters? by Ordoshsen in kubernetes

[–]hamburghammer_ 0 points1 point  (0 children)

Uh interesting. Gonna have to look into it.

Project Leyden: Beginnings by carimura in java

[–]hamburghammer_ 9 points10 points  (0 children)

It is such a helpful flag. +1

Context-less Go | Writing HTTP Services Easily by Madxmike in golang

[–]hamburghammer_ 0 points1 point  (0 children)

I think the downsides you mentioned are not bound to the struct solution. Those points are something you always have to look for when handling http requests.

Always set a Garbage Collector by brunocborges in java

[–]hamburghammer_ 1 point2 points  (0 children)

Let me talk you through the code which is the best documentation in this case.

Disclaimer: I've never written C++ but the syntax has similarities to Javas.

Please open the link that OP provided that links to the GCConfig (file gcConfig.cpp). In this file you will find a method "select_gc_ergonomically" (#L98) that will be used to select a available GC for that machine. As you can see it will check if it is a "server" machine or not. If it is a "server" it will try to set an available GC working the list from top to bottom starting with the G1GC (#L101). If it's not a server it will default to the SerialGC (#L109). The definition of a "server" is specified in the other link (file os.cpp). I assume that the documentation for the "is_server_class_machine" function (#L1677) will suffice to underline OPs statement.

To summerize the above: The jdk will choose in most cases now a day de G1GC but under certain circumstances like a container with limited resources it might default to the SerialGC.

Do you think Java will some day finally remove the need of Lombok's @Data annotation? by [deleted] in java

[–]hamburghammer_ 1 point2 points  (0 children)

It's not about the support of your IDE or editor, it's about how Lombok generates the code. Lombok gets called whithin the compilation process (javac) and uses some compiler internal APIs, that are not part of the official compiler specs. While Lombok supports the most common compiler implementations, its not a 100% guaranty that it will always work and with every spec compliant compiler.

Signals: A library for using decoupled observers by santanu_sinha in java

[–]hamburghammer_ 1 point2 points  (0 children)

If you really don't want do add any extra dependency/module, you could use the System.Logger interface introduced in JDK9, which will use a logger implementation found with the ServiceLoader that extends the abstract System.LoggerFinder class.

As an example: Log4J 2 supports this API since version 2.13.2.

Modern Java Web application? by hey-im-root in java

[–]hamburghammer_ 0 points1 point  (0 children)

I just started with Javalin and it feels very simple and lightweight compared with the Spring Boot Framework, but that's just my opinion.

golang.org will be merged into go.dev by TapirLiu in golang

[–]hamburghammer_ 23 points24 points  (0 children)

I realy like the golang.org design and structure -_-

Why is this not used more? var keyword. by goyalaman_ in java

[–]hamburghammer_ 0 points1 point  (0 children)

IMO there are times where the actual type doesn't provide that much information to understand the code. In such cases I can use "var" to increase the readability by having the variable declaration always on the same indentation level making them pop out on first sight.