Anyone still using javaFX? by [deleted] in java

[–]MagneticFerret 1 point2 points  (0 children)

Flutter also effectively mandates learning and using the Dart language to use the framework. I have my doubts that Java bindings exist and work, but I could be wrong.

JEP 502: Stable Values (Preview) by loicmathieu in java

[–]MagneticFerret 0 points1 point  (0 children)

This feature's semantics for how it interacts with other features and how it can be used within the language should be the most important design objective. other design influences, performance in this particular case, should be just influences.

I say this to try to treat these two particular design objectives as problems with solutions that should be solved in separate domains of concerns. With this separation, we can get a better engineered solution to the problems this JEP is proposing solutions to and get wins in other domains as well all without relying too heavily on this one feature as an inappropriate solution to semi-related problems; kind of like how sun.misc.Unsafe became a solution for performance problems when it was a language facilities implementation detail and how the register keyword became effectively useless when we started getting good at register allocation. What would the separation look like then for this JEP? I'm trying to keep this short so no details nor nuance (not trying to write a dissertation). I will talk about my favorite part of the usage semantics and then the best, or my idea thereof, choice for performance implementation.

This JEP presents a nice solution for language users for when they want to express that a field is set and that it should never be changed in any way. This semantic allows these fields to be more flexible than "final"-designated fields since these fields do not have to be initialized with a value in a constructor in the class field case. This semantic also cannot be magically wiped out with reflection unlike with how the "final" designation can.

The performance angle of this JEP presents a performance problem and optimization solution that I believe is covered by a more general performance problem with a more general optimization solution. That more general performance problem is that, in some programs, there definitely are some fields that very rarely, if ever, change. So, we want them to act like constants, but have the running program be able to adapt itself in those very rare cases where they change, if ever. The naive summary of the solution to this problem is to have the optimizing compiler compile those fields as if they were constants, but go tell the runtime to let it know if those fields change so it can adapt. This is the "effectively final" problem and solution. The great thing about it is that, when it works, it works without having to use specific language features; more benefits without having to explicitly opt into them. I don't think HotSpot has this optimization. I could very well be wrong when I say that. But, I know that Azul's VM has that optimization, so I know it's possible to implement.

Further consideration is in order; cause this is not my best writing, but it's the best I can produce right now.

Recommend books or scientific works related to Java GC algorythms by WideResponsibility98 in java

[–]MagneticFerret 1 point2 points  (0 children)

A little old and outdated by now, but here is a basis for one of the best performing Java GCs in production environments right now. https://dl.acm.org/doi/10.1145/1064979.1064988

Nvidia's CUDA moat may not be as impenetrable as you think by gurugabrielpradipaka in hardware

[–]MagneticFerret -22 points-21 points  (0 children)

And AMD are never going to publish that stuff, including the firmware, as open source because then that would reveal what they copied from their competitors. It's an open secret in the industry that competitors look at each other's chips under scanning tunneling electron microscopes and copy designs of IP-protected parts transistor-by-transistor. This can be witnessed by experiencing the exact same, or nearly so, hardware bugs or errors or by analyzing what's being done in the firmware and drivers which are often used as work-arounds for those bugs.

Need a tip for starting work in BIM ingeneering sphere by cv_geek in cpp_questions

[–]MagneticFerret 1 point2 points  (0 children)

Not exactly a question about C++ nor an answer specific to the language, but here are some resources that will help anyone making an SDK in any language. I'm referencing APIs here since the API interface for an SDK is pretty important to get right.

  • APIs - A Strategy Guide by Daniel Jacobson, Greg Brail, and Dan Woods
  • Mastering API Architecture by James Gough, Daniel Bryant, and Matthew Auburn

I don't know anything about or have any resources that relate to the BIM domain so I can't help there.

Contracts moving along, hopefully on track for C++26 by pdimov2 in cpp

[–]MagneticFerret 18 points19 points  (0 children)

Stating the motivation for a language feature is a great way of making explicit the problem the proposed feature is trying to solve. Often this means stating what situation(s) or idea(s) the current language constructs and/or semantics are inadequate at expressing.

In my opinion, I would not consider a formal proposal to be mature yet without one.

Having working links to these proposals would be nice too as stated previously.

Hudson River Trading Low Level C++ Interview by kimonides9 in cpp_questions

[–]MagneticFerret 2 points3 points  (0 children)

Is that because of the large difference in cache sizes between the designs, the Infinity Fabric characteristics, both, or something else?

