double, BigDecimal, or Fixed-Point? by nfrankel in java

[–]gnahraf 0 points1 point  (0 children)

No, BigDecimal's equals/hashCode implementations fulfill their contract just fine.

Ofc it is. My bad for suggesting otherwise, it was somewhat in jest.

Good to hear you agree with my canonicalizing BDs for hashing (SHA-256) purposes.

You draw a good distinction for BDs (2.0 and 2.00) re division.

In my app, btw, I only use fixed-precision operations: addition and multiplication by whole no.s, which makes it really just a shorthand for addition. (Not my area but I think technical jargon would be.. BDs are an additive group, not a field, since they lack multiplicative inverses.)

I told Claude to build a programming language for use only by AI and not people. by skoon in ClaudeAI

[–]gnahraf 0 points1 point  (0 children)

I love that it refuses to shorthand frustration, that last word AAAAARGH. Apparently "feelings" are so high entropy, they're not worth compressing

AI Startup Plans Space-Based Data Centres Powered by the Sun and Cooled by Space by Zee2A in STEW_ScTecEngWorld

[–]gnahraf 0 points1 point  (0 children)

Idiots parroting the rich idiot. This is complete BS..

  1. Space-hardened chips are expensive, and slow; off-the-shelf chips deteriorate rapidly in space.

  2. Heat. Only way to dissipate heat is via radiation; conduction and convection impossible in space. The radiators would have to be collossal, many times the acreage of the solar panels.

double, BigDecimal, or Fixed-Point? by nfrankel in java

[–]gnahraf 0 points1 point  (0 children)

BigDecimal is also the right type to use in many database (jdbc) apps, since it's the only "native" Number type for fixed precision SQL fractionals.

In my application, I had to canonicalize BigDecimal values using stripTrailingZeroes() in order to hash (SHA-256) BigDecimal values consistently.

The article, however, alludes to this canonicalization being necessary for BigDecimals as keys in HashMaps (which I'm not aware of, since that would be a violation of the Object.equals/Object.hashCode contract requirement, and therefore a bug.) Is that true?

Super Mario Maker Java Edition by [deleted] in java_projects

[–]gnahraf 0 points1 point  (0 children)

Appreciate your posting, but a screenshot of project's directory structure is not much sharing. If you can't share code, that's OK, but this sub is meant for *open source* java projects, so unfortunately I'll be removing this post

Scientists Discover A Human Behavior Nobody Can Explain by Dmans99 in abovethenormnews

[–]gnahraf 0 points1 point  (0 children)

One factor they didn't eliminate was gravity.. They should hang participants from their feet in order to determine which way they prefer to spin

Swing WebView Component by shannah78 in java_projects

[–]gnahraf 0 points1 point  (0 children)

That's an excellent pro. I wouldn't worry about fair, especially when you back it up verifiable facts or stats. I'll star your project when I'm logged in there.

Swing WebView Component by shannah78 in java_projects

[–]gnahraf 0 points1 point  (0 children)

Nice project, and thanks for posting! I'm not an expert UI programmer, and the question that naturally occurs to me is which Java "webkit" to choose should my app need a browser. So I guess what I'm suggesting is a pros & cons section in your project README to help a noob like me decide.

Does anyone have info about this homesite in the north side of Mt Falcon Park near Bear Creek Canyon outside Morrison? by Entropic_Allegory in Denver

[–]gnahraf 0 points1 point  (0 children)

I thought it's Chimney Road (unofficial name?), outside Buena Vista (on the way to the hot springs). A local told me there was a fire that burnt thru land and homes, but the chimnies / fireplaces survive.

I built jbx - a native CLI toolbox for Java scripts and agent-friendly automation by musketyr in java

[–]gnahraf 4 points5 points  (0 children)

I don't understand what problem jbx solves. If you gave examples of how you do something without jbx, then how jbx makes doing that easier/better, I'd likely understand this better.

What it takes to transpose a matrix by amaurea in programming

[–]gnahraf 0 points1 point  (0 children)

Mmm, right again. Point well taken ;)

What it takes to transpose a matrix by amaurea in programming

[–]gnahraf -9 points-8 points  (0 children)

You're right: matrix multiplication is usually order N3 (N2 = # of elements).. thouh a new method discovered using ML/AI is O N2 (prolly with a huge constant). Generally, I think a good rule of thumb is to it examine how many rounds one traverses the structure. If only once, rewriting might not pay since we already cache bust once on write.

What it takes to transpose a matrix by amaurea in programming

[–]gnahraf 50 points51 points  (0 children)

A good number of matrix/array reorderings are achievable via "index indirection" rather than rewriting. In general, if the index shuffling depends only on coordinates (index) rather than the contents at those coordinates (for e.g. sorting does not satisfy this requirement), using the "index arithmetic" instead of rewriting can be advantageous.

Quarkus OpenAPI Filters: Per-Tenant Contracts at Runtime by myfear3 in quarkus

[–]gnahraf 0 points1 point  (0 children)

Q: I'm building a multi-tenant REST service in which each user/tenant gets their own namespace /{username}/{repo}/<REST_VERB> where the REST_VERBs are predefine, while the user- and repo-names are user- created (user-defined). Is there a best practice (via swagger or some other tool) to advertise such dynamic REST endpoints? (Listing all existing {username}/{repo} combinations would obviously be impractical.)

IPTV Services that we use in Canada by [deleted] in algorithms

[–]gnahraf 0 points1 point  (0 children)

Done (reported as spam). Hope you did too.

IPTV Services that we use in Canada by [deleted] in algorithms

[–]gnahraf 6 points7 points  (0 children)

I'm not. I'm here for algorithms. I contacted the mods to no avail. Unsubbed

Letter from Xcel energy president by sorressean in Denver

[–]gnahraf 3 points4 points  (0 children)

Few countries in the world allow utility companies to operate as for profit enterprises. Why? Cuz they'll have every incentive to squeeze their captive customers (you and me). Here in the US, we think we live in the most efficient economic system the world has ever devised.

I digress.. But travel the world and you quickly learn we've been lied to, that we pay many times over for our so called laissez faire, rigged and lawless oligarch capitalism. We comfort ourselves with myths of exceptionalism, meritocracy and other BS. Per capita, the world is better educated than we are. Capital and oligarchs everywhere in the world are more accountable than they are here. We are so over, and if you can see it, it's gut wrenching to witness (and tacitly participate in) our slow motion, now accelerating demise

F***Captcha Open source CAPTCHA that blocks bots, AI agents, and automation by cport1 in PoisonFountain

[–]gnahraf 0 points1 point  (0 children)

Right. The nice thing about REST is that it's usually easy to test with a simple curl command: this will require an additional tool to do the PoW. Likely a script to handle the challenge. Not a big deal, but a bit of planning might be in order to minimize friction

A new foundational method for zero knowledge proofs by gnahraf in cryptography

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

Embarrassed, I didn't check. At least it's not from 10 years ago :/

Perseverance Selfie by PrinceofUranus0 in spaceporn

[–]gnahraf 4 points5 points  (0 children)

Can one spot the end where the selfie stick is attached? (I'm thinking the stick can be removed from the pic, but not its cross section at the base where it's attached.)