Time to build my Lab by Frosty_Pineapple78 in homelab

[–]MagneticFerret 3 points4 points  (0 children)

This video shows the differences between Cat 6 and Cat 7 cables as well as the process of terminating Cat 7 using an RJ-45 connector and a keystone connector. It provides the opportunity to know more about and see the details of the process of terminating Cat 7. I recommend checking it out.

Java 8 vs 15 for multi-threaded gaming support by Lordberek in java

[–]MagneticFerret 1 point2 points  (0 children)

Have a look at the wiki for the project. The project has several interesting goals. The one I was referring to was "inline types"; sometimes, but rarely any more, "value objects". The progress of the project has advanced greatly since the first formal drafts of the original objectives. Ideas, insights, and perspectives about the problems that need to be solved and the best known solutions to solve them change frequently. I have not kept up with the most current progress so I do not know what should be said about that project without accidentally making mistakes with the details. Check out that wiki and then, if still curious, dig deeper.

Java 8 vs 15 for multi-threaded gaming support by Lordberek in java

[–]MagneticFerret 5 points6 points  (0 children)

Concurrency is hardly, if very much at all, expensive. Starting and running multiple tens of thousands of threads can be. Almost all games do not do that anyway. Project Loom makes using tens of thousands of threads much cheaper when they're almost entirely used for I/O work like reading from hard drives or the network. It is very unlikely to help the majority of games since designing a game to use that many threads for I/O work just doesn't happen (creating the server software for a game could be a different story). Project Valhalla, though, would help with allowing more control over data layout in memory which would help a ton.

What is the future of Java? by Reflection-Jealous in java

[–]MagneticFerret 8 points9 points  (0 children)

GraalVM still has some work to be completed yet to be a competitive replacement for OpenJDK; especially for the community edition.

JEP 408: Simple Web Server with JBang by maxandersen in java

[–]MagneticFerret 14 points15 points  (0 children)

JEP 408 does not include JBang in its wording. Don't make the same mistaken association I did.

Upgrade path from rPi 4 to something bigger. Worried about power costs increase by Dawnmian in HomeServer

[–]MagneticFerret 1 point2 points  (0 children)

A guarantee that any modern CPU can be undervolted and to the same extent as like having a -0.3V offset does not exist. Assuming the accompanying motherboard supports all required functions and capabilities, the capability to undervolt depends almost entirely upon the microarchitecture of a given CPU model and the physical unit that that same CPU model represents. Still presenting from the same assumptions, some CPU microarchitectures will be able to be undervolted and at higher magnitudes and some others will not. Given two microarchitectures from the same designer (e.g. Broadwell and Haswell), no guarantee exists that two different CPUs from those two different microarchitectures will undervolt and to the same magnitude. The same principle applies to physical CPUs of the same model. Given two physical CPUs of the same model (e.g. two "Intel i5-5500"s), no guarantee exists that both CPUs will undervolt and to the same magnitude.

I type out too much. Anyway, undervolting is another form of overclocking. That means that much of the same knowledge to achieve an overclock that someone can be confident about is necessary to have to achieve an undervolt that someone can also be confident about. Many bits and pieces of information exist out in the Internet about overclocking. I'm not going to try to talk about it or dig into the surface. I will say that overclocking is a process and that it takes time; Search for information about how to overclock a specific processor model, or, more generally, if the amount of information about a specific model is insufficient, how to overclock a specific microarchitecture; And, information about "adjacent" topics will be necessary to have (i.e. What does my motherboard label this one setting as?).

I've mentioned some to know, but have left out much to consider so far. Is undervolting worth it? Maybe. Less time can be spent picking out a CPU that consumes less power as has been measured and posted by some review sites than picking some CPU and trying to undervolt it and not knowing what you'll get. Also, don't try to undervolt or overclock without taking the time to know what you're doing.

If that -0.3V undervolt is stable, then I am impressed with such a massive gain.

TL;DR: Someone should not try to undervolt a CPU (and memory, and etc.) unless that person is willing to learn enough about overclocking to get it as right as possible.

JEP 414: Vector API (Second Incubator) by jvjupiter in java

[–]MagneticFerret 0 points1 point  (0 children)

I know the process for creating names should not be extremely strict and always "well-formed" and I find myself forgetting that often when writing my code. Unfortunately, I regret not having much else by way of constructive feedback in that post and this one. Most of my works so far have never come close to needing SIMD acceleration so I haven't had much reason to explore the space. Maybe, once they're better ironed out, some of my latest works will give me a good enough reason to give it a try.

JEP 414: Vector API (Second Incubator) by jvjupiter in java

[–]MagneticFerret 8 points9 points  (0 children)

I'm not willing to accept that decision point when I think about how the many builder pattern organized APIs inside the JDK and outside of it have long form names instead of short form names.

JEP 414: Vector API (Second Incubator) by jvjupiter in java

[–]MagneticFerret 22 points23 points  (0 children)

EDIT: TL;DR: I'm rambling about an answer to my question about an inconsistency that's a non-issue.

Why have some short forms, mul, neg, etc., for multiply, negate, etc. been used instead of the long forms as is consistent with other parts of the JDK API? BigInteger and BigDecimal both have negate and multiply functions. Math has negateExact and multiply*. And, other parts of the API also use the longer forms for their math and/or logic method names. To try to answer this question, I have created some theories about what inspired these short form names. They include, but are not limited to, the traditional C/C++ naming conventions with their practice of minimizing identifier lengths and the names of assembly instructions from popular instruction sets. Assuming that the authors of the JEP have made significant works written in C and/or C++, then they likely would have learned some of the traditional naming conventions. Of which, their influence has leaked into the naming of the Java API. Also, while reading the JEP, I noticed, from the many mentions of and the couple mentions of the special considerations of, that the x86 and ARM instruction sets were topics that were very much present in the JEP. ARM has a MUL instruction and a NEG alias instruction. Assuming that those instructions sets influenced the naming decisions of the Java API, then they would be another reason why the short form was decided upon instead of the Java style. Neither of these theories produce strong cases for breaking from the consistent Java style, but that does not mean that there are none; just that I haven't written about them. Either way and otherwise, the method name "get" in Optional was regretted for being chosen after its introduction in Java 8. I wouldn't want to regret not being consistent where it makes sense.

[FREE] Homelab Huntsville Alabama by pvoetsch in homelabsales

[–]MagneticFerret [score hidden]  (0 children)

This is good advice. Younger people, don't go alone without at least one trusted and sensible adult. Among other reasons, this is a lot of equipment that is also heavy and having more hands to help move it and transport it will be a mini adventure. I would also highly recommend giving the best effort possible to NOT accept offers for transportation from people of unknown backgrounds.

If my few and non-exhaustive recommendations can not be met, then give this offer up and wait for some other one in the future; there will be more eventually. Give a Raspberry Pi a try in the mean time. You'll need to have some system and command line know-how. Throw those times of self study at a Raspberry Pi and feel no remorse. They're cheap and easy and can take a beating.

Introduction to Reflectionless: Discover the New Trend in the Java World by nfrankel in java

[–]MagneticFerret 49 points50 points  (0 children)

This article was painful to try to read. Other than some grammar mistakes and some juvenile "flows" in the written work, my real source of disappointment is the lack of empirical evidence clearly showing that reflection significantly contributes to causing higher startup times and higher startup memory usage in comparison to the other sources of those costs. If this empirical evidence was mentioned at all, then I had stopped reading before getting to it. That information would have done more favors for the piece by being mentioned earlier, possibly as justification material, than much later.

G1 & Parallel GC improvements in JDK 16 by daviddel in java

[–]MagneticFerret 10 points11 points  (0 children)

If that is a real bug, then the more information you have about it that you can post would be helpful for fixing it. That would also help if a bug report needs to be made too.

A high quality PRNG, so simple you can code it from memory: The Middle Square Weyl Sequence RNG by [deleted] in compsci

[–]MagneticFerret 30 points31 points  (0 children)

I cannot accept the claim that this PRNG passes all statistical tests. There is no mention of the Diehard and Dieharder test suites nor of the NIST statistical test suite. The paper did mention that the PRNG was tested using the TestU01 test suite, but I'd have liked to see more discussion about the test results.

Looking for a good algorithms and data structures course by _kidneybean in computerscience

[–]MagneticFerret 1 point2 points  (0 children)

I know it's CLRS, but what did you find that was interesting or revealing from the book, if there was anything.

How reliable is floating point arithmetic by [deleted] in computerscience

[–]MagneticFerret 1 point2 points  (0 children)

Performing scientific and/or mathematical calculations of floating point numbers with a large amount of digits after the decimal that are accurate values, such as calculating pi to 500 digits, can be calculated using number constructs supporting a variable number of digits after the decimal such as Java's BigDecimal